Вход Регистрация
Файл: wapxl.ru/user/bookmarks.php
Строк: 41
<?
require'../shaxty.php';
$title 'Закладки';
$align 'left';
$head 'Закладки';
include_once (
H.'shaxty/head.php');

if(empty(
$mod)){ echo '<dl></dl>';
$forum=core:: $db -> querySingle("select count(*) from `forum_b` WHERE  `user_id` = ?", array(core::$user['id']));

echo 
'<div class="menu_j"><a href="'.F.'bookmarks/0" class="top_menu_j"> <img src="/img/act.gif" alt="*"/> Форум ('.$forum.')</a></div>';

$archive=core:: $db -> querySingle("select count(*) as num from `bookmarks` where `user_id`=? and `mesto`=?", array(core::$user['id'],'archive'));
echo 
'<div class="menu_j"><a href="?mod=archive" class="top_menu_j"> <img src="/img/act.gif" alt="*"/> Обменник файлов ('.$archive.')</a></div>';

/*$codes=core:: $db -> querySingle("select count(*) as num from `bookmarks` where `user_id`=? and `mesto`=?", array(core::$user['id'],'codes'));
echo '<div class="menu_j"><a href="?mod=codes" class="top_menu_j"> <img src="/img/act.gif" alt="*"/> PHP Коды ('.$codes.')</a></div>';*/
echo '<dl></dl>';

}else{
if (isset(
$_GET['del'])){

func::danger('?mod='.$mod.'&amp;del='.$_GET['del'].'','Вы уверены, что желаете <b>удалить</b> закладку?');

core:: $db -> query("DELETE FROM `bookmarks` WHERE `id` = '".intval($_GET['del'])."' and `user_id` = '".core::$user['id']."'");

header ('Location: ?mod='.$mod.''.SID);

}

$k_post=core:: $db -> querySingle("select count(*) as num from `bookmarks` where `user_id`=? and `mesto`=?", array(core::$user['id'], $mod));
$k_page=func::k_page($k_post,$max);
$page=func::page($k_page);
$start=$max*$page-$max;

$r core::$db->query("Select * from `bookmarks` where `user_id`=? and `mesto`=? order by `time` desc LIMIT $start$max", array(core::$user['id'], $mod));

if (
$k_post==0)func::errors('<b>Закладок пока нет</b>''<a href="'.getenv("HTTP_REFERER").'" class="href">Вернуться</a>');

if ((
$max*$page)<$k_post$maxi $max*$page; else $maxi $k_post;
echo 
$div1.'Показаны закладки '.($start+1).'-'.$maxi.' из '.$k_post.''.$div9.'<br />';

while (
$a $r -> fetch()) {

if(
$a['mesto']=='archive'){ $b core:: $db -> queryFetch("SELECT * FROM `files` WHERE `id`=? LIMIT 1;", array($a['b_id']));

}else if(
$a['mesto']=='codes'){ $b core:: $db -> queryFetch("SELECT * FROM `codes` WHERE `id`=? LIMIT 1;", array($a['b_id']));

}

echo 
'<div class="c2"><b><a href="/'.$a['mesto'].'/'.$a['b_id'].'" class="href">'.$b['name'].'</a></b> ('.func::times($a['time']).') <a href="?mod='.$mod.'&amp;del='.$a['id'].'" class="href">Удалить</a></div>';

echo 
'<dl></dl>';
}


if (
$k_page>1)func::nav("?",$k_page,$page); // Вывод страниц

}

echo 
'<br />';
echo 
$div1.'<a href="'.H.'user/index.php">Личный кабинет</a>'.$div9;
include_once (
H.'shaxty/foot.php');
?>
Онлайн: 1
Реклама