-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdesigner.php
More file actions
50 lines (44 loc) · 1.22 KB
/
designer.php
File metadata and controls
50 lines (44 loc) · 1.22 KB
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
<?php
/**
* 关注/取消关注
*/
require_once 'lib/WriteLog.lib.php';
require_once 'public/public.php';
require_once 'public/check.php';
try{
require_once 'tasks/Collect/CollectTask.class.php';
$nType = (int)(isset($_GET['type'])?$_GET['type']:0);
if($nType == 0){
if(checkVersion($_GET)){
$bRet = checkTKT($_POST);
if(!$bRet){
echo get_rsp_result(false, 'check token fail');
exit();
}
}
}
//将Get和Post方法简单校验
$strMyCyid = isset($_GET['cyid'])?$_GET['cyid']:'';
$strChCyid = '';
$json_param = isset($_POST['statis'])?$_POST['statis']:'';
if(!empty($json_param)){
$json_param = stripslashes($json_param);
$arr_param = json_decode($json_param, true);
$strChCyid = isset($arr_param['cyid'])?$arr_param['cyid']:'';
}
$collect = new CollectTask();
if($nType == 0){
if($strMyCyid != $strChCyid) {
echo get_rsp_result(false, 'designer exception');
exit();
}
$result = $collect->getMyDesigner();
}
if($nType == 1){
$result = $collect->getDesigner();
}
echo $result;
}catch(Exception $e){
Log::write('designer exception:'.$e->getMessage(), 'log');
echo get_rsp_result(false, 'designer exception');
}