Jump to content

Server Module


Gav

Recommended Posts

I need to know if it's possible to get the hostingid of a service to use in the 'suspendaccount' function?

 

There are some variables listed like this:

 

$serverip = $params["serverip"];

$serverusername = $params["serverusername"];

 

...etc but is there one for hosting ID? $params["hostingid"] doesn't work.

 

I need it to get a value from tblcustomfieldvalues so that I can suspend and unsuspend accounts automatically.

 

Thanks

Link to comment
Share on other sites

just for anyone else that wants to do this, heres the code I have used based on an old cast control module:

 

$id_query = mysql_query("SELECT tblcustomfieldsvalues.value

FROM tblcustomfieldsvalues, tblcustomfields

WHERE

tblcustomfields.fieldname='id'

AND tblcustomfieldsvalues.fieldid = tblcustomfields.id

AND tblcustomfieldsvalues.relid=".$params['accountid']);

 

if ( mysql_num_rows( $id_query ) == 0 )

{

$return ='ERROR: The account has not been suspended';

return $return;

}

$suspend_id = mysql_result($id_query, 0, 'value');

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated