?? editsn.asp
字號:
<!--#include file="conn.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('網絡超時或您還沒有登陸!');window.location.href='login.asp';</script>"
response.End
else
if session("flag")>2 then
response.Write "<div align=center><font size=80 color=red><b>您沒有此項目管理權限!</b></font></div>"
response.End
end if
end if
dim shopid
shopid=request.QueryString("id")
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript">
<!-- Hide from older browsers...
//Function to format text in the text box
function FormatText(command, option){
frames.message.document.execCommand(command, true, option);
frames.message.focus();
}
//Function to add image
function AddImage(){
imagePath = prompt('請輸入圖片地址', 'http://');
if ((imagePath != null) && (imagePath != "")){
frames.message.document.execCommand('InsertImage', false, imagePath);
frames.message.focus();
}
frames.message.focus();
}
//Function to clear form
function ResetForm(){
if (window.confirm('確認要清空對話框內容?')){
frames.message.document.body.innerHTML = '';
return true;
}
return false;
}
//Function to open pop up window
function openWin(theURL,winName,features) {
window.open(theURL,winName,features);
}
function setMode(newMode)
{
bTextMode = newMode;
var cont;
if (bTextMode) {
cleanHtml();
cleanHtml();
cont=message.document.body.innerHTML;
message.document.body.innerText=cont;
} else {
cont=message.document.body.innerText;
message.document.body.innerHTML=cont;
}
message.focus();
}
function cleanHtml()
{
var fonts = message.document.body.all.tags("FONT");
var curr;
for (var i = fonts.length - 1; i >= 0; i--) {
curr = fonts[i];
if (curr.style.backgroundColor == "#ffffff") curr.outerHTML = curr.innerHTML;
}
}
// -->
</script>
<script language="JavaScript">
function help()
{
var helpmess;
helpmess="---------------填寫幫助---------------\r\n\r\n"+
"1.請不要發表有危險性的腳本。\r\n\r\n"+
"2.如果要書寫源代碼,請選中\r\n\r\n"+
" 查看HTML源代碼書寫.\r\n\r\n"+
"3.需要你自己運行,才能看效果.\r\n\r\n"+
"4.如果書寫js,盡量不要在這兒書寫.\r\n\r\n";
alert(helpmess);
}
</script>
<script src="edit.js" type="text/javascript"></script>
<link href="../css.css" rel="stylesheet" type="text/css">
</head>
<%dim count
set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_Nclass order by Nclassidorder ",conn,1,1%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("Nclass"))%>","<%= rs("anclassid")%>","<%= rs("Nclassid")%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.myform.Nclassid.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{ //這句不是很理解
document.myform.Nclassid.options[document.myform.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
<body>
<br>
<table width="95%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td height="20" bgcolor="f1f1f1">
<div align="center"><font color="#000000">修改商品</font></div>
</td>
</tr>
<tr>
<form name="myform" method="post" action="saveaddsn.asp?action=edit&id=<%=shopid%>">
<td height="126" bgcolor="#FFFFFF">
<table width="88%" border="0" align="center" cellpadding="2" cellspacing="5">
<tr>
<td width="15%"> <div align="center">選擇分類:</div></td>
<td colspan="2">
<%dim rs1
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select * from shop_snsn where shopid="&shopid,conn,1,1
rs.open "select * from shop_anclass order by anclassidorder",conn,1,1
if rs.eof and rs.bof then
response.write "請先添加欄目。"
response.end
else
%>
<select name="anclassid" class="wenbenkuang" size="1" id="anclassid" onChange="changelocation(document.myform.anclassid.options[document.myform.anclassid.selectedIndex].value)">
<%
do while not rs.eof
%>
<option value="<%=rs("anclassid")%>" <%if rs1("anclassid")=rs("anclassid") then%>selected<%end if%>><%=trim(rs("anclass"))%></option>
<%
rs.movenext
loop
end if
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -