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


PHP SortableTable::set_header方法代码示例

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


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

示例1: 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

示例2: SortableTable

        case 'thematic_details':
            echo '<a href="index.php?' . api_get_cidreq() . '&action=thematic_add' . $url_token . '">' . Display::return_icon('new_course_progress.png', get_lang('NewThematicSection'), '', ICON_SIZE_MEDIUM) . '</a>';
            echo '<a href="index.php?' . api_get_cidreq() . '&action=thematic_import_select' . $url_token . '">' . Display::return_icon('import_csv.png', get_lang('ImportThematic'), '', ICON_SIZE_MEDIUM) . '</a>';
            echo '<a href="index.php?' . api_get_cidreq() . '&action=thematic_export' . $url_token . '">' . Display::return_icon('export_csv.png', get_lang('ExportThematic'), '', ICON_SIZE_MEDIUM) . '</a>';
            echo '<a href="index.php?' . api_get_cidreq() . '&action=thematic_export_pdf' . $url_token . '">' . Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_MEDIUM) . '</a>';
            break;
        default:
            echo '<a href="index.php?' . api_get_cidreq() . '&action=thematic_add' . $url_token . '">' . Display::return_icon('new_course_progress.png', get_lang('NewThematicSection'), '', ICON_SIZE_MEDIUM) . '</a>';
    }
    echo '</div>';
}
if ($action == 'thematic_list') {
    $table = new SortableTable('thematic_list', array('Thematic', 'get_number_of_thematics'), array('Thematic', 'get_thematic_data'));
    $parameters['action'] = $action;
    $table->set_additional_parameters($parameters);
    $table->set_header(0, '', false, array('style' => 'width:20px;'));
    $table->set_header(1, get_lang('Title'), false);
    if (api_is_allowed_to_edit(null, true)) {
        $table->set_header(2, get_lang('Actions'), false, array('style' => 'text-align:center;width:40%;'));
        $table->set_form_actions(array('thematic_delete_select' => get_lang('DeleteAllThematics')));
    }
    $table->display();
} elseif ($action == 'thematic_details') {
    if (isset($_GET['thematic_plan_save_message']) && $_GET['thematic_plan_save_message'] == 'ok') {
        Display::display_confirmation_message(get_lang('ThematicSectionHasBeenCreatedSuccessfull'));
    }
    if (isset($last_id) && $last_id) {
        $link_to_thematic_plan = '<a href="index.php?' . api_get_cidreq() . '&action=thematic_plan_list&thematic_id=' . $last_id . '">' . Display::return_icon('lesson_plan.png', get_lang('ThematicPlan'), array('style' => 'vertical-align:middle;float:none;'), ICON_SIZE_SMALL) . '</a>';
        $link_to_thematic_advance = '<a href="index.php?' . api_get_cidreq() . '&action=thematic_advance_list&thematic_id=' . $last_id . '">' . Display::return_icon('lesson_plan_calendar.png', get_lang('ThematicAdvance'), array('style' => 'vertical-align:middle;float:none;'), ICON_SIZE_SMALL) . '</a>';
        Display::display_confirmation_message(get_lang('ThematicSectionHasBeenCreatedSuccessfull') . '<br />' . sprintf(get_lang('NowYouShouldAddThematicPlanXAndThematicAdvanceX'), $link_to_thematic_plan, $link_to_thematic_advance), false);
    }
开发者ID:secuencia24,项目名称:chamilo-lms,代码行数:31,代码来源:thematic.php

示例3: 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">';
     if (api_is_allowed_to_edit(null, true)) {
         echo '<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>';
     }
     echo '<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)) {
         echo '<a href="index.php?' . api_get_cidreq() . '&action=import">' . Display::return_icon('import_csv.png', get_lang('ImportGlossary'), '', ICON_SIZE_MEDIUM) . '</a>';
     }
     echo '<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($glossaryView) && $glossaryView == 'table' or !isset($glossaryView)) {
         echo '<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 {
         echo '<a href="index.php?' . api_get_cidreq() . '&action=changeview&view=table">' . Display::return_icon('view_text.png', get_lang('TableView'), '', ICON_SIZE_MEDIUM) . '</a>';
     }
     echo '</div>';
     if (!$glossaryView || $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:omaoibrahim,项目名称:chamilo-lms,代码行数:48,代码来源:glossary.lib.php

示例4: 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

示例5: hide_field

        }
    }
    return $result;
}
function hide_field()
{
    return null;
}
$default_column = 3;
$table = new SortableTable('user_list', 'get_number_of_users', 'get_user_data', $default_column);
$parameters['keyword'] = isset($_GET['keyword']) ? Security::remove_XSS($_GET['keyword']) : null;
$parameters['sec_token'] = Security::get_token();
$table->set_additional_parameters($parameters);
$header_nr = 0;
$indexList = array();
$table->set_header($header_nr++, '', false);
$indexList['photo'] = $header_nr;
$table->set_header($header_nr++, get_lang('Photo'), false);
$table->set_header($header_nr++, get_lang('OfficialCode'));
$indexList['official_code'] = $header_nr;
if ($is_western_name_order) {
    $indexList['firstname'] = $header_nr;
    $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'));
}
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:user.php

示例6: SortableTable

        $table = new SortableTable('courses', 'get_number_of_courses', 'get_course_data', 2);
    }
    $parameters = array();
    if (isset($_GET['keyword'])) {
        $parameters = array('keyword' => Security::remove_XSS($_GET['keyword']));
    } elseif (isset($_GET['keyword_code'])) {
        $parameters['keyword_code'] = Security::remove_XSS($_GET['keyword_code']);
        $parameters['keyword_title'] = Security::remove_XSS($_GET['keyword_title']);
        $parameters['keyword_category'] = Security::remove_XSS($_GET['keyword_category']);
        $parameters['keyword_language'] = Security::remove_XSS($_GET['keyword_language']);
        $parameters['keyword_visibility'] = Security::remove_XSS($_GET['keyword_visibility']);
        $parameters['keyword_subscribe'] = Security::remove_XSS($_GET['keyword_subscribe']);
        $parameters['keyword_unsubscribe'] = Security::remove_XSS($_GET['keyword_unsubscribe']);
    }
    $table->set_additional_parameters($parameters);
    $table->set_header(0, '', false, 'width="8px"');
    $table->set_header(1, get_lang('Title'), true, 'width="360px"');
    $table->set_header(2, get_lang('Code'));
    $table->set_header(3, get_lang('Language'), true, 'width="70px"');
    $table->set_header(4, get_lang('Category'));
    $table->set_header(5, get_lang('SubscriptionAllowed'), true, 'width="60px"');
    $table->set_header(6, get_lang('UnsubscriptionAllowed'), false, 'width="50px"');
    //$table->set_header(7, get_lang('Teacher'));
    $table->set_header(7, get_lang('Action'), false, 'width="160px"', array('class' => 'td_actions'));
    $table->set_column_filter(7, 'modify_filter');
    $table->set_form_actions(array('delete_courses' => get_lang('DeleteCourse')), 'course');
    $content .= $table->return_table();
}
$tpl = new Template($tool_name);
$tpl->assign('actions', $actions);
$tpl->assign('message', $message);
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:course_list.php

示例7: switch

 /**
  * @return string
  */
 static function outbox_display()
 {
     $social_link = false;
     if (isset($_REQUEST['f']) && $_REQUEST['f'] == 'social') {
         $social_link = 'f=social';
     }
     $success = get_lang('SelectedMessagesDeleted') . '&nbsp</b><br /><a href="outbox.php?' . $social_link . '">' . get_lang('BackToOutbox') . '</a>';
     $html = null;
     if (isset($_REQUEST['action'])) {
         switch ($_REQUEST['action']) {
             case 'delete':
                 $number_of_selected_messages = count($_POST['id']);
                 if ($number_of_selected_messages != 0) {
                     foreach ($_POST['id'] as $index => $message_id) {
                         MessageManager::delete_message_by_user_receiver(api_get_user_id(), $message_id);
                     }
                 }
                 $html .= Display::return_message(api_xml_http_response_encode($success), 'normal', false);
                 break;
             case 'deleteone':
                 MessageManager::delete_message_by_user_receiver(api_get_user_id(), $_GET['id']);
                 $html .= Display::return_message(api_xml_http_response_encode($success), 'normal', false);
                 $html .= '<br/>';
                 break;
         }
     }
     // display sortable table with messages of the current user
     $table = new SortableTable('message_outbox', array('MessageManager', 'get_number_of_messages_sent'), array('MessageManager', 'get_message_data_sent'), 3, 20, 'DESC');
     $parameters['f'] = isset($_GET['f']) && $_GET['f'] == 'social' ? 'social' : null;
     $table->set_additional_parameters($parameters);
     $table->set_header(0, '', false, array('style' => 'width:15px;'));
     $table->set_header(1, get_lang('Messages'), false);
     $table->set_header(2, get_lang('Date'), true, array('style' => 'width:160px;'));
     $table->set_header(3, get_lang('Modify'), false, array('style' => 'width:70px;'));
     $table->set_form_actions(array('delete' => get_lang('DeleteSelectedMessages')));
     $html .= $table->return_table();
     return $html;
 }
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:41,代码来源:message.lib.php

示例8: SortableTable

echo Display::page_subheader(get_lang('GroupTutors'));
if (!empty($tutor_info)) {
    echo $tutor_info;
}
echo '<br />';
/*
 * List all the members of the current group
 */
echo Display::page_subheader(get_lang('GroupMembers'));
$table = new SortableTable('group_users', 'get_number_of_group_users', 'get_group_user_data', (api_is_western_name_order() xor api_sort_by_first_name()) ? 2 : 1);
$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');
    }
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:31,代码来源:group_space.php

示例9: Attendance

    }
    echo '<div class="actions">';
    echo '<a href="index.php?' . api_get_cidreq() . $param_gradebook . '&action=attendance_add">' . Display::return_icon('new_attendance_list.png', get_lang('CreateANewAttendance'), '', ICON_SIZE_MEDIUM) . '</a>';
    /*echo '<a href="index.php?'.api_get_cidreq().$param_gradebook.'&action=calendar_logins">'.
      Display::return_icon('attendance_list.png',get_lang('Logins'),'',ICON_SIZE_MEDIUM).'</a>';*/
    echo '</div>';
}
$attendance = new Attendance();
if ($attendance->get_number_of_attendances() == 0) {
    $attendance->set_name(get_lang('Attendances'));
    $attendance->set_description(get_lang('Attendances'));
    $attendance->attendance_add();
}
$table = new SortableTable('attendance_list', array('Attendance', 'get_number_of_attendances'), array('Attendance', 'get_attendance_data'), $default_column);
$table->set_additional_parameters($parameters);
$table->set_header(0, '', false, array('style' => 'width:20px;'));
$table->set_header(1, get_lang('Name'), true);
$table->set_header(2, get_lang('Description'), true);
$table->set_header(3, get_lang('CountDoneAttendance'), true, array('style' => 'width:90px;'));
if (api_is_allowed_to_edit(null, true)) {
    $table->set_header(4, get_lang('Actions'), false, array('style' => 'text-align:center'));
    $actions = array('attendance_set_invisible_select' => get_lang('SetInvisible'), 'attendance_set_visible_select' => get_lang('SetVisible'));
    $allow = api_get_configuration_value('allow_delete_attendance');
    if ($allow) {
        $actions['attendance_delete_select'] = get_lang('DeleteAllSelectedAttendances');
    }
    $table->set_form_actions($actions);
}
if ($table->get_total_number_of_items() > 0) {
    $table->display();
}
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:attendance_list.php

示例10: displayTrackingAccessOverView

 public static function displayTrackingAccessOverView($courseId, $sessionId, $studentId)
 {
     $courseId = intval($courseId);
     $sessionId = intval($sessionId);
     $studentId = intval($studentId);
     $em = Database::getManager();
     $sessionRepo = $em->getRepository('ChamiloCoreBundle:Session');
     $courseList = [];
     $sessionList = [];
     $studentList = [];
     if (!empty($courseId)) {
         $course = $em->find('ChamiloCoreBundle:Course', $courseId);
         $courseList[$course->getId()] = $course->getTitle();
     }
     if (!empty($sessionId)) {
         $session = $em->find('ChamiloCoreBundle:Session', $sessionId);
         $sessionList[$session->getId()] = $session->getName();
     }
     if (!empty($studentId)) {
         $student = $em->find('ChamiloUserBundle:User', $studentId);
         $studentList[$student->getId()] = $student->getCompleteName();
     }
     $form = new FormValidator('access_overview', 'GET');
     $form->addElement('select_ajax', 'course_id', get_lang('SearchCourse'), $courseList, ['url' => api_get_path(WEB_AJAX_PATH) . 'course.ajax.php?' . http_build_query(['a' => 'search_course_by_session_all', 'session_id' => $sessionId])]);
     $form->addElement('select_ajax', 'session_id', get_lang('SearchSession'), $sessionList, ['url_function' => "\n                    function () {\n                        var params = \$.param({\n                            a: 'search_session_by_course',\n                            course_id: \$('#course_id').val() || 0\n                        });\n\n                        return '" . api_get_path(WEB_AJAX_PATH) . "session.ajax.php?' + params;\n                    }\n                "]);
     $form->addSelect('profile', get_lang('Profile'), ['' => get_lang('Select'), STUDENT => get_lang('Student'), COURSEMANAGER => get_lang('CourseManager'), DRH => get_lang('Drh')], ['id' => 'profile']);
     $form->addElement('select_ajax', 'student_id', get_lang('SearchUsers'), $studentList, ['placeholder' => get_lang('All'), 'url_function' => "\n                    function () {\n                        var params = \$.param({\n                            a: 'search_user_by_course',\n                            session_id: \$('#session_id').val(),\n                            course_id: \$('#course_id').val()\n                        });\n\n                        return '" . api_get_path(WEB_AJAX_PATH) . "course.ajax.php?' + params;\n                    }\n                "]);
     $form->addDateRangePicker('date', get_lang('DateRange'), true, ['id' => 'date_range', 'format' => 'YYYY-MM-DD', 'timePicker' => 'false', 'validate_format' => 'Y-m-d']);
     $form->addHidden('display', 'accessoverview');
     $form->addRule('course_id', get_lang('Required'), 'required');
     $form->addRule('profile', get_lang('Required'), 'required');
     $form->addButton('submit', get_lang('Generate'), 'gear', 'primary');
     $table = null;
     if ($form->validate()) {
         $table = new SortableTable('tracking_access_overview', ['MySpace', 'getNumberOfRrackingAccessOverview'], ['MySpace', 'getUserDataAccessTrackingOverview'], 0);
         $table->additional_parameters = $form->exportValues();
         $table->set_header(0, get_lang('LoginDate'), true);
         $table->set_header(1, get_lang('Username'), true);
         if (api_is_western_name_order()) {
             $table->set_header(2, get_lang('FirstName'), true);
             $table->set_header(3, get_lang('LastName'), true);
         } else {
             $table->set_header(2, get_lang('LastName'), true);
             $table->set_header(3, get_lang('FirstName'), true);
         }
         $table->set_header(4, get_lang('Clicks'), false);
         $table->set_header(5, get_lang('IP'), false);
         $table->set_header(6, get_lang('TimeLoggedIn'), false);
     }
     $template = new Template(null, false, false, false, false, false, false);
     $template->assign('form', $form->returnForm());
     $template->assign('table', $table ? $table->return_table() : null);
     echo $template->fetch($template->get_template('my_space/accessoverview.tpl'));
 }
开发者ID:feroli1000,项目名称:chamilo-lms,代码行数:54,代码来源:myspace.lib.php

示例11: count

//$form->addElement('text','title',get_lang('FieldTitle'));
//$form->addElement('text','default',get_lang('FieldDefaultValue'));
//$form->addElement('submit','submit',get_lang('Search'));
$form->addElement('static', 'search_advanced_link', null, '<a href="user_fields_add.php?action=fill">' . Display::return_icon('add_user_fields.png', get_lang('AddUserField'), '', ICON_SIZE_MEDIUM) . '</a>');
echo '<div class="actions">';
$form->display();
echo '</div>';
// Create a sortable table with user-data
$parameters['sec_token'] = Security::get_token();
//$column_show  = array(1,1,1,1,1,1,1,1,1,0,0);
//$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');
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:user_fields.php

示例12: FormValidator

 // BEGIN : form to remind inactives susers
 $form = new FormValidator('reminder_form', 'get', api_get_path(REL_CODE_PATH) . 'announcements/announcements.php');
 $renderer = $form->defaultRenderer();
 $renderer->setElementTemplate('<span>{label} {element}</span>&nbsp;<button class="save" type="submit">' . get_lang('SendNotification') . '</button>', 'since');
 $options = array(2 => '2 ' . get_lang('Days'), 3 => '3 ' . get_lang('Days'), 4 => '4 ' . get_lang('Days'), 5 => '5 ' . get_lang('Days'), 6 => '6 ' . get_lang('Days'), 7 => '7 ' . get_lang('Days'), 15 => '15 ' . get_lang('Days'), 30 => '30 ' . get_lang('Days'));
 $el = $form->addElement('select', 'since', '<img width="22" align="middle" src="' . api_get_path(WEB_IMG_PATH) . 'messagebox_warning.gif" border="0" />' . get_lang('RemindInactivesLearnersSince'), $options);
 $el->setSelected(7);
 $form->addElement('hidden', 'action', 'add');
 $form->addElement('hidden', 'remindallinactives', 'true');
 $form->display();
 // END : form to remind inactives susers
 $tracking_column = isset($_GET['tracking_column']) ? $_GET['tracking_column'] : 0;
 $tracking_direction = isset($_GET['tracking_direction']) ? $_GET['tracking_direction'] : 'DESC';
 if (count($a_students) > 0) {
     $table = new SortableTable('tracking', 'count_student_in_course');
     $table->set_header(0, get_lang('OfficialCode'), false, 'align="center"');
     $table->set_header(1, get_lang('LastName'), true, 'align="center"');
     $table->set_header(2, get_lang('FirstName'), false, 'align="center"');
     $table->set_header(3, get_lang('TrainingTime'), false);
     $table->set_header(4, get_lang('CourseProgress'), false);
     $table->set_header(5, get_lang('Score'), false);
     $table->set_header(6, get_lang('Student_publication'), false);
     $table->set_header(7, get_lang('Messages'), false);
     $table->set_header(8, get_lang('FirstLogin'), false, 'align="center"');
     $table->set_header(9, get_lang('LatestLogin'), false, 'align="center"');
     $table->set_header(10, get_lang('Details'), false);
     if ($export_csv) {
         $csv_content[] = array();
     }
     $all_datas = array();
     $course_code = $_course['id'];
开发者ID:RusticiSoftware,项目名称:SCORMCloud_DokeosMod,代码行数:31,代码来源:courseLog.php

示例13: get_legal_data_mask

if (isset($_GET['action'])) {
    if ($_GET['action'] == 'show_message') {
        Display::display_normal_message(Security::remove_XSS(stripslashes($_GET['message'])));
    }
    Security::clear_token();
}
$legal_count = LegalManager::count();
$languages = api_get_languages();
$available_languages = count($languages);
if ($legal_count != $available_languages) {
    Display::display_warning_message(get_lang('YouShouldCreateTermAndConditionsForAllAvailableLanguages'));
}
//if ($legal_count < )
$table = new SortableTable('conditions', 'count_mask', 'get_legal_data_mask', 2);
$table->set_additional_parameters($parameters);
$table->set_header(0, get_lang('Version'), false, 'width="15px"');
$table->set_header(1, get_lang('Language'), false, 'width="30px"');
$table->set_header(2, get_lang('Content'), false);
$table->set_header(3, get_lang('Changes'), false, 'width="60px"');
$table->set_header(4, get_lang('Type'), false, 'width="60px"');
$table->set_header(5, get_lang('Date'), false, 'width="50px"');
$table->display();
// this 2 "mask" function are here just because the SortableTable
function get_legal_data_mask($id, $params = null, $row = null)
{
    return LegalManager::get_legal_data($id, $params, $row);
}
function count_mask()
{
    return LegalManager::count();
}
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:legal_list.php

示例14: foreach

        Display::display_header($tool_name);
        api_display_tool_title($tool_name);
        echo $msg;
        if ($_GET['action'] == 'blackout') {
            $result = Rsys::black_out_changer($_GET['id']);
            Display::display_normal_message(get_lang('BlackoutPage' . $result), false);
        }
        echo '<form id="cat_form" action="m_item.php" method="get"><div style="float: left;"><a href="m_item.php?action=add">' . get_lang('AddNewItem') . '</a></div><div style="text-align: right;">' . get_lang('CategoryFilter') . ': <select name="cat" onchange="this.form.submit();"><option value="0">*** ' . get_lang('All') . ' ***</option>';
        $cats = Rsys::get_category_with_items_manager();
        foreach ($cats as $cat) {
            echo '<option value="' . $cat['id'] . '"' . ($cat['id'] == $_GET['cat'] ? ' selected="selected"' : '') . '>' . $cat['name'] . '</option>';
        }
        echo '</select></div></form>';
        echo "hier";
        $table = new SortableTable('item', array('Rsys', 'get_num_items'), array('Rsys', 'get_table_items'), 1);
        echo "hier2";
        $table->set_additional_parameters(array('cat' => $_GET['cat']));
        $table->set_header(0, '', false, array('style' => 'width:10px'));
        $table->set_header(1, get_lang('ItemName'), true);
        $table->set_header(2, get_lang('ItemDescription'), true);
        $table->set_header(3, get_lang('Category'), true);
        $table->set_header(4, get_lang('ItemCreator'), true);
        $table->set_header(5, '', false, array('style' => 'width:100px;'));
        $table->set_column_filter(5, 'modify_filter');
        $table->set_form_actions(array('delete_items' => get_lang('DeleteSelectedItems')), 'items');
        $table->display();
}
/**
   ---------------------------------------------------------------------
*/
Display::display_footer();
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:m_item_origineel.php

示例15: 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


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