Jump to content

mshannaq

Member
  • Posts

    3
  • Joined

  • Last visited

  • Days Won

    1

mshannaq last won the day on January 24 2018

mshannaq had the most liked content!

About mshannaq

mshannaq's Achievements

Junior Member

Junior Member (1/3)

1

Reputation

1

Community Answers

  1. Hello , Iam devloping a provisioning module and I need to add a client area command for 'reboot' the server but I need to it to be confirmed from the client before running the reboot (becuase If I add the reboot command into ClientAreaCustomButtonArray it will work fine and reboot the server but without confirmation) command, I do the following but the module did not run the reboot command: in module file I added function gatehubopenstackwcservers_ClientAreaCustomButtonArray() { $buttonarray = array( "Reboot Server" => "confirmReboot", ); return $buttonarray; } function gatehubopenstackwcservers_confirmReboot($params) { $serviceId = $params['serviceid']; $userId = $params['userid']; // Display a confirmation form using WHMCS template functions return array( 'templatefile' => 'templates/confirmation_reboot_server', // Assuming a custom template file 'vars' => array( 'serviceId' => $serviceId, 'userId' => $userId ) ); } function gatehubopenstackwcservers_reboot($params) { $server_state = rebootServer($params['serviceid'], $params); if (isset($server_state['error'])) { logActivity("error rebooting server service ID: {$params['serviceid']}, {$server_state['error']}", $params['userid']); $result = $server_state['error']; } else { $result = "success"; logActivity("server rebooted service ID: {$params['serviceid']}", $params['userid']); } return $result; } in my module 'templates/confirmation_reboot_server.tpl' I added: <form action="clientarea.php?action=productdetails" method="post"> <input type="hidden" name="id" value="{$serviceId}" /> <input type="hidden" name="modop" value="custom" /> <input type="hidden" name="a" value="reboot" /> <input type="hidden" name="userid" value="{$userId}"> <p>Are you sure you want to reboot the server with service ID {$serviceId}?</p> <button type="submit">Yes, Reboot Server</button> </form> When I logged in as client and goto service and try to reboot , the confirmation form show and ask me to confirm , when I confirm nothing happed and it just redirect me to the product page and show the product info , without real running of `gatehubopenstackwcservers_reboot()` function. Any help appreciated
  2. I have solved this problem The problem was that I have set the value of "Recurring Cycles Limit" of the product to 4 , so when the hosting account runs for 4 years it set to completed instead of generating renew invoice. so I change the value of "Recurring Cycles Limit" to 0 and the problem has been resolved.
  3. Today I see that the status of shared hosting (service) accounts on WHMCS which will expire soon changed to completed and no recurring Incoive generated and that accounts which expired did not suspended by the system. The question : why the status changed to completed instead of generating new invoice for the renew. When I change the shared hosting account to active and click on "Generate Due Invoices" at the customer page the system says: "0 Invoices Created" and the hosting acount status changed to Completed again I attach an image show the status and date next to the status of the account. Also I attached an image show that the shared hosting background color looks like as suspended while it is not suspended. Any one have a solution or have any idea Thanks,
×
×
  • 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