View file template/lastnews.php

File size: 1.51Kb
<?php
#-----------------------------------------------------#
#        ********* WAP-MOTORS WebMod *********        #
#-----------------------------------------------------#
#    Original Made by   :  VANTUZ                     #
#               E-mail  :  [email protected]             #
#                 Site  :  http://pizdec.ru           #
#             WAP-Site  :  http://visavi.net          #
#                  ICQ  :  36-44-66                   #
#-----------------------------------------------------#
#      WebMod Made by   :  X-ray (Юрий)               #
#               E-mail  :  [email protected]           #
#                 Site  :  http://city.zugdidi.us     #
#             WAP-Site  :  http://zugdidi.us          #
#-----------------------------------------------------#
#  Вы не имеете право вносить изменения в код скрипта #
#-----------------------------------------------------#
$file = file(BASEDIR."local/news.dat");
$total = count($file);
$to=$total-$config_lastnews;
$to=$to-1;

do {
$data1 = explode("|",$file[$total]);
$total--;
if(!empty($data1[2])){
echo'<b>'.$data1[2].'</b> '.$data1[0].'<br>'.$data1[1].'<br>';
echo'<a href="/news/index.php?p=news&amp;f=komm&amp;id='.$data1[5].'&amp;'.SID.'">Комментарии</a>'; 

$filew = file(BASEDIR."local/datakomm/$data1[5].dat");
$totalw = count($filew);
$totalw=$totalw-1;

$dw = explode("|",$filew[$totalw]);
echo '('.(int)$dw[5].')';

echo"<br><br>";}
} while($total > $to);
?>