Размер файла: 2.07Kb
<h1>wap</h1>
<?php
if (is_user()){
echo'<a href="/pages/index.php?action=menu">Меню</a><br>';
if (is_admin(array(101,102))){
echo'<a href="'.ADMINDIR.'index.php">Админ</a><br>';
}}?>
<?php if (is_admin(array(101,102))){
echo'<a href="'.BASEDIR.'news/">Новости</a><br>';
} ?>
<?=last_news()?>
<div class="b">
<img src="<?=BASEDIR?>images/online.svg" alt="+">
<a href="<?=BASEDIR?>pages/index.php?action=online">Онлайн</a>
</div>
<div class="b">
<img src="<?=BASEDIR?>images/dnevnik.svg" alt="+"> <a href="<?=BASEDIR?>forum/">Дневникъ</a> <small>(<?=stats_forum()?>)</small>
<br style="margin-bottom:5px">
<?php
if (file_exists(DATADIR."dataforum/mainforum.dat")) {
$fileforum = file(DATADIR."dataforum/mainforum.dat");
$total = count($fileforum);
if ($total>0) {
foreach($fileforum as $forumval){
$forum = explode("|", $forumval);
$totalforum = counter_string(DATADIR."dataforum/topic".$forum[0].".dat");
if($totalforum>0){
$filetopic = file(DATADIR."dataforum/topic".$forum[0].".dat");
$topic = explode("|", end($filetopic));
if (file_exists(DATADIR.'dataforum/'.$forum[0].'-'.$topic[0].'.dat')) {
$filepost = file(DATADIR.'dataforum/'.$forum[0].'-'.$topic[0].'.dat');
$post = explode("|", end($filepost));
if (utf_strlen($topic[3])>35) {$topic[3]=utf_substr($topic[3], 0, 30); $topic[3].="...";}
echo'<div class="bmin"><a href="/forum/topic.php?act=end&fid='.$forum[0].'&id='.$topic[0].'">'.$topic[3].'</a><small> ('.date_fixed($post[5]).') </small></div>';
} else {echo'<small>Последней темы нет!</small>';}
} else {echo'<small>Раздел пустой!</small>';}
}
} else {show_error('<small>Дневник пустой!</small>');}
} else {show_error('<small>Дневник пустой!</small>');}
?>
</div>
<div class="b">
<img src="<?=BASEDIR?>images/stena.svg" alt="+">
<a href="<?=BASEDIR?>book/">Стена</a> <small>(<?=stats(0)?>)</small>
</div>
<div class="b">
<img src="<?=BASEDIR?>images/home.svg" alt="+">
<a href="<?=BASEDIR?>pages/index.php?action=info">Ещё</a> ...
</div>