*/ $language_file = array('userInfo'); $cidReset = true; require '../inc/global.inc.php'; require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php'; require_once api_get_path(LIBRARY_PATH).'social.lib.php'; require_once api_get_path(LIBRARY_PATH).'array.lib.php'; require_once api_get_path(LIBRARY_PATH).'group_portal_manager.lib.php'; $user_id = api_get_user_id(); $show_full_profile = true; //social tab $this_section = SECTION_SOCIAL; $interbreadcrumb[]= array ('url' => 'home.php','name' => get_lang('Social')); api_block_anonymous_users(); $htmlHeadXtra[] = ''; //jQuery $htmlHeadXtra[] = ''; $htmlHeadXtra[] = ''; $htmlHeadXtra[] = ''; //fast upload image if (api_get_setting('profile', 'picture') == 'true') { require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php'; $form = new FormValidator('profile', 'post', 'home.php', null, array()); // PICTURE $form->addElement('file', 'picture', get_lang('AddImage')); $form->add_progress_bar(); if (!empty($user_data['picture_uri'])) { $form->addElement('checkbox', 'remove_picture', null, get_lang('DelImage')); } $allowed_picture_types = array ('jpg', 'jpeg', 'png', 'gif'); $form->addRule('picture', get_lang('OnlyImagesAllowed').' ('.implode(',', $allowed_picture_types).')', 'filetype', $allowed_picture_types); $form->addElement('style_submit_button', 'apply_change', get_lang('SaveSettings'), 'class="save"'); if ($form->validate()) { $user_data = $form->getSubmitValues(); // upload picture if a new one is provided if ($_FILES['picture']['size']) { if ($new_picture = UserManager::update_user_picture(api_get_user_id(), $_FILES['picture']['name'], $_FILES['picture']['tmp_name'])) { $table_user = Database :: get_main_table(TABLE_MAIN_USER); $sql = "UPDATE $table_user SET picture_uri = '$new_picture' WHERE user_id = ".api_get_user_id(); $result = Database::query($sql); } } } } Display :: display_header(get_lang('Home')); $user_info = UserManager :: get_user_info_by_id(api_get_user_id()); $user_online_list = WhoIsOnline(api_get_setting('time_limit_whosonline'),true); $user_online_count = count($user_online_list); echo '
'.get_lang('Name').'
'.api_get_person_name($user_info['firstname'], $user_info['lastname']).'
'.get_lang('Email').'
'.($user_info['email']?$user_info['email']:'').'
'.get_lang('UsersOnline').'
'; echo UserManager::get_search_form($query); echo '
'; $results = GroupPortalManager::get_groups_by_age(1,false); $groups_newest = array(); foreach ($results as $result) { $id = $result['id']; $url_open = ''; $url_close = ''; $count_users_group = count(GroupPortalManager::get_all_users_by_group($id)); if ($count_users_group == 1 ) { $count_users_group = $count_users_group.' '.get_lang('Member'); } else { $count_users_group = $count_users_group.' '.get_lang('Members'); } $result['name'] = $url_open.api_ucwords(cut($result['name'],40,true)).' ('.$count_users_group.') '.$url_close.Display::return_icon('linegroups.jpg','').'
'; } if (count($groups_pop) > 0) { echo '