⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 managenews.asp

📁 中原商贸城 中原商贸城 项目库 企业库 供求信息 会员 招聘 企业展示
💻 ASP
字号:
<!--#include file="../common/conn.asp"-->
<%
Function ChangeToHtmlStr(CTHStr)
  Dim TempStr,i,LenStr
  If IsNull(CTHStr) Then
     ChangeToHtmlStr=""
     Exit Function
  End If
  LenStr=Len(CTHStr)
  TempStr=""
  For i=1 To LenStr
      Select Case Mid(CTHStr,i,1)
             Case "<"
                TempStr=TempStr+"&lt;"
             Case ">"   
                TempStr=TempStr+"&gt;"
             Case "&"      
                TempStr=TempStr+"&amp;"
             Case Chr(34)
                TempStr=TempStr+"&quot;"
             Case Chr(13)
                TempStr=TempStr+"<br>"
             Case Chr(9)
                TempStr=TempStr+"&nbsp;&nbsp;&nbsp;&nbsp;"
             Case Chr(32)
                TempStr=TempStr+"&nbsp;"     
             Case Else
                TempStr=TempStr+Mid(CTHStr,i,1)
             End Select
    Next         
  ChangeToHtmlStr=TempStr                 
End Function
%>

<%
    if request("action")="del" then
	    sql="delete from fad where id="&request("newsid")
	conn.execute(sql)
	end if
%>
<%
	key=trim(request("key"))
	if key<>"" then	
	 sql="select * from fad where (caption like '%"&key&"%') order by id desc"
		else	
		sql="select * from fad order by id desc"
	end if

	  PageSize   = 30        
   If Request("page") ="" Then
        page=1
       Else
            page=Int(Abs(Request("page")))
       End if

	rs.open sql,conn,1,3
	if not rs.eof then
   rs.PageSize     = PageSize      
       TotalPage         = rs.PageCount      
       rs.absolutepage = page      
       total            = rs.RecordCount      
	   end if
%>
<html>
<head>
<title>管理流行时尚</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="Description" CONTENT="">
<link rel="stylesheet" href="../../hs.css" type="text/css">
<link rel="stylesheet" href="../.css" type="text/css">
<link rel="stylesheet" href="../images/font.css" type="text/css">
<link href="../users/.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FED17E" text="#ffffff" background="../images/bgpic.gif">
<br>
<table width="90%" border="0" cellspacing="2" cellpadding="0" align="center">
  <tr>
    <td bgcolor="">
      <table width="90%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td valign="bottom"> 
            <div align="center"> 
              <p align="left"> <font color="#666666"><strong>管理流行时尚</strong></font></p>
            </div>
          </td>
        </tr>
      </table>
      <br>
    </td>
  </tr>
  <tr>
    <td bgcolor="">
      <table width="100%" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="">
        <tr bgcolor="#E7E7E7"> 
          <td width="9%" height="20" class="unnamed1"> <div align="center"><font color="#666666">编号</font></div></td>
          <td height="20" align="center" class="unnamed1"><font color="#666666">标题</font> 
            <div align="center"></div></td>
          <td width="20%" height="20" class="unnamed1"> <div align="center"><font color="#666666">时间</font></div></td>
          <td height="20" width="12%" class="unnamed1"> <div align="center"><font color="#666666">管理</font></div></td>
        </tr>
        <%
	for i=1 to rs.pagesize
	while not rs.eof 
	%>
        <tr bgcolor=""> 
          <td width="9%" height="20" align="center" class="unnamed1"> <font color="#666666"><%=rs("id")%> </font></td>
          <td height="20" align="center" class="unnamed1"> <font color="#666666"><%=rs("caption")%> </font></td>
          <td width="20%" height="20" align="center" class="unnamed1"> <font color="#666666"><%=datevalue(rs("puttime"))%> </font></td>
          <td width="12%" align="center" height="20" class="unnamed1"><font color="#666666"><a href="managenews.asp?action=modify&newsid=<%=rs("id")%>&page=<%=page%>">修改 
            </a>/ <a href="managenews.asp?action=del&newsid=<%=rs("id")%>&page=<%=page%>" onClick="var a=confirm('确实要删除吗?');if(a==0) return(false);">删除</a></font></td>
        </tr>
        <%
		 rs.movenext
		 wend
		next
		%>
        <tr bgcolor=""> 
          <td colspan="6" height="20"> <font color="#666666"> 
            <% 
			 If totalpage=1 Then
       Response.write "·共有1页·"
    End If
    If Not Page=1 Then
       Response.write "<a href=managenews.asp?page=1>首页</a>&nbsp;&nbsp;"
       Response.write "<a href=managenews.asp?page="&Cstr(Page-1)&">前页</a>&nbsp;&nbsp;"
    Else
       Response.write "首页&nbsp;&nbsp;"
       Response.write "前页&nbsp;&nbsp;"
    End If
    If Not Page=totalpage Then
       Response.Write "<a href=managenews.asp?page="&Cstr(Page+1)&">后页</a>&nbsp;&nbsp;"
       Response.Write "<a href=managenews.asp?page="&PageCount&">尾页</a>"
    Else
       Response.Write "后页&nbsp;&nbsp;"
       Response.Write "尾页"
    End If
	%>
            <%rs.close%>
            </font></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td bgcolor="">
      <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
        <form  method="post" action="managenews.asp">
          <tr bgcolor="#E7E7E7"> 
            <td width="20%" bordercolor="#FFFFFF" class="unnamed1"> 
              <div align="center"><font color="#666666">搜索:</font></div>
            </td>
            <td class="unnamed1"> 
              <input type="text" name="key" class="button">
              <input type="submit"  value="搜索" class="button">
            </td>
          </tr>
        </form>
      </table>
    </td>
  </tr>
</table>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="1">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<%
    if request("action")="modify" and request("newsid")<>"" then
	session("one")=request("action")
	session("two")=request("newsid")
	session("page")=request("page")	
	set rs1=server.CreateObject("adodb.recordset")
	sql="select * from fad where id="&request("newsid")
	rs1.open sql,conn,1,3
%>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="1">
  <tr>
    <td height="217" valign="top"> 
      <form action="update.asp?page=<%=session("page")%>" method="post">
	    <table width="450" border="0" align="center" cellpadding="0" cellspacing="3">
          <tr class="unnamed1"> 
            <td width="84" height="19" align="right"><font color="#666666">图片1:</font></td>
            <td width="363"> <input name="images" type="text" id="images" value="<%if request("imgone")="" then
                                              response.write(rs1("imgpath1"))
											  else
											    response.Write(request("imgone"))
												end if%>" class=buttion> <a href="loginImg.asp?img=one">上传修改图片</a></td>
          </tr>
          <tr class="unnamed1"> 
            <td width="84" align="right"><font color="#666666">图片2:</font></td>
            <td> <font color="#0000FF"> 
              <input name="images1" type="text" id="images1" value="<%if request("imgtwo")="" then
                                              response.write(rs1("imgpath2"))
											  else
											    response.Write(request("imgtwo"))
												end if%>" class=buttion>
              </font><a href="loginImg.asp?img=two">上传修改图片</a></td>
          </tr>
          <tr class="unnamed1"> 
            <td width="84" align="right"><font color="#666666">图片3:</font></td>
            <td><font color="#0000FF"> 
              <input name="images2" type="text" id="images2" value="<%if request("imgthree")="" then
                                              response.write(rs1("imgpath3"))
											  else
											    response.Write(request("imgthree"))
												end if%>" class=buttion>
              </font><a href="loginImg.asp?img=three">上传修改图片</a></td>
          </tr>
          <tr class="unnamed1"> 
            <td align="right"><font color="#666666">时尚标题:</font></td>
            <td> <input name="caption" type="text" value="<%=rs1("caption")%>" size="40" class=buttion> 
            </td>
          </tr>
          <tr class="unnamed1">
            <td align="right"><font color="#666666">时尚</font>类型<font color="#666666">:</font></td>
            <td><select name="classid" id="classid">
                <option value="流行密码" <%if rs1("classid")="流行密码" then response.Write("selected")%>>流行密码</option>
                <option value="流行营销" <%if rs1("classid")="流行营销" then response.Write("selected")%>>流行营销</option>
				<option value="流行时尚" <%if rs1("classid")="流行时尚" then response.Write("selected")%>>流行时尚</option>
              </select></td>
          </tr>
          <tr class="unnamed1"> 
            <td align="right"><font color="#666666">时尚内容:</font></td>
            <td> <textarea name="content" cols="35" rows="7" id="content" class=buttion><%=rs1("content")%></textarea> 
            </td>
          </tr>
          <tr align="center"> 
            <td colspan="2"><input name="submit" type="submit" value="提  交"> &nbsp;&nbsp;&nbsp;&nbsp; 
              <input name="reset" type="reset" value="清  除"> </td>
          </tr>
        </table>
      </form></td>
  </tr>
</table>
<%end if%>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -