<?php 
include_once("inc/dbconfig.php");
if(isset($_REQUEST)){
	foreach($_REQUEST as $key =>$value){	
		$_REQUEST[$key]=removeTags($value);
	}
}
if(!empty($_REQUEST['id'])){
	
	$sql=$db->query("select * from ".DB_WILD_PREFIX."articles where id='".base64_decode($_REQUEST['id'])."' limit 0,1");
	$count=$db->numRows($sql);
	
	if($count>0)	{
		$res = $db->fetchArray($sql);
		$incFILE="mod/viewArticals.php";
		include_once("homepagetemplate.php");
	} else {
		header("location:index.php");
		exit();
    }
} else {
	header("location:index.php");
	exit();
}
