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'));
$config_RET=DBGet(DBQuery("SELECT TITLE,VALUE FROM PROGRAM_USER_CONFIG WHERE USER_ID='".$staff_id."' AND PROGRAM='Gradebook'"),array(),array('TITLE'));
$_ROSARIO['_makeLetterGrade']['courses'][$course_period_id]=DBGet(DBQuery("SELECT DOES_BREAKOFF,GRADE_SCALE_ID FROM COURSE_PERIODS WHERE COURSE_PERIOD_ID='".$course_period_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"));
$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'));
$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.';
$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');
$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>';