[Weberp-svn] SF.net SVN: weberp:[9066] trunk
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2012-06-28 10:03:53
|
Revision: 9066 http://weberp.svn.sourceforge.net/weberp/?rev=9066&view=rev Author: tim_schofield Date: 2012-06-28 10:03:41 +0000 (Thu, 28 Jun 2012) Log Message: ----------- New style for all pages Modified Paths: -------------- trunk/AccountGroups.php trunk/css/silverwolf/default.css trunk/doc/Manual/ManualContents.php trunk/doc/Manual/ManualGeneralLedger.html trunk/doc/Manual/ManualHeader.html trunk/doc/Manual/style/manual.css trunk/includes/MiscFunctions.php trunk/includes/footer.inc trunk/includes/header.inc trunk/includes/session.inc trunk/index.php trunk/javascripts/MiscFunctions.js Added Paths: ----------- trunk/branding.php trunk/css/silverwolf/sub.css trunk/includes/main_footer.inc trunk/includes/main_header.inc trunk/javascripts/FormFunctions.js Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2012-06-26 09:24:09 UTC (rev 9065) +++ trunk/AccountGroups.php 2012-06-28 10:03:41 UTC (rev 9066) @@ -10,7 +10,7 @@ include('includes/header.inc'); include('includes/SQL_CommonFunctions.inc'); -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p>'; +//echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p>'; function CheckForRecursiveGroup ($ParentGroupName, $GroupName, $db) { @@ -64,7 +64,7 @@ $result=DB_query($sql, $db,$ErrMsg,$DbgMsg); $myrow=DB_fetch_row($result); - if ($myrow[0]!=0 and $_POST['SelectedAccountGroup']=='') { + if ($myrow[0]!=0 and (isset($_POST['SelectedAccountGroup']) and $_POST['SelectedAccountGroup']=='')) { $InputError = 1; prnMsg( _('The account group name already exists in the database'),'error'); $Errors[$i] = 'GroupName'; @@ -126,9 +126,8 @@ $i++; } + if ((isset($_POST['SelectedAccountGroup']) and $_POST['SelectedAccountGroup']!='') AND $InputError !=1) { - if ($_POST['SelectedAccountGroup']!='' AND $InputError !=1) { - /*SelectedAccountGroup could also exist if submit had not been clicked this code would not run in this case cos submit is false of course see the delete code below*/ $sql = "UPDATE accountgroups SET groupname='" . $_POST['GroupName'] . "', @@ -165,10 +164,13 @@ //run the SQL from either of the above possibilites $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); prnMsg($msg,'success'); - unset ($_POST['SelectedAccountGroup']); - unset ($_POST['GroupName']); - unset ($_POST['SequenceInTB']); } + unset ($_POST['SelectedAccountGroup']); + unset ($_POST['GroupName']); + unset ($_POST['SequenceInAccounts']); + unset ($_POST['SequenceInTB']); + unset ($_POST['PandL']); + unset ($_POST['submit']); } elseif (isset($_GET['delete'])) { //the link to delete a selected record was clicked instead of the submit button @@ -204,8 +206,6 @@ } -if (!isset($_GET['SelectedAccountGroup']) and !isset($_POST['SelectedAccountGroup'])) { - /* An account group could be posted when one has been edited and is being updated or GOT when selected for modification SelectedAccountGroup will exist because it was sent with the page in a GET . If its the first time the page has been displayed with no parameters @@ -228,6 +228,9 @@ echo '<br /><table class="selection"> <tr> + <th colspan="7" class="header">' . _('Review Account Groups') . '</th> + </tr> + <tr> <th>' . _('Group Name') . '</th> <th>' . _('Section') . '</th> <th>' . _('Sequence In TB') . '</th> @@ -260,20 +263,23 @@ echo '<td>' . htmlentities($myrow['groupname'], ENT_QUOTES,'UTF-8') . '</td> <td>' . $myrow['sectionname'] . '</td> - <td>' . $myrow['sequenceintb'] . '</td> - <td>' . $PandLText . '</td> + <td class="number">' . $myrow['sequenceintb'] . '</td> + <td style="text-align: center;">' . $PandLText . '</td> <td>' . $myrow['parentgroupname'] . '</td>'; - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedAccountGroup=' . htmlentities($myrow['groupname'], ENT_QUOTES,'UTF-8') . '">' . _('Edit') . '</a></td>'; - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedAccountGroup=' . htmlentities($myrow['groupname'], ENT_QUOTES,'UTF-8') . '&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this account group?') . '\');">' . _('Delete') .'</a></td></tr>'; - } //END WHILE LIST LOOP - echo '</table>'; -} //end of ifs and buts! + if (!isset($_GET['SelectedAccountGroup']) and !isset($_POST['SelectedAccountGroup'])) { + echo '<td>'.InternalLink($rootpath, htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedAccountGroup=' . htmlentities($myrow['groupname'], ENT_QUOTES,'UTF-8'), _('Edit')).'</td>'; + echo '<td>'.InternalLink($rootpath, htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedAccountGroup=' . htmlentities($myrow['groupname'], ENT_QUOTES,'UTF-8') . '&delete=1', _('Delete')).'</td>'; + } else { + echo '<td>' . _('Edit') . '</td>'; + echo '<td>' . _('Delete') . '</td>'; + } +} //END WHILE LIST LOOP +echo '</table>'; - if (!isset($_GET['delete'])) { - echo '<form method="post" id="AccountGroups" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<form method="post" id="AccountGroups" 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['SelectedAccountGroup'])) { @@ -303,7 +309,7 @@ $_POST['PandL'] = $myrow['pandl']; $_POST['ParentGroupName'] = $myrow['parentgroupname']; - echo '<table class="selection">'; + echo '<br /><table class="selection">'; echo '<tr> <th colspan="2" class="header">' . _('Edit Account Group Details') . '</th> </tr>'; @@ -334,7 +340,6 @@ } echo '<br /><table class="selection">'; - echo '<input type="hidden" name="SelectedAccountGroup" value="' . $_POST['SelectedAccountGroup'] . '" />'; echo '<tr> <th colspan="2" class="header">' . _('New Account Group Details') . '</th> </tr>'; @@ -405,15 +410,11 @@ </tr>'; echo '<tr> - <td colspan="2"><div class="centre"><button tabindex="6" type="submit" name="submit">' . _('Enter Information') . '</button></div></td> + <td colspan="2"><div class="centre"><button tabindex="6" type="submit" name="submit" value="submit">' . _('Enter Information') . '</button></div></td> </tr>'; echo '</table><br />'; - if (isset($_POST['SelectedAccountGroup']) or isset($_GET['SelectedAccountGroup'])) { - echo '<div style="text-align: right"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Review Account Groups') . '</a></div>'; - } - echo '<script type="text/javascript">defaultControl(document.forms[0].GroupName);</script>'; echo '</form>'; Added: trunk/branding.php =================================================================== --- trunk/branding.php (rev 0) +++ trunk/branding.php 2012-06-28 10:03:41 UTC (rev 9066) @@ -0,0 +1,5 @@ +<?php + +$ProjectName='webERP'; + +?> \ No newline at end of file Modified: trunk/css/silverwolf/default.css =================================================================== --- trunk/css/silverwolf/default.css 2012-06-26 09:24:09 UTC (rev 9065) +++ trunk/css/silverwolf/default.css 2012-06-28 10:03:41 UTC (rev 9066) @@ -35,6 +35,11 @@ border:none; } +img.manual { + border:none; + width: 98%; +} + /* From merge li { list-style-image: url(bullet.gif); ¡ bullet.gif only exist in fresh theme and off images directory ! } */ @@ -128,7 +133,7 @@ border-radius: 5px; -moz-box-shadow: 3px 3px 2px #B1B1B1; -webkit-box-shadow: 3px 3px 2px #B1B1B1; - box-shadow: 3px 3px 2px #B1B1B1; + box-shadow: 3px 3px 8px #B1B1B1; } td.number { @@ -184,7 +189,8 @@ background-color: #fddbdb; color: red; border: 1px solid red; - width: 80%; + border-radius: 10px; + width: 95%; text-align: center; margin: 0 auto; } @@ -193,7 +199,8 @@ background-color: #f5dbfd; color: maroon; border: 1px solid maroon; - width: 80%; + border-radius: 10px; + width: 95%; text-align: center; margin: 0 auto; } @@ -202,7 +209,8 @@ background-color: #b9ecb4; color: #006400; /* darkgreen is not a w3c css valid color */ border: 1px solid #006400; /* darkgreen is not a w3c css valid color */ - width: 80%; + border-radius: 10px; + width: 95%; text-align: center; margin: 0 auto; } @@ -211,7 +219,7 @@ background-color: #c7ccf6; color: navy; border: 1px solid navy; - width: 80%; + width: 95%; text-align: center; margin: 0 auto; } @@ -747,7 +755,7 @@ text-align:center; -moz-box-shadow: 3px 3px 2px #888; -webkit-box-shadow: 3px 3px 2px #888; - box-shadow: 3px 3px 2px #888; + box-shadow: 3px 3px 3px #888; } div.page_help_text { @@ -767,6 +775,9 @@ font-size: 100%; color: black; text-align:center; + -moz-box-shadow: 3px 3px 2px #888; + -webkit-box-shadow: 3px 3px 2px #888; + box-shadow: 3px 3px 3px #888; } /* From merge @@ -907,8 +918,3 @@ background-color: #FFDAE1; color: #510D19; } -/* From merge, uncomment to apply style -.table_index { - background-color: #F1FFDD; -} -End merge */ Added: trunk/css/silverwolf/sub.css =================================================================== --- trunk/css/silverwolf/sub.css (rev 0) +++ trunk/css/silverwolf/sub.css 2012-06-28 10:03:41 UTC (rev 9066) @@ -0,0 +1,255 @@ + +div.mask { + position: absolute; + top: 0px; + right: 0px; + bottom: 0px; + left: 0px; + background: black; + opacity: 0.4; + z-index: 1; +} + +div.unmask { + position: absolute; + display: none; + z-index: 1; +} + +div.inputbox { + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + font-size:12px; + border-radius: 17px; + position: absolute; + display: inline; + top: 10px; + right: 10px; + bottom: 20px; + left: 20px; + background: black; + color: white; + opacity: 0.85; + z-index: 2; + overflow:auto; +} + +div.helpbox { + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + font-size:12px; + border-radius: 17px; + position: absolute; + display: inline; + top: 20px; + right: 20%; + bottom: 25px; + left: 20%; + padding-left: 10px; + padding-right: 10px; + background: white; + color: black; + opacity: 0.99; + z-index: 4; + overflow:auto; +} + +div.messagebox { + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + font-size:12px; + border-radius: 17px; + position: absolute; + display: inline; + top: 35%; + right: 20%; + bottom: 35%; + left: 20%; + padding-left: 4px; + padding-right: 4px; + background: #AEDFFF; + color: #110D75; + opacity: 1.00; + z-index: 4; + overflow:auto; +} + +div.title_bar { + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + font-size: 200%; + border: solid #ffffff 2px; + border-radius: 17px; + margin-top: 2px; + margin-left: 4px; + margin-right: 4px; + font-size: 200%; + padding-left: 10px; +} + +div.manual_title_bar { + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + font-size: 24px; + border: solid #000000 2px; + border-radius: 17px; + margin-top: 2px; + margin-left: 0px; + margin-right: 4px; + padding-left: 10px; +} + +div.status_bar { + position: relative; + bottom:2px; + border: solid #ffffff 2px; + border-radius: 17px; + margin-top: 2px; + margin-left: 4px; + margin-right: 4px; + font-size: 200%; + width: 99%; +} + +div.clock { + float: right; + margin-top: 0px; + margin-bottom: 2px; + margin-left: 4px; + margin-right: 4px; + font-size: 100%; + height: 26px; +} + +div.exit { + float: right; + padding-top:0px; + padding-right:10px; + height: 100%; + cursor: pointer; +} + +table.selection { + margin-bottom: 5px; + background: transparent; + border: solid #ffffff 2px; + border-radius: 5px; + box-shadow: 0px 0px 0px #B1B1B1; +} + +th { + font-weight: bold; + background-color: transparent; + border: solid #ffffff 1px; + border-radius: 5px; + font-size: 100%; + color: #ffffff; + text-align: center; + vertical-align: middle; +} + +th.header { + font-weight: normal; + background: #90979B; + border: solid #A49999 1px; + border-radius: 5px; + font-size: 16px; + color: #000000; + text-align: center; + vertical-align: middle; +} + +button { + border: 1px solid #ffffff; + background: transparent; + padding: 2px 3px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 12px; + color: #ffffff; + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "Geneva", "Verdana", "sans-serif"; + font-size: 10px; + vertical-align: middle; + cursor: hand; +} + +button:hover { + border: 1px solid #000000; + background: #BEBEBE; + color: #000000; + cursor: pointer; +} + +button:active { + border-top-color: #4C5860; + background: #638094; +} + +button.dialog { + border: 1px solid #000000; + background: transparent; + float: right; + width: 20%; + padding: 2px 3px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 12px; + color: #000000; + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "Geneva", "Verdana", "sans-serif"; + font-size: 10px; + vertical-align: middle; + cursor: hand; +} + +button.dialog:hover { + border: 1px solid #000000; + background: #BEBEBE; + color: #000000; + cursor: pointer; +} + +button.dialog:active { + border-top-color: #4C5860; + background: #638094; +} + +input { + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + font-size: 10px; + background-color: transparent; + border-width:1px; + color:#ffffff; + border-color: gray; + border-style: solid; + border-radius: 3px; +} +input:hover { + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + font-size: 10px; + background-color: transparent; + border-width:1px; + color:#ffffff; + border-color: #646566; + border-style: solid; + border-radius: 3px; +} + +select { + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + font-size: 10px; + background-color: transparent; + border-width:1px; + color:#ffffff; + border-color: gray; + border-style: solid; + border-radius: 3px; +} +select:hover { + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + font-size: 10px; + background-color: transparent; + border-width:1px; + color:#ffffff; + border-color: #646566; + border-style: solid; + border-radius: 3px; +} + +a:hover { + color:#D2D5D6; +} \ No newline at end of file Modified: trunk/doc/Manual/ManualContents.php =================================================================== --- trunk/doc/Manual/ManualContents.php 2012-06-26 09:24:09 UTC (rev 9065) +++ trunk/doc/Manual/ManualContents.php 2012-06-28 10:03:41 UTC (rev 9066) @@ -29,7 +29,7 @@ echo ' <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (((!isset($_POST['Submit'])) AND (empty($_GET['ViewTopic']))) || - ((isset($_POST['Submit'])) AND(isset($_POST['SelectTableOfContents'])))) { + ((isset($_POST['Submit'])) AND(isset($_POST['SelectTableOfContents'])))) { // if not submittws then coming into manual to look at TOC // if SelectTableOfContents set then user wants it displayed if (!isset($_POST['Submit'])) { @@ -44,7 +44,7 @@ } echo "Table of Contents</h1></li>\n"; foreach ($TOC_Array['TableOfContents'] as $Title => $SubLinks) { - + $Name = 'Select' . $Title; echo "<ul>\n"; if (!isset($_POST['Submit'])) { Modified: trunk/doc/Manual/ManualGeneralLedger.html =================================================================== --- trunk/doc/Manual/ManualGeneralLedger.html 2012-06-26 09:24:09 UTC (rev 9065) +++ trunk/doc/Manual/ManualGeneralLedger.html 2012-06-28 10:03:41 UTC (rev 9066) @@ -2,7 +2,7 @@ <h2>Overview</h2> -<p>The general ledger is the accounting hub that is central to the "sub" ledgers for creditors (Accounts Payable), debtors (Accounts Receivable) and stock (inventory). All entries in the sub ledgers are also represented by entries in the general ledger. It is the integration set-up that determines how entries in the sub-ledgers are reflected in the general ledger. Most activity in the general ledger will be automatically created from the activity in the sub-ledgers with receivables, payables and stock administration.</p><img src="images/GLIntegration.jpg"> +<p>The general ledger is the accounting hub that is central to the "sub" ledgers for creditors (Accounts Payable), debtors (Accounts Receivable) and stock (inventory). All entries in the sub ledgers are also represented by entries in the general ledger. It is the integration set-up that determines how entries in the sub-ledgers are reflected in the general ledger. Most activity in the general ledger will be automatically created from the activity in the sub-ledgers with receivables, payables and stock administration.</p><img class="manual" src="doc/Manual/images/GLIntegration.jpg"> <p> <p>However, there are also facilities to:</p> @@ -48,7 +48,7 @@ <p>Bank accounts are defined from the setup tab from the link to Bank Accounts Maintenance. There is facility to enter the name of the account, the currency of the account, the bank account number and the address of the bank if required, as well as selecting the general ledger account to which it refers. There are links to edit existing bank account records and to delete them. However, once defined as referring to a particular general ledger code it is not possible to change the general ledger code of the bank account. This is because there would be entries made to this account. Similarly, if bank transactions have been created using this bank account it is not possible to delete it. The bank account transactions must be purged first (but currently no facility exists to purge bank transactions). It is not possible to change the currency of a bank account once there are transactions against it.</p> -<p>Once all receipts and payments are matched to bank statements, the bank reconciliation statement can be printed which should show how the current general ledger balance reconciles to the bank statement for this account. The reconciliation also has an option available for bank accounts set up in other than the functional currency of the business (local currency), to post differences in exchange. The balance of the account is maintained in local currency in the general ledger and for the purposes of the bank reconciliation this is converted to the bank account currency at the exchange rate in the currencies table (see Setup -> Currency Maintenance) - this rate can be changed manually to the rate of the day and the foreign currency balance on the account will change - to correct this balance an exchange difference needs to be recorded. Having worked through the matching of receipts and payments to the bank statements - the bank statment balance can be entered to compare against the system balance - a correcting entry is then made to the GL to post the difference on exchange. The posting to the general ledger is back dated to the end of the preceeding month - since it is assumed that the reconciliation may be a few days or a week behind the current date.</p><img src="images/BankReconciliation.jpg"> <!-- Help End: BankAccounts --> +<p>Once all receipts and payments are matched to bank statements, the bank reconciliation statement can be printed which should show how the current general ledger balance reconciles to the bank statement for this account. The reconciliation also has an option available for bank accounts set up in other than the functional currency of the business (local currency), to post differences in exchange. The balance of the account is maintained in local currency in the general ledger and for the purposes of the bank reconciliation this is converted to the bank account currency at the exchange rate in the currencies table (see Setup -> Currency Maintenance) - this rate can be changed manually to the rate of the day and the foreign currency balance on the account will change - to correct this balance an exchange difference needs to be recorded. Having worked through the matching of receipts and payments to the bank statements - the bank statment balance can be entered to compare against the system balance - a correcting entry is then made to the GL to post the difference on exchange. The posting to the general ledger is back dated to the end of the preceeding month - since it is assumed that the reconciliation may be a few days or a week behind the current date.</p><img class="manual" src="doc/Manual/images/BankReconciliation.jpg"> <!-- Help End: BankAccounts --> <!-- Help Begin: Payments --> <div class="floatright"> Modified: trunk/doc/Manual/ManualHeader.html =================================================================== --- trunk/doc/Manual/ManualHeader.html 2012-06-26 09:24:09 UTC (rev 9065) +++ trunk/doc/Manual/ManualHeader.html 2012-06-28 10:03:41 UTC (rev 9066) @@ -3,10 +3,13 @@ <head> <title>webERP Manual</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> - <link rel="stylesheet" type="text/css" href="style/manual.css" /> + <link rel="stylesheet" type="text/css" href="doc/Manual/style/manual.css" /> </head> <body> - <div id="pagetitle">webERP Manual</div> + + <div class="manual_title_bar"><b><?php echo $ProjectName; ?> Manual </b> + <div onClick="CloseHelpWindow()" class="exit" title="Close the manual">X</div> +</div> <div class="right"> <a id="top"> </a><a class="minitext" href="<?php echo $rootpath; ?>/ManualContents.php">☜ Table of Contents</a> <br /> Modified: trunk/doc/Manual/style/manual.css =================================================================== --- trunk/doc/Manual/style/manual.css 2012-06-26 09:24:09 UTC (rev 9065) +++ trunk/doc/Manual/style/manual.css 2012-06-28 10:03:41 UTC (rev 9066) @@ -4,35 +4,41 @@ * */ body { - font-family: Trebuchet, 'Times New Roman', serif; - font-size:.95em; - margin:0; - padding:2em; + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + font-size: 100%; + margin-left:0px; + padding:20em; } - -img { - border:none; -} #pagetitle { - font-weight: bold; - font-size: 2.8em; - text-align:center; - color: #0033cc; + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + font-size: 100%; + text-align:center; + color: #0033cc; } #manualpage{ + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + font-size: 100%; margin: 10px; margin-top:20px; + margin-left:20px; + padding: 20px; } #toc { + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + font-size: 100%; padding:0; margin:0; } h1, h2, h3, h4, h1 a, h2 a, h3 a, h4 a { font-weight: bold; + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + font-size: 100%; } h1 { padding-top: 10px; color: #0033cc; + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + font-size: 100%; } h2 { } h3 { } @@ -61,10 +67,13 @@ text-align:left; } .minitext { - font-size: .8em; + font-size: 50%; } li.toc { color: #0033cc; padding-top:10px; + padding-left:10px; + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + font-size: 50%; } Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2012-06-26 09:24:09 UTC (rev 9065) +++ trunk/includes/MiscFunctions.php 2012-06-28 10:03:41 UTC (rev 9066) @@ -33,9 +33,9 @@ } function prnMsg($Msg,$Type='info', $Prefix=''){ + global $Messages; + $Messages[] = array($Msg, $Type, $Prefix); - echo getMsg($Msg, $Type, $Prefix); - }//prnMsg function getMsg($Msg,$Type='info',$Prefix=''){ @@ -327,10 +327,11 @@ } function InternalLink($rootpath, $Script, $Caption, $Format='') { - $ScriptNameArray = explode('?', substr($Script,1)); - $PageSecurity = $_SESSION['PageSecurityArray'][$ScriptNameArray[0]]; + $PathArray = explode('?', substr($Script,1)); + $ScriptNameArray = explode('/', substr($PathArray[0],1)); + $PageSecurity = $_SESSION['PageSecurityArray'][$ScriptNameArray[1]]; if ((in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) { - return '<a href="' . $rootpath . $Script .'">' . $Caption . '</a>'; + return '<a onclick="return OpenSubWindow(\'' . $Script.'\')" href="' . $rootpath . $Script .'">' . $Caption . '</a>'; } } Modified: trunk/includes/footer.inc =================================================================== --- trunk/includes/footer.inc 2012-06-26 09:24:09 UTC (rev 9065) +++ trunk/includes/footer.inc 2012-06-28 10:03:41 UTC (rev 9066) @@ -2,23 +2,32 @@ /* $Id$*/ -echo '<table width="100%" id="footer" class="selection">'; +if (sizeOf($Messages) > 0) { + echo '<div class="mask" id="DialogMask"></div>'; + echo '<div class="messagebox" id="messagebox">'; + echo '<div class="manual_title_bar">' . _('System Messages') . '</div>'; + echo '<br />'; + foreach ($Messages as $Message) { + switch($Message[1]){ + case 'error': + $Class = 'error'; + break; + case 'warn': + $Class = 'warn'; + break; + case 'success': + $Class = 'success'; + break; + case 'info': + default: + $Class = 'info'; + } + echo '<div class="' . $Class . '">' . $Message[0] . '</div>'; + } + echo '<br /><button class="dialog" type="submit" value="ok" onclick="CloseDialog()">' . _('OK') . '</button>'; + echo '</div>'; +} -echo '<tr>'; -echo '<td style="width:33%"></td><td class="footer">'; -echo '<img src="'. $rootpath . '/' . $_SESSION['LogoFile'] . '" width="120" alt="webERP" title="webERP" /></td>'; -echo '<td class="footer" style="text-align: right;width:33%">'.(strftime('%A')).', '.(date($_SESSION['DefaultDateFormat']).' | '.(strftime(($DefaultClock==12) ? '%I:%M %p' : '%H:%M'))).'</td>'; - -echo '</tr>'; - -echo '<tr><td colspan="3" class="footer">webERP v' . $_SESSION['VersionNumber'] .'</td></tr>'; - -// if(http_file_exists('http://sflogo.sourceforge.net/sflogo.php')) { -// echo '<tr><td class="footer"><a href="https://sourceforge.net/projects/weberp"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=391629&type=12" width="120" height="30" border="0" alt="Get webERP web-based ERP Accounting at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a></td></tr>'; -// } - -echo '</table>'; - echo '</body>'; echo '</html>'; ?> \ No newline at end of file Modified: trunk/includes/header.inc =================================================================== --- trunk/includes/header.inc 2012-06-26 09:24:09 UTC (rev 9065) +++ trunk/includes/header.inc 2012-06-28 10:03:41 UTC (rev 9066) @@ -14,7 +14,7 @@ if ($StrictXHTML) { header('Content-type: application/xhtml+xml; charset=utf-8'); } else { - header('Content-type: text/html; charset=utf-8'); + header('Content-type: text/html; charset=utf-8;Cache-Control: no-store, no-cache, must-revalidate'); } } echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" @@ -27,58 +27,25 @@ if ($StrictXHTML) { echo '<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />'; } else { - echo '<meta http-equiv="Content-Type" content="application/html; charset=utf-8" />'; + echo '<meta http-equiv="Content-Type" content="application/html; charset=utf-8; content="no-cache" />'; } -echo '<link href="' . $rootpath . '/css/'. $_SESSION['Theme'] .'/default.css" rel="stylesheet" type="text/css" />'; echo '<script type="text/javascript" src = "'.$rootpath.'/javascripts/MiscFunctions.js"></script>'; +echo '<script type="text/javascript" src = "'.$rootpath.'/javascripts/sorttable.js"></script>'; echo '</head>'; echo '<body>'; -echo '<table class="selection" cellpadding="0" cellspacing="0" style="margin-top:3px; width:99%;">'; -echo '<tr>'; -echo '<td colspan="2" rowspan="2">'; -if (isset($title)) { - echo '<table cellpadding="0" cellspacing="0" border="0" id="quick_menu" class="quick_menu">'; - echo '<tr>'; - echo '<td align="left" style="width:100%;" class="quick_menu_left">'; -// Use icons for company and user data, saves screen realestate, use alt tag in case theme icon not avail. - echo '<img src="'.$rootpath.'/css/'.$theme.'/images/company.png" title="' . _('Company') . '" alt="' . _('Company') . '" style="width: 24px" />'; - echo ' ' . stripslashes($_SESSION['CompanyRecord']['coyname']) . ' <a href="' . $rootpath . '/UserSettings.php"><img src="'.$rootpath.'/css/'.$theme.'/images/user.png" title="User" alt="' . _('User') . '" style="width: 16px" />' . stripslashes($_SESSION['UsersRealName']) . '</a>'; -// Make the title text a class, can be set to display:none is some themes - echo '<br />' . $title . '</td>'; - echo '<td class="quick_menu_tabs">'; - echo '<table cellpadding="0" cellspacing="0" class="quick_menu_tabs"><tr>'; - echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/index.php"><span style="text-decoration:underline;">1</span> ' . _('Main Menu') . '</a></td>'; +$DefaultManualLink = $rootpath . '/doc/Manual/ManualContents.php'. $ViewTopic . $BookMark; - if (count($_SESSION['AllowedPageSecurityTokens'])>1){ - - echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/SelectCustomer.php"><span style="text-decoration:underline;">2</span> ' . _('Customers') . '</a></td>'; - echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/SelectProduct.php"><span style="text-decoration:underline;">3</span> ' . _('Items') . '</a></td>'; - - echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/SelectSupplier.php"><span style="text-decoration:underline;">4</span> ' . _('Suppliers') . '</a></td>'; - - $DefaultManualLink = '<td class="quick_menu_tab" align="center"><a rel="external" accesskey="8" href="' . $rootpath . '/doc/Manual/ManualContents.php'. $ViewTopic . $BookMark. '"><span style="text-decoration:underline;">8</span> ' . _('Manual') . '</a></td>'; - - if (mb_substr($_SESSION['Language'],0,2) !='en'){ - if (file_exists('locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php')){ - echo '<td class="quick_menu_tab" align="center"><a target="_blank" href="' . $rootpath . '/locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php'.$ViewTopic . $BookMark.'"><span style="text-decoration:underline;">8</span> ' . _('Manual') . '</a></td>'; - } else { - echo $DefaultManualLink; - } - } else { - echo $DefaultManualLink; - } - } - echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/Logout.php" onclick="return confirm(\'' . _('Are you sure you wish to logout?') . '\');"><span style="text-decoration:underline;">0</span> ' . _('Logout') . '</a></td>'; - - echo '</tr></table>'; - echo '</td></tr></table>'; - +if (mb_substr($_SESSION['Language'],0,2) !='en'){ + $DeafaulManualLink='locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php'; } -echo '</td>'; -echo '</tr>'; -echo '</table>'; +echo '<div class="title_bar">'; +echo $ProjectName . ' - ' . $title; +echo '<div onClick="CloseSubWindow()" class="exit" title="Close this form">X</div>'; +echo '<div onClick="OpenHelpWindow(\''.$DefaultManualLink.'\'); " class="exit" title="Show help for this function">?</div>'; +echo '</div>'; + ?> \ No newline at end of file Added: trunk/includes/main_footer.inc =================================================================== --- trunk/includes/main_footer.inc (rev 0) +++ trunk/includes/main_footer.inc 2012-06-28 10:03:41 UTC (rev 9066) @@ -0,0 +1,24 @@ +<?php + +/* $Id$*/ + +echo '<table width="100%" id="footer" class="selection">'; + +echo '<tr>'; +echo '<td style="width:33%"></td><td class="footer">'; +echo '<img src="'. $rootpath . '/' . $_SESSION['LogoFile'] . '" width="120" alt="webERP" title="webERP" /></td>'; +echo '<td class="footer" style="text-align: right;width:33%">'.(strftime('%A')).', '.(date($_SESSION['DefaultDateFormat']).' | '.(strftime(($DefaultClock==12) ? '%I:%M %p' : '%H:%M'))).'</td>'; + +echo '</tr>'; + +echo '<tr><td colspan="3" class="footer">webERP v' . $_SESSION['VersionNumber'] .'</td></tr>'; + +// if(http_file_exists('http://sflogo.sourceforge.net/sflogo.php')) { +// echo '<tr><td class="footer"><a href="https://sourceforge.net/projects/weberp"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=391629&type=12" width="120" height="30" border="0" alt="Get webERP web-based ERP Accounting at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a></td></tr>'; +// } + +echo '</table>'; + +echo '</body>'; +echo '</html>'; +?> \ No newline at end of file Added: trunk/includes/main_header.inc =================================================================== --- trunk/includes/main_header.inc (rev 0) +++ trunk/includes/main_header.inc 2012-06-28 10:03:41 UTC (rev 9066) @@ -0,0 +1,84 @@ +<?php +/* $Id$ */ + +// Titles and screen header +// Needs the file config.php loaded where the variables are defined for +// $rootpath +// $title - should be defined in the page this file is included with + +$StrictXHTML=False; + +$ViewTopic = isset($ViewTopic)?"?ViewTopic=$ViewTopic":''; +$BookMark = isset($BookMark)? "#$BookMark":''; +if (!headers_sent()){ + if ($StrictXHTML) { + header('Content-type: application/xhtml+xml; charset=utf-8'); + } else { + header('Content-type: text/html; charset=utf-8'); + } +} +echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'; + + +echo '<html xmlns="http://www.w3.org/1999/xhtml"><head><title>' . $title . '</title>'; +echo '<link rel="shortcut icon" href="'. $rootpath.'/favicon.ico" />'; +echo '<link rel="icon" href="' . $rootpath.'/favicon.ico" />'; +if ($StrictXHTML) { + echo '<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />'; +} else { + echo '<meta http-equiv="Content-Type" content="application/html; charset=utf-8" />'; +} +echo '<link href="' . $rootpath . '/css/'. $_SESSION['Theme'] .'/default.css" rel="stylesheet" type="text/css" />'; +echo '<script type="text/javascript" src = "'.$rootpath.'/javascripts/MiscFunctions.js"></script>'; +echo '</head>'; + +echo '<body>'; +echo '<table class="selection" cellpadding="0" cellspacing="0" style="margin-top:3px; width:99%;">'; +echo '<tr>'; +echo '<td colspan="2" rowspan="2">'; + +if (isset($title)) { + echo '<table cellpadding="0" cellspacing="0" border="0" id="quick_menu" class="quick_menu">'; + echo '<tr>'; + echo '<td align="left" style="width:100%;" class="quick_menu_left">'; +// Use icons for company and user data, saves screen realestate, use alt tag in case theme icon not avail. + echo '<img src="'.$rootpath.'/css/'.$theme.'/images/company.png" title="' . _('Company') . '" alt="' . _('Company') . '" style="width: 24px" />'; + echo ' ' . stripslashes($_SESSION['CompanyRecord']['coyname']) . ' <a href="' . $rootpath . '/UserSettings.php"><img src="'.$rootpath.'/css/'.$theme.'/images/user.png" title="User" alt="' . _('User') . '" style="width: 16px" />' . stripslashes($_SESSION['UsersRealName']) . '</a>'; +// Make the title text a class, can be set to display:none is some themes + echo '<br />' . $title . '</td>'; + echo '<td class="quick_menu_tabs">'; + echo '<table cellpadding="0" cellspacing="0" class="quick_menu_tabs"><tr>'; + echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/index.php"><span style="text-decoration:underline;">1</span> ' . _('Main Menu') . '</a></td>'; + + if (count($_SESSION['AllowedPageSecurityTokens'])>1){ + + echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/SelectCustomer.php"><span style="text-decoration:underline;">2</span> ' . _('Customers') . '</a></td>'; + echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/SelectProduct.php"><span style="text-decoration:underline;">3</span> ' . _('Items') . '</a></td>'; + + echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/SelectSupplier.php"><span style="text-decoration:underline;">4</span> ' . _('Suppliers') . '</a></td>'; + + $DefaultManualLink = '<td class="quick_menu_tab" align="center"><a rel="external" accesskey="8" href="' . $rootpath . '/doc/Manual/ManualContents.php'. $ViewTopic . $BookMark. '"><span style="text-decoration:underline;">8</span> ' . _('Manual') . '</a></td>'; + + if (mb_substr($_SESSION['Language'],0,2) !='en'){ + if (file_exists('locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php')){ + echo '<td class="quick_menu_tab" align="center"><a target="_blank" href="' . $rootpath . '/locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php'.$ViewTopic . $BookMark.'"><span style="text-decoration:underline;">8</span> ' . _('Manual') . '</a></td>'; + } else { + echo $DefaultManualLink; + } + } else { + echo $DefaultManualLink; + } + } + echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/Logout.php" onclick="return confirm(\'' . _('Are you sure you wish to logout?') . '\');"><span style="text-decoration:underline;">0</span> ' . _('Logout') . '</a></td>'; + + echo '</tr></table>'; + echo '</td></tr></table>'; + +} + +echo '</td>'; +echo '</tr>'; +echo '</table>'; + +?> \ No newline at end of file Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2012-06-26 09:24:09 UTC (rev 9065) +++ trunk/includes/session.inc 2012-06-28 10:03:41 UTC (rev 9066) @@ -73,6 +73,8 @@ $_SESSION['FormID'] = sha1(uniqid(mt_rand(), true)); } +$Messages=array(); + if (!isset($AllowAnyone)){ /* only do security checks if AllowAnyone is not true */ include $PathPrefix . 'includes/UserLogin.php'; /* Login checking and setup */ Modified: trunk/index.php =================================================================== --- trunk/index.php 2012-06-26 09:24:09 UTC (rev 9065) +++ trunk/index.php 2012-06-28 10:03:41 UTC (rev 9066) @@ -3,11 +3,15 @@ include('includes/session.inc'); $title=_('Main Menu'); -include('includes/header.inc'); +include('includes/main_header.inc'); +echo '<script type="text/javascript" src = "'.$rootpath.'/javascripts/FormFunctions.js"></script>'; /*The module link codes are hard coded in a switch statement below to determine the options to show for each tab */ include('includes/IndexArray.php'); - +echo '<link href="' . $rootpath . '/css/'. $_SESSION['Theme'] .'/sub.css" rel="stylesheet" type="text/css" />'; +echo '<div id="Mask"></div>'; +echo '<div id="SubWindow"></div>'; +echo '<div id="HelpWindow"></div>'; if ($_SESSION['UserSupplierID']!=''){ echo '<table class="table_index"> <tr> @@ -26,7 +30,7 @@ </td> </tr> </table>'; - include('includes/footer.inc'); + include('includes/main_footer.inc'); exit; } elseif ($_SESSION['UserCustomerID']!=''){ echo '<table class="table_index"> @@ -46,7 +50,7 @@ </td> </tr> </table>'; - include('includes/footer.inc'); + include('includes/main_footer.inc'); exit; } @@ -171,7 +175,7 @@ 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> + <p>• <a onclick="return OpenSubWindow(\'' . $rootpath . $MenuItems[$_SESSION['Module']]['Maintenance']['URL'][$i] .'\')" href="' . $rootpath . $MenuItems[$_SESSION['Module']]['Maintenance']['URL'][$i] .'">' . $Caption . '</a></p> </td> </tr>'; } @@ -183,7 +187,7 @@ echo '</tr> </table>'; -include('includes/footer.inc'); +include('includes/main_footer.inc'); function GetRptLinks($GroupID) { /* Added: trunk/javascripts/FormFunctions.js =================================================================== --- trunk/javascripts/FormFunctions.js (rev 0) +++ trunk/javascripts/FormFunctions.js 2012-06-28 10:03:41 UTC (rev 9066) @@ -0,0 +1,119 @@ +function MakeFormWriteable(form) { + for(var i=0,fLen=form.length;i<fLen;i++){ + form.elements[i].removeAttribute('disabled','disabled'); + form.elements[i].removeAttribute('readonly','readonly'); + } + return false; +} + +function ChangeButtonText(button, text) { + if (document.getElementById) { + if (button) { + if (button.childNodes[0]) { + button.childNodes[0].nodeValue=text; + } else if (button.value) { + button.value=text; + } else { + button.innerHTML=text; + } + } + } +} + +function SortSelect(selElem) { + var tmpArray = new Array(); + for (var i=0;i<selElem.options.length;i++) { + tmpArray[i] = new Array(); + tmpArray[i][0] = parseInt(selElem.options[i].text); + tmpArray[i][1] = parseInt(selElem.options[i].value); + } + tmpArray.sort(function(a,b){return b-a}); + tmpArray.reverse(); + while (selElem.options.length > 0) { + selElem.options[0] = null; + } + for (var i=0;i<tmpArray.length;i++) { + var op = new Option(tmpArray[i][0], tmpArray[i][1]); + selElem.options[i] = op; + } + return; +} + +function SubmitForm(FormName) { + var Target=FormName.action; + var PostData=''; + for(var i=0,fLen=FormName.length;i<fLen;i++){ + PostData=PostData+FormName.elements[i].name+'='+FormName.elements[i].value+'&'; + } + if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari + xmlhttp=new XMLHttpRequest(); + } else {// code for IE6, IE5 + xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); + } + xmlhttp.onreadystatechange=function() { + if (xmlhttp.readyState==4 && xmlhttp.status==200) { + document.getElementById("SubWindow").innerHTML=xmlhttp.responseText; + } + } + xmlhttp.open("POST",Target,true); + xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); + xmlhttp.setRequestHeader("Cache-Control","no-store, no-cache, must-revalidate"); + xmlhttp.setRequestHeader("Pragma","no-cache"); + xmlhttp.send(PostData); + return false; +} + +function OpenSubWindow(TargetURL) { + document.getElementById("Mask").setAttribute("class", "mask"); + document.getElementById("SubWindow").setAttribute("class", "inputbox"); + if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari + xmlhttp=new XMLHttpRequest(); + } else {// code for IE6, IE5 + xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); + } + xmlhttp.onreadystatechange=function() { + if (xmlhttp.readyState==4 && xmlhttp.status==200) { + document.getElementById("SubWindow").innerHTML=xmlhttp.responseText; + } + } + xmlhttp.open("GET",TargetURL,true); + xmlhttp.send(); + return false; +} + +function OpenHelpWindow(TargetURL) { + document.getElementById("Mask").style.zIndex=3; + document.getElementById("HelpWindow").setAttribute("class", "helpbox"); + if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari + xmlhttp=new XMLHttpRequest(); + } else {// code for IE6, IE5 + xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); + } + xmlhttp.onreadystatechange=function() { + if (xmlhttp.readyState==4 && xmlhttp.status==200) { + document.getElementById("HelpWindow").innerHTML=xmlhttp.responseText; + } + } + xmlhttp.open("GET",TargetURL,true); + xmlhttp.send(); + HelpWindow.location.hash = "#AccountGroups"; + return false; +} + +function CloseSubWindow() { + document.getElementById("Mask").setAttribute("class", "unmask"); + document.getElementById("SubWindow").innerHTML=""; + document.getElementById("SubWindow").removeAttribute("class", "inputbox"); +} + +function CloseHelpWindow() { + document.getElementById("Mask").style.zIndex=1; + document.getElementById("HelpWindow").innerHTML=""; + document.getElementById("HelpWindow").removeAttribute("class", "helpbox"); +} + +function CloseDialog() { + document.getElementById("DialogMask").style.zIndex=-1; + document.getElementById("messagebox").innerHTML=""; + document.getElementById("messagebox").removeAttribute("class", "inputbox"); +} \ No newline at end of file Modified: trunk/javascripts/MiscFunctions.js =================================================================== --- trunk/javascripts/MiscFunctions.js 2012-06-26 09:24:09 UTC (rev 9065) +++ trunk/javascripts/MiscFunctions.js 2012-06-28 10:03:41 UTC (rev 9066) @@ -194,6 +194,28 @@ function changeDate(){ isDate(this.value,this.alt); } + +function startTime() +{ +var today=new Date(); +var h=today.getHours(); +var m=today.getMinutes(); +var s=today.getSeconds(); +// add a zero in front of numbers<10 +m=checkTime(m); +s=checkTime(s); +document.getElementById('clock').innerHTML=today.toDateString()+' '+h+":"+m+":"+s; +t=setTimeout('startTime()',500); +} + +function checkTime(i) +{ +if (i<10) + { + i="0" + i; + } +return i; +} function initial(){ if (document.getElementsByTagName){ var as=document.getElementsByTagName("a"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |