<?php

/*
////////////////////////////////////////////////////////////////////////////////
// JohnCMS                Mobile Content Management System                    //
// Project site:          http://johncms.com                                  //
// Support site:          http://gazenwagen.com                               //
////////////////////////////////////////////////////////////////////////////////
// Lead Developer:        Oleg Kasyanov   (AlkatraZ)  alkatraz@gazenwagen.com //
// Development Team:      Eugene Ryabinin (john77)    john77@gazenwagen.com   //
//                        Dmitry Liseenko (FlySelf)   flyself@johncms.com     //
////////////////////////////////////////////////////////////////////////////////
*/

defined('_IN_JOHNCMS') or die('Error: restricted access');
if (!$user_id) {
    require('../incfiles/head.php');
    echo functions::display_error($lng['access_guest_forbidden']);
    require('../incfiles/end.php');
    exit;
}

$headmod = 'Zaladka';
require('../incfiles/head.php');

echo '<div class="phdr">Mening zakladkam</div>';
$t = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_zaklad`"), 0);
if ($t > 0) {
echo'<div class="menu"align="center">Zakladkadan biror nimani o`chirish uchun mavzu nomining oldidagi manabu <img src="/images/del.png"> belgiga bosing!</div>';
$z=mysql_query("SELECT * FROM `forum_zaklad` WHERE `us` = '".$user_id."' ORDER BY `id` DESC LIMIT $start, $kmess");
     while (($a = mysql_fetch_array($z)) !== false) {
	 $zaklad = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum` WHERE `id` = '".$a['tema']."'"));
echo '<div class="menu">
<a href="/forum/index.php?act=zaklad_del&id='.$zaklad['id'].'"><img src="/images/del.png"> </a>
<a href="/forum/index.php?id='.$zaklad['id'].'">'.$zaklad['text'].'</a> ('.functions::display_date($zaklad['time']).')
</div>';
}
} else {
        echo '<div class="menu">Zakladka mavjud emas!</div>';
    }
?>