-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlockscreen.php
61 lines (52 loc) · 1.77 KB
/
lockscreen.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
<?php
try{
require_once 'lib/WriteLog.lib.php';
require_once 'public/public.php';
if(isset($_GET['page']) && isset($_GET['reqNum'])){
$req_page = (int)(isset($_GET['page'])?$_GET['page']:0);
$req_num = (int)(isset($_GET['reqNum'])?$_GET['reqNum']:10);
$start = $req_num * $req_page;
}else{
$req_page = (int)(isset($_POST['start'])?$_POST['start']:0);
$req_num = (int)(isset($_POST['limit'])?$_POST['limit']:10);
$start = $req_page;
}
$width = (int)(isset($_GET['width'])?$_GET['width']:720);
$height = (int)(isset($_GET['height'])?$_GET['height']:1280);
$kernelcode = (int)(isset($_GET['kernelcode'])?$_GET['kernelcode']:2);
$vercode = (int)(isset($_GET['versionCode'])?$_GET['versionCode']:0);
if($req_num === null || $req_page === null){
echo(getFaultResult(-1));
exit; //错误请求
}
$result = is_numeric($req_num);
if(!$result){
echo(getFaultResult(-1));
exit; //错误请求
}
$result = is_numeric($req_page);
if(!$result){
echo(getFaultResult(-1));
exit; //错误请求
}
require_once 'configs/config.php';
require_once 'tasks/LockScreen/ScreenDb.class.php';
global $g_arr_db_config;
$screenDb = new ScreenDb($g_arr_db_config['coolshow_scene']);
$strJsonResult = $screenDb->searchScreen($kernelcode, $start, $req_num, $vercode, false);
echo $strJsonResult;
// require_once 'tasks/statis/ReqStatis.class.php';
// $reqStatis = new ReqStatis();
// $req_type = 0;
// $kernel = 2;
// $id = '';
// $cpid = '';
// $url = '';
// $channel = 0;
// $reqStatis->recordRequest($req_type, COOLXIU_TYPE_SCENE, $height, $width, $kernel,
// $id, $cpid, $url, $channel, $vercode);
require_once 'tasks/Records/RecordTask.class.php';
$rt = new RecordTask();
$rt->saveRequest(COOLXIU_TYPE_SCENE);
}catch(Exceptin $e){
}