<?php
session_save_path("/home/users/web/b557/sl.flyingcoachlimo/public_html/cgi-bin/tmp");
session_start();
if (!isset($_SESSION["verified"])) {
header ("Location: index.php");
exit();
}
// Connect to the database
include("incDBConnectAdmin.php");
?>
<link rel="stylesheet" href="../stylesheet.css" type="text/css" />
<table align="center" border="0" width="350">
<tr valign="top" height="25">
<td>
<h1>
www.LetUsDesign.it - Edit.it CMS v1.0.7
</h1>
<p>
Please note that upon submission, all changes you make are final and will be committed to the database immediately. All changes and edits made are final and can not be reverted.<br/><br/>
</p>
</td>
</tr>
<tr valign="top" height="25">
<td>
<table border="1">
<tr>
<th>
Page Name
</th>
<th>
Top Text
</th>
<th>
Bottom Text
</th>
<th colspan="2">
Backdrop
</th>
</tr>
<?php
// Display pages that user can edit
$query = "SELECT pageName FROM pages ORDER BY pageID";
$result = mysql_query($query);
if(!$result)
{
echo 'Query failed: '.mysql_error();
}
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>";
echo $row[0];
echo "</td>";
echo "<td>";
echo "<a href='edit.php?pageID=$row[0]&pageSection=Top'>Edit Top Text</a>";
echo "</td>";
echo "<td>";
echo "<a href='edit.php?pageID=$row[0]&pageSection=Bottom'>Edit Bottom Text</a>";
echo "</td>";
echo "<td>";
echo "<a href='backdrop.php?pageID=$row[0]'>Change Backdrop</a>";
echo "</td>";
echo "<td>";
echo "<a href='uploadbackdrop.php'>Upload a new backdrop</a>";
echo "</td>";
echo "</tr>";
}
?>
</table>
</td>
</tr>
<tr valign="top" height="25">
<td>
<table border="1">
<tr>
<th>
Limo Name
</th>
<th>
Change limo text
</th>
<th>
Set limo photos
</th>
<th>
Delete limousine
</th>
</tr>
<?php
// Display pages that user can edit
$query = "SELECT eName, eID FROM limos ORDER BY eID";
$result = mysql_query($query);
if(!$result)
{
echo 'Query failed: '.mysql_error();
}
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>";
echo $row[0];
echo "</td>";
echo "<td>";
echo "<a href='changelimo.php?limoID=$row[1]'>Change</a>";
echo "</td>";
echo "<td>";
echo "<a href='setlimo.php?limoID=$row[1]'>Set</a>";
echo "</td>";
echo "<td>";
echo "<a href='deletelimo.php?limoID=$row[1]'>Delete</a>";
echo "</td>";
echo "</tr>";
}
?>
<tr>
<td colspan="2">
<a href="addnewlimo.php">Add a new limousine</a><br/>
</td>
<td colspan="2">
<a href="uploadlimophoto.php">Upload a new limo photo</a><br/>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<br/><br/>
<a href="uploadheader.php">Upload a new header</a><br/>
<a href="header.php">Change header</a>
</td>
</tr>
<tr>
<td>
<br/><br/>
<a href="uploadnewterms.php">Update terms and conditions</a>
</td>
</tr>
<tr>
<td>
<br/><br/>
<a href="changepass.php">Change administrator password</a>
</td>
</tr>
<tr>
<td>
<br/><br/>
<a href="logout.php">Logout of Page Editor</a>
</td>
</tr>
</table>