function ui_user_avatar_editor_old() { $ajax = func_arg(0); // $template_file = "modules/000_user_interface/templates/ui_user_avatar_editor.php"; $template_file = "modules/000_user_interface/templates/ui_user_avatar_editor_tabbed.php"; if ($ajax == 'ajax') { $basepath = $_SESSION['basepath']; $template = new Template(); $logged_in = user_user_loggedin(); // Deteksi User Agent $template->logged_in = $logged_in; $template->basepath = $basepath; $return = $template->render($template_file); return $return; } else { return ui_user_default($template_file); } }
function user_user_properties_deactivate() { // editor user properties -> email setting untuk current user // untuk menambahkan field baru, langsung tambahkan saja di form di file template fungsi ini. gunakan nama sesuai table dimana field tsb akan disimpan...[account atau properties] $user_id = $_SESSION['user_id']; $username = $_SESSION['username']; if (!isset($user_id)) { return false; } // dapatkan data current user dari table Users.Account dan Users.Properties // Users.Account: _id, email, password, username, lilo_id // Users.Properties: _id, user_id (Users.Account.lilo_id), fullname, picture_profile, ... $lilo_mongo = new LiloMongo(); $lilo_mongo->selectDB('Users'); $lilo_mongo->selectCollection('Account'); $account_data = $lilo_mongo->findOne(array('lilo_id' => $user_id)); // return print_r($account_data, true); $lilo_mongo->selectCollection('Properties'); $property_data = $lilo_mongo->findOne(array('lilo_id' => $user_id)); $template = new Template(); $template->username = $username; $template->user_id = $user_id; $template->account_data = $account_data; $template->property_data = $property_data; $template->basepath = $_SESSION['basepath']; $html = $template->render("modules/001_user_management/templates/user_user_properties_deactivate.php"); return ui_user_default(NULL, $html); }