62,243
社区成员




<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<Script Language="VB" Runat="Server">
Function getCookie()
Dim cookieValue
CookieValue=""
IF not ( Request.Cookies("iPlanetDirectoryPro") is nothing ) THEN
CookieValue = Request.Cookies("iPlanetDirectoryPro").value
end if
Return cookieValue
End Function
</Script>
<BODY><center>
<%
Dim login,gotoURL,serverUrl,loginUrl,logout,logoutUrl
Dim idstar
idstar = Server.CreateObject("Idstar.IdentityManager")
login = idstar.GetLoginURL()
logout = idstar.GetLogoutURL()
serverUrl = "http://cxiao.wiscom.com.cn"
gotoUrl = serverUrl & Request.RawUrl
loginUrl = login & "?goto=" & Server.UrlEncode(gotoUrl)
logoutUrl = logout & "?goto=" & Server.UrlEncode(gotoUrl)
Dim cookieValue
Dim currentUser
cookieValue = getCookie()
currentUser = ""
currentUser = idstar.GetCurrentUser( "" & Server.UrlDecode(cookieValue) )
If ( Len(currentUser) <> 0 ) Then
Response.Write( "cookies值是:" & Server.UrlDecode(cookieValue))
Response.Write("<p>已登录")
%>
<p>当前用户: <%= currentUser %>
<p><a href="search.aspx">属性查询</a>
<p><a href="<%= logoutUrl %>">注销</a>
<%
Else
%>
<p>您没有登录,请登录 <a href="<%= loginUrl %>">Login</a>
<%
End If
%>
</center>
</BODY>
</HTML>
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["roleid"] != null && Request.QueryString["accid"] != null && Request.QueryString["tim"] != null && Request.QueryString["crypt"] != null)
{
Session["roleid"] = Request.QueryString["roleid"].ToString();
Session["sno"] = Request.QueryString["accid"].ToString();
Response.Write(SysOperation.OpenDialog(
sno));//test show
Student_Teacher_Login(sno);
}
else
{
Response.Write(SysOperation.OpenDialog(
"无法获取URL参数,请检查登录..."));
Response.Write("<script>history.back()</script>");
return;
}
}
if(Request.Cookies["iPlanetDirectoryPro"]!=null)
{
//Request.Cookies["iPlanetDirectoryPro"].Value 就是了
}
HttpCookie cookieValue;
string currentUser;
public object getCookie()
{
//HttpCookie cookieValue = new HttpCookie("iPlanetDirectoryPro");
cookieValue = HttpContext.Current.Request.Cookies["iPlanetDirectoryPro"];
if (cookieValue != null)
return cookieValue.Value;
else
return null;
}
protected void Page_Load(object sender, EventArgs e)
{
object idstar = Server.CreateObject("Idstar.IdentityManager");
getCookie();
string currentUser = idstar.GetCurrentUser["" + Server.UrlDecode(cookieValue)];
if (Request.Cookies["iPlanetDirectoryPro"] != null)
{
sno = currentUser.ToString();
Response.Write(SysOperation.OpenDialog(
sno));//test show
Student_Teacher_Login(sno);
}
else
{
Response.Write(SysOperation.OpenDialog(
"无法获取URL参数,请检查登录..."));
Response.Write("<script>history.back()</script>");
return;
}
}