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

📄 photoclass.asp

📁 一个网络相册
💻 ASP
📖 第 1 页 / 共 2 页
字号:
      <td width="9%"><div align="center" class="style2">是否隐藏</div></td>
      <td width="17%"> 
        <div align="center" class="style2">操作</div>
      </td>
    </tr>
		  <%
  set rs=server.createobject("adodb.recordset")
     if session("purview")="99999" then
         sql="select * from class"
        else
        sql="select * from class where owner='" & trim(ownername) & "'"
     end if
   rs.open sql,conn,1,1
      if not rs.eof and not rs.bof then
              if request("page")="" then
  	               curpage = 1
               else
	               curpage = cint(request("page"))
               end if
               rs.pagesize=10
               rs.absolutepage = curpage
               for i = 1 to rs.pagesize
                   %>	
    <tr bgcolor="#FFFFFF"> 
      <td width="4%" height="25"> 
        <div align="center"><a href='photoclass.asp?id=<%=cstr(rs("id"))%>&action=edit'><%=rs("ID")%></a></div>
      </td>
      <td width="24%" height="25"> 
        <div align="center"><a href='adminfile.asp?classid=<%=cstr(rs("id"))%>'><%=rs("name")%></a></div>
      </td>
      <td width="24%"><div align="center"><a href='photoclass.asp?id=<%=cstr(rs("id"))%>&action=edit'><%=rs("owner")%>[<%=rs("ownername")%>]</a></div></td>
      <td width="11%" height="25"><div align="center"><a href='photoclass.asp?id=<%=cstr(rs("id"))%>&action=edit'><%=rs("psw")%></a></div></td>
      <td width="11%"><div align="center"><a href='photoclass.asp?id=<%=cstr(rs("id"))%>&action=edit'>
          <% if rs("lock")=1 then%>
          </a><a href='photoclass.asp?id=<%=cstr(rs("id"))%>&action=edit'>加锁</a><a href='photoclass.asp?id=<%=cstr(rs("id"))%>&action=edit'>
          <%else%>
          正常
          <%end if%>
          </a></div></td>
      <td width="9%" height="25"><div align="center"><a href='photoclass.asp?id=<%=cstr(rs("id"))%>&action=edit'><% if rs("hide")=1 then%></a><a href='photoclass.asp?id=<%=cstr(rs("id"))%>&action=edit'>隐藏</a><a href='photoclass.asp?id=<%=cstr(rs("id"))%>&action=edit'>        <%else%>
        正常
        <%end if%>
      </a></div></td>
      <td width="17%" height="25"> 
        <div align="center"><a href='photoclass.asp?id=<%=cstr(rs("id"))%>&action=edit'>编辑</a>&nbsp;&nbsp;<a href='javascript:SureDel(<%=cstr(rs("id"))%>)'>删除</a></div>
      </td>
    </tr>
  <% rs.movenext
      if rs.eof then
	      i = i + 1
	      exit for
      end if
      next
  end if
  %>
    <tr bgcolor="#FFFFFF">
    <td height="28" colspan="9" ><div align="center">
      <% 
		response.write "<div align=center>"
		response.write "第<font color=red>" + cstr(curpage) + "</font>页/总<font color=red>" + cstr(rs.pagecount) + "</font>页 "
		response.write "本页<font color=red>" + cstr(i-1) + "</font>条/总<font color=red>" + cstr(rs.recordcount) + "</font>条 "
		if curpage = 1 then 
			response.write "首页 前页 "
		else
			response.write "<a href='photoclass.asp?page=1'>首页</a> <a href='photoclass.asp?page=" & cstr(curpage-1) & "'>前页</a> "
		end if
		if  curpage = rs.pagecount then
			response.write "后页 末页"
		else
			response.write "<a href='photoclass.asp?page=" + cstr(curpage+1) + "'>后页</a> <a href='photoclass.asp?page=" + cstr(rs.pagecount) + "'>末页</a>"
		end if
'rs.close
set rs=nothing
 %>
    </div></td>
  </tr>
  </table>
  <div align="center">
  <br>
<table border="0" cellpadding="0" cellspacing="0" width="760" id="table3" background="images/012.jpg">
  <tr>
    <td>
        <div align="center">          </div>
        <BR>
      <center>
      </center>
    </td>
  </tr>
  <tr>
    <td><br>
      <div align="center" class="style5">
        <% if isedit then
	       set rs=server.createobject("adodb.recordset")
		   rs.open "select * from class where id=" & cstr(request("id")),conn,1,1
	       response.write "编&nbsp;辑&nbsp;相&nbsp;册<br>"
	   else
	       response.write "添&nbsp;加&nbsp;相&nbsp;册<br>"
	   end if %>
      </div>
      <div align="center">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="100"><form action="photoclass.asp" method="post">
              <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                <tr>
                  <td width="10%" height="53"><div align="right">
                      <input type="Hidden" name="action" value='<% If isedit then%>modify<% Else  %>add<% End If %>'>
                      <%If isedit then%>
                      <input type="Hidden" name="id" value='<%=cstr(request("id"))%>'>
                      <%End If%>
                名称:</div></td>
                  <td colspan="4"><div align="left">
                      <input type="text" name="name" class=input maxlength=50 size="68" value='<% if isedit then
		                                                         response.write trim(rs("name")) 
															 end if %>'>
                  </div></td>
                </tr>
                <tr>
                  <td height="32"><div align="right">密码:</div></td>
                  <td width="28%"><div align="left">
                      <input name="psw" type="text" id="psw" value='<% if isedit then
		                                                         response.write trim(rs("psw")) 
															 end if %>'>
                  </div></td>
                  <td width="18%" align=""><div align="left"> 隐 藏:
                          <input name="hide" type="radio" value="1" <%if isedit then 
				                                                                  if rs("hide")=1 then
	                                                                              response.write "checked"
																				   end if
																				   end if%>>
                <input name="hide" type="radio" value="0" <%if isedit then
                                                                                  if rs("hide")=0 then
	                                                                              response.write "checked"
																				   end if
																				   else
	                                                                              response.write "checked"
																				   end if%>>
                否</div></td>
                  <td colspan="2">所有者:
                      <select name="owner" id="owner">
                        <%
				 if session("purview")="99999" then
                    sql2 = "SELECT * FROM users"
				 else
				    sql2="SELECT * FROM users where name='" & trim(ownername) & "'"
				 end if		
                 Set rs2 = Server.CreateObject("ADODB.Recordset")
                     rs2.OPEN sql2,Conn,1,1
                     if rs2.eof and rs2.bof then
                         Response.Write"<option>还没有用户</option>"
                        else
                        do while not rs2.eof
                         Response.Write"<option value='"&rs2("name")&"'"
                           if isedit then
                               ownername=trim(rs("owner"))
                            if ownername=trim(rs2("name")) then Response.Write" selected" 
                            end if
                         Response.Write">"&rs2("turename")&"</option>"
                         rs2.movenext
                         loop
                     end if
                    %>
                    </select></td>
                </tr>
                <tr>
                  <td height="20"><div align="right">锁定:</div></td>
                  <td><input name="lock" type="radio" value="1" <%if isedit then 
				                                                                  if rs("lock")=1 then
	                                                                              response.write "checked"
																				   end if
																				   end if%>>
                <input name="lock" type="radio" value="0" <%if isedit then
                                                                                  if rs("lock")=0 then
	                                                                              response.write "checked"
																				   end if
																				   else
	                                                                              response.write "checked"
																				   end if%>>
              否</td>
                  <td colspan="2" align="left">添 加 时 间:
                      <input name="time1" type="text" class=input id="time1" value='<% if isedit then
		                                                         response.write trim(rs("time1")) %>
															 <%else%><% response.write year(now())&"-"&month(now())&"-"&day(now())
															 end if %>' size="10" maxlength=50></td>
                  <td width="23%">&nbsp;&nbsp;</td>
                </tr>
                <tr>
                  <td height="81"><div align="right">说明:</div></td>
                  <td colspan="4"><div align="left">
                      <textarea name="content" cols="67" rows="5" id="content"><% if isedit then
response.write trim(rs("content"))
end if%>
      </textarea>
                  </div></td>
                </tr>
                <tr>
                  <td height="30"><div align="right"></div></td>
                  <td colspan="4"><span class="style2"><span class="style3">隐藏的相册只有登陆用户才能看得到</span></span></td>
                </tr>
                <tr>
                  <td colspan="5"><div align="center">
                      <input type=submit value="确 定" class=button name="submit">
                  </div></td>
                </tr>
              </table>
          </form></td>
        </tr>
      </table></div></td>
  </tr>
  <tr>
    <td height=50 background="images/011.jpg">  </td>
  </tr>
</table>  </div>
<p align="center">&nbsp; </p>
</body>
</html>
<!--#include file="../function/DBclose.asp"-->

⌨️ 快捷键说明

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