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: //home/awaldron/public_html/archive/demo/admin/pages_del.php
<?php
session_start();
include("../_functions.php");
function page_list($pid,$base) {
	$sql = "SELECT * FROM tbl_pages WHERE page_active=0 AND gbtab_id=0 ORDER BY page_rank ASC";
	$res = mysql_query($sql);
	if (mysql_num_rows($res) > 0) {
		for ($i=0; $i < mysql_num_rows($res); $i++) {
			$row = mysql_fetch_array($res);
			if ($row["parent_id"]==1) $top = TRUE;
			else $top = FALSE;
			echo "<tr bgcolor=\"".($top?"#".COLOR_BG:"#FFFFFF")."\"><td".($top?" style=\"font-weight:bold\"":"").">";			
			for ($j=0; $j < ($base*5); $j++) echo "&nbsp;"; 
			echo "<img src=\"/gui/bullet.gif\"> ";
			echo $row["page_title"]." &nbsp; &nbsp; \n";
			echo "</td>";
			if (strlen($row["page_linkto"]) > 7) $linkto = TRUE;
			else $linkto = FALSE;
			echo "<td align=\"center\"> &nbsp; &nbsp; ".($linkto?"<span style=\"color:#009900\">LinkTo-></span>":"Content")." &nbsp; &nbsp; </td>\n";
			if (!$linkto) $refs = quickSQL("SELECT count(page_id) FROM tbl_pages WHERE page_body LIKE '%content.php?p=".$row["page_id"]."%'");
			else $refs = 0;
			echo "<td align=\"center\"> &nbsp; &nbsp; ".$refs." &nbsp; &nbsp; </td>\n";
			echo "<td align=\"center\"> &nbsp; &nbsp; <a href=\"".($linkto?$row["page_linkto"]:"/content.php?p=".$row["page_id"])."\" target=\"page\">View</a> | <a href=\"/content_edit.php?p=".$row["page_id"]."\" target=\"page\">Edit</a> | <a href=\"pages_del.php?act=".$row["page_id"]."\">Activate</a> | <a href=\"JavaScript:confirm_delete(".$row["page_id"].")\">Delete</a>  &nbsp; &nbsp; </td>\n";
			echo "</tr>\n";
			
		}
	}
}
dbconnect();
if (!is_logged()) auto_login();

echo "<html>\n";
echo "<head>\n";
echo "<title>".COMPANY_NAME." : Inactive Web Pages</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 {
	
	if (isset($_GET["act"])) {
		quickUPDATE("UPDATE tbl_pages SET page_active=1 WHERE page_id=".$_GET["act"]);
	}
	if (isset($_GET["del"])) {
		quickUPDATE("DELETE FROM tbl_pages WHERE page_id=".$_GET["del"]." LIMIT 1");
	}
	
	echo "<P><img src=\"/gui/icons/cog.gif\" align=\"left\">\n";
	echo "<div class=\"headline\">Inactive Web Pages</div>\n";
	echo "<P>From this control panel, you can view, edit, re-activate or permenantly delete inactive webpages. The <b>Type</b> field indicates whether the web page displays it's own content or links to another page. The <b>#Ref</b> column indicates the number of pages that may be referencing, or linking to, this page. If the #Ref column is greater than 0, you may not want to delete that web page, for it may cause another page to have a broken link.\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\">Type</td><td align=\"center\">#Ref</td><td align=\"center\">Actions</td></tr>\n";
		
	page_list(0,0);
	
	echo "</table></center>\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";
?>