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
2 changes: 1 addition & 1 deletion doDeletePatient.php → doDeleteResidence.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
if (!$ret) {
setFlash(pg_last_error($db));
}
header("Location: patients.php");
header("Location: residences.php");
?>
2 changes: 1 addition & 1 deletion doDeleteAppointment.php → doDeleteServiceTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
if (!$ret) {
setFlash(pg_last_error($db));
}
header("Location: appointments.php");
header("Location: servicetransport.php");
?>
1 change: 0 additions & 1 deletion doEditPatient.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
$_POST["telephoneResidence"],
$_POST["id"]]);
closeDB();

if (!$ret) {
setFlash(pg_last_error($db));
}
Expand Down
2 changes: 1 addition & 1 deletion doEditAppointment.php → doEditServiceTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
setFlash(pg_last_error($db));
}
else {
header("Location: appointments.php");
header("Location: servicetransport.php");
}
?>
2 changes: 1 addition & 1 deletion doNewAppointment.php → doNewServiceTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
setFlash(pg_last_error($db));
}
else {
header("Location: appointments.php");
header("Location: servicetransport.php");
}
?>
11 changes: 4 additions & 7 deletions editAppointmentView.php → editServiceTransportView.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@

connectDB();

$sql = "select * from cojoDatabase.Appointment where id = $1";
$sql = "select * from cojoDatabase.ServiceTransport where id = $1";
$ret = pg_query_params($db, $sql, [$_GET["id"]]);
closeDB();
if (!$ret) {
setFlash("This isn't the serviceTransport you're looking for.");
header("Location: appointments.php");
header("Location: servicetransport.php");
exit;
}
?>
Expand All @@ -30,19 +29,17 @@
<body>
<div class="wrapper">
<header>
<h1>COJO PROJECT</h1>

<h1>COJO</h1>
<?php breadcrumb("Modifier un transport") ?>
</header>

<?php $r = pg_fetch_row($ret); ?>
<form action="doEditAppointment.php" method="POST">
<form action="doEditServiceTransport.php" method="POST">
<input type="hidden" name="id" value="<?php echo $r[0] ?>"><br />
Depart: <input type="text" class="datetimepicker" name="depart" value="<?php echo $r[1]; ?>" /> <br />
Arrivee: <input type="text" class="datetimepicker" name="arrivee" value="<?php echo $r[2]; ?>" /> <br />
Itineraire: <textarea name="Itineraire"cols="90" rows="10"><?php echo $r[3]; ?></textarea> <br />
FrequenceHoraire: <textarea name="FrequenceHoraire"cols="90" rows="10"><?php echo $r[4]; ?></textarea> <br />
Itineraire: <textarea name="itineraire"cols="90" rows="10"><?php echo $r[3]; ?></textarea> <br />
FrequenceHoraire: <textarea name="freqHoraire"cols="90" rows="10"><?php echo $r[4]; ?></textarea> <br />
<input type="submit" value="Submit">
</form>
</div>
Expand Down
2 changes: 1 addition & 1 deletion inc/prelude.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

function connectDB() {
global $db;
$db = pg_connect("host=localhost port=5432 dbname=cojoDatabase user=postgres password=admin");
$db = pg_connect("host=localhost port=5432 dbname=cojoDatabase user=postgres password=didine");
if (!$db) {
echo "Error : Unable to open database\n";
}
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div><a href="doctors.php">Athlètes</a></div>
<div><a href="secretaries.php">Officiels</a></div>
<div><a href="patients.php">Résidences</a></div>
<div><a href="appointments.php">Services Transport</a></div>
<div><a href="servicetransport.php">Services Transport</a></div>
<div><a href="epreuves.php">Épreuves</a></div>
<div><a href="employees.php">Employés</a></div>
<div><a href="ServiceMedical.php">Services Médicaux</a></div>
Expand Down
4 changes: 2 additions & 2 deletions newAppointmentView.php → newServiceTransportView.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
<?php breadcrumb("nouveau transport") ?>
</header>

<form action="doNewAppointment.php" method="POST">
<form action="doNewServiceTransport.php" method="POST">
Depart: <input type="text" name="depart" class="datetimepicker" /><br />
Arrivee: <input type="text" name="arrivee" class="datetimepicker" /><br />
Itineraire: <textarea name="itineraire" cols="90" rows="10"></textarea><br />
FreqHoraire: <textarea name="frequHoraire" cols="90" rows="10"></textarea><br />
FreqHoraire: <textarea name="freqHoraire" cols="90" rows="10"></textarea><br />
<input type="submit" value="Submit">
</form>

Expand Down
1 change: 0 additions & 1 deletion patients.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>COJO OLYMPIC GAMES PROJECT - CSI2532 :: Patients</title>
<title>COJO OLYMPIC GAMES PROJECT - CSI2532 :: Residences</title>
<style>
body {
Expand Down
8 changes: 4 additions & 4 deletions appointments.php → servicetransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<?php breadcrumb("Service Transport") ?>
</header>

<a href="newAppointmentView.php" class="new">New</a>
<a href="newServiceTransportView.php" class="new">New</a>

<?php
connectDB();
Expand All @@ -37,13 +37,13 @@
for ($i = 0; $i < 3; $i++) {
echo "<td>", $row[$i], "</td>";
}
echo "<td><a href='editAppointmentView.php?id=$row[0]'>Read</a></td>";
echo "<td><a href='editServiceTransporttView.php?id=$row[0]'>Read</a></td>";
for ($i = 3; $i < 5; $i++) {
echo "<td>", $row[$i], "</td>";
}

editCell("Appointment", $row[0]);
deleteCell("Appointment", $row[0]);
editCell("ServiceTransport", $row[0]);
deleteCell("ServiceTransport", $row[0]);

echo "</tr>";
}
Expand Down