chore: 添加多个图片和资源文件
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
<?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);
|
||||
header("Content-type: text/html; charset=utf-8");
|
||||
|
||||
$db=new DB_Sql;
|
||||
$db->connect($dbhost,$dbuser,$dbpw,$dbname,"p");
|
||||
$arr_column_dm=array(
|
||||
"username"=>"客户代码",
|
||||
"usertitle"=>"客户名称",
|
||||
"dmtext"=>"内容"
|
||||
);
|
||||
$_a=$_GET["_a"];
|
||||
switch($_a){
|
||||
case "export_do":
|
||||
$num=count($arr_column_dm);
|
||||
$data=array();
|
||||
//设置表头数据类型
|
||||
for($i=0;$i<$num;$i++){
|
||||
$data["col"][]="str";
|
||||
}
|
||||
|
||||
//设置表头
|
||||
foreach($arr_column_dm as $k=>$v){
|
||||
$data["header"][0][]=$v;
|
||||
}
|
||||
|
||||
$query="select * from web_barrage order by id";
|
||||
$r=$db->query($query);
|
||||
$row=0;
|
||||
while($m=$db->fetch_array($r)){
|
||||
$tmp=get_db_msg("select * from web_client where id='".$m["uid"]."' limit 0,1");
|
||||
foreach($arr_column_dm as $k=>$v){
|
||||
if($k=="username"){
|
||||
$data["body"][$row][]=$tmp["username"];
|
||||
}else if($k=="usertitle"){
|
||||
$data["body"][$row][]=$tmp["title"];
|
||||
}else if($k=="dmtext"){
|
||||
$data["body"][$row][]=$m["value"];
|
||||
}
|
||||
}
|
||||
$row++;
|
||||
}
|
||||
$file_name="dm_export_".date("Y-m-d-H-i");
|
||||
output_excel($file_name,$data);
|
||||
break;
|
||||
default :
|
||||
echo '无效访问!';
|
||||
break;
|
||||
}
|
||||
$db->close();
|
||||
?>
|
||||
Reference in New Issue
Block a user