Exemple #1
0
<!DOCTYPE html>
<html >
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <title>Assignment_5</title>
</head>
<body>
  <?php 
require_once '../php/data.php';
$data = new reviewsFormation();
$deletion = $data->deleteUsersById($_POST['userID']);
echo 'Deletion successful, click back to <a href="../php/adminUsers.php"> My_Post </a> .';
?>
</body>
</html>
Exemple #2
0
  <body>
    <div class="container">

      <?php 
include_once 'header.php';
?>

      <div class="content-wrap">
        <div class="content">

          <h1> Reviews Adminstrator Settings </h1>

          <article>
            <?php 
require_once 'data.php';
$data = new reviewsFormation();
$reviewEntries = $data->joinTables();
if (count($reviewEntries) != 0) {
    foreach ($reviewEntries as $blog) {
        if ($blog["AirportID"] == 1) {
            $airportName = "JFK International Airport";
        }
        if ($blog["AirportID"] == 2) {
            $airportName = "San Francisco International Airport";
        }
        if ($blog["AirportID"] == 3) {
            $airportName = "Houston George Bush Intercontinental Airport";
        }
        if ($blog["AirportID"] == 4) {
            $airportName = "Miami International Airport";
        }
Exemple #3
0
    <div class="container">

      <?php 
include_once 'header.php';
?>

      <div class="content-wrap">
        <div class="content">

					<?php 
include_once '../includes/db_connect.php';
include_once '../includes/functions.php';
sec_session_start();
if (isset($_SESSION['role']) && $_SESSION['role'] == 1) {
    require_once 'data.php';
    $data = new reviewsFormation();
    //$data->getUser ("1");
    $alluser = $data->getAllUsers();
    //var_dump($latestPost);
}
?>


					<table>
						<tr>
							<td align="left">
								<?php 
if (!isset($_SESSION['username'])) {
    ?>
									<table border="0" class="f14" cellspacing="1" cellpadding="4">
										<tr >
Exemple #4
0
            <h2><?php 
echo $airport->name();
?>
 International Airport Car Rentals</h2>
            <br>
              <table>
              <tr>
                <th>Company</th>
                <th>Brand</th>
                <th>Price</th>
                <th>Quantity</th>
                <th>Rank</th>
              </tr>
            <?php 
require_once 'data.php';
$data = new reviewsFormation();
$rentals = $data->getRentals($airportID);
if (count($rentals) != 0) {
    foreach ($rentals as $blog) {
        $temp = $data->getRentalCompany($blog["companyid"]);
        $companyName = $temp[0];
        echo "<tr>";
        echo "<td>" . $companyName["Name"] . "</td>";
        echo "<td>" . $blog["carbrand"] . "</td>";
        echo "<td>" . $blog["price"] . "</td>";
        echo "<td>" . $blog["quantity"] . "</td>";
        echo "<td>" . $blog["rank"] . "</td>";
        echo "</tr>";
    }
}
?>
<!DOCTYPE html>
<html>

<head>
    <title>Review Status</title>
</head>

<body>
    <h1>Review Status</h1>

    <article>        
    <?php 
require_once 'data.php';
include_once 'includes/db_connect.php';
include_once 'includes/functions.php';
$data = new reviewsFormation();
$succeeded = false;
//echo $_POST["status"] . "<br>";
//echo $_POST["title"] . "<br>";
//echo $_POST["content"] . "<br>";
//echo $_POST["rank"] . "<br>";
//echo $_POST["review_id"] . "<br>";
//echo $_POST["airport_id"] . "<br>";
if (isset($_POST["status"]) && $_POST["status"] == 1) {
    if (isset($_POST["title"]) && isset($_POST["content"]) && isset($_POST["rank"]) && isset($_POST["review_id"]) && isset($_POST["airport_id"])) {
        $title = strip_tags($_POST["title"]);
        $content = strip_tags($_POST["content"]);
        $rank = $_POST["rank"];
        $airportName = $_POST["airport_id"];
        $review_id = $_POST["review_id"];
        $airport_id = 0;
Exemple #6
0
include_once 'header.php';
?>

      <!-- page content -->
      <div class="content-wrap">
        <div class="content">
          <?php 
if (login_check($mysqli) == true) {
    ?>
              <p>Welcome <span style="color: #5B9DDE; font-weight: bold;"><?php 
    echo htmlentities($_SESSION['username']);
    ?>
</span>!</p><br>

              <article> <?php 
    $data = new reviewsFormation();
    $username = $_SESSION["username"];
    $temp = true;
    $existing = $data->getUsersDetails($username);
    $reviewEntries = $data->joinTables();
    if (isset($_SESSION["role"])) {
        if ($_SESSION["role"] == 1) {
            echo '<p class="notice">You are logged in as an administrator.</p><br>';
            echo '<div class="admin-panel"><h3>Admin Panel</h3><br><ul>' . '<li class="button"><a href="reviewsAdmin.php">Manage Reviews</a></li>' . '<li class="button"><a href="adminUsers.php">Manage Users</a></li>' . '<li class="button"><a href="flightsAdmin.php">Manage Flights</a></li>' . '</ul></div><br>';
        }
    }
    if (isset($_SESSION["role"])) {
        if ($_SESSION["role"] == 0 || $_SESSION["role"] == 1) {
            echo '<p><a href="title_content_uploader.php"><span style="font-weight:bold">Submit a new Review</span></a></p><br>';
            echo '<p>My Review History:</p><br>';
        }
Exemple #7
0
      <?php 
include_once 'header.php';
?>

      <div class="content-wrap">
        <div class="content">

          <h1>Blog Submittion Status</h1>

          <article>
          <?php 
require_once 'data.php';
include_once '../includes/db_connect.php';
include_once '../includes/functions.php';
$data = new reviewsFormation();
$succeeded = false;
if (isset($_POST["title"]) && isset($_POST["content"]) && isset($_POST["rank"])) {
    $title = strip_tags($_POST["title"]);
    $content = strip_tags($_POST["content"]);
    $rank = $_POST["rank"];
    $airportName = $_POST["airport_id"];
    $userid = 1;
    $airport_id = 0;
    if ($airportName == "JFK International Airport") {
        $airport_id = 1;
    }
    if ($airportName == "San Francisco International Airport") {
        $airport_id = 2;
    }
    if ($airportName == "Houston George Bush Intercontinental Airport") {