*/ $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 '
'; echo '
'; //this include the social menu div SocialManager::show_social_menu('home'); echo '
'; echo '
'; echo ''; echo '
'; echo '
'; Display :: display_footer();