Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Booking and schedule pages layout fix #10

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
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
4 changes: 0 additions & 4 deletions assests/controller/ajax.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?php
include_once("../model/database.php");

//echo $_GET['date'];

$database = new databases();
//get date and trainer id from GET

Expand All @@ -11,8 +9,6 @@

$trainerIdValue = $_GET['trainerId'];
//read trainer details for the specified day
////echo $trainerIdValue;
//echo $dateValue;
$result = $database->getTrainerDaySchedule($trainerIdValue, $dateValue);
$count=mysqli_num_rows($result);

Expand Down
12 changes: 6 additions & 6 deletions assests/css/calendarstyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ font-family: Helvetica, Arial, sans-serifs;
#date
{
color: white;
width: 180px;
margin-top: 20px;
margin-left: 10px;
width: 260px;
margin: 20px auto 20px;

}

#day_calendar
Expand Down Expand Up @@ -65,9 +65,9 @@ text-align: center;
}

div.ui-datepicker{
font-size:10px;
width: 180px;
margin-left: -20px;
font-size: 1em;
width: 250px;
margin-left: 0px;
}

/*-------------CalendarWeek--------------*/
Expand Down
37 changes: 32 additions & 5 deletions assests/css/normal/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ position: absolute;
width: calc(100% - 260px);
margin-left: 260px;
height:auto;
margin-top: 100px;
margin-top: 150px;


}
Expand Down Expand Up @@ -824,7 +824,9 @@ img.trainerImg
/* for the booking page */

#booking {
width:700px;
padding: 0px;
width: 40%;
min-width:300px;
list-style:none;
min-height:100%;
height:auto;
Expand All @@ -834,9 +836,8 @@ img.trainerImg
}

#booking>li {
position:static;
position:relative;
float:left;
margin-right:30px
}

#booking>li>table {
Expand All @@ -847,7 +848,8 @@ img.trainerImg
#booking>li:not(:first-child) {
width:400px;
height:auto;
margin-bottom:30px
margin-bottom:30px;
margin-left: 25px;
}


Expand Down Expand Up @@ -952,3 +954,28 @@ display:none;


/*End Hide Mobile set up for big screen*/

/*peters tests*/

#setTime{
width: 40%;
min-width: 180px;

}
#setTime input, #setTime select {
width: 90% ;
min-width: 180px;
margin-top: 10px;
padding: 5px;
vertical-align: middle;
}
#trainerId{
width: calc(90% + 10px) !important;
min-width: 190px !important;
}
.trainerTable{
width: 80% !important;
}
.ui-datepicker table {
font-size: 1em !important;
}
Binary file added assests/img/profilePhotos/R00000001.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 assests/img/profilePhotos/R00000002.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 assests/img/profilePhotos/R00000003.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 assests/img/profilePhotos/R001038t6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions assests/model/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ function cancelBooking(){
public
function getSingleTrainers($trainer){
///Needs to be fixed

//echo $trainer;
$results = mysqli_query ( $this->con, "

SELECT *
Expand All @@ -307,7 +307,7 @@ function getSingleTrainers($trainer){
ON m.memberId = schedules.trainerId
WHERE EXISTS (SELECT *
FROM trainerschedule as ts
WHERE m.status = 2 and ts.trainerId = '$trainer' ) ORDER BY startTimes ;" );
WHERE m.status = 2 and trainerschedule.trainerId = '$trainer' ) ORDER BY startTimes ;" );
return $results;


Expand Down
6 changes: 6 additions & 0 deletions assests/model/members.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,11 @@ function getTrainers(){
function getSingleTrainers($trainer){
$result = $this->database->getSingleTrainers( $trainer );
$count=mysqli_num_rows($result);
// echo $count;
//echo "<pre>";
//print_r($result);
// echo "</pre>";


echo'<div><img id="trainerBookingImg" src="assests/img/profilePhotos/' . $trainer. '.png" /></div>';

Expand All @@ -315,6 +320,7 @@ function getSingleTrainers($trainer){
//carries over the value of $i into next row of results as a starting value in for loop
//that allows for continuation of displaying next results.
$count--;
//echo $row['startTime'];

$startTime = $row['startTime'];
$finishTime = $startTime + $row['noOfHours'];
Expand Down
2 changes: 1 addition & 1 deletion assests/view/booking/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<button id="authorize-button" style="visibility: hidden">Authorize</button>


<ul id="booking">
<ul id="booking" class="trainerTable">

<li>
<div id="date">
Expand Down