����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
$date = RequestedDate( 'date', DBDate(), 'set' );
DrawHeader( ProgramTitle() );
$day = date( 'D', strtotime( $date ) );
switch ( $day )
{
case 'Sun':
$day = 'U';
break;
case 'Thu':
$day = 'H';
break;
default:
$day = mb_substr( $day, 0, 1 );
break;
}
$periods_RET = DBGet( "SELECT sp.PERIOD_ID,sp.TITLE
FROM school_periods sp
WHERE sp.SCHOOL_ID='" . UserSchool() . "'
AND sp.SYEAR='" . UserSyear() . "'
AND EXISTS (SELECT '' FROM course_periods
WHERE SYEAR=sp.SYEAR
AND PERIOD_ID=sp.PERIOD_ID
AND DOES_FS_COUNTS='Y')
ORDER BY sp.SORT_ORDER IS NULL,sp.SORT_ORDER" );
$period_select = '<select name="school_period" id="school_period" onChange="ajaxPostForm(this.form,true);">
<option value="">' . _( 'All' ) . '</option>';
foreach ( (array) $periods_RET as $period )
{
$period_select .= '<option value="' . AttrEscape( $period['PERIOD_ID'] ) . '"' . ( ( $_REQUEST['school_period'] == $period['PERIOD_ID'] ) ? ' selected' : '' ) . ">" . $period['TITLE'] . '</option>';
}
$period_select .= '</select>
<label for="school_period" class="a11y-hidden">' . _( 'Period' ) . '</label>';
// FJ multiple school periods for a course period.
$sql = "SELECT " . DisplayNameSQL( 's' ) . " AS FULL_NAME,sp.TITLE,cpsp.PERIOD_ID,s.STAFF_ID
FROM staff s,course_periods cp,school_periods sp, course_period_school_periods cpsp
WHERE cp.COURSE_PERIOD_ID=cpsp.COURSE_PERIOD_ID
AND sp.PERIOD_ID = cpsp.PERIOD_ID
AND cp.TEACHER_ID=s.STAFF_ID
AND cp.MARKING_PERIOD_ID IN (" . GetAllMP( 'QTR', UserMP() ) . ")
AND cp.SYEAR='" . UserSyear() . "'
AND cp.SCHOOL_ID='" . UserSchool() . "'
AND s.PROFILE='teacher'
AND cp.DOES_FS_COUNTS='Y' " .
( ( $_REQUEST['school_period'] ) ? " AND cpsp.PERIOD_ID='" . (int) $_REQUEST['school_period'] . "'" : '' ) .
" AND position('" . $day . "' in cpsp.DAYS)>0";
$RET = DBGet( $sql, [], [ 'STAFF_ID', 'PERIOD_ID' ] );
$menus_RET = DBGet( 'SELECT MENU_ID,TITLE FROM food_service_menus WHERE SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY SORT_ORDER IS NULL,SORT_ORDER', [], [ 'MENU_ID' ] );
if ( empty( $_REQUEST['menu_id'] ) )
{
if ( empty( $_SESSION['FSA_menu_id'] ) )
{
if ( ! empty( $menus_RET ) )
{
$_REQUEST['menu_id'] = $_SESSION['FSA_menu_id'] = key( $menus_RET );
}
else
{
ErrorMessage( [ _( 'There are no menus yet setup.' ) ], 'fatal' );
}
}
else
{
$_REQUEST['menu_id'] = $_SESSION['FSA_menu_id'];
}
unset( $_SESSION['FSA_sale'] );
}
else
{
$_SESSION['FSA_menu_id'] = $_REQUEST['menu_id'];
}
$totals = [ [] ];
if ( ! empty( $RET ) )
{
foreach ( (array) $RET as $staff_id => $periods )
{
$i++;
$staff_RET[$i]['FULL_NAME'] = $periods[key( $periods )][1]['FULL_NAME'];
foreach ( (array) $periods as $period_id => $period )
{
//$sql = 'SELECT (SELECT DESCRIPTION FROM FOOD_SERVICE_LUNCH_ITEMS WHERE ITEM_ID=ac.ITEM_ID) AS DESCRIPTION,(SELECT SORT_ORDER FROM food_service_menu_items WHERE ITEM_ID=ac.ITEM_ID AND MENU_ID=\''.$_REQUEST['menu_id'].'\') AS SORT_ORDER,ac.SHORT_NAME,ac.COUNT FROM FOOD_SERVICE_COMPLETED ac WHERE ac.STAFF_ID=\''.$staff_id.'\' AND ac.SCHOOL_DATE=\''.$date.'\' AND ac.PERIOD_ID=\''.$period_id.'\' ORDER BY SORT_ORDER IS NULL,SORT_ORDER';
$sql = "SELECT fsi.DESCRIPTION,fsi.SHORT_NAME,ac.COUNT
FROM FOOD_SERVICE_COMPLETED ac,food_service_items fsi
WHERE ac.STAFF_ID='" . (int) $staff_id . "'
AND ac.SCHOOL_DATE='" . $date . "'
AND ac.PERIOD_ID='" . (int) $period_id . "'
AND ac.MENU_ID='" . (int) $_REQUEST['menu_id'] . "'
AND fsi.ITEM_ID=ac.ITEM_ID
ORDER BY fsi.SORT_ORDER IS NULL,fsi.SORT_ORDER";
$items_RET = DBGet( $sql );
if ( $items_RET )
{
$color = 'FFFFFF';
$staff_RET[$i][$period_id] = '<table style="background-color:#' . $color . '"><tr>';
foreach ( (array) $items_RET as $item )
{
$staff_RET[$i][$period_id] .= '<td style="background-color:#' . $color . '">' . ( $item['COUNT'] ? $item['COUNT'] : '0' ) . '<br />' . $item['DESCRIPTION'] . '</td>';
if ( $color == 'FFFFFF' )
{
$color = 'F0F0F0';
}
else
{
$color = 'FFFFFF';
}
if ( $totals[$item['SHORT_NAME']] )
{
$totals[$item['SHORT_NAME']]['COUNT'] += $item['COUNT'];
}
else
{
$totals += [ $item['SHORT_NAME'] => [ 'DESCRIPTION' => $item['DESCRIPTION'], 'COUNT' => $item['COUNT'] ] ];
}
}
$staff_RET[$i][$period_id] .= '</tr></table>';
}
else
{
$staff_RET[$i][$period_id] = button( 'x' );
}
}
}
}
$columns = [ 'FULL_NAME' => 'Teacher' ];
if ( empty( $_REQUEST['school_period'] ) )
{
foreach ( (array) $periods_RET as $period )
{
$columns[$period['PERIOD_ID']] = $period['TITLE'];
}
}
echo '<form action="' . URLEscape( 'Modules.php?modname=' . $_REQUEST['modname'] ) . '" method="POST">';
DrawHeader( PrepareDate( $date, '_date', false, [ 'submit' => true ] ) . ' — ' . $period_select );
echo '</form>';
echo '<form action="' . URLEscape( 'Modules.php?modname=' . $_REQUEST['modname'] . '&modfunc=add&menu_id=' . $_REQUEST['menu_id'] ) . '" method="POST">';
if ( count( (array) $menus_RET ) > 1 )
{
$tabs = [];
foreach ( (array) $menus_RET as $id => $menu )
{
$tabs[] = [ 'title' => $menu[1]['TITLE'], 'link' => 'Modules.php?modname=' . $_REQUEST['modname'] . '&menu_id=' . $id ];
}
echo '<br />';
echo '<div class="center">' . WrapTabs( $tabs, 'Modules.php?modname=' . $_REQUEST['modname'] . '&menu_id=' . $_REQUEST['menu_id'] ) . '</div>';
}
echo '<table class="width-100p"><tr><td>';
$singular = sprintf( _( 'Teacher who takes %s counts' ), $menus_RET[$_REQUEST['menu_id']][1]['TITLE'] );
$plural = sprintf( _( 'Teachers who take %s counts' ), $menus_RET[$_REQUEST['menu_id']][1]['TITLE'] );
ListOutput( $staff_RET, $columns, $singular, $plural );
echo '</td></tr>';
$totals = array_values( $totals );
unset( $totals[0] );
echo '<tr><td>';
ListOutput( $totals, [ 'DESCRIPTION' => _( 'Item' ), 'COUNT' => _( 'Total Count' ) ], 'Item Total', 'Item Totals' );
echo '</td></tr></table>';
echo '</form>';
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Students | Folder | 0755 |
|
|
| Users | Folder | 0755 |
|
|
| includes | Folder | 0755 |
|
|
| Accounts.php | File | 1.09 KB | 0644 |
|
| ActivityReport.php | File | 5.37 KB | 0644 |
|
| AssignSchool.php | File | 3.72 KB | 0644 |
|
| BalanceReport.php | File | 3.04 KB | 0644 |
|
| DailyMenus.php | File | 10.33 KB | 0644 |
|
| Kiosk.php | File | 3.6 KB | 0644 |
|
| Menu.php | File | 1.97 KB | 0644 |
|
| MenuItems.php | File | 13.85 KB | 0644 |
|
| MenuReports.php | File | 15.67 KB | 0644 |
|
| Menus.php | File | 7.13 KB | 0644 |
|
| Reminders.php | File | 4.8 KB | 0644 |
|
| ServeMenus.php | File | 3.08 KB | 0644 |
|
| Statements.php | File | 4.03 KB | 0644 |
|
| Student.inc.php | File | 3.53 KB | 0644 |
|
| TakeMenuCounts.php | File | 9.01 KB | 0644 |
|
| TeacherCompletion.php | File | 5.86 KB | 0644 |
|
| Transactions.php | File | 2.26 KB | 0644 |
|
| TransactionsReport.php | File | 5.5 KB | 0644 |
|
| User.inc.php | File | 2.43 KB | 0644 |
|