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

📄 root_board_ing.php

📁 php写的论坛,代码精简到极点 请相看说明文件。是从英文翻译过来的:)
💻 PHP
字号:
<?
//////////////////////////////////ready
include "connect.php";
include "lib.php";

//////////////////////////////////check
chk_level(1,0,"login.php?go=root.php");

////////////////////////////////////////////////////////////////////creation
if(!$mode){
if(!$new_board){error($error.'请输入讨论区名称');}
if($new_board=="board"){error($error.'这个名称不能使用');}
$new_board=trim($new_board);
chk_word($new_board,"&");
$tables=list_bd();
$total=count($tables);
for($i=0;$i<$total;$i++){
$board_name=str_replace("$board_table","",$tables[$i]);
if($board_name==$new_board){error($error.'已存在相同名称的讨论区');}
}
$t=bd($new_board);
include"naboard_schema.php";

////////////////////////////////////////////////////////////////////config copy
if($copy){
$copy=bd($copy);
$data=selects("$copy[config]","and no=1");
$value="
title='$data[title]',
skinname='$data[skinname]',
background_image='$data[background_image]',
background_color='$data[background_color]',
title_length='$data[title_length]',
name_length='$data[name_length]',
page='$data[page]',
pagenum='$data[pagenum]',
table_width='$data[table_width]',
width_kind='$data[width_kind]',
best='$data[best]',
show_list='$data[show_list]',
cat='$data[cat]',
cat_on='$data[cat_on]',

use_ban_word='$use_ban_word',
use_ban_ip='$use_ban_ip',
use_ban_server='$use_ban_server',
show_ip='$data[show_ip]',
use_ban_tag='$data[use_ban_tag]',

attach='$data[attach]',
attach_title='$data[attach_title]',
can_attach='$data[can_attach]',
cant_attach='$data[cant_attach]',
attach2='$data[attach]',
attach_title2='$data[attach_title]',
can_attach2='$data[can_attach]',
cant_attach2='$data[cant_attach]',
image_size='$data[image_size]',
link='$data[link]',
link2='$data[link2]',
top_url='$data[top_url]',
top='$data[top]',
bottom_url='$data[bottom_url]',
bottom='$data[bottom]',
default_text='$data[default_text]',
auth_list='$data[auth_list]',
auth_read='$data[auth_read]',
auth_write='$data[auth_write]',
auth_reply='$data[auth_reply]',
auth_comment='$data[auth_comment]',
auth='$data[auth]'";
edit("$t[config]","$value","no=1");
}
}

if($mode=="drop" || $mode=="del"){
$t=bd($bd);
//////////////////////////////////delete to take out if artice would appended
$query="select * from $t[board]";
$result=mysql_query($query,$connect);
while($article=mysql_fetch_array($result))
{
//////////////////////////////////delete appended file
if($article[attach_name]){
@unlink("file/$article[attach_dir]/$article[attach_name]");
@rmdir("file/$article[attach_dir]");
}
//////////////////////////////////delete appended file2
if($article[attach2_name]){
@unlink("file/$article[attach2_dir]/$article[attach2_name]");
@rmdir("file/$article[attach2_dir]");
}
}
}

////////////////////////////////////////////////////////////////////table delete
if($mode=="drop"){
drop("$t[board]");
drop("$t[com]");
drop("$t[cat]");
drop("$t[config]");
}

////////////////////////////////////////////////////////////////////Table evacuation
if($mode=="del"){
drop("$t[board]");
drop("$t[com]");
include"naboard_schema.php";
}

//////////////////////////////////move
mysql_close($connect);
go("root_board.php");
?>

⌨️ 快捷键说明

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