Jump to content

Sp0tteh

Retired Forum Member
  • Posts

    15
  • Joined

  • Last visited

Everything posted by Sp0tteh

  1. I have also reset my password and received the "To reset your password, please visit the url below:" email within 1 min. However its now been 30 minutes and still havn't received the new password?? I need to download the latest source however can't without a password
  2. The template exists under "General Messages" and its a default template with WHMCS not a custom one.
  3. When using the hook "EmailPreSend" with sending a quote email via the admin area. The relid is returning "1" all the time, my client ID is 6 and the Quote ID is 1110. So not sure where the 1 is coming from? Should be 1110 as i understand it. Array ( [messagename] => Quote Delivery with PDF [relid] => 1 ) From the documentation: http://docs.whmcs.com/Hooks:EmailPreSend $relid = $vars['relid']; # Related ID it's being sent for - client ID, invoice ID, etc... Regards, Jason
  4. In the latest version i have set up a client group. I have added the client to the client group. I am using the client group id in some custom code on my quotes which is working fine, however the placeholders in the email templates are coming up blank. In the example placeholders i see the following: Client Related ID {$client_id} ... Client Group ID {$client_group_id} Client Group Name {$client_group_name} ... When added to the email templates, they appear blank? Regards, Jason
  5. Hey, In the process of creating an addon. However I really don't enjoy having to echo my html and would rather be able to split up the design from the PHP. Is there a way I can use smarty and create a template file that then renders my page as well as the rest of the Admin area (header / footer ect)??? Cheers
  6. Hey, Matt sent through a fixed version of the "sendquote.php" file. I have attached this for you. Unfortunately i don't have a working "acceptquote.php" as it wasn't one i needed. Sorry. Here's the result i now get with the new file: Request: Array ( [username] => api [password] => 6a838dd3ce7761a4171563df60370311 [responsetype] => json [action] => sendquote [quoteid] => 1084 ) Response: {"result":"success"} Array: stdClass Object ( [result] => success ) Regards Jason sendquote.zip
  7. Hey, I've managed to create a client through the API, and then create a quote againts that new client. However when i try to send the quote to the client i get the following debug output from PHP: Request: Array ( [username] => api [password] => 6a838dd3ce7761a4171563df60370311 [responsetype] => json [action] => sendquote [quoteid] => 1084 ) Response: Array: Im using the example code from (http://docs.whmcs.com/API:JSON_Sample_Code) : $username = "removed"; # Admin username goes here $password = "removed"; # Admin password goes here $postfields = array(); $postfields["username"] = $username; $postfields["password"] = md5($password); $postfields["responsetype"] = "json"; $postfields["action"] = "sendquote"; $postfields["quoteid"] = 1084; $query_string = ""; foreach ($postfields AS $k=>$v) $query_string .= "$k=".urlencode($v)."&"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $query_string); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); $jsondata = curl_exec($ch); if (curl_error($ch)) die("Connection Error: ".curl_errno($ch).' - '.curl_error($ch)); curl_close($ch); $arr = json_decode($jsondata); # Decode JSON String print_r($arr); # Output XML Response as Array //Debug Output - Uncomment if needed to troubleshoot problems echo "<textarea rows=50 cols=100>Request: ".print_r($postfields,true); echo "\nResponse: ".htmlentities($jsondata)."\n\nArray: ".print_r($arr,true); echo "</textarea>"; Ive tried both the JSON and XML exmaples. I'm using the exact same code as I have for the "createclient" and "createquote". Only changed the action to "sendquote" and added the "quoteid". When I go into WHMCS and open the quote i can send the email, so its like the API call has been renamed or something. Anyone used this API call before? or can see that I've done something wrong??
  8. Hey, Is it possible to allow .wav file types as attachments in a ticket email? I am using the pop cron job for creating the support tickets, however once an email has been imported the attachment is blocked. This is the exact message i get: "Attachment Voicemail-1112.wav blocked - file type not allowed." Regards, Jason
  9. I have created a module which integrates with freeradius. It can create / suspend / un-suspend / and terminate accounts. I also have a couple of scripts for freeradius which handles quota / time restraints for user logins. OpenVPN,PPTP,L2TP ect can link to a freeradius server for the authentication. Let me know if your still interested. Regards, Jason
  10. This has been resolved, was a problem with my ftp client not uploading my changes. InvoicePaid is ran on every invoice.
  11. Hey, I'm using the InvoicePaid hook to do some custom actions on my radius server. This works fine for the original order and invoice payment. However the recurring invoices when paid don't seem to trigger this action hook? Can anyone please advise if the InvoicePaid is executed on every invoice payment?
  12. Thanks a lot for the detailed response, I'm connecting to a different server so i used the second bit of code you pasted to re-connect to the whmcs database and it worked first shot. Thanks again for the help.
  13. Hey all, I'm having some problems with a module I'm trying to create. In short what I'm trying to do is add the new user into a freeradius database on another server using mysql. Now this works, the problem is that the account stays as "Pending" (In WHMCS) even though i can see the data in the freeradius database and no sql errors. function radius_CreateAccount($params) { $dbhost = 'fake'; $dbuser = 'fake'; $dbpass = 'fake'; $dbname = 'fake'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); //mysql_select_db($dbname, $conn); //mysql_query("INSERT INTO radcheck (username, attribute, op, value) VALUES ('".$clientsdetails['email']."', 'User-Password', ':=', '".$password."')", $conn); //mysql_query("INSERT INTO radusergroup (username, groupname, priority) VALUES ('".$clientsdetails['email']."', 'Dynamic', '1')", $conn); mysql_close($conn); return "success"; } In the code above i have tried to force it with the " return "success";" but it doesn't seem to make any difference. If i comment out the "mysql_connect" line above, then it shows as "active". From my understanding PHP should have no issues creating a second sql connection. If someone could help me out or at least explain whats going on it would be greatly appreciated
×
×
  • 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