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

Add space after control structures keywords: if

Replace "if(" with "if ("
parent 03ee0dbb
......@@ -3,10 +3,10 @@
include( 'Warehouse.php' );
// Print PDF
if( isset( $_REQUEST['modfunc'] ) &&
if ( isset( $_REQUEST['modfunc'] ) &&
$_REQUEST['modfunc'] === 'print' )
{
if( $_REQUEST['expanded_view'] )
if ( $_REQUEST['expanded_view'] )
$_SESSION['orientation'] = 'landscape';
//FJ call PDFStart to generate Print PDF
......@@ -18,7 +18,7 @@ if( isset( $_REQUEST['modfunc'] ) &&
$modname = $_REQUEST['modname'];
if( !$wkhtmltopdfPath )
if ( !$wkhtmltopdfPath )
$_ROSARIO['allow_edit'] = false;
//FJ security fix, cf http://www.securiteam.com/securitynews/6S02U1P6BI.html
......@@ -37,7 +37,7 @@ if( isset( $_REQUEST['modfunc'] ) &&
}
// Inline Help
elseif( isset( $_REQUEST['modfunc'] ) &&
elseif ( isset( $_REQUEST['modfunc'] ) &&
$_REQUEST['modfunc'] === 'help' )
{
$help_translated = 'Help_' . mb_substr( $locale, 0, 2 ) . '.php';
......@@ -70,7 +70,7 @@ elseif( isset( $_REQUEST['modfunc'] ) &&
foreach( $help as $program => $help_txt )
{
//FJ fix bug URL Modules.php?modfunc=help&modname=Student_Billing/Statements.php&_ROSARIO_PDF
if( $_REQUEST['modname'] === $program ||
if ( $_REQUEST['modname'] === $program ||
( mb_strpos( $program, $_REQUEST['modname'] ) === 0
&& mb_strpos( $_SERVER['QUERY_STRING'], $program ) === 21 ) )
$help_text = $help_txt;
......@@ -78,10 +78,10 @@ elseif( isset( $_REQUEST['modfunc'] ) &&
}
// get default help text
if( empty( $help_text ) )
if ( empty( $help_text ) )
$help_text = $help['default'];
if( User('PROFILE') == 'student' )
if ( User('PROFILE') == 'student' )
$help_text = str_replace(
'your child',
'yourself',
......@@ -135,7 +135,7 @@ else
<?php endif;
if( isset( $_SESSION['Search_PHP_SELF'] )
if ( isset( $_SESSION['Search_PHP_SELF'] )
&& ( User('PROFILE') == 'admin'
|| User('PROFILE') == 'teacher' ) ) :
......
......@@ -64,14 +64,14 @@ foreach( $help as $program => $value )
{
$_REQUEST['modname'] = $program;
if( mb_strpos( $program, '/' ) )
if ( mb_strpos( $program, '/' ) )
{
$modcat = mb_substr( $program, 0, mb_strpos( $program, '/' ) );
if ( !$RosarioModules[$modcat] ) //module not activated
break;
if( $modcat != $old_modcat
if ( $modcat != $old_modcat
&& $modcat != 'Custom' ) : ?>
<div style="page-break-after: always;"></div>
......@@ -99,7 +99,7 @@ foreach( $help as $program => $value )
<h3>
<?php
if( $program == 'default' )
if ( $program == 'default' )
echo ParseMLField( Config( 'TITLE' ) )
. ' - ' . sprintf( _( '%s Handbook' ), $title ) . '<BR />'
. sprintf( _( 'version %s' ), '1.1' );
......@@ -114,7 +114,7 @@ foreach( $help as $program => $value )
<TD class="header2">
<?php
if( User( 'PROFILE' ) == 'student' )
if ( User( 'PROFILE' ) == 'student' )
$value = str_replace(
'your child',
'yourself',
......
......@@ -74,7 +74,7 @@ if ( empty( $_ROSARIO['Menu'] ) )
continue;
}
// if($_ROSARIO['AllowUse'][$program] && ($profile!='admin' || !$exceptions[$modcat][$program] || AllowEdit($program)))
// if ($_ROSARIO['AllowUse'][$program] && ($profile!='admin' || !$exceptions[$modcat][$program] || AllowEdit($program)))
// if program allowed, add it
if ( !empty( $_ROSARIO['AllowUse'][$program] )
&& ( $profile !== 'admin'
......
......@@ -16,10 +16,10 @@ if ( !isset( $_REQUEST['modfunc'] ) )
$_REQUEST['modfunc'] = false;
// not printing PDF
if( !isset( $_REQUEST['_ROSARIO_PDF'] ) )
if ( !isset( $_REQUEST['_ROSARIO_PDF'] ) )
{
// save $_REQUEST vars in session
if( empty( $_REQUEST['LO_save'] )
if ( empty( $_REQUEST['LO_save'] )
&& ( mb_strpos( $modname, 'misc/' ) === false
|| $modname === 'misc/Portal.php'
|| $modname === 'misc/Registration.php'
......@@ -100,7 +100,7 @@ else
foreach( $programs as $program => $title )
{
//FJ fix bug URL Modules.php?modname=Student_Billing/Statements.php&_ROSARIO_PDF
if( $modname == $program
if ( $modname == $program
|| ( mb_strpos( $program, $modname ) === 0
&& mb_strpos( $_SERVER['QUERY_STRING'], $program ) === 8 ) )
{
......@@ -116,17 +116,17 @@ else
}
}
if( $allowed )
if ( $allowed )
{
// force search_modfunc
if( Preferences( 'SEARCH' ) !== 'Y' )
if ( Preferences( 'SEARCH' ) !== 'Y' )
$_REQUEST['search_modfunc'] = 'list';
include( 'modules/' . $modname );
}
// not allowed, hacking attempt?
elseif( User( 'USERNAME' ) )
elseif ( User( 'USERNAME' ) )
{
include( 'ProgramFunctions/HackingLog.fnc.php' );
......@@ -134,7 +134,7 @@ elseif( User( 'USERNAME' ) )
}
// output Footer HTML
if( !isset( $_REQUEST['_ROSARIO_PDF'] ) )
if ( !isset( $_REQUEST['_ROSARIO_PDF'] ) )
Warehouse( 'footer' );
?>
\ No newline at end of file
......@@ -37,7 +37,7 @@ function FileUpload($key, $path, $extensions_white_list, $size_limit, &$error, $
$error[] = sprintf(_('Folder not writable').': %s',$path); //see PHP user rights
//store file
elseif(!move_uploaded_file($_FILES[$key]['tmp_name'],$full_path = ($path.($file_name!=false ? $file_name : ($final_extension==false ? no_accents($_FILES[$key]['name']) : no_accents(mb_substr($_FILES[$key]['name'], 0, mb_strrpos($_FILES[$key]['name'],'.'))).$final_extension)))))
elseif (!move_uploaded_file($_FILES[$key]['tmp_name'],$full_path = ($path.($file_name!=false ? $file_name : ($final_extension==false ? no_accents($_FILES[$key]['name']) : no_accents(mb_substr($_FILES[$key]['name'], 0, mb_strrpos($_FILES[$key]['name'],'.'))).$final_extension)))))
$error[] = sprintf(_('File invalid or not moveable').': %s',$_FILES[$key]['tmp_name']);
return $full_path;
......
......@@ -11,7 +11,7 @@ function HackingLog()
global $RosarioNotifyAddress;
// Send email to $RosarioNotifyAddress if set
if( filter_var( $RosarioNotifyAddress, FILTER_VALIDATE_EMAIL ) )
if ( filter_var( $RosarioNotifyAddress, FILTER_VALIDATE_EMAIL ) )
{
if ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) )
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
......
......@@ -4,7 +4,7 @@ function MailingLabel($address_id)
{ global $THIS_RET,$_ROSARIO;
$student_id = $THIS_RET['STUDENT_ID'];
if($address_id && !$_ROSARIO['MailingLabel'][$address_id][$student_id])
if ($address_id && !$_ROSARIO['MailingLabel'][$address_id][$student_id])
{
$people_RET = DBGet(DBQuery("SELECT p.FIRST_NAME,p.MIDDLE_NAME,p.LAST_NAME,
coalesce(a.MAIL_ADDRESS,a.ADDRESS) AS ADDRESS,coalesce(a.MAIL_CITY,a.CITY) AS CITY,coalesce(a.MAIL_STATE,a.STATE) AS STATE,coalesce(a.MAIL_ZIPCODE,a.ZIPCODE) AS ZIPCODE
......@@ -12,7 +12,7 @@ function MailingLabel($address_id)
WHERE sja.STUDENT_ID='".$student_id."' AND sja.ADDRESS_ID='".$address_id."'
ORDER BY sjp.STUDENT_RELATION"),array(),array('LAST_NAME'));
if(count($people_RET))
if (count($people_RET))
{
foreach($people_RET as $people)
{
......
......@@ -123,7 +123,7 @@ function PortalPollsDisplay($value,$name)
//verify if user is in excluded users list (format = '|[profile_id]:[user_id]')
$profile_id = User('PROFILE_ID');
if($profile_id != 0) //FJ call right Student/Staff ID
if ($profile_id != 0) //FJ call right Student/Staff ID
$user_id = $_SESSION['STAFF_ID'];
else
$user_id = $_SESSION['STUDENT_ID'];
......@@ -295,7 +295,7 @@ function makePublishing($value,$name)
{ global $THIS_RET;
static $profiles = null;
if($THIS_RET['ID'])
if ($THIS_RET['ID'])
$id = $THIS_RET['ID'];
else
$id = 'new';
......@@ -310,7 +310,7 @@ function makePublishing($value,$name)
$return .= '<TR><TD style="padding:0;">';
if(is_null($profiles))
if (is_null($profiles))
{
$profiles_RET = DBGet(DBQuery("SELECT ID,TITLE FROM USER_PROFILES ORDER BY ID"));
......@@ -357,7 +357,7 @@ function makePublishingVisibleTo($profiles, $THIS_RET, $id)
$teachers = array();
if(count($teachers_RET))
if (count($teachers_RET))
{
foreach($teachers_RET as $teacher)
$teachers[$teacher['STAFF_ID']] = $teacher['LAST_NAME'].', '.$teacher['FIRST_NAME'];
......@@ -386,7 +386,7 @@ function makePublishingVisibleTo($profiles, $THIS_RET, $id)
$visibleTo .= '</TD>';
if($i%2==0 && $i!=count($profiles))
if ($i%2==0 && $i!=count($profiles))
$visibleTo .= '</TR><TR class="st">';
}
......@@ -413,7 +413,7 @@ function makeFileAttached($value,$name)
{ global $THIS_RET, $PortalNotesFilesPath;
static $filesAttachedCount = 0;
if($THIS_RET['ID'])
if ($THIS_RET['ID'])
{
$id = $THIS_RET['ID'];
......
......@@ -8,7 +8,7 @@
//example:
/*
if( filter_var( $RosarioNotifyAddress, FILTER_VALIDATE_EMAIL ) )
if ( filter_var( $RosarioNotifyAddress, FILTER_VALIDATE_EMAIL ) )
{
//FJ add SendEmail function
include_once('ProgramFunctions/SendEmail.fnc.php');
......
......@@ -115,7 +115,7 @@ function _update29()
foreach( (array)$coms as $com )
{
if( is_array( list( $date, $staff_id ) = explode( '|', $com ) )
if ( is_array( list( $date, $staff_id ) = explode( '|', $com ) )
&& (int)$staff_id > 0 )
{
$ser_coms[$i]['date'] = $date;
......
......@@ -2,27 +2,27 @@
function _makePercentGrade($grade_id,$course_period_id=0,$staff_id=0)
{ global $programconfig,$_ROSARIO;
if(!$course_period_id)
if (!$course_period_id)
$course_period_id = UserCoursePeriod();
if(!$staff_id)
if (!$staff_id)
$staff_id = User('STAFF_ID');
if(!$programconfig[$staff_id])
if (!$programconfig[$staff_id])
{
$config_RET = DBGet(DBQuery("SELECT TITLE,VALUE FROM PROGRAM_USER_CONFIG WHERE USER_ID='".$staff_id."' AND PROGRAM='Gradebook'"),array(),array('TITLE'));
if(count($config_RET))
if (count($config_RET))
foreach($config_RET as $title=>$value)
$programconfig[$staff_id][$title] = $value[1]['VALUE'];
else
$programconfig[$staff_id] = true;
}
if(!$_ROSARIO['_makeLetterGrade']['courses'][$course_period_id])
if (!$_ROSARIO['_makeLetterGrade']['courses'][$course_period_id])
$_ROSARIO['_makeLetterGrade']['courses'][$course_period_id] = DBGet(DBQuery("SELECT DOES_BREAKOFF,GRADE_SCALE_ID FROM COURSE_PERIODS WHERE COURSE_PERIOD_ID='".$course_period_id."'"));
$does_breakoff = $_ROSARIO['_makeLetterGrade']['courses'][$course_period_id][1]['DOES_BREAKOFF'];
$grade_scale_id = $_ROSARIO['_makeLetterGrade']['courses'][$course_period_id][1]['GRADE_SCALE_ID'];
if(!$_ROSARIO['_makeLetterGrade']['grades'][$grade_scale_id])
if (!$_ROSARIO['_makeLetterGrade']['grades'][$grade_scale_id])
$_ROSARIO['_makeLetterGrade']['grades'][$grade_scale_id] = DBGet(DBQuery("SELECT TITLE,ID,BREAK_OFF FROM REPORT_CARD_GRADES WHERE SYEAR='".UserSyear()."' AND SCHOOL_ID='".UserSchool()."' AND GRADE_SCALE_ID='".$grade_scale_id."' ORDER BY BREAK_OFF IS NOT NULL DESC,BREAK_OFF DESC,SORT_ORDER"));
//$grades = array('A+','A','A-','B+','B','B-','C+','C','C-','D+','D','D-','F');
......@@ -30,7 +30,7 @@ function _makePercentGrade($grade_id,$course_period_id=0,$staff_id=0)
{
$prev = $crnt;
$crnt = ($does_breakoff=='Y' ? $programconfig[$staff_id][$course_period_id.'-'.$grade['ID']] : $grade['BREAK_OFF']);
if(is_numeric($grade_id) ? $grade_id==$grade['ID'] : mb_strtoupper($grade_id)==mb_strtoupper($grade['TITLE']))
if (is_numeric($grade_id) ? $grade_id==$grade['ID'] : mb_strtoupper($grade_id)==mb_strtoupper($grade['TITLE']))
return ($crnt + ($crnt>$prev ? 100 : $prev)) / 2;
}
return 0;
......
......@@ -2,16 +2,16 @@
function _makeNextSchool($value,$column)
{ global $THIS_RET;
if($value=='0')
if ($value=='0')
return _('Retain');
elseif($value=='-1')
elseif ($value=='-1')
return _('Do not enroll after this school year');
else
{
$school_RET = DBGet(DBQuery("SELECT TITLE FROM SCHOOLS WHERE SYEAR='".UserSyear()."' AND ID='".$value."'"));
$school_title = $school_RET[1]['TITLE'];
if($value==$THIS_RET['SCHOOL_ID'])
if ($value==$THIS_RET['SCHOOL_ID'])
return _('Next Grade at ').$school_title;
else
return $school_title;
......@@ -21,7 +21,7 @@ function _makeNextSchool($value,$column)
function _makeCalendar($value,$column)
{ global $calendars_RET;
if(!$calendars_RET)
if (!$calendars_RET)
$calendars_RET = DBGet(DBQuery("SELECT CALENDAR_ID,DEFAULT_CALENDAR,TITLE FROM ATTENDANCE_CALENDARS WHERE SYEAR='".UserSyear()."'"),array(),array('CALENDAR_ID'));
return $calendars_RET[$value][1]['TITLE'];
......
......@@ -354,7 +354,7 @@ $addJavascripts .= 'var menuStudentID = "' . UserStudentID() . '",
echo $student['FULL_NAME'];
?></OPTION>
<?php // set current School
if( UserStudentID() == $student['STUDENT_ID'] )
if ( UserStudentID() == $student['STUDENT_ID'] )
$_SESSION['UserSchool'] = $student['SCHOOL_ID'];
endforeach; ?>
......@@ -703,7 +703,7 @@ $addJavascripts .= 'var menuStudentID = "' . UserStudentID() . '",
echo $title;
?></A></li>
<?php // if is a section
elseif( $keys_modcat[$j+1]
elseif ( $keys_modcat[$j+1]
&& !is_numeric( $keys_modcat[$j+1] ) ) : ?>
<li class="menu-inter"><?php
......
......@@ -16,21 +16,21 @@ function db_start()
$connectstring = '';
if( $DatabaseServer != 'localhost' )
if ( $DatabaseServer != 'localhost' )
$connectstring = 'host=' . $DatabaseServer . ' ';
if( $DatabasePort != '5432' )
if ( $DatabasePort != '5432' )
$connectstring .= 'port=' . $DatabasePort .' ';
$connectstring .= 'dbname=' . $DatabaseName . ' user=' . $DatabaseUsername;
if( $DatabasePassword !== '' )
if ( $DatabasePassword !== '' )
$connectstring .= ' password=' . $DatabasePassword;
$connection = pg_connect( $connectstring );
// Error code for both.
if( $connection === false )
if ( $connection === false )
{
// TRANSLATION: do NOT translate these since error messages need to stay in English for technical support
db_show_error(
......@@ -76,7 +76,7 @@ function DBQuery( $sql )
$result = @pg_exec( $connection, $sql );
if( $result === false )
if ( $result === false )
{
$errstring = pg_last_error( $connection );
......@@ -99,7 +99,7 @@ function db_fetch_row( $result )
{
$return = @pg_fetch_array( $result );
if( is_array( $return ) )
if ( is_array( $return ) )
{
//modify loop: use for instead of foreach
$key = array_keys( $return );
......@@ -112,7 +112,7 @@ function db_fetch_row( $result )
/*foreach($return as $key => $value)
{
if(is_int($key))
if (is_int($key))
unset($return[$key]);
}*/
}
......@@ -175,7 +175,7 @@ function db_trans_query( $connection, $sql )
$result = pg_query( $connection, $sql );
if( $result === false )
if ( $result === false )
{
// rollback commands.
pg_query( $connection, 'ROLLBACK' );
......@@ -231,7 +231,7 @@ function db_case( $array )
{
$value = $array[$i];
if( $value == "''"
if ( $value == "''"
&& mb_substr( $string, -1 ) == '=' )
{
$value = ' IS NULL';
......@@ -241,17 +241,17 @@ function db_case( $array )
$string .= $value;
if( $counter == ( $array_count - 2 )
if ( $counter == ( $array_count - 2 )
&& $array_count % 2 == 0 )
$string .= ' ELSE ';
elseif( $counter == ( $array_count - 1 ) )
elseif ( $counter == ( $array_count - 1 ) )
$string .= ' END ';
elseif( $counter % 2 == 0 )
elseif ( $counter % 2 == 0 )
$string .= ' WHEN ' . $array[0] . '=';
elseif( $counter % 2 == 1 )
elseif ( $counter % 2 == 1 )
$string .= ' THEN ';
$counter++;
......@@ -314,17 +314,17 @@ function db_properties( $table )
{
$properties[mb_strtoupper( $row['FIELD'] )]['TYPE'] = mb_strtoupper( $row['TYPE'] );
if( mb_strtoupper( $row['TYPE'] ) == 'NUMERIC' )
if ( mb_strtoupper( $row['TYPE'] ) == 'NUMERIC' )
{
$properties[mb_strtoupper($row['FIELD'])]['SIZE'] = ( $row['LENGTHVAR'] >> 16 ) & 0xffff;
$properties[mb_strtoupper($row['FIELD'])]['SCALE'] = ( $row['LENGTHVAR'] - 4 ) & 0xffff;
}
else
{
if( $row['LENGTH'] > 0 )
if ( $row['LENGTH'] > 0 )
$properties[mb_strtoupper( $row['FIELD'] )]['SIZE'] = $row['LENGTH'];
elseif( $row['LENGTHVAR'] > 0 )
elseif ( $row['LENGTHVAR'] > 0 )
$properties[mb_strtoupper( $row['FIELD'] )]['SIZE'] = $row['LENGTHVAR'] - 4;
}
......@@ -385,7 +385,7 @@ function db_show_error( $sql, $failnote, $additional = '' )
echo '<!-- SQL STATEMENT: ' . "\n\n" . $sql . "\n\n" . ' -->';
// send notification email if $RosarioNotifyAddress set
if( filter_var( $RosarioNotifyAddress, FILTER_VALIDATE_EMAIL ) )
if ( filter_var( $RosarioNotifyAddress, FILTER_VALIDATE_EMAIL ) )
{
//FJ add SendEmail function
include( 'ProgramFunctions/SendEmail.fnc.php' );
......
......@@ -11,14 +11,14 @@ if ( version_compare( PHP_VERSION, '5.3.2' ) == -1 )
$error[] = 'RosarioSIS requires PHP 5.3.2 to run, your version is : ' . PHP_VERSION;
}
if( !isset( $_SESSION['STAFF_ID'] ) )
if ( !isset( $_SESSION['STAFF_ID'] ) )
{
$unset_username = true;
$_SESSION['USERNAME'] = 'diagnostic';
$_SESSION['STAFF_ID'] = '-1';
}
if( !file_exists( './Warehouse.php' ) )
if ( !file_exists( './Warehouse.php' ) )
{
$error[] = 'The diagnostic.php file needs to be in the RosarioSIS directory to be able to run. Please move it there, and run it again.';
}
......@@ -50,49 +50,49 @@ else
if ( (bool)ini_get( 'session.auto_start' ) )
$error[] = 'session.auto_start is set to On in your PHP configuration. See the php.ini file to deactivate it.' . $inipath;
if( !@opendir( $RosarioPath . '/functions' ) )
if ( !@opendir( $RosarioPath . '/functions' ) )
$error[] = 'The value for $RosarioPath in config.inc.php is not correct or else the functions directory does not have the correct permissions to be read by the webserver. Make sure $RosarioPath points to the RosarioSIS installation directory and that it is readable by all users.';
if( !function_exists( 'pg_connect' ) )
if ( !function_exists( 'pg_connect' ) )
$error[] = 'The pgsql extension (see the php.ini file) is not activated OR PHP was not compiled with PostgreSQL support. You may need to recompile PHP using the --with-pgsql option for RosarioSIS to work.';
else
{
if( $DatabaseServer != 'localhost' )
if ( $DatabaseServer != 'localhost' )
$connectstring = 'host=' . $DatabaseServer . ' ';
if( $DatabasePort != '5432' )
if ( $DatabasePort != '5432' )
$connectstring .= 'port=' . $DatabasePort .' ';
$connectstring .= 'dbname=' . $DatabaseName . ' user=' . $DatabaseUsername;
if( $DatabasePassword !== '' )
if ( $DatabasePassword !== '' )
$connectstring .= ' password=' . $DatabasePassword;
$connection = pg_connect( $connectstring );
if( !$connection )
if ( !$connection )
$error[] = 'RosarioSIS cannot connect to the Postgres database. Either Postgres is not running, it was not started with the -i option, or connections from this host are not allowed in the pg_hba.conf file. Last Postgres Error: ' . pg_last_error();
else
{
$result = @pg_exec( $connection, 'SELECT * FROM CONFIG' );
if( $result === false )
if ( $result === false )
$errstring = pg_last_error( $connection );
if( mb_strpos( $errstring, 'permission denied' ) !== false )
if ( mb_strpos( $errstring, 'permission denied' ) !== false )
$error[] = 'The database was created with the wrong permissions. The user specified in the config.inc.php file does not have permission to access the rosario database. Use the super-user (postgres) or recreate the database adding \connect - YOUR_USERNAME to the top of the rosariosis.sql file.';
elseif( mb_strpos( $errstring, 'elation "config" does not exist' ) !== false )
elseif ( mb_strpos( $errstring, 'elation "config" does not exist' ) !== false )
$error[] = 'At least one of the tables does not exist. Make sure you ran the rosariosis.sql file as described in the INSTALL file.';
elseif( $errstring )
elseif ( $errstring )
$error[] = $errstring;
$result = @pg_exec( $connection, "SELECT * FROM STAFF WHERE SYEAR='" . $DefaultSyear . "'" );
if( !pg_fetch_all( $result ) )
if ( !pg_fetch_all( $result ) )
$error[] = 'The value for $DefaultSyear in config.inc.php is not correct.';
if ( !is_array( $RosarioLocales )
......@@ -117,10 +117,10 @@ else
echo _ErrorMessage( $error, 'error' );
if( !count( $error ) )
if ( !count( $error ) )
echo '<h3>Your RosarioSIS installation is properly configured.</h3>';
if( $unset_username )
if ( $unset_username )
{
unset( $_SESSION['USERNAME'] );
unset( $_SESSION['STAFF_ID'] );
......@@ -128,13 +128,13 @@ if( $unset_username )
function _ErrorMessage( $errors, $code = 'error' )
{
if( $errors )
if ( $errors )
{
$return .= '<TABLE cellpadding="10"><TR><TD style="text-align:left;"><p style="font-size:larger;">';
if( count( $errors ) == 1 )
if ( count( $errors ) == 1 )
{
if( $code == 'error'
if ( $code == 'error'
|| $code == 'fatal' )
$return .= '<b><span style="color:#CC0000">Error:</span></b> ';