Ejemplo n.º 1
0
<?php

$title = "Search Results | Alert Warrior";
require_once "../M/model.php";
$searchDefense = new defenseSystem();
$trap = $_POST["trampa1"];
$searchDefense->honeyDefense();
//searchSyllabus.php received input
$proSearch = strtoupper(strip_tags(trim($_POST['professorSearch'])));
$claSearch = strtoupper(strip_tags(trim($_POST['classSearch'])));
$match = array();
require_once "../inc/headerInc.php";
?>
  

    <div class="primary-content col" style="background-color: #EDEDED">
            <h1 style = "text-align: center">Search Results</h1>
           <?php 
if (empty($proSearch) && empty($claSearch)) {
    echo "<p style='text-align: center'>You left every single text field empty. Go back and fill in at least one of the text fields</p>";
    exit;
}
$db = new PDO("mysql:host=localhost; dbname=emerald", "Roaring20s", "September22");
//Change this now
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
try {
    $results = $db->prepare("SELECT task_identification, university_name, class_instructor FROM identification_tasks WHERE class_instructor LIKE ? AND class_instructor LIKE ?");
    $results->bindValue(1, "%" . $proSearch . "%");
    $results->bindValue(2, "%" . $claSearch . "%");
    $results->execute();
    $match = $results->fetchAll(PDO::FETCH_ASSOC);
<?php

require_once "../M/model.php";
if ($_POST['logInUser'] == "Roaring20s" && $_POST['logInPass'] == "Magnus1993") {
    header('Location: ../V/area51Cookie.php');
    exit;
}
if ((empty($_POST["signInUser"]) || empty($_POST["signInPass"])) && (empty($_POST["logInUser"]) || empty($_POST["logInPass"]))) {
    header('Location: ../V/errorPage.php?error=3');
    exit;
}
if ($_POST["signInPassAgain"] != $_POST["signInPass"]) {
    header('Location: ../V/errorPage.php?error=4');
    exit;
}
// Now what if the user successfully creates a contact, well bring him to create a syllabus, also!!! Remember to create more cookies
$contactInfoDefense = new defenseSystem();
$userSignUp = new contactInfo();
$userSignUp->uploadContactInfo($contactInfoDefense->honeyDefense());
if (!empty($_POST["signInUser"]) && !empty($_POST["signInPass"])) {
    header('Location: ../V/uploadSyllabusCookie.php');
    exit;
}
?>




<?php

$title = "Upload Alerts";
require_once "../M/model.php";
$uploadSyllabusDefense = new defenseSystem();
$printEntries = new selectEntries();
$uploadSyllabusDefense->honeyDefense();
require_once "../inc/headerInc.php";
$numOfTasks = "";
?>
  

    <div class="primary-content col" style="background-color: #EDEDED">
      <div class ="uploadSyllabusBackDrop">
        <h3 style ="text-align: center">Welcome!</h3>
        <p style="text-align: center">Now lets create the alerts</p>
        <p style="text-align: center"><span class="bigify">1.</span>Select the number of tasks (assignments, tests etc) due for this semester</p>
 
            <?php 
$printEntries->entryView();
?>
        </div>

     <div class="uploadSyllabusBackDrop2">
        <form method="post" action="../DB/uploadSyllabusDB.php" style="background-color: white">
         <p style="text-align: center"><span class="bigify">2.</span>Fill in the task fields w/ their corresponding due dates</p>
        <?php 
$monthsOfYear = array("Jan", "Feb", "Mar", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
$years = array("2015", "2016");
if (isset($_POST["uploadSyllabusSubmit"])) {
    $numOfTasks = $_POST["numberOfTasks"];