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

📄 adminedit.asp

📁 日记本(多用户版)V3.0 主要功能: 1、日记本基本功能:添加、修改日记等。 2、日记加密:当日记添加时
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="admin_superusercheck.asp"-->
<%
'=========================================================
' 随然日记本(多用户版) Version:3.0
' Date: 2004-11-15
' Script Written by 随然(dampure)
' 随然日记本演示地址:http://www.suiran.cn
'=========================================================
' Copyright (C) 2003,2004 真露无香. All rights reserved.
' Web: www.yongzi.com
' Diary:http://www.suiran.cn
'=========================================================

   userid=replace(request("userid")," ","")
   if isnumeric(userid)=false or isnull(userid)=true then
   response.write "请指定正确的参数,或者通过日记本管理页面进行访问!"
   response.end
   end if
    
set rs=server.CreateObject ("ADODB.Recordset")
    rs.open "select * from admin where userid="&userid,conn,1,3
    dim k,t
  if rs("picshow")=0 then
  k=rs("pic")
  else
  
  randomize
  k=cint(rnd*41)
  if k=0 then 
    k=k+1
  end if
  
  end if
%>
<HTML><HEAD><TITLE><%=rs("nickname")%>的网络日记本</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="images/styles.css" type=text/css rel=stylesheet>
<STYLE type=text/css>A:hover {
	FONT-SIZE: 10.5pt; LINE-HEIGHT: 22pt; TEXT-DECORATION: underline
}
A {
	FONT-SIZE: 10.5pt; LINE-HEIGHT: 22pt; TEXT-DECORATION: none
}
P {
	FONT-SIZE: 10.5pt
}
TABLE {
	FONT-SIZE: 10.5pt; LINE-HEIGHT: 25pt
}
UL {
	FONT-SIZE: 10.5pt; TEXT-DECORATION: none
}
</STYLE>

<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY leftMargin=0 background=images/bg.gif topMargin=0>
<TABLE cellSpacing=0 cellPadding=0 width=617 align=center border=0>
  <TBODY>
  <TR>
    <TD height=2><IMG height=8 src="images/top01.gif" 
  width=617></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=617 align=center bgColor=#ffffff 
border=0>
  <TBODY>
  <TR>
    <TD width="3%" height=2>&nbsp; </TD>
    <TD width="68%" height=2><IMG height=47 src="images/diary_title.jpg" 
      width=171></TD>
    <TD width="29%" height=2>&nbsp;</TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=617 align=center bgColor=#ffffff 
border=0>
  <TBODY>
  <TR>
    <TD>
      <DIV align=center><IMG height=204 src="pic/diy0<%=k%>.jpg" 
      width=609></DIV></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=617 height=18  align=center bgColor=#ffffff 
border=0>
  <TBODY>
  <TR>
    <TD><DIV align=center>
            <TABLE cellSpacing=0 cellPadding=0 width=609 height=18 align=center 
            bgColor=#636562 border=0>
              <TBODY>
              <TR>
                <TD width=319></TD>
                <TD width=290>
                  <DIV align=center><IMG height=16 src="images/top_words.gif" 
                  width=244></DIV></TD></TR></TBODY></TABLE>
</DIV></TD></TR></TBODY></TABLE>

<%
set rs=server.CreateObject ("ADODB.Recordset")
    rs.open "select * from admin where userid="&request("userid"),conn,3
    
%>

<TABLE cellSpacing=0 cellPadding=0 width=617 align=center border=0>
  <TBODY>
  <TR>
    <TD vAlign=top bgColor=#ffffff height=16>
      </TD>
    </TR>
  <TR>
    <TD vAlign=top bgColor=#ffffff>
      <SCRIPT language=JavaScript><!--
function FrontPage_Form1_Validator(theForm)
{

if (theForm.username.value == "")
  {
    alert("请填写用户名");
    theForm.username.focus();
    return (false);

  }

 if (theForm.username.value.length > 12)
  {
    alert("用户名不能大于12位,请重新输入!");
    theForm.username.focus();
    return (false);
  }

 if (theForm.username.value.length > 12)
  {
    alert("用户名不能大于12位,请重新输入!");
    theForm.username.focus();
    return (false);
  }


if (theForm.passwd.value.length > 12)
  {
    alert("密码不能大于12位,请重新输入!");
    theForm.passwd.focus();
    return (false);
  }


if (theForm.repasswd.value.length > 12)
  {
    alert("密码不能大于12位,请重新输入!");
    theForm.repasswd.focus();
    return (false);
  }

 if (theForm.passwd.value != theForm.repasswd.value)
  {
    alert("两次输入密码不一致,请从新输入");
    theForm.passwd.focus();
    return (false);

  }

  if (theForm.nickname.value == "")
  {
    alert("请填写您的昵称");
    theForm.nickname.focus();
    return (false);

  }
if (theForm.nickname.value.length > 8)
  {
    alert("昵称不能大于8位,请重新输入!");
    theForm.nickname.focus();
    return (false);
  }


if (theForm.diary_name.value == "")
  {
    alert("请填写日记本名称");
    theForm.diary_name.focus();
    return (false);

  }
  if (theForm.diary_name.value.length > 10)
  {
    alert("日记本名称超长,请重新输入!");
    theForm.diary_name.focus();
    return (false);

  }

  if (theForm.content.value == "")
  {
    alert("请填写日记本序言");
    theForm.content.focus();
    return (false);

  }

    if (theForm.content.value.length > 250)
  {
    alert("日记本序言超长,不能大于250个字符,请重新输入!");
    theForm.content.focus();
    return (false);
  }
  
return (true);
  }
//--></SCRIPT>

      <FORM name=FrontPage_Form1 
      onsubmit="return FrontPage_Form1_Validator(this)" action=admin/save_user.asp?userid=<%=userid%> 
      method=post>
          <TABLE cellSpacing=0 cellPadding=6 width=609 align=center border=0>
            <TBODY>
              <TR> 
                <TD clasee="td">&nbsp;</TD>
                <TD>&nbsp;</TD>
              </TR>
              <TR> 
                <TD width=189 bgColor=#efefef clasee="td"> <DIV align=right>用户名:</DIV></TD>
                <TD width=396 bgColor=#efefef><INPUT class=input maxLength=12 size=15 value="<%=rs("user")%>" name=username>
                  (字母、数字小于12位)</TD>
              </TR>
              <TR> 
                <TD width=189 clasee="td"> <DIV align=right>旧密码:</DIV></TD>
                <TD width=396 height=29><INPUT class=input type=text 
            maxLength=12 size=15 name=oldpass readonly value=<%=rs("pwd")%>></TD>
              </TR>
              <TR> 
                <TD width=189 bgColor=#efefef clasee="td"> <DIV align=right>新密码:</DIV></TD>
                <TD width=396 bgColor=#efefef><INPUT class=input type=password 
            maxLength=12 size=15 name=passwd>
                  (若不修改,请留空) </TD>
              </TR>
              <TR> 
                <TD width=189 height=29 clasee="td"> <DIV align=right>重复密码:</DIV></TD>
                <TD width=396 height=29><INPUT class=input type=password 
            maxLength=12 size=15 name=repasswd> </TD>
              </TR>
              <TR> 
                <TD width=189 bgColor=#efefef clasee="td"> <DIV align=right>昵称:</DIV></TD>
                <TD width=396 bgColor=#efefef><INPUT class=input size=15 
            name=nickname value=<%=rs("nickname")%>>
                   </TD>
              </TR>
              <TR> 
                <TD width=189 clasee="td"> <DIV align=right>密码提示问题:</DIV></TD>
                <TD width=396><INPUT class=input size=15 type=text name=question value=<%=rs("question")%>>
                  (取回密码时用) </TD>
              </TR>
              <TR> 
                <TD width=189 bgColor=#efefef clasee="td"> <DIV align=right>答案:</DIV></TD>
                <TD width=396 bgColor=#efefef><INPUT class=input size=15 
            name=answer> (若不修改,请留空)</TD>
              </TR>
              <TR> 
                <TD width=189 clasee="td"> <DIV align=right>阅读密码:</DIV></TD>
                <TD width=396><INPUT class=input size=15 type=text name=readpwd value=<%=rs("readpwd")%>>
                  (默认阅读密码) </TD>
              </TR>
              <TR> 
                <TD width=189 bgColor=#efefef clasee="td"> <DIV align=right>日记本名称:</DIV></TD>
                <TD width=396 bgColor=#efefef><INPUT class=input size=15 
            name=diary_name value=<%=rs("title")%>> </TD>
              </TR>
              <TR> 
                <TD width=189 clasee="td"> <DIV align=right>日记类型:</DIV></TD>
                <TD width=396><SELECT name=leibie><OPTION value=<%=rs("leibie")%> selected><%=rs("leibie")%></OPTION> <OPTION 
              value=爱情在线>爱情在线</OPTION> <OPTION value=亲情宽带>亲情宽带</OPTION> <OPTION 
              value=友情互联>友情互联</OPTION> <OPTION value=生活彩屏>生活彩屏</OPTION> <OPTION 
              value=感悟共享>感悟共享</OPTION> <OPTION value=情绪下载>情绪下载</OPTION> <OPTION 
              value=往事备份>往事备份</OPTION> <OPTION value=旅途浏览>旅途浏览</OPTION> <OPTION 
              value=职场扫描>职场扫描</OPTION> <OPTION value=学海冲浪>学海冲浪</OPTION> <OPTION 
              value=琐事录入>琐事录入</OPTION> <OPTION value=无类存储>无类存储</OPTION></SELECT>
                  (请选择你的日记类型) </TD>
              </TR>
              <TR> 
                <TD width=189 bgColor=#efefef clasee="td"> <DIV align=right>来自何方:</DIV></TD>
                <TD width=396 bgColor=#efefef>
                <SELECT name=address><OPTION value=<%=rs("address")%> selected><%=rs("address")%></OPTION> <OPTION 
              value=北京>北京</OPTION> <OPTION value=上海>上海</OPTION> <OPTION 
              value=天津>天津</OPTION> <OPTION value=重庆>重庆</OPTION> <OPTION 
              value=安徽>安徽</OPTION> <OPTION value=甘肃>甘肃</OPTION> <OPTION 
              value=福建>福建</OPTION> <OPTION value=广东>广东</OPTION> <OPTION 
              value=广西>广西</OPTION> <OPTION value=贵州>贵州</OPTION> <OPTION 
              value=海南>海南</OPTION> <OPTION value=河北>河北</OPTION> <OPTION 
              value=黑龙江>黑龙江</OPTION> <OPTION value=河南>河南</OPTION> <OPTION 
              value=湖北>湖北</OPTION> <OPTION value=湖南>湖南</OPTION> <OPTION 
              value=四川>四川</OPTION> <OPTION value=其他>其他</OPTION></SELECT></TD>
              </TR>
              <TR> 
                <TD width=189 clasee="td"> <DIV align=right>日记评论:</DIV></TD>
                <TD width=396><SELECT name=pinglunlock><OPTION value=0 <% if rs("say")=0 then response.write "selected"%>>是</OPTION>
                <OPTION value=1 <% if rs("say")=1 then response.write "selected"%>>否</OPTION></SELECT>
                 (是否开启日记评论功能)</TD>
              </TR>
              <TR> 
                <TD width=189 clasee="td"> <DIV align=right>日记本序言:</DIV></TD>
                <TD width=396><TEXTAREA class=input name=content rows=6 cols=40><%=rs("infor")%></TEXTAREA> 
                </TD>
              </TR>
              <TR> 
                <TD width=189 bgColor=#efefef clasee="td"> <DIV align=right>随机图片:</DIV></TD>
                <TD width=396 bgColor=#efefef><SELECT class=input name=suiji>
                    <OPTION value=0 <% if rs("picshow")=0 then response.write "selected"%>>否</OPTION>
                    <OPTION value=1 <% if rs("picshow")=1 then response.write "selected"%>>是</OPTION></SELECT></TD>
              </TR>
              <TR> 
                <TD width=189 clasee="td"> <DIV align=right>个性选择:</DIV></TD>
                <TD width=396><SELECT class=input name=type>
                <% 
                for i=1 to 41
                %>
                    <OPTION value="<%=i%>" <% if rs("pic")=i then response.write " selected"%>>风格<%=i%></OPTION>
                <%
                next
                %>
                  </SELECT> <FONT face=宋体><B><FONT color=#ff6600 
            size=3><FONT face=宋体><B>   </B></FONT></FONT></B></FONT><A 
            href="diy.asp" target="_blank"><FONT 
            color=#990033><B>风格预览</B></FONT></A> </TD>
              </TR>
              <TR> 
                <TD colSpan=2> <DIV align=center> 
<INPUT type=image height=21 src="images/tijiao.gif" width=74 border=0>
               <FONT face=宋体><B><A href="#" onclick=history.back()><IMG 
            height=21 src="images/fanhui.gif" width=74 border=0></A> 
                  </DIV></TD>
              </TR>
            </TBODY>
          </TABLE>
        </FORM></TD></TR>
  <TR>
    <TD bgColor=#ffffff height=16>
      <TABLE cellSpacing=0 cellPadding=3 width=609 align=center bgColor=#9c9a9d 
      border=0>
        <TBODY>
<!--#include file="foot.asp"-->
</TR></TBODY></TABLE>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD height=2><IMG height=8 src="images/top01.gif" 
        width=617></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>

⌨️ 快捷键说明

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