Location: PHPKode > projects > nSys Flat News System > nsys-flat-news-system/admin/index.php
<?php require("../include/config.php");
ob_start();
require("../include/functions/FuncsGlobal.php");
/* Set Lang */
if(($_GET["do"]=="lang")&&(isset($_POST["SelectLang"])))
{
	echo ChooseLang(htmlspecialchars($_POST["lang"]));
}
/* End Set Lang */
require("../include/functions/classes.php");
require("../include/functions/classes-admin.php");
if (isset($_COOKIE["nSysLang"]))
{
	$LangCookie=basename(htmlspecialchars($_COOKIE["nSysLang"]));
	if(is_file("../lang/$LangCookie.php")) { require("../lang/$LangCookie.php"); }
	else { require("../lang/en.php"); }
}
else
{
	require("../lang/$nSysLang.php");
}
 ?>
<?php
			 $user = new User();
             if(isset($_POST["SubmitLogIn"]))
             {
	            $user->LogIn($_POST["user"],$_POST["pass"],$_POST["remember"]);
             	header("Location: ".dirname($_SERVER["PHP_SELF"])."");
             }
	         $user->CheckLogIn();
	         $news = new News();
	         $news->DisplayNews(3);
/* add lang */
if ($_GET["do"]=="addlang")
{
	echo $user->AddLang();
}
/* end add lang */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>nSys 2.0 Flat - News System // Administration</title>
<script src="../include/SpryAssets/SpryAccordion.js" type="text/javascript"></script>
<link href="../include/SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
<link href="../styles/default/index.css" rel="stylesheet" type="text/css" />
<link href="../styles/default/news.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a name="top"></a>
<div id="mainDiv" class="mainDiv">
<div id="header" class="header">
<h1>nSys 2.0 Flat  News System - Administration</h1>
</div>
<div id="container" class="container">
<?php

    	$CheckFF= new CheckFilesAndFolders;
    	$CheckFF->CheckFolders();
    	$CheckFF->CheckFiles();

    	/* Handle users */
    	echo $user->CheckLogIn();

    	/* news */
    	if (!isset($_GET["page"]))
    	{

    		echo $news->Heading("h2",LangPreview);
    		echo $news->DisplayNews(3);
    	}

?>
</div>
</div>
</body>
</html>
Return current item: nSys Flat News System