Commit a1dc928d authored by François Jacquet's avatar François Jacquet
Browse files

Fix PHP notice undefined index modfunc

parent e4c747c5
......@@ -76,7 +76,7 @@ $extra['columns_after'] = array('BALANCE'=>_('Balance'),'STATUS'=>_('Status'));
Search('student_id',$extra);
if(!$_REQUEST['modfunc'] && UserStudentID())
if(UserStudentID() && empty($_REQUEST['modfunc']))
{
$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];
......@@ -149,4 +149,4 @@ if(!$_REQUEST['modfunc'] && UserStudentID())
echo '<span class="center">'.SubmitButton(_('Save')).'</span>';
echo '</FORM>';
}
?>
\ No newline at end of file
?>
......@@ -17,7 +17,7 @@ $extra['columns_after'] = array('BALANCE'=>_('Balance'),'STATUS'=>_('Status'));
Search('student_id',$extra);
if(UserStudentID() && !$_REQUEST['modfunc'])
if(UserStudentID() && empty($_REQUEST['modfunc']))
{
$where = '';
......
......@@ -64,7 +64,7 @@ if ($_REQUEST['modfunc']=='submit')
unset($_REQUEST['submit']);
}
if(UserStudentID() && !$_REQUEST['modfunc'])
if(UserStudentID() && empty($_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
......
......@@ -17,7 +17,7 @@ $extra['columns_after'] = array('BALANCE'=>_('Balance'),'STATUS'=>_('Status'));
Search('student_id',$extra);
if(UserStudentID() && !$_REQUEST['modfunc'])
if(UserStudentID() && empty($_REQUEST['modfunc']))
{
$student = DBGet(DBQuery("SELECT s.STUDENT_ID,s.FIRST_NAME||' '||s.LAST_NAME AS FULL_NAME,fsa.ACCOUNT_ID,fsa.STATUS,
(SELECT BALANCE FROM FOOD_SERVICE_ACCOUNTS WHERE ACCOUNT_ID=fsa.ACCOUNT_ID) AS BALANCE
......
......@@ -48,7 +48,7 @@ $extra['columns_after'] = array('BALANCE'=>_('Balance'),'STATUS'=>_('Status'));
Search('student_id',$extra);
if(UserStudentID() && !$_REQUEST['modfunc'])
if(UserStudentID() && empty($_REQUEST['modfunc']))
{
$student = DBGet(DBQuery("SELECT s.STUDENT_ID,s.FIRST_NAME||' '||s.LAST_NAME AS FULL_NAME,fsa.ACCOUNT_ID,fsa.STATUS,
(SELECT BALANCE FROM FOOD_SERVICE_ACCOUNTS WHERE ACCOUNT_ID=fsa.ACCOUNT_ID) AS BALANCE
......
......@@ -94,7 +94,7 @@ $extra['columns_after'] = array('BALANCE'=>_('Balance'),'STATUS'=>_('Status'));
Search('staff_id',$extra);
if(!$_REQUEST['modfunc'] && UserStaffID())
if(UserStaffID() && empty($_REQUEST['modfunc']))
{
$staff = DBGet(DBQuery("SELECT s.STAFF_ID,s.FIRST_NAME||' '||s.LAST_NAME AS FULL_NAME,
(SELECT s.STAFF_ID FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID=s.STAFF_ID) AS ACCOUNT_ID,
......
......@@ -11,7 +11,7 @@ $extra['columns_after'] = array('BALANCE'=>_('Balance'),'STATUS'=>_('Status'));
Search('staff_id',$extra);
if(UserStaffID() && !$_REQUEST['modfunc'])
if(UserStaffID() && empty($_REQUEST['modfunc']))
{
$where = '';
......
......@@ -52,7 +52,7 @@ if ($_REQUEST['modfunc']=='submit')
unset($_REQUEST['submit']);
}
if(UserStaffID() && !$_REQUEST['modfunc'])
if(UserStaffID() && empty($_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,
......
......@@ -11,7 +11,7 @@ $extra['columns_after'] = array('BALANCE'=>_('Balance'),'STATUS'=>_('Status'));
Search('staff_id',$extra);
if(UserStaffID() && !$_REQUEST['modfunc'])
if(UserStaffID() && empty($_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];
......
......@@ -41,7 +41,7 @@ $extra['columns_after'] = array('BALANCE'=>_('Balance'),'STATUS'=>_('Status'));
Search('staff_id',$extra);
if(UserStaffID() && !$_REQUEST['modfunc'])
if(UserStaffID() && empty($_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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment