-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
123 lines (100 loc) · 3.97 KB
/
index.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?php
// Author : Paul Moore
// Project : In2streams.co Video CMS
include('config/config.php');
if(defined('disable') && disable){
include('noservice.html');
exit;
}
include('functions/db.php');
include('functions/settings.php');
require_once('libs/Smarty.class.php');
include "phpqrcode/qrlib.php";
include('functions/loginaction.php');
$logoutAction = site_root."/";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
$logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
//to fully log out a visitor we need to clear the session varialbles
$_SESSION['MM_Username'] = NULL;
$_SESSION['MM_UserGroup'] = NULL;
$_SESSION['PrevUrl'] = NULL;
unset($_SESSION['MM_Username']);
unset($_SESSION['MM_UserGroup']);
unset($_SESSION['PrevUrl']);
session_unset();
$_SESSION['FBID'] = NULL;
$_SESSION['USERNAME'] = NULL;
$_SESSION['FULLNAME'] = NULL;
$_SESSION['EMAIL'] = NULL;
$_SESSION['LOGOUT'] = NULL;
header("Location: ".site_root."/");
exit;}
$get_query = new setup;
$db1 = new db;
$db1->connect();
$login = new auth;
$template = $get_query->SetTheme();
$db1->user__online();
@$content['mac'] = $db1->db_query("SELECT * FROM `lines` where expires < '".date('YmdHis')."' and mac !='Not Set'",array (
"mac"
),1,0);
if($content['mac'][0]['is_empty'] == 'false')
{
$file = file_get_contents(ministra.'/delete.php?mac='.$content['mac'][0]['mac'].'&user='.ministra_user.'&pass='.ministra_pass);
$insertSQL = sprintf("UPDATE `lines` set mac = 'Not Set' where mac=%s",
$db1->GetSQLValueString($content['mac'][0]['mac'], "text",$GLOBALS['__Connect']));
$Result1 = mysqli_query($GLOBALS['__Connect'],$insertSQL) or die(mysqli_error($GLOBALS['__Connect']));
}
//get user info
@$content['user'] = $db1->db_query("SELECT * FROM users_db where email=".$db1->GetSQLValueString($_SESSION[sha1($_SERVER['DOCUMENT_ROOT'].site_root)], "text")."",array (
"uname"
),1,0);
// end user info
//account purchases
$content['files'] = $db1->db_query("SELECT * FROM files ORDER BY id Desc",array (
"name",'description','image','price','id','discount','display','sales'
),20,0);
$content['ads']['top']= $db1->db_query("SELECT * FROM ads WHERE position='top' ORDER BY id Desc",array (
"name",'code'
),1000000,0);
$content['ads']['side']= $db1->db_query("SELECT * FROM ads WHERE position='side' ORDER BY id Desc",array (
"name",'code'
),1000000,0);
$content['categories']= $db1->db_query("SELECT * FROM categories ORDER BY name ASC",array (
"name",'url'
),1000000,0);
@$content['tabs']= $db1->db_query("SELECT * FROM tabs WHERE item_id=".intval($content['files'][0]['id'])." ORDER BY id ASC",array (
"name",'content','id'
),1000000,0);
//end account
$smarty= new smarty();
$smarty->assign('logo',logo);
$smarty->assign('slogan',slogan);
if(isset($_SESSION[sha1($_SERVER['DOCUMENT_ROOT'].site_root)]))
{
$smarty->assign('group',$_SESSION['MM_UserGroup']);
$smarty->assign('user',$_SESSION[sha1($_SERVER['DOCUMENT_ROOT'].site_root)]);
}
$content['basket']= $db1->db_query("SELECT * FROM basket WHERE ip=".$db1->GetSQLValueString($_SERVER['REMOTE_ADDR'], "text")." and paid = 'false' ORDER BY id Desc",array (
"name",'price','image','id'
),1000000,0);
include('page-titles.php');
$content['ads']['side_bar']= $db1->db_query("SELECT * FROM ads WHERE position='sidebar' ORDER BY id Desc",array (
"name",'code'
),1000000,0);
$smarty->assign('page_title',$title['index']);
$smarty->assign('ads',$content['ads']);
$smarty->assign('basket',$content['basket']);
$smarty->assign('categories',$content['categories']);
$smarty->assign('tabs',$content['tabs']);
$smarty->assign('ads',$content['ads']);
$smarty->assign('percentage','');
$smarty->assign('curency',curency);
$smarty->template_dir = 'themes/'.$template;
$smarty->assign('theme_dir',$template);
$smarty->assign('files',$content['files']);
$smarty->assign('site_root',site_root);
$smarty->compile_dir = 'tmp';
$smarty->display('index.tpl'); ?>