View file local/datamain/index.dat

File size: 2.38Kb
<h1>wap</h1>

<?php
if (is_user()){
echo'<a href="/pages/index.php?action=menu">Меню</a> / ';
echo'<a href="/in.php?action=exit">Выходъ</a> / ';
if (is_admin(array(101,102))){
echo'<a href="'.ADMINDIR.'index.php">Админ</a><br>';
}} 
?>

<div class="b">
<a href="<?=BASEDIR?>news/">Новости</a> 
<small>(<?=stats_allnews()?>) <!--(<?=stats_news()?>)--></small> 
<?=last_news()?>
</div>

<div class="b">
<a href="<?=BASEDIR?>forum/">Дневник</a>
<small>(<?=stats_forum()?>)</small>


<?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], 'j F Y в H:i').') </small></div>';
                
				echo'<div class="bmin"><a href="/forum/topic.php?act=end&amp;fid='.$forum[0].'&amp;id='.$topic[0].'">'.$topic[3].'</a>';
				echo' <small> ('.date_fixed($post[5], 'j F Y в H:i').') </small></div>';
				
			} else {echo'';}
		} else {echo'';}
	}

	} else {show_error('');}
} else {show_error('');}
?>

</div>

<div class="b">
<a href="<?=BASEDIR?>gallery/">Галерея</a> 
<small>(<?=stats_gallery()?>)</small>
</div>

<div class="b">
<a href="<?=BASEDIR?>book/">Гостевая</a> 
<small>
(<?=stats(0)?>)
</small>
</div>

<div class="b">
<a href="<?=BASEDIR?>pages/referer.php">Ссылки</a>
<small>
(<?=stats_referer()?>)
</small>
</div>

<div class="b">
<a href="<?=BASEDIR?>pages/pravila.php">Правила</a><br>
</div>

<div class="b">
<a href="<?=BASEDIR?>pages/?action=copyleft">Почта</a>
</div>

<?php
include(''.BASEDIR.'includes/skin.php');
?>

<?php
if (!is_user()){
echo'&nbsp;&nbsp; <a style="font-size:0.8em" href="/pages/login.php">Вход</a><br>';
}