����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
DrawHeader( ProgramTitle() );
if ( $_REQUEST['modfunc'] === 'update' )
{
if ( $_REQUEST['student']
&& $_POST['student'] )
{
foreach ( (array) $_REQUEST['student'] as $transaction_id => $school_id )
{
if ( $school_id )
{
DBQuery( "UPDATE food_service_transactions SET SCHOOL_ID='" . (int) $school_id . "' WHERE TRANSACTION_ID='" . (int) $transaction_id . "'" );
}
}
}
if ( $_REQUEST['staff']
&& $_POST['staff'] )
{
foreach ( (array) $_REQUEST['staff'] as $transaction_id => $school_id )
{
if ( $school_id )
{
DBQuery( "UPDATE food_service_staff_transactions SET SCHOOL_ID='" . (int) $school_id . "' WHERE TRANSACTION_ID='" . (int) $transaction_id . "'" );
}
}
}
// Unset modfunc & staff & student & redirect URL.
RedirectURL( [ 'modfunc', 'staff', 'student' ] );
}
$schools_RET = DBGet( "SELECT ID,SYEAR,TITLE FROM schools", [], [ 'SYEAR' ] );
//echo '<pre>'; var_dump($schools_RET); echo '</pre>';
foreach ( (array) $schools_RET as $syear => $schools )
{
foreach ( (array) $schools as $school )
{
$schools_select[$syear][$school['ID']] = $school['TITLE'];
}
}
//echo '<pre>'; var_dump($schools_select); echo '</pre>';
$students_RET = DBGet( "SELECT fst.TRANSACTION_ID,fst.ACCOUNT_ID,fst.SYEAR," .
db_case( [
'fst.STUDENT_ID',
"''",
'NULL',
"(SELECT " . DisplayNameSQL() . " FROM students WHERE STUDENT_ID=fst.STUDENT_ID)",
] ) . " AS FULL_NAME,fst.ACCOUNT_ID AS STUDENTS,fst.SCHOOL_ID
FROM food_service_transactions
fst WHERE fst.SCHOOL_ID IS NULL", [ 'STUDENTS' => '_students', 'SCHOOL_ID' => '_make_school' ] );
$staff_RET = DBGet( "SELECT fst.TRANSACTION_ID,fst.STAFF_ID,fst.SYEAR,
(SELECT " . DisplayNameSQL() . " FROM staff WHERE STAFF_ID=fst.STAFF_ID) AS FULL_NAME,fst.SCHOOL_ID
FROM food_service_staff_transactions fst
WHERE fst.SCHOOL_ID IS NULL", [ 'SCHOOL_ID' => '_make_staff_school' ] );
//echo '<pre>'; var_dump($students_RET); echo '</pre>';
//echo '<pre>'; var_dump($users_RET); echo '</pre>';
echo '<form action="' . URLEscape( 'Modules.php?modname=' . $_REQUEST['modname'] . '&modfunc=update' ) . '" method="POST">';
DrawHeader( '', SubmitButton() );
$columns = [ 'TRANSACTION_ID' => _( 'ID' ), 'ACCOUNT_ID' => _( 'Account ID' ), 'SYEAR' => _( 'School Year' ), 'FULL_NAME' => _( 'Student' ), 'STUDENTS' => _( 'Students' ), 'SCHOOL_ID' => _( 'School' ) ];
ListOutput( $students_RET, $columns, 'Student Transaction w/o School', 'Student Transactions w/o School', false, [], [ 'save' => false, 'search' => false ] );
$columns = [ 'TRANSACTION_ID' => _( 'ID' ), 'SYEAR' => _( 'School Year' ), 'FULL_NAME' => _( 'User' ), 'SCHOOL_ID' => _( 'School' ) ];
ListOutput( $staff_RET, $columns, 'User Transaction w/o School', 'User Transactions w/o School', false, [], [ 'save' => false, 'search' => false ] );
echo '<div class="center">' . SubmitButton() . '</div>';
echo '</form>';
/**
* @param $value
* @param $column
* @return mixed
*/
function _students( $value, $column )
{
$RET = DBGet( "SELECT " . DisplayNameSQL( 's' ) . " AS FULL_NAME FROM students s,food_service_student_accounts fsa WHERE s.STUDENT_ID=fsa.STUDENT_ID AND fsa.ACCOUNT_ID='" . (int) $value . "'" );
foreach ( (array) $RET as $student )
{
$ret .= $student['FULL_NAME'] . '<br />';
}
$ret = mb_substr( $ret, 0, -4 );
return $ret;
}
/**
* @param $value
* @param $column
*/
function _make_school( $value, $column )
{
global $THIS_RET, $schools_select;
return SelectInput( $value, 'student[' . $THIS_RET['TRANSACTION_ID'] . ']', '', $schools_select[$THIS_RET['SYEAR']] );
}
/**
* @param $value
* @param $column
*/
function _make_staff_school( $value, $column )
{
global $THIS_RET, $schools_select;
return SelectInput( $value, 'staff[' . $THIS_RET['TRANSACTION_ID'] . ']', '', $schools_select[$THIS_RET['SYEAR']] );
}
| 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 |
|