core/api/modules/user/index.php

16 lines
615 B
PHP

<?php
ini_set( 'display_errors', 0 );
//$mod = new main($smarty, $settings);
//$mod->db=$db;
$user_id=($_GET['id'])?$_GET['id']:$_SESSION['user_id'];
$smarty -> assign( 'user', \DB::getAll("SELECT * FROM `users` WHERE `id`=?", $user_id) );
//$smarty -> assign( 'albums', $mod->get_albums(ID) );
//$smarty -> assign( 'best_foto', $mod->get_best_foto(ID, 50) );
//print_r($mod->get_best_foto(ID, 50));
//print_r($mod->user_info(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 );
?>