Jump to content

whattheserver

Members
  • Content count

    13
  • Joined

  • Last visited

Community Reputation

10 Good

About whattheserver

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. First off thanks to the original thread for the inspiration for the first script. I was unable to reply there with my bash version of this. I also had another script so I figured id share all it here. #!/bin/bash ## Author: Michael Ramsey ## Objective clean 2 weeks prior to tbllog_register ## Please ensure that the database user used for this has both Select and Delete permissions for the whmcs database ## save as whmcs-register-clean.sh chmod it to 700 ## example cronjob ## 0 0 * * 0 /bin/bash /home/username/scripts/whmcs-register-clean.sh >/dev/null 2>&1 date2w=$(date --date='2 week ago' +"%Y-%m-%d") /usr/bin/mysql -h "localhost" -u "database_username" "-pPasswordhere" -e "DELETE FROM tbllog_register WHERE created_at < $date2w" database_name The second one is more for privacy based companies that want to prevent any client IP's from being unnecessarily saved and prevent DB growth for really large companies with active clients logins. We run privacy based logless VPN service and wanted to ensure there is no IP's ever saved of any of our clients. This included the client and support portal in addition to the VPN nodes and freeradius auth server. More information about this setup is in our blog post here > https://whattheserver.com/whmcs-client-last-login-ip-log-clearing-script/ #!/bin/bash ## Author: Michael Ramsey ## Objective clear last login IP and host from tblclients ## Please ensure that the database user used for this has both Select and Delete permissions for the whmcs database ## save as whmcs-client-clear-ip.sh chmod it to 700 ## example cronjob ## * * * * * /bin/bash /home/username/scripts/whmcs-client-clear-ip.sh >/dev/null 2>&1 #Clear clients last login IP address in table tblclients > ip,host /usr/bin/mysql -h "localhost" -u "database_username" "-pPasswordhere" -e "UPDATE tblclients SET ip = '', host = ''" database_name #Clear Order Ipaddress in table tblorders > ipaddress /usr/bin/mysql -h "localhost" -u "database_username" "-pPasswordhere" -e "UPDATE tblorders SET ipaddress = ''" database_name whmcs-register-clean.sh whmcs-client-clear-ip.sh
  2. In this guide will show how to enable and selectively control the output so you can allow clients to view there hosting or service password easily under the product details page. If modifying the original six template: PATHTOWHMCS/templates/six/clientareaproductdetails.tpl If you have custom theme adjust the path to match your theme name: PATHTOWHMCS/templates/yourtheme/clientareaproductdetails.tpl For a while was using the below code which i found somewhere while it worked was a tad tacky and showed the wrong information for some products and always showed the password in plaintext when viewing the page. <div class="row"> <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title">Login Credentials</h3> </div> <div class="panel-body"> <div class="vpn-package-details"> Username: <code>{$username}</code> Password: <code>{$password}</code> </div> </div> </div> </div> </div> So after some tweaks and modding came up with the below code. This allows me to selectively control and hide the password from being shown by default but allows it to viewed by the client if desired. <script language="JavaScript" type="text/javascript"> {literal} function viewPassword() { var passwordInput = document.getElementById('password-field'); var passStatus = document.getElementById('pass-status'); if (passwordInput.type == 'password'){ passwordInput.type='text'; passStatus.className='fa fa-eye-slash'; } else{ passwordInput.type='password'; passStatus.className='fa fa-eye'; } } {/literal} </script> {if $producttype=="other"} <div class="row"> <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"> VPN Login Credentials</h3> </div> <div class="panel-body"> <div class="vpn-package-details"> <div class="row"> <div class="col-sm-5 text-right"> <strong>Username:</strong> </div> <div class="col-sm-7 text-left"> {$username} </div> </div> <div class="row"> <div class="col-sm-5 text-right"> <strong>Password:</strong> </div> <div class="col-sm-7 text-left"> <input type="password" id="password-field" value="{$password}"> <i id="pass-status" class="fa fa-eye" aria-hidden="true" onClick="viewPassword()"></i> </div> </div> </div> </div> </div> </div> </div> {elseif $producttype=="hostingaccount"} <div class="row"> <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title">Hosting Login Credentials</h3> </div> <div class="panel-body"> <div class="hosting-package-details"> <div class="row"> <div class="row"> <div class="col-sm-5 text-right"> <strong>Username:</strong> </div> <div class="col-sm-7 text-left"> {$username} </div> </div> <div class="row"> <div class="col-sm-5 text-right"> <strong>Password:</strong> </div> <div class="col-sm-7 text-left"> <input type="password" id="password-field" value="{$password}"> <i id="pass-status" class="fa fa-eye" aria-hidden="true" onClick="viewPassword()"></i> </div> </div> </div> </div> </div> </div> </div> </div> {elseif $producttype=="server"} <div class="row"> <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title">Server Login Credentials</h3> </div> <div class="panel-body"> <div class="hosting-package-details"> <div class="row"> <div class="row"> <div class="col-sm-5 text-right"> <strong>Username:</strong> </div> <div class="col-sm-7 text-left"> root </div> </div> <div class="row"> <div class="col-sm-5 text-right"> <strong>Password:</strong> </div> <div class="col-sm-7 text-left"> <input type="password" id="password-field" value="{$password}"> <i id="pass-status" class="fa fa-eye" aria-hidden="true" onClick="viewPassword()"></i> </div> </div> </div> </div> </div> </div> </div> </div> {/if} If you do not want to show it for some product groups it can remove the group that should not have it visible by using if statements. This was needed for VPN freeradius module was using and wanted to be able to show the clients there current username and optionally the password as there both randomly generated. With the eyball clicked it now shows the password. Hope this helps someone else out there. I also really think this should be an option inside WHMCS it's a very simple thing it seems like that could be added to have an optional show client password on the product details page and maybe an option to label or format it if desired. Special thanks to the people responsible for the below guides which provided inspiration for parts I was stuck on originally. http://form.guide/html-form/html-input-type-password.html https://www.smarty.net/docsv2/en/language.function.literal
  3. whattheserver

    Best hosting provider for WHMCS?

    We offer the latest PHP and also have some awesome boosts for WordPress cache as we use Litespeed with LSCACHE. https://whattheserver.com/professional-whmcs-hosting/
  4. whattheserver

    Best hosting provider for WHMCS?

    What is everyone typical whmcs cpanel account size? Just curious mine is like 5gb with extra dev install's I definitely could spin up a dedicated WHMCS only fast ssd WHM/Cpanel with Litespeed if the demand is there for dedicated WHMCS hosting with latest PHP always by default with the recommended PHP settings
  5. whattheserver

    PerfectMoney Payment gateway

    can buy one here > /https://clients.intelvps.ru/cart.php?gid=2 i have purchased via them and it works like a charm reasonably priced as well
  6. whattheserver

    WalletBit Bitcoin GateWay

    Yes it is thanks and i def recommend this to anyone else looking for a good BTC rateway :0 plus powerchaos great support 5 of 5 rating worth every bit
  7. whattheserver

    WalletBit Bitcoin GateWay

    sent info in a ticket thanks so much for your assistance and help
  8. whattheserver

    WalletBit Bitcoin GateWay

    ok so i got all edited and have just retested i got the callback via email correctly now but i don't see the ipn in gateway logs im assuming this is because its waiting on more confirmations? thanks in advance ok i see the issue its sending call back for invoice 85 when it is in fact invoice 89 i paid atm how do i fix this?
  9. whattheserver

    WalletBit Bitcoin GateWay

    Yeah how did i miss that all that workign late into the night thanks so much for explanation updated gateway and fixed the callback
  10. whattheserver

    WalletBit Bitcoin GateWay

    your checkout went fast with bitcoin i sent myself some coin to my merchant wallet-bit acct to try checkout and forgot i sent to merchant acct then tried to deposit into another wallet-bit for reference but my 1.7BTC is lost in cypher-space lol waiting on a customer to try it now super excited so to recap it does in fact send IPN to whmcs regardless of using wallet-bit acct?
  11. whattheserver

    WalletBit Bitcoin GateWay

    Just bought the module seems to work great are u sure your system is automated with or without the customer using their walletbit acct? seems amazing so far though bud great work
×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated