"; if(isset($_REQUEST["act"])) $act = $_REQUEST["act"]; else $act = ""; if(isset($_REQUEST["page_id"]) && is_numeric($_REQUEST["page_id"]) && $_REQUEST["page_id"] != 0) $page_id = $_REQUEST["page_id"]; else $page_id = ""; if($act == ""){ $page_content .= "

Edit Pages

Add a new page
please note that adding a new page with this tool will not automatically add the page to the site navigation. To add the page, use the link for the page listed below and edit the Template file here: /php_inc/template.html

"; $get_info = "select * from site_pages where status='active' and parent_id = 0 and popup = 0 order by page_id"; $get_info_qry = mysql_query ($get_info) or die (mysql_error() . $sql ); while ($row = mysql_fetch_array($get_info_qry, MYSQL_ASSOC)) { $page_id = $row["page_id"]; $page_title = $row["page_title"]; $date_updated = $row["date_updated"]; if($page_id == 0){ $edit_link = "recycle_info.php"; $view_link = "../index.php"; $link_str = "index.php"; }else{ $edit_link = "pages.php?act=edit&page_id=$page_id"; $view_link = "../page.php?id=$page_id"; $link_str = "page.php?id=$page_id"; } if($date_updated == 0) $date_updated = "NA"; else $date_updated = date("n/j/y",$date_updated); $page_content .= << END; if($page_id > 0){ $get_sub_info = "select * from site_pages where status='active' and parent_id = $page_id order by page_title"; $get_sub_info_qry = mysql_query ($get_sub_info) or die (mysql_error() . $sql ); $sub_page_num = mysql_numrows($get_sub_info_qry); if($sub_page_num > 0){ while ($row = mysql_fetch_array($get_sub_info_qry, MYSQL_ASSOC)) { $sub_page_id = $row["page_id"]; $sub_page_title = $row["page_title"]; $sub_date_updated = $row["date_updated"]; if($sub_date_updated == 0) $sub_date_updated = "NA"; else $sub_date_updated = date("n/j/y",$sub_date_updated); $link_str = "page.php?id=$sub_page_id"; $page_content .= << END; } } } } $page_content .= "
Page Last Updated Link Action
$page_title $date_updated $link_str edit/delete
$sub_page_title $sub_date_updated $link_str edit/delete
"; $page_content .= "

Edit Popups

Add a new popup

"; $get_info = "select * from site_pages where status='active' and popup=1 order by page_id"; $get_info_qry = mysql_query ($get_info) or die (mysql_error() . $sql ); while ($row = mysql_fetch_array($get_info_qry, MYSQL_ASSOC)) { $page_id = $row["page_id"]; $page_title = $row["page_title"]; $date_updated = $row["date_updated"]; $edit_link = "popups.php?act=edit&page_id=$page_id"; $view_link = "../page.php?id=$page_id"; $link_str = "popup.php?id=$page_id"; if($date_updated == 0) $date_updated = "NA"; else $date_updated = date("n/j/y",$date_updated); $page_content .= << END; } $page_content .= "
Popup Last Updated Link Action
$page_title $date_updated page.php?id=$page_id edit/delete
"; }elseif(($act == "edit" && $page_id != "") || $act == "new"){ include "../php_inc/fckeditor/fckeditor.php"; $form_act = "add"; $edit_field = ""; $submit_str = "Add"; $order_box = ""; $del_button = ""; if($act == "edit"){ $form_act = "update"; $edit_field = ""; $submit_str = "Update"; $del_button = "
$edit_field
"; $get_info = "select * from site_pages where page_id = $page_id"; $get_info_qry = mysql_query ($get_info) or die (mysql_error() . $sql ); $mat_num = mysql_numrows($get_info_qry); while ($row = mysql_fetch_array($get_info_qry, MYSQL_ASSOC)) { $this_page_title = $row["page_title"]; $meta_keyword = $row["meta_keyword"]; $meta_description = $row["meta_description"]; $page_sidebar = $row["sidebar"]; $this_parent_id = $row["parent_id"]; $sort_order = $row["sort_order"]; $this_page_content = str_replace("\"images/","\"/images/",$row["page_content"]); } /* if($this_parent_id > 0){ $order_box = " List Order: "; } */ } $page_content .= <<$submit_str a page $del_button $edit_field
Title
Keywords:
Page Description:
Sidebar Note: END; $oFCKeditor = new FCKeditor('page_sidebar'); $oFCKeditor->ToolbarSet = 'Very_Basic'; $oFCKeditor->BasePath = '../php_inc/fckeditor/'; $oFCKeditor->Config["EditorAreaCSS"] = '/php_inc/fckeditor/editor_styles-recycle2.css'; $oFCKeditor->Value = "$page_sidebar"; $oFCKeditor->Width = "400"; $oFCKeditor->Height = "100"; $oFCKeditor->Create(); $page_content .= "
Page Content: "; $oFCKeditor = new FCKeditor('this_page_content'); $oFCKeditor->ToolbarSet = 'Very_Basic'; $oFCKeditor->BasePath = '../php_inc/fckeditor/'; $oFCKeditor->Config["EditorAreaCSS"] = '/php_inc/fckeditor/editor_styles-recycle2.css'; $oFCKeditor->Value = "$this_page_content"; $oFCKeditor->Width = "400"; $oFCKeditor->Height = "400"; $oFCKeditor->Create(); $page_content .= "
Site Section: