当前位置: 首页>>代码示例>>PHP>>正文


PHP ProperDate函数代码示例

本文整理汇总了PHP中ProperDate函数的典型用法代码示例。如果您正苦于以下问题:PHP ProperDate函数的具体用法?PHP ProperDate怎么用?PHP ProperDate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ProperDate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: DateInput_for_EndInput

function DateInput_for_EndInput($value, $name, $title = '', $div = true, $allow_na = true)
{
    if (Preferences('HIDDEN') != 'Y') {
        $div = false;
    }
    if (AllowEdit() && !$_REQUEST['_openSIS_PDF']) {
        if ($value == '' || $div == false) {
            return PrepareDate_for_EndInput($value, "_{$name}", $allow_na) . ($title != '' ? '<BR><small>' . (strpos(strtolower($title), '<font ') === false ? '<FONT color=' . Preferences('TITLES') . '>' : '') . $title . (strpos(strtolower($title), '<font ') === false ? '</FONT>' : '') . '</small>' : '');
        } else {
            return "<DIV id='div{$name}'><div onclick='javascript:addHTML(\"" . str_replace('"', '\\"', PrepareDate_for_EndInput($value, "_{$name}", true, array('Y' => 1, 'M' => 1, 'D' => 1))) . ($title != '' ? '<BR><small>' . (strpos(strtolower($title), '<font ') === false ? '<FONT color=' . Preferences('TITLES') . '>' : '') . $title . (strpos(strtolower($title), '<font ') === false ? '</FONT>' : '') . '</small>' : '') . "\",\"div{$name}\",true)'>" . ($value != '' ? ProperDate($value) : '-') . ($title != '' ? '<BR><small>' . (strpos(strtolower($title), '<font ') === false ? '<FONT color=' . Preferences('TITLES') . '>' : '') . $title . (strpos(strtolower($title), '<font ') === false ? '</FONT>' : '') . '</small>' : '') . '</div></DIV>';
        }
    } else {
        return ($value != '' ? ProperDate($value) : '-') . ($title != '' ? '<BR><small>' . (strpos(strtolower($title), '<font ') === false ? '<FONT color=' . Preferences('TITLES') . '>' : '') . $title . (strpos(strtolower($title), '<font ') === false ? '</FONT>' : '') . '</small>' : '');
    }
}
开发者ID:26746647,项目名称:Belize-openSIS,代码行数:15,代码来源:Inputs.php

示例2: DateInput

function DateInput($value, $name, $title = '', $div = true, $allow_na = true)
{
    if (Preferences('HIDDEN') != 'Y') {
        $div = false;
    }
    if (AllowEdit() && !$_REQUEST['_CENTRE_PDF']) {
        if ($value == '' || $div == false) {
            return PrepareDate($value, "_{$name}", $allow_na) . ($title != '' ? '<BR><small>' . (strpos(strtolower($title), '<font ') === false ? '<FONT color=' . Preferences('TITLES') . '>' : '') . $title . (strpos(strtolower($title), '<font ') === false ? '</FONT>' : '') . '</small>' : '');
        } else {
            return "<DIV id='div{$name}'><div onclick='javascript:addHTML(\"" . str_replace('"', '\\"', PrepareDate($value, "_{$name}", $allow_na, array('Y' => 1, 'M' => 1, 'D' => 1))) . ($title != '' ? '<BR><small>' . (strpos(strtolower($title), '<font ') === false ? '<FONT color=' . Preferences('TITLES') . '>' : '') . str_replace(array("'", '"'), array('&#39;', '\\"'), $title) . (strpos(strtolower($title), '<font ') === false ? '</FONT>' : '') . '</small>' : '') . "\",\"div{$name}\",true)'><span style='border-bottom-style:dotted;border-bottom-width:1;border-bottom-color:" . Preferences('TITLES') . ";'>" . ($value != '' ? ProperDate($value) : '-') . '</span>' . ($title != '' ? '<BR><small>' . (strpos(strtolower($title), '<font ') === false ? '<FONT color=' . Preferences('TITLES') . '>' : '') . $title . (strpos(strtolower($title), '<font ') === false ? '</FONT>' : '') . '</small>' : '') . '</div></DIV>';
        }
    } else {
        return ($value != '' ? ProperDate($value) : '-') . ($title != '' ? '<BR><small>' . (strpos(strtolower($title), '<font ') === false ? '<FONT color=' . Preferences('TITLES') . '>' : '') . $title . (strpos(strtolower($title), '<font ') === false ? '</FONT>' : '') . '</small>' : '');
    }
}
开发者ID:linil,项目名称:centreSIS,代码行数:15,代码来源:Inputs.php

示例3: DateInput

function DateInput($value, $name, $title = '', $div = true, $allow_na = true)
{
    if (Preferences('HIDDEN') != 'Y') {
        $div = false;
    }
    if (AllowEdit() && !isset($_REQUEST['_ROSARIO_PDF'])) {
        if ($value == '' || $div == false) {
            return PrepareDate($value, '_' . $name, $allow_na) . ($title != '' ? '<BR />' . (mb_strpos(mb_strtolower($title), '<span ') === false ? '<span class="legend-gray">' : '') . $title . (mb_strpos(mb_strtolower($title), '<span ') === false ? '</span>' : '') . '' : '');
        } else {
            $return = '<DIV id="div' . $name . '"><div class="onclick" onclick=\'javascript:addHTML("';
            $toEscape = PrepareDate($value, '_' . $name, $allow_na, array('Y' => 1, 'M' => 1, 'D' => 1)) . ($title != '' ? '<BR />' . (mb_strpos(mb_strtolower($title), '<span ') === false ? '<span class="legend-gray">' : '') . str_replace("'", '&#39;', $title) . (mb_strpos(mb_strtolower($title), '<span ') === false ? '</span>' : '') : '');
            $return .= str_replace('"', '\\"', $toEscape);
            $return .= '","div' . $name . '",true)\'><span class="underline-dots">' . ($value != '' ? ProperDate($value) : '-') . '</span>' . ($title != '' ? '<BR />' . (mb_strpos(mb_strtolower($title), '<span ') === false ? '<span class="legend-gray">' : '') . $title . (mb_strpos(mb_strtolower($title), '<span ') === false ? '</span>' : '') . '' : '') . '</div></DIV>';
            return $return;
        }
    } else {
        return ($value != '' ? ProperDate($value) : '-') . ($title != '' ? '<BR />' . (mb_strpos(mb_strtolower($title), '<span ') === false ? '<span class="legend-gray">' : '') . $title . (mb_strpos(mb_strtolower($title), '<span ') === false ? '</span>' : '') . '' : '');
    }
}
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:19,代码来源:Inputs.php

示例4: core_calendar_create_calendar_events_object

function core_calendar_create_calendar_events_object()
{
    //first, gather the necessary variables
    global $columns;
    //then, convert variables for the Moodle object:
    /*
    list of ( 
    	  //event
    	object {
    		name string   //event name
    		description string  Default to "null" //Description
    		format int  Default to "1" //description format (1 = HTML, 0 = MOODLE, 2 = PLAIN or 4 = MARKDOWN)
    		courseid int  Default to "0" //course id
    		groupid int  Default to "0" //group id
    		repeats int  Default to "0" //number of repeats
    		eventtype string  Default to "user" //Event type
    		timestart int  Default to "1370827707" //timestart
    		timeduration int  Default to "0" //time duration (in minutes)
    		visible int  Default to "1" //visible
    		sequence int  Default to "1" //sequence
    	} 
    )
    */
    $name = $columns['TITLE'];
    $description = (!empty($columns['ASSIGNED_DATE']) ? _('Assigned Date') . ': ' . ProperDate($columns['ASSIGNED_DATE']) . '<br />' : '') . $columns['DESCRIPTION'];
    $format = 1;
    //gather the Moodle course ID
    $courseid = DBGet(DBQuery("SELECT moodle_id FROM moodlexrosario WHERE rosario_id='" . UserCoursePeriod() . "' AND \"column\"='course_period_id'"));
    if (count($courseid)) {
        $courseid = (int) $courseid[1]['MOODLE_ID'];
    } else {
        return null;
    }
    $eventtype = 'course';
    $timestart = strtotime($columns['DUE_DATE']);
    $events = array(array('name' => $name, 'description' => $description, 'format' => $format, 'courseid' => $courseid, 'timestart' => $timestart, 'eventtype' => $eventtype));
    return array($events);
}
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:38,代码来源:Assignments.php

示例5: strtoupper

 }
 if ($_REQUEST[stuid]) {
     $sql .= "AND ssm.STUDENT_ID='{$_REQUEST['stuid']}' ";
 }
 if ($_REQUEST[first]) {
     $sql .= "AND s.FIRST_NAME LIKE '" . strtoupper($_REQUEST[first]) . "%' ";
 }
 if ($_REQUEST[last]) {
     $sql .= "AND s.LAST_NAME LIKE '" . strtoupper($_REQUEST[last]) . "%' ";
 }
 $sql .= "ORDER BY s.LAST_NAME,s.FIRST_NAME,s.MIDDLE_NAME ";
 $QI = DBQuery($sql);
 $stubilling_RET = DBGet($QI, array('FIRST_NAME' => 'GetCapWords', 'LAST_NAME' => 'GetCapWords'));
 $debits_table = 'STU_BILLING_ACT_LUNCH';
 $credits_cond = " LUNCH_PAYMENT='Y' ";
 $lunch_title = '<B>Lunch Purchases and Payments</B><BR>School Year: ' . DispYear($_REQUEST[year]) . '<BR>as of ' . ProperDate(DBDate());
 $sql = "SELECT ssm.STUDENT_ID,ssm.SCHOOL,s.FIRST_NAME,s.LAST_NAME,s.MIDDLE_NAME ";
 if (($_REQUEST[balance_low] || $_REQUEST[balance_low] === '0') && ($_REQUEST[balance_high] || $_REQUEST[balance_high] === '0')) {
     $sql .= ",(SELECT COALESCE((SELECT sum(AMOUNT) FROM STU_BILLING_ACT WHERE STUDENT_ID=ssm.STUDENT_ID AND {$credits_cond}),0) -\n\t\t\t\tCOALESCE((SELECT sum(AMOUNT) FROM {$debits_table} WHERE STUDENT_ID=ssm.STUDENT_ID),0) " . FROM_DUAL . ") as BALANCE ";
 }
 $sql .= "FROM STU_SCHOOL_MEETS ssm,STUDENTS s\n\t\t\tWHERE ssm.SYEAR='{$_REQUEST['year']}' AND s.STUDENT_ID=ssm.STUDENT_ID ";
 if (($_REQUEST[balance_low] || $_REQUEST[balance_low] === '0') && ($_REQUEST[balance_high] || $_REQUEST[balance_high] === '0')) {
     $sql .= "AND (SELECT COALESCE((SELECT sum(AMOUNT) FROM STU_BILLING_ACT WHERE STUDENT_ID=ssm.STUDENT_ID AND {$credits_cond}),0) -\n\t\t\t\tCOALESCE((SELECT sum(AMOUNT) FROM {$debits_table} WHERE STUDENT_ID=ssm.STUDENT_ID),0) " . FROM_DUAL . ")\n\t\t\t\t BETWEEN '{$_REQUEST['balance_low']}' AND '{$_REQUEST['balance_high']}' ";
 }
 if ($_REQUEST[not_zero] == 'Y') {
     $sql .= "AND (SELECT COALESCE((SELECT sum(AMOUNT) FROM STU_BILLING_ACT WHERE STUDENT_ID=ssm.STUDENT_ID AND {$credits_cond}),0) -\n\t\t\t\tCOALESCE((SELECT sum(AMOUNT) FROM {$debits_table} WHERE STUDENT_ID=ssm.STUDENT_ID),0) " . FROM_DUAL . ")\n\t\t\t\t != '0' ";
 }
 if ($_REQUEST[sch]) {
     $sql .= "AND ssm.SCHOOL='{$_REQUEST['sch']}' ";
 }
 if ($_REQUEST[grade]) {
开发者ID:SoftScape,项目名称:opensis,代码行数:31,代码来源:Invoices.php

示例6: DrawHeader

<?php

DrawHeader(ProgramTitle());
$begin_date = $_REQUEST['day_begin'] . '-' . $_REQUEST[month_begin] . '-' . $_REQUEST[year_begin];
$end_date = $_REQUEST[day_end] . '-' . $_REQUEST[month_end] . '-' . $_REQUEST[year_end];
DrawHeader(ProperDate($begin_date) . ' - ' . ProperDate($end_date) . ' : ' . GetSchool($_REQUEST[sch]));
// LUNCH DEBITS
$sql = "SELECT MENU_ID," . db_case(array('FSC', "''", "'REG'", "'1'", "'FREE'", "'2'", "'REDUCED'")) . " as FSC,\n\t\t\tcount(*) as COUNT \n\t\tFROM STU_BILLING_ACT_LUNCH sba,STUDENT_ENROLLMENT se \n\t\tWHERE se.SYEAR=sba.SYEAR AND se.STUDENT_ID=sba.STUDENT_ID AND se.SCHOOL_ID='" . UserSchool() . "' AND ";
$sql .= "PAYMENT_DATE BETWEEN '{$begin_date}' AND '{$end_date}'\n\t\tGROUP BY MENU_ID,FSC";
$QI = DBQuery($sql);
$counts_RET = DBGet($QI, array(), array('MENU_ID', 'FSC'));
$sql = "SELECT ID,SCHOOL_ID,TITLE FROM LUNCH_MENU WHERE SCHOOL_ID='" . UserSchool() . "' ";
$QI = DBQuery($sql);
$menu_RET = DBGet($QI, array(), array('SCHOOL_ID'));
$columns = array('TITLE' => 'Lunch Item', 'REG_COUNT' => 'Regular Purchases', 'FREE_COUNT' => 'Free Purchases', 'REDUCED_COUNT' => 'Reduced Purchases', 'TOTAL' => 'Total');
foreach ($menu_RET as $school => $items) {
    unset($RET);
    $RET[] = '';
    foreach ($items as $item) {
        $total = $counts_RET[$item[ID]]['REG'][1]['COUNT'] + $counts_RET[$item[ID]]['FREE'][1]['COUNT'] + $counts_RET[$item[ID]]['REDUCED'][1]['COUNT'];
        $RET[] = array('TITLE' => $item[TITLE], 'REG_COUNT' => $counts_RET[$item[ID]]['REG'][1]['COUNT'], 'FREE_COUNT' => $counts_RET[$item[ID]]['FREE'][1]['COUNT'], 'REDUCED_COUNT' => $counts_RET[$item[ID]]['REDUCED'][1]['COUNT'], 'TOTAL' => $total);
    }
    unset($RET[0]);
    ListOutput($RET, $columns, '.', '.', '', array(), array('save' => false));
}
开发者ID:linil,项目名称:centreSIS,代码行数:25,代码来源:LunchTotals.php

示例7: DBGet

 ////	$extra['functions']['TEACHER'] = '_makeTeacher';
 //	$extra['group']	= array('STUDENT_ID');
 //	//$extra['group']	= array('STUDENT_ID','COURSE_PERIOD_ID');
 //        $RET = GetStuList($extra);
 // print_r($RET);
 $RET = DBGet(DBQuery("SELECT DISTINCT s.STUDENT_ID, CONCAT(s.LAST_NAME,', ',coalesce(s.COMMON_NAME,s.FIRST_NAME)) AS FULL_NAME FROM students s,student_standards ss, report_card_grades rcg, course_periods cp\r\n        WHERE ss.GRADE_ID=rcg.ID AND cp.COURSE_PERIOD_ID=ss.COURSE_PERIOD_ID AND s.STUDENT_ID=ss.STUDENT_ID\r\n        AND s.STUDENT_ID IN ({$st_list})\r\n        "));
 if (count($RET)) {
     $grade_RET = DBGet(DBQuery("SELECT TITLE, COMMENT FROM report_card_grades WHERE SCHOOL_ID=" . UserSchool() . " AND SYEAR=" . UserSyear()));
     $handle = PDFStart();
     foreach ($RET as $student) {
         /*echo "SELECT DISTINCT cp.COURSE_PERIOD_ID AS CP_ID, cp.TITLE AS CP_TITLE, cp.MARKING_PERIOD_ID, CONCAT(st.TITLE, ' ', st.LAST_NAME, ' ',st.FIRST_NAME) AS TEACHER FROM STUDENTS s,STUDENT_STANDARDS ss, REPORT_CARD_GRADES rcg, COURSE_PERIODS cp, MARKING_PERIODS mp, STAFF st
           WHERE ss.GRADE_ID=rcg.ID AND cp.COURSE_PERIOD_ID=ss.COURSE_PERIOD_ID AND s.STUDENT_ID=ss.STUDENT_ID AND cp.MARKING_PERIOD_ID=mp.MARKING_PERIOD_ID AND cp.TEACHER_ID=st.STAFF_ID
           AND s.STUDENT_ID=$student[STUDENT_ID]";*/
         $periods = DBGet(DBQuery("SELECT DISTINCT cp.COURSE_PERIOD_ID AS CP_ID, cp.TITLE AS CP_TITLE, cp.MARKING_PERIOD_ID, CONCAT(st.TITLE, ' ', st.LAST_NAME, ' ',st.FIRST_NAME) AS TEACHER FROM students s,student_standards ss, report_card_grades rcg, course_periods cp, marking_periods mp, staff st\r\n                WHERE ss.GRADE_ID=rcg.ID AND cp.COURSE_PERIOD_ID=ss.COURSE_PERIOD_ID AND s.STUDENT_ID=ss.STUDENT_ID AND cp.MARKING_PERIOD_ID=mp.MARKING_PERIOD_ID AND cp.TEACHER_ID=st.STAFF_ID\r\n                AND s.STUDENT_ID={$student['STUDENT_ID']}"));
         echo "<table width=100%  style=\" font-family:Arial; font-size:12px;\" >";
         echo "<tr><td style=\"font-size:15px; font-weight:bold; padding-top:20px;\">" . GetSchool(UserSchool()) . "<div style=\"font-size:12px;\">Elementary Grades " . GetMp(UserMp()) . "</div><div style=\"font-size:12px;\">Student: " . $student[FULL_NAME] . " &nbsp;( " . $student[STUDENT_ID] . " )</div></td><td align=right style=\"padding-top:20px;\">" . ProperDate(DBDate()) . "<br />Powered by openSIS</td></tr><tr><td colspan=2 style=\"border-top:1px solid #333;\">&nbsp;</td></tr></table>";
         echo "<table >";
         echo '<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0" class="course_period_tbl">';
         echo '<TR><TH align="left">Attendance</TH>';
         $mp_RET = DBGet(DBQuery("SELECT DISTINCT mp.TITLE, mp.MARKING_PERIOD_ID FROM marking_periods mp, course_periods cp, attendance_period ap\r\n                WHERE mp.MARKING_PERIOD_ID=cp.MARKING_PERIOD_ID\r\n                AND cp.SCHOOL_ID=" . UserSchool() . " AND cp.SYEAR=" . UserSyear() . "\r\n                AND cp.COURSE_PERIOD_ID=ap.COURSE_PERIOD_ID AND ap.STUDENT_ID={$student['STUDENT_ID']}"));
         $mp_name = DBGet(DBQuery("SELECT DISTINCT mp.SHORT_NAME,mp.MARKING_PERIOD_ID FROM marking_periods mp WHERE mp.SCHOOL_ID=" . UserSchool() . " AND mp.SYEAR=" . UserSyear() . ""));
         foreach ($mp_name as $mp1) {
             echo '<TH align="center" width="60px">' . $mp1[SHORT_NAME] . '</TH>';
         }
         echo '</TR>';
         $atteadance_code_RET = DBGet(DBQuery("SELECT ID, TITLE FROM attendance_codes WHERE SCHOOL_ID=" . UserSchool() . " AND SYEAR=" . UserSyear() . " ORDER BY SORT_ORDER, TITLE"));
         foreach ($atteadance_code_RET as $ac) {
             echo '<TR>';
             echo '<TD class="course_period">' . $ac[TITLE] . '</TD>';
             //echo '<TD class="course_period"></TD>';
             //echo '<TD class="course_period"></TD>';
开发者ID:26746647,项目名称:openSIS,代码行数:31,代码来源:StandardsGradeReport.php

示例8: makeLogin

function makeLogin($value)
{
    return ProperDate(substr($value, 0, 10)) . substr($value, 10);
}
开发者ID:26746647,项目名称:Belize-openSIS,代码行数:4,代码来源:Search.inc.php

示例9: date

 $month = date('m', $_REQUEST['month']);
 $year = date('Y', $_REQUEST['month']);
 $time = mktime(0, 0, 0, $month, 1, $year);
 $last = 31;
 while (!checkdate(9, $last, 2012)) {
     $last--;
 }
 $skip = date("w", $time);
 if ($skip) {
     $header .= "<td colspan=" . $skip . "></td>";
     $return_counter = $skip;
 }
 for ($i = 1; $i <= $last; $i++) {
     $day_time = mktime(0, 0, 0, $month, $i, $year);
     $date = date('Y-m-d', $day_time);
     $header .= "<TD  title='" . ProperDate($date) . "' width=100 class=" . ($periods[$cpblocked_RET[$date][1]['PERIOD_ID']] ? 'calendar_active' : 'calendar_holiday') . " valign=top>\r\n                                <table width=100><tr><td width=5 valign=top>{$i}</td><td width=95 align=right></TD></TR>";
     $header .= "</td></tr><tr><TD colspan=2 height=40 valign=top>";
     if (in_array(date('D', $day_time), $caldays) && $date >= $begin && $date <= $end) {
         $block_periods = DBGet(DBQuery("SELECT * FROM course_period_var WHERE course_period_id='" . $_REQUEST['course_period_id'] . "'\r\n                                                              AND course_period_date='" . $date . "'"));
         $header .= $periods[$cpblocked_RET[$date][1]['PERIOD_ID']] . '<br>';
         $header .= $rooms[$cpblocked_RET[$date][1]['ROOM_ID']] . '<br>';
         if ($cpblocked_RET[$date][1]['PERIOD_ID'] == '') {
             $header .= '<tr><td valign=bottom align=left>' . button('add', '', "# onclick='javascript:window.open(\"for_window.php?modname={$_REQUEST['modname']}&modfunc=detail&subject_id={$_REQUEST['subject_id']}&course_id={$_REQUEST['course_id']}&course_period_id={$_REQUEST['course_period_id']}&mode=add&calendar_id={$_REQUEST['calendar_id']}&meet_date={$date}\",\"blank\",\"width=600,height=400\"); return false;'") . "</td></tr>";
         } else {
             foreach ($block_periods as $ind => $data) {
                 $header .= '<table><tr><td>Attendance : ' . ($data['DOES_ATTENDANCE'] == 'Y' ? 'Yes' : 'No') . '</td>';
                 $header .= '<td valign=bottom align=left>' . button('edit', '', "# onclick='javascript:window.open(\"for_window.php?modname={$_REQUEST['modname']}&modfunc=detail&subject_id={$_REQUEST['subject_id']}&course_id={$_REQUEST['course_id']}&course_period_id={$_REQUEST['course_period_id']}&mode=edit&calendar_id={$_REQUEST['calendar_id']}&id={$data['ID']}&meet_date={$date}\",\"blank\",\"width=600,height=400\"); return false;'") . "</td></tr></table>";
             }
             $header .= '<tr><td valign=bottom align=left>' . button('add', '', "# onclick='javascript:window.open(\"for_window.php?modname={$_REQUEST['modname']}&modfunc=detail&subject_id={$_REQUEST['subject_id']}&course_id={$_REQUEST['course_id']}&course_period_id={$_REQUEST['course_period_id']}&mode=add&calendar_id={$_REQUEST['calendar_id']}&meet_date={$date}&add=new\",\"blank\",\"width=600,height=400\"); return false;'") . "</td></tr>";
         }
     }
开发者ID:26746647,项目名称:openSIS,代码行数:31,代码来源:Courses.php

示例10: ShortDate

function ShortDate($date = '', $column = '')
{
    return ProperDate($date, 'short');
}
开发者ID:26746647,项目名称:Belize-openSIS,代码行数:4,代码来源:ProperDate.fnc.php

示例11: DrawHeader

                    DrawHeader(Config('TITLE') . ' - ' . _('Student Requests'));
                    DrawHeader($address[1]['FULL_NAME'], $address[1]['STUDENT_ID']);
                    DrawHeader($address[1]['GRADE_ID']);
                    DrawHeader(GetSchool(UserSchool()));
                    DrawHeader(ProperDate(DBDate()));
                    echo '<BR><BR><TABLE width=100%><TR><TD width=50> &nbsp; </TD><TD>' . $address[1]['MAILING_LABEL'] . '</TD></TR></TABLE><BR>';
                    ListOutput($address, $columns, _('Request'), _('Requests'), array(), array(), array('center' => false, 'print' => false));
                    echo '<!-- NEW PAGE -->';
                }
            } else {
                unset($_CENTRE['DrawHeader']);
                DrawHeader(Config('TITLE') . ' - ' . _('Student Requests'));
                DrawHeader($courses[1]['FULL_NAME'], $courses[1]['STUDENT_ID']);
                DrawHeader($courses[1]['GRADE_ID']);
                DrawHeader(GetSchool(UserSchool()));
                DrawHeader(ProperDate(DBDate()));
                ListOutput($courses, $columns, _('Request'), _('Requests'), array(), array(), array('center' => false, 'print' => false));
                echo '<!-- NEW PAGE -->';
            }
        }
        PDFStop($handle);
    } else {
        BackPrompt(_('No Students were found.'));
    }
}
function _makeExtra($value, $title = '')
{
    global $THIS_RET;
    if ($THIS_RET['WITH_TEACHER_ID']) {
        $return .= Localize('colon', _('With')) . '&nbsp;' . GetTeacher($THIS_RET['WITH_TEACHER_ID']) . '<BR>';
    }
开发者ID:linil,项目名称:centreSIS,代码行数:31,代码来源:PrintRequests.php

示例12: _make

function _make($value, $column)
{
    if (substr_count($value, '-') == 2 && VerifyDate($value)) {
        $value = ProperDate($value);
    } elseif (is_numeric($value)) {
        $value = strpos($value, '.') === false ? $value : rtrim(rtrim($value, '0'), '.');
    }
    return str_replace('||', ',<BR>', trim($value, '|'));
}
开发者ID:SoftScape,项目名称:opensis,代码行数:9,代码来源:Referrals.php

示例13: CustomFields


//.........这里部分代码省略.........
                                }
                                $_openSIS['SearchTerms'] .= '<BR>';
                                break;
                            case 'codeds':
                                $_openSIS['SearchTerms'] .= '<font color=gray><b>' . $fields[$id][1]['TITLE'] . ': </b></font>';
                                if ($value == '!') {
                                    $string .= ' and (s.' . $field_name . '=\'\' OR s.' . $field_name . ' IS NULL) ';
                                    $_openSIS['SearchTerms'] .= 'No Value';
                                } else {
                                    $string .= ' and s.' . $field_name . '=\'' . $value . '\' ';
                                    $_openSIS['SearchTerms'] .= $value;
                                }
                                $_openSIS['SearchTerms'] .= '<BR>';
                                break;
                            case 'select':
                                $_openSIS['SearchTerms'] .= '<font color=gray><b>' . $fields[$id][1]['TITLE'] . ': </b></font>';
                                if ($value == '!') {
                                    $string .= ' and (s.' . $field_name . '=\'\' OR s.' . $field_name . ' IS NULL) ';
                                    $_openSIS['SearchTerms'] .= 'No Value';
                                } else {
                                    $string .= ' and s.' . $field_name . '=\'' . $value . '\' ';
                                    $_openSIS['SearchTerms'] .= $value;
                                }
                                $_openSIS['SearchTerms'] .= '<BR>';
                                break;
                            case 'autos':
                                $_openSIS['SearchTerms'] .= '<font color=gray><b>' . $fields[$id][1]['TITLE'] . ': </b></font>';
                                if ($value == '!') {
                                    $string .= ' and (s.' . $field_name . '=\'\' OR s.' . $field_name . ' IS NULL) ';
                                    $_openSIS['SearchTerms'] .= 'No Value';
                                } else {
                                    $string .= ' and s.' . $field_name . '=\'' . $value . '\' ';
                                    $_openSIS['SearchTerms'] .= $value;
                                }
                                $_openSIS['SearchTerms'] .= '<BR>';
                                break;
                            case 'edits':
                                $_openSIS['SearchTerms'] .= '<font color=gray><b>' . $fields[$id][1]['TITLE'] . ': </b></font>';
                                if ($value == '!') {
                                    $string .= ' and (s.' . $field_name . '=\'\' OR s.' . $field_name . ' IS NULL) ';
                                    $_openSIS['SearchTerms'] .= 'No Value';
                                } elseif ($value == '~') {
                                    $string .= " and position('\n'||s.{$field_name}||'\r' IN '\n'||(SELECT SELECT_OPTIONS FROM custom_fields WHERE ID='" . $id . "')||'\r')=0 ";
                                    $_openSIS['SearchTerms'] .= 'Other';
                                } else {
                                    $string .= ' and s.' . $field_name . '=\'' . $value . '\' ';
                                    $_openSIS['SearchTerms'] .= $value;
                                }
                                $_openSIS['SearchTerms'] .= '<BR>';
                                break;
                            case 'text':
                                if (substr($value, 0, 2) == '\\"' && substr($value, -2) == '\\"') {
                                    $string .= ' and s.' . $field_name . '=\'' . substr($value, 2, -2) . '\' ';
                                    $_openSIS['SearchTerms'] .= '<font color=gray><b>' . $fields[$id][1]['TITLE'] . ': </b></font>' . substr($value, 2, -2) . '<BR>';
                                } else {
                                    $string .= ' and LOWER(s.' . $field_name . ') LIKE \'' . strtolower($value) . '%\' ';
                                    if ($exp == 1) {
                                        $_openSIS['Search'] .= '<font color=gray><b>' . $fields[$id][1]['TITLE'] . ' starts with: </b></font>' . $value . '<BR>';
                                    } elseif ($exp == 2) {
                                        $_openSIS['SearchTerms'] .= '<font color=gray><b>' . $fields[$id][1]['TITLE'] . ' starts with: </b></font>' . $value . '<BR>';
                                    } else {
                                        $_openSIS['SearchTerms'] .= '<font color=gray><b>' . $fields[$id][1]['TITLE'] . ' starts with: </b></font>' . $value . '<BR>';
                                    }
                                }
                                break;
                        }
                    }
                }
            }
            if (count($_REQUEST['cust_begin'])) {
                foreach ($_REQUEST['cust_begin'] as $id => $value) {
                    $field_name = $id;
                    $id = substr($id, 7);
                    $column_name = $field_name;
                    if ($fields[$id][1]['SYSTEM_FIELD'] == 'Y') {
                        $column_name = strtoupper(str_replace(' ', '_', $fields[$id][1]['TITLE']));
                    }
                    if ($fields[$id][1]['TYPE'] == 'numeric') {
                        $_REQUEST['cust_end'][$field_name] = ereg_replace('[^0-9.-]+', '', $_REQUEST['cust_end'][$field_name]);
                        $value = ereg_replace('[^0-9.-]+', '', $value);
                    }
                    if ($_REQUEST['cust_begin'][$field_name] != '' && $_REQUEST['cust_end'][$field_name] != '') {
                        if ($fields[$id][1]['TYPE'] == 'numeric' && $_REQUEST['cust_begin'][$field_name] > $_REQUEST['cust_end'][$field_name]) {
                            $temp = $_REQUEST['cust_end'][$field_name];
                            $_REQUEST['cust_end'][$field_name] = $value;
                            $value = $temp;
                        }
                        $string .= ' and s.' . $column_name . ' BETWEEN ' . $value . ' AND \'' . $_REQUEST['cust_end'][$field_name] . '\' ';
                        if ($fields[$id][1]['TYPE'] == 'date') {
                            $_openSIS['SearchTerms'] .= '<font color=gray><b>' . $fields[$id][1]['TITLE'] . ' between: </b></font>' . ProperDate($value) . ' &amp; ' . ProperDate($_REQUEST['cust_end'][$field_name]) . '<BR>';
                        } else {
                            $_openSIS['SearchTerms'] .= '<font color=gray><b>' . $fields[$id][1]['TITLE'] . ' between: </b></font>' . $value . ' &amp; ' . $_REQUEST['cust_end'][$field_name] . '<BR>';
                        }
                    }
                }
            }
            break;
    }
    return $string;
}
开发者ID:jicheng17,项目名称:fh,代码行数:101,代码来源:CustomFieldsFnc.php

示例14: Buttons

        echo '</TD></TR>';
    }
    echo '<TR><TD colspan=2 align=center>';
    Buttons('Find', 'Reset');
    echo '</TD></TR>';
    echo '</TABLE>';
    PopTable('footer');
}
if ($_REQUEST[modfunc] == 'list') {
    $begin_date = $_REQUEST[day_begin] . '-' . $_REQUEST[month_begin] . '-' . $_REQUEST[year_begin];
    $end_date = $_REQUEST[day_end] . '-' . $_REQUEST[month_end] . '-' . $_REQUEST[year_end];
    $account_title = DBGet(DBQuery("SELECT TITLE FROM STU_BILLING_ACCOUNTS WHERE ID='{$_REQUEST['account_id']}'"));
    if ($account_title[1]) {
        $account_title = ' : ' . $account_title[1]['TITLE'];
    }
    DrawHeader(ucwords(str_replace('stubilling', 'student billing ', str_replace('lunch', 'lunch ', $_REQUEST[type]))) . ' : ' . ProperDate($begin_date) . ' - ' . ProperDate($end_date) . ' : ' . GetSchool($_REQUEST[sch]) . $account_title);
    echo '<BR>';
    echo '<TABLE>';
    switch ($_REQUEST[type]) {
        case 'stubillingcredits':
            // STUBILLING CREDITS
            $sql = "SELECT s.LAST_NAME||', '||s.FIRST_NAME as FULL_NAME,sba.STUDENT_ID,sum(AMOUNT) as AMOUNT FROM STU_BILLING_ACT sba,STUDENTS s ";
            if ($_REQUEST[sch]) {
                $sql .= ",STU_SCHOOL_MEETS ssm WHERE ssm.SYEAR=sba.SYEAR AND ssm.STUDENT_ID=sba.STUDENT_ID AND ssm.SCHOOL='{$_REQUEST['sch']}' AND s.STUDENT_ID=ssm.STUDENT_ID AND ";
            } else {
                $sql .= "WHERE ";
            }
            $sql .= "s.STUDENT_ID=sba.STUDENT_ID AND sba.PAYMENT_DATE BETWEEN '{$begin_date}' AND '{$end_date}' AND (sba.LUNCH_PAYMENT!='Y' OR sba.LUNCH_PAYMENT IS NULL) " . ($_REQUEST[account_id] ? "AND ACCOUNT_ID='{$_REQUEST['account_id']}'" : '') . " GROUP BY sba.STUDENT_ID,FULL_NAME";
            break;
        case 'stubillingdebits':
            // STUBILLING CREDITS
开发者ID:SoftScape,项目名称:opensis,代码行数:31,代码来源:DailyTransactions.php

示例15: PrepareDate


//.........这里部分代码省略.........
        if ($options['C']) {
            $e = "onchange='document.location.href=\"" . PreparePHP_SELF($_REQUEST, array('month' . $title, 'day' . $title, 'year' . $title)) . "&amp;month{$title}=\"+this.form.month{$title}.value+\"&amp;day{$title}=\"+this.form.day{$title}.value+\"&amp;year{$title}=\"+this.form.year{$title}.value;'";
            $extraM .= $e;
            $extraD .= $e;
            $extraY .= $e;
        } else {
            $extraM .= "onchange='document.location.href=\"" . PreparePHP_SELF($_REQUEST, array('month' . $title)) . "&amp;month{$title}=\"+this.form.month{$title}.value;'";
            $extraD .= "onchange='document.location.href=\"" . PreparePHP_SELF($_REQUEST, array('day' . $title)) . "&amp;day{$title}=\"+this.form.day{$title}.value;'";
            $extraY .= "onchange='document.location.href=\"" . PreparePHP_SELF($_REQUEST, array('year' . $title)) . "&amp;year{$title}=\"+this.form.year{$title}.value;'";
        }
    }
    if ($options['C']) {
        $_CENTRE['PrepareDate']++;
    }
    if (strlen($date) == 9) {
        $day = substr($date, 0, 2);
        $month = substr($date, 3, 3);
        $year = substr($date, 7, 2);
        if ($year == '00' && ($month == '000' && $day == '00')) {
            $year = '0000';
        } else {
            $year = ($year < 50 ? '20' : '19') . $year;
        }
        $return .= '<!-- ' . $year . MonthNWSwitch($month, 'tonum') . $day . ' -->';
    } elseif (strlen($date) == 10) {
        $day = substr($date, 8, 2);
        $month = MonthNWSwitch(substr($date, 5, 2), 'tochar');
        $year = substr($date, 0, 4);
        $return .= '<!-- ' . $year . MonthNWSwitch($month, 'tonum') . $day . ' -->';
    } else {
        $day = substr($date, 0, 2);
        $month = substr($date, 3, 3);
        $year = substr($date, 7, 4);
        $return .= '<!-- ' . $year . MonthNWSwitch($month, 'tonum') . $day . ' -->';
    }
    // MONTH  ---------------
    if ($options['M']) {
        $return .= '<SELECT NAME=month' . $title . ' id=monthSelect' . $_CENTRE['PrepareDate'] . ' SIZE=1 ' . $extraM . '>';
        if ($allow_na) {
            if ($month == '000') {
                $return .= '<OPTION value="" SELECTED>N/A';
            } else {
                $return .= '<OPTION value="">N/A';
            }
        }
        foreach (array('JAN' => _('January'), 'FEB' => _('February'), 'MAR' => _('March'), 'APR' => _('April'), 'MAY' => _('May'), 'JUN' => _('June'), 'JUL' => _('July'), 'AUG' => _('August'), 'SEP' => _('September'), 'OCT' => _('October'), 'NOV' => _('November'), 'DEC' => _('December')) as $key => $name) {
            $return .= '<OPTION VALUE=' . $key . ($month == $key ? ' SELECTED' : '') . '>' . $name;
        }
        $return .= '</SELECT>';
    }
    // DAY  ---------------
    if ($options['D']) {
        $return .= '<SELECT NAME=day' . $title . ' id=daySelect' . $_CENTRE['PrepareDate'] . ' SIZE=1 ' . $extraD . '>';
        if ($allow_na) {
            if ($day == '00') {
                $return .= '<OPTION value="" SELECTED>N/A';
            } else {
                $return .= '<OPTION value="">N/A';
            }
        }
        for ($i = 1; $i <= 31; $i++) {
            if (strlen($i) == 1) {
                $print = '0' . $i;
            } else {
                $print = $i;
            }
            $return .= '<OPTION VALUE=' . $print . ($day == $print ? ' SELECTED' : '') . '>' . $i;
        }
        $return .= '</SELECT>';
    }
    // YEAR  ---------------
    if ($options['Y']) {
        if (!$year || $year == '0000') {
            $begin = date('Y') - 20;
            $end = date('Y') + 5;
        } else {
            $begin = $year - 5;
            $end = $year + 5;
        }
        $return .= '<SELECT NAME=year' . $title . ' id=yearSelect' . $_CENTRE['PrepareDate'] . ' SIZE=1 ' . $extraY . '>';
        if ($allow_na) {
            if ($year == '0000') {
                $return .= '<OPTION value="" SELECTED>N/A';
            } else {
                $return .= '<OPTION value="">N/A';
            }
        }
        for ($i = $begin; $i <= $end; $i++) {
            $return .= '<OPTION VALUE=' . $i . ($year == $i ? ' SELECTED' : '') . '>' . $i;
        }
        $return .= '</SELECT>';
    }
    if ($options['C']) {
        $return .= '<img src="assets/jscalendar/img.gif" id="trigger' . $_CENTRE['PrepareDate'] . '" style="cursor: pointer; cursor:hand; border: 1px solid red;" onmouseover=this.style.background="red"; onmouseout=this.style.background=""; />';
    }
    if ($_REQUEST['_CENTRE_PDF']) {
        $return = ProperDate($date);
    }
    return $return;
}
开发者ID:linil,项目名称:centreSIS,代码行数:101,代码来源:PrepareDate.fnc.php


注:本文中的ProperDate函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。