Difference between revisions of "Creating Pages"

From WHMCS Documentation

(New page: To add your own pages to the WHMCS system which utilise the WHMCS templating system, you may use the following code. This code is designed to work with files placed in the root whmcs dire...)
 
Line 15: Line 15:
  
 
if ($_SESSION['loggedinstatus']=="true") {
 
if ($_SESSION['loggedinstatus']=="true") {
* User is Logged In - put any code you like here
+
<nowiki>#</nowiki> User is Logged In - put any code you like here
 
}  
 
}  
  
* Define the template filename to be used without the .tpl extension
+
<nowiki>#</nowiki> Define the template filename to be used without the .tpl extension
 
$templatefile = "homepage";  
 
$templatefile = "homepage";  
  
* To assign variables in Smarty use the following syntax. This can then be used as {$variablename} in the template
+
<nowiki>#</nowiki> To assign variables in Smarty use the following syntax. This can then be used as {$variablename} in the template
 
$smartyvalues["variablename"] = $value;  
 
$smartyvalues["variablename"] = $value;  
  

Revision as of 00:43, 7 March 2008

To add your own pages to the WHMCS system which utilise the WHMCS templating system, you may use the following code. This code is designed to work with files placed in the root whmcs directory.

<?php

define("CLIENTAREA",true);

require("dbconnect.php"); require("includes/functions.php");

$pagetitle = $_LANG['clientareatitle']; $pageicon = "images/support/clientarea.gif"; $breadcrumbnav=.$_LANG['globalsystemname'].;

require("init.php");

if ($_SESSION['loggedinstatus']=="true") { # User is Logged In - put any code you like here }

# Define the template filename to be used without the .tpl extension $templatefile = "homepage";

# To assign variables in Smarty use the following syntax. This can then be used as {$variablename} in the template $smartyvalues["variablename"] = $value;

include("display.php");

?>