-
Notifications
You must be signed in to change notification settings - Fork 89
/
tos.php
48 lines (27 loc) · 1.1 KB
/
tos.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
use WHMCS\Database\Capsule;
define("CLIENTAREA", true);
//define("FORCESSL", true); // Uncomment to force the page to use https://
require("init.php");
$ca = new WHMCS_ClientArea();
$ca->setPageTitle(Lang::trans('tos'));
$ca->addToBreadCrumb('index.php', Lang::trans('globalsystemname'));
$ca->addToBreadCrumb('tos.php', Lang::trans('tos'));
$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
$clientName = Capsule::table('tblclients')
->where('id', '=', $ca->getUserID())->pluck('firstname');
$ca->assign('clientname', $clientName);
} else {
# User is not logged in
}
# Define the template filename to be used without the .tpl extension
$ca->setTemplate('tos');
$ca->output();