This repository has been archived on 2026-06-20. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
wsh5485 7e47ce238b chore: 添加多个图片和资源文件
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
2025-06-15 13:04:37 +08:00

116 lines
3.2 KiB
PHP

<?php
error_reporting(E_ERROR | E_WARNING | E_PARSE);
date_default_timezone_set('Asia/Shanghai');
include "../admin/config.php";
include "../tmpl/config.php";
require THIS_FILE_ROOT."/include/function.php";
require THIS_FILE_ROOT."/include/db_mysql.php";
//require THIS_FILE_ROOT."/include/page.class.php";
//-------------------------------register global
$magic_quotes_gpc = get_magic_quotes_gpc();
$register_globals = @ini_get('register_globals');
if(!$register_globals || !$magic_quotes_gpc) {
@extract(daddslashes($_POST));
@extract(daddslashes($_GET));
}
$db=_mysql_connect();
if($_a=="do_sm"){
header("Content-type: text/html;charset=utf-8");
$str="n";
if($ewm){
$add_date=date("Y-m-d H:i:s");
//$ip="";
$q="insert into ".$table_pre."plugin_session_ewm (flag,ip,add_date) values ('','".$ewm."','".$add_date."');";
if($db->query($q))
$str="y";
}
echo $str;
$db->close();
exit;
}else if($_a=="check_ewm"){
header("Content-type: text/html;charset=utf-8");
$str="n";
//$q="select id from ".$table_pre."plugin_session_ewm where flag='".$ewm."';";
$q="select id from ".$table_pre."plugin_session_ewm where ip='".$ewm."';";
$m=get_db_msg($q);
if($m["id"]>0)
$str="y";
echo $str;
$db->close();
exit;
}
?>
<!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>
<link href="../admin/css/index.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../admin/js/function.js"></Script>
<script>
//ajax
function ajaxinit()
{
var xmlhttp;
try {
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp=false;
}
}
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {
xmlhttp=false;
}
}
if (!xmlhttp && window.createRequest) {
try {
xmlhttp = window.createRequest();
} catch (e) {
xmlhttp=false;
}
}
return xmlhttp;
}
function deel_sm(ewm,_t){
if(_t=="login"){
//ajax
var obj=document.getElementById("msg");
var xmlhttp=ajaxinit();
var url="sm.php?_a=do_sm&ewm="+ewm;
xmlhttp.open("POST",url,true);
xmlhttp.setRequestHeader("Cache-Control","no-cache");
xmlhttp.onreadystatechange=function(){
if(xmlhttp.readyState==4 && xmlhttp.status==200){
var str=xmlhttp.responseText;
obj.innerHTML="扫描中...";
if(str=="y"){
obj.innerHTML="扫描成功!("+ewm+")";
return false;
}else{
obj.innerHTML="出错了,请重新扫描!";
return false;
}
}
}
xmlhttp.send(null);
}
}
</script>
</head>
<body style="padding:6px;">
<div align='center' style='padding:100px;'>
<input type="button" value=" 扫 描 " onclick="window.location.href='protocol://ewm?_t=login';" style="font-size:20px;width:200px;height:50px;">
</div>
<div style='font-size:18px;color:red;font-weight:bold;' id='msg' align='center'></div>
</body>
</html>
<?php
$db->close();
?>