本文整理匯總了PHP中PDFStop函數的典型用法代碼示例。如果您正苦於以下問題:PHP PDFStop函數的具體用法?PHP PDFStop怎麽用?PHP PDFStop使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了PDFStop函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: ErrorMessage
function ErrorMessage($errors, $code = 'error')
{
if ($errors) {
//modif Francois: css WPadmin
if (count($errors) == 1) {
if ($code == 'error' || $code == 'fatal') {
$return .= '<div class="error"><p><IMG SRC="assets/x.png" class="alignImg"> <b>' . Localize('colon', _('Error')) . '</b> ';
} else {
$return .= '<div class="updated"><p><b>' . Localize('colon', _('Note')) . '</b> ';
}
$return .= ($errors[0] ? $errors[0] : $errors[1]) . '</p>';
} else {
if ($code == 'error' || $code == 'fatal') {
$return .= '<div class="error"><p><IMG SRC="assets/x.png" class="alignImg"> <b>' . Localize('colon', _('Errors')) . "</b></p>";
} else {
$return .= '<div class="updated"><p> <b>' . Localize('colon', _('Note')) . '</b></p>';
}
$return .= '<ul>';
foreach ($errors as $value) {
$return .= '<LI><span class="size-1">' . $value . '</span></LI>' . "\n";
}
$return .= '</ul>';
}
$return .= '</div><BR />';
if ($code == 'fatal') {
echo $return;
if (!isset($_REQUEST['_ROSARIO_PDF'])) {
Warehouse('footer');
} else {
global $print_data;
PDFStop($print_data);
}
exit;
}
return $return;
}
}
示例2: _
echo '<tr><td>' . _('Student Grade') . ':</td>';
echo '<td>' . $courses[1]['GRADE_ID'] . '</td></tr>';
if ($courses[1]['MAILING_LABEL'] != '') {
echo '<tr><td>' . _('Malling Details') . ':</td>';
echo '<td>' . $courses[1]['MAILING_LABEL'] . '</td></tr>';
}
echo '</table>';
//echo '<div style="font-size:18px; font-weight:bold; ">'.Config('TITLE').' Student Schedule</div><div style="height:20px;"></div>';
//echo '<div>'.$courses[1]['FULL_NAME'].' - #'.$courses[1]['STUDENT_ID']. '</div>';
//echo '<div>'.$courses[1]['GRADE_ID'].' Grade</div>';
//echo '<div>'.ProperDate($date),$_REQUEST['mp_id']?GetMP($_REQUEST['mp_id']):''.'</div>';
ListOutputPrint($courses, $columns, '' . _('Course') . '', '' . _('Courses') . '', array(), array(), array('center' => false, 'print' => false));
echo '<div style="page-break-before: always;"> </div><!-- NEW PAGE -->';
}
}
PDFStop($handle);
} else {
BackPrompt(_('No Students were found.'));
}
} else {
BackPrompt(_('You must choose at least one student.'));
}
}
if (!$_REQUEST['modfunc']) {
DrawBC("" . _('Scheduling') . " >> " . ProgramTitle());
if ($_REQUEST['search_modfunc'] == 'list') {
$mp_RET = DBGet(DBQuery('SELECT MARKING_PERIOD_ID,TITLE,SORT_ORDER,1 AS TBL FROM school_years WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' UNION SELECT MARKING_PERIOD_ID,TITLE,SORT_ORDER,2 AS TBL FROM school_semesters WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' UNION SELECT MARKING_PERIOD_ID,TITLE,SORT_ORDER,3 AS TBL FROM school_quarters WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY TBL,SORT_ORDER'));
$mp_select = '<SELECT name=mp_id><OPTION value="">' . _('N/A') . '';
foreach ($mp_RET as $mp) {
$mp_select .= '<OPTION value=' . $mp['MARKING_PERIOD_ID'] . '>' . $mp['TITLE'];
}
示例3: DBGet
<?php
$sql = "SELECT a.attnum,a.attname AS field,t.typname AS type,\n\t\t\t\t\ta.attlen AS length,a.atttypmod AS lengthvar,\n\t\t\t\t\ta.attnotnull AS notnull,c.relname\n\t\t\t\tFROM pg_class c, pg_attribute a, pg_type t \n\t\t\t\tWHERE\n\t\t\t\t\ta.attnum > 0 and a.attrelid = c.oid \n\t\t\t\t\tand c.relkind='r' and c.relname not like 'pg\\_%' and a.attname not like '...%'\n\t\t\t\t\tand a.atttypid = t.oid ORDER BY c.relname";
$RET = DBGet(DBQuery($sql), array(), array('RELNAME'));
$PDF = PDFStart();
echo '<TABLE>';
foreach ($RET as $table => $columns) {
if ($i % 2 == 0) {
echo '<TR><TD valign=top>';
}
echo '<b>' . $table . '</b>';
echo '<TABLE>';
foreach ($columns as $column) {
echo '<TR><TD width=15> </TD><TD>' . $column['FIELD'] . '</TD><TD>' . $column['TYPE'] . '</TD></TR>';
}
echo '</TABLE>';
if ($i % 2 == 0) {
echo '</TD><TD valign=top>';
} else {
echo '</TD></TR>';
}
$i++;
}
echo '</TABLE>';
PDFStop($PDF);
示例4: PDFStart
include '../../Redirect_modules.php';
if ($_REQUEST['create_pdf'] == 'true') {
$handle = PDFStart();
echo '<!-- MEDIA SIZE 11x8.5in -->';
echo '<!-- MEDIA TOP 0.5in -->';
echo '<!-- MEDIA BOTTOM 0.25in -->';
echo '<!-- MEDIA LEFT 0.25in -->';
echo '<!-- MEDIA RIGHT 0.25in -->';
echo '<!-- FOOTER RIGHT "" -->';
echo '<!-- FOOTER LEFT "" -->';
echo '<!-- FOOTER CENTER "" -->';
echo '<!-- HEADER RIGHT "" -->';
echo '<!-- HEADER LEFT "" -->';
echo '<!-- HEADER CENTER "" -->';
echo CreateList($_REQUEST['degree_level_id'], $_REQUEST['prog_level_id'], $_REQUEST['subject_id'], $_REQUEST['course_id'], $_REQUEST['marking_period_id'], $_REQUEST['mp_name']);
PDFStop($handle, 'sis.pdf');
exit;
}
if (clean_param($_REQUEST['create_excel'], PARAM_ALPHAMOD) == 'true') {
echo CreateExcel($_REQUEST['degree_level_id'], $_REQUEST['prog_level_id'], $_REQUEST['subject_id'], $_REQUEST['course_id'], $_REQUEST['marking_period_id'], $_REQUEST['mp_name']);
}
if (clean_param($_REQUEST['modfunc'], PARAM_ALPHAMOD) == 'choose_course') {
DrawBC("Courses -> " . $_REQUEST['draw_header']);
$sql = "SELECT PARENT_ID,TITLE,SHORT_NAME,PERIOD_ID,DAYS,\r\n MP,MARKING_PERIOD_ID,TEACHER_ID,CALENDAR_ID,\r\n ROOM,TOTAL_SEATS,DOES_ATTENDANCE,\r\n GRADE_SCALE_ID,DOES_HONOR_ROLL,DOES_CLASS_RANK,\r\n GENDER_RESTRICTION,HOUSE_RESTRICTION,CREDITS,\r\n HALF_DAY,DOES_BREAKOFF\r\n FROM COURSE_PERIODS\r\n WHERE COURSE_PERIOD_ID='{$_REQUEST['course_period_id']}'";
$QI = DBQuery($sql);
$RET = DBGet($QI);
$RET = $RET[1];
$title = $RET['TITLE'] . " , <b>Course:</b> " . $C_RET[1]['TITLE'] . ", <b>Number of Credits:</b> " . $C_RET[1]['NUMBER_OF_CREDITS'];
$new = false;
//print_r($RET);
if (count($RET)) {
示例5: mb_substr
//modif Francois: replaced ? with & in modname
/*if(mb_strpos($_REQUEST['modname'],'?')!==false)
$modname = mb_substr($_REQUEST['modname'],0,mb_strpos($_REQUEST['modname'],'?'));
else*/
$modname = $_REQUEST['modname'];
if (!$wkhtmltopdfPath) {
$_ROSARIO['allow_edit'] = false;
}
//modif Francois: security fix, cf http://www.securiteam.com/securitynews/6S02U1P6BI.html
if (mb_substr($modname, -4, 4) != '.php' || mb_strpos($modname, '..') !== false || !is_file('modules/' . $modname)) {
HackingLog();
} else {
include 'modules/' . $modname;
}
//modif Francois: call PDFStop to generate Print PDF
PDFStop($print_data);
} else {
//modif Francois: fix bug Internet Explorer Quirks Mode, add DOCTYPE
?>
<!DOCTYPE html>
<HTML lang="<?php
echo mb_substr($locale, 0, 2);
?>
" <?php
echo mb_substr($locale, 0, 2) == 'he' || mb_substr($locale, 0, 2) == 'ar' ? ' dir="RTL"' : '';
?>
>
<HEAD><TITLE><?php
echo ParseMLField(Config('TITLE'));
?>
</TITLE>