layz Posted December 5, 2011 Share Posted December 5, 2011 hey guys, i want to let my users know how many clients that have signed up and how many have signed up for a hosting account. maybe other info too... is there a way to grab those numbers and show them on the public site (not clientarea) in a secure way? / layz 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted December 5, 2011 Share Posted December 5, 2011 probably could make calls to the API, or direct SQL queries to do it. Shouldnt be too difficult. 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted December 7, 2011 Share Posted December 7, 2011 just put together a widget (see the examples that come with WHMCS) *note widgets may have changed name in the latest release - see the wiki for details 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted December 7, 2011 Share Posted December 7, 2011 <?php require("../dbconnect.php"); require("../includes/functions.php"); /* Widget by RDG <script language="javascript" src="http://(yourwhmcs)/widgets/clients-2011.php"></script> */ $sql = "SELECT COUNT(*) FROM tblclients WHERE datecreated>'2010-12-31' AND datecreated<'2012-01-01'"; $query = mysql_query($sql) or die ("query failed"); $row = mysql_fetch_array($query); $_value = $row[0]; } widgetoutput($_value); function widgetoutput($value) { echo "document.write('".addslashes($value)."');"; exit; } ?> 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted December 7, 2011 Share Posted December 7, 2011 Very nice script I will play around with that. I used to use a script that displayed the total number of active hosting account but it wasn't accurate. 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.