News:

Forum changes: Editing of posts has been turned off until further notice.

Main Menu

Character Generation Quick Reference Package

Started by arxhon, March 13, 2003, 02:50:34 AM

Previous topic - Next topic

arxhon

Thanks for not kicking my ass, Jake. :-)

For the code, i agree with jllama. ASP would be better, as it is more secure.

If the server is IIS based, then you shouldn't have any problem, ASP code is nice and simple.

Currently, I'm not using an exact word x on pg y, (i considered the fact that there are 2 editions) but more of a "tell me what this says here in this section?", which is different for everybody.

Example (i'm not using this one as a question): What are the six triads of the moon called(pg 181)? You really need the book for this one.

Personally, i'd rather this all be in Jake's hands. It's his property by right, and the package is definitely popular.

Jake Norwood

My server sucks, but it does support ASP.

Jake
"Civilized men are more discourteous than savages because they know they can be impolite without having their skulls split, as a general thing." -R.E. Howard The Tower of the Elephant
___________________
www.theriddleofsteel.NET

jllama

Try this.  Hopefully the html in the post will be disabled correctly.

pwordPage.asp:

<html><head></head>
<body>
<form name="form1" method="post" action="membersOnly.asp">
Enter the Members Only Password:
<input type=text id="pword" name=pword>



<input type="submit" value=" Submit ">
</form></body></html>

membersOnly.asp:

<html><head></head>
<body>
<% if not(Request.Form("pword") = "pword") then %>
   I'm sorry.  You did not enter the correct password. Try again. (Any HTML could go here).
<%
     Response.End
     end if%>
Welcome to the Members Only page!  Thanks for coming! (any HTML could go here)
</body></html>

It's pretty simple, but you should get the idea.  If you have any problems, just ask.  

Later,
Cody

arxhon

Ok, jllama, i'm counting on you to catch any arrors that i may make.
Jake, you mentioned you know JavaScript, so I'm assuming that you know how to write  if..then statements.

step 1. You need to create the login page, and rather than having it as a *.htm file, you should save it as a *.asp file. You don't have to, but most programmers will, just out of habit, in case they want to add any ASP to this page later on. That  way, they don't have to change all the links to this page when they change the extension. You need an .asp extension to run ASP code.

Step 2. You need to create a form on the page you want the password to be entered from.

something like:
<form name="username" action="login.asp" method="get">
    <p align="center">Password:
    <input type="password" length="8" name="login" ><br>
    <input type="submit" value=" submit ">
    </form>


This will create the form that captures the text and passes it to the next page. I'm assuming you know how to modify the attributes of a form. Note the name attribute.

Step 3. On the verification page, you need to do the following. Create it with a .asp extension. You MUST do this, or it will not run.

enter the code <%
 option explicit
%>


Before you enter anything else on the page. This must be the first text on the page. Even before meta tags, body and head tags. All HTML and other codes must go after.

Step 4 Enter the following code somewhere. Doesn't matter where. Near the top is best, though.

<html>
<body>
<head>stuff
</head>
<%  
select case request.querystring("login")

  case "password" 'whatever the password is
  response.write"Write your HTML here"
  response.write"Write more HTML here"

case else 'catch bug script
   response.write "<p class=head>Status:  Login Fail....</p>"

end select
%>
</body>
</html>


The "select" gets the information from the form, looking at the name attribute from the form.
The "case" checks for the correct password. If the text and the case match, then the page will write whatever you want, via the response.write"stuff that you want to write goes in these quotes"

The "case else" is to catch failed in attempts and spits back a login failed message.

The "end select" simply tells IIS to stop looking for cases.

You don't have to worry about the stuff being visible to people who try to view source. ASP is run on the server before it is spit out to the end user's machine. All he will see is the HTML and JavaScript result.

This should do the trick. If you have problems, i can help, or i'm sure jllama would love to do the same as well.

Edit: crosspost with jllama. He got to it first.

Jake Norwood

Thanks, guys. I'll try to put this together after I get back from GTS.

Jake
"Civilized men are more discourteous than savages because they know they can be impolite without having their skulls split, as a general thing." -R.E. Howard The Tower of the Elephant
___________________
www.theriddleofsteel.NET

Mokkurkalfe

Great stuff, that sheet.
Very useful for in-game reference as well, especially the skill defaults and maneuver lists.
Joakim (with a k!) Israelsson

arxhon

Thanks, Mokkurkalfe.

I'm glad you find it useful, especially for play. That's why i included the skill defaults and maneuvers. Sure beats flipping through the book in the middle of combat.