⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 post.php

📁 1.增加了近40项后台核心设置
💻 PHP
字号:
<?php
require_once './global.php';
require_once R_P.'header.php';
$thisurl = "post.php?n_opt=".$n_opt."&l_opt=".$lid;
$rootindex['postlen'] or msg('siteban','index.php');
if($name){
   $author or msg("post_nouser",$thisurl);
   $lid or msg("post_nolid",$thisurl);
   $content or msg("post_nocont",$thisurl);
   if($rootindex['postlen']!=1){
      strlen($content) > $rootindex['postlen'] && msg("post_contlen",$thisurl);
   }
   $name = str_replace('\"','',$name);
   $query = $db->getone("SELECT wid FROM xydw_art WHERE name='$name'") ? msg("post_repeat",$thisurl) : '';
   $good = "1";
   $rootindex['post'] ? $xianshi = 0 : $xianshi = 1;
   $query = $db->query("INSERT INTO  xydw_art SET name='$name',color='$color',author='$author',laiyuan='$laiyuan',content='$content',lid='$lid',date='$timestamp',visit='1',good='$good',html='$html',ubb='$ubb',last='$timestamp',zhuanti='$zhuanti',xianshi='$xianshi'");
   if($query){
      msg('');

   }
}
if($lid) {
    $n_opt = $lanmuindex[$lid][kind];
}
foreach($lanmuindexa as $lanmuak){
        $lanmuak == $n_opt ? $selected=" selected" : $selected="";
        $bopt .= "<option value='$lanmuak'$selected>{$lanmuindex[$lanmuak][name]}</option>";
}
if($n_opt){
   foreach($lanmuindexb[$n_opt] as $lanmubk){
          $selected = "";
          if($lanmubk == $l_opt || $lanmubk == $lid) $selected = " selected";
          $optdbs .= "<option value='$lanmubk'{$selected}>{$lanmuindex[$lanmubk][name]}</option>";
   }
} else $optdbs="<option value=''>请选择大分类</option>";
//select fenlei
$onecount = 0;
foreach($lanmuindex as $lanmuk => $lanmus){
     $lanmuindex[$lanmuk][kind] && $allopt .= "<img src='images/$imgpath/i6.gif'>[{$lanmuindex[$lanmuindex[$lanmuk][kind]][name]}] <a href=post.php?lid=$lanmuk>{$lanmuindex[$lanmuk][name]}</a><br>\n";
     if($lanmus[type] == 2){
     $subcat .= "subcat[$onecount] = new Array(\"$lanmus[name]\",\"$lanmus[kind]\",\"$lanmuk\");";
     $onecount++;
     }
}
$fenlei_js ="<script language=\"JavaScript\">
var onecount;
onecount=0;
subcat = new Array();
$subcat
onecount=$onecount;
function changelocation(locationid)
{
document.FORM.lid.length = 0;

var locationid=locationid;
var i;
for (i=0;i< onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.FORM.lid.options[document.FORM.lid.length] = new Option(subcat[i][0], subcat[i][2]);
}
}

}
</script>";
include_once R_P."data/cache/zhuanti.php";
foreach($ztindex as $ztk => $zts){
     $ztopt .= "<option value='$ztk'";
     $zhuanti == $ztk && $ztopt .= " selected";
     $ztopt .= ">$zts</option>";
}

if($postmode){
   $postmode == 1 && $rootindex[htmlonline] = 1;
   $postmode == 2 && $rootindex[htmlonline] = 0;
}
$rootindex['htmlonline'] or $ubbcheck = " checked";
include_once temp('post');
include_once 'footer.php';


?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -