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

📄 admin_user.asp

📁 个人网站比较简短
💻 ASP
📖 第 1 页 / 共 5 页
字号:
            Response.Write "        <td><input name='UserID' type='checkbox' onclick=""unselectall()"" id='UserID' value='" & CStr(rsUserList("UserID")) & "'></td>"
            Response.Write "        <td><a href='Admin_User.asp?Action=Show&UserID=" & rsUserList("UserID") & "'>" & rsUserList("UserName") & "</a></td>"
            Response.Write "        <td>"
            If PE_CLng(rsUserList("UserType")) > 4 Then
                Response.Write arrUserType(0)
            Else
                Response.Write arrUserType(PE_CLng(rsUserList("UserType")))
            End If
            Response.Write "        </td>"
            Response.Write "        <td>" & rsUserList("GroupName") & "</td>"
            Response.Write "        <td align='right'>" & FormatNumber(PE_CDbl(rsUserList("Balance")), 2, vbTrue, vbFalse, vbTrue) & "</td>"
            Response.Write "        <td>"
            If rsUserList("UserPoint") <= 0 Then
                Response.Write "<font color=red>" & rsUserList("UserPoint") & "</font> " & PointUnit & ""
            Else
                If rsUserList("UserPoint") <= 10 Then
                    Response.Write "<font color=blue>" & rsUserList("UserPoint") & "</font> " & PointUnit & ""
                Else
                    Response.Write rsUserList("UserPoint") & " " & PointUnit & ""
                End If
            End If
            Response.Write "</td>"
            Response.Write "<td>"
            If rsUserList("ValidNum") = -1 Then
                Response.Write "无限期"
            Else
                ValidDays = ChkValidDays(rsUserList("ValidNum"), rsUserList("ValidUnit"), rsUserList("BeginTime"))
                If ValidDays <= 0 Then
                    Response.Write "<font color='red'>" & ValidDays & "</font> 天"
                Else
                    Response.Write ValidDays & " 天"
                End If
            End If
            Response.Write "        </td>"
            Response.Write "        <td>" & PE_CLng(rsUserList("UserExp")) & "分</td>"
            Response.Write "        <td>" & rsUserList("LastLoginIP") & "<br>" & rsUserList("LastLoginTime") & "</td>"
            Response.Write "        <td>"
            If rsUserList("LoginTimes") <> "" Then
                Response.Write rsUserList("LoginTimes")
            Else
                Response.Write "0"
            End If
            Response.Write "        </td>"
            Response.Write "        <td>"
            If rsUserList("IsLocked") = True Then
              Response.Write "<font color=red>已锁定</font>"
            Else
              Response.Write "正常"
            End If
            Response.Write "        </td>"
            Response.Write "        <td><a href='Admin_SpaceManage.asp?UserID=" & rsUserList("UserID") & "'>列</a> <a href='Admin_SpaceManage.asp?Action=Add&UserID=" & rsUserList("UserID") & "'>增</a></td>"
            Response.Write "      </tr>"

            UserNum = UserNum + 1
            If UserNum >= MaxPerPage Then Exit Do
            rsUserList.MoveNext
        Loop
    End If
    rsUserList.Close
    Set rsUserList = Nothing
    Response.Write "      </table>"
    If totalPut > 0 Then
        Response.Write "      <table width='100%' border='0' cellpadding='0' cellspacing='0'>"
        Response.Write "        <tr height='60'>"
        Response.Write "          <td width='200'><input name='chkAll' type='checkbox' id='chkAll' onclick='CheckAll(this.form);' value='checkbox'>"
        Response.Write "          选中本页显示的所有会员</td>"
        Response.Write "          <td><input type='hidden' name='Action' value=''>"
        If AdminPurview = 1 Or arrPurview(3) = True Then
            Response.Write "          <input name='Lock' type='submit' value=' 批量锁定 ' onClick=""document.myform.Action.value='Lock';return confirm('确定要锁定选中的会员吗?');"">&nbsp;"
            Response.Write "          <input name='UnLock' type='submit' value=' 批量解锁 ' onClick=""document.myform.Action.value='UnLock';return confirm('确定要将选定的会员解锁吗?');"">&nbsp;&nbsp;&nbsp;&nbsp;"
        End If
        If AdminPurview = 1 Or arrPurview(1) = True Then
            Response.Write "          <input name='BatchMove' type='submit' value=' 批量移动 ' onClick=""document.myform.Action.value='BatchMove'"">"
        End If
        If AdminPurview = 1 Or arrPurview(4) = True Then
            Response.Write "          <input name='BatchDel' type='submit' value=' 批量删除 ' onClick=""document.myform.Action.value='BatchDel';"">&nbsp;&nbsp;&nbsp;&nbsp;"
        End If
        Response.Write "<br><br>"
        If AdminPurview = 1 Or arrPurview(6) = True Then
            Response.Write "    <input type='submit' name='Submit11' value='发奖金' onClick=""document.myform.Action.value='BatchAddMoney'""> "
            Response.Write "    <input type='submit' name='Submit12' value='扣奖金' onClick=""document.myform.Action.value='BatchMinusMoney'"">&nbsp;&nbsp;&nbsp;&nbsp;"
        End If
        If AdminPurview = 1 Or arrPurview(7) = True Then
        Response.Write "    <input type='submit' name='Submit13' value='奖励" & PointName & "' onClick=""document.myform.Action.value='BatchAddPoint'""> "
        Response.Write "    <input type='submit' name='Submit14' value='扣除" & PointName & "' onClick=""document.myform.Action.value='BatchMinusPoint'"">&nbsp;&nbsp;&nbsp;&nbsp;"
    End If
        If AdminPurview = 1 Or arrPurview(8) = True Then
         Response.Write "    <input type='submit' name='Submit15' value='奖励有效期' onClick=""document.myform.Action.value='BatchAddValid'""> "
         Response.Write "    <input type='submit' name='Submit16' value='扣除有效期' onClick=""document.myform.Action.value='BatchMinusValid'"">"
    End If
        Response.Write "        </tr>"
        Response.Write "      </table>"
    End If
    Response.Write "      </td>"
    Response.Write "  </form>"
    Response.Write "  </tr>"
    Response.Write "</table>"
    If totalPut > 0 Then
        Response.Write ShowPage(strFileName, totalPut, MaxPerPage, CurrentPage, True, True, "个会员", True)
    End If


    Response.Write "<br>"
    Call ShowSearch
End Sub

Sub ShowSearch()
    Response.Write "<form name='SearchForm' action='Admin_User.asp' method='post'>" & vbCrLf
    Response.Write "<table width='100%'  border='0' align='center' cellpadding='1' cellspacing='1' class='border'>" & vbCrLf
    Response.Write "  <tr class='tdbg'>" & vbCrLf
    Response.Write "    <td width='80'>会员查询:</td>" & vbCrLf
    Response.Write "    <td>" & vbCrLf
    Response.Write "      <select name='Field' size='1'>" & vbCrLf
    Response.Write "        <option value='UserID'>会员ID</option>" & vbCrLf
    Response.Write "        <option value='UserName' selected>用户名</option>" & vbCrLf
    Response.Write "        <option value='Email'>电子邮件</option>" & vbCrLf
    Response.Write "        <option value='Homepage'>个人主页</option>" & vbCrLf
    Response.Write "        <option value='TrueName'>真实姓名</option>" & vbCrLf
    Response.Write "        <option value='IDCard'>身份证号码</option>" & vbCrLf
    Response.Write "        <option value='Company'>单位名称</option>" & vbCrLf
    Response.Write "        <option value='Address'>联系地址</option>" & vbCrLf
    Response.Write "        <option value='Mobile'>手机号码</option>" & vbCrLf
    Response.Write "        <option value='OfficePhone'>办公电话</option>" & vbCrLf
    Response.Write "        <option value='HomePhone'>家庭电话</option>" & vbCrLf
    Response.Write "        <option value='PHS'>小灵通</option>" & vbCrLf
    Response.Write "        <option value='Fax'>传真号码</option>" & vbCrLf
    Response.Write "        <option value='QQ'>QQ号</option>" & vbCrLf
    Response.Write "        <option value='ICQ'>ICQ号</option>" & vbCrLf
    Response.Write "        <option value='MSN'>MSN帐号</option>" & vbCrLf
    Response.Write "        <option value='UC'>UC号</option>" & vbCrLf
    Response.Write "        <option value='Aim'>Aim帐号</option>" & vbCrLf
    Response.Write "      </select>" & vbCrLf
    Response.Write "      <input name='Keyword' type='text' id='Keyword' size='20' maxlength='40'>" & vbCrLf
    Response.Write "      <input type='submit' name='Submit' value='搜 索' id='Submit'>" & vbCrLf
    Response.Write "      <input type='hidden' name='SearchType' value='10'>" & vbCrLf
    Response.Write "    </td>" & vbCrLf
    Response.Write "  </tr>" & vbCrLf
    Response.Write "</table>" & vbCrLf
    Response.Write "</form>" & vbCrLf
    Response.Write "" & vbCrLf
End Sub


Sub ShowForm()
    Dim GroupID, UserType, ContacterID, ClientID, CompanyID
    Dim UserID, UserName, Email, Question, Privacy, UserFace, FaceWidth, FaceHeight, Sign
    Dim rsUser
    If Action = "AddUser" Then
        GroupID = 1
        UserType = 0
        UserID = 0
        ContacterID = 0
        ClientID = 0
        CompanyID = 0
    Else
        If AdminPurview > 1 And arrPurview(1) = False Then
            Response.Write "<br><p align='center'><font color='red' style='font-size:9pt'>对不起,你没有此项操作的权限。</font></p>"
            Call WriteEntry(6, AdminName, "越权操作")
            Exit Sub
        End If

        UserID = PE_CLng(Trim(Request("UserID")))
        If UserID <= 0 Then
            FoundErr = True
            ErrMsg = ErrMsg & "<li>请指定会员ID!</li>"
            Exit Sub
        End If
        Set rsUser = Conn.Execute("select * from PE_User where UserID=" & UserID & "")
        If rsUser.BOF And rsUser.EOF Then
            FoundErr = True
            ErrMsg = ErrMsg & "<li>找不到指定的会员!</li>"
            rsUser.Close
            Set rsUser = Nothing
            Exit Sub
        Else
            GroupID = rsUser("GroupID")
            UserType = rsUser("UserType")
            UserName = rsUser("UserName")
            Email = rsUser("Email")
            Question = rsUser("Question")
            Privacy = rsUser("Privacy")
            UserFace = rsUser("UserFace")
            FaceWidth = rsUser("FaceWidth")
            FaceHeight = rsUser("FaceHeight")
            Sign = rsUser("Sign")
            ContacterID = rsUser("ContacterID")
            ClientID = rsUser("ClientID")
            CompanyID = rsUser("CompanyID")
        End If
        rsUser.Close
        Set rsUser = Nothing
    End If
    
    Call PopCalendarInit
    Response.Write "<script language=javascript>" & vbCrLf
    Response.Write "function CheckSubmit(){" & vbCrLf
    If Action = "AddUser" Then
        Response.Write "    if(document.myform.UserName.value==''){" & vbCrLf
        Response.Write "        alert('用户名不能为空!');" & vbCrLf
        Response.Write "        document.myform.UserName.focus();" & vbCrLf
        Response.Write "        return false;" & vbCrLf
        Response.Write "    }" & vbCrLf
        Response.Write "    if(document.myform.UserPassword.value==''){" & vbCrLf
        Response.Write "        alert('用户密码不能为空!');" & vbCrLf
        Response.Write "        document.myform.UserPassword.focus();" & vbCrLf
        Response.Write "        return false;" & vbCrLf
        Response.Write "    }" & vbCrLf
        Response.Write "    if(document.myform.Answer.value==''){" & vbCrLf
        Response.Write "        alert('密码提示答案不能为空!');" & vbCrLf
        Response.Write "        document.myform.Answer.focus();" & vbCrLf
        Response.Write "        return false;" & vbCrLf

⌨️ 快捷键说明

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