Ana dizine istediğim sayfayı oluşturuyoruz.
sayfa.php içine aşağıdaki kodları yazıyoruz whmcs sürümüne göre kodlarda değişiyor
setPageTitle("Your Page Title Goes Here"); $ca->addToBreadCrumb('index.php', $whmcs->get_lang('globalsystemname')); $ca->addToBreadCrumb('mypage.php', 'Your Custom Page Name'); $ca->initPage(); //$ca->requireLogin(); // Uncomment this line to require a login to access this page # To assign variables to the template system use the following syntax. # These can then be referenced using {$variablename} in the template. $ca->assign('variablename', $value); # Check login status if ($ca->isLoggedIn()) { # User is logged in - put any code you like here # Here's an example to get the currently logged in clients first name $result = mysql_query("SELECT firstname FROM tblclients WHERE id=" . $ca->getUserID()); $data = mysql_fetch_array($result); $clientname = $data[0]; $ca->assign('clientname', $clientname); } else { # User is not logged in } # Define the template filename to be used without the .tpl extension $ca->setTemplate('sayfa'); $ca->output(); ?>
saıl sayfayı template içerisine ekliyoruz. İçeriği istediğimiz gibi şekillendiriyoruz.
sayfa.tpl
kaynak: http://www.r10.net/whmcs/837979-whmcs-de-ek-sayfa-ekleme.html