?? add2.asp
字號(hào):
<%if session("shopxpadmin")="" then
response.Write "<script language='javascript'>alert('網(wǎng)絡(luò)超時(shí)或您還沒有登陸!');window.location.href='login.asp';</script>"
response.End
else
if session("flag")>1 then
response.Write "<p align=center><font color=red>您沒有此項(xiàng)目管理權(quán)限!</font></p>"
response.End
end if
end if%>
<!--#include file="conn.asp"-->
<%
session("id")=Request("id")
t_id1=session("id")
%>
<html>
<head>
<title>添加新商品</title>
<script language=javascript >
function check_input()
{
if (ffm.gname.value=="")
{ alert("請(qǐng)輸入商品名");
ffm.gname.focus();
return false;
}
if (ffm.mprice.value=="")
{ alert("請(qǐng)輸入市場(chǎng)價(jià)");
ffm.mprice.focus();
return false;
}
if (ffm.leprice.value=="")
{ alert("請(qǐng)輸入263商城價(jià)");
ffm.leprice.focus();
return false;
}
if (ffm.num.value=="")
{ alert("請(qǐng)輸入數(shù)量");
ffm.num.focus();
return false;
}
return true;
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../img/css.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
<div align="center">
<p><br>
<a href="index.asp">>>返回電話訂單主頁(yè)面</a>
<a href="add.asp?add=x&id=<%=Request("id")%>">>>修改客戶信息</a>
<br>
</p>
</div>
<table width="96%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td height="207" valign="top" width="10%"> <form name="ffm" method="POST" action=? onSubmit="return check_input()">
<table bgcolor=#CCCCCC border=0 cellpadding=3 cellspacing=1
width="98%" align="center" class="9bang">
<tr bgcolor="#FFFFFF">
<td colspan="5" class="008c5e"> <div align="center">新增商品 (帶<font color="#FF0000"><b>*</b></font>為必填項(xiàng))
</div></td>
</tr>
<tbody>
<tr bgcolor="#f1f1f1">
<td width=37% class="008c5e">
<div align="center">商品名稱</div></td>
<td width=22% class="008c5e">
<div align="center">市場(chǎng)價(jià)格</div></td>
<td width=20% class="008c5e">
<div align="center">會(huì)員價(jià)格</div></td>
<td width=12% class="008c5e">
<div align="center">數(shù)量</div></td>
<td width=9% class="008c5e"> </td>
</tr>
<tr>
<td bgcolor=#FFFFFF width=37% class="008c5e" height="18"> <div align="center">
<font color="#FF0000"><b>
<input name="id" type="hidden" id="id" value="<%=Request("id")%>">
*</b></font>
<input name="gname" type="text" class="wenbenkuang" size="15">
</div></td>
<td bgcolor=#ffffff width=22% class="008c5e" height="18"> <div align="center">
<font color="#FF0000"><b>*</b></font>
<input name="mprice" type="text" class="wenbenkuang" size="15">
</div></td>
<td bgcolor=#ffffff width=20% class="008c5e" height="18"> <div align="center">
<font color="#FF0000"><b>*</b></font>
<input name="leprice" type="text" class="wenbenkuang" size="15">
</div></td>
<td bgcolor=#ffffff width=12% class="008c5e" height="18"> <div align="center">
<font color="#FF0000"><b>*</b></font>
<input name="num" type="text" class="wenbenkuang" size="6">
</div></td>
<td bgcolor=#ffffff width=9% class="008c5e" height="18"> <div align="center">
<input name="Submit" type="submit" class="go-wenbenkuang" value="提交">
</div></td>
</tr>
</tbody>
</table>
<br>
<% gname1=request("gname")
mprice=request("mprice")
leprice=request("leprice")
num=request("num")
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from telorder_goods where t_id="&t_id1&" and gname='"&gname1&"'"
rs.open sql,conn,1,3
if rs.eof and gname1<>"" then
rs.addnew
rs("t_id")=t_id1
rs("gname")=gname1
rs("mprice")=mprice
rs("leprice")=leprice
rs("num")=num
rs.update
else
rs.close
set rs=nothing
end if
%>
<table bgcolor=#CCCCCC border=0 cellpadding=3 cellspacing=1
width="98%" align="center" class="9bang">
<%set rs = conn.execute("select * from telorder_goods where t_id="&t_id1&"")
if not rs.eof then %>
<tr bgcolor="#FFFFFF">
<td colspan="5" class="008c5e"> <div align="center">購(gòu)物車內(nèi)商品列表</div></td>
</tr>
<tbody>
<tr bgcolor="#f1f1f1">
<td width=37% height="17" class="008c5e">
<div align="center">商品名稱</div></td>
<td width=23% height="17" class="008c5e">
<div align="center">市場(chǎng)價(jià)格</div></td>
<td width=19% height="17" class="008c5e">
<div align="center">會(huì)員價(jià)格</div></td>
<td width=12% height="17" class="008c5e">
<div align="center">數(shù)量</div></td>
<td width=9% height="17" class="008c5e">
<div align="center">刪除</div></td>
</tr>
<%
While NOT rs.EOF
%>
<tr>
<td bgcolor=#FFFFFF width=37% class="008c5e" height="18"> <div align="center"><%=rs("gname")%></div></td>
<td bgcolor=#ffffff width=23% class="008c5e" height="18"> <div align="center"><%=rs("mprice")%></div></td>
<td bgcolor=#ffffff width=19% class="008c5e" height="18"> <div align="center"><%=rs("leprice")%></div></td>
<td bgcolor=#FFFFFF class="008c5e" width="12%" height="18"> <div align="center"><%=rs("num")%></div></td>
<td bgcolor=#ffffff class="008c5e" width="9%" height="18"><div align="center"><a href=del.asp?x=a&id=<%=rs("t_t_id")%>>刪除</a></div></td>
</tr>
<%
rs.MoveNext()
Wend
end if %>
</tbody>
</table>
<input type="hidden" name="MM_insert" value="true">
</form></td>
</tr>
</table>
</body>
</html>
<%
rs.Close
set rs=nothing
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -