Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 32 additions & 8 deletions Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,54 @@
<link rel="stylesheet" href="assets/css/main.css" />
</head>
<?php include("library.php"); ?>
<?php include("header.php"); ?>

<?php
function makeSafe($value)
{
$value = htmlspecialchars($value);
return $value;
}
session_start();
if(isset($_SESSION['logged_in'])){
header("Location:Order.php");
}

$msg = '';
if(isset($_POST['email']) && isset($_POST['password'])) {
$password = $_POST['password'];
$hashedPassword = password_hash($password, PASSWORD_DEFAULT);
$email = makeSafe($_POST["email"]);
//just need to make the query

// Always start this first
session_start();
if ( ! empty( $_POST ) ) {
if ( isset( $_POST['email'] ) && isset( $_POST['password'] ) ) {
// Getting submitted user data from database

$stmt = $db->prepare("SELECT * FROM Users WHERE uemail = ?");
$stmt->execute([$_POST['email']]);
$user = $stmt->fetch();

// Verify user password and set $_SESSION
if ( password_verify( $_POST['password'], $user['upass'] ) ) {
$_SESSION['email'] = $user['uemail'];
header("Location:Order.php");
$_SESSION['logged_in'] = true;
}
else{
echo $user->upass;
echo "Invalid password. Please try again";
}
}
}


?>
<body class="is-preload">
<div id="page-wrapper">

<!-- Header -->
<?php include("header.php"); ?>
<!-- Header --><?php
if(isset($_SESSION['logged_in'])){
header("Location:Order.php");
echo("Please make an account");
}
?>

<section id="main" class="container medium">
<header>
Expand Down
100 changes: 76 additions & 24 deletions SignUp.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="assets/css/main.css"/>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>

<style>
Expand Down Expand Up @@ -53,9 +54,10 @@ function makeSafe($value)
$name = makeSafe($_POST["name"]);
$city = makeSafe($_POST["City"]);
$Phone = makeSafe($_POST["PhoneNum"]);

$HomePhone = makeSafe($_POST["HomePhoneNum"]);
$address = makeSafe($_POST["Address"]);
$email = makeSafe($_POST["email"]);
$state = $_POST['State'];
if (empty($name)) {
echo "<font color=red size='5pt'>Enter your name.</font> </p>";
$error = true;
Expand All @@ -76,20 +78,7 @@ function makeSafe($value)
$error = true;
}
}
if (empty($_POST["Age"])) {
echo "<font color=red size='5pt'>You did not enter an Age.</font> </p>";
$error = true;
} else {
$age = $_POST["Age"];
if (!filter_var(intval($age), FILTER_VALIDATE_INT)) {
echo "<font color=red size='5pt'>You did not enter a number for your age.</font> </p>";
$error = true;
}
if (intval($age) > 110 || intval($age) < 0) {
echo "<font color=red size='5pt'>You are not the proper age.</font> </p>";
$error = true;
}
}

if (empty($_POST["ZipCode"])) {
echo "<font color=red size='5pt'>You did not enter a Zip Code.</font> </p>";
$error = true;
Expand Down Expand Up @@ -133,9 +122,62 @@ function makeSafe($value)
echo "<font color=red size='5pt'>You did not enter a state</font> </p>";
$error = true;
}
if (empty($_POST["HomePhoneNum"]) || !is_numeric($_POST["HomePhoneNum"]) || strlen($HomePhone) != 10) {
echo "<font color=red size='5pt'>You did not enter a correct home Phone Number</font> </p>";
$error = true;
}
if (empty($_POST["PhoneNum"]) || !is_numeric($_POST["PhoneNum"]) || strlen($Phone) != 10) {
echo "<font color=red size='5pt'>You did not enter a correct Phone Number</font> </p>";
$error = true;
}

$points = 0;
$PhoneType = "Mobile";
$HomePhoneType = "Home";

if ($error == false) { // error checking went successfully
try {
//checking for prior email
$loginStatement = $db->prepare("SELECT * FROM Users WHERE uemail = ?");
$loginStatement->execute([$email]);
$exists = $loginStatement->rowCount() != 0;
if(!$exists) {
$stmt = $db->prepare("INSERT INTO Users (uemail, uname, upass, uaddrstr,uaddrcity, uaddrstate, uaddrzip,upoints)
VALUES (:email, :name, :password,:addOne,:addCity,:addState,:addZip,:points)");
$stmt->bindParam(':email', $email);
$stmt->bindParam(':name', $name);
$hashedPassword = password_hash($password, PASSWORD_DEFAULT);
$stmt->bindParam(':password', $hashedPassword);
$stmt->bindParam(':addOne', $address);
$stmt->bindParam(':addCity', $city);
$stmt->bindParam(':addState', $state);
$stmt->bindParam(':addZip', $ZipCode);
$stmt->bindParam(':points', $points);
$stmt->execute();
$PhoneStmt = $db->prepare("INSERT INTO UsersPhone (uemail, uphone,numtype)
VALUES (:email, :uphone,:numType)");
$PhoneStmt->bindParam(':email', $email);
$PhoneStmt->bindParam(':uphone', $HomePhone);
$PhoneStmt->bindParam(':numType', $PhoneType);
$PhoneStmt->execute();
$PhoneStmt->bindParam(':email', $email);
$PhoneStmt->bindParam(':uphone', $Phone);
$PhoneStmt->bindParam(':numType', $HomePhoneType);
$PhoneStmt->execute();
session_start();
$_SESSION['logged_in'] = true;
$_SESSION['email'] = $email;
header("Location:Order.php");
}
else{
echo "<font color=red size='5pt'>This email already has an account</font> </p>";

}
} catch (Exception $e) {
echo "Duplicate email Address"; //this is currently not working
}


if ($error == false) {
//QUERY WILL GO HERE
}
}
?>
Expand Down Expand Up @@ -227,13 +269,18 @@ function makeSafe($value)
<input type="text" name="ZipCode" id="ZipCode" placeholder="Zip Code"/>
</div>

<div class="col-12">
<label for="HomePhoneLabel">Home Phone Number:</label>
<input type="text" name="HomePhoneNum" id="HomePhoneNum"
placeholder="Enter your home phone number in the form '0000000000'"/>
</div>
<div class="col-12">
<label for="PhoneLabel">Phone Number:</label>
<input type="text" name="PhoneNum" id="PhoneNum" placeholder="Enter your phone number in the form '0000000000'"/>
<input type="text" name="PhoneNum" id="PhoneNum"
placeholder="Enter your phone number in the form '0000000000'"/>
</div>



<div class="col-12">
<ul class="actions special">
<li><input type="submit" value="Sign Up!"/></li>
Expand All @@ -247,7 +294,6 @@ function makeSafe($value)
<!-- Footer -->



</div>
<?php include("footer.php"); ?>
<!-- Scripts -->
Expand All @@ -258,9 +304,15 @@ function makeSafe($value)
<script src="assets/js/breakpoints.min.js"></script>
<script src="assets/js/util.js"></script>
<script src="assets/js/main.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>


</body>
Expand Down
79 changes: 79 additions & 0 deletions applications.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bitnami: Open Source. Simplified</title>
<link href="bitnami.css" media="all" rel="Stylesheet" type="text/css" />
<link href="/dashboard/stylesheets/all.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="contain-to-grid">
<nav class="top-bar" data-topbar>
<ul class="title-area">
<li class="name">
<h1><a href="/dashboard/index.html">Apache Friends</a></h1>
</li>
<li class="toggle-topbar menu-icon">
<a href="#">
<span>Menu</span>
</a>
</li>
</ul>

<section class="top-bar-section">
<!-- Right Nav Section -->
<ul class="right">
<li class="active"><a href="/applications.html">Applications</a></li>
<li class=""><a href="/dashboard/faq.html">FAQs</a></li>
<li class=""><a href="/dashboard/howto.html">HOW-TO Guides</a></li>
<li class=""><a target="_blank" href="/dashboard/phpinfo.php">PHPInfo</a></li>
<li class=""><a href="/phpmyadmin/">phpMyAdmin</a></li>
</ul>
</section>
</nav>
</div>
<div id="wrapper">
<div class="hero">
<div class="row">
<div class="large-12 columns">
<p>Apache Friends and Bitnami are cooperating to make dozens of open source applications available on XAMPP, for free. Bitnami-packaged applications include Wordpress, Drupal, Joomla! and dozens of others and can be deployed with one-click installers. Visit the <a href="https://bitnami.com/xampp?utm_source=bitnami&utm_medium=installer&utm_campaign=XAMPP%2BModule" target="_blank">Bitnami XAMPP page</a> for details on the currently available apps.</p><br/>
<p>Check out our <a href="https://www.apachefriends.org/bitnami_for_xampp.html" target="_blank" >Bitnami for XAMPP Start Guide</a> for more information about the applications installed.</p>
</div>
</div>
</div>
<div id="lowerContainer" class="row">
<div id="content" class="large-12 columns">
<!-- @@BITNAMI_MODULE_PLACEHOLDER@@ -->
</div>
</div>
</div>
<footer>
<div class="row">
<div class="large-12 columns">
<div class="row">
<div class="large-8 columns">
<ul class="social">
<li class="twitter"><a href="https://twitter.com/apachefriends">Follow us on Twitter</a></li>
<li class="facebook"><a href="https://www.facebook.com/we.are.xampp">Like us on Facebook</a></li>
<li class="google"><a href="https://plus.google.com/+xampp/posts">Add us to your G+ Circles</a></li>
</ul>

<ul class="inline-list">
<li><a href="https://www.apachefriends.org/blog.html">Blog</a></li>
<li><a href="https://www.apachefriends.org/privacy_policy.html">Privacy Policy</a></li>
<li>
<a target="_blank" href="http://www.fastly.com/"> CDN provided by
<img width="48" data-2x="/dashboard/images/fastly-logo@2x.png" src="/dashboard/images/fastly-logo.png" />
</a>
</li>
</ul>
</div>
<div class="large-4 columns">
<p class="text-right">Copyright (c) 2015, Apache Friends</p>
</div>
</div>
</div>
</div>
</footer>
</body>
</html>
20 changes: 20 additions & 0 deletions bitnami.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.module_top, .module_bottom{
visibility: hidden;
}

table {
border: 0px !important;
}

.module_content img{
min-width: 70px;
}

.module_content h2{
font-size: 30px;
}


.subButton{
padding-top: 5%;
}
45 changes: 43 additions & 2 deletions contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,44 @@
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link rel="stylesheet" href="assets/css/main.css" />
</head>

<?php include("header.php"); ?>
<?php include("library.php"); ?>
<?php
if(($_SERVER["REQUEST_METHOD"] == "POST"))
{
$uemail = $_POST['email'];
echo $uemail;
$rid = rand(0, 10000);
$rnote = $_POST['note'];
$result = $db->prepare("INSERT INTO Request (rid, uemail, rnote) VALUES (0, test, test)");
$result->execute();
echo "Hi";
}
?>
<body class="is-preload">
<div id="page-wrapper">

<!-- Header -->
<?php include("header.php"); ?>




<section class="box special">
<header class="major">
<h2>Tell us about your experience!</h2>
</header>

<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="POST" >
<label for="email">Email:</label><br>
<input type="text" id="email" name="email"><br>
<label for="note">Note:</label><br>
<textarea id="note" name="note" rows="8" cols="25">
Help us improve Hoo's Pizza!
</textarea>
<input type="submit" name = "Submit" value="Submit" style="margin:15px;">
</form>
<!--<span class="image featured"><img src="images/pic01.jpg" alt="" /></span>-->
</section>

<?php include("footer.php"); ?>

Expand All @@ -32,5 +63,15 @@
<script src="assets/js/util.js"></script>
<script src="assets/js/main.js"></script>

<?php
function button_select()
{



}

?>

</body>
</html>
Binary file added images/favicon.ico
Binary file not shown.
Binary file added images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/talk2me.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading