From: <tim...@us...> - 2010-12-22 14:22:41
|
Revision: 4212 http://web-erp.svn.sourceforge.net/web-erp/?rev=4212&view=rev Author: tim_schofield Date: 2010-12-22 14:22:35 +0000 (Wed, 22 Dec 2010) Log Message: ----------- $Message Modified Paths: -------------- trunk/includes/GetConfig.php trunk/includes/session.inc trunk/index.php Modified: trunk/includes/GetConfig.php =================================================================== --- trunk/includes/GetConfig.php 2010-12-22 14:22:06 UTC (rev 4211) +++ trunk/includes/GetConfig.php 2010-12-22 14:22:35 UTC (rev 4212) @@ -27,6 +27,13 @@ $_SESSION['MenuAccess'][$myrow['menuid']]=$myrow['access']; } + $sql="SELECT script, security FROM pagesecurity"; + $result=DB_query($sql, $db); + + while ($myrow=DB_fetch_array($result)) { + $_SESSION[$myrow['script']]=$myrow['security']; + } + /* Also reads all the company data set up in the company record and returns an array */ $sql= 'SELECT @@ -61,8 +68,8 @@ $ReadCoyResult = DB_query($sql,$db,$ErrMsg); if (DB_num_rows($ReadCoyResult)==0) { - echo '<BR><B>'; - prnMsg( _('The company record has not yet been set up') . '</B><BR>' . _('From the system setup tab select company maintenance to enter the company information and system preferences'),'error',_('CRITICAL PROBLEM')); + echo '<br /><b>'; + prnMsg( _('The company record has not yet been set up') . '</b><br />' . _('From the system setup tab select company maintenance to enter the company information and system preferences'),'error',_('CRITICAL PROBLEM')); exit; } else { $_SESSION['CompanyRecord'] = DB_fetch_array($ReadCoyResult); Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2010-12-22 14:22:06 UTC (rev 4211) +++ trunk/includes/session.inc 2010-12-22 14:22:35 UTC (rev 4212) @@ -113,6 +113,8 @@ /*User is logged in so get configuration parameters - save in session*/ include($PathPrefix . 'includes/GetConfig.php'); +$PageSecurity = $_SESSION[basename($_SERVER['SCRIPT_NAME'])]; + if(isset($_SESSION['DB_Maintenance'])){ if ($_SESSION['DB_Maintenance']!=0) { if (DateDiff(Date($_SESSION['DefaultDateFormat']), Modified: trunk/index.php =================================================================== --- trunk/index.php 2010-12-22 14:22:06 UTC (rev 4211) +++ trunk/index.php 2010-12-22 14:22:35 UTC (rev 4212) @@ -4,7 +4,7 @@ /* $Revision: 1.91 $ */ -$PageSecurity = 1; +// $PageSecurity = 1; include('includes/session.inc'); $title=_('Main Menu'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |