當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Display::display_no_header方法代碼示例

本文整理匯總了PHP中Display::display_no_header方法的典型用法代碼示例。如果您正苦於以下問題:PHP Display::display_no_header方法的具體用法?PHP Display::display_no_header怎麽用?PHP Display::display_no_header使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Display的用法示例。


在下文中一共展示了Display::display_no_header方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: html_to_pdf_with_template

 /**
  * Export the given HTML to PDF, using a global template
  *
  * @uses export/table_pdf.tpl
  * @param $content
  * @param bool|false $saveToFile
  * @param bool|false $returnHtml
  *
  * @return string
  */
 public function html_to_pdf_with_template($content, $saveToFile = false, $returnHtml = false)
 {
     global $_configuration;
     Display::display_no_header();
     // Assignments
     Display::$global_template->assign('pdf_content', $content);
     $organization = api_get_setting('Institution');
     $img = api_get_path(SYS_CSS_PATH) . 'themes/' . api_get_visual_theme() . '/images/header-logo.png';
     // Search for classic logo
     if (file_exists($img)) {
         $img = api_get_path(WEB_CSS_PATH) . 'themes/' . api_get_visual_theme() . '/images/header-logo.png';
         $organization = "<img src='{$img}'>";
     } else {
         // Just use the platform title.
         if (!empty($organization)) {
             $organization = '<h2 align="left">' . $organization . '</h2>';
         }
     }
     // Use custom logo image.
     $pdfLogo = api_get_setting('pdf_logo_header');
     if ($pdfLogo === 'true') {
         $visualTheme = api_get_visual_theme();
         $img = api_get_path(SYS_CSS_PATH) . 'themes/' . $visualTheme . '/images/pdf_logo_header.png';
         if (file_exists($img)) {
             $img = api_get_path(WEB_CSS_PATH) . 'themes/' . $visualTheme . '/images/pdf_logo_header.png';
             $organization = "<img src='{$img}'>";
         }
     }
     Display::$global_template->assign('organization', $organization);
     //Showing only the current teacher/admin instead the all teacher list name see BT#4080
     if (isset($this->params['show_real_course_teachers']) && $this->params['show_real_course_teachers']) {
         if (isset($this->params['session_info']) && !empty($this->params['session_info'])) {
             $teacher_list = SessionManager::getCoachesByCourseSessionToString($this->params['session_info']['id'], $this->params['course_info']['real_id']);
         } else {
             $teacher_list = CourseManager::get_teacher_list_from_course_code_to_string($this->params['course_code']);
         }
     } else {
         $user_info = api_get_user_info();
         $teacher_list = $user_info['complete_name'];
     }
     Display::$global_template->assign('pdf_course', $this->params['course_code']);
     Display::$global_template->assign('pdf_course_info', $this->params['course_info']);
     Display::$global_template->assign('pdf_session_info', $this->params['session_info']);
     Display::$global_template->assign('pdf_date', api_format_date(api_get_local_time(), DATE_TIME_FORMAT_LONG));
     Display::$global_template->assign('pdf_teachers', $teacher_list);
     Display::$global_template->assign('pdf_title', $this->params['pdf_title']);
     Display::$global_template->assign('pdf_student_info', $this->params['student_info']);
     Display::$global_template->assign('show_grade_generated_date', $this->params['show_grade_generated_date']);
     Display::$global_template->assign('add_signatures', $this->params['add_signatures']);
     // Getting template
     $tpl = Display::$global_template->get_template('export/table_pdf.tpl');
     $html = Display::$global_template->fetch($tpl);
     $html = api_utf8_encode($html);
     $css_file = api_get_path(TO_SYS, WEB_CSS_PATH) . '/print.css';
     $css = file_exists($css_file) ? @file_get_contents($css_file) : '';
     $html = self::content_to_pdf($html, $css, $this->params['filename'], $this->params['course_code'], 'D', $saveToFile, null, $returnHtml);
     if ($returnHtml) {
         return $html;
     }
 }
開發者ID:KRCM13,項目名稱:chamilo-lms,代碼行數:70,代碼來源:pdf.lib.php

示例2: html_to_pdf_with_template

 /**
  * Export the given HTML to PDF, using a global template
  * @param string the HTML content
  * @uses export/table_pdf.tpl
  */
 function html_to_pdf_with_template($content)
 {
     Display::display_no_header();
     //Assignments
     Display::$global_template->assign('pdf_content', $content);
     $organization = api_get_setting('Institution');
     $img = api_get_path(SYS_CODE_PATH) . 'css/' . api_get_visual_theme() . '/images/header-logo.png';
     if (file_exists($img)) {
         $img = api_get_path(WEB_CODE_PATH) . 'css/' . api_get_visual_theme() . '/images/header-logo.png';
         $organization = "<img src='{$img}'>";
     } else {
         if (!empty($organization)) {
             $organization = '<h2 align="left">' . $organization . '</h2>';
         }
     }
     Display::$global_template->assign('organization', $organization);
     //Showing only the current teacher/admin instead the all teacherlist name see BT#4080
     $user_info = api_get_user_info();
     $teacher_list = $user_info['complete_name'];
     $session_name = api_get_session_name(api_get_session_id());
     if (!empty($session_name)) {
         Display::$global_template->assign('pdf_session', $session_name);
     }
     Display::$global_template->assign('pdf_course', $this->params['course_code']);
     Display::$global_template->assign('pdf_date', api_format_date(api_get_utc_datetime(), DATE_TIME_FORMAT_LONG));
     Display::$global_template->assign('pdf_teachers', $teacher_list);
     Display::$global_template->assign('pdf_title', $this->params['pdf_title']);
     Display::$global_template->assign('add_signatures', $this->params['add_signatures']);
     //Getting template
     $tpl = Display::$global_template->get_template('export/table_pdf.tpl');
     $html = Display::$global_template->fetch($tpl);
     $html = api_utf8_encode($html);
     $css_file = api_get_path(TO_SYS, WEB_CSS_PATH) . '/print.css';
     $css = file_exists($css_file) ? @file_get_contents($css_file) : '';
     self::content_to_pdf($html, $css, $this->params['filename'], $this->params['course_code']);
 }
開發者ID:ilosada,項目名稱:chamilo-lms-icpna,代碼行數:41,代碼來源:pdf.lib.php

示例3: array

                 if (!isset($user_skills[$my_skill['skill_id']])) {
                     $user_skills[$my_skill['skill_id']] = array('skill_id' => $my_skill['skill_id'], 'found' => false);
                 }
                 $total_skills_to_search[$my_skill['skill_id']] = $my_skill['skill_id'];
             }
             $user_list[$user['user_id']]['skills'] = $user_skills;
             $user_list[$user['user_id']]['total_found_skills'] = $found_counts;
         }
         foreach ($user_list as $user_id => $user_data) {
             $ordered_user_list[$user_data['total_found_skills']][] = $user_data;
         }
         if (!empty($ordered_user_list)) {
             krsort($ordered_user_list);
         }
     }
     Display::display_no_header();
     Display::$global_template->assign('order_user_list', $ordered_user_list);
     Display::$global_template->assign('total_search_skills', $count_skills);
     $skill_list = array();
     if (!empty($total_skills_to_search)) {
         $total_skills_to_search = $skill->get_skills_info($total_skills_to_search);
         foreach ($total_skills_to_search as $skill_info) {
             $skill_list[$skill_info['id']] = $skill_info;
         }
     }
     Display::$global_template->assign('skill_list', $skill_list);
     echo Display::$global_template->fetch('default/skill/profile.tpl');
     break;
 case 'delete_gradebook_from_skill':
 case 'remove_skill':
     if (api_is_platform_admin() || api_is_drh()) {
開發者ID:omaoibrahim,項目名稱:chamilo-lms,代碼行數:31,代碼來源:skill.ajax.php


注:本文中的Display::display_no_header方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。