Exemplo n.º 1
0
<?php

require_once '../resources/core/init.php';
$pageTitle = "About CloudEther";
require_once RESOURCE_DIR . 'templates/header.php';
?>
<body>
<!-- Navigation Menu Starts -->
<?php 
if (LoginCheck::isLoggedInAsAdmin()) {
    require_once RESOURCE_DIR . 'templates/admin_navigation.php';
} elseif (LoginCheck::isLoggedIn()) {
    require_once RESOURCE_DIR . 'templates/logged_in_navigation.php';
} else {
    require_once RESOURCE_DIR . 'templates/navigation.php';
}
?>
<!-- Navigation Menu Ends -->
<!-- Content Starts -->
<div class="container" id="mainContentBody">
	<div class="jumbotron text-center">
		<h1>CloudEther Sale!</h1><br />
		<p>
			Freedom discount! Are you full of patriotism? Do you love America? Do you care about Justice? Other America themed buzzwords? SIGN UP NOW!
		</p>
		<p>
			If you sign up before July 4th, 2015, you get a free two months of VPN support and an ASCII Picture of an American Flag! You know… for freedom.
		</p><br />
		<a href="/contact.php" class="btn btn-default btn-primary">Contact Now</a>
	</div>
Exemplo n.º 2
0
<?php

require_once '../../resources/core/init.php';
if (LoginCheck::isLoggedInAsAdmin()) {
    $clients = new Clients();
    if (isset($_POST['delete_client']) && isset($_POST['client_username'])) {
        $clients->deleteClientFromPOST();
    } else {
        $allClients = $clients->getClients();
    }
    require_once RESOURCE_DIR . '/views/current_clients.php';
} else {
    header('location: /admin.php');
}
$logincheck;
$errorMessage;
session_start();
if (!isset($_SESSION['loginAttempts'])) {
    $_SESSION['loginAttempts'] = 0;
}
$url;
if ($_SESSION['loginAttempts'] > 2) {
    //exceeded logins
    $errorMessage = "<div><p>Error: Number of Login Attempts Exceeded</p></div>";
    session_start();
    $_SESSION['errorMessage'] = $errorMessage;
    header('Location: ../index.php');
} else {
    if ($account === "login") {
        $logincheck = new LoginCheck("localhost", "application", "root", "", $username, $password);
        if ($logincheck->doCheck() == true) {
            echo "fetched successfully";
            session_start();
            $_SESSION['username'] = $logincheck->profile->getUsername();
            $_SESSION['password'] = $logincheck->profile->getPassword();
            $_SESSION['type'] = $logincheck->profile->getType();
            $_SESSION['fName'] = $logincheck->profile->getFirstName();
            $_SESSION['lName'] = $logincheck->profile->getLastName();
            $_SESSION['sex'] = $logincheck->profile->getSex();
            $_SESSION['birthdate'] = $logincheck->profile->getBirthDate();
            $_SESSION['maddress'] = $logincheck->profile->getMAddress();
            $_SESSION['city'] = $logincheck->profile->getCity();
            $_SESSION['state'] = $logincheck->profile->getState();
            $_SESSION['zipcode'] = $logincheck->profile->getZipCode();
            $_SESSION['telephone'] = $logincheck->profile->getTelephone();