Location: PHPKode > projects > Basic Announce > Basic Announce Version 4.0/public/static.php
<?php
################################################################################
##              -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =-                 #
## --------------------------------------------------------------------------- #
##  ApPHP AdminPanel Pro                                                       #
##  Developed by:  ApPHP <hide@address.com>                                      #
##  License:       GNU LGPL v.3                                                #
##  Site:          http://www.apphp.com/php-adminpanel/                        #
##  Copyright:     ApPHP AdminPanel (c) 2006-2011. All rights reserved.        #
##                                                                             #
################################################################################

    header("content-type: text/html; charset=utf-8");

    // Initialize the session.
    session_start();
	
	define("AP_PATH", "../");
    
    require_once(AP_PATH."inc/settings.inc.php");
	require_once(AP_PATH."inc/languages/".$SETTINGS['site_language'].".php");
	
    $page = isset($_GET['page']) ? (int)$_GET['page'] : "";
    $menu_group_count = 0;
    $page_text = "";
    $page_header = "";

    $sql = "SELECT * FROM ".TABLE_STATIC_PAGES." WHERE is_public = 1 AND menu_id = '".$page."'";
    $db->Query($sql);

    if($row = $db->FetchAssoc()){
        $page_header = $row['page_header'];
        $page_text = str_replace("\\n", "", $row['page_text']);
    }else{
        $page_header = "";
		$page_text = draw_message("error", "<b>Access Denied! You tried to access a document for which you don't have privileges.</b>", false, "90%", "../", true);		
	}

	$output  = "<table width='90%' align='center' border='0' cellspacing='0' cellpadding='0'>";
	$output .= "<tr valign='top'>";
    $output .= "<td><h3>".$page_header."</h3></td>";
	$output .= "</tr>";
	$output .= "<tr valign='top'>";
    $output .= "<td>".$page_text."</td>";
	$output .= "</tr>";
	$output .= "</table>";
    
	
   	$template = get_include_contents("templates/static.tpl");
	$template = str_replace("{SITE_NAME}", $SETTINGS['site_name'], $template);
	$template = str_replace("{TITLE}", lang('pages'), $template);
	$template = str_replace("{STYLE}", "../styles/".$SETTINGS['css_style']."/style.css", $template);
	$template = str_replace("{CONTENT}", $output, $template);

	echo $template;
	
?>
Return current item: Basic Announce