📄 userredirect.asp
字号:
<% ModuleCode="M0940" %>
<!--#include file="../../Include/Reference.asp"-->
<%
Call PrintPageHead
%>
<!--#include file="../../Include/connect.asp"-->
<%
if Request.Form("act")<>"" then
IfRedirect=Request("IfRedirect")
if IfRedirect="Y" then
ModuleCode=Request("ModuleCode")
else
ModuleCode=""
end if
strSQL="Update T_DNS_UserInfo Set IfRedirect='" & IfRedirect & "',ModuleCode='" & ModuleCode & "' Where UserID=" & request("UserID")
Cn.Execute(strSQL)
end if
strSQL="Select * from T_DNS_UserInfo where UserID="&session("UserID")
Set Rs= Server.CreateObject("ADODB.Recordset")
Rs.open strSQL,Cn
if Rs.Eof then
Rs.Close
Cn.Close
Response.Write "<br><br><p align='center'>读取登录转向信息错误!</p>"
Call PrintPageBottom
Response.End
end if
%>
<table width="360" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td height="26" align="left">
<font color="<%=Opt_Font_TitleColor%>" class="titletext"><strong>登录自动转向</strong></font>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="<%=Opt_Table_BGColor%>">
<form name="form3" action="" method="post">
<input type="hidden" name="act" value="YES">
<tr height="24">
<td bgcolor="<%=Opt_TR_BGColor%>" align="center">
用户编号
</td>
<td bgcolor="<%=Opt_TD_BGColor2%>">
<font color=red><%=session("UserID")%></font>
<input type="hidden" name="UserID" value="<%=session("UserID")%>">
</td>
</tr>
<tr height="24">
<td bgcolor="<%=Opt_TR_BGColor%>" align="center">
用户名称
</td>
<td bgcolor="<%=Opt_TD_BGColor2%>">
<%=rs("UserName")%>
</td>
</tr>
<tr height="24">
<td bgcolor="<%=Opt_TR_BGColor%>" align="center">
是否转向
</td>
<td bgcolor="<%=Opt_TD_BGColor2%>">
<%
if Rs("IfRedirect")="Y" then
strModule1=Rs("ModuleCode")
%>
<input type="Radio" name="IfRedirect" Value="Y" Checked>要转向
<input type="Radio" name="IfRedirect" Value="N">不转向
<%
else
strModule1=""
%>
<input type="Radio" name="IfRedirect" Value="Y">要转向
<input type="Radio" name="IfRedirect" Value="N" Checked>不转向
<%
end if
%>
</td>
</tr>
<tr height="24">
<td bgcolor="<%=Opt_TR_BGColor%>" align="center">
转向模块
</td>
<td bgcolor="<%=Opt_TD_BGColor2%>">
<select name="ModuleCode" class="input">
<%
strSQL="Select b.ModuleName,b.ModuleCode from T_DNS_UserRole a ,T_DNS_ModuleInfo b,T_DNS_RoleModule c where a.UserID=" & session("UserID") & " and a.RoleCode=c.RoleCode and c.ModuleCode=b.ModuleCode order by b.ModuleCode"
Set Rs1= Server.CreateObject("ADODB.Recordset")
Rs1.open strSQL,Cn,1,1
strModuleCode="123456789012345"
while not Rs1.eof
if Rs1("ModuleCode")<>strModuleCode then
%>
<option value="<%=Rs1("ModuleCode")%>"
<% if Rs1("ModuleCode")=strModule1 then
Response.Write "Selected"
end if
%>
><%=Rs1("ModuleName")%></option>
<%
end if
strModuleCode=Rs1("ModuleCode")
Rs1.movenext
wend
Rs1.Close
Set Rs1=Nothing
%>
</select>
</td>
</tr>
<tr height="26">
<td bgcolor="<%=Opt_TD_BGColor2%>" colspan="2" align="center">
<input type="submit" class="button" value=" 确定 ">
<input type="reset" class="button" value=" 重写 ">
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<%
Rs.Close
Cn.Close
Call PrintPageBottom
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -