forked from futurepw/oj
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbbs.php
32 lines (30 loc) · 835 Bytes
/
bbs.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
<?php require_once("./include/db_info.inc.php");
/*
*/
if(isset($OJ_EXAM_CONTEST_ID)&&$OJ_EXAM_CONTEST_ID>0){
header("Content-type: text/html; charset=utf-8");
echo $MSG_BBS_NOT_ALLOWED_FOR_EXAM;
exit ();
}
if(isset($_GET['pid']))
$pid=intval($_GET['pid']);
else
$pid=0;
if(isset($_GET['cid']))
$cid=intval($_GET['cid']);
else
$cid=0;
if($OJ_BBS=="discuss"){
echo ("<script>location.href='discuss/discuss.php?".$_SERVER["QUERY_STRING"]."';</script>");
}else if ($OJ_BBS=="discuss3"){
echo ("<script>location.href='discuss3/discuss.php?".$_SERVER["QUERY_STRING"]."';</script>");
}else{
$url="";
if(isset($_GET['pid'])){
$url=("bbs/search.php?fid[]=2&keywords=".$pid); //chenge this to your own phpBB search link
}else{
$url=("bbs/");
}
echo ("<script>location.href='".$url."';</script>");
}
?>