📄 cimg_add.asp
字号:
<%@ codepage ="936" %>
<!--#include file="../../inc/config.asp"-->
<%
if id=session("id") then
session("pageid")="home"
response.write"<SCRIPT language=JavaScript>alert('对不起,你尚未登录!');"
response.write"this.window.opener.location.href='../../login/login.asp';window.close();</SCRIPT>"
response.end
else
id=session("id")
%>
<!--#include file="../../conn/dbconn2.asp"-->
<script language="javascript" src="../images/ShowProcessBar.js"></script>
<html><head><title>上传企业形象图</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../../css/Style.css" rel=stylesheet type=text/css>
</head>
<BODY>
<script language=javascript>
function checkImage(sId)
{
if(( document.all[sId].value.indexOf(".gif") == -1) && (document.all[sId].value.indexOf(".jpg") == -1)) {
alert("请选择gif或jpg的图象文件");
event.returnValue = false;
}
}
</script>
<%
if not isEmpty(request("id")) then
id=request("id")
else
id=1
end if
sql="select * from qyml where id="+cstr(id)+" order by ID desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
%>
<form method="POST" action="cimg_save.asp?id=<%=rs("id")%>" enctype="multipart/form-data" name=myform onsubmit="checkImage('cimg')">
<div align="center">
<br>
<div align="center">
<center>
<TABLE border=0 cellspacing=0 cellpadding=0 width="450" style="border-collapse: collapse">
<TR>
<TD height=20 width=450 align="center">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="450" id="AutoNumber1">
<tr>
<td width="20" bgColor="#96a5e2" style="color: #000; font-size: 12px; font-family: 宋体">
<img border="0" src="../images/pic1.gif"></td>
<td width="160" bgColor="#FFE27D" style="color: #000; font-size: 12px; font-family: 宋体">
<b> 上传企业形象图:</b></td>
<td style="color: #000; font-size: 12px; font-family: 宋体">
<img border="0" src="../images/pic2.gif"></td>
</tr>
</table>
</TD>
</TR>
<tr>
<TD height=160 width=528 align="center" bgcolor="#F7F8FD">
<table border="1" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="450" id="AutoNumber2" bordercolorlight="#FFEEB3" cellpadding="3" bordercolordark="#FFEEB3" height="166">
<tr>
<TD height=32 width=135 align="center" bgcolor="#FFFBEE">上传图片:</TD>
<td height="32" width="443" bgcolor="#FFFBEE">
<input type="file" name="cimg" size="15" value="浏览">
<input type="submit" value="上传" name="B1" class="txt " IsShowProcessBar="True" style="color: #F7F8FD; border: 1px solid #CA6B02; background-color: #FF9933">(可上传gif/jpg格式)</td>
</tr>
<tr>
<TD height=92 width=110 align="center" bgcolor="#FFFBEE">图象预览:</TD>
<td height="92" width="443" bgcolor="#FFFBEE">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="36%" id="AutoNumber3">
<tr>
<td width="100%">
<%if rs("cimg")<>"" then %><img src="<%=rs("cimg")%>" width="190" height="140"><%else%><iframe src="../../ads/a1.asp" width=179 height=140 border=0 frameborder=0 framespacing=0 marginheight=1 marginwidth=1 noResize scrolling=no vspace="0" name="I1"></iframe>
<%end if%></td>
</tr>
</table>
</td>
</tr>
</table>
</TD>
</tr>
</table>
<% end if %>
</center>
</div>
</div></form></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -