From: <rc...@us...> - 2015-01-05 03:41:52
|
Revision: 7067 http://sourceforge.net/p/web-erp/reponame/7067 Author: rchacon Date: 2015-01-05 03:41:43 +0000 (Mon, 05 Jan 2015) Log Message: ----------- Allow turn on/off the dashboard display after login for an specific user. Add comments to code. Modified Paths: -------------- trunk/WWW_Users.php trunk/doc/Change.log trunk/includes/UserLogin.php trunk/sql/mysql/upgrade4.11-4.12.sql Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2015-01-04 22:50:43 UTC (rev 7066) +++ trunk/WWW_Users.php 2015-01-05 03:41:43 UTC (rev 7067) @@ -1,5 +1,4 @@ <?php - /* $Id$*/ if (isset($_POST['UserID']) AND isset($_POST['ID'])){ @@ -26,15 +25,18 @@ _('Chinese'), _('Free Serif')); -$Title = _('Users Maintenance'); -/* webERP manual links before header.inc */ -$ViewTopic= 'GettingStarted'; -$BookMark = 'UserMaintenance'; +$Title = _('Users Maintenance');// Screen identificator. +$ViewTopic= 'GettingStarted';// Filename's id in ManualContents.php's TOC. +$BookMark = 'UserMaintenance';// Anchor's id in the manual's html document. include('includes/header.inc'); +echo '<p class="page_title_text"><img alt="" src="'.$RootPath.'/css/'.$Theme. + '/images/group_add.png" title="' .// Title icon. + _('Search') . '" />' .// Icon title. + $Title . '</p>';// Page title. + include('includes/SQL_CommonFunctions.inc'); -echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/group_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title . '</p> - <br />'; +echo '<br />';// Extra line after page_title_text. // Make an array of the security roles $sql = "SELECT secroleid, @@ -155,6 +157,7 @@ language ='" . $_POST['UserLanguage'] . "', defaultlocation='" . $_POST['DefaultLocation'] ."', modulesallowed='" . $ModulesAllowed . "', + showdashboard='" . $_POST['ShowDashboard'] . "', blocked='" . $_POST['Blocked'] . "', pdflanguage='" . $_POST['PDFLanguage'] . "', department='" . $_POST['Department'] . "' @@ -238,6 +241,7 @@ unset($_POST['CanCreateTender']); unset($_POST['DefaultLocation']); unset($_POST['ModulesAllowed']); + unset($_POST['ShowDashboard']); unset($_POST['Blocked']); unset($_POST['Theme']); unset($_POST['UserLanguage']); @@ -303,10 +307,12 @@ <th>' . _('Supplier Code') . '</th> <th>' . _('Salesperson') . '</th> <th>' . _('Last Visit') . '</th> - <th>' . _('Security Role') . '</th> - <th>' . _('Report Size') . '</th> - <th>' . _('Theme') . '</th> - <th>' . _('Language') . '</th> + <th>' . _('Security Role') . '</th> + <th>' . _('Report Size') . '</th> + <th>' . _('Theme') . '</th> + <th>' . _('Language') . '</th> + <th> </th> + <th> </th> </tr>'; $k=0; //row colour counter @@ -392,6 +398,7 @@ cancreatetender, defaultlocation, modulesallowed, + showdashboard, blocked, theme, language, @@ -418,6 +425,7 @@ $_POST['ModulesAllowed'] = $myrow['modulesallowed']; $_POST['Theme'] = $myrow['theme']; $_POST['UserLanguage'] = $myrow['language']; + $_POST['ShowDashboard'] = $myrow['showdashboard']; $_POST['Blocked'] = $myrow['blocked']; $_POST['PDFLanguage'] = $myrow['pdflanguage']; $_POST['Department'] = $myrow['department']; @@ -687,6 +695,20 @@ </tr>'; $i++; } + +echo '<tr> + <td>' . _('Display Dashboard after Login') . ': </td> + <td><select name="ShowDashboard">'; +if($_POST['ShowDashboard']==0) { + echo '<option selected="selected" value="0">' . _('No') . '</option>'; + echo '<option value="1">' . _('Yes') . '</option>'; +} else { + echo '<option selected="selected" value="1">' . _('Yes') . '</option>'; + echo '<option value="0">' . _('No') . '</option>'; +} +echo '</select></td> + </tr>'; + if (!isset($_POST['PDFLanguage'])){ $_POST['PDFLanguage']=0; } @@ -755,4 +777,4 @@ </form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-01-04 22:50:43 UTC (rev 7066) +++ trunk/doc/Change.log 2015-01-05 03:41:43 UTC (rev 7067) @@ -1,5 +1,6 @@ webERP Change Log +05/01/15 RChacon: Allow turn on/off the dashboard display after login for an specific user. Add comments to code. 04/01/15 RChacon: In RevisionTranslations.php, add $Id, $ViewTopic, $BookMark and page_title_text. Add info to manual. Add comments to code. 04/01/15 RChacon: In SystemParameters.php, remove root path to config.php and add comments. 01/01/15 RChacon: Move default theme from session.inc to config.php. Add the ability to change the default theme in SystemParameters.php. Modified: trunk/includes/UserLogin.php =================================================================== --- trunk/includes/UserLogin.php 2015-01-04 22:50:43 UTC (rev 7066) +++ trunk/includes/UserLogin.php 2015-01-05 03:41:43 UTC (rev 7067) @@ -110,7 +110,7 @@ $_SESSION['SalesmanLogin'] = $myrow['salesman']; $_SESSION['CanCreateTender'] = $myrow['cancreatetender']; $_SESSION['AllowedDepartment'] = $myrow['department']; - $_SESSION['ShowDashboard'] = $myrow['dashboard']; + $_SESSION['ShowDashboard'] = $myrow['showdashboard']; if (isset($myrow['pdflanguage'])) { $_SESSION['PDFLanguage'] = $myrow['pdflanguage']; @@ -271,4 +271,4 @@ return UL_OK; /* All is well */ } -?> \ No newline at end of file +?> Modified: trunk/sql/mysql/upgrade4.11-4.12.sql =================================================================== --- trunk/sql/mysql/upgrade4.11-4.12.sql 2015-01-04 22:50:43 UTC (rev 7066) +++ trunk/sql/mysql/upgrade4.11-4.12.sql 2015-01-05 03:41:43 UTC (rev 7067) @@ -1,7 +1,9 @@ INSERT INTO `config` VALUES ('InvoiceQuantityDefault','1'); -ALTER TABLE `www_users` ADD `dashboard` TINYINT NOT NULL DEFAULT '0'; +-- Add field to display dashboard after login: +ALTER TABLE `www_users` ADD `showdashboard` TINYINT(1) NOT NULL DEFAULT '0' COMMENT 'Display dashboard after login' AFTER `modulesallowed`; + INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description` ) VALUES ('Z_UpdateItemCosts.php', '15', 'Use CSV of item codes and costs to update webERP item costs'); -INSERT INTO scripts (`script` ,`pagesecurity` ,`description` ) VALUES ('CustomerBalancesMovement.php', '3', 'Allow customers to be listed in local currency with balances and activity over a date range'); +INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description` ) VALUES ('CustomerBalancesMovement.php', '3', 'Allow customers to be listed in local currency with balances and activity over a date range'); INSERT INTO `scripts` VALUES ('UserLocations.php', '15', 'Location User Maintenance'); ALTER TABLE `stockmoves` ADD `userid` VARCHAR( 20 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `trandate`; @@ -19,7 +21,7 @@ INSERT INTO `config` (`confname` ,`confvalue` ) VALUES ('QualityLogSamples', '0'); INSERT INTO `config` (`confname` ,`confvalue` ) VALUES ('QualityCOAText', ''); -INSERT INTO `config` (`confname` ,`confvalue` ) VALUES (' QualityProdSpecText', ''); +INSERT INTO `config` (`confname` ,`confvalue` ) VALUES ('QualityProdSpecText', ''); -- -- Table structure for table `prodspecs` |