Jump to content
Saqibulhassan

How to create custom page in whmcs ?

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}

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines