Location: PHPKode > projects > 11in1 > 11in1/msg.php
<?php

/**************************************************************************
 *                                                                        *
 *                                                                        *
 *           Script: 11in1                                                *
 *          Version: 1.0.1                                                *
 *      Description: an open source content managment system (CMS)        *
 *               By: Eyad Fallatah of Emuci Inc.                          *
 *             File: msg.php                                              *
 *          Website: http://www.11in1.org                                 *
 *            Email: hide@address.com                                       *
 *                                                                        *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *                                                                        *
 *   This script is freeware and you can use it however you like at       *
 *   your own risk. If you are interested in contributing to the          *
 *   development of this script, please visit our website.                *
 *                                                                        *
 *                                                                        *
 *************************************************************************/

// protect the included files by defining a permission
DEFINE('PERMISSION_TO_INCLUDE', TRUE);


// include the needed files 
require(dirname(__FILE__) . "/includes/global.php");


$Engine = new Engine;

$msg = $_SESSION['msg'];
$_SESSION['msg'] = "";

if(!is_array($msg))
{
	header("Location: index.php");
}
else
{
	// construct data from the session
	$thisTitle = $msg['title'];	
	$thisMessage = $msg['msg'];
	$thisURL = $msg['url'];
	$thisButton = $msg['button'];
	
	
	// Get database information
	$Database = new Database;
	$info = $Database->getInfo();
	
	
	// Run install script if unable to connect to database
	$conn = mysql_connect($info[0], $info[1], $info[2]);
	mysql_select_db($info[3], $conn);

	
	// prepare page name
	$thisPageName = $settings_11in1Name . ' - ' . $lang_error_systemMessage;
	
	mysql_close($conn);
	
	// load template
	$static_value = array ($settings_keyword, $settings_Description, $lang_dir, $lang_encoding, $thisPageName, $thisTitle, $thisMessage, $thisURL, $thisButton);
	$static_name  = array ("{KEYWORDS}", "{DESC}", "{DIR}", "{ENCODING}", "{PAGENAME}", "{TITLE}", "{MSG}", "{URL}", "{BUTTON}");
	$template = $Engine->loadTemplate("templates/$settings_template/msg.html");
	$template = $Engine->replaceStatic($static_name, $static_value, $template);	
		
	echo $template;
}


?>
Return current item: 11in1