andremcarrano Posted September 8, 2012 Share Posted September 8, 2012 Im trying to create a custom client area page to list all products Looking at the documentation, my example above isn't working. I use {$domain} in adm.tpl but don't get any data! It would be better catch using API, any body have a custom page example working for 5.1.2? <?php define("CLIENTAREA",true); //define("FORCESSL",true); # Uncomment to force the page to use https:// require("dbconnect.php"); require("includes/functions.php"); require("includes/clientareafunctions.php"); $pagetitle = $_LANG['clientareatitle']; $breadcrumbnav = '<a href="index.php">'.$_LANG['globalsystemname'].'</a>'; $breadcrumbnav .= ' > <a href="adm.php">ADM</a>'; initialiseClientArea($pagetitle,'',$breadcrumbnav); # Check login status if ($_SESSION['uid']) { # Here's an example to get the currently logged in clients first name $query="SELECT * FROM tblhosting WHERE userid='".$_SESSION['uid']."'"; $result = mysql_query($query) or die('Error, query failed'); while ($data = mysql_fetch_array($result)) { $assignedips = $data['assignedips']; $domain = $data['domain']; } $smartyvalues['assignedips'] = $assignedips; $smartyvalues['domain'] = $domain; $templatefile = "adm"; outputClientArea($templatefile); } else { # User is not logged in outputClientArea(login); } ?> Thanks 0 Quote Link to comment Share on other sites More sharing options...
paperweight Posted September 22, 2012 Share Posted September 22, 2012 I think the solution mentioned here may help you: http://forum.whmcs.com/showthread.php?48409-Customise-clientarea-tpl-to-display-Active-Products-Services 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.