Large diffs are not rendered by default.

@@ -3,24 +3,44 @@
sessionpage();
retrieveUserInfo();
UserSchedule($UniqueUser);
$FreeTImeOption=$_POST['FreeTime'];
$chooseActnum=$_Post['chooseActnum'];
$chooseMH=$_Post['chooseMH'];

$count=0;
$chooseActnum=$_Post[chooseActnum];
print_r($chooseActnum);

$Act= array();
$count=0;
while($count<=$chooseActnum){
$Act[$count]=array($_POST['"Act" . ($count+1)'], $_POST['"time" . ($count+1)'];
$count=($count+1);
$variable1= "Act" . ($count+1);
$variable2= "time" . ($count+1);
$variable3= "chooseMH" . ($count+1);
$Act[$count]= array($_POST[$variable1], $_POST[$variable2], $_POST[$variable3]);
array_push($Act, $Act[$count]);
$count=$count+1;
}
//This creates an array for each event and adds it to the multidimensional array $Act
var_dump($chooseActnum);
print_r($_POST['Act1']);
print_r($POST['Act2']);
print_r($Act);

$Act = mysqli_real_escape_string($conn2, $Act);
$sql="INSERT INTO Events(Act)" VALUES('$Act');
if ($conn2->query($sql)===TRUE){
header("Location:https://web125.secure-secure.co.uk/peerphinder.com/schedule/home.html");
}
require 'DBconnection2.php';
$count=0;
while ($count<=$chooseActnum) {
$count2=0;
while ($count2<=2) {
$Act[$count][$count2] = mysqli_real_escape_string($conn2, $Act[$count][$count2]);
$count2= $count2+1;
}
$count= $count+1;
}
serialize($Act);
$sql="INSERT INTO Events(Act) VALUES('$Act') WHERE Username= '$UniqueUser'";
if ($conn2->query($sql)){
mysqli_close($conn2);
header("Location:https://web125.secure-secure.co.uk/peerphinder.com/schedule/home.html");
}
else{
die("Connection failed dummy" . $conn2->connect_error);
}
}
//converts form data to variables
mysqli_close($conn2);

?>

This file was deleted.

Large diffs are not rendered by default.

@@ -0,0 +1,112 @@
<!DOCTYPE html>
<html>
<head>

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<meta charset="utf-8">
<title>Transportation</title>
<link type="text/css" rel="stylesheet" href="NavBar.css">
</head>
<body>

<ul class="nav">
<a href="home.html"><li class="work"><img src="HomeReal.png" alt="Home" width="30px" height="30px"></li></a>
<li class="work"><a href="ClassSurvey.html"><div>Classes</div></a></li>
<li class="work"><a href="FoodSurvey.html"><div>Food</div></a></li>
<li class="work"><a href="FreeSurvey.html"><div>Free Time</div></a></li>
<li class="work"><a href="TransportationSurvey.html"><div>Transportation</div></a></li>
<li class="work"><a href="WorkSurvey.html"><div>Work</div></a></li>
<li class="work"><a href="HygieneSurvey.html"><div>Hygiene</div></a></li>
</ul>

<h1>Transportation</h1>

<!--Yes/No-->
<form>
<h4>Would you like to leave time for transportation in your schedule?</h4>
<input type="radio" name = "Transportation" value="yes">Yes
<input type="radio" name = "Transportation" value="no">No
<br>
</form>

<!--Bootstrap Progress Bar-->
<h4 id = "yourday">Your Week</h4>
<div class="progress progress-striped"></div>


<form id = "TransForm"><h4>How much time per week?</h4><input type = "text" name= "time" id = "time"> <select name="chooseMH" id = "MH"> <option selected="selected">Minute(s)</option><option>Hour(s)</option></select></form>

<style>
input[name="time"]{
width: 40px;
text-align: center;
}
</style>

<script>
//Hide to fade in later
$('#TransForm').hide();

$(document).ready(function() {

// Conversions for progress bar
var hours = (1/168)*($('.progress').width());
var mins = (1/10080)*($('.progress').width());

$('.progress').append('<div class="progress-bar progress-bar-custom active" id = "bar1" style="width: 0%; background: rgba(135, 160, 80, 1);"><span class="sr-only">10% Complete</span></div>');

$('input[name=Transportation]').change(function(){
if ($(this).val() == 'yes')
{
$('#TransForm').fadeIn();
if ($('#MH').val() == 'Minute(s)')
{
$('#bar1').animate({width: $('#time').val()*mins});
}
else
{
$('#bar1').animate({width: $('#time').val()*hours});
}
}
else if ($(this).val() == 'no')
{
$('#TransForm').fadeOut();
$('#bar1').animate({width: 0});
}
});

$('input[name=time]').change(function(){
if ($('#MH').val() == 'Minute(s)')
{
$('#bar1').animate({width: $('#time').val()*mins});
}
else
{
$('#bar1').animate({width: $('#time').val()*hours});
}
});

$('#MH').change(function(){
if ($('#MH').val() == 'Minute(s)')
{
$('#bar1').animate({width: $('#time').val()*mins});
}
else
{
$('#bar1').animate({width: $('#time').val()*hours});
}
});
});
</script>

</body>
</html>

Large diffs are not rendered by default.

@@ -1,3 +1,4 @@
<<<<<<< HEAD
/*This is the css for the To Do List and Have Done List*/
table {
color: #333;
@@ -102,3 +103,5 @@ color:white;
}


=======
>>>>>>> 1faa2ed4137ebb0e26519eec4e73145faac67188
@@ -14,16 +14,28 @@

<meta charset="utf-8">
<title>JS Bin</title>
<<<<<<< HEAD
=======
<link type="text/css" rel="stylesheet" href="home.css">
<link type="text/css" rel="stylesheet" href="NavBar.css">
>>>>>>> 1faa2ed4137ebb0e26519eec4e73145faac67188
</head>
<body>
<ul class="nav">
<a href="home.html"><li class="work"><img src="HomeReal.png" alt="Home" width="30px" height="30px"></li></a>
<li class="work"><a href="Classes.html"<div>Classes</div></a></li>
<li class="work"><a href="ClassSurvey.html"><div>Classes</div></a></li>
<li class="work"><a href="FoodSurvey.html"><div>Food</div></a></li>
<<<<<<< HEAD
<li class="work"><a href="FreeSurvey.html"<div>Free Time</div></a></li>
<li class="work"><a href="Transportation.html"><div>Transportation</div></a></li>
<li class="work"><a href="Work.html"<div>Work</div></a></li>
<li class="work"><a href="PersonalHygieneSurvey.html"><div>Hygiene</div></a></li>
=======
<li class="work"><a href="FreeSurvey.html"><div>Free Time</div></a></li>
<li class="work"><a href="TransportationSurvey.html"><div>Transportation</div></a></li>
<li class="work"><a href="WorkSurvey.html"><div>Work</div></a></li>
<li class="work"><a href="HygieneSurvey.html"><div>Hygiene</div></a></li>
>>>>>>> 1faa2ed4137ebb0e26519eec4e73145faac67188
</ul>

<div class="money">
@@ -1,26 +1,27 @@
<?php
<?php
require 'functions2.php';
sessionpage();
retrieveUserInfo();
UserSchedule($UniqueUser);
$Work= $_POST[Work];
$halftime= $_POST[halftime2];
$Snacks= $_POST[Snacks];
$image= $_POST[image];
//converts form data to variables

$FreeTImeOption=$_POST['FreeTime'];
$chooseActnum=$_Post['chooseActnum'];
$chooseMH=$_Post['chooseMH'];

//tests to see if the user inputed a valid email...if they did it will do nothing...if they did not it will end the script
//all of the if statements test to make sure the user inputed the form data correctly

$servername = "localhost";
$DBusername = "cl29-vative";
$DBpassword = "f4V-NrKV8";
$DBname = "cl29-vative";

$count=0;
$Act= array("1"=>"Act1","2"=>"Act2");
while($count<=$chooseActnum){
$Act[$count]=array($_POST['"Act" . ($count+1)'], $_POST['"time" . ($count+1)']);
$count=($count+1);
}


$username = mysqli_real_escape_string($conn, $username);
$Work = mysqli_real_escape_string($conn, $Work);

$Act = mysqli_real_escape_string($conn2, $Act);
$sql="INSERT INTO Events(Act) VALUES('$Act')";
if ($conn2->query($sql)===TRUE){
header("Location:https://web125.secure-secure.co.uk/peerphinder.com/schedule/home.html");
}
else{
die("Connection failed dummy" . $conn2->connect_error);
}
//converts form data to variables
mysqli_close($conn2);
?>