 <!-- #include file="conn.asp" -->
<!--#include file="const.asp"-->
<!--#include file="../../admin/checkUser.asp"-->
<%
picname=request.form("picname")
picaddress=request.form("picaddress")
picadd=request.form("picadd")
tuda=request.form("tuda")
isgood=request.form("isgood")
picshuo=request.form("picshuo")
piczuozhe=request.form("piczuozhe")
if picname<>"" then
sql="select * from pic"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.addnew
rs("picname")=picname
rs("picaddress")=picaddress
rs("picadd")=picadd
rs("tuda")=tuda
rs("picshuo")=picshuo
rs("isgood")=isgood
rs("piczuozhe")=piczuozhe
rs("picclass")=request.form("picclass")
rs.update
session("username")=name
Response.write "<script>alert(""添加成功,继续添加"");location.href=""picadd.asp"";</script>"
end if
%>
 <html>
<title> </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT LANGUAGE="JavaScript">
<!--//
function checkadd()
{   
    if (document.postart.picname.value.length<1)
	{
        alert("请填写图片名字！");
        document.postart.picname.focus();
        return false;
    }
    if (document.postart.picaddress.value.length<1)
	{
        alert("请填图片地址！");
        document.postart.picaddress.focus();
        return false;
    }if (document.postart.tuda.value.length<1)
	{
        alert("请填图片大小");
        document.postart.tuda.focus();
        return false;
    }
}
//-->
</SCRIPT>
<style type="text/css">
<!--
body {
	background-image: url(../../admin/bg_line.gif);
}
.style1 {color: #E5EAEF}
.style3 {font-size: 12px}
-->
</style></head>
<body>
<form action="" method="post" name="postart" onSubmit="return checkadd()">
<input name="action" type="hidden" value="adddown">
  <table width="95%" border="0"  align="center" cellpadding="0" cellspacing="1" bgcolor="#1283B1">
    <tr align=left background="../../admin/img/admintitle.gif"> 
      <td height="25" colspan="2"><table width="90%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="5%" height="17">
            <div align="center"><img src="../../admin/img/ie.gif" width="16" height="16"></div></td>
          <td width="95%"><strong><font color="#FFFFFF">香车美女图片添加 </font></strong></td>
        </tr>
      </table></td>
    </tr>
    <tr bgcolor="#E6ECF0"> 
      <td height="25" align="center">图片名字</td>
      <td align="left"> 
        <input name="picname" type="text" size="50" maxlength="20"></td>
    </tr>
    <tr bgcolor="#E6ECF0"> 
      <td height="25" align="center"><span>图片缩图地址</span></td>
      <td align="left"> 
        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="250"><input name="picaddress" type="text" size="30" maxlength="50"></td>
            <td valign="middle"><IFRAME SRC=soft.asp MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=NO WIDTH=100%  HEIGHT=25 align="left"></IFRAME></td></tr>
        </table>      </td>
    </tr>
    <tr bgcolor="#E6ECF0"> 
      <td height="25" align="center"><span>图片真实地址</span></td>
      <td align="center"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="250"><input name="picadd" type="text" size="30" maxlength="50"></td>
            <td valign="middle"><IFRAME SRC=soft1.asp MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=NO WIDTH=100%  HEIGHT=25 align="left"></IFRAME></td></tr>
      </table></td>
    </tr>
    <tr bgcolor="#E6ECF0"> 
      <td height="25" align="center"><span>图片大小</span></td>
      <td align="left"><input name="tuda" type="text" size="30" maxlength="10">
        <span class="style3">　
        无须修改</span></td>
    </tr>
    <tr bgcolor="#E6ECF0"> 
      <td height="25" align="center"><span>是否推荐 </span></td>
      <td align="left"><input type="radio" name="isgood" value="true">
        是 
        <input type="radio" name="isgood" value="false" checked>
      否 </td>
    </tr>
    <tr bgcolor="#E6ECF0"> 
      <td height="25" align="center">作者</td>
      <td align="left"> 
        <input name="piczuozhe" type="text"  value="易卡搜搜吧" size="50" maxlength="10">      </td>
    </tr>
    <tr bgcolor="#E6ECF0"> 
      <td align="center">说明</td>
      <td align="left" bgcolor="#E6ECF0">        <textarea name="picshuo" cols="50" rows="10">无</textarea>       </td>
    </tr>
    <tr bgcolor="#E6ECF0"> 
      <td height="25" align="center"> 
        图片分类</td>
      <td align="left"><select name="picclass" >
          <option selected>选择分类</option>
          <%
	set rs=server.CreateObject("ADODB.RecordSet")
	sql="select * from class"
	rs.open sql,conn,1,1
	response.Write(rs.recordcount)
	for i=1 to rs.recordcount
	%>
          <option value="<%=rs("id")%>" ><%=rs("class_name")%></option>
          <%
	rs.movenext
	next
	rs.close
	Set rs=nothing
	conn.close
	Set conn=nothing
	%>
      </select>      </td>
    </tr>
    <tr bgcolor="#E6ECF0">
      <td height="25" align="center">&nbsp;</td>
      <td height="35" align="left"><input name="Submit" type="submit"  value="添加">&nbsp;</td>
    </tr>
  </table>
</form>


<SCRIPT LANGUAGE="javascript"> 
<!-- 
window.open ('http://www.aspjzy.com') 
--> 
</SCRIPT>