InterWebUK Posted February 9, 2009 Share Posted February 9, 2009 I am trying to get a page added to WHMCS so that only logged in viewers who have a hosting account can download free stuff like templates, sound clips etc. I dont want any customer to view as some customers just have registered to get support so they should not get the free stuff. Any ideas? thanks John 0 Quote Link to comment Share on other sites More sharing options...
AndrewMKP Posted February 9, 2009 Share Posted February 9, 2009 I am not totally experienced with PHP but could you use a simple {IF} statement to display the contents? Something along the lines of {IF} the account has 1 + then display freestuff.php file ELSE "Sorry you have not got any accounts with us"? Its a pretty lemans type description but the logic is correct 0 Quote Link to comment Share on other sites More sharing options...
DataHosts Posted February 11, 2009 Share Posted February 11, 2009 http://wiki.whmcs.com/Creating_Pages <?php define("CLIENTAREA",true); require("dbconnect.php"); require("includes/functions.php"); require("includes/clientareafunctions.php"); $pagetitle = $_LANG['clientareatitle']; $pageicon = "images/support/clientarea.gif"; $breadcrumbnav = '<a href="index.php">'.$_LANG['globalsystemname'].'</a>'; $breadcrumbnav .= ' > <a href="mypage.php">My Page</a>'; initialiseClientArea($pagetitle,$pageicon,$breadcrumbnav); if ($_SESSION['uid']) { # User is Logged In - put any code you like here } # To assign variables in Smarty use the following syntax. # This can then be used as {$variablename} in the template $smartyvalues["variablename"] = $value; # Define the template filename to be used without the .tpl extension $templatefile = "homepage"; outputClientArea($templatefile); ?> 0 Quote Link to comment Share on other sites More sharing options...
InterWebUK Posted February 11, 2009 Author Share Posted February 11, 2009 http://wiki.whmcs.com/Creating_Pages <?php define("CLIENTAREA",true); require("dbconnect.php"); require("includes/functions.php"); require("includes/clientareafunctions.php"); $pagetitle = $_LANG['clientareatitle']; $pageicon = "images/support/clientarea.gif"; $breadcrumbnav = '<a href="index.php">'.$_LANG['globalsystemname'].'</a>'; $breadcrumbnav .= ' > <a href="mypage.php">My Page</a>'; initialiseClientArea($pagetitle,$pageicon,$breadcrumbnav); if ($_SESSION['uid']) { # User is Logged In - put any code you like here } # To assign variables in Smarty use the following syntax. # This can then be used as {$variablename} in the template $smartyvalues["variablename"] = $value; # Define the template filename to be used without the .tpl extension $templatefile = "homepage"; outputClientArea($templatefile); ?> Thanks very much, but will this allow me to specify if a client has a live hosting account rather than just a support ticket user? 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.