Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v0.9
Fetching contributors…

Cannot retrieve contributors at this time

executable file 40 lines (37 sloc) 1.206 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
<?php
include_once("class.User.php");
include_once("class.Topic.php");
include_once("class.Post.php");
include_once("class.Forum.php");
include_once("class.PM.php");
include_once("function.OnlineList.php");
include_once("outHtml.php");
session_start();

if (isset($_COOKIE['username']) && isset($_COOKIE['password']) && ($_SESSION['loggedIn'] == false || !isset($_SESSION['loggedIn'])))
{
$fileC = file("db/forumUsers.dat");
foreach ($fileC as $item)
{
$temp = new User($item);
if ($_COOKIE['username'] == $temp->getUserId() && $_COOKIE['password'] == $temp->getPassword())
{
setcookie("username",$_COOKIE['username'],time()+(60*60*24*14));
setcookie("password",$_COOKIE['password'],time()+(60*60*24*14));
$_SESSION['loggedIn'] = true;
$_SESSION['user'] = $temp;
}
}
}

if ($_SESSION['loggedIn'] == true)
{
addUser($_SESSION['user']->getUserId());
}
else
{
addGuest($_SERVER['SERVER_ADDR']);
}

$boardname = trim(file_get_contents("db/boardname.dat"));
$boarddescription = trim(file_get_contents("db/boarddescription.dat"));
define(BOARDNAME,$boardname);
define(BOARDDESCRIPTION,$boarddescription);
?>
Something went wrong with that request. Please try again.