Jump to content

iggi

Member
  • Posts

    8
  • Joined

  • Last visited

Everything posted by iggi

  1. Is there an easy way to be able to add a button on the package details page that would link to an admin/addon module that would pass the service/package id? Similar to how you can add links to the client area
  2. I am attempting to build a provisioning module, however I have come to a point where I need to add in a spot on the admin side of a package where they can input a rather large amount of data (20+ fields) that is unique to each package. With the client side displaying this information was rather easy by being able to create a new page with sub pages, but I am failing to see how to accomplish this on the admin side. Any insight is appreciated!
  3. Is it possible to open a connection to a second database as part of an integration module? Currently I am having difficulty opening the connect as it seems to kill WHMCS entirely when I do that. Anyone able to provide some form of documentation? I tried doing it the standard way as outlined here: http://stackoverflow.com/questions/274892/how-do-you-connect-to-multiple-mysql-databases-on-a-single-webpage however that did not work.
  4. I'm having some issues with troubleshooting this system, no matter what I change on the backend the module page which I created does not update. It seems like WHMCS is caching, is there a setting to disable this?
  5. I replaced $configoptions with $params['configoptions']; and it's still not pulling that line through. No matter if I send it as a long string or as the array structure itself, I just get $params['configoptions'] with an empty array in it. (when I do a print_r on $params I get "[configoptions] => Array ( )")
  6. I'm having some trouble sending an array that exists in the clientarea.tpl file of my server provisioning module to my php file for processing. What I am trying to do is get the multidemensional array that is {$configurableoptions} and send it to the php file when a user clicks a button, then they are sent to a new page with the processed data. For right now we have clientarea.tpl with the following content: <form method="post" action="clientarea.php?action=productdetails"> <input type="hidden" name="id" value="{$serviceid}"/> <input type="hidden" name="clientstatus" value="{$clientsdetails.status}"/> <input type="hidden" name="overdueinvoicebalance" value="{$clientstats.overdueinvoicesbalance}"/> <input type="hidden" name="packagestatus" value="{$status}"/> <input type="hidden" name="configoptions" value="{$configurableoptions|@serialize|@htmlspecialchars}"/> <input type="hidden" name="modop" value="custom"/> <input type="hidden" name="a" value="clientmanagepage"/> <input type="submit" value="Manage Your Server"/> </form> Which invokes the function epicmgr_clientmanagepage: function epicmgr_clientmanagepage($params){ $configoptions_decoded = htmlspecialchars_decode($configoptions); $options = unserialize($configoptions_decoded); $pagearray = array( 'templatefile' => 'client_manage', 'breadcrumb' => ' > <a href="#">Manage Server</a>', 'vars' => array( 'testvariable' => $options, ), ); return $pagearray; } I've done this by first serializing and encoding the html special characters, which seems to work fine at shows up in the client area as having a value which is the serialized and encoded version of the array (as seen below). However, the PHP file seems to get fed a blank variable and I have no idea why. <form method="post" action="clientarea.php?action=productdetails"> <input type="hidden" name="id" value="1"/> <input type="hidden" name="clientstatus" value="Active"/> <input type="hidden" name="overdueinvoicebalance" value=""/> <input type="hidden" name="packagestatus" value="Active"/> <input type="hidden" name="configoptions" value="a:3:{i:0;a:13:{s:2:"id";s:1:"1";s:6:"hidden";s:1:"0";s:10:"optionname";s:9:"Bandwidth";s:10:"optiontype";s:1:"1";s:13:"selectedvalue";s:1:"1";s:11:"selectedqty";i:0;s:12:"selectedname";s:6:"1000GB";s:14:"selectedoption";s:6:"1000GB";s:13:"selectedsetup";s:4:"0.00";s:17:"selectedrecurring";s:4:"0.00";s:10:"qtyminimum";s:1:"0";s:10:"qtymaximum";s:1:"0";s:7:"options";a:4:{i:0;a:5:{s:2:"id";s:1:"1";s:4:"name";s:6:"1000GB";s:8:"nameonly";s:6:"1000GB";s:9:"recurring";s:4:"0.00";s:6:"hidden";s:1:"0";}i:1;a:5:{s:2:"id";s:1:"2";s:4:"name";s:14:"2000GB $10.00 ";s:8:"nameonly";s:6:"2000GB";s:9:"recurring";s:5:"10.00";s:6:"hidden";s:1:"0";}i:2;a:5:{s:2:"id";s:1:"3";s:4:"name";s:15:"3000 GB $20.00 ";s:8:"nameonly";s:7:"3000 GB";s:9:"recurring";s:5:"20.00";s:6:"hidden";s:1:"0";}i:3;a:5:{s:2:"id";s:1:"4";s:4:"name";s:14:"4000gb $30.00 ";s:8:"nameonly";s:6:"4000gb";s:9:"recurring";s:5:"30.00";s:6:"hidden";s:1:"0";}}}i:1;a:13:{s:2:"id";s:1:"4";s:6:"hidden";s:1:"0";s:10:"optionname";s:16:"Operating System";s:10:"optiontype";s:1:"1";s:13:"selectedvalue";s:1:"9";s:11:"selectedqty";i:0;s:12:"selectedname";s:7:"Windows";s:14:"selectedoption";s:7:"Windows";s:13:"selectedsetup";s:4:"0.00";s:17:"selectedrecurring";s:4:"0.00";s:10:"qtyminimum";s:1:"0";s:10:"qtymaximum";s:1:"0";s:7:"options";a:2:{i:0;a:5:{s:2:"id";s:1:"9";s:4:"name";s:7:"Windows";s:8:"nameonly";s:7:"Windows";s:9:"recurring";s:4:"0.00";s:6:"hidden";s:1:"0";}i:1;a:5:{s:2:"id";s:2:"10";s:4:"name";s:5:"Linux";s:8:"nameonly";s:5:"Linux";s:9:"recurring";s:4:"0.00";s:6:"hidden";s:1:"0";}}}i:2;a:13:{s:2:"id";s:1:"6";s:6:"hidden";s:1:"0";s:10:"optionname";s:10:"FTP Backup";s:10:"optiontype";s:1:"1";s:13:"selectedvalue";s:2:"13";s:11:"selectedqty";i:0;s:12:"selectedname";s:4:"10GB";s:14:"selectedoption";s:11:"10GB $5.00 ";s:13:"selectedsetup";s:4:"0.00";s:17:"selectedrecurring";s:4:"5.00";s:10:"qtyminimum";s:1:"0";s:10:"qtymaximum";s:1:"0";s:7:"options";a:2:{i:0;a:5:{s:2:"id";s:2:"13";s:4:"name";s:11:"10GB $5.00 ";s:8:"nameonly";s:4:"10GB";s:9:"recurring";s:4:"5.00";s:6:"hidden";s:1:"0";}i:1;a:5:{s:2:"id";s:2:"14";s:4:"name";s:13:"100GB $10.00 ";s:8:"nameonly";s:5:"100GB";s:9:"recurring";s:5:"10.00";s:6:"hidden";s:1:"0";}}}}"/> <input type="hidden" name="modop" value="custom"/> <input type="hidden" name="a" value="clientmanagepage"/> <input type="submit" value="Manage Your Server"/> </form>
  7. I was able to resolve the issue with clientarea.tpl, I had to uplaod a clientarea.tpl file with a different function named, then view the page. Afterwards I replaced the clientarea.tpl file with the correct one and viewed the page without issue. My other question still stands, how do I store information on a per service/product basis for each customer?
  8. I'm having some troubles creating a provisioning module. I was able to at least get a basic provisioning module setup with a custom button in the client area (using clientarea.tpl) linking to a custom function to create a custom page from a template. Everything was working fine, but once I changed the name of the function in the clientarea.tpl file it would not update in the client area, instead it still stands as the old function name. I tried restarting apache and deleting clientarea.tpl and replacing it with no luck. I verified it was not cached via browser as I tried two browsers both with cleared cash and even from another machine on a seperate network which has not been to the page, no dice. My other question is; I'm making a provisioning module for dedicated servers, which will pull from a SQL table of information as to the inventory number, switch info, pdu info, etc. but the issue I am seeing is that the ConfigOptions array seems to be global for the module and I need store this for each individual service/product, what is the best way to do this?
×
×
  • 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