Home

Project Docs - Adam Gambrell

image

Contents

1. lt nav gt lt php if S_SESSION USERTYPE Faculty Check type show them the faculty menu gt lt nav class navbar navbar default navbar fixed top lt div class container gt lt div class navbar header gt lt button type button class navbar toggle data toggle collapse data target navbar container gt role navigation gt lt span class sr only gt Show and hide the navigation lt span gt 17 lt span class icon bar gt lt span gt lt span class icon bar gt lt span gt lt span class icon bar gt lt span gt lt button gt lt lt a class navbar brand href http www olemiss edu gt lt img class brand src uofmCrest jpg gt lt a gt gt lt div gt lt div class collapse navbar collapse id navbar container gt lt ul class nav navbar nav pull left gt lt li class active gt lt a href index php gt lt span class glyphicon glyphicon home gt lt span gt Home lt a gt lt li gt lt li class dropdown gt lt a href class dropdown toggle data toggle dropdown gt Users lt span class caret gt lt span gt lt a gt lt ul class dropdown menu role menu gt lt li gt lt a href tcNewUserForm php gt Enter a new user lt a gt lt li gt lt li gt lt a href tcViewUsers php gt View all users lt a gt lt li gt lt ul gt lt li gt lt li class dropdown gt lt a href class dropdown toggle data toggle dropdown gt Roo
2. lt li class about gt lt a href tcAbout php gt lt span class glyphicon glyphicon book gt lt span gt About lt a gt lt li gt lt li class dropdown gt lt a href class dropdown toggle data toggle dropdown gt lt span class glyphicon glyphicon question sign gt lt span gt Contact lt span class caret gt lt span gt lt a gt lt ul class dropdown menu role menu gt lt li gt lt a href gt lt span class glyphicon glyphicon phone gt lt span gt Phone lt a gt lt li gt lt li gt lt a href gt lt span class glyphicon glyphicon envelope gt lt span gt Email lt a gt lt li gt lt ul gt lt li gt lt li class dropdown gt lt a href class dropdown toggle data toggle dropdown gt lt span class glyphicon glyphicon user gt lt span gt Login lt span class caret gt lt span gt lt a gt lt ul class dropdown menu dropdown menu right role menu gt lt li gt lt form method post action index php class navbar form role form gt lt div class row gt lt div class col md 12 gt amp nbsp lt div gt lt div class col md 12 gt lt h4 gt User Login lt h4 gt lt br gt lt div class input group input group gt lt span class input group addon gt lt span class glyphicon glyphicon envelope gt lt span gt lt span gt lt input type email class form control id Femail name Femail placeholder Enter email gt lt div gt lt div c
3. added to user directory else echo Error Sconn gt error echo lt br gt echo lt a href tcLoginHome php gt Return to the menu lt a gt Sconn gt close gt lt div gt lt div class col md 4 gt amp nbsp lt div gt lt div gt lt br gt lt php if S_SESSION SAFEUSER echo Not a valid user Use correct email and password require_once tclncPageFooter php Site Footer gt lt php session_start Spagetitle New User Process Site Header require_once tclncPageHeader php if 1S_ SESSION SAFEUSER echo Not a valid user Use correct email and password exit receive user info StmpUserID StmpUserType _POST userType StmpFirstName S_POST firstName StmpLastName _POST lastName StmpPhone _POST phone 28 StmpCampus 5_POST campus StmpBuilding _POST building StmpOffice S_POST office StmpEmail _POST email StmpPassword S_POST password echo StmpFirstName StmpLastName will be entered as a StmpUserType echo lt br gt lt br gt include tcIncDbCredentials php Sconn new mysqli Shostname Susername Suserpass Sdbname include tcAES php encryption sql query for INSERT INTO users Ssql INSERT INTO Users userID userType userFirstName userLastName userOfficePhone userCampus userOfficeBuilding userOfficeNumb
4. lt div class col sm 4 gt lt br gt lt p gt lt h3 align center gt Rooms lt h3 gt lt p gt lt p gt lt p gt lt p gt lt h5 align center gt Use the rooms list to see a lt h5 gt lt p gt lt p gt lt h5 align center gt list of all rooms add rooms lt h5 gt lt p gt lt p gt lt h5 align center gt and to reserve rooms lt h5 gt lt p gt lt div gt lt div gt lt div gt lt div gt lt php require_once tcIncPageFooter php gt lt php session_start Spagetitle New Testing Room Site Header require_once tclncPageHeader php if IS_SESSION SAFEUSER echo Not a valid user exit Admin can set up new Admin Department Manager Faculty Other view users and reserve set up and view rooms Department Manager has credentials to set up Faculty Other view users reserve set up and view rooms Faculty only has credentials to set up Other and reserve and view rooms Other only has credentials to view rooms availability if S_SESSION SAFEUSER if S_SESSION USERTYPE Admin gt lt head gt lt title gt Add New Testing Room lt title gt lt head gt lt form action tcAddRoomFormProcess php method post gt lt div class row gt lt div class col md 2 gt amp nbsp lt div gt lt div class col md 4 gt lt h2 gt New User Information lt h2 gt lt p gt lt table gt lt tr gt lt td gt Campus lt td gt lt td gt lt select name campus s
5. glyphicon glyphicon envelope gt lt span gt Email lt a gt lt li gt lt ul gt lt li gt lt li gt lt a href index php cmd logout navbar navbar right gt Logout lt a gt lt li gt lt ul gt lt div gt lt div gt lt nav gt lt php if S_SESSION USERTYPE DeptManager check type show them the manager menu gt lt nav class navbar navbar default navbar fixed top lt div class container gt lt div class navbar header gt lt button type button class navbar toggle data toggle collapse data target navbar container gt role navigation gt lt span class sr only gt Show and hide the navigation lt span gt lt span class icon bar gt lt span gt lt span class icon bar gt lt span gt lt span class icon bar gt lt span gt lt button gt lt lt a class navbar brand href http www olemiss edu gt lt img class brand src uofmCrest jpg gt lt a gt gt lt div gt lt div class collapse navbar collapse id navbar container gt lt ul class nav navbar nav pull left gt lt li class active gt lt a href index php gt lt span class glyphicon glyphicon home gt lt span gt Home lt a gt lt li gt lt li class dropdown gt lt a href class dropdown toggle data toggle dropdown gt Users lt span class caret gt lt span gt lt a gt lt ul class dropdown menu role menu gt lt li gt lt a href tcNewUserForm php gt En
6. gt lt option value Tupelo gt Tupelo lt option gt lt option value Booneville gt Booneville lt option gt lt option value Grenada gt Grenada lt option gt lt select gt lt td gt lt tr gt lt tr gt lt td gt Building lt td gt lt td gt lt input type text name building gt lt td gt lt tr gt lt tr gt lt td gt Room Number lt td gt lt td gt lt input type text name roomNumber gt lt td gt lt tr gt lt tr gt lt td gt Seat Limit lt td gt lt td gt lt input type number name seatLimit gt lt td gt lt tr gt lt tr gt lt td colspan 4 align right gt lt input type submit value Submit gt lt td gt lt tr gt lt table gt lt br gt lt div gt lt div class col md 4 gt amp nbsp lt div gt lt div gt lt form gt lt php else echo Not a valid user Use correct email and password require_once tclncPageFooter php Site Footer gt lt php session_start Spagetitle New Room Process Site Header require_once tclncPageHeader php if 1S_SESSION SAFEUSER echo Not a valid user Use correct email and password exit receive user info StmpRoomID StmpCampus _POST campus StmpBuilding _POST building 11 StmpRoomNumber _POST roomNumber StmpSeatLimit _POST seatLimit include tclncDbCredentials php Sconn new mysqli Shostname Susername Suserpass Sdbname sql quer
7. h3 gt lt div gt echo lt div gt echo lt div gt echo lt br gt lt br gt else echo Error Sconn gt error echo lt br gt close connection Sconn gt close require_once tclncPageFooter php Site Footer gt lt php session_start Spagetitle User Registration 32 Site Header require_once tcIncPageHeader php gt lt head gt lt title gt Register lt title gt lt head gt lt form action tcUserRegistrationProcess php method post gt gt lt td gt lt tr gt gt lt td gt lt tr gt gt lt td gt lt tr gt gt lt td gt lt tr gt gt lt td gt lt tr gt gt lt td gt lt tr gt gt lt td gt lt tr gt lt form gt lt php require_once tclncPageFooter php gt lt div class row gt lt div class col md 2 gt amp nbsp lt div gt lt div class col md 4 gt lt h2 gt Registration Information lt h2 gt lt p gt lt tr gt lt td gt First Name lt td gt lt td gt lt input type text name firstName lt tr gt lt td gt Last Name lt td gt lt td gt lt input type text name lastName lt tr gt lt td gt Office Phone Number lt td gt lt td gt lt input type tel name phone lt tr gt lt td gt Campus lt td gt lt td gt lt select name campus size 1 gt lt option value Oxford gt Oxford lt option gt lt option value DeSoto gt DeSoto lt option gt lt option value Tupelo g
8. off echo lt div class container align center gt echo lt div class container align center gt echo lt div class col md 12 align center gt lt h3 gt lt font color red gt Testing center is under maintenance lt font gt lt h3 gt lt div gt echo lt div class col md 12 align center gt lt h3 gt lt font color red gt Check back later lt font gt lt h3 gt lt div gt echo lt div gt echo lt div gt echo lt br gt lt br gt session_unset session_destroy exit footer Sdbconn gt close gt lt br gt lt br gt lt div class container align center gt lt div class row bg success gt lt div class col md 2 gt amp nbsp lt div gt lt div class col md 10 align right gt lt small gt Copyright 2015 amp copy CloudsOutLoud Inc lt div gt lt lt div class col md 4 gt amp nbsp lt div gt gt lt div gt lt div gt lt br gt lt body gt lt html gt lt DOCTYPE html gt lt html lang en gt lt head gt lt meta charset utf 8 gt lt meta http equiv X UA Compatible content IE edge gt lt meta name viewport content width device width initial scale 1 gt lt meta name author content Adam Gambrell gt lt title gt lt php echo Spagetitle gt lt title gt lt Latest compiled and minified CSS gt lt link rel stylesheet href http maxcdn bootstrapcdn com bootstr
9. rooms Department Manager has credentials to set up Faculty Other view users reserve set up and view rooms Faculty only has credentials to set up Other and reserve and view rooms Other only has credentials to view rooms availability if S_SESSION SAFEUSER if S_SESSION USERTYPE Admin gt lt head gt lt title gt Create New User lt title gt lt head gt lt form action tcNewUserFormProcess php id newUserForm method post gt lt div class row gt lt div class col md 2 gt amp nbsp lt div gt lt div class col md 4 gt lt h2 gt New User Information lt h2 gt lt p gt lt table gt lt tr gt lt td gt User Type lt td gt lt td gt lt select id userType name userType size 1 gt lt option value Admin gt Administrator lt option gt lt option value DeptManager gt Department Head lt option gt lt option value Faculty gt Faculty Professor lt option gt lt option value Other gt Other lt option gt lt select gt lt td gt lt tr gt lt tr gt lt td gt First Name lt td gt lt td gt lt input type text id firstName name firstName gt lt td gt lt tr gt lt tr gt lt td gt Last Name lt td gt lt td gt lt input type text id lastName name lastName gt lt td gt lt tr gt lt tr gt lt td gt Office Phone Number lt td gt lt td gt lt input type text id phone name phone gt lt td gt lt tr gt lt tr gt lt td gt Campus lt td gt lt td gt lt s
10. tclncPageFooter php Site Footer gt lt php session_start 35 Spagetitle View Users Site Header require_once tcIncPageHeader php if IS_SESSION SAFEUSER echo Not a valid user Use correct email and password exit gt lt link rel stylesheet type text css href cdn datatables net 1 10 4 css jquery dataTables css gt lt script type text javascript language javascript src cdn datatables net 1 10 4 js jquery dataTables min js gt lt script gt lt Custom styles for this template gt lt link href starter template css rel stylesheet gt lt HTML5 shim and Respond js IE8 support of HTML5 elements and media queries gt lt if It IE 9 gt lt script src https oss maxcdn com libs html5shiv 3 7 0 html5shiv js gt lt script gt lt script src https oss maxcdn com libs respond js 1 4 2 respond min js gt lt script gt lt endif gt lt BR note All code needed to make datatables work within bootstrap version 3 came from gt lt the following location gt lt l https github com DataTables Plugins tree master integration bootstrap 3 gt lt note this next link has css settings to make datatables work with bootstrap version 3 gt lt link rel stylesheet type text css href DT_bootstrap css gt lt obtain the datatables javascript library from a reputable source gt lt script type text javascript language ja
11. FetchMode PDO FETCH_ASSOC Slimit SSTL gt fetch Slim Slimit seatLimit total seats used and needed for test StotalSeats StmpResSeats Sres check for availability if Slim lt StotalSeats exit if not enough space echo lt div class container align center gt echo lt div class container align center gt echo lt div class col md 12 align center gt lt h3 gt lt font color red gt Sorry there are not enough seats at this time lt font gt lt h3 gt lt div gt echo lt div gt echo lt div gt echo lt br gt lt br gt 31 else otherwise reserve room connect to the tests database include tclncDbCredentials php Sconn new mysqli Shostname Susername Suserpass Sdbname sql query for INSERT INTO ReservationDetails Ssql INSERT INTO ReservationDetails resNumber resRoomID resUserlD resDate resStartTime resEndTime resSeats VALUES StmpResNumber StmpResRoomID StmpResUserlD StmpResDate StmpResStartTime StmpResEndTime StmpResSeats check connection if mysqli_connect_errno exit Connect failed mysqli_connect_error elseif Sconn gt query Ssql TRUE echo lt div class container align center gt echo lt div class container align center gt echo lt div class col md 12 align center gt lt h3 gt lt font color green gt Testing center reservation confirmed lt font gt lt
12. SERTYPE Other echo Not a valid user Use correct email and password exit connect to the tests database include tclncDbCredentials php get connected to the DB try SDBH new PDO mysql host Shostname dbname Sdbname username Suserpass catch PDOException Se echo Se gt getMessage sql for seats used SsqlSeatTest SELECT sum resSeats as reS FROM SELECT resNumber resSeats FROM ReservationDetails WHERE resRoomlD StmpResRoomID AND resDate StmpResDate AND resStartTime StmpResStartTime 30 UNION SELECT resNumber resSeats FROM ReservationDetails WHERE resRoomlD StmpResRoomID AND resDate StmpResDate AND resEndTime StmpResEndTime UNION SELECT resNumber resSeats FROM ReservationDetails WHERE resRoomID StmpResRoomID AND resDate StmpResDate AND resStartTime gt StmpResStartTime AND resEndTime lt StmpResEndTime UNION SELECT resNumber resSeats FROM ReservationDetails WHERE resRoomID StmpResRoomID AND resDate StmpResDate AND resStartTime lt StmpResStartTime AND resEndTime gt StmpResEndTime A sql for room seat limit SsqlSeatLimit Select seatLimit from Rooms WHERE roomID StmpResRoomID perform used sql SSTH SDBH gt query Ssq SeatTest SSTH gt setFetchMode PDO FETCH_ ASSOC SusedSeats SSTH gt fetch Sres SusedSeats reS perform limit sql SSTL SDBH gt query SsqlSeatLimit SSTL gt set
13. There have been revisions since this document was created Mainly index php is now Dashboard php Index php is now the portfolio home page Testing Center Documentation By Adam Gambrell Adamgambrell com University of Mississippi Test Center Reservation System l Cover II Index MAA US EE Ee EE 3 A Summary B Accessibility C User Types amp Privileges A Excel View B phpMyAdmin Export A E A 6 B ESE O RA 8 e e e e EE 9 D tctAddRoomFormProtess tee Ti E AE E AAA A A E 17 F telncDoCredentials anene E eee Neeeeie 13 G Ve o o O ARNON 13 H teincPageReader nb 14 l ENSWUSSFORNE EE oa 22 J a Ela CR 27 kK teRGOamMmReservyation a 28 L Gate Een E ele CC 30 M teUserRestration amoroase ee aR a 32 N teUserRecistationProcess eiii 34 O te CEET 35 P Eechen nica nia 38 A ae Ge 41 B TEBEO rosita 43 E TCAGUROOMFOFM MEN 43 SS FAS tcAddRoomFormProcess tcNewUserForm tcNewUserFormProcess tcRoomReservation tcRoomReservationProcess tcUserRegistration tcUserRegistrationProcess tcViewRooms tcViewUsers Admin User Manual Summary This manual is meant to give insight and information into the management of The University of Mississippi Test Center Reservation Site This guide lists both the accessibility and user types and privileges Site maintenance can be turned on and off via the setting table Use 1 for on and 0 for off in the footer page User Types a
14. ap 3 3 4 css bootstrap min css gt lt For Header Img gt lt link rel stylesheet href basic template css gt lt jQuery library gt lt script src https ajax googleapis com ajax libs jquery 1 11 1 jquery min js gt lt script gt lt Latest compiled JavaScript gt lt script src http maxcdn bootstrapcdn com bootstrap 3 3 4 js bootstrap min js gt lt script gt lt head gt lt body gt lt php if S_SESSION SAFEUSER check to see if user is logged in if S_SESSION USERTYPE Admin check type show them the Admin menu gt lt nav class navbar navbar default navbar fixed top lt div class container gt lt div class navbar header gt lt button type button class navbar toggle data toggle collapse data target navbar container gt role navigation gt 14 lt span class sr only gt Show and hide the navigation lt span gt lt span class icon bar gt lt span gt lt span class icon bar gt lt span gt lt span class icon bar gt lt span gt lt button gt lt lt a class navbar brand href http www olemiss edu gt lt img class brand src uofmCrest jpg gt lt a gt gt lt div gt lt div class collapse navbar collapse id navbar container gt lt ul class nav navbar nav pull left gt lt li class active gt lt a href index php gt lt span class glyphicon glyphicon home gt lt span gt Home lt a gt lt li gt lt l
15. code needed to make datatables work within bootstrap version 3 came from gt lt l the following location gt sl https github com DataTables Plugins tree master integration bootstrap 3 gt lt note this next link has css settings to make datatables work with bootstrap version 3 gt lt link rel stylesheet type text css href DT_bootstrap css gt lt obtain the datatables javascript library from a reputable source gt lt script type text javascript language javascript src cdn datatables net 1 10 dev js jquery dataTables min js gt lt script gt lt note this next link has code to make datatables work with bootstrap version 3 gt lt script type text javascript language javascript src DT_bootstrap js gt lt script gt 38 lt here s the script that is automatically run by jquery once the page has finished loading gt lt script type text javascript charset utf 8 gt S document ready function S HUsers DataTable lt script gt lt php establish values for DB credentials include tcIncDbCredentials php get connected to the DB try SDBH new PDO mysql host Shostname dbname Sdbname username Suserpass catch PDOException Se echo Se gt getMessage estalish SQL query SSTH SDBH gt query SELECT FROM Users tt setting the fetch mode this comes into effect when the fetch function is called SSTH gt s
16. css jquery dataTables css gt lt script type text javascript language javascript src cdn datatables net 1 10 4 js jquery dataTables min js gt lt script gt lt Custom styles for this template gt lt link href starter template css rel stylesheet gt lt HTML5 shim and Respond js IE8 support of HTML5 elements and media queries gt lt if It IE 9 gt lt script src https oss maxcdn com libs html5shiv 3 7 0 html5shiv js gt lt script gt lt script src https oss maxcdn com libs respond js 1 4 2 respond min js gt lt script gt lt endif gt lt BR note All code needed to make datatables work within bootstrap version 3 came from gt lt l the following location gt sl https github com DataTables Plugins tree master integration bootstrap 3 gt lt note this next link has css settings to make datatables work with bootstrap version 3 gt lt link rel stylesheet type text css href DT_bootstrap css gt lt obtain the datatables javascript library from a reputable source gt lt script type text javascript language javascript src cdn datatables net 1 10 dev js jquery dataTables min js gt lt script gt lt note this next link has code to make datatables work with bootstrap version 3 gt lt script type text javascript language javascript src DT_bootstrap js gt lt script gt lt here s the script that is automatically run by jquery onc
17. e the page has finished loading gt lt script type text javascript charset utf 8 gt S document ready function S HUsers DataTable lt script gt lt php establish values for DB credentials include tcIncDbCredentials php get connected to the DB try SDBH new PDO mysql host Shostname dbname Sdbname username Suserpass catch PDOException Se echo Se gt getMessage estalish SQL query SSTH SDBH gt query SELECT FROM Users tt setting the fetch mode this comes into effect when the fetch function is called SSTH gt setFetchMode PDO FETCH_ ASSOC generate a table in the browser gt lt div class row gt lt div class col md 2 gt amp nbsp lt div gt lt div class col md 6 gt lt php echo lt table id Users gt echo lt thead gt lt tr gt lt th gt User ID lt th gt lt th gt Last Name lt th gt lt th gt First Name lt th gt lt th gt Email Address lt th gt lt th gt User Type lt th gt lt tr gt lt thead gt echo lt tbody gt while Srow SSTH gt fetch echo lt tr gt echo lt td gt Srow userlD lt td gt echo lt td gt Srow userLastName lt td gt echo lt td gt Srow userFirstName lt td gt echo lt td gt Srow userEmail lt td gt echo lt td gt Srow userType lt td gt echo lt tr gt echo lt tbody gt echo lt table gt
18. elect id name campus size 1 gt lt option value Oxford gt Oxford lt option gt lt option value DeSoto gt DeSoto lt option gt lt option value Tupelo gt Tupelo lt option gt lt option value Booneville gt Booneville lt option gt lt option value Grenada gt Grenada lt option gt lt select gt lt td gt lt tr gt lt tr gt lt td gt Office Building lt td gt lt td gt lt input type text id building name building gt lt td gt lt tr gt lt tr gt lt td gt Office Number lt td gt lt td gt lt input type text id office name office gt lt td gt lt tr gt 23 lt tr gt lt td gt Email Address lt td gt lt td gt lt input type email id email name email gt lt td gt lt tr gt lt tr gt lt td gt Password lt td gt lt td gt lt input type password id password name password gt lt td gt lt tr gt lt tr gt lt td colspan 4 align right gt lt input type submit value Submit gt lt td gt lt tr gt lt table gt lt br gt lt div gt lt div class col md 4 gt amp nbsp lt div gt lt div gt lt form gt lt php if S_ SESSION USERTYPE DeptManager gt lt head gt lt title gt Create New User lt title gt lt head gt lt form action tcNewUserFormProcess php id newUserForm method post gt lt div class row gt lt div class col md 2 gt amp nbsp lt div gt lt div class col md 4 gt lt h2 gt New User Information lt h2 g
19. er userEmail userPass VALUES StmpUserlD StmpUserType StmpFirstName StmpLastName StmpPhone StmpCampus StmpBuilding StmpOffice StmpEmail AES_ENCRYPT StmpPassword SAESvariable Performs the sql query on the server to insert the values gt lt div class row gt lt div class col md 2 gt amp nbsp lt div gt lt div class col md 4 gt lt br gt lt br gt lt php if Sconn gt query Ssql TRUE Print StmpFirstName StmpLastName added to user directory else echo Error Sconn gt error echo lt br gt echo lt a href tcLoginHome php gt Return to the menu lt a gt Sconn gt close gt lt div gt lt div class col md 4 gt amp nbsp lt div gt lt div gt lt br gt lt php if S_SESSION SAFEUSER echo Not a valid user Use correct email and password require_once tcIncPageFooter php Site Footer gt 29 lt php session_start Spagetitle Process Room Site Header require_once tcIncPageHeader php get post data StmpResNumber 1 StmpResUserlD S_SESSION USERID StmpResRoomlD _POST roomSelect StmpResStartTime _POST startTime StmpResEndTime 5_POST endTime StmpResDate S_POST date StmpResSeats _POST seats check safeuser if S_SESSION SAFEUSER echo Not a valid user Use correct email and password exit if S_SESSION U
20. etFetchMode PDO FETCH_ ASSOC generate a table in the browser gt lt div class row gt lt div class col md 2 gt amp nbsp lt div gt lt div class col md 6 gt lt php echo lt table id Users gt echo lt thead gt lt tr gt lt th gt User ID lt th gt lt th gt Last Name lt th gt lt th gt First Name lt th gt lt th gt Email Address lt th gt lt th gt User Type lt th gt lt tr gt lt thead gt echo lt tbody gt while Srow SSTH gt fetch echo lt tr gt echo lt td gt Srow userlD lt td gt echo lt td gt Srow userLastName lt td gt echo lt td gt Srow userFirstName lt td gt echo lt td gt Srow userEmail lt td gt echo lt td gt Srow userType lt td gt echo lt tr gt echo lt tbody gt 39 echo lt table gt gt lt div gt lt div class col md 4 gt amp nbsp lt div gt lt div gt lt br gt lt php require_once tclncPageFooter php gt 40 Welcome ft Home E About Contacte LLogin University of Mississippi Test Center Reservation System Welcome to the test center reservation site Please login to access testing information Copyright 2015 CloudsOutLoud Inc Login ft Home E About Contacte LB Login User Login adamgam University of Mississippi Not signed up Register Here Test Center Reservation System Welcome t
21. getitle New User Process Site Header require_once tcIncPageHeader php if 1S_ SESSION SAFEUSER echo Not a valid user Use correct email and password exit receive user info StmpUserID StmpUserType _POST userType StmpFirstName S_POST firstName StmpLastName _POST lastName StmpPhone _POST phone StmpCampus S_POST campus StmpBuilding _POST building StmpOffice S_POST office StmpEmail _POST email StmpPassword S_POST password echo StmpFirstName StmpLastName will be entered as a StmpUserType echo lt br gt lt br gt include tclncDbCredentials php Sconn new mysqli Shostname Susername Suserpass Sdbname include tcAES php encryption sql query for INSERT INTO users Ssql INSERT INTO Users userID userType userFirstName userLastName userOfficePhone userCampus userOfficeBuilding userOfficeNumber userEmail userPass VALUES StmpUserlD StmpUserType StmpFirstName StmpLastName StmpPhone StmpCampus StmpBuilding StmpOffice StmpEmail AES_ENCRYPT StmpPassword SAESvariable Performs the sql query on the server to insert the values gt 27 lt div class row gt lt div class col md 2 gt amp nbsp lt div gt lt div class col md 4 gt lt br gt lt br gt lt php if Sconn gt query Ssql TRUE Print StmpFirstName StmpLastName
22. gt lt div gt lt div class col md 4 gt amp nbsp lt div gt lt div gt lt br gt lt php require_once tclncPageFooter php gt lt php session_start Spagetitle Testing Center Info see if they want to logout from a current session StOption _GET cmd if so using StOption _GET cmd end session if StOption logout session_unset session_destroy Site Header require_once tclncPageHeader php gt lt div class container gt lt div class jumbotron gt lt div class container gt lt div class row bg success show gt lt div class col md 12 align center gt lt h3 gt About lt h3 gt lt div gt lt div gt lt div gt lt br gt lt div class row gt lt div class col sm 4 gt lt br gt lt p gt lt h3 align center gt Test Center lt h3 gt lt p gt lt p gt lt p gt lt p gt lt h5 align center gt This site is to be used by faculty lt h5 gt lt p gt lt p gt lt h5 align center gt members to reserve testing centers lt h5 gt lt p gt lt div gt lt div class col sm 4 gt lt br gt lt p gt lt h3 align center gt Users lt h3 gt lt p gt lt p gt lt p gt lt p gt lt h5 align center gt Use the users list to see a lt h5 gt lt p gt lt p gt lt h5 align center gt list of all users and to edit user lt h5 gt lt p gt lt p gt lt h5 align center gt info lt h5 gt lt p gt lt div gt
23. i class dropdown gt lt a href class dropdown toggle data toggle dropdown gt Users lt span class caret gt lt span gt lt a gt lt ul class dropdown menu role menu gt lt li gt lt a href tcNewUserForm php gt Enter a new user lt a gt lt li gt lt li gt lt a href tcViewUsers php gt View all users lt a gt lt li gt lt ul gt lt li gt lt li class dropdown gt lt a href class dropdown toggle data toggle dropdown gt Rooms lt span class caret gt lt span gt lt a gt lt ul class dropdown menu role menu gt lt li gt lt a href tcAddRoomForm php gt Add a new room lt a gt lt li gt lt li gt lt a href tcViewRooms php gt View all testing rooms lt a gt lt li gt lt li gt lt a href tcRoomReservation php gt Reserve Testing Room lt a gt lt li gt lt ul gt lt li gt lt ul gt lt ul class nav navbar nav pull right gt lt li gt lt a href tcAbout php gt lt span class glyphicon glyphicon book gt lt span gt About lt a gt lt li gt lt li class dropdown gt lt a href class dropdown toggle data toggle dropdown gt lt span class glyphicon glyphicon question sign gt lt span gt Contact lt span class caret gt lt span gt lt a gt 15 lt ul class dropdown menu role menu gt lt li gt lt a href gt lt span class glyphicon glyphicon phone gt lt span gt Phone lt a gt lt li gt lt li gt lt a href gt lt span class
24. ize 1 gt lt option value Oxford gt Oxford lt option gt lt option value DeSoto gt DeSoto lt option gt lt option value Tupelo gt Tupelo lt option gt lt option value Booneville gt Booneville lt option gt lt option value Grenada gt Grenada lt option gt lt select gt lt td gt lt tr gt lt tr gt lt td gt Building lt td gt lt td gt lt input type text name building gt lt td gt lt tr gt lt tr gt lt td gt Room Number lt td gt lt td gt lt input type text name roomNumber gt lt td gt lt tr gt lt tr gt lt td gt Seat Limit lt td gt lt td gt lt input type number name seatLimit gt lt td gt lt tr gt lt tr gt lt td colspan 4 align right gt lt input type submit value Submit gt lt td gt lt tr gt lt table gt lt br gt lt div gt lt div class col md 4 gt amp nbsp lt div gt lt div gt lt form gt lt php if S_ SESSION USERTYPE DeptManager gt lt head gt lt title gt Add New Testing Room lt title gt lt head gt lt form action tcAddRoomFormProcess php method post gt lt div class row gt lt div class col md 2 gt amp nbsp lt div gt lt div class col md 4 gt lt h2 gt New User Information lt h2 gt lt p gt lt table gt lt tr gt lt td gt Campus lt td gt lt td gt lt select name campus size 1 gt lt option value Oxford gt Oxford lt option gt 10 lt option value DeSoto gt DeSoto lt option
25. l class dropdown menu role menu gt lt li gt lt a href gt lt span class glyphicon glyphicon phone gt lt span gt Phone lt a gt lt li gt lt li gt lt a href gt lt span class glyphicon glyphicon envelope gt lt span gt Email lt a gt lt li gt lt ul gt lt li gt lt li gt lt a href index php cmd logout navbar navbar right gt Logout lt a gt lt li gt lt ul gt lt div gt lt div gt lt nav gt lt php if IS_SESSION SAFEUSER otherwise show them the login menu gt lt nav class navbar navbar default navbar fixed top lt div class container gt lt div class navbar header gt lt button type button class navbar toggle data toggle collapse data target navbar container gt lt span class sr only gt Show and hide the role navigation gt navigation lt span gt lt span class icon bar gt lt span gt lt span class icon bar gt lt span gt lt span class icon bar gt lt span gt lt button gt lt lt a class navbar brand href http www olemiss edu gt lt img class brand src uofmCrest jpg gt lt a gt gt lt div gt lt div class collapse navbar collapse id navbar container gt lt ul class nav navbar nav pull left gt lt li class active gt lt a href index php gt lt span class glyphicon glyphicon home gt lt span gt Home lt a gt lt li gt lt ul gt lt ul class nav navbar nav pull right gt 20
26. lass input group input group gt lt span class input group addon gt lt span class glyphicon glyphicon lock gt lt span gt lt span gt lt input type password class form control id Fpassword name Fpassword placeholder Enter password gt 21 lt div gt lt br gt lt br gt lt input type submit class btn btn primary id Fsubmit value Login gt lt br gt lt br gt lt br gt Not signed up lt br gt lt button type button gt lt a href tcUserRegistration php gt Register Here lt a gt lt button gt lt div gt lt div class col md 12 gt amp nbsp lt div gt lt div gt lt form gt lt li gt lt ul gt lt li gt lt ul gt lt div gt lt div gt lt nav gt lt php gt lt br gt lt div class container align center gt lt div class jumbotron align center gt lt div class container align center gt lt div class row bg success show gt lt div class col md 12 align center gt lt h1 gt University of Mississippi lt h1 gt lt br gt lt h2 gt Test Center Reservation System lt h2 gt lt div gt lt div gt lt div gt lt div gt lt div gt lt php session_start Spagetitle New User Site Header require_once tclncPageHeader php if S_SESSION SAFEUSER echo Not a valid user exit 22 Admin can set up new Admin Department Manager Faculty Other view users and reserve set up and view
27. mail Address mmy six edu Password nens Submit Copyright 2015 CloudsOutLoud Inc ft Home Users Rooms E About O Contact Logout University of Mississippi Test Center Reservation System Heres Johnny added to user directory Copyright 2015 CloudsOutLoud Inc ftHome Users Roomsw E About contact Logout University of Mississippi Test Center Reservation System Room Reservation Information Room Jackson Avenue Testing Center 100 Start End Date mm dd yyyy Seats Submit Copyright 2015 CloudsOutLoud Inc 45 Working ft Home Users y Rooms Ml About Contact Logout Test Center Reservation System Testing center reservation confirmed Copyright 2015 CloudsOutLoud Inc Room Full ftHome Users Roomsw Mi About contact Logout University of Mississippi Test Center Reservation System Sorry there are not enough seats at this time Copyright 2015 CloudsOutLoud Inc 46 ft Home E About Contacts Loge University of Mississippi Test Center Reservation System Registration Information First Name Last Name Office Phone Number Campus Oxford Office Building Office Number Email Address word word Password eene H Submit Copyright 2015 CloudsOutLouc f Home Mabout contacty LLogin University of Mississippi Test Center Reservation Sys
28. ms lt span class caret gt lt span gt lt a gt lt ul class dropdown menu role menu gt lt li gt lt a href tcAddRoomForm php gt Add a new room lt a gt lt li gt lt li gt lt a href tcViewRooms php gt View all testing rooms lt a gt lt li gt lt li gt lt a href tcRoomReservation php gt Reserve Testing Room lt a gt lt li gt lt ul gt lt li gt lt ul gt lt ul class nav navbar nav pull right gt lt li gt lt a href tcAbout php gt lt span class glyphicon glyphicon book gt lt span gt About lt a gt lt li gt lt li class dropdown gt lt a href class dropdown toggle data toggle dropdown gt lt span class glyphicon glyphicon question sign gt lt span gt Contact lt span class caret gt lt span gt lt a gt lt ul class dropdown menu role menu gt 18 lt li gt lt a href gt lt span class glyphicon glyphicon phone gt lt span gt Phone lt a gt lt li gt lt li gt lt a href gt lt span class glyphicon glyphicon envelope gt lt span gt Email lt a gt lt li gt lt ul gt lt li gt lt li gt lt a href index php cmd logout navbar navbar right gt Logout lt a gt lt li gt lt ul gt lt div gt lt div gt lt nav gt lt php if S_SESSION USERTYPE Other Check type show them the other user menu gt lt nav class navbar navbar default navbar fixed top lt div class container gt lt div class navbar header g
29. nd Privileges There are 4 types of users Admin Admin has access to godaddy and all website functions did not set up the Admin for goDaddy in this test case DeptManager DeptManager has access to all website functions except adding Admins but not to godaddy Faculty Faculty has limited website privileges including adding users of equal or lesser value and booking and viewing rooms Other Other can view rooms Those registering using the New User Registration are initially given Other privileges which must be updated by the Admin via goDaddy e Almost all users were given the password amgambre for ease of use Excel Adam Gambrell Oxford Campus MIS 419 System On Off Users a userfirsiNa me userLastName userOfficePhone usertampus juserOfficeBuilding userOfficeNumber JuserEmail juserPass Schools campusAddress campusCity campusState campusZip campusPhone H Rooms building roomNumber seatLimit ReservationDetails resDate resStartTime resEndTime resSeats phpMyAdmin Export Attached in zip file lt php session_start Spagetitle View Users Site Header require_once tcincPageHeader php if IS_SESSION SAFEUSER echo Not a valid user Use correct email and password exit gt lt link rel stylesheet type text css href cdn datatables net 1 10 4
30. o the test center reservation site Please login to access testing information Copyright 2015 CloudsOutLoud Inc Logged In ft Home Users Rooms E About Contact Logout University of Mississippi Test Center Reservation System Hello Adam Welcome Thank you for logging in Choose from menu options Copyright 2015 CloudsOutLoud Inc 42 fhHome User Rooms About Contacte Logout University of Mississippi Test Center Reservation System About Test Center Users Rooms This site is to be used by faculty Use the users list to see a Use the rooms list to see a members to reserve testing centers list of all users and to edit user list of all rooms add rooms info and to reserve rooms ftHome Users Rooms E About Contacte Logout University of Mississippi Test Center Reservation System New User Information Campus Oxford v Building Room Number Seat Limit Submit Copyright 2015 CloudsOutLoud Inc 43 ft Home Users Rooms E About 0 Contact Logout University of Mississippi Test Center Reservation System Test Face 6543 added to room directory Copyright 2015 CloudsOutLoud Inc ftHome Users Rooms About Contact Logout University of Mississippi Test Center Reservation System New User Information User Type Administrator M First Name Last Name Office Phone Number Campus Oxford M Office Building Office Number E
31. ssword name password gt lt td gt lt tr gt lt tr gt lt td colspan 4 align right gt lt input type submit value Submit gt lt td gt lt tr gt lt table gt lt br gt lt div gt lt div class col md 4 gt amp nbsp lt div gt lt div gt lt form gt lt php if S_SESSION USERTYPE Faculty gt lt head gt lt title gt Create New User lt title gt lt head gt lt form action tcNewUserFormProcess php id newUserForm method post gt lt div class row gt lt div class col md 2 gt amp nbsp lt div gt lt div class col md 4 gt lt h2 gt New User Information lt h2 gt lt p gt lt table gt lt tr gt lt td gt User Type lt td gt lt td gt lt select id userType name userType size 1 gt lt option value Other gt Other Assistant lt option gt lt select gt lt td gt lt tr gt lt tr gt lt td gt First Name lt td gt lt td gt lt input type text name firstName gt lt td gt lt tr gt lt tr gt lt td gt Last Name lt td gt lt td gt lt input type text name lastName gt lt td gt lt tr gt lt tr gt lt td gt Office Phone Number lt td gt lt td gt lt input type tel name phone gt lt td gt lt tr gt lt tr gt lt td gt Campus lt td gt lt td gt lt select name uCampus size 1 gt lt option value Oxford gt Oxford lt option gt lt option value DeSoto gt DeSoto lt option gt lt option value Tupelo gt Tupelo lt option gt l
32. t lt button type button class navbar toggle data toggle collapse data target navbar container gt role navigation gt lt span class sr only gt Show and hide the navigation lt span gt lt span class icon bar gt lt span gt lt span class icon bar gt lt span gt lt span class icon bar gt lt span gt lt button gt lt lt a class navbar brand href http www olemiss edu gt lt img class brand src uofmCrest jpg gt lt a gt gt lt div gt lt div class collapse navbar collapse id navbar container gt lt ul class nav navbar nav pull left gt lt li class active gt lt a href index php gt lt span class glyphicon glyphicon home gt lt span gt Home lt a gt lt li gt lt li class dropdown gt lt a href class dropdown toggle data toggle dropdown gt Rooms lt span class caret gt lt span gt lt a gt lt ul class dropdown menu role menu gt lt li gt lt a href tcViewRooms php gt View all testing rooms lt a gt lt li gt lt ul gt lt li gt lt ul gt lt ul class nav navbar nav pull right gt 19 lt li gt lt a href tcAbout php gt lt span class glyphicon glyphicon book gt lt span gt About lt a gt lt li gt lt li class dropdown gt lt a href class dropdown toggle data toggle dropdown gt lt span class glyphicon glyphicon question sign gt lt span gt Contact lt span class caret gt lt span gt lt a gt lt u
33. t lt p gt lt table gt lt tr gt lt td gt User Type lt td gt lt td gt lt select id userType name userType size 1 gt lt option value Faculty gt Faculty Professor lt option gt lt option value Other gt Other lt option gt lt select gt lt td gt lt tr gt lt tr gt lt td gt First Name lt td gt lt td gt lt input type text id name firstName gt lt td gt lt tr gt lt tr gt lt td gt Last Name lt td gt lt td gt lt input type text name lastName gt lt td gt lt tr gt lt tr gt lt td gt Office Phone Number lt td gt lt td gt lt input type tel name phone gt lt td gt lt tr gt lt tr gt lt td gt Campus lt td gt lt td gt lt select name uCampus size 1 gt lt option value Oxford gt Oxford lt option gt lt option value DeSoto gt DeSoto lt option gt lt option value Tupelo gt Tupelo lt option gt lt option value Booneville gt Booneville lt option gt lt option value Grenada gt Grenada lt option gt lt select gt lt td gt lt tr gt lt tr gt lt td gt Office Building lt td gt lt td gt lt input type text name building gt lt td gt lt tr gt lt tr gt lt td gt Office Number lt td gt lt td gt lt input type text name office gt lt td gt lt tr gt 24 lt tr gt lt td gt Email Address lt td gt lt td gt lt input type email name email gt lt td gt lt tr gt lt tr gt lt td gt Password lt td gt lt td gt lt input type pa
34. t Tupelo lt option gt lt option value Booneville gt Booneville lt option gt lt option value Grenada gt Grenada lt option gt lt select gt lt td gt lt tr gt lt tr gt lt td gt Office Building lt td gt lt td gt lt input type text name building lt tr gt lt td gt Office Number lt td gt lt td gt lt input type text name office lt tr gt lt td gt Email Address lt td gt lt td gt lt input type email name email lt tr gt lt td gt Password lt td gt lt td gt lt input type password name password lt tr gt lt td colspan 4 align right gt lt input type submit value Submit gt lt td gt lt tr gt lt table gt lt div class col md 4 gt amp nbsp lt div gt 33 lt php session_start Spagetitle Registration Process Site Header require_once tcIncPageHeader php if S_POST email gt and S_POST password gt receive user info StmpUserID StmpUserType Other StmpFirstName S_POST firstName StmpLastName _POST lastName StmpPhone _POST phone StmpCampus _POST campus StmpBuilding _POST building StmpOffice S_POST office StmpEmail _POST email StmpPassword S_POST password include tcIncDbCredentials php Sconn new mysqli Shostname Susername Suserpass Sdbname include tcAES php encryption sql query for INSERT INTO users Ssql INSERT INTO Users userID userType
35. t option value Booneville gt Booneville lt option gt lt option value Grenada gt Grenada lt option gt lt select gt lt td gt lt tr gt lt tr gt lt td gt Office Building lt td gt lt td gt lt input type text name building gt lt td gt lt tr gt lt tr gt lt td gt Office Number lt td gt lt td gt lt input type text name office gt lt td gt lt tr gt 25 lt tr gt lt td gt Email Address lt td gt lt td gt lt input type email name email gt lt td gt lt tr gt lt tr gt lt td gt Password lt td gt lt td gt lt input type password name password gt lt td gt lt tr gt lt tr gt lt td gt Confirm Password lt td gt lt td gt lt input type confirmpassword name confirmpassword gt lt td gt lt tr gt lt tr gt lt td colspan 4 align right gt lt input type submit value Submit gt lt td gt lt tr gt lt table gt lt br gt lt div gt lt div class col md 4 gt amp nbsp lt div gt lt div gt lt form gt lt php gt lt script type text javascript gt S document ready function var validator newUserForm bootstrapValidator fields email message Email address is required validators notEmpty lt script gt lt php else echo Not a valid user Use correct email and password require_once tclncPageFooter php Site Footer gt 26 lt php session_start Spa
36. tcEditRoomsInfo php gt lt span class glyphicon glyphicon edit gt Edit lt span gt lt a gt lt td gt echo lt td gt Srow campusName lt td gt echo lt td gt Srow building lt td gt echo lt td gt Srow roomNumber lt td gt echo lt td gt Srow seatLimit lt td gt echo lt tr gt echo lt tbody gt echo lt table gt gt lt div gt lt div class col md 4 gt amp nbsp lt div gt lt div gt lt br gt lt php require_once tclncPageFooter php gt 37 lt php session_start Spagetitle View Users Site Header require_once tcIncPageHeader php if IS_SESSION SAFEUSER echo Not a valid user Use correct email and password exit gt lt link rel stylesheet type text css href cdn datatables net 1 10 4 css jquery dataTables css gt lt script type text javascript language javascript src cdn datatables net 1 10 4 js jquery dataTables min js gt lt script gt lt Custom styles for this template gt lt link href starter template css rel stylesheet gt lt HTML5 shim and Respond js IE8 support of HTML5 elements and media queries gt lt if It IE 9 gt lt script src https oss maxcdn com libs html5shiv 3 7 0 html5shiv js gt lt script gt lt script src https oss maxcdn com libs respond js 1 4 2 respond min js gt lt script gt lt endif gt lt BR note All
37. tem Billy Bad Arse added to user directory Copyright 2015 CloudsOutLoud Inc 47 f Home Users Rooms About Contact Lo University of Mississippi Test Center Reservation System Show 10 r entries Search Campus 4 Building Room Number Seat Limit DeSoto Dog House 416 208 Oxford Jackson Avenue Testing Center 100 35 Oxford Holman 212 10 Oxford Tiny Room 4 4 Oxford Gambrell Room 111 15 Oxford E Room 1 1000 Tupelo Test Face 6543 1 Showing 1 to 7 of 7 entries Previous 1 Next teViewUsers ft Home Users Rooms Mi About Contact Log UNIVersIty OT IVIISSISSIPpI Test Center Reservation System Show 10 v entries Search UserID LastName First Name Email Address User Type 6 Gambrell Adam adamgambrell yahoo com Admin 7 Face Yo yo face ugly Faculty 14 Flinstone Fred Fred whatstheinternet huh DeptManager 24 Pup Cody cody p pup Other 25 Word Word word word word Other 31 Six Sammy sammy six edu Faculty 33 Pelletier Ellen ellen ellen ellen Admin 34 SYSTEM SYSTEM system system system Admin 35 Johnny Heres crazy theShining snow Other 36 Bad Arse Billy billy bad toTheBone Other Showing 1 to 10 of 10 entries Previous 1 Next 48 49
38. ter a new user lt a gt lt li gt lt li gt lt a href tcViewUsers php gt View all users lt a gt lt li gt 16 lt ul gt lt li gt lt li class dropdown gt lt a href class dropdown toggle data toggle dropdown gt Rooms lt span class caret gt lt span gt lt a gt lt ul class dropdown menu role menu gt lt li gt lt a href tcAddRoomForm php gt Add a new room lt a gt lt li gt lt li gt lt a href tcViewRooms php gt View all testing rooms lt a gt lt li gt lt li gt lt a href tcRoomReservation php gt Reserve Testing Room lt a gt lt li gt lt ul gt lt li gt lt ul gt lt ul class nav navbar nav pull right gt lt li gt lt a href tcAbout php gt lt span class glyphicon glyphicon book gt lt span gt About lt a gt lt li gt lt li class dropdown gt lt a href class dropdown toggle data toggle dropdown gt lt span class glyphicon glyphicon question sign gt lt span gt Contact lt span class caret gt lt span gt lt a gt lt ul class dropdown menu role menu gt lt li gt lt a href gt lt span class glyphicon glyphicon phone gt lt span gt Phone lt a gt lt li gt lt li gt lt a href gt lt span class glyphicon glyphicon envelope gt lt span gt Email lt a gt lt li gt lt ul gt lt li gt lt li gt lt a href index php cmd logout navbar navbar right gt Logout lt a gt lt li gt lt ul gt lt div gt lt div gt
39. userFirstName userLastName userOfficePhone userCampus userOfficeBuilding userOfficeNumber userEmail userPass VALUES StmpUserID StmpUserType StmpFirstName StmpLastName StmpPhone StmpCampus StmpBuilding StmpOffice StmpEmail AES_ENCRYPT StmpPassword SAESvariable Performs the Ssql query on the server to insert the values gt lt div class row gt lt div class col md 2 gt amp nbsp lt div gt lt div class col md 4 gt lt br gt lt br gt 34 else lt php if Sconn gt query Ssql TRUE Print StmpFirstName StmpLastName else echo Error Sconn gt error echo lt br gt echo lt a href tcLoginHome php gt Return to the menu lt a gt added to user directory Sconn gt close gt lt div gt lt div class col md 4 gt amp nbsp lt div gt lt div gt lt br gt lt div class row gt lt div class col md 2 gt amp nbsp lt div gt lt div class col md 4 gt lt br gt lt div gt lt div class col md 4 gt amp nbsp lt div gt lt div gt lt php gt lt div class row gt lt div class col md 2 gt amp nbsp lt div gt lt div class col md 4 gt lt br gt lt br gt lt php echo lt font color red gt Enter valid email and password lt font gt lt br gt lt br gt gt lt div gt lt div class col md 4 gt amp nbsp lt div gt lt div gt lt br gt lt php require_once
40. vascript src cdn datatables net 1 10 dev js jquery dataTables min js gt lt script gt lt note this next link has code to make datatables work with bootstrap version 3 gt lt script type text javascript language javascript src DT_bootstrap js gt lt script gt lt here s the script that is automatically run by jquery once the page has finished loading gt lt script type text javascript charset utf 8 gt S document ready function S Rooms DataTable 36 lt script gt lt php establish values for DB credentials include tcIncDbCredentials php get connected to the DB try SDBH new PDO mysql host Shostname dbname Sdbname username Suserpass catch PDOException Se echo Se gt getMessage estalish SQL query SSTH SDBH gt query SELECT FROM Rooms setting the fetch mode this comes into effect when the fetch function is called SSTH gt setFetchMode PDO FETCH ASSOC generate a table in the browser gt lt div class row gt lt div class col md 2 gt amp nbsp lt div gt lt div class col md 6 gt lt php echo lt table id Rooms gt echo lt thead gt lt tr gt lt th gt Campus lt th gt lt th gt Building lt th gt lt th gt Room Number lt th gt lt th gt Seat Limit lt th gt lt tr gt lt thead gt echo lt tbody gt while Srow SSTH gt fetch echo lt tr gt echo lt td gt lt a href
41. y for INSERT INTO Rooms Ssql INSERT INTO Rooms roomID campusName building roomNumber seatLimit VALUES StmpRoomID StmpCampus StmpBuilding StmpRoomNumber StmpSeatLimit Performs the sql query on the server to insert the values gt lt div class row gt lt div class col md 2 gt amp nbsp lt div gt lt div class col md 4 gt lt br gt lt br gt lt php if Sconn gt query Ssql TRUE Print StmpBuilding StmpRoomNumber added to room directory else echo Error Sconn gt error echo lt br gt echo lt a href tcLoginHome php gt Return to the menu lt a gt Sconn gt close gt lt div gt lt div class col md 4 gt amp nbsp lt div gt lt div gt lt br gt lt php if _SESSION SAFEUSER echo Not a valid user Use correct email and password require_once tclncPageFooter php Site Footer gt AES encryption variable lt php SAESvariable OpFF9657EEnsd pp8 gt 12 lt php connect to the TestingCenter database login info Shostname localhost Susername amgambre419 Suserpass amgambre419 Sdbname TestingCenter gt lt php include tclncDbCredentials php Sdbconn new mysqli Shostname username Suserpass Sdbname sql query for system On Off SsqlPage SELECT On Off FROM System WHERE 1 post and exit system if off if Sdbconn gt query SsqlPage

Download Pdf Manuals

image

Related Search

Related Contents

User Manual  環境・社会報告書2006(PDF:10.2MB)  ! AVERTISSEMENT - Napoleon Products  E ACHTUNG  Ce permis à points est le fruit d`une année scolaire de travail et de  Samsung S27A850D Hướng dẫn sử dụng  AMF RDF - 48 User's Manual  Omron E5CC Controller Datasheet  

Copyright © All rights reserved.
Failed to retrieve file