Jump to content

DraGoNeTi

Member
  • Posts

    36
  • Joined

  • Last visited

Everything posted by DraGoNeTi

  1. Ok then.. I will have to translate it my self...
  2. Hello @priestakos, happy new year ! what happened to your repository in github for greek language ? are you updating it ?
  3. @brian! EDIT: I confirm it is working now... !
  4. ok, thanks @brian! i will try it and come back here with the result. thanks a lot... i should have know it is the encoding of greek chars... ! Happy New Year !!!!!
  5. Hello and Happy new year.. ! Any chance of fixing this for whmcs v7 ? Καλή χρονιά φίλε μου με υγεία, αγάπη και ότι άλλο επιθυμείς για το 2019 να το έχεις.. !
  6. Happy new year ! I use this module and i am happy with it ! Just give it a try !
  7. that means i should have a server for customer accounts and a simple hosting package outside that server for whmcs EDIT: or have the whmcs on the same server BUT on a different IP
  8. Merry Christmas and a happy new year to all of you and your families. What if WHMCS and customer/account server is on the same server/ip ? How can i make it work as for clients getting banned from csf they can't access the whmcs and unblock their ip. Maybe using some proxy or another way ? Great module, i have been using it some months until now and i am very happy.
  9. Well, I am not into this specific Lang pack but I was looking after some other modules/custom add-ons that are dead links and it happened to comment on this one... Anyways, thanks for the effort to dig this up for me... Cheers
  10. hmm... i didn't think of that... ! thanks, i will give it a try
  11. sorry for digging up an old post. link is dead and i hate when this is happening... ! custom addons/modules/codes are hosted on own servers which all of a sudden they can't keep/afford anymore and when someone searches it, it is a dead link... !
  12. Can you sort out this addon for v7 ? Doesn't work...
  13. auto install script for softaculous with whmcs (if you have softaculous)
  14. Hello, Not sure if this is the right category to ask this but here we go.... is it easy to add an option for the customer to pay every two months ? and if so, how can i do it.. !?
  15. @twhiting9275 hey man, thanks for the update. What if the product is a whmsonic radio? i wanted it to say package name, ip, port, dj port(if autodj enabled), password, admin password, listeners... is it easy to do ?
  16. @brian! you forgot me.. ! When you can and you have time...
  17. i think we could query the db... but ! as i can remember, the whmsonic is under root account so we couldn't query it
  18. and how about if the service is a whmsonic/centova product, show the admin password as well as the radio port and some extra info ( let's say, the listeners limit, the kbps limit etc etc )
  19. yes, but i want it to say: (icon) Password: blablabla
  20. <?php function whmsonic_ConfigOptions($params) { // Since params are not assigned to ConfigOptions from WHMCS this is a temporary solution until params are assigned. $sqlsonic = "SELECT * FROM tblservers WHERE type='whmsonic'"; $resultsonic = mysql_query($sqlsonic); while($row=mysql_fetch_array($resultsonic)){ $server_ip = $row[ipaddress]; $server_p = $row[password]; $serveruser = $row[username]; } $server_p = decrypt($server_p); $auth = "$serveruser:$server_p"; // Since params are not assigned to ConfigOptions from WHMCS this is a temporary solution until params are assigned. $url = "https://$server_ip:2087/whmsonic/modules/api2.php?"; $data = "cmd=packs&owner=$serveruser"; $ch = curl_init(); curl_setopt($ch, CURLAUTH_BASIC, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_USERPWD, $auth); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 59); curl_setopt($ch, CURLOPT_URL, $url); $retval = curl_exec($ch); curl_close($ch); if (strpos($retval,"Login Attempt Failed!") == true) {$result = "Unable to connect to the server. Check your root password in WHMCS server settings."; } else { $result = "$retval"; } $configarraysonic = array( "Client Type" => array( "Type" => "dropdown", "Options" => "External,internal","Description" => "If Internal, create a custom field with 'cpanel username' field name without ' '"), "" => array( "Type" => ""), // To make the options appear better. "Radio Account Packages" => array( "Type" => "dropdown", "Options" => "$result","Description" => "Create packages in WHMSonic root to use here."), ); return $configarraysonic; } function whmsonic_CreateAccount($params) { // Get The Package Information $stype = $params["configoption1"]; $radioip = $params["serverip"]; $package = $params["configoption3"]; // Get The General Information $serverp = $params["serverpassword"]; // Target Server root password $serveruser = $params["serverusername"]; $auth = "$serveruser:$serverp"; $orderid = $params["serviceid"]; // Get The Client Information $client_email = $params["clientsdetails"]["email"]; $client_name = $params["clientsdetails"]["firstname"]; if ($params["configoption1"]=="internal") { $radiousername = $params["customfields"]["cpanel username"]; } else { // External user, create a custom WHMSonic username & password. $chars = "abcdefghijkmnpqrstuvwxyz123456789"; srand((double)microtime()*1000000); $i = 0; $exu = '' ; while ($i <= 4) { $num = rand() % 33; $tmp = substr($chars, $num, 1); $exu = $exu . $tmp; $i++;} $radiousername = "sc_$exu";} $chars2 = "ABCDEFGHJKMNPQRSTUVWXYZ23456789"; srand((double)microtime()*1000000); $i = 0; $pass = '' ; while ($i <= 20) { $num = rand() % 45; $tmp = substr($chars2, $num, 1); $pass = $pass . $tmp; $i++; } $url = "https://$radioip:2087/whmsonic/modules/api2.php?"; $data = "cmd=setup&stype=$stype&ip=$radioip&cemail=$client_email&rad_username=$radiousername&c_pass=$pass&owner=$serveruser&package=$package&esend=yes"; $ch = curl_init(); curl_setopt($ch, CURLAUTH_BASIC, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_USERPWD, $auth); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 59); curl_setopt($ch, CURLOPT_URL, $url); $retval = curl_exec($ch); if (curl_errno($ch)) { $retval = "CURL Error: ".curl_errno($ch)." - ".curl_error($ch)." - Unable to connect, check serverIP in WHMCS servers setting of WHMSonic."; } curl_close($ch); if ($retval=="Complete") { // Update WHMCS db for the username, required for other actions. $hostpass = encrypt($pass); mysql_query("UPDATE tblhosting SET username='$radiousername', password='$hostpass' WHERE id='".$params["accountid"]."'"); // Update WHMCS db for the username, required for other actions. $result = "success"; } else { if (strpos($retval,"Login Attempt Failed!") == true) {$result = "WHMSonic server($radioip) WHM login failed! The username or password is incorrect. Please check your WHMSonic server/connection settings in WHMCS servers settings of WHMSonic."; } else { $result = "$retval"; }} return $result; } function whmsonic_TerminateAccount($params) { // Details $radioip = $params["serverip"]; $rad_username= $params["username"]; $serverp = $params["serverpassword"]; $serveruser = $params["serverusername"]; $auth = "$serveruser:$serverp"; $url = "https://$radioip:2087/whmsonic/modules/api2.php?"; $data = "cmd=terminate&rad_username=$rad_username"; $ch = curl_init(); curl_setopt($ch, CURLAUTH_BASIC, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_USERPWD, $auth); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 59); curl_setopt($ch, CURLOPT_URL, $url); $retval = curl_exec($ch); if (curl_errno($ch)) { $retval = "CURL Error: ".curl_errno($ch)." - ".curl_error($ch); } curl_close($ch); if ($retval=="Complete") { $result = "success"; } else { $result = "<br>$retval"; } return $result; } function whmsonic_SuspendAccount($params) { // Details $radioip = $params["serverip"]; $rad_username= $params["username"]; $serverp = $params["serverpassword"]; $serveruser = $params["serverusername"]; $auth = "$serveruser:$serverp"; $url = "https://$radioip:2087/whmsonic/modules/api2.php?"; $data = "cmd=suspend&rad_username=$rad_username"; $ch = curl_init(); curl_setopt($ch, CURLAUTH_BASIC, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_USERPWD, $auth); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 59); curl_setopt($ch, CURLOPT_URL, $url); $retval = curl_exec($ch); if (curl_errno($ch)) { $retval = "CURL Error: ".curl_errno($ch)." - ".curl_error($ch); } curl_close($ch); if ($retval=="Complete") { $result = "success"; } else { $result = "<br>$retval"; } return $result; } function whmsonic_UnsuspendAccount($params) { // Details $radioip = $params["serverip"]; $rad_username= $params["username"]; $serverp = $params["serverpassword"]; // Target Server root password $serveruser = $params["serverusername"]; $auth = "$serveruser:$serverp"; $url = "https://$radioip:2087/whmsonic/modules/api2.php?"; $data = "cmd=unsuspend&rad_username=$rad_username"; $ch = curl_init(); curl_setopt($ch, CURLAUTH_BASIC, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_USERPWD, $auth); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 59); curl_setopt($ch, CURLOPT_URL, $url); $retval = curl_exec($ch); if (curl_errno($ch)) { $retval = "CURL Error: ".curl_errno($ch)." - ".curl_error($ch); } curl_close($ch); if ($retval=="Complete") { $result = "success"; } else { $result = "<br>$retval"; } return $result; } function whmsonic_ClientArea($params) { $connection = $params["serverip"]; $code = "<form action=http://$connection/cpanel/ method=post target=_blank><input type=hidden name=ip value=$licenseip><input type=submit value=\"WHMSonic Login\"></form>"; return $code; } function whmsonic_AdminLink($params) { $connection = $params["serverip"]; $code = "<form action=https://$connection:2087/whmsonic/main.php method=post target=_blank><input type=hidden name=username value=\"".$params["serverusername"]."\"><input type=hidden name=password value=\"".$params["serverpassword"]."\"><input type=submit value=\"WHMSonic Root\"></form>"; return $code; } ?>
×
×
  • 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