Milliment Posted May 6, 2011 Share Posted May 6, 2011 (edited) Some time ago myself and another user made a nice little sidebar widget (before WHMCS released there widgets) that would show all the stats of your WHMCS somewhere on your website by including a PHP file. original Thread : http://forum.whmcs.com/showthread.php?t=30936 Now with the arrival of the WHMCS Widgets script i did some conversion and made the all new System Stats Widget. Very simple and easy to use : Include the following somewhere on your website This will show the total amount of registered domains in your system <script language="javascript" src="http://yourwhmcsdomain.tld/widgets/systemstats.php?type=domains"></script> This will show the total amount of a specific TLD registered in your system. (EG .it) <script language="javascript" src="http://yourwhmcsdomain.tld/widgets/systemstats.php?type=domains&tld=it"></script> This will show the total amount of bandwidth used by all your servers <script language="javascript" src="http://yourwhmcsdomain.tld/widgets/systemstats.php?type=bandwidth"></script> This will show the total amount of webspace used by all your servers <script language="http://yourwhmcsdomain.tld/javascript" src="widgets/systemstats.php?type=webspace"></script> This will show the total amount of hosting accounts in your system <script language="javascript" src="http://yourwhmcsdomain.tld/widgets/systemstats.php?type=hosting"></script> I will be adding more variables to this at some point but at the moment I think this is a good start. I hope you all enjoy. Ciao SystemStats1.0RC1.zip Edited May 6, 2011 by Milliment Title was wrong 0 Quote Link to comment Share on other sites More sharing options...
EasyWHMCS Posted May 6, 2011 Share Posted May 6, 2011 Suggestion Add the following to show the number of reseller servers, and the number of dedicated servers <script language="javascript" src="http://yourwhmcsdomain.tld/widgets/systemstats.php?type=reseller"></script> <script language="javascript" src="http://yourwhmcsdomain.tld/widgets/systemstats.php?type=dedicated"></script> 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted May 6, 2011 Share Posted May 6, 2011 you might want to sanitise the "tld" rather than just passing it through to the query, otherwise it's a quick way for any external user to delete your DB 0 Quote Link to comment Share on other sites More sharing options...
nixell Posted May 7, 2011 Share Posted May 7, 2011 i cant download it 0 Quote Link to comment Share on other sites More sharing options...
EasyWHMCS Posted May 7, 2011 Share Posted May 7, 2011 i cant download it I'm able to download it fine here, What error are you getting ? 0 Quote Link to comment Share on other sites More sharing options...
Redsign Posted May 7, 2011 Share Posted May 7, 2011 you might want to sanitise the "tld" rather than just passing it through to the query, otherwise it's a quick way for any external user to delete your DB I'd highly recommend no-one downloads this until this is fixed. http://php.net/manual/en/function.mysql-real-escape-string.php 0 Quote Link to comment Share on other sites More sharing options...
Milliment Posted May 8, 2011 Author Share Posted May 8, 2011 Thanks for the input, i will implement the sanatizer and do an update to also include reseller information and also include "this week", "this month" and "this Year" information, Total clients, Total Dedicated and VPS servers and maybe some module specific information as well. Have fun. 0 Quote Link to comment Share on other sites More sharing options...
Milliment Posted May 8, 2011 Author Share Posted May 8, 2011 Just done a quick update to the widget Change Logs 1.0RC2 - Added Escape string to prevent Database Injection - Added Service Type variable to show specific hosting types. - Set all Querys to show "Active" Products and Services This will show the total amount of a specific hosting accounts in your system **Available Variables** hostingaccount server reselleraccount other <script language="javascript" src="http://yourwhmcsdomain.tld/widgets/systemstats.php?type=hosting&st=hostingaccount"></script> SystemStats1.0RC2.zip 0 Quote Link to comment Share on other sites More sharing options...
Milliment Posted May 8, 2011 Author Share Posted May 8, 2011 I am wondering what other information i should include in this plugin. i personally am thinking some of the following information would be a good idea : server module based accounts count Custom Output Names(For multi language support *Default will be english if not set*) Number of Registered accounts total and by country, possibly by user groups. Also i am thinking daily, monthly and yearly counts for services. If you have anything else please let me know. 0 Quote Link to comment Share on other sites More sharing options...
sgrayban Posted June 1, 2011 Share Posted June 1, 2011 wow this is a very cool addon - very cool indeed 0 Quote Link to comment Share on other sites More sharing options...
EastsideHosting Posted June 15, 2011 Share Posted June 15, 2011 What's funny, I helped with the original script, the ironic thing was, I thought about making a widgets version of this, but this is cool. 0 Quote Link to comment Share on other sites More sharing options...
Alain Posted July 30, 2011 Share Posted July 30, 2011 Works perfect with v4.5.2 I've just translated it to appear in French. Thanks a lot for this addon. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.