📄 image_add.asp
字号:
<!--#include file="../function/tablefunction.asp" -->
<!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=gb2312" />
<title>添加文章</title>
<style type="text/css">
fieldset{
background: #fffbef;
width:auto;
}
legend{color:#105096;width:auto;}
.input{
border: 1px solid #3061AB;
}
.inputhover{
border: 1px solid #1E3F8C;
}
.inputdown{ background-color: #EEF8F9; border: 1px solid #0033CC;}
.STYLE2 {color: #FF0000}
</style>
<script>
function butt(obj,state)
{
if(state==1){
obj.className="inputhover";}
if(state==2){
obj.className="input";}
if(state==3){
obj.className="inputdown";}
}
</script>
<script language = "JavaScript">
function CheckForm()
{
if (document.form1.ImgTitle.value=="")
{
alert("请填写图片标题!");
document.form1.ImgTitle.focus();
return false;
}
if (document.form1.ClassName.value=="num")
{
alert("请选择文章分类!");
document.form1.ClassName.focus();
return false;
}
if (document.form1.file.value=="num")
{
alert("请上传文件!");
document.form1.file.focus();
return false;
}
return true;
}
</script>
</head>
<body style="font-size:12px;">
<!--#include file="../session.asp" -->
<%
action=request.QueryString("action")
imgid=request.QueryString("imgid")
if action="imgEdit" then
dim msmax2
set msmax2=new myclass
set rs2=msmax2.viewRecord("select * from img where imgid="&imgid)
%>
当前位置:<span class="STYLE2">文章管理--->添加图片</span>
<fieldset><br/>
<legend><strong>添加文章</strong></legend>
<div align="left" style="width:auto;">
<form action="action.asp?action=imgEdit&imgid=<%=imgid%>" method="post" name="form1" onsubmit="return CheckForm()">
<input type="hidden" name="act" value="upload">
<p> <strong>说明</strong>:
<input name="ImgTitle" type="text" class="input" size="40" onmousedown="butt(this,3)" onmouseover="butt(this,1)" onmouseout="butt(this,2)" value="<%=rs2("ImgTitle")%>"/>
<strong> 所属分类</strong>:
<select name="ClassName" class="input">
<%
dim msmax1
set msmax1=new myclass
set rs1=msmax1.viewRecord("select * from ImgClass")
do while not rs1.eof and not rs1.bof
%>
<option value="<%=rs1("ClassName")%>"><%=rs1("ClassName")%></option>
<%
rs1.movenext
loop
%>
</select>
</p>
<div id="upid">
<p>
<img src="<%=rs2("image")%>" width="20%"> </p>
</div><input name="Submit" type="submit" class="input" value="保存更改" />
</form>
</div>
</fieldset>
<%else%>
当前位置:<span class="STYLE2">文章管理--->添加图片</span>
<fieldset><br/>
<legend><strong>添加文章</strong></legend>
<div align="left" style="width:auto;">
<form action="upfile.asp" method="post" enctype="multipart/form-data" name="form1" onsubmit="return CheckForm()">
<input type="hidden" name="act" value="upload">
<p> <strong>说明</strong>:
<input name="ImgTitle" type="text" class="input" size="40" onmousedown="butt(this,3)" onmouseover="butt(this,1)" onmouseout="butt(this,2)" />
<strong> 所属分类</strong>:
<select name="ClassName" class="input">
<%
dim msmax
set msmax=new myclass
set rs=msmax.viewRecord("select * from ImgClass")
do while not rs.eof and not rs.bof
%>
<option value="<%=rs("ClassName")%>"><%=rs("ClassName")%></option>
<%
rs.movenext
loop
%>
</select>
</p>
<div id="upid">
<p> <b> 文件:</b>
<input name="file" type="file" value="" class="input" size="40" onmousedown="butt(this,3)" onmouseover="butt(this,1)" onmouseout="butt(this,2)" />
</p>
</div>
<input name="Submit" type="submit" class="input" value="添加图片" />
</form>
</div>
</fieldset>
<%end if%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -