本文整理汇总了PHP中UserManager::get_search_form方法的典型用法代码示例。如果您正苦于以下问题:PHP UserManager::get_search_form方法的具体用法?PHP UserManager::get_search_form怎么用?PHP UserManager::get_search_form使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserManager
的用法示例。
在下文中一共展示了UserManager::get_search_form方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
$user_list = Online::who_is_online(0, 9);
}
if (!isset($_GET['id'])) {
if (api_get_setting('allow_social_tool') == 'true') {
if (!api_is_anonymous()) {
//this include the social menu div
$social_left_content = SocialManager::show_social_menu('whoisonline');
}
}
}
if ($user_list) {
if (!isset($_GET['id'])) {
if (api_get_setting('allow_social_tool') == 'true') {
if (!api_is_anonymous()) {
$query = isset($_GET['q']) ? $_GET['q'] : null;
$social_right_content .= '<div class="span9">' . UserManager::get_search_form($query) . '</div>';
}
}
$social_right_content .= SocialManager::display_user_list($user_list);
}
}
if (isset($_GET['id'])) {
if (api_get_setting('allow_social_tool') == 'true') {
header("Location: " . api_get_path(WEB_CODE_PATH) . "social/profile.php?u=" . intval($_GET['id']));
exit;
} else {
SocialManager::display_individual_user($_GET['id']);
}
}
} else {
api_not_allowed();
示例2: api_get_user_id
$form->addButtonSave(get_lang('SaveSettings'), 'apply_change');
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}\n SET picture_uri = '{$new_picture}' WHERE user_id = " . api_get_user_id();
$result = Database::query($sql);
}
}
}
}
//Block Menu
$social_menu_block = SocialManager::show_social_menu('home');
$social_search_block = Display::panel(UserManager::get_search_form(''), get_lang("SearchUsers"));
$results = $userGroup->get_groups_by_age(1, false);
$groups_newest = array();
if (!empty($results)) {
foreach ($results as $result) {
$id = $result['id'];
$result['description'] = Security::remove_XSS($result['description'], STUDENT, true);
$result['name'] = Security::remove_XSS($result['name'], STUDENT, true);
if ($result['count'] == 1) {
$result['count'] = '1 ' . get_lang('Member');
} else {
$result['count'] = $result['count'] . ' ' . get_lang('Members');
}
$group_url = "group_view.php?id={$id}";
$result['name'] = '<div class="group-name">' . Display::url(api_ucwords(cut($result['name'], 40, true)), $group_url) . '</div><div class="count-username">' . Display::return_icon('user.png', '', '', ICON_SIZE_TINY) . $result['count'] . '</div>';
$picture = $userGroup->get_picture_group($id, $result['picture'], 80);
示例3: isset
$query = isset($_GET['q']) ? Security::remove_XSS($_GET['q']) : null;
$query_search_type = isset($_GET['search_type']) && in_array($_GET['search_type'], array('0', '1', '2')) ? $_GET['search_type'] : null;
$extra_fields = UserManager::get_extra_filtrable_fields();
$query_vars = array('q' => $query, 'search_type' => $query_search_type);
if (!empty($extra_fields)) {
foreach ($extra_fields as $extra_field) {
$field_name = 'field_' . $extra_field['variable'];
if (isset($_GET[$field_name]) && $_GET[$field_name] != '0') {
$query_vars[$field_name] = $_GET[$field_name];
}
}
}
//Block Social Menu
$social_menu_block = SocialManager::show_social_menu('search');
$social_right_content = '';
$searchForm = UserManager::get_search_form($query);
$groups = array();
$totalGroups = array();
$users = array();
$totalUsers = array();
$usergroup = new UserGroup();
// I'm searching something
if ($query != '' || $query_vars['search_type'] == '1' && count($query_vars) > 2) {
$itemPerPage = 9;
if ($_GET['search_type'] == '0' || $_GET['search_type'] == '1') {
$page = isset($_GET['users_page_nr']) ? intval($_GET['users_page_nr']) : 1;
$totalUsers = UserManager::get_all_user_tags($_GET['q'], 0, 0, $itemPerPage, true);
$from = intval(($page - 1) * $itemPerPage);
// Get users from tags
$users = UserManager::get_all_user_tags($_GET['q'], 0, $from, $itemPerPage);
}
示例4: foreach
$lis = '';
if (!empty($skills)) {
foreach ($skills as $skill) {
$lis .= Display::tag('li', Display::span($skill['name'], array('class' => 'label_tag skill')));
}
$social_right_content .= Display::tag('ul', $lis);
}
$url = api_get_path(WEB_CODE_PATH) . 'social/skills_wheel.php';
$skill_wheel_url = Display::url(get_lang('ViewSkillsWheel'), $url, array('class' => 'btn'));
$social_right_content .= '<div class="btn-group">' . $skill_wheel_url . $ranking_url . '</div>';
$social_right_content .= '</div>';
}
$social_right_content .= '</div>';
// Search box
$social_right_content .= '<div class="span4">';
$social_right_content .= UserManager::get_search_form('');
$social_right_content .= '</br>';
// Group box by age
$results = $usergroup->get_groups_by_age(1, false);
$groups_newest = array();
if (!empty($results)) {
foreach ($results as $result) {
$id = $result['id'];
$result['description'] = Security::remove_XSS($result['description'], STUDENT, true);
$result['name'] = Security::remove_XSS($result['name'], STUDENT, true);
if ($result['count'] == 1) {
$result['count'] = '1 ' . get_lang('Member');
} else {
$result['count'] = $result['count'] . ' ' . get_lang('Members');
}
$group_url = "groups.php?id={$id}";
示例5: isset
}
/* if (!isset($_GET['id'])) {
if (api_get_setting('allow_social_tool') == 'true') {
if (!api_is_anonymous()) {
//this include the social menu div
$social_left_content = SocialManager::show_social_menu('whoisonline');
}
}
}
*/
if ($user_list) {
if (!isset($_GET['id'])) {
if (api_get_setting('allow_social_tool') == 'true') {
if (!api_is_anonymous()) {
$query = isset($_GET['q']) ? $_GET['q'] : null;
$social_search .= UserManager::get_search_form($query);
}
}
//$social_right_content .= SocialManager::display_user_list($user_list);
}
}
$whoisonline_list .= SocialManager::display_user_list($user_list);
if (isset($_GET['id'])) {
if (api_get_setting('allow_social_tool') == 'true' && api_user_is_login()) {
header("Location: " . api_get_path(WEB_CODE_PATH) . "social/profile.php?u=" . intval($_GET['id']));
exit;
} else {
$social_right_content .= SocialManager::display_individual_user($_GET['id']);
}
}
} else {
示例6: api_get_path
$socialRightInformation .= Display::tag('ul', $lis);
}
$url = api_get_path(WEB_CODE_PATH) . 'social/skills_wheel.php';
$skill_wheel_url = Display::url(
get_lang('ViewSkillsWheel'),
$url,
array('class' => 'btn')
);
$socialRightInformation .= '<div class="btn-group">' . $skill_wheel_url . $ranking_url . '</div>';
$socialRightInformation .= '</div>';
}
//Search box
$socialRightInformation .= '<div>';
$socialRightInformation .= UserManager::get_search_form('');
$socialRightInformation .= '<br /></div>';
//Group box by age
$results = GroupPortalManager::get_groups_by_age(1, false);
$groups_newest = array();
if (!empty($results)) {
foreach ($results as $result) {
$id = $result['id'];
$result['description'] = Security::remove_XSS(
$result['description'],
STUDENT,
true
);
$result['name'] = Security::remove_XSS($result['name'], STUDENT, true);