예제 #1
0
파일: index.php 프로젝트: nashvail/100acres
<?php

require 'UsersDatabase.php';
require 'PropertiesDatabase.php';
require 'helpers/adminManager.php';
session_start();
// Array to store login errors if they occur
$loginerrors = isset($_SESSION['loginerrors']) ? $_SESSION['loginerrors'] : [];
$fields = isset($_SESSION['fields']) ? $_SESSION['fields'] : [];
// Database connections
$usersData = new UsersDatabase('data/users.json');
$propertiesData = new PropertiesDatabase('data/properties.json');
if (isset($_SESSION['username'])) {
    $username = $_SESSION['username'];
    $name = $usersData->userFullName($username);
    $properties = $propertiesData->buyableProperties($username);
}
?>

<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>100Acres - Buy Sell Properties</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">