Exemple #1
0
function MemberFav()
{
    global $fsql, $tsql;
    $tempname = $GLOBALS["PLUSVARS"]["tempname"];
    $memberid = $_COOKIE["MEMBERID"];
    $scl = " memberid='{$memberid}' ";
    //Ä£°å½âÊÍ
    $Temp = LoadTemp($tempname);
    $TempArr = SplitTblTemp($Temp);
    $str = $TempArr["start"];
    include ROOTPATH . "includes/pages.inc.php";
    $pages = new pages();
    $totalnums = TblCount("_member_fav", "id", $scl);
    $pages->setvar(array("key" => $key));
    $pages->set(20, $totalnums);
    $pagelimit = $pages->limit();
    $fsql->query("select * from {P}_member_fav where {$scl} order by id desc limit {$pagelimit}");
    while ($fsql->next_record()) {
        $id = $fsql->f('id');
        $title = $fsql->f('title');
        $url = $fsql->f('url');
        $var = array('id' => $id, 'title' => $title, 'url' => $url);
        $str .= ShowTplTemp($TempArr["list"], $var);
    }
    $pagesinfo = $pages->ShowNow();
    $var = array('showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums);
    $str .= ShowTplTemp($TempArr["end"], $var);
    return $str;
}
Exemple #2
0
function MemberCentLog()
{
    global $msql, $fsql, $strCentFormAdmin;
    $tempname = $GLOBALS["PLUSVARS"]["tempname"];
    $memberid = $_COOKIE["MEMBERID"];
    //模板解释
    $Temp = LoadTemp($tempname);
    $TempArr = SplitTblTemp($Temp);
    //取出当前积分
    $msql->query("select * from {P}_member where memberid='" . $_COOKIE["MEMBERID"] . "'");
    if ($msql->next_record()) {
        $cent1 = $msql->f('cent1');
        $cent2 = $msql->f('cent2');
        $cent3 = $msql->f('cent3');
        $cent4 = $msql->f('cent4');
        $cent5 = $msql->f('cent5');
    }
    $cw1 = MemberCentWidth($cent1);
    $cw2 = MemberCentWidth($cent2);
    $cw3 = MemberCentWidth($cent3);
    $cw4 = MemberCentWidth($cent4);
    $cw5 = MemberCentWidth($cent5);
    $var = array('centname1' => $GLOBALS["MEMBERCONF"]["centname1"], 'centname2' => $GLOBALS["MEMBERCONF"]["centname2"], 'centname3' => $GLOBALS["MEMBERCONF"]["centname3"], 'centname4' => $GLOBALS["MEMBERCONF"]["centname4"], 'centname5' => $GLOBALS["MEMBERCONF"]["centname5"], 'cw1' => $cw1, 'cw2' => $cw2, 'cw3' => $cw3, 'cw4' => $cw4, 'cw5' => $cw5, 'cent1' => $cent1, 'cent2' => $cent2, 'cent3' => $cent3, 'cent4' => $cent4, 'cent5' => $cent5);
    $str = ShowTplTemp($TempArr["start"], $var);
    $scl = " memberid='{$memberid}' ";
    include ROOTPATH . "includes/pages.inc.php";
    $pages = new pages();
    $totalnums = TblCount("_member_centlog", "id", $scl);
    $pages->setvar(array("key" => $key));
    $pages->set(20, $totalnums);
    $pagelimit = $pages->limit();
    $msql->query("select * from {P}_member_centlog where {$scl} order by dtime desc limit {$pagelimit}");
    while ($msql->next_record()) {
        $id = $msql->f('id');
        $event = $msql->f('event');
        $dtime = $msql->f('dtime');
        $cent1 = $msql->f('cent1');
        $cent2 = $msql->f('cent2');
        $cent3 = $msql->f('cent3');
        $cent4 = $msql->f('cent4');
        $cent5 = $msql->f('cent5');
        $memo = $msql->f('memo');
        if ($event == "0") {
            $eventname = $memo;
        } else {
            $fsql->query("select name from {P}_member_centrule where event='{$event}' ");
            if ($fsql->next_record()) {
                $eventname = $fsql->f('name');
            }
        }
        $dtime = date("Y/m/d H:i:s", $dtime);
        $var = array('id' => $id, 'eventname' => $eventname, 'dtime' => $dtime, 'cent1' => $cent1, 'cent2' => $cent2, 'cent3' => $cent3, 'cent4' => $cent4, 'cent5' => $cent5);
        $str .= ShowTplTemp($TempArr["list"], $var);
    }
    $pagesinfo = $pages->ShowNow();
    $var = array('showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums);
    $str .= ShowTplTemp($TempArr["end"], $var);
    return $str;
}
Exemple #3
0
function MemberComment()
{
    global $fsql, $tsql;
    $tempname = $GLOBALS["PLUSVARS"]["tempname"];
    $memberid = $_COOKIE["MEMBERID"];
    $scl = " pid='0' and memberid='{$memberid}' ";
    //模板解释
    $Temp = LoadTemp($tempname);
    $TempArr = SplitTblTemp($Temp);
    $str = $TempArr["start"];
    include ROOTPATH . "includes/pages.inc.php";
    $pages = new pages();
    $totalnums = TblCount("_comment", "id", $scl);
    $pages->setvar(array("key" => $key));
    $pages->set(20, $totalnums);
    $pagelimit = $pages->limit();
    $fsql->query("select * from {P}_comment where {$scl} order by uptime desc limit {$pagelimit}");
    while ($fsql->next_record()) {
        $id = $fsql->f('id');
        $title = $fsql->f('title');
        $iffb = $fsql->f('iffb');
        $rid = $fsql->f('rid');
        $catid = $fsql->f('catid');
        $dtime = $fsql->f('dtime');
        $uptime = $fsql->f('uptime');
        $cl = $fsql->f('cl');
        $lastname = $fsql->f('lastname');
        $lastmemberid = $fsql->f('lastmemberid');
        $backcount = $fsql->f('backcount');
        $title = csubstr($title, 0, 23);
        //是否今日新贴
        if ($uptime > time() - 86400) {
            $querycss = "binew";
        } else {
            $querycss = "bi";
        }
        $dtime = date("Y-m-d", $dtime);
        $uptime = date("Y-m-d", $uptime);
        if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "comment/html/" . $id . ".html")) {
            $link = ROOTPATH . "comment/html/" . $id . ".html";
        } else {
            $link = ROOTPATH . "comment/html/?" . $id . ".html";
        }
        //回复者网址
        if ($lastmemberid == "-1") {
            $lastmemberurl = "#";
        } else {
            $lastmemberurl = ROOTPATH . "member/home.php?mid=" . $lastmemberid;
        }
        $var = array('id' => $id, 'title' => $title, 'dtime' => $dtime, 'uptime' => $uptime, 'backcount' => $backcount, 'querycss' => $querycss, 'cl' => $cl, 'link' => $link, 'lastname' => $lastname, 'lastmemberurl' => $lastmemberurl, 'face' => $face);
        $str .= ShowTplTemp($TempArr["list"], $var);
    }
    $pagesinfo = $pages->ShowNow();
    $var = array('showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums);
    $str .= ShowTplTemp($TempArr["end"], $var);
    return $str;
}
Exemple #4
0
function PageContentFy()
{
    global $fsql;
    $tempname = $GLOBALS["PLUSVARS"]["tempname"];
    $pagename = $GLOBALS["PLUSVARS"]["pagename"];
    //»ñÈ¡µØÖ·À¸²ÎÊý
    if (strstr($_SERVER["QUERY_STRING"], ".html")) {
        $idArr = explode(".html", $_SERVER["QUERY_STRING"]);
        $id = $idArr[0];
        $fsql->query("select groupid from {P}_page where id='{$id}'");
        if ($fsql->next_record()) {
            $groupid = $fsql->f('groupid');
        }
    } elseif (isset($_GET["id"]) && $_GET["id"] != "") {
        $id = $_GET["id"];
        $fsql->query("select groupid from {P}_page where id='{$id}'");
        if ($fsql->next_record()) {
            $groupid = $fsql->f('groupid');
        }
    } elseif (strstr($pagename, "_")) {
        $arr = explode("_", $pagename);
        $fsql->query("select id from {P}_page_group where folder='{$arr['0']}'");
        if ($fsql->next_record()) {
            $groupid = $fsql->f('id');
        }
    } else {
        $fsql->query("select id from {P}_page_group where folder='{$pagename}'");
        if ($fsql->next_record()) {
            $groupid = $fsql->f('id');
        }
    }
    //Ä£°æ½âÊÍ
    $Temp = LoadTemp($tempname);
    $i = 1;
    $fsql->query("select id from {P}_page where groupid='{$groupid}' order by xuhao");
    while ($fsql->next_record()) {
        $parr[$i] = $fsql->f('id');
        if ($parr[$i] == $id) {
            $pcurrent = $i;
        }
        $i++;
    }
    $totalnums = $i - 1;
    include ROOTPATH . "page/includes/contentpages.inc.php";
    $pages = new pages();
    $pages->setvar(array());
    $pages->set(1, $totalnums, $parr, $pcurrent);
    $pagesinfo = $pages->ShowNow();
    $var = array('showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums);
    $str = ShowTplTemp($Temp, $var);
    return $str;
}
Exemple #5
0
function MemberMsn()
{
    global $fsql, $tsql, $strMemberMsnNtc2;
    $tempname = $GLOBALS["PLUSVARS"]["tempname"];
    $memberid = $_COOKIE["MEMBERID"];
    $scl = " tomemberid='{$memberid}' ";
    //模板解释
    $Temp = LoadTemp($tempname);
    $TempArr = SplitTblTemp($Temp);
    $str = $TempArr["start"];
    include ROOTPATH . "includes/pages.inc.php";
    $pages = new pages();
    $totalnums = TblCount("_member_msn", "id", $scl);
    $pages->setvar(array("key" => $key));
    $pages->set(10, $totalnums);
    $pagelimit = $pages->limit();
    $fsql->query("select * from {P}_member_msn where {$scl} order by dtime desc limit {$pagelimit}");
    while ($fsql->next_record()) {
        $id = $fsql->f('id');
        $body = $fsql->f('body');
        $dtime = $fsql->f('dtime');
        $frommemberid = $fsql->f('frommemberid');
        $dtime = date("Y-m-d h:i:s", $dtime);
        $body = nl2br($body);
        if ($frommemberid != "0") {
            $tsql->query("select * from {P}_member where memberid='{$frommemberid}'");
            if ($tsql->next_record()) {
                $pname = $tsql->f("pname");
                $nowface = $tsql->f("nowface");
            }
            $face = ROOTPATH . "member/face/" . $nowface . ".gif";
            $memberurl = ROOTPATH . "member/home.php?mid=" . $frommemberid;
            $showback = "block";
        } else {
            $pname = $strMemberMsnNtc2;
            $face = ROOTPATH . "member/face/1.gif";
            $memberurl = "#";
            $showback = "none";
        }
        $var = array('id' => $id, 'body' => $body, 'dtime' => $dtime, 'mid' => $frommemberid, 'face' => $face, 'memberurl' => $memberurl, 'showback' => $showback, 'pname' => $pname);
        $str .= ShowTplTemp($TempArr["list"], $var);
    }
    //标注为已读
    $tsql->query("update {P}_member_msn set iflook='1' where tomemberid='{$memberid}'");
    $pagesinfo = $pages->ShowNow();
    $var = array('showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums);
    $str .= ShowTplTemp($TempArr["end"], $var);
    return $str;
}
Exemple #6
0
function MemberBuyList()
{
    global $msql, $fsql;
    $tempname = $GLOBALS["PLUSVARS"]["tempname"];
    $memberid = $_COOKIE["MEMBERID"];
    //模板解释
    $Temp = LoadTemp($tempname);
    $TempArr = SplitTblTemp($Temp);
    //取出当前帐户信息
    $msql->query("select * from {P}_member where memberid='" . $_COOKIE["MEMBERID"] . "'");
    if ($msql->next_record()) {
        $account = $msql->f('account');
        $paytotal = $msql->f('paytotal');
        $buytotal = $msql->f('buytotal');
    }
    $var = array('account' => $account, 'paytotal' => $paytotal, 'buytotal' => $buytotal);
    $str = ShowTplTemp($TempArr["start"], $var);
    $scl = " memberid='{$memberid}' ";
    include ROOTPATH . "includes/pages.inc.php";
    $pages = new pages();
    $totalnums = TblCount("_member_buylist", "id", $scl);
    $pages->setvar(array("key" => $key));
    $pages->set(20, $totalnums);
    $pagelimit = $pages->limit();
    $msql->query("select * from {P}_member_buylist where {$scl} order by id desc limit {$pagelimit}");
    while ($msql->next_record()) {
        $id = $msql->f('id');
        $payid = $msql->f('payid');
        $paytype = $msql->f('paytype');
        $buyfrom = $msql->f('buyfrom');
        $paytotal = $msql->f('paytotal');
        $daytime = $msql->f('daytime');
        $ip = $msql->f('ip');
        $orderid = $msql->f('orderid');
        $OrderNo = $msql->f('OrderNo');
        $logname = $msql->f('logname');
        $daytime = date("Y-n-j H:i:s", $daytime);
        $var = array('id' => $id, 'payid' => $payid, 'paytype' => $paytype, 'buyfrom' => $buyfrom, 'paytotal' => $paytotal, 'daytime' => $daytime, 'ip' => $ip, 'OrderNo' => $OrderNo, 'logname' => $logname, 'orderid' => $orderid);
        $str .= ShowTplTemp($TempArr["list"], $var);
    }
    $pagesinfo = $pages->ShowNow();
    $var = array('showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums);
    $str .= ShowTplTemp($TempArr["end"], $var);
    return $str;
}
Exemple #7
0
<body >

<?php 
$step = $_REQUEST["step"];
$memberid = $_REQUEST["memberid"];
$id = $_REQUEST["id"];
if ($memberid == "") {
    echo "ERROR:NO MEMBERID";
    exit;
}
//查询
$scl = " memberid='{$memberid}' ";
$totalnums = TblCount("_member_buylist", "id", $scl);
$pages = new pages();
$pages->setvar(array("memberid" => $memberid));
$pages->set(20, $totalnums);
$pagelimit = $pages->limit();
?>
<div class="formzone">
<div class="namezone" ><?php 
echo $strAccBuyList;
?>
 - [ <?php 
echo Memberid2User($memberid);
?>
 ]</div>

<div class="tablezone">

  <table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
    <tr> 
Exemple #8
0
function NewsGlobalQuery()
{
    global $fsql, $msql;
    $shownums = $GLOBALS["PLUSVARS"]["shownums"];
    $ord = $GLOBALS["PLUSVARS"]["ord"];
    $sc = $GLOBALS["PLUSVARS"]["sc"];
    $showtj = $GLOBALS["PLUSVARS"]["showtj"];
    $cutword = $GLOBALS["PLUSVARS"]["cutword"];
    $cutbody = $GLOBALS["PLUSVARS"]["cutbody"];
    $target = $GLOBALS["PLUSVARS"]["target"];
    $catid = $GLOBALS["PLUSVARS"]["catid"];
    $projid = $GLOBALS["PLUSVARS"]["projid"];
    $tags = $GLOBALS["PLUSVARS"]["tags"];
    $pagename = $GLOBALS["PLUSVARS"]["pagename"];
    $tempname = $GLOBALS["PLUSVARS"]["tempname"];
    //默认条件
    $scl = " iffb='1' and catid!='0' ";
    if ($showtj != "" && $showtj != "0") {
        $scl .= " and tj='1' ";
    }
    //匹配所选分类
    if ($catid != 0 && $catid != "") {
        $catid = fmpath($catid);
        $scl .= " and catpath regexp '{$catid}' ";
    }
    //匹配专题
    if ($projid != 0 && $projid != "") {
        $projid = fmpath($projid);
        $scl .= " and proj regexp '{$projid}' ";
    }
    //判断匹配标签
    if ($tags != "") {
        $tags = $tags . ",";
        $scl .= " and tags regexp '{$tags}' ";
    }
    //模版解释
    $Temp = LoadTemp($tempname);
    $TempArr = SplitTblTemp($Temp);
    $str = $TempArr["start"];
    //翻页
    include ROOTPATH . "includes/pages.inc.php";
    $pages = new pages();
    $totalnums = TblCount("_news_con", "id", $scl);
    $pages->setvar(array("key" => $key));
    $pages->set($shownums, $totalnums);
    $pagelimit = $pages->limit();
    $picnum = 1;
    $fsql->query("select * from {P}_news_con where {$scl} order by {$ord} {$sc} limit {$pagelimit}");
    while ($fsql->next_record()) {
        $id = $fsql->f('id');
        $title = $fsql->f('title');
        $catpath = $fsql->f('catpath');
        $dtime = $fsql->f('dtime');
        $nowcatid = $fsql->f('catid');
        $ifnew = $fsql->f('ifnew');
        $ifred = $fsql->f('ifred');
        $ifbold = $fsql->f('ifbold');
        $author = $fsql->f('author');
        $source = $fsql->f('source');
        $cl = $fsql->f('cl');
        $src = $fsql->f('src');
        $cl = $fsql->f('cl');
        $fileurl = $fsql->f('fileurl');
        $downcount = $fsql->f('downcount');
        $prop1 = $fsql->f('prop1');
        $prop2 = $fsql->f('prop2');
        $prop3 = $fsql->f('prop3');
        $prop4 = $fsql->f('prop4');
        $prop5 = $fsql->f('prop5');
        $prop6 = $fsql->f('prop6');
        $prop7 = $fsql->f('prop7');
        $prop8 = $fsql->f('prop8');
        $prop9 = $fsql->f('prop9');
        $prop10 = $fsql->f('prop10');
        $prop11 = $fsql->f('prop11');
        $prop12 = $fsql->f('prop12');
        $prop13 = $fsql->f('prop13');
        $prop14 = $fsql->f('prop14');
        $prop15 = $fsql->f('prop15');
        $prop16 = $fsql->f('prop16');
        $prop17 = $fsql->f('prop17');
        $prop18 = $fsql->f('prop18');
        $prop19 = $fsql->f('prop19');
        $prop20 = $fsql->f('prop20');
        $memo = $fsql->f('memo');
        $mid = $fsql->f('memberid');
        if ($mid > 0) {
            $memberurl = ROOTPATH . "member/home.php?mid=" . $mid;
        } else {
            $memberurl = "#";
        }
        if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "news/html/" . $id . ".html")) {
            $link = ROOTPATH . "news/html/" . $id . ".html";
        } else {
            $link = ROOTPATH . "news/html/?" . $id . ".html";
        }
        $dtimey = date("Y-m-d", $dtime);
        $dtime = date("m/d", $dtime);
        if ($ifbold == "1") {
            $bold = " style='font-weight:bold' ";
        } else {
            $bold = "";
        }
        if ($ifred != "0") {
            $red = " style='color:" . $ifred . "' ";
        } else {
            $red = "";
        }
        if ($cutword != "0") {
            $title = csubstr($title, 0, $cutword);
        }
        if ($cutbody != "0") {
            $memo = csubstr($memo, 0, $cutbody);
        }
        if ($src == "") {
            $src = "news/pics/nopic.gif";
        }
        $src = ROOTPATH . $src;
        $downurl = ROOTPATH . "news/download.php?id=" . $id;
        //显示所属分类
        $msql->query("select cat from {P}_news_cat where catid='{$nowcatid}'");
        if ($msql->next_record()) {
            $cat = $msql->f('cat');
        }
        //参数列
        $i = 1;
        $msql->query("select * from {P}_news_prop where catid='{$nowcatid}' order by xuhao");
        while ($msql->next_record()) {
            $pn = "propname" . $i;
            ${$pn} = $msql->f('propname');
            $i++;
        }
        //模版标签解释
        $var = array('title' => $title, 'memo' => $memo, 'dtime' => $dtime, 'dtimey' => $dtimey, 'red' => $red, 'bold' => $bold, 'link' => $link, 'target' => $target, 'author' => $author, 'source' => $source, 'cat' => $cat, 'src' => $src, 'cl' => $cl, 'memberurl' => $memberurl, 'picnum' => $picnum, 'downurl' => $downurl, 'fileurl' => $fileurl, 'downcount' => $downcount, 'prop1' => $prop1, 'prop2' => $prop2, 'prop3' => $prop3, 'prop4' => $prop4, 'prop5' => $prop5, 'prop6' => $prop6, 'prop7' => $prop7, 'prop8' => $prop8, 'prop9' => $prop9, 'prop10' => $prop10, 'prop11' => $prop11, 'prop12' => $prop12, 'prop13' => $prop13, 'prop14' => $prop14, 'prop15' => $prop15, 'prop16' => $prop16, 'prop17' => $prop17, 'prop18' => $prop18, 'prop19' => $prop19, 'prop20' => $prop20, 'propname1' => $propname1, 'propname2' => $propname2, 'propname3' => $propname3, 'propname4' => $propname4, 'propname5' => $propname5, 'propname6' => $propname6, 'propname7' => $propname7, 'propname8' => $propname8, 'propname9' => $propname9, 'propname10' => $propname10, 'propname11' => $propname11, 'propname12' => $propname12, 'propname13' => $propname13, 'propname14' => $propname14, 'propname15' => $propname15, 'propname16' => $propname16, 'propname17' => $propname17, 'propname18' => $propname18, 'propname19' => $propname19, 'propname20' => $propname20);
        $str .= ShowTplTemp($TempArr["list"], $var);
        $picnum++;
    }
    $str .= $TempArr["end"];
    $pagesinfo = $pages->ShowNow();
    $var = array('showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums);
    $str = ShowTplTemp($str, $var);
    return $str;
}
Exemple #9
0
function PhotoGl()
{
    global $fsql, $tsql;
    $coltitle = $GLOBALS["PLUSVARS"]["coltitle"];
    $tempname = $GLOBALS["PLUSVARS"]["tempname"];
    $memberid = $_COOKIE["MEMBERID"];
    $memberid = htmlspecialchars($memberid);
    $showcatid = htmlspecialchars($_GET["showcatid"]);
    $shownum = htmlspecialchars($_GET["shownum"]);
    $showpcatid = htmlspecialchars($_GET["showpcatid"]);
    $key = htmlspecialchars($_GET["key"]);
    $page = htmlspecialchars($_GET["page"]);
    $step = htmlspecialchars($_GET["step"]);
    if ($step == "update") {
        $id = $_GET["id"];
        $now = time();
        $fsql->query("update {P}_photo_con set uptime='{$now}' where id='{$id}' and memberid='{$memberid}'");
    }
    if ($step == "del") {
        $id = $_GET["id"];
        //删除原图
        $fsql->query("select src from {P}_photo_con where memberid='{$memberid}' and id='{$id}'");
        if ($fsql->next_record()) {
            $oldsrc = $fsql->f('src');
            if (file_exists(ROOTPATH . $oldsrc) && $oldsrc != "" && !strstr($oldsrc, "../")) {
                unlink(ROOTPATH . $oldsrc);
            }
            $candel = "yes";
        } else {
            $candel = "no";
        }
        if ($candel == "yes") {
            //删除组图
            $fsql->query("select src from {P}_photo_pages where photoid='{$id}'");
            while ($fsql->next_record()) {
                $oldsrc = $fsql->f('src');
                if (file_exists(ROOTPATH . $oldsrc) && $oldsrc != "" && !strstr($oldsrc, "../")) {
                    unlink(ROOTPATH . $oldsrc);
                }
            }
            $fsql->query("delete from {P}_photo_pages where photoid='{$id}'");
        }
        $fsql->query("delete from {P}_photo_con where id='{$id}' and memberid='{$memberid}'");
    }
    //模板解释
    $Temp = LoadTemp($tempname);
    $TempArr = SplitTblTemp($Temp);
    //自定义分类
    $fsql->query("select * from {P}_photo_pcat where memberid='{$memberid}' order by xuhao");
    while ($fsql->next_record()) {
        $pcatid = $fsql->f("catid");
        $pcat = $fsql->f("cat");
        if ($showpcatid == $pcatid) {
            $pcatlist .= "<option value='" . $pcatid . "' selected>" . $pcat . "</option>";
        } else {
            $pcatlist .= "<option value='" . $pcatid . "'>" . $pcat . "</option>";
        }
    }
    //图片分类
    $fsql->query("select * from {P}_photo_cat order by catpath");
    while ($fsql->next_record()) {
        $lpid = $fsql->f("pid");
        $lcatid = $fsql->f("catid");
        $cat = $fsql->f("cat");
        $catpath = $fsql->f("catpath");
        $lcatpath = explode(":", $catpath);
        for ($i = 0; $i < sizeof($lcatpath) - 2; $i++) {
            $tsql->query("select catid,cat from {P}_photo_cat where catid='{$lcatpath[$i]}'");
            if ($tsql->next_record()) {
                $ncatid = $tsql->f('cat');
                $ncat = $tsql->f('cat');
                $ppcat .= $ncat . "/";
            }
        }
        if ($showcatid == $lcatid) {
            $catlist .= "<option value='" . $lcatid . "' selected>" . $ppcat . $cat . "</option>";
        } else {
            $catlist .= "<option value='" . $lcatid . "'>" . $ppcat . $cat . "</option>";
        }
        $ppcat = "";
    }
    $var = array('catlist' => $catlist, 'pcatlist' => $pcatlist);
    $str = ShowTplTemp($TempArr["start"], $var);
    $scl = " memberid='{$memberid}' ";
    if ($showcatid != "" && $showcatid != "0") {
        $fmdpath = fmpath($showcatid);
        $scl .= " and catpath regexp '{$fmdpath}' ";
    }
    if ($showpcatid != "" && $showpcatid != "0") {
        $scl .= " and pcatid ='{$showpcatid}' ";
    }
    if ($key != "") {
        $scl .= " and (title regexp '{$key}' or body regexp '{$key}') ";
    }
    if ($shownum == "") {
        $shownum = "10";
    }
    include ROOTPATH . "includes/pages.inc.php";
    $pages = new pages();
    $totalnums = TblCount("_photo_con", "id", $scl);
    $pages->setvar(array("key" => $key, "shownum" => $shownum, "showcatid" => $showcatid, "showpcatid" => $showpcatid));
    $pages->set($shownum, $totalnums);
    $pagelimit = $pages->limit();
    $fsql->query("select * from {P}_photo_con where {$scl} order by uptime desc limit {$pagelimit}");
    while ($fsql->next_record()) {
        $id = $fsql->f('id');
        $title = $fsql->f('title');
        $dtime = $fsql->f('dtime');
        $src = $fsql->f('src');
        $uptime = $fsql->f('uptime');
        $iffb = $fsql->f('iffb');
        $dtime = date("Y-m-d", $dtime);
        $uptime = date("Y-m-d", $uptime);
        if ($iffb == "1") {
            $check = "<img src='" . ROOTPATH . "photo/templates/images/yes.gif'>";
        } else {
            $check = "<img src='" . ROOTPATH . "photo/templates/images/no.gif'>";
        }
        if ($src != "") {
            $icon = "image.gif";
            $src = ROOTPATH . $src;
        } else {
            $icon = "noimage.gif";
        }
        $link = ROOTPATH . "photo/html/?" . $id . ".html";
        $var = array('page' => $page, 'title' => $title, 'dtime' => $dtime, 'src' => $src, 'icon' => $icon, 'uptime' => $uptime, 'check' => $check, 'target' => "_blank", 'link' => $link, 'id' => $id);
        $str .= ShowTplTemp($TempArr["list"], $var);
    }
    $str .= $TempArr["end"];
    $pagesinfo = $pages->ShowNow();
    $var = array('key' => $key, 'showcatid' => $showcatid, 'shownum' => $shownum, 'showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums);
    $str = ShowTplTemp($str, $var);
    return $str;
}
Exemple #10
0
    $fromM = date("n", time());
    $fromD = date("j", time());
    $toY = date("Y", time());
    $toM = date("n", time());
    $toD = date("j", time());
}
$fromtime = mktime(0, 0, 0, $fromM, $fromD, $fromY);
$totime = mktime(23, 59, 59, $toM, $toD, $toY);
$scl = " time>={$fromtime} and time<={$totime} ";
if ($key != "") {
    $scl .= " and urlform  regexp '{$key}' ";
}
$totalnums = TblCount("_tools_statcount", "id", $scl);
$pages = new pages();
$pages->setvar(array("key" => $key, "tp" => $tp, "fromY" => $fromY, "fromM" => $fromM, "fromD" => $fromD, "toY" => $toY, "toM" => $toM, "toD" => $toD));
$pages->set(10, $totalnums);
$pagelimit = $pages->limit();
?>
<div class="tablezone">
<table width="100%" border="0" cellpadding="5" cellspacing="0">
    <tr> 
      <td  class="innerbiaoti" width="160" height="25"><?php 
echo $strStatFtime;
?>
</td>
      <td  class="innerbiaoti" width="100" height="25"><?php 
echo $strStatFIP;
?>
</td>
      <td  class="innerbiaoti" height="25"><?php 
echo $strStatFUrl;
Exemple #11
0
if ($key != "") {
    $scl .= " and (title regexp '{$key}' or body regexp '{$key}') ";
}
if ($showtj != "" && $showtj != "all") {
    $scl .= " and tj='{$showtj}' ";
}
if ($showfb != "" && $showfb != "all") {
    $scl .= " and iffb='{$showfb}' ";
}
if ($gid != "" && $pid != "0") {
    $scl .= " and poll_id='{$gid}' ";
}
$totalnums = TblCount("_tools_photopolldata", "id", $scl);
$pages = new pages();
$pages->setvar(array("shownum" => $shownum, "gid" => $gid, "sc" => $sc, "ord" => $ord, "showtj" => $showtj, "showfb" => $showfb, "key" => $key));
$pages->set($shownum, $totalnums);
$pagelimit = $pages->limit();
?>

<!----------------------------图片搜索部分----------------------------------> 
<div class="searchzone">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="30">
  <tr> 
    <form method="get" action="photopoll_con.php" >
                  
      <td  height="30"> 
        <select name="gid">
          <option value='all'><?php 
echo $strVoteInfo3;
?>
</option>
Exemple #12
0
function DownQuery()
{
    global $fsql, $msql, $strDownperson;
    $shownums = $GLOBALS["PLUSVARS"]["shownums"];
    $cutword = $GLOBALS["PLUSVARS"]["cutword"];
    $target = $GLOBALS["PLUSVARS"]["target"];
    $tempname = $GLOBALS["PLUSVARS"]["tempname"];
    //地址栏参数
    if (strstr($_SERVER["QUERY_STRING"], ".html")) {
        $Arr = explode(".html", $_SERVER["QUERY_STRING"]);
        $catid = $Arr[0];
    } elseif ($_GET["catid"] > 0) {
        $catid = $_GET["catid"];
    } else {
        $catid = 0;
    }
    $key = $_GET["key"];
    $showtj = $_GET["showtj"];
    $page = $_GET["page"];
    $myord = $_GET["myord"];
    $myshownums = $_GET["myshownums"];
    $memberid = $_GET["memberid"];
    $showtag = $_GET["showtag"];
    if ($myord == "") {
        $myord = "dtime";
    }
    if ($myshownums != "" && $myshownums != "0") {
        $shownums = $myshownums;
    }
    //积分名称
    $msql->query("select * from {P}_member_centset");
    if ($msql->next_record()) {
        $centname1 = $msql->f('centname1');
        $centname2 = $msql->f('centname2');
        $centname3 = $msql->f('centname3');
        $centname4 = $msql->f('centname4');
        $centname5 = $msql->f('centname5');
    }
    //模版解释
    $Temp = LoadTemp($tempname);
    $TempArr = SplitTblTemp($Temp);
    $str = $TempArr["start"];
    $scl = " iffb='1' and catid!='0' ";
    if ($catid != "0" && $catid != "") {
        $fmdpath = fmpath($catid);
        $scl .= " and catpath regexp '{$fmdpath}' ";
    }
    if ($showtj != "" && $showtj != "all") {
        $scl .= " and tj='{$showtj}' ";
    }
    if ($memberid != "" && $memberid != "all") {
        $scl .= " and memberid='{$memberid}' ";
    }
    if ($key != "") {
        $scl .= " and (title regexp '{$key}' or body regexp '{$key}') ";
    }
    if ($showtag != "") {
        $scl .= " and tags regexp '{$showtag}' ";
    }
    include ROOTPATH . "includes/pages.inc.php";
    $pages = new pages();
    $totalnums = TblCount("_down_con", "id", $scl);
    $pages->setvar(array("catid" => $catid, "myord" => $myord, "myshownums" => $myshownums, "showtj" => $showtj, "author" => $author, "key" => $key));
    $pages->set($shownums, $totalnums);
    $pagelimit = $pages->limit();
    $fsql->query("select * from {P}_down_con where {$scl} order by {$myord} desc limit {$pagelimit}");
    while ($fsql->next_record()) {
        $id = $fsql->f('id');
        $title = $fsql->f('title');
        $catid = $fsql->f('catid');
        $catpath = $fsql->f('catpath');
        $dtime = $fsql->f('dtime');
        $nowcatid = $fsql->f('catid');
        $ifbold = $fsql->f('ifbold');
        $ifred = $fsql->f('ifred');
        $author = $fsql->f('author');
        $source = $fsql->f('source');
        $type = $fsql->f('type');
        $src = $fsql->f('src');
        $cl = $fsql->f('cl');
        $fileurl = $fsql->f('fileurl');
        $downcount = $fsql->f('downcount');
        $prop1 = $fsql->f('prop1');
        $prop2 = $fsql->f('prop2');
        $prop3 = $fsql->f('prop3');
        $prop4 = $fsql->f('prop4');
        $prop5 = $fsql->f('prop5');
        $prop6 = $fsql->f('prop6');
        $prop7 = $fsql->f('prop7');
        $prop8 = $fsql->f('prop8');
        $prop9 = $fsql->f('prop9');
        $prop10 = $fsql->f('prop10');
        $prop11 = $fsql->f('prop11');
        $prop12 = $fsql->f('prop12');
        $prop13 = $fsql->f('prop13');
        $prop14 = $fsql->f('prop14');
        $prop15 = $fsql->f('prop15');
        $prop16 = $fsql->f('prop16');
        $prop17 = $fsql->f('prop17');
        $prop18 = $fsql->f('prop18');
        $prop19 = $fsql->f('prop19');
        $prop20 = $fsql->f('prop20');
        $memo = $fsql->f('memo');
        $downcent = $fsql->f('downcent');
        $downcentid = $fsql->f('downcentid');
        $centincome = $fsql->f('centincome');
        $dtime = date("Y-m-d", $dtime);
        if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "down/html/" . $id . ".html")) {
            $link = ROOTPATH . "down/html/" . $id . ".html";
        } else {
            $link = ROOTPATH . "down/html/?" . $id . ".html";
        }
        if ($ifbold == "1") {
            $bold = " style='font-weight:bold' ";
        } else {
            $bold = "";
        }
        if ($ifred != "0") {
            $red = " style='color:" . $ifred . "' ";
        } else {
            $red = "";
        }
        if ($cutword != "0") {
            $title = csubstr($title, 0, $cutword);
        }
        //参数列
        $i = 1;
        $msql->query("select * from {P}_down_prop where catid='{$catid}' order by xuhao");
        while ($msql->next_record()) {
            $pn = "propname" . $i;
            ${$pn} = $msql->f('propname');
            $i++;
        }
        //分类树
        $arr = explode(":", $catpath);
        if ($catpath == "") {
            $catstr = $strDownperson;
        } else {
            $catstr = "";
            for ($i = 0; $i < sizeof($arr); $i++) {
                if ($arr[$i] != "" && $arr[$i] != "0") {
                    $msql->query("select cat from {P}_down_cat where catid='" . intval($arr[$i]) . "'");
                    if ($msql->next_record()) {
                        $cat = $msql->f('cat');
                        $catstr .= $cat . "&gt;";
                    }
                }
            }
            $catstr = substr($catstr, 0, -4);
        }
        //交易积分
        $cenv = "centname" . $downcentid;
        $centname = ${$cenv};
        $var = array('title' => $title, 'dtime' => $dtime, 'red' => $red, 'author' => $author, 'source' => $source, 'cat' => $cat, 'src' => $src, 'cl' => $cl, 'catstr' => $catstr, 'fileurl' => $fileurl, 'downcount' => $downcount, 'link' => $link, 'target' => $target, 'centname' => $centname, 'downcent' => $downcent, 'centincome' => $centincome, 'memo' => $memo, 'bold' => $bold, 'prop1' => $prop1, 'prop2' => $prop2, 'prop3' => $prop3, 'prop4' => $prop4, 'prop5' => $prop5, 'prop6' => $prop6, 'prop7' => $prop7, 'prop8' => $prop8, 'prop9' => $prop9, 'prop10' => $prop10, 'prop11' => $prop11, 'prop12' => $prop12, 'prop13' => $prop13, 'prop14' => $prop14, 'prop15' => $prop15, 'prop16' => $prop16, 'prop17' => $prop17, 'prop18' => $prop18, 'prop19' => $prop19, 'prop20' => $prop20, 'propname1' => $propname1, 'propname2' => $propname2, 'propname3' => $propname3, 'propname4' => $propname4, 'propname5' => $propname5, 'propname6' => $propname6, 'propname7' => $propname7, 'propname8' => $propname8, 'propname9' => $propname9, 'propname10' => $propname10, 'propname11' => $propname11, 'propname12' => $propname12, 'propname13' => $propname13, 'propname14' => $propname14, 'propname15' => $propname15, 'propname16' => $propname16, 'propname17' => $propname17, 'propname18' => $propname18, 'propname19' => $propname19, 'propname20' => $propname20);
        $str .= ShowTplTemp($TempArr["list"], $var);
    }
    $str .= $TempArr["end"];
    $pagesinfo = $pages->ShowNow();
    $var = array('showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums);
    $str = ShowTplTemp($str, $var);
    return $str;
}
Exemple #13
0
function DownGlobalQuery()
{
    global $fsql, $msql;
    $shownums = $GLOBALS["PLUSVARS"]["shownums"];
    $ord = $GLOBALS["PLUSVARS"]["ord"];
    $sc = $GLOBALS["PLUSVARS"]["sc"];
    $showtj = $GLOBALS["PLUSVARS"]["showtj"];
    $cutword = $GLOBALS["PLUSVARS"]["cutword"];
    $target = $GLOBALS["PLUSVARS"]["target"];
    $catid = $GLOBALS["PLUSVARS"]["catid"];
    $projid = $GLOBALS["PLUSVARS"]["projid"];
    $tags = $GLOBALS["PLUSVARS"]["tags"];
    $pagename = $GLOBALS["PLUSVARS"]["pagename"];
    $tempname = $GLOBALS["PLUSVARS"]["tempname"];
    //ĬÈÏÌõ¼þ
    $scl = " iffb='1' and catid!='0' ";
    if ($showtj != "" && $showtj != "0") {
        $scl .= " and tj='1' ";
    }
    //Æ¥Åä·ÖÀà
    if ($catid != 0 && $catid != "") {
        $catid = fmpath($catid);
        $scl .= " and catpath regexp '{$catid}' ";
    }
    //Æ¥ÅäרÌâ
    if ($projid != 0 && $projid != "") {
        $projid = fmpath($projid);
        $scl .= " and proj regexp '{$projid}' ";
    }
    //ÅжÏÆ¥Åä±êÇ©
    if ($tags != "") {
        $tags = $tags . ",";
        $scl .= " and tags regexp '{$tags}' ";
    }
    //Ä£°æ½âÊÍ
    $Temp = LoadTemp($tempname);
    $TempArr = SplitTblTemp($Temp);
    $str = $TempArr["start"];
    //·­Ò³
    include ROOTPATH . "includes/pages.inc.php";
    $pages = new pages();
    $totalnums = TblCount("_down_con", "id", $scl);
    $pages->setvar(array("key" => $key));
    $pages->set($shownums, $totalnums);
    $pagelimit = $pages->limit();
    $picnum = 1;
    $fsql->query("select * from {P}_down_con where {$scl} order by {$ord} {$sc} limit {$pagelimit}");
    while ($fsql->next_record()) {
        $id = $fsql->f('id');
        $title = $fsql->f('title');
        $catpath = $fsql->f('catpath');
        $dtime = $fsql->f('dtime');
        $nowcatid = $fsql->f('catid');
        $ifnew = $fsql->f('ifnew');
        $ifred = $fsql->f('ifred');
        $ifbold = $fsql->f('ifbold');
        $author = $fsql->f('author');
        $source = $fsql->f('source');
        $cl = $fsql->f('cl');
        $fileurl = $fsql->f('fileurl');
        $downcount = $fsql->f('downcount');
        $prop1 = $fsql->f('prop1');
        $prop2 = $fsql->f('prop2');
        $prop3 = $fsql->f('prop3');
        $prop4 = $fsql->f('prop4');
        $prop5 = $fsql->f('prop5');
        $prop6 = $fsql->f('prop6');
        $prop7 = $fsql->f('prop7');
        $prop8 = $fsql->f('prop8');
        $prop9 = $fsql->f('prop9');
        $prop10 = $fsql->f('prop10');
        $prop11 = $fsql->f('prop11');
        $prop12 = $fsql->f('prop12');
        $prop13 = $fsql->f('prop13');
        $prop14 = $fsql->f('prop14');
        $prop15 = $fsql->f('prop15');
        $prop16 = $fsql->f('prop16');
        $prop17 = $fsql->f('prop17');
        $prop18 = $fsql->f('prop18');
        $prop19 = $fsql->f('prop19');
        $prop20 = $fsql->f('prop20');
        $memo = $fsql->f('memo');
        if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "down/html/" . $id . ".html")) {
            $link = ROOTPATH . "down/html/" . $id . ".html";
        } else {
            $link = ROOTPATH . "down/html/?" . $id . ".html";
        }
        $dtime = date("Y-m-d H:i", $dtime);
        if ($ifbold == "1") {
            $bold = " style='font-weight:bold' ";
        } else {
            $bold = "";
        }
        if ($ifred != "0") {
            $red = " style='color:" . $ifred . "' ";
        } else {
            $red = "";
        }
        if ($cutword != "0") {
            $title = csubstr($title, 0, $cutword);
        }
        //ÏÔʾËùÊô·ÖÀà
        $msql->query("select cat from {P}_down_cat where catid='{$nowcatid}'");
        if ($msql->next_record()) {
            $cat = $msql->f('cat');
        }
        //Ä£°æ±êÇ©½âÊÍ
        $var = array('title' => $title, 'memo' => $memo, 'dtime' => $dtime, 'red' => $red, 'bold' => $bold, 'link' => $link, 'target' => $target, 'author' => $author, 'source' => $source, 'cat' => $cat, 'cl' => $cl, 'fileurl' => $fileurl, 'downcount' => $downcount, 'prop1' => $prop1, 'prop2' => $prop2, 'prop3' => $prop3, 'prop4' => $prop4, 'prop5' => $prop5, 'prop6' => $prop6, 'prop7' => $prop7, 'prop8' => $prop8, 'prop9' => $prop9, 'prop10' => $prop10, 'prop11' => $prop11, 'prop12' => $prop12, 'prop13' => $prop13, 'prop14' => $prop14, 'prop15' => $prop15, 'prop16' => $prop16, 'prop17' => $prop17, 'prop18' => $prop18, 'prop19' => $prop19, 'prop20' => $prop20, 'propname1' => $propname1, 'propname2' => $propname2, 'propname3' => $propname3, 'propname4' => $propname4, 'propname5' => $propname5, 'propname6' => $propname6, 'propname7' => $propname7, 'propname8' => $propname8, 'propname9' => $propname9, 'propname10' => $propname10, 'propname11' => $propname11, 'propname12' => $propname12, 'propname13' => $propname13, 'propname14' => $propname14, 'propname15' => $propname15, 'propname16' => $propname16, 'propname17' => $propname17, 'propname18' => $propname18, 'propname19' => $propname19, 'propname20' => $propname20);
        $str .= ShowTplTemp($TempArr["list"], $var);
        $picnum++;
    }
    $str .= $TempArr["end"];
    $pagesinfo = $pages->ShowNow();
    $var = array('showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums);
    $str = ShowTplTemp($str, $var);
    return $str;
}
Exemple #14
0
function ProductQuery()
{
    global $fsql, $msql, $tsql;
    $shownums = $GLOBALS["PLUSVARS"]["shownums"];
    $cutword = $GLOBALS["PLUSVARS"]["cutword"];
    $target = $GLOBALS["PLUSVARS"]["target"];
    $tempname = $GLOBALS["PLUSVARS"]["tempname"];
    $picw = $GLOBALS["PLUSVARS"]["picw"];
    $pich = $GLOBALS["PLUSVARS"]["pich"];
    $fittype = $GLOBALS["PLUSVARS"]["fittype"];
    $cutbody = $GLOBALS["PLUSVARS"]["cutbody"];
    //地址栏参数
    if (strstr($_SERVER["QUERY_STRING"], ".html")) {
        $Arr = explode(".html", $_SERVER["QUERY_STRING"]);
        $catid = $Arr[0];
    } elseif ($_GET["catid"] > 0) {
        $catid = $_GET["catid"];
    } else {
        $catid = 0;
    }
    $key = $_GET["key"];
    $showtj = $_GET["showtj"];
    $page = $_GET["page"];
    $myord = $_GET["myord"];
    $myshownums = $_GET["myshownums"];
    $memberid = $_GET["memberid"];
    $showtag = $_GET["showtag"];
    if ($myord == "") {
        $myord = "uptime";
    }
    if ($myshownums != "" && $myshownums != "0") {
        $shownums = $myshownums;
    }
    //模版解释
    $Temp = LoadTemp($tempname);
    $TempArr = SplitTblTemp($Temp);
    $str = $TempArr["start"];
    $scl = " iffb='1' and catid!='0' ";
    if ($catid != "0" && $catid != "") {
        $fmdpath = fmpath($catid);
        $scl .= " and catpath regexp '{$fmdpath}' ";
    }
    if ($showtj != "" && $showtj != "all") {
        $scl .= " and tj='{$showtj}' ";
    }
    if ($memberid != "" && $memberid != "all") {
        $scl .= " and memberid='{$memberid}' ";
    }
    if ($key != "") {
        $scl .= " and (title regexp '{$key}' or memo regexp '{$key}') ";
    }
    if ($showtag != "") {
        $scl .= " and tags regexp '{$showtag}' ";
    }
    include ROOTPATH . "includes/pages.inc.php";
    $pages = new pages();
    $totalnums = TblCount("_product_con", "id", $scl);
    $pages->setvar(array("catid" => $catid, "myord" => $myord, "myshownums" => $myshownums, "showtj" => $showtj, "author" => $author, "key" => $key));
    $pages->set($shownums, $totalnums);
    $pagelimit = $pages->limit();
    $fsql->query("select * from {P}_product_con where {$scl} order by {$myord} desc limit {$pagelimit}");
    while ($fsql->next_record()) {
        $id = $fsql->f('id');
        $title = $fsql->f('title');
        $catid = $fsql->f('catid');
        $catpath = $fsql->f('catpath');
        $dtime = $fsql->f('dtime');
        $nowcatid = $fsql->f('catid');
        $ifbold = $fsql->f('ifbold');
        $ifred = $fsql->f('ifred');
        $author = $fsql->f('author');
        $source = $fsql->f('source');
        $type = $fsql->f('type');
        $src = $fsql->f('src');
        $cl = $fsql->f('cl');
        $prop1 = $fsql->f('prop1');
        $prop2 = $fsql->f('prop2');
        $prop3 = $fsql->f('prop3');
        $prop4 = $fsql->f('prop4');
        $prop5 = $fsql->f('prop5');
        $prop6 = $fsql->f('prop6');
        $prop7 = $fsql->f('prop7');
        $prop8 = $fsql->f('prop8');
        $prop9 = $fsql->f('prop9');
        $prop10 = $fsql->f('prop10');
        $prop11 = $fsql->f('prop11');
        $prop12 = $fsql->f('prop12');
        $prop13 = $fsql->f('prop13');
        $prop14 = $fsql->f('prop14');
        $prop15 = $fsql->f('prop15');
        $prop16 = $fsql->f('prop16');
        $prop17 = $fsql->f('prop17');
        $prop18 = $fsql->f('prop18');
        $prop19 = $fsql->f('prop19');
        $prop20 = $fsql->f('prop20');
        $memo = $fsql->f('memo');
        $dtime = date("Y-m-d", $dtime);
        if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "product/html/" . $id . ".html")) {
            $link = ROOTPATH . "product/html/" . $id . ".html";
        } else {
            $link = ROOTPATH . "product/html/?" . $id . ".html";
        }
        if ($ifbold == "1") {
            $bold = " style='font-weight:bold' ";
        } else {
            $bold = "";
        }
        if ($ifred != "0") {
            $red = " style='color:" . $ifred . "' ";
        } else {
            $red = "";
        }
        if ($cutword != "0") {
            $title = csubstr($title, 0, $cutword);
        }
        if ($cutbody != "0") {
            $memo = csubstr($memo, 0, $cutbody);
        }
        if ($src == "") {
            $src = "product/pics/nopic.gif";
        }
        $src = ROOTPATH . $src;
        $tsql->query("select cat from {P}_product_cat where catid='{$catid}'");
        if ($tsql->next_record()) {
            $cat = $tsql->f('cat');
        }
        //参数列
        $propstr = "";
        $i = 1;
        $msql->query("select * from {P}_product_prop where catid='{$catid}' order by xuhao");
        while ($msql->next_record()) {
            $propname = $msql->f('propname');
            $pn = "prop" . $i;
            $pstr = str_replace("{#propname#}", $propname, $TempArr["m1"]);
            $pstr = str_replace("{#prop#}", ${$pn}, $pstr);
            $propstr .= $pstr;
            $i++;
        }
        $var = array('cat' => $cat, 'id' => $id, 'title' => $title, 'propstr' => $propstr, 'dtime' => $dtime, 'red' => $red, 'author' => $author, 'source' => $source, 'src' => $src, 'cl' => $cl, 'link' => $link, 'target' => $target, 'memo' => $memo, 'picw' => $picw, 'pich' => $pich, 'bold' => $bold);
        $str .= ShowTplTemp($TempArr["list"], $var);
    }
    $str .= $TempArr["end"];
    $pagesinfo = $pages->ShowNow();
    $var = array('fittype' => $fittype, 'showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums);
    $str = ShowTplTemp($str, $var);
    return $str;
}
Exemple #15
0
function Search()
{
    global $fsql, $strSearchNtc1;
    $cutword = $GLOBALS["PLUSVARS"]["cutword"];
    $target = $GLOBALS["PLUSVARS"]["target"];
    $tempname = $GLOBALS["PLUSVARS"]["tempname"];
    $key = htmlspecialchars($_GET["key"]);
    $page = htmlspecialchars($_GET["page"]);
    $myord = htmlspecialchars($_GET["myord"]);
    $myshownums = htmlspecialchars($_GET["myshownums"]);
    if ($myord != "id" && $myord != "xuhao" && $myord != "cl" && $myord != "uptime" && $myord != "dtime") {
        $myord = "uptime";
    }
    if ($myshownums != "" && $myshownums != "0") {
        $shownums = $myshownums;
    } else {
        $shownums = 20;
    }
    //判断模块是否安装
    $fsql->query("select coltype from {P}_base_coltype");
    while ($fsql->next_record()) {
        $colarr[] = $fsql->f('coltype');
    }
    if ($key != "") {
        if (in_array("news", $colarr) == true) {
            $fsql->query("select count(id) from {P}_news_con where iffb='1' and catid!='0' and (title regexp '{$key}' or body regexp '{$key}')");
            if ($fsql->next_record()) {
                $totalnums = $fsql->f('count(id)');
            }
        } else {
            echo "文章模块未安装,全站搜索不可用";
            exit;
        }
        if (in_array("comment", $colarr) == true) {
            $fsql->query("select count(id) from {P}_comment where iffb='1' and pid='0' and (title regexp '{$key}' or body regexp '{$key}') ");
            if ($fsql->next_record()) {
                $totalnums += $fsql->f('count(id)');
            }
        }
        if (in_array("photo", $colarr) == true) {
            $fsql->query("select count(id) from {P}_photo_con where iffb='1' and catid!='0' and (title regexp '{$key}' or memo regexp '{$key}') ");
            if ($fsql->next_record()) {
                $totalnums += $fsql->f('count(id)');
            }
        }
        if (in_array("down", $colarr) == true) {
            $fsql->query("select count(id) from {P}_down_con where iffb='1' and catid!='0' and (title regexp '{$key}' or body regexp '{$key}')");
            if ($fsql->next_record()) {
                $totalnums += $fsql->f('count(id)');
            }
        }
        if (in_array("product", $colarr) == true) {
            $fsql->query("select count(id) from {P}_product_con where iffb='1' and catid!='0' and (title regexp '{$key}' or body regexp '{$key}')");
            if ($fsql->next_record()) {
                $totalnums += $fsql->f('count(id)');
            }
        }
        if (in_array("shop", $colarr) == true) {
            $fsql->query("select count(id) from {P}_shop_con where iffb='1' and catid!='0' and (title regexp '{$key}' or body regexp '{$key}')");
            if ($fsql->next_record()) {
                $totalnums += $fsql->f('count(id)');
            }
        }
        if (in_array("job", $colarr) == true) {
            $fsql->query("select count(id) from {P}_job where iffb='1' and jobstat='1' and (jobname regexp '{$key}' or jobintro regexp '{$key}') ");
            if ($fsql->next_record()) {
                $totalnums += $fsql->f('count(id)');
            }
        }
        if (in_array("bizinfo", $colarr) == true) {
            $fsql->query("select count(id) from {P}_bizinfo_con where iffb='1' and catid!='0' and (title regexp '{$key}' or body regexp '{$key}') ");
            if ($fsql->next_record()) {
                $totalnums += $fsql->f('count(id)');
            }
        }
        if (in_array("zlinfo", $colarr) == true) {
            $fsql->query("select count(id) from {P}_zlinfo_con where iffb='1' and catid!='0' and (fairname regexp '{$key}' or zldescrib regexp '{$key}') ");
            if ($fsql->next_record()) {
                $totalnums += $fsql->f('count(id)');
            }
        }
        if (in_array("tech", $colarr) == true) {
            $fsql->query("select count(id) from {P}_tech_offer where iffb='1' and catid!='0' and (title regexp '{$key}' or body regexp '{$key}') ");
            if ($fsql->next_record()) {
                $totalnums += $fsql->f('count(id)');
            }
            $fsql->query("select count(id) from {P}_tech_demand where iffb='1' and catid!='0' and (title regexp '{$key}' or body regexp '{$key}') ");
            if ($fsql->next_record()) {
                $totalnums += $fsql->f('count(id)');
            }
        }
        if (in_array("news", $colarr) == true) {
            $scl = " (select id,title,body,dtime,uptime,author,cl,contype  from {P}_news_con where iffb='1' and catid!='0' and (title regexp '{$key}' or body regexp '{$key}') ) ";
        } else {
            echo "文章模块未安装,全站搜索不可用";
            exit;
        }
        if (in_array("comment", $colarr) == true) {
            $scl .= " union (select id,title,body,dtime,uptime,pname as author,cl,contype  from {P}_comment where iffb='1' and pid='0' and (title regexp '{$key}' or body regexp '{$key}') ) ";
        }
        if (in_array("photo", $colarr) == true) {
            $scl .= " union (select id,title,memo,dtime,uptime,author,cl,contype from {P}_photo_con where iffb='1' and catid!='0' and (title regexp '{$key}' or memo regexp '{$key}') ) ";
        }
        if (in_array("down", $colarr) == true) {
            $scl .= " union (select id,title,body,dtime,uptime,author,cl,contype from {P}_down_con where iffb='1' and catid!='0' and (title regexp '{$key}' or body regexp '{$key}') ) ";
        }
        if (in_array("product", $colarr) == true) {
            $scl .= " union (select id,title,body,dtime,uptime,author,cl,contype from {P}_product_con where iffb='1' and catid!='0' and (title regexp '{$key}' or body regexp '{$key}') ) ";
        }
        if (in_array("shop", $colarr) == true) {
            $scl .= " union (select id,title,body,dtime,uptime,author,cl,contype from {P}_shop_con where iffb='1' and catid!='0' and (title regexp '{$key}' or body regexp '{$key}') ) ";
        }
        if (in_array("job", $colarr) == true) {
            $scl .= " union (select id,jobname as title,jobintro as body,dtime,uptime,contact as author,cl,contype from {P}_job where iffb='1' and jobstat='1' and (jobname regexp '{$key}' or jobintro regexp '{$key}') ) ";
        }
        if (in_array("bizinfo", $colarr) == true) {
            $scl .= " union (select id,title,body,dtime,uptime,company as author,cl,contype from {P}_bizinfo_con where iffb='1' and catid!='0' and (title regexp '{$key}' or body regexp '{$key}') ) ";
        }
        if (in_array("zlinfo", $colarr) == true) {
            $scl .= " union (select id,fairname as title,zldescrib as body,dtime,uptime,fabucompany as author,cl,contype from {P}_zlinfo_con where iffb='1' and catid!='0' and (fairname regexp '{$key}' or zldescrib regexp '{$key}') ) ";
        }
        if (in_array("tech", $colarr) == true) {
            $scl .= " union (select id,title,body,dtime,uptime,company as author,cl,contype from {P}_tech_offer where iffb='1' and catid!='0' and (title regexp '{$key}' or body regexp '{$key}') ) ";
            $scl .= " union (select id,title,body,dtime,uptime,company as author,cl,contype from {P}_tech_demand where iffb='1' and catid!='0' and (title regexp '{$key}' or body regexp '{$key}') ) ";
        }
    } else {
        return err($strSearchNtc1, "", "");
    }
    //模版解释
    $Temp = LoadTemp($tempname);
    $TempArr = SplitTblTemp($Temp);
    $str = $TempArr["start"];
    include ROOTPATH . "includes/pages.inc.php";
    $pages = new pages();
    $pages->setvar(array("catid" => $mycatid, "myord" => $myord, "myshownums" => $myshownums, "key" => $key));
    $pages->set($shownums, $totalnums);
    $pagelimit = $pages->limit();
    $fsql->query($scl . " order by {$myord} desc limit {$pagelimit} ");
    while ($fsql->next_record()) {
        $id = $fsql->f('id');
        $title = $fsql->f('title');
        $body = $fsql->f('body');
        $memo = $fsql->f('memo');
        $dtime = $fsql->f('dtime');
        $uptime = $fsql->f('uptime');
        $author = $fsql->f('author');
        $cl = $fsql->f('cl');
        $contype = $fsql->f('contype');
        $dtime = date("Y-m-d", $dtime);
        $uptime = date("Y-m-d", $uptime);
        //不同contype的兼容处理
        switch ($contype) {
            case "techoffer":
                $link = ROOTPATH . "tech/html/?" . $id . ".html";
                break;
            case "techdemand":
                $link = ROOTPATH . "tech/demandhtml/?" . $id . ".html";
                break;
            default:
                $link = ROOTPATH . $contype . "/html/?" . $id . ".html";
                break;
        }
        $body = csubstr(ltrim(strip_tags($memo . $body)), 0, 100);
        $title = csubstr($title, 0, $cutword);
        $title = str_replace($key, "<span class='keyword'>" . $key . "</span>", $title);
        $body = str_replace($key, "<span  class='bodykeyword'>" . $key . "</span>", $body);
        $var = array('title' => $title, 'link' => $link, 'target' => $target, 'cl' => $cl, 'author' => $author, 'dtime' => $dtime, 'uptime' => $uptime, 'body' => $body);
        $str .= ShowTplTemp($TempArr["list"], $var);
    }
    $str .= $TempArr["end"];
    $pagesinfo = $pages->ShowNow();
    $var = array('showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums);
    $str = ShowTplTemp($str, $var);
    return $str;
}
Exemple #16
0
function MemberPhotoQuery()
{
    global $fsql, $msql;
    $shownums = $GLOBALS["PLUSVARS"]["shownums"];
    $cutword = $GLOBALS["PLUSVARS"]["cutword"];
    $target = $GLOBALS["PLUSVARS"]["target"];
    $tempname = $GLOBALS["PLUSVARS"]["tempname"];
    $picw = $GLOBALS["PLUSVARS"]["picw"];
    $pich = $GLOBALS["PLUSVARS"]["pich"];
    $fittype = $GLOBALS["PLUSVARS"]["fittype"];
    //µØÖ·À¸²ÎÊý
    if (isset($_GET["mid"]) && $_GET["mid"] != "" && $_GET["mid"] != "0") {
        $mid = $_GET["mid"];
    } else {
        return "";
    }
    $key = $_GET["key"];
    $page = $_GET["page"];
    $myord = $_GET["myord"];
    $myshownums = $_GET["myshownums"];
    $showtag = $_GET["showtag"];
    $pcatid = $_GET["pcatid"];
    if ($myord == "") {
        $myord = "uptime";
    }
    if ($myshownums != "" && $myshownums != "0") {
        $shownums = $myshownums;
    }
    //Ä£°æ½âÊÍ
    $Temp = LoadTemp($tempname);
    $TempArr = SplitTblTemp($Temp);
    $str = $TempArr["start"];
    //ĬÈÏÌõ¼þ
    $scl = " iffb='1' and memberid='{$mid}' ";
    if ($pcatid != "0" && $pcatid != "") {
        $scl .= " and pcatid='{$pcatid}' ";
    }
    if ($key != "") {
        $scl .= " and (title regexp '{$key}' or memo regexp '{$key}') ";
    }
    if ($showtag != "") {
        $scl .= " and tags regexp '{$showtag}' ";
    }
    include ROOTPATH . "includes/pages.inc.php";
    $pages = new pages();
    $totalnums = TblCount("_photo_con", "id", $scl);
    $pages->setvar(array("mid" => $mid, "pcatid" => $pcatid, "myord" => $myord, "myshownums" => $myshownums, "key" => $key));
    $pages->set($shownums, $totalnums);
    $pagelimit = $pages->limit();
    $fsql->query("select * from {P}_photo_con where {$scl} order by {$myord} desc limit {$pagelimit}");
    while ($fsql->next_record()) {
        $id = $fsql->f('id');
        $title = $fsql->f('title');
        $catid = $fsql->f('catid');
        $catpath = $fsql->f('catpath');
        $dtime = $fsql->f('dtime');
        $nowcatid = $fsql->f('catid');
        $ifbold = $fsql->f('ifbold');
        $ifred = $fsql->f('ifred');
        $author = $fsql->f('author');
        $source = $fsql->f('source');
        $type = $fsql->f('type');
        $src = $fsql->f('src');
        $cl = $fsql->f('cl');
        $memo = $fsql->f('memo');
        $dtime = date("Y-m-d", $dtime);
        if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "photo/html/" . $id . ".html")) {
            $link = ROOTPATH . "photo/html/" . $id . ".html";
        } else {
            $link = ROOTPATH . "photo/html/?" . $id . ".html";
        }
        if ($ifbold == "1") {
            $bold = " style='font-weight:bold' ";
        } else {
            $bold = "";
        }
        if ($ifred != "0") {
            $red = " style='color:" . $ifred . "' ";
        } else {
            $red = "";
        }
        if ($cutword != "0") {
            $title = csubstr($title, 0, $cutword);
        }
        if ($src == "") {
            $src = "photo/pics/nopic.gif";
        }
        $src = ROOTPATH . $src;
        $var = array('title' => $title, 'dtime' => $dtime, 'red' => $red, 'author' => $author, 'source' => $source, 'src' => $src, 'picw' => $picw, 'pich' => $pich, 'cl' => $cl, 'link' => $link, 'target' => $target, 'memo' => $memo, 'bold' => $bold);
        $str .= ShowTplTemp($TempArr["list"], $var);
    }
    $str .= $TempArr["end"];
    $pagesinfo = $pages->ShowNow();
    $var = array('fittype' => $fittype, 'showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums);
    $str = ShowTplTemp($str, $var);
    return $str;
}
Exemple #17
0
function NewsQuery()
{
    global $fsql, $msql;
    $shownums = $GLOBALS["PLUSVARS"]["shownums"];
    $cutword = $GLOBALS["PLUSVARS"]["cutword"];
    $target = $GLOBALS["PLUSVARS"]["target"];
    $tempname = $GLOBALS["PLUSVARS"]["tempname"];
    //µØÖ·À¸²ÎÊý
    if (strstr($_SERVER["QUERY_STRING"], ".html")) {
        $Arr = explode(".html", $_SERVER["QUERY_STRING"]);
        $catid = $Arr[0];
    } elseif ($_GET["catid"] > 0) {
        $catid = $_GET["catid"];
    } else {
        $catid = 0;
    }
    $key = $_GET["key"];
    $showtj = $_GET["showtj"];
    $page = $_GET["page"];
    $myord = $_GET["myord"];
    $myshownums = $_GET["myshownums"];
    $memberid = $_GET["memberid"];
    $showtag = $_GET["showtag"];
    $showdate = $_GET["showdate"];
    if ($myord == "") {
        $myord = "uptime";
    }
    if ($myshownums != "" && $myshownums != "0") {
        $shownums = $myshownums;
    }
    //Ä£°æ½âÊÍ
    $Temp = LoadTemp($tempname);
    $TempArr = SplitTblTemp($Temp);
    $str = $TempArr["start"];
    //ĬÈÏÌõ¼þ
    $scl = " iffb='1' and catid!='0' ";
    if ($catid != "0" && $catid != "") {
        $fmdpath = fmpath($catid);
        $scl .= " and catpath regexp '{$fmdpath}' ";
    }
    if ($showtj != "" && $showtj != "all") {
        $scl .= " and tj='{$showtj}' ";
    }
    if ($memberid != "" && $memberid != "all") {
        $scl .= " and memberid='{$memberid}' ";
    }
    if ($key != "") {
        $scl .= " and (title regexp '{$key}' or body regexp '{$key}') ";
    }
    if ($showtag != "") {
        $scl .= " and tags regexp '{$showtag}' ";
    }
    if ($showdate != "" && strlen($showdate) == 8 && intval($showdate) > 19700101) {
        $timestart = mktime(0, 0, 0, substr($showdate, 4, 2), substr($showdate, 6, 2), substr($showdate, 0, 4));
        $timeend = mktime(23, 59, 59, substr($showdate, 4, 2), substr($showdate, 6, 2), substr($showdate, 0, 4));
        $scl .= " and dtime>{$timestart} and dtime<{$timeend} ";
    }
    include ROOTPATH . "includes/pages.inc.php";
    $pages = new pages();
    $totalnums = TblCount("_news_con", "id", $scl);
    $pages->setvar(array("catid" => $catid, "myord" => $myord, "myshownums" => $myshownums, "showtj" => $showtj, "showdate" => $showdate, "author" => $author, "key" => $key));
    $pages->set($shownums, $totalnums);
    $pagelimit = $pages->limit();
    $fsql->query("select * from {P}_news_con where {$scl} order by {$myord} desc limit {$pagelimit}");
    while ($fsql->next_record()) {
        $id = $fsql->f('id');
        $title = $fsql->f('title');
        $catid = $fsql->f('catid');
        $catpath = $fsql->f('catpath');
        $dtime = $fsql->f('dtime');
        $nowcatid = $fsql->f('catid');
        $ifbold = $fsql->f('ifbold');
        $ifred = $fsql->f('ifred');
        $author = $fsql->f('author');
        $source = $fsql->f('source');
        $type = $fsql->f('type');
        $src = $fsql->f('src');
        $cl = $fsql->f('cl');
        $fileurl = $fsql->f('fileurl');
        $downcount = $fsql->f('downcount');
        $prop1 = $fsql->f('prop1');
        $prop2 = $fsql->f('prop2');
        $prop3 = $fsql->f('prop3');
        $prop4 = $fsql->f('prop4');
        $prop5 = $fsql->f('prop5');
        $prop6 = $fsql->f('prop6');
        $prop7 = $fsql->f('prop7');
        $prop8 = $fsql->f('prop8');
        $prop9 = $fsql->f('prop9');
        $prop10 = $fsql->f('prop10');
        $prop11 = $fsql->f('prop11');
        $prop12 = $fsql->f('prop12');
        $prop13 = $fsql->f('prop13');
        $prop14 = $fsql->f('prop14');
        $prop15 = $fsql->f('prop15');
        $prop16 = $fsql->f('prop16');
        $prop17 = $fsql->f('prop17');
        $prop18 = $fsql->f('prop18');
        $prop19 = $fsql->f('prop19');
        $prop20 = $fsql->f('prop20');
        $memo = $fsql->f('memo');
        $dtime = date("Y-m-d", $dtime);
        if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "news/html/" . $id . ".html")) {
            $link = ROOTPATH . "news/html/" . $id . ".html";
        } else {
            $link = ROOTPATH . "news/html/?" . $id . ".html";
        }
        if ($ifbold == "1") {
            $bold = " style='font-weight:bold' ";
        } else {
            $bold = "";
        }
        if ($ifred != "0") {
            $red = " style='color:" . $ifred . "' ";
        } else {
            $red = "";
        }
        if ($cutword != "0") {
            $title = csubstr($title, 0, $cutword);
        }
        if ($src == "") {
            $src = "news/pics/nopic.gif";
        }
        $src = ROOTPATH . $src;
        $downurl = ROOTPATH . "news/download.php?id=" . $id;
        $i = 1;
        $msql->query("select * from {P}_news_prop where catid='{$catid}' order by xuhao");
        while ($msql->next_record()) {
            $pn = "propname" . $i;
            ${$pn} = $msql->f('propname');
            $i++;
        }
        $var = array('title' => $title, 'dtime' => $dtime, 'red' => $red, 'author' => $author, 'source' => $source, 'src' => $src, 'cl' => $cl, 'downurl' => $downurl, 'fileurl' => $fileurl, 'downcount' => $downcount, 'link' => $link, 'target' => $target, 'memo' => $memo, 'bold' => $bold, 'prop1' => $prop1, 'prop2' => $prop2, 'prop3' => $prop3, 'prop4' => $prop4, 'prop5' => $prop5, 'prop6' => $prop6, 'prop7' => $prop7, 'prop8' => $prop8, 'prop9' => $prop9, 'prop10' => $prop10, 'prop11' => $prop11, 'prop12' => $prop12, 'prop13' => $prop13, 'prop14' => $prop14, 'prop15' => $prop15, 'prop16' => $prop16, 'prop17' => $prop17, 'prop18' => $prop18, 'prop19' => $prop19, 'prop20' => $prop20, 'propname1' => $propname1, 'propname2' => $propname2, 'propname3' => $propname3, 'propname4' => $propname4, 'propname5' => $propname5, 'propname6' => $propname6, 'propname7' => $propname7, 'propname8' => $propname8, 'propname9' => $propname9, 'propname10' => $propname10, 'propname11' => $propname11, 'propname12' => $propname12, 'propname13' => $propname13, 'propname14' => $propname14, 'propname15' => $propname15, 'propname16' => $propname16, 'propname17' => $propname17, 'propname18' => $propname18, 'propname19' => $propname19, 'propname20' => $propname20);
        $str .= ShowTplTemp($TempArr["list"], $var);
    }
    $str .= $TempArr["end"];
    $pagesinfo = $pages->ShowNow();
    $var = array('showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums);
    $str = ShowTplTemp($str, $var);
    return $str;
}
Exemple #18
0
function JobQuery()
{
    global $fsql, $msql;
    $shownums = $GLOBALS["PLUSVARS"]["shownums"];
    $cutword = $GLOBALS["PLUSVARS"]["cutword"];
    $cutbody = $GLOBALS["PLUSVARS"]["cutbody"];
    $target = $GLOBALS["PLUSVARS"]["target"];
    $tempname = $GLOBALS["PLUSVARS"]["tempname"];
    $key = $_GET["key"];
    $page = $_GET["page"];
    //模版解释
    $Temp = LoadTemp($tempname);
    $TempArr = SplitTblTemp($Temp);
    $str = $TempArr["start"];
    //默认条件
    $scl = " iffb='1' and jobstat='1' ";
    if ($key != "") {
        $scl .= " and (jobname regexp '{$key}' or jobintro regexp '{$key}') ";
    }
    include ROOTPATH . "includes/pages.inc.php";
    $pages = new pages();
    $totalnums = TblCount("_job", "id", $scl);
    $pages->setvar(array("key" => $key));
    $pages->set($shownums, $totalnums);
    $pagelimit = $pages->limit();
    $fsql->query("select * from {P}_job where {$scl} order by uptime desc limit {$pagelimit}");
    while ($fsql->next_record()) {
        $id = $fsql->f('id');
        $jobname = $fsql->f('jobname');
        $jobtype = $fsql->f('jobtype');
        $experience = $fsql->f('experience');
        $education = $fsql->f('education');
        $langneed = $fsql->f('langneed');
        $langlevel = $fsql->f('langlevel');
        $pnums = $fsql->f('pnums');
        $jobaddr = $fsql->f('jobaddr');
        $jobintro = $fsql->f('jobintro');
        $jobrequest = $fsql->f('jobrequest');
        $jobstat = $fsql->f('jobstat');
        $contact = $fsql->f('contact');
        $tel = $fsql->f('tel');
        $email = $fsql->f('email');
        $dtime = $fsql->f('dtime');
        $uptime = $fsql->f('uptime');
        $dtime = date("Y-m-d", $dtime);
        $uptime = date("Y-m-d", $uptime);
        if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "job/html/" . $id . ".html")) {
            $link = ROOTPATH . "job/html/" . $id . ".html";
        } else {
            $link = ROOTPATH . "job/html/?" . $id . ".html";
        }
        if ($cutword != "0") {
            $jobname = csubstr($jobname, 0, $cutword);
        }
        if ($cutbody != "0") {
            $jobintro = csubstr($jobintro, 0, $cutbody);
        }
        $jobintro = nl2br($jobintro);
        $jobrequest = nl2br($jobrequest);
        $var = array('jobid' => $id, 'jobname' => $jobname, 'dtime' => $dtime, 'uptime' => $uptime, 'jobtype' => $jobtype, 'experience' => $experience, 'education' => $education, 'langneed' => $langneed, 'langlevel' => $langlevel, 'pnums' => $pnums, 'jobaddr' => $jobaddr, 'jobintro' => $jobintro, 'jobrequest' => $jobrequest, 'link' => $link, 'target' => $target, 'contact' => $contact, 'tel' => $tel, 'email' => $email);
        $str .= ShowTplTemp($TempArr["list"], $var);
    }
    $str .= $TempArr["end"];
    $pagesinfo = $pages->ShowNow();
    $var = array('showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums);
    $str = ShowTplTemp($str, $var);
    return $str;
}
Exemple #19
0
function ToolsPhotoPollQuery()
{
    global $fsql, $msql;
    $shownums = $GLOBALS["PLUSVARS"]["shownums"];
    $cutword = $GLOBALS["PLUSVARS"]["cutword"];
    $target = $GLOBALS["PLUSVARS"]["target"];
    $tempname = $GLOBALS["PLUSVARS"]["tempname"];
    $picw = $GLOBALS["PLUSVARS"]["picw"];
    $pich = $GLOBALS["PLUSVARS"]["pich"];
    $fittype = $GLOBALS["PLUSVARS"]["fittype"];
    $poll_id = $GLOBALS["PLUSVARS"]["catid"];
    $ord = $GLOBALS["PLUSVARS"]["ord"];
    $key = $_GET["key"];
    $showtj = $_GET["showtj"];
    $page = $_GET["page"];
    //Ä£°æ½âÊÍ
    $Temp = LoadTemp($tempname);
    $TempArr = SplitTblTemp($Temp);
    $str = $TempArr["start"];
    $scl = " iffb='1' and poll_id!='0' ";
    if ($poll_id != "0" && $poll_id != "") {
        $scl .= " and poll_id='{$poll_id}' ";
    }
    if ($showtj != "" && $showtj != "all") {
        $scl .= " and tj='{$showtj}' ";
    }
    if ($key != "") {
        $scl .= " and (title regexp '{$key}' or body regexp '{$key}') ";
    }
    include ROOTPATH . "includes/pages.inc.php";
    $pages = new pages();
    $totalnums = TblCount("_tools_photopolldata", "id", $scl);
    $pages->setvar(array("catid" => $catid, "ord" => $ord, "shownums" => $shownums, "showtj" => $showtj, "author" => $author, "key" => $key));
    $pages->set($shownums, $totalnums);
    $pagelimit = $pages->limit();
    $fsql->query("select * from {P}_tools_photopolldata where {$scl} order by {$ord} desc limit {$pagelimit}");
    while ($fsql->next_record()) {
        $id = $fsql->f('id');
        $catid = $fsql->f('poll_id');
        $title = $fsql->f('title');
        $dtime = $fsql->f('dtime');
        $author = $fsql->f('author');
        $type = $fsql->f('type');
        $src = $fsql->f('src');
        $body = $fsql->f('body');
        $votesinfo = $fsql->f('votesinfo');
        $votes = $fsql->f('votes');
        $dtime = date("Y-m-d", $dtime);
        if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists("../html/" . $id . ".html")) {
            $link = "../html/" . $id . ".html";
        } else {
            $link = "../html/?" . $id . ".html";
        }
        if ($cutword != "0") {
            $title = csubstr($title, 0, $cutword);
        }
        if ($src == "") {
            $src = "photo/pics/nopic.gif";
        }
        $src = ROOTPATH . $src;
        $var = array('id' => $id, 'title' => $title, 'dtime' => $dtime, 'red' => $red, 'author' => $author, 'src' => $src, 'link' => $link, 'target' => $target, 'body' => $body, 'picw' => $picw, 'pich' => $pich, 'votes' => $votes, 'catid' => $catid);
        $str .= ShowTplTemp($TempArr["list"], $var);
    }
    $str .= $TempArr["end"];
    $pagesinfo = $pages->ShowNow();
    $var = array('fittype' => $fittype, 'showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums);
    $str = ShowTplTemp($str, $var);
    return $str;
}