db=$db; $user_id=($_GET['id'])?$_GET['id']:$_SESSION['user_id']; $smarty -> assign( 'user', \DB::getAll("SELECT * FROM `users` WHERE `id`=?", $user_id) ); $pages=\DB::getAll("SELECT `id`, `title` FROM `pages` WHERE `user_id`=? AND `status`=1 ORDER BY `reyt` LIMIT 10", $user_id); $smarty -> assign( 'pages', $pages ); ?>