| |
jlstlouis
Posts: 1
Score: 0
Joined: 9/23/2001
From: USA
Status: offline
|
I am currently working on a chatroom and I have a little dilemma... What I want to do is when the user gets signed in I want a link of some sort that (that says ADMIN) will pop up a little alert() screen that will prompt the user for a password. I want the password to be stored in a db file. Then once the password has been accepted I want the link on the page to be replaced with a button that allows the user to kick people in the list. Thanks in advance! Here is the existing code... <% ' PortaChat 1.3 ' Author: Peter Brunone ' Release Date: December 12, 2000 ' Contact: peterbrunone@aspalliance.com Option Explicit dim strChatName strChatName = Request("ChatName") %> <HTML> <HEAD> <TITLE>Chat Room App</TITLE> <!--#include file="style.asp"--> <SCRIPT LANGUAGE="JavaScript"> function logout() { if(document.mainForm.logout.value != "true") { document.mainForm.chatSubmit.value = "log out"; document.mainForm.submit(); } } </SCRIPT> </HEAD> <BODY BGCOLOR="<%=strFrameColor%>" onUnload="logout()"> <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT="260" width="151"> <TR> <TD height="250" width="149" VALIGN="TOP" ALIGN="LEFT"> <HR SIZE=1> Chat Menu <HR SIZE=1> <DIV ID="chatNameDiv"><B><%=Replace(strChatName,"'","\'")%></B></ DIV> <BR> Logged in at <%=Time%> <BR> <BR> <B>Settings:</B> <FORM NAME="mainForm" TARGET="inputFrame" ACTION="input.asp" METHOD="POST"> <p align="right"> <INPUT TYPE="HIDDEN" NAME="logout"> <INPUT TYPE="HIDDEN" NAME="chatSubmit"> <!--<INPUT TYPE="HIDDEN" NAME="chatName" onChange="layerWrite('chatNameLayer',null,'<B>' + this.value + '</B>')">--> Font: <font size="2"> <SELECT NAME="Font" onChange="top.inputFrame.document.mainForm.Font.value=this.o ptions[this.options.selectedIndex].text;"> <%WriteFonts%> </SELECT> </font> <BR> Size: <font size="2"> <SELECT NAME="Size" onChange="top.inputFrame.document.mainForm.Size.value=this.o ptions[this.options.selectedIndex].text;"> <%WriteSizes%> </SELECT> </font> <BR> Color: <font size="2"> <SELECT NAME="Color" onChange="top.inputFrame.document.mainForm.Color.value=this. options[this.options.selectedIndex].text;"> <%WriteColors%> </SELECT> </font> <BR> <!-- <INPUT TYPE="CHECKBOX" NAME="Remember" <%If UCase(Request.Cookies("remember")) = "TRUE" Then%>CHECKED<%End If%>> Save --> </FORM> </TD> </TR> <TR> <TD height="22" VALIGN="TOP" ALIGN="CENTER" width="149"> <p align="left"><strong>Who's Chatting?</strong> <TR> <TD height="220" VALIGN="TOP" ALIGN="CENTER" width="149"> <div id="List" style="width: 152; height: 190"> <select name=strUsers multiple size=7 style ="width:150" value="strUsers"> </select></div> </TD> </TR> </TABLE> </BODY> </HTML> <!--webbot bot="HTMLMarkup" --> joseph st. louis
|
|