Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkP88 committed Oct 1, 2018
0 parents commit 0d9fef5
Show file tree
Hide file tree
Showing 813 changed files with 34,345 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
Binary file added 9781484238424.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
101 changes: 101 additions & 0 deletions Ch01/change-password.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Template for an interactive web page</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS File -->
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css"
integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4"
crossorigin="anonymous">
<script src="verify.js"></script>
</head>
<body>
<div class="container" style="margin-top:30px">
<!-- Header Section -->
<header class="jumbotron text-center row col-sm-14"
style="margin-bottom:2px; background:linear-gradient(white, #0073e6); padding:20px;">
<?php include('header.php'); ?>
</header>
<!-- Body Section -->
<div class="row" style="padding-left: 0px;">
<!-- Left-side Column Menu Section -->
<nav class="col-sm-2">
<ul class="nav nav-pills flex-column">
<?php include('nav.php'); ?>
</ul>
</nav>
<!-- Validate Input -->
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
require('process-change-password.php');
} // End of the main Submit conditional.
?>
<div class="col-sm-8">
<h2 class="h2 text-center">Change Password</h2>
<form action="change-password.php" method="post" name="regform" id="regform"
onsubmit="return checked();">
<div class="form-group row">
<label for="email" class="col-sm-4 col-form-label">E-mail:</label>
<div class="col-sm-8">
<input type="email" class="form-control" id="email" name="email"
placeholder="E-mail" maxlength="60" required
value="<?php if (isset($_POST['email'])) echo $_POST['email']; ?>">
</div>
</div>
<div class="form-group row">
<label for="password" class="col-sm-4 col-form-label">Current Password:</label>
<div class="col-sm-8">
<input type="password" class="form-control" id="password" name="password"
placeholder="Password" minlength="8" maxlength="12" required
value="<?php if (isset($_POST['password'])) echo $_POST['password']; ?>">
</div>
</div>
<div class="form-group row">
<label for="password1" class="col-sm-4 col-form-label">New Password:</label>
<div class="col-sm-8">
<input type="password" class="form-control" id="password1" name="password1"
placeholder="Password" minlength="8" maxlength="12" required
value="<?php if (isset($_POST['password1'])) echo $_POST['password1']; ?>">
<span id='message'>Between 8 and 12 characters.</span>
</div>
</div>
<div class="form-group row">
<label for="password2" class="col-sm-4 col-form-label">Confirm Password:</label>
<div class="col-sm-8">
<input type="password" class="form-control" id="password2" name="password2"
placeholder="Confirm Password" minlength="8" maxlength="12" required
value="<?php if (isset($_POST['password2'])) echo $_POST['password2']; ?>">
</div>
</div>
<div class="form-group row">
<div class="col-sm-12">
<input id="submit" class="btn btn-primary" type="submit" name="submit"
value="Change Password">
</div>
</div>
</form>
</div>
<!-- Right-side Column Content Section -->
<?php

if(isset($errorstring)) {
echo '<footer class="jumbotron text-center col-sm-12"
style="padding-bottom:1px; padding-top:8px;">';
}
else
{
echo '<aside class="col-sm-2">';
include('info-col.php');
echo '</aside>';
echo '</div>';
echo '<footer class="jumbotron text-center row col-sm-14"
style="padding-bottom:1px; padding-top:8px;">';
}
include('footer.php');
?>
</footer>
</div>
</body>
</html>
5 changes: 5 additions & 0 deletions Ch01/footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<p class="h6 col-sm-12">Copyright &copy; Adrian West & Steve Prettyman 2018 Designed by
<a href="http://www.colycomputerhelp.co.uk/">Adrian West </a> and
<a href=http://www.littleoceanwaves.com>Steve Prettyman </a> Valid
<a href="http://jigsaw.w3.org/css-validator/">CSS</a> &amp;
<a href="http://validator.w3.org/">HTML5</a></p>
7 changes: 7 additions & 0 deletions Ch01/header-for-template.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="col-sm-2">
<img class="img-fluid float-left" src="logo.jpg" alt="Logo">
</div>
<div class="col-sm-8">
<h1 class="font-bold">This is the header</h1>
</div>

13 changes: 13 additions & 0 deletions Ch01/header.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div class="col-sm-2">
<img class="img-fluid float-left" src="logo.jpg" alt="Logo">
</div>
<div class="col-sm-8">
<h1 class="blue-text mb-4 font-bold">Header Goes Here</h1>
</div>
<nav class="col-sm-2">
<div class="btn-group-vertical btn-group-sm" role="group" aria-label="Button Group">
<button type="button" class="btn btn-secondary" onclick="location.href = 'register-page.php'" >Register</button>
<button type="button" class="btn btn-secondary" onclick="location.href = 'register-view-users.php'"> View Users</button>
<button type="button" class="btn btn-secondary" onclick="location.href = 'change-password.php'" >New Password</button>
</div>
</nav>
48 changes: 48 additions & 0 deletions Ch01/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Template for an interactive web page</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS File -->
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css"
integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4"
crossorigin="anonymous">
</head>
<body>
<div class="container" style="margin-top:30px">
<!-- Header Section -->
<header class="jumbotron text-center row"
style="margin-bottom:2px; background:linear-gradient(white, #0073e6); padding:20px;">
<?php include('header.php'); ?>
</header>
<!-- Body Section -->
<div class="row" style="padding-left: 0px;">
<!-- Left-side Column Menu Section -->
<nav class="col-sm-2">
<ul class="nav nav-pills flex-column">
<?php include('nav.php'); ?>
</ul>
</nav>
<!-- Center Column Content Section -->
<div class="col-sm-8">
<h2 class="text-center">This is the Home Page</h2>
<p>The home page content. The home page content. The home page content. The home page content. <br>
The home page content. The home page content. The home page content. The home page content. <br>
The home page content. The home page content. <br>
The home page content. The home page content. The home page content. </p>
</div>
<!-- Right-side Column Content Section -->
<aside class="col-sm-2">
<?php include('info-col.php'); ?>
</aside>
</div>
<!-- Footer Content Section -->
<footer class="jumbotron text-center row"
style="padding-bottom:1px; padding-top:8px;">
<?php include('footer.php'); ?>
</footer>
</div>
</body>
</html>
4 changes: 4 additions & 0 deletions Ch01/info-col.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<div>
<h3>This is the information column</h3>
<p>Web design by <br>A W West and<br>Steve Prettyman</p>
</div>
Binary file added Ch01/logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions Ch01/menu.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

<li><a href="register-page.php">Register</a></li>
<li><a href="register-view_users-page.php">View Users</a></li>
<li><a href="register-password.php">New Password</a></li>
13 changes: 13 additions & 0 deletions Ch01/mysqli_connect.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
// Create a connection to the msgboarddb database and to MySQL
// Set the encoding to utf-8
// Set the database access details as constants
DEFINE ('DB_USER', 'horatio'); // or whatever userid you created
DEFINE ('DB_PASSWORD', 'Hmsv1ct0ry'); // or whatever password you created
DEFINE ('DB_HOST', 'localhost');
DEFINE ('DB_NAME', 'simpledb');

// Make the connection:
$dbcon = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
// Set the encoding...optional but recommended
mysqli_set_charset($dbcon, 'utf8');
52 changes: 52 additions & 0 deletions Ch01/nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!doctyp html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</head>
<body>

<header>
<nav class="navbar navbar-inverse" role="navigation">
<div class="container">

<!-- Mobile Menu-->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#collapse" aria-expanded="false" aria-controls="collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>

<a class="navbar-brand" ><span class="subhead"></span>THIS IS THE HEADER</a>
</div>
<!-- Laptop/PC Menu -->
<div id="collapse" class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-left">
<?php
include("menu.php");
?>
</ul>
</div>
</div>
</nav>

</header>


<section>
<h3>Project 1 incomplete</h3>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>
</section>

</body>


</html>
15 changes: 15 additions & 0 deletions Ch01/nav.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<li class="nav-item">
<a class="nav-link active" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="page-2.php">Page 2</a>
</li>
<li class="nav-item">
<a class="nav-link" href="page-3.php">Page 3</a>
</li>
<li class="nav-item">
<a class="nav-link" href="page-4.php">Page 4</a>
</li>
<li class="nav-item">
<a class="nav-link" href="page-5.php">Page 5</a>
</li>
53 changes: 53 additions & 0 deletions Ch01/nav.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!doctyp html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<style type="text/css">
body { padding-top:0px; }
</style>


</head>
<body>

<header>
<nav class="navbar navbar-inverse" role="navigation">
<div class="container">

<!-- The button that shows when the width is too short -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#collapse" aria-expanded="false" aria-controls="collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>

<a class="navbar-brand" ><span class="subhead"></span>Project 1</a>
</div>
<!-- The navigation menu. It collapses when the width is too short -->
<div id="collapse" class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="#browse">browse</a></li>
<li><a href="#why">why</a></li>
<li><a href="#about">about</a></li>
</ul>
</div>
</div>
</nav>

</header>


<section>
<h3>Project 1 incomplete</h3>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>
</section>

</body>


</html>
45 changes: 45 additions & 0 deletions Ch01/password-thanks.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Password Change Thanks</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS File -->
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css"
integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4"
crossorigin="anonymous">
</head>
<body>
<div class="container" style="margin-top:30px">
<!-- Header Section -->
<header class="jumbotron text-center row"
style="margin-bottom:2px; background:linear-gradient(white, #0073e6); padding:20px;">
<?php include('header.php'); ?>
</header>
<!-- Body Section -->
<div class="row" style="padding-left: 0px;">
<!-- Left-side Column Menu Section -->
<nav class="col-sm-2">
<ul class="nav nav-pills flex-column">
<?php include('nav.php'); ?>
</ul>
</nav>
<!-- Center Column Content Section -->
<div class="col-sm-8 text-center">
<h2>Thank you for changing your password</h2>
On the Home Page, you will now be able to login with your new password.
</div>
<!-- Right-side Column Content Section -->
<aside class="col-sm-2">
<?php include('info-col.php'); ?>
</aside>
</div>
<!-- Footer Content Section -->
<footer class="jumbotron text-center row"
style="padding-bottom:1px; padding-top:8px;">
<?php include('footer.php'); ?>
</footer>
</div>
</body>
</html>
Loading

0 comments on commit 0d9fef5

Please sign in to comment.