本文整理汇总了PHP中Export::export_table_csv_utf8方法的典型用法代码示例。如果您正苦于以下问题:PHP Export::export_table_csv_utf8方法的具体用法?PHP Export::export_table_csv_utf8怎么用?PHP Export::export_table_csv_utf8使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Export
的用法示例。
在下文中一共展示了Export::export_table_csv_utf8方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
if ($is_western_name_order) {
$user_pdf = array($counter, $user_image, $user['official_code'], $user['firstname'] . ', ' . $user['lastname']);
} else {
$user_pdf = array($counter, $user_image, $user['official_code'], $user['lastname'] . ', ' . $user['firstname']);
}
$a_users[] = $user_pdf;
} else {
$a_users[] = $user;
}
$data[] = $user;
$counter++;
}
}
switch ($_GET['type']) {
case 'csv':
Export::export_table_csv_utf8($a_users);
exit;
case 'xls':
Export::export_table_xls($a_users);
exit;
case 'pdf':
$description = '<table class="data_table_no_border">';
if (api_get_session_id()) {
$description .= '<tr><td>' . get_lang('Session') . ': </td><td class="highlight">' . api_get_session_name(api_get_session_id()) . '</td>';
}
$description .= '<tr><td>' . get_lang('Course') . ': </td><td class="highlight">' . $course_info['name'] . '</td>';
$teachers = CourseManager::get_teacher_list_from_course_code($course_info['real_id']);
//If I'm a teacher in this course show just my name
if (isset($teachers[$user_id])) {
if (!empty($teachers)) {
$teacher_info = $teachers[$user_id];
示例2: get_lang
$tool_name = get_lang('ImportGlossary');
break;
case 'changeview':
$tool_name = get_lang('List');
break;
}
if (isset($_GET['action']) && $_GET['action'] == 'export') {
$data = GlossaryManager::get_glossary_data(0, GlossaryManager::get_number_glossary_terms(api_get_session_id()), 0, 'ASC');
usort($data, "sorter");
$list = array();
$list[] = array('term', 'definition');
foreach ($data as $line) {
$list[] = array($line[0], $line[1]);
}
$filename = 'glossary_course_' . api_get_course_id();
Export::export_table_csv_utf8($list, $filename);
}
if (isset($_GET['action']) && $_GET['action'] == 'export_to_pdf') {
GlossaryManager::export_to_pdf();
}
Display::display_header($tool_name);
// Tool introduction
Display::display_introduction_section(TOOL_GLOSSARY);
if (isset($_GET['action']) && $_GET['action'] == 'changeview' and in_array($_GET['view'], array('list', 'table'))) {
$_SESSION['glossary_view'] = $_GET['view'];
} else {
if (!isset($_SESSION['glossary_view'])) {
$_SESSION['glossary_view'] = 'table';
//Default option
}
}
示例3: get_lang
$urlInformation = '<p>' . get_lang('NoUrlForThisUser') . '</p>';
}
}
$message = null;
if (isset($_GET['action'])) {
switch ($_GET['action']) {
case 'unsubscribe':
if (CourseManager::get_user_in_course_status($_GET['user_id'], $_GET['course_code']) == STUDENT) {
CourseManager::unsubscribe_user($_GET['user_id'], $_GET['course_code']);
$message = Display::return_message(get_lang('UserUnsubscribed'));
} else {
$message = Display::return_message(get_lang('CannotUnsubscribeUserFromCourse'), 'error');
}
break;
case 'export':
Export::export_table_csv_utf8($csvContent, 'user_information_' . $user);
exit;
break;
}
}
Display::display_header($tool_name);
echo '<div class="actions">
<a href="' . api_get_path(WEB_CODE_PATH) . 'mySpace/myStudents.php?student=' . intval($_GET['user_id']) . '" title="' . get_lang('Reporting') . '">' . Display::return_icon('statistics.png', get_lang('Reporting'), '', ICON_SIZE_MEDIUM) . '
</a>
' . $login_as_icon . '
' . $editUser . '
' . $exportLink . '
</div>';
echo Display::page_header($tool_name);
echo '<div class="row">';
echo '<div class="span2">';