HEX
Server: Apache
System: Linux www3.pit.tblive.com 5.14.0-687.38.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 12 17:19:12 EDT 2026 x86_64
User: awaldron (1020)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/self/root/home/awaldron/www/archive/demo/admin/boards_manage.php
<?php
session_start();
include("../_functions.php");
dbconnect();
if (!is_logged()) auto_login();

echo "<html>\n";
echo "<head>\n";
echo "<title>".COMPANY_NAME." : Manage Noticeboards</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 delete this Noticeboard? (This cannot be undone)\");\n";
	echo "  if (input_box==true) {\n";
	echo "    self.location=\"boards_manage.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 {
	
	if (isset($_GET["del"])) {
		$board_admins = quickSQL("SELECT board_admins FROM tbl_notice_types WHERE notice_type_id=".$_GET["del"]);
		delete_pgroup($board_admins);
		quickUPDATE("DELETE FROM tbl_notice_types WHERE notice_type_id=".$_GET["del"]);
		quickUPDATE("DELETE FROM tbl_notices WHERE notice_type_id=".$_GET["del"]);
	}
	
	echo "<P><img src=\"/gui/icons/cog.gif\" align=\"left\">\n";
	echo "<div class=\"headline\">Manage Noticeboards</div>\n";
	echo "<P>From this control panel, you have the ability to add/remove noticeboards and discussion boards.\n";
	echo "<br><br><br>\n";
	echo "<table class=\"textdn\" border=0 cellspacing=1 cellpadding=3 bgcolor=\"#".COLOR_TBAR."\">\n";
	echo "<tr class=\"header\"><td><b>Board Name</b></td><td align=\"center\"><b>&nbsp;&nbsp;Type&nbsp;&nbsp;</b></td><td align=\"center\"><b>&nbsp;&nbsp;Posts&nbsp;&nbsp;</b><td align=\"center\"><b>&nbsp;&nbsp;Replies?&nbsp;&nbsp;</b></td><td align=\"center\"><b>&nbsp;&nbsp;Linked?&nbsp;&nbsp;</b></td><td align=\"center\"><b>Actions</b></td><td><b>Parent Page</b></td></tr>\n";
	
	$sql = "SELECT tbl_pages.page_title, tbl_notice_types.* FROM tbl_pages, tbl_notice_types WHERE tbl_notice_types.parent_id=tbl_pages.page_id ORDER BY tbl_notice_types.notice_type_name ASC";
	$res = mysql_query($sql);
	
	for ($i=0; $i < mysql_num_rows($res); $i++) {
		$row = mysql_fetch_array($res);
		echo "<tr".($i%2==0?" bgcolor=#FFFFFF":" bgcolor=#EEEEEE").">\n";
		echo "<td><a href=\"/noticeboard.php?ntid=".$row["notice_type_id"]."\" target=\"new\">".$row["notice_type_name"]."</a>&nbsp;&nbsp;</td>\n";
		echo "<td align=\"center\">".($row["forum_view"]==1?"Forum":"Notice")."</td>\n";
		echo "<td align=\"center\">".quickSQL("SELECT COUNT(notice_id) FROM tbl_notices WHERE notice_active=1 AND notice_type_id=".$row["notice_type_id"])."</td>\n";
		echo "<td align=\"center\">".($row["notice_type_discuss"]==1?"Yes":"No")."</td>\n";
		echo "<td align=\"center\">".($row["notice_type_active"]==1?"Yes":"No")."</td>\n";
		echo "<td align=\"center\">&nbsp;&nbsp;<a href=\"boards_add.php?a=edit&id=".$row["notice_type_id"]."\">Edit</a> | <a href=\"boards_permissions.php?id=".$row["notice_type_id"]."\">Perms</a> | <a href=\"JavaScript:confirm_delete(".$row["notice_type_id"].")\">Delete</a>&nbsp;&nbsp;</td>\n";
		echo "<td><a href=\"/content.php?p=".$row["parent_id"]."\" target=\"new\">".$row["page_title"]."</a>&nbsp;&nbsp;</td>\n";
		echo "</tr>\n"; $j=$i;
	}
	echo "</table>\n";
		

	echo "<br><br><br><br>\n";
	echo "<center>Powered by <a href=\"http://www.intrabreeze.com\">IntraBreeze</a> &copy; 2005 IntraBreeze, LLC</center>\n";
}

echo "</body>\n</html>\n";
?>