add template files and compose file, fix syntax errors in template
This commit is contained in:
1 parent
f9d57038bf
commit
b64c6d835e
55 files changed
+16205
-7109
No files matched your search
Binary file not shown.
File mode changed.
Generated
-1
@@ -1 +0,0 @@
|
|||||||
MVCtemplate
|
|
||||||
File mode changed.
Generated
-9
@@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="WEB_MODULE" version="4">
|
|
||||||
<component name="NewModuleRootManager">
|
|
||||||
<content url="file://$MODULE_DIR$" />
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
<orderEntry type="library" name="jquery" level="application" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
||||||
+10
-2
@@ -1,12 +1,20 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||||
<data-source source="LOCAL" name="ecobuddy.sqlite" uuid="8da0d10f-48a6-4aa3-9200-f806440fb4ed">
|
<data-source source="LOCAL" name="ecobuddy" uuid="b932ada6-ed77-47fa-96d8-d6dfa86a6ca2">
|
||||||
<driver-ref>sqlite.xerial</driver-ref>
|
<driver-ref>sqlite.xerial</driver-ref>
|
||||||
<synchronize>true</synchronize>
|
<synchronize>true</synchronize>
|
||||||
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
|
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
|
||||||
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/ecobuddy.sqlite</jdbc-url>
|
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/Databases/ecobuddy.sqlite</jdbc-url>
|
||||||
<working-dir>$ProjectFileDir$</working-dir>
|
<working-dir>$ProjectFileDir$</working-dir>
|
||||||
|
<libraries>
|
||||||
|
<library>
|
||||||
|
<url>file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.45.1/org/xerial/sqlite-jdbc/3.45.1.0/sqlite-jdbc-3.45.1.0.jar</url>
|
||||||
|
</library>
|
||||||
|
<library>
|
||||||
|
<url>file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.45.1/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar</url>
|
||||||
|
</library>
|
||||||
|
</libraries>
|
||||||
</data-source>
|
</data-source>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
File mode changed.
+6
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="JavaScriptLibraryMappings">
|
||||||
|
<file url="PROJECT" libraries="{jquery}" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
File mode changed.
+1
-2
@@ -2,8 +2,7 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectModuleManager">
|
<component name="ProjectModuleManager">
|
||||||
<modules>
|
<modules>
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/MVCtemplate.iml" filepath="$PROJECT_DIR$/.idea/MVCtemplate.iml" />
|
<module fileurl="file://$PROJECT_DIR$/.idea/Ecobuddy.iml" filepath="$PROJECT_DIR$/.idea/Ecobuddy.iml" />
|
||||||
</modules>
|
</modules>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
|
|
||||||
+7
-1
@@ -10,5 +10,11 @@
|
|||||||
<option name="highlightLevel" value="WARNING" />
|
<option name="highlightLevel" value="WARNING" />
|
||||||
<option name="transferred" value="true" />
|
<option name="transferred" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PhpProjectSharedConfiguration" php_language_level="5.5.0" />
|
<component name="PhpProjectSharedConfiguration" php_language_level="7.1" />
|
||||||
|
<component name="PhpStanOptionsConfiguration">
|
||||||
|
<option name="transferred" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="PsalmOptionsConfiguration">
|
||||||
|
<option name="transferred" value="true" />
|
||||||
|
</component>
|
||||||
</project>
|
</project>
|
||||||
File mode changed.
Generated
+6
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="SqlDialectMappings">
|
||||||
|
<file url="PROJECT" dialect="SQLite" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
BIN
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
class Database {
|
||||||
|
/**
|
||||||
|
* @var Database
|
||||||
|
*/
|
||||||
|
protected static $_dbInstance = null;
|
||||||
|
/**
|
||||||
|
* @var PDO
|
||||||
|
*/
|
||||||
|
protected $_dbHandle;
|
||||||
|
|
||||||
|
public function getDbConnection(): PDO
|
||||||
|
{
|
||||||
|
return $this->_dbHandle;
|
||||||
|
}
|
||||||
|
public static function getInstance(): ?Database
|
||||||
|
{
|
||||||
|
if(self::$_dbInstance == null) {
|
||||||
|
self::$_dbInstance = new self();
|
||||||
|
}
|
||||||
|
return self::$_dbInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function __construct() {
|
||||||
|
try {
|
||||||
|
$this->_dbHandle = new PDO("sqlite:Databases/ecobuddy.sqlite");
|
||||||
|
}
|
||||||
|
catch (PDOException $e) {
|
||||||
|
echo $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public function __destruct() {
|
||||||
|
$this->_dbHandle = null; // destroys the PDO handle when no longer needed
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
class FacilityData {
|
||||||
|
protected $_id, $_title, $_category, $_description, $_houseNumber, $_streetName, $_county, $_town, $_postcode, $_lng, $_lat;
|
||||||
|
|
||||||
|
public function __construct($dbRow) {
|
||||||
|
$this->_id = $dbRow['_id'];
|
||||||
|
$this->_title = $dbRow['title'];
|
||||||
|
$this->_category = $dbRow['category'];
|
||||||
|
$this->_description = $dbRow['description'];
|
||||||
|
$this->_houseNumber = $dbRow['houseNumber'];
|
||||||
|
$this->_streetName = $dbRow['streetName'];
|
||||||
|
$this->_county = $dbRow['county'];
|
||||||
|
$this->_town = $dbRow['town'];
|
||||||
|
$this->_postcode = $dbRow['postcode'];
|
||||||
|
$this->_lng = $dbRow['lng'];
|
||||||
|
$this->_lat = $dbRow['lat'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getId() {
|
||||||
|
return $this->_id;
|
||||||
|
}
|
||||||
|
public function getTitle() {
|
||||||
|
return $this->_title;
|
||||||
|
}
|
||||||
|
public function getCategory() {
|
||||||
|
return $this->_category;
|
||||||
|
}
|
||||||
|
public function getDescription() {
|
||||||
|
return $this->_description;
|
||||||
|
}
|
||||||
|
public function getHouseNumber() {
|
||||||
|
return $this->_houseNumber;
|
||||||
|
}
|
||||||
|
public function getStreetName() {
|
||||||
|
return $this->_streetName;
|
||||||
|
}
|
||||||
|
public function getCounty() {
|
||||||
|
return $this->_county;
|
||||||
|
}
|
||||||
|
public function getTown() {
|
||||||
|
return $this->_town;
|
||||||
|
}
|
||||||
|
public function getPostcode() {
|
||||||
|
return $this->_postcode;
|
||||||
|
}
|
||||||
|
public function getLng() {
|
||||||
|
return $this->_lng;
|
||||||
|
}
|
||||||
|
public function getLat() {
|
||||||
|
return $this->_lat;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
require_once ('Database.php');
|
||||||
|
require_once ('FacilityData.php');
|
||||||
|
|
||||||
|
class FacilityDataSet {
|
||||||
|
protected $_dbHandle, $_dbInstance;
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
$this->_dbInstance = Database::getInstance();
|
||||||
|
$this->_dbHandle = $this->_dbInstance->getDbConnection();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function fetchAll(): array
|
||||||
|
{
|
||||||
|
$sqlQuery = 'SELECT * FROM ecoFacilities;';
|
||||||
|
|
||||||
|
$statement = $this->_dbHandle->prepare($sqlQuery); // prepare a PDO statement
|
||||||
|
$statement->execute(); // execute the PDO statement
|
||||||
|
|
||||||
|
$dataSet = [];
|
||||||
|
// loop through and read the results of the query and cast
|
||||||
|
// them into a matching object
|
||||||
|
while ($row = $statement->fetch()) {
|
||||||
|
$dataSet[] = new FacilityData($row);
|
||||||
|
}
|
||||||
|
return $dataSet;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<?php
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once('UserDataSet.php');
|
||||||
|
class User {
|
||||||
|
protected $_username, $_loggedIn, $_userId;
|
||||||
|
|
||||||
|
public function getUsername() {
|
||||||
|
return $this->_username;
|
||||||
|
}
|
||||||
|
public function getUserId() {
|
||||||
|
return $this->_userId;
|
||||||
|
}
|
||||||
|
public function __construct() {
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
$this->_username = "None";
|
||||||
|
$this->_loggedIn = false;
|
||||||
|
$this->_userId = "0";
|
||||||
|
|
||||||
|
if(isset($_SESSION['login'])) {
|
||||||
|
$this->_username = $_SESSION['login'];
|
||||||
|
$this->_userId = $_SESSION['uid'];
|
||||||
|
$this->_loggedIn = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function init() {
|
||||||
|
$this->_username = "None";
|
||||||
|
$this->_userId = "0";
|
||||||
|
$this->_loggedIn = false;
|
||||||
|
|
||||||
|
if(isset($_SESSION['login'])) {
|
||||||
|
$this->_username = $_SESSION['login'];
|
||||||
|
$this->_userId = $_SESSION['uid'];
|
||||||
|
$this->_loggedIn = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public function Authenticate($username, $password): bool
|
||||||
|
{
|
||||||
|
$users = new UserDataSet();
|
||||||
|
$userDataSet = $users->checkUserCredentials($username, $password);
|
||||||
|
if(count($userDataSet) > 0) {
|
||||||
|
$_SESSION['login'] = $username;
|
||||||
|
$_SESSION['uid'] = $userDataSet[0]->getId();
|
||||||
|
$this->_loggedIn = true;
|
||||||
|
$this->_username = $username;
|
||||||
|
$this->_userId = $userDataSet[0]->getId();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->_loggedIn = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function logout() {
|
||||||
|
unset($_SESSION['login']);
|
||||||
|
unset($_SESSION['uid']);
|
||||||
|
$this->_loggedIn = false;
|
||||||
|
$this->_username = "None";
|
||||||
|
$this->_userId = "0";
|
||||||
|
session_destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isLoggedIn(): bool
|
||||||
|
{
|
||||||
|
return $this->_loggedIn;
|
||||||
|
}
|
||||||
|
public function __destruct()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
class UserData {
|
||||||
|
protected $_id, $_username, $_name, $_password, $_usertype;
|
||||||
|
|
||||||
|
public function __construct($dbRow) {
|
||||||
|
$this->_id = $dbRow['_id'];
|
||||||
|
$this->_username = $dbRow['username'];
|
||||||
|
$this->_name = $dbRow['name'];
|
||||||
|
$this->_password = $dbRow['password'];
|
||||||
|
$this->_usertype = $dbRow['usertype'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getId() {
|
||||||
|
return $this->_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUsername() {
|
||||||
|
return $this->_username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName() {
|
||||||
|
return $this->_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
require_once ('Database.php');
|
||||||
|
require_once ('UserData.php');
|
||||||
|
|
||||||
|
class UserDataSet {
|
||||||
|
protected $_dbHandle, $_dbInstance;
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
$this->_dbInstance = Database::getInstance();
|
||||||
|
$this->_dbHandle = $this->_dbInstance->getDbConnection();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function fetchAll(): array
|
||||||
|
{
|
||||||
|
$sqlQuery = 'SELECT * FROM ecoUser;';
|
||||||
|
|
||||||
|
$statement = $this->_dbHandle->prepare($sqlQuery); // prepare a PDO statement
|
||||||
|
$statement->execute(); // execute the PDO statement
|
||||||
|
|
||||||
|
$dataSet = [];
|
||||||
|
// loop through and read the results of the query and cast
|
||||||
|
// them into a matching object
|
||||||
|
while ($row = $statement->fetch()) {
|
||||||
|
$dataSet[] = new UserData($row);
|
||||||
|
}
|
||||||
|
return $dataSet;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $username
|
||||||
|
* @param $password
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function checkUserCredentials($username, $password): array
|
||||||
|
{
|
||||||
|
$sqlQuery = 'SELECT * FROM ecoUser WHERE username = ? AND password = ?;';
|
||||||
|
$statement = $this->_dbHandle->prepare($sqlQuery);
|
||||||
|
$statement->bindParam(1, $username);
|
||||||
|
$statement->bindParam(2, $password);
|
||||||
|
$statement->execute();
|
||||||
|
$dataSet = [];
|
||||||
|
while ($row = $statement->fetch()) {
|
||||||
|
$dataSet[] = new UserData($row);
|
||||||
|
}
|
||||||
|
return $dataSet;
|
||||||
|
}
|
||||||
|
public function fetchUser($username): array
|
||||||
|
{
|
||||||
|
$sqlQuery = 'SELECT * FROM ecoUser WHERE username = ?';
|
||||||
|
$statement = $this->_dbHandle->prepare($sqlQuery);
|
||||||
|
$statement->execute([$username]);
|
||||||
|
$dataSet = [];
|
||||||
|
while ($row = $statement->fetch()) {
|
||||||
|
$dataSet[] = new UserData($row);
|
||||||
|
}
|
||||||
|
return $dataSet;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+27
-6
@@ -1,11 +1,32 @@
|
|||||||
<?php require('template/header.phtml') ?>
|
<?php require('template/header.phtml') ?>
|
||||||
|
|
||||||
<h3>Welcome to the web-site </h3>
|
<div class="row">
|
||||||
|
<div class="col-5">
|
||||||
|
<p><?php echo $view->dbMessage; ?></p>
|
||||||
|
</div>
|
||||||
|
<div class="col-7">
|
||||||
|
<p>Current script <?php echo $_SERVER["PHP_SELF"]; ?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<thead> <tr> <th>Facility ID</th> <th>Title</th> <th>Category</th> <th>Description</th> <th>Address</th> <th>Postcode</th> <th>Lat/Long</th> <th>Contributor</th> </tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php foreach ($view->facilityDataSet as $facilityData) {
|
||||||
|
echo '<tr> <td>' . $facilityData->getId() .
|
||||||
|
'</td> <td>' . $facilityData->getTitle() .
|
||||||
|
'</td> <td>' . $facilityData->getCategory() .
|
||||||
|
'</td> <td>' . $facilityData->getDescription() .
|
||||||
|
'</td> <td>' . $facilityData->getHouseNumber() . " " . $facilityData->getStreetName() . " " . $facilityData->getCounty() . " " . $facilityData->getTown() .
|
||||||
|
'</td> <td>' . $facilityData->getPostcode() .
|
||||||
|
'</td> <td>' . $facilityData->getLatitude() . " " . $facilityData->getLongitude() .
|
||||||
|
'</td> <td>' . $facilityData->getContributor() .
|
||||||
|
'</td> </td> </tr>';
|
||||||
|
} ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
<h3>A template for web-site development using the <i>Model-View-Controller</i> design pattern and <a href="http://www.getbootstrap.com/css"><i>Bootstrap</i></a>.</h3>
|
|
||||||
<p>The <i>Views/template</i> directory contains a <i>header.phtl</i> and a <i>footer.phtml</i> which should be included on every new page generated.
|
|
||||||
To add additional pages just edit the file <i>header.phtml</i> to add the extra link and then add a new <i>Controller (pageN.php)</i> and a new <i>View (pageN.phtml)</i>, for each page required.</p>
|
|
||||||
<p>The <i>Model</i> code files are placed in the <i>Models</i> directory.</p>
|
|
||||||
<p>Do not change any of the css files in the <i>css</> directory!<p>
|
|
||||||
|
|
||||||
<?php require('template/footer.phtml') ?>
|
<?php require('template/footer.phtml') ?>
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
<?php require('template/header.phtml') ?>
|
|
||||||
|
|
||||||
<h3>Welcome to Page1</h3>
|
|
||||||
|
|
||||||
<?php require('template/footer.phtml') ?>
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
<?php require('template/header.phtml') ?>
|
|
||||||
|
|
||||||
<h3>Welcome to Page2</h3>
|
|
||||||
|
|
||||||
<?php require('template/footer.phtml') ?>
|
|
||||||
@@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div id="footer" class="col-xs-12">
|
<div id="footer" class="col-xs-12">
|
||||||
<p>Web-site development using the MVC design pattern and the Bootstrap CSS framework</p>
|
<p>George Wilkinson @2024</p>
|
||||||
|
<p>Powered by Bootstrap</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Bootstrap core JavaScript
|
<!-- Bootstrap core JavaScript
|
||||||
|
|||||||
+37
-38
@@ -14,55 +14,54 @@
|
|||||||
<link href="/css/bootstrap-theme.css" rel="stylesheet">
|
<link href="/css/bootstrap-theme.css" rel="stylesheet">
|
||||||
<link href="/css/my-style.css" rel="stylesheet">
|
<link href="/css/my-style.css" rel="stylesheet">
|
||||||
|
|
||||||
<title>Server-Side Programming - <?php echo $view->pageTitle; ?></title>
|
<title>Ecobuddy - <?php echo $view->pageTitle; ?></title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body role="document">
|
<nav class="navbar navbar-expand-lg m-2 border rounded-2">
|
||||||
|
<div class="container-fluid">
|
||||||
<div class="container">
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarTogglerDemo03" aria-controls="navbarTogglerDemo03" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<div class="row">
|
<span class="navbar-toggler-icon"></span>
|
||||||
<div id="title" class="col-xs-12">
|
</button>
|
||||||
<img src="/images/new_uos_logo.jpg" alt="Salford University" />
|
<a class="navbar-brand" href="/index.php">Ecobuddy <?php echo $view->pageTitle?></a>
|
||||||
<div class="pull-right"> <h1><?php echo $view->pageTitle ?> </h1></div>
|
<div class="collapse navbar-collapse" id="navbarTogglerDemo03">
|
||||||
|
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
||||||
</div>
|
<li class="nav-item">
|
||||||
</div>
|
<a class="nav-link active" aria-current="page" href="/index.php">Home</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
<div class="row">
|
<a class="nav-link" href="#">Link</a>
|
||||||
<div id="menu" class="col-xs-6 col-sm-3 col-md-2">
|
</li>
|
||||||
<ul class="nav navbar_default nav-stacked">
|
<li class="nav-item">
|
||||||
|
<a class="nav-link disabled" aria-disabled="true">Disabled</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<form class="d-flex" role="search">
|
||||||
|
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
|
||||||
|
<button class="btn bg-light btn-outline-light text-dark" type="submit">Search</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (!isset($_SESSION["login"])) {
|
if ($view->loginError) {
|
||||||
echo '
|
require_once('Views/template/loginError.phtml');
|
||||||
<form method="post" action="" class="form text-primary">
|
|
||||||
<label for="username">Username</label>
|
|
||||||
<input type="text" name="username">
|
|
||||||
<label for="password">Password</label>
|
|
||||||
<input type="text" name="password">
|
|
||||||
<input type="submit" name="loginbutton" value="Login">
|
|
||||||
|
|
||||||
</form>';
|
|
||||||
}
|
}
|
||||||
else
|
if(!$user->isLoggedIn()) {
|
||||||
{
|
require_once('Views/template/loginModal.phtml');
|
||||||
echo '
|
}
|
||||||
<form method="post" action="" class="form text-primary">
|
if($user->isLoggedIn()) {
|
||||||
<input type="submit" name="logoutbutton" value="Logout">
|
require_once('Views/template/logoutButton.phtml');
|
||||||
</form>';
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<li><a href="/index.php">Home</a></li>
|
|
||||||
<li><a href="/page1.php">Page1</a></li>
|
|
||||||
<li><a href="/page2.php">Page2</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
<body role="document">
|
||||||
|
|
||||||
<div id="content" class="col-xs-6 col-sm-9 col-md-10">
|
<div class="container-lg">
|
||||||
|
|
||||||
|
|
||||||
|
<div id="content" >
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Whitespace-only changes.
@@ -0,0 +1,29 @@
|
|||||||
|
<button type="button" class="btn bg-primary btn-outline-primary text-light m-1 ms-2" data-bs-toggle="modal" data-bs-target="#loginModal">
|
||||||
|
Login
|
||||||
|
</button>
|
||||||
|
<div class="modal fade" id="loginModal" tabindex="-1" aria-labelledby="loginModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="loginModalLabel">Login</h5>
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form method="post" action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="username" class="form-label">Username</label>
|
||||||
|
<input type="text" class="form-control" id="username" name="username" placeholder="Username" required>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="password" class="form-label">Password</label>
|
||||||
|
<input type="password" class="form-control" id="password" name="password" placeholder="Password" required>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn bg-primary btn-outline-primary text-light" name="loginButton">Login</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-warning" data-bs-dismiss="modal">Close</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?php echo "<p class='nav-link m-2' style='color: black;'>" . $user->getUsername() . " is logged in.</p>"?>
|
||||||
|
<form class="form-inline my-2 my-lg-0" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?> ">
|
||||||
|
<input class="btn bg-danger btn-outline-danger text-light" type="submit" name="logoutButton" value="Logout">
|
||||||
|
</form>
|
||||||
Whitespace-only changes.
File mode changed.
Regular → Executable
File mode changed.
File mode changed.
Vendored
+11469
-5197
File diff suppressed because it is too large.
Load diff
@@ -1 +1 @@
|
|||||||
{"version":3,"sources":["less/normalize.less","less/print.less","less/scaffolding.less","less/mixins.less","less/variables.less","less/thumbnails.less","less/carousel.less","less/type.less","less/code.less","less/grid.less","less/tables.less","less/forms.less","less/buttons.less","less/button-groups.less","less/component-animations.less","less/glyphicons.less","less/dropdowns.less","less/input-groups.less","less/navs.less","less/navbar.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/pager.less","less/labels.less","less/badges.less","less/jumbotron.less","less/alerts.less","less/progress-bars.less","less/media.less","less/list-group.less","less/panels.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/popovers.less","less/responsive-utilities.less"],"names":[],"mappings":";AAQA;EACE,uBAAA;EACA,0BAAA;EACA,8BAAA;;AAOF;EACE,SAAA;;AAUF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,cAAA;;AAQF;AACA;AACA;AACA;EACE,qBAAA;EACA,wBAAA;;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;EACE,mBAAA;EACA,eAAA;EACA,gBAAA;EACA,gBAAA;;AAKF,QAHqC;EAGrC;IAFI,eAAA;;;AASJ;AACA;EAAU,cAAA;;AAGV;EAAU,kBAAA;;AAGV;EAAuB,gBAAA;;AACvB;EAAuB,iBAAA;;AACvB;EAAuB,kBAAA;;AACvB;EAAuB,mBAAA;;AAGvB;EACE,cAAA;;AAEF;EJofE,cAAA;;AACA,CAAC,aAAC;EACA,cAAA;;AInfJ;EJifE,cAAA;;AACA,CAAC,aAAC;EACA,cAAA;;AIhfJ;EJ8eE,cAAA;;AACA,CAAC,UAAC;EACA,cAAA;;AI7eJ;EJ2eE,cAAA;;AACA,CAAC,aAAC;EACA,cAAA;;AI1eJ;EJweE,cAAA;;AACA,CAAC,YAAC;EACA,cAAA;;AIneJ;EAGE,WAAA;EJqdA,yBAAA;;AACA,CAAC,WAAC;EACA,yBAAA;;AIpdJ;EJkdE,yBAAA;;AACA,CAAC,WAAC;EACA,yBAAA;;AIjdJ;EJ+cE,yBAAA;;AACA,CAAC,QAAC;EACA,yBAAA;;AI9cJ;EJ4cE,yBAAA;;AACA,CAAC,WAAC;EACA,yBAAA;;AI3cJ;EJycE,yBAAA;;AACA,CAAC,UAAC;EACA,yBAAA;;AIncJ;EACE,mBAAA;EACA,mBAAA;EACLine truncated
|
{"version":3,"sources":["bootstrap.css","../../scss/mixins/_banner.scss","../../scss/_root.scss","../../scss/vendor/_rfs.scss","../../scss/mixins/_color-mode.scss","../../scss/_reboot.scss","../../scss/_variables.scss","../../scss/mixins/_border-radius.scss","../../scss/_type.scss","../../scss/mixins/_lists.scss","../../scss/_images.scss","../../scss/mixins/_image.scss","../../scss/_containers.scss","../../scss/mixins/_container.scss","../../scss/mixins/_breakpoints.scss","../../scss/_grid.scss","../../scss/mixins/_grid.scss","../../scss/_tables.scss","../../scss/mixins/_table-variants.scss","../../scss/forms/_labels.scss","../../scss/forms/_form-text.scss","../../scss/forms/_form-control.scss","../../scss/mixins/_transition.scss","../../scss/mixins/_gradients.scss","../../scss/forms/_form-select.scss","../../scss/forms/_form-check.scss","../../scss/forms/_form-range.scss","../../scss/forms/_floating-labels.scss","../../scss/forms/_input-group.scss","../../scss/mixins/_forms.scss","../../scss/_buttons.scss","../../scss/mixins/_buttons.scss","../../scss/_transitions.scss","../../scss/_dropdown.scss","../../scss/mixins/_caret.scss","../../scss/_button-group.scss","../../scss/_nav.scss","../../scss/_navbar.scss","../../scss/_card.scss","../../scss/_accordion.scss","../../scss/_breadcrumb.scss","../../scss/_pagination.scss","../../scss/mixins/_pagination.scss","../../scss/_badge.scss","../../scss/_alert.scss","../../scss/_progress.scss","../../scss/_list-group.scss","../../scss/_close.scss","../../scss/_toasts.scss","../../scss/_modal.scss","../../scss/mixins/_backdrop.scss","../../scss/_tooltip.scss","../../scss/mixins/_reset-text.scss","../../scss/_popover.scss","../../scss/_carousel.scss","../../scss/mixins/_clearfix.scss","../../scss/_spinners.scss","../../scss/_offcanvas.scss","../../scss/_placeholders.scss","../../scss/helpers/_color-bg.scss","../../scss/helpers/_colored-links.scss","../../scss/helpers/_focus-ring.scss","../../scss/helpers/_icon-link.scss","../../scss/helpers/_ratio.scss","../../scss/helpers/_position.scss","../../scss/helpers/_stacks.scss","../../scss/helpers/_visually-hidden.scss","../../scss/mixins/_visually-hidden.scss","../../scss/helpers/_stretched-link.scss","../../scss/helpers/_text-truncation.scss","../../scss/mixins/_text-truncate.scss","../../scss/helpers/_vr.scss","../../scss/mixins/_utilities.scss","../../scss/utilities/_api.scss"],"names":[],"mappings":"AAAA,gBAAgB;ACCd;;;;EAAA;ACDF;;EASI,kBAAA;EAAA,oBAAA;EAAA,oBAAA;EAAA,kBAAA;EAAA,iBAAA;EAAA,oBAAA;EAAA,oBAAA;EAAA,mBAAA;EAAA,kBAAA;EAAA,kBAAA;EAAA,gBAAA;EAAA,gBAAA;EAAA,kBAAA;EAAA,uBAAA;EAIA,sBAAA;EAAA,sBAAA;EAAA,sBAAA;EAAA,sBAAA;EAAA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GpGI;EEtCJ;IFyMQ,eAAA;EH3DN;AACF;;AK1IA;EF6LQ,+BAAA;AH/CR;AG7GI;EEjCJ;IFoMQ,kBAAA;EHlDN;AACF;;AK9IA;EFwLQ,iCAAA;AHtCR;AGtHI;EE5BJ;IF+LQ,iBAAA;EHzCN;AACF;;AKlJA;EF+KM,kBALI;AHpBV;;AKjJA;EF0KM,eALI;AHhBV;;AK1IA;EACE,aAAA;ELine truncated
|
||||||
Vendored
+6
-7
@@ -1,7 +1,6 @@
|
|||||||
/*!
|
@charset "UTF-8";/*!
|
||||||
* Bootstrap v3.1.1 (http://getbootstrap.com)
|
* Bootstrap v5.3.3 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2014 Twitter, Inc.
|
* Copyright 2011-2024 The Bootstrap Authors
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
*/
|
*/:root,[data-bs-theme=light]{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-primary-text-emphasis:#052c65;--bs-secondary-text-emphasis:#2b2f32;--bs-success-text-emphasis:#0a3622;--bs-info-text-emphasis:#055160;--bs-warning-text-emphasis:#664d03;--bs-danger-text-emphasis:#58151c;--bs-light-text-emphasis:#495057;--bs-dark-text-emphasis:#495057;--bs-primary-bg-subtle:#cfe2ff;--bs-secondary-bg-subtle:#e2e3e5;--bs-success-bg-subtle:#d1e7dd;--bs-info-bg-subtle:#cff4fc;--bs-warning-bg-subtle:#fff3cd;--bs-danger-bg-subtle:#f8d7da;--bs-light-bg-subtle:#fcfcfd;--bs-dark-bg-subtle:#ced4da;--bs-primary-border-subtle:#9ec5fe;--bs-secondary-border-subtle:#c4c8cb;--bs-success-border-subtle:#a3cfbb;--bs-info-border-subtle:#9eeaf9;--bs-warning-border-subtle:#ffe69c;--bs-danger-border-subtle:#f1aeb5;--bs-light-border-subtle:#e9ecef;--bs-dark-border-subtle:#adb5bd;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-color-rgb:33,37,41;--bs-body-bg:#fff;--bs-body-bg-rgb:255,255,255;--bs-emphasis-color:#000;--bs-emphasis-color-rgb:0,0,0;--bs-secondary-color:rgba(33, 37, 41, 0.75);--bs-secondary-color-rgb:33,37,41;--bs-secondary-bg:#e9ecef;--bs-secondary-bg-rgb:233,236,239;--bs-tertiary-color:rgba(33, 37, 41, 0.5);--bs-tertiary-color-rgb:33,37,41;--bs-tertiary-bg:#f8f9fa;--bs-tertiary-bg-rgb:248,249,250;--bs-heading-color:inherit;--bs-link-color:#0d6efd;--bs-link-color-rgb:13,110,253;--bs-link-decoration:underline;--bs-link-hover-color:#0a58ca;--bs-link-hover-color-rgb:10,88,202;--bs-code-color:#d63384;--bs-highlight-color:#212529;--bs-highlight-bg:#fff3cd;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, 0.175);--bs-border-radius:0.375rem;--bs-border-radius-sm:0.25rem;--bs-border-radius-lg:0.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-xxl:2rem;--bs-border-radius-2xl:var(--bs-border-radius-xxl);--bs-border-radius-pill:50rem;--bs-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-box-shadow-sm:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);--bs-box-shadow-lg:0 1rem 3rem rgba(0, 0, 0, 0.175);--bs-box-shadow-inset:inset 0 1px 2px rgba(0, 0, 0, 0.075);--bs-focus-ring-width:0.25rem;--bs-focus-ring-opacity:0.25;--bs-focus-ring-color:rgba(13, 110, 253, 0.25);--bs-form-valid-color:#198754;--bs-form-valid-border-color:#198754;--bs-form-invalid-color:#dc3545;--bs-form-invalid-border-color:#dc3545}[data-bs-theme=dark]{color-scheme:dark;--bs-body-color:#dee2e6;--bs-body-color-rgb:222,226,230;--bs-body-bg:#212529;--bs-body-bg-rgb:33,37,41;--bs-emphasis-color:#fff;--bs-emphasis-color-rgb:255,255,255;--bs-secondary-color:rgba(222, 226, 230, 0.75);--bs-secondary-color-rgb:222,226,230;--bs-secondary-bg:#343a40;--bs-secondary-bg-rgb:52,58,64;--bs-tertiary-color:rgba(222, 226, 230, 0.5);--bs-tertiary-color-rgb:222,226,230;--bs-tertiary-bg:#2b3035;--bs-tertiary-bg-rgb:43,48,53;--bs-primary-text-emphasis:#6ea8fe;--bs-secondary-text-emphasis:#a7acb1;--bs-success-text-emphasis:#75b798;--bs-info-text-emphasis:#6edff6;--bs-warning-text-emphasis:#ffda6a;--bs-danger-text-emphasis:#ea868f;--bs-light-text-emphasis:#f8f9fa;--bs-dark-text-emphasis:#dee2e6;--bs-primary-bg-subtle:#031633;--bs-secondary-bg-subtle:#161719;--bs-success-bg-subtle:#051b11;--bs-info-bg-subtle:#032830;--bs-warning-bg-subtle:#332701;--bs-danger-bg-subtle:#2c0b0e;--bs-light-bg-subtle:#343a40;--bs-dark-bg-subtle:#1a1d20;--bs-primary-border-subtle:#084298;--bs-secondary-border-subtle:#41464b;--bs-success-border-subtle:#0f5132;--bs-info-border-subtle:#087990;--bs-warning-border-subtle:#997404;--bs-danger-border-subtle:#842029;--bs-light-border-subtle:#495057;--bs-dark-border-subtle:#343a40;--bs-heading-color:inherLine truncated
|
||||||
|
/*# sourceMappingURL=bootstrap.min.css.map */
|
||||||
/*! normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}@media print{*{text-shadow:none!important;color:#000!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#999}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{mLine truncated
|
|
||||||
Regular → Executable
+16
-5
@@ -1,3 +1,6 @@
|
|||||||
|
nav {
|
||||||
|
background-color: #3cc471;
|
||||||
|
}
|
||||||
#title {
|
#title {
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
@@ -12,13 +15,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#menu a {
|
#menu a {
|
||||||
background-color: #f00;
|
/*background-color: #f00;*/
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
#menu a:hover {
|
#menu a:hover {
|
||||||
background-color: #f00;
|
/*background-color: #f00;*/
|
||||||
color: #ddd;
|
color: #ddd;
|
||||||
text-decoration:underline;
|
text-decoration:underline;
|
||||||
display: block;
|
display: block;
|
||||||
@@ -26,13 +29,21 @@
|
|||||||
|
|
||||||
#content {
|
#content {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-top: solid 6px #f00;
|
/*border-top: solid 6px #f00;*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#footer {
|
#footer {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #000;
|
background-color: #bbb;
|
||||||
color: #fff;
|
color: #111;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal {
|
||||||
|
z-index: 1055
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-backdrop {
|
||||||
|
z-index: 1040;
|
||||||
}
|
}
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
services:
|
|
||||||
nginx-web:
|
|
||||||
container_name: nginx-web
|
|
||||||
image: nginx
|
|
||||||
volumes:
|
|
||||||
- ./nginx/configs/:/etc/nginx/
|
|
||||||
- ./nginx/logs/:/var/log/nginx
|
|
||||||
#- /home/boris/OneDrive/CSCS-Y2/Client Server Systems/Ecobuddy/nginx/nginx.conf:/etc/nginx/nginx.conf
|
|
||||||
- ./:/var/www/html
|
|
||||||
#- /home/boris/OneDrive/CSCS-Y2/Client Server Systems/Ecobuddy/access.log:/var/log/nginx/access.log
|
|
||||||
#- /home/boris/OneDrive/CSCS-Y2/Client Server Systems/Ecobuddy/error.log:/var/log/nginx/error.log
|
|
||||||
ports:
|
|
||||||
- "8088:80"
|
|
||||||
environment:
|
|
||||||
- NGINX_HOST=localhost
|
|
||||||
- NGINX_PORT=8088
|
|
||||||
links:
|
|
||||||
- php-fpm
|
|
||||||
depends_on:
|
|
||||||
- php-fpm
|
|
||||||
php-fpm:
|
|
||||||
container_name: php-fpm
|
|
||||||
image: php:8-fpm
|
|
||||||
volumes:
|
|
||||||
- ./:/var/www/
|
|
||||||
- /home/boris/OneDrive/CSCS-Y2/Client Server Systems/Ecobuddy/nginx/php/config/www.conf:/usr/local/etc/php-fpm.d/www.conf
|
|
||||||
- /home/boris/OneDrive/CSCS-Y2/Client Server Systems/Ecobuddy/nginx/php/fpm-php.www.log:/var/log/fpm-php.www.log
|
|
||||||
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
@@ -1,10 +1,24 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// load required classes
|
||||||
$view = new stdClass();
|
require_once('Models/UserDataSet.php');
|
||||||
$view->pageTitle = 'Homepage';
|
|
||||||
|
|
||||||
require_once("logincontroller.php");
|
require_once("logincontroller.php");
|
||||||
|
// make a view class
|
||||||
|
$view = new stdClass();
|
||||||
|
$view->pageTitle = 'Home';
|
||||||
|
|
||||||
|
// include the view
|
||||||
|
|
||||||
require_once('Views/index.phtml');
|
require_once('Views/index.phtml');
|
||||||
|
|
||||||
|
// create a new student dataset object that we can generate data from
|
||||||
|
$facilityDataSet = new FacilityDataSet();
|
||||||
|
$view->facilityDataSet = $facilityDataSet->fetchAll();
|
||||||
|
$view->user = new User();
|
||||||
|
// send a results count to the view to show how many results were retrieved
|
||||||
|
if (count($view->facilityDataSet) == 0)
|
||||||
|
{
|
||||||
|
$view->dbMessage = "No results";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$view->dbMessage = count($view->facilityDataSet) . " result(s)";
|
||||||
|
}
|
||||||
Vendored
+4282
-1739
File diff suppressed because it is too large.
Load diff
Vendored
+5
-4
@@ -1,6 +1,7 @@
|
|||||||
/*!
|
/*!
|
||||||
* Bootstrap v3.1.1 (http://getbootstrap.com)
|
* Bootstrap v5.3.3 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2014 Twitter, Inc.
|
* Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
*/
|
*/
|
||||||
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slideLine truncated
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Popper)}(this,(function(t){"use strict";function e(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const i=e(t),s=new Map,n={set(t,e,i){s.has(t)||s.set(t,new Map);const n=s.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>s.has(t)&&s.get(t).get(e)||null,remove(t,e){if(!s.has(t))return;const i=s.get(t);i.delete(e),0===i.size&&s.delete(t)}},o="transitionend",r=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),a=t=>{t.dispatchEvent(new Event(o))},l=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),c=t=>l(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(r(t)):null,h=t=>{if(!l(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},d=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),u=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?u(t.parentNode):null},_=()=>{},g=t=>{t.offsetHeight},f=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,m=[],p=()=>"rtl"===document.documentElement.dir,b=t=>{var e;e=()=>{const e=f();if(e){const i=t.NAME,s=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=s,t.jQueryInterface)}},"loading"===document.readyState?(m.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of m)t()})),m.push(e)):e()},v=(t,e=[],i=t)=>"function"==typeof t?t(...e):i,y=(t,e,i=!0)=>{if(!i)return void v(t);const s=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const s=Number.parseFloat(e),n=Number.parseFloat(i);return s||n?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let n=!1;const r=({target:i})=>{i===e&&(n=!0,e.removeEventListener(o,r),v(t))};e.addEventListener(o,r),setTimeout((()=>{n||a(e)}),s)},w=(t,e,i,s)=>{const n=t.length;let o=t.indexOf(e);return-1===o?!i&&s?t[n-1]:t[0]:(o+=i?1:-1,s&&(o=(o+n)%n),t[Math.max(0,Math.min(o,n-1))])},A=/[^.]*(?=\..*)\.|.*/,E=/\..*/,C=/::\d+$/,T={};let k=1;const $={mouseenter:"mouseover",mouseleave:"mouseout"},S=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function L(t,e){return e&&`${e}::${k++}`||t.uidEvent||k++}function O(t){const e=L(t);return t.uidEvent=e,T[e]=T[e]||{},T[e]}function I(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function D(t,e,i){const s="string"==typeof e,n=s?i:e||i;let o=M(t);return S.has(o)||(o=t),[s,n,o]}function N(t,e,i,s,n){if("string"!=typeof e||!t)return;let[o,r,a]=D(e,i,s);if(e in $){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=O(t),c=l[a]||(l[a]={}),h=I(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&n);const d=L(r,e.replace(A,"")),u=o?function(t,e,i){return function s(n){const o=t.querySelectorAll(e);for(let{target:r}=n;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return F(n,{delegateTarget:r}),s.oneOff&&j.off(t,n.type,e,i),i.apply(r,[n])}}(t,i,r):function(t,e){return function i(s){return F(s,{delegateTarget:t}),i.oneOff&&j.off(t,s.type,e),e.apply(t,[s])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=n,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function P(t,e,i,s,n){const o=I(e[i],s,n);o&&(t.removeEventListener(i,o,Boolean(n)),delete e[i][o.uidEvent])}function x(t,e,i,s){const n=e[i]||{};for(const[o,r]of Object.entries(n))o.includes(s)&&PLine truncated
|
||||||
|
//# sourceMappingURL=bootstrap.min.js.map
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
<?php
|
|
||||||
session_start();
|
|
||||||
|
|
||||||
var_dump($_SESSION);
|
|
||||||
|
|
||||||
if (isset($_POST["loginbutton"])) {
|
|
||||||
$username = $_POST["username"];
|
|
||||||
$password = $_POST["password"];
|
|
||||||
echo $username;
|
|
||||||
echo $password;
|
|
||||||
|
|
||||||
if ($username == "a" && $password == "b") {
|
|
||||||
// better would be to check these variables against your database
|
|
||||||
|
|
||||||
// SELECT * FROM usertable WHERE username=$username AND password=$password
|
|
||||||
// if number of rows returned > 0 then the username and password matched
|
|
||||||
|
|
||||||
|
|
||||||
echo "You are logged in";
|
|
||||||
$_SESSION["login"] = $username;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
echo "Error in username and password";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_POST["logoutbutton"]))
|
|
||||||
{
|
|
||||||
echo "logout user";
|
|
||||||
unset($_SESSION["login"]);
|
|
||||||
session_destroy();
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
$view = new stdClass();
|
|
||||||
$view->pageTitle = 'Page1';
|
|
||||||
//var_dump($_POST);
|
|
||||||
|
|
||||||
require_once("logincontroller.php");
|
|
||||||
|
|
||||||
|
|
||||||
require_once('Views/page1.phtml');
|
|
||||||
Reference in new issue
Block a user