Jump to content

How to create custom page in whmcs ?


Saqibulhassan

Recommended Posts

Here is a sample custom php file (test.php), you can upload it to the root folder of the whmcs.

You can extend the simple file to do anything.

Sky is your limit :)

test.php

<?php
use Illuminate\Database\Capsule\Manager as Capsule;
define("CLIENTAREA", true);
require("init.php");

$ca = new WHMCS_ClientArea();

$ca->setPageTitle("My test page);

$ca->addToBreadCrumb('index.php', Lang::trans('globalsystemname'));
$ca->addToBreadCrumb('test.php', 'Test');

$ca->initPage();

$ca->assign("response", $an_array);
$ca->setTemplate('test');
 $ca->output();

 

 

test.tpl (place in the document root itself)


{if $response}

Test content

{/if}

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated