File: //home/awaldron/public_html/archive/demo/admin/pages_layout_list.php
<?php
session_start();
include("../_functions.php");
dbconnect();
if (!is_logged()) auto_login();
echo "<html>\n";
echo "<head>\n";
echo "<title>".COMPANY_NAME." : Content Page Layouts</title>\n";
echo "<script language=\"JavaScript\" type=\"text/javascript\">\n";
echo "<!--\n";
echo "function openWindow(theURL,winName,features) { //v2.0\n";
echo " window.open(theURL,winName,features);\n";
echo "}\n";
echo "function confirm_delete(id) {\n";
echo " input_box=confirm(\"Are you sure you want to permanently delete this Web Page? (This action cannot be undone.)\");\n";
echo " if (input_box==true) {\n";
echo " self.location=\"pages_del.php?del=\"+id;\n";
echo " }\n";
echo "}\n";
echo "-->\n";
echo "</script>\n";
echo "</head>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../default.css\">\n";
echo "<body style=\"margin:15px;\">\n";
if (!admin_panel($_SESSION["auth_user"])) {
echo "<br><br><br><br>".error("You must be logged in to access the administration panel!");
} else {
echo "<P><img src=\"/gui/icons/cog.gif\" align=\"left\">\n";
echo "<div class=\"headline\">Content Page Layouts</div>\n";
echo "<P>This page displays a list of all content pages that have a custom layout. You can also edit the Intranet's default page layout.\n";
echo "<br><br><br><center><table class=\"textdn\" border=0 cellspacing=1 cellpadding=3 bgcolor=\"#".COLOR_TBAR."\">\n";
echo "<tr class=\"header\"><td>Page Title</td><td align=\"center\">Actions</td></tr>\n";
$sql = "SELECT DISTINCT tbl_pages.page_id FROM tbl_pages, tbl_layout WHERE tbl_layout.page_id=tbl_pages.page_id ORDER BY tbl_pages.page_id ASC";
$res = mysql_query($sql);
$ctr = 0;
while ($row = mysql_fetch_array($res)) {
$page_title = quickSQL("SELECT page_title FROM tbl_pages WHERE page_id=".$row["page_id"]);
echo "<tr bgcolor=\"".($ctr++%2==1?"#".COLOR_BG:"#FFFFFF")."\"><td>".$page_title." </td><td> ".($row["page_id"]!=0?"<a href=\"/content.php?p=".$row["page_id"]."\" target=\"content\">View Page</a>":"<b>View Page</b>")." | <a href=\"pages_layout.php?p=".$row["page_id"]."\">Edit Layout</a> </td></tr>\n";
}
echo "</table></center>\n";
echo "<br><br><br><br>\n";
echo "<center>Powered by <a href=\"http://www.intrabreeze.com\">IntraBreeze</a> © 2005 IntraBreeze, LLC</center>\n";
}
echo "</body>\n</html>\n";
?>