📄 admin_main_ing.php
字号:
<?
//////////////////////////////////ready
include"connect.php";
include"lib.php";
//////////////////////////////////administrator check
chk_admin($bd);
//////////////////////////////////table name making
$t=bd($bd);
//////////////////////////////////Category name Arrangement
$new_cat=trim($new_cat);
chk_word($new_cat,"&");
//////////////////////////////////To make category
if($action=="cat"){
chk_input("$t[cat]","name","$new_cat","${error}Already exist");
input("$t[cat]","name","'$new_cat'");
}
//////////////////////////////////Category delete
if($action=="cat_del"){
del("$t[cat]","no='$from'");
}
//////////////////////////////////Category name correction
if($action=="cat_edit"){
chk_input("$t[cat]","name","$new_cat","${error}Already exist");
edit("$t[cat]","name='$new_cat'","no='$from'");
}
//////////////////////////////////article move
if($action=="cat_move"){
if($from==$to){error($error.'不能移到根类别');}
edit("$t[board]","cat='$to'","cat='$from'");
}
////////////////////////////////////////////////////////////////////setting save
if($action=="default"){
//////////////////////////////////default value check
if($mode==0){
$title=trim($title);
$background_image=trim($background_image);
$background_color=trim($background_color);
$title_length=trim($title_length);chk_num($title_length,0,"${error}标题长度限制必须输入数值",0);
$name_length=trim($name_length);chk_num($name_length,0,"${error}名字长度限制必须输入数值",0);
$page=trim($page);chk_num($page,0,"${error}每页文章数必须输入数值",0);
$pagenum=trim($pagenum);chk_num($pagenum,0,"${error}文章列表页数限制必须输入数值",0);
$table_width=trim($table_width);chk_num($table_width,0,"${error}主页面宽度必须输入数值",0);
$best=trim($best);chk_num($best,0,"${error}Popular artice indication must be input in numbers",0);
$default_text=trim($default_text);
//////////////////////////////////default
$value="
title='$title',
skinname='$skinname',
background_image='$background_image',
background_color='$background_color',
title_length='$title_length',
name_length='$name_length',
page='$page',
pagenum='$pagenum',
table_width='$table_width',
width_kind='$width_kind',
best='$best',
show_list='$show_list',
default_text='$default_text'";}
//////////////////////////////////Competence establishment check
if($mode==1){
$auth=trim($auth);
//////////////////////////////////Competence establishment value
$value="
auth_list='$auth_list',
auth_read='$auth_read',
auth_write='$auth_write',
auth_reply='$auth_reply',
auth_comment='$auth_comment',
auth='$auth'";}
//////////////////////////////////Category establishment value
if($mode==2){$value="
cat='$cat',
cat_on='$cat_on'";}
//////////////////////////////////Security establishment value
if($mode==3){$value="
use_ban_tag='$use_ban_tag',
use_ban_word='$use_ban_word',
use_ban_ip='$use_ban_ip',
use_ban_server='$use_ban_server',
show_ip='$show_ip'";
//////////////////////////////////Total security establishment check
$ban_tag=trim($ban_tag);
$ban_word=trim($ban_word);
$ban_ip=trim($ban_ip);
$ban_server=trim($ban_server);
//////////////////////////////////Total security establishment value
if(!$ban_tag){$ban_tag="<none>";}
if(!$ban_word){$ban_word="<none>";}
if(!$ban_ip){$ban_ip="<none>";}
if(!$ban_server){$ban_server="<none>";}
$value2="
ban_tag='$ban_tag',
ban_word='$ban_word',
ban_ip='$ban_ip',
ban_server='$ban_server'";
//////////////////////////////////To put whole security establishment
edit("$security_table","$value2","no=1");
}
//////////////////////////////////Attachment establishment check
if($mode==4){
$attach_title=trim($attach_title);
$can_attach=trim($can_attach);
$cant_attach=trim($cant_attach);
$attach_title2=trim($attach_title2);
$can_attach2=trim($can_attach2);
$cant_attach2=trim($cant_attach2);
$image_size=trim($image_size);chk_num($image_size,0,"${error}图像预览宽度必须输入数值",0);
//////////////////////////////////Attachment establishment value
$value="
attach='$attach',
attach_title='$attach_title',
can_attach='$can_attach',
cant_attach='$cant_attach',
attach2='$attach2',
attach_title2='$attach_title2',
can_attach2='$can_attach2',
cant_attach2='$cant_attach2',
image_size='$image_size',
link='$link',
link2='$link2'";}
//////////////////////////////////include check
if($mode==5){
$top_url=trim($top_url);
$bottom_url=trim($bottom_url);
//////////////////////////////////include value
$value="
top_url='$top_url',
top='$top',
bottom_url='$bottom_url',
bottom='$bottom'";}
//////////////////////////////////Establishment alteration
edit("$t[config]","$value","no=1");
}
//////////////////////////////////move
mysql_close($connect);
go("admin_board.php?bd=$bd&mode=$next");
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -