7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
102 lines
3.2 KiB
PHP
102 lines
3.2 KiB
PHP
<?php
|
|
//-------------------------------------------------------数据初始化
|
|
require "../config.php";
|
|
include "../../tmpl/config.php";
|
|
require THIS_FILE_ROOT."/include/function.php";
|
|
require THIS_FILE_ROOT."/include/db_mysql.php";
|
|
error_reporting(E_ERROR | E_WARNING | E_PARSE);
|
|
//-------------------------------mysql connect
|
|
$msg="";
|
|
$db=new DB_Sql;
|
|
$db->connect($dbhost,$dbuser,$dbpw,$dbname,"p");
|
|
$is_submit=$_POST["is_submit"];
|
|
$keep_client=$_POST["keep_client"]?$_POST["keep_client"]:"y";
|
|
if($is_submit=="y"){
|
|
if($keep_client=="n"){
|
|
$arr_table[]=$table_pre."client";
|
|
$arr_table[]=$table_pre."zk";
|
|
$arr_table[]=$table_pre."client_brand";
|
|
}
|
|
$arr_table[]=$table_pre."bb_log";
|
|
$arr_table[]=$table_pre."client_pj";
|
|
$arr_table[]=$table_pre."order";
|
|
$arr_table[]=$table_pre."order_state";
|
|
$arr_table[]=$table_pre."order_pm";
|
|
$arr_table[]=$table_pre."order_log";
|
|
$arr_table[]=$table_pre."kh";
|
|
$arr_table[]=$table_pre."kh_color";
|
|
$arr_table[]=$table_pre."gz";
|
|
$arr_table[]=$table_pre."kh_dp";
|
|
$arr_table[]=$table_pre."kh_cl";
|
|
$arr_table[]=$table_pre."kh_cc";
|
|
$arr_table[]=$table_pre."kh_gg";
|
|
$arr_table[]=$table_pre."kh_gg_title";
|
|
$arr_table[]=$table_pre."kh_md";
|
|
$arr_table[]=$table_pre."kh_xh";
|
|
$arr_table[]=$table_pre."kh_tb";
|
|
$arr_table[]=$table_pre."kh_ty";
|
|
$arr_table[]=$table_pre."kh_tb_t";
|
|
$arr_table[]=$table_pre."size_bx";
|
|
$arr_table[]=$table_pre."size_not";
|
|
$arr_table[]=$table_pre."size_pm";
|
|
$arr_table[]=$table_pre."sx";
|
|
$arr_table[]=$table_pre."ph";
|
|
$arr_table[]=$table_pre."ls_zb";
|
|
$arr_table[]=$table_pre."msg";
|
|
$arr_table[]=$table_pre."log";
|
|
$arr_table[]=$table_pre."log_hd";
|
|
for($i=0;$i<count($arr_table);$i++){
|
|
$q="truncate table ".$arr_table[$i].";";
|
|
//echo $q."<Br>";
|
|
$db->query($q);
|
|
}
|
|
$msg="<span style=\"color:#0000ff;font-weight:bold;\">数据初始化成功!</span>";
|
|
}
|
|
?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<title>数据初始化</title>
|
|
<style>
|
|
BODY{
|
|
font-family:宋体;FONT-SIZE:12px;margin:0px;padding:0px;
|
|
}
|
|
a,a:link,a:visited,a:active {
|
|
text-decoration:none;COLOR: #0000ff;FONT-SIZE:12px;
|
|
}
|
|
a:hover {
|
|
TEXT-DECORATION: underline;COLOR: #aaaa9f;FONT-SIZE:12px;
|
|
}
|
|
body,input,td,select,div,li,ul,textarea,form {
|
|
font-family:宋体;
|
|
FONT-SIZE:12px;
|
|
}
|
|
.wrong{
|
|
color:#ff0000;font-weight:bold;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<br />
|
|
<table width="80%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#cccccc">
|
|
<form name="form1" action="" method="post">
|
|
<input type="hidden" name="is_submit" value="y">
|
|
<tr>
|
|
<td align="center" bgcolor="#f0f0f0"><b>订货会数据初始化</b></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="left" bgcolor="#ffffff" style="line-height:25px;">保留客户资料:<?php echo get_main_radio(array("y"=>"是","n"=>"否"),"keep_client",$keep_client); ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" bgcolor="#f0f0f0"><input type="submit" value=" 提 交 "></td>
|
|
</tr>
|
|
<?php
|
|
if($msg){
|
|
echo "<tr><td align=\"left\" bgcolor=\"#ffffff\" valign=\"top\" style=\"line-height:150%;\">".$msg."</td></tr>";
|
|
}
|
|
?>
|
|
</form>
|
|
</table>
|
|
</body>
|
|
</html>
|