Exemplo n.º 1
0
    $db->query("INSERT INTO {$pre}area (name,fup,class,type,allowcomment) VALUES ('{$name}','{$fup}','{$class}','{$type}',1) ");
    @extract($db->get_one("SELECT fid FROM {$pre}area ORDER BY fid DESC LIMIT 0,1"));
    mod_sort_class("{$pre}area", 0, 0);
    //更新class
    mod_sort_sons("{$pre}area", 0);
    //更新sons
    /*更新导航缓存*/
    cache_area();
    refreshto("?lfj={$lfj}&job=editsort&fid={$fid}", "创建成功");
} elseif ($job == "editsort") {
    $postdb[fid] && ($fid = $postdb[fid]);
    $rsdb = $db->get_one("SELECT * FROM {$pre}area WHERE fid='{$fid}'");
    $rsdb[config] = unserialize($rsdb[config]);
    $sort_fid = $Guidedb->Select("{$pre}area", "postdb[fid]", $fid, "?lfj={$lfj}&job={$job}");
    $sort_fup = $Guidedb->Select("{$pre}area", "postdb[fup]", $rsdb[fup]);
    $style_select = select_style('postdb[style]', $rsdb[style]);
    $group_post = group_box("postdb[allowpost]", explode(",", $rsdb[allowpost]));
    $group_viewtitle = group_box("postdb[allowviewtitle]", explode(",", $rsdb[allowviewtitle]));
    $group_viewcontent = group_box("postdb[allowviewcontent]", explode(",", $rsdb[allowviewcontent]));
    $group_download = group_box("postdb[allowdownload]", explode(",", $rsdb[allowdownload]));
    $typedb[$rsdb[type]] = " checked ";
    $forbidshow[intval($rsdb[forbidshow])] = " checked ";
    $allowcomment[intval($rsdb[allowcomment])] = " checked ";
    $tpl = unserialize($rsdb[template]);
    $listorder[$rsdb[listorder]] = " selected ";
    $sonListorder[$rsdb[config][sonListorder]] = " selected ";
    hack_admin_tpl('editsort');
} elseif ($action == "editsort") {
    //检查父栏目是否有问题
    check_fup("{$pre}area", $postdb[fid], $postdb[fup]);
    $postdb[allowpost] = @implode(",", $postdb[allowpost]);
Exemplo n.º 2
0
            if (!strstr($sql, 'DEFAULT CHARSET')) {
                $sql .= "{$SQL}";
            }
        }
        $db->query($sql);
        $sql = "ALTER TABLE `{$pre}reply{$tableid}` CHANGE `aid` `aid` INT( 10 ) DEFAULT '0' NOT NULL";
        $db->query($sql);
    }
    $SQL = "CREATE TABLE `{$pre}article_content_{$id}` (\n  `id` mediumint(7) NOT NULL auto_increment,\n  `aid` int(10) NOT NULL default '0',\n  `rid` mediumint(7) NOT NULL default '0',\n  `fid` mediumint(7) NOT NULL default '0',\n  `uid` mediumint(7) NOT NULL default '0',\n  `my_content` mediumtext NOT NULL,\n  PRIMARY KEY  (`id`),\n  KEY `fid` (`fid`),\n  KEY `uid` (`uid`),\n  KEY `aid` (`aid`)\n\t) TYPE=MyISAM {$SQL} AUTO_INCREMENT=1 ;";
    $db->query($SQL);
    //生成缓存
    article_module_cache();
    jump("创建成功<br><a href='?lfj={$lfj}&job=tpl&id={$id}' style='color:red;font-size:25px'>务必注意!!你必须点击生成模板,模块才能生效</a> ", "index.php?lfj=article_module&job=editmodule&id={$id}", 10);
} elseif ($job == "editsort" && $Apower[article_module]) {
    $rsdb = $db->get_one("SELECT * FROM {$pre}article_module WHERE id='{$id}'");
    $select_style = select_style('Info_style', $rsdb[style]);
    $array = unserialize($rsdb[config]);
    $listdb = $array[field_db];
    require "head.php";
    require "template/article_module/editsort.htm";
    require "foot.php";
} elseif ($job == "editmodule" && $Apower[article_module]) {
    $rsdb = $db->get_one("SELECT * FROM {$pre}article_module WHERE id='{$id}'");
    $array = unserialize($rsdb[config]);
    @extract($array[moduleSet]);
    $tpldb = $array[tpldb];
    $etypeDB[intval($etype)] = ' checked ';
    $morepageDB[intval($morepage)] = ' checked ';
    $no_authorDB[intval($no_author)] = ' checked ';
    $no_fromDB[intval($no_from)] = ' checked ';
    $no_fromurlDB[intval($no_fromurl)] = ' checked ';
Exemplo n.º 3
0
 $webdb[updir] = $webdb[updir] ? $webdb[updir] : $updir;
 $truepath = preg_replace("/(.+)\\/([^\\/]+)\\/([^\\/]+)/is", "\\1", $WEBURL);
 if ($webdb[truepath] != $truepath) {
     //echo "<CENTER>出错了!!!请正确修改程序所在目录为<font color=red>$truepath</font></CENTER><br><br><br><br>";
 }
 $webdb[truepath] || ($webdb[truepath] = $truepath);
 if (!function_exists("ImageJpeg") || !function_exists("imagegif")) {
     $gdmsg = '提示:当前系统检测到你的服务器不能全面的支持GD库生成水印缩略图,建议不要启用';
 } else {
     $gdmsg = '提示:当前系统检测到你的服务器基本可以支持GD库生成水印缩略图';
 }
 $max_upload = ini_get('file_uploads') ? ini_get('upload_max_filesize') : 'Disabled';
 //最大上传限制
 $rs = $db->get_one("SELECT * FROM {$pre}channel WHERE id=1");
 $select_indexstyle = select_style('index_style', $rs[style]);
 $select_style = select_style('webdbs[style]', $webdb[style]);
 $select_member_style = select_member_style('webdbs[style_member]', $webdb[style_member]);
 $NewsMakeHtml[$webdb[NewsMakeHtml]] = ' checked ';
 $webdb[UseMoneyType] == 'bbs' ? $UseMoneyType[bbs] = ' checked ' : ($UseMoneyType[cms] = ' checked ');
 if ($webdb[MakeIndexHtmlTime] > 0) {
     $ifmakeindexhtml[Y] = " checked ";
 } else {
     $ifmakeindexhtml[N] = " checked ";
 }
 $AutoPassCompany[intval($webdb[AutoPassCompany])] = ' checked ';
 $AutoCutFace[intval($webdb[AutoCutFace])] = ' checked ';
 $UserEmailAutoPass[intval($webdb[UserEmailAutoPass])] = ' checked ';
 $BbsUserAutoPass[intval($webdb[BbsUserAutoPass])] = ' checked ';
 $yzImgAdminLogin[$webdb[yzImgAdminLogin]] = " checked ";
 $Del_MoreUpfile[intval($webdb[Del_MoreUpfile])] = ' checked ';
 $DownLoad_readfile[intval($webdb[DownLoad_readfile])] = ' checked ';
Exemplo n.º 4
0
 //$group_viewtitle=group_box("postdb[allowviewtitle]",explode(",",$rsdb[allowviewtitle]));
 //$group_viewcontent=group_box("postdb[allowviewcontent]",explode(",",$rsdb[allowviewcontent]));
 //$group_download=group_box("postdb[allowdownload]",explode(",",$rsdb[allowdownload]));
 $typedb[$rsdb[type]] = " checked ";
 $index_show[$rsdb[index_show]] = " checked ";
 $forbidshow[intval($rsdb[forbidshow])] = " checked ";
 $allowcomment[intval($rsdb[allowcomment])] = " checked ";
 $ifcolor[intval($rsdb[ifcolor])] = " checked ";
 $listorder[$rsdb[listorder]] = " selected ";
 $tpl = unserialize($rsdb[template]);
 //if($db->get_one(" SELECT * FROM {$_pre}content WHERE fid='$fid' limit 1 ")){
 //	$moresons="none;";
 //}
 //$photo_fid=$Guidedb->Select("{$pre}sort","postdb[photo_fid]",$rsdb[photo_fid]);
 //$article_fid=$Guidedb->Select("{$pre}sort","postdb[article_fid]",$rsdb[article_fid]);
 $select_style = select_style('postdb[style]', $rsdb[style]);
 $array = unserialize($rsdb[config]);
 $_array = array_flip($array[is_html]);
 foreach ($array[field_db] as $key => $rs) {
     if (in_array($key, $_array)) {
         $array[field_value][$key] = En_TruePath($array[field_value][$key], 0);
     }
     $TempLate .= make_post_sort_table($rs, $array[field_value][$key]);
 }
 $fup_select = choose_sort(0, 0, $rsdb[fup]);
 if (!$rsdb[dir_name]) {
     require_once ROOT_PATH . "inc/pinyin.php";
     $rsdb[dir_name] = change2pinyin($rsdb[name], 0);
 }
 $rsdb[dir_name] = preg_replace("/(\\/|\\\\|-)/", "_", $rsdb[dir_name]);
 get_admin_html('editsort');
Exemplo n.º 5
0
    }
    if ($keywords && unlink(ROOT_PATH . "data/style/{$keywords}.php")) {
        del_file(ROOT_PATH . "images/{$keywords}/");
        del_file(ROOT_PATH . "template/{$keywords}/");
        jump("删除成功", "index.php?lfj=style&job=deletestyle");
    } else {
        showmsg("删除失败,请确认文件属性可写" . ROOT_PATH . "data/style/{$keywords}.php");
    }
} elseif ($job == "deletestyle" && $Apower[style_editstyle]) {
    $style_select = select_style('keywords');
    hack_admin_tpl('deletestyle');
} elseif ($job == 'edittpl' && ($Apower[style_editstyle] || $Apower[template_list])) {
    unset($array, $listdb);
    include "./tplname.php";
    $keywords || ($keywords = $STYLE);
    $style_select = select_style('keywords', $keywords, "index.php?lfj={$lfj}&job={$job}");
    $dir = opendir(ROOT_PATH . "template/{$keywords}/");
    while ($file = readdir($dir)) {
        if (eregi("htm\$", $file)) {
            $array[$file] = array("name" => $tplName[$file], "file" => $file);
        }
    }
    foreach ($tplName as $key => $value) {
        $array[$key] && ($listdb[$key] = $array[$key]);
    }
    $listdb = $listdb ? $listdb + $array : $array;
    hack_admin_tpl('tpl');
} elseif ($job == 'editcode' && ($Apower[style_editstyle] || $Apower[template_list])) {
    if (eregi(".php\$", $filename)) {
        showmsg("模板文件有误!");
    }