Jump to content

Clientarea page button not working


kaspert

Recommended Posts

I'm creating a module that gives you the option to link subdomains to your server, but one thing is not working.

I want to add a button to my client area output, that calls a function in my module. Can anybody tell me why this is not working?

 

Clientarea.tpl:

<form action="clientarea.php" method="GET">
<input type="hidden" name="id" value="{$serviceid}" />
<input type="hidden" name="modop" value="custom" />
<input type="hidden" name="a" value="reboot" />
<input type="submit" value="Reboot" />
</form>

 

CDsrv.tpl:

function CDsrv_clientarea($vars) {
	return array(
       'pagetitle' => 'Add subdomain',
       'breadcrumb' => array('index.php?m=CDsrv'=>'Add subdomain'),
       'templatefile' => 'CDsrv',
       'requirelogin' => true,
	'vars' => array(
           'domains' => $vars['domains'],
       ),
   );

}
function CDsrv_reboot($params) { 
logModuleCall("CDsrv","Activate","Test2","true","","");
}; 
function CDsrv_ClientAreaCustomButtonArray() { 
   $buttonarray = array( 
       "reboot" => "reboot", 
   ); 
logModuleCall("CDsrv","Activate","Test1","true","","");
   return $buttonarray; 
}  
function CDsrv_AdminCustomButtonArray()
{
    $buttonarray = array( 
       "reboot" => "reboot", 
   ); 
   return $buttonarray; 
}

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