I have just finished customising all the WHMCS templates for my website.
One thing I am wanting to do is if the user is logged in show their details/account stats in a box on the page and then if they aren't logged, show the login form.
What i currently have in my header.tpl is:
This works perfectly fine, but ONLY if they are on the clientarea.php page. Is there anyway i can make it work for all pages?Code:{if $loggedin} {$clientsdetails.firstname} {$clientsdetails.lastname} {if $clientsdetails.companyname}({$clientsdetails.companyname}){/if}<br /> {$clientsdetails.address1}, {$clientsdetails.address2}<br /> {$clientsdetails.city}, {$clientsdetails.state}, {$clientsdetails.postcode}<br /> {$clientsdetails.country}<br /> {$clientsdetails.email}<br /><br /> </td> <td> {$LANG.accountstats}:<br /><br /> {$LANG.statsnumproducts}: {$stats.productsnumtotal}<br /> {$LANG.statsnumdomains}: {$stats.numdomains}<br /> {$LANG.statsnumtickets}: {$stats.numtickets}<br /> {$LANG.statscreditbalance}: {$stats.creditbalance}<br /> {$LANG.statsdueinvoicesbalance}: {if $stats.numdueinvoices>0}<font color="#cc0000">{/if}{$stats.dueinvoicesbalance}{if $stats.numdueinvoices>0}</font>{/if}<br /> </td> </tr> </table> {else} SHOW LOGIN FORM {/if}

Reply With Quote