Hi Please help me With PHP code For account stats separate of Whmcs in this code
<p class="header">{$LANG.accountstats}</p>
<p>{$LANG.statsnumproducts}: <strong>{$clientsstats.productsnumactive}</strong> ({$clientsstats.productsnumtotal})<br />
{$LANG.statsnumdomains}: <strong>{$clientsstats.numactivedomains}</strong> ({$clientsstats.numdomains})<br />
{$LANG.statsnumtickets}: <strong>{$clientsstats.numtickets}</strong><br />
{$LANG.statsnumreferredsignups}: <strong>{$clientsstats.numaffiliatesignups}</strong><br />
{$LANG.statscreditbalance}: <strong>{$clientsstats.creditbalance}</strong><br />
{$LANG.statsdueinvoicesbalance}: <strong>{if $clientsstats.numdueinvoices>0}<span class="red">{/if}{$clientsstats.dueinvoicesbalance}{if $clientsstats.numdueinvoices>0}</span>{/if}</strong></p>
{else}
<p> </p>
example :
<?php
require("User/dbconnect.php"); // Give in the path to the dbconnect.php in the WHMCS root.
if($_SESSION['uid'])
{
$result = mysql_query("SELECT productsnumtotal FROM tblclients WHERE id='".$_SESSION['uid']."' LIMIT 1;");
while($row = mysql_fetch_array($result))
echo "document.write('<span><p >".$_LANG['accountstats']."<p /></span>".$_LANG['statsnumproducts'].":<strong>".$row['productsnumtotal']."</strong></ br>');";
}
?>
Thanks