コード例 #1
0
function GetSearch($mid = 0)
{
    global $empire, $public_r, $fun_r, $dbtbpre;
    //取得模板
    $tr = $empire->fetch1("select searchtemp,searchjstemp,searchjstemp1 from " . GetTemptb("enewspubtemp") . " limit 1");
    //返回栏目搜索
    $fcfile = "../data/fc/ListEnews.php";
    $fcjsfile = "../data/fc/cmsclass.js";
    if (file_exists($fcjsfile) && file_exists($fcfile)) {
        $options = GetFcfiletext($fcjsfile);
    } else {
        $options = ShowClass_AddClass("", "n", 0, "|-", 0, 1);
    }
    //$options="<script src=".$public_r[newsurl]."e/data/fc/searchclass.js></script>";
    $functions = "function search_check(obj){if(obj.keyboard.value.length==0){alert('" . $fun_r['EmptyKey'] . "');return false;}return true;}";
    //横向搜索
    $searchjstemp = ReplaceStemp($tr[searchjstemp], $options, $url, 0, '', '', '');
    $text2 = $functions . "document.write(\"" . $searchjstemp . "\");";
    //纵向搜索
    $searchjstemp1 = ReplaceStemp($tr[searchjstemp1], $options, $url, 0, '', '', '');
    $text3 .= $functions . "document.write(\"" . $searchjstemp1 . "\");";
    //高级搜索
    $url = "<a href='" . $public_r[newsurl] . "'>" . $fun_r['index'] . "</a>&nbsp;>&nbsp;<a href='../search/'>" . $fun_r['adsearch'] . "</a>&nbsp;>";
    //导航栏
    //搜索模板替换
    $dbsearchtemp = ReplaceStemp($tr[searchtemp], $options, $url, 0, $fun_r['adsearch'], $fun_r['adsearch'], $fun_r['adsearch'], 1);
    $text4 = $dbsearchtemp;
    //增加信息栏目
    if ($mid) {
        $options1 = ShowClass_AddClass("", "n", 0, "|-", $mid, 2);
        $addnews_class = "document.write(\"" . addslashes($options1) . "\");";
        $filename3 = "../../d/js/js/addinfo" . $mid . ".js";
        WriteFiletext_n($filename3, $addnews_class);
    }
    $filename = "../../d/js/js/search_news1.js";
    WriteFiletext_n($filename, $text2);
    $filename1 = "../../d/js/js/search_news2.js";
    WriteFiletext_n($filename1, $text3);
    $filename2 = "../../search/index" . $public_r[searchtype];
    WriteFiletext($filename2, $text4);
}
コード例 #2
0
ファイル: TogZt.php プロジェクト: BGCX261/zjh-dev-svn-to-git
     printerror("ErrorUrl", "history.go(-1)");
 }
 $r = $empire->fetch1("select ztid,ztname,tbname from {$dbtbpre}enewszt where ztid='{$ztid}'");
 if (empty($r['ztid']) || empty($r['tbname'])) {
     printerror("ErrorUrl", "history.go(-1)");
 }
 //初始值
 $togr[startid] = 0;
 $togr[endid] = 0;
 $togr[pline] = 50;
 $togr[searchf] = ",stitle,";
 $togr[doecmszt] = 1;
 $url = "专题: <b>" . $r[ztname] . "</b>&nbsp;->&nbsp;组合专题";
 //--------------------操作的栏目
 $fcjsfile = '../data/fc/cmsclass.js';
 $class = GetFcfiletext($fcjsfile);
 $togid = (int) $_GET['togid'];
 if ($togid) {
     $togr = $empire->fetch1("select * from {$dbtbpre}enewstogzts where togid='{$togid}'");
     $class = str_replace("<option value='{$togr['classid']}'", "<option value='{$togr['classid']}' selected", $class);
 }
 //参数
 $togsql = $empire->query("select togid,togztname from {$dbtbpre}enewstogzts order by togid");
 while ($tgr = $empire->fetch($togsql)) {
     $selected = '';
     if ($togid == $tgr[togid]) {
         $selected = ' selected';
     }
     $togzts .= "<option value='" . $tgr[togid] . "'" . $selected . ">" . $tgr[togztname] . "</option>";
 }
 ?>
コード例 #3
0
    $newstemp_options .= "<option value=0 style='background:#99C4E3'>" . $m_r[mname] . "</option>";
    $nt_sql = $empire->query("select tempid,tempname from " . GetTemptb("enewsnewstemp") . " where modid='{$m_r['mid']}'");
    while ($nt_r = $empire->fetch($nt_sql)) {
        if ($nt_r[tempid] == $r[newstempid]) {
            $nt_d = " selected";
        } else {
            $nt_d = "";
        }
        $newstemp_options .= "<option value=" . $nt_r[tempid] . $nt_d . "> |-" . $nt_r[tempname] . "</option>";
    }
}
//栏目
$fcfile = "../data/fc/ListEnews.php";
$fcjsfile = "../data/fc/cmsclass.js";
if (file_exists($fcjsfile) && file_exists($fcfile)) {
    $options = GetFcfiletext($fcjsfile);
    $options = str_replace("<option value='{$r['bclassid']}'", "<option value='{$r['bclassid']}' selected", $options);
} else {
    $options = ShowClass_AddClass("", $r[bclassid], 0, "|-", 0, 0);
}
//会员组
$qgroup = '';
$qgbr = '';
$qgi = 0;
$cgroup = '';
$sql1 = $empire->query("select groupid,groupname from {$dbtbpre}enewsmembergroup order by level");
while ($l_r = $empire->fetch($sql1)) {
    if ($r[groupid] == $l_r[groupid]) {
        $select = " selected";
    } else {
        $select = "";