*
*
Home
Help
Login
Register
Welcome, Guest. Please login or register.
March 05, 2014, 06:31:56 PM

Login with username, password and session length
Forum changes: Editing of posts has been turned off until further notice.
Search:     Advanced search
275647 Posts in 27717 Topics by 4283 Members Latest Member: - otto Most online today: 55 - most online ever: 429 (November 03, 2007, 04:35:43 AM)
Pages: 1 [2]
Print
Author Topic: Character Generation Quick Reference Package  (Read 2044 times)
arxhon
Member

Posts: 254


« Reply #15 on: March 13, 2003, 02:25:48 PM »

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.
Logged
Jake Norwood
Member

Posts: 2261


WWW
« Reply #16 on: March 13, 2003, 03:36:25 PM »

My server sucks, but it does support ASP.

Jake
Logged

"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
Member

Posts: 6


« Reply #17 on: March 13, 2003, 04:17:33 PM »

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
Logged
arxhon
Member

Posts: 254


« Reply #18 on: March 13, 2003, 04:32:08 PM »

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:
Code:

<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
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.

Code:
<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
Code:
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.
Logged
Jake Norwood
Member

Posts: 2261


WWW
« Reply #19 on: March 14, 2003, 12:28:12 AM »

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

Jake
Logged

"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
Member

Posts: 340


« Reply #20 on: March 14, 2003, 01:25:18 PM »

Great stuff, that sheet.
Very useful for in-game reference as well, especially the skill defaults and maneuver lists.
Logged

Joakim (with a k!) Israelsson
arxhon
Member

Posts: 254


« Reply #21 on: March 14, 2003, 06:19:34 PM »

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.
Logged
Pages: 1 [2]
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Oxygen design by Bloc
Valid XHTML 1.0! Valid CSS!