-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestrequest.php
More file actions
29 lines (24 loc) · 833 Bytes
/
testrequest.php
File metadata and controls
29 lines (24 loc) · 833 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
<?php
session_start();
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;
}
if($req_num === null
|| $req_page === null
|| !is_numeric($req_num)
|| !is_numeric($req_page)){
$result = get_rsp_result(false, 'request skip or limit failed');
exit;
}
require_once("tasks/CoolShow/CoolShowSearch.class.php");
$coolshow = new CoolShowSearch();
$json_result = $coolshow->getCoolShow(COOLXIU_TYPE_THEMES, $req_page, $req_num);
echo $json_result;
?>