window.location = 'login.html?nogood=1'; "; exit; } //echo "ok"; exit; $username=$_POST['username']; $password=$_POST['password']; $nogoodall=1; $row = mysqli_fetch_array(mysqli_query($GLOBALS['conn'],"SELECT * FROM affiliate where email ='$username' and password = '$password';")); //echo count($row); exit; if (count($row)==1) { unset($_SESSION['affiliateID']); } else { $_SESSION['affiliateID']=$row['affiliateID']; $_SESSION['firstname']=$row['firstname']; $_SESSION['lastname']=$row['lastname']; $_SESSION['username']=$row['email']; $nogoodall=0; } $row = mysqli_fetch_array(mysqli_query($GLOBALS['conn'],"SELECT * FROM contributors where email ='$username' and password = '$password';")); if (count($row)==1) { unset($_SESSION['contributorID']); } else { $_SESSION['contributorID']=$row['contributorID']; $_SESSION['firstname']=$row['firstname']; $_SESSION['lastname']=$row['lastname']; $_SESSION['username']=$row['email']; $_SESSION['contributorCourses']=$row['courses']; $nogoodall=0; } $row = mysqli_fetch_array(mysqli_query($GLOBALS['conn'],"SELECT * FROM users where username ='$username' and password = '$password';")); //echo count($row); exit; if (count($row)==1) { unset($_SESSION['userID']); } else { $nogoodall=0; $_SESSION['firstname']=$row['firstname']; # check to see if cookies are enable. if not, give disclaimer and exit. if (!isset($_SESSION['firstname'])) { echo " Your browser appears to have cookies disabled. Folio Academy needs cookies enabled for our site in order to function properly. Please enable cookies for folioacademy.com. We will never use cookies for any kind of tracking or commercial purpose. They are used solely to facilitate logging in and viewing videos. They will be deleted when you close your browser window. "; //echo ""; //include("footer.html"); exit; } $_SESSION['userID']=$row['userID']; $_SESSION['username']=$row['username']; $_SESSION['lastname']=$row['lastname']; $_SESSION['email']=$row['email']; $_SESSION['gender']=$row['gender']; $_SESSION['age']=$row['age']; $userID=$row['userID']; # get all the videos he's bought $_SESSION['courses']=''; setcourses($userID); # loginstats $elements = explode(".", $_SERVER['REMOTE_ADDR']); $useragent=$_SERVER['HTTP_USER_AGENT']; $ipnum = 16777216*$elements[0] + 65536*$elements[1] + 256*$elements[2] + $elements[3]; mysqli_query($GLOBALS['conn'],"INSERT INTO loginstats (userID, ipAddress, theTime, useragent) VALUES('$userID', '$ipnum', NOW(), '$useragent') "); } #echo "id ".$_SESSION['userID']."
"; #echo "username ".$_SESSION['username']."
"; #echo "lastname ".$_SESSION['lastname']."
"; #echo "email ".$_SESSION['email']."
"; //exit; if ($nogoodall==1) { //echo "nogood"; echo ""; exit; } else { //$sessionid=session_id(); echo ""; exit; } } ?>
Sorry. We have no record of that email address."; } else { $username=$row['username']; $password=$row['password']; echo "
Thank you. An email has been sent with your sign in information. Please check your email.
"; $message = "You requested us to provide you with a forgotten username or password. Here is the information: username: $username password: $password Please sign in to access your video courses at http://folioacademy.com/login.html regards, the Folio Academy team. "; logmail( $forgotemail, 'Your sign in information', $message, "From: admins@folioacademy.com" ); } echo "
"; include("footer.html"); exit; } if (isset($_GET['forgot'])) { echo "



Forgotten Password or Username


Type in the email address you used to purchase your courses. We will send your sign in information to that email address. If you don't know that email address, or it has changed, please contact us for further assistance.

email address:
"; echo "
"; echo ""; include("footer.html"); exit; } if (isset($_GET['nogood'])) { $badtext='
Invalid username or password. Please try again.
'; } else { $badtext=''; } ?>




Note: If you do not yet have an account, you must first purchase a video course in our store, and you will then be emailed instructions on how to create your account and view your courses. If you have problems, please contact our customer care team.



              Username:

              Password: 

              forgot username or password?