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

📄 repair.php

📁 程序安装简便容易
💻 PHP
字号:
<?php
!$_SERVER['PHP_SELF'] && $_SERVER['PHP_SELF']=$_SERVER['SCRIPT_NAME'];
substr($_SERVER['PHP_SELF'],-9,-4)!=='admin' && exit('Forbidden');

if(empty($_GET['do'])) {
	$tabledb=array(
		'duoxun_settings','duoxun_members','duoxun_links',
		'duoxun_templates','duoxun_sort','duoxun_upload',
		'duoxun_wordfb','duoxun_subject','duoxun_content',
		'duoxun_comment','duoxun_news','duoxun_toppic',
		'duoxun_bbs',
	);
	foreach($tabledb as $table) {
		$catedb[]=get_one("SHOW TABLE STATUS LIKE '$table'");
	}
} elseif($_GET['do']=='do') {
	$action=$_POST['action'];
	$tabledb=empty($_POST['tabledb']) ? $_POST['tabledb'] : 0;
	if(!$tabledb) {
		echo "<script language=\"javascript\">alert(\"没有选择操作对象!\")</script>";
		echo "<meta http-equiv='refresh' content='0;url=admin.php?job=repair'>";
		exit;
	}
	if($action=='repair') {
		$table=implode(',',$tabledb);
		$query=query("REPAIR TABLE $table EXTENDED");
		while($rs=fetch_array($query)){
			$rs['Table']=substr(strrchr($rs['Table'] ,'.'),1);
			$msgdb[]=$rs;
		}
	} elseif($action=='optimize') {
		$table=implode(',',$tabledb);
		$query=query("OPTIMIZE TABLE $table EXTENDED");
		while($rs=fetch_array($query)){
			$rs['Table']=substr(strrchr($rs['Table'] ,'.'),1);
			$msgdb[]=$rs;
		}
	}
}

require_once template('repair','admin');

?>

⌨️ 快捷键说明

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