Exemplo n.º 1
0
 public function showHomePage()
 {
     $newLayout = new pageTemplate();
     $newLayout->header("Boater Survey");
     $newLayout->siteBody("Boater Survey");
     $loadHome = new surveyView();
     $loadHome->newSurvey();
     $newLayout->footer();
 }
Exemplo n.º 2
0
<html>
  <head>
    <title>Boater Survey</title>
    <link rel="stylesheet" type="text/css" href="mainLayout.css" />
	<script src="//code.jquery.com/jquery-1.9.1.js"></script>
	<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
    <script src="form.js"></script>
  </head>
  <body>
	<div id='cssmenu'>
			<ul>
			   <li><a href='index.php'><span>NHVBSR</span></a></li>
			   <li><a href='survey.php'><span>Survey</span></a></li>
			   <li><a href="view.php"><span>View</span></a></li>
			   <li><a href='edit.php'><span>View/Edit</span></a></li>
			   <li><a href='#'><span>Logout</span></a></li>
			</ul>
	</div>
  
	<br><br><br>
    <div id="info">
	<h2>Boater Survey</h2>
	<hr>
      <?php 
$view = new surveyView();
$view->viewSurvey($surveyid, $_SESSION['userid']);
?>
    </div>
  </body>
</html>
Exemplo n.º 3
0
	<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
    <script src="form.js"></script>
  </head>
  <body>
	<div id='cssmenu'>
			<ul>
			   <li><a href='survey.php'><span>NHVBSR</span></a></li>
			   <li><a href='survey.php'><span>Survey</span></a></li>
			   <li><a href='view.php'><span>View</span></a></li>
			   <li><a href='edit.php'><span>View/Edit</span></a></li>
			   <li><a href='#'><span>Logout</span></a></li>
			</ul>
	</div>
  
	<br><br><br>
    <div id="info">
	<h2>Edit/Flag Survey</h2>
	<hr>
      <?php 
$user_id = 2;
if (isset($_POST['surveyID'])) {
    $surveyID = $_POST['surveyID'];
    $view = new surveyView();
    $view->editSurvey($surveyID, $_SESSION['UserID']);
} else {
    echo "Please select a survey!";
}
?>
    </div>
  </body>
</html>
Exemplo n.º 4
0
    <title>Boater Survey</title>
    <link rel="stylesheet" type="text/css" href="mainLayout.css" />
	<script src="//code.jquery.com/jquery-1.9.1.js"></script>
	<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
    <script src="form.js"></script>
  </head>
  <body>
  
  	<div id='cssmenu'>
			<ul>
			   <li><a href='survey.php'><span>NHVBSR</span></a></li>
			   <li><a href='lakeHostHome.php'><span>Manage Lake Hosts</span></a></li>
			   <li><a href='survey.php'><span>Survey</span></a></li>
			   <li><a href='view.php'><span>View</span></a></li>
			   <li><a href='edit.php'><span>View/Edit</span></a></li>
			   <li><a href='reports.php'><span>Reports</span></a></li>
			   <li><a href='index.php'><span>Logout</span></a></li>
			</ul>
	</div>
	<br><br><br>
    <div id="info">
	<h2>Boater Survey</h2>
	<hr>
      <?php 
$view = new surveyView();
$view->newSurvey();
?>
    </div>
  </body>
</html>
Exemplo n.º 5
0
  
  	<div id='cssmenu'>
			<ul>
			   <li><a href='index.php'><span>NHVBSR</span></a></li>
			   <li><a href='survey.php'><span>Survey</span></a></li>
			   <li><a href='view.php'><span>View</span></a></li>
			   <li><a href='edit.php'><span>View/Edit</span></a></li>
			   <li><a href='#'><span>Logout</span></a></li>
			</ul>
	</div>
	<br><br><br>
    <div id="info">
	<h2>Boater Survey List</h2>
	<hr>
      <?php 
$view = new surveyView();
$controller = new surveyController();
if (isset($_POST['submitButton'])) {
    // When a user clicks the submit button a list of surveys will be displayed.
    if (isset($_POST['SiteID'])) {
        $ID = $_POST['SiteID'];
        // Get the site id from the $_POST array.
        $view->viewSiteSurveys($ID);
    } else {
        // if site id is not been selected.
        echo "Select a site please!";
    }
} else {
    // If submit button is not been set that means the user is coming from a page different than $server_self. In this case display a list of access site.
    $controller->viewAccessSites();
}
Exemplo n.º 6
0
$db1 = new db1();
$accessSites = $db1->getAccessSites();
$self = htmlspecialchars($_SERVER["PHP_SELF"]);
//The information of the form will be sent back to self. This is done to change the content of the page when the submit button is clicked.
$numberOfSites = count($accessSites['SiteID']);
//Number of sites found in the database is equal to number of site IDs.
echo "<form method='post' action='{$self}'>";
//This is the HTML form header.
for ($i = 1; $i <= $numberOfSites; $i++) {
    $SiteName = $accessSites['SiteName'][$i - 1];
    $SiteID = $accessSites['SiteID'][$i - 1];
    echo "<option value='{$SiteID}'>{$SiteName}</option>";
}
?>
		<input type="submit" value="Sort">
	
	<?php 
$view = new surveyView();
if (isset($_POST['sort'])) {
    $view->viewAggregateData($_POST['sort'], $_POST['sites']);
} else {
    $x = "day";
    $view->viewAggregateData($x, 1);
}
?>
	  
	  
    </div>
  </body>
</html>
Exemplo n.º 7
0
<div id='cssmenu'>
    <ul>
        <li><a href='survey.php'><span>NHVBSR</span></a></li>
        <li><a href='lakeHostHome.php'><span>Manage Lake Hosts</span></a></li>
        <li><a href='survey.php'><span>Survey</span></a></li>
        <li><a href='view.php'><span>View</span></a></li>
        <li><a href='edit.php'><span>View/Edit</span></a></li>
        <li><a href='reports.php'><span>Reports</span></a></li>
        <li><a href='index.php'><span>Logout</span></a></li>
    </ul>
</div>
<br><br><br>

<div id="info">
    <h2>Boater Survey List</h2>
    <hr>
    <?php 
//$user_id = 3;
$model = new surveyModel();
$view = new surveyView();
$role = $model->getUserRole($_SESSION['UserID']);
if ($role == "StaffMember") {
    header('Location: view\\accessSitesPage.php');
} else {
    $view->viewSurveysList($_SESSION['UserID']);
}
?>
</div>
<!-- comment -->
</body>
</html>
Exemplo n.º 8
0
<?php

require_once 'C:\\devel\\web\\php\\control\\MainController.php';
//require_once 'C:\\devel\\web\\php\\index.php';
# Check if a cookie is set. If cookie is not set, redirect to login screen.
//echo "session Dump=====>" . var_dump($_SESSION)."<br />";
//echo "post Dump=====><br />" . var_dump($_POST);
if (!isset($_SESSION['email']) && !isset($_POST['email'])) {
    //echo "<br /> session is not set <br />";
    $login = new view();
    $login->loginView();
}
if (isset($_POST['email'])) {
    //unset($login);
    $checkLogin = new MainController();
    $checkLogin->startLogin();
} elseif (isset($_SESSION['email'])) {
    require 'C:\\devel\\web\\php\\index.php';
    echo 'session isset!!';
    $signedIn = new surveyView();
    $signedIn->newSurvey();
}
Exemplo n.º 9
0
        <li><a href='survey.php'><span>NHVBSR</span></a></li>
        <li><a href='lakeHostHome.php'><span>Manage Lake Hosts</span></a></li>
        <li><a href='survey.php'><span>Survey</span></a></li>
        <li><a href='view.php'><span>View</span></a></li>
        <li><a href='edit.php'><span>View/Edit</span></a></li>
        <li><a href='reports.php'><span>Reports</span></a></li>
        <li><a href='index.php'><span>Logout</span></a></li>
    </ul>
</div>
<br><br><br>

<div id="info">
    <h2>NH LAKES 2014 Lake Host Program Boater Statistics </h2>
    <hr>

    <form action="reports.php" method="post">

        <?php 
$view = new surveyView();
if (isset($_POST['sort'])) {
    $view->viewAggregateData($_POST['sort']);
} else {
    $x = "";
    $view->viewAggregateData($x);
}
?>


</div>
</body>
</html>