Server IP : 172.16.15.8 / Your IP : 18.116.52.43 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; $fire = $_SESSION['fire']; $_SESSION['fire'] = $fire; $water = $_SESSION['water']; $_SESSION['water'] = $water; $earth = $_SESSION['earth']; $_SESSION['earth'] = $earth; $music = $_SESSION['music']; $_SESSION['music'] = $music; $apple = $_SESSION['apple']; $_SESSION['apple'] = $apple; $diamond = $_SESSION['diamond']; $_SESSION['diamond'] = $diamond; $host = 'localhost'; $user = 'rlbarner'; $passwd = 'cs480'; $database = 'rlbarner'; $connect = mysql_connect($host, $user, $passwd); $table_name = 'CYOAUsers'; // polling table to see if UN & PW combo exist $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)) { $amendq = "UPDATE $table_name SET StartCYOA = StartCYOA + 1 WHERE Username = '$username' && Password = '$password'"; mysql_select_db($database); $amendr = mysql_query($amendq, $connect); if($amendr) { $picked = rand(1, 3); if($picked == 1) { print '<META HTTP-EQUIV="Refresh" Content="0; URL=firelanding.php">'; exit; } else if($picked == 2) { print '<META HTTP-EQUIV="Refresh" Content="0; URL=waterlanding.php">'; exit; } else if($picked == 3) { print '<META HTTP-EQUIV="Refresh" Content="0; URL=earthlanding.php">'; exit; } else { print '<META HTTP-EQUIV="Refresh" Content="0; URL=cyoaloginactionb.php">'; } } 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>."; } } ?>