www.gusucode.com > 云枫工作室企业网站源代码第五版 1.0 > docc/admin/xinpinzhanshi.asp

    <%@LANGUAGE="VBSCRIPT"%>
<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->

<%  
   dim bbb''''''''''''''''''''''删除记录
   dim sql
   bbb=request.QueryString("bbb")
   if  bbb<>"" then
   sql = "DELETE FROM xinpinzhanshi WHERE id="&bbb
   conn.Execute(sql)
   end if
   rs.close
   set rs=nothing 

 if request("aaa")=111 then       ''''''''''''''''''''添加记录
       dim mingcheng
	   dim dizhi
	   mingcheng=request.Form("fimage")
	   dizhi=request.Form("password1")
      set rs=server.CreateObject("adodb.recordset")
	       sql="select * from xinpinzhanshi"
	  rs.open sql,conn,3,3
	  rs.addnew
	  rs("mingcheng")=mingcheng
	  rs("dizhi")=dizhi
	  rs.update
	  rs.close
	  set rs=nothing	
 end if

   %>
  <%if request.QueryString("id")<>"" and request.QueryString("style")<>"" then
         id=request.QueryString("id")
		 style=request.QueryString("style")
		 set rs=server.CreateObject("adodb.recordset")
		 sql="select * from xinpinzhanshi where id="&id&""
		 rs.open sql,conn,1,3
		 if style=1 then
		 rs("sqlshow")=true
		 else
		 rs("sqlshow")=false
		 end if
		 rs.update
		 rs.close
    end if %>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="style.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
function check()
{
	if(form1.password.value == "")
	{
		alert("链接名不能为空!");
		form1.password.focus();
		return(false);
	}
	if(form1.password1.value == "")
	{
		alert("链接名不能为空!");
		form1.password1.focus();
		return(false);
	}
}
</script>
</head>

<body bgcolor="#799AE1">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#799AE1">
  <tr bgcolor="#668ED4"> 
 <td height="41" colspan="3"><div align="center"><img src="images/toplogo.gif" width="500" height="60"></div></td>
  </tr>
  <tr bgcolor="#DFEFFF"> 
   
    <td width="100%" valign="top" class="unnamed1">
	
       <TABLE width="100%" border="1" cellpadding="0" cellspacing="0">
	   <tr bgcolor="#668ED4">
	     <td colspan="3"><SPAN style="color: #FFFFFF">已经存在的热卖产品是:</SPAN></td>
	   </tr>
	   <tr bgcolor="#799AE1">
	     <td width="170" align="center" valign="top" bgcolor="#799AE1">图片地址</td>
	     <td align="center"><DIV align="left">链接地址</DIV></td>
	     <td width="308" align="center"><FONT color="#FF0000">删除</FONT></td>
	   </tr>
	   <% set rs=server.CreateObject("adodb.recordset")
       sql="select * from xinpinzhanshi"
	   rs.open sql,conn,1,1
	   do while not rs.eof%>
	   <tr bgcolor="#DFEFFF"><td align="center" bgcolor="#DFEFFF"><%=rs("mingcheng")%>	     <DIV align="center"></DIV></td><td width="391"><%=rs("dizhi")%></td>
	     <td><DIV align="center">
		 <!-- <%if rs("sqlshow") then%> <input type="button" name="Submit22" value="对非会员隐藏" onClick="vbscript:window.location.href='xinpinzhanshi.asp?id=<%=rs("id")%>&style=0'"> 
                    <%else%> <input type="button" name="Submit22" value="对非会员显示" onClick="vbscript:window.location.href='xinpinzhanshi.asp?id=<%=rs("id")%>&style=1'"> 
                    <%end if%>-->
					  <input type="button" name="Submit22" value=" 删 除 " onClick="vbscript:window.location.href='xinpinzhanshi.asp?bbb=<%=rs("id")%>'"> </DIV></td></tr>
	  <%rs.movenext
	   loop
	    rs.Close()
	   Set rs = Nothing%>
      </TABLE>
      
      <form name="myform" method="POST" action="xinpinzhanshi.asp?aaa=111" onSubmit="javascript:return check()">
	  <TABLE width="100%" cellpadding="0" cellspacing="0" border="1">
	  <TR bgcolor="#668ED4">
	    <TD colspan="2" bgcolor="#799AE1"><SPAN style="color: #FFFFFF">   添加最新产品:</SPAN></TD>
	  </TR>
       <TR bgcolor="#DFEFFF">
         <TD width="31%">   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; 图片地址:  </TD> 
          
         <TD width="69%"> <input name="fimage" type="text" id="fimage" size="40"> <input type="button" name="Submit22" value="上传图片" onClick="window.open('upload_image.asp?formname=myform&editname=fimage&uppath=userimages&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">
           (gif图片) 195*100  </TD>
       </TR>
       <TR bgcolor="#DFEFFF">
         <TD>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; 链接地址:</TD>  
         <TD> <input name="password1" type="text" id="password1" size="40">       </TD> </TR>
       <TR bgcolor="#DFEFFF"><TD bgcolor="#DFEFFF">
          <DIV align="center">
            <input type="submit" name="Submit" value="  确定  ">
          </DIV></TD><TD>
          <input type="reset" name="Submit2" value="重置"></TD></TR>
        </p>
        <input type="hidden" name="MM_update" value="form1">
        <input type="hidden" name="MM_recordId" value="">
		</TABLE>
      </form>
	  
    <p>&nbsp;</p>    </td>
    <td width="10%" valign="top">&nbsp;</td>
  </tr>
  <tr> 
    <td colspan="3" bgcolor="#DFEFFF">&nbsp;</td>
  </tr>
</table>
</body>
</html>