当前位置: 首页>>代码示例>>PHP>>正文


PHP SortableTable::set_column_filter方法代码示例

本文整理汇总了PHP中SortableTable::set_column_filter方法的典型用法代码示例。如果您正苦于以下问题:PHP SortableTable::set_column_filter方法的具体用法?PHP SortableTable::set_column_filter怎么用?PHP SortableTable::set_column_filter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SortableTable的用法示例。


在下文中一共展示了SortableTable::set_column_filter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 function display_data($return = false)
 {
     $count = array($this, 'count');
     $data = array($this, 'get_data');
     $parameters = array();
     $parameters['sec_token'] = Security::get_token();
     $parameters['ceiling'] = $this->get_ceiling();
     $parameters['active_only'] = $this->get_active_only() ? 'true' : 'false';
     $additional_parameters = $this->get_additional_parameters();
     $parameters = array_merge($additional_parameters, $parameters);
     $table = new SortableTable('users', $count, $data, 1, 50);
     $table->set_additional_parameters($parameters);
     $col = 0;
     $table->set_header($col++, '', false);
     $table->set_header($col++, get_lang('Code'));
     $table->set_header($col++, get_lang('FirstName'));
     $table->set_header($col++, get_lang('LastName'));
     $table->set_header($col++, get_lang('LoginName'));
     $table->set_header($col++, get_lang('Email'));
     $table->set_header($col++, get_lang('Profile'));
     $table->set_header($col++, get_lang('AuthenticationSource'));
     $table->set_header($col++, get_lang('RegisteredDate'));
     $table->set_header($col++, get_lang('LastAccess'), false);
     $table->set_header($col++, get_lang('Active'), false);
     $table->set_column_filter(5, array($this, 'format_email'));
     $table->set_column_filter(6, array($this, 'format_status'));
     $table->set_column_filter(10, array($this, 'format_active'));
     $table->set_form_actions(array('activate' => get_lang('Activate'), 'deactivate' => get_lang('Deactivate'), 'delete' => get_lang('Delete')));
     if ($return) {
         return $table->return_table();
     } else {
         echo $table->return_table();
     }
 }
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:34,代码来源:zombie_report.class.php

示例2: FormValidator

        case 'show_message':
            $message = Display::return_message(Security::remove_XSS(stripslashes($_GET['message'])));
            break;
    }
}
// Create a search-box
$form = new FormValidator('search_simple', 'get', '', '', null, false);
$renderer =& $form->defaultRenderer();
$renderer->setElementTemplate('<span>{element}</span> ');
$form->addElement('text', 'keyword', get_lang('keyword'));
$form->addElement('button', 'submit', get_lang('Search'));
$content .= $form->return_form();
// Create the sortable table with class information
$table = new SortableTable('classes', 'get_number_of_classes', 'get_class_data', 1);
$table->set_additional_parameters(array('keyword' => $_GET['keyword']));
$table->set_header(0, '', false);
$table->set_header(1, get_lang('ClassName'));
$table->set_header(2, get_lang('NumberOfUsers'));
$table->set_header(3, '', false);
$table->set_column_filter(3, 'modify_filter');
$table->set_form_actions(array('delete_classes' => get_lang('DeleteSelectedClasses')), 'class');
$content .= $table->return_table();
$actions .= Display::url(Display::return_icon('add.png', get_lang('Add'), array(), ICON_SIZE_MEDIUM), 'class_add.php');
$actions .= Display::url(Display::return_icon('import_csv.png', get_lang('AddUsersToAClass'), array(), ICON_SIZE_MEDIUM), 'class_user_import.php');
$actions .= Display::url(Display::return_icon('import_csv.png', get_lang('ImportClassListCSV'), array(), ICON_SIZE_MEDIUM), 'class_import.php');
$app['title'] = $tool_name;
$tpl = $app['template'];
$tpl->assign('content', $content);
$tpl->assign('actions', $actions);
$tpl->assign('message', $message);
$tpl->display_one_col_template();
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:class_list.php

示例3: isset

$parameters['keyword'] = isset($_REQUEST['keyword']) ? Security::remove_XSS($_REQUEST['keyword']) : null;
$parameters['type'] = isset($_REQUEST['type']) ? $type : null;
$table->set_additional_parameters($parameters);
$col = 0;
$table->set_header($col++, '', false);
$table->set_header($col++, get_lang('OfficialCode'));
if (api_is_western_name_order()) {
    $table->set_header($col++, get_lang('FirstName'));
    $table->set_header($col++, get_lang('LastName'));
} else {
    $table->set_header($col++, get_lang('LastName'));
    $table->set_header($col++, get_lang('FirstName'));
}
if (api_get_setting('show_email_addresses') == 'true') {
    $table->set_header($col++, get_lang('Email'));
    $table->set_column_filter($col - 1, 'email_filter');
}
$table->set_header($col++, get_lang('Active'), false);
$table->set_column_filter($col - 1, 'active_filter');
$table->set_header($col++, get_lang('Actions'), false);
$table->set_column_filter($col - 1, 'reg_filter');
$table->set_form_actions(array('subscribe' => get_lang('reg')), 'user');
if (!empty($_POST['keyword'])) {
    $keyword_name = Security::remove_XSS($_POST['keyword']);
    echo '<br/>' . get_lang('SearchResultsFor') . ' <span style="font-style: italic ;"> ' . $keyword_name . ' </span><br>';
}
// Display table
$table->display();
// footer
Display::display_footer();
/*		SHOW LIST OF USERS  */
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:subscribe_user.php

示例4: array

 function display_survey_list_for_coach()
 {
     $parameters = array();
     $parameters['cidReq'] = api_get_course_id();
     if (isset($_GET['do_search'])) {
         $message = get_lang('DisplaySearchResults') . '<br />';
         $message .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '">' . get_lang('DisplayAll') . '</a>';
         Display::display_normal_message($message, false);
     }
     // Create a sortable table with survey-data
     $table = new SortableTable('surveys_coach', 'get_number_of_surveys_for_coach', 'get_survey_data_for_coach', 2);
     $table->set_additional_parameters($parameters);
     $table->set_header(0, '', false);
     $table->set_header(1, get_lang('SurveyName'));
     $table->set_header(2, get_lang('SurveyCode'));
     $table->set_header(3, get_lang('NumberOfQuestions'));
     $table->set_header(4, get_lang('Author'));
     //$table->set_header(5, get_lang('Language'));
     //$table->set_header(6, get_lang('Shared'));
     $table->set_header(5, get_lang('AvailableFrom'));
     $table->set_header(6, get_lang('AvailableUntil'));
     $table->set_header(7, get_lang('Invite'));
     $table->set_header(8, get_lang('Anonymous'));
     $table->set_header(9, get_lang('Modify'), false, 'width="130"');
     $table->set_column_filter(8, 'anonymous_filter');
     $table->set_column_filter(9, 'modify_filter_for_coach');
     $table->display();
 }
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:28,代码来源:survey.lib.php

示例5: display_glossary

 /**
  * This is the main function that displays the list or the table with all
  * the glossary terms
  * @param  string  View ('table' or 'list'). Optional parameter.
  * Defaults to 'table' and prefers glossary_view from the session by default.
  * @return void
  * @author Patrick Cool <patrick.cool@ugent.be>, Ghent University, Belgium
  * @version januari 2009, dokeos 1.8.6
  */
 public static function display_glossary($view = 'table')
 {
     // This function should always be called with the corresponding
     // parameter for view type. Meanwhile, use this cheap trick.
     $glossaryView = Session::read('glossary_view');
     if (empty($glossaryView)) {
         Session::write('glossary_view', $view);
     }
     // action links
     //echo '<div class="actions">';
     $actionsLeft = '';
     if (api_is_allowed_to_edit(null, true)) {
         $actionsLeft .= '<a href="index.php?' . api_get_cidreq() . '&action=addglossary&msg=add?' . api_get_cidreq() . '">' . Display::return_icon('new_glossary_term.png', get_lang('TermAddNew'), '', ICON_SIZE_MEDIUM) . '</a>';
     }
     $actionsLeft .= '<a href="index.php?' . api_get_cidreq() . '&action=export">' . Display::return_icon('export_csv.png', get_lang('ExportGlossaryAsCSV'), '', ICON_SIZE_MEDIUM) . '</a>';
     if (api_is_allowed_to_edit(null, true)) {
         $actionsLeft .= '<a href="index.php?' . api_get_cidreq() . '&action=import">' . Display::return_icon('import_csv.png', get_lang('ImportGlossary'), '', ICON_SIZE_MEDIUM) . '</a>';
     }
     $actionsLeft .= '<a href="index.php?' . api_get_cidreq() . '&action=export_to_pdf">' . Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_MEDIUM) . '</a>';
     if (isset($_SESSION['glossary_view']) && $_SESSION['glossary_view'] == 'table' or !isset($_SESSION['glossary_view'])) {
         $actionsLeft .= '<a href="index.php?' . api_get_cidreq() . '&action=changeview&view=list">' . Display::return_icon('view_detailed.png', get_lang('ListView'), '', ICON_SIZE_MEDIUM) . '</a>';
     } else {
         $actionsLeft .= '<a href="index.php?' . api_get_cidreq() . '&action=changeview&view=table">' . Display::return_icon('view_text.png', get_lang('TableView'), '', ICON_SIZE_MEDIUM) . '</a>';
     }
     /* BUILD SEARCH FORM */
     $form = new FormValidator('search', 'get', api_get_self() . '?' . api_get_cidreq(), '', array(), FormValidator::LAYOUT_INLINE);
     $form->addText('keyword', '', false, array('class' => 'col-md-2'));
     $form->addElement('hidden', 'cidReq', api_get_course_id());
     $form->addElement('hidden', 'id_session', api_get_session_id());
     $form->addButtonSearch(get_lang('Search'));
     $actionsRight = $form->returnForm();
     $toolbar = Display::toolbarAction('toolbar-document', array(0 => $actionsLeft, 1 => $actionsRight));
     echo $toolbar;
     if ($glossaryView == 'table') {
         $table = new SortableTable('glossary', array('GlossaryManager', 'get_number_glossary_terms'), array('GlossaryManager', 'get_glossary_data'), 0);
         //$table->set_header(0, '', false);
         $table->set_header(0, get_lang('TermName'), true);
         $table->set_header(1, get_lang('TermDefinition'), true);
         if (api_is_allowed_to_edit(null, true)) {
             $table->set_header(2, get_lang('Actions'), false, 'width=90px', array('class' => 'td_actions'));
             $table->set_column_filter(2, array('GlossaryManager', 'actions_filter'));
         }
         $table->display();
     }
     if ($glossaryView == 'list') {
         GlossaryManager::display_glossary_list();
     }
 }
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:57,代码来源:glossary.lib.php

示例6:

$table->set_header(1, get_lang('Photo'), false);
$table->set_header(2, get_lang('OfficialCode'));
if (api_is_western_name_order()) {
    $table->set_header(3, get_lang('FirstName'));
    $table->set_header(4, get_lang('LastName'));
} else {
    $table->set_header(3, get_lang('LastName'));
    $table->set_header(4, get_lang('FirstName'));
}
$table->set_header(5, get_lang('LoginName'));
$table->set_header(6, get_lang('Email'));
$table->set_header(7, get_lang('Profile'));
$table->set_header(8, get_lang('Active'), true, 'width="15px"');
$table->set_header(9, get_lang('RegistrationDate'), true, 'width="90px"');
$table->set_header(10, get_lang('Action'), false, 'width="220px"');
$table->set_column_filter(3, 'user_filter');
$table->set_column_filter(4, 'user_filter');
$table->set_column_filter(6, 'email_filter');
$table->set_column_filter(7, 'status_filter');
$table->set_column_filter(8, 'active_filter');
$table->set_column_filter(10, 'modify_filter');
// Only show empty actions bar if delete users has been blocked
if (api_is_platform_admin() && !$deleteUserAvailable) {
    $table->set_form_actions(array('delete' => get_lang('DeleteFromPlatform')));
} else {
    $table->set_form_actions(array('none' => get_lang('NoActionAvailable')));
}
$table_result = $table->return_table();
$extra_search_options = '';
//Try to search the user everywhere
if ($table->get_total_number_of_items() == 0) {
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:user_list.php

示例7: get_number_of_extra_fields

//$column_order = array(1,2,3,4,5,6,7,8,9,10,11);
$extra_fields = UserManager::get_extra_fields();
$number_of_extra_fields = count($extra_fields);
$table = new SortableTable('user_field', array('UserManager', 'get_number_of_extra_fields'), array('UserManager', 'get_extra_fields'), 5);
$table->set_additional_parameters($parameters);
$table->set_header(0, '', false);
$table->set_header(1, get_lang('FieldLabel'), false);
$table->set_header(2, get_lang('FieldType'), false);
$table->set_header(3, get_lang('FieldTitle'), false);
$table->set_header(4, get_lang('FieldDefaultValue'), false);
$table->set_header(5, get_lang('FieldOrder'), false);
$table->set_header(6, get_lang('FieldVisibility'), false);
$table->set_header(7, get_lang('FieldChangeability'), false);
$table->set_header(8, get_lang('FieldFilter'), false);
$table->set_header(9, get_lang('Modify'), false);
$table->set_column_filter(5, 'order_filter');
$table->set_column_filter(6, 'modify_visibility');
$table->set_column_filter(7, 'modify_changeability');
$table->set_column_filter(8, 'modify_field_filter');
$table->set_column_filter(9, 'edit_filter');
$table->set_column_filter(2, 'type_filter');
$table->display();
Display::display_footer();
//gateway functions to the UserManager methods (provided for SorteableTable callback mechanism)
function get_number_of_extra_fields()
{
    return UserManager::get_number_of_extra_fields();
}
function get_extra_fields($f, $n, $o, $d)
{
    return UserManager::get_extra_fields($f, $n, $o, $d);
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:user_fields.php

示例8: get_options_data

    }
}
// getting all the information of the field
$field_info = UserManager::get_extra_field_information($_GET['field_id']);
echo Display::page_header($field_info['3']);
// the total number of options (used in the actions_filter function but declared here for performance reasons)
$number_of_options = get_number_of_options();
// displaying the sortable table
$parameters['sec_token'] = Security::get_token();
$parameters['field_id'] = Security::remove_XSS($_GET['field_id']);
$table = new SortableTable('options', 'get_number_of_options', 'get_options_data', 2);
$table->set_additional_parameters($parameters);
$table->set_header(0, get_lang('DisplayOrder'), false);
$table->set_header(1, get_lang('OptionText'), false);
$table->set_header(2, get_lang('Actions'), false);
$table->set_column_filter(2, 'actions_filter');
$table->display();
// display footer
Display::display_footer();
function get_options_data($from, $number_of_items, $column, $direction)
{
    // Database table definition
    $table_userfields_options = Database::get_main_table(TABLE_MAIN_USER_FIELD_OPTIONS);
    // The sql statement
    $sql = "SELECT\n\t\t\t\toption_order \t\tAS col0,\n\t\t\t\toption_display_text\tAS col1,\n\t\t\t\tid \t\t\t\t\tAS col2\n\t\t\tFROM {$table_userfields_options} WHERE field_id='" . Database::escape_string($_GET['field_id']) . "' ORDER BY option_order ASC";
    $sql .= " LIMIT {$from},{$number_of_items}";
    $res = Database::query($sql);
    $return = array();
    while ($option = Database::fetch_row($res)) {
        $return[] = $option;
    }
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:user_fields_options.php

示例9: reg_filter

    return $classes;
}
/**
 * Build the reg-column of the table
 * @param int $class_id The class id
 * @return string Some HTML-code
 */
function reg_filter($class_id)
{
    $result = "<a href=\"" . api_get_self() . "?register=yes&amp;class_id=" . $class_id . "\">" . get_lang("reg") . "</a>";
    return $result;
}
// Build search-form
$form = new FormValidator('search_class', 'get', '', '', null, false);
$form->addText('keyword', '', false);
$form->addButtonSearch(get_lang('SearchButton'));
// Build table
$table = new SortableTable('users', 'get_number_of_classes', 'get_class_data', 1);
$parameters['keyword'] = Security::remove_XSS($_GET['keyword']);
$table->set_additional_parameters($parameters);
$col = 0;
$table->set_header($col++, '', false);
$table->set_header($col++, get_lang('ClassName'));
$table->set_header($col++, get_lang('NumberOfUsers'));
$table->set_header($col++, get_lang('reg'), false);
$table->set_column_filter($col - 1, 'reg_filter');
$table->set_form_actions(array('subscribe' => get_lang('reg')), 'class');
// Display form & table
$form->display();
$table->display();
Display::display_footer();
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:subscribe_class.php

示例10: display_tracking_session_overview

 /**
  * Display a sortable table that contains an overview of all the reporting progress of all sessions and all courses the user is subscribed to
  * @author Guillaume Viguier <guillaume@viguierjust.com>
  */
 public static function display_tracking_session_overview()
 {
     $t_head = '    <table style="width: 100%;border:0;padding:0;border-collapse:collapse;table-layout: fixed">';
     //$t_head .= '  <caption>'.get_lang('CourseInformation').'</caption>';
     $t_head .= '<tr>';
     $t_head .= '        <th width="155px" style="border-left:0;border-bottom:0"><span>' . get_lang('Course') . '</span></th>';
     $t_head .= '        <th style="padding:0;border-bottom:0"><span>' . cut(get_lang('AvgTimeSpentInTheCourse'), 6, true) . '</span></th>';
     $t_head .= '        <th style="padding:0;border-bottom:0"><span>' . cut(get_lang('AvgStudentsProgress'), 6, true) . '</span></th>';
     $t_head .= '        <th style="padding:0;border-bottom:0"><span>' . cut(get_lang('AvgCourseScore'), 6, true) . '</span></th>';
     //$t_head .= '      <th><div style="width:40px">'.get_lang('AvgExercisesScore').'</div></th>';
     $t_head .= '        <th style="padding:0;border-bottom:0"><span>' . cut(get_lang('TotalNumberOfMessages'), 6, true) . '</span></th>';
     $t_head .= '        <th style="padding:0;border-bottom:0"><span>' . cut(get_lang('TotalNumberOfAssignments'), 6, true) . '</span></th>';
     $t_head .= '        <th width="105px" style="border-bottom:0"><span>' . get_lang('TotalExercisesScoreObtained') . '</span></th>';
     //$t_head .= '      <th><div>'.get_lang('TotalExercisesScorePossible').'</div></th>';
     $t_head .= '        <th style="padding:0;border-bottom:0"><span>' . cut(get_lang('TotalExercisesAnswered'), 6, true) . '</span></th>';
     //$t_head .= '      <th><div>'.get_lang('TotalExercisesScorePercentage').'</div></th>';
     //$t_head .= '      <th><div style="width:60px">'.get_lang('FirstLogin').'</div></th>';
     $t_head .= '        <th style="padding:0;border-bottom:0;border-right:0;"><span>' . get_lang('LatestLogin') . '</span></th>';
     $t_head .= '    </tr></table>';
     $addparams = array('view' => 'admin', 'display' => 'sessionoverview');
     $table = new SortableTable('tracking_session_overview', array('MySpace', 'get_total_number_sessions'), array('MySpace', 'get_session_data_tracking_overview'), 1);
     $table->additional_parameters = $addparams;
     $table->set_header(0, '', false, null, array('style' => 'display: none'));
     $table->set_header(1, get_lang('Session'), true, array('style' => 'font-size:8pt'), array('style' => 'font-size:8pt'));
     $table->set_header(2, $t_head, false, array('style' => 'width:90%;border:0;padding:0;font-size:7.5pt;'), array('style' => 'width:90%;padding:0;font-size:7.5pt;'));
     $table->set_column_filter(2, array('MySpace', 'session_tracking_filter'));
     $table->display();
 }
开发者ID:feroli1000,项目名称:chamilo-lms,代码行数:32,代码来源:myspace.lib.php

示例11: display_templates

/**
 * Display a sortable table with all the templates that the platform administrator has defined.
 *
 * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
 * @version August 2008
 * @since Dokeos 1.8.6
 */
function display_templates()
{
    $table = new SortableTable('templates', 'get_number_of_templates', 'get_template_data', 1);
    $table->set_additional_parameters(array('category' => Security::remove_XSS($_GET['category'])));
    $table->set_header(0, get_lang('Image'), true, array('style' => 'width: 101px;'));
    $table->set_header(1, get_lang('Title'));
    $table->set_header(2, get_lang('Actions'), false, array('style' => 'width:50px;'));
    $table->set_column_filter(2, 'actions_filter');
    $table->set_column_filter(0, 'image_filter');
    $table->display();
}
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:18,代码来源:settings.lib.php

示例12: SortableTable

$form->addElement('style_submit_button', 'submit', get_lang('Search'), 'class="search"');
// The action bar.
echo '<div style="float: right; margin-top: 5px; margin-right: 5px;">';
//echo '<a href="course_list.php">'.Display::return_icon('courses.gif', get_lang('CourseList')).get_lang('CourseList').'</a>';
echo ' <a href="course_request_accepted.php">' . Display::return_icon('course_request_accepted.gif', get_lang('AcceptedCourseRequests')) . get_lang('AcceptedCourseRequests') . '</a>';
echo ' <a href="course_request_rejected.php">' . Display::return_icon('course_request_rejected.gif', get_lang('RejectedCourseRequests')) . get_lang('RejectedCourseRequests') . '</a>';
echo '</div>';
echo '<div class="actions">';
$form->display();
echo '</div>';
// Create a sortable table with the course data.
$offet = DELETE_ACTION_ENABLED ? 1 : 0;
$table = new SortableTable('course_requests_review', 'get_number_of_requests', 'get_request_data', 4 + $offet, 20, 'DESC');
$table->set_additional_parameters($parameters);
if (DELETE_ACTION_ENABLED) {
    $table->set_header(0, '', false);
}
$table->set_header(0 + $offet, get_lang('Code'));
$table->set_header(1 + $offet, get_lang('Title'));
$table->set_header(2 + $offet, get_lang('Category'));
$table->set_header(3 + $offet, get_lang('Teacher'));
$table->set_header(4 + $offet, get_lang('CourseRequestDate'));
$table->set_header(5 + $offet, '', false);
$table->set_column_filter(3 + $offet, 'email_filter');
$table->set_column_filter(5 + $offet, 'modify_filter');
if (DELETE_ACTION_ENABLED) {
    $table->set_form_actions(array('delete_course_requests' => get_lang('DeleteCourseRequests')), 'course_request');
}
$table->display();
/* FOOTER */
Display::display_footer();
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:course_request_review.php

示例13: display_glossary

/**
 * This is the main function that display the list or the table with all the glossary terms
 *
 * @author Patrick Cool <patrick.cool@ugent.be>, Ghent University, Belgium
 * @version januari 2009, dokeos 1.8.6
 */
function display_glossary()
{
    // action links
    echo '<div class="actions" style="margin-bottom:10px">';
    if (api_is_allowed_to_edit(null, true)) {
        echo '<a href="index.php?' . api_get_cidreq() . '&action=addglossary&msg=add">' . Display::return_icon('filenew.gif', get_lang('TermAddNew')) . get_lang('TermAddNew') . '</a>';
    }
    if (isset($_SESSION['glossary_view']) && $_SESSION['glossary_view'] == 'table' or !isset($_SESSION['glossary_view'])) {
        echo '<a href="index.php?' . api_get_cidreq() . '&action=changeview&view=list">' . Display::return_icon('view_list.gif', get_lang('ListView')) . get_lang('ListView') . '</a>';
    } else {
        echo '<a href="index.php?' . api_get_cidreq() . '&action=changeview&view=table">' . Display::return_icon('view_table.gif', get_lang('TableView')) . get_lang('TableView') . '</a>';
    }
    echo '</div>';
    if (!$_SESSION['glossary_view'] or $_SESSION['glossary_view'] == 'table') {
        $table = new SortableTable('glossary', 'get_number_glossary_terms', 'get_glossary_data', 0);
        $table->set_header(0, get_lang('DisplayOrder'), true);
        $table->set_header(1, get_lang('TermName'), true);
        $table->set_header(2, get_lang('TermDefinition'), true);
        $table->set_header(3, get_lang('CreationDate'), false);
        $table->set_header(4, get_lang('UpdateDate'), false);
        if (api_is_allowed_to_edit(null, true)) {
            $table->set_header(5, get_lang('Actions'), false);
            $table->set_column_filter(5, 'actions_filter');
        }
        $table->display();
    }
    if ($_SESSION['glossary_view'] == 'list') {
        display_glossary_list();
    }
}
开发者ID:Eidn,项目名称:shanghai,代码行数:36,代码来源:index.php

示例14: foreach

    $table->set_header($header_nr++, get_lang('FirstName'));
    $indexList['lastname'] = $header_nr;
    $table->set_header($header_nr++, get_lang('LastName'));
} else {
    $indexList['lastname'] = $header_nr;
    $table->set_header($header_nr++, get_lang('LastName'));
    $indexList['firstname'] = $header_nr;
    $table->set_header($header_nr++, get_lang('FirstName'));
}
$indexList['username'] = $header_nr;
$table->set_header($header_nr++, get_lang('LoginName'));
$indexList['groups'] = $header_nr;
$table->set_header($header_nr++, get_lang('GroupSingle'), false);
if (api_is_allowed_to_edit(null, true) && api_get_setting('allow_user_course_subscription_by_course_admin') == 'true') {
} else {
    $table->set_column_filter(0, 'hide_field');
}
$hideFields = api_get_configuration_value('hide_user_field_from_list');
if (!empty($hideFields)) {
    foreach ($hideFields as $fieldToHide) {
        if (isset($indexList[$fieldToHide])) {
            $table->setHideColumn($indexList[$fieldToHide]);
        }
    }
}
if (api_is_allowed_to_edit(null, true)) {
    $table->set_header($header_nr++, get_lang('Status'), false);
    $table->set_header($header_nr++, get_lang('Active'), false);
    if (api_get_setting('allow_user_course_subscription_by_course_admin') == 'true') {
        $table->set_column_filter(9, 'active_filter');
    } else {
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:user.php

示例15: isset

$my_cidreq = isset($_GET['cidReq']) ? Security::remove_XSS($_GET['cidReq']) : '';
$my_origin = isset($_GET['origin']) ? Security::remove_XSS($_GET['origin']) : '';
$my_gidreq = isset($_GET['gidReq']) ? Security::remove_XSS($_GET['gidReq']) : '';
$parameters = array('cidReq' => $my_cidreq, 'origin' => $my_origin, 'gidReq' => $my_gidreq);
$table->set_additional_parameters($parameters);
$table->set_header(0, '');
if (api_is_western_name_order()) {
    $table->set_header(1, get_lang('FirstName'));
    $table->set_header(2, get_lang('LastName'));
} else {
    $table->set_header(1, get_lang('LastName'));
    $table->set_header(2, get_lang('FirstName'));
}
if (api_get_setting('display.show_email_addresses') == 'true') {
    $table->set_header(3, get_lang('Email'));
    $table->set_column_filter(3, 'email_filter');
} else {
    if (api_is_allowed_to_edit() == 'true') {
        $table->set_header(3, get_lang('Email'));
        $table->set_column_filter(3, 'email_filter');
    }
}
//the order of these calls is important
$table->set_column_filter(1, 'user_name_filter');
$table->set_column_filter(2, 'user_name_filter');
$table->set_column_filter(0, 'user_icon_filter');
$table->display();
/**
 * Get the number of subscribed users to the group
 *
 * @return integer
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:31,代码来源:group_space.php


注:本文中的SortableTable::set_column_filter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。