예제 #1
0
     $header .= '</TR>';
     //		$header .= '<TR><TD valign=top colspan=2>'.($RET['DATE_ERROR']=='Y'?'<Font color=red>Due date earlier than assigned date!</FONT>':'').'</TD></TR>';
     $header .= '</TABLE>';
 } elseif ($_REQUEST['assignment_type_id']) {
     echo "<FORM name=F3 action=Modules.php?modname={$_REQUEST['modname']}&table=gradebook_assignment_types";
     if ($_REQUEST['assignment_type_id'] != 'new') {
         echo "&assignment_type_id={$_REQUEST['assignment_type_id']}";
     }
     echo " method=POST>";
     DrawHeader($title, $delete_button . '<INPUT type=submit value=' . _('Save') . ' onclick="formcheck_assignments();">');
     $header .= '<TABLE cellpadding=3 bgcolor=#F0F0F1 width=100%>';
     $header .= '<TR>';
     $header .= '<TD>' . TextInput($RET['TITLE'], 'tables[' . $_REQUEST['assignment_type_id'] . '][TITLE]', '' . _('Title') . '', 'size=36') . '</TD>';
     if ($programconfig['WEIGHT'] == 'Y') {
         $header .= '<TD>' . TextInput($RET['FINAL_GRADE_PERCENT'], 'tables[' . $_REQUEST['assignment_type_id'] . '][FINAL_GRADE_PERCENT]', ($RET['FINAL_GRADE_PERCENT'] != 0 ? '' : '<FONT color=red>') . '' . _('Percent of Final Grade') . '' . ($RET['FINAL_GRADE_PERCENT'] != 0 ? '' : '</FONT>')) . '</TD>';
         $header .= '<TD>' . NoInput($RET['TOTAL_PERCENT'] == 1 ? '100%' : '<FONT COLOR=red>' . 100 * $RET['TOTAL_PERCENT'] . '%</FONT>', '' . _('Percent Total') . '') . '</TD>';
     }
     $header .= '</TR>';
     $header .= '</TABLE>';
 } else {
     $header = false;
 }
 if ($header) {
     DrawHeader($header);
     echo '</FORM>';
 }
 // DISPLAY THE MENU
 $LO_options = array('save' => false, 'search' => false, 'add' => true);
 echo '<TABLE><TR>';
 if (count($types_RET)) {
     if ($_REQUEST['assignment_type_id']) {
예제 #2
0
#
#***************************************************************************************
//include_once('modules/Users/includes/functions_staff.php');
#########################################################ENROLLMENT##############################################
echo '<TABLE width=100% border=0 cellpadding=3>';
echo '<TR><td valign="top">';
echo '<TABLE border=0>';
echo '<tr><td style=width:120px><span class=red>*</span>Name</td><td>:</td><td>';
$_SESSION['staff_selected'] = $staff['STAFF_ID'];
if ($_REQUEST['staff_id'] == 'new') {
    echo '<TABLE><TR><TD>' . SelectInput($staff['TITLE'], 'staff[TITLE]', '<span class=red>Salutation</span>', array('Mr.' => 'Mr.', 'Mrs.' => 'Mrs.', 'Ms.' => 'Ms.', 'Miss' => 'Miss', 'Dr' => 'Dr', 'Rev' => 'Rev'), '') . '</TD><TD>' . TextInput($staff['FIRST_NAME'], 'staff[FIRST_NAME]', '<FONT class=red>First</FONT>', 'maxlength=50 class=cell_floating') . '</TD><TD>' . TextInput($staff['MIDDLE_NAME'], 'staff[MIDDLE_NAME]', 'Middle', 'maxlength=50 class=cell_floating') . '</TD><TD>' . TextInput($staff['LAST_NAME'], 'staff[LAST_NAME]', '<FONT color=red>Last</FONT>', 'maxlength=50 class=cell_floating') . '</TD><TD>' . SelectInput($staff['NAME_SUFFIX'], 'staff[NAME_SUFFIX]', 'Suffix', array('Jr.' => 'Jr.', 'Sr.' => 'Sr.', 'II' => 'II', 'III' => 'III', 'IV' => 'IV', 'V' => 'V'), '', 'style="font-size:14px; font-weight:bold;"') . '</TD></TR></TABLE>';
} else {
    echo '<DIV id=user_name><div onclick=\'addHTML("<TABLE><TR><TD>' . str_replace('"', '\\"', SelectInput($staff['TITLE'], 'staff[TITLE]', 'Salutation', array('Mr.' => 'Mr.', 'Mrs.' => 'Mrs.', 'Ms.' => 'Ms.', 'Miss' => 'Miss', 'Dr' => 'Dr', 'Rev' => 'Rev'), '', '', false)) . '</TD><TD>' . str_replace('"', '\\"', TextInput(trim($staff['FIRST_NAME']), 'staff[FIRST_NAME]', (!$staff['FIRST_NAME'] ? '<FONT color=red>' : '') . 'First' . (!$staff['FIRST_NAME'] ? '</FONT>' : ''), 'maxlength=50', false)) . '</TD><TD>' . str_replace('"', '\\"', TextInput($staff['MIDDLE_NAME'], 'staff[MIDDLE_NAME]', 'Middle', 'size=3 maxlength=50', false)) . '</TD><TD>' . str_replace('"', '\\"', TextInput(trim($staff['LAST_NAME']), 'staff[LAST_NAME]', (!$staff['LAST_NAME'] ? '<FONT color=red>' : '') . 'Last' . (!$staff['LAST_NAME'] ? '</FONT>' : ''), 'maxlength=50', false)) . '</TD><TD>' . str_replace('"', '\\"', SelectInput($staff['NAME_SUFFIX'], 'staff[NAME_SUFFIX]', '', array('Jr.' => 'Jr.', 'Sr.' => 'Sr.', 'II' => 'II', 'III' => 'III', 'IV' => 'IV', 'V' => 'V'), '', 'style="font-size:14px; font-weight:bold;"', false)) . '</TD></TR></TABLE>","user_name",true);\'>' . (!$staff['TITLE'] && !$staff['FIRST_NAME'] && !$staff['MIDDLE_NAME'] && !$staff['LAST_NAME'] && !$staff['NAME_SUFFIX'] ? '-' : $staff['TITLE'] . ' ' . $staff['FIRST_NAME'] . ' ' . $staff['MIDDLE_NAME'] . ' ' . $staff['LAST_NAME']) . ' ' . $staff['NAME_SUFFIX'] . '</div></DIV><small>' . (!$staff['FIRST_NAME'] || !$staff['LAST_NAME'] ? '<FONT color=red>' : '<FONT color=' . Preferences('TITLES') . '>') . '</FONT></small>';
}
echo '</td></tr>';
echo '<tr><td>Staff ID</td><td>:</td><td>' . NoInput($staff['STAFF_ID'], '') . '</td></tr>';
echo '<tr><td>Alternate ID</td><td>:</td><td>';
//if($_REQUEST['staff_id']=='new')
//{
echo TextInput($staff['ALTERNATE_ID'], 'staff[ALTERNATE_ID]', '', 'size=12 maxlength=100 class=cell_floating ') . '</td></tr>';
//echo NoInput('Will automatically be assigned','');
//	echo '<span id="ajax_output_stid"></span>';
//}
//else
//{
//    echo NoInput(str_repeat('*',strlen($staff['ALTERNATE_ID'])),'','','class=cell_medium').'</td></tr>';
////echo NoInput($staff['ALTERNATE_ID'],'','','size=10 class=cell_medium maxlength=10').'</td></tr>';
//}
$options = array('Dr.' => 'Dr.', 'Mr.' => 'Mr.', 'Ms.' => 'Ms.', 'Rev.' => 'Rev.', 'Miss.' => 'Miss.');
echo '<tr><td><span class=red></span>Gender</td><td>:</td><td>' . SelectInput($staff['GENDER'], 'staff[GENDER]', '', array('Male' => 'Male', 'Female' => 'Female'), 'N/A', '') . '</td></tr>';
echo '<tr><td><span class=red></span>Date of Birth</td><td>:</td><td>';
예제 #3
0
 // find other students associated with the same account
 $xstudents = DBGet(DBQuery("SELECT s.STUDENT_ID,s.FIRST_NAME||' '||s.LAST_NAME AS FULL_NAME FROM STUDENTS s,FOOD_SERVICE_STUDENT_ACCOUNTS fssa WHERE fssa.ACCOUNT_ID='" . $student['ACCOUNT_ID'] . "' AND s.STUDENT_ID=fssa.STUDENT_ID AND s.STUDENT_ID!='" . UserStudentID() . "'" . ($_REQUEST['include_inactive'] ? '' : " AND exists(SELECT '' FROM STUDENT_ENROLLMENT WHERE STUDENT_ID=s.STUDENT_ID AND SYEAR='" . UserSyear() . "' AND (START_DATE<=CURRENT_DATE AND (END_DATE IS NULL OR CURRENT_DATE<=END_DATE)))")));
 echo '<FORM action="Modules.php?modname=' . $_REQUEST[modname] . '&modfunc=update" method="POST">';
 DrawHeader('<label>' . CheckBoxOnclick('include_inactive') . ' ' . _('Include Inactive Students in Shared Account') . '</label>', SubmitButton(_('Save')));
 echo '<BR />';
 //modif Francois: fix SQL bug invalid numeric data
 if (isset($error)) {
     echo $error;
 }
 PopTable('header', _('Account Information'), 'width="100%"');
 echo '<TABLE class="width-100p">';
 echo '<TR>';
 echo '<TD class="valign-top">';
 echo '<TABLE class="width-100p"><TR>';
 echo '<TD class="valign-top">' . NoInput($student['FULL_NAME'], '<b>' . $student['STUDENT_ID'] . '</b>') . '</TD>';
 echo '<TD class="valign-top">' . NoInput(red($student['BALANCE']), _('Balance')) . '</TD>';
 echo '</TR></TABLE>';
 echo '</TD></TR></TABLE>';
 echo '<HR>';
 echo '<TABLE class="width-100p cellspacing-0 cellpadding-0">';
 echo '<TR><TD class="valign-top">';
 echo '<TABLE class="width-100p cellpadding-6">';
 echo '<TR>';
 echo '<TD>';
 // warn if account non-existent (balance query failed)
 if ($student['BALANCE'] == '') {
     //var_dump($student['ACCOUNT_ID']);
     echo TextInput(array($student['ACCOUNT_ID'], '<span style="color:red">' . $student['ACCOUNT_ID'] . '</span>'), 'food_service[ACCOUNT_ID]', _('Account ID'), 'size=12 maxlength=10');
     $warning = _('Non-existent account!');
     echo button('warning', '', '"#" onMouseOver=\'stm(["' . _('Warning') . '","' . str_replace('"', '\\"', str_replace("'", '&#39;', $warning)) . '"],tipmessageStyle);\' onMouseOut=\'htm()\'');
 } else {
예제 #4
0
         echo '<table><TR><TD><input type="radio" id="noaccs" name="values[SCHOOL][OPENSIS_ACCESS]" value="N">&nbsp;No Access &nbsp;&nbsp; <input type="radio" id="r4" name="values[SCHOOL][OPENSIS_ACCESS]" value="Y"  checked>&nbsp;Access</TD></TR></TABLE>';
     }
     echo '<div id="hideShow">';
 } elseif (!$this_school_mod['USERNAME'] || $this_school['OPENSIS_ACCESS'] == 'N') {
     echo '<table><TR><TD><input type="radio" id="noaccs" name="values[SCHOOL][OPENSIS_ACCESS]" value="N" onClick="hidediv();" checked>&nbsp;No Access &nbsp;&nbsp; <input type="radio" id="r4" name="values[SCHOOL][OPENSIS_ACCESS]" value="Y" onClick="showdiv();">&nbsp;Access</TD></TR></TABLE>';
     echo '<div id="hideShow" style="display:none">';
 }
 echo '<TABLE>';
 $staff_profile = DBGet(DBQuery("SELECT PROFILE_ID FROM staff WHERE STAFF_ID='" . UserStaffID() . "'"));
 echo '<TR><td>Profile</td><td>:</td><TD>' . SelectInput($this_school['OPENSIS_PROFILE'], 'values[SCHOOL][OPENSIS_PROFILE]', '', $option, false, 'id=values[SCHOOL][OPENSIS_PROFILE]') . '</TD><tr>';
 echo '<TR><td>Username<span class=red>*</span></td><td>:</td><TD>';
 if (!$this_school_mod['USERNAME']) {
     echo TextInput('', 'USERNAME', '', 'size=20 maxlength=50 class=cell_floating onblur="usercheck_init_staff(this)"');
     echo '<span id="ajax_output_st"></span><input type=hidden id=usr_err_check value=0>';
 } else {
     echo NoInput($this_school_mod['USERNAME'], '', '', 'class=cell_medium onkeyup="usercheck_init(this)"') . '<div id="ajax_output"></div>' . '</TD></tr>';
 }
 echo '<TR><td>Password<span class=red>*</span></td><td>:</td><TD>';
 if (!$this_school_mod['PASSWORD']) {
     echo TextInput('', 'PASSWORD', '', 'size=20 maxlength=100 class=cell_floating AUTOCOMPLETE = off onblur=passwordStrength(this.value);validate_password_staff(this.value);');
     echo '<span id="ajax_output_st"></span>';
 } else {
     echo TextInput(array($this_school_mod['PASSWORD'], str_repeat('*', strlen($this_school_mod['PASSWORD']))), 'staff_school[PASSWORD]', '', 'size=20 maxlength=100 class=cell_floating AUTOCOMPLETE = off onkeyup=passwordStrength(this.value);validate_password(this.value);');
 }
 echo "<td><span id='passwordStrength'></span></td>";
 echo '<TR>';
 echo '<TD>Disable User</TD><TD>:</TD><TD>';
 if ($this_school_mod['IS_DISABLE'] == 'Y') {
     $dis_val = 'Y';
 } else {
     $dis_val = 'N';
예제 #5
0
}
if (!$_REQUEST['modfunc'] && UserStaffID()) {
    $staff = DBGet(DBQuery("SELECT s.STAFF_ID,s.FIRST_NAME||' '||s.LAST_NAME,(SELECT STATUS FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID=s.STAFF_ID) AS STATUS,(SELECT BALANCE FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID=s.STAFF_ID) AS BALANCE,(SELECT BARCODE FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID=s.STAFF_ID) AS BARCODE FROM STAFF s WHERE s.STAFF_ID='" . UserStaffID() . "'"));
    $staff = $staff[1];
    echo '<TABLE width=100%>';
    echo '<TR>';
    echo '<TD valign=top>';
    echo '<TABLE width=100%><TR>';
    //echo '<TD valign=top>'.NoInput($staff['FULL_NAME'],$staff['STAFF_ID']);
    //if($staff['BALANCE']=='')
    //{
    //	$warning = 'This user does not have a Meal Account.';
    //	echo '<BR>'.button('warning','','# onMouseOver=\'stm(["Warning","'.$warning.'"],["white","#006699","","","",,"black","#e8e8ff","","","",,,,2,"#006699",2,,,,,"",,,,]);\' onMouseOut=\'htm()\'');
    //}
    //echo '</TD>';
    echo '<TD valign=top>' . NoInput(($staff['BALANCE'] < 0 ? '<FONT color=red>' : '') . $staff['BALANCE'] . ($staff['BALANCE'] < 0 ? '</FONT>' : ''), 'Balance');
    if ($staff['BALANCE'] == '') {
        $warning = 'This user does not have a Meal Account.';
        echo '<BR>' . button('warning', '', '# onMouseOver=\'stm(["Warning","' . $warning . '"],["white","#006699","","","",,"black","#e8e8ff","","","",,,,2,"#006699",2,,,,,"",,,,]);\' onMouseOut=\'htm()\'');
    }
    echo '</TD>';
    echo '</TR></TABLE>';
    echo '</TD></TR></TABLE>';
    echo '<HR>';
    echo '<TABLE width=100% border=0 cellpadding=0 cellspacing=0>';
    echo '<TR><TD valign=top>';
    echo '<TABLE border=0 cellpadding=6 width=100%>';
    echo '<TR>';
    $options = array('Inactive' => 'Inactive', 'Disabled' => 'Disabled', 'Closed' => 'Closed');
    echo '<TD>' . SelectInput($staff['STATUS'], 'food_service[STATUS]', 'Status', $options, 'Active') . '</TD>';
    echo '<TD>' . TextInput($staff['BARCODE'], 'food_service[BARCODE]', 'Barcode', 'size=12 maxlength=25') . '</TD>';
예제 #6
0
        }
    }
    //unset($_REQUEST['modfunc']);
    unset($_REQUEST['food_service']);
    unset($_SESSION['_REQUEST_vars']['food_service']);
}
if (!$_REQUEST['modfunc'] && UserStudentID()) {
    $student = DBGet(DBQuery("SELECT s.STUDENT_ID," . (Preferences('NAME') == 'Common' ? 'coalesce(s.CUSTOM_200000002,s.FIRST_NAME)' : 's.FIRST_NAME') . "||' '||s.LAST_NAME AS FULL_NAME,fssa.ACCOUNT_ID,fssa.STATUS,fssa.DISCOUNT,fssa.BARCODE,(SELECT BALANCE FROM FOOD_SERVICE_ACCOUNTS WHERE ACCOUNT_ID=fssa.ACCOUNT_ID) AS BALANCE FROM STUDENTS s,FOOD_SERVICE_STUDENT_ACCOUNTS fssa WHERE s.STUDENT_ID='" . UserStudentID() . "' AND fssa.STUDENT_ID=s.STUDENT_ID"));
    $student = $student[1];
    // find other students associated with the same account
    $xstudents = DBGet(DBQuery("SELECT s.STUDENT_ID," . (Preferences('NAME') == 'Common' ? 'coalesce(s.CUSTOM_200000002,s.FIRST_NAME)' : 's.FIRST_NAME') . "||' '||s.LAST_NAME AS FULL_NAME FROM STUDENTS s,FOOD_SERVICE_STUDENT_ACCOUNTS fssa WHERE fssa.ACCOUNT_ID='" . $student['ACCOUNT_ID'] . "' AND s.STUDENT_ID=fssa.STUDENT_ID AND s.STUDENT_ID!='" . UserStudentID() . "'"));
    echo '<TABLE width=100%>';
    echo '<TR>';
    echo '<TD valign=top>';
    echo '<TABLE width=100%><TR>';
    echo '<TD valign=top>' . NoInput(($student['BALANCE'] < 0 ? '<FONT color=red>' : '') . $student['BALANCE'] . ($student['BALANCE'] < 0 ? '</FONT>' : ''), _('Balance')) . '</TD>';
    echo '</TR></TABLE>';
    echo '</TD></TR></TABLE>';
    echo '<HR>';
    echo '<TABLE width=100% border=0 cellpadding=0 cellspacing=0>';
    echo '<TR><TD valign=top>';
    echo '<TABLE border=0 cellpadding=6 width=100%>';
    echo '<TR>';
    echo '<TD>';
    // warn if account non-existent (balance query failed)
    if ($student['BALANCE'] == '') {
        echo TextInput(array($student['ACCOUNT_ID'], '<FONT color=red>' . $student['ACCOUNT_ID'] . '</FONT>'), 'food_service[ACCOUNT_ID]', _('Account ID'), 'size=12 maxlength=10');
        $warning = 'Non-existent account!';
        echo button('warning', '', '# onMouseOver=\'stm(["Warning","' . $warning . '"],["white","#006699","","","",,"black","#e8e8ff","","","",,,,2,"#006699",2,,,,,"",,,,]);\' onMouseOut=\'htm()\'');
    } else {
        echo TextInput($student['ACCOUNT_ID'], 'food_service[ACCOUNT_ID]', 'Account ID', 'size=12 maxlength=10');
예제 #7
0
 $header .= '<TABLE cellpadding=4 width=100%>';
 $header .= '<TR>';
 $header .= '<TD>' . TextInput($RET['SHORT_NAME'], 'tables[course_periods][' . $_REQUEST['course_period_id'] . '][SHORT_NAME]', 'Short Name', 'class=cell_floating', $div) . '</TD>';
 echo '<input type="hidden" id="hidden_cp_id" value="' . $_REQUEST['course_period_id'] . '">';
 $cal_RET = DBGet(DBQuery("SELECT TITLE,CALENDAR_ID FROM school_calendars WHERE SYEAR='" . UserSyear() . "' AND SCHOOL_ID='" . UserSchool() . "' ORDER BY DEFAULT_CALENDAR DESC"));
 $options = array();
 foreach ($cal_RET as $option) {
     $options[$option['CALENDAR_ID']] = $option['TITLE'];
 }
 if ($_REQUEST[course_period_id] == 'new') {
     $header .= '<TD>' . SelectInput($RET['CALENDAR_ID'], 'tables[course_periods][' . $_REQUEST['course_period_id'] . '][CALENDAR_ID]', 'Calendar', $options, 'N/A', ' id=calendar_id onchange=reset_schedule();', $div) . '</TD>';
 } else {
     $cal_sql = "SELECT TITLE FROM school_calendars WHERE SYEAR='" . UserSyear() . "' AND SCHOOL_ID='" . UserSchool() . "' AND CALENDAR_ID='" . $RET['CALENDAR_ID'] . "'";
     $cal_RET = DBGET(DBQuery($cal_sql));
     $cal_RET = $cal_RET[1];
     $header .= '<TD>' . NoInput($cal_RET['TITLE'], 'Calendar') . '</TD>';
 }
 $teachers_RET = DBGet(DBQuery("SELECT STAFF_ID,LAST_NAME,FIRST_NAME,MIDDLE_NAME FROM staff INNER JOIN staff_school_relationship USING (staff_id) WHERE school_id='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "' AND PROFILE='teacher' AND ISNULL(IS_DISABLE) AND (END_DATE>=CURDATE() OR END_DATE IS NULL OR END_DATE='0000-00-00') AND START_DATE<=CURDATE() ORDER BY LAST_NAME,FIRST_NAME "));
 if (count($teachers_RET)) {
     foreach ($teachers_RET as $teacher) {
         $teachers[$teacher['STAFF_ID']] = $teacher['LAST_NAME'] . ', ' . $teacher['FIRST_NAME'] . ' ' . $teacher['MIDDLE_NAME'];
     }
 }
 $header .= '<TD>' . SelectInput($RET['TEACHER_ID'], 'tables[course_periods][' . $_REQUEST['course_period_id'] . '][TEACHER_ID]', 'Primary Teacher', $teachers, 'N/A', '', $div) . '</TD>';
 $header .= '<TD>' . SelectInput($RET['SECONDARY_TEACHER_ID'], 'tables[course_periods][' . $_REQUEST['course_period_id'] . '][SECONDARY_TEACHER_ID]', 'Secondary Teacher', $teachers, 'N/A', '', $div) . '</TD>';
 $header .= '<TD>' . TextInput($RET['TOTAL_SEATS'], 'tables[course_periods][' . $_REQUEST['course_period_id'] . '][TOTAL_SEATS]', 'Seats', 'size=4 class=cell_floating', $div) . '</TD>';
 if ($_REQUEST['course_period_id'] != 'new') {
     $header .= '<TD><FONT color=green>' . $RET['AVAILABLE_SEATS'] . '</FONT><BR><FONT color=gray><SMALL>Available Seats</SMALL></FONT></TD>';
 } else {
     $header .= '<TD>&nbsp;</TD>';
 }
예제 #8
0
        }
    }
    //unset($_REQUEST['modfunc']);
    unset($_REQUEST['food_service']);
    unset($_SESSION['_REQUEST_vars']['food_service']);
}
if (!$_REQUEST['modfunc'] && UserStudentID()) {
    $student = DBGet(DBQuery("SELECT s.STUDENT_ID,s.FIRST_NAME||' '||s.LAST_NAME AS FULL_NAME,fssa.ACCOUNT_ID,fssa.STATUS,fssa.DISCOUNT,fssa.BARCODE,(SELECT BALANCE FROM FOOD_SERVICE_ACCOUNTS WHERE ACCOUNT_ID=fssa.ACCOUNT_ID) AS BALANCE FROM STUDENTS s,FOOD_SERVICE_STUDENT_ACCOUNTS fssa WHERE s.STUDENT_ID='" . UserStudentID() . "' AND fssa.STUDENT_ID=s.STUDENT_ID"));
    $student = $student[1];
    // find other students associated with the same account
    $xstudents = DBGet(DBQuery("SELECT s.STUDENT_ID,s.FIRST_NAME||' '||s.LAST_NAME AS FULL_NAME FROM STUDENTS s,FOOD_SERVICE_STUDENT_ACCOUNTS fssa WHERE fssa.ACCOUNT_ID='" . $student['ACCOUNT_ID'] . "' AND s.STUDENT_ID=fssa.STUDENT_ID AND s.STUDENT_ID!='" . UserStudentID() . "'"));
    echo '<TABLE class="width-100p">';
    echo '<TR>';
    echo '<TD class="valign-top">';
    echo '<TABLE class="width-100p"><TR>';
    echo '<TD class="valign-top">' . NoInput(($student['BALANCE'] < 0 ? '<span style="color:red">' : '') . $student['BALANCE'] . ($student['BALANCE'] < 0 ? '</span>' : ''), _('Balance')) . '</TD>';
    echo '</TR></TABLE>';
    echo '</TD></TR></TABLE>';
    echo '<HR>';
    echo '<TABLE class="width-100p cellspacing-0 cellpadding-0">';
    echo '<TR><TD class="valign-top">';
    echo '<TABLE class="width-100p cellpadding-6">';
    echo '<TR>';
    echo '<TD>';
    // warn if account non-existent (balance query failed)
    if ($student['BALANCE'] == '') {
        echo TextInput(array($student['ACCOUNT_ID'], '<span style="color:red">' . $student['ACCOUNT_ID'] . '</span>'), 'food_service[ACCOUNT_ID]', _('Account ID'), 'size=12 maxlength=10');
        $warning = _('Non-existent account!');
        echo button('warning', '', '"#" onMouseOver=\'stm(["' . _('Warning') . '","' . str_replace('"', '\\"', str_replace("'", '&#39;', $warning)) . '"],tipmessageStyle);\' onMouseOut=\'htm()\'');
    } else {
        echo TextInput($student['ACCOUNT_ID'], 'food_service[ACCOUNT_ID]', 'Account ID', 'size=12 maxlength=10');
예제 #9
0
     echo "<FORM name=F2 id=F2 action=Modules.php?modname={$_REQUEST['modname']}&table=student_field_categories";
     if ($_REQUEST['category_id'] != 'new') {
         echo "&category_id={$_REQUEST['category_id']}";
     }
     echo " method=POST>";
     if ($_REQUEST[category_id] > 7 || $_REQUEST['category_id'] == 'new') {
         DrawHeaderHome($title, $delete_button . SubmitButton('Save', '', 'class=btn_medium onclick="formcheck_student_studentField_F2();"'));
     }
     $header .= '<TABLE cellpadding=3 width=100%>';
     $header .= '<TR><TD><input type=hidden id=t_id value="' . $_REQUEST['category_id'] . '"/></TD></TR>';
     $header .= '<TR>';
     $header .= '<TD>' . ($_REQUEST['category_id'] <= 7 && $_REQUEST['category_id'] != 'new' ? NoInput($RET['TITLE'], 'Title') : TextInput($RET['TITLE'], 'tables[' . $_REQUEST['category_id'] . '][TITLE]', 'Title')) . '</TD>';
     if ($_REQUEST['category_id'] == 'new' || $RET['SORT_ORDER'] == '') {
         $header .= '<TD>' . ($_REQUEST['category_id'] <= 7 && $_REQUEST['category_id'] != 'new' ? NoInput($RET['SORT_ORDER'], 'Sort Order') : TextInput($RET['SORT_ORDER'], 'tables[' . $_REQUEST['category_id'] . '][SORT_ORDER]', 'Sort Order', 'maxlength=5 onkeydown="return numberOnly(event);"')) . '</TD>';
     } else {
         $header .= '<TD>' . ($_REQUEST['category_id'] <= 7 && $_REQUEST['category_id'] != 'new' ? NoInput($RET['SORT_ORDER'], 'Sort Order') : TextInput($RET['SORT_ORDER'], 'tables[' . $_REQUEST['category_id'] . '][SORT_ORDER]', 'Sort Order', 'maxlength=5 onkeydown=\\"return numberOnly(event);\\"')) . '</TD>';
     }
     $new = $_REQUEST['category_id'] == 'new';
     if ($_REQUEST['category_id'] > 7 || $new) {
         $header .= '<TD>' . TextInput($RET['INCLUDE'], 'tables[' . $_REQUEST['category_id'] . '][INCLUDE]', 'Include (should be left blank for most categories)') . '</TD>';
     }
     $header .= '</TR>';
     $header .= '</TABLE>';
 } else {
     $header = false;
 }
 if ($header) {
     DrawHeaderHome($header);
     echo '</FORM>';
 }
 // DISPLAY THE MENU
예제 #10
0
        }
        unset($_REQUEST['modfunc']);
    } else {
        unset($_REQUEST['modfunc']);
    }
    unset($_REQUEST['submit']);
}
if (UserStudentID() && !$_REQUEST['modfunc']) {
    $student = DBGet(DBQuery("SELECT s.STUDENT_ID,CONCAT(" . (Preferences('NAME') == 'Common' ? 'coalesce(s.CUSTOM_200000002,s.FIRST_NAME)' : 's.FIRST_NAME') . ",' ',s.LAST_NAME) AS FULL_NAME,fsa.ACCOUNT_ID,fsa.STATUS,fsa.DISCOUNT,fsa.BARCODE,(SELECT BALANCE FROM FOOD_SERVICE_ACCOUNTS WHERE ACCOUNT_ID=fsa.ACCOUNT_ID) AS BALANCE FROM STUDENTS s,FOOD_SERVICE_STUDENT_ACCOUNTS fsa WHERE s.STUDENT_ID='" . UserStudentID() . "' AND fsa.STUDENT_ID=s.STUDENT_ID"));
    $student = $student[1];
    echo "<FORM action=Modules.php?modname={$_REQUEST['modname']}&modfunc=submit&menu_id={$_REQUEST['menu_id']} method=POST>";
    DrawHeader('', SubmitButton('Cancel Sale', 'submit[cancel]') . SubmitButton('Complete Sale', 'submit[save]'));
    echo '</FORM>';
    echo '<TABLE width=100%><TR>';
    echo '<TD valign=top>' . NoInput($student['FULL_NAME'], $student['STUDENT_ID']) . '</TD>';
    echo '<TD valign=top>' . NoInput(red($student['BALANCE']), 'Balance') . '</TD>';
    echo '</TR></TABLE>';
    echo '<HR>';
    if ($student['BALANCE']) {
        echo '<TABLE border=0 width=100%>';
        echo '<TR><TD width=100% valign=top>';
        $RET = DBGet(DBQuery('SELECT fsti.DESCRIPTION,fsti.AMOUNT FROM FOOD_SERVICE_TRANSACTIONS fst,FOOD_SERVICE_TRANSACTION_ITEMS fsti WHERE fst.ACCOUNT_ID=' . $student['ACCOUNT_ID'] . ' AND fst.STUDENT_ID=' . UserStudentID() . ' AND fst.SYEAR=' . UserSyear() . ' AND fst.SHORT_NAME=\'' . $menus_RET[$_REQUEST['menu_id']][1]['TITLE'] . '\' AND fst.TIMESTAMP BETWEEN CURRENT_DATE AND \'tomorrow\' AND fsti.TRANSACTION_ID=fst.TRANSACTION_ID'));
        $columns = array('DESCRIPTION' => 'Item', 'AMOUNT' => 'Amount');
        ListOutput($RET, $columns, 'Earlier ' . $menus_RET[$_REQUEST['menu_id']][1]['TITLE'] . ' Sale', 'Earlier ' . $menus_RET[$_REQUEST['menu_id']][1]['TITLE'] . ' Sales', $link, false, array('save' => false, 'search' => false));
        // IMAGE
        if ($file = @fopen($picture = $StudentPicturesPath . '/' . UserSyear() . '/' . UserStudentID() . '.jpg', 'r') || ($file = @fopen($picture = $StudentPicturesPath . '/' . (UserSyear() - 1) . '/' . UserStudentID() . '.jpg', 'r'))) {
            fclose($file);
            echo '<TD rowspan=2 width=150 align=left><IMG SRC="' . $picture . '" width=150></TD>';
        }
        echo '</TD></TR>';
        echo '<TR><TD width=100% valign=top>';
예제 #11
0
echo SelectInput($student['GRADE_ID'], 'values[STUDENT_ENROLLMENT][' . $student_id . '][GRADE_ID]', (!$student['GRADE_ID'] ? '<FONT color=red>' : '') . _('Grade') . (!$student['GRADE_ID'] ? '</FONT>' : ''), $options);
echo '</TD>';
if ($_REQUEST['student_id'] != 'new' && $student['SCHOOL_ID'] != UserSchool()) {
    $_CENTRE['allow_edit'] = $allow_edit;
    $_CENTRE['AllowEdit'][$_REQUEST['modname']] = $AllowEdit;
}
echo '</TR><TR>';
echo '<TD>';
echo TextInput($student['USERNAME'], 'students[USERNAME]', _('Username'));
echo '</TD>';
echo '<TD>';
//echo TextInput($student['PASSWORD'],'students[PASSWORD]','Password');
echo TextInput(array($student['PASSWORD'], str_repeat('*', strlen($student['PASSWORD']))), 'students[PASSWORD]', ($student['USERNAME'] && !$student['PASSWORD'] ? '<FONT color=red>' : '') . _('Password') . ($student['USERNAME'] && !$student['PASSWORD'] ? '</FONT>' : ''));
echo '</TD>';
echo '<TD>';
echo NoInput(makeLogin($student['LAST_LOGIN']), _('Last Login'));
echo '</TD>';
echo '</TR></TABLE>';
// IMAGE
if ($_REQUEST['student_id'] != 'new' && $StudentPicturesPath && (($file = @fopen($picture_path = $StudentPicturesPath . UserSyear() . '/' . UserStudentID() . '.JPG', 'r')) || ($file = @fopen($picture_path = $StudentPicturesPath . (UserSyear() - 1) . '/' . UserStudentID() . '.JPG', 'r')))) {
    fclose($file);
    echo '<TD><IMG SRC="' . $picture_path . '" width=150>';
    if (User('PROFILE') == 'admin' && User('PROFILE') != 'student' && User('PROFILE') != 'parent') {
        echo '<br><a href=Modules.php?modname=Students/Upload.php style="text-decoration:none"><b>Upload Student\'s Photo</b></a></div>';
    }
    echo '</TD><TD valign=top></TD>';
} else {
    if ($_REQUEST['student_id'] != 'new') {
        echo '<TD><div align="center"><IMG SRC="assets/noimage.jpg?id=' . rand(6, 100000) . '" width=144 class=pic>';
        if (User('PROFILE') == 'admin' && User('PROFILE') != 'student' && User('PROFILE') != 'parent') {
            echo '<br><a href=Modules.php?modname=Students/Upload.php style="text-decoration:none"><b>Upload Student\'s Photo</b></a></div>';
예제 #12
0
 $message = '<SELECT name=copy_id><OPTION value="">' . _('N/A');
 foreach ($title_RET as $id => $title) {
     if ($_REQUEST['calendar_id'] && $title['CALENDAR_ID'] == $_REQUEST['calendar_id']) {
         $message .= '<OPTION value="' . $title['CALENDAR_ID'] . '" selected>' . $title['TITLE'] . (AllowEdit() && $title['DEFAULT_CALENDAR'] == 'Y' ? ' (' . _('Default') . ')' : '');
         $default_id = $id;
         $prompt = $title['TITLE'];
     } else {
         $message .= '<OPTION value="' . $title['CALENDAR_ID'] . '">' . ($title['SCHOOL_ID'] != UserSchool() ? $title['SCHOOL_TITLE'] . ':' : '') . $title['TITLE'] . (AllowEdit() && $title['DEFAULT_CALENDAR'] == 'Y' ? ' (' . _('Default') . ')' : '');
     }
 }
 $message .= '</SELECT>';
 //modif Francois: add <label> on checkbox
 $message = '<TABLE><TR><TD colspan="7" class="center"><table><tr><td>' . NoInput('<INPUT type="text" name="title"' . ($_REQUEST['calendar_id'] ? ' value="' . $title_RET[$default_id]['TITLE'] . '"' : '') . '>', _('Title')) . '</td><td><label>' . NoInput('<INPUT type="checkbox" name="default" value="Y"' . ($_REQUEST['calendar_id'] && $title_RET[$default_id]['DEFAULT_CALENDAR'] == 'Y' ? ' checked' : '') . '>') . ' ' . _('Default Calendar for this School') . '</label></td><td>' . NoInput($message, _('Copy Calendar')) . '</td></tr></table></TD></TR>';
 $message .= '<TR><TD colspan="7" class="center"><table><tr><td>' . _('From') . ' ' . NoInput(PrepareDate($_REQUEST['calendar_id'] && $title_RET[$default_id]['START_DATE'] ? $title_RET[$default_id]['START_DATE'] : $fy_RET['START_DATE'], '_min')) . '</td><td>' . _('To') . ' ' . NoInput(PrepareDate($_REQUEST['calendar_id'] && $title_RET[$default_id]['END_DATE'] ? $title_RET[$default_id]['END_DATE'] : $fy_RET['END_DATE'], '_max')) . '</td></tr></table></TD></TR>';
 $message .= '<TR><TD><label>' . NoInput('<INPUT type="checkbox" value="Y" name="weekdays[0]"' . ($_REQUEST['calendar_id'] ? ' checked' : '') . '>') . ' ' . _('Sunday') . '</label></TD><TD><label>' . NoInput('<INPUT type="checkbox" value="Y" name="weekdays[1]" checked />') . ' ' . _('Monday') . '</label></TD><TD><label>' . NoInput('<INPUT type="checkbox" value="Y" name="weekdays[2]" checked />') . ' ' . _('Tuesday') . '</label></TD><TD><label>' . NoInput('<INPUT type="checkbox" value="Y" name="weekdays[3]" checked />') . ' ' . _('Wednesday') . '</label></TD><TD><label>' . NoInput('<INPUT type="checkbox" value="Y" name="weekdays[4]" checked />') . ' ' . _('Thursday') . '</label></TD><TD><label>' . NoInput('<INPUT type="checkbox" value="Y" name="weekdays[5]" checked />') . ' ' . _('Friday') . '<label></TD><TD><label>' . NoInput('<INPUT type="checkbox" value="Y" name="weekdays[6]"' . ($_REQUEST['calendar_id'] ? ' checked' : '') . '>') . ' ' . _('Saturday') . '</label></TD></TR>';
 $message .= '<TR><TD colspan="7" class="center"><table><tr><td>' . NoInput('<INPUT type="text" name="minutes" size="3" maxlength="3">', _('Minutes')) . '</td><td><span class="legend-gray">(' . ($_REQUEST['calendar_id'] ? _('Default is Full Day if Copy Calendar is N/A.') . '<BR />' . _('Otherwise Default is minutes from the Copy Calendar') : _('Default is Full Day')) . ')</span></td></tr></table></TD></TR>';
 $message .= '</TABLE>';
 if (Prompt($_REQUEST['calendar_id'] ? sprintf(_('Recreate %s calendar'), $prompt) : _('Create new calendar'), '', $message)) {
     if ($_REQUEST['calendar_id']) {
         $calendar_id = $_REQUEST['calendar_id'];
     } else {
         $calendar_id = DBGet(DBQuery("SELECT " . db_seq_nextval('CALENDARS_SEQ') . " AS CALENDAR_ID " . FROM_DUAL));
         $calendar_id = $calendar_id[1]['CALENDAR_ID'];
     }
     if ($_REQUEST['default']) {
         DBQuery("UPDATE ATTENDANCE_CALENDARS SET DEFAULT_CALENDAR=NULL WHERE SYEAR='" . UserSyear() . "' AND SCHOOL_ID='" . UserSchool() . "'");
     }
     if ($_REQUEST['calendar_id']) {
         DBQuery("UPDATE ATTENDANCE_CALENDARS SET TITLE='" . $_REQUEST['title'] . "',DEFAULT_CALENDAR='" . $_REQUEST['default'] . "' WHERE CALENDAR_ID='" . $calendar_id . "'");
     } else {
         DBQuery("INSERT INTO ATTENDANCE_CALENDARS (CALENDAR_ID,SYEAR,SCHOOL_ID,TITLE,DEFAULT_CALENDAR) values('" . $calendar_id . "','" . UserSyear() . "','" . UserSchool() . "','" . $_REQUEST['title'] . "','" . $_REQUEST['default'] . "')");
예제 #13
0
echo NoInput($staff['STAFF_ID'], 'Staff ID');
echo '</TD>';
echo '<TD colspan=1>';
echo NoInput($staff['ROLLOVER_ID'], 'Last Year Staff ID');
echo '</TD>';
echo '</TR><TR>';
echo '<TD>';
echo TextInput($staff['USERNAME'], 'staff[USERNAME]', 'Username', 'size=12 maxlength=100 class=cell_floating  onkeyup="usercheck_init(this)"');
echo '<br><div id="ajax_output"></div>';
echo '</TD>';
echo '<TD>';
//echo TextInput($staff['PASSWORD'],'staff[PASSWORD]','Password','size=12 maxlength=100');
echo TextInput(array($staff['PASSWORD'], str_repeat('*', strlen($staff['PASSWORD']))), 'staff[PASSWORD]', 'Password', 'size=12 maxlength=100 class=cell_floating');
echo '</TD>';
echo '<TD>';
echo NoInput(ProperDate(substr($staff['LAST_LOGIN'], 0, 10)) . substr($staff['LAST_LOGIN'], 10), 'Last Login');
echo '</TD>';
echo '</TR></TABLE>';
echo '</TD></TR></TABLE>';
echo '<div class=break></div>';
echo '<TABLE border=0 cellpadding=6 width=100%>';
if (basename($_SERVER['PHP_SELF']) != 'index.php') {
    echo '<TR>';
    echo '<TD>';
    echo '<TABLE><TR><TD>';
    unset($options);
    $profiles_options = DBGet(DBQuery("SELECT PROFILE ,TITLE FROM USER_PROFILES ORDER BY ID"));
    //print_r($profiles_options[1]);
    $i = 1;
    foreach ($profiles_options as $options) {
        $options = array($profiles_options[$i]['PROFILE'] => $profiles_options[$i]['TITLE']);
예제 #14
0
     $header .= '<TR><TD class="valign-top" colspan="2">' . mb_substr($errors, 0, -6) . '</TD></TR>';
     $header .= '</TABLE>';
 } elseif ($_REQUEST['assignment_type_id']) {
     echo '<FORM action="Modules.php?modname=' . $_REQUEST['modname'] . '&table=GRADEBOOK_ASSIGNMENT_TYPES';
     if ($_REQUEST['assignment_type_id'] != 'new') {
         echo '&assignment_type_id=' . $_REQUEST['assignment_type_id'];
     }
     echo '" method="POST">';
     DrawHeader($title, $delete_button . SubmitButton(_('Save')));
     $header .= '<TABLE class="width-100p cellpadding-3">';
     $header .= '<TR>';
     //modif Francois: title is required
     $header .= '<TD>' . TextInput($RET['TITLE'], 'tables[' . $_REQUEST['assignment_type_id'] . '][TITLE]', ($RET['TITLE'] ? '' : '<span style="color:red">') . _('Title') . ($RET['TITLE'] ? '' : '</span>'), 'required') . '</TD>';
     if (Preferences('WEIGHT', 'Gradebook') == 'Y') {
         $header .= '<TD>' . TextInput($RET['FINAL_GRADE_PERCENT'], 'tables[' . $_REQUEST['assignment_type_id'] . '][FINAL_GRADE_PERCENT]', ($RET['FINAL_GRADE_PERCENT'] != 0 ? '' : '<span style="color:red">') . _('Percent of Final Grade') . ($RET['FINAL_GRADE_PERCENT'] != 0 ? '' : '</span>')) . '</TD>';
         $header .= '<TD>' . NoInput($RET['TOTAL_PERCENT'] == 1 ? '100%' : '<span style="color:red">' . 100 * $RET['TOTAL_PERCENT'] . '%</span>', _('Percent Total')) . '</TD>';
     }
     $header .= '<TD>' . TextInput($RET['SORT_ORDER'], 'tables[' . $_REQUEST['assignment_type_id'] . '][SORT_ORDER]', _('Sort Order')) . '</TD>';
     $colors = array('#330099', '#3366FF', '#003333', '#FF3300', '#660000', '#666666', '#333366', '#336633', 'purple', 'teal', 'firebrick', 'tan');
     foreach ($colors as $color) {
         $color_select[$color] = array('<TABLE class="width-100p cellspacing-0 cellpadding-0" style="background-color:' . $color . ';"><TR><TD>&nbsp;</TD></TR></TABLE>', '<TABLE class="cellpadding-1 cellspacing-0" style="width:30px;"><TR><TD style="background-color:' . $color . ';">&nbsp;</TD></TR></TABLE>');
     }
     //modif Francois: add translation
     $header .= '<TD>' . RadioInput($RET['COLOR'], 'tables[' . $_REQUEST['assignment_type_id'] . '][COLOR]', _('Color'), $color_select) . '</TD>';
     $header .= '</TR></TABLE>';
 } else {
     $header = false;
 }
 if ($header) {
     DrawHeader($header);
     echo '</FORM>';
예제 #15
0
            DBQuery('BEGIN; ' . $sql1 . '; ' . $sql2 . '; COMMIT');
            unset($_SESSION['FSA_sale']);
        }
        unset($_REQUEST['modfunc']);
    } else {
        unset($_REQUEST['modfunc']);
    }
    unset($_REQUEST['submit']);
}
if (UserStudentID() && !$_REQUEST['modfunc']) {
    $student = DBGet(DBQuery("SELECT s.STUDENT_ID,s.FIRST_NAME||' '||s.LAST_NAME AS FULL_NAME,fsa.ACCOUNT_ID,fsa.STATUS,fsa.DISCOUNT,fsa.BARCODE,(SELECT BALANCE FROM FOOD_SERVICE_ACCOUNTS WHERE ACCOUNT_ID=fsa.ACCOUNT_ID) AS BALANCE FROM STUDENTS s,FOOD_SERVICE_STUDENT_ACCOUNTS fsa WHERE s.STUDENT_ID='" . UserStudentID() . "' AND fsa.STUDENT_ID=s.STUDENT_ID"));
    $student = $student[1];
    echo '<FORM action="Modules.php?modname=' . $_REQUEST['modname'] . '&modfunc=submit&menu_id=' . $_REQUEST['menu_id'] . '" method="POST">';
    DrawHeader('', SubmitButton(_('Cancel Sale'), 'submit[cancel]') . SubmitButton(_('Complete Sale'), 'submit[save]'));
    echo '</FORM>';
    DrawHeader(NoInput($student['FULL_NAME'], '&nbsp;' . $student['STUDENT_ID']), '', NoInput(red($student['BALANCE']), _('Balance')));
    if ($student['BALANCE'] != '') {
        echo '<TABLE class="width-100p">';
        echo '<TR><TD class="width-100p valign-top">';
        $RET = DBGet(DBQuery('SELECT fsti.DESCRIPTION,fsti.AMOUNT FROM FOOD_SERVICE_TRANSACTIONS fst,FOOD_SERVICE_TRANSACTION_ITEMS fsti WHERE fst.ACCOUNT_ID=\'' . $student['ACCOUNT_ID'] . '\' AND fst.STUDENT_ID=\'' . UserStudentID() . '\' AND fst.SYEAR=\'' . UserSyear() . '\' AND fst.SHORT_NAME=\'' . $menus_RET[$_REQUEST['menu_id']][1]['TITLE'] . '\' AND fst.TIMESTAMP BETWEEN CURRENT_DATE AND \'tomorrow\' AND fsti.TRANSACTION_ID=fst.TRANSACTION_ID'));
        $columns = array('DESCRIPTION' => _('Item'), 'AMOUNT' => _('Amount'));
        $singular = sprintf(_('Earlier %s Sale'), $menus_RET[$_REQUEST['menu_id']][1]['TITLE']);
        $plural = sprintf(_('Earlier %s Sales'), $menus_RET[$_REQUEST['menu_id']][1]['TITLE']);
        ListOutput($RET, $columns, $singular, $plural, $link, false, array('save' => false, 'search' => false));
        // IMAGE
        //modif Francois: fix error Warning: fclose() expects parameter 1 to be resource, boolean given
        //		if($file = @fopen($picture=$StudentPicturesPath.'/'.UserSyear().'/'.UserStudentID().'.jpg','r') || $file = @fopen($picture=$StudentPicturesPath.'/'.(UserSyear()-1).'/'.UserStudentID().'.jpg','r'))
        if (file_exists($picture = $StudentPicturesPath . UserSyear() . '/' . UserStudentID() . '.jpg') || file_exists($picture = $StudentPicturesPath . (UserSyear() - 1) . '/' . UserStudentID() . '.jpg')) {
            //			fclose($file);
            echo '</TD><TD rowspan="2" style="text-align:left; width:150px;"><IMG SRC="' . $picture . '" width="150">';
        }
예제 #16
0
    echo '<TD valign=top>';
    echo '<TABLE width=100%><TR>';
    echo '<TD valign=top>' . NoInput($staff['FULL_NAME'], $staff['STAFF_ID']);
    if (!$staff['ACCOUNT_ID']) {
        $warning = _('This user does not have a Meal Account.');
        echo '<BR>' . button('warning', '', '# onMouseOver=\'stm(["' . _('Warning') . ',"' . $warning . '"],["white","#006699","","","",,"black","#e8e8ff","","","",,,,2,"#006699",2,,,,,"",,,,]);\' onMouseOut=\'htm()\'');
    }
    echo '</TD>';
    echo '<TD valign=top>' . NoInput(red($staff['BALANCE']), _('Balance')) . '</TD>';
    echo '</TR></TABLE>';
    echo '</TD></TR></TABLE>';
    echo '<HR>';
    echo '<TABLE width=100% border=0 cellpadding=0 cellspacing=0>';
    echo '<TR><TD valign=top>';
    echo '<TABLE border=0 cellpadding=6 width=100%>';
    echo '<TR>';
    echo '<TD>';
    $options = array('Inactive' => _('Inactive'), 'Disabled' => _('Disabled'), 'Closed' => _('Closed'));
    echo $staff['ACCOUNT_ID'] ? SelectInput($staff['STATUS'], 'food_service[STATUS]', _('Status'), $options, _('Active')) : NoInput('-', _('Status'));
    echo '</TD>';
    echo '<TD>';
    echo $staff['ACCOUNT_ID'] ? TextInput($staff['BARCODE'], 'food_service[BARCODE]', _('Barcode'), 'size=12 maxlength=25') : NoInput('-', _('Barcode'));
    echo '</TD>';
    echo '</TR>';
    echo '</TABLE>';
    echo '</TD></TR>';
    echo '</TABLE>';
    PopTable('footer');
    echo '<CENTER>' . SubmitButton(_('Save')) . '</CENTER>';
    echo '</FORM>';
}
예제 #17
0
         echo "&category_id={$_REQUEST['category_id']}";
     }
     echo " method=POST>";
     DrawHeaderHome($title, $delete_button . SubmitButton('Save', '', 'class=btn_medium onclick="formcheck_user_userfields_F2();"'));
     //'<INPUT type=submit value=Save>');
     $header .= '<TABLE cellpadding=3 width=100%>';
     $header .= '<TR><TD><input type=hidden id=t_id value="' . $_REQUEST['category_id'] . '"/></TD></TR>';
     $header .= '<TR>';
     $header .= '<TD>' . ($RET['ID'] > 2 || $RET['ID'] == '' ? TextInput($RET['TITLE'], 'tables[' . $_REQUEST['category_id'] . '][TITLE]', 'Title') : NoInput($RET['TITLE'], 'Title')) . '</TD>';
     $header .= '<TD>' . ($RET['SORT_ORDER'] > 2 || $RET['SORT_ORDER'] == '' ? TextInput($RET['SORT_ORDER'], 'tables[' . $_REQUEST['category_id'] . '][SORT_ORDER]', 'Sort Order') : NoInput($RET['SORT_ORDER'], 'Sort Order')) . '</TD>';
     $new = $_REQUEST['category_id'] == 'new';
     $header .= '<TD><TABLE><TR>';
     $header .= '<TD>' . ($RET['ID'] > 2 || $RET['ID'] == '' ? CheckboxInput($RET['ADMIN'], 'tables[' . $_REQUEST['category_id'] . '][ADMIN]', ($_REQUEST['category_id'] == '1' && !$RET['ADMIN'] ? '<FONT color=red>' : '') . 'Administrator' . ($_REQUEST['category_id'] == '1' && !$RET['ADMIN'] ? '</FONT>' : ''), '', $new, '<IMG SRC=assets/check.gif height=15 vspace=0 hspace=0 border=0>', '<IMG SRC=assets/x.gif height=15 vspace=0 hspace=0 border=0>') : NoInput($RET['ADMIN'] == 'Y' ? '<IMG SRC=assets/check.gif height=15 vspace=0 hspace=0 border=0>' : '<IMG SRC=assets/x.gif height=15 vspace=0 hspace=0 border=0>', 'Administrator')) . '</TD>';
     $header .= '<TD>' . ($RET['ID'] > 2 || $RET['ID'] == '' ? CheckboxInput($RET['TEACHER'], 'tables[' . $_REQUEST['category_id'] . '][TEACHER]', ($_REQUEST['category_id'] == '1' && !$RET['TEACHER'] ? '<FONT color=red>' : '') . 'Teacher' . ($_REQUEST['category_id'] == '1' && !$RET['TEACHER'] ? '</FONT>' : ''), '', $new, '<IMG SRC=assets/check.gif height=15 vspace=0 hspace=0 border=0>', '<IMG SRC=assets/x.gif height=15 vspace=0 hspace=0 border=0>') : NoInput($RET['TEACHER'] == 'Y' ? '<IMG SRC=assets/check.gif height=15 vspace=0 hspace=0 border=0>' : '<IMG SRC=assets/x.gif height=15 vspace=0 hspace=0 border=0>', 'Teacher')) . '</TD>';
     $header .= '<TD>' . ($RET['ID'] > 2 || $RET['ID'] == '' ? CheckboxInput($RET['PARENT'], 'tables[' . $_REQUEST['category_id'] . '][PARENT]', ($_REQUEST['category_id'] == '1' && !$RET['PARENT'] ? '<FONT color=red>' : '') . 'Parent' . ($_REQUEST['category_id'] == '1' && !$RET['TEACHER'] ? '</FONT>' : ''), '', $new, '<IMG SRC=assets/check.gif height=15 vspace=0 hspace=0 border=0>', '<IMG SRC=assets/x.gif height=15 vspace=0 hspace=0 border=0>') : NoInput($RET['PARENT'] == 'Y' ? '<IMG SRC=assets/check.gif height=15 vspace=0 hspace=0 border=0>' : '<IMG SRC=assets/x.gif height=15 vspace=0 hspace=0 border=0>', 'Parent')) . '</TD>';
     $header .= '<TD>' . ($RET['ID'] > 2 || $RET['ID'] == '' ? CheckboxInput($RET['NONE'], 'tables[' . $_REQUEST['category_id'] . '][NONE]', ($_REQUEST['category_id'] == '1' && !$RET['NONE'] ? '<FONT color=red>' : '') . 'No Access' . ($_REQUEST['category_id'] == '1' && !$RET['TEACHER'] ? '</FONT>' : ''), '', $new, '<IMG SRC=assets/check.gif height=15 vspace=0 hspace=0 border=0>', '<IMG SRC=assets/x.gif height=15 vspace=0 hspace=0 border=0>') : NoInput($RET['NONE'] == 'Y' ? '<IMG SRC=assets/check.gif height=15 vspace=0 hspace=0 border=0>' : '<IMG SRC=assets/x.gif height=15 vspace=0 hspace=0 border=0>', 'No Access')) . '</TD>';
     $header .= '</TR>';
     $header .= '<TR><TD colspan=4><small><FONT color=' . Preferences('TITLES') . '>Profiles</FONT></small></TD></TR>';
     $header .= '</TABLE></TD>';
     if ($_REQUEST['category_id'] > 2 || $new) {
         $header .= '</TR><TR>';
         $header .= '<TD colspan=2></TD>';
         $header .= '<TD>' . TextInput($RET['INCLUDE'], 'tables[' . $_REQUEST['category_id'] . '][INCLUDE]', 'Include (should be left blank for most categories)') . '</TD>';
     }
     $header .= '</TR>';
     $header .= '</TABLE>';
 } else {
     $header = false;
 }
 if ($header) {
     DrawHeaderHome($header);
예제 #18
0
StaffWidgets('fsa_barcode');
StaffWidgets('fsa_exists_Y');
$extra['SELECT'] .= ",(SELECT coalesce(STATUS,'Active') FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID=s.STAFF_ID) AS STATUS";
$extra['SELECT'] .= ",(SELECT BALANCE FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID=s.STAFF_ID) AS BALANCE";
$extra['functions'] += array('BALANCE' => 'red');
$extra['columns_after'] = array('BALANCE' => _('Balance'), 'STATUS' => _('Status'));
Search('staff_id', $extra);
if (UserStaffID()) {
    $staff = DBGet(DBQuery("SELECT s.STAFF_ID,s.FIRST_NAME||' '||s.LAST_NAME AS FULL_NAME,(SELECT STAFF_ID FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID=s.STAFF_ID) AS ACCOUNT_ID,(SELECT BALANCE FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID=s.STAFF_ID) AS BALANCE FROM STAFF s WHERE s.STAFF_ID='" . UserStaffID() . "'"));
    $staff = $staff[1];
    echo '<FORM action="' . PreparePHP_SELF() . '" method="POST">';
    DrawHeader(_('Timeframe') . ':' . PrepareDate($start_date, '_start') . ' ' . _('to') . ' ' . PrepareDate($end_date, '_end') . ' : ' . $type_select . ' : <INPUT type="submit" value="' . _('Go') . '">');
    echo '</FORM>';
    //modif Francois: fix bug no balance
    //	DrawHeader(NoInput($staff['FULL_NAME'],'&nbsp;'.$staff['STAFF_ID']),'', NoInput(red($student['BALANCE']),_('Balance')));
    DrawHeader(NoInput($staff['FULL_NAME'], '&nbsp;' . $staff['STAFF_ID']), '', NoInput(red($staff['BALANCE']), _('Balance')));
    if ($_REQUEST['detailed_view'] != 'true') {
        DrawHeader("<A HREF=" . PreparePHP_SELF($_REQUEST, array(), array('detailed_view' => 'true')) . ">" . _('Detailed View') . "</A>");
    } else {
        DrawHeader("<A HREF=" . PreparePHP_SELF($_REQUEST, array(), array('detailed_view' => 'false')) . ">" . _('Original View') . "</A>");
    }
    if ($staff['ACCOUNT_ID'] && $staff['BALANCE'] != '') {
        if ($_REQUEST['type_select']) {
            $where = " AND fst.SHORT_NAME='" . $_REQUEST['type_select'] . "'";
        }
        if ($_REQUEST['detailed_view'] == 'true') {
            $RET = DBGet(DBQuery("SELECT fst.TRANSACTION_ID AS TRANS_ID,fst.TRANSACTION_ID,(SELECT sum(AMOUNT) FROM FOOD_SERVICE_STAFF_TRANSACTION_ITEMS WHERE TRANSACTION_ID=fst.TRANSACTION_ID) AS AMOUNT,fst.STAFF_ID,fst.BALANCE,to_char(fst.TIMESTAMP,'YYYY-MM-DD') AS DATE,to_char(fst.TIMESTAMP,'HH:MI:SS AM') AS TIME,fst.DESCRIPTION," . db_case(array('fst.SELLER_ID', "''", 'NULL', "(SELECT FIRST_NAME||' '||LAST_NAME FROM STAFF WHERE STAFF_ID=fst.SELLER_ID)")) . " AS SELLER FROM FOOD_SERVICE_STAFF_TRANSACTIONS fst WHERE fst.STAFF_ID='" . UserStaffID() . "' AND fst.SYEAR='" . UserSyear() . "' AND fst.TIMESTAMP BETWEEN '" . $start_date . "' AND date '" . $end_date . "' +1" . $where . " ORDER BY fst.TRANSACTION_ID DESC"), array('DATE' => 'ProperDate', 'BALANCE' => 'red'));
            //modif Francois: add translation
            foreach ($RET as $RET_key => $RET_val) {
                $RET[$RET_key] = array_map('types_locale', $RET_val);
            }
예제 #19
0
echo '</td></tr>';
echo '<tr><td>' . _('Email Address') . '</td><td>:</td><td>';
echo TextInput($staff['EMAIL'], 'staff[EMAIL]', '', 'size=25 maxlength=100 id=email class=cell_floating');
echo '</TD></tr>';
echo '<tr><td>' . _('Phone Number') . '</td><td>:</td><td><table cellpadding=0 cellspacing=0><tr><td>';
echo TextInput($staff['PHONE'], 'staff[PHONE]', '', 'size=25 maxlength=100 class=cell_floating');
echo '</td></tr></table></TD>';
if ($_REQUEST['staff_id'] != 'new') {
    echo '<TR><TD>';
    echo '' . _('Disable User') . '</TD><TD>:</TD><TD>' . CheckboxInput($staff['IS_DISABLE'], 'staff[IS_DISABLE]', '', 'CHECKED', $new, '<IMG SRC=assets/check.gif width=15>', '<IMG SRC=assets/x.gif width=15>');
    echo '</TD></TR>';
    echo '<TR><TD>';
    echo '' . _('Last Login') . '</TD><TD>:</TD><TD>' . NoInput(ProperDate(substr($staff['LAST_LOGIN'], 0, 10)) . substr($staff['LAST_LOGIN'], 10));
    echo '</TD></TR>';
    echo '<TR><TD>';
    echo '' . _('Staff ID') . '</TD><TD>:</TD><TD>' . NoInput($staff['STAFF_ID']);
    echo '</TD></TR>';
}
echo '</TR>';
echo '</table></td>';
echo '<TD>';
$UserPicturesPath = 'assets/UserPhotos/';
$profile = DBGet(DBQuery('SELECT PROFILE FROM staff WHERE STAFF_ID=\'' . UserStaffID() . '\' '));
if ($profile[1]['PROFILE'] != 'parent') {
    if ($_REQUEST['staff_id'] != 'new' && $UserPicturesPath && (($file = @fopen($picture_path = $UserPicturesPath . '/' . UserStudentID() . '.JPG', 'r')) || ($file = @fopen($picture_path = $UserPicturesPath . '/' . UserStaffID() . '.JPG', 'r')))) {
        fclose($file);
        echo '<div width=150 align="center"><IMG SRC="' . $picture_path . '?id=' . rand(6, 100000) . '" width=150 class=pic>';
        if (User('PROFILE') == 'admin' && User('PROFILE') != 'student' && User('PROFILE') != 'parent') {
            echo '<br><a href=Modules.php?modname=Users/UploadUserPhoto.php?modfunc=edit style="text-decoration:none"><b>' . _("Update Staff's Photo") . '</b></a></div>';
        } else {
            echo '';
예제 #20
0
 echo '<TABLE>';
 $staff_profile = DBGet(DBQuery("SELECT PROFILE_ID FROM staff WHERE STAFF_ID='" . UserStaffID() . "'"));
 //                        if($staff_profile[1]['PROFILE_ID']!='')
 //                        echo '<TR><td>Profile</td><td>:</td><TD> '.SelectInput($this_school['OPENSIS_PROFILE'],'values[SCHOOL][OPENSIS_PROFILE]','',$option,false,'id=values[SCHOOL][OPENSIS_PROFILE] disabled=disabled').'</TD><tr>';
 //                        else
 echo '<TR><td>Profile</td><td>:</td><TD>' . SelectInput($this_school['OPENSIS_PROFILE'], 'values[SCHOOL][OPENSIS_PROFILE]', '', $option, false, 'id=values[SCHOOL][OPENSIS_PROFILE]') . '</TD><tr>';
 echo '<TR><td>Username</td><td>:</td><TD>';
 if (!$this_school_mod['USERNAME']) {
     echo NoInput('Will automatically be assigned', '');
     echo '<span id="ajax_output_stid"></span>';
 } else {
     echo NoInput($this_school_mod['USERNAME'], '', '', 'class=cell_medium onkeyup="usercheck_init(this)"') . '<div id="ajax_output"></div>' . '</TD></tr>';
 }
 echo '<TR><td>Password</td><td>:</td><TD>';
 if (!$this_school_mod['PASSWORD']) {
     echo NoInput('Will automatically be assigned', '');
     echo '<span id="ajax_output_stid"></span>';
 } else {
     #   echo NoInput($this_school_mod['PASSWORD'],'','','class=cell_medium').'</TD></tr></table>';
     echo TextInput(array($this_school_mod['PASSWORD'], str_repeat('*', strlen($this_school_mod['PASSWORD']))), 'staff_school[PASSWORD]', '', 'size=20 maxlength=100 class=cell_floating AUTOCOMPLETE = off onkeyup=passwordStrength(this.value);validate_password(this.value);');
 }
 echo "<td><span id='passwordStrength'></span></td>";
 echo '<TR>';
 echo '<TD>Disable User</TD><TD>:</TD><TD>';
 if ($this_school_mod['IS_DISABLE'] == 'Y') {
     $dis_val = 'Y';
 } else {
     $dis_val = 'N';
 }
 echo CheckboxInput_No($dis_val, 'staff_school[IS_DISABLE]', '', 'CHECKED', $new, '<IMG SRC=assets/check.gif width=15>', '<IMG SRC=assets/x.gif width=15>');
 echo '</TD>';
예제 #21
0
echo '</td></tr>';
echo '</table>';
echo '</td></TR>';
echo '<TR><td height="30px" colspan=2 class=hseparator><b>Access Information</b></td></tr><tr><td colspan="2">';
echo '<TABLE border=0>';
echo '<tr><td style=width:120px>Username</td><td>:</td><td>';
echo TextInput($student['USERNAME'], 'students[USERNAME]', '', 'class=cell_medium onkeyup="usercheck_init_student(this)"');
echo '<span id="ajax_output_st"></span>';
echo '</td></tr>';
echo '<tr><td>Password</td><td>:</td><td>';
echo TextInput(array($student['PASSWORD'], str_repeat('*', strlen($student['PASSWORD']))), 'students[PASSWORD]', '', 'class=cell_medium onkeyup=passwordStrength(this.value)', 'AUTOCOMPLETE = off');
echo '<div id="passwordStrength" style=display:none></div>';
echo '</td></tr>';
if ($_REQUEST['student_id'] != 'new') {
    echo '<tr><td>Last Login</td><td>:</td><td>';
    echo NoInput(ProperDate(substr($student['LAST_LOGIN'], 0, 10)) . substr($student['LAST_LOGIN'], 10), '');
    echo '</td></tr>';
}
echo '</table>';
//jc
if (User('PROFILE') == 'admin') {
    echo '<TABLE border=0>';
    echo '<TR><td height="30px" ><b>Manage Student</b></td></tr><tr><td colspan="2">';
    echo '<tr><td>Select to Delete Student</td><td>:</td><td>';
    echo CheckboxInput($student['IS_DISABLE'], 'students[IS_DISABLE]', '', 'CHECKED', $new, '<IMG SRC=assets/check.gif width=15>', '<IMG SRC=assets/x.gif width=15>');
    echo '</td></tr>';
    echo '<tr><td>';
    echo "please only delete inactive student";
    echo '</td></tr>';
    echo '</table>';
}
예제 #22
0
} else {
    echo '<DIV id=user_name><div onclick=\'addHTML("<TABLE><TR><TD>' . str_replace('"', '\\"', SelectInput($staff['TITLE'], 'people[TITLE]', 'Title', array('Mr.' => 'Mr.', 'Mrs.' => 'Mrs.', 'Ms.' => 'Ms.', 'Miss' => 'Miss', 'Dr' => 'Dr', 'Rev' => 'Rev'), '', '', false)) . '</TD><TD>' . str_replace('"', '\\"', TextInput($staff['FIRST_NAME'], 'people[FIRST_NAME]', (!$staff['FIRST_NAME'] ? '<FONT color=red>' : '') . 'First' . (!$staff['FIRST_NAME'] ? '</FONT>' : ''), 'id=fname size=20 maxlength=50', false)) . '</TD><TD>' . str_replace('"', '\\"', TextInput($staff['MIDDLE_NAME'], 'people[MIDDLE_NAME]', 'Middle', 'size=18 maxlength=50', false)) . '</TD><TD>' . str_replace('"', '\\"', TextInput($staff['LAST_NAME'], 'people[LAST_NAME]', (!$staff['LAST_NAME'] ? '<FONT color=red>' : '') . 'Last' . (!$staff['LAST_NAME'] ? '</FONT>' : ''), 'id=lname size=20 maxlength=50', false)) . '</TD></TR></TABLE>","user_name",true);\'>' . (!$staff['TITLE'] && !$staff['FIRST_NAME'] && !$staff['MIDDLE_NAME'] && !$staff['LAST_NAME'] ? '-' : $staff['TITLE'] . ' ' . $staff['FIRST_NAME'] . ' ' . $staff['MIDDLE_NAME'] . ' ' . $staff['LAST_NAME']) . '</div></DIV><small>' . (!$staff['FIRST_NAME'] || !$staff['LAST_NAME'] ? '<FONT color=red>' : '<FONT color=' . Preferences('TITLES') . '>') . '</FONT></small>';
}
echo '</td></tr>';
echo '<tr><td><span class=red>*</span>Email Address</td><td>:</td><td>';
echo TextInput($staff['EMAIL'], 'people[EMAIL]', '', 'size=25 maxlength=100 id=email class=cell_floating onkeyup=check_email(this,' . $id_sent . ',4); onblur=check_email(this,' . $id_sent . ',4)') . '<span id="email_error"></span>';
echo '</TD></tr>';
if ($_REQUEST['staff_id'] != 'new') {
    echo '<TR><TD>';
    echo 'Disable User</TD><TD>:</TD><TD>' . CheckboxInput($staff['IS_DISABLE'], 'people[IS_DISABLE]', '', 'CHECKED', $new, '<IMG SRC=assets/check.gif width=15>', '<IMG SRC=assets/x.gif width=15>');
    echo '</TD></TR>';
    echo '<TR><TD>';
    echo 'Last Login</TD><TD>:</TD><TD>' . NoInput(ProperDate(substr($staff['LAST_LOGIN'], 0, 10)) . substr($staff['LAST_LOGIN'], 10));
    echo '</TD></TR>';
    echo '<TR><TD>';
    echo 'User ID</TD><TD>:</TD><TD>' . NoInput($staff['STAFF_ID']);
    echo '</TD></TR>';
    $det = DBGet(DBQuery('SELECT HOME_PHONE,WORK_PHONE,CELL_PHONE,EMAIL FROM people WHERE STAFF_ID=' . $staff['STAFF_ID']));
    $det = $det[1];
    echo '<TR><TD>';
    echo 'Home Phone</TD><TD>:</TD><TD>';
    echo TextInput($det['HOME_PHONE'], 'people[HOME_PHONE]', '', 'size=25 maxlength=100  class=cell_floating');
    echo '</TD></TR>';
    echo '<TR><TD>';
    echo 'Work Phone</TD><TD>:</TD><TD>';
    echo TextInput($det['WORK_PHONE'], 'people[WORK_PHONE]', '', 'size=25 maxlength=100  class=cell_floating');
    echo '</TD></TR>';
    echo '<TR><TD>';
    echo 'Cell Phone</TD><TD>:</TD><TD>';
    echo TextInput($det['CELL_PHONE'], 'people[CELL_PHONE]', '', 'size=25 maxlength=100 class=cell_floating');
    echo '</TD></TR>';
예제 #23
0
        }
        unset($_REQUEST['modfunc']);
    } else {
        unset($_REQUEST['modfunc']);
    }
    unset($_REQUEST['submit']);
}
if (UserStaffID() && !$_REQUEST['modfunc']) {
    $staff = DBGet(DBQuery("SELECT s.STAFF_ID,s.FIRST_NAME||' '||s.LAST_NAME AS FULL_NAME,(SELECT STAFF_ID FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID=s.STAFF_ID) AS ACCOUNT_ID,(SELECT BALANCE FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID=s.STAFF_ID) AS BALANCE FROM STAFF s WHERE s.STAFF_ID='" . UserStaffID() . "'"));
    $staff = $staff[1];
    echo "<FORM action=Modules.php?modname={$_REQUEST['modname']}&modfunc=submit&menu_id={$_REQUEST['menu_id']} method=POST>";
    DrawHeader('', SubmitButton(_('Cancel Sale'), 'submit[cancel]') . SubmitButton(_('Complete Sale'), 'submit[save]'));
    echo '</FORM>';
    echo '<TABLE width=100%><TR>';
    echo '<TD valign=top>' . NoInput($staff['FULL_NAME'], $staff['STAFF_ID']) . '</TD>';
    echo '<TD valign=top>' . NoInput(red($staff['BALANCE']), _('Balance')) . '</TD>';
    echo '</TR></TABLE>';
    echo '<HR>';
    if ($staff['ACCOUNT_ID'] && $staff['BALANCE'] != '') {
        echo '<TABLE border=0 width=100%>';
        echo '<TR><TD width=100% valign=top>';
        $RET = DBGet(DBQuery("SELECT fsti.DESCRIPTION,fsti.AMOUNT FROM FOOD_SERVICE_STAFF_TRANSACTIONS fst,FOOD_SERVICE_STAFF_TRANSACTION_ITEMS fsti WHERE fst.STAFF_ID='" . UserStaffID() . "' AND fst.SYEAR='" . UserSyear() . "' AND fst.SHORT_NAME='" . $menus_RET[$_REQUEST['menu_id']][1]['TITLE'] . "' AND fst.TIMESTAMP BETWEEN CURRENT_DATE AND CURRENT_DATE+1 AND fsti.TRANSACTION_ID=fst.TRANSACTION_ID"));
        $columns = array('DESCRIPTION' => _('Item'), 'AMOUNT' => _('Amount'));
        $singular = sprintf(_('Earlier %s Sale'), $menus_RET[$_REQUEST['menu_id']][1]['TITLE']);
        $plural = sprintf(_('Earlier %s Sales'), $menus_RET[$_REQUEST['menu_id']][1]['TITLE']);
        ListOutput($RET, $columns, $singular, $plural, $link, false, array('save' => false, 'search' => false));
        // IMAGE
        if ($file = @fopen($picture = $UserPicturesPath . '/' . UserSyear() . '/' . UserStaffID() . '.JPG', 'r') || ($file = @fopen($picture = $UserPicturesPath . '/' . (UserSyear() - 1) . '/' . UserStaffID() . '.JPG', 'r'))) {
            fclose($file);
            echo '<TD rowspan=2 width=150 align=left><IMG SRC="' . $picture . '" width=150></TD>';
        }
예제 #24
0
 $title_RET = DBGet(DBQuery("SELECT ac.CALENDAR_ID,ac.TITLE,ac.DEFAULT_CALENDAR,ac.SCHOOL_ID,(SELECT coalesce(SHORT_NAME,TITLE) FROM SCHOOLS WHERE SYEAR=ac.SYEAR AND ID=ac.SCHOOL_ID) AS SCHOOL_TITLE,(SELECT min(SCHOOL_DATE) FROM ATTENDANCE_CALENDAR WHERE CALENDAR_ID=ac.CALENDAR_ID) AS START_DATE,(SELECT max(SCHOOL_DATE) FROM ATTENDANCE_CALENDAR WHERE CALENDAR_ID=ac.CALENDAR_ID) AS END_DATE FROM ATTENDANCE_CALENDARS ac,STAFF s WHERE ac.SYEAR='" . UserSyear() . "' AND s.STAFF_ID='" . User('STAFF_ID') . "' AND (s.SCHOOLS IS NULL OR position(','||ac.SCHOOL_ID||',' IN s.SCHOOLS)>0) ORDER BY " . db_case(array('ac.SCHOOL_ID', "'" . UserSchool() . "'", 0, 'ac.SCHOOL_ID')) . ",ac.DEFAULT_CALENDAR ASC,ac.TITLE"));
 $message = '<SELECT name=copy_id><OPTION value="">N/A';
 foreach ($title_RET as $id => $title) {
     if ($_REQUEST['calendar_id'] && $title['CALENDAR_ID'] == $_REQUEST['calendar_id']) {
         $message .= '<OPTION value="' . $title['CALENDAR_ID'] . '" selected>' . $title['TITLE'] . (AllowEdit() && $title['DEFAULT_CALENDAR'] == 'Y' ? ' (default)' : '');
         $default_id = $id;
         $prompt = $title['TITLE'];
     } else {
         $message .= '<OPTION value="' . $title['CALENDAR_ID'] . '">' . ($title['SCHOOL_ID'] != UserSchool() ? $title['SCHOOL_TITLE'] . ':' : '') . $title['TITLE'] . (AllowEdit() && $title['DEFAULT_CALENDAR'] == 'Y' ? ' (default)' : '');
     }
 }
 $message .= '</SELECT>';
 $message = '<TABLE><TR><TD colspan=7 align=center><table><tr><td>' . NoInput('<INPUT type=text name=title' . ($_REQUEST['calendar_id'] ? ' value=' . $title_RET[$default_id]['TITLE'] : '') . '>', _('Title')) . '</td><td>' . NoInput('<INPUT type=checkbox name=default value=Y' . ($_REQUEST['calendar_id'] && $title_RET[$default_id]['DEFAULT_CALENDAR'] == 'Y' ? ' checked' : '') . '>', _('Default Calendar for this School')) . '</td><td>' . NoInput($message, _('Copy Calendar')) . '</td></tr></table></TD></TR>';
 $message .= '<TR><TD colspan=7 align=center><table><tr><td>' . NoInput(PrepareDate($_REQUEST['calendar_id'] && $title_RET[$default_id]['START_DATE'] ? $title_RET[$default_id]['START_DATE'] : $fy_RET['START_DATE'], '_min'), _('From')) . '</td><td>' . NoInput(PrepareDate($_REQUEST['calendar_id'] && $title_RET[$default_id]['END_DATE'] ? $title_RET[$default_id]['END_DATE'] : $fy_RET['END_DATE'], '_max'), _('To')) . '</td></tr></table></TD></TR>';
 $message .= '<TR><TD>' . NoInput('<INPUT type=checkbox value=Y name=weekdays[0]' . ($_REQUEST['calendar_id'] ? ' CHECKED' : '') . '>', _('Sunday')) . '</TD><TD>' . NoInput('<INPUT type=checkbox value=Y name=weekdays[1] CHECKED>', _('Monday')) . '</TD><TD>' . NoInput('<INPUT type=checkbox value=Y name=weekdays[2] CHECKED>', _('Tuesday')) . '</TD><TD>' . NoInput('<INPUT type=checkbox value=Y name=weekdays[3] CHECKED>', _('Wednesday')) . '</TD><TD>' . NoInput('<INPUT type=checkbox value=Y name=weekdays[4] CHECKED>', _('Thursday')) . '</TD><TD>' . NoInput('<INPUT type=checkbox value=Y name=weekdays[5] CHECKED>', _('Friday')) . '</TD><TD>' . NoInput('<INPUT type=checkbox value=Y name=weekdays[6]' . ($_REQUEST['calendar_id'] ? ' CHECKED' : '') . '>', _('Saturday')) . '</TD></TR>';
 $message .= '<TR><TD colspan=7 align=center><table><tr><td>' . NoInput('<INPUT type=text name=minutes size=3 maxlength=3>', _('Minutes')) . '</td><td><FONT color=' . Preferences('TITLES') . '><SMALL>(' . ($_REQUEST['calendar_id'] ? _('Default is Full Day if Copy Calendar is N/A.') . '<BR>' . _('Otherwise Default is minutes from the Copy Calendar') : _('Default is Full Day')) . ')</SMALL></FONT></td></tr></table></TD></TR>';
 $message .= '</TABLE>';
 if (Prompt($_REQUEST['calendar_id'] ? sprintf(_('Recreate %s calendar'), $prompt) : _('Create new calendar'), '', $message)) {
     if ($_REQUEST['calendar_id']) {
         $calendar_id = $_REQUEST['calendar_id'];
     } else {
         $calendar_id = DBGet(DBQuery("SELECT " . db_seq_nextval('CALENDARS_SEQ') . " AS CALENDAR_ID " . FROM_DUAL));
         $calendar_id = $calendar_id[1]['CALENDAR_ID'];
     }
     if ($_REQUEST['default']) {
         DBQuery("UPDATE ATTENDANCE_CALENDARS SET DEFAULT_CALENDAR=NULL WHERE SYEAR='" . UserSyear() . "' AND SCHOOL_ID='" . UserSchool() . "'");
     }
     if ($_REQUEST['calendar_id']) {
         DBQuery("UPDATE ATTENDANCE_CALENDARS SET TITLE='" . $_REQUEST['title'] . "',DEFAULT_CALENDAR='" . $_REQUEST['default'] . "' WHERE CALENDAR_ID='" . $calendar_id . "'");
     } else {
         DBQuery("INSERT INTO ATTENDANCE_CALENDARS (CALENDAR_ID,SYEAR,SCHOOL_ID,TITLE,DEFAULT_CALENDAR) values('" . $calendar_id . "','" . UserSyear() . "','" . UserSchool() . "','" . $_REQUEST['title'] . "','" . $_REQUEST['default'] . "')");