本文整理汇总了PHP中ProgramTitle函数的典型用法代码示例。如果您正苦于以下问题:PHP ProgramTitle函数的具体用法?PHP ProgramTitle怎么用?PHP ProgramTitle使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ProgramTitle函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PDFStop
function PDFStop($handle)
{
global $htmldocPath, $htmldocAssetsPath;
unset($_SESSION['orientation']);
if ($htmldocPath) {
if ($htmldocAssetsPath) {
$html = str_replace('assets/', $htmldocAssetsPath, ob_get_contents());
} else {
$html = ob_get_contents();
}
ob_end_clean();
// Gen temp file and save contents
$temphtml = tempnam('', 'html');
$temphtml_tmp = substr($temphtml, 0, strrpos($temphtml, '.')) . 'html';
rename($temphtml_tmp, $temphtml);
$fp = @fopen($temphtml, "w+");
if (!$fp) {
die("Can't open {$temphtml}");
}
fputs($fp, '<HTML><HEAD><TITLE></TITLE></HEAD><BODY>' . $html . '</BODY></HTML>');
@fclose($fp);
header("Cache-Control: public");
header("Pragma: ");
header("Content-Type: application/pdf");
header("Content-Disposition: inline; filename=\"" . str_replace('Print ', '', ProgramTitle()) . ".pdf\"\n");
passthru("{$htmldocPath} {$handle['options']} \"{$temphtml}\"");
@unlink($temphtml);
} else {
$html = ob_get_contents();
ob_end_clean();
echo '<HTML><HEAD><TITLE></TITLE></HEAD><BODY>' . $html . '</BODY></HTML>';
}
}
示例2: PDFStop
function PDFStop($handle)
{
global $OutputType, $htmldocAssetsPath;
if ($OutputType == "PDF") {
$html = ob_get_contents();
ob_end_clean();
$html = '<HTML><BODY>' . $html . '</BODY></HTML>';
require_once "dompdf/dompdf_config.inc.php";
//require_once("convertcharset/ConvertCharset.class.php");
//$html = $convertcharset->Convert($html, 'utf-8', 'iso-8859-1');
/*
$fp = @fopen($temphtml,"w");
if (!$fp)
die("Can't open $temphtml");
fputs($fp, $html);
@fclose($fp);
*/
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream(ProgramTitle() . ".pdf", array("Attachment" => 0));
//header("Location:dompdf/dompdf.php?input_file=tmp/sis.htm&output_file=sample.pdf");
} else {
$html = ob_get_contents();
ob_end_clean();
$html = '<HTML><BODY>' . $html . '</BODY></HTML>';
echo $html;
}
}
示例3: PDFStop
function PDFStop($handle)
{
global $OutputType, $htmldocAssetsPath;
if ($OutputType == "PDF") {
$html = ob_get_contents();
ob_end_clean();
$html = '<HTML><BODY>' . $html . '</BODY></HTML>';
require_once "dompdf/dompdf_config.inc.php";
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream(ProgramTitle() . ".pdf", array("Attachment" => 0));
} else {
$html = ob_get_contents();
ob_end_clean();
$html = '<HTML><BODY>' . $html . '</BODY></HTML>';
echo $html;
}
}
示例4: PDFStop
function PDFStop($handle)
{
//global $htmldocPath,$htmldocAssetsPath;
global $wkhtmltopdfPath, $wkhtmltopdfAssetsPath, $locale;
$handle['orientation'] = $_SESSION['orientation'];
unset($_SESSION['orientation']);
$html_content = ob_get_clean();
//convert to HTML page with CSS
$html = '<!DOCTYPE html><HTML lang="' . mb_substr($locale, 0, 2) . '" ' . (mb_substr($locale, 0, 2) == 'he' || mb_substr($locale, 0, 2) == 'ar' ? ' dir="RTL"' : '') . '><HEAD><meta charset="UTF-8" />';
if ($handle['css']) {
$html .= '<link rel="stylesheet" type="text/css" href="assets/themes/' . Preferences('THEME') . '/stylesheet.css" />';
}
//modif Francois: bugfix wkhtmltopdf screen resolution on linux
//see: https://code.google.com/p/wkhtmltopdf/issues/detail?id=118
$html .= '<TITLE>' . str_replace(_('Print') . ' ', '', ProgramTitle()) . '</TITLE></HEAD><BODY><div style="width:' . (!empty($handle['orientation']) && $handle['orientation'] == 'landscape' ? '1448' : '1024') . 'px">' . $html_content . '</div></BODY></HTML>';
//modif Francois: wkhtmltopdf
if (!empty($wkhtmltopdfPath)) {
if (!empty($wkhtmltopdfAssetsPath)) {
$html = str_replace('assets/', $wkhtmltopdfAssetsPath, $html);
}
require 'classes/Wkhtmltopdf.php';
try {
//indicate to create PDF in the temporary files system directory
$wkhtmltopdf = new Wkhtmltopdf(array('path' => sys_get_temp_dir()));
$wkhtmltopdf->setBinPath($wkhtmltopdfPath);
if (!empty($handle['orientation']) && $handle['orientation'] == 'landscape') {
$wkhtmltopdf->setOrientation(Wkhtmltopdf::ORIENTATION_LANDSCAPE);
}
if (!empty($handle['margins']) && is_array($handle['margins'])) {
$wkhtmltopdf->setMargins($handle['margins']);
}
$wkhtmltopdf->setTitle(utf8_decode(str_replace(_('Print') . ' ', '', ProgramTitle())));
//directly pass HTML code
$wkhtmltopdf->setHtml($html);
//MODE_EMBEDDED displays PDF in browser, MODE_DOWNLOAD forces PDF download
$wkhtmltopdf->output(Wkhtmltopdf::MODE_EMBEDDED, str_replace(array(_('Print') . ' ', ' '), array('', '_'), utf8_decode(ProgramTitle())) . '.pdf');
} catch (Exception $e) {
echo $e->getMessage();
}
} else {
echo $html;
}
}
示例5: DrawBC
<?php
include '../../Redirect_modules.php';
DrawBC(_('School Setup') . " >> " . ProgramTitle());
if ($_REQUEST['page_display']) {
echo '<style type="text/css">
.back_preference { padding:2px 0px 10px 8px; text-align:left; margin:5px 5px; }
</style>';
echo "<div class=back_preference><a href=Modules.php?modname={$_REQUEST['modname']}><strong>«" . _('Back to System Preference') . "</strong>\n</a></div><br/>";
}
if (clean_param($_REQUEST['page_display'], PARAM_ALPHAMOD) == 'system_preference') {
if (clean_param($_REQUEST['action'], PARAM_ALPHAMOD) == 'update' && clean_param($_REQUEST['button'], PARAM_ALPHAMOD) == _('Save') && clean_param($_REQUEST['values'], PARAM_NOTAGS) && $_POST['values'] && User('PROFILE') == 'admin') {
$sql = 'UPDATE system_preference SET ';
foreach ($_REQUEST['values'] as $column => $value) {
$value = paramlib_validation($column, $value);
$sql .= $column . '=\'' . str_replace("\\'", "''", $value) . '\',';
}
$sql = substr($sql, 0, -1) . ' WHERE SCHOOL_ID=\'' . UserSchool() . '\'';
DBQuery($sql);
} elseif (clean_param($_REQUEST['action'], PARAM_ALPHAMOD) == 'insert' && clean_param($_REQUEST['button'], PARAM_ALPHAMOD) == 'Save' && clean_param($_REQUEST['values'], PARAM_NOTAGS) && $_POST['values'] && User('PROFILE') == 'admin') {
$sql = 'INSERT INTO system_preference SET ';
foreach ($_REQUEST['values'] as $column => $value) {
$value = paramlib_validation($column, $value);
$sql .= $column . '=\'' . str_replace("\\'", "''", $value) . '\',';
}
$sql = substr($sql, 0, -1) . ',school_id=\'' . UserSchool() . '\'';
DBQuery($sql);
}
$sys_pref = DBGet(DBQuery('SELECT * FROM system_preference WHERE SCHOOL_ID=' . UserSchool()));
$sys_pref = $sys_pref[1];
PopTable('header', _('Half-day and full-day minutes'));
示例6: db_show_error
function db_show_error($sql, $failnote, $additional = '')
{
global $openSISTitle, $openSISVersion, $openSISNotifyAddress;
PopTable('header', 'Error');
$tb = debug_backtrace();
$error = $tb[1]['file'] . " at " . $tb[1]['line'];
echo "\r\n\t\t<TABLE CELLSPACING=10 BORDER=0>\r\n\t\t\t<TD align=right><b>Date:</TD>\r\n\t\t\t<TD><pre>" . date("m/d/Y h:i:s") . "</pre></TD>\r\n\t\t</TR><TR>\r\n\t\t\t<TD align=right><b>Failure Notice:</b></TD>\r\n\t\t\t<TD><pre> {$failnote} </pre></TD>\r\n\t\t</TR><TR>\r\n\t\t\t<TD align=right><b>SQL:</b></TD>\r\n\t\t\t<TD>{$sql}</TD>\r\n\t\t</TR>\r\n\t\t</TR><TR>\r\n\t\t\t<TD align=right><b>Traceback:</b></TD>\r\n\t\t\t<TD>{$error}</TD>\r\n\t\t</TR>\r\n\t\t</TR><TR>\r\n\t\t\t<TD align=right><b>Additional Information:</b></TD>\r\n\t\t\t<TD>{$additional}</TD>\r\n\t\t</TR>\r\n\t\t</TABLE>";
/*echo "
<TABLE CELLSPACING=10 BORDER=0>
<TR><TD align=right><b>Date:</TD>
<TD><pre>".date("m/d/Y h:i:s")."</pre></TD>
</TR><TR>
<TD align=right></TD>
<TD>openSIS has encountered an error that could have resulted from any of the following:
<br/>
<ul>
<li>Invalid data input</li>
<li>Database SQL error</li>
<li>Program error</li>
</ul>
Please take this screen shot and send it to your openSIS representative for debugging and resolution.
</TD>
</TR>
</TABLE>";*/
//Something you have asked the system to do has thrown a database error. A system administrator has been notified, and the problem will be fixed as soon as possible. It might be that changing the input parameters sent to this program will cause it to run properly. Thanks for your patience.
PopTable('footer');
echo "<!-- SQL STATEMENT: \n\n {$sql} \n\n -->";
/*if(false && function_exists('mysql_query'))
{
$link = @mysql_connect('os4ed.com','openSIS_log','openSIS_log');
@mysql_select_db('openSIS_log');
@mysql_query("INSERT INTO SQL_ERROR_LOG (HOST_NAME,IP_ADDRESS,LOGIN_DATE,VERSION,PHP_SELF,DOCUMENT_ROOT,SCRIPT_NAME,MODNAME,USERNAME,SQL,REQUEST) values('$_SERVER[SERVER_NAME]','$_SERVER[SERVER_ADDR]','".date('Y-m-d')."','$openSISVersion','$_SERVER[PHP_SELF]','$_SERVER[DOCUMENT_ROOT]','$_SERVER[SCRIPT_NAME]','$_REQUEST[modname]','".User('USERNAME')."','$sql','".ShowVar($_REQUEST,'Y', 'N')."')");
@mysql_close($link);
}*/
if ($openSISNotifyAddress) {
$message = "System: {$openSISTitle} \n";
$message .= "Date: " . date("m/d/Y h:i:s") . "\n";
$message .= "Page: " . $_SERVER['PHP_SELF'] . ' ' . ProgramTitle() . " \n\n";
$message .= "Failure Notice: {$failnote} \n";
$message .= "Additional Info: {$additional} \n";
$message .= "\n {$sql} \n";
$message .= "Request Array: \n" . ShowVar($_REQUEST, 'Y', 'N');
$message .= "\n\nSession Array: \n" . ShowVar($_SESSION, 'Y', 'N');
mail($openSISNotifyAddress, 'openSIS Database Error', $message);
}
die;
}
示例7: ListOutputPrint
//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'];
}
$mp_select .= '</SELECT>';
echo "<meta charset='UTF-8'><FORM name=sch id=sch action=for_export.php?modname={$_REQUEST['modname']}&head_html=Student+Schedules+Report&modfunc=save&include_inactive={$_REQUEST['include_inactive']}&_openSIS_PDF=true method=POST target=_blank>";
#$extra['header_right'] = '<INPUT type=submit value=\'Create Schedules for Selected Students\'>';
PopTable_wo_header('header');
$extra['extra_header_left'] = '<TABLE>';
$extra['extra_header_left'] .= '<TR><TD align=right width=120>' . _('Marking Period') . '</TD><TD>' . $mp_select . '</TD></TR>';
$extra['extra_header_left'] .= '<TR><TD align=right width=120>' . _('Include only courses active as of') . '</TD><TD>' . PrepareDate('', '_include_active_date') . '</TD></TR>';
Widgets('mailing_labels', true);
$extra['extra_header_left'] .= $extra['search'];
示例8: DrawBC
#
# This program is released under the terms of the GNU General Public License as
# published by the Free Software Foundation, version 2 of the License.
# See license.txt.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#***************************************************************************************
include '../../Redirect_modules.php';
DrawBC("Gradebook > " . ProgramTitle());
if (!$_REQUEST['mp']) {
$_REQUEST['mp'] = UserMP();
}
$sem = GetParentMP('SEM', UserMP());
echo "<FORM action=Modules.php?modname={$_REQUEST['modname']} method=POST>";
$mp_select = "<SELECT name=mp onchange='document.forms[0].submit();'><OPTION value=" . UserMP() . ">" . GetMP(UserMP()) . "</OPTION><OPTION value=" . $sem . ($sem == $_REQUEST['mp'] ? ' SELECTED' : '') . ">" . GetMP($sem) . "</OPTION><OPTION value=E" . $sem . ('E' . $sem == $_REQUEST['mp'] ? ' SELECTED' : '') . ">" . GetMP($sem) . ' Exam</OPTION></SELECT>';
DrawHeaderHome($mp_select);
echo '</FORM>';
$sql = "SELECT CONCAT(s.LAST_NAME,', ',s.FIRST_NAME) as FULL_NAME,s.STAFF_ID,g.REPORT_CARD_GRADE_ID FROM STUDENT_REPORT_CARD_GRADES g,STAFF s,COURSE_PERIODS cp WHERE g.COURSE_PERIOD_ID=cp.COURSE_PERIOD_ID AND cp.TEACHER_ID=s.STAFF_ID AND cp.SYEAR=s.SYEAR AND cp.SYEAR=g.SYEAR AND cp.SYEAR='" . UserSyear() . "' AND g.MARKING_PERIOD_ID='" . $_REQUEST['mp'] . "'";
$grouped_RET = DBGet(DBQuery($sql), array(), array('STAFF_ID', 'REPORT_CARD_GRADE_ID'));
$grades_RET = DBGet(DBQuery("SELECT rg.ID,rg.TITLE FROM REPORT_CARD_GRADES rg,REPORT_CARD_GRADE_SCALES rs WHERE rg.SCHOOL_ID='" . UserSchool() . "' AND rg.SYEAR='" . UserSyear() . "' AND rs.ID=rg.GRADE_SCALE_ID ORDER BY rs.SORT_ORDER,rs.ID,rg.BREAK_OFF IS NOT NULL DESC,rg.BREAK_OFF DESC,rg.SORT_ORDER"));
if (count($grouped_RET)) {
foreach ($grouped_RET as $staff_id => $grades) {
$i++;
$teachers_RET[$i]['FULL_NAME'] = $grades[key($grades)][1]['FULL_NAME'];
示例9: array
$columns = array();
$extra['SELECT'] .= ',NULL AS STATE_VALUE,NULL AS PHONE';
$extra['functions']['PHONE'] = '_makePhone';
$extra['functions']['STATE_VALUE'] = '_makeStateValue';
$extra['columns_before']['PHONE'] = '' . _('Contact') . '';
$extra['columns_after']['STATE_VALUE'] = '' . _('Present') . '';
$extra['BackPrompt'] = false;
$extra['Redirect'] = false;
$extra['new'] = true;
foreach ($periods_RET as $period) {
$extra['SELECT'] .= ',\'' . '' . '\' AS PERIOD_' . $period['PERIOD_ID'];
$extra['functions']['PERIOD_' . $period['PERIOD_ID']] = '_makeCodePulldown';
$extra['columns_after']['PERIOD_' . $period['PERIOD_ID']] = $period['SHORT_NAME'];
}
echo "<FORM action=Modules.php?modname={$_REQUEST['modname']} method=POST>";
DrawHeader(ProgramTitle(), '<INPUT type=submit value=' . _('Update') . '>');
if ($REQ_codes) {
foreach ($REQ_codes as $code) {
$code_pulldowns .= _makeCodeSearch($code);
}
} elseif ($abs) {
$code_pulldowns = _makeCodeSearch('A');
} else {
$code_pulldowns = _makeCodeSearch();
}
if (UserStudentID()) {
$current_student_link = "<A HREF=Modules.php?modname={$_REQUEST['modname']}&modfunc=student&month_date={$_REQUEST['month_date']}&day_date={$_REQUEST['day_date']}&year_date={$_REQUEST['year_date']}&student_id=" . UserStudentID() . ">Current Student</A></TD><TD>";
}
DrawHeader(PrepareDate($date, '_date'), '<TABLE><TR><TD>' . $current_student_link . button('add', '', "# onclick='javascript:addHTML(\"" . str_replace('"', '\\"', _makeCodeSearch()) . "\",\"code_pulldowns\"); return false;'") . '</TD><TD><DIV id=code_pulldowns>' . $code_pulldowns . '</DIV></TD></TR></TABLE>');
$_REQUEST['search_modfunc'] = 'list';
Search('student_id', $extra);
示例10: PDFStop
}
}
}
PDFStop($handle);
} else {
BackPrompt('No Students were found.');
}
} else {
BackPrompt('You must choose at least one student.');
}
unset($_SESSION['student_id']);
//echo '<pre>'; var_dump($_REQUEST['modfunc']); echo '</pre>';
$_REQUEST['modfunc'] = true;
}
if (!$_REQUEST['modfunc']) {
DrawBC("Students >> " . ProgramTitle());
if ($_REQUEST['search_modfunc'] == 'list') {
echo "<FORM action=for_export.php?modname={$_REQUEST['modname']}&modfunc=save&include_inactive={$_REQUEST['include_inactive']}&_search_all_schools={$_REQUEST['_search_all_schools']}&_openSIS_PDF=true method=POST target=_blank>";
//$extra['header_right'] = '<INPUT type=submit value=\'Print Info for Selected Students\'>';
$extra['extra_header_left'] = '<TABLE>';
//Widgets('mailing_labels',true);
$extra['extra_header_left'] .= $extra['search'];
$extra['search'] = '';
$extra['extra_header_left'] .= '';
if (User('PROFILE_ID')) {
$can_use_RET = DBGet(DBQuery("SELECT MODNAME FROM PROFILE_EXCEPTIONS WHERE PROFILE_ID='" . User('PROFILE_ID') . "' AND CAN_USE='Y'"), array(), array('MODNAME'));
} else {
$can_use_RET = DBGet(DBQuery("SELECT MODNAME FROM STAFF_EXCEPTIONS WHERE USER_ID='" . User('STAFF_ID') . "' AND CAN_USE='Y'"), array(), array('MODNAME'));
}
$categories_RET = DBGet(DBQuery("SELECT ID,TITLE,INCLUDE FROM STUDENT_FIELD_CATEGORIES ORDER BY SORT_ORDER,TITLE"));
$extra['extra_header_left'] .= '';
示例11: Preferences
$tabcolor_s = '#DFDFDF';
$textcolor_s = '#999999';
$tabcolor_u = Preferences('HEADER');
$textcolor_u = '#FFFFFF';
} else {
$tabcolor_s = Preferences('HEADER');
$textcolor_s = '#FFFFFF';
$tabcolor_u = '#DFDFDF';
$textcolor_u = '#999999';
}
$header = '<TABLE class="cellpadding-0 cellspacing-0" style="height:14px;"><TR>';
//modif Francois: remove DrawTab params
$header .= '<TD style="width:10px;"></TD><TD>' . DrawTab(_('Students'), "Modules.php?modname={$_REQUEST['modname']}&day_date={$_REQUEST['day_date']}&month_date={$_REQUEST['month_date']}&year_date={$_REQUEST['year_date']}&type=student") . '</TD>';
$header .= '<TD style="width:10px;"></TD><TD>' . DrawTab(_('Users'), "Modules.php?modname={$_REQUEST['modname']}&day_date={$_REQUEST['day_date']}&month_date={$_REQUEST['month_date']}&year_date={$_REQUEST['year_date']}&type=staff") . '</TD>';
$header .= '<TD style="width:10px;"></TD></TR></TABLE>';
DrawHeader(($_SESSION['FSA_type'] == 'staff' ? _('User') : _('Student')) . ' ' . ProgramTitle(), User('PROFILE') == 'student' ? '' : '<TABLE style="background-color:#ffffff;"><TR><TD>' . $header . '</TD></TR></TABLE>');
if ($_REQUEST['search_modfunc'] == 'list') {
$PHP_tmp_SELF = PreparePHP_SELF();
echo '<FORM action="' . $PHP_tmp_SELF . '" method="POST">';
DrawHeader(PrepareDate($date, '_date') . ' : <INPUT type=submit value=' . _('Go') . '>');
echo '</FORM>';
include 'modules/Food_Service/' . ($_REQUEST['type'] == 'staff' ? 'Users' : 'Students') . '/BalanceReport.php';
}
$extra['new'] = true;
$extra['force_search'] = true;
$extra['SELECT'] = ",fsa.ACCOUNT_ID,fst.BALANCE";
//$extra['SELECT'] .= ",(SELECT BALANCE FROM FOOD_SERVICE_TRANSACTIONS WHERE ACCOUNT_ID=fsa.ACCOUNT_ID AND TIMESTAMP<date '".$date."'+1 ORDER BY TIMESTAMP DESC LIMIT 1) AS BALANCE";
$extra['FROM'] = ",FOOD_SERVICE_STUDENT_ACCOUNTS fsa,FOOD_SERVICE_TRANSACTIONS fst";
$extra['WHERE'] = " AND fsa.STUDENT_ID=ssm.STUDENT_ID AND fst.ACCOUNT_ID=fsa.ACCOUNT_ID AND fst.BALANCE>'0' AND fst.TRANSACTION_ID=(SELECT TRANSACTION_ID FROM FOOD_SERVICE_TRANSACTIONS WHERE ACCOUNT_ID=fsa.ACCOUNT_ID AND TIMESTAMP<date '" . $date . "'+1 ORDER BY TIMESTAMP DESC LIMIT 1)";
$extra['functions'] = array('ACCOUNT_ID' => '_total');
$extra['columns_before'] = array('ACCOUNT_ID' => _('Account ID'));
示例12: db_show_error
function db_show_error($sql, $failnote, $additional = '')
{
global $openSISTitle, $openSISVersion, $openSISNotifyAddress, $openSISMode;
$tb = debug_backtrace();
$error = $tb[1]['file'] . " at " . $tb[1]['line'];
echo "\n <TABLE CELLSPACING=10 BORDER=0>\n <TD align=right><b>Date:</TD>\n <TD><pre>" . date("m/d/Y h:i:s") . "</pre></TD>\n </TR><TR>\n <TD align=right><b>Failure Notice:</b></TD>\n <TD><pre> {$failnote} </pre></TD>\n </TR><TR>\n <TD align=right><b>SQL:</b></TD>\n <TD>{$sql}</TD>\n </TR>\n </TR><TR>\n <TD align=right><b>Traceback:</b></TD>\n <TD>{$error}</TD>\n </TR>\n </TR><TR>\n <TD align=right><b>Additional Information:</b></TD>\n <TD>{$additional}</TD>\n </TR>\n </TABLE>";
echo "\n\t\t<TABLE CELLSPACING=10 BORDER=0>\n\t\t\t<TR><TD align=right><b>Date:</TD>\n\t\t\t<TD><pre>" . date("m/d/Y h:i:s") . "</pre></TD>\n\t\t</TR><TR>\n\t\t\t<TD align=right></TD>\n\t\t\t<TD>openSIS has encountered an error that could have resulted from any of the following:\n\t\t\t<br/>\n\t\t\t<ul>\n\t\t\t<li>Invalid data input</li>\n\t\t\t<li>Database SQL error</li>\n\t\t\t<li>Program error</li>\n\t\t\t</ul>\n\t\t\t\n\t\t\tPlease take this screen shot and send it to your openSIS representative for debugging and resolution.\n\t\t\t</TD>\n\t\t</TR>\n\t\t\n\t\t</TABLE>";
echo "<!-- SQL STATEMENT: \n\n {$sql} \n\n -->";
if ($openSISNotifyAddress) {
$message = "System: {$openSISTitle} \n";
$message .= "Date: " . date("m/d/Y h:i:s") . "\n";
$message .= "Page: " . $_SERVER['PHP_SELF'] . ' ' . ProgramTitle() . " \n\n";
$message .= "Failure Notice: {$failnote} \n";
$message .= "Additional Info: {$additional} \n";
$message .= "\n {$sql} \n";
$message .= "Request Array: \n" . ShowVar($_REQUEST, 'Y', 'N');
$message .= "\n\nSession Array: \n" . ShowVar($_SESSION, 'Y', 'N');
mail($openSISNotifyAddress, 'openSIS Database Error', $message);
}
die;
}
示例13: DrawBC
#
# This program is released under the terms of the GNU General Public License as
# published by the Free Software Foundation, version 2 of the License.
# See license.txt.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#***************************************************************************************
include '../../Redirect_modules.php';
DrawBC("Tools >> " . ProgramTitle());
if (isset($_REQUEST['del'])) {
if ($_REQUEST['day_start'] && $_REQUEST['month_start'] && $_REQUEST['year_start']) {
$start_date = $_REQUEST['day_start'] . '-' . $_REQUEST['month_start'] . '-' . substr($_REQUEST['year_start'], 2, 4);
$org_start_date = $_REQUEST['day_start'] . '-' . $_REQUEST['month_start'] . '-' . $_REQUEST['year_start'];
$conv_st_date = con_date($org_start_date);
}
if ($_REQUEST['day_end'] && $_REQUEST['month_end'] && $_REQUEST['year_end']) {
$end_date = $_REQUEST['day_end'] . '-' . $_REQUEST['month_end'] . '-' . substr($_REQUEST['year_end'], 2, 4);
$org_end_date = $_REQUEST['day_end'] . '-' . $_REQUEST['month_end'] . '-' . $_REQUEST['year_end'];
$conv_end_date = con_date_end($org_end_date);
}
# ------------------------------- Deletion Of Log Records ----------------------------- #
if (isset($conv_st_date) && isset($conv_end_date)) {
$sql_del = DBQuery('DELETE FROM login_records WHERE LOGIN_TIME >=\'' . $conv_st_date . '\' AND LOGIN_TIME <=\'' . $conv_end_date . '\'');
echo '<center><font color="red"><b>Log deleted successfully</b></font></center>';
示例14: Preferences
$textcolor_s = '#999999';
$tabcolor_u = Preferences('HEADER');
$textcolor_u = '#FFFFFF';
} else {
$tabcolor_s = Preferences('HEADER');
$textcolor_s = '#FFFFFF';
$tabcolor_u = '#DFDFDF';
$textcolor_u = '#999999';
}
//$header = '<TABLE border=0 cellpadding=0 cellspacing=0 height=14><TR>';
//$header .= '<TD width=10></TD><TD>'.DrawTab('Students',"Modules.php?modname=$_REQUEST[modname]&day_start=$_REQUEST[day_start]&month_start=$_REQUEST[month_start]&year_start=$_REQUEST[year_start]&day_end=$_REQUEST[day_end]&month_end=$_REQUEST[month_end]&year_end=$_REQUEST[year_end]&type=student",$tabcolor_s,$textcolor_s,'_circle',array('tabcolor'=>Preferences('HEADER'),'textcolor'=>'#FFFFFF')).'</TD>';
//$header .= '<TD width=10></TD><TD>'.DrawTab('Users', "Modules.php?modname=$_REQUEST[modname]&day_start=$_REQUEST[day_start]&month_start=$_REQUEST[month_start]&year_start=$_REQUEST[year_start]&day_end=$_REQUEST[day_end]&month_end=$_REQUEST[month_end]&year_end=$_REQUEST[year_end]&type=staff", $tabcolor_u,$textcolor_u,'_circle',array('tabcolor'=>Preferences('HEADER'),'textcolor'=>'#FFFFFF')).'</TD>';
//$header .= '<TD width=10></TD></TR></TABLE>';
//$header = "";
//DrawHeader(($_REQUEST['type']=='staff'?'User ':'Student ').ProgramTitle(),'<TABLE bgcolor=#ffffff><TR><TD>'.$header.'</TD></TR></TABLE>');
DrawBC("Food Service >> " . ProgramTitle());
if ($_REQUEST['modfunc'] == 'delete') {
require_once 'modules/Food_Service/includes/DeletePromptX.fnc.php';
if ($_REQUEST['item_id'] != '') {
if (DeletePromptX('transaction item')) {
require_once 'modules/Food_Service/includes/DeleteTransactionItem.fnc.php';
DeleteTransactionItem($_REQUEST['transaction_id'], $_REQUEST['item_id'], $_REQUEST['type']);
unset($_REQUEST['modfunc']);
unset($_REQUEST['delete_ok']);
unset($_SESSION['_REQUEST_vars']['modfunc']);
unset($_SESSION['_REQUEST_vars']['delete_ok']);
}
} else {
if (DeletePromptX('transaction')) {
require_once 'modules/Food_Service/includes/DeleteTransaction.fnc.php';
DeleteTransaction($_REQUEST['transaction_id'], $_REQUEST['type']);
示例15: DBGet
$program_config = DBGet(DBQuery("SELECT * FROM PROGRAM_CONFIG WHERE SCHOOL_ID='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "' AND PROGRAM='grades'"), array(), array('TITLE'));
if ($_REQUEST['values']) {
DBQuery("DELETE FROM PROGRAM_USER_CONFIG WHERE USER_ID='" . User('STAFF_ID') . "' AND PROGRAM='Gradebook'");
foreach ($_REQUEST['values'] as $title => $value) {
DBQuery("INSERT INTO PROGRAM_USER_CONFIG (USER_ID,PROGRAM,TITLE,VALUE) values('" . User('STAFF_ID') . "','Gradebook','{$title}','" . str_replace('%', '', $value) . "')");
}
}
$config_RET = DBGet(DBQuery("SELECT TITLE,VALUE FROM PROGRAM_USER_CONFIG WHERE USER_ID='" . User('STAFF_ID') . "' AND PROGRAM='Gradebook'"), array(), array('TITLE'));
if (count($config_RET)) {
foreach ($config_RET as $title => $value) {
$programconfig[$title] = $value[1]['VALUE'];
}
}
$grades = DBGet(DBQuery("SELECT cp.TITLE AS CP_TITLE,c.TITLE AS COURSE_TITLE,cp.COURSE_PERIOD_ID,rcg.TITLE,rcg.ID FROM REPORT_CARD_GRADES rcg,COURSE_PERIODS cp,COURSES c WHERE cp.COURSE_ID=c.COURSE_ID AND cp.TEACHER_ID='" . User('STAFF_ID') . "' AND cp.SCHOOL_ID=rcg.SCHOOL_ID AND cp.SYEAR=rcg.SYEAR AND cp.SYEAR='" . UserSyear() . "' AND rcg.GRADE_SCALE_ID=cp.GRADE_SCALE_ID AND cp.GRADE_SCALE_ID IS NOT NULL AND DOES_BREAKOFF='Y' ORDER BY rcg.BREAK_OFF IS NOT NULL DESC,rcg.BREAK_OFF DESC,rcg.SORT_ORDER DESC"), array(), array('COURSE_PERIOD_ID'));
echo '<FORM action="Modules.php?modname=' . $_REQUEST['modname'] . '" method="POST">';
DrawHeader(_('Gradebook') . ' - ' . ProgramTitle());
DrawHeader('', '<INPUT type="submit" value="' . _('Save') . '" />');
echo '<BR />';
PopTable('header', _('Configuration'));
echo '<fieldset>';
//modif Francois: add translation
//modif Francois: css WPadmin
echo '<legend><b>' . _('Assignments') . '</b></legend>';
echo '<TABLE>';
if (count($grades)) {
//if(!$programconfig['ROUNDING'])
// $programconfig['ROUNDING'] = 'NORMAL';
//modif Francois: add <label> on radio
echo '<TR><TD colspan="3"><TABLE><TR><TD colspan="8"><B>' . _('Score Rounding') . '</B></TD></TR><TR><TD style="text-align:right"><label><INPUT type="radio" name="values[ROUNDING]" value=UP' . ($programconfig['ROUNDING'] == 'UP' ? ' checked' : '') . '> ' . _('Up') . '</label></TD><TD style="text-align:right"><label><INPUT type="radio" name="values[ROUNDING]" value=DOWN' . ($programconfig['ROUNDING'] == 'DOWN' ? ' checked' : '') . '> ' . _('Down') . '</label></TD><TD style="text-align:right"><label><INPUT type="radio" name="values[ROUNDING]" value="NORMAL"' . ($programconfig['ROUNDING'] == 'NORMAL' ? ' checked' : '') . '> ' . _('Normal') . '</label></TD><TD style="text-align:right"><label><INPUT type="radio" name="values[ROUNDING]" value="' . ($programconfig['ROUNDING'] == '' ? ' checked' : '') . '"> ' . _('None') . '</label></TD></TR></TABLE></TD></TR>';
}
if (!$programconfig['ASSIGNMENT_SORTING']) {