Пример #1
0
 $tpl_head = select_template("", 7, $tpl[head]);
 $tpl_head = str_replace("<select", "<select onChange='get_obj(\"tpl_head\").value=this.options[this.selectedIndex].value;'", $tpl_head);
 $tpl_foot = select_template("", 8, $tpl[foot]);
 $tpl_foot = str_replace("<select", "<select onChange='get_obj(\"tpl_foot\").value=this.options[this.selectedIndex].value;'", $tpl_foot);
 $tpl_type = $rsdb[type] == 2 ? 9 : 2;
 $tpl_list = select_template("", $tpl_type, $tpl['list']);
 $tpl_list = str_replace("<select", "<select onChange='get_obj(\"tpl_list\").value=this.options[this.selectedIndex].value;'", $tpl_list);
 $tpl_bencandy = select_template("", 3, $tpl[bencandy]);
 $tpl_bencandy = str_replace("<select", "<select onChange='get_obj(\"tpl_bencandy\").value=this.options[this.selectedIndex].value;'", $tpl_bencandy);
 $listorder[$rsdb[listorder]] = " selected ";
 $sonListorder[$rsdb[config][sonListorder]] = " selected ";
 $ListShowType[$rsdb[config][ListShowType]] = " selected ";
 $ListShowBigType[$rsdb[config][ListShowBigType]] = " selected ";
 $rsdb[descrip] = En_TruePath($rsdb[descrip], 0);
 require_once ROOT_PATH . "inc/pinyin.php";
 $htmldirname = change2pinyin($rsdb[name], 1);
 if ($only) {
     $readonly2 = ' onbeforeactivate="return false" onfocus="this.blur()" onmouseover="this.setCapture()" onmouseout="this.releaseCapture()" ';
 }
 $module_id = "<select name='postdb[fmid]' {$readonly2}><option value='0'>文章模型</option>";
 $query = $db->query("SELECT * FROM {$pre}article_module  WHERE ifclose=0 ORDER BY list DESC");
 while ($rs = $db->fetch_array($query)) {
     $ckk = $rsdb[fmid] == $rs[id] ? ' selected ' : '';
     $module_id .= "<option value='{$rs['id']}' {$ckk}>{$rs['name']}</option>";
 }
 $module_id .= " </select>";
 if ($rsdb[type] == 1) {
     $getLabelTpl = getLabelTpl('template/default/fu_bigsort_tpl');
 } elseif ($rsdb[type] == 0) {
     $getLabelTpl = getLabelTpl('template/default/list_tpl');
 }
Пример #2
0
    $ofid = str_replace(",", ",", $ofid);
    $detail = explode(",", $ofid);
    $rs[config] = addslashes($rs[config]);
    foreach ($detail as $key => $value) {
        $db->query("UPDATE {$_pre}sort SET config='{$rs['config']}' WHERE fid='{$value}' ");
    }
    refreshto("{$admin_path}&job=listfield&fid={$fid}", "复制成功", 10);
} elseif ($job == "batch") {
    get_admin_html('batch');
} elseif ($action == "batch") {
    require_once ROOT_PATH . "inc/pinyin.php";
    if ($type == "sort_dir") {
        $query = $db->query("SELECT * FROM {$_pre}sort");
        while ($rs = $db->fetch_array($query)) {
            //if(!$rs['dir_name']){
            $rs['dir_name'] = change2pinyin($rs[name], 1);
            $rs['dir_name'] = preg_replace("/(\\/|\\\\|-|'| )/", "_", $rs['dir_name']);
            if ($db->get_one("SELECT * FROM {$_pre}sort WHERE dir_name='{$rs[dir_name]}' AND fid!='{$rs['fid']}' ")) {
                $rs[dir_name] = "{$rs['dir_name']}{$rs['fid']}";
            }
            $db->query("UPDATE {$_pre}sort SET dir_name='{$rs[dir_name]}' WHERE fid='{$rs['fid']}'");
            //}
        }
        fid_cache();
    }
    refreshto("{$admin_path}&job={$action}", "操作成功", 1);
} elseif ($job == 'table') {
    $rsdb = $db->get_one("SELECT * FROM {$_pre}sort WHERE fid='{$fid}' ");
    $tableid = $rsdb[tableid] ? $rsdb[tableid] : $fid;
    get_admin_html('table');
} elseif ($action == 'table') {