View file adm/index.php

File size: 2.39Kb
<?
include"sys/fnc.php";
?>
<html>
<head>
<title>MyCMS</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
body {background-image: url(fon.jpeg); background-repeat: no-repeat; background-attachment: fixed}
</style>

<script type="text/javascript">

//enter 
 document.addEventListener('keypress', function(event)
 {
	if(event.keyCode==13)
	{
		return addchat1()
	}
 }, false);


//подключение
function getXmlHttp()
{
	var xmlhttp;
	
	try 
	{
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} 
	
	catch (e) 
	{
	    try 
		{
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	    } 
		
		catch (E) 
		{
			xmlhttp = false;
	    }
		
	}

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') 
	{
		xmlhttp = new XMLHttpRequest();
	}
	
	return xmlhttp;
}


</script>


<?
$dir=opendir("ajax/");
while($file=readdir($dir))
{
	if(($file!=".") or ($file!=".."))
	{
		echo'<script type="text/javascript" src="ajax/'.$file.'"></script>';
	}
}
closedir($dir);
?>
</head>
<body>
<?






	echo'<h1><center>MyCMS</center></h1>';
	echo'<table width="99%">';
	echo'<tr> <td valign="top" width="20%" align="left">';
	echo'<h3>Навигация</h3>';
	echo'<a href="javascript:hom()">Главная</a><br>';
	if($dir=opendir("pages/"))
	{
		while(@$file=readdir($dir))
		{
			if(($file!=".") && ($file!="..")){
			
			$name_ras=explode(".",$file);
			$count=count($name_ras);
			$ras=$count-1;
			$file=str_replace(".$name_ras[$ras]","",$file);
			$name=$file;
	//здесь можно перевести разделы
			$name=str_replace("download","Загрузки",$name);
			$name=str_replace("book","Гостевая книга",$name);
			$name=str_replace("","",$name);
			$name=str_replace("","",$name);
			$name=str_replace("","",$name);
	//вывод ссылки на раздел сайта

			echo'<a href="javascript:'.$file.'()">'.$name.'</a><br>';}
		}
		closedir($dir);
	}
	echo'</td> <td valign="top" width="5%" align="left">';
	echo'</td> <td valign="top" width="48%" align="left">';
	
	echo'<div id="out"></div>';
	
	echo'</td> <td valign="top" width="5%" align="left">';
	echo'</td> <td valign="top" width="20%" align="left">';
	echo'<h3>Реклама</h3>';
	
	//рекламные блоки
	
	echo'</td></tr></table>';
	
?>


</body>
</html>