-
Notifications
You must be signed in to change notification settings - Fork 33
/
vod.php
91 lines (78 loc) · 2.95 KB
/
vod.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
<?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');$get_query = new setup;
$db1 = new db;
$db1->connect();
$db1->user__online();
$login = new auth;
$template = $get_query->SetTheme();
$login = new auth;
if(isset($_POST['uname']) && is_array($_POST['uname']) or isset($_POST['pword']) && is_array($_POST['pword']))
{
}else {
$content['loginaction'] = $login->loginaction();
}
//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['ads']['side']= $db1->db_query("SELECT * FROM ads WHERE position='side' ORDER BY id Desc",array (
"name",'code'
),1000000,0);
$content['ads']['top']= $db1->db_query("SELECT * FROM ads WHERE position='top' 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);
//end account
//end account
$smarty= new smarty();
$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);
if(isset($_GET['psearch']))
{
$content['videos']= $db1->db_query("SELECT * FROM videos WHERE fname like '%.m3u8%' and sub = 'false' and name like".$db1->GetSQLValueString('%'.$_GET['psearch'].'%', "text")."",array (
'name','image','id','views','fname'
),20,0,true);
}
else{
$content['videos']= $db1->db_query("SELECT * FROM videos WHERE (`type` ='yt' and sub = 'false') OR ( fname like '%.m3u8%' and sub = 'false')",array (
'name','image','id','views','fname'
),20,0,true);}
$smarty->assign('basket',$content['basket']);
$smarty->assign('logo',logo);
include('page-titles.php');
$i = 0;
do {
$pages_num[$i]['num'] = $i;
$i++;
} while($i <= $content['videos'][0]['total_pages']);
$smarty->assign('curency',curency);
@$smarty->assign('page_title',$title['vod']);
$smarty->assign('slogan',slogan);$smarty->template_dir = 'themes/'.$template;
$smarty->assign('theme_dir',$template);
$smarty->assign('ads',$content['ads']);
$smarty->assign('videos',$content['videos']);
$smarty->assign('categories',$content['categories']);
$smarty->assign('site_root',site_root);
$smarty->compile_dir = 'tmp';
$smarty->assign('pages_num',$pages_num);
$smarty->assign('page_number',$content['videos'][0]['page_num']);
$smarty->assign('total_pages',$content['videos'][0]['total_pages']);
$smarty->assign('total_rows',$content['videos'][0]['total_rows']);
@$smarty->assign('psearch',htmlspecialchars($_GET['psearch']));
$smarty->display('vod.tpl'); ?>