[Weberp-svn] SF.net SVN: weberp:[9067] trunk
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2012-06-28 10:43:00
|
Revision: 9067 http://weberp.svn.sourceforge.net/weberp/?rev=9067&view=rev Author: tim_schofield Date: 2012-06-28 10:42:49 +0000 (Thu, 28 Jun 2012) Log Message: ----------- More work on new interface Modified Paths: -------------- trunk/AccountSections.php trunk/css/silverwolf/default.css trunk/css/silverwolf/sub.css Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2012-06-28 10:03:41 UTC (rev 9066) +++ trunk/AccountSections.php 2012-06-28 10:42:49 UTC (rev 9067) @@ -8,8 +8,6 @@ include('includes/header.inc'); -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p>'; - // SOME TEST TO ENSURE THAT AT LEAST INCOME AND COST OF SALES ARE THERE $sql= "SELECT sectionid FROM accountsection WHERE sectionid=1"; $result = DB_query($sql,$db); @@ -151,8 +149,6 @@ unset ($_POST['SectionName']); } -if (!isset($_GET['SelectedSectionID']) and !isset($_POST['SelectedSectionID'])) { - /* An account section could be posted when one has been edited and is being updated or GOT when selected for modification SelectedSectionID will exist because it was sent with the page in a GET . @@ -161,46 +157,57 @@ links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ - $sql = "SELECT sectionid, - sectionname - FROM accountsection - ORDER BY sectionid"; +$sql = "SELECT sectionid, + sectionname + FROM accountsection + ORDER BY sectionid"; - $ErrMsg = _('Could not get account group sections because'); - $result = DB_query($sql,$db,$ErrMsg); +$ErrMsg = _('Could not get account group sections because'); +$result = DB_query($sql,$db,$ErrMsg); - echo '<br /><table name="SectionList" class="selection"> +echo '<br /><table name="SectionList" class="selection"> <tr> + <th colspan="4" class="header">' . _('Review Account Sections') . '</th + </tr> + <tr> <th>' . _('Section Number') . '</th> <th>' . _('Section Description') . '</th> </tr>'; - $k=0; //row colour counter - while ($myrow = DB_fetch_array($result)) { +$k=0; //row colour counter +while ($myrow = DB_fetch_array($result)) { - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + + echo '<td>' . $myrow['sectionid'] . '</td><td>' . $myrow['sectionname'] . '</td>'; + if (!isset($_GET['SelectedSectionID']) and !isset($_POST['SelectedSectionID'])) { + echo '<td>'.InternalLink($rootpath, htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedSectionID=' . htmlentities($myrow['sectionid'], ENT_QUOTES,'UTF-8'), _('Edit')).'</td>'; + if ( $myrow['sectionid'] == '1' or $myrow['sectionid'] == '2' ) { + echo '<td><b>'._('Restricted').'</b></td>'; } else { - echo '<tr class="OddTableRows">'; - $k++; + echo '<td>'.InternalLink($rootpath, htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedSectionID=' . htmlentities($myrow['sectionid'], ENT_QUOTES,'UTF-8') . '&delete=1', _('Delete')).'</td>'; } - - echo '<td>' . $myrow['sectionid'] . '</td><td>' . $myrow['sectionname'] . '</td>'; - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedSectionID=' . $myrow['sectionid'] . '">' . _('Edit') . '</a></td>'; + } else { + echo '<td>' . _('Edit') . '</td>'; if ( $myrow['sectionid'] == '1' or $myrow['sectionid'] == '2' ) { echo '<td><b>'._('Restricted').'</b></td>'; } else { - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedSectionID=' . $myrow['sectionid'] . '&delete=1">' . _('Delete') .'</a></td>'; + echo '<td>' . _('Delete') . '</td>'; } - echo '</tr>'; - } //END WHILE LIST LOOP - echo '</table><br />'; -} //end of ifs and buts! + } + echo '</tr>'; +} //END WHILE LIST LOOP +echo '</table><br />'; if (! isset($_GET['delete'])) { - echo '<form method="post" name="AccountSections" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<form method="post" name="AccountSections" onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($_GET['SelectedSectionID'])) { @@ -222,7 +229,7 @@ $_POST['SectionName'] = $myrow['sectionname']; echo '<input type="hidden" name="SelectedSectionID" value="' . $_POST['SectionID'] . '" />'; - echo '<br /><table class="selection"> + echo '<table class="selection"> <tr> <th class="header" colspan="2">' . _('Edit Account Section Details') . '</th> </tr> @@ -259,10 +266,6 @@ echo '<tr><td colspan="2"><div class="centre"><button tabindex="3" type="submit" name="submit">' . _('Enter Information') . '</button></div></td></tr>'; echo '</table><br />'; - if (isset($_POST['SelectedSectionID']) or isset($_GET['SelectedSectionID'])) { - echo '<div style="text-align: right"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Review Account Sections') . '</a></div>'; - } - if (!isset($_GET['SelectedSectionID']) or $_GET['SelectedSectionID']=='') { echo '<script>defaultControl(document.AccountSections.SectionID);</script>'; } else { Modified: trunk/css/silverwolf/default.css =================================================================== --- trunk/css/silverwolf/default.css 2012-06-28 10:03:41 UTC (rev 9066) +++ trunk/css/silverwolf/default.css 2012-06-28 10:42:49 UTC (rev 9067) @@ -756,6 +756,7 @@ -moz-box-shadow: 3px 3px 2px #888; -webkit-box-shadow: 3px 3px 2px #888; box-shadow: 3px 3px 3px #888; + visibility: hidden; } div.page_help_text { Modified: trunk/css/silverwolf/sub.css =================================================================== --- trunk/css/silverwolf/sub.css 2012-06-28 10:03:41 UTC (rev 9066) +++ trunk/css/silverwolf/sub.css 2012-06-28 10:42:49 UTC (rev 9067) @@ -64,7 +64,7 @@ left: 20%; padding-left: 4px; padding-right: 4px; - background: #AEDFFF; + background: #DEFFDF; color: #110D75; opacity: 1.00; z-index: 4; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |