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

325 lines
13 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?
//------------------------------------------投影,到色
define("THIS_FILE_ROOT",dirname(__FILE__));
define("THIS_IN","edt_ipad");
$flag_pad_offline="";
include "../tmpl/config.php";
require "../ipad/include/function.php";
require "../ipad/include/db_mysql.php";
error_reporting(E_ERROR | E_WARNING | E_PARSE);
date_default_timezone_set('Asia/Shanghai');
$ip=$_SERVER["REMOTE_ADDR"];
$http_root="http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
$http_root=str_replace("/index.php","",$http_root);
//-------------------------------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();
$page_size=$page_size?$page_size:20;
$s_time=$s_time?$s_time:3;
$s_refresh_time=$s_refresh_time?$s_refresh_time:30;
$s_reload_time=$s_reload_time?$s_reload_time:10;
$xh_ms=get_set("xh_ms");
if($s_time<=0 || $page_size<=0){
alert_and_back("请输入数字!");
}
$sql_qy="";
$url_var="s_time=".$s_time."&s_refresh_time=".$s_refresh_time."&page_size=".$page_size;
//取得排行款号
if($s_qy || $s_brand || $s_sxz || $s_series || $s_theme || $s_category || $s_category1 || $s_season || $s_bc){
$sql_con="where ";
if($s_qy){
$sql_con.="qy='".$s_qy."' and ";
$sql_qy.=" and qy='".$s_qy."'";
$url_var.="&s_qy=".$s_qy;
}
if($s_brand){
$sql_con.="brand='".$s_brand."' and ";
$url_var.="&s_brand=".$s_brand;
}
if($s_sxz){
$sql_con.="sxz='".$s_sxz."' and ";
$url_var.="&s_sxz=".$s_sxz;
}
if($s_series){
$sql_con.="series='".$s_series."' and ";
$url_var.="&s_series=".$s_series;
}
if($s_theme){
$sql_con.="theme='".$s_theme."' and ";
$url_var.="&s_theme=".$s_theme;
}
if($s_category){
$sql_con.="category='".$s_category."' and ";
$url_var.="&s_category=".$s_category;
}
if($s_category1){
$sql_con.="category1='".$s_category1."' and ";
$url_var.="&s_category1=".$s_category1;
}
if($s_bc){
$sql_con.="bc='".$s_bc."' and ";
$url_var.="&s_bc=".$s_bc;
}
$sql_con=substr($sql_con,0,-4);
}
$q="select sum(num) 'num',sum(je) 'je',iid 'id',color from ".$table_pre."order ".$sql_con." group by iid,color order by num desc limit 0,".$page_size;
$r=$db->query($q);
$i=1;
$content=$content_div=array();
while($m=$db->fetch_array($r)){
$m_kh=get_db_msg("select * from ".$table_pre."kh where id='".$m["id"]."'");
$xh=get_kh_xh($m_kh,$m["color"]);
$content[$i][]=$xh;
$content[$i][]=$m_kh["no"];
$content[$i][]=$m["color"]."-".get_cate_title_no("color",$m["color"]);
$content[$i][]=get_cate_title_no("bc",$m_kh["bc"]);
$content[$i][]=get_cate_title_no("category",$m_kh["category"]);
//取得下单客户量
$m_num_client=get_db_msg("select count(distinct uid) 'num' from ".$table_pre."order where iid='".$m_kh["id"]."'".$sql_qy);
//
//取得定制选项
$select_dz=array();
$q1="select no,title from ".$table_pre."keyword where cate='arr_select' and flag_ka='y' and no<>'jgd' and no<>'sx' and no<>'color' order by ord";
$r1=$db->query($q1);
$j=0;
while($m1=$db->fetch_array($r1)){
$select_dz[$j][0]=$m1["title"]."";
$select_dz[$j][1]=get_cate_title_no($m1["no"],$m_kh[$m1["no"]]);
$j++;
}
$dzHTML = '';
$dzCount = 0;
for($k=0;$k<ceil(count($select_dz)/2);$k++){
$dzHTML.="<div><span>".$select_dz[$k*2][0]."</span><span>".$select_dz[$k*2][1]."</span></div>";
if ($select_dz[$k*2][0]) $dzCount++;
$dzHTML.="<div><span>".$select_dz[$k*2+1][0]."</span><span>".$select_dz[$k*2+1][1]."</span></div>";
if ($select_dz[$k*2+1][0]) $dzCount++;
}
//
$pic=get_kh_picture_big($m_kh["no"],$m_kh["main_pic"],$m_kh["color"]);
$content_div[$i]="
<div id=\"div_".$i."\" style=\"display:none; width: 100%; height: 100%;\">
<div style=\"width: 50%;\">
<div style=\"background: white; text-align: center; width: calc(80% - 32px); margin: 32px auto; padding: 16px; max-width: 200px; border-radius: 12px;\">
<span style=\"display: block; font-size: 30px;\">NO.".$i."</span>
<span style=\"display: block; font-size: 20px;\">第".$i."名</span>
</div>
<div style=\"background: white; text-align: left; width: calc(80% - 32px); margin: 32px auto; padding: 16px; max-width: 200px; border-radius: 12px;\">
<div><span>款号:</span><span>".$m_kh["no"]."</span></div>
<div><span>序号:</span><span>".get_kh_xh($m_kh)."</span></div>
".$dzHTML."
<div><span>款式名:</span><span>".$m_kh["title"]."</span></div>
<div><span>下单客户:</span><span>".$m_num_client["num"]."个</span></div>
</div>
</div>
<div style=\"width: 50%; position: relative;\">
<div style=\"text-align: center; width: calc(80% - 32px); height: ".(($dzCount+4)*22+16*2+102+32-54)."px; padding-top: 54px; background: white; overflow: hidden; margin: 32px auto; border-radius: 12px;\">".out_good_pic($pic,280,300)."</div>
</div>
</div>";
$i++;
}
$num2=count($content)>20?count($content):20;
?>
<!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" />
<meta http-equiv="refresh" content="<?php echo $s_refresh_time*60; ?>;url=<?php echo $http_root."?".$url_var; ?>" />
<title>排行榜</title>
<style>
.tab_hlight{
background-color:#cccccc;border:1px solid #000000;font-weight:bold;
}
.tab_normal{
background-color:#ffffff;border:1px solid #000000;font-weight:normal;
}
.list_th{
font-size:18px;font-weight:bold;height:30px;
}
.list_td{
font-size:18px;height:25px;
}
.list_hlight{
background-color:#cccccc;
}
.list_normal{
background-color: white;
}
.arrow_hlight{
background-color:#cccccc;
}
.arrow_normal{
background-color:#f0f0f0;
}
</style>
<script>
var l=1;
var num=<?php echo count($content); ?>;
function dhlight(i1){
var obj_list={},obj_div={},obj_arrow={};
for(var i=1;i<=num;i++){
obj_list=document.getElementById("list_"+i);
obj_div=document.getElementById("div_"+i);
obj_arrow=document.getElementById("arrow_"+i);
if(i==i1){
obj_div.style.display="flex";
obj_list.className="list_hlight";
obj_arrow.className="arrow_hlight";
}else{
obj_div.style.display="none";
obj_list.className="list_normal";
obj_arrow.className="arrow_normal";
}
}
l=i1;
}
function dauto(){
dhlight(l);
if(l==num)
l=1;
else
l++;
window.setTimeout('dauto()',<?php echo $s_time*1000; ?>);
}
function sub_ph(){
var f=document.s;
var f1=window.parent.document.s1;
if(f.s_qy){
var s_qy=f.s_qy.options[f.s_qy.selectedIndex].value;
f1.s_qy.value=s_qy;
}
if(f.s_brand){
var s_brand=f.s_brand.options[f.s_brand.selectedIndex].value;
f1.s_brand.value=s_brand;
}
if(f.s_gender){
var s_gender=f.s_gender.options[f.s_gender.selectedIndex].value;
f1.s_gender.value=s_gender;
}
if(f.s_sxz){
var s_sxz=f.s_sxz.options[f.s_sxz.selectedIndex].value;
f1.s_sxz.value=s_sxz;
}
if(f.s_series){
var s_series=f.s_series.options[f.s_series.selectedIndex].value;
f1.s_series.value=s_series;
}
if(f.s_theme){
var s_theme=f.s_theme.options[f.s_theme.selectedIndex].value;
f1.s_theme.value=s_theme;
}
if(f.s_season){
var s_season=f.s_season.options[f.s_season.selectedIndex].value;
f1.s_season.value=s_season;
}
if(f.s_bc){
var s_bc=f.s_bc.options[f.s_bc.selectedIndex].value;
f1.s_bc.value=s_bc;
}
if(f.s_category){
var s_category=f.s_category.options[f.s_category.selectedIndex].value;
f1.s_category.value=s_category;
}
if(f.s_category1){
var s_category1=f.s_category1.options[f.s_category1.selectedIndex].value;
f1.s_category1.value=s_category1;
}
f1.s_time.value=f.s_time.value;
f1.page_size.value=f.page_size.value;
return true;
}
</script>
</head>
<body style="padding:0;margin:0; background: white;" onload="dauto();">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td style="width: 40%;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="40" align="center" class="list_th">排名</td>
<td width="80" align="center" class="list_th">序号</td>
<td width="80" align="center" class="list_th">款号</td>
<td align="center" class="list_th">颜色</td>
<td align="center" class="list_th"><?php echo get_cate_title_no("arr_select","bc"); ?></td>
<td align="center" class="list_th"><?php echo get_cate_title_no("arr_select","category"); ?></td>
<td height="25">&nbsp;</td>
</tr>
<?
for($i=1;$i<=$num2;$i++){
if($content[$i][0]){ ?>
<tr id="list_<?php echo $i; ?>" onclick="dhlight(<?php echo $i; ?>)" style="cursor:pointor;" class="list_normal">
<td align="center" class="list"><?php echo $i; ?></td>
<td class="list_td" align="center" ><?php echo $content[$i][0] ?></td>
<td class="list_td" align="center" ><?php echo $content[$i][1] ?></td>
<td class="list_td" align="center" ><?php echo $content[$i][2] ?></td>
<td class="list_td" align="center" ><?php echo $content[$i][3] ?></td>
<td class="list_td" align="center" ><?php echo $content[$i][4] ?></td>
<td class="list_td" id="arrow_<?php echo $i; ?>" class="arrow_normal">&nbsp;</td>
</tr>
<?php }else{ ?>
<tr style="cursor:pointor;" class="list_normal">
<td align="center" class="list">&nbsp;</td>
<td class="list_td">&nbsp;</td>
<td class="list_td">&nbsp;</td>
<td class="list_td">&nbsp;</td>
<td class="list_td">&nbsp;</td>
<td class="list_td">&nbsp;</td>
<td class="list_td" class="arrow_normal">&nbsp;</td>
</tr>
<?php } } ?>
</table></td><td style="background-image: url(ty_right.jpg); background-repeat: no-repeat; width: 60%;">
<?php
for($i=1;$i<=count($content_div);$i++){
echo $content_div[$i];
}
?></td>
</tr>
</table></td>
</tr>
<tr>
<form name="s" action="<?php echo $_SERVER[PHP_SELF]; ?>" method="post" onsubmit="return sub_ph();">
<td><table border="0" cellspacing="2" cellpadding="1"><tr>
<?php
//区域条件
$check=get_db_msg("select count(*) 'num' from ".$table_pre."client where face='9'");
if($check["num"]>0){
echo "<td><select name=\"s_qy\" style=\"width:80px;height:29px;\" onchange=\"do_s();\"><option value=''>-区域-</option>";
$q="select id,title from ".$table_pre."client where face='9' order by id";
$r=$db->query($q);
while($m=$db->fetch_array($r)){
echo "<option value=\"".$m["id"]."\"";
if($m["id"]==$s_qy)
echo " selected";
echo ">".$m["title"]."</option>";
}
}
?>
<?php if(check_arr_select_show("brand")){ ?>
<td><select name="s_brand" style="width:80px;height:29px;" onchange="do_s();"><option value=''>-<?php echo get_cate_title_no("arr_select","brand"); ?>-</option><?php echo op_select_cate2("brand",$s_brand); ?></select></td>
<?php } ?>
<?php if(check_arr_select_show("sxz")){ ?>
<td><select name="s_sxz" style="width:80px;height:29px;" onchange="do_s();"><option value=''>-<?php echo get_cate_title_no("arr_select","sxz"); ?>-</option><?php echo op_select_cate2("sxz",$s_sxz); ?></select></td>
<?php } ?>
<?php if(check_arr_select_show("series")){ ?>
<td><select name="s_series" style="width:80px;height:29px;" onchange="do_s();"><option value=''>-<?php echo get_cate_title_no("arr_select","series"); ?>-</option><?php echo op_select_cate2("series",$s_series); ?></select></td>
<?php } ?>
<?php if(check_arr_select_show("theme")){ ?>
<td><select name="s_theme" style="width:80px;height:29px;" onchange="do_s();"><option value=''>-<?php echo get_cate_title_no("arr_select","theme"); ?>-</option><?php echo op_select_cate2("theme",$s_theme); ?></select></td>
<?php } ?>
<?php if(check_arr_select_show("season")){ ?>
<td><select name="s_season" style="width:80px;height:29px;" onchange="do_s();"><option value=''>-<?php echo get_cate_title_no("arr_select","season"); ?>-</option><?php echo op_select_cate2("season",$s_season); ?></select></td>
<?php } ?>
<td><select name="s_bc" style="width:80px;height:29px;" onchange="do_s();"><option value=''>-<?php echo get_cate_title_no("arr_select","bc"); ?>-</option><?php echo op_select_cate2("bc",$s_bc); ?></select></td>
<td><select name="s_category" style="width:80px;height:29px;" onchange="do_s();"><option value=''>-<?php echo get_cate_title_no("arr_select","category"); ?>-</option><?php echo op_select_cate2("category",$s_category); ?></select></td>
<td>滚动间隔<input type="text" name="s_time" value="<?php echo $s_time; ?>" style="width:20px;">秒 刷新时间<input type="text" name="s_refresh_time" value="<?php echo $s_refresh_time; ?>" style="width:20px;">分钟 显示前<input type="text" name="page_size" value="<?php echo $page_size; ?>" style="width:20px;">名</td>
<td><input type="submit" value=" 执 行 "></td>
</tr></table></td>
</tr>
</form>
</table>
</body>
</html>