📄 job.php
字号:
<?php
if(empty($_SERVER['QUERY_STRING'])) header("Location: index.php");
/* 以下为管理页面相关 */
/* admin.php?job=indexbbs */
if(!empty($_GET['job']) && $_GET['job']==='indexbbs') {
if(!empty($_GET['showorder']) && $_GET['showorder']==='change') {
echo "<script language=\"javascript\">alert(\"排序成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=indexbbs&do=admin'>";
} elseif(!empty($_GET['edit']) && $_GET['edit']==='yes') {
echo "<script language=\"javascript\">alert(\"编辑成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=indexbbs&do=admin'>";
} elseif(!empty($_GET['add']) && $_GET['add']==='yes') {
echo "<script language=\"javascript\">alert(\"添加成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=indexbbs&do=admin'>";
} elseif(!empty($_GET['del']) && $_GET['del']==='yes') {
echo "<script language=\"javascript\">alert(\"删除成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=indexbbs&do=admin'>";
} elseif(!empty($_GET['set'])) {
if($_GET['set']==='success') {
echo "<script language=\"javascript\">alert(\"设置成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=indexbbs'>";
} else {
echo "<script language=\"javascript\">alert(\"设置失败!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=indexbbs'>";
}
}
}
/* admin.php?job=ads */
if(!empty($_GET['job']) && $_GET['job']==='ads') {
if(!empty($_GET['update'])) {
echo "<script language=\"javascript\">alert(\"广告位{$_GET['update']}编辑成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=ads#广告管理'>";
} elseif(!empty($_GET['del'])) {
echo "<script language=\"javascript\">alert(\"广告位{$_GET['del']}删除成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=ads#广告管理'>";
}
}
/* admin.php?job=news */
if(!empty($_GET['job']) && $_GET['job']==='news') {
if(!empty($_GET['edit']) && $_GET['edit']==='ok') {
echo "<script language=\"javascript\">alert(\"文章编辑成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url={$_COOKIE['u']}'>";
} elseif(!empty($_GET['del']) && $_GET['del']==='ok') {
echo "<script language=\"javascript\">alert(\"文章删除成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url={$_COOKIE['u']}'>";
}
if(!empty($_GET['add'])) {
if($_GET['add']==='null') {
echo "<script language=\"javascript\">alert(\"标题或文章内容为空!请填写!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=news'>";
} elseif($_GET['add']==='success') {
echo "<script language=\"javascript\">alert(\"文章添加成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=news'>";
} elseif($_GET['add']==='fail') {
echo "<script language=\"javascript\">alert(\"文章添加失败!请重试!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=news'>";
}
}
if(!empty($_GET['order']) && $_GET['order']==='success') {
echo "<script language=\"javascript\">alert(\"置顶排序操作成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=news'>";
}
}
/* admin.php?job=toppic */
if(!empty($_GET['job']) && $_GET['job']==='toppic') {
if(!empty($_GET['add'])) {
if($_GET['add']==='success') {
echo "<script language=\"javascript\">alert(\"图片文章添加成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=toppic'>";
} elseif($_GET['add']==='fail') {
echo "<script language=\"javascript\">alert(\"图片文章添加失败!请重试!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=toppic'>";
}
} elseif(!empty($_GET['order'])) {
echo "<script language=\"javascript\">alert(\"排序成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=toppic'>";
} elseif(!empty($_GET['edit'])) {
if($_GET['edit']==='success') {
echo "<script language=\"javascript\">alert(\"图片文章编辑成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=toppic'>";
} elseif($_GET['edit']==='fail') {
echo "<script language=\"javascript\">alert(\"图片文章编辑失败!请重试!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=toppic'>";
}
} elseif(!empty($_GET['del'])) {
if($_GET['del']==='success') {
echo "<script language=\"javascript\">alert(\"图片文章删除成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=toppic'>";
} elseif($_GET['del']==='fail') {
echo "<script language=\"javascript\">alert(\"图片文章删除失败!请重试!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=toppic'>";
}
}
}
/* admin.php?job=template */
if(!empty($_GET['job']) && $_GET['job']==='template') {
if(!empty($_GET['set'])) {
if($_GET['set']==='success') {
echo "<script language=\"javascript\">alert(\"默认模版设置成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=template'>";
} elseif($_GET['set']==='fail') {
echo "<script language=\"javascript\">alert(\"默认模版设置失败!请重试!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=toppic'>";
}
}
if(!empty($_GET['edit'])) {
if($_GET['edit']==='success') {
echo "<script language=\"javascript\">alert(\"默认编辑成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=template'>";
} elseif($_GET['edit']==='fail') {
echo "<script language=\"javascript\">alert(\"默认编辑失败!请重试!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=template'>";
}
}
if(!empty($_GET['add'])) {
if($_GET['add']==='success') {
echo "<script language=\"javascript\">alert(\"新模板添加成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=template'>";
} elseif($_GET['add']==='fail') {
echo "<script language=\"javascript\">alert(\"新模板添加失败!请重试!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=template'>";
}
}
}
/* admin.php?job=sort */
if(!empty($_GET['job']) && $_GET['job']==='sort') {
if(!empty($_GET['add'])) {
if($_GET['add']==='success') {
echo "<script language=\"javascript\">alert(\"新分类添加成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=sort'>";
} elseif($_GET['add']==='fail') {
echo "<script language=\"javascript\">alert(\"新分类添加失败!请重试!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=sort'>";
}
}
if(!empty($_GET['order'])) {
if($_GET['order']==='success') {
echo "<script language=\"javascript\">alert(\"分类排序成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=sort'>";
}
}
if(!empty($_GET['edit'])) {
if($_GET['edit']==='success') {
echo "<script language=\"javascript\">alert(\"分类编辑成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=sort'>";
} elseif($_GET['edit']==='fail') {
echo "<script language=\"javascript\">alert(\"分类编辑失败!请重试!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=sort'>";
}
}
if(!empty($_GET['del'])) {
if($_GET['del']==='success') {
echo "<script language=\"javascript\">alert(\"分类删除成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=sort'>";
} elseif($_GET['del']==='fail') {
echo "<script language=\"javascript\">alert(\"分类删除失败!请重试!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=sort'>";
}
}
}
/* admin.php?job=unitesort */
if(!empty($_GET['job']) && $_GET['job']==='unitesort') {
if(!empty($_GET['unite'])) {
if($_GET['unite']==='success') {
echo "<script language=\"javascript\">alert(\"分类合并成功!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=unitesort'>";
} elseif($_GET['unite']==='fail') {
echo "<script language=\"javascript\">alert(\"分类合并失败!请重试!\")</script>";
echo "<meta http-equiv='refresh' content='0;url=admin.php?job=unitesort'>";
}
}
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -