-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathproblem-ajax.php
42 lines (30 loc) · 1.03 KB
/
problem-ajax.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
<?php
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
////////////////////////////Common head
$cache_time=2;
$OJ_CACHE_SHARE=false;
require_once('./include/db_info.inc.php');
require_once('./include/setlang.php');
$view_title= "$MSG_STATUS";
require_once("./include/const.inc.php");
$pid=0;
// check the top arg
if (isset($_GET['pid'])){
$pid=intval($_GET['pid']);
}
if($OJ_MEMCACHE){
$sql="select user_id from privilege where rightstr='p$pid' LIMIT 1";
require("./include/memcache.php");
$result = mysql_query_cache($sql);
}else{
$sql="select user_id from privilege where rightstr=? LIMIT 1";
$result = pdo_query($sql,"p".$pid);
}
if ($result){
$row=$result[0];
echo "<a href='userinfo.php?user=".htmlentities($row['user_id'],ENT_QUOTES,'utf-8')."'>".htmlentities($row['user_id'],ENT_QUOTES,'utf-8')."</a>";
}else{
echo "$MSG_IMPORTED";
}
?>