[Weberp-svn] SF.net SVN: weberp:[8278] trunk
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2011-10-13 17:53:09
|
Revision: 8278 http://weberp.svn.sourceforge.net/weberp/?rev=8278&view=rev Author: tim_schofield Date: 2011-10-13 17:53:03 +0000 (Thu, 13 Oct 2011) Log Message: ----------- Only show menu items that a user is authorised to use Modified Paths: -------------- trunk/includes/session.inc trunk/index.php trunk/sql/mysql/updates/95.php Added Paths: ----------- trunk/sql/mysql/updates/96.php Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2011-10-13 17:52:45 UTC (rev 8277) +++ trunk/includes/session.inc 2011-10-13 17:53:03 UTC (rev 8278) @@ -13,7 +13,7 @@ header('Location:' . $rootpath . '/install/index.php'); } include($PathPrefix . 'config.php'); -$DBVersion=95; +$DBVersion=96; if (isset($SessionSavePath)){ session_save_path($SessionSavePath); } Modified: trunk/index.php =================================================================== --- trunk/index.php 2011-10-13 17:52:45 UTC (rev 8277) +++ trunk/index.php 2011-10-13 17:53:03 UTC (rev 8278) @@ -607,11 +607,15 @@ $i=0; foreach ($MenuItems[$_SESSION['Module']]['Transactions']['Caption'] as $Caption) { /* Transactions Menu Item */ - echo '<tr> + $ScriptNameArray = explode('?', substr($MenuItems[$_SESSION['Module']]['Transactions']['URL'][$i],1)); + $PageSecurity = $_SESSION['PageSecurityArray'][$ScriptNameArray[0]]; + if ((in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) { + echo '<tr> <td class="menu_group_item"> <p>• <a href="' . $rootpath . $MenuItems[$_SESSION['Module']]['Transactions']['URL'][$i] .'">' . $Caption . '</a></p> </td> </tr>'; + } $i++; } echo '</table>'; @@ -635,11 +639,15 @@ $i=0; foreach ($MenuItems[$_SESSION['Module']]['Reports']['Caption'] as $Caption) { /* Transactions Menu Item */ - echo '<tr> + $ScriptNameArray = explode('?', substr($MenuItems[$_SESSION['Module']]['Reports']['URL'][$i],1)); + $PageSecurity = $_SESSION['PageSecurityArray'][$ScriptNameArray[0]]; + if ((in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) { + echo '<tr> <td class="menu_group_item"> <p>• <a href="' . $rootpath . $MenuItems[$_SESSION['Module']]['Reports']['URL'][$i] .'">' . $Caption . '</a></p> </td> </tr>'; + } $i++; } echo GetRptLinks($_SESSION['Module']); @@ -664,11 +672,15 @@ $i=0; foreach ($MenuItems[$_SESSION['Module']]['Maintenance']['Caption'] as $Caption) { /* Transactions Menu Item */ - echo '<tr> + $ScriptNameArray = explode('?', substr($MenuItems[$_SESSION['Module']]['Maintenance']['URL'][$i],1)); + $PageSecurity = $_SESSION['PageSecurityArray'][$ScriptNameArray[0]]; + if ((in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) { + echo '<tr> <td class="menu_group_item"> <p>• <a href="' . $rootpath . $MenuItems[$_SESSION['Module']]['Maintenance']['URL'][$i] .'">' . $Caption . '</a></p> </td> - </tr>'; + </tr>'; + } $i++; } echo '</table>'; Modified: trunk/sql/mysql/updates/95.php =================================================================== --- trunk/sql/mysql/updates/95.php 2011-10-13 17:52:45 UTC (rev 8277) +++ trunk/sql/mysql/updates/95.php 2011-10-13 17:53:03 UTC (rev 8278) @@ -18,6 +18,7 @@ `loccode` VARCHAR (5) NOT NULL DEFAULT '', `departmentid` INT NOT NULL DEFAULT 0, `despatchdate` DATE NOT NULL DEFAULT '0000-00-00', +`authorised` TINYINT NOT NULL DEFAULT 0, `narrative` TEXT NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8", $db); Added: trunk/sql/mysql/updates/96.php =================================================================== --- trunk/sql/mysql/updates/96.php (rev 0) +++ trunk/sql/mysql/updates/96.php 2011-10-13 17:53:03 UTC (rev 8278) @@ -0,0 +1,11 @@ +<?php + +/* Include the new script for printing quotations in Portrait + */ + +InsertRecord('pagesecurity', array('script', 'security'), array('RecurringSalesOrdersProcess.php',1), array('script', 'security'), array('RecurringSalesOrdersProcess.php',1), $db); +InsertRecord('pagesecurity', array('script', 'security'), array('reportwriter/admin/ReportCreator.php',15), array('script', 'security'), array('reportwriter/admin/ReportCreator.php',15), $db); + +UpdateDBNo(96, $db); + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |