📄 producttypeedit.asp
字号:
<!--#include file="check.asp"-->
<!--#include file="Conn.Asp"-->
<!--#include file="../Function/function.asp"-->
<%
Dim ProductTypeName,TypeID
Dim strSQL,ProductName
if IsSubmit And CheckAdmin then
ProductName = Request.Form("TypeName")
Call OpenDataBase(1)
TypeID = Request.Form("TypeID")
ProductName = Request.Form("TypeName")
strSQL = "Update ProductType Set TypeName = '" & FilterSQL(ProductName) & "' where typeid=" & TypeID
Conn.Execute (strSQL)
Call CloseDataBase()
Call MessageBoxOK("分类名称修改成功!") '完成提示
Else
Dim objRec
TypeID = Request.QueryString("TypeID")
Call OpenDataBase(1)
strSQL="Select * from ProductType Where TypeID=" & clng(TypeID)
Set objRec=Conn.Execute (strSQL)
With objrec
if .eof and .bof then
else
Typeid=.Fields(0).Value
ProductTypeName = .Fields(1).Value
End if
End with
Set objRec=Nothing
Call CloseDataBase()
End if
Private Sub MessageBoxOK(strValue)
With Response
.Write "<script>" & vbcrlf
.Write "alert('"+strValue+"');" & vbcrlf
.Write "location.href='ProductType.asp'" & vbcrlf
.Write "</script>" & vbcrlf
End With
End Sub
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/style.css" type="text/css">
<title></title>
<script>
function deleted(pid)
{
var winleft,wintop
winleft=(window.screen.width-200)/2
wintop = (window.screen.height-100)/2
if (confirm('\n真的要删除此类别吗?'))
{
location.href="ProductTypeDel.asp?id="+pid
}
}
</script>
<link rel="stylesheet" href="../css/css.css" type="text/css">
<script language = "JavaScript">
var errmsg;
function haveNoImage(p_Value)
{
var imgurl;
imgurl = trim(p_Value);
if (imgurl.length==0)
{
alert("请上传推荐图片");
return false;
}
var sExt=imgurl.substr(imgurl.lastIndexOf(".")+1).toUpperCase();
switch(sExt){
case "GIF":
return true;
break;
case "JPG":
return true;
break;
case "BMP":
return true;
break;
default:
alert("请不要修改上传后的文件格式!");
myform.imgurl.value="";
return false;
break;
}
return true;
}
function trim(val)
{
var str = val+"";
if ( str.length == 0 )
return str;
var re = /^\s*/;
str = str.replace(re,'');
re = /\s*$/;
return str.replace(re,'');
}
function CheckForm(frm)
{
if (frm.TypeName.value=="")
{
alert("温馨提示\n请填写产品类型名称!");
frm.TypeName.focus();
return false;
}
return true;
}
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<div id="Layer1" style="position:absolute; left:9px; top:4px; width:60%; height:189px; z-index:1">
<table width="500" border="0" cellpadding="0" cellspacing="2" class="four">
<form method="POST" name="myform" onSubmit="return CheckForm(this);" target="_self">
<tr>
<td height="20" align="center" class="title"><strong>产品类别修改</strong></td>
</tr>
<tr align="center" >
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="39%" align="right">分类名称:</td>
<td width="61%">
<input type="text" name="TypeName" Value="<%=ProductTypeName%>">
<input type="hidden" name="TypeID" value="<%=TypeID%>">
</td>
</tr>
<tr>
<td align="right"> </td>
<td> </td>
</tr>
<tr>
<td align="right"> </td>
<td> </td>
</tr>
<tr>
<td align="right"> </td>
<td><input name="submit" type="submit" value=" 保 存 ">
<input name="reset" type="reset" value=" 重 来 "></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="10" width="20%" align="center"> </td>
</tr>
</form>
</table>
<br>
</div>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -