Войти
Регистрация
VK
KATSTAT.RU-ТОП РЕЙТИНГ САЙТОВ С ОТДАЧЕЙ
Путь заработка 70$ в сутки
Пиратская ферма, заходи, новичок
ЗАБИРАЙ СВОЙ БИТКОИН
WorldByte - Наш хостинг - партнер
Помощь по скриптам
| Проблема Вывода!
Топ дня:
dengri_in
VALTURY
Автор
9 февраля 2015, в 17:37
Опытный дизайнер!
Суть в том что в гостевой сообщение выводятся со старого до нового, а мне надо что бы сначала выводились новые сообшения вот смотрите =>
http://mobsea.ru/gb
<?php
include_once '../system/head.php';
include_once '../system/rekl.php';
?>
<div class="title">Гостевая</div>
<body>
<!- Шаблон сообщения ->
<div id="__msgMain" style="display:none;">
<p class="err">
Автор: <b>[~varTtl~]</b><br/>
Сообщение: <br/><span class="text">[~varTxt~]</span><br/>
Дата: <span class="date">[~varDt~]</span>
</p>
</div>
<!- Шаблон текущего номера страницы ->
<div id="__anm" style="display:none;">
<span class="anm">[<b>[~varNm~]</b>]</span>
</div>
<!- Шаблон номера ->
<div id="__nm" style="display:none;">
[[~varNm~]]
</div>
<p align="center">
</p>
<p align="left" class="nopad">
<a class="link" href="write.php">Написать</a>
</p>
<div id="__msgFld">
Загрузка сообщений...
</div>
<hr class="nopad"/>
<span id="__pgs">
</span>
<script type="text/javascript">
n=parseInt(window.location.search.substring(1));
if(n!=n){n=-1;}
if(!Array.push){
Array.prototype.push=function(){
var i,t=arguments.length, t2=this.length;
for(i=0; i<t; i++){
this[t2++]=arguments[i];
}
}
}
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);
prNum=function(num){
varNm=(num==n)?num:"<a href='index.php?"+num+"'>"+num+"</a>";
eval((num==n)?tpl:tpl2);
};
l=(n>3)?n-3:1;
r=((n+3)<np)?n+3:np;
if(l!=1){
prNum(1);
if(l!=2){
cont.push(" <b>...</b> ");
}
}
for(i=l; i<=r; i++){
prNum(i);
}
if(r!=np){
if(l!=(np-1)){
cont.push(" <b>...</b> ");
}
prNum(np);
}
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>
<?php
include_once '../system/foot.php';
?>
Форум
На главную
Онлайн:
4
Время: 23:29:34
Gen. 0.0671
(c) ByMAS.RU 2010-2024