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
EDT/pc/template/manage_add_kh.php
T
wsh5485 7e47ce238b chore: 添加多个图片和资源文件
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
2025-06-15 13:04:37 +08:00

226 lines
9.2 KiB
PHP
Raw 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.
<!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><?php echo $_title_; ?></title>
<link href="css/index.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="js/function.js"></Script>
<script language="javascript" src="js/My97DatePicker/WdatePicker.js"></Script>
<script>
function ok(){
obj=document.form1;
if(obj.no.value==''){
alert('请输入款号!');
obj.no.focus();
return false;
}
return true;
}
//
function dshow_img(){
var url=document.form1.up_image.value;
var opt='<?php echo $image_file_type; ?>';
var obj=document.getElementById("img_container");
if(IsExt(url,opt)){
obj.innerHTML='';
obj.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src=url;
obj.style.width="110px";
obj.style.height="150px";
}else{
alert("Wrong file tpye!("+opt+")");
}
}
//
function dshow_img1(id){
var url=document.getElementById("up_image"+id).value;
var opt='<?php echo $image_file_type; ?>';
var obj=document.getElementById("img_container"+id);
if(IsExt(url,opt)){
obj.innerHTML="";
//alert(url);
obj.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src=url;
obj.style.width="54px";
obj.style.height="74px";
}else{
alert("Wrong file tpye!("+opt+")");
}
}
//
function change_size(i){
var obj=document.getElementById("div_size");
var size_str=html_str="";
var bx_sizegroup_id="<?php echo $bx_sizegroup_id; ?>";
if(i==bx_sizegroup_id){
<?php
$str_bx1="";
for($i1=1;$i1<=count($arr_bx);$i1++){
$str_bx1.=$i1.",";
}
$str_bx1=substr($str_bx1,0,-1);
$str_bx2=arr_to_str($arr_bx);
echo "var str_bx1=\"".$str_bx1."\";\n";
echo "var str_bx2=\"".$str_bx2."\";\n";
$tmp=get_db_msg("select count(*) 'num' from ".$table_pre."size where iid='".$bx_sizegroup_id."'");
?>
var arr_bx1=str_bx1.split(",");
var arr_bx2=str_bx2.split(",");
for(var j=0;j<arr_bx1.length;j++){
html_str+="<br><input type=\"checkbox\" name=\"bx\" id=\"toggle_"+arr_bx1[j]+"\" onclick=\"check_all(<?php echo $tmp["num"]; ?>,"+arr_bx1[j]+")\" checked><label for=\"toggle_"+arr_bx1[j]+"\">"+arr_bx2[j]+"</label>";
<?php
$r1=$db->query("select * from ".$table_pre."size where iid='".$bx_sizegroup_id."' order by no");
$str="";
$i=1;
while($m1=$db->fetch_array($r1)){
echo "html_str+=\"<input type='checkbox' name='size_bx_\"+arr_bx1[j]+\"[]' id='cb_\"+arr_bx1[j]+\"_".$i."' value='".$m1["no"]."' checked><label for='s_\"+i+\"'>".$m1["title"]."</label>\";\n";
$i++;
}
?>
}
//文胸
}else{
switch(i){
<?php
$r=$db->query("select * from ".$table_pre."keyword where cate='size' order by ord");
while($m=$db->fetch_array($r)){
echo "case \"".$m["id"]."\":\n";
$r1=$db->query("select * from ".$table_pre."size where iid='".$m[id]."' order by no");
$str="";
while($m1=$db->fetch_array($r1)){
$str.=$m1["no"]."|".$m1["title"].",";
}
if($str)
$str=substr($str,0,-1);
echo "size_str=\"".$str."\";\n";
echo "break;\n";
}
?>
}
var size_arr=size_str.split(",");
var arr_tmp=[];
for(var i=0;i<size_arr.length;i++){
arr_tmp=size_arr[i].split("|");
html_str+="<input type=\"checkbox\" name=\"size[]\" id=\"s_"+i+"\" value=\""+arr_tmp[0]+"\" checked><label for=\"s_"+i+"\">"+arr_tmp[1]+"</label>";
}
}
obj.innerHTML=html_str;
}
//
function preview_dp_pic(){
var obj=document.getElementById("dp_pic");
if(obj.value){
o_window('?_m=manage/dp_pic_preview&_v='+obj.value,'dp_pic','650','600');
}else{
alert("请输入图片名称!");
}
}
</script>
</head>
<body>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><?php include "inc.top.php"; ?></td>
</tr>
<tr>
<td class="nav">您的位置:<?php echo $_nav_; ?></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="160" style="padding-right:8px;" valign="top"><?php include "inc.menu.php"; ?></td>
<td valign="top"><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#cccccc">
<form action="<?php echo $_SERVER[PHP_SELF] ?>" method="post" enctype="multipart/form-data" name="form1" onsubmit="return ok()">
<input type="hidden" name="_m" value="<?php echo $_m; ?>">
<input type="hidden" name="_cid" value="<?php echo $_cid; ?>">
<?php
if(is_array($form_hidden)){
foreach ($form_hidden as $key => $value){
echo "<input type=hidden name=\"".$key."\" value=\"".$value."\">\n";
}
}
?>
<?php if(is_array($add_pic)){ ?>
<tr>
<td align="right" bgcolor="#FFFFFF" style="width:80px;">图片</td><td colspan="3" align="center" valign="middle" bgcolor="#FFFFFF"><table border="0" cellspacing="1" cellpadding="3" bgcolor="#ffffff">
<tr>
<?php for($i=0;$i<ceil(count($add_pic)/5);$i++){
echo "<tr>";
for($j=0;$j<5;$j++){
echo "<td align=\"center\" valign=\"middle\">".$add_pic[$i*5+$j]."</td>";
}
echo "</tr>";
}
?>
</table></td>
</tr>
<?php } ?>
<tr>
<td width="80" height="22" align="right" bgcolor="#FFFFFF" style="width:80px;">序号</td>
<td align="left" bgcolor="#FFFFFF"><input type="text" name="xh" value="<?php echo $xh; ?>" style="width:30px" /></td>
<td align="right" bgcolor="#FFFFFF">被删除款</td>
<td align="left" bgcolor="#FFFFFF">
<?php echo get_main_value(array("n"=>"否","y"=>"是"),$msg["ka"]); ?>
</td>
</tr>
<?php for($i=0;$i<ceil(count($select_dz)/2);$i++){ ?>
<tr>
<td height="22" align="right" bgcolor="#FFFFFF"><?php echo $select_dz[$i*2][0]; ?></td>
<td align="left" bgcolor="#FFFFFF"><?php echo $select_dz[$i*2][1]; ?></td>
<td align="right" bgcolor="#FFFFFF"><?php echo $select_dz[$i*2+1][0]; ?></td>
<td align="left" bgcolor="#FFFFFF"><?php echo $select_dz[$i*2+1][1]; ?></td>
</tr>
<?php } ?>
<tr>
<td height="22" align="right" bgcolor="#FFFFFF">款号:</td>
<td align="left" bgcolor="#FFFFFF"><input type="text" name="no" value="<?php echo $msg["no"] ?>" style="width:200px" />
*</td>
<td align="right" bgcolor="#FFFFFF">款式名:</td>
<td width="315" align="left" bgcolor="#FFFFFF"><input type="text" name="title" value="<?php echo $msg["title"] ?>" style="width:200px" /></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#FFFFFF">颜色:</td>
<td colspan="3" align="left" bgcolor="#FFFFFF"><input type="text" name="color" id="color" value="<?php echo show_color($msg["color"]); ?>" style="width:400px" readonly /> <input type="button" value="选取" onclick="o_window('?_m=manage/pick&cate=color&value='+document.form1.color.value,'pick_color',500,300)" />
<input type="button" value="清空" onclick="document.form1.color.value='';" /></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#FFFFFF">尺码:</td>
<td colspan="3" align="left" bgcolor="#FFFFFF"><?php echo $select_size; ?></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#FFFFFF">价格:</td>
<td align="left" bgcolor="#FFFFFF">吊牌价<input type="text" name="price" value="<?php echo $msg["price"] ?>" style="width:50px" />元<?php if($zk_type=="kh") echo " / 结算价<input type=\"text\" name=\"price_zk\" value=\"".$msg["price_zk"]."\" style=\"width:50px\" />元"; ?></td>
<td width="80" align="right" bgcolor="#FFFFFF">起订量:</td>
<td width="315" align="left" bgcolor="#FFFFFF"><input type="text" name="bd" value="<?php echo $msg["bd"]; ?>" style="width:40px" />件</td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#FFFFFF">备注:</td>
<td align="left" bgcolor="#FFFFFF"><textarea rows="3" name="remark" style="width:230px"><?php echo $msg["remark"]; ?></textarea></td>
<td width="80" align="right" bgcolor="#FFFFFF">&nbsp;</td>
<td width="315" align="left" bgcolor="#FFFFFF">&nbsp;</td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#FFFFFF">添加时间:</td>
<td align="left" bgcolor="#FFFFFF"><input type="text" name="add_date" value="<?php echo $add_date; ?>" style="width:140px" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly="readonly" /></td>
<td width="80" align="right" bgcolor="#FFFFFF">饰品款:</td>
<td width="315" align="left" bgcolor="#FFFFFF"><select name="is_sp">
<?php echo get_main_op(array("n"=>"否","y"=>"是"),$msg["is_sp"]); ?>
</select></td>
</tr>
<?php for($i=0;$i<count($select_dz_zd);$i++){ ?>
<tr>
<td height="22" align="right" bgcolor="#FFFFFF"><?php echo $select_dz_zd[$i][0]; ?></td>
<td align="left" bgcolor="#FFFFFF" colspan="3"><?php echo $select_dz_zd[$i][1]; ?></td>
</tr>
<?php } ?>
<tr>
<td height="30" colspan="4" align="left" bgcolor="#FFFFFF"><input type="submit" name="s1" value="保 存"> <input type="reset" name="r1" value="重 置"> <input type="button" name="b1" value="返 回" onclick="history.back();"></td>
</tr></form>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php include "inc.bottom.php"; ?></td>
</tr>
</table>
</body>
</html>