include 'database.php';
$p=$_GET['p'];
$news=$_GET['news'];
if ($p) {
$normal = "SELECT * from pages WHERE id='$p' AND status='1'";
$result = mysql_query($normal);
while ($row=mysql_fetch_array($result)) {
$title = $row["title"];
$content = $row["content"];
echo "$content";
}//end while
} else if ($news) {
$normal = "SELECT * from news WHERE id='$news' AND status='1'";
$result = mysql_query($normal);
while ($row=mysql_fetch_array($result)) {
$title = $row["title"];
$content = $row["content"];
$date = $row["date"];
//$showdate=date("Y-m-d G:i:s",$date);
$showdate=date("l, F d, Y h:i:s a",$date);
//echo "$title, last edited at $showdate
$content";
echo "$content";
}//end while
} else {
$normal = "SELECT * from pages WHERE id='1' AND status='1'";
$result = mysql_query($normal);
while ($row=mysql_fetch_array($result)) {
$title = $row["title"];
$content = $row["content"];
echo "$content";
}//end while
}//end else
?>