-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrefer.php
More file actions
31 lines (24 loc) · 996 Bytes
/
refer.php
File metadata and controls
31 lines (24 loc) · 996 Bytes
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
<?php
define("INCLUDED", true); //This is for returning a die message if INCLUDED is not defined on any of the template
$AJAX_PAGE = false;
//################ Required Resources ################
$REQUIRED_RESOURCES = array();
//################ Required Files ################
require_once("init.php");
//################ PAGE ACCESS ################
$cms->BannedAccess(true);
eval($cms->SetPageAccess(ACCESS_REGISTERED));
//################ General Variables ################
$page_name[] = array("Referrals"=>"refer.php");
//################ Page Functions ################
function FetchRefferals()
{
global $DB, $USER;
$query = new Query();
$query->Select("`account_referrals`")->Columns(array("*", "(SELECT `username` FROM `account` WHERE `id`=`account_referrals`.`to`)" => "username"))->Where("`by` = '%s'", $USER['id'])->Build();
$referrals = MySQLiFetch($DB->query($query, DBNAME));
return $referrals;
}
$referredbyme = FetchRefferals();
eval($templates->Output("refer"));
?>