File size: 1.8Kb
<h1><small>Wap</small></h1>
<?php
if (is_user()){
echo'<a href="/pages/index.php?action=menu">Меню</a><br>';
echo'<a href="/in.php?action=exit">Выходъ</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">
<a href="<?=BASEDIR?>pages/index.php?action=online">Онлайн</a>
</div>
<div class="b">
<a href="<?=BASEDIR?>forum/">Дневник</a>
<span style="font-size:0.8em">
(<?=stats_forum()?>)
</span>
<br style="margin-bottom:10px">
<?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">';
echo'<a href="'.BASEDIR.'forum/forum.php?fid='.$forum[0].'">'.$forum[1].'</a> <small> ('.date_fixed($post[5]).') </small></div>';
} else {echo'';}
} else {echo'';}
}
} else {show_error('');}
} else {show_error('');}
?>
</div>
<div class="b">
<a href="<?=BASEDIR?>book/">Стена</a>
<small>
(<?=stats(0)?>)
</small>
</div>
<div class="b">
<a href="<?=BASEDIR?>pages/index.php?action=info">Еще</a> ...
</div>