<?php
/**************************************************************************
* *
* *
* Solution: eBlog *
* Release: 1.7 *
* File: pages.php *
* By: Emuci inc. *
* Website: http://www.emuci.com *
* Copyright: (C) 2010 Emcui inc. *
* *
* *
**************************************************************************
* *
* *
* This script is NOT freeware and is subjected to Emuci terms of use *
* located in the docs folder. *
* *
* *
*************************************************************************/
include_once 'includes/global.php';
$action = $_GET['action'];
$id = $_GET['id'];
$defaultTemplate = $template;
$copyrights = "© " . date("Y") . " " . $lang_admin_globalRights1;
$conn = mysql_connect($dbhost, $dbuser, $dbpass);
mysql_select_db($dbname);
$result = mysql_query("SELECT * FROM eblog_pages WHERE id = '$id'");
$row = mysql_fetch_row($result);
$testID = $row[0];
$tree_map = $row[1];
$page_content = $row[2];
$rowVisible = $row[7];
$rowStatus = $row[4];
mysql_close($conn);
if((empty($testID))||($rowVisible != 1)||($rowStatus != 1))
{
echo "
<script type='text/javascript'>
alert('$lang_erorr_PgaeNotFound');
parent.location='index.php';
</script>
";
}
else
{
$static_value = array ($blog_dir, $blog_windows_encoding, $page_content);
$static_name = array ("{blog_dir}","{blog_windows_encoding}","{page_content}");
$file = $new_template->load_template ("templates/$defaultTemplate/pages.html");
$template = $new_template->replace_static($static_name, $static_value, $file);
echo $template;
}
?>