Commit 6f9d030f authored by François Jacquet's avatar François Jacquet Committed by François Jacquet
Browse files

Use issetVal(), program wide

parent 626d0dbf
......@@ -65,7 +65,7 @@ if ( empty( $_ROSARIO['Menu'] ) )
// FJ bugfix remove modules with no programs.
$no_programs_in_module = true;
$programs = isset( $profiles[ $profile ] ) ? $profiles[ $profile ] : array();
$programs = issetVal( $profiles[ $profile ], array() );
foreach ( (array) $programs as $program => $title )
{
......
......@@ -241,7 +241,7 @@ function GetFieldsForm( $table, $title, $RET, $extra_category_fields = array(),
'SCHOOL',
);*/
$id = isset( $RET['ID'] ) ? $RET['ID'] : '';
$id = issetVal( $RET['ID'], '' );
$category_id = empty( $RET['CATEGORY_ID'] ) ? '' : $RET['CATEGORY_ID'];
......@@ -322,7 +322,7 @@ function GetFieldsForm( $table, $title, $RET, $extra_category_fields = array(),
{
// FJ field name required.
$header .= '<td>' . MLTextInput(
( isset( $RET['TITLE'] ) ? $RET['TITLE'] : '' ),
issetVal( $RET['TITLE'], '' ),
'tables[' . $id . '][TITLE]',
( empty( $RET['TITLE'] ) ? '<span class="legend-red">' : '' ) . _( 'Field Name' ) .
( empty( $RET['TITLE'] ) ? '</span>' : '' )
......@@ -377,7 +377,7 @@ function GetFieldsForm( $table, $title, $RET, $extra_category_fields = array(),
else
{
$header .= '<td' . ( ! $category_id ? ' colspan="2"' : '' ) . '>' . SelectInput(
( isset( $RET['TYPE'] ) ? $RET['TYPE'] : '' ),
issetVal( $RET['TYPE'], '' ),
'tables[' . $id . '][TYPE]',
_( 'Data Type' ),
$type_options,
......@@ -418,7 +418,7 @@ function GetFieldsForm( $table, $title, $RET, $extra_category_fields = array(),
array( 'autos', 'select', 'multiple', 'exports' ) ) ) )
{
$header .= '<td colspan="3">' . TextAreaInput(
( isset( $RET['SELECT_OPTIONS'] ) ? $RET['SELECT_OPTIONS'] : '' ),
issetVal( $RET['SELECT_OPTIONS'], '' ),
'tables[' . $id . '][SELECT_OPTIONS]',
_( 'Pull-Down' ) . '/' . _( 'Auto Pull-Down' ) . '/' . _( 'Export Pull-Down' ) . '/' .
_( 'Select Multiple from Options' ) .
......@@ -433,7 +433,7 @@ function GetFieldsForm( $table, $title, $RET, $extra_category_fields = array(),
// Default Selection field.
$header .= '<td>' . TextInput(
( isset( $RET['DEFAULT_SELECTION'] ) ? $RET['DEFAULT_SELECTION'] : '' ),
issetVal( $RET['DEFAULT_SELECTION'], '' ),
'tables[' . $id . '][DEFAULT_SELECTION]',
_( 'Default' ) .
'<div class="tooltip"><i>' . _( 'For dates: YYYY-MM-DD' ).'<br />' .
......@@ -442,7 +442,7 @@ function GetFieldsForm( $table, $title, $RET, $extra_category_fields = array(),
// Required field.
$header .= '<td>' . CheckboxInput(
( isset( $RET['REQUIRED'] ) ? $RET['REQUIRED'] : '' ),
issetVal( $RET['REQUIRED'], '' ),
'tables[' . $id . '][REQUIRED]',
_( 'Required' ),
'',
......@@ -451,7 +451,7 @@ function GetFieldsForm( $table, $title, $RET, $extra_category_fields = array(),
// Sort Order field.
$header .= '<td>' . TextInput(
( isset( $RET['SORT_ORDER'] ) ? $RET['SORT_ORDER'] : '' ),
issetVal( $RET['SORT_ORDER'], '' ),
'tables[' . $id . '][SORT_ORDER]',
_( 'Sort Order' ),
'size=5'
......@@ -464,7 +464,7 @@ function GetFieldsForm( $table, $title, $RET, $extra_category_fields = array(),
{
// Title field.
$header .= '<td>' . MLTextInput(
( isset( $RET['TITLE'] ) ? $RET['TITLE'] : '' ),
issetVal( $RET['TITLE'], '' ),
'tables[' . $category_id . '][TITLE]',
( empty( $RET['TITLE'] ) ? '<span class="legend-red">' : '') . _( 'Title' ) .
( empty( $RET['TITLE'] ) ? '</span>' : '' )
......@@ -472,7 +472,7 @@ function GetFieldsForm( $table, $title, $RET, $extra_category_fields = array(),
// Sort Order field.
$header .= '<td>' . TextInput(
( isset( $RET['SORT_ORDER'] ) ? $RET['SORT_ORDER'] : '' ),
issetVal( $RET['SORT_ORDER'], '' ),
'tables[' . $category_id . '][SORT_ORDER]',
_( 'Sort Order' ),
'size=5'
......@@ -672,15 +672,15 @@ function FilterCustomFieldsMarkdown( $table, $request_index, $request_index_2 =
if ( ! $request_index_2 )
{
$request_values = isset( $_REQUEST[ $request_index ] ) ? $_REQUEST[ $request_index ] : null;
$request_values = issetVal( $_REQUEST[ $request_index ] );
$post_values = isset( $_POST[ $request_index ] ) ? $_POST[ $request_index ] : null;
$post_values = issetVal( $_POST[ $request_index ] );
}
else
{
$request_values = isset( $_REQUEST[ $request_index ][ $request_index_2 ] ) ? $_REQUEST[ $request_index ][ $request_index_2 ] : null;
$request_values = issetVal( $_REQUEST[ $request_index ][ $request_index_2 ] );
$post_values = isset( $_POST[ $request_index ][ $request_index_2 ] ) ? $_POST[ $request_index ][ $request_index_2 ] : null;
$post_values = issetVal( $_POST[ $request_index ][ $request_index_2 ] );
}
if ( ! $table
......
......@@ -143,9 +143,7 @@ function ProgramConfig( $program, $item = 'all', $value = null )
return $_ROSARIO['ProgramConfig'][ (string) $program ];
}
return isset( $_ROSARIO['ProgramConfig'][ (string) $program ][ (string) $item ][1]['VALUE'] ) ?
$_ROSARIO['ProgramConfig'][ (string) $program ][ (string) $item ][1]['VALUE'] :
null;
return issetVal( $_ROSARIO['ProgramConfig'][ (string) $program ][ (string) $item ][1]['VALUE'] );
}
......
......@@ -15,7 +15,7 @@
*/
function UserSchool()
{
return ( isset( $_SESSION['UserSchool'] ) ? $_SESSION['UserSchool'] : null );
return issetVal( $_SESSION['UserSchool'] );
}
......@@ -26,7 +26,7 @@ function UserSchool()
*/
function UserSyear()
{
return ( isset( $_SESSION['UserSyear'] ) ? $_SESSION['UserSyear'] : null );
return issetVal( $_SESSION['UserSyear'] );
}
......@@ -37,7 +37,7 @@ function UserSyear()
*/
function UserMP()
{
return ( isset( $_SESSION['UserMP'] ) ? $_SESSION['UserMP'] : null );
return issetVal( $_SESSION['UserMP'] );
}
......@@ -50,7 +50,7 @@ function UserMP()
*/
function UserPeriod()
{
return ( isset( $_SESSION['UserPeriod'] ) ? $_SESSION['UserPeriod'] : null );
return issetVal( $_SESSION['UserPeriod'] );
}
......@@ -62,7 +62,7 @@ function UserPeriod()
*/
function UserCoursePeriod()
{
return ( isset( $_SESSION['UserCoursePeriod'] ) ? $_SESSION['UserCoursePeriod'] : null );
return issetVal( $_SESSION['UserCoursePeriod'] );
}
......@@ -76,7 +76,7 @@ function UserCoursePeriod()
*/
function UserCoursePeriodSchoolPeriod()
{
return ( isset( $_SESSION['UserCoursePeriodSchoolPeriod'] ) ? $_SESSION['UserCoursePeriodSchoolPeriod'] : null );
return issetVal( $_SESSION['UserCoursePeriodSchoolPeriod'] );
}
......@@ -88,7 +88,7 @@ function UserCoursePeriodSchoolPeriod()
*/
function UserStudentID()
{
return ( isset( $_SESSION['student_id'] ) ? $_SESSION['student_id'] : null );
return issetVal( $_SESSION['student_id'] );
}
......@@ -100,7 +100,7 @@ function UserStudentID()
*/
function UserStaffID()
{
return ( isset( $_SESSION['staff_id'] ) ? $_SESSION['staff_id'] : null );
return issetVal( $_SESSION['staff_id'] );
}
......
......@@ -51,13 +51,13 @@ function CustomFields( $location, $type = 'student', $extra = array() )
AddRequestedDates( 'cust_begin' );
// Add begin dates and begin Number.
$cust_begin = isset( $_REQUEST['cust_begin'] ) ? $_REQUEST['cust_begin'] : null;
$cust_begin = issetVal( $_REQUEST['cust_begin'] );
// Format & Verify end dates.
AddRequestedDates( 'cust_end' );
// Add end dates and end Number.
$cust_end = isset( $_REQUEST['cust_end'] ) ? $_REQUEST['cust_end'] : null;
$cust_end = issetVal( $_REQUEST['cust_end'] );
// Get custom (staff) fields.
if ( ! empty( $cust )
......
......@@ -88,7 +88,7 @@ function DBGet( $QI, $functions = array(), $index = array() )
{
// $ind .= "['" . str_replace( "'", "\'", $THIS_RET[ $col ] ) . "']";
$ind[] = isset( $RET[ $col ] ) ? $RET[ $col ] : null;
$ind[] = issetVal( $RET[ $col ] );
}
if ( $index_count === 1 )
......
......@@ -65,7 +65,7 @@ function ErrorMessage( $errors, $code = 'error' )
if ( count( $errors ) === 1 )
{
$return .= ': ' . ( isset( $errors[0] ) ? $errors[0] : $errors[1] ) . '</p>';
$return .= ': ' . issetVal( $errors[0], $errors[1] ) . '</p>';
}
// More than one error: list.
......@@ -153,8 +153,7 @@ function ErrorSendEmail( $error = array(), $title = 'PHP Fatal error' )
return false;
}
$ip = isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ?
$_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
$ip = issetVal( $_SERVER['HTTP_X_FORWARDED_FOR'], $_SERVER['REMOTE_ADDR'] );
$debug_backtrace = debug_backtrace();
......
......@@ -369,9 +369,7 @@ function GetChildrenMP( $mp, $marking_period_id = '0' )
}
}
return isset( $children_mp[ $mp ][ $marking_period_id ] ) ?
$children_mp[ $mp ][ $marking_period_id ] :
'';
return issetVal( $children_mp[ $mp ][ $marking_period_id ], '' );
}
......
......@@ -21,11 +21,11 @@ function GetStaffList( &$extra = array() )
StaffWidgets( 'all', $extra );
}
$extra['SELECT'] = isset( $extra['SELECT'] ) ? $extra['SELECT'] : '';
$extra['SELECT'] = issetVal( $extra['SELECT'], '' );
$extra['FROM'] = isset( $extra['FROM'] ) ? $extra['FROM'] : '';
$extra['FROM'] = issetVal( $extra['FROM'], '' );
$extra['WHERE'] = isset( $extra['WHERE'] ) ? $extra['WHERE'] : '';
$extra['WHERE'] = issetVal( $extra['WHERE'], '' );
$extra['WHERE'] .= appendStaffSQL( '', $extra );
......@@ -375,7 +375,7 @@ function appendStaffSQL( $sql, $extra = array() )
if ( $search_terms )
{
$_ROSARIO['SearchTerms'] = isset( $_ROSARIO['SearchTerms'] ) ? $_ROSARIO['SearchTerms'] : '';
$_ROSARIO['SearchTerms'] = issetVal( $_ROSARIO['SearchTerms'], '' );
$_ROSARIO['SearchTerms'] .= $search_terms;
}
......
......@@ -47,11 +47,11 @@ function GetStuList( &$extra = array() )
Widgets( 'all', $extra );
}
$extra['SELECT'] = isset( $extra['SELECT'] ) ? $extra['SELECT'] : '';
$extra['SELECT'] = issetVal( $extra['SELECT'], '' );
$extra['FROM'] = isset( $extra['FROM'] ) ? $extra['FROM'] : '';
$extra['FROM'] = issetVal( $extra['FROM'], '' );
$extra['WHERE'] = isset( $extra['WHERE'] ) ? $extra['WHERE'] : '';
$extra['WHERE'] = issetVal( $extra['WHERE'], '' );
$extra['WHERE'] .= appendSQL( '', $extra );
......@@ -201,11 +201,11 @@ function GetStuList( &$extra = array() )
// EXPANDED VIEW AND ADDR BREAKS THIS QUERY ... SO, TURN 'EM OFF.
if ( ! isset( $_REQUEST['_ROSARIO_PDF'] ) )
{
$expanded_view = isset( $_REQUEST['expanded_view'] ) ? $_REQUEST['expanded_view'] : null;
$expanded_view = issetVal( $_REQUEST['expanded_view'] );
$_REQUEST['expanded_view'] = false;
$addr = isset( $_REQUEST['addr'] ) ? $_REQUEST['addr'] : null;
$addr = issetVal( $_REQUEST['addr'] );
unset( $_REQUEST['addr'] );
......@@ -256,11 +256,11 @@ function GetStuList( &$extra = array() )
$extra2['link'] = array();
// EXPANDED VIEW AND ADDR BREAKS THIS QUERY ... SO, TURN 'EM OFF.
$expanded_view = isset( $_REQUEST['expanded_view'] ) ? $_REQUEST['expanded_view'] : null;
$expanded_view = issetVal( $_REQUEST['expanded_view'] );
$_REQUEST['expanded_view'] = false;
$addr = isset( $_REQUEST['addr'] ) ? $_REQUEST['addr'] : null;
$addr = issetVal( $_REQUEST['addr'] );
unset( $_REQUEST['addr'] );
......@@ -517,7 +517,7 @@ function GetStuList( &$extra = array() )
//$sql = 'SELECT '.$distinct;
$extra['MPTable'] = isset( $extra['MPTable'] ) ? $extra['MPTable'] : '';
$extra['MPTable'] = issetVal( $extra['MPTable'], '' );
// Normal SELECT.
if ( ! $is_select_only )
......@@ -670,7 +670,7 @@ function GetStuList( &$extra = array() )
}
// DBGet group arg.
$group = ( isset( $extra['group'] ) ? $extra['group'] : array() );
$group = issetVal( $extra['group'], array() );
// Execute Query & return.
return DBGet( $sql, $functions, $group );
......@@ -1110,7 +1110,7 @@ function appendSQL( $sql, $extra = array() )
{
global $_ROSARIO;
$_ROSARIO['SearchTerms'] = isset( $_ROSARIO['SearchTerms'] ) ? $_ROSARIO['SearchTerms'] : '';
$_ROSARIO['SearchTerms'] = issetVal( $_ROSARIO['SearchTerms'], '' );
$no_search_terms = isset( $extra['NoSearchTerms'] ) && $extra['NoSearchTerms'];
......
......@@ -1667,7 +1667,7 @@ function MakeChooseCheckbox( $value, $column = '', $controller_name = '' )
if ( ! empty( $controller_column ) )
{
$value = isset( $THIS_RET[ $controller_column ] ) ? $THIS_RET[ $controller_column ] : '';
$value = issetVal( $THIS_RET[ $controller_column ], '' );
}
if ( isset( $_REQUEST['_ROSARIO_PDF'] ) )
......
......@@ -30,16 +30,16 @@ function ListOutput( $result, $column_names, $singular = '.', $plural = '.', $li
$options = $default_options;
}
$LO_page = ( isset( $_REQUEST['LO_page'] ) ? $_REQUEST['LO_page'] : '' );
$LO_page = issetVal( $_REQUEST['LO_page'], '' );
// FJ bugfix ListOutput sorting when more than one list in a page.
$LO_sort = ( isset( $_REQUEST['LO_sort'] ) ? $_REQUEST['LO_sort'] : '' );
$LO_sort = issetVal( $_REQUEST['LO_sort'], '' );
$LO_dir = ( isset( $_REQUEST['LO_dir'] ) ? $_REQUEST['LO_dir'] : '' );
$LO_dir = issetVal( $_REQUEST['LO_dir'], '' );
$LO_search = ( isset( $_REQUEST['LO_search'] ) ? $_REQUEST['LO_search'] : '' );
$LO_search = issetVal( $_REQUEST['LO_search'], '' );
$LO_save = ( isset( $_REQUEST['LO_save'] ) ? $_REQUEST['LO_save'] : '' );
$LO_save = issetVal( $_REQUEST['LO_save'], '' );
if ( ! $options['add']
|| ! AllowEdit()
......@@ -528,7 +528,7 @@ function ListOutput( $result, $column_names, $singular = '.', $plural = '.', $li
if ( $options['sort'] )
{
echo '<a href="' . $PHP_tmp_SELF . '&amp;LO_page=' . $LO_page . '&amp;LO_sort=' . $key . '&amp;LO_dir=' . $direction . '&amp;LO_search=' . urlencode( isset( $LO_search ) ? $LO_search : '' ) . '">' .
echo '<a href="' . $PHP_tmp_SELF . '&amp;LO_page=' . $LO_page . '&amp;LO_sort=' . $key . '&amp;LO_dir=' . $direction . '&amp;LO_search=' . urlencode( issetVal( $LO_search, '' ) ) . '">' .
ParseMLField( $value ) .
'</a>';
}
......@@ -710,7 +710,7 @@ function ListOutput( $result, $column_names, $singular = '.', $plural = '.', $li
echo '<tr><td colspan="' . ( $remove ? $cols + 1 : $cols ) . '">' .
button(
'add',
isset( $link['add']['title'] ) ? $link['add']['title'] : '',
issetVal( $link['add']['title'], '' ),
$link['add']['link']
) .
'</td></tr>';
......@@ -738,7 +738,7 @@ function ListOutput( $result, $column_names, $singular = '.', $plural = '.', $li
foreach ( (array) $column_names as $key => $value )
{
echo '<td>' .
( isset( $link['add']['html'][$key] ) ? $link['add']['html'][$key] : '' )
( issetVal( $link['add']['html'][$key], '' ) )
. '</td>';
}
......@@ -765,7 +765,7 @@ function ListOutput( $result, $column_names, $singular = '.', $plural = '.', $li
echo '<div class="center">' .
button(
'add',
isset( $link['add']['title'] ) ? $link['add']['title'] : '',
issetVal( $link['add']['title'], '' ),
$link['add']['link']
) .
'</div>';
......
......@@ -148,7 +148,7 @@ function Preferences( $item, $program = 'Preferences' )
if ( ! isset( $_ROSARIO['Preferences'][ $program ][ $item ][1]['VALUE'] ) )
{
$_ROSARIO['Preferences'][ $program ][ $item ][1]['VALUE'] = isset( $defaults[ $item ] ) ? $defaults[ $item ] : null;
$_ROSARIO['Preferences'][ $program ][ $item ][1]['VALUE'] = issetVal( $defaults[ $item ] );
}
/**
......
......@@ -1142,12 +1142,12 @@ function Widgets( $item, &$myextra = null )
$discipline_entry_begin = RequestedDate(
'discipline_entry_begin',
( isset( $_REQUEST['discipline_entry_begin'] ) ? $_REQUEST['discipline_entry_begin'] : '' )
( issetVal( $_REQUEST['discipline_entry_begin'], '' ) )
);
$discipline_entry_end = RequestedDate(
'discipline_entry_end',
( isset( $_REQUEST['discipline_entry_end'] ) ? $_REQUEST['discipline_entry_end'] : '' )
( issetVal( $_REQUEST['discipline_entry_end'], '' ) )
);
if ( ( $discipline_entry_begin
......
......@@ -11,7 +11,7 @@ if ( empty( $_REQUEST['print_statements'] ) )
{
DrawHeader( ProgramTitle() );
Search( 'staff_id', ( isset( $extra ) ? $extra : null ) );
Search( 'staff_id', issetVal( $extra ) );
}
if ( ! empty( $_REQUEST['values'] )
......
......@@ -10,7 +10,7 @@ if ( empty( $_REQUEST['print_statements'] ) )
{
DrawHeader( ProgramTitle() );
Search( 'staff_id', ( isset( $extra ) ? $extra : null ) );
Search( 'staff_id', issetVal( $extra ) );
}
// Add eventual Dates to $_REQUEST['values'].
......
......@@ -6,7 +6,7 @@ if ( ! isset( $_REQUEST['_ROSARIO_PDF'] ) && ! $_REQUEST['search_modfunc'] )
$extra['new'] = true;
$extra['action'] .= "&_ROSARIO_PDF=true";
Search( 'staff_id', ( isset( $extra ) ? $extra : null ) );
Search( 'staff_id', issetVal( $extra ) );
}
else
{
......@@ -15,7 +15,7 @@ else
if ( User( 'PROFILE' ) === 'teacher' ) //limit to teacher himself
{
$extra['WHERE'] = isset( $extra['WHERE'] ) ? $extra['WHERE'] : '';
$extra['WHERE'] = issetVal( $extra['WHERE'], '' );
$extra['WHERE'] .= " AND s.STAFF_ID = '" . User( 'STAFF_ID' ) . "'";
}
......
......@@ -3,8 +3,8 @@
require_once 'modules/Attendance/includes/UpdateAttendanceDaily.fnc.php';
require_once 'modules/Attendance/includes/AttendanceCodes.fnc.php';
$_REQUEST['student_id'] = isset( $_REQUEST['student_id'] ) ? $_REQUEST['student_id'] : '';
$_REQUEST['period_id'] = isset( $_REQUEST['period_id'] ) ? $_REQUEST['period_id'] : '';
$_REQUEST['student_id'] = issetVal( $_REQUEST['student_id'], '' );
$_REQUEST['period_id'] = issetVal( $_REQUEST['period_id'], '' );
DrawHeader( ProgramTitle() );
......@@ -350,7 +350,7 @@ else
{
$school_date_col = '_' . str_replace( '-', '', $value['SCHOOL_DATE'] );
$extra['SELECT'] = isset( $extra['SELECT'] ) ? $extra['SELECT'] : '';
$extra['SELECT'] = issetVal( $extra['SELECT'], '' );
$extra['SELECT'] .= ",'' as " . $school_date_col;
$proper_date = ProperDate( $value['SCHOOL_DATE'], 'short' );
......
......@@ -31,10 +31,10 @@ if ( $_REQUEST['delete'] === 'true' )
$i = 0;
$ii = 0;
$iii = 0;
$sid = isset( $_REQUEST['studentidx'] ) ? $_REQUEST['studentidx'] : null;
$cnt = isset( $_REQUEST['deletecheck'] ) ? $_REQUEST['deletecheck'] : null;
$pid = isset( $_REQUEST['periodidx'] ) ? $_REQUEST['periodidx'] : null;
$sdt = isset( $_REQUEST['schooldatex'] ) ? $_REQUEST['schooldatex'] : null;
$sid = issetVal( $_REQUEST['studentidx'] );
$cnt = issetVal( $_REQUEST['deletecheck'] );
$pid = issetVal( $_REQUEST['periodidx'] );
$sdt = issetVal( $_REQUEST['schooldatex'] );
foreach ( (array) $cnt as $a => $val_dchck )
{
......
<?php
DrawHeader( ProgramTitle() );
$_REQUEST['student_id'] = isset( $_REQUEST['student_id'] ) ? $_REQUEST['student_id'] : null;
$_REQUEST['student_id'] = issetVal( $_REQUEST['student_id'] );
// Set start date.
$start_date = RequestedDate( 'start', date( 'Y-m' ) . '-01' );
......@@ -110,7 +110,7 @@ if ( ! empty( $_REQUEST['period_id'] ) )
$period_ids_list = $_REQUEST['period_id'];
}
$extra['SELECT'] = isset( $extra['SELECT'] ) ? $extra['SELECT'] : '';
$extra['SELECT'] = issetVal( $extra['SELECT'], '' );
$extra['SELECT'] .= ",(SELECT count(*) FROM ATTENDANCE_PERIOD ap,ATTENDANCE_CODES ac
WHERE ac.ID=ap.ATTENDANCE_CODE AND (ac.STATE_CODE='A' OR ac.STATE_CODE='H') AND ap.STUDENT_ID=ssm.STUDENT_ID
AND ap.PERIOD_ID IN (" . $period_ids_list . ")
......@@ -136,7 +136,7 @@ if ( ! empty( $_REQUEST['period_id'] ) )
}
else
{
$extra['SELECT'] = isset( $extra['SELECT'] ) ? $extra['SELECT'] : '';
$extra['SELECT'] = issetVal( $extra['SELECT'], '' );
$extra['SELECT'] .= ",(SELECT COALESCE((sum(STATE_VALUE-1)*-1),0.0) FROM ATTENDANCE_DAY ad
WHERE ad.STUDENT_ID=ssm.STUDENT_ID
AND ad.SCHOOL_DATE BETWEEN '" . $start_date . "' AND '" . $end_date . "' AND ad.SYEAR=ssm.SYEAR) AS STATE_ABS";
......@@ -145,13 +145,13 @@ else
}
$extra['link']['FULL_NAME']['link'] = 'Modules.php?modname=' . $_REQUEST['modname'] .
'&day_start=' . ( isset( $_REQUEST['day_start'] ) ? $_REQUEST['day_start'] : '' ) .
'&day_end=' . ( isset( $_REQUEST['day_end'] ) ? $_REQUEST['day_end'] : '' ) .
'&month_start=' . ( isset( $_REQUEST['month_start'] ) ? $_REQUEST['month_start'] : '' ) .
'&month_end=' . ( isset( $_REQUEST['month_end'] ) ? $_REQUEST['month_end'] : '' ) .
'&year_start=' . ( isset( $_REQUEST['year_start'] ) ? $_REQUEST['year_start'] : '' ) .
'&year_end=' . ( isset( $_REQUEST['year_end'] ) ? $_REQUEST['year_end'] : '' ) .
'&period_id=' . ( isset( $_REQUEST['period_id'] ) ? $_REQUEST['period_id'] : '' );