本文整理汇总了PHP中SortableTable类的典型用法代码示例。如果您正苦于以下问题:PHP SortableTable类的具体用法?PHP SortableTable怎么用?PHP SortableTable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SortableTable类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: outbox_display
/**
* @return string
*/
static function outbox_display()
{
$social_link = false;
if (isset($_REQUEST['f']) && $_REQUEST['f'] == 'social') {
$social_link = 'f=social';
}
$success = get_lang('SelectedMessagesDeleted') . ' </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
示例2: get_lang
}
}
} else {
if (api_is_student_boss()) {
$actions .= Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH) . "auth/my_progress.php");
$actions .= Display::url(Display::return_icon('user_na.png', get_lang('Students'), array(), ICON_SIZE_MEDIUM), '#');
$actions .= Display::url(Display::return_icon("statistics.png", get_lang("CompanyReport"), array(), ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH) . "mySpace/company_reports.php");
$actions .= Display::url(Display::return_icon("certificate_list.png", get_lang("GradebookSeeListOfStudentsCertificates"), [], ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH) . "gradebook/certificate_report.php");
}
}
$actions .= '<span style="float:right">';
$actions .= Display::url(Display::return_icon('printer.png', get_lang('Print'), array(), ICON_SIZE_MEDIUM), 'javascript: void(0);', array('onclick' => 'javascript: window.print();'));
$actions .= Display::url(Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), array(), ICON_SIZE_MEDIUM), api_get_self() . '?export=csv&keyword=' . $keyword);
$actions .= '</span>';
$actions .= '</div>';
$table = new SortableTable('tracking_student', 'get_count_users', 'get_users', ($is_western_name_order xor $sort_by_first_name) ? 1 : 0, 10);
$params = array('keyword' => $keyword, 'active' => $active, 'sleeping_days' => $sleepingDays);
$table->set_additional_parameters($params);
if ($is_western_name_order) {
$table->set_header(0, get_lang('FirstName'), false);
$table->set_header(1, get_lang('LastName'), false);
} else {
$table->set_header(0, get_lang('LastName'), false);
$table->set_header(1, get_lang('FirstName'), false);
}
$table->set_header(2, get_lang('FirstLogin'), false);
$table->set_header(3, get_lang('LastConnexion'), false);
$table->set_header(4, get_lang('Details'), false);
if ($export_csv) {
if ($is_western_name_order) {
$csv_header[] = array(get_lang('FirstName'), get_lang('LastName'), get_lang('FirstLogin'), get_lang('LastConnexion'));
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:student.php
示例3: get_lang
$actions .= '<div class="pull-right">';
$actions .= '<a href="course_add.php">' . Display::return_icon('new_course.png', get_lang('AddCourse'), '', ICON_SIZE_MEDIUM) . '</a> ';
if (api_get_setting('course_validation') == 'true') {
$actions .= '<a href="course_request_review.php">' . Display::return_icon('course_request_pending.png', get_lang('ReviewCourseRequests'), '', ICON_SIZE_MEDIUM) . '</a>';
}
$actions .= '</div>';
$actions .= '<div class="pull-right">';
$actions .= $sessionFilter->return_form();
$actions .= '</div>';
$actions .= $form->return_form();
if (isset($_GET['session_id']) && !empty($_GET['session_id'])) {
// Create a sortable table with the course data filtered by session
$table = new SortableTable('courses', 'get_number_of_courses', 'get_course_data_by_session', 2);
} else {
// Create a sortable table with the course data
$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"');
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:course_list.php
示例4: get_lang
if ($start_date_error) {
$msg_error .= get_lang('YouMustSelectAtleastAStartDate') . '<br />';
}
if ($duration_error) {
$msg_error .= get_lang('DurationInHoursMustBeNumeric');
}
if (!empty($msg_error)) {
Display::display_error_message($msg_error, false);
}
$form->display();
} else {
if ($action == 'thematic_advance_list') {
// thematic advance list
echo '<div class="actions">';
echo '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&action=thematic_details">' . Display::return_icon('back.png', get_lang("BackTo"), '', ICON_SIZE_MEDIUM) . '</a>';
if (api_is_allowed_to_edit(false, true)) {
echo '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&action=thematic_advance_add&thematic_id=' . $thematic_id . '"> ' . Display::return_icon('add.png', get_lang('NewThematicAdvance'), '', ICON_SIZE_MEDIUM) . '</a>';
}
echo '</div>';
$table = new SortableTable('thematic_advance_list', array('Thematic', 'get_number_of_thematic_advances'), array('Thematic', 'get_thematic_advance_data'));
$table->set_additional_parameters($parameters);
$table->set_header(0, '', false, array('style' => 'width:20px;'));
$table->set_header(1, get_lang('StartDate'), false);
$table->set_header(2, get_lang('DurationInHours'), false, array('style' => 'width:80px;'));
$table->set_header(3, get_lang('Content'), false);
if (api_is_allowed_to_edit(null, true)) {
$table->set_header(4, get_lang('Actions'), false, array('style' => 'text-align:center'));
}
$table->display();
}
}
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:thematic_advance.php
示例5: api_get_self
} else {
// Show buttons for unsubscribe
if ($course_info['unsubscribe'] == 1) {
if ($user_id == $current_user_id) {
$result .= '<a class="btn btn-small btn-danger" href="' . api_get_self() . '?' . api_get_cidreq() . '&type=' . $type . '&unregister=yes&user_id=' . $user_id . '" title="' . get_lang('Unreg') . ' " onclick="javascript:if(!confirm(\'' . addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)) . '\')) return false;">' . get_lang('Unreg') . '</a> ';
}
}
}
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'));
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:user.php
示例6: SortableTable
$tutor_info .= '<li>';
$tutor_info .= Display::url($userInfo['complete_name'], $userInfo['profile_url']);
$tutor_info .= '</li>';
}
$tutor_info .= '</ul>';
}
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'));
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:31,代码来源:group_space.php
示例7: get_lang
$not_register_user_message = '<br />' . get_lang('UsersNotRegistered') . '<br/><br /><br />' . $list_not_register_user;
Display::display_error_message($not_register_user_message, false);
}
break;
}
}
if (!empty($_SESSION['session_user_id'])) {
unset($_SESSION['session_user_id']);
}
if (!empty($_SESSION['session_user_name'])) {
unset($_SESSION['session_user_name']);
}
$is_western_name_order = api_is_western_name_order();
$sort_by_first_name = api_sort_by_first_name();
// Build table
$table = new SortableTable('subscribe_users', 'get_number_of_users', 'get_user_data', ($is_western_name_order xor $sort_by_first_name) ? 3 : 2);
$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'));
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:subscribe_user.php
示例8: intval
$users_tracking_per_page = '';
if (isset($_GET['users_tracking_per_page'])) {
$users_tracking_per_page = '&users_tracking_per_page=' . intval($_GET['users_tracking_per_page']);
}
echo '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&export=csv&' . $addional_param . $users_tracking_per_page . '">
' . Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM) . '</a>';
echo '</span>';
echo '</div>';
// Create a search-box.
$form = new FormValidator('search_simple', 'GET', api_get_path(WEB_CODE_PATH) . 'tracking/course_log_resources.php?' . api_get_cidreq() . '&id_session' . $session_id, '', array('class' => 'form-search'), false);
$renderer = $form->defaultRenderer();
$renderer->setCustomElementTemplate('<span>{element}</span>');
$form->addElement('text', 'keyword', get_lang('Keyword'));
$form->addElement('hidden', 'cidReq', api_get_course_id());
$form->addElement('hidden', 'id_session', $session_id);
$form->addButtonSearch(get_lang('SearchUsers'), 'submit');
echo '<div class="actions">';
$form->display();
echo '</div>';
$table = new SortableTable('resources', array('TrackingCourseLog', 'count_item_resources'), array('TrackingCourseLog', 'get_item_resources_data'), 5, 20, 'DESC');
$parameters = array('id_session' => $session_id, 'cidReq' => api_get_course_id());
$table->set_additional_parameters($parameters);
$table->set_header(0, get_lang('Tool'));
$table->set_header(1, get_lang('EventType'));
$table->set_header(2, get_lang('Session'), false);
$table->set_header(3, get_lang('UserName'), true, 'width=65px');
$table->set_header(4, get_lang('IPAddress'), true, 'width=100px');
$table->set_header(5, get_lang('Document'), false);
$table->set_header(6, get_lang('Date'), true, 'width=190px');
$table->display();
Display::display_footer();
开发者ID:secuencia24,项目名称:chamilo-lms,代码行数:31,代码来源:course_log_resources.php
示例9: get_lang
}
if ($_GET['action'] == 'error_message') {
Display::display_error_message(stripslashes($_GET['message']), false);
}
}
if ($show_import_icon) {
echo "<div align=\"right\">";
echo '<a href="user_import.php?id_session=' . $id_session . '&action=export&type=xml">' . Display::return_icon('excel.gif', get_lang('ImportUserListXMLCSV')) . ' ' . get_lang('ImportUserListXMLCSV') . '</a>';
echo "</div><br />";
}
if (!api_is_drh() && !api_is_session_admin() && !api_is_platform_admin()) {
$courses = Tracking::get_courses_followed_by_coach($_user['user_id'], $id_session);
$a_courses = array_keys($courses);
}
$nb_courses = count($a_courses);
$table = new SortableTable('tracking_list_course', 'count_courses');
$table->set_header(0, get_lang('CourseTitle'), false);
$table->set_header(1, get_lang('NbStudents'), false);
$table->set_header(2, get_lang('TimeSpentInTheCourse') . Display::return_icon('info3.gif', get_lang('TimeOfActiveByTraining'), array('align' => 'absmiddle', 'hspace' => '3px')), false);
$table->set_header(3, get_lang('ThematicAdvance'), false);
$table->set_header(4, get_lang('AvgStudentsProgress') . Display::return_icon('info3.gif', get_lang('AvgAllUsersInAllCourses'), array('align' => 'absmiddle', 'hspace' => '3px')), false);
$table->set_header(5, get_lang('AvgCourseScore') . Display::return_icon('info3.gif', get_lang('AvgAllUsersInAllCourses'), array('align' => 'absmiddle', 'hspace' => '3px')), false);
//$table -> set_header(5, get_lang('AvgExercisesScore'), false);// no code for this?
$table->set_header(6, get_lang('AvgMessages'), false);
$table->set_header(7, get_lang('AvgAssignments'), false);
$table->set_header(8, get_lang('Details'), false);
$csv_header[] = array(get_lang('CourseTitle', ''), get_lang('NbStudents', ''), get_lang('TimeSpentInTheCourse', ''), get_lang('ThematicAdvance', ''), get_lang('AvgStudentsProgress', ''), get_lang('AvgCourseScore', ''), get_lang('AvgMessages', ''), get_lang('AvgAssignments', ''));
if (is_array($a_courses)) {
foreach ($a_courses as $courseId) {
$courseId = intval($courseId);
$nb_students_in_course = 0;
开发者ID:ragebat,项目名称:chamilo-lms,代码行数:31,代码来源:course.php
示例10: get_lang
$status_options[SESSIONADMIN] = get_lang('SessionsAdmin');
$status_options[PLATFORM_ADMIN] = get_lang('Administrator');
$form->addElement('select', 'keyword_status', get_lang('Profile'), $status_options);
$active_group = array();
$active_group[] = $form->createElement('checkbox', 'keyword_active', '', get_lang('Active'));
$active_group[] = $form->createElement('checkbox', 'keyword_inactive', '', get_lang('Inactive'));
$form->addGroup($active_group, '', get_lang('ActiveAccount'), '<br/>', false);
$form->addElement('checkbox', 'check_easy_passwords', null, get_lang('CheckEasyPasswords'));
$form->addButtonSearch(get_lang('SearchUsers'));
$defaults = array();
$defaults['keyword_active'] = 1;
$defaults['keyword_inactive'] = 1;
$form->setDefaults($defaults);
$form->addElement('html', '</div>');
$form = $form->returnForm();
$table = new SortableTable('users', 'get_number_of_users', 'get_user_data', (api_is_western_name_order() xor api_sort_by_first_name()) ? 3 : 2);
$table->set_additional_parameters($parameters);
$table->set_header(0, '', false, 'width="18px"');
$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"');
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:user_list.php
示例11: api_is_western_name_order
} else {
if ($export_csv) {
$is_western_name_order = api_is_western_name_order(PERSON_NAME_DATA_EXPORT);
} else {
$is_western_name_order = api_is_western_name_order();
}
$sort_by_first_name = api_sort_by_first_name();
$tracking_column = isset($_GET['tracking_list_coaches_column']) ? $_GET['tracking_list_coaches_column'] : ($is_western_name_order xor $sort_by_first_name) ? 1 : 0;
$tracking_direction = isset($_GET['tracking_list_coaches_direction']) && in_array(strtoupper($_GET['tracking_list_coaches_direction']), array('ASC', 'DESC', 'ASCENDING', 'DESCENDING', '0', '1')) ? $_GET['tracking_list_coaches_direction'] : 'DESC';
// Prepare array for column order - when impossible, use some of user names.
if ($is_western_name_order) {
$order = array(0 => 'firstname', 1 => 'lastname', 2 => $sort_by_first_name ? 'firstname' : 'lastname', 3 => 'login_date', 4 => $sort_by_first_name ? 'firstname' : 'lastname', 5 => $sort_by_first_name ? 'firstname' : 'lastname');
} else {
$order = array(0 => 'lastname', 1 => 'firstname', 2 => $sort_by_first_name ? 'firstname' : 'lastname', 3 => 'login_date', 4 => $sort_by_first_name ? 'firstname' : 'lastname', 5 => $sort_by_first_name ? 'firstname' : 'lastname');
}
$table = new SortableTable('tracking_list_coaches_myspace', 'count_coaches', null, ($is_western_name_order xor $sort_by_first_name) ? 1 : 0);
$parameters['view'] = 'admin';
$table->set_additional_parameters($parameters);
if ($is_western_name_order) {
$table->set_header(0, get_lang('FirstName'), true);
$table->set_header(1, get_lang('LastName'), true);
} else {
$table->set_header(0, get_lang('LastName'), true);
$table->set_header(1, get_lang('FirstName'), true);
}
$table->set_header(2, get_lang('TimeSpentOnThePlatform'), false);
$table->set_header(3, get_lang('LastConnexion'), false);
$table->set_header(4, get_lang('NbStudents'), false);
$table->set_header(5, get_lang('CountCours'), false);
$table->set_header(6, get_lang('NumberOfSessions'), false);
$table->set_header(7, get_lang('Sessions'), false);
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:index.php
示例12: 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 <[email protected]>, 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
示例13: api_get_cidreq
if (isset($_SESSION['gradebook'])) {
$param_gradebook = '&gradebook=' . Security::remove_XSS($_SESSION['gradebook']);
}
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) {
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:attendance_list.php
示例14: display_data
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
示例15: array
$form->display();
if ($export_csv) {
$csv_content = array();
//override the SortableTable "per page" limit if CSV
$_GET['users_tracking_per_page'] = 1000000;
}
$all_datas = array();
$course_code = $_course['id'];
$user_ids = array_keys($a_students);
$table = new SortableTable(
'users_tracking',
array('TrackingCourseLog', 'get_number_of_users'),
array('TrackingCourseLog', 'get_user_data'),
(api_is_western_name_order() xor api_sort_by_first_name()) ? 3 : 2);
$parameters['cidReq'] = Security::remove_XSS($_GET['cidReq']);
$parameters['id_session'] = $session_id;
$parameters['from'] = isset($_GET['myspace']) ? Security::remove_XSS($_GET['myspace']) : null;
$table->set_additional_parameters($parameters);
$tab_table_header = array();
// tab of header texts
$table->set_header(0, get_lang('OfficialCode'), true);
$tab_table_header[] = get_lang('OfficialCode');
if ($is_western_name_order) {
$table->set_header(1, get_lang('FirstName'), true);
$tab_table_header[] = get_lang('FirstName');
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:courseLog.php
示例16: FormValidator
$message = Display::return_message(get_lang('ClassDeleted'));
break;
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);
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:class_list.php
示例17: 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
示例18: SortableTable
}
$start_date = Database::escape_string($_POST['keyword_start_date_start']);
$end_date = Database::escape_string($_POST['keyword_start_date_end']);
if ($start_date != '' || $end_date != '') {
$sql .= " HAVING ";
if ($start_date != '')
$sql .= " access_date >= '$start_date' ";
if ($end_date != '') {
$sql = ($start_date == '') ? $sql : ($sql . " AND ");
$sql .= " access_date <= '$end_date' ";
}
}
$result = Database::query($sql);
$table_result = new SortableTable();
$table_result->set_header(0, get_lang('User'), false);
$table_result->set_header(1, get_lang('Fullname'), false);
$table_result->set_header(2, get_lang('Date'), false);
$table_result->set_header(3, get_lang('Course'), false);
$table_result->set_header(4, get_lang('Tool'), false);
while ($row = Database::fetch_assoc($result)) {
$row = array(
$row['username'],
$row['fullname'],
$row['access_date'],
$row['course'],
get_lang($tools[$row['tool']]['name'])
);
$table_result->addRow($row);
}
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:report.php
示例19: get_lang
//$form->addElement('text','label',get_lang('FieldLabel'));
//$form->addElement('text','type',get_lang('FieldType'));
//$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('F
|
请发表评论