Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////main.php/////////////
- <div id="background">
- <img src="images/background.jpg" class="stretch" alt="" />
- </div>
- <div id="main">
- <?php
- if(!isset($_SESSION))
- {
- session_start();
- }
- echo session_id();
- if ($_SESSION['account'] == "") {
- include "intro.php";
- echo '<h3><hr>You are not logged in<br>
- Please login on LTG first.<br>
- ';
- include "login.php";
- include "register.php";
- }
- else {
- include "info.php";
- if ($_GET['shop'] != 1) {
- include "skills.php";
- include "messages.php";
- }
- else {
- include "shop.php";
- }
- }
- ?>
- </div>
- ///////////////////////////login.php///////////////////
- <?php
- echo session_id();
- $account_log = $_POST['account_log'];
- $password_log = $_POST['password_log'];
- mysql_stuff
- $login=mysql_query("SELECT * FROM accounts WHERE username = '$account_log'");
- mysql_close();
- $password=mysql_result($login,0,"password");
- if (($password == $password_log) && ($password !="")) {
- $_SESSION['account'] = $account_log;
- $_SESSION['password'] = $password_log;
- $_SESSION['profile'] = $account_log;
- echo "<meta http-equiv='refresh' content='1'>
- ";
- }
- if (($account_log != "") && ($_SESSION['account'] != "")) {
- sleep(1);
- echo "<font color='red'><h2>Invalid username or password</font></h2>";
- $account_log = "";
- }
- echo "
- <br>
- <form name='account' action='main.php' method='post'><h3>
- Username: <input name=account_log SIZE=12><br>
- Password: <input type='password' name=password_log SIZE=12><br>
- <input type='submit' value='Login' />
- </form>
- <hr>
- ";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement