Luk vindue og redirect ???????
Hej EksperterJeg har et parrant vindue som åbner et child
vindue. Derefter vil jeg gerne have et link
på child vinduet der:
1. lukker child vinduet
2. redirecter parrent vinduet
Link til admin:
http://iceb.dk/chat/l1977.asp
HUSK at klikke ind på admin linket........
Kode til admin.asp:
<!-- #include file="simpelchat.inc.asp" -->
<%
Response.Buffer = True
Mode = Request("mode")
If Mode = "" Then
End If
If Mode = "login" Then
%>
<html>
<head>
<title><%= ChatTitle %></title>
</head>
<frameset framespacing="1" border="0" frameborder="0" rows="25,*">
<frame src="admin.asp?mode=admin_header" marginwidth="25" marginheight="0" scrolling="no" noresize>
<frame src="admin.asp?mode=admin_login" marginwidth="20" marginheight="20" scrolling="auto" noresize>
<noframes>
<body>
</body>
</noframes>
</frameset>
</html>
<%
End If
If Mode = "admin_header" Then
%>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<style>
<!--
td { font-family: Verdana; font-size: 8 pt }
-->
</style>
</head>
<body bgcolor="<%= BGColor1 %>" text="<%= TextColor1 %>" link="<%= LinkColor1 %>" alink="<%= LinkColor1 %>" vlink="<%= LinkColor1 %>">
<table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0">
<tr>
<td valign="middle" align="left"><b>Administrator funktioner</b></td>
</tr>
</table>
</body>
</html>
<%
End If
If Mode = "admin_login" Then
%>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<style>
<!--
td { font-family: Verdana; font-size: 8 pt }
-->
</style>
<script language="JavaScript">
<!--
function CheckLogin() {
if (document.adminFrm.password.value == "") {document.adminFrm.password.focus();return false;}
}
// -->
</script>
</head>
<body bgcolor="<%= BGColor2 %>" text="<%= TextColor2 %>" link="<%= LinkColor2 %>" alink="<%= LinkColor2 %>" vlink="<%= LinkColor2 %>" onload="java script:adminFrm.password.focus();">
<table border="0" width="100%" cellspacing="0" cellpadding="5">
<tr>
<td valign="top" align="left"><b><u>Beskyttet område</u></b></td>
</tr>
<tr>
<td valign="top" align="left">Skriv din adgangskode i boksen nedenfor.</td>
</tr>
<tr>
<td valign="top" align="left">
<table border="0" cellspacing="0" cellpadding="5">
<form method="POST" action="admin.asp" name="adminFrm" onsubmit="java script:return CheckLogin();">
<input type="hidden" name="mode" value="activate">
<tr>
<td valign="middle" align="left"><input type="password" name="password" size="15" maxlength="10" style="font-family: Verdana; font-size: 8 pt"></td>
<td valign="middle" align="left"><input type="submit" value="Login" style="font-family: Verdana; font-size: 8 pt"></td>
</tr>
</form>
</table>
<p align="right">
<a href="java script:open.location.replace('http://jubii.dk/');">Luk</a>
</body>
</html>
<%
End If
If Mode = "activate" Then
If Request("password") = AdminPassword Then
Response.Redirect "admin.asp?mode=activated&password=" & Request("password")
Else
Response.Redirect "admin.asp?mode=admin_login"
End If
End If
If Mode = "activated" Then
If Request("password") = AdminPassword Then
If Request("action") = "" Then
%>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<style>
<!--
td { font-family: Verdana; font-size: 8 pt }
-->
</style>
</head>
<body bgcolor="<%= BGColor2 %>" text="<%= TextColor2 %>" link="<%= LinkColor2 %>" alink="<%= LinkColor2 %>" vlink="<%= LinkColor2 %>">
<table border="0" width="100%" cellspacing="0" cellpadding="5">
<tr>
<td valign="top" align="left"><b><u>Hovedmenu</u></b></td>
</tr>
<tr>
<td valign="top" align="left"><a href="admin.asp?mode=activated&password=<%= Request("password") %>&action=removeuser">Slet
bruger</a> - <a href="admin.asp?mode=activated&password=<%= Request("password") %>&action=removeallusers">Slet
alle brugere</a> - <a href="admin.asp?mode=activated&password=<%= Request("password") %>&action=resetmessages">Nustil
beskeder</a></td>
</tr>
</table>
<br><br>
<p align="right">
<a href="java script:top.window.close()">Luk dette vindue</a>
</body>
</html>
<%
End If
If Request("action") = "removeuser" Then
If Request("userid") = "" Then
%>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<style>
<!--
td { font-family: Verdana; font-size: 8 pt }
-->
</style>
</head>
<body bgcolor="<%= BGColor2 %>" text="<%= TextColor2 %>" link="<%= LinkColor2 %>" alink="<%= LinkColor2 %>" vlink="<%= LinkColor2 %>">
<table border="0" width="100%" cellspacing="0" cellpadding="5">
<tr>
<td valign="top" align="left"><b><u>Slet bruger</u></b></td>
</tr>
<%
If Application("chatusers") = 1 Then
%>
<tr>
<td valign="top" align="left"><a href="admin.asp?mode=activated&password=<%= Request("password") %>">Tilbage</a></td>
</tr>
<%
Else
%>
<tr>
<td valign="top" align="left"><a href="admin.asp?mode=activated&password=<%= Request("password") %>">Annuller</a></td>
</tr>
<%
End If
%>
<tr>
<td valign="top" align="left">
<table border="0" cellspacing="0" cellpadding="5">
<%
If Application("chatusers") = 1 Then
%>
<tr>
<td valign="top" align="left">Der er ingen aktive brugere i chatten.</td>
</tr>
<%
Else
For x = 1 To Application("chatusers")
If Application("chatuser_" & x) <> Session("chatname") Then
%>
<tr>
<td valign="top" align="left"><a href="admin.asp?mode=activated&password=<%= Request("password") %>&action=removeuser&userid=<%= x %>">Slet</a></td>
<td valign="top" align="left"><font color="#00FF00"><b><% Response.Write Application("chatuser_" & x) %></b></font></td>
</tr>
<%
End If
Next
End If
%>
</table>
</td>
</tr>
</table>
</body>
</html>
<%
Else
If Request("confirm") = "" Then
%>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<style>
<!--
td { font-family: Verdana; font-size: 8 pt }
-->
</style>
</head>
<body bgcolor="<%= BGColor2 %>" text="<%= TextColor2 %>" link="<%= LinkColor2 %>" alink="<%= LinkColor2 %>" vlink="<%= LinkColor2 %>">
<table border="0" width="100%" cellspacing="0" cellpadding="5">
<tr>
<td valign="top" align="left"><b><u>Slet bruger</u></b></td>
</tr>
<tr>
<td valign="top" align="left"><a href="admin.asp?mode=activated&password=<%= Request("password") %>">Annuller</a></td>
</tr>
<tr>
<td valign="top" align="left">
<table border="0" width="100%" cellspacing="0" cellpadding="5">
<tr>
<td valign="top" align="left">Slet <font color="#00FF00"><b><%= Application("chatuser_" & Request("userid")) %></b></font>
fra den aktive brugerliste?</td>
</tr>
<tr>
<td valign="top" align="left"><a href="admin.asp?mode=activated&password=<%= Request("password") %>&action=removeuser&userid=<%= Request("userid") %>&confirm=yes">Ja</a>
/ <a href="admin.asp?mode=activated&password=<%= Request("password") %>&action=removeuser">Nej</a></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<%
Else
For x = MaxPublicMessages To 2 Step -1
Application("publicmessage_" & x) = Application("publicmessage_" & x-1)
Next
Application("publicmessage_1") = "<b><font color='" & SystemColor & "'>Chatten : Admin har smidt " & Application("chatuser_" & Request("userid")) & " af chatten...</font></b>"
Application("chatusers") = Application("chatusers") - 1
Application("chatuser_" & Request("userid")) = ""
Response.Redirect "admin.asp?mode=activated&password=" & Request("password") & "&action=removeuser"
End If
End If
End If
If Request("action") = "removeallusers" Then
If Request("confirm") = "" Then
%>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<style>
<!--
td { font-family: Verdana; font-size: 8 pt }
-->
</style>
</head>
<body bgcolor="<%= BGColor2 %>" text="<%= TextColor2 %>" link="<%= LinkColor2 %>" alink="<%= LinkColor2 %>" vlink="<%= LinkColor2 %>">
<table border="0" width="100%" cellspacing="0" cellpadding="5">
<tr>
<td valign="top" align="left"><b><u>Slet alle brugere</u></b></td>
</tr>
<%
If Application("chatusers") = 1 Then
%>
<tr>
<td valign="top" align="left"><a href="admin.asp?mode=activated&password=<%= Request("password") %>">Tilbage</a></td>
</tr>
<%
Else
%>
<tr>
<td valign="top" align="left"><a href="admin.asp?mode=activated&password=<%= Request("password") %>">Annuller</a></td>
</tr>
<%
End If
%>
<tr>
<td valign="top" align="left">
<table border="0" width="100%" cellspacing="0" cellpadding="5">
<%
If Application("chatusers") = 1 Then
%>
<tr>
<td valign="top" align="left">Der er ingen aktive brugere i chatten.</td>
</tr>
<%
Else
%>
<tr>
<td valign="top" align="left">Slet alle brugere fra den aktive brugerliste?</td>
</tr>
<tr>
<td valign="top" align="left"><a href="admin.asp?mode=activated&password=<%= Request("password") %>&action=removeallusers&confirm=yes">Ja</a>
/ <a href="admin.asp?mode=activated&password=<%= Request("password") %>">Nej</a></td>
</tr>
<%
End If
%>
</table>
</td>
</tr>
</table>
</body>
</html>
<%
Else
For x = MaxPublicMessages To 2 Step -1
Application("publicmessage_" & x) = Application("publicmessage_" & x-1)
Next
Application("publicmessage_1") = "<b><font color='" & SystemColor & "'>Chatten : Admin har smidt alle brugere af chatten...</font></b>"
For x = 1 To Application("chatusers")
If Application("chatuser_" & x) <> Session("chatname") Then
Application("chatusers") = Application("chatusers") - 1
Application("chatuser_" & x) = ""
End If
Next
Response.Redirect "admin.asp?mode=activated&password=" & Request("password")
End If
End If
If Request("action") = "resetmessages" Then
If Request("confirm") = "" Then
%>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<style>
<!--
td { font-family: Verdana; font-size: 8 pt }
-->
</style>
</head>
<body bgcolor="<%= BGColor2 %>" text="<%= TextColor2 %>" link="<%= LinkColor2 %>" alink="<%= LinkColor2 %>" vlink="<%= LinkColor2 %>">
<table border="0" width="100%" cellspacing="0" cellpadding="5">
<tr>
<td valign="top" align="left"><b><u>Nulstil beskeder</u></b></td>
</tr>
<tr>
<td valign="top" align="left"><a href="admin.asp?mode=activated&password=<%= Request("password") %>">Annuller</a></td>
</tr>
<tr>
<td valign="top" align="left">
<table border="0" width="100%" cellspacing="0" cellpadding="5">
<tr>
<td valign="top" align="left">Nulstil beskederne i chatten?</td>
</tr>
<tr>
<td valign="top" align="left"><a href="admin.asp?mode=activated&password=<%= Request("password") %>&action=resetmessages&confirm=yes">Ja</a>
/ <a href="admin.asp?mode=activated&password=<%= Request("password") %>">Nej</a></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<%
Else
For x = 1 to MaxPublicMessages
Application("publicmessage_" & x) = ""
Next
Application("publicmessage_1") = "<b><font color='" & SystemColor & "'>Chatten : Admin har nulstillet chatten...</font></b>"
Response.Redirect "admin.asp?mode=activated&password=" & Request("password")
End If
End If
Else
Response.Redirect "admin.asp?mode=admin_login"
End If
End If
%>
