Exemplo n.º 1
0
function getuser()
{
    $res = mainfunc(array("ask" => "getuser"));
    $res = $res[0];
    $username = "";
    $username = $res['username'];
    if ($username == null) {
        $username = "";
    }
    if ($username == "" && @$_COOKIE['token']) {
        date_default_timezone_set("Asia/Shanghai");
        $time = time() - 999999;
        $date = date("D, d M Y H:i:s", $time) . " GMT";
        header('Set-cookie: token=invalid; expires=' . $date . '; path=/' . "\n", false);
    }
    return array("username" => $username, "rights" => $res['rights']);
}
Exemplo n.º 2
0
a:link,a:visited{color:#0129A6;text-decoration:none}
a:hover,a:active{color:red;text-decoration:underline}
TH{filter:alpha(opacity=100,finishopacity=10,style=1,startx=1,starty=1,finishy=200,finishx=1);color:white;background:#A091DE;font-size:10pt;height:25}
#top{color:white}
a:hover#top{font-weight:bold}
#c1{background:#F1EFF8}
#c2{background:#EFF0F8}
#c3{background:#F8F4EF}
.list TD{border-style:solid;border-width:0 1 1 0;border-color:#AAA9A7}
</style>
</head>
<body>
<br><br>
<?php 
$boardmap = array(1 => "车协工作区", 2 => "行者足音", 3 => "车友宝典", 4 => "纯净水", 5 => "考察与社会", 6 => "五湖四海", 7 => "一技之长", 9 => "竞赛竞技", 28 => "网站维护");
$nowonlines = mainfunc(array("ask" => "online"));
$x = count($nowonlines);
?>
<table style="border:1 solid #A091DE;table-layout:fixed" align=center cellspacing=1 cellpadding=3>
<caption style="margin-bottom:15px;font-size:18px;color:black;filter:dropshadow(offx=1,offy=1,color=#9966FF)">当前在线(共 <?php 
echo $x;
?>
 人)</caption>
<colgroup align=center><col width=140><col width=130><col width=130><col width=130><col width=150><?php 
if ($cansee) {
    echo '<col width=300>';
}
?>
</colgroup>
<tr><th>用户ID</th><th>最近活动时间</th><th>IP地址</th><th>当前所在版面</th><th>登录方式</th><?php 
if ($cansee) {
Exemplo n.º 3
0
include "../lib/mainfunc.php";
include "../../assets/api/captcha.php";
date_default_timezone_set("Asia/Shanghai");
captcha_check();
$username = $_POST['username'];
$password = $_POST['password1'];
$sex = $_POST['sex'];
$qq = $_POST['qq'];
$icon = $_POST['icon'];
$ip = $_SERVER['REMOTE_ADDR'];
$mail = $_POST['email'];
$intro = $_POST['intro'];
$hobby = $_POST['hobby'];
$place = $_POST['place'];
$sig1 = $_POST['sig1'];
$sig2 = $_POST['sig2'];
$sig3 = $_POST['sig3'];
//$code=@$_POST['code'];
$result = mainfunc(array("ask" => "register", "username" => $username, "password" => $password, "sex" => $sex, "ip" => $ip, "qq" => $qq, "icon" => $icon, "mail" => $mail, "intro" => $intro, "hobby" => $hobby, "place" => $place, "sig1" => $sig1, "sig2" => $sig2, "sig3" => $sig3, "onlinetype" => "web", "browser" => @$_SERVER['HTTP_USER_AGENT']));
$result = $result[0];
#echo(json_encode($result));
header('Content-type:text/html;charset=utf-8');
if (intval($result['code']) == 0) {
    $time = time() + 999999;
    $date = date("D, d M Y H:i:s", $time) . " GMT";
    header('Set-cookie: token=' . $result['token'] . '; expires=' . $date . '; path=/' . "\n");
    echo 0;
    exit;
} else {
    echo $result['msg'];
}
Exemplo n.º 4
0
$folder = '../attachment/';
if (!is_dir($folder)) {
    mkdir($folder);
}
$filename = sha1(@microtime()) . '.attach';
$name = $_FILES['file']['name'];
$name = str_replace("%", "%25", $name);
move_uploaded_file($_FILES["file"]["tmp_name"], $folder . $filename);
$auth = $_POST['auth'];
$price = $_POST['price'];
if (!$auth) {
    $auth = 0;
}
if (!$price) {
    $price = 0;
}
$result = mainfunc(array("ask" => "attach", "path" => $filename, "filename" => $name, "auth" => $auth, "price" => $price));
$result = $result[0];
if ($result['code'] == '0') {
    $ans = array("code" => $result['code'], "id" => $result['msg']);
} else {
    $ans = array("code" => $result['code'], "msg" => $result['msg']);
    unlink($folder . $filename);
}
echo json_encode($result);
function reportWithCode($code)
{
    $result = array("code" => $code);
    echo json_encode($result);
    exit;
}
Exemplo n.º 5
0
<?php

include "../lib/mainfunc.php";
$sex = @$_POST['sex'];
$ip = @$_SERVER['REMOTE_ADDR'];
$qq = @$_POST['qq'];
$icon = @$_POST['icon'];
$mail = @$_POST['email'];
$intro = @$_POST['intro'];
$hobby = @$_POST['hobby'];
$place = @$_POST['place'];
$sig1 = @$_POST['sig1'];
$sig2 = @$_POST['sig2'];
$sig3 = @$_POST['sig3'];
$result = mainfunc(array("ask" => "edituser", "sex" => $sex, "ip" => $ip, "qq" => $qq, "sig1" => $sig1, "sig2" => $sig2, "sig3" => $sig3, "icon" => $icon, "mail" => $mail, "intro" => $intro, "hobby" => $hobby, "place" => $place));
$result = $result[0];
#echo(json_encode($result));
if ($result['code'] == "0") {
    header("Location: ../index");
    echo "Succeed.";
} else {
    echo $result['msg'];
}
Exemplo n.º 6
0
<?php

include "../lib/mainfunc.php";
date_default_timezone_set("Asia/Shanghai");
$result = mainfunc(array("ask" => "changepsd", "old" => @$_POST['old_md5'], "new" => @$_POST['new_md5']));
$result = $result[0];
if ($result['code'] == 0) {
    $token = $result['msg'];
    $time = time() + 1800;
    $date = date("D, d M Y H:i:s", $time) . " GMT";
    header('Set-cookie: token=' . $token . '; expires=' . $date . '; path=/' . "\n", false);
    echo "修改成功";
} else {
    echo $result['msg'] . "<br><a href='security.php'>返回</a>";
}
Exemplo n.º 7
0
<?php

include "../lib/mainfunc.php";
$from = $_GET['from'];
$tid = $_GET['tid'];
$p = $_GET['p'];
$to = $_GET['to'];
$result = mainfunc(array("ask" => "move", "bid" => $from, "tid" => $tid, "to" => $to));
//echo($result);exit;
//$result=$result[0];
//echo(json_encode($result));
$result = $result[0];
$code = intval($result['code']);
if ($code == 0) {
    $bid = $result['bid'];
    $tid = $result['tid'];
    header("Location: ../content/?bid={$bid}&tid={$tid}");
} else {
    echo $result['msg'];
}
Exemplo n.º 8
0
<?php

include "../lib/mainfunc.php";
$bid = @$_POST['bid'];
$tid = @$_POST['tid'];
$pid = @$_POST['pid'];
$result = mainfunc(array("ask" => "delete", "bid" => $bid, "tid" => $tid, "pid" => $pid));
#echo($result);exit;
$result = $result[0];
if ($result['code'] == 0) {
    echo 0;
} else {
    echo $result['msg'];
}
Exemplo n.º 9
0
function login()
{
    $username = @$_POST['username'];
    $password = @$_POST['password'];
    $result = mainfunc(array("ask" => "login", "username" => $username, "password" => $password, "onlinetype" => "web", "browser" => @$_SERVER['HTTP_USER_AGENT']));
    $result = $result[0];
    $code = intval($result['code']);
    $token = $result['token'];
    if ($code == 0) {
        $time = time() + 99999;
        $date = date("D, d M Y H:i:s", $time) . " GMT";
        header('Set-cookie: token=' . $token . '; expires=' . $date . '; path=/' . "\n");
    }
    echo $code;
    exit;
}
Exemplo n.º 10
0
include "../lib/mainfunc.php";
$bid = @$_POST["bid"];
$tid = @$_POST["tid"];
$title = @$_POST["title"];
$text = @$_POST["text"];
$sig = @$_POST["sig"];
$attachs = @$_POST['attachs'];
if (intval($tid) < 0) {
    $result = mainfunc(array("ask" => "post", "bid" => $bid, "title" => $title, "text" => $text, "sig" => $sig, "attachs" => $attachs, "type" => "web"));
    $result = $result[0];
    if ($result['code'] == "0") {
        //header("Location: ../main?bid=$bid");
        echo '0';
    } else {
        //header("Content-type: text/html; charest=utf-8");
        //echo '<html><head><script>alert(\''.$result['msg'].'\');window.history.back();</script></head></html>';
        echo $result['msg'];
    }
} else {
    $result = mainfunc(array("ask" => "reply", "bid" => $bid, "tid" => $tid, "title" => $title, "text" => $text, "sig" => $sig, "type" => "web", "attachs" => $attachs));
    $result = $result[0];
    if ($result['code'] == "0") {
        //header("Location: ../content?bid=$bid&tid=$tid");
        echo 0;
    } else {
        //header("Content-type: text/html; charest=utf-8");
        //echo '<html><head><script>alert(\''.$result['msg'].'\');window.history.back();</script></head></html>';
        echo $result['msg'];
    }
}
Exemplo n.º 11
0
myNicEditor.setPanel('edi_bar');
myNicEditor.addInstance('edi_content');
var attachs=[];
var unusedattachs=[];
<?php 
$result = mainfunc(array("ask" => "unusedattachinfo"));
for ($i = 1; $i < count($result); $i++) {
    echo "unusedattachs.push({\r\n\tname:'" . $result[$i]['name'] . "',\r\n\tsize:'" . $result[$i]['size'] . "',\r\n\tprice:'" . $result[$i]['price'] . "',\r\n\tid:'" . $result[$i]['id'] . "',\r\n\tauth:'" . $result[$i]['auth'] . "'\r\n\t});\n";
}
if ($pidinfo['attachs']) {
    $attachs = explode(" ", $pidinfo['attachs']);
} else {
    $attachs = array();
}
foreach ($attachs as $aid) {
    $result = mainfunc(array("ask" => "attachinfo", "id" => $aid));
    $result = $result[0];
    echo "attachs.push({\r\n\tname:'" . $result['name'] . "',\r\n\tsize:'" . $result['size'] . "',\r\n\tprice:'" . $result['price'] . "',\r\n\tid:'" . $result['id'] . "',\r\n\tauth:'" . $result['auth'] . "'\r\n\t});\n";
}
?>
refreshAttach();
function refreshAttach(){
	if(attachs.length==0){
		//document.getElementById("attachtip").style.display="none";
		//document.getElementById("attachs").style.display="none";
		$('#attachtip,#attachs').hide();
	}else{
		//document.getElementById("attachtip").style.display="block";
		//document.getElementById("attachs").style.display="block";
		$('#attachtip,#attachs').show();
	}
Exemplo n.º 12
0
<?php

include "../lib/mainfunc.php";
$result = mainfunc(array("ask" => "userexists", "user" => @$_GET['user']));
$result = $result[0];
echo $result["code"];
Exemplo n.º 13
0
<?php

include "../lib/mainfunc.php";
$lzlid = $_POST['id'];
$fid = $_POST['fid'];
$result = mainfunc(array("ask" => "lzl", "method" => "delete", "fid" => $fid, "lzlid" => $lzlid));
$result = $result[0];
echo json_encode($result);
Exemplo n.º 14
0
<?php

include "../lib/mainfunc.php";
$target = $_POST['target'];
$text = $_POST["text"];
$result = mainfunc(array("ask" => "sendmsg", "to" => $target, "text" => $text));
$result = $result[0];
echo json_encode($result);
Exemplo n.º 15
0
$year = date("Y", $time);
$month = date("m", $time);
$day = date("d", $time);
$today = mainfunc(array("ask" => "sign_today", "view" => $date));
echo "<pre>";
echo "签到统计 ({$year}-{$month}-{$day}):\n";
$num = count($today);
for ($i = 0; $i < $num; $i++) {
    echo '#' . ($i + 1) . ": " . $today[$i]['username'] . "\n";
}
echo "\n\n";
echo "本年度签到统计:\n";
$signyear = mainfunc(array("ask" => "sign_year"));
$num = count($signyear);
for ($i = 0; $i < $num; $i++) {
    echo $signyear[$i]['month'] . "\n";
    $data = $signyear[$i]['data'];
    $count = count($data);
    for ($j = 0; $j < $count; $j++) {
        echo $data[$j]['number'] . " ";
    }
    echo "\n\n";
}
echo "\n";
echo "总签到次数排名top100:\n";
$users = mainfunc(array("ask" => "sign_user"));
$count = count($users);
for ($i = 0; $i < $count; $i++) {
    echo "#" . $users[$i]['number'] . ": " . $users[$i]['username'] . "  (" . $users[$i]['times'] . ")\n";
}
echo '</pre>';
Exemplo n.º 16
0
<?php

include "../lib/mainfunc.php";
$bid = $_POST["bid"];
$tid = @$_POST["tid"];
$pid = @$_POST["pid"];
$icon = $_POST["icon"];
$token = $_POST["token"];
$title = $_POST["title"];
$text = $_POST["text"];
$sig = $_POST["sig"];
$attachs = $_POST['attachs'];
$p = ceil((intval($pid) + 1) / 12);
$result = mainfunc(array("ask" => "edit", "bid" => $bid, "tid" => $tid, "pid" => $pid, "token" => $token, "title" => $title, "text" => $text, "icon" => $icon, "sig" => $sig, "type" => "web", "attachs" => $attachs));
$result = $result[0];
if ($result['code'] == "0") {
    //header("Location: ../content?bid=$bid&tid=$tid&p=$p");
    echo "0../content/?bid={$bid}&tid={$tid}&p={$p}#{$pid}";
} else {
    //echo($result['code']);
    echo "1" . $result['msg'];
}
Exemplo n.º 17
0
    if ($block['hide'] == "0") {
        continue;
    }
    echo "<a href='../main?bid=" . $block['bid'] . "'  style='margin-top:20px;margin-right:10px;'>" . $block['bbstitle'] . '</a>';
}
?>
			</div>
		</div>
	</div>
	<div class="right">
		<div class="title">
			<img src="ltrd.png" width="150">
		</div>
		<div class="hot">
		<?php 
$hots = mainfunc(array("ask" => "hot"));
echo "<ul>";
foreach ($hots as $hot) {
    if (!@$hot['tid']) {
        continue;
    }
    $title = $hot['title'];
    $bid = $hot['bid'];
    $tid = $hot['tid'];
    $num = intval($hot['reply']) + 1;
    $page = intval(($num - 1) / 12) + 1;
    $link = "../content?bid={$bid}&tid={$tid}&p={$page}#{$num}";
    if ($num == 1) {
        $author = $hot['author'];
    } else {
        $author = $hot['replyer'];
Exemplo n.º 18
0
<?php

include "../lib/mainfunc.php";
date_default_timezone_set("Asia/Shanghai");
$keyword = @$_POST['keyword'];
$type = @$_POST['type'];
$bid = @$_REQUEST['bid'];
$starttime = @$_POST['starttime'];
$endtime = @$_POST['endtime'];
$author = @$_POST['author'];
$showall = @$_POST['show'];
$result = "";
if ($type != "") {
    $result = mainfunc(array("ask" => "search", "keyword" => $keyword, "bid" => $bid, "type" => $type, "starttime" => $starttime, "endtime" => $endtime, "author" => $author));
}
?>
<html>
<head>
<title>CAPUBBS - 搜索</title>
<meta charset="utf-8">
<link rel="stylesheet" href="../lib/general.css">
<link rel="shortcut icon" href="/assets/images/capu.jpg">
<style>
body{
    background-color: #ABC9B6;
    background-image: url("/assets/images/static/bg.jpg");
    background-position: center top;
    background-repeat: no-repeat;
    margin: 0;
}
div.main{
Exemplo n.º 19
0
<?php

include "../lib/mainfunc.php";
date_default_timezone_set("Asia/Shanghai");
$username = $_REQUEST['username'];
$password = $_REQUEST['password1'];
$result = mainfunc(array("ask" => "login", "username" => $username, "password" => $password, "onlinetype" => "web", "browser" => @$_SERVER['HTTP_USER_AGENT']));
$result = $result[0];
$code = intval($result['code']);
$time = time() + 999999;
$date = date("D, d M Y H:i:s", $time) . " GMT";
if ($code == 0) {
    $token = $result['token'];
    header('Set-cookie: token=' . $token . '; expires=' . $date . '; path=/' . "\n");
    echo 0;
} else {
    echo $result['msg'];
}
Exemplo n.º 20
0
<?php

include "../lib/mainfunc.php";
$id = @$_REQUEST['id'];
$result = mainfunc(array("ask" => "attachdl", "id" => $id));
$result = $result[0];
#echo($result);exit;
$aroot = "../attachment/";
if ($result['code'] == "0") {
    $sourceFile = $aroot . $result['path'];
    $outFile = $result['name'];
} else {
    echo "Error when downloading, " . $result['msg'];
    exit;
}
if (!is_file($sourceFile)) {
    die("<b>404 File not found!</b>");
}
$len = filesize($sourceFile);
//获取文件大小
$filename = basename($sourceFile);
//获取文件名字
$outFile_extension = strtolower(substr(strrchr($outFile, "."), 1));
//获取文件扩展名
//根据扩展名 指出输出浏览器格式
switch ($outFile_extension) {
    case "exe":
        $ctype = "application/octet-stream";
        break;
    case "zip":
        $ctype = "application/zip";
Exemplo n.º 21
0
<?php

include '../lib/mainfunc.php';
$text = @$_POST['text'];
$result = mainfunc(array("ask" => "boardcast", "text" => $text));
$result = $result[0];
$code = intval($result['code']);
if ($code == 0) {
    echo '0';
} else {
    echo @$result['msg'];
}
Exemplo n.º 22
0
<?php

include "../lib/mainfunc.php";
$id = $_POST['id'];
$result = mainfunc(array("ask" => "delattach", "id" => $id));
$result = $result[0];
echo json_encode($result);
Exemplo n.º 23
0
<div style="margin-top:90px;text-align:center">
	<span>发送新消息给:&nbsp;<input id="msg_to" placeholder="收件人id" style="width:100px"></span><br><br>
	<textarea id="msg_ta" style="width:400px;height:200px;font-size:13px;padding:5px;"></textarea><br><br>
	<button onclick="sendto()" id="msg_sendbt">发送</button>
</div>

<?php 
        } else {
            ?>
<div class="talk">
	<div class="talk_record">
		<div id="jp-container" class="jp-container">
<?php 
            $count = count($data);
            $touserinfo = mainfunc(array("view" => $touser));
            $myuserinfo = mainfunc(array("view" => $username));
            $hisicon = translateicon($touserinfo[0]['icon']);
            $myicon = translateicon($myuserinfo[0]['icon']);
            for ($i = 1; $i < $count; $i++) {
                $one = $data[$i];
                $typed = $one['type'];
                $text = $one['text'];
                $time = formatstamp($one['time']);
                if ($typed == "send") {
                    echo '<div class="talk_recordboxme">';
                    echo '<div class="user"><img src="' . $myicon . '" class="lzlicon"></div>';
                } else {
                    echo '<div class="talk_recordbox">';
                    echo '<div class="user"><img src="' . $hisicon . '" class="lzlicon"></div>';
                }
                echo '<div class="talk_recordtextbg">&nbsp;</div>';
Exemplo n.º 24
0
<?php

include "../lib/mainfunc.php";
date_default_timezone_set('Asia/Shanghai');
$from = @$_GET['from'];
$from = urldecode($from);
if (!$from) {
    $from = "../index";
}
$result = mainfunc(array("ask" => "logout"));
$result = $result[0];
$code = $result["code"];
$time = time() - 999999;
$date = date("D, d M Y H:i:s", $time) . " GMT";
if (!$from) {
    $from = "../index";
}
if ($code == 0) {
    header('Set-cookie: token=invalid; expires=' . $date . '; path=/' . "\n", false);
    header("Location: {$from}");
} else {
    echo "注销时遇到问题,错误编码:{$code}";
}
Exemplo n.º 25
0
<?php

include "../lib/mainfunc.php";
$fid = $_POST['fid'];
$text = $_POST["text"];
$result = mainfunc(array("ask" => "lzl", "method" => "post", "fid" => $fid, "text" => $text));
$result = $result[0];
echo json_encode($result);
Exemplo n.º 26
0
<html>
<head>
<title>CAPUBBS - 修改资料</title>
<meta charset="utf-8">
<?php 
include "../lib/mainfunc.php";
$userinfo = mainfunc(array("ask" => "currentUserInfo"));
if (count($userinfo) == 0) {
    die("尚未登录</head></html>");
}
$userinfo = $userinfo[0];
function trans($a)
{
    if (!$a) {
        return "";
    } else {
        return $a;
    }
}
?>

<link rel="stylesheet" href="../lib/general.css">
<link rel="shortcut icon" href="/assets/images/capu.jpg">
<style>
body{
    background-color: #ABC9B6;
    background-image: url("/assets/images/static/bg.jpg");
    background-position: center top;
    background-repeat: no-repeat;
    margin: 0;
}
Exemplo n.º 27
0
        $tid = $recentposts[$i]['tid'];
        $link = "../content?bid={$bid}&tid={$tid}";
        echo "<td><span class='title'><a href='{$link}'>{$title}</a></span></td>";
        echo "<td width='100px' align='right'><span class='time'>" . formatstamp($recentposts[$i]['timestamp']) . "</span></td>";
    }
}
?>
</table>
</div>

<div class="recents">
<br>
&nbsp;&nbsp;&nbsp;<img src="recentreply.png" width="124px"><br>
<table border="0" class="recent">
<?php 
$recentposts = mainfunc(array("view" => $_GET['name'], "ask" => "recentreply"));
if (count($recentposts) - 1 == 0) {
    echo "<tr><td><span class='time'>该用户暂无回复</span></td></tr>";
} else {
    for ($i = 1; $i < count($recentposts); $i++) {
        echo "<tr>";
        echo "<td width='50px'><span class='num'>" . heal($i) . "</span></td>";
        $title = $recentposts[$i]['title'];
        $bid = $recentposts[$i]['bid'];
        $tid = $recentposts[$i]['tid'];
        $link = "../content?bid={$bid}&tid={$tid}&p=1";
        echo "<td><span class='title'><a href='{$link}'>{$title}</a></span></td>";
        echo "<td width='100px' align='right'><span class='time'>" . formatstamp($recentposts[$i]['updatetime']) . "</span></td>";
    }
}
?>
Exemplo n.º 28
0
	<input type="hidden" name="icon" value="1" id="fm_icon">
	<input type="hidden" name="token" id="fm_token">
	<input type="hidden" name="title" id="fm_title">
	<input type="hidden" name="text" id="fm_text">
	<input type="hidden" name="sig" id="fm_sig">
	<input type="hidden" name="attachs" id="fm_attachs">
	</form>
<script type="text/javascript" src="../lib/nic.js"></script>
<script type="text/javascript">
var myNicEditor = new nicEditor({fullPanel : true});
myNicEditor.setPanel('edi_bar');
myNicEditor.addInstance('edi_content');
var attachs=[];
var unusedattachs=[];
<?php 
$result = mainfunc(array("ask" => "unusedattachinfo"));
for ($i = 1; $i < count($result); $i++) {
    echo "unusedattachs.push({\r\n\tname:'" . $result[$i]['name'] . "',\r\n\tsize:'" . $result[$i]['size'] . "',\r\n\tprice:'" . $result[$i]['price'] . "',\r\n\tid:'" . $result[$i]['id'] . "',\r\n\tauth:'" . $result[$i]['auth'] . "'\r\n\t});\n";
}
?>
refreshAttach();
$(window).load(function() {
	$(".textblock").each(function() {
		var text=$(this);
		text.find("img").each(function() {
			var img=$(this);
			var width=parseInt(img.css("width"));
			width=(width>700)?700:width;
			img.css("width",width);
		});
	});
Exemplo n.º 29
0
<?php

include "../lib/mainfunc.php";
$bid = @$_GET['bid'];
$tid = @$_GET['tid'];
$page = @$_GET['page'];
if (!$page) {
    $page = 1;
}
$action = @$_GET['action'];
if (!in_array($action, array("lock", "top", "extr"))) {
    die(json_encode(array("code" => 1, "msg" => "非法操作")));
}
$result = mainfunc(array("ask" => $action, "bid" => $bid, "tid" => $tid));
$result = $result[0];
if ($result['code'] == 0) {
    header("Location: ../main/?tid={$tid}&bid={$bid}&p={$page}");
} else {
    echo json_encode($result);
}