forked from ritthisakdi/faucet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaincore.php
93 lines (29 loc) · 1006 Bytes
/
maincore.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
<?php
session_start();
ob_start();
require_once "includes/dbconnector.class.php";
require_once "includes/user.class.php";
require_once "includes/function.php";
require "includes/smarty/Smarty.class.php";
$db=new DbConnector;
$db2=new DbConnector;
$smarty=new Smarty;
$smarty->debugging = false;
$smarty->caching = false;
$smarty->cache_lifetime = 120;
$db->queryres("select * from tbl_config where header='privkey'");
$privkey=$db->res['value'];
$db->queryres("select * from tbl_config where header='verkey'");
$verkey=$db->res['value'];
$db->queryres("select * from tbl_config where header='hashkey'");
$hashkey=$db->res['value'];
$ip=get_ip();
$ip=sprintf('%u', ip2long($ip));
define('NOW',time());
define(FILE,basename(basename($_SERVER['SCRIPT_FILENAME']),'.php'));
if(isset($_SESSION['user']['logged'])){
$uid=$_SESSION['user']['uid'];
$user=new User($uid);
$userdet=$user->detail();
}
?>