View file index.html

File size: 2.97Kb
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<!- (с) Im !eee  ->
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8"/>
<meta http-equiv="Cache-control" content="no-cache,no-store,must-revalidate"/>
<meta http-equiv="Expires" content="Wed, 26 Feb 1997 8:21:57 GMT"/>
<meta http-equiv="Pragma" content="no-cache"/>
<title>Гостевая книга</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
	<body>
		<!- message template ->
		<div id="__msgMain" style="display:none;">
		<p class="msg">
			Автор: <b>[~varTtl~]</b><br/>
			Сообщение: <br/><span class="text">[~varTxt~]</span><br/>
			Дата: <span class="date">[~varDt~]</span>
		</p>
		</div>
		<!- active number template->
		<div id="__anm" style="display:none;">
			<span class="anm">[<b>[~varNm~]</b>]</span>
		</div>
		<!- number template->
		<div id="__nm" style="display:none;">
			[[~varNm~]]
		</div>

		<p align="center">
			<h1>Гостевая книга</h1>
		</p>
		<p align="left" class="nopad">
			<a href="write.html">Написать</a>
		</p><hr size="2"/>
		<p align="center" id="__msgFld">
			Загрузка сообщений...
		</p>
		<hr size="2" class="nopad"/>
		<span id="__pgs">
			0
		</span>
		<hr size="2" class="nopad"/>
		<p align="center">
			<!-/*[main]*/-><a href="/">На главную</a>
		</p>
<script type="text/javascript">
	n=parseInt(window.location.search.substring(1));
	if(n!=n){n=-1;}
	function $(str){return document.getElementById(str);}
	function zp(nm){return ((nm<10)?"0":"")+nm;}
	function tp(el){return "cont.push('"+el.innerHTML.replace(/(?:\r|\n|\t|\s{2,})/gi,"").split("\\").join("\\\\").split("'").join("\\'").replace(/\[~var([a-z]+)~\]/gi,"',var$1,'")+"');";}
	function fillCont(){
		msgMain=$("__msgMain");
		msgFld=$("__msgFld"); msgFld.innerHTML="";
		document.body.removeChild(msgMain);
		dt=new Date(); cont=[];
		tpl=tp(msgMain);
		for(i=0;i<l;i++){
			varTtl=arrTtl[i];
			dt.setTime(arrDt[i]*1000);
			varDt=zp(dt.getDate())+"."+zp(dt.getMonth()+1)+"."+dt.getFullYear()+" "+zp(dt.getHours())+":"+zp(dt.getMinutes());
			varTxt=arrTxt[i];
			eval(tpl);
		}
		msgFld.innerHTML=cont.join("");
		cont=[];
		anm=$("__anm"); document.body.removeChild(anm);
		nm=$("__nm"); document.body.removeChild(nm);
		pgs=$("__pgs"); pgs.innerHTML="";
		tpl=tp(anm); tpl2=tp(nm);
		for(i=1;i<=np;i++){
			varNm=(i==n)?i:"<a href='index.html?"+i+"'>"+i+"</a>";
			eval((i==n)?tpl:tpl2);
		}
		pgs.innerHTML=cont.join("");
	}
	function servMsg(str){
		$("__msgFld").innerHTML=str;
	}
	scri=document.createElement("script");
	scri.type="text/javascript";
	scri.charset="UTF-8";
	scri.src=/*[path]*/'msg_loader.php'/*[/path]*/+"?p="+n+"&"+Math.ceil(Math.random()*10000);
	document.getElementsByTagName("head")[0].appendChild(scri);
</script>
	</body>
</html>