Thread: [Weberp-svn] SF.net SVN: weberp:[9466] trunk (Page 14)
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2012-07-29 22:11:31
|
Revision: 9466 http://weberp.svn.sourceforge.net/weberp/?rev=9466&view=rev Author: tim_schofield Date: 2012-07-29 22:11:25 +0000 (Sun, 29 Jul 2012) Log Message: ----------- Corrections to get help system to work correctly Modified Paths: -------------- trunk/css/silverwolf/sub.css trunk/doc/Manual/ManualFooter.html trunk/doc/Manual/ManualGeneralLedger.html trunk/doc/Manual/ManualHeader.html trunk/doc/Manual/style/manual.css trunk/includes/header.inc trunk/index.php trunk/javascripts/FormFunctions.js Modified: trunk/css/silverwolf/sub.css =================================================================== --- trunk/css/silverwolf/sub.css 2012-07-29 07:45:45 UTC (rev 9465) +++ trunk/css/silverwolf/sub.css 2012-07-29 22:11:25 UTC (rev 9466) @@ -99,12 +99,35 @@ right: 20%; bottom: 25px; left: 20%; - padding-left: 10px; - padding-right: 10px; + padding-left: 2px; + padding-right: 2px; background: white; color: black; opacity: 0.99; - z-index: 4; + z-index: 6; + overflow:none; +} + +div.manual_title_bar { + font-family: Ubuntu, Lucida Grande, Lucida Sans Unicode, Lucida Sans, Geneva, Verdana, sans-serif; + font-size: 24px; + border: solid #010066 2px; + color: #010066; + border-radius: 17px; + margin-top: 2px; + margin-left: 0px; + margin-right: 1px; + padding-left: 10px; +} + +div.ManualContent { + background: #ffffff; + padding-right: 1%; + position: absolute; + top: 7%; + right: 1%; + bottom: 1%; + left: 1%; overflow:auto; } @@ -198,17 +221,6 @@ border-radius: 7px; } -div.manual_title_bar { - font-family: Ubuntu, Lucida Grande, Lucida Sans Unicode, Lucida Sans, Geneva, Verdana, sans-serif; - font-size: 24px; - border: solid #545050 2px; - border-radius: 17px; - margin-top: 2px; - margin-left: 0px; - margin-right: 4px; - padding-left: 10px; -} - div.status_bar { position: relative; bottom:2px; @@ -242,6 +254,16 @@ cursor: pointer; } +div.help_exit { + border: 0px solid #ffffff; + float: right; + padding-top:0px; + padding-right:10px; + height: 100%; + color: #000000; + cursor: pointer; +} + div.centre { border: 0px solid #ffffff; margin: 0 auto; @@ -405,9 +427,7 @@ th.header { font-weight: normal; - background: #90979B; - background: -moz-linear-gradient(left, #EEE7E7, #324D5D); - background: -webkit-linear-gradient(left, #EEE7E7, #324D5D); + background: #6C7072; text-shadow: 1px 1px #324D5D; border: solid #A49999 0px; border-radius: 5px; Modified: trunk/doc/Manual/ManualFooter.html =================================================================== --- trunk/doc/Manual/ManualFooter.html 2012-07-29 07:45:45 UTC (rev 9465) +++ trunk/doc/Manual/ManualFooter.html 2012-07-29 22:11:25 UTC (rev 9466) @@ -1,3 +1,4 @@ <div class="right"><a id="bottom"> </a><a class="minitext" href="#top">⬆ Go to Top</a></div> +</div> </body> </html> \ No newline at end of file Modified: trunk/doc/Manual/ManualGeneralLedger.html =================================================================== --- trunk/doc/Manual/ManualGeneralLedger.html 2012-07-29 07:45:45 UTC (rev 9465) +++ trunk/doc/Manual/ManualGeneralLedger.html 2012-07-29 22:11:25 UTC (rev 9466) @@ -2,7 +2,8 @@ <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 class="manual" src="doc/Manual/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> Modified: trunk/doc/Manual/ManualHeader.html =================================================================== --- trunk/doc/Manual/ManualHeader.html 2012-07-29 07:45:45 UTC (rev 9465) +++ trunk/doc/Manual/ManualHeader.html 2012-07-29 22:11:25 UTC (rev 9466) @@ -7,9 +7,10 @@ </head> <body> - <div class="manual_title_bar"><b><?php echo $ProjectName; ?> Manual </b> - <div onClick="CloseHelpWindow()" class="exit" title="Close the manual">X</div> +<div class="manual_title_bar"><b><?php echo $ProjectName; ?> Manual </b> + <div onClick="CloseHelpWindow()" class="help_exit" title="Close the manual">X</div> </div> + <div class="ManualContent" id="ManualContents"> <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-07-29 07:45:45 UTC (rev 9465) +++ trunk/doc/Manual/style/manual.css 2012-07-29 22:11:25 UTC (rev 9466) @@ -36,26 +36,34 @@ } h1 { padding-top: 10px; - color: #0033cc; + color: #021C6A; font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; - font-size: 100%; + font-size: 2em; } -h2 { } +h2 { + padding-top: 10px; + color: #021C6A; + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + font-size: 1.5em; +} h3 { } h4 { } +img.manual { + width: 100%; +} a { - text-decoration: none; - border-bottom: 1px dotted #0033cc; + border-bottom: 1px dotted #021C6A; + color: #021C6A; padding:0; margin:0; } a:hover { background:#fff; - color: #0033cc; + color: #021C6A; } .right { text-align:right; Modified: trunk/includes/header.inc =================================================================== --- trunk/includes/header.inc 2012-07-29 07:45:45 UTC (rev 9465) +++ trunk/includes/header.inc 2012-07-29 22:11:25 UTC (rev 9466) @@ -35,16 +35,16 @@ echo '<body>'; -$DefaultManualLink = $rootpath . '/doc/Manual/ManualContents.php'. $ViewTopic . $BookMark; +$DefaultManualLink = 'doc/Manual/ManualContents.php'. $ViewTopic . $BookMark; if (mb_substr($_SESSION['Language'],0,2) !='en' and file_exists('locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php')){ - $DeafaulManualLink='locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php'; + $DefaultManualLink='locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php'; } 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 onClick="OpenHelpWindow(\''.$DefaultManualLink.'\', \''.$BookMark.'\'); " class="exit" title="Show help for this function">?</div>'; if (isset($_SESSION['History']) and sizeOf($_SESSION['History'])>0) { if (strstr($_SESSION['History'][sizeOf($_SESSION['History'])-1], '?')) { // echo '<div class="exit">'.InternalLink('',$_SESSION['History'][sizeOf($_SESSION['History'])-1].'&Back=True', html_entity_decode('<'), 'BackButton', _('Return to previous page')) . '</div>'; Modified: trunk/index.php =================================================================== --- trunk/index.php 2012-07-29 07:45:45 UTC (rev 9465) +++ trunk/index.php 2012-07-29 22:11:25 UTC (rev 9466) @@ -7,6 +7,7 @@ include('includes/main_header.inc'); echo '<button onclick="showMenu(this)" class="menuButton">Show Menu</button>'; +echo '<div id="HelpWindow"></div>'; echo '<div id="Mask"></div>'; echo '<div id="SubWindow"><div id="contents"></div></div>'; Modified: trunk/javascripts/FormFunctions.js =================================================================== --- trunk/javascripts/FormFunctions.js 2012-07-29 07:45:45 UTC (rev 9465) +++ trunk/javascripts/FormFunctions.js 2012-07-29 22:11:25 UTC (rev 9466) @@ -202,9 +202,10 @@ return false; } -function OpenHelpWindow(TargetURL) { - document.getElementById("Mask").style.zIndex=3; +function OpenHelpWindow(TargetURL, BookMark) { + document.getElementById("Mask").style.zIndex=4; document.getElementById("HelpWindow").setAttribute("class", "helpbox"); + document.getElementById("HelpWindow").style.zIndex=9; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 @@ -217,7 +218,7 @@ } xmlhttp.open("GET",TargetURL,true); xmlhttp.send(); - HelpWindow.location.hash = "#AccountGroups"; + document.location = "index.php"+BookMark; return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-08 11:13:18
|
Revision: 9488 http://weberp.svn.sourceforge.net/weberp/?rev=9488&view=rev Author: tim_schofield Date: 2012-08-08 11:13:07 +0000 (Wed, 08 Aug 2012) Log Message: ----------- Fix calls to javascript functio SubmitForm() Modified Paths: -------------- trunk/AccountSections.php trunk/AddCustomerContacts.php trunk/AddCustomerNotes.php trunk/AddCustomerTypeNotes.php trunk/AgedDebtors.php trunk/AgedSuppliers.php trunk/Areas.php trunk/AuditTrail.php trunk/BOMExtendedQty.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/BOMInquiry.php trunk/BOMListing.php trunk/BOMs.php trunk/BankAccounts.php trunk/BankMatching.php trunk/BankReconciliation.php trunk/COGSGLPostings.php trunk/CompanyPreferences.php trunk/ConfirmDispatch_Invoice.php trunk/ContractBOM.php trunk/ContractCosting.php trunk/ContractOtherReqts.php trunk/Contracts.php trunk/CopyBOM.php trunk/CounterSales.php trunk/CreditStatus.php trunk/Credit_Invoice.php trunk/Currencies.php trunk/CustEDISetup.php trunk/CustLoginSetup.php trunk/CustWhereAlloc.php trunk/CustomerAllocations.php trunk/CustomerBranches.php trunk/CustomerInquiry.php trunk/CustomerReceipt.php trunk/CustomerTransInquiry.php trunk/CustomerTypes.php trunk/Customers.php trunk/DailyBankTransactions.php trunk/DailySalesInquiry.php trunk/DebtorsAtPeriodEnd.php trunk/DeliveryDetails.php trunk/Departments.php trunk/DiscountCategories.php trunk/DiscountMatrix.php trunk/EDIMessageFormat.php trunk/EmailCustTrans.php trunk/ExchangeRateTrend.php trunk/Factors.php trunk/FixedAssetCategories.php trunk/FixedAssetDepreciation.php trunk/FixedAssetItems.php trunk/FixedAssetLocations.php trunk/FixedAssetRegister.php trunk/FixedAssetTransfer.php trunk/FormDesigner.php trunk/FreightCosts.php trunk/GLAccountCSV.php trunk/GLAccountInquiry.php trunk/GLAccountReport.php trunk/GLAccounts.php trunk/GLBalanceSheet.php trunk/GLBudgets.php trunk/GLJournalInquiry.php trunk/GLProfit_Loss.php trunk/GLTagProfit_Loss.php trunk/GLTags.php trunk/GLTrialBalance.php trunk/GeocodeSetup.php trunk/GoodsReceived.php trunk/InternalStockRequest.php trunk/InternalStockRequestAuthorisation.php trunk/InternalStockRequestFulfill.php trunk/InventoryPlanningPrefSupplier.php trunk/InventoryQuantities.php trunk/InventoryValuation.php trunk/Labels.php trunk/Locations.php trunk/Logout.php trunk/MRP.php trunk/MRPCalendar.php trunk/MRPCreateDemands.php trunk/MRPDemandTypes.php trunk/MRPDemands.php trunk/MRPPlannedPurchaseOrders.php trunk/MRPPlannedWorkOrders.php trunk/MRPReport.php trunk/MRPReschedules.php trunk/MRPShortages.php trunk/Manufacturers.php trunk/NoSalesItems.php trunk/OffersReceived.php trunk/OutstandingGRNs.php trunk/PDFBankingSummary.php trunk/PDFChequeListing.php trunk/PDFCustTransListing.php trunk/PDFCustomerList.php trunk/PDFDIFOT.php trunk/PDFDeliveryDifferences.php trunk/PDFLowGP.php trunk/PDFOrderStatus.php trunk/PDFOrdersInvoiced.php trunk/PDFPeriodStockTransListing.php trunk/PDFPickingList.php trunk/PDFPriceList.php trunk/PDFPrintLabel.php trunk/PDFRemittanceAdvice.php trunk/PDFStockCheckComparison.php trunk/PDFStockLocTransfer.php trunk/PDFStockTransfer.php trunk/PDFStockTransfer_departments.php trunk/PDFSuppTransListing.php trunk/POReport.php trunk/PO_AuthorisationLevels.php trunk/PO_AuthoriseMyOrders.php trunk/PO_Header.php trunk/PO_Items.php trunk/PO_PDFPurchOrder.php trunk/PO_SelectOSPurchOrder.php trunk/PO_SelectPurchOrder.php trunk/PageSecurity.php trunk/PaymentMethods.php trunk/PaymentTerms.php trunk/Payments.php trunk/PcAssignCashToTab.php trunk/PcAuthorizeExpenses.php trunk/PcClaimExpensesFromTab.php trunk/PcExpenses.php trunk/PcExpensesTypeTab.php trunk/PcReportTab.php trunk/PcTabs.php trunk/PcTypeTabs.php trunk/Prices.php trunk/PricesBasedOnMarkUp.php trunk/PricesByCost.php trunk/Prices_Customer.php trunk/PrintCustStatements.php trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php trunk/PurchData.php trunk/RecurringSalesOrders.php trunk/ReorderLevel.php trunk/ReorderLevelLocation.php trunk/ReprintGRN.php trunk/ReverseGRN.php trunk/SMTPServer.php trunk/SalesAnalReptCols.php trunk/SalesAnalRepts.php trunk/SalesByTypePeriodInquiry.php trunk/SalesCategories.php trunk/SalesCategoryPeriodInquiry.php trunk/SalesGLPostings.php trunk/SalesGraph.php trunk/SalesInquiry.php trunk/SalesPeople.php trunk/SalesTopItemsInquiry.php trunk/SalesTypes.php trunk/SecurityTokens.php trunk/SelectAsset.php trunk/SelectCompletedOrder.php trunk/SelectContract.php trunk/SelectCreditItems.php trunk/SelectGLAccount.php trunk/SelectOrderItems.php trunk/SelectProduct.php trunk/SelectRecurringSalesOrder.php trunk/SelectSalesOrder.php trunk/SelectWorkOrder.php trunk/ShipmentCosting.php trunk/Shipments.php trunk/Shippers.php trunk/Shipt_Select.php trunk/SpecialOrder.php trunk/StockAdjustments.php trunk/StockCategories.php trunk/StockCheck.php trunk/StockCostUpdate.php trunk/StockCounts.php trunk/StockDispatch.php trunk/StockLocMovements.php trunk/StockLocStatus.php trunk/StockLocTransfer.php trunk/StockLocTransferReceive.php trunk/StockMovements.php trunk/StockQuantityByDate.php trunk/StockReorderLevel.php trunk/StockSerialItemResearch.php trunk/StockStatus.php trunk/StockTransfers.php trunk/StockUsage.php trunk/Stocks.php trunk/SuppContractChgs.php trunk/SuppCreditGRNs.php trunk/SuppFixedAssetChgs.php trunk/SuppInvGRNs.php trunk/SuppLoginSetup.php trunk/SuppPaymentRun.php trunk/SuppPriceList.php trunk/SuppShiptChgs.php trunk/SuppTransGLAnalysis.php trunk/SupplierAllocations.php trunk/SupplierBalsAtPeriodEnd.php trunk/SupplierContacts.php trunk/SupplierCredit.php trunk/SupplierInquiry.php trunk/SupplierInvoice.php trunk/SupplierPriceList.php trunk/SupplierTenderCreate.php trunk/SupplierTenders.php trunk/SupplierTransInquiry.php trunk/SupplierTypes.php trunk/Suppliers.php trunk/SystemParameters.php trunk/Tax.php trunk/TaxAuthorities.php trunk/TaxAuthorityRates.php trunk/TaxCategories.php trunk/TaxGroups.php trunk/TaxProvinces.php trunk/TopItems.php trunk/UnitsOfMeasure.php trunk/UpgradeDatabase.php trunk/UserSettings.php trunk/WOSerialNos.php trunk/WWW_Access.php trunk/WWW_Users.php trunk/WhereUsedInquiry.php trunk/WorkCentres.php trunk/WorkOrderCosting.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/WorkOrderReceive.php trunk/Z_BottomUpCosts.php trunk/Z_ChangeBranchCode.php trunk/Z_ChangeCustomerCode.php trunk/Z_ChangeLocationCode.php trunk/Z_ChangeStockCategory.php trunk/Z_ChangeStockCode.php trunk/Z_ChangeSupplierCode.php trunk/Z_CheckDebtorsControl.php trunk/Z_CreateCompanyTemplateFile.php trunk/Z_DataExport.php trunk/Z_DeleteSalesTransActions.php trunk/Z_ImportChartOfAccounts.php trunk/Z_ImportFixedAssets.php trunk/Z_ImportGLAccountGroups.php trunk/Z_ImportGLAccountSections.php trunk/Z_ImportPartCodes.php trunk/Z_ImportStocks.php trunk/Z_MakeNewCompany.php trunk/Z_ReApplyCostToSA.php trunk/Z_RePostGLFromPeriod.php trunk/Z_ReverseSuppPaymentRun.php trunk/Z_UpdateChartDetailsBFwd.php trunk/Z_Upgrade3.10.php trunk/Z_UpgradeDatabase.php trunk/Z_Upgrade_3.04-3.05.php trunk/Z_Upgrade_3.05-3.06.php trunk/Z_Upgrade_3.07-3.08.php trunk/Z_Upgrade_3.08-3.09.php trunk/Z_Upgrade_3.09-3.10.php trunk/Z_Upgrade_3.10-3.11.php trunk/Z_Upgrade_3.11-4.00.php trunk/Z_UploadForm.php trunk/Z_poAddLanguage.php trunk/Z_poEditLangHeader.php trunk/Z_poEditLangModule.php trunk/Z_poEditLangRemaining.php trunk/Z_poRebuildDefault.php trunk/doc/Manual/ManualContents.php trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsExisting.php trunk/includes/InputSerialItemsFile.php trunk/includes/InputSerialItemsKeyed.php trunk/includes/InputSerialItemsSequential.php trunk/includes/OutputSerialItems.php trunk/install/index.php trunk/locale/de_DE.utf8/Manual/ManualContents.php trunk/locale/zh_CN.utf8/Manual/ManualContents.php trunk/locale/zh_HK.utf8/Manual/ManualContents.php trunk/reportwriter/admin/forms/ReportsCritSetup.html trunk/reportwriter/admin/forms/ReportsDBSetup.html trunk/reportwriter/admin/forms/ReportsFieldSetup.html trunk/reportwriter/admin/forms/ReportsHome.html trunk/reportwriter/admin/forms/ReportsID.html trunk/reportwriter/admin/forms/ReportsImport.html trunk/reportwriter/admin/forms/ReportsPageSetup.html trunk/reportwriter/admin/forms/ReportsRename.html trunk/reportwriter/admin/forms/TplFrmCBlk.html trunk/reportwriter/admin/forms/TplFrmCDta.html trunk/reportwriter/admin/forms/TplFrmData.html trunk/reportwriter/admin/forms/TplFrmImg.html trunk/reportwriter/admin/forms/TplFrmLine.html trunk/reportwriter/admin/forms/TplFrmPgNum.html trunk/reportwriter/admin/forms/TplFrmRect.html trunk/reportwriter/admin/forms/TplFrmTBlk.html trunk/reportwriter/admin/forms/TplFrmTbl.html trunk/reportwriter/admin/forms/TplFrmText.html trunk/reportwriter/admin/forms/TplFrmTtl.html trunk/reportwriter/forms/FormsFilter.html trunk/reportwriter/forms/FormsList.html trunk/reportwriter/forms/ReportsFieldSetup.html trunk/reportwriter/forms/ReportsFilter.html trunk/reportwriter/forms/ReportsList.html trunk/reportwriter/forms/ReportsPageUpdate.html trunk/reportwriter/forms/ReportsSave.html trunk/reportwriter/forms/TplFrmLine.html trunk/reportwriter/install/ReportListForm.php Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/AccountSections.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -208,7 +208,7 @@ if (! isset($_GET['delete'])) { - echo '<form method="post" name="AccountSections" onsubmit="return SubmitForm(this)" 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'])) { Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/AddCustomerContacts.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -160,7 +160,7 @@ if (!isset($_GET['delete'])) { - echo '<br /><form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorNo='.$DebtorNo.'">'; + echo '<br /><form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorNo='.$DebtorNo.'">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($Id)) { Modified: trunk/AddCustomerNotes.php =================================================================== --- trunk/AddCustomerNotes.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/AddCustomerNotes.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -159,7 +159,7 @@ if (!isset($_GET['delete'])) { - echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorNo=' . $DebtorNo . '">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorNo=' . $DebtorNo . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($Id)) { Modified: trunk/AddCustomerTypeNotes.php =================================================================== --- trunk/AddCustomerTypeNotes.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/AddCustomerTypeNotes.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -152,7 +152,7 @@ if (!isset($_GET['delete'])) { - echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorType='.$DebtorType.'">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorType='.$DebtorType.'">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($Id)) { Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/AgedDebtors.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -448,7 +448,7 @@ /*if $FromCriteria is not set then show a form to allow input */ - echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"> + echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <table class="selection"> <tr> Modified: trunk/AgedSuppliers.php =================================================================== --- trunk/AgedSuppliers.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/AgedSuppliers.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -276,7 +276,7 @@ /*if $FromCriteria is not set then show a form to allow input */ - echo '<form onsubmit="return SubmitForm(this)" sction="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"> + echo '<form onsubmit="return SubmitForm(this, \'\')" sction="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <table class="selection"> <tr> Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/Areas.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -179,7 +179,7 @@ if (!isset($_GET['delete'])) { - echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; Modified: trunk/AuditTrail.php =================================================================== --- trunk/AuditTrail.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/AuditTrail.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -34,7 +34,7 @@ // Get list of users $UserResult = DB_query("SELECT userid FROM www_users",$db); -echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/BOMExtendedQty.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -250,7 +250,7 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo '<form onsubmit="return SubmitForm(this)" action=' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . ' method="post"> + echo '<form onsubmit="return SubmitForm(this, \'\')" action=' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . ' method="post"> <table class="selection"> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <tr> Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/BOMIndented.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -252,7 +252,7 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo '<form onsubmit="return SubmitForm(this)" action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . ' method="post"><table class="selection">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . ' method="post"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Part') . ':</td>'; echo '<td><input type ="text" name="Part" size="20" />'; Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/BOMIndentedReverse.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -246,7 +246,7 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo '<form onsubmit="return SubmitForm(this)" action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . ' method="post"><table class="selection">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . ' method="post"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Part') . ':</td>'; echo '<td><input type ="text" name="Part" size="20" />'; Modified: trunk/BOMInquiry.php =================================================================== --- trunk/BOMInquiry.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/BOMInquiry.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -15,7 +15,7 @@ if (!isset($_POST['StockID'])) { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p><br />'; - echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"> + echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"> <div class="page_help_text">'. _('Select a manufactured part') . ' (' . _('or Assembly or Kit part') . ') ' . _('to view the costed bill of materials') . '.' . '<br /><font size="1">' . _('Parts must be defined in the stock item entry') . '/' . _('modification screen as manufactured') . Modified: trunk/BOMListing.php =================================================================== --- trunk/BOMListing.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/BOMListing.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -114,7 +114,7 @@ /*if $FromCriteria is not set then show a form to allow input */ - echo '<form onsubmit="return SubmitForm(this)" action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . ' method="post">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . ' method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/BOMs.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -548,7 +548,7 @@ if (! isset($_GET['delete'])) { - echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select=' . $SelectedParent .'">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select=' . $SelectedParent .'">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($_GET['SelectedComponent']) and $InputError !=1) { @@ -783,7 +783,7 @@ if (!isset($SelectedParent)) { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; - echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">' . + echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">' . '<div class="page_help_text">'. _('Select a manufactured part') . ' (' . _('or Assembly or Kit part') . ') ' . _('to maintain the bill of material for using the options below') . '.' . '<br /><font size="1">' . _('Parts must be defined in the stock item entry') . '/' . _('modification screen as manufactured') . Modified: trunk/BankAccounts.php =================================================================== --- trunk/BankAccounts.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/BankAccounts.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -250,7 +250,7 @@ echo '<br />'; } -echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedBankAccount) AND !isset($_GET['delete'])) { Modified: trunk/BankMatching.php =================================================================== --- trunk/BankMatching.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/BankMatching.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -79,7 +79,7 @@ echo '<div class="page_help_text">' . _('Use this screen to match webERP Receipts and Payments to your Bank Statement. Check your bank statement and click the check-box when you find the matching transaction.') . '</div><br />'; -echo '<form onsubmit="return SubmitForm(this)" action="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" action="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="Type" value="' . $Type . '" />'; Modified: trunk/BankReconciliation.php =================================================================== --- trunk/BankReconciliation.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/BankReconciliation.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -8,7 +8,7 @@ include('includes/header.inc'); -echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; Modified: trunk/COGSGLPostings.php =================================================================== --- trunk/COGSGLPostings.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/COGSGLPostings.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -235,7 +235,7 @@ echo '<br />'; -echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedCOGSPostingID)) { Modified: trunk/CompanyPreferences.php =================================================================== --- trunk/CompanyPreferences.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/CompanyPreferences.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -155,7 +155,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; -echo '<form onsubmit="return SubmitForm(this)" method="post" action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '>'; +echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/ConfirmDispatch_Invoice.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -265,7 +265,7 @@ </table> <br />'; -echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /*************************************************************** Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/ContractBOM.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -223,7 +223,7 @@ /* This is where the order as selected should be displayed reflecting any deletions or insertions*/ -echo '<form onsubmit="return SubmitForm(this)" name="ContractBOMForm" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier. '" method="post">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" name="ContractBOMForm" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier. '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (count($_SESSION['Contract'.$identifier]->ContractBOM)>0){ Modified: trunk/ContractCosting.php =================================================================== --- trunk/ContractCosting.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/ContractCosting.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -406,7 +406,7 @@ if ($_SESSION['Contract'.$identifier]->Status ==2){//the contract is an order being processed now - echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedContract=' . $_SESSION['Contract'.$identifier]->ContractRef . '&identifier=' . $identifier . '">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedContract=' . $_SESSION['Contract'.$identifier]->ContractRef . '&identifier=' . $identifier . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br /><div class="centre"><button type="submit" name="CloseContract" onclick="return confirm(\'' . _('Closing the contract will prevent further stock being issued to it and charges being made against it. Variances will be taken to the profit and loss account. Are You Sure?') . '\');">' . _('Close Contract') . '</button></div>'; echo '</form>'; Modified: trunk/ContractOtherReqts.php =================================================================== --- trunk/ContractOtherReqts.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/ContractOtherReqts.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -75,7 +75,7 @@ /* This is where the other requirement as entered/modified should be displayed reflecting any deletions or insertions*/ -echo '<form onsubmit="return SubmitForm(this)" name="ContractReqtsForm" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier. '" method="post">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" name="ContractReqtsForm" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier. '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/contract.png" title="' ._('Contract Other Requirements') . '" alt="" /> ' . _('Contract Other Requirements') . ' - ' . $_SESSION['Contract'.$identifier]->CustomerName.'</p>'; Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/Contracts.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -682,7 +682,7 @@ } } //a customer was retrieved ok - echo '<form onsubmit="return SubmitForm(this)" name="ContractEntry" enctype="multipart/form-data" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier=' . $identifier . '" method="post">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" name="ContractEntry" enctype="multipart/form-data" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier=' . $identifier . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"> Modified: trunk/CopyBOM.php =================================================================== --- trunk/CopyBOM.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/CopyBOM.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -121,7 +121,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Contract') . '" alt="" />' . ' ' . $title . '</p>'; - echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $sql = "SELECT stockid, Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/CounterSales.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -259,7 +259,7 @@ /* Always do the stuff below */ -echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier . '" name="SelectParts" method="post">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier . '" name="SelectParts" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; //Get The exchange rate used for GPPercent calculations on adding or amending items Modified: trunk/CreditStatus.php =================================================================== --- trunk/CreditStatus.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/CreditStatus.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -193,7 +193,7 @@ if (!isset($_GET['delete'])) { - echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedReason) and ($InputError!=1)) { Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/Credit_Invoice.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -264,7 +264,7 @@ if (!isset($_POST['ProcessCredit'])) { - echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'" method="post">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/Currencies.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -305,7 +305,7 @@ if (!isset($_GET['delete'])) { - echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedCurrency) AND $SelectedCurrency!='') { Modified: trunk/CustEDISetup.php =================================================================== --- trunk/CustEDISetup.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/CustEDISetup.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -69,7 +69,7 @@ } } -echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/CustLoginSetup.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -314,7 +314,7 @@ echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'">' . _('Review Existing Users') . '</a></div><br />'; } -echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedUser)) { Modified: trunk/CustWhereAlloc.php =================================================================== --- trunk/CustWhereAlloc.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/CustWhereAlloc.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -6,7 +6,7 @@ $title = _('Customer How Paid Inquiry'); include('includes/header.inc'); -echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Customer Where Allocated'). '" alt="" />' . $title . '</p>'; Modified: trunk/CustomerAllocations.php =================================================================== --- trunk/CustomerAllocations.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/CustomerAllocations.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -346,7 +346,7 @@ if (isset($_POST['AllocTrans'])) { // Page called with trans number - echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="AllocTrans" value="' . $_POST['AllocTrans'] . '" />'; Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/CustomerBranches.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -463,7 +463,7 @@ } if (!isset($_GET['delete'])) { - echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedBranch)) { Modified: trunk/CustomerInquiry.php =================================================================== --- trunk/CustomerInquiry.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/CustomerInquiry.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -158,7 +158,7 @@ </tr> </table>'; -echo '<br /><form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<br /><form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr> Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/CustomerReceipt.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -709,7 +709,7 @@ /*set up the form whatever */ -echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Type='.$_GET['Type'] . '" method="post" name="form1">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Type='.$_GET['Type'] . '" method="post" name="form1">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /*show the batch header details and the entries in the batch so far */ Modified: trunk/CustomerTransInquiry.php =================================================================== --- trunk/CustomerTransInquiry.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/CustomerTransInquiry.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -11,7 +11,7 @@ ' ' . _('Transaction Inquiry') . '</p>'; echo '<div class="page_help_text">' . _('Choose which type of transaction to report on.') . '</div><br />'; -echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table cellpadding="2" class="selection"><tr>'; Modified: trunk/CustomerTypes.php =================================================================== --- trunk/CustomerTypes.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/CustomerTypes.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -225,7 +225,7 @@ } if (! isset($_GET['delete'])) { - echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; //Main table Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/Customers.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -437,7 +437,7 @@ exit; } - echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="New" value="Yes" />'; @@ -612,7 +612,7 @@ //DebtorNo exists - either passed when calling the form or from the form itself - echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (!isset($_POST['New'])) { Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/DailyBankTransactions.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -7,7 +7,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p>'; if (!isset($_POST['Show'])) { - echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; @@ -125,7 +125,7 @@ echo '</table>'; } //end if no bank trans in the range to show - echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br /><div class="centre"><button type="submit" name="Return">' . _('Select Another Date'). '</button></div><br />'; echo '</form>'; Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/DailySalesInquiry.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -10,7 +10,7 @@ echo '<div class="page_help_text">' . _('Select the month to show daily sales for') . '</div> <br />'; -echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (!isset($_POST['MonthToShow'])){ Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/DebtorsAtPeriodEnd.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -129,7 +129,7 @@ /*if $FromCriteria is not set then show a form to allow input */ - echo '<form onsubmit="return SubmitForm(this)" action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . ' method="post"><table class="selection">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . ' method="post"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('From Customer Code') .':</font></td><td><input tabindex="1" type="text" maxlength="6" size="7" name="FromCriteria" value="1" /></td></tr>'; Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/DeliveryDetails.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -862,7 +862,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer Code') . ' :<b> ' . $_SESSION['Items'.$identifier]->DebtorNo . '<br />'; echo '</b> ' . _('Customer Name') . ' :<b> ' . $_SESSION['Items'.$identifier]->CustomerName . '</b></p>'; //echo '<font size="4"><b>'. _('Customer') .' : ' . $_SESSION['Items'.$identifier]->CustomerName . '</b></font>'; -echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier . '" method="post">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/Departments.php =================================================================== --- trunk/Departments.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/Departments.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -205,7 +205,7 @@ if (! isset($_GET['delete'])) { - echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedDepartmentID)) { Modified: trunk/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/DiscountCategories.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -65,7 +65,7 @@ } if (isset($_POST['selectchoice'])) { - echo '<form onsubmit="return SubmitForm(this)" name="update" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" name="update" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $sql = "SELECT DISTINCT discountcategory FROM stockmaster WHERE discountcategory <>''"; @@ -90,7 +90,7 @@ <br />'; } - echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="ChooseOption" value="'.$_POST['ChooseOption'].'" />'; echo '<input type="hidden" name="selectchoice" value="'.$_POST['selectchoice'].'" />'; @@ -234,7 +234,7 @@ } if (!isset($_POST['selectchoice'])) { - echo '<form onsubmit="return SubmitForm(this)" method="post" name="choose" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" name="choose" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; echo '<tr><td>'._('Update discount category for').'</td>'; Modified: trunk/DiscountMatrix.php =================================================================== --- trunk/DiscountMatrix.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/DiscountMatrix.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -82,7 +82,7 @@ echo '<br />'; } -echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/EDIMessageFormat.php =================================================================== --- trunk/EDIMessageFormat.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/EDIMessageFormat.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -97,7 +97,7 @@ prnMsg($msg,'success'); } -echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br /><table border=0 width=100%> Modified: trunk/EmailCustTrans.php =================================================================== --- trunk/EmailCustTrans.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/EmailCustTrans.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -36,7 +36,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/email.gif" title="' . _('Contract') . '" alt="" /> ' . $title . '</p>'; -echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="TransNo" value="' . $_GET['FromTransNo'] . '" />'; Modified: trunk/ExchangeRateTrend.php =================================================================== --- trunk/ExchangeRateTrend.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/ExchangeRateTrend.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -21,7 +21,7 @@ // SHOW OUR MAIN INPUT FORM // ************************ -echo '<form onsubmit="return SubmitForm(this)" method="post" name=update action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" name=update action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('View Currency Trend') . '" alt="" />' . ' ' . _('View Currency Trend') . '</p>'; echo '<table class="selection">'; // First column Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/Factors.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -150,7 +150,7 @@ if (empty($FactorID)) { - echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="New" value="No" />'; @@ -261,7 +261,7 @@ if (isset($_POST['amend']) or isset($_POST['Create'])) { // its a new factor being added - echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="FactorID" value="'.$FactorID.'" />'; echo '<table class="selection">'; Modified: trunk/FixedAssetCategories.php =================================================================== --- trunk/FixedAssetCategories.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/FixedAssetCategories.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -207,7 +207,7 @@ echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' ._('Show All Fixed Asset Categories') . '</a></div><br />'; } -echo '<form onsubmit="return SubmitForm(this)" name="CategoryForm" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" name="CategoryForm" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedCategory) and !isset($_POST['submit'])) { Modified: trunk/FixedAssetDepreciation.php =================================================================== --- trunk/FixedAssetDepreciation.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/FixedAssetDepreciation.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -264,7 +264,7 @@ /*And post the journal too */ include ('includes/GLPostings.inc'); } else { - echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post" name="form">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post" name="form">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p></p>'; echo '<table class="selection" width=30%><tr></tr><tr>'; Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/FixedAssetItems.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -394,7 +394,7 @@ } /* end if delete asset */ $result = DB_Txn_Commit($db); -echo '<form onsubmit="return SubmitForm(this)" name="AssetForm" enctype="multipart/form-data" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" name="AssetForm" enctype="multipart/form-data" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/FixedAssetLocations.php =================================================================== --- trunk/FixedAssetLocations.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/FixedAssetLocations.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -107,7 +107,7 @@ } echo '</table><br />'; -echo '<form onsubmit="return SubmitForm(this)" name="LocationForm" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '"><table class="selection">'; +echo '<form onsubmit="return SubmitForm(this, \'\')" name="LocationForm" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><th style="text-align:left">'._('Location ID').'</th>'; if (isset($_GET['SelectedLocation'])) { Modified: trunk/FixedAssetRegister.php =================================================================== --- trunk/FixedAssetRegister.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/FixedAssetRegister.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -75,7 +75,7 @@ } elseif (isset($_POST['csv'])) { $csv_output = "'Asset ID','Description','Serial Number','Location','Date Acquired','Cost B/Fwd','Period Additions','Depn B/Fwd','Period Depreciation','Cost C/Fwd', 'Accum Depn C/Fwd','NBV','Disposal Value'\n"; } else { - echo '<form onsubmit="return SubmitForm(this)" name="RegisterForm" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '"><table class="selection">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" name="RegisterForm" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br /><table width="80%" cellspacing="1" class="selection">'; echo '<tr><th class="header" colspan="13">' ._('From') . ':' . $_POST['FromDate'] . ' ' . _('to') . ' ' . $_POST['ToDate'] . '</th></tr>'; @@ -240,7 +240,7 @@ echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; $result = DB_query("SELECT categoryid,categorydescription FROM fixedassetcategories", $db); - echo '<form onsubmit="return SubmitForm(this)" name="RegisterForm" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '"><table class="selection">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" name="RegisterForm" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><th>' . _('Asset Category') . '</th>'; echo '<td><select name=AssetCategory>'; Modified: trunk/FixedAssetTransfer.php =================================================================== --- trunk/FixedAssetTransfer.php 2012-08-08 09:04:20 UTC (rev 9487) +++ trunk/FixedAssetTransfer.php 2012-08-08 11:13:07 UTC (rev 9488) @@ -24,7 +24,7 @@ } else { $sql="SELECT categoryid, categorydescription FROM fixedassetcategories"; $result=DB_query($sql, $db); - echo '<form onsubmit="return SubmitForm(this)" action="'. htmlspecialchars($... [truncated message content] |
From: <tim...@us...> - 2012-08-11 09:26:33
|
Revision: 9495 http://weberp.svn.sourceforge.net/weberp/?rev=9495&view=rev Author: tim_schofield Date: 2012-08-11 09:26:26 +0000 (Sat, 11 Aug 2012) Log Message: ----------- New function to output pdf to spool queue directory and then show it on screen Modified Paths: -------------- trunk/includes/class.pdf.php Added Paths: ----------- trunk/companies/weberpdemo/spool/ Modified: trunk/includes/class.pdf.php =================================================================== --- trunk/includes/class.pdf.php 2012-08-10 17:32:47 UTC (rev 9494) +++ trunk/includes/class.pdf.php 2012-08-11 09:26:26 UTC (rev 9495) @@ -216,6 +216,14 @@ $this->Output($DocumentFilename,'D'); } + function OutputF($DocumentFilename = 'Document.pdf') { + if (($DocumentFilename == null) or ($DocumentFilename == '')) { + $DocumentFilename = _('Document.pdf'); + } + $this->Output('companies/' . $_SESSION['DatabaseName'] . '/spool/' . $DocumentFilename,'F'); + echo '<iframe id="frame1" style="display:none"src="companies/' . $_SESSION['DatabaseName'] . '/spool/' . $DocumentFilename.'"></iframe>'; + } + function RoundRectangle($XPos, $YPos, $Width, $Height, $Radius) { /*from the top right */ $this->partEllipse($XPos+$Width,$YPos,0,90,$Radius,$Radius); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-16 22:08:45
|
Revision: 9515 http://weberp.svn.sourceforge.net/weberp/?rev=9515&view=rev Author: tim_schofield Date: 2012-08-16 22:08:37 +0000 (Thu, 16 Aug 2012) Log Message: ----------- Update supplier invoicing system for new interface Modified Paths: -------------- trunk/SuppContractChgs.php trunk/SuppFixedAssetChgs.php trunk/SuppInvGRNs.php trunk/SuppShiptChgs.php trunk/SuppTransGLAnalysis.php trunk/SupplierInvoice.php trunk/css/silverwolf/images/contract.png trunk/includes/DefineSuppTransClass.php Added Paths: ----------- trunk/css/silverwolf/images/fixed_asset.png trunk/css/silverwolf/images/shipment.png Modified: trunk/SuppContractChgs.php =================================================================== --- trunk/SuppContractChgs.php 2012-08-16 13:09:18 UTC (rev 9514) +++ trunk/SuppContractChgs.php 2012-08-16 22:08:37 UTC (rev 9515) @@ -22,7 +22,7 @@ if (!isset($_SESSION['SuppTrans'])){ prnMsg(_('Contract charges or credits are entered against supplier invoices or credit notes respectively. To enter supplier transactions the supplier must first be selected from the supplier selection screen, then the link to enter a supplier invoice or credit note must be clicked on'),'info'); - echo '<br /><a href="' . $rootpath . '/SelectSupplier.php?">' . _('Select A Supplier') . '</a>'; + echo '<br />' . InternalLink('', 'SelectSupplier.php', _('Select A Supplier')); exit; /*It all stops here if there aint no supplier selected and invoice/credit initiated ie $_SESSION['SuppTrans'] started off*/ } @@ -61,22 +61,26 @@ $_SESSION['SuppTrans']->Remove_Contract_From_Trans($_GET['Delete']); } +echo '<br /><table cellpadding="2" class="selection">'; + /*Show all the selected ContractRefs so far from the SESSION['SuppInv']->Contracts array */ if ($_SESSION['SuppTrans']->InvoiceOrCredit=='Invoice'){ - echo '<div class="centre"><p class="page_title_text">' . _('Contract charges on Invoice') . ' ' . $_SESSION['SuppTrans']->SuppReference . ' ' . - _('From') . ' ' . $_SESSION['SuppTrans']->SupplierName . '</p></div>'; + echo '<tr> + <th colspan="5" class="header"> + <img src="'.$rootpath.'/css/'.$theme.'/images/contract.png" title="' . _('General Ledger') . '" alt="" /> + ' . _('Contract charges on Invoice') . ' ' . $_SESSION['SuppTrans']->SuppReference . ' ' . _('From') . ' ' . $_SESSION['SuppTrans']->SupplierName . '</th> + </tr>'; } else { echo '<div class="centre"><p class="page_title_text">' . _('Contract credits on Credit Note') . ' ' . $_SESSION['SuppTrans']->SuppReference . ' ' ._('From') . ' ' . $_SESSION['SuppTrans']->SupplierName . '</p></div>'; } -echo '<table cellpadding="2" class="selection">'; -$TableHeader = '<tr><th>' . _('Contract') . '</th> - <th>' . _('Amount') . '</th> - <th>' . _('Narrative') . '</th> - <th>' . _('Anticipated') . '</th> - </tr>'; -echo $TableHeader; +echo '<tr> + <th>' . _('Contract') . '</th> + <th>' . _('Amount') . '</th> + <th>' . _('Narrative') . '</th> + <th>' . _('Anticipated') . '</th> + </tr>'; $TotalContractsValue = 0; @@ -87,11 +91,13 @@ } else { $AnticipatedCost = _('No'); } - echo '<tr><td>' . $EnteredContract->ContractRef . '</td> - <td class="number">' . locale_money_format($EnteredContract->Amount,$_SESSION['SuppTrans']->CurrCode) . '</td> - <td>' . $EnteredContract->Narrative . '</td> - <td>' . $AnticipatedCost . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $EnteredContract->Counter . '">' . _('Delete') . '</a></td></tr>'; + echo '<tr> + <td>' . $EnteredContract->ContractRef . '</td> + <td class="number">' . locale_money_format($EnteredContract->Amount,$_SESSION['SuppTrans']->CurrCode) . '</td> + <td>' . $EnteredContract->Narrative . '</td> + <td>' . $AnticipatedCost . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $EnteredContract->Counter, _('Delete')) . '</td> + </tr>'; $TotalContractsValue += $EnteredContract->Amount; @@ -104,9 +110,9 @@ </table>'; if ($_SESSION['SuppTrans']->InvoiceOrCredit == 'Invoice'){ - echo '<br /><div class="centre"><a href="' . $rootpath . '/SupplierInvoice.php">' . _('Back to Invoice Entry') . '</a></div><br />'; + echo '<br /><div class="centre">' . InternalLink('', 'SupplierInvoice.php', _('Back to Invoice Entry')) . '</div><br />'; } else { - echo '<br /><div class="centre"><a href="' . $rootpath . '/SupplierCredit.php">' . _('Back to Credit Note Entry') . '</a></div><br />'; + echo '<br /><div class="centre">' . InternalLink('', 'SupplierCredit.php', _('Back to Credit Note Entry')) . '</div><br />'; } /*Set up a form to allow input of new Contract charges */ @@ -156,7 +162,7 @@ echo '<input type="checkbox" name="AnticipatedCost" />'; } -echo '</td></tr></table><br />'; +echo '</td></tr></table>'; echo '<div class="centre"><button type="submit" name="AddContractChgToInvoice">' . _('Enter Contract Charge') . '</button></div>'; Modified: trunk/SuppFixedAssetChgs.php =================================================================== --- trunk/SuppFixedAssetChgs.php 2012-08-16 13:09:18 UTC (rev 9514) +++ trunk/SuppFixedAssetChgs.php 2012-08-16 22:08:37 UTC (rev 9515) @@ -17,7 +17,7 @@ if (!isset($_SESSION['SuppTrans'])){ prnMsg(_('Fixed asset additions or credits are entered against supplier invoices or credit notes respectively') . '. ' . _('To enter supplier transactions the supplier must first be selected from the supplier selection screen') . ', ' . _('then the link to enter a supplier invoice or credit note must be clicked on'),'info'); - echo '<br /><a href="' . $rootpath . '/SelectSupplier.php">' . _('Select A Supplier') . '</a>'; + echo '<br />' . InternalLink('', 'SelectSupplier.php', _('Select A Supplier')); exit; /*It all stops here if there aint no supplier selected and invoice/credit initiated ie $_SESSION['SuppTrans'] started off*/ } @@ -63,19 +63,21 @@ $_SESSION['SuppTrans']->Remove_Asset_From_Trans($_GET['Delete']); } +echo '<br /><table cellpadding="2" class="selection">'; + /*Show all the selected ShiptRefs so far from the SESSION['SuppInv']->Shipts array */ if ($_SESSION['SuppTrans']->InvoiceOrCredit=='Invoice'){ - echo '<div class="centre"><p class="page_title_text">'. _('Fixed Assets on Invoice') . ' </p></div>'; + echo '<tr><th colspan="4" class="header"><img src="'.$rootpath.'/css/'.$theme.'/images/fixed_asset.png" title="' . _('General Ledger') . '" alt="" />'. _('Fixed Assets on Invoice'); } else { - echo '<div class="centre"><p class="page_title_text">' . _('Fixed Asset credits on Credit Note') . ' </p>'; + echo '<tr><th colspan="4" class="header"><img src="'.$rootpath.'/css/'.$theme.'/images/fixed_asset.png" title="' . _('General Ledger') . '" alt="" />' . _('Fixed Asset credits on Credit Note'); } -echo'<div class="centre"><p class="page_title_text">' . $_SESSION['SuppTrans']->SuppReference . ' ' ._('From') . ' ' . $_SESSION['SuppTrans']->SupplierName . '</p></div>'; +echo' ' . $_SESSION['SuppTrans']->SuppReference . ' ' ._('From') . ' ' . $_SESSION['SuppTrans']->SupplierName . '</th></tr>'; -echo '<table cellpadding="2" class="selection">'; -$TableHeader = '<tr><th>' . _('Asset ID') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Amount') . '</th></tr>'; -echo $TableHeader; +echo '<tr> + <th>' . _('Asset ID') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Amount') . '</th> + </tr>'; $TotalAssetValue = 0; @@ -84,7 +86,7 @@ echo '<tr><td>' . $EnteredAsset->AssetID . '</td> <td>' . $EnteredAsset->Description . '</td> <td class="number">' . locale_money_format($EnteredAsset->Amount,$_SESSION['SuppTrans']->CurrCode) . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '&Delete=' . $EnteredAsset->Counter . '">' . _('Delete') . '</a></td></tr>'; + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '&Delete=' . $EnteredAsset->Counter, _('Delete')) . '</td></tr>'; $TotalAssetValue += $EnteredAsset->Amount; @@ -97,9 +99,9 @@ </table><br />'; if ($_SESSION['SuppTrans']->InvoiceOrCredit == 'Invoice'){ - echo '<div class="centre"><a href="' . $rootpath . '/SupplierInvoice.php">' . _('Back to Invoice Entry') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', 'SupplierInvoice.php', _('Back to Invoice Entry')) . '</div>'; } else { - echo '<div class="centre"><a href="' . $rootpath . '/SupplierCredit.php">' . _('Back to Credit Note Entry') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', 'SupplierCredit.php', _('Back to Credit Note Entry')) . '</div>'; } /*Set up a form to allow input of new Shipment charges */ @@ -112,10 +114,11 @@ prnMsg(_('If you know the code enter it in the Asset ID input box, otherwise select the asset from the list below. Only assets with no cost will show in the list'),'info'); -echo '<br /><table class="selection">'; +echo '<table class="selection">'; echo '<tr><td>' . _('Enter Asset ID') . ':</td> - <td><input type="text" name="AssetID" size="5" maxlength="6" value="' . $_POST['AssetID'] . '" /> <a href="FixedAssetItems.php" target=_blank>'. _('New Fixed Asset') . '</a></td></tr>'; + <td><input type="text" name="AssetID" size="5" maxlength="6" value="' . $_POST['AssetID'] . '" />' . + InternalLink('', 'FixedAssetItems.php', _('New Fixed Asset')) . '</td></tr>'; echo '<tr><td><b>' . _('OR') .' </b>'. _('Select from list') . ':</td><td><select name="AssetSelection">'; $sql = "SELECT assetid, @@ -143,7 +146,7 @@ <td><input type="text" class="number" name="Amount" size="12" maxlength="11" value="' . locale_money_format($_POST['Amount'], $_SESSION['SuppTrans']->CurrCode) . '" /></td></tr>'; echo '</table>'; -echo '<br /><div class="centre"><button type="submit" name="AddAssetToInvoice">' . _('Enter Fixed Asset') . '</button></div>'; +echo '<div class="centre"><button type="submit" name="AddAssetToInvoice">' . _('Enter Fixed Asset') . '</button></div>'; echo '</form>'; include('includes/footer.inc'); Modified: trunk/SuppInvGRNs.php =================================================================== --- trunk/SuppInvGRNs.php 2012-08-16 13:09:18 UTC (rev 9514) +++ trunk/SuppInvGRNs.php 2012-08-16 22:08:37 UTC (rev 9515) @@ -12,12 +12,10 @@ $title = _('Enter Supplier Invoice Against Goods Received'); include('includes/header.inc'); -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Dispatch') . '" alt="" />' . ' ' . $title . '</p>'; - $Complete=false; if (!isset($_SESSION['SuppTrans'])){ prnMsg(_('To enter a supplier transactions the supplier must first be selected from the supplier selection screen') . ', ' . _('then the link to enter a supplier invoice must be clicked on'),'info'); - echo '<br /><a href="' . $rootpath . '/SelectSupplier.php">' . _('Select A Supplier to Enter a Transaction For') . '</a>'; + echo '<br />' . InternalLink('', 'SelectSupplier.php', _('Select A Supplier to Enter a Transaction For')); include('includes/footer.inc'); exit; /*It all stops here if there aint no supplier selected and invoice initiated ie $_SESSION['SuppTrans'] started off*/ @@ -110,41 +108,36 @@ /*Show all the selected GRNs so far from the SESSION['SuppTrans']->GRNs array */ -echo '<table cellpadding="1" class="selection">'; -echo '<tr><th colspan="8" class="header">' . _('Invoiced Goods Received Selected') . '</th></tr>'; +echo '<br /><table cellpadding="1" class="selection">'; +echo '<tr> + <th colspan="8" class="header">' . _('Invoiced Goods Received Selected') . '</th> + </tr>'; -$tableheader = '<tr> - <th>' . _('Sequence') . ' #</th> - <th>' . _('Item Code') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Quantity Charged') . '</th> - <th>' . _('Price Charge in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th> - <th>' . _('Line Value in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th></tr>'; +echo '<tr> + <th>' . _('Sequence') . ' #</th> + <th>' . _('Item Code') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Quantity Charged') . '</th> + <th>' . _('Price Charge in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th> + <th>' . _('Line Value in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th> + </tr>'; -echo $tableheader; - $TotalValueCharged=0; -$i=0; foreach ($_SESSION['SuppTrans']->GRNs as $EnteredGRN){ - echo '<tr><td>' . $EnteredGRN->GRNNo . '</td> - <td>' . $EnteredGRN->ItemCode . '</td> - <td>' . $EnteredGRN->ItemDescription . '</td> - <td class="number">' . locale_number_format($EnteredGRN->This_QuantityInv,$EnteredGRN->DecimalPlaces) . '</td> - <td class="number">' . locale_money_format($EnteredGRN->ChgPrice,$_SESSION['SuppTrans']->CurrCode) . '</td> - <td class="number">' . locale_money_format($EnteredGRN->ChgPrice * $EnteredGRN->This_QuantityInv,$_SESSION['SuppTrans']->CurrCode) . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Modify=' . $EnteredGRN->GRNNo . '">'. _('Modify') . '</a></td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $EnteredGRN->GRNNo . '">' . _('Delete') . '</a></td> - </tr>'; + echo '<tr> + <td>' . $EnteredGRN->GRNNo . '</td> + <td>' . $EnteredGRN->ItemCode . '</td> + <td>' . $EnteredGRN->ItemDescription . '</td> + <td class="number">' . locale_number_format($EnteredGRN->This_QuantityInv,$EnteredGRN->DecimalPlaces) . '</td> + <td class="number">' . locale_money_format($EnteredGRN->ChgPrice,$_SESSION['SuppTrans']->CurrCode) . '</td> + <td class="number">' . locale_money_format($EnteredGRN->ChgPrice * $EnteredGRN->This_QuantityInv,$_SESSION['SuppTrans']->CurrCode) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Modify=' . $EnteredGRN->GRNNo, _('Modify')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $EnteredGRN->GRNNo, _('Delete')) . '</td> + </tr>'; $TotalValueCharged = $TotalValueCharged + ($EnteredGRN->ChgPrice * $EnteredGRN->This_QuantityInv); - - $i++; - if ($i>15){ - $i=0; - echo $tableheader; - } } echo '<tr> @@ -152,7 +145,7 @@ <th class="number">' . locale_money_format($TotalValueCharged,$_SESSION['SuppTrans']->CurrCode) . '</th> </tr>'; echo '</table>'; -echo '<br /><div class="centre"><a href="' . $rootpath . '/SupplierInvoice.php">' . _('Back to Invoice Entry') . '</a></div><br />'; +echo '<br /><div class="centre">' . InternalLink('', 'SupplierInvoice.php', _('Back to Invoice Entry')) . '</div><br />'; /* Now get all the outstanding GRNs for this supplier from the database*/ @@ -185,8 +178,9 @@ if (DB_num_rows($GRNResults)==0){ prnMsg(_('There are no outstanding goods received from') . ' ' . $_SESSION['SuppTrans']->SupplierName . ' ' . _('that have not been invoiced by them') . '<br />' . _('The goods must first be received using the link below to select purchase orders to receive'),'warn'); - echo '<div class="centre"><p><a href="'.$rootpath.'/PO_SelectOSPurchOrder.php?SupplierID=' . $_SESSION['SuppTrans']->SupplierID .'">' . - _('Select Purchase Orders to Receive') .'</a></p></div>'; + echo '<div class="centre"> + ' . InternalLink('', 'PO_SelectOSPurchOrder.php?SupplierID=' . $_SESSION['SuppTrans']->SupplierID, _('Select Purchase Orders to Receive')) .' + </div>'; include('includes/footer.inc'); exit; } Modified: trunk/SuppShiptChgs.php =================================================================== --- trunk/SuppShiptChgs.php 2012-08-16 13:09:18 UTC (rev 9514) +++ trunk/SuppShiptChgs.php 2012-08-16 22:08:37 UTC (rev 9515) @@ -25,7 +25,7 @@ if (!isset($_SESSION['SuppTrans'])){ prnMsg(_('Shipment charges or credits are entered against supplier invoices or credit notes respectively') . '. ' . _('To enter supplier transactions the supplier must first be selected from the supplier selection screen') . ', ' . _('then the link to enter a supplier invoice or credit note must be clicked on'),'info'); - echo '<br /><a href="' . $rootpath . '/SelectSupplier.php">' . _('Select A Supplier') . '</a>'; + echo '<br />' . InternalLink('', 'SelectSupplier.php', _('Select A Supplier')); exit; /*It all stops here if there aint no supplier selected and invoice/credit initiated ie $_SESSION['SuppTrans'] started off*/ } @@ -67,32 +67,32 @@ $_SESSION['SuppTrans']->Remove_Shipt_From_Trans($_GET['Delete']); } +echo '<br /><table cellpadding="2" class="selection">'; + /*Show all the selected ShiptRefs so far from the SESSION['SuppInv']->Shipts array */ if ($_SESSION['SuppTrans']->InvoiceOrCredit=='Invoice'){ - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Search') . '" alt="" />'. _('Shipment charges on Invoice') . ' '; + echo '<tr> + <th colspan="4" class="header"><img src="'.$rootpath.'/css/'.$theme.'/images/shipment.png" title="' . _('Search') . '" alt="" />'. _('Shipment charges on Invoice') . ' '; } else { - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Search') . '" alt="" />' . _('Shipment credits on Credit Note') . ' '; + echo '<tr> + <th colspan="4" class="header"><img src="'.$rootpath.'/css/'.$theme.'/images/shipment.png" title="' . _('Search') . '" alt="" />' . _('Shipment credits on Credit Note') . ' '; } -echo '<br />' . $_SESSION['SuppTrans']->SuppReference . ' ' ._('From') . ' ' . $_SESSION['SuppTrans']->SupplierName.'</p>'; +echo '<br />' . $_SESSION['SuppTrans']->SuppReference . ' ' ._('From') . ' ' . $_SESSION['SuppTrans']->SupplierName.'</th></tr>'; -if ($_SESSION['SuppTrans']->InvoiceOrCredit == 'Invoice'){ - echo '<div class="centre"><a href="' . $rootpath . '/SupplierInvoice.php">' . _('Back to Invoice Entry') . '</a></div>'; -} else { - echo '<div class="centre"><a href="' . $rootpath . '/SupplierCredit.php">' . _('Back to Credit Note Entry') . '</a></div>'; -} +echo '<tr> + <th>' . _('Shipment') . '</th> + <th>' . _('Amount') . '</th> + </tr>'; -echo '<br /><table cellpadding="2" class="selection">'; -$TableHeader = '<tr><th>' . _('Shipment') . '</th> - <th>' . _('Amount') . '</th></tr>'; -echo $TableHeader; - $TotalShiptValue = 0; foreach ($_SESSION['SuppTrans']->Shipts as $EnteredShiptRef){ - echo '<tr><td>' . $EnteredShiptRef->ShiptRef . '</td> - <td class="number">' . locale_money_format($EnteredShiptRef->Amount,$_SESSION['SuppTrans']->CurrCode) . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $EnteredShiptRef->Counter . '">' . _('Delete') . '</a></td></tr>'; + echo '<tr> + <td>' . $EnteredShiptRef->ShiptRef . '</td> + <td class="number">' . locale_money_format($EnteredShiptRef->Amount,$_SESSION['SuppTrans']->CurrCode) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $EnteredShiptRef->Counter, _('Delete')) . '</td> + </tr>'; $TotalShiptValue = $TotalShiptValue + $EnteredShiptRef->Amount; @@ -104,8 +104,14 @@ </tr> </table><br />'; +if ($_SESSION['SuppTrans']->InvoiceOrCredit == 'Invoice'){ + echo '<div class="centre">' . InternalLink('', 'SupplierInvoice.php', _('Back to Invoice Entry')) . '</div>'; +} else { + echo '<div class="centre">' . InternalLink('', 'SupplierCredit.php', _('Back to Credit Note Entry')) . '</div>'; +} + /*Set up a form to allow input of new Shipment charges */ -echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<br /><form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (!isset($_POST['ShiptRef'])) { @@ -150,7 +156,7 @@ <td><input type="text" class="number" name="Amount" size="12" maxlength="11" value="' . locale_money_format($_POST['Amount'], $_SESSION['SuppTrans']->CurrCode) . '" /></td></tr>'; echo '</table>'; -echo '<br /><div class="centre"><button type="submit" name="AddShiptChgToInvoice">' . _('Enter Shipment Charge') . '</button></div>'; +echo '<div class="centre"><button type="submit" name="AddShiptChgToInvoice">' . _('Enter Shipment Charge') . '</button></div>'; echo '</form>'; include('includes/footer.inc'); Modified: trunk/SuppTransGLAnalysis.php =================================================================== --- trunk/SuppTransGLAnalysis.php 2012-08-16 13:09:18 UTC (rev 9514) +++ trunk/SuppTransGLAnalysis.php 2012-08-16 22:08:37 UTC (rev 9515) @@ -70,12 +70,14 @@ $GLActName, $_POST['Amount'], $_POST['JobRef'], - $_POST['Narrative']); + $_POST['Narrative'], + $_POST['Tag']); unset($_POST['GLCode']); unset($_POST['Amount']); unset($_POST['JobRef']); unset($_POST['Narrative']); unset($_POST['AcctSelection']); + unset($_POST['Tag']); } } @@ -92,57 +94,67 @@ $_SESSION['SuppTrans']->Remove_GLCodes_From_Trans($_GET['Edit']); } +echo '<br /><table cellpadding="2" class="selection">'; + /*Show all the selected GLCodes so far from the SESSION['SuppInv']->GLCodes array */ if ($_SESSION['SuppTrans']->InvoiceOrCredit == 'Invoice'){ - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('General Ledger') . '" alt="" />' . ' ' - . _('General Ledger Analysis of Invoice From') . ' ' . $_SESSION['SuppTrans']->SupplierName. '</p>'; + echo '<tr> + <th colspan="7" class="header"> + <img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('General Ledger') . '" alt="" />' . ' '. _('General Ledger Analysis of Invoice From') . ' ' . $_SESSION['SuppTrans']->SupplierName. + '</th> + </tr>'; } else { - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('General Ledger') . '" alt="" />' . ' ' - . _('General Ledger Analysis of Credit Note From') . ' ' . $_SESSION['SuppTrans']->SupplierName. '</p>'; + echo '<tr> + <th colspan="7" class="header"> + <img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('General Ledger') . '" alt="" />' . ' '. _('General Ledger Analysis of Credit Note From') . ' ' . $_SESSION['SuppTrans']->SupplierName. + '</th> + </tr>'; } -echo '<table cellpadding="2" class="selection">'; -$TableHeader = '<tr> - <th>' . _('Account') . '</th> - <th>' . _('Name') . '</th> - <th>' . _('Amount') . '<br />' . _('in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th> - <th>' . _('Narrative') . '</th> - </tr>'; -echo $TableHeader; +echo '<tr> + <th class="SortableColumn" onclick="SortSelect(this)">' . _('Account') . '</th> + <th class="SortableColumn" onclick="SortSelect(this)">' . _('Name') . '</th> + <th class="SortableColumn" onclick="SortSelect(this)">' . _('Amount') . '<br />' . _('in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th> + <th class="SortableColumn" onclick="SortSelect(this)">' . _('Narrative') . '</th> + <th class="SortableColumn" onclick="SortSelect(this)">' . _('Tag') . '</th> + </tr>'; + $TotalGLValue=0; -$i=0; foreach ( $_SESSION['SuppTrans']->GLCodes as $EnteredGLCode){ + $TagSQL = "SELECT tagdescription FROM tags WHERE tagref='" . $EnteredGLCode->Tag . "'"; + $TagResult = DB_query($TagSQL, $db); + $TagRow = DB_fetch_array($TagResult); + if ($EnteredGLCode->Tag==0) { + $TagRow['tagdescription'] = _('None'); + } + echo '<tr> - <td>' . $EnteredGLCode->GLCode . '</td> - <td>' . $EnteredGLCode->GLActName . '</td> - <td class="number">' . locale_money_format($EnteredGLCode->Amount,$_SESSION['SuppTrans']->CurrCode) . '</td> - <td>' . $EnteredGLCode->Narrative . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Edit=' . $EnteredGLCode->Counter . '">' . _('Edit') . '</a></td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $EnteredGLCode->Counter . '">' . _('Delete') . '</a></td> + <td>' . $EnteredGLCode->GLCode . '</td> + <td>' . $EnteredGLCode->GLActName . '</td> + <td class="number">' . locale_money_format($EnteredGLCode->Amount,$_SESSION['SuppTrans']->CurrCode) . '</td> + <td>' . $EnteredGLCode->Narrative . '</td> + <td>' . $EnteredGLCode->Tag . ' - ' . $TagRow['tagdescription'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Edit=' . $EnteredGLCode->Counter, _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $EnteredGLCode->Counter, _('Delete')) . '</td> </tr>'; $TotalGLValue += $EnteredGLCode->Amount; - $i++; - if ($i>15){ - $i = 0; - echo $TableHeader; - } } echo '<tr> - <th colspan="2" class="header">' . _('Total') . ':</th> - <th class="header"><u>' . locale_money_format($TotalGLValue,$_SESSION['SuppTrans']->CurrCode) . '</u></th> + <th colspan="2" class="header">' . _('Total') . ':</th> + <th style="text-align:right"><u>' . locale_money_format($TotalGLValue,$_SESSION['SuppTrans']->CurrCode) . '</u></th> </tr> </table>'; if ($_SESSION['SuppTrans']->InvoiceOrCredit == 'Invoice'){ - echo '<div class="centre"><br /><a href="' . $rootpath . '/SupplierInvoice.php">' . _('Back to Invoice Entry') . '</a></div>'; + echo '<div class="centre"><br />' . InternalLink('', 'SupplierInvoice.php', _('Back to Invoice Entry')) . '</div>'; } else { - echo '<div class="centre"><br /><a href="' . $rootpath . '/SupplierCredit.php">' . _('Back to Credit Note Entry') . '</a></div>'; + echo '<div class="centre"><br />' . InternalLink('', 'SupplierCredit.php', _('Back to Credit Note Entry')) . '</div>'; } /*Set up a form to allow input of new GL entries */ @@ -177,6 +189,31 @@ echo '</select> </td> </tr>'; + +echo '<tr> + <td>' . _('Select GL Tag') . '</td> + <td> + <select name="Tag">'; + +$SQL = "SELECT tagref, + tagdescription + FROM tags + ORDER BY tagref"; + +$result=DB_query($SQL,$db); +echo '<option value="0">0 - None</option>'; +while ($myrow=DB_fetch_array($result)){ + if (isset($_POST['Tag']) and $_POST['Tag']==$myrow['tagref']){ + echo '<option selected="True" value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription'].'</option>'; + } else { + echo '<option value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription'].'</option>'; + } +} +echo '</select> + </td> + </tr>'; +// End select tag + if (!isset($_POST['Amount'])) { $_POST['Amount']=0; } @@ -192,7 +229,7 @@ <td>' . _('Narrative') . ':</td> <td><textarea name="Narrative" cols=40 rows=2>' . $_POST['Narrative'] . '</textarea></td> </tr> - </table><br />'; + </table>'; echo '<div class="centre"><button type="submit" name="AddGLCodeToTrans">' . _('Enter GL Line') . '</button></div>'; Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2012-08-16 13:09:18 UTC (rev 9514) +++ trunk/SupplierInvoice.php 2012-08-16 22:08:37 UTC (rev 9515) @@ -31,8 +31,6 @@ $SupplierName=$_SESSION['SuppTrans']->SupplierName; } -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Supplier Invoice') . '" alt="" />' . ' ' . _('Enter Supplier Invoice:') . ' ' . $SupplierName; -echo '</p>'; if (isset($_GET['SupplierID']) and $_GET['SupplierID']!=''){ /*It must be a new invoice entry - clear any existing invoice details from the SuppTrans object and initiate a newy*/ @@ -59,6 +57,7 @@ paymentterms.dayinfollowingmonth, suppliers.currcode, currencies.rate AS exrate, + currencies.decimalplaces, suppliers.taxgroupid, taxgroups.taxgroupdescription FROM suppliers, @@ -82,6 +81,7 @@ $_SESSION['SuppTrans']->TermsDescription = $myrow['terms']; $_SESSION['SuppTrans']->CurrCode = $myrow['currcode']; $_SESSION['SuppTrans']->ExRate = $myrow['exrate']; + $_SESSION['SuppTrans']->CurrDecimalPlaces = $myrow['decimalplaces']; $_SESSION['SuppTrans']->TaxGroup = $myrow['taxgroupid']; $_SESSION['SuppTrans']->TaxGroupDescription = $myrow['taxgroupdescription']; $_SESSION['SuppTrans']->SupplierID = $myrow['supplierid']; @@ -127,7 +127,7 @@ /* Set the session variables to the posted data from the form if the page has called itself */ if (isset($_POST['ExRate'])){ - $_SESSION['SuppTrans']->ExRate = $_POST['ExRate']; + $_SESSION['SuppTrans']->ExRate = filter_number_input($_POST['ExRate']); $_SESSION['SuppTrans']->Comments = $_POST['Comments']; $_SESSION['SuppTrans']->TranDate = $_POST['TranDate']; @@ -174,66 +174,30 @@ $_SESSION['SuppTrans']->OvAmount += $FixedAsset->Amount; } } - $_SESSION['SuppTrans']->OvAmount = round($_SESSION['SuppTrans']->OvAmount,2); + $_SESSION['SuppTrans']->OvAmount = round($_SESSION['SuppTrans']->OvAmount,$_SESSION['SuppTrans']->CurrDecimalPlaces); }else { /*OvAmount must be entered manually */ - $_SESSION['SuppTrans']->OvAmount = round(filter_currency_input($_POST['OvAmount']),2); + $_SESSION['SuppTrans']->OvAmount = round(filter_currency_input($_POST['OvAmount']),$_SESSION['SuppTrans']->CurrDecimalPlaces); } } - -if (!isset($_POST['PostInvoice'])){ - - if (isset($_POST['GRNS'])){ - /*This ensures that any changes in the page are stored in the session before calling the grn page */ - echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/SuppInvGRNs.php">'; - echo '<div class="centre">' . _('You should automatically be forwarded to the entry of invoices against goods received page') . - '. ' . _('If this does not happen') .' (' . _('if the browser does not support META Refresh') . ') ' . - '<a href="' . $rootpath . '/SuppInvGRNs.php">' . _('click here') . '</a> ' . _('to continue') . '</div><br />'; - exit; - } - if (isset($_POST['Shipts'])){ - /*This ensures that any changes in the page are stored in the session before calling the shipments page */ - echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/SuppShiptChgs.php">'; - echo '<div class="centre">' . _('You should automatically be forwarded to the entry of invoices against shipments page') . - '. ' . _('If this does not happen') . ' (' . _('if the browser does not support META Refresh'). ') ' . - '<a href="' . $rootpath . '/SuppShiptChgs.php">' . _('click here') . '</a> ' . _('to continue') . '.</div><br />'; - exit; - } - if (isset($_POST['GL'])){ - /*This ensures that any changes in the page are stored in the session before calling the shipments page */ - echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/SuppTransGLAnalysis.php">'; - echo '<div class="centre">' . _('You should automatically be forwarded to the entry of invoices against the general ledger page') . - '. ' . _('If this does not happen') . ' (' . _('if the browser does not support META Refresh'). ') ' . - '<a href="' . $rootpath . '/SuppTransGLAnalysis.php">' . _('click here') . '</a> ' . _('to continue') . '.</div><br />'; - exit; - } - if (isset($_POST['Contracts'])){ - /*This ensures that any changes in the page are stored in the session before calling the shipments page */ - echo '<meta http-equiv="refresh" content="0; url=' . $rootpath . '/SuppContractChgs.php">'; - echo '<div class="centre">' . _('You should automatically be forwarded to the entry of invoices against contracts page') . - '. ' . _('If this does not happen') . ' (' . _('if the browser does not support META Refresh'). ') ' . - '<a href="' . $rootpath . '/SuppContractChgs.php">' . _('click here') . '</a> ' . _('to continue') . '.</div><br />'; - exit; - } - if (isset($_POST['FixedAssets'])){ - /*This ensures that any changes in the page are stored in the session before calling the shipments page */ - echo '<meta http-equiv="refresh" content="0; url=' . $rootpath . '/SuppFixedAssetChgs.php">'; - echo '<DIV class="centre">' . _('You should automatically be forwarded to the entry of invoice amounts against fixed assets page') . - '. ' . _('If this does not happen') . ' (' . _('if the browser does not support META Refresh'). ') ' . - '<a href="' . $rootpath . '/SuppFixedAssetChgs.php">' . _('click here') . '</a> ' . _('to continue') . '.</div><br />'; - exit; - } +if (!isset($_POST['PostInvoice']) or $_POST['PostInvoice']==''){ /* everything below here only do if a Supplier is selected fisrt add a header to show who we are making an invoice for */ - echo '<br /><table class="selection"> - <tr> - <th>' . _('Supplier') . '</th> - <th>' . _('Currency') . '</th> - <th>' . _('Terms') . '</th> - <th>' . _('Tax Authority') . '</th> - </tr>'; + echo '<br /> + <table class="selection"> + <tr> + <th colspan="4" class="header"> + <img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Supplier Invoice') . '" alt="" />' . ' ' . _('Enter Supplier Invoice:') . ' ' . $SupplierName . + '</th> + </tr> + <tr> + <th>' . _('Supplier') . '</th> + <th>' . _('Currency') . '</th> + <th>' . _('Terms') . '</th> + <th>' . _('Tax Authority') . '</th> + </tr>'; echo '<tr><th class="header"><font size="1"><b>' . $_SESSION['SuppTrans']->SupplierID . ' - ' . $_SESSION['SuppTrans']->SupplierName . '</b></font></td> <th class="header"><font size="1"><b>' . $_SESSION['SuppTrans']->CurrCode . '</b></font></th> @@ -242,7 +206,7 @@ </tr> </table>'; - echo '<br /><form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post" name="form1">'; + echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post" name="form1" id="form1">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br /><table class="selection">'; @@ -260,22 +224,22 @@ <td><input type="text" class="number" size="11" maxlength="10" name="ExRate" value="' . $_SESSION['SuppTrans']->ExRate . '" /></td></tr>'; echo '</table>'; - echo '<br /><div class="centre"><button type="submit" name="GRNS">' . _('Purchase Orders') . '</button>'; + echo '<div class="centre"><button onclick="return SubmitForm(form1, \'SuppInvGRNs.php\')" type="submit" name="GRNS">' . _('Purchase Orders') . '</button>'; - echo '<button type="submit" name="Shipts">' . _('Shipments') . '</button>'; - echo '<button type="submit" name="Contracts">' . _('Contracts') . '</button>'; + echo '<button onclick="return SubmitForm(form1, \'SuppShiptChgs.php\')" type="submit" name="Shipts">' . _('Shipments') . '</button>'; + echo '<button onclick="return SubmitForm(form1, \'SuppContractChgs.php\')" type="submit" name="Contracts">' . _('Contracts') . '</button>'; if ( $_SESSION['SuppTrans']->GLLink_Creditors == 1){ - echo '<button type="submit" name="GL">' . _('General Ledger') . '</button>'; + echo '<button onclick="return SubmitForm(form1, \'SuppTransGLAnalysis.php\')" type="submit" name="GL">' . _('General Ledger') . '</button>'; } - echo ' <button type="submit" name="FixedAssets">' . _('Fixed Assets') . '</button></div>'; + echo ' <button onclick="return SubmitForm(form1, \'SuppFixedAssetChgs.php\')" type="submit" name="FixedAssets">' . _('Fixed Assets') . '</button></div>'; $TotalGRNValue = 0; if (count( $_SESSION['SuppTrans']->GRNs)>0){ /*if there are any GRNs selected for invoicing then */ /*Show all the selected GRNs so far from the SESSION['SuppInv']->GRNs array */ - echo '<br /><table cellpadding="2" class="selection"> + echo '<table cellpadding="2" class="selection"> <tr><th colspan="6">' . _('Purchase Order Charges') . '</th></tr>'; $tableheader = '<tr> <th>' . _('Seq') . ' #</th> @@ -310,7 +274,7 @@ if (count( $_SESSION['SuppTrans']->Shipts) > 0){ /*if there are any Shipment charges on the invoice*/ - echo '<br /><table cellpadding="2" class="selection"> + echo '<table cellpadding="2" class="selection"> <tr> <th colspan="2">' . _('Shipment Charges') . '</th> </tr>'; @@ -342,7 +306,7 @@ if (count( $_SESSION['SuppTrans']->Assets) > 0){ /*if there are any fixed assets on the invoice*/ - echo '<br /><table cellpadding="2" class="selection"> + echo '<table cellpadding="2" class="selection"> <tr> <th colspan="3">' . _('Fixed Asset Additions') . '</th> </tr>'; @@ -380,7 +344,7 @@ if (count( $_SESSION['SuppTrans']->Contracts) > 0){ /*if there are any contract charges on the invoice*/ - echo '<br /><table cellpadding="2" class="selection"> + echo '<table cellpadding="2" class="selection"> <tr> <th colspan="3">' . _('Contract Charges') . '</th> </tr>'; @@ -420,7 +384,7 @@ if ( $_SESSION['SuppTrans']->GLLink_Creditors == 1){ if (count($_SESSION['SuppTrans']->GLCodes) > 0){ - echo '<br /><table cellpadding="2" class="selection"> + echo '<table cellpadding="2" class="selection"> <tr> <th colspan="5">' . _('General Ledger Analysis') . '</th> </tr>'; @@ -430,16 +394,25 @@ <th>' . _('Name') . '</th> <th>' . _('Amount') . '<br />' . _('in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th> <th>' . _('Narrative') . '</th> + <th>' . _('Tag') . '</th> </tr>'; echo $TableHeader; foreach ($_SESSION['SuppTrans']->GLCodes as $EnteredGLCode){ + $TagSQL = "SELECT tagdescription FROM tags WHERE tagref='" . $EnteredGLCode->Tag . "'"; + $TagResult = DB_query($TagSQL, $db); + $TagRow = DB_fetch_array($TagResult); + if ($EnteredGLCode->Tag==0) { + $TagRow['tagdescription'] = _('None'); + } + echo '<tr> <td>' . $EnteredGLCode->GLCode . '</td> <td>' . $EnteredGLCode->GLActName . '</td> <td class="number">' . locale_money_format($EnteredGLCode->Amount,$_SESSION['SuppTrans']->CurrCode) . '</td> <td>' . $EnteredGLCode->Narrative . '</td> + <td>' . $EnteredGLCode->Tag . ' - ' . $TagRow['tagdescription'] . '</td> </tr>'; $TotalGLValue += $EnteredGLCode->Amount; @@ -454,13 +427,13 @@ $_SESSION['SuppTrans']->OvAmount = ($TotalGRNValue + $TotalGLValue + $TotalAssetValue + $TotalShiptValue + $TotalContractsValue); - echo '<br /><table class="selection"> + echo '<table class="selection"> <tr> <td>' . _('Amount in supplier currency') . ':</td> <td colspan="2" class="number">' . locale_money_format( $_SESSION['SuppTrans']->OvAmount,$_SESSION['SuppTrans']->CurrCode) . '</td> </tr>'; } else { - echo '<br /><table class="selection"> + echo '<table class="selection"> <tr> <td>' . _('Amount in supplier currency') . ':</td> <td colspan="2" class="number"><input type="text" size="12" maxlength="10" name="OvAmount" value="' . locale_money_format( $_SESSION['SuppTrans']->OvAmount,$_SESSION['SuppTrans']->CurrCode) . '" /></td> @@ -542,7 +515,7 @@ <td>' . _('Comments') . '</td><td><textarea name="Comments" cols="40" rows="2">' . $_SESSION['SuppTrans']->Comments . '</textarea></td> </tr></table>'; - echo '<p><div class="centre"><button type="submit" name="PostInvoice">' . _('Enter Invoice') . '</button></div></p>'; + echo '<p><div class="centre"><button type="submit" name="PostInvoice" onclick="ChangeButtonValue(this, this.name)">' . _('Enter Invoice') . '</button></div></p>'; } else { //do the postings -and dont show the button to process Modified: trunk/css/silverwolf/images/contract.png =================================================================== --- trunk/css/silverwolf/images/contract.png 2012-08-16 13:09:18 UTC (rev 9514) +++ trunk/css/silverwolf/images/contract.png 2012-08-16 22:08:37 UTC (rev 9515) @@ -1,10 +1,19 @@ \x89PNG |
From: <tim...@us...> - 2012-08-18 21:15:34
|
Revision: 9520 http://weberp.svn.sourceforge.net/weberp/?rev=9520&view=rev Author: tim_schofield Date: 2012-08-18 21:15:27 +0000 (Sat, 18 Aug 2012) Log Message: ----------- Bring bank reconciliation into the new interface Modified Paths: -------------- trunk/BankAccounts.php trunk/BankMatching.php trunk/BankReconciliation.php trunk/css/silverwolf/images/money_add.png trunk/javascripts/FormFunctions.js Modified: trunk/BankAccounts.php =================================================================== --- trunk/BankAccounts.php 2012-08-17 12:46:34 UTC (rev 9519) +++ trunk/BankAccounts.php 2012-08-18 21:15:27 UTC (rev 9520) @@ -323,7 +323,7 @@ <tr> <td>' . _('Bank Account Code') . ': </td> <td> - <a class="tooltip" href="#"> + <a class="tooltip"> <span class="custom info"><img src="'.$rootpath.'/css/'.$theme.'/images/Info.png" height="48" width="48" /><em>' . _('Information') . '</em>' . _('Account Code is for SWIFT or BSB type Bank Codes.') . '</span> <input tabindex="3" type="text" name="BankAccountCode" value="' . $_POST['BankAccountCode'] . '" size="40" maxlength="50" /> </a> @@ -362,7 +362,7 @@ echo '<tr> <td>' . _('Default for Invoices') . ': </td> <td> - <a class="tooltip" href="#"> + <a class="tooltip"> <span class="custom info"><img src="'.$rootpath.'/css/'.$theme.'/images/Info.png" height="48" width="48" /><em>' . _('Information') . '</em>' . _('Set Default for Invoices to "Currency Default" or "Fallback Default" to print Account details on Invoices (only one account can be set to "Fall Back Default").') . '</span> <select tabindex="6" name="DefAccount">'; Modified: trunk/BankMatching.php =================================================================== --- trunk/BankMatching.php 2012-08-17 12:46:34 UTC (rev 9519) +++ trunk/BankMatching.php 2012-08-18 21:15:27 UTC (rev 9520) @@ -11,18 +11,12 @@ $Type = 'Receipts'; $TypeName =_('Receipts'); - echo '<p class="page_title_text"> - <img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Bank Matching') . '" alt="" />' . ' ' . _('Bank Account Matching - Receipts') . ' - </p>'; } elseif ((isset($_GET['Type']) and $_GET['Type']=='Payments') or (isset($_POST['Type']) and $_POST['Type']=='Payments')) { $Type = 'Payments'; $TypeName =_('Payments'); - echo '<p class="page_title_text"> - <img src="'.$rootpath.'/css/'.$theme.'/images/money_delete.png" title="' . _('Bank Matching') . '" alt="" />' . ' ' . _('Bank Account Matching - Payments') . ' - </p>'; } else { @@ -38,7 +32,7 @@ $_POST['First20_or_All']='All'; } -if (isset($_POST['Update']) and $_POST['RowCounter']>1){ +if (isset($_POST['Update']) and $_POST['Update']=='Update' and $_POST['RowCounter']>1){ for ($Counter=1;$Counter <= $_POST['RowCounter']; $Counter++){ if (isset($_POST['Clear_' . $Counter]) and $_POST['Clear_' . $Counter]==True){ /*Get amount to be cleared */ @@ -77,18 +71,23 @@ $_POST['ShowTransactions'] = True; } -echo '<div class="page_help_text">' . _('Use this screen to match webERP Receipts and Payments to your Bank Statement. Check your bank statement and click the check-box when you find the matching transaction.') . '</div><br />'; - echo '<form onsubmit="return SubmitForm(this, \'\')" action="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="Type" value="' . $Type . '" />'; -echo '<table class="selection"> - <tr> - <td align="left">' . _('Bank Account') . ':</td> - <td colspan="3"><select tabindex="1" name="BankAccount">'; +echo '<table class="selection">'; +echo '<tr> + <th class="header" colspan="4"> + <img style="width:24px" src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Bank Matching') . '" alt="" />' . ' ' . _('Bank Account Matching') . ' - ' . $TypeName . ' + </th> + </tr>'; + +echo '<tr> + <td align="left">' . _('Bank Account') . ':</td> + <td colspan="3"><select tabindex="1" name="BankAccount">'; + $sql = "SELECT accountcode, bankaccountname FROM bankaccounts"; $resultBankActs = DB_query($sql,$db); while ($myrow=DB_fetch_array($resultBankActs)){ @@ -146,13 +145,15 @@ echo '</select></td> </tr>'; +if (empty($_POST['BankAccount'])) { + $_POST['BankAccount']=''; +} echo '</table> - <br /> <div class="centre"> - <button tabindex="6" type="submit" name="ShowTransactions">' . _('Show selected') . ' ' . $TypeName . '</button> - <p> - <a href="' . $rootpath . '/BankReconciliation.php">' . _('Show reconciliation') . '</a> - </p> + <button tabindex="6" type="submit" name="ShowTransactions" onclick="ChangeButtonValue(this, this.name)">' . _('Show selected') . ' ' . $TypeName . '</button> + </div> + <div class="centre"> + ' . InternalLink('', 'BankReconciliation.php?Account='.$_POST['BankAccount'], _('Show reconciliation')) . ' </div>'; $InputError=0; @@ -172,7 +173,8 @@ if ($InputError !=1 AND isset($_POST['BankAccount']) AND $_POST['BankAccount']!='' - AND isset($_POST['ShowTransactions'])){ + AND isset($_POST['ShowTransactions']) + and $_POST['ShowTransactions']=='ShowTransactions'){ $SQLBeforeDate = FormatDateForSQL($_POST['BeforeDate']); $SQLAfterDate = FormatDateForSQL($_POST['AfterDate']); @@ -252,17 +254,23 @@ $ErrMsg = _('The payments with the selected criteria could not be retrieved because'); $PaymentsResult = DB_query($sql, $db, $ErrMsg); - echo '<table cellpadding="2" class="selection"> - <tr> - <th>'. _('Cheque No') . '</th> - <th>' . _('Ref') . '</th> - <th>' . $TypeName . '</th> - <th>' . _('Date') . '</th> - <th>' . _('Amount') . '</th> - <th>' . _('Outstanding') . '</th> - <th colspan="3">' . _('Clear') . ' / ' . _('Unclear') . '</th> - </tr>'; + echo '<table cellpadding="2" class="selection">'; + echo '<tr> + <th class="header" colspan="9"> + <img style="width:24px" src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Bank Matching') . '" alt="" />' . ' ' . _('Unmatched') . ' ' . $TypeName . ' + </th> + </tr>'; + echo '<tr> + <th class="SortableColumn" onclick="SortSelect(this)">'. _('Cheque No') . '</th> + <th class="SortableColumn" onclick="SortSelect(this)">' . _('Ref') . '</th> + <th class="SortableColumn" onclick="SortSelect(this)">' . $TypeName . '</th> + <th class="SortableColumn" onclick="SortSelect(this)">' . _('Date') . '</th> + <th class="SortableColumn" onclick="SortSelect(this)">' . _('Amount') . '</th> + <th class="SortableColumn" onclick="SortSelect(this)">' . _('Outstanding') . '</th> + <th colspan="3">' . _('Clear') . ' / ' . _('Unclear') . '</th> + </tr>'; + $k = 0; //row colour counter $i = 1; //no of rows counter @@ -327,10 +335,9 @@ } //end of while loop echo '</table> - <br /> <div class="centre"> <input type="hidden" name="RowCounter" value="' . $i . '" /> - <button type="submit" name="Update">' . _('Update Matching') . '</button> + <button type="submit" name="Update" onclick="ChangeButtonValue(this, this.name)">' . _('Update Matching') . '</button> </div><br />'; } echo '</form>'; Modified: trunk/BankReconciliation.php =================================================================== --- trunk/BankReconciliation.php 2012-08-17 12:46:34 UTC (rev 9519) +++ trunk/BankReconciliation.php 2012-08-18 21:15:27 UTC (rev 9520) @@ -10,9 +10,8 @@ echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; -if (isset($_GET['Account'])) { +if (isset($_GET['Account']) and $_GET['Account']!='') { $_POST['BankAccount']=$_GET['Account']; $_POST['ShowRec']=true; } @@ -93,6 +92,11 @@ echo '<table class="selection">'; +echo '<tr> + <th colspan="2"> + <img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . ' + </th> + </tr>'; $SQL = "SELECT bankaccountname, accountcode FROM bankaccounts"; @@ -123,7 +127,7 @@ include ('includes/GLPostings.inc'); -echo '</table><br /><div class="centre"><button type="submit" tabindex="2" name="ShowRec">' . _('Show bank reconciliation statement') . '</button></div><br />'; +echo '</table><div class="centre"><button type="submit" tabindex="2" name="ShowRec">' . _('Show bank reconciliation statement') . '</button></div>'; if (isset($_POST['ShowRec']) OR isset($_POST['DoExchangeDifference'])){ @@ -339,11 +343,11 @@ } if (isset($_POST['BankAccount'])) { - echo '<br /><div class="centre"><a tabindex="4" href="' . $rootpath . '/BankMatching.php?Type=Payments&Account='.$_POST['BankAccount'].'">' . _('Match off cleared payments') . '</a>'; - echo '<br /><a tabindex="5" href="' . $rootpath . '/BankMatching.php?Type=Receipts&Account='.$_POST['BankAccount'].'">' . _('Match off cleared deposits') . '</a></div>'; + echo '<div class="centre">' . InternalLink($rootpath, 'BankMatching.php?Type=Payments&Account='.$_POST['BankAccount'], _('Match off cleared payments')); + echo '<br />' . InternalLink($rootpath, 'BankMatching.php?Type=Receipts&Account='.$_POST['BankAccount'], _('Match off cleared deposits')) . '</div>'; } else { - echo '<br /><div class="centre"><a tabindex="4" href="' . $rootpath . '/BankMatching.php?Type=Payments">' . _('Match off cleared payments') . '</a>'; - echo '<br /><a tabindex="5" href="' . $rootpath . '/BankMatching.php?Type=Receipts">' . _('Match off cleared deposits') . '</a></div>'; + echo '<div class="centre">' . InternalLink($rootpath, 'BankMatching.php?Type=Payments', _('Match off cleared payments')); + echo '<br />' . InternalLink($rootpath, 'BankMatching.php?Type=Receipts', _('Match off cleared deposits')) . '</div>'; } echo '</form>'; include('includes/footer.inc'); Modified: trunk/css/silverwolf/images/money_add.png =================================================================== --- trunk/css/silverwolf/images/money_add.png 2012-08-17 12:46:34 UTC (rev 9519) +++ trunk/css/silverwolf/images/money_add.png 2012-08-18 21:15:27 UTC (rev 9520) @@ -1,10 +1,10 @@ \x89PNG |
From: <tim...@us...> - 2012-08-19 20:15:37
|
Revision: 9527 http://weberp.svn.sourceforge.net/weberp/?rev=9527&view=rev Author: tim_schofield Date: 2012-08-19 20:15:31 +0000 (Sun, 19 Aug 2012) Log Message: ----------- Allow filtering of product search by mbflag Modified Paths: -------------- trunk/SelectProduct.php trunk/includes/ProductSearch.php trunk/javascripts/FormFunctions.js Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2012-08-19 20:15:16 UTC (rev 9526) +++ trunk/SelectProduct.php 2012-08-19 20:15:31 UTC (rev 9527) @@ -560,10 +560,9 @@ echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - -$URLArray=explode('/', $_SERVER['PHP_SELF']); +$AllowedMBFlags='MBAKGD'; echo '<div class="centre"> - <button type="submit" name="Search" onclick="return OpenSearchWindow(\'includes/ProductSearch.php\', \'' . htmlspecialchars(array_pop($URLArray), ENT_QUOTES, 'UTF-8') . '\')"> + <button type="submit" name="Search" onclick="return OpenSearchWindow(\'includes/ProductSearch.php?MBFlags='.$AllowedMBFlags.'\', \'' . htmlspecialchars(basename($_SERVER['PHP_SELF']), ENT_QUOTES, 'UTF-8') . '\')"> <img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Click To Search For Inventory Items') . '" alt="" /> ' . _('Search For Items') . ' </button> @@ -573,6 +572,5 @@ echo '<div id="SearchWindow">'; echo '</div>'; - include ('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/includes/ProductSearch.php =================================================================== --- trunk/includes/ProductSearch.php 2012-08-19 20:15:16 UTC (rev 9526) +++ trunk/includes/ProductSearch.php 2012-08-19 20:15:31 UTC (rev 9527) @@ -10,6 +10,10 @@ include($PathPrefix . 'config.php'); require_once($PathPrefix . 'includes/session.inc'); +if (isset($_GET['MBFlags'])) { + $_SESSION['MBFlags']=$_GET['MBFlags']; +} + if (!isset($_POST['PartialID']) and !isset($_POST['PartialDescription'])) { $_POST['PartialID']=''; $_POST['PartialDescription']=''; @@ -93,23 +97,31 @@ </table></form>'; function ProductSearchSQL($db) { - $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.longdescription, - SUM(locstock.quantity) AS qoh, - stockmaster.units, - stockmaster.mbflag, - stockmaster.discontinued, - stockmaster.decimalplaces - FROM stockmaster - LEFT JOIN locstock - ON stockmaster.stockid=locstock.stockid - WHERE stockmaster.description " . LIKE . " '%" . $_POST['PartialDescription'] . "%' - AND stockmaster.stockid " . LIKE . " '%" . $_POST['PartialID'] . "%' - AND stockmaster.categoryid " . LIKE . " '%" . $_POST['Category'] . "%' - GROUP BY stockmaster.stockid - ORDER BY stockmaster.stockid - LIMIT 15"; + $MBFlagText=''; + for ($i=0; $i<strlen($_SESSION['MBFlags']); $i++) { + $MBFlagText .= "stockmaster.mbflag='".$_SESSION['MBFlags'][$i]."'"; + if ($i<strlen($_SESSION['MBFlags'])-1) { + $MBFlagText .= " OR "; + } + } + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.longdescription, + SUM(locstock.quantity) AS qoh, + stockmaster.units, + stockmaster.mbflag, + stockmaster.discontinued, + stockmaster.decimalplaces + FROM stockmaster + LEFT JOIN locstock + ON stockmaster.stockid=locstock.stockid + WHERE stockmaster.description " . LIKE . " '%" . $_POST['PartialDescription'] . "%' + AND stockmaster.stockid " . LIKE . " '%" . $_POST['PartialID'] . "%' + AND stockmaster.categoryid " . LIKE . " '%" . $_POST['Category'] . "%' + AND (".$MBFlagText.") + GROUP BY stockmaster.stockid + ORDER BY stockmaster.stockid + LIMIT 15"; $result=DB_query($SQL, $db); return $result; } Modified: trunk/javascripts/FormFunctions.js =================================================================== --- trunk/javascripts/FormFunctions.js 2012-08-19 20:15:16 UTC (rev 9526) +++ trunk/javascripts/FormFunctions.js 2012-08-19 20:15:31 UTC (rev 9527) @@ -202,7 +202,7 @@ document.getElementById("SearchWindow").innerHTML=xmlhttp.responseText; } } - xmlhttp.open("GET",TargetURL+'?CallingURL='+CallingURL,true); + xmlhttp.open("GET",TargetURL+'&CallingURL='+CallingURL,true); xmlhttp.send(); return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-19 20:29:10
|
Revision: 9530 http://weberp.svn.sourceforge.net/weberp/?rev=9530&view=rev Author: tim_schofield Date: 2012-08-19 20:29:03 +0000 (Sun, 19 Aug 2012) Log Message: ----------- Improvements for new user interface Modified Paths: -------------- trunk/BOMListing.php trunk/css/silverwolf/images/view_tree.png Modified: trunk/BOMListing.php =================================================================== --- trunk/BOMListing.php 2012-08-19 20:15:55 UTC (rev 9529) +++ trunk/BOMListing.php 2012-08-19 20:29:03 UTC (rev 9530) @@ -102,14 +102,13 @@ $YPos -=$line_height; $pdf->line($Page_Width-$Right_Margin, $YPos,$Left_Margin, $YPos); - $pdf->OutputD($_SESSION['DatabaseName'] . '_BOMListing_' . date('Y-m-d').'.pdf');//UldisN - $pdf->__destruct(); //UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_BOMListing_' . date('Y-m-d').'.pdf');//UldisN + $pdf->__destruct(); //UldisN } else { /*The option to print PDF was not hit */ $title=_('Bill Of Material Listing'); include('includes/header.inc'); - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p><br />'; if (!isset($_POST['FromCriteria']) or !isset($_POST['ToCriteria'])) { /*if $FromCriteria is not set then show a form to allow input */ @@ -117,15 +116,20 @@ echo '<form onsubmit="return SubmitForm(this, \'\')" action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . ' method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection"> - <tr> - <td>' . _('From Inventory Part Code') . ':' . '</font></td><td><input tabindex="1" type="text" name="FromCriteria" size="20" maxlength="20" value="1" /></td> - </tr>'; + echo '<table class="selection">'; + echo '<tr> + <th colspan="2" class="header"> + <img src="'.$rootpath.'/css/'.$theme.'/images/view_tree.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . ' + </th> + </tr>'; + echo '<tr> + <td>' . _('From Inventory Part Code') . ':' . '</font></td><td><input tabindex="1" type="text" name="FromCriteria" size="20" maxlength="20" value="1" /></td> + </tr>'; echo '<tr><td>' . _('To Inventory Part Code') . ':' . '</td><td><input tabindex="2" type="text" name="ToCriteria" size="20" maxlength="20" value="zzzzzzz" /></td></tr>'; - echo '</table><br /><div class="centre"><button tabindex="3" type="submit" name="PrintPDF">' . _('Print PDF') . '</button></div><br />'; + echo '</table><div class="centre"><button tabindex="3" type="submit" name="PrintPDF">' . _('Print PDF') . '</button></div>'; echo '<script>defaultControl(document.forms[0].FromCriteria);</script>'; } include('includes/footer.inc');; Modified: trunk/css/silverwolf/images/view_tree.png =================================================================== --- trunk/css/silverwolf/images/view_tree.png 2012-08-19 20:15:55 UTC (rev 9529) +++ trunk/css/silverwolf/images/view_tree.png 2012-08-19 20:29:03 UTC (rev 9530) @@ -1,35 +1,6 @@ \x89PNG |
From: <tim...@us...> - 2012-08-21 13:09:41
|
Revision: 9540 http://weberp.svn.sourceforge.net/weberp/?rev=9540&view=rev Author: tim_schofield Date: 2012-08-21 13:09:34 +0000 (Tue, 21 Aug 2012) Log Message: ----------- Add facility to print html tables straight to pdf Modified Paths: -------------- trunk/css/silverwolf/images/printer.png trunk/index.php trunk/javascripts/FormFunctions.js Added Paths: ----------- trunk/PrintTable.php Added: trunk/PrintTable.php =================================================================== --- trunk/PrintTable.php (rev 0) +++ trunk/PrintTable.php 2012-08-21 13:09:34 UTC (rev 9540) @@ -0,0 +1,74 @@ +<?php + +$PageSecurity=1; + +if (!isset($PathPrefix)) { + $PathPrefix=''; +} + +if (!file_exists($PathPrefix . 'config.php')){ + $rootpath = dirname(htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8')); + if ($rootpath == '/' or $rootpath == '\\') { + $rootpath = ''; + } + header('Location:' . $rootpath . '/install/index.php'); +} +include($PathPrefix . 'config.php'); + +if (isset($SessionSavePath)){ + session_save_path($SessionSavePath); +} + +$PaperSize='A4_Landscape'; + +include('includes/PDFStarter.php'); + +$YPos= $Page_Height-$Top_Margin; +$XPos=$Left_Margin; + +$pdf->addInfo('Title', strip_tags($_POST['Header']) ); +$PageNumber=1; +$line_height=12; + +$FontSize=14; +$LeftOvers = $pdf->addTextWrap($XPos,$YPos,$Page_Width-$Left_Margin,$FontSize, strip_tags($_POST['Header']), 'centre'); +$YPos-=16; +$FontSize=10; + +$pdf->RoundRectangle($Left_Margin-5, $YPos-5, $Page_Width-$Left_Margin-$Right_Margin, ($line_height*1), 10); + +$ColumnNames=explode('</th>', $_POST['Columns']); +$ColumnWidths=explode('px', $_POST['ColumnWidths']); + +$TotalWidth=0; +for ($i=0; $i<count($ColumnWidths); $i++) { + $TotalWidth+=$ColumnWidths[$i]; +} + +for ($i=0; $i<count($ColumnWidths); $i++) { + $LeftOvers = $pdf->addTextWrap($XPos,$YPos-$line_height,$Page_Width-$Left_Margin,$FontSize, strip_tags($ColumnNames[$i]), 'centre'); + $XPos+=($Page_Width-$Left_Margin-$Right_Margin)*($ColumnWidths[$i]/$TotalWidth); +} + +foreach ($_POST as $name=>$value) { + if (mb_substr($name, 0, 3)=='Row') { + $Row[mb_substr($name, 3)]=$value; + } +} + +$YPos-=$line_height*2; + +for ($row=0; $row<count($Row); $row++) { + $ColumnValues=explode('</td>', $Row[$row]); + $XPos=$Left_Margin; + $YPos-=$line_height; + for ($i=0; $i<count($ColumnWidths); $i++) { + $LeftOvers = $pdf->addTextWrap($XPos,$YPos-$line_height,$Page_Width-$Left_Margin,$FontSize, strip_tags($ColumnValues[$i]), 'centre'); + $XPos+=($Page_Width-$Left_Margin-$Right_Margin)*($ColumnWidths[$i]/$TotalWidth); + } +} + +$pdf->OutputF($_SESSION['DatabaseName'] . '_TablePrint_' . date('Y-m-d_h-m-s') . '.pdf'); +$pdf->__destruct(); + +?> \ No newline at end of file Modified: trunk/css/silverwolf/images/printer.png =================================================================== --- trunk/css/silverwolf/images/printer.png 2012-08-21 13:09:19 UTC (rev 9539) +++ trunk/css/silverwolf/images/printer.png 2012-08-21 13:09:34 UTC (rev 9540) @@ -1,8 +1,17 @@ \x89PNG |
From: <tim...@us...> - 2012-08-21 13:28:21
|
Revision: 9541 http://weberp.svn.sourceforge.net/weberp/?rev=9541&view=rev Author: tim_schofield Date: 2012-08-21 13:28:11 +0000 (Tue, 21 Aug 2012) Log Message: ----------- Make image a class rather than an inline style and give it a new pointer Modified Paths: -------------- trunk/DailyBankTransactions.php trunk/css/silverwolf/sub.css Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2012-08-21 13:09:34 UTC (rev 9540) +++ trunk/DailyBankTransactions.php 2012-08-21 13:28:11 UTC (rev 9541) @@ -97,7 +97,7 @@ <th colspan="9" class="header"> <img src="'.$rootpath.'/css/'.$theme.'/images/bank.png" title="' . _('Bank Transactions') . '" alt="" />' . _('Account Transactions For').' '.$BankDetailRow['bankaccountname'].' '._('Between').' '.$_POST['FromTransDate'] . ' ' . _('and') . ' ' . $_POST['ToTransDate'] . ' - <img onClick="PrintTable(this)" style="float: right;" src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print this table') . '" alt="" /> + <img onClick="PrintTable(this)" class="PrinterIcon" src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print this table') . '" alt="" /> </th> </tr>'; echo '<tr> Modified: trunk/css/silverwolf/sub.css =================================================================== --- trunk/css/silverwolf/sub.css 2012-08-21 13:09:34 UTC (rev 9540) +++ trunk/css/silverwolf/sub.css 2012-08-21 13:28:11 UTC (rev 9541) @@ -673,6 +673,11 @@ width: 14px; } +img.PrinterIcon { + float: right; + cursor: pointer; +} + * {padding:0; margin:0} #wrapper {width:750px; padding:25px; margin:0 auto} #leftcolumn {float:left; width:25px; padding:10px;} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-21 16:40:56
|
Revision: 9544 http://weberp.svn.sourceforge.net/weberp/?rev=9544&view=rev Author: tim_schofield Date: 2012-08-21 16:40:47 +0000 (Tue, 21 Aug 2012) Log Message: ----------- Use new OutputF() function in place of old OutputD() Modified Paths: -------------- trunk/BOMExtendedQty.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/BOMListing.php trunk/DebtorsAtPeriodEnd.php trunk/GLAccountReport.php trunk/GLBalanceSheet.php trunk/GLProfit_Loss.php trunk/GLTagProfit_Loss.php trunk/GLTrialBalance.php trunk/InventoryPlanning.php trunk/InventoryPlanningPrefSupplier.php trunk/InventoryQuantities.php trunk/InventoryValuation.php trunk/MRPPlannedPurchaseOrders.php trunk/MRPPlannedWorkOrders.php trunk/MRPReport.php trunk/MRPReschedules.php trunk/MRPShortages.php trunk/OutstandingGRNs.php trunk/PDFBankingSummary.php trunk/PDFChequeListing.php trunk/PDFCustTransListing.php trunk/PDFCustomerList.php trunk/PDFDIFOT.php trunk/PDFDeliveryDifferences.php trunk/PDFGLJournal.php trunk/PDFGrn.php trunk/PDFLowGP.php trunk/PDFOrderStatus.php trunk/PDFOrdersInvoiced.php trunk/PDFPeriodStockTransListing.php trunk/PDFPickingList.php trunk/PDFPriceList.php trunk/PDFPrintLabel.php trunk/PDFQuotation.php trunk/PDFQuotationPortrait.php trunk/PDFReceipt.php trunk/PDFRemittanceAdvice.php trunk/PDFStockCheckComparison.php trunk/PDFStockLocTransfer.php trunk/PDFStockNegatives.php trunk/PDFStockTransfer_departments.php trunk/PDFSuppTransListing.php trunk/PO_PDFPurchOrder.php trunk/PcReportTab.php trunk/PrintCheque.php trunk/PrintCustOrder.php trunk/PrintCustOrder_generic.php trunk/PrintCustStatements.php trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php trunk/PrintSalesOrder_generic.php trunk/ReorderLevel.php trunk/SalesAnalysis_UserDefined.php trunk/StockCheck.php trunk/StockDispatch.php trunk/SuppPaymentRun.php trunk/SuppPriceList.php trunk/SupplierBalsAtPeriodEnd.php trunk/Tax.php Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/BOMExtendedQty.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -232,7 +232,7 @@ if ($ListCount == 0) { prnMsg(_('There were no items for the selected assembly'),'error'); } else { - $pdf->OutputF($_SESSION['DatabaseName'] . '_BOM_Extended_Qty_' . date('Y-m-d').'.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_BOM_Extended_Qty_' . date('Y-m-d_h-m-s').'.pdf'); $pdf->__destruct(); } Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/BOMIndented.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -236,7 +236,7 @@ if ($ListCount == 0) { prnMsg(_('There were no items for the selected assembly'),'error'); } else { - $pdf->OutputF($_SESSION['DatabaseName'] . '_Customer_trans_' . date('Y-m-d').'.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_Customer_trans_' . date('Y-m-d_h-m-s').'.pdf'); $pdf->__destruct(); } Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/BOMIndentedReverse.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -231,7 +231,7 @@ if ($ListCount == 0) { prnMsg(_('There were no items for the selected component'),'error'); } else { - $pdf->OutputF($_SESSION['DatabaseName'] . '_Customer_trans_' . date('Y-m-d').'.pdf');//UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_Customer_trans_' . date('Y-m-d_h-m-s').'.pdf');//UldisN $pdf->__destruct(); } Modified: trunk/BOMListing.php =================================================================== --- trunk/BOMListing.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/BOMListing.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -102,7 +102,7 @@ $YPos -=$line_height; $pdf->line($Page_Width-$Right_Margin, $YPos,$Left_Margin, $YPos); - $pdf->OutputF($_SESSION['DatabaseName'] . '_BOMListing_' . date('Y-m-d').'.pdf');//UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_BOMListing_' . date('Y-m-d_h-m-s').'.pdf');//UldisN $pdf->__destruct(); //UldisN } else { /*The option to print PDF was not hit */ Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/DebtorsAtPeriodEnd.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -116,7 +116,7 @@ $LeftOvers = $pdf->addTextWrap(50,$YPos,160,$FontSize,_('Total balances'),'left'); $LeftOvers = $pdf->addTextWrap(220,$YPos,60,$FontSize,$DisplayTotBalance,'right'); - $pdf->OutputD($_SESSION['DatabaseName'] . '_DebtorBals_' . date('Y-m-d').'.pdf');//UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_DebtorBals_' . date('Y-m-d_h-m-s').'.pdf');//UldisN $pdf->__destruct(); //UldisN } else { /*The option to print PDF was not hit */ Modified: trunk/GLAccountReport.php =================================================================== --- trunk/GLAccountReport.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/GLAccountReport.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -153,9 +153,9 @@ $YPos -=$line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,150,$FontSize, _('Period Total')); if ($PeriodTotal < 0 ){ //its a credit balance b/fwd - $LeftOvers = $pdf->addTextWrap(210,$YPos,50,$FontSize, locale_money_format(-$PeriodTotal,$_SESSION['CompanyRecord']['currencydefault']) , 'right'); + $LeftOvers = $pdf->addTextWrap(210,$YPos,50,$FontSize, locale_money_format(-$PeriodTotal,$_SESSION['CompanyRecord']['currencydefault']) , 'right'); } else { //its a debit balance b/fwd - $LeftOvers = $pdf->addTextWrap(160,$YPos,50,$FontSize, locale_money_format($PeriodTotal,$_SESSION['CompanyRecord']['currencydefault']) , 'right'); + $LeftOvers = $pdf->addTextWrap(160,$YPos,50,$FontSize, locale_money_format($PeriodTotal,$_SESSION['CompanyRecord']['currencydefault']) , 'right'); } } $PeriodNo = $myrow['periodno']; @@ -223,7 +223,7 @@ exit; } else { //print the report - $pdf->OutputD($_SESSION['DatabaseName'] . '_GL_Accounts_' . date('Y-m-d') . '.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_GL_Accounts_' . date('Y-m-d_h-m-s') . '.pdf'); $pdf->__destruct(); } //end if the report has some output } /* end of if PrintReport button hit */ Modified: trunk/GLBalanceSheet.php =================================================================== --- trunk/GLBalanceSheet.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/GLBalanceSheet.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -133,7 +133,7 @@ exit; } - $ListCount = DB_num_rows($AccountsResult); // UldisN + $ListCount = DB_num_rows($AccountsResult); // UldisN include('includes/PDFBalanceSheetPageHeader.inc'); @@ -161,29 +161,29 @@ $LYAccountBalance += $AccumProfitRow['lyaccumprofitbfwd']; } if ($ActGrp !=''){ - if ($myrow['groupname']!=$ActGrp){ + if ($myrow['groupname']!=$ActGrp){ $FontSize = 8; $pdf->setFont('','B'); - while ($myrow['groupname']!= $ParentGroups[$Level] AND $Level>0) { - $YPos -= $line_height; - $LeftOvers = $pdf->addTextWrap($Left_Margin+(10 * ($Level+1)),$YPos,200,$FontSize,_('Total') . ' ' . $ParentGroups[$Level]); - $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,locale_money_format($GroupTotal[$Level], $_SESSION['CompanyRecord']['currencydefault']),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,locale_money_format($LYGroupTotal[$Level], $_SESSION['CompanyRecord']['currencydefault']),'right'); - $ParentGroups[$Level]=''; - $GroupTotal[$Level]=0; - $LYGroupTotal[$Level]=0; - $Level--; - } - $YPos -= $line_height; - $LeftOvers = $pdf->addTextWrap($Left_Margin+(10 * ($Level+1)),$YPos,200,$FontSize,_('Total') . ' ' . $ParentGroups[$Level]); - $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,locale_money_format($GroupTotal[$Level], $_SESSION['CompanyRecord']['currencydefault']),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,locale_money_format($LYGroupTotal[$Level], $_SESSION['CompanyRecord']['currencydefault']),'right'); - $ParentGroups[$Level]=''; - $GroupTotal[$Level]=0; - $LYGroupTotal[$Level]=0; - $YPos -= $line_height; - } - } + while ($myrow['groupname']!= $ParentGroups[$Level] AND $Level>0) { + $YPos -= $line_height; + $LeftOvers = $pdf->addTextWrap($Left_Margin+(10 * ($Level+1)),$YPos,200,$FontSize,_('Total') . ' ' . $ParentGroups[$Level]); + $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,locale_money_format($GroupTotal[$Level], $_SESSION['CompanyRecord']['currencydefault']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,locale_money_format($LYGroupTotal[$Level], $_SESSION['CompanyRecord']['currencydefault']),'right'); + $ParentGroups[$Level]=''; + $GroupTotal[$Level]=0; + $LYGroupTotal[$Level]=0; + $Level--; + } + $YPos -= $line_height; + $LeftOvers = $pdf->addTextWrap($Left_Margin+(10 * ($Level+1)),$YPos,200,$FontSize,_('Total') . ' ' . $ParentGroups[$Level]); + $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,locale_money_format($GroupTotal[$Level], $_SESSION['CompanyRecord']['currencydefault']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,locale_money_format($LYGroupTotal[$Level], $_SESSION['CompanyRecord']['currencydefault']),'right'); + $ParentGroups[$Level]=''; + $GroupTotal[$Level]=0; + $LYGroupTotal[$Level]=0; + $YPos -= $line_height; + } + } if ($myrow['sectioninaccounts']!= $Section){ @@ -208,8 +208,8 @@ } if ($myrow['groupname']!= $ActGrp){ - $FontSize =8; - $pdf->setFont('','B'); + $FontSize =8; + $pdf->setFont('','B'); if ($myrow['parentgroupname']==$ActGrp AND $ActGrp!=''){ $Level++; } @@ -235,7 +235,7 @@ if ($_POST['Detail']=='Detailed'){ - $FontSize =8; + $FontSize =8; $pdf->setFont('',''); $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,50,$FontSize,$myrow['accountcode']); $LeftOvers = $pdf->addTextWrap($Left_Margin+55,$YPos,200,$FontSize,$myrow['accountname']); @@ -248,29 +248,29 @@ } }//end of loop - $FontSize = 8; + $FontSize = 8; $pdf->setFont('','B'); while ($Level>0) { - $YPos -= $line_height; - $LeftOvers = $pdf->addTextWrap($Left_Margin+(10 * ($Level+1)),$YPos,200,$FontSize,_('Total') . ' ' . $ParentGroups[$Level]); - $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,locale_money_format($GroupTotal[$Level], $_SESSION['CompanyRecord']['currencydefault']),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,locale_money_format($LYGroupTotal[$Level], $_SESSION['CompanyRecord']['currencydefault']),'right'); - $ParentGroups[$Level]=''; - $GroupTotal[$Level]=0; - $LYGroupTotal[$Level]=0; - $Level--; - } - $YPos -= $line_height; - $LeftOvers = $pdf->addTextWrap($Left_Margin+(10 * ($Level+1)),$YPos,200,$FontSize,_('Total') . ' ' . $ParentGroups[$Level]); - $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,locale_money_format($GroupTotal[$Level], $_SESSION['CompanyRecord']['currencydefault']),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,locale_money_format($LYGroupTotal[$Level], $_SESSION['CompanyRecord']['currencydefault']),'right'); - $ParentGroups[$Level]=''; - $GroupTotal[$Level]=0; - $LYGroupTotal[$Level]=0; - $YPos -= $line_height; + $YPos -= $line_height; + $LeftOvers = $pdf->addTextWrap($Left_Margin+(10 * ($Level+1)),$YPos,200,$FontSize,_('Total') . ' ' . $ParentGroups[$Level]); + $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,locale_money_format($GroupTotal[$Level], $_SESSION['CompanyRecord']['currencydefault']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,locale_money_format($LYGroupTotal[$Level], $_SESSION['CompanyRecord']['currencydefault']),'right'); + $ParentGroups[$Level]=''; + $GroupTotal[$Level]=0; + $LYGroupTotal[$Level]=0; + $Level--; + } + $YPos -= $line_height; + $LeftOvers = $pdf->addTextWrap($Left_Margin+(10 * ($Level+1)),$YPos,200,$FontSize,_('Total') . ' ' . $ParentGroups[$Level]); + $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,locale_money_format($GroupTotal[$Level], $_SESSION['CompanyRecord']['currencydefault']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,locale_money_format($LYGroupTotal[$Level], $_SESSION['CompanyRecord']['currencydefault']),'right'); + $ParentGroups[$Level]=''; + $GroupTotal[$Level]=0; + $LYGroupTotal[$Level]=0; + $YPos -= $line_height; - if ($SectionBalanceLY+$SectionBalance !=0){ - $FontSize =8; + if ($SectionBalanceLY+$SectionBalance !=0){ + $FontSize =8; $pdf->setFont('','B'); $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,200,$FontSize,$Sections[$Section]); $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,locale_money_format($SectionBalance, $_SESSION['CompanyRecord']['currencydefault']),'right'); @@ -292,8 +292,8 @@ include('includes/footer.inc'); exit; } else { - $pdf->OutputD($_SESSION['DatabaseName'] . '_GL_Balance_Sheet_' . date('Y-m-d') . '.pdf');//UldisN - $pdf->__destruct(); //UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_GL_Balance_Sheet_' . date('Y-m-d_h-m-s') . '.pdf');//UldisN + $pdf->__destruct(); //UldisN } exit; } else { @@ -398,7 +398,7 @@ if ($_POST['Detail']=='Detailed'){ echo '<tr> <td colspan="2"></td> - <td><hr></td> + <td><hr></td> <td></td> <td><hr></td> <td></td> @@ -632,7 +632,7 @@ echo '<tr> <td colspan="3"></td> - <td><hr></td> + <td><hr></td> <td></td> <td><hr></td> </tr>'; @@ -648,7 +648,7 @@ echo '<tr> <td colspan="3"></td> - <td><hr></td> + <td><hr></td> <td></td> <td><hr></td> </tr>'; Modified: trunk/GLProfit_Loss.php =================================================================== --- trunk/GLProfit_Loss.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/GLProfit_Loss.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -527,7 +527,7 @@ $pdf->line($Left_Margin+310, $YPos+$line_height,$Left_Margin+500, $YPos+$line_height); $pdf->line($Left_Margin+310, $YPos,$Left_Margin+500, $YPos); - $pdf->OutputD($_SESSION['DatabaseName'] . '_' .'Income_Statement_' . date('Y-m-d').'.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_' .'Income_Statement_' . date('Y-m-d_h-m-s').'.pdf'); $pdf->__destruct(); exit; Modified: trunk/GLTagProfit_Loss.php =================================================================== --- trunk/GLTagProfit_Loss.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/GLTagProfit_Loss.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -444,7 +444,7 @@ $pdf->line($Left_Margin+310, $YPos+$line_height,$Left_Margin+500, $YPos+$line_height); $pdf->line($Left_Margin+310, $YPos,$Left_Margin+500, $YPos); - $pdf->OutputD($_SESSION['DatabaseName'] . '_' .'Tag_Income_Statement_' . date('Y-m-d').'.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_' .'Tag_Income_Statement_' . date('Y-m-d_h-m-s').'.pdf'); $pdf->__destruct(); exit; Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/GLTrialBalance.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -373,7 +373,7 @@ header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); */ - $pdf->OutputD($_SESSION['DatabaseName'] . '_GL_Trial_Balance_' . Date('Y-m-d') . '.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_GL_Trial_Balance_' . Date('Y-m-d_h-m-s') . '.pdf'); $pdf->__destruct(); exit; } else { Modified: trunk/InventoryPlanning.php =================================================================== --- trunk/InventoryPlanning.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/InventoryPlanning.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -414,7 +414,7 @@ include('includes/footer.inc'); exit; } else { - $pdf->OutputD($_SESSION['DatabaseName'] . '_Inventory_Planning_' . Date('Y-m-d') . '.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_Inventory_Planning_' . Date('Y-m-d_h-m-s') . '.pdf'); $pdf-> __destruct(); } Modified: trunk/InventoryPlanningPrefSupplier.php =================================================================== --- trunk/InventoryPlanningPrefSupplier.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/InventoryPlanningPrefSupplier.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -204,15 +204,15 @@ $ListCount = DB_num_rows($InventoryResult); if (DB_error_no($db) !=0) { - $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; - include('includes/header.inc'); - prnMsg(_('The inventory quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; - if ($debug==1){ - echo '<br />' . $SQL; - } - include('includes/footer.inc'); - exit; + $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; + include('includes/header.inc'); + prnMsg(_('The inventory quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); + echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + if ($debug==1){ + echo '<br />' . $SQL; + } + include('includes/footer.inc'); + exit; } NewPageHeader(); @@ -462,7 +462,7 @@ include('includes/footer.inc'); exit; } else { - $pdf->OutputD($_SESSION['DatabaseName'] . '_Inventory_Planning_PrefSupplier_' . Date('Y-m-d') . '.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_Inventory_Planning_PrefSupplier_' . Date('Y-m-d_h-m-s') . '.pdf'); $pdf-> __destruct(); } exit; // Javier: needs check Modified: trunk/InventoryQuantities.php =================================================================== --- trunk/InventoryQuantities.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/InventoryQuantities.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -136,7 +136,7 @@ } /*Print out the grand totals */ - $pdf->OutputD($_SESSION['DatabaseName'] . '_Inventory_Quantities_' . Date('Y-m-d') . '.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_Inventory_Quantities_' . Date('Y-m-d_h-m-s') . '.pdf'); $pdf->__destruct(); } else { /*The option to print PDF was not hit so display form */ Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/InventoryValuation.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -187,7 +187,7 @@ $DisplayTotalVal = locale_money_format($Tot_Val,$_SESSION['CompanyRecord']['currencydefault']); $LeftOvers = $pdf->addTextWrap(500,$YPos,60,$FontSize,$DisplayTotalVal, 'right'); - $pdf->OutputD($_SESSION['DatabaseName'] . '_Inventory_Valuation_' . Date('Y-m-d') . '.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_Inventory_Valuation_' . Date('Y-m-d_h-m-s') . '.pdf'); $pdf->__destruct(); } else { /*The option to print PDF was not hit */ Modified: trunk/MRPPlannedPurchaseOrders.php =================================================================== --- trunk/MRPPlannedPurchaseOrders.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/MRPPlannedPurchaseOrders.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -252,7 +252,7 @@ $DisplayTotalVal = locale_money_format($Total_Extcost,$_SESSION['CompanyRecord']['currencydefault']); $pdf->addTextWrap(310,$YPos,60,$FontSize,$DisplayTotalVal, 'right'); - $pdf->OutputD($_SESSION['DatabaseName'] . '_MRP_Planned_Purchase_Orders_' . Date('Y-m-d') . '.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_MRP_Planned_Purchase_Orders_' . Date('Y-m-d_h-m-s') . '.pdf'); $pdf->__destruct(); } else { /*The option to print PDF was not hit so display form */ Modified: trunk/MRPPlannedWorkOrders.php =================================================================== --- trunk/MRPPlannedWorkOrders.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/MRPPlannedWorkOrders.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -232,7 +232,7 @@ $DisplayTotalVal = locale_money_format($Total_Extcost,$_SESSION['CompanyRecord']['currencydefault']); $pdf->addTextWrap(310,$YPos,60,$FontSize,$DisplayTotalVal, 'right'); - $pdf->OutputD($_SESSION['DatabaseName'] . '_MRP_Planned_Work_Orders_' . Date('Y-m-d') . '.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_MRP_Planned_Work_Orders_' . Date('Y-m-d_h-m-s') . '.pdf'); $pdf->__destruct(); Modified: trunk/MRPReport.php =================================================================== --- trunk/MRPReport.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/MRPReport.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -484,7 +484,7 @@ PrintHeader($pdf,$YPos,$PageNumber,$Page_Height,$Top_Margin,$Left_Margin,$Page_Width, $Right_Margin); } - $pdf->OutputD($_SESSION['DatabaseName'] . '_MRPReport_' . date('Y-m-d').'.pdf');//UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_MRPReport_' . date('Y-m-d_h-m-s').'.pdf');//UldisN $pdf->__destruct(); //UldisN } else { /*The option to print PDF was not hit so display form */ Modified: trunk/MRPReschedules.php =================================================================== --- trunk/MRPReschedules.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/MRPReschedules.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -114,7 +114,7 @@ $Right_Margin); } - $pdf->OutputD($_SESSION['DatabaseName'] . '_MRPReschedules_' . date('Y-m-d').'.pdf');//UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_MRPReschedules_' . date('Y-m-d_h-m-s').'.pdf');//UldisN $pdf->__destruct(); //UldisN } else { /*The option to print PDF was not hit so display form */ Modified: trunk/MRPShortages.php =================================================================== --- trunk/MRPShortages.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/MRPShortages.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -244,9 +244,9 @@ $pdf->addTextWrap(510,$YPos,60,$FontSize,$DisplayTotalVal, 'right'); if ($_POST['ReportType'] == 'Shortage'){ - $pdf->OutputD($_SESSION['DatabaseName'] . '_MRPShortages_' . date('Y-m-d').'.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_MRPShortages_' . date('Y-m-d_h-m-s').'.pdf'); }else{ - $pdf->OutputD($_SESSION['DatabaseName'] . '_MRPExcess_' . date('Y-m-d').'.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_MRPExcess_' . date('Y-m-d_h-m-s').'.pdf'); } $pdf->__destruct(); } else { /*The option to print PDF was not hit so display form */ Modified: trunk/OutstandingGRNs.php =================================================================== --- trunk/OutstandingGRNs.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/OutstandingGRNs.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -146,7 +146,7 @@ $pdf->line($Left_Margin, $YPos+$line_height-2,$Page_Width-$Right_Margin, $YPos+$line_height-2); $YPos -=(2*$line_height); - $pdf->OutputD($_SESSION['DatabaseName'] . '_OSGRNsValuation_' . date('Y-m-d').'.pdf');//UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_OSGRNsValuation_' . date('Y-m-d_h-m-s').'.pdf');//UldisN $pdf->__destruct(); //UldisN } else { /*The option to print PDF was not hit */ Modified: trunk/PDFBankingSummary.php =================================================================== --- trunk/PDFBankingSummary.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFBankingSummary.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -164,7 +164,7 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,locale_money_format($TotalBanked,$Currency), 'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+65,$YPos,300,$FontSize,_('TOTAL') . ' ' . $Currency . ' ' . _('BANKED'), 'left'); - $pdf->OutputD($_SESSION['DatabaseName'] . '_BankingSummary_' . date('Y-m-d').'.pdf');//UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_BankingSummary_' . date('Y-m-d_h-m-s').'.pdf');//UldisN $pdf->__destruct(); } Modified: trunk/PDFChequeListing.php =================================================================== --- trunk/PDFChequeListing.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFChequeListing.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -173,8 +173,7 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,locale_money_format($TotalCheques,$Currency), 'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+65,$YPos,300,$FontSize,_('TOTAL') . ' ' . $Currency . ' ' . _('CHEQUES'), 'left'); -$ReportFileName = $_SESSION['DatabaseName'] . '_ChequeListing_' . date('Y-m-d').'.pdf'; -$pdf->OutputD($ReportFileName);//UldisN +$pdf->OutputF($_SESSION['DatabaseName'] . '_ChequeListing_' . date('Y-m-d_h-m-s').'.pdf');//UldisN $pdf->__destruct(); //UldisN if ($_POST['Email']=='Yes'){ if (file_exists($_SESSION['reports_dir'] . '/'.$ReportFileName)){ Modified: trunk/PDFCustTransListing.php =================================================================== --- trunk/PDFCustTransListing.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFCustTransListing.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -126,8 +126,7 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,locale_money_format(-$TotalCheques,$_SESSION['CompanyRecord']['currencydefault']), 'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+265,$YPos,300,$FontSize,_('Total') . ' ' . _('Transactions'), 'left'); -$ReportFileName = $_SESSION['DatabaseName'] . '_CustTransListing_' . date('Y-m-d').'.pdf'; -$pdf->OutputD($ReportFileName); +$pdf->OutputF($_SESSION['DatabaseName'] . '_CustTransListing_' . date('Y-m-d_h-m-s').'.pdf'); $pdf->__destruct(); ?> \ No newline at end of file Modified: trunk/PDFCustomerList.php =================================================================== --- trunk/PDFCustomerList.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFCustomerList.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -358,7 +358,7 @@ } /*end if $PrintThisCustomer == true */ } /*end while loop */ - $pdf->OutputD($_SESSION['DatabaseName'] . '_CustomerList_' . date('Y-m-d').'.pdf');//UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_CustomerList_' . date('Y-m-d_h-m-s').'.pdf');//UldisN $pdf->__destruct(); exit; Modified: trunk/PDFDIFOT.php =================================================================== --- trunk/PDFDIFOT.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFDIFOT.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -294,9 +294,7 @@ $YPos-=$line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,200,$FontSize,_('DIFOT') . ' ' . locale_number_format((1-($TotalDiffs/$myrow[0])) * 100,2) . '%', 'left'); - -$ReportFileName = $_SESSION['DatabaseName'] . '_DIFOT_' . date('Y-m-d').'.pdf'; -$pdf->OutputD($ReportFileName);//UldisN +$pdf->OutputF($_SESSION['DatabaseName'] . '_DIFOT_' . date('Y-m-d_h-m-s').'.pdf');//UldisN $pdf->__destruct(); //UldisN if ($_POST['Email']=='Yes'){ Modified: trunk/PDFDeliveryDifferences.php =================================================================== --- trunk/PDFDeliveryDifferences.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFDeliveryDifferences.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -259,21 +259,8 @@ $YPos-=$line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,200,$FontSize,_('DIFOT') . ' ' . locale_number_format((1-($TotalDiffs/$myrow[0])) * 100,2) . '%', 'left'); -/* UldisN -$pdfcode = $pdf->output(); -$len = mb_strlen($pdfcode); -header('Content-type: application/pdf'); -header('Content-Length: ' . $len); -header('Content-Disposition: inline; filename=DeliveryDifferences.pdf'); -header('Expires: 0'); -header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); -header('Pragma: public'); +$pdf->OutputF($_SESSION['DatabaseName'] . '_DeliveryDifferences_' . date('Y-m-d_h-m-s').'.pdf');//UldisN -$pdf->stream(); -*/ -$ReportFileName = $_SESSION['DatabaseName'] . '_DeliveryDifferences_' . date('Y-m-d').'.pdf'; -$pdf->OutputD($ReportFileName);//UldisN - if ($_POST['Email']=='Yes'){ if (file_exists($_SESSION['reports_dir'] . '/'.$ReportFileName)){ unlink($_SESSION['reports_dir'] . '/'.$ReportFileName); Modified: trunk/PDFGLJournal.php =================================================================== --- trunk/PDFGLJournal.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFGLJournal.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -105,7 +105,7 @@ include('includes/footer.inc'); exit; } else { - $pdf->OutputD($_SESSION['DatabaseName'] . '_GRN_' . date('Y-m-d').'.pdf');//UldisN - $pdf->__destruct(); //UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_GLJournal_' . date('Y-m-d_h-m-s').'.pdf');//UldisN + $pdf->__destruct(); //UldisN } ?> \ No newline at end of file Modified: trunk/PDFGrn.php =================================================================== --- trunk/PDFGrn.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFGrn.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -147,7 +147,7 @@ include('includes/footer.inc'); exit; } else { - $pdf->OutputD($_SESSION['DatabaseName'] . '_GRN_' . date('Y-m-d').'.pdf');//UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_GRN_' . date('Y-m-d_h-m-s').'.pdf');//UldisN $pdf->__destruct(); //UldisN } ?> \ No newline at end of file Modified: trunk/PDFLowGP.php =================================================================== --- trunk/PDFLowGP.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFLowGP.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -110,7 +110,7 @@ $FontSize =10; $YPos -= (2*$line_height); - $pdf->OutputD($_SESSION['DatabaseName'] . '_LowGPSales_' . date('Y-m-d') . '.pdf');//UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_LowGPSales_' . date('Y-m-d_h-m-s') . '.pdf');//UldisN $pdf->__destruct(); //UldisN } else { /*The option to print PDF was not hit */ Modified: trunk/PDFOrderStatus.php =================================================================== --- trunk/PDFOrderStatus.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFOrderStatus.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -337,6 +337,6 @@ $OrderNo=0; } /*end of new page header */ } /* end of while there are delivery differences to print */ -$pdf->OutputD($_SESSION['DatabaseName'] . '_OrderStatus_' . date('Y-m-d') . '.pdf');//UldisN +$pdf->OutputF($_SESSION['DatabaseName'] . '_OrderStatus_' . date('Y-m-d_h-m-s') . '.pdf');//UldisN $pdf->__destruct(); //UldisN ?> \ No newline at end of file Modified: trunk/PDFOrdersInvoiced.php =================================================================== --- trunk/PDFOrdersInvoiced.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFOrdersInvoiced.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -440,6 +440,6 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin+360,$YPos,80,$FontSize,locale_money_format($AccumTotalInv,$_SESSION['CompanyRecord']['currencydefault']), 'right'); $YPos -= ($line_height); -$pdf->OutputD($_SESSION['DatabaseName'] . '_OrdersInvoiced_' . date('Y-m-d') . '.pdf');//UldisN +$pdf->OutputF($_SESSION['DatabaseName'] . '_OrdersInvoiced_' . date('Y-m-d_h-m-s') . '.pdf');//UldisN $pdf->__destruct(); //UldisN ?> \ No newline at end of file Modified: trunk/PDFPeriodStockTransListing.php =================================================================== --- trunk/PDFPeriodStockTransListing.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFPeriodStockTransListing.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -195,8 +195,7 @@ $YPos-=$line_height; -$ReportFileName = $_SESSION['DatabaseName'] . '_StockTransListing_' . date('Y-m-d').'.pdf'; -$pdf->OutputD($ReportFileName); +$pdf->OutputF($_SESSION['DatabaseName'] . '_StockTransListing_' . date('Y-m-d_h-m-s').'.pdf'); $pdf->__destruct(); ?> \ No newline at end of file Modified: trunk/PDFPickingList.php =================================================================== --- trunk/PDFPickingList.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFPickingList.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -328,7 +328,7 @@ include('includes/footer.inc'); exit; } else { - $pdf->OutputD($_SESSION['DatabaseName'] . '_PickingLists_' . date('Y-m-d') . '.pdf');//UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_PickingLists_' . date('Y-m-d_h-m-s') . '.pdf');//UldisN $pdf->__destruct(); //UldisN } ?> \ No newline at end of file Modified: trunk/PDFPriceList.php =================================================================== --- trunk/PDFPriceList.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFPriceList.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -235,10 +235,8 @@ $FontSize =10; /*Print out the category totals */ - - $FileName=$_SESSION['DatabaseName']. '_' . _('Price_List') . '_' . date('Y-m-d').'.pdf'; ob_clean(); - $pdf->OutputD($FileName); + $pdf->OutputF($_SESSION['DatabaseName']. '_' . _('Price_List') . '_' . date('Y-m-d_h-m-s').'.pdf'); $pdf->__destruct(); } else { /*The option to print PDF was not hit */ Modified: trunk/PDFPrintLabel.php =================================================================== --- trunk/PDFPrintLabel.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFPrintLabel.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -260,9 +260,8 @@ } //loop through labels selected to print - $FileName=$_SESSION['DatabaseName']. '_' . _('Price_Labels') . '_' . date('Y-m-d').'.pdf'; ob_clean(); - $pdf->OutputI($FileName); + $pdf->OutputF($_SESSION['DatabaseName']. '_' . _('Price_Labels') . '_' . date('Y-m-d_h-m-s').'.pdf'); $pdf->__destruct(); } else { /*The option to print PDF was not hit */ Modified: trunk/PDFQuotation.php =================================================================== --- trunk/PDFQuotation.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFQuotation.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -246,7 +246,7 @@ include('includes/footer.inc'); exit; } else { - $pdf->OutputI($_SESSION['DatabaseName'] . '_Quotation_' . date('Y-m-d') . '.pdf');//UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_Quotation_' . date('Y-m-d_h-m-s') . '.pdf');//UldisN $pdf->__destruct(); //UldisN } ?> \ No newline at end of file Modified: trunk/PDFQuotationPortrait.php =================================================================== --- trunk/PDFQuotationPortrait.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFQuotationPortrait.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -256,7 +256,7 @@ //echo 'here'; $pdf->Output('PDFQuotation.pdf', 'I'); */ - $pdf->OutputI($_SESSION['DatabaseName'] . '_Quotation_' . date('Y-m-d') . '.pdf');//UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_Quotation_' . date('Y-m-d_h-m-s') . '.pdf');//UldisN $pdf->__destruct(); //UldisN } ?> \ No newline at end of file Modified: trunk/PDFReceipt.php =================================================================== --- trunk/PDFReceipt.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFReceipt.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -115,5 +115,5 @@ $LeftOvers = $pdf->addTextWrap(50,$YPos,300,$FontSize,'______________________________________________________________________________'); -$pdf->Output('Receipt-'.$_GET['ReceiptNumber'], 'I'); +$pdf->OutputF($_SESSION['DatabaseName']. '_' . _('Receipt') . '-' . $_GET['ReceiptNumber'] . '.pdf'); ?> \ No newline at end of file Modified: trunk/PDFRemittanceAdvice.php =================================================================== --- trunk/PDFRemittanceAdvice.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFRemittanceAdvice.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -120,9 +120,7 @@ } /* end while there are supplier payments to retrieve allocations for */ - - $FileName=$_SESSION['DatabaseName']. '_' . _('Remittance_Advices') . '_' . date('Y-m-d').'.pdf'; - $pdf->OutputD($FileName); + $pdf->OutputF($_SESSION['DatabaseName']. '_' . _('Remittance_Advices') . '_' . date('Y-m-d_h-m-s').'.pdf'); $pdf->__destruct(); } else { /*The option to print PDF was not hit */ Modified: trunk/PDFStockCheckComparison.php =================================================================== --- trunk/PDFStockCheckComparison.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFStockCheckComparison.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -304,7 +304,7 @@ $YPos -= (2*$line_height); - $pdf->OutputD($_SESSION['DatabaseName'] . '_StockComparison_' . date('Y-m-d') . '.pdf');//UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_StockComparison_' . date('Y-m-d_h-m-s') . '.pdf');//UldisN $pdf->__destruct(); //UldisN if ($_POST['ReportOrClose']=='ReportAndClose'){ Modified: trunk/PDFStockLocTransfer.php =================================================================== --- trunk/PDFStockLocTransfer.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFStockLocTransfer.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -82,6 +82,6 @@ } while ($TransferRow = DB_fetch_array($result)); -$pdf->OutputD($_SESSION['DatabaseName'] . '_StockLocTrfShipment_' . date('Y-m-d') . '.pdf');//UldisN +$pdf->OutputF($_SESSION['DatabaseName'] . '_StockLocTrfShipment_' . date('Y-m-d_h-m-s') . '.pdf');//UldisN $pdf->__destruct(); //UldisN ?> \ No newline at end of file Modified: trunk/PDFStockNegatives.php =================================================================== --- trunk/PDFStockNegatives.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFStockNegatives.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -63,7 +63,7 @@ } while ($NegativesRow = DB_fetch_array($result)); if (DB_num_rows($result)>0){ - $pdf->OutputD($_SESSION['DatabaseName'] . '_NegativeStocks_' . date('Y-m-d') . '.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_NegativeStocks_' . date('Y-m-d_h-m-s') . '.pdf'); $pdf->__destruct(); } else { $title = _('Negative Stock Listing Problem'); Modified: trunk/PDFStockTransfer_departments.php =================================================================== --- trunk/PDFStockTransfer_departments.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFStockTransfer_departments.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -31,7 +31,6 @@ } } - include('includes/PDFStarter.php'); $pdf->addInfo('Title', _('Stock Transfer Form') ); $FontSize=10; @@ -95,6 +94,6 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos-120,300-$Left_Margin,$FontSize, _('Signed for ').$From.'______________________'); $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos-160,300-$Left_Margin,$FontSize, _('Signed for ').$To.'______________________'); -$pdf->OutputD($_SESSION['DatabaseName'] . '_StockTransfer_' . date('Y-m-d') . '.pdf'); +$pdf->OutputF($_SESSION['DatabaseName'] . '_StockTransfer_' . date('Y-m-d_h-m-s') . '.pdf'); $pdf->__destruct(); ?> \ No newline at end of file Modified: trunk/PDFSuppTransListing.php =================================================================== --- trunk/PDFSuppTransListing.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PDFSuppTransListing.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -128,8 +128,7 @@ $YPos-=$line_height; -$ReportFileName = $_SESSION['DatabaseName'] . '_SuppTransListing_' . date('Y-m-d').'.pdf'; -$pdf->OutputD($ReportFileName);//UldisN +$pdf->OutputF($_SESSION['DatabaseName'] . '_SuppTransListing_' . date('Y-m-d_h-m-s').'.pdf');//UldisN $pdf->__destruct(); //UldisN ?> \ No newline at end of file Modified: trunk/PO_PDFPurchOrder.php =================================================================== --- trunk/PO_PDFPurchOrder.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PO_PDFPurchOrder.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -303,15 +303,9 @@ //failed var to allow us to print if the email fails. $failed = false; if ($MakePDFThenDisplayIt){ - $pdf->OutputD($_SESSION['DatabaseName'] . '_PurchaseOrder_' . date('Y-m-d') . '.pdf');//UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_PurchaseOrder_' . date('Y-m-d_h-m-s') . '.pdf');//UldisN $pdf->__destruct(); //UldisN } else { /* must be MakingPDF to email it */ - /* UldisN - $pdfcode = $pdf->output(); - $fp = fopen( $_SESSION['reports_dir'] . '/PurchOrder.pdf','wb'); - fwrite ($fp, $pdfcode); - fclose ($fp); - */ $PdfFileName = $_SESSION['DatabaseName'] . '_PurchaseOrder_' . date('Y-m-d') . '.pdf'; $ReportsDirName = $_SESSION['reports_dir']; $pdf->Output($ReportsDirName . '/' . $PdfFileName,'F');//UldisN Modified: trunk/PcReportTab.php =================================================================== --- trunk/PcReportTab.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PcReportTab.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -233,7 +233,7 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin+240,$YPos,70,$FontSize,$Tabs['currency']); $pdf->line($Page_Width-$Right_Margin, $YPos+$line_height,$Left_Margin, $YPos+$line_height); - $pdf->OutputD($_SESSION['DatabaseName'] . '_PcReport_' . date('Y-m-d').'.pdf');//UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_PcReport_' . date('Y-m-d_h-m-s').'.pdf');//UldisN $pdf->__destruct(); //UldisN exit; Modified: trunk/PrintCheque.php =================================================================== --- trunk/PrintCheque.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PrintCheque.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -32,7 +32,6 @@ $LeftOvers = $pdf->addTextWrap($Page_Width-75,$YPos,100,$FontSize,$_GET['ChequeNum'], 'left'); $YPos -= 3*$line_height; - $LeftOvers = $pdf->addTextWrap(75,$YPos,475,$FontSize,$AmountWords, 'left'); $YPos -= 1*$line_height; $LeftOvers = $pdf->addTextWrap($Page_Width-225,$YPos,100,$FontSize,$_SESSION['PaymentDetail']->DatePaid, 'left'); @@ -55,9 +54,6 @@ $LeftOvers = $pdf->addTextWrap(75,$YPos,300,$FontSize, $AmountWords, 'left'); $LeftOvers = $pdf->addTextWrap(375,$YPos,100,$FontSize, locale_money_format($_SESSION['PaymentDetail']->Amount,$_SESSION['PaymentDetail']->Currency), 'right'); - - - // remittance advice 1 $YPos -= 14*$line_height; $LeftOvers = $pdf->addTextWrap(0,$YPos,$Page_Width,$FontSize,_('Remittance Advice'), 'center'); @@ -85,26 +81,7 @@ $LeftOvers = $pdf->addTextWrap(100,$YPos,100,$FontSize,$_SESSION['PaymentDetail']->SupplierID, 'left'); $LeftOvers = $pdf->addTextWrap(250,$YPos,75,$FontSize,$_GET['ChequeNum'], 'left'); $LeftOvers = $pdf->addTextWrap(350,$YPos,75,$FontSize,locale_money_format(round($_SESSION['PaymentDetail']->Amount,$_SESSION['Currencies'][$_SESSION['PaymentDetail']->Currency]['DecimalPlaces']),$_SESSION['PaymentDetail']->Currency), 'left'); -/* UldisN -$pdfcode = $pdf->output(); -$len = mb_strlen($pdfcode); -if ($len<=1){ - $title = _('Print Check Error'); - include('includes/header.inc'); - prnMsg(_('Could not print the cheque'),'warn'); - include('includes/footer.inc'); - exit; -} else { - header('Content-type: application/pdf'); - header('Content-Length: ' . $len); - header('Content-Disposition: inline; filename=Cheque.pdf'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - $pdf->Output('PrintCheque.pdf', 'I'); -} -*/ -$pdf->OutputD($_SESSION['DatabaseName'] . '_Cheque_' . date('Y-m-d') . '_ChequeNum_' . $_GET['ChequeNum'] . '.pdf');//UldisN +$pdf->OutputF($_SESSION['DatabaseName'] . '_Cheque_' . date('Y-m-d_h-m-s') . '_ChequeNum_' . $_GET['ChequeNum'] . '.pdf');//UldisN $pdf->__destruct(); //UldisN ?> Modified: trunk/PrintCustOrder.php =================================================================== --- trunk/PrintCustOrder.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PrintCustOrder.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -186,7 +186,7 @@ } //end while there are line items to print out - $pdf->OutputD($_SESSION['DatabaseName'] . '_Customer_Order_' . $_GET['TransNo'] . '_' . Date('Y-m-d') .'.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_Customer_Order_' . $_GET['TransNo'] . '_' . Date('Y-m-d_h-m-s') .'.pdf'); $pdf-> __destruct(); $sql = "UPDATE salesorders SET printedpackingslip=1, datepackingslipprinted='" . Date('Y-m-d') . "' WHERE salesorders.orderno='" .$_GET['TransNo'] . "'"; Modified: trunk/PrintCustOrder_generic.php =================================================================== --- trunk/PrintCustOrder_generic.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PrintCustOrder_generic.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -181,7 +181,7 @@ include('includes/footer.inc'); exit; } else { - $pdf->OutputD($_SESSION['DatabaseName'] . '_PackingSlip_' . date('Y-m-d') . '.pdf');//UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_PackingSlip_' . date('Y-m-d_h-m-s') . '.pdf');//UldisN $pdf->__destruct(); //UldisN $sql = "UPDATE salesorders SET printedpackingslip=1, datepackingslipprinted='" . Date('Y-m-d') . "' WHERE salesorders.orderno='" .$_GET['TransNo'] . "'"; $result = DB_query($sql,$db); Modified: trunk/PrintCustStatements.php =================================================================== --- trunk/PrintCustStatements.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PrintCustStatements.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -394,7 +394,7 @@ if (isset($pdf)){ - $pdf->OutputI($_SESSION['DatabaseName'] . '_CustStatements_' . date('Y-m-d') . '.pdf');//UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_CustStatements_' . date('Y-m-d_h-m-s') . '.pdf');//UldisN $pdf->__destruct(); //UldisN } else { Modified: trunk/PrintCustTrans.php =================================================================== --- trunk/PrintCustTrans.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PrintCustTrans.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -388,7 +388,7 @@ include ('includes/footer.inc'); exit; } else { - $pdf->OutputD( $_SESSION['DatabaseName'] . '_' . $InvOrCredit . '_' . $_GET['FromTransNo'] . '.pdf'); + $pdf->OutputF( $_SESSION['DatabaseName'] . '_' . $InvOrCredit . '_' . $_GET['FromTransNo'] . '.pdf'); } $pdf->__destruct(); } else { /*The option to print PDF was not hit */ Modified: trunk/PrintCustTransPortrait.php =================================================================== --- trunk/PrintCustTransPortrait.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PrintCustTransPortrait.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -512,7 +512,7 @@ exit; } else { //its not an email just print the invoice to PDF - $pdf->OutputD($_SESSION['DatabaseName'] . '_' . $InvOrCredit . '_' . $FromTransNo . '.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_' . $InvOrCredit . '_' . $FromTransNo . '.pdf'); } $pdf->__destruct(); Modified: trunk/PrintSalesOrder_generic.php =================================================================== --- trunk/PrintSalesOrder_generic.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/PrintSalesOrder_generic.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -183,7 +183,7 @@ include('includes/footer.inc'); exit; } else { - $pdf->OutputD($_SESSION['DatabaseName'] . '_SalesOrder_' . date('Y-m-d') . '.pdf');//UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_SalesOrder_' . date('Y-m-d_h-m-s') . '.pdf');//UldisN $pdf->__destruct(); //UldisN $sql = "UPDATE salesorders SET printedpackingslip=1, datepackingslipprinted='" . Date('Y-m-d') . "' WHERE salesorders.orderno='" .$_GET['TransNo'] . "'"; Modified: trunk/ReorderLevel.php =================================================================== --- trunk/ReorderLevel.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/ReorderLevel.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -179,7 +179,7 @@ include('includes/footer.inc'); exit; } else { - $pdf->OutputD($_SESSION['DatabaseName'] . '_ReOrderLevel_' . date('Y-m-d') . '.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_ReOrderLevel_' . date('Y-m-d_h-m-s') . '.pdf'); $pdf->__destruct(); } Modified: trunk/SalesAnalysis_UserDefined.php =================================================================== --- trunk/SalesAnalysis_UserDefined.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/SalesAnalysis_UserDefined.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -17,7 +17,7 @@ include ('includes/PDFSalesAnalysis.inc'); if ($Counter >0) { - $pdf->OutputD('SalesAnalysis_' . date('Y-m-d') . '.pdf'); + $pdf->OutputF('SalesAnalysis_' . date('Y-m-d_h-m-s') . '.pdf'); $pdf->__destruct(); } else { $pdf->__destruct(); Modified: trunk/StockCheck.php =================================================================== --- trunk/StockCheck.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/StockCheck.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -250,7 +250,7 @@ } /*end STOCK SHEETS while loop */ - $pdf->OutputD($_SESSION['DatabaseName'] . '_Stock_Count_Sheets_' . Date('Y-m-d') .'.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_Stock_Count_Sheets_' . Date('Y-m-d_h-m-s') .'.pdf'); } else { /*The option to print PDF was not hit */ Modified: trunk/StockDispatch.php =================================================================== --- trunk/StockDispatch.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/StockDispatch.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -272,7 +272,7 @@ } /*Print out the grand totals */ - $pdf->OutputD($_SESSION['DatabaseName'] . '_Stock_Transfer_Dispatch_' . Date('Y-m-d') . '.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_Stock_Transfer_Dispatch_' . Date('Y-m-d_h-m-s') . '.pdf'); $pdf->__destruct(); } else { /*The option to print PDF was not hit so display form */ Modified: trunk/SuppPaymentRun.php =================================================================== --- trunk/SuppPaymentRun.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/SuppPaymentRun.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -230,7 +230,7 @@ } - $pdf->OutputD($_SESSION['DatabaseName'] . '_Payment_Run_' . Date('Y-m-d') . '.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_Payment_Run_' . Date('Y-m-d_h-m-s') . '.pdf'); $pdf->__destruct(); } else { /*The option to print PDF was not hit */ Modified: trunk/SuppPriceList.php =================================================================== --- trunk/SuppPriceList.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/SuppPriceList.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -199,7 +199,7 @@ $Right_Margin,$SupplierName,$Categoryname,$CurrCode,$DatePrice); } - $pdf->OutputD( $_SESSION['DatabaseName'] . '_SupplierPriceList_' . Date('Y-m-d') . '.pdf'); + $pdf->OutputF( $_SESSION['DatabaseName'] . '_SupplierPriceList_' . Date('Y-m-d_h-m-s') . '.pdf'); } else { /*The option to print PDF was not hit so display form */ Modified: trunk/SupplierBalsAtPeriodEnd.php =================================================================== --- trunk/SupplierBalsAtPeriodEnd.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/SupplierBalsAtPeriodEnd.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -108,7 +108,7 @@ $LeftOvers = $pdf->addTextWrap(220,$YPos,60,$FontSize,$DisplayTotBalance,'right'); - $pdf->OutputD($_SESSION['DatabaseName'] . '_Supplier_Balances_at_Period_End_' . Date('Y-m-d') . '.pdf'); + $pdf->OutputF($_SESSION['DatabaseName'] . '_Supplier_Balances_at_Period_End_' . Date('Y-m-d_h-m-s') . '.pdf'); $pdf->__destruct(); } else { /*The option to print PDF was not hit */ Modified: trunk/Tax.php =================================================================== --- trunk/Tax.php 2012-08-21 13:28:34 UTC (rev 9543) +++ trunk/Tax.php 2012-08-21 16:40:47 UTC (rev 9544) @@ -278,7 +278,7 @@ include('includes/footer.inc'); exit; } else { - $pdf->OutputD($_SESSION['DatabaseName'] . '_Tax_Report_' . Date('Y-m-d')); + $pdf->OutputF($_SESSION['DatabaseName'] . '_Tax_Report_' . Date('Y-m-d_h-m-s')); } $pdf->__destruct(); } else { /*The option to print PDF was not hit */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-21 18:03:57
|
Revision: 9545 http://weberp.svn.sourceforge.net/weberp/?rev=9545&view=rev Author: tim_schofield Date: 2012-08-21 18:03:51 +0000 (Tue, 21 Aug 2012) Log Message: ----------- New option to upload a file Modified Paths: -------------- trunk/Z_UploadForm.php trunk/includes/MainMenuLinksArray.php Added Paths: ----------- trunk/css/silverwolf/images/file_upload.png Modified: trunk/Z_UploadForm.php =================================================================== --- trunk/Z_UploadForm.php 2012-08-21 16:40:47 UTC (rev 9544) +++ trunk/Z_UploadForm.php 2012-08-21 18:03:51 UTC (rev 9545) @@ -7,21 +7,24 @@ include('includes/header.inc'); -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo '<form enctype="multipart/form-data" onsubmit="return SubmitForm(this, \'\')" action="Z_UploadResult.php" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="MAX_FILE_SIZE" value="1000000" />'; -echo '<table class="selection"> - <tr> - <td>' . _('Send this file') . ': </td> - <td><input name="userfile" type="file" /></td> - </tr> - <tr> - <td colspan="2"><div class="centre"><button type="submit">' . _('Send File') . '</button></div></td> - </tr> - </table></form>'; +echo '<table class="selection">'; +echo '<tr> + <th colspan="2" class="header"> + <img src="'.$rootpath.'/css/'.$theme.'/images/file_upload.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.' + </th> + </tr>'; +echo '<tr> + <td>' . _('Send this file') . ': </td> + <td><input name="userfile" type="file" /></td> + </tr> + </table> + <div class="centre"><button type="submit">' . _('Send File') . '</button></div> + </form>'; + include('includes/footer.inc'); ?> \ No newline at end of file Added: trunk/css/silverwolf/images/file_upload.png =================================================================== --- trunk/css/silverwolf/images/file_upload.png (rev 0) +++ trunk/css/silverwolf/images/file_upload.png 2012-08-21 18:03:51 UTC (rev 9545) @@ -0,0 +1,13 @@ +\x89PNG + + |
From: <tim...@us...> - 2012-08-22 21:13:23
|
Revision: 9546 http://weberp.svn.sourceforge.net/weberp/?rev=9546&view=rev Author: tim_schofield Date: 2012-08-22 21:13:13 +0000 (Wed, 22 Aug 2012) Log Message: ----------- Replace <a tags with InternalLink() function Modified Paths: -------------- trunk/SuppLoginSetup.php trunk/SuppPaymentRun.php trunk/SuppPriceList.php trunk/SuppTransGLAnalysis.php trunk/SupplierCredit.php trunk/SupplierInquiry.php trunk/SupplierInvoice.php trunk/SupplierTenderCreate.php trunk/SupplierTenders.php trunk/SupplierTypes.php trunk/Suppliers.php trunk/Tax.php trunk/TaxAuthorities.php trunk/TaxAuthorityRates.php trunk/TaxCategories.php trunk/TaxGroups.php trunk/TaxProvinces.php trunk/UnitsOfMeasure.php trunk/UpgradeDatabase.php trunk/WOSerialNos.php trunk/WWW_Access.php trunk/WWW_Users.php trunk/WhereUsedInquiry.php trunk/WorkCentres.php trunk/WorkOrderCosting.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/WorkOrderReceive.php trunk/WorkOrderStatus.php trunk/Z_CheckDebtorsControl.php trunk/Z_CheckGLTransBalance.php trunk/Z_CreateCompany.php trunk/Z_CreateCompanyTemplateFile.php trunk/Z_DataExport.php trunk/Z_ImportChartOfAccounts.php trunk/Z_ImportFixedAssets.php trunk/Z_ImportGLAccountGroups.php trunk/Z_ImportGLAccountSections.php trunk/Z_ImportPartCodes.php trunk/Z_ImportStocks.php trunk/Z_MakeNewCompany.php trunk/Z_poAddLanguage.php trunk/Z_poAdmin.php trunk/Z_poEditLangHeader.php trunk/Z_poEditLangModule.php trunk/Z_poEditLangRemaining.php trunk/Z_poRebuildDefault.php Modified: trunk/SuppLoginSetup.php =================================================================== --- trunk/SuppLoginSetup.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/SuppLoginSetup.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -18,7 +18,7 @@ _('Petty Cash'), _('Setup')); -echo '<a href="' . $rootpath . '/SelectSupplier.php?">' . _('Back to Suppliers') . '</a><br />'; +echo InternalLink($rootpath, 'SelectSupplier.php', _('Back to Suppliers')) . '<br />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Supplier') . '" alt="" />' . ' ' . _('Supplier') . ' : ' . $_SESSION['SupplierID'] . _(' has been selected') . '</p><br />'; @@ -250,8 +250,8 @@ <td>'.$myrow['pagesize'].'</td> <td>'.$myrow['theme'].'</td> <td>'.$myrow['language'].'</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedUser='.$myrow[0].'">' . _('Edit') . '</a></td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedUser='.$myrow[0].'&delete=1">' . _('Delete') . '</a></td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedUser='.$myrow[0], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedUser='.$myrow[0].'&delete=1', _('Delete')) . '</td> </tr>'; } //END WHILE LIST LOOP @@ -260,7 +260,7 @@ if (isset($SelectedUser)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'">' . _('Review Existing Users') . '</a></div><br />'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Review Existing Users')) . '</div><br />'; } echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; Modified: trunk/SuppPaymentRun.php =================================================================== --- trunk/SuppPaymentRun.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/SuppPaymentRun.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -110,7 +110,7 @@ $title = _('Payment Run - Problem Report'); include('includes/header.inc'); prnMsg(_('The details of supplier invoices due could not be retrieved because') . ' - ' . DB_error_msg($db),'error'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . _('The SQL that failed was') . ' ' . $sql; } @@ -121,7 +121,7 @@ $title = _('Payment Run -Problem Report'); include('includes/header.inc'); prnMsg(_('There are no outstanding supplier invoices to pay'),'info'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } @@ -185,7 +185,7 @@ $title = _('Payment Processing - Problem Report') . '.... '; include('includes/header.inc'); prnMsg(_('None of the payments will be processed since updates to the transaction records for') . ' ' .$SupplierName . ' ' . _('could not be processed because') . ' - ' . DB_error_msg($db),'error'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . _('The SQL that failed was') . $SQL; } @@ -215,7 +215,7 @@ $title = _('Payment Processing - Problem Report') . '.... '; include('includes/header.inc'); prnMsg(_('None of the payments will be processed. Unfortunately, there was a problem committing the changes to the database because') . ' - ' . DB_error_msg($db),'error'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ prnMsg(_('The SQL that failed was') . '<br />' . $SQL,'error'); } @@ -310,7 +310,7 @@ echo '<tr><td>' . _('Pay From Account') . ':</td><td><select name="BankAccount">'; if (DB_num_rows($AccountsResults)==0){ - echo '</select></td></tr></table><br />' . _('Bank Accounts have not yet been defined. You must first') . ' <a href="' . $rootpath . '/BankAccounts.php">' . _('define the bank accounts') . '</a> ' . _('and general ledger accounts to be affected') . '.'; + echo '</select></td></tr></table><br />' . _('Bank Accounts have not yet been defined. You must first') . InternalLink($rootpath, 'BankAccounts.php', _('define the bank accounts')) . _('and general ledger accounts to be affected') . '.'; include('includes/footer.inc'); exit; } else { @@ -326,7 +326,9 @@ echo '</select></td></tr>'; } - echo '<tr><td>' . _('Payment Type') . ':</td><td><select name=PaytType>'; + echo '<tr> + <td>' . _('Payment Type') . ':</td> + <td><select name=PaytType>'; /* The array PaytTypes is set up in config.php for user modification Payment types can be modified by editing that file */ @@ -353,7 +355,7 @@ echo '<tr><td>' . _('Starting Reference no (eg chq no)') . ':</td> <td><input type="text" name="Ref" maxlength="11" size="12" value="' . $_POST['Ref'] . '" /></td></tr>'; - echo '</table><br /><div class="centre"><button type="submit" name="PrintPDF">' . _('Print PDF Only') . '</button> + echo '</table><div class="centre"><button type="submit" name="PrintPDF">' . _('Print PDF Only') . '</button> <button type="submit" name="PrintPDFAndProcess">' . _('Print and Process Payments') . '</button></div>'; include ('includes/footer.inc'); Modified: trunk/SuppPriceList.php =================================================================== --- trunk/SuppPriceList.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/SuppPriceList.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -138,7 +138,7 @@ $title = _('Price List') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The Price List could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />'.$sql; } Modified: trunk/SuppTransGLAnalysis.php =================================================================== --- trunk/SuppTransGLAnalysis.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/SuppTransGLAnalysis.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -21,7 +21,7 @@ if (!isset($_SESSION['SuppTrans'])){ prnMsg(_('To enter a supplier invoice or credit note the supplier must first be selected from the supplier selection screen') . ', ' . _('then the link to enter a supplier invoice or supplier credit note must be clicked on'),'info'); - echo '<br /><a href="' . $rootpath . '/SelectSupplier.php">' . _('Select A Supplier') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'SelectSupplier.php', _('Select A Supplier')); include('includes/footer.inc'); exit; /*It all stops here if there aint no supplier selected and transaction initiated ie $_SESSION['SuppTrans'] started off*/ Modified: trunk/SupplierCredit.php =================================================================== --- trunk/SupplierCredit.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/SupplierCredit.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -30,9 +30,6 @@ include('includes/header.inc'); include('includes/SQL_CommonFunctions.inc'); -//this is available from the menu on this page already -//echo '<a href='" . $rootpath . '/SelectSupplier.php'>" . _('Back to Suppliers') . '</a><br />'; - if (isset($_GET['New'])) { unset($_SESSION['SuppTrans']); } @@ -137,7 +134,7 @@ } elseif (!isset($_SESSION['SuppTrans'])){ prnMsg(_('To enter a supplier credit note the supplier must first be selected from the supplier selection screen'),'warn'); - echo '<br /><a href="' . $rootpath . '/SelectSupplier.php">' . _('Select A Supplier to Enter an Credit Note For') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'SelectSupplier.php', _('Select A Supplier to Enter an Credit Note For')); include('includes/footer.inc'); exit; @@ -214,8 +211,7 @@ echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/SuppCreditGRNs.php?">'; echo '<p>' . _('You should automatically be forwarded to the entry of credit notes against goods received page') . '. ' . _('If this does not happen') . ' (' . _('if the browser does not support META Refresh') . ') ' . - '<a href="' . $rootpath . '/SuppCreditGRNs.php?">' . - _('click here') . '</a> ' . _('to continue') . '.</p><br />'; + InternalLink($rootpath, 'SuppCreditGRNs.php', _('click here')) . _('to continue') . '.</p><br />'; include('includes/footer.inc'); exit; } @@ -226,8 +222,7 @@ echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/SuppShiptChgs.php?">'; echo '<p>' . _('You should automatically be forwarded to the entry of credit notes against shipments page') . '. ' . _('If this does not happen') . ' (' . _('if the browser does not support META Refresh') . ') ' . - '<a href="' . $rootpath . '/SuppShiptChgs.php?">' . - _('click here') . '</a> ' . _('to continue') . '.</p><br />'; + InternalLink($rootpath, 'SuppShiptChgs.php', _('click here')) . _('to continue') . '.</p><br />'; include('includes/footer.inc'); exit; } @@ -238,8 +233,7 @@ echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/SuppTransGLAnalysis.php?">'; echo '<p>' . _('You should automatically be forwarded to the entry of credit notes against the general ledger page') . '. ' . _('If this does not happen') . ' (' . _('if the browser does not support META Refresh') . ') ' . - '<a href="' . $rootpath . '/SuppTransGLAnalysis.php?">' . - _('click here') . '</a> ' . _('to continue') . '.</p><br />'; + InternalLink($rootpath, 'SuppTransGLAnalysis.php', _('click here')) . _('to continue') . '.</p><br />'; include('includes/footer.inc'); exit; } @@ -248,7 +242,7 @@ echo '<meta http-equiv="refresh" content="0; url=' . $rootpath . '/SuppContractChgs.php?">'; echo '<div class="centre">' . _('You should automatically be forwarded to the entry of supplier credit notes against contracts page') . '. ' . _('If this does not happen') . ' (' . _('if the browser does not support META Refresh'). ') ' . - '<a href="' . $rootpath . '/SuppContractChgs.php?">' . _('click here') . '</a> ' . _('to continue') . '.</div><br />'; + InternalLink($rootpath, 'SuppContractChgs.php', _('click here')) . _('to continue') . '.</div><br />'; exit; } if (isset($_POST['FixedAssets'])){ @@ -256,7 +250,7 @@ echo '<meta http-equiv="refresh" content="0; url=' . $rootpath . '/SuppFixedAssetChgs.php?">'; echo '<div class="centre">' . _('You should automatically be forwarded to the entry of invoices against fixed assets page') . '. ' . _('If this does not happen') . ' (' . _('if the browser does not support META Refresh'). ') ' . - '<a href="' . $rootpath . '/SuppFixedAssetChgs.php?">' . _('click here') . '</a> ' . _('to continue') . '.</div><br />'; + InternalLink($rootpath, 'SuppFixedAssetChgs.php', _('click here')) . _('to continue') . '.</div><br />'; exit; } /* everything below here only do if a Supplier is selected @@ -1345,8 +1339,7 @@ DB_Txn_Commit($db); prnMsg(_('Supplier credit note number') . ' ' . $CreditNoteNo . ' ' . _('has been processed'),'success'); - echo '<br /><div class="centre"><a href="' . $rootpath . '/SupplierCredit.php?&SupplierID=' .$_SESSION['SuppTrans']->SupplierID . '">' . - _('Enter another Credit Note for this Supplier') . '</a></div>'; + echo '<br /><div class="centre">' . InternalLink($rootpath, 'SupplierCredit.php?&SupplierID=' .$_SESSION['SuppTrans']->SupplierID, _('Enter another Credit Note for this Supplier')) . '</div>'; unset($_SESSION['SuppTrans']->GRNs); unset($_SESSION['SuppTrans']->Shipts); unset($_SESSION['SuppTrans']->GLCodes); Modified: trunk/SupplierInquiry.php =================================================================== --- trunk/SupplierInquiry.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/SupplierInquiry.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -8,14 +8,11 @@ $title = _('Supplier Inquiry'); include('includes/header.inc'); -// This is already linked from the menu -//echo '<a href='" . $rootpath . '/SelectSupplier.php'>" . _('Back to Suppliers') . '</a><br />'; - // always figure out the SQL required from the inputs available if(!isset($_GET['SupplierID']) AND !isset($_SESSION['SupplierID'])){ echo '<br />' . _('To display the enquiry a Supplier must first be selected from the Supplier selection screen') . - '<br /><div class="centre"><a href="'. $rootpath . '/SelectSupplier.php">' . _('Select a Supplier to Inquire On') . '</a></div>'; + '<br /><div class="centre">' . InternalLink($rootpath, 'SelectSupplier.php', _('Select a Supplier to Inquire On')) . '</div>'; exit; } else { if (isset($_GET['SupplierID'])){ @@ -256,8 +253,8 @@ <td class="number">' . locale_money_format($myrow['allocated'],$myrow['currcode']) . '</td> <td class="number">' . locale_money_format($myrow['totalamount']-$myrow['allocated'],$myrow['currcode']) . '</td> <td align="left">' . $myrow['transtext'] . '</td> - <td><a target="_blank" href="' . $rootpath . '/GLTransInquiry.php?TypeID=' . $myrow['type'] . '&TransNo=' . $myrow['transno'] .'">' . _('View GL Postings') . '</a></td> - <td><a href="' . $rootpath . '/PaymentAllocations.php?SuppID=' . $myrow['supplierno'] . '&InvID=' . $myrow['suppreference'] .'">' . _('View Payments') . '</a></td></tr>'; + <td>' . InternalLink($rootpath, 'GLTransInquiry.php?TypeID=' . $myrow['type'] . '&TransNo=' . $myrow['transno'], _('View GL Postings')) . '</td> + <td>' . InternalLink($rootpath, 'PaymentAllocations.php?SuppID=' . $myrow['supplierno'] . '&InvID=' . $myrow['suppreference'], _('View Payments')) . '</td></tr>'; } else { echo '<td>' . $myrow['transno'] . '</td> <td>' . $myrow['typename'] . '</td> @@ -274,15 +271,15 @@ $authresult=DB_query($authsql, $db); $authrow=DB_fetch_array($authresult); if ($authrow[0]==0) { - echo '<td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8').'?HoldType='.$myrow['type'].'&HoldTrans='.$myrow['transno'].'&HoldStatus='.$HoldValue.'&FromDate='.$_POST['TransAfterDate'].'">'.$HoldValue.'</a></td>'; + echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8').'?HoldType='.$myrow['type'].'&HoldTrans='.$myrow['transno'].'&HoldStatus='.$HoldValue.'&FromDate='.$_POST['TransAfterDate'], $HoldValue) . '</td>'; } else { if ($HoldValue==_('Release')) { echo '<td>'.$HoldValue.'</a></td>'; } else { - echo '<td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8').'?HoldType='.$myrow['type'].'&HoldTrans='.$myrow['transno'].'&HoldStatus='.$HoldValue.'&FromDate='.$_POST['TransAfterDate'].'">'.$HoldValue.'</a></td>'; + echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8').'?HoldType='.$myrow['type'].'&HoldTrans='.$myrow['transno'].'&HoldStatus='.$HoldValue.'&FromDate='.$_POST['TransAfterDate'], $HoldValue) . '</td>'; } } - echo '<td><a target="_blank" href="'.$rootpath.'/GLTransInquiry.php?TypeID='.$myrow['type'].'&TransNo='.$myrow['transno'].'">' ._('View GL Postings') . '</a></td></tr>'; + echo '<td>' . InternalLink($rootpath, 'GLTransInquiry.php?TypeID='.$myrow['type'].'&TransNo='.$myrow['transno'], _('View GL Postings')) . '</td></tr>'; } } else { @@ -290,53 +287,30 @@ /*The trans is settled so don't show option to hold */ - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td align=left>%s</td> - </td></tr>', - $myrow['transno'], - $myrow['typename'], - $myrow['suppreference'], - ConvertSQLDate($myrow['trandate']), - locale_money_format($myrow['totalamount'],$myrow['currcode']), - locale_money_format($myrow['allocated'],$myrow['currcode']), - locale_money_format($myrow['totalamount'] - $myrow['allocated'],$myrow['currcode']), - $myrow['transtext']); + echo '<td>' . $myrow['transno'] . '</td> + <td>' . $myrow['typename'] . '</td> + <td>' . $myrow['suppreference'] . '</td> + <td>' . ConvertSQLDate($myrow['trandate']) . '</td> + <td class="number">' . locale_money_format($myrow['totalamount'],$myrow['currcode']) . '</td> + <td class="number">' . locale_money_format($myrow['allocated'],$myrow['currcode']) . '</td> + <td class="number">' . locale_money_format($myrow['totalamount'] - $myrow['allocated'],$myrow['currcode']) . '</td> + <td align=left>' . $myrow['transtext'] . '</td> + </td> + </tr>'; } else { - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td align=left>%s</td> - <td><a href="%s?HoldType=%s&HoldTrans=%s&HoldStatus=%s&FromDate=%s">%s</a></td> - <td><a href="%s/PaymentAllocations.php?SuppID=%s&InvID=%s">' . _('View Payments') . '</a></tr>', - $myrow['transno'], - $myrow['typename'], - $myrow['suppreference'], - ConvertSQLDate($myrow['trandate']), - locale_money_format($myrow['totalamount'],$myrow['currcode']), - locale_money_format($myrow['allocated'],$myrow['currcode']), - locale_money_format($myrow['totalamount']-$myrow['allocated'],$myrow['currcode']), - $myrow['transtext'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), - $myrow['type'], - $myrow['transno'], - $HoldValue, - $_POST['TransAfterDate'], - $HoldValue, - $rootpath, - $myrow['supplierno'], - $myrow['suppreference']); + echo '<td>' . $myrow['transno'] . '</td> + <td>' . $myrow['typename'] . '</td> + <td>' . $myrow['suppreference'] . '</td> + <td>' . ConvertSQLDate($myrow['trandate']) . '</td> + <td class="number">' . locale_money_format($myrow['totalamount'],$myrow['currcode']) . '</td> + <td class="number">' . locale_money_format($myrow['allocated'],$myrow['currcode']) . '</td> + <td class="number">' . locale_money_format($myrow['totalamount']-$myrow['allocated'],$myrow['currcode']) . '</td> + <td align=left>' . $myrow['transtext'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?HoldType=' . $myrow['type'] . '&HoldTrans=' . $myrow['transno'] . '&HoldStatus=' . $HoldValue . '&FromDate=' . $_POST['TransAfterDate'], $HoldValue) . '</td> + <td>' . InternalLink($rootpath, 'PaymentAllocations.php?SuppID=' . $myrow['supplierno'] . '&InvID=' . $myrow['suppreference'], _('View Payments')) . '</td> + </tr>'; } } @@ -344,55 +318,30 @@ if ($_SESSION['CompanyRecord']['gllink_creditors'] == True){ - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td align=left>%s</td> - <td><a href="%s/SupplierAllocations.php?AllocTrans=%s">' . - _('View Allocations') . '</a></td> - <td><a target="_blank" href="%s/GLTransInquiry.php?TypeID=%s&TransNo=%s">' . - _('View GL Postings') . '</a></td> - </tr>', - $myrow['transno'], - $myrow['typename'], - $myrow['suppreference'], - ConvertSQLDate($myrow['trandate']), - locale_money_format($myrow['totalamount'],$myrow['currcode']), - locale_money_format($myrow['allocated'],$myrow['currcode']), - locale_money_format($myrow['totalamount']-$myrow['allocated'],$myrow['currcode']), - $myrow['transtext'], - $rootpath, - $myrow['id'], - $rootpath, - $myrow['type'], - $myrow['transno'] ); + echo '<td>' . $myrow['transno'] . '</td> + <td>' . $myrow['typename'] . '</td> + <td>' . $myrow['suppreference'] . '</td> + <td>' . ConvertSQLDate($myrow['trandate']) . '</td> + <td class="number">' . locale_money_format($myrow['totalamount'],$myrow['currcode']) . '</td> + <td class="number">' . locale_money_format($myrow['allocated'],$myrow['currcode']) . '</td> + <td class="number">' . locale_money_format($myrow['totalamount']-$myrow['allocated'],$myrow['currcode']) . '</td> + <td align=left>' . $myrow['transtext'] . '</td> + <td>' . InternalLink($rootpath, 'SupplierAllocations.php?AllocTrans=' . $myrow['id'], _('View Allocations')) . '</td> + <td>' . InternalLink($rootpath, 'GLTransInquiry.php?TypeID=' . $myrow['type'] . '&TransNo=' . $myrow['transno'], _('View GL Postings')) . '</td> + </tr>'; } else { /*Not linked to GL */ - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td align=left>%s</td> - <td><a href="%s/SupplierAllocations.php?AllocTrans=%s">' . _('View Allocations') . '</a></td> - </tr>', - $myrow['transno'], - $myrow['typename'], - $myrow['suppreference'], - ConvertSQLDate($myrow['trandate']), - locale_money_format($myrow['totalamount'],$myrow['currcode']), - locale_money_format($myrow['allocated'],$myrow['currcode']), - locale_money_format(($myrow['totalamount'] - $myrow['allocated']),$myrow['currcode']), - $myrow['transtext'], - $rootpath, - $myrow['id']); + echo '<td>' . $myrow['transno'] . '</td> + <td>' . $myrow['typename'] . '</td> + <td>' . $myrow['suppreference'] . '</td> + <td>' . ConvertSQLDate($myrow['trandate']) . '</td> + <td class="number">' . locale_money_format($myrow['totalamount'],$myrow['currcode']) . '</td> + <td class="number">' . locale_money_format($myrow['allocated'],$myrow['currcode']) . '</td> + <td class="number">' . locale_money_format(($myrow['totalamount'] - $myrow['allocated']),$myrow['currcode']) . '</td> + <td align=left>' . $myrow['transtext'] . '</td> + <td>' . InternalLink($rootpath, 'SupplierAllocations.php?AllocTrans=' . $myrow['id'], _('View Allocations')) . '</td> + </tr>'; } } Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/SupplierInvoice.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -19,9 +19,6 @@ include('includes/header.inc'); include('includes/SQL_CommonFunctions.inc'); -//this is available from the menu on this page already -//echo '<a href='" . $rootpath . '/SelectSupplier.php'>" . _('Back to Suppliers') . '</a><br />'; - if (!isset($_SESSION['SuppTrans']->SupplierName)) { $sql="SELECT suppname FROM suppliers WHERE supplierid='".$_GET['SupplierID']."'"; $result = DB_query($sql,$db); @@ -118,7 +115,7 @@ } elseif (!isset( $_SESSION['SuppTrans'])){ prnMsg( _('To enter a supplier invoice the supplier must first be selected from the supplier selection screen'),'warn'); - echo '<br /><a href="' . $rootpath . '/SelectSupplier.php">' . _('Select A Supplier to Enter an Invoice For') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'SelectSupplier.php', _('Select A Supplier to Enter an Invoice For')); include('includes/footer.inc'); exit; @@ -1325,7 +1322,7 @@ $Result = DB_Txn_Commit($db); prnMsg(_('Supplier invoice number') . ' ' . $InvoiceNo . ' ' . _('has been processed'),'success'); - echo '<br /><div class="centre"><a href="' . $rootpath . '/SupplierInvoice.php?&SupplierID=' .$_SESSION['SuppTrans']->SupplierID . '">' . _('Enter another Invoice for this Supplier') . '</a></div>'; + echo '<br /><div class="centre">' . InternalLink($rootpath, 'SupplierInvoice.php?&SupplierID=' .$_SESSION['SuppTrans']->SupplierID, _('Enter another Invoice for this Supplier')) . '</div>'; unset( $_SESSION['SuppTrans']->GRNs); unset( $_SESSION['SuppTrans']->Shipts); unset( $_SESSION['SuppTrans']->GLCodes); Modified: trunk/SupplierTenderCreate.php =================================================================== --- trunk/SupplierTenderCreate.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/SupplierTenderCreate.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -142,7 +142,7 @@ <td>' . $myrow['address5'] . '</td> <td>' . $myrow['address6'] . '</td> <td>' . $myrow['telephone'] . '</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier.'&ID='.$myrow['tenderid'].'">'. _('Edit') .'</a></td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier.'&ID='.$myrow['tenderid'], _('Edit')) .'</td> </tr>'; } echo '</table>'; @@ -397,7 +397,7 @@ <td>' . $Supplier->SupplierCode . '</td> <td>' . $Supplier->SupplierName . '</td> <td>' . $Supplier->EmailAddress . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'].'?identifier='.$identifier, ENT_QUOTES,'UTF-8') . '&DeleteSupplier=' . $Supplier->SupplierCode . '">' . _('Delete') . '</a></td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'].'?identifier='.$identifier, ENT_QUOTES,'UTF-8') . '&DeleteSupplier=' . $Supplier->SupplierCode, _('Delete')) . '</td> </tr>'; } echo '</table></td>'; @@ -425,7 +425,7 @@ <td>'.$LineItems->ItemDescription.'</td> <td class="number">' . locale_number_format($LineItems->Quantity,$LineItems->DecimalPlaces).'</td> <td>'.$LineItems->Units.'</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'].'?identifier='.$identifier,ENT_QUOTES,'UTF-8') . '&DeleteItem=' . $LineItems->LineNo . '">' . _('Delete') . '</a></td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'].'?identifier='.$identifier,ENT_QUOTES,'UTF-8') . '&DeleteItem=' . $LineItems->LineNo, _('Delete')) . '</td> </tr>'; echo '</tr>'; } @@ -625,7 +625,7 @@ if (DB_num_rows($result) == 0) { echo '<br /><font size="4" color="red">' . _('Problem Report') . ':</font><br />' . _('There are no stock categories currently defined please use the link below to set them up'); - echo '<br /><a href="' . $rootpath . '/StockCategories.php">' . _('Define Stock Categories') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'StockCategories.php', _('Define Stock Categories')); exit; } echo '<table class="selection"> Modified: trunk/SupplierTenders.php =================================================================== --- trunk/SupplierTenders.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/SupplierTenders.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -329,7 +329,7 @@ echo '<td><input type="text" class="number" name="Price'.$LineItems->LineNo.'" value="'.locale_money_format($LineItems->Price,$Currency).'" /></td>'; echo '<td class="number">'.locale_money_format($LineItems->Price*$LineItems->Quantity,$Currency).'</td>'; echo '<td><input type="text" size="11" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="expirydate'.$LineItems->LineNo.'" value="'.$LineItems->ExpiryDate.'" /></td>'; - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier.'&Delete=' . $LineItems->LineNo . '&Type=' . $_POST['TenderType'] . '">' . _('Remove') . '</a></td></tr>'; + echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier.'&Delete=' . $LineItems->LineNo . '&Type=' . $_POST['TenderType'], _('Remove')) . '</td></tr>'; echo '</tr>'; } } @@ -364,7 +364,7 @@ if (DB_num_rows($result) == 0) { echo '<p><font size="4" color="red">' . _('Problem Report') . ':</font><br />' . _('There are no stock categories currently defined please use the link below to set them up'); - echo '<br /><a href="' . $rootpath . '/StockCategories.php">' . _('Define Stock Categories') . '</a></p>'; + echo '<br />' . InternalLink($rootpath, 'StockCategories.php', _('Define Stock Categories')) . '</p>'; exit; } echo '<table class="selection"><tr>'; Modified: trunk/SupplierTypes.php =================================================================== --- trunk/SupplierTypes.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/SupplierTypes.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -167,17 +167,11 @@ $k=1; } - printf(' - <td>%s</td> - <td>%s</td> - <td><a href="%sSelectedType=%s&Edit=Yes">' . _('Edit') . '</td> - <td><a href="%sSelectedType=%s&Delete=Yes" onclick=\'return confirm( - "' . _('Are you sure you wish to delete this Supplier Type?') . '");\'>' . _('Delete') . '</td> - </tr>', - $myrow['typeid'], - $myrow['typename'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'?' , $myrow['typeid'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'?' , $myrow['typeid']); + echo '<td>' . $myrow['typeid'] . '</td> + <td>' . $myrow['typename'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'?SelectedType=' . $myrow['typeid'] . '&Edit=Yes', _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'?SelectedType=' . $myrow['typeid'] . '&Delete=Yes', _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP echo '</table><br />'; @@ -186,7 +180,7 @@ //end of ifs and buts! if (isset($SelectedType)) { - echo '<div class="centre"><p><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Show All Types Defined') . '</a></div></p>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Show All Types Defined')) . '</div>'; } if (! isset($_GET['delete'])) { Modified: trunk/Suppliers.php =================================================================== --- trunk/Suppliers.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/Suppliers.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -301,8 +301,6 @@ unset($SupplierID); } -// This is aleady linked from this page -//echo '<a href='" . $rootpath . '/SelectSupplier.php'>" . _('Back to Suppliers') . '</a><br />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Search') . '" alt="Search" />' . ' ' . _('Suppliers') . '</p>'; $InputError = 0; @@ -941,7 +939,7 @@ // echo '<font color=red><b>' . _('WARNING') . ': ' . _('There is no second warning if you hit the delete button below') . '. ' . _('However checks will be made to ensure there are no outstanding purchase orders or existing accounts payable transactions before the deletion is processed') . '<br /></font></b>'; prnMsg(_('WARNING') . ': ' . _('There is no second warning if you hit the delete button below') . '. ' . _('However checks will be made to ensure there are no outstanding purchase orders or existing accounts payable transactions before the deletion is processed'), 'Warn'); echo '<br /><div class="centre"><button type="submit" name="delete" onclick="return confirm(' . _('Are you sure you wish to delete this supplier?') . ');">' . _('Delete Supplier') . '</button>'; - echo '<br /><a href="' . $rootpath . '/SupplierContacts.php?SupplierID=' . $SupplierID . '">' . _('Review Contact Details') . '</a></div></form>'; + echo '<br />' . InternalLink($rootpath, 'SupplierContacts.php?SupplierID=' . $SupplierID, _('Review Contact Details')) . '</div></form>'; } } // end of main ifs Modified: trunk/Tax.php =================================================================== --- trunk/Tax.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/Tax.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -25,13 +25,13 @@ $pdf->addInfo('Title',_('Taxation Report')); $ReportTitle = $TaxAuthorityName . ' ' . _('Tax Report for') . ' ' . $_POST['NoOfPeriods'] . ' ' . _('months to') . ' ' . $PeriodEnd; - $pdf->addInfo('Subject', $ReportTitle); + $pdf->addInfo('Subject', $ReportTitle); $FontSize=12; $PageNumber=0; $line_height=12; - /*Now get the invoices for the tax report */ + /*Now get the invoices for the tax report */ $SQL = "SELECT debtortrans.transno, debtortrans.type, @@ -60,7 +60,7 @@ $title = _('Taxation Reporting Error'); include('includes/header.inc'); prnMsg(_('The accounts receivable transaction details could not be retrieved because') . ' ' . DB_error_msg($db),'error'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $SQL; } @@ -79,11 +79,11 @@ $Inputs =0; $InputTax =0; - $ListCount = 0; + $ListCount = 0; while ($DebtorTransRow = DB_fetch_array($DebtorTransResult,$db)){ - $ListCount ++; + $ListCount ++; if ($_POST['DetailOrSummary']=='Detail'){ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize, $DebtorTransRow['typename'],'left'); @@ -165,7 +165,7 @@ $title = _('Taxation Reporting Error'); include('includes/header.inc'); echo _('The accounts payable transaction details could not be retrieved because') . ' ' . DB_error_msg($db); - echo '<br /><a href="' . $rootpath . '/index.php?">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php?', _('Back to the menu')); if ($debug==1){ echo '<br />' . $SQL; } @@ -182,7 +182,7 @@ while ($SuppTransRow = DB_fetch_array($SuppTransResult,$db)){ - $ListCount ++; + $ListCount ++; if ($_POST['DetailOrSummary']=='Detail'){ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize, $SuppTransRow['typename'],'left'); @@ -270,17 +270,17 @@ $YPos -= $line_height; $LeftOvers = $pdf->addTextWrap(40,$YPos,500,$FontSize,_('This information excludes Tax on journal entries/payments/receipts all Tax should be entered through AR/AP'),'left'); - if ($ListCount == 0) { + if ($ListCount == 0) { $title = _('Taxation Reporting Error'); include('includes/header.inc'); prnMsg (_('There are no tax entries to list'),'info'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, '/index.php', _('Back to the menu')); include('includes/footer.inc'); exit; - } else { - $pdf->OutputF($_SESSION['DatabaseName'] . '_Tax_Report_' . Date('Y-m-d_h-m-s')); - } - $pdf->__destruct(); + } else { + $pdf->OutputF($_SESSION['DatabaseName'] . '_Tax_Report_' . Date('Y-m-d_h-m-s')); + } + $pdf->__destruct(); } else { /*The option to print PDF was not hit */ $title=_('Tax Reporting'); Modified: trunk/TaxAuthorities.php =================================================================== --- trunk/TaxAuthorities.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/TaxAuthorities.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -160,32 +160,18 @@ $k++; } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%s&SelectedTaxAuthID=%s">' . _('Edit') . '</a></td> - <td><a href="%s&SelectedTaxAuthID=%s&delete=yes">' . _('Delete') . '</a></td> - <td><a href="%s&TaxAuthority=%s">' . _('Edit Rates') . '</a></td> - </tr>', - $myrow['taxid'], - $myrow['description'], - $myrow['taxglcode'], - $myrow['purchtaxglaccount'], - $myrow['bank'], - $myrow['bankacc'], - $myrow['bankacctype'], - $myrow['bankswift'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['taxid'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['taxid'], - $rootpath . '/TaxAuthorityRates.php?', - $myrow['taxid']); + echo '<td>' . $myrow['taxid'] . '</td> + <td>' . $myrow['description'] . '</td> + <td>' . $myrow['taxglcode'] . '</td> + <td>' . $myrow['purchtaxglaccount'] . '</td> + <td>' . $myrow['bank'] . '</td> + <td>' . $myrow['bankacc'] . '</td> + <td>' . $myrow['bankacctype'] . '</td> + <td>' . $myrow['bankswift'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedTaxAuthID=' . $myrow['taxid'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedTaxAuthID=' . $myrow['taxid'] . '&delete=yes', _('Delete')) . '</td> + <td>' . InternalLink($rootpath, 'TaxAuthorityRates.php?TaxAuthority=' . $myrow['taxid'], _('Edit Rates')) . '</td> + </tr>'; } //END WHILE LIST LOOP @@ -198,7 +184,7 @@ if (isset($SelectedTaxAuthID)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Review all defined tax authority records') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Review all defined tax authority records')) . '</div>'; } Modified: trunk/TaxAuthorityRates.php =================================================================== --- trunk/TaxAuthorityRates.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/TaxAuthorityRates.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -17,7 +17,7 @@ /* <-- $Revision: 1.16 $ --> */ if (!isset($TaxAuthority)){ - prnMsg(_('This page can only be called after selecting the tax authority to edit the rates for') . '. ' . _('Please select the Rates link from the tax authority page') . ".<br /><a href='$rootpath/TaxAuthorities.php'>" . _('click here') . '</a> ' . _('to go to the Tax Authority page'),'error'); + prnMsg(_('This page can only be called after selecting the tax authority to edit the rates for') . '. ' . _('Please select the Rates link from the tax authority page') . '<br />' . InternalLink($rootpath, 'TaxAuthorities.php', _('click here')) . _('to go to the Tax Authority page'),'error'); include ('includes/footer.inc'); exit; } @@ -121,10 +121,10 @@ echo '</form>'; -echo '<br /><br /><a href="' . $rootpath . '/TaxAuthorities.php">' . _('Tax Authorities') . '</a>'; -echo '<br /><a href="' . $rootpath . '/TaxGroups.php">' . _('Tax Groupings') . '</a>'; -echo '<br /><a href="' . $rootpath . '/TaxCategories.php">' . _('Tax Categories') . '</a>'; -echo '<br /><a href="' . $rootpath . '/TaxProvinces.php">' . _('Dispatch Tax Provinces') . '</a>'; +echo '<br />' . InternalLink($rootpath, 'TaxAuthorities.php', _('Tax Authorities')); +echo '<br />' . InternalLink($rootpath, 'TaxGroups.php', _('Tax Groupings')); +echo '<br />' . InternalLink($rootpath, 'TaxCategories.php', _('Tax Categories')); +echo '<br />' . InternalLink($rootpath, 'TaxProvinces.php', _('Dispatch Tax Provinces')); echo '</div>'; include( 'includes/footer.inc' ); Modified: trunk/TaxCategories.php =================================================================== --- trunk/TaxCategories.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/TaxCategories.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -178,8 +178,8 @@ } echo '<td>' . $myrow['taxcatname'] . '</td>'; - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedTaxCategory=' . $myrow['taxcatid'] . '">' . _('Edit') . '</a></td>'; - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedTaxCategory=' . $myrow['taxcatid'] . '&delete=1">' . _('Delete') .'</a></td>'; + echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedTaxCategory=' . $myrow['taxcatid'], _('Edit')) . '</td>'; + echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedTaxCategory=' . $myrow['taxcatid'] . '&delete=1', _('Delete')) .'</td>'; echo '</tr>'; } //END WHILE LIST LOOP @@ -188,7 +188,7 @@ if (isset($SelectedTaxCategory)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Review Tax Categories') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Review Tax Categories')) . '</div>'; } echo '<br />'; Modified: trunk/TaxGroups.php =================================================================== --- trunk/TaxGroups.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/TaxGroups.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -173,18 +173,11 @@ $k=1; } - printf('<td>%s</td> - <td>%s</td> - <td><a href="%s&SelectedGroup=%s">' . _('Edit') . '</a></td> - <td><a href="%s&SelectedGroup=%s&Delete=1&GroupID=%s">' . _('Delete') . '</a></td> - </tr>', - $myrow['taxgroupid'], - $myrow['taxgroupdescription'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['taxgroupid'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['taxgroupid'], - urlencode($myrow['taxgroupdescription'])); + echo '<td>' . $myrow['taxgroupid'] . '</td> + <td>' . $myrow['taxgroupdescription'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedGroup=' . $myrow['taxgroupid'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedGroup=' . $myrow['taxgroupid'] . '&Delete=1&GroupID=' . urlencode($myrow['taxgroupdescription']), _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP echo '</table>'; @@ -193,7 +186,7 @@ if (isset($SelectedGroup)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Review Existing Groups') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Review Existing Groups')) . '</div>'; } if (isset($SelectedGroup)) { @@ -346,37 +339,23 @@ $TaxOnTax = _('No'); } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%s&SelectedGroup=%s&remove=1&TaxAuthority=%s">' . _('Remove') . '</a></td> + echo '<td>' . $AvailRow['taxid'] . '</td> + <td>' . $AvailRow['taxname'] . '</td> + <td>' . $TaxAuthRow[$TaxAuthUsedPointer]['calculationorder'] . '</td> + <td>' . $TaxOnTax . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedGroup=' . $SelectedGroup . '&remove=1&TaxAuthority=' . $AvailRow['taxid'], _('Remove')) . '</td> <td> </td> - <td> </td>', - $AvailRow['taxid'], - $AvailRow['taxname'], - $TaxAuthRow[$TaxAuthUsedPointer]['calculationorder'], - $TaxOnTax, - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $SelectedGroup, - $AvailRow['taxid'] - ); + <td> </td>'; } else { - printf('<td> </td> + echo '<td> </td> <td> </td> <td> </td> <td> </td> <td> </td> - <td>%s</td> - <td>%s</td> - <td><a href="%s&SelectedGroup=%s&add=1&TaxAuthority=%s">' . _('Add') . '</a></td>', - $AvailRow['taxid'], - $AvailRow['taxname'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $SelectedGroup, - $AvailRow['taxid'] - ); + <td>' . $AvailRow['taxid'] . '</td> + <td>' . $AvailRow['taxname'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedGroup='. $SelectedGroup . '&add=1&TaxAuthority=' . $AvailRow['taxid'], _('Add')) . '</td>'; } echo '</tr>'; } Modified: trunk/TaxProvinces.php =================================================================== --- trunk/TaxProvinces.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/TaxProvinces.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -173,8 +173,8 @@ } echo '<td>' . $myrow['taxprovincename'] . '</td>'; - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedTaxProvince=' . $myrow['taxprovinceid'] . '">' . _('Edit') . '</a></td>'; - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedTaxProvince=' . $myrow['taxprovinceid'] . '&delete=1">' . _('Delete') .'</a></td>'; + echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedTaxProvince=' . $myrow['taxprovinceid'], _('Edit')) . '</td>'; + echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedTaxProvince=' . $myrow['taxprovinceid'] . '&delete=1', _('Delete')) .'</td>'; echo '</tr>'; } //END WHILE LIST LOOP @@ -183,7 +183,7 @@ if (isset($SelectedTaxProvince)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Review Tax Provinces') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Review Tax Provinces')) . '</div>'; } if (! isset($_GET['delete'])) { @@ -229,9 +229,9 @@ } //end if record deleted no point displaying form to add record echo '<div class="centre">'; -echo '<br /><a href="' . $rootpath . '/TaxAuthorities.php">' . _('Edit/Review Tax Authorities') . '</a>'; -echo '<br /><a href="' . $rootpath . '/TaxGroups.php">' . _('Edit/Review Tax Groupings') . '</a>'; -echo '<br /><a href="' . $rootpath . '/TaxCategories.php">' . _('Edit/Review Tax Categories') . '</a>'; +echo '<br />' . InternalLink($rootpath, 'TaxAuthorities.php', _('Edit/Review Tax Authorities')); +echo '<br />' . InternalLink($rootpath, 'TaxGroups.php', _('Edit/Review Tax Groupings')); +echo '<br />' . InternalLink($rootpath, 'TaxCategories.php', _('Edit/Review Tax Categories')); echo '</div>'; include('includes/footer.inc'); Modified: trunk/UnitsOfMeasure.php =================================================================== --- trunk/UnitsOfMeasure.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/UnitsOfMeasure.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -185,8 +185,8 @@ } echo '<td>' . $myrow['unitname'] . '</td>'; - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedMeasureID=' . $myrow['unitid'] . '">' . _('Edit') . '</a></td>'; - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedMeasureID=' . $myrow['unitid'] . '&delete=1">' . _('Delete') .'</a></td>'; + echo '<td>' . InternalRequest('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedMeasureID=' . $myrow['unitid'], _('Edit')) . '</td>'; + echo '<td>' . InternalRequest('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedMeasureID=' . $myrow['unitid'] . '&delete=1', _('Delete')) .'</td>'; echo '</tr>'; } //END WHILE LIST LOOP @@ -195,7 +195,7 @@ if (isset($SelectedMeasureID)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Review Units of Measure') . '</a></div>'; + echo '<div class="centre">' . InternalRequest('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Review Units of Measure')) . '</div>'; } if (! isset($_GET['delete'])) { Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/UpgradeDatabase.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -37,7 +37,7 @@ if ( $_SESSION['VersionNumber'] == $Version){ prnMsg(_('The database is up to date, there are no upgrades to perform'),'info'); } else { - prnMsg(_('This script will perform any modifications to the database required to allow the additional functionality in later scripts.') . '<br />' . _('The webERP code is version') . ' ' . $Version . ' ' . _('and the database version is') . ' ' . $_SESSION['VersionNumber'] . '<br /><a target="_blank" href="' . $rootpath . '/BackupDatabase.php">' ._('Click to do a database backup now before proceeding!') . '</a>','info'); + prnMsg(_('This script will perform any modifications to the database required to allow the additional functionality in later scripts.') . '<br />' . _('The webERP code is version') . ' ' . $Version . ' ' . _('and the database version is') . ' ' . $_SESSION['VersionNumber'] . '<br />' . InternalLink($rootpath, 'BackupDatabase.php', _('Click to do a database backup now before proceeding!')),'info'); echo '<input type="hidden" name="OldVersion" value="' . $_SESSION['VersionNumber'] . '" />'; echo '<div class="centre"><button type="submit" name="DoUpgrade">' . _('Perform Database Upgrade') . '</button></div>'; Modified: trunk/WOSerialNos.php =================================================================== --- trunk/WOSerialNos.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/WOSerialNos.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -295,7 +295,7 @@ echo '<input type="hidden" name="Quantity' . $i . '" value="1" />'; } echo '<td><textarea name="Notes' . $i .'" cols="60" rows="3">' . $WOSNRow['qualitytext'] .'</textarea></td>'; - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=1&Reference=' . $WOSNRow['serialno'] . '&Quantity=' . $WOSNRow['quantity'] . '&WO=' . $WO . '&StockID=' . $StockID . '&Description=' . $Description . '&Serialised=' . $Serialised . '&NextSerialNo=' . $NextSerialNo . '">' . _('Delete') . '</td></tr>'; + echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=1&Reference=' . $WOSNRow['serialno'] . '&Quantity=' . $WOSNRow['quantity'] . '&WO=' . $WO . '&StockID=' . $StockID . '&Description=' . $Description . '&Serialised=' . $Serialised . '&NextSerialNo=' . $NextSerialNo, _('Delete')) . '</td></tr>'; $i++; $j++; } @@ -312,7 +312,7 @@ } //end of if there are woserialno items defined -echo '<br /><div class="centre"><a href="' . $rootpath . '/WorkOrderEntry.php?WO=' . $WO . '">' . _('Back To Work Order') . ' ' . $WO .'</a></div>'; +echo '<br /><div class="centre">' . InternalLink($rootpath, 'WorkOrderEntry.php?WO=' . $WO, _('Back To Work Order') . ' ' . $WO) .'</div>'; echo '</form>'; include('includes/footer.inc'); Modified: trunk/WWW_Access.php =================================================================== --- trunk/WWW_Access.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/WWW_Access.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -137,18 +137,11 @@ /*The SecurityHeadings array is defined in config.php */ - printf('<td>%s</td> - <td>%s</td> - <td><a href="%s?SelectedRole=%s">' . _('Edit') . '</a></td> - <td><a href="%s?SelectedRole=%s&delete=1&SecRoleName=%s">' . _('Delete') . '</a></td> - </tr>', - $myrow['secrolename'], - $CanViewPrices, - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') , - $myrow['secroleid'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') , - $myrow['secroleid'], - urlencode($myrow['secrolename'])); + echo '<td>' . $myrow['secrolename'] . '</td> + <td>' . $CanViewPrices . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedRole=' . $myrow['secroleid'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedRole=' . $myrow['secroleid'] . '&delete=1&SecRoleName=' . urlencode($myrow['secrolename']), _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP echo '</table>'; @@ -156,7 +149,7 @@ if (isset($SelectedRole)) { - echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'">' . _('Review Existing Roles') . '</a></div>'; + echo '<br /><div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Review Existing Roles')) . '</div>'; } if (isset($SelectedRole)) { @@ -246,30 +239,19 @@ } if (in_array($AvailRow['tokenid'],$TokensUsed)){ - printf('<td>%s</td> - <td>%s</td> - <td><a href="%s?SelectedRole=%s&remove=1&PageToken=%s">' . _('Remove') . '</a></td> + echo '<td>'. $AvailRow['tokenid'] . '</td> + <td>' . $AvailRow['tokenname'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedRole=' . $SelectedRole . '&remove=1&PageToken=' . $AvailRow['tokenid'], _('Remove')) . '</td> <td> </td> <td> </td> - <td> </td>', - $AvailRow['tokenid'], - $AvailRow['tokenname'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') , - $SelectedRole, - $AvailRow['tokenid'] - ); + <td> </td>'; } else { - printf('<td> </td> + echo '<td> </td> <td> </td> <td> </td> - <td>%s</td> - <td>%s</td> - <td><a href="%sSelectedRole=%s&add=1&PageToken=%s">' . _('Add') . '</a></td>', - $AvailRow['tokenid'], - $AvailRow['tokenname'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $SelectedRole, - $AvailRow['tokenid'] ); + <td>' . $AvailRow['tokenid'] . '</td> + <td>' . $AvailRow['tokenname'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedRole=' . $SelectedRole . '&add=1&PageToken=' . $AvailRow['tokenid'], _('Add')) . '</td>'; } echo '</tr>'; } Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/WWW_Users.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -297,41 +297,23 @@ } else { $CanCreateTender=_('Yes'); } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%sSelectedUser=%s">' . _('Edit') . '</a></td> - <td><a href="%sSelectedUser=%s&delete=1">' . _('Delete') . '</a></td> - </tr>', - $myrow['userid'], - $myrow['realname'], - $myrow['phone'], - $myrow['email'], - $myrow['customerid'], - $myrow['branchcode'], - $myrow['supplierid'], - $myrow['salesman'], - $LastVisitDate, - $SecurityRoles[($myrow['fullaccess'])], - $CanCreateTender, - $myrow['pagesize'], - $myrow['theme'], - $LanguagesArray[$myrow['language']], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['userid'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['userid']); + echo '<td>' . $myrow['userid'] . '</td> + <td>' . $myrow['realname'] . '</td> + <td>' . $myrow['phone'] . '</td> + <td>' . $myrow['email'] . '</td> + <td>' . $myrow['customerid'] . '</td> + <td>' . $myrow['branchcode'] . '</td> + <td>' . $myrow['supplierid'] . '</td> + <td>' . $myrow['salesman'] . '</td> + <td>' . $LastVisitDate . '</td> + <td>' . $SecurityRoles[($myrow['fullaccess'])] . '</td> + <td>' . $CanCreateTender . '</td> + <td>' . $myrow['pagesize'] . '</td> + <td>' . $myrow['theme'] . '</td> + <td>' . $LanguagesArray[$myrow['language']] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedUser=' . $myrow['userid'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedUser=' . $myrow['userid'] . '&delete=1', _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP echo '</table><br />'; @@ -339,7 +321,7 @@ if (isset($SelectedUser)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Review Existing Users') . '</a></div><br />'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Review Existing Users')) . '</div><br />'; } echo '<form method="post" onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; Modified: trunk/WhereUsedInquiry.php =================================================================== --- trunk/WhereUsedInquiry.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/WhereUsedInquiry.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -12,7 +12,7 @@ $StockID = trim(mb_strtoupper($_POST['StockID'])); } -echo '<a href="' . $rootpath . '/SelectProduct.php">' . _('Back to Items') . '</a><br />'; +echo InternalLink($rootpath, 'SelectProduct.php', _('Back to Items')) . '<br />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"><div class="centre">'; @@ -79,8 +79,7 @@ $k=1; } - echo '<td><a target="_blank" href="' . $rootpath . '/BOMInquiry.php?StockID=' . $myrow['parent'] . '" alt="' . _('Show Bill Of Material') . - '">' . $myrow['parent']. ' - ' . $myrow['description']. '</a></td>'; + echo '<td>' . InternalLink($rootpath, 'BOMInquiry.php?StockID=' . $myrow['parent'], $myrow['parent']. ' - ' . $myrow['description']) . '</td>'; echo '<td>' . $myrow['workcentreadded']. '</td>'; echo '<td>' . $myrow['loccode']. '</td>'; echo '<td>' . $myrow['quantity']. '</td>'; Modified: trunk/WorkCentres.php =================================================================== --- trunk/WorkCentres.php 2012-08-21 18:03:51 UTC (rev 9545) +++ trunk/WorkCentres.php 2012-08-22 21:13:13 UTC (rev 9546) @@ -128,23 +128,15 @@ while ($myrow = DB_fetch_array($result)) { - printf('<tr><td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td><a href="%s&SelectedWC=%s">' . _('Edit') . '</td> - <td><a href="%s&SelectedWC=%s&delete=yes">' . _('Delete') .'</td> - </tr>', - $myrow['code'], - $myrow['description'], - $myrow['locationname'], - $myrow['overheadrecoveryact'], - $myrow['overheadperhour'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - ... [truncated message content] |
From: <tim...@us...> - 2012-08-23 16:53:23
|
Revision: 9547 http://weberp.svn.sourceforge.net/weberp/?rev=9547&view=rev Author: tim_schofield Date: 2012-08-23 16:53:15 +0000 (Thu, 23 Aug 2012) Log Message: ----------- Replace <a tags with InternalLink() function Modified Paths: -------------- trunk/StockLocTransfer.php trunk/StockLocTransferReceive.php trunk/StockMovements.php trunk/StockQties_csv.php trunk/StockQuantityByDate.php trunk/StockReorderLevel.php trunk/StockStatus.php trunk/StockTransferControlled.php trunk/StockTransfers.php trunk/StockUsage.php trunk/Stocks.php trunk/SuppCreditGRNs.php trunk/SupplierAllocations.php trunk/SupplierBalsAtPeriodEnd.php trunk/SupplierContacts.php trunk/css/silverwolf/images/inventory.png Modified: trunk/StockLocTransfer.php =================================================================== --- trunk/StockLocTransfer.php 2012-08-22 21:13:13 UTC (rev 9546) +++ trunk/StockLocTransfer.php 2012-08-23 16:53:15 UTC (rev 9547) @@ -217,7 +217,7 @@ DB_Txn_Commit($db); prnMsg( _('The inventory transfer records have been created successfully'),'success'); - echo '<p><a href="'.$rootpath.'/PDFStockLocTransfer.php?TransferNo=' . $_POST['Trf_ID'] . '">'. _('Print the Transfer Docket'). '</a></p>'; + echo '<p>' . InternalLink($rootpath, 'PDFStockLocTransfer.php?TransferNo=' . $_POST['Trf_ID'], _('Print the Transfer Docket')) . '</p>'; include('includes/footer.inc'); } else { Modified: trunk/StockLocTransferReceive.php =================================================================== --- trunk/StockLocTransferReceive.php 2012-08-22 21:13:13 UTC (rev 9546) +++ trunk/StockLocTransferReceive.php 2012-08-23 16:53:15 UTC (rev 9547) @@ -464,7 +464,10 @@ echo '<td class="number">' . locale_number_format($TrfLine->PrevRecvQty, $TrfLine->DecimalPlaces) . '</td>'; if ($TrfLine->Controlled==1){ - echo '<td class="number"><input type="hidden" name="Qty' . $i . '" value="' . locale_number_format($Qty, $TrfLine->DecimalPlaces) . '"><a href="' . $rootpath .'/StockTransferControlled.php?TransferItem=' . $i . '" />' . locale_number_format($Qty, $TrfLine->DecimalPlaces) . '</a></td>'; + echo '<td class="number"> + <input type="hidden" name="Qty' . $i . '" value="' . locale_number_format($Qty, $TrfLine->DecimalPlaces) . '" /> + ' . InternalLink($rootpath, 'StockTransferControlled.php?TransferItem=' . $i, locale_number_format($Qty, $TrfLine->DecimalPlaces)) . ' + </td>'; } else { echo '<td><input type="text" class="number" name="Qty' . $i . '" maxlength="10" class="number" size="auto" value="' . locale_number_format($Qty, $TrfLine->DecimalPlaces) . '" /></td>'; } @@ -476,9 +479,9 @@ if ($TrfLine->Controlled==1){ if ($TrfLine->Serialised==1){ - echo '<td><a href="' . $rootpath .'/StockTransferControlled.php?TransferItem=' . $i . '">' . _('Enter Serial Numbers') . '</a></td>'; + echo '<td>' . InternalLink($rootpath, 'StockTransferControlled.php?TransferItem=' . $i, _('Enter Serial Numbers')) . '</td>'; } else { - echo '<td><a href="' . $rootpath .'/StockTransferControlled.php?TransferItem=' . $i . '">' . _('Enter Batch Refs') . '</a></td>'; + echo '<td>' . InternalLink($rootpath, 'StockTransferControlled.php?TransferItem=' . $i, _('Enter Batch Refs')) . '</td>'; } } @@ -490,7 +493,7 @@ echo '</table><br /> <div class="centre"><button type="submit" name="ProcessTransfer">'. _('Process Inventory Transfer'). '</button> </form></div><br />'; - echo '<div class="centre"><a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'). '?NewTransfer=true">'. _('Select A Different Transfer').'</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'). '?NewTransfer=true', _('Select A Different Transfer')) . '</div>'; } else { /*Not $_SESSION['Transfer'] set */ @@ -532,8 +535,10 @@ $LocResult = DB_query($LocSql,$db); $LocRow = DB_fetch_array($LocResult); echo '<table class="selection">'; - echo '<tr><th colspan="4" class="header">'._('Pending Transfers Into').' '.$LocRow['locationname'].'</th></tr>'; echo '<tr> + <th colspan="4" class="header">'._('Pending Transfers Into').' '.$LocRow['locationname'].'</th> + </tr>'; + echo '<tr> <th>'. _('Transfer Ref'). '</th> <th>'. _('Transfer From'). '</th> <th>'. _('Dispatch Date'). '</th> @@ -551,7 +556,7 @@ echo '<td class="number">' . $myrow['reference'] . '</td> <td>' . $myrow['trffromloc'] . '</td> <td>' . ConvertSQLDateTime($myrow['shipdate']) . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Trf_ID=' . $myrow['reference'] . '">'. _('Receive'). '</a></td></tr>'; + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Trf_ID=' . $myrow['reference'], _('Receive')) . '</td></tr>'; } Modified: trunk/StockMovements.php =================================================================== --- trunk/StockMovements.php 2012-08-22 21:13:13 UTC (rev 9546) +++ trunk/StockMovements.php 2012-08-23 16:53:15 UTC (rev 9547) @@ -18,10 +18,6 @@ $StockID = ''; } - -// This is already linked from this page -//echo "<a href='" . $rootpath . '/SelectProduct.php'>" . _('Back to Items') . '</a><br />'; - $result = DB_query("SELECT description, units FROM stockmaster WHERE stockid='".$StockID."'",$db); $myrow = DB_fetch_array($result); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" /><b>' . ' ' . $StockID . ' - ' . $myrow['description'] . ' : ' . _('in units of') . ' : ' . $myrow['units'] . '</b></p>'; @@ -123,88 +119,55 @@ if ($myrow['type']==10){ /*its a sales invoice allow link to show invoice it was sold on*/ - printf('<td><a TARGET="_blank" href="%s/PrintCustTrans.php?FromTransNo=%s&InvOrCredit=Invoice">%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s%%</td> - <td class="number">%s</td> - </tr>', - $rootpath, - $myrow['transno'], - $myrow['typename'], - $myrow['transno'], - $DisplayTranDate, - $myrow['debtorno'], - $myrow['branchcode'], - locale_number_format($myrow['qty'],$myrow['decimalplaces']), - $myrow['reference'], - locale_money_format($myrow['price'],$_SESSION['CompanyRecord']['currencydefault']), - locale_number_format($myrow['discountpercent']*100,2), - locale_number_format($myrow['newqoh'],$myrow['decimalplaces'])); + echo '<td>' . InternalLink($rootpath, 'PrintCustTrans.php?FromTransNo=' . $myrow['transno'] . '&InvOrCredit=Invoice', $myrow['typename']) . '</td> + <td>' . $myrow['transno'] . '</td> + <td>' . $DisplayTranDate . '</td> + <td>' . $myrow['debtorno'] . '</td> + <td>' . $myrow['branchcode'] . '</td> + <td class="number">' . locale_number_format($myrow['qty'],$myrow['decimalplaces']) . '</td> + <td>' . $myrow['reference'] . '</td> + <td class="number">' . locale_money_format($myrow['price'],$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_number_format($myrow['discountpercent']*100,2) . '%</td> + <td class="number">' . locale_number_format($myrow['newqoh'],$myrow['decimalplaces']) . '</td> + </tr>'; } elseif ($myrow['type']==11){ - printf('<td><a TARGET="_blank" href="%s/PrintCustTrans.php?FromTransNo=%s&InvOrCredit=Credit">%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s%%</td> - <td class="number">%s</td> - </tr>', - $rootpath, - $myrow['transno'], - $myrow['typename'], - $myrow['transno'], - $DisplayTranDate, - $myrow['debtorno'], - $myrow['branchcode'], - locale_number_format($myrow['qty'],$myrow['decimalplaces']), - $myrow['reference'], - locale_money_format($myrow['price'],$_SESSION['CompanyRecord']['currencydefault']), - locale_number_format($myrow['discountpercent']*100,2), - locale_number_format($myrow['newqoh'],$myrow['decimalplaces'])); + echo '<td>' . InternalLink($rootpath, 'PrintCustTrans.php?FromTransNo=' . $myrow['transno'] . '&InvOrCredit=Credit', $myrow['typename']) . '</td> + <td>' . $myrow['transno'] . '</td> + <td>' . $DisplayTranDate . '</td> + <td>' . $myrow['debtorno'] . '</td> + <td>' . $myrow['branchcode'] . '</td> + <td class="number">' . locale_number_format($myrow['qty'],$myrow['decimalplaces']) . '</td> + <td>' . $myrow['reference'] . '</td> + <td class="number">' . locale_money_format($myrow['price'],$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_number_format($myrow['discountpercent']*100,2) . '%</td> + <td class="number">' . locale_number_format($myrow['newqoh'],$myrow['decimalplaces']) . '</td> + </tr>'; } else { - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s%%</td> - <td class="number">%s</td> - </tr>', - $myrow['typename'], - $myrow['transno'], - $DisplayTranDate, - $myrow['debtorno'], - $myrow['branchcode'], - locale_number_format($myrow['qty'],$myrow['decimalplaces']), - $myrow['reference'], - locale_money_format($myrow['price'],$_SESSION['CompanyRecord']['currencydefault']), - locale_number_format($myrow['discountpercent']*100,2), - locale_number_format($myrow['newqoh'],$myrow['decimalplaces'])); + echo '<td>' . $myrow['typename'] . '</td> + <td>' . $myrow['transno'] . '</td> + <td>' . $DisplayTranDate . '</td> + <td>' . $myrow['debtorno'] . '</td> + <td>' . $myrow['branchcode'] . '</td> + <td class="number">' . locale_number_format($myrow['qty'],$myrow['decimalplaces']) . '</td> + <td>' . $myrow['reference'] . '</td> + <td class="number">' . locale_money_format($myrow['price'],$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_number_format($myrow['discountpercent']*100,2) . '%</td> + <td class="number">' . locale_number_format($myrow['newqoh'],$myrow['decimalplaces']) . '</td> + </tr>'; } //end of page full new headings if } //end of while loop echo '</table>'; -echo '<div class="centre"><br /><a href="'.$rootpath.'/StockStatus.php?StockID='.$StockID.'">' . _('Show Stock Status') . '</a>'; -echo '<br /><a href="'.$rootpath.'/StockUsage.php?StockID='.$StockID.'&StockLocation=' . $_POST['StockLocation'] . '">' . _('Show Stock Usage') . '</a>'; -echo '<br /><a href="'.$rootpath.'/SelectSalesOrder.php?SelectedStockItem='.$StockID.'&StockLocation=' . $_POST['StockLocation'] . '">' . _('Search Outstanding Sales Orders') . '</a>'; -echo '<br /><a href="'.$rootpath.'/SelectCompletedOrder.php?SelectedStockItem='.$StockID.'">' . _('Search Completed Sales Orders') . '</a>'; +echo '<div class="centre"> + <br />' . InternalLink($rootpath, 'StockStatus.php?StockID='.$StockID, _('Show Stock Status')) . ' + <br />' . InternalLink($rootpath, 'StockUsage.php?StockID='.$StockID.'&StockLocation=' . $_POST['StockLocation'], _('Show Stock Usage')) . ' + <br />' . InternalLink($rootpath, 'SelectSalesOrder.php?SelectedStockItem='.$StockID.'&StockLocation=' . $_POST['StockLocation'], _('Search Outstanding Sales Orders')) . ' + <br />' . InternalLink($rootpath, 'SelectCompletedOrder.php?SelectedStockItem='.$StockID, _('Search Completed Sales Orders')); echo '</form></div>'; Modified: trunk/StockQties_csv.php =================================================================== --- trunk/StockQties_csv.php 2012-08-22 21:13:13 UTC (rev 9546) +++ trunk/StockQties_csv.php 2012-08-23 16:53:15 UTC (rev 9547) @@ -40,7 +40,7 @@ fclose($fp); -echo '<br /><div class="centre"><a href="' . $rootpath . '/' . $_SESSION['reports_dir'] . '/StockQties.csv ">' . _('click here') . '</a> ' . _('to view the file') . '</div>'; +echo '<br /><div class="centre">' . InternalLink($rootpath, $_SESSION['reports_dir'] . '/StockQties.csv', _('click here')) . _('to view the file') . '</div>'; include('includes/footer.inc'); Modified: trunk/StockQuantityByDate.php =================================================================== --- trunk/StockQuantityByDate.php 2012-08-22 21:13:13 UTC (rev 9546) +++ trunk/StockQuantityByDate.php 2012-08-23 16:53:15 UTC (rev 9547) @@ -7,7 +7,7 @@ $title = _('Stock On Hand By Date'); include('includes/header.inc'); -echo '<p Class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') .'" alt="" /><b>' . $title. '</b></p>'; +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') .'" alt="" /><b>' . $title. '</b></p>'; echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -72,10 +72,12 @@ if(isset($_POST['ShowStatus']) AND Is_Date($_POST['OnHandDate'])) { if ($_POST['StockCategory']=='All') { - $sql = "SELECT stockid, + $sql = "SELECT distinct stockmoves.stockid, description, decimalplaces FROM stockmaster + LEFT JOIN stockmoves + ON stockmaster.stockid=stockmoves.stockid WHERE (mbflag='M' OR mbflag='B')"; } else { $sql = "SELECT stockid, @@ -131,21 +133,13 @@ } if($NumRows == 0){ - printf('<td><a target="_blank" href="StockStatus.php?%s">%s</td> - <td>%s</td> - <td class="number">%s</td>', - 'StockID=' . mb_strtoupper($myrows['stockid']), - mb_strtoupper($myrows['stockid']), - $myrows['description'], - 0); + echo '<td>' . InternalLink('', 'StockStatus.php?' . 'StockID=' . mb_strtoupper($myrows['stockid']), mb_strtoupper($myrows['stockid'])) . '</td> + <td>' . $myrows['description'] . '</td> + <td class="number">0</td>'; } else { - printf('<td><a target="_blank" href="StockStatus.php?%s">%s</td> - <td>%s</td> - <td class="number">%s</td>', - 'StockID=' . mb_strtoupper($myrows['stockid']), - mb_strtoupper($myrows['stockid']), - $myrows['description'], - locale_number_format($LocQtyRow['newqoh'],$myrows['decimalplaces'])); + echo '<td>' . InternalLink('', 'StockStatus.php?' . 'StockID=' . mb_strtoupper($myrows['stockid']), mb_strtoupper($myrows['stockid'])) . '</td> + <td>' . $myrows['description'] . '</td> + <td class="number">' . locale_number_format($LocQtyRow['newqoh'], $myrows['decimalplaces']) . '</td>'; $TotalQuantity += $LocQtyRow['newqoh']; } Modified: trunk/StockReorderLevel.php =================================================================== --- trunk/StockReorderLevel.php 2012-08-22 21:13:13 UTC (rev 9546) +++ trunk/StockReorderLevel.php 2012-08-23 16:53:15 UTC (rev 9547) @@ -12,10 +12,8 @@ $StockID = trim(mb_strtoupper($_POST['StockID'])); } -echo '<a href="' . $rootpath . '/SelectProduct.php">' . _('Back to Items') . '</a>'; +echo InternalLink($rootpath, 'SelectProduct.php', _('Back to Items')); -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" /><b>' . $title. '</b></p>'; - $result = DB_query("SELECT description, units FROM stockmaster WHERE stockid='" . $StockID . "'", $db); $myrow = DB_fetch_array($result); @@ -41,6 +39,12 @@ $LocStockResult = DB_query($sql, $db, $ErrMsg, $DbgMsg); echo '<table cellpadding="2" class="selection">'; + +echo '<tr> + <th colspan="3" class="header"> + <img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" /><b>' . $title. '</b> + </th> + </tr>'; echo '<tr><th colspan="3">'._('Stock Code') . ':<input type="text" name="StockID" size="21" value="' . $StockID . '" maxlength="20" />'; echo '<button type="submit" name="Show">' . _('Show Re-Order Levels') . '</button></th></tr>'; echo '<tr><th colspan="3" class="header"><b>' . $StockID . ' - ' . $myrow['description'] . '</b> (' . _('In Units of') . ' ' . $myrow['units'] . ')</th></tr>'; @@ -98,11 +102,11 @@ } //end of while loop -echo '</table><br /><div class="centre"><button type="submit" name="UpdateData">' . _('Update') . '</button><br /><br />'; -echo '<a href="' . $rootpath . '/StockMovements.php?StockID=' . $StockID . '">' . _('Show Stock Movements') . '</a>'; -echo '<br /><a href="' . $rootpath . '/StockUsage.php?StockID=' . $StockID . '">' . _('Show Stock Usage') . '</a>'; -echo '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?SelectedStockItem=' . $StockID . '">' . _('Search Outstanding Sales Orders') . '</a>'; -echo '<br /><a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedStockItem=' . $StockID . '">' . _('Search Completed Sales Orders') . '</a>'; +echo '</table><div class="centre"><button type="submit" name="UpdateData">' . _('Update') . '</button>'; +echo '<br />' . InternalLink($rootpath, 'StockMovements.php?StockID=' . $StockID, _('Show Stock Movements')); +echo '<br />' . InternalLink($rootpath, 'StockUsage.php?StockID=' . $StockID, _('Show Stock Usage')); +echo '<br />' . InternalLink($rootpath, 'SelectSalesOrder.php?SelectedStockItem=' . $StockID, _('Search Outstanding Sales Orders')); +echo '<br />' . InternalLink($rootpath, 'SelectCompletedOrder.php?SelectedStockItem=' . $StockID, _('Search Completed Sales Orders')); echo '</div></form>'; include('includes/footer.inc'); Modified: trunk/StockStatus.php =================================================================== --- trunk/StockStatus.php 2012-08-22 21:13:13 UTC (rev 9546) +++ trunk/StockStatus.php 2012-08-23 16:53:15 UTC (rev 9547) @@ -16,9 +16,6 @@ $StockID = ''; } -// This is already linked from this page -//echo '<a href='" . $rootpath . '/SelectProduct.php'>" . _('Back to Items') . '</a><br />'; - $result = DB_query("SELECT description, units, mbflag, @@ -217,9 +214,9 @@ if ($Serialised ==1){ /*The line is a serialised item*/ - echo '<td><a target="_blank" href="' . $rootpath . '/StockSerialItems.php?Serialised=Yes&Location=' . $myrow['loccode'] . '&StockID=' .$StockID . '">' . _('Serial Numbers') . '</a></td></tr>'; + echo '<td>' . InternalLink($rootpath, 'StockSerialItems.php?Serialised=Yes&Location=' . $myrow['loccode'] . '&StockID=' .$StockID, _('Serial Numbers')) . '</td></tr>'; } elseif ($Controlled==1){ - echo '<td><a target="_blank" href="' . $rootpath . '/StockSerialItems.php?Location=' . $myrow['loccode'] . '&StockID=' .$StockID . '">' . _('Batches') . '</a></td></tr>'; + echo '<td>' . InternalLink($rootpath, 'StockSerialItems.php?Location=' . $myrow['loccode'] . '&StockID=' .$StockID, _('Batches')) . '</td></tr>'; } } else { @@ -346,12 +343,12 @@ } //end of displaying price history for a debtor echo '<div class="centre">'; -echo '<br /><a href="' . $rootpath . '/StockMovements.php?StockID=' . $StockID . '">' . _('Show Movements') . '</a>'; -echo '<br /><a href="' . $rootpath . '/StockUsage.php?StockID=' . $StockID . '">' . _('Show Usage') . '</a>'; -echo '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?SelectedStockItem=' . $StockID . '">' . _('Search Outstanding Sales Orders') . '</a>'; -echo '<br /><a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedStockItem=' . $StockID . '">' . _('Search Completed Sales Orders') . '</a>'; +echo '<br />' . InternalLink($rootpath, 'StockMovements.php?StockID=' . $StockID, _('Show Movements')); +echo '<br />' . InternalLink($rootpath, 'StockUsage.php?StockID=' . $StockID, _('Show Usage')); +echo '<br />' . InternalLink($rootpath, 'SelectSalesOrder.php?SelectedStockItem=' . $StockID, _('Search Outstanding Sales Orders')); +echo '<br />' . InternalLink($rootpath, 'SelectCompletedOrder.php?SelectedStockItem=' . $StockID, _('Search Completed Sales Orders')); if ($Its_A_KitSet_Assembly_Or_Dummy ==False){ - echo '<br /><a href="' . $rootpath . '/PO_SelectOSPurchOrder.php?SelectedStockItem=' . $StockID . '">' . _('Search Outstanding Purchase Orders') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'PO_SelectOSPurchOrder.php?SelectedStockItem=' . $StockID, _('Search Outstanding Purchase Orders')); } echo '</div></form>'; Modified: trunk/StockTransferControlled.php =================================================================== --- trunk/StockTransferControlled.php 2012-08-22 21:13:13 UTC (rev 9546) +++ trunk/StockTransferControlled.php 2012-08-23 16:53:15 UTC (rev 9547) @@ -15,7 +15,7 @@ if (!isset($_SESSION['Transfer'])) { /* This page can only be called when a stock Transfer is pending */ - echo '<div class="centre"><a href="' . $rootpath . '/StockTransfers.php?NewTransfer=Yes">'._('Enter A Stock Transfer').'</a><br />'; + echo '<div class="centre">' . InternalLink($rootpath, 'StockTransfers.php?NewTransfer=Yes', _('Enter A Stock Transfer')) . '<br />'; prnMsg( _('This page can only be opened if a Stock Transfer for a Controlled Item has been initiated').'<br />','error'); echo '</div>'; include('includes/footer.inc'); @@ -41,9 +41,9 @@ //Make sure this item is really controlled if ($LineItem->Controlled != 1 ){ if (isset($TransferItem)){ - echo '<div class="centre"><a href="' . $rootpath . '/StockLocTransferReceive.php">'._('Receive A Stock Transfer').'</a></div>'; + echo '<div class="centre">' . InternalLink($rootpath, 'StockLocTransferReceive.php', _('Receive A Stock Transfer')) . '</div>'; } else { - echo '<div class="centre"><a href="' . $rootpath . '/StockTransfers.php?NewTransfer=Yes">'._('Enter A Stock Transfer').'</a></div>'; + echo '<div class="centre">' . InternalLink($rootpath, 'StockTransfers.php?NewTransfer=Yes', _('Enter A Stock Transfer')) . '</div>'; } prnMsg('<br />'. _('Notice') . ' - ' . _('The transferred item must be defined as controlled to require input of the batch numbers or serial numbers being transferred'),'error'); include('includes/footer.inc'); @@ -56,9 +56,9 @@ echo _('Transfer Items is set equal to') . ' ' . $TransferItem; - echo '<br /><a href="'.$rootpath.'/StockLocTransferReceive.php?StockID='.$LineItem->StockID.'">'._('Back To Transfer Screen').'</a>'; + echo '<br />' . InternalLink($rootpath, 'StockLocTransferReceive.php?StockID='.$LineItem->StockID, _('Back To Transfer Screen')); } else { - echo '<br /><a href="'.$rootpath.'/StockTransfers.php?StockID='.$LineItem->StockID. '">'._('Back To Transfer Screen').'</a>'; + echo '<br />' . InternalLink($rootpath, 'StockTransfers.php?StockID='.$LineItem->StockID, _('Back To Transfer Screen')); } echo '<br /><font size="2"><b>'. _('Transfer of controlled item'). ' ' . $LineItem->StockID . ' - ' . $LineItem->ItemDescription . '</b></font></div>'; Modified: trunk/StockTransfers.php =================================================================== --- trunk/StockTransfers.php 2012-08-22 21:13:13 UTC (rev 9546) +++ trunk/StockTransfers.php 2012-08-23 16:53:15 UTC (rev 9547) @@ -42,8 +42,7 @@ while ($myrow = DB_fetch_array($result)) { echo '<tr><td>'.$myrow['stockid'].'</td> <td>'.$myrow['description'].'</td> - <td><a href="' . $rootpath . '/StockTransfers.php?StockID='.$myrow['stockid'].'&Description='.$myrow['description'].'&NewTransfer=Yes&Quantity='.$_POST['Quantity'].'&From='.$_POST['StockLocationFrom'].'&To='.$_POST['StockLocationTo'].'">' - ._('Transfer').'</a></td> + <td>' . InternalLink($rootpath, 'StockTransfers.php?StockID='.$myrow['stockid'].'&Description='.$myrow['description'].'&NewTransfer=Yes&Quantity='.$_POST['Quantity'].'&From='.$_POST['StockLocationFrom'].'&To='.$_POST['StockLocationTo'], _('Transfer')).'</td> </tr>'; } echo '</table>'; @@ -111,7 +110,7 @@ if ($myrow['mbflag']=='D' OR $myrow['mbflag']=='A' OR $myrow['mbflag']=='K'){ prnMsg(_('The part entered is either or a dummy part or an assembly or a kit-set part') . '. ' . _('These parts are not physical parts and no stock holding is maintained for them') . '. ' . _('Stock Transfers are therefore not possible'),'warn'); echo '.<hr>'; - echo '<a href="' . $rootpath . '/StockTransfers.php?NewTransfer=Yes">' . _('Enter another Transfer') . '</a>'; + echo InternalLink($rootpath, 'StockTransfers.php?NewTransfer=Yes', _('Enter another Transfer')); unset ($_SESSION['Transfer']); include ('includes/footer.inc'); exit; @@ -418,7 +417,7 @@ $Result = DB_Txn_Commit($db); prnMsg(_('An inventory transfer of').' ' . $_SESSION['Transfer']->TransferItem[0]->StockID . ' - ' . $_SESSION['Transfer']->TransferItem[0]->ItemDescription . ' '. _('has been created from').' ' . $_SESSION['Transfer']->StockLocationFrom . ' '. _('to') . ' ' . $_SESSION['Transfer']->StockLocationTo . ' '._('for a quantity of').' ' . $_SESSION['Transfer']->TransferItem[0]->Quantity,'success'); - echo '<br /><a href="PDFStockTransfer.php?TransferNo='.$TransferNumber.'">' . _('Print Transfer Note') . '</a>'; + echo '<br />' . InternalLink('', 'PDFStockTransfer.php?TransferNo='.$TransferNumber, _('Print Transfer Note')); unset ($_SESSION['Transfer']); include ('includes/footer.inc'); exit; @@ -476,7 +475,9 @@ echo '</select></td></tr>'; -echo '<tr><td>'. _('To Stock Location').': </td><td><select name="StockLocationTo"> '; +echo '<tr> + <td>'. _('To Stock Location').': </td> + <td><select name="StockLocationTo"> '; DB_data_seek($resultStkLocs,0); @@ -502,7 +503,7 @@ if (isset($_SESSION['Transfer']->TransferItem[0]->Controlled) and $_SESSION['Transfer']->TransferItem[0]->Controlled==1){ echo '<td class="number"><input type="hidden" name="Quantity" value="' . $_SESSION['Transfer']->TransferItem[0]->Quantity . '" /> - <a href="' . $rootpath .'/StockTransferControlled.php?StockLocationFrom='.$_SESSION['Transfer']->StockLocationFrom.'">' . $_SESSION['Transfer']->TransferItem[0]->Quantity . '</a></td></tr>'; + ' . InternalLink($rootpath, 'StockTransferControlled.php?StockLocationFrom='.$_SESSION['Transfer']->StockLocationFrom, $_SESSION['Transfer']->TransferItem[0]->Quantity) . '</td></tr>'; } elseif (isset($_SESSION['Transfer']->TransferItem[0]->Controlled)){ echo '<td><input type="text" class="number" name="Quantity" size="12" maxlength="12" value="' . $_SESSION['Transfer']->TransferItem[0]->Quantity . '" /></td></tr>'; } else { @@ -520,11 +521,11 @@ $StockID=''; } if (isset($_SESSION['Transfer'])) { - echo '<br /><a href="'.$rootpath.'/StockStatus.php?StockID=' . $StockID . '">'._('Show Stock Status').'</a>'; - echo '<br /><a href="'.$rootpath.'/StockMovements.php?StockID=' . $StockID . '">'._('Show Movements').'</a>'; - echo '<br /><a href="'.$rootpath.'/StockUsage.php?StockID=' . $StockID . '&StockLocation=' . $_SESSION['Transfer']->StockLocationFrom . '">' . _('Show Stock Usage') . '</a>'; - echo '<br /><a href="'.$rootpath.'/SelectSalesOrder.php?SelectedStockItem=' . $StockID . '&StockLocation=' . $_SESSION['Transfer']->StockLocationFrom . '">' . _('Search Outstanding Sales Orders') . '</a>'; - echo '<br /><a href="'.$rootpath.'/SelectCompletedOrder.php?SelectedStockItem=' . $StockID . '">'._('Search Completed Sales Orders').'</a>'; + echo '<br />' . InternalLink($rootpath, 'StockStatus.php?StockID=' . $StockID, _('Show Stock Status')); + echo '<br />' . InternalLink($rootpath, 'StockMovements.php?StockID=' . $StockID, _('Show Movements')); + echo '<br />' . InternalLink($rootpath, 'StockUsage.php?StockID=' . $StockID . '&StockLocation=' . $_SESSION['Transfer']->StockLocationFrom, _('Show Stock Usage')); + echo '<br />' . InternalLink($rootpath, 'SelectSalesOrder.php?SelectedStockItem=' . $StockID . '&StockLocation=' . $_SESSION['Transfer']->StockLocationFrom , _('Search Outstanding Sales Orders')); + echo '<br />' . InternalLink($rootpath, 'SelectCompletedOrder.php?SelectedStockItem=' . $StockID, _('Search Completed Sales Orders')); } echo '</div></form>'; include('includes/footer.inc'); Modified: trunk/StockUsage.php =================================================================== --- trunk/StockUsage.php 2012-08-22 21:13:13 UTC (rev 9546) +++ trunk/StockUsage.php 2012-08-23 16:53:15 UTC (rev 9547) @@ -20,7 +20,7 @@ echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/StockUsageGraph.php?StockLocation=' . $_POST['StockLocation'] . '&StockID=' . $StockID . '">'; echo '<p>' . _('You should automatically be forwarded to the usage graph') . '. ' . _('If this does not happen') .' (' . _('if the browser does not support META Refresh') . ') ' . - '<a href="' . $rootpath . '/StockUsageGraph.php?StockLocation=' . $_POST['StockLocation'] .'&StockID=' . $StockID . '">' . _('click here') . '</a> ' . _('to continue') . '.</p><br />'; + InternalLink($rootpath, 'StockUsageGraph.php?StockLocation=' . $_POST['StockLocation'] .'&StockID=' . $StockID, _('click here')) . _('to continue') . '.</p><br />'; exit; } @@ -170,12 +170,12 @@ echo '</table>'; } /* end if Show Usage is clicked */ -echo '<br /><div class="centre">'; -echo '<a href="' . $rootpath . '/StockStatus.php?StockID=' . $StockID . '">' . _('Show Stock Status') .'</a>'; -echo '<br /><a href="' . $rootpath . '/StockMovements.php?StockID=' . $StockID . '&StockLocation=' . $_POST['StockLocation'] . '">' . _('Show Stock Movements') . '</a>'; -echo '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?SelectedStockItem=' . $StockID . '&StockLocation=' . $_POST['StockLocation'] . '">' . _('Search Outstanding Sales Orders') . '</a>'; -echo '<br /><a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedStockItem=' . $StockID . '">' . _('Search Completed Sales Orders') . '</a>'; -echo '<br /><a href="' . $rootpath . '/PO_SelectOSPurchOrder.php?SelectedStockItem=' . $StockID . '">' . _('Search Outstanding Purchase Orders') . '</a>'; +echo '<div class="centre">'; +echo '<br />' . InternalLink($rootpath, 'StockStatus.php?StockID=' . $StockID, _('Show Stock Status')); +echo '<br />' . InternalLink($rootpath, 'StockMovements.php?StockID=' . $StockID . '&StockLocation=' . $_POST['StockLocation'], _('Show Stock Movements')); +echo '<br />' . InternalLink($rootpath, 'SelectSalesOrder.php?SelectedStockItem=' . $StockID . '&StockLocation=' . $_POST['StockLocation'], _('Search Outstanding Sales Orders')); +echo '<br />' . InternalLink($rootpath, 'SelectCompletedOrder.php?SelectedStockItem=' . $StockID, _('Search Completed Sales Orders')); +echo '<br />' . InternalLink($rootpath, 'PO_SelectOSPurchOrder.php?SelectedStockItem=' . $StockID, _('Search Outstanding Purchase Orders')); echo '</form></div>'; include('includes/footer.inc'); Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2012-08-22 21:13:13 UTC (rev 9546) +++ trunk/Stocks.php 2012-08-23 16:53:15 UTC (rev 9547) @@ -35,7 +35,7 @@ $New=$_POST['New']; } -echo '<a href="' . $rootpath . '/SelectProduct.php">' . _('Back to Items') . '</a><br />' . "\n"; +echo InternalLink($rootpath, 'SelectProduct.php', _('Back to Items')) . '<br />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Stock') . '" alt="" />' . ' ' . $title . '</p>'; @@ -66,7 +66,11 @@ if ($UploadTheFile=='Yes'){ $result = move_uploaded_file($_FILES['ItemPicture']['tmp_name'], $filename); - $message = ($result)?_('File url') .'<a href="'. $filename .'">' . $filename . '</a>' : _('Something is wrong with uploading a file'); + if ($result) { + $message = ('File url') . InternalLink('', $filename, $filename); + } else { + $message = _('Something is wrong with uploading a file'); + } } /* EOR Add Image upload for New Item - by Ori */ } @@ -911,7 +915,7 @@ $_POST['CategoryID']=$Category; } -echo '</select> <a target="_blank" href="'. $rootpath . '/StockCategories.php">' . _('Add or Modify Stock Categories') . '</a></td></tr>'; +echo '</select> ' . InternalLink($rootpath, 'StockCategories.php', _('Add or Modify Stock Categories')) . '</td></tr>'; if (!isset($_POST['EOQ']) or $_POST['EOQ']==''){ $_POST['EOQ']=0; Modified: trunk/SuppCreditGRNs.php =================================================================== --- trunk/SuppCreditGRNs.php 2012-08-22 21:13:13 UTC (rev 9546) +++ trunk/SuppCreditGRNs.php 2012-08-23 16:53:15 UTC (rev 9547) @@ -24,7 +24,7 @@ if (!isset($_SESSION['SuppTrans'])){ prnMsg(_('To enter a supplier transactions the supplier must first be selected from the supplier selection screen') . ', ' . _('then the link to enter a supplier credit note must be clicked on'),'info'); - echo '<br /><a href="' . $rootpath . '/SelectSupplier.php">' . _('Select A Supplier to Enter a Transaction For') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'SelectSupplier.php', _('Select A Supplier to Enter a Transaction For')); include('includes/footer.inc'); exit; /*It all stops here if there aint no supplier selected and credit note initiated ie $_SESSION['SuppTrans'] started off*/ @@ -89,13 +89,15 @@ foreach ($_SESSION['SuppTrans']->GRNs as $EnteredGRN){ - echo '<tr><td>' . $EnteredGRN->GRNNo . '</td> + echo '<tr> + <td>' . $EnteredGRN->GRNNo . '</td> <td>' . $EnteredGRN->ItemCode . '</td> <td>' . $EnteredGRN->ItemDescription . '</td> <td class="number">' . locale_number_format($EnteredGRN->This_QuantityInv,$EnteredGRN->DecimalPlaces) . '</td> <td class="number">' . locale_money_format($EnteredGRN->ChgPrice,$_SESSION['SuppTrans']->CurrCode) . '</td> <td class="number">' . locale_money_format($EnteredGRN->ChgPrice * $EnteredGRN->This_QuantityInv,$_SESSION['SuppTrans']->CurrCode) . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $EnteredGRN->GRNNo . '">' . _('Delete') . '</a></td></tr>'; + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $EnteredGRN->GRNNo, _('Delete')) . '</td> + </tr>'; $TotalValueCharged = $TotalValueCharged + ($EnteredGRN->ChgPrice * $EnteredGRN->This_QuantityInv); @@ -108,7 +110,7 @@ echo '<tr><th colspan="5" class="header">' . _('Total Value Credited Against Goods') . ':</th> <th class="header"><u>' . locale_money_format($TotalValueCharged,$_SESSION['SuppTrans']->CurrCode) . '</u></th></tr>'; -echo '</table><br /><div class="centre"><a href="' . $rootpath . '/SupplierCredit.php">' . _('Back to Credit Note Entry') . '</a></div>'; +echo '</table><br /><div class="centre">' . InternalLink($rootpath, 'SupplierCredit.php', _('Back to Credit Note Entry')) . '</div>'; /* Now get all the GRNs for this supplier from the database after the date entered */ @@ -197,7 +199,7 @@ if (DB_num_rows($GRNResults)==0){ prnMsg(_('There are no goods received records for') . ' ' . $_SESSION['SuppTrans']->SupplierName . '<br /> ' . _('To enter a credit against goods received') . ', ' . - _('the goods must first be received using') . ' <a href="' . $rootpath . '/PO_SelectOSPurchOrder.php?SupplierID=' . $_SESSION['SuppTrans']->SupplierID . '">' . _('this link') . ' </a>' . + _('the goods must first be received using') . InternalLink($rootpath, 'PO_SelectOSPurchOrder.php?SupplierID=' . $_SESSION['SuppTrans']->SupplierID, _('this link')) . _('to select purchase orders to receive'),'info'); echo '<br />'; // include('includes/footer.inc'); Modified: trunk/SupplierAllocations.php =================================================================== --- trunk/SupplierAllocations.php 2012-08-22 21:13:13 UTC (rev 9546) +++ trunk/SupplierAllocations.php 2012-08-23 16:53:15 UTC (rev 9547) @@ -569,56 +569,50 @@ } echo '<table class="selection">'; - $TableHeader = '<tr><th>' . _('Trans Type') . - '</th><th>' . _('Supplier') . - '</th><th>' . _('Number') . - '</th><th>' . _('Date') . - '</th><th>' . _('Total') . - '</th><th>' . _('To Alloc') . '</th></tr>'. "\n"; + $TableHeader = '<tr> + <th>' . _('Trans Type') . '</th> + <th>' . _('Supplier') . '</th> + <th>' . _('Number') . '</th> + <th>' . _('Date') . '</th> + <th>' . _('Total') . '</th> + <th>' . _('To Alloc') . '</th> + </tr>'; - echo $TableHeader; + echo $TableHeader; - /* set up table of TransType - Supplier - Trans No - Date - Total - Left to alloc */ + /* set up table of TransType - Supplier - Trans No - Date - Total - Left to alloc */ - $RowCounter = 0; - $k = 0; //row colour counter - while ($myrow = DB_fetch_array($result)) { - if ($k == 1){ - echo '<tr class="EvenTableRows">'; - $k = 0; - } else { - echo '<tr class="OddTableRows">'; - $k = 1; - } + $RowCounter = 0; + $k = 0; //row colour counter + while ($myrow = DB_fetch_array($result)) { + if ($k == 1){ + echo '<tr class="EvenTableRows">'; + $k = 0; + } else { + echo '<tr class="OddTableRows">'; + $k = 1; + } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%0.2f</td> - <td class="number">%0.2f</td> - <td><a href="%sAllocTrans=%s">' . _('Allocate') .'</td> - </tr>', - $myrow['typename'], - $myrow['suppname'], - $myrow['transno'], - ConvertSQLDate($myrow['trandate']), - locale_money_format($myrow['total'],$myrow['currcode']), - locale_money_format($myrow['total']-$myrow['alloc'],$myrow['currcode']), - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'?', - $myrow['id']); + echo '<td>' . $myrow['typename'] . '</td> + <td>' . $myrow['suppname'] . '</td> + <td>' . $myrow['transno'] . '</td> + <td>' . ConvertSQLDate($myrow['trandate']) . '</td> + <td class="number">' . locale_money_format($myrow['total'],$myrow['currcode']) . '</td> + <td class="number">' . locale_money_format($myrow['total']-$myrow['alloc'],$myrow['currcode']) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'?AllocTrans=' . $myrow['id'], _('Allocate')) .'</td> + </tr>'; - } + } } else { /* show all outstanding payments and credits to be allocated */ - /*Clear any previous allocation records */ + /*Clear any previous allocation records */ - unset($_SESSION['Alloc']->Allocs); - unset($_SESSION['Alloc']); + unset($_SESSION['Alloc']->Allocs); + unset($_SESSION['Alloc']); - $sql = "SELECT id, - transno, + $sql = "SELECT id, + transno, typename, type, suppliers.supplierid, @@ -663,22 +657,14 @@ $k = 1; } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td><a href="%sAllocTrans=%s">' . _('Allocate') . '</td> - </tr>', - $myrow['typename'], - $myrow['suppname'], - $myrow['transno'], - ConvertSQLDate($myrow['trandate']), - locale_money_format($myrow['total'],$myrow['currcode']), - locale_money_format($myrow['total']-$myrow['alloc'],$myrow['currcode']), - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'?', - $myrow['id']); + echo '<td>' . $myrow['typename'] . '</td> + <td>' . $myrow['suppname'] . '</td> + <td>' . $myrow['transno'] . '</td> + <td>' . ConvertSQLDate($myrow['trandate']) . '</td> + <td class="number">' . locale_money_format($myrow['total'],$myrow['currcode']) . '</td> + <td class="number">' . locale_money_format($myrow['total']-$myrow['alloc'],$myrow['currcode']) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'?AllocTrans=' . $myrow['id'], _('Allocate')) . '</td> + </tr>'; } //END WHILE LIST LOOP Modified: trunk/SupplierBalsAtPeriodEnd.php =================================================================== --- trunk/SupplierBalsAtPeriodEnd.php 2012-08-22 21:13:13 UTC (rev 9546) +++ trunk/SupplierBalsAtPeriodEnd.php 2012-08-23 16:53:15 UTC (rev 9547) @@ -54,7 +54,7 @@ $title = _('Supplier Balances - Problem Report'); include('includes/header.inc'); prnMsg(_('The Supplier details could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $SQL; } @@ -65,7 +65,7 @@ $title = _('Supplier Balances - Problem Report'); include('includes/header.inc'); prnMsg(_('There are no supplier balances to list'),'error'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } Modified: trunk/SupplierContacts.php =================================================================== --- trunk/SupplierContacts.php 2012-08-22 21:13:13 UTC (rev 9546) +++ trunk/SupplierContacts.php 2012-08-23 16:53:15 UTC (rev 9547) @@ -15,7 +15,7 @@ $SupplierID = $_POST['SupplierID']; } -echo '<a href="' . $rootpath . '/SelectSupplier.php">' . _('Back to Suppliers') . '</a><br />'; +echo InternalLink($rootpath, '/SelectSupplier.php', _('Back to Suppliers')) . '<br />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Supplier Allocations') . '" alt="" />' . ' ' . $title . '</p>'; @@ -145,25 +145,15 @@ <th>' . _('Email') . '</th></tr>'; DB_data_seek($result, 0); while ($myrow = DB_fetch_array($result)) { - printf('<tr><td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="mailto:%s">%s</td> - <td><a href="%s?SupplierID=%s&SelectedContact=%s">' . _('Edit') . '</td> - <td><a href="%s?SupplierID=%s&SelectedContact=%s&delete=yes" onclick=\'return confirm("' . _('Are you sure you wish to delete this contact?') . '");\'>' . _('Delete') . '</td></tr>', - $myrow['contact'], - $myrow['position'], - $myrow['tel'], - $myrow['fax'], - $myrow['email'], - $myrow['email'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), - $SupplierID, - $myrow['contact'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), - $SupplierID, - $myrow['contact']); + echo '<tr> + <td>' . $myrow['contact'] . '</td> + <td>' . $myrow['position'] . '</td> + <td>' . $myrow['tel'] . '</td> + <td>' . $myrow['fax'] . '</td> + <td>' . $myrow['email'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SupplierID=' . $SupplierID . '&SelectedContact=' . $myrow['contact'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SupplierID=' . $SupplierID . '&SelectedContact=' . $myrow['contact'] . '&delete=yes', _('Delete')) . '</td> + </tr>'; } } else { prnMsg(_('There are no contacts defined for this supplier'),'info'); @@ -176,8 +166,7 @@ echo '</table><br />'; if (isset($SelectedContact)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SupplierID=$SupplierID">' . - _('Show all the supplier contacts for') . ' ' . $SupplierID . '</a></div></p>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SupplierID=' . $SupplierID, _('Show all the supplier contacts for') . ' ' . $SupplierID) . '</div>'; } if (! isset($_GET['delete'])) { @@ -243,7 +232,7 @@ <td><input type="text" name="Fax" size="31" maxlength="30" value="' . $_POST['Fax'] . '" /></td></tr> <tr><td>' . _('Mobile No') . ':</td> <td><input type="text" name="Mobile" size="31" maxlength="30" value="' . $_POST['Mobile'] . '" /></td></tr> - <tr><td><a href="Mailto:' . $_POST['Email'] . '">' . _('Email') . ':</a></td> + <tr><td>' . _('Email') . ':</td> <td><input type="text" name="Email" size="51" maxlength="50" value="' . $_POST['Email'] . '" /></td></tr> </table><br />'; Modified: trunk/css/silverwolf/images/inventory.png =================================================================== --- trunk/css/silverwolf/images/inventory.png 2012-08-22 21:13:13 UTC (rev 9546) +++ trunk/css/silverwolf/images/inventory.png 2012-08-23 16:53:15 UTC (rev 9547) @@ -1,11 +1,33 @@ \x89PNG |
From: <tim...@us...> - 2012-08-23 21:01:48
|
Revision: 9548 http://weberp.svn.sourceforge.net/weberp/?rev=9548&view=rev Author: tim_schofield Date: 2012-08-23 21:01:40 +0000 (Thu, 23 Aug 2012) Log Message: ----------- Replace <a tags with InternalLink() function Modified Paths: -------------- trunk/Shippers.php trunk/Shipt_Select.php trunk/ShiptsList.php trunk/SpecialOrder.php trunk/StockAdjustments.php trunk/StockAdjustmentsControlled.php trunk/StockCategories.php trunk/StockCheck.php trunk/StockCostUpdate.php trunk/StockCounts.php trunk/StockDispatch.php trunk/StockLocMovements.php trunk/StockLocStatus.php Modified: trunk/Shippers.php =================================================================== --- trunk/Shippers.php 2012-08-23 16:53:15 UTC (rev 9547) +++ trunk/Shippers.php 2012-08-23 21:01:40 UTC (rev 9548) @@ -138,16 +138,11 @@ echo '<tr class="OddTableRows">'; $k=1; } - printf('<td>%s</td> - <td>%s</td> - <td><a href="%sSelectedShipper=%s">'. _('Edit').' </td> - <td><a href="%sSelectedShipper=%s&delete=1">'. _('Delete'). '</td></tr>', - $myrow['shipper_id'], - $myrow['shippername'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['shipper_id'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['shipper_id']); + echo '<td>' . $myrow['shipper_id'] . '</td> + <td>' . $myrow['shippername'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedShipper=' . $myrow['shipper_id'], _('Edit')) . ' </td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedShipper=' . $myrow['shipper_id'] . '&delete=1', _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP echo '</table>'; @@ -156,7 +151,7 @@ if (isset($SelectedShipper)) { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; - echo '<div class="centre"><a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'._('REVIEW RECORDS').'</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('REVIEW RECORDS')) . '</div>'; } if (!isset($_GET['delete'])) { Modified: trunk/Shipt_Select.php =================================================================== --- trunk/Shipt_Select.php 2012-08-23 16:53:15 UTC (rev 9547) +++ trunk/Shipt_Select.php 2012-08-23 21:01:40 UTC (rev 9548) @@ -315,38 +315,24 @@ $URL_Close_Shipment = $URL_View_Shipment . '&Close=Yes'; - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%s">'._('Costing').'</a></td> - <td><a href="%s">'._('Modify').'</a></td> - <td><a href="%s"><b>'._('Close').'</b></a></td> - </tr>', - $myrow['shiptref'], - $myrow['suppname'], - $myrow['vessel'], - $myrow['voyageref'], - $FormatedETA, - $URL_View_Shipment, - $URL_Modify_Shipment, - $URL_Close_Shipment); + echo '<td>' . $myrow['shiptref'] . '</td> + <td>' . $myrow['suppname'] . '</td> + <td>' . $myrow['vessel'] . '</td> + <td>' . $myrow['voyageref'] . '</td> + <td>' . $FormatedETA . '</td> + <td>' . InternalLink('', $URL_View_Shipment, _('Costing')) . '</td> + <td>' . InternalLink('', $URL_Modify_Shipment, _('Modify')) . '</td> + <td>' . InternalLink('', $URL_Close_Shipment, '<b>'._('Close').'</b>') . '</a></td> + </tr>'; } else { - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%s">'._('Costing').'</a></td> - </tr>', - $myrow['shiptref'], - $myrow['suppname'], - $myrow['vessel'], - $myrow['voyage'], - $FormatedETA, - $URL_View_Shipment); + echo '<td>' . $myrow['shiptref'] . '</td> + <td>' . $myrow['suppname'] . '</td> + <td>' . $myrow['vessel'] . '</td> + <td>' . $myrow['voyage'] . '</td> + <td>' . $FormatedETA . '</td> + <td>' . InternalLink('', $URL_View_Shipment, _('Costing')) . '</td> + </tr>'; } $j++; If ($j == 15){ Modified: trunk/ShiptsList.php =================================================================== --- trunk/ShiptsList.php 2012-08-23 16:53:15 UTC (rev 9547) +++ trunk/ShiptsList.php 2012-08-23 21:01:40 UTC (rev 9548) @@ -24,9 +24,9 @@ $ShiptsResult = DB_query($SQL,$db, $ErrMsg); if (DB_num_rows($ShiptsResult)==0){ - prnMsg(_('There are no open shipments currently set up for').' ' . $_GET['SupplierName'],'warn'); + prnMsg(_('There are no open shipments currently set up for').' ' . $_GET['SupplierName'],'warn'); include('includes/footer.inc'); - exit; + exit; } /*show a table of the shipments returned by the SQL */ @@ -40,16 +40,16 @@ $k = 0; //row colour counter while ($myrow=DB_fetch_array($ShiptsResult)) { - if ($k==1){ - echo '<tr class="OddTableRows">'; - $k=0; - } else { - echo '<tr class="EvenTableRows">'; - $k=1; - } + if ($k==1){ + echo '<tr class="OddTableRows">'; + $k=0; + } else { + echo '<tr class="EvenTableRows">'; + $k=1; + } - echo '<td><a href="'.$rootpath.'/Shipments.php?SelectedShipment='.$myrow['shiptref'].'">'.$myrow['shiptref'].'</a></td> - <td>'.$myrow['vessel'].'</td> + echo '<td>' . InternalLinks($rootpath, 'Shipments.php?SelectedShipment='.$myrow['shiptref'], $myrow['shiptref']).'</td> + <td>'.$myrow['vessel'].'</td> <td>'.ConvertSQLDate($myrow['eta']).'</td> </tr>'; Modified: trunk/SpecialOrder.php =================================================================== --- trunk/SpecialOrder.php 2012-08-23 16:53:15 UTC (rev 9547) +++ trunk/SpecialOrder.php 2012-08-23 21:01:40 UTC (rev 9548) @@ -28,7 +28,7 @@ if (!isset($_SESSION['SupplierID'])){ echo '<br /><br />'; prnMsg(_('To set up a special') . ', ' . _('the supplier must first be selected from the Select Supplier page'),'info'); - echo '<br /><a href="' . $rootpath . '/SelectSupplier.php">' . _('Select the supplier now') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'SelectSupplier.php', _('Select the supplier now')); include('includes/footer.inc'); exit; } @@ -37,7 +37,7 @@ echo '<br /> <br />' . _('To set up a special') . ', ' . _('the customer must first be selected from the Select Customer page') . ' <br /> - <a href="' . $rootpath . '/SelectCustomer.php">' . _('Select the customer now') . '</a>'; + ' . InternalLink($rootpath, 'SelectCustomer.php', _('Select the customer now')); include('includes/footer.inc'); exit; } @@ -285,7 +285,7 @@ if ($InputError!=1){ if (IsEmailAddress($_SESSION['UserEmail'])){ - $UserDetails = ' <a href="mailto:' . $_SESSION['UserEmail'] . '">' . $_SESSION['UsersRealName']. '</a>'; + $UserDetails = ' ' . $_SESSION['UsersRealName']. ' '; } else { $UserDetails = ' ' . $_SESSION['UsersRealName'] . ' '; } @@ -467,8 +467,8 @@ } /* end of the loop round the detail line items on the order */ - echo '<br /><br />' . _('Purchase Order') . ' ' . $_SESSION['SPL'.$identifier]->PurchOrderNo . ' ' . _('on') . ' ' . $_SESSION['SPL'.$identifier]->SupplierName . ' ' . _('has been created'); - echo '<br /><a href="' . $rootpath . '/PO_PDFPurchOrder.php?OrderNo=' . $_SESSION['SPL'.$identifier]->PurchOrderNo . '">' . _('Print Purchase Order') . '</a>'; + echo '<br />' . _('Purchase Order') . ' ' . $_SESSION['SPL'.$identifier]->PurchOrderNo . ' ' . _('on') . ' ' . $_SESSION['SPL'.$identifier]->SupplierName . ' ' . _('has been created'); + echo '<br />' . InternalLink($rootpath, 'PO_PDFPurchOrder.php?OrderNo=' . $_SESSION['SPL'.$identifier]->PurchOrderNo, _('Print Purchase Order')); /*Now insert the sales order too */ @@ -563,14 +563,14 @@ if (count($_SESSION['AllowedPageSecurityTokens'])>1){ /* Only allow print of packing slip for internal staff - customer logon's cannot go here */ - echo '<p><a href="' . $rootpath . '/PrintCustOrder.php?TransNo=' . $SalesOrderNo . '">' . _('Print packing slip') . ' (' . _('Preprinted stationery') . ')</a></p>'; - echo '<p><a href="' . $rootpath . '/PrintCustOrder_generic.php?TransNo=' . $SalesOrderNo . '">' . _('Print packing slip') . ' (' . _('Laser') . ')</a></p>'; + echo '<p>' . InternalLink($rootpath, 'PrintCustOrder.php?TransNo=' . $SalesOrderNo, _('Print packing slip') . ' (' . _('Preprinted stationery') . ')') . '</p>'; + echo '<p>' . InternalLink($rootpath, 'PrintCustOrder_generic.php?TransNo=' . $SalesOrderNo, _('Print packing slip') . ' (' . _('Laser') . ')') . '</p>'; } $Result = DB_Txn_Commit($db); unset($_SESSION['SPL'.$identifier]); /*Clear the PO data to allow a newy to be input*/ - echo '<br /><br /><a href="' . $rootpath . '/SpecialOrder.php">' . _('Enter A New Special Order') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'SpecialOrder.php', _('Enter A New Special Order')); exit; } /*end if there were no input errors trapped */ } /* end of the code to do transfer the SPL object to the database - user hit the place Order*/ @@ -654,7 +654,7 @@ <td class="number">' . $DisplayLineTotal . '</td> <td class="number">' . $DisplayLineCostTotalCurr . '</td> <td class="number">' . $DisplayLineTotalCurr . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $SPLLine->LineNo . '">' . _('Delete') . '</a></td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $SPLLine->LineNo, _('Delete')) . '</td> </tr>'; $_SESSION['SPL'.$identifier]->total += ($LineTotal/$_SESSION['SPL'.$identifier]->CustCurrExRate); Modified: trunk/StockAdjustments.php =================================================================== --- trunk/StockAdjustments.php 2012-08-23 16:53:15 UTC (rev 9547) +++ trunk/StockAdjustments.php 2012-08-23 21:01:40 UTC (rev 9548) @@ -90,7 +90,7 @@ echo '<tr> <td>'.$myrow['stockid'].'</td> <td>'.$myrow['description'].'</td> - <td><a href="StockAdjustments.php?StockID='.$myrow['stockid'].'&Description='.$myrow['description'].'&identifier=' . $identifier . '">'._('Adjust').'</a></td> + <td>'.InternalLink('', 'StockAdjustments.php?StockID='.$myrow['stockid'].'&Description='.$myrow['description'].'&identifier=' . $identifier, _('Adjust')).'</td> </tr>'; } echo '</table>'; @@ -323,7 +323,7 @@ unset ($_SESSION['Adjustment'.$identifier]); } /* end if there was no input error */ unset($identifier); - echo '<br /><div class="centre"><a href="'. $rootpath. '/StockAdjustments.php?NewAdjustment=Yes">'._('Enter another adjustment').'</a></div><br />'; + echo '<br /><div class="centre">'. InternalLink($rootpath, 'StockAdjustments.php?NewAdjustment=Yes', _('Enter another adjustment')) . '</div><br />'; include('includes/footer.inc'); exit; }/* end if the user hit enter the adjustment */ @@ -421,8 +421,8 @@ } echo '<input type="hidden" name="Quantity" value="' . locale_number_format($_SESSION['Adjustment'.$identifier]->Quantity , $_SESSION['Adjustment'.$identifier]->DecimalPlaces). '" /> '.locale_number_format($_SESSION['Adjustment'.$identifier]->Quantity, $_SESSION['Adjustment'.$identifier]->DecimalPlaces).' - [<a href="'.$rootpath.'/StockAdjustmentsControlled.php?AdjType=REMOVE&identifier=' . $identifier . '">'._('Remove').'</a>] - [<a href="'.$rootpath.'/StockAdjustmentsControlled.php?AdjType=ADD&identifier=' . $identifier . '">'._('Add').'</a>]'; + ['.InternalLink($rootpath, 'StockAdjustmentsControlled.php?AdjType=REMOVE&identifier=' . $identifier, _('Remove')).'] + ['.InternalLink($rootpath, 'StockAdjustmentsControlled.php?AdjType=ADD&identifier=' . $identifier, _('Add')).']'; } else { echo '<input type="text" class="number" name="Quantity" size="12" maxlength="12" value="' . locale_number_format($Quantity, $_SESSION['Adjustment'.$identifier]->DecimalPlaces) . '" />'; } @@ -455,11 +455,11 @@ $_POST['StockLocation']=''; } -echo '<br /><a href="'. $rootpath. '/StockStatus.php?StockID='. $StockID . '">'._('Show Stock Status').'</a>'; -echo '<br /><a href="'.$rootpath.'/StockMovements.php?StockID=' . $StockID . '">'._('Show Movements').'</a>'; -echo '<br /><a href="'.$rootpath.'/StockUsage.php?StockID=' . $StockID . '&StockLocation=' . $_POST['StockLocation'] . '">'._('Show Stock Usage').'</a>'; -echo '<br /><a href="'.$rootpath.'/SelectSalesOrder.php?SelectedStockItem='. $StockID .'&StockLocation=' . $_POST['StockLocation'] . '">'. _('Search Outstanding Sales Orders').'</a>'; -echo '<br /><a href="'.$rootpath.'/SelectCompletedOrder.php?SelectedStockItem=' . $StockID .'">'._('Search Completed Sales Orders').'</a>'; +echo '<br />' . InternalLink($rootpath, 'StockStatus.php?StockID='. $StockID, _('Show Stock Status')); +echo '<br />' . InternalLink($rootpath, 'StockMovements.php?StockID=' . $StockID, _('Show Movements')); +echo '<br />' . InternalLink($rootpath, 'StockUsage.php?StockID=' . $StockID . '&StockLocation=' . $_POST['StockLocation'], _('Show Stock Usage')); +echo '<br />' . InternalLink($rootpath, 'SelectSalesOrder.php?SelectedStockItem='. $StockID .'&StockLocation=' . $_POST['StockLocation'], _('Search Outstanding Sales Orders')); +echo '<br />' . InternalLink($rootpath, 'SelectCompletedOrder.php?SelectedStockItem=' . $StockID .'">'._('Search Completed Sales Orders')); echo '</div></form>'; include('includes/footer.inc'); Modified: trunk/StockAdjustmentsControlled.php =================================================================== --- trunk/StockAdjustmentsControlled.php 2012-08-23 16:53:15 UTC (rev 9547) +++ trunk/StockAdjustmentsControlled.php 2012-08-23 21:01:40 UTC (rev 9548) @@ -12,7 +12,7 @@ if (!isset($_SESSION['Adjustment'.$identifier])) { /* This page can only be called when a stock adjustment is pending */ - echo '<div class="centre"><a href="' . $rootpath . '/StockAdjustments.php?NewAdjustment=Yes">'. _('Enter A Stock Adjustment'). '</a><br />'; + echo '<div class="centre">' . InternalLink($rootpath, 'StockAdjustments.php?NewAdjustment=Yes', _('Enter A Stock Adjustment')) . '<br />'; prnMsg( _('This page can only be opened if a stock adjustment for a controlled item has been entered').'<br />','error'); echo '</div>'; include('includes/footer.inc'); @@ -29,7 +29,7 @@ //Make sure this item is really controlled if ( $LineItem->Controlled != 1 ){ - echo '<a href="' . $rootpath . '/StockAdjustments.php?NewAdjustment=Yes">'._('Enter A Stock Adjustment').'</a>'; + echo InternalLink($rootpath, 'StockAdjustments.php?NewAdjustment=Yes', _('Enter A Stock Adjustment')); prnMsg('<br />'. _('Notice') . ' - ' . _('The adjusted item must be defined as controlled to require input of the batch numbers or serial numbers being adjusted'),'error'); include('includes/footer.inc'); exit; @@ -38,7 +38,7 @@ /***** get the page going now... *****/ echo '<div class="centre">'; -echo '<br /><a href="'.$rootpath.'/StockAdjustments.php?identifier=' . $identifier . '">' . _('Back to Adjustment Screen') . '</a>'; +echo '<br />'.InternalLink($rootpath, 'StockAdjustments.php?identifier=' . $identifier, _('Back to Adjustment Screen')); echo '<br /><font size="2"><b>'. _('Adjustment of controlled item').' ' . $LineItem->StockID . ' - ' . $LineItem->ItemDescription ; Modified: trunk/StockCategories.php =================================================================== --- trunk/StockCategories.php 2012-08-23 16:53:15 UTC (rev 9547) +++ trunk/StockCategories.php 2012-08-23 21:01:40 UTC (rev 9548) @@ -311,31 +311,18 @@ echo '<tr class="OddTableRows">'; $k=1; } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td><a href="%sSelectedCategory=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedCategory=%s&delete=yes" onclick="return confirm("' . _('Are you sure you wish to delete this stock category? Additional checks will be performed before actual deletion to ensure data integrity is not compromised.') . '");">' . _('Delete') . '</td> - </tr>', - $myrow['categoryid'], - $myrow['categorydescription'], - $myrow['stocktype'], - $myrow['stockact'], - $myrow['adjglact'], - $myrow['issueglact'], - $myrow['purchpricevaract'], - $myrow['materialuseagevarac'], - $myrow['wipact'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['categoryid'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['categoryid']); + echo '<td>' . $myrow['categoryid'] . '</td> + <td>' . $myrow['categorydescription'] . '</td> + <td>' . $myrow['stocktype'] . '</td> + <td class="number">' . $myrow['stockact'] . '</td> + <td class="number">' . $myrow['adjglact'] . '</td> + <td class="number">' . $myrow['issueglact'] . '</td> + <td class="number">' . $myrow['purchpricevaract'] . '</td> + <td class="number">' . $myrow['materialuseagevarac'] . '</td> + <td class="number">' . $myrow['wipact'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedCategory=' . $myrow['categoryid'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedCategory=' . $myrow['categoryid'] . '&delete=yes', _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP echo '</table>'; @@ -637,7 +624,7 @@ echo '<td align="center"><input type="checkbox" name="PropReqSO' . $PropertyCounter .'" /></td>'; } - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DeleteProperty=' . $myrow['stkcatpropid'] .'&SelectedCategory=' . $SelectedCategory . '" onclick=\'return confirm("' . _('Are you sure you wish to delete this property? All properties of this type set up for stock items will also be deleted.') . '");\'>' . _('Delete') . '</td> + echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DeleteProperty=' . $myrow['stkcatpropid'] .'&SelectedCategory=' . $SelectedCategory, _('Delete')) . '</td> </tr>'; $PropertyCounter++; @@ -670,7 +657,7 @@ </form>'; if (isset($SelectedCategory)) { - echo '<div style="text-align: right"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Show All Stock Categories') . '</a></div>'; + echo '<div style="text-align: right">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Show All Stock Categories')) . '</div>'; } include('includes/footer.inc'); Modified: trunk/StockCheck.php =================================================================== --- trunk/StockCheck.php 2012-08-23 16:53:15 UTC (rev 9547) +++ trunk/StockCheck.php 2012-08-23 21:01:40 UTC (rev 9548) @@ -43,7 +43,7 @@ $title = _('Stock Count Sheets - Problem Report'); include('includes/header.inc'); prnMsg(_('The inventory quantities could not be added to the freeze file because') . ' ' . DB_error_msg($db),'error'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $sql; } @@ -64,7 +64,7 @@ $title = _('Stock Freeze') . ' - ' . _('Problem Report') . '.... '; include('includes/header.inc'); prnMsg(_('The old quantities could not be deleted from the freeze file because') . ' ' . DB_error_msg($db),'error'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $sql; } @@ -94,7 +94,7 @@ $title = _('Stock Freeze - Problem Report'); include('includes/header.inc'); prnMsg(_('The inventory quantities could not be added to the freeze file because') . ' ' . DB_error_msg($db),'error'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $sql; } @@ -103,7 +103,7 @@ } else { $title = _('Stock Check Freeze Update'); include('includes/header.inc'); - echo '<p><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Print Check Sheets') . '</a></p>'; + echo '<p>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Print Check Sheets')) . '</p>'; prnMsg( _('Added to the stock check file successfully'),'success'); include('includes/footer.inc'); exit; @@ -138,7 +138,7 @@ $title = _('Stock Sheets') . ' - ' . _('Problem Report') . '.... '; include('includes/header.inc'); prnMsg( _('The inventory quantities could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $SQL; } @@ -149,7 +149,7 @@ $title = _('Stock Count Sheets - Problem Report'); include('includes/header.inc'); prnMsg(_('Before stock count sheets can be printed, a copy of the stock quantities needs to be taken - the stock check freeze. Make a stock check data file first'),'error'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } @@ -190,7 +190,7 @@ $title = _('Stock Check Sheets - Problem Report'); include('includes/header.inc'); prnMsg( _('The sales order demand quantities could not be retrieved by the SQL because') . ' ' . DB_error_msg($db), 'error'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $SQL; } Modified: trunk/StockCostUpdate.php =================================================================== --- trunk/StockCostUpdate.php 2012-08-23 16:53:15 UTC (rev 9547) +++ trunk/StockCostUpdate.php 2012-08-23 21:01:40 UTC (rev 9548) @@ -15,7 +15,7 @@ $StockID =trim(mb_strtoupper($_POST['StockID'])); } -echo '<a href="' . $rootpath . '/SelectProduct.php">' . _('Back to Items') . '</a><br />'; +echo InternalLink($rootpath, 'SelectProduct.php', _('Back to Items')) . '<br />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Inventory Adjustment') . '" alt="" />' . ' ' . $title . '</p>'; @@ -200,11 +200,12 @@ echo '</table><br /><div class="centre"><button type="submit" name="UpdateData">' . _('Update') . '</button><br />'; } if ($myrow['mbflag']!='D'){ - echo '<div class="centre"><a href="' . $rootpath . '/StockStatus.php?StockID=' . $StockID . '">' . _('Show Stock Status') . '</a>'; - echo '<br /><a href="' . $rootpath . '/StockMovements.php?StockID=' . $StockID . '">' . _('Show Stock Movements') . '</a>'; - echo '<br /><a href="' . $rootpath . '/StockUsage.php?StockID=' . $StockID . '">' . _('Show Stock Usage') .'</a>'; - echo '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?SelectedStockItem=' . $StockID . '">' . _('Search Outstanding Sales Orders') . '</a>'; - echo '<br /><a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedStockItem=' . $StockID . '">' . _('Search Completed Sales Orders') . '</a></div>'; + echo '<div class="centre"> + ' . InternalLink($rootpath, 'StockStatus.php?StockID=' . $StockID, _('Show Stock Status')) . '<br /> + ' . InternalLink($rootpath, 'StockMovements.php?StockID=' . $StockID, _('Show Stock Movements')) . '<br /> + ' . InternalLink($rootpath, 'StockUsage.php?StockID=' . $StockID, _('Show Stock Usage')) .'<br /> + ' . InternalLink($rootpath, 'SelectSalesOrder.php?SelectedStockItem=' . $StockID, _('Search Outstanding Sales Orders')) . '<br /> + ' . InternalLink($rootpath, 'SelectCompletedOrder.php?SelectedStockItem=' . $StockID, _('Search Completed Sales Orders')) . '</div>'; } echo '</form></div>'; include('includes/footer.inc'); Modified: trunk/StockCounts.php =================================================================== --- trunk/StockCounts.php 2012-08-23 16:53:15 UTC (rev 9547) +++ trunk/StockCounts.php 2012-08-23 21:01:40 UTC (rev 9548) @@ -25,9 +25,11 @@ echo '<table class="selection"><tr>'; if ($_GET['Action']=='View'){ - echo '<td><a href="' . $rootpath . '/StockCounts.php?&Action=Enter">' . _('Resuming Entering Counts') . '</a> </td><td>' . _('Viewing Entered Counts') . '</td>'; + echo '<td>' . InternalLink($rootpath, 'StockCounts.php?&Action=Enter', _('Resuming Entering Counts')) . '</td> + <td>' . _('Viewing Entered Counts') . '</td>'; } else { - echo '<td>'._('Entering Counts') .'</td><td> <a href="' . $rootpath . '/StockCounts.php?&Action=View">' . _('View Entered Counts') . '</a></td>'; + echo '<td>'._('Entering Counts') .'</td> + <td>' . InternalLink($rootpath, 'StockCounts.php?&Action=View', _('View Entered Counts')) . '</td>'; } echo '</tr></table><br />'; Modified: trunk/StockDispatch.php =================================================================== --- trunk/StockDispatch.php 2012-08-23 16:53:15 UTC (rev 9547) +++ trunk/StockDispatch.php 2012-08-23 21:01:40 UTC (rev 9548) @@ -100,8 +100,7 @@ $title = _('Stock Dispatch - Problem Report'); include('includes/header.inc'); prnMsg( _('The Stock Dispatch report could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); - echo '<br /> - <a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $sql; } @@ -113,8 +112,7 @@ include('includes/header.inc'); echo '<br />'; prnMsg( _('The stock dispatch did not have any items to list'),'warn'); - echo '<br /> - <a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } @@ -339,7 +337,7 @@ if (DB_num_rows($result1)==0){ echo '</table>'; prnMsg(_('There are no stock categories currently defined please use the link below to set them up'),'warn'); - echo '<br /><a href="' . $rootpath . '/StockCategories.php">' . _('Define Stock Categories') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'StockCategories.php', _('Define Stock Categories')); echo '</div> </form>'; include ('includes/footer.inc'); Modified: trunk/StockLocMovements.php =================================================================== --- trunk/StockLocMovements.php 2012-08-23 16:53:15 UTC (rev 9547) +++ trunk/StockLocMovements.php 2012-08-23 21:01:40 UTC (rev 9548) @@ -105,28 +105,17 @@ $DisplayTranDate = ConvertSQLDate($myrow['trandate']); - printf('<td><a target="_blank" href="StockStatus.php?StockID=%s">%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - </tr>', - mb_strtoupper($myrow['stockid']), - mb_strtoupper($myrow['stockid']), - $myrow['typename'], - $myrow['transno'], - $DisplayTranDate, - $myrow['debtorno'], - locale_number_format($myrow['qty'], $myrow['decimalplaces']), - $myrow['reference'], - locale_money_format($myrow['price'],$_SESSION['CompanyRecord']['currencydefault']), - locale_number_format($myrow['discountpercent']*100,2), - locale_number_format($myrow['newqoh'],$myrow['decimalplaces'])); + echo '<td>' . InternalLink('', 'StockStatus.php?StockID=' . mb_strtoupper($myrow['stockid']), mb_strtoupper($myrow['stockid'])) . '</td> + <td>' . $myrow['typename'] . '</td> + <td>' . $myrow['transno'] . '</td> + <td>' . $DisplayTranDate . '</td> + <td>' . $myrow['debtorno'] . '</td> + <td class="number">' . locale_number_format($myrow['qty'], $myrow['decimalplaces']) . '</td> + <td>' . $myrow['reference'] . '</td> + <td class="number">' . locale_money_format($myrow['price'],$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_number_format($myrow['discountpercent']*100,2) . '</td> + <td class="number">' . locale_number_format($myrow['newqoh'],$myrow['decimalplaces']) . '</td> + </tr>'; $j++; If ($j == 16){ $j=1; Modified: trunk/StockLocStatus.php =================================================================== --- trunk/StockLocStatus.php 2012-08-23 16:53:15 UTC (rev 9547) +++ trunk/StockLocStatus.php 2012-08-23 21:01:40 UTC (rev 9548) @@ -27,9 +27,9 @@ while ($myrow=DB_fetch_array($resultStkLocs)){ if (isset($_POST['StockLocation']) AND $_POST['StockLocation']!='All'){ if ($myrow['loccode'] == $_POST['StockLocation']){ - echo '<option selected="True" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option selected="True" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ echo '<option selected="True" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; @@ -45,7 +45,7 @@ if (DB_num_rows($result1)==0){ echo '</table><br />'; prnMsg(_('There are no stock categories currently defined please use the link below to set them up'),'warn'); - echo '<br /><a href="' . $rootpath . '/StockCategories.php">' . _('Define Stock Categories') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'StockCategories.php', _('Define Stock Categories')); include ('includes/footer.inc'); exit; } @@ -158,9 +158,9 @@ $StockID = $myrow['stockid']; $sql = "SELECT Sum(salesorderdetails.quantity-salesorderdetails.qtyinvoiced) AS dem - FROM salesorderdetails, - salesorders - WHERE salesorders.orderno = salesorderdetails.orderno + FROM salesorderdetails, + salesorders + WHERE salesorders.orderno = salesorderdetails.orderno AND salesorders.fromstkloc='" . $myrow['loccode'] . "' AND salesorderdetails.completed=0 AND salesorderdetails.stkcode='" . $StockID . "'"; @@ -177,11 +177,11 @@ //Also need to add in the demand as a component of an assembly items if this items has any assembly parents. $sql = "SELECT Sum((salesorderdetails.quantity-salesorderdetails.qtyinvoiced)*bom.quantity) AS dem - FROM salesorderdetails, - salesorders, - bom, - stockmaster - WHERE salesorderdetails.stkcode=bom.parent + FROM salesorderdetails, + salesorders, + bom, + stockmaster + WHERE salesorderdetails.stkcode=bom.parent AND salesorders.orderno = salesorderdetails.orderno AND salesorders.fromstkloc='" . $myrow['loccode'] . "' AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 @@ -213,13 +213,13 @@ $sql = "SELECT SUM(purchorderdetails.quantityord*(CASE WHEN purchdata.conversionfactor IS NULL THEN 1 ELSE purchdata.conversionfactor END) - purchorderdetails.quantityrecd*(CASE WHEN purchdata.conversionfactor IS NULL THEN 1 ELSE purchdata.conversionfactor END)) AS qoo - FROM purchorderdetails - INNER JOIN purchorders - ON purchorderdetails.orderno=purchorders.orderno + FROM purchorderdetails + INNER JOIN purchorders + ON purchorderdetails.orderno=purchorders.orderno LEFT JOIN purchdata ON purchorders.supplierno=purchdata.supplierno AND purchorderdetails.itemcode=purchdata.stockid - WHERE purchorders.intostocklocation='" . $myrow['loccode'] . "' + WHERE purchorders.intostocklocation='" . $myrow['loccode'] . "' AND purchorderdetails.itemcode='" . $StockID . "' AND purchorders.status <> 'Cancelled' AND purchorders.status <> 'Rejected' @@ -247,27 +247,18 @@ echo '<tr class="EvenTableRows">'; $k=1; } - printf('<td><a target="_blank" href="StockStatus.php?StockID=%s">%s</a></td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number"><a target="_blank" href="SelectProduct.php?StockID=%s">%s</a></td> - <td class="number">%s</td></tr>', - mb_strtoupper($myrow['stockid']), - mb_strtoupper($myrow['stockid']), - $myrow['description'], - locale_number_format($myrow['quantity'],$myrow['decimalplaces']), - locale_number_format($myrow['reorderlevel'],$myrow['decimalplaces']), - locale_number_format($DemandQty,$myrow['decimalplaces']), - mb_strtoupper($myrow['stockid']), - locale_number_format($myrow['quantity'] - $DemandQty,$myrow['decimalplaces']), - locale_number_format($QOO,$myrow['decimalplaces'])); + echo '<td>' . InternalLink('', 'StockStatus.php?StockID=' . mb_strtoupper($myrow['stockid']), mb_strtoupper($myrow['stockid'])) . '</td> + <td>' . $myrow['description'] . '</td> + <td class="number">' . locale_number_format($myrow['quantity'],$myrow['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($myrow['reorderlevel'],$myrow['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($DemandQty,$myrow['decimalplaces']) . '</td> + <td class="number">' . InternalLink('', 'SelectProduct.php?StockID=' . mb_strtoupper($myrow['stockid']), locale_number_format($myrow['quantity'] - $DemandQty,$myrow['decimalplaces'])) . '</td> + <td class="number">' . locale_number_format($QOO,$myrow['decimalplaces']) . '</td></tr>'; if ($myrow['serialised'] ==1){ /*The line is a serialised item*/ - echo '<td><a target="_blank" href="' . $rootpath . '/StockSerialItems.php?Serialised=Yes&Location=' . $myrow['loccode'] . '&StockID=' . $StockID . '">' . _('Serial Numbers') . '</a></td></tr>'; + echo '<td>' . InternalLink($rootpath, 'StockSerialItems.php?Serialised=Yes&Location=' . $myrow['loccode'] . '&StockID=' . $StockID, _('Serial Numbers')) . '</td></tr>'; } elseif ($myrow['controlled']==1){ - echo '<td><a target="_blank" href="' . $rootpath . '/StockSerialItems.php?Location=' . $myrow['loccode'] . '&StockID=' . $StockID . '">' . _('Batches') . '</a></td></tr>'; + echo '<td>' . InternalLink($rootpath, 'StockSerialItems.php?Location=' . $myrow['loccode'] . '&StockID=' . $StockID, _('Batches')) . '</td></tr>'; } } else if ($_POST['BelowReorderQuantity']!='NotZero') { if ($k==1){ @@ -277,27 +268,18 @@ echo '<tr class="EvenTableRows">'; $k=1; } - printf('<td><a target="_blank" href="StockStatus.php?StockID=%s">%s</a></td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number"><a target="_blank" href="SelectProduct.php?StockID=%s">%s</a></td> - <td class="number">%s</td>', - mb_strtoupper($myrow['stockid']), - mb_strtoupper($myrow['stockid']), - $myrow['description'], - locale_number_format($myrow['quantity'],$myrow['decimalplaces']), - locale_number_format($myrow['reorderlevel'],$myrow['decimalplaces']), - locale_number_format($DemandQty,$myrow['decimalplaces']), - mb_strtoupper($myrow['stockid']), - locale_number_format($myrow['quantity'] - $DemandQty,$myrow['decimalplaces']), - locale_number_format($QOO,$myrow['decimalplaces'])); + echo '<td>' . InternalLink('', 'StockStatus.php?StockID=' . mb_strtoupper($myrow['stockid']), mb_strtoupper($myrow['stockid'])) . '</td> + <td>' . $myrow['description'] . '</td> + <td class="number">' . locale_number_format($myrow['quantity'],$myrow['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($myrow['reorderlevel'],$myrow['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($DemandQty,$myrow['decimalplaces']) . '</td> + <td class="number">' . InternalLink('', 'SelectProduct.php?StockID=' . mb_strtoupper($myrow['stockid']), locale_number_format($myrow['quantity'] - $DemandQty,$myrow['decimalplaces'])) . '</td> + <td class="number">' . locale_number_format($QOO,$myrow['decimalplaces']) . '</td>'; if ($myrow['serialised'] ==1){ /*The line is a serialised item*/ - echo '<td><a target="_blank" href="' . $rootpath . '/StockSerialItems.php?Serialised=Yes&Location=' . $myrow['loccode'] . '&StockID=' . $StockID . '">' . _('Serial Numbers') . '</a></td></tr>'; + echo '<td>' . InternalLink($rootpath, 'StockSerialItems.php?Serialised=Yes&Location=' . $myrow['loccode'] . '&StockID=' . $StockID, _('Serial Numbers')) . '</td></tr>'; } elseif ($myrow['controlled']==1){ - echo '<td><a target="_blank" href="' . $rootpath . '/StockSerialItems.php?Location=' . $myrow['loccode'] . '&StockID=' . $StockID . '">' . _('Batches') . '</a></td></tr>'; + echo '<td>' . InternalLink($rootpath, 'StockSerialItems.php?Location=' . $myrow['loccode'] . '&StockID=' . $StockID, _('Batches')) . '</td></tr>'; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-24 11:13:11
|
Revision: 9549 http://weberp.svn.sourceforge.net/weberp/?rev=9549&view=rev Author: tim_schofield Date: 2012-08-24 11:13:04 +0000 (Fri, 24 Aug 2012) Log Message: ----------- Replace <a tags with InternalLink() function Modified Paths: -------------- trunk/SelectProduct.php trunk/SelectRecurringSalesOrder.php trunk/SelectSalesOrder.php trunk/SelectSupplier.php trunk/SelectWorkOrder.php trunk/Shipments.php Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2012-08-23 21:01:40 UTC (rev 9548) +++ trunk/SelectProduct.php 2012-08-24 11:13:04 UTC (rev 9549) @@ -470,7 +470,7 @@ if ($Its_A_Kitset_Assembly_Or_Dummy == False) { echo InternalLink('', 'PO_SelectOSPurchOrder.php?SelectedStockItem=' . $StockID, _('Search Outstanding Purchase Orders')) . '<br />'; echo InternalLink('', 'PO_SelectPurchOrder.php?SelectedStockItem=' . $StockID, _('Search All Purchase Orders')) . '<br />'; - echo '<a href="' . $rootpath . '/' . $_SESSION['part_pics_dir'] . '/' . $StockID . '.jpg?">' . _('Show Part Picture (if available)') . '</a><br />'; + echo InternalLink($rootpath, $_SESSION['part_pics_dir'] . '/' . $StockID . '.jpg', _('Show Part Picture (if available)')) . '<br />'; } if ($Its_A_Dummy == False) { echo InternalLink('', 'BOMInquiry.php?StockID=' . $StockID, _('View Costed Bill Of Material')) . '<br />'; Modified: trunk/SelectRecurringSalesOrder.php =================================================================== --- trunk/SelectRecurringSalesOrder.php 2012-08-23 21:01:40 UTC (rev 9548) +++ trunk/SelectRecurringSalesOrder.php 2012-08-24 11:13:04 UTC (rev 9549) @@ -104,27 +104,18 @@ $FormatedStopDate = ConvertSQLDate($myrow['stopdate']); $FormatedOrderValue = locale_money_format($myrow['ordervalue'],$myrow['currcode']); - printf('<td><a href="%s">%s</a></td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - </tr>', - $ModifyPage, - $myrow['recurrorderno'], - $myrow['name'], - $myrow['brname'], - $myrow['customerref'], - $FormatedLastRecurrence, - $FormatedStopDate, - $myrow['frequency'], - $FormatedOrderValue); + echo '<td>' . InternalLink($ModifyPage, $myrow['recurrorderno']) . '</td> + <td>' . $myrow['name'] . '</td> + <td>' . $myrow['brname'] . '</td> + <td>' . $myrow['customerref'] . '</td> + <td>' . $FormatedLastRecurrence . '</td> + <td>' . $FormatedStopDate . '</td> + <td>' . $myrow['frequency'] . '</td> + <td class="number">' . $FormatedOrderValue . '</td> + </tr>'; $j++; - If ($j == 12){ + if ($j == 12){ $j=1; echo $tableheader; } Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2012-08-23 21:01:40 UTC (rev 9548) +++ trunk/SelectSalesOrder.php 2012-08-24 11:13:04 UTC (rev 9549) @@ -23,7 +23,7 @@ if (mb_strlen($OrdersToPlacePOFor)==''){ prnMsg(_('There were no sales orders checked to place purchase orders for. No purchase orders will be created.'),'info'); } else { - /* Now build SQL of items to purchase with purchasing data and preferred suppliers - sorted by preferred supplier */ + /* Now build SQL of items to purchase with purchasing data and preferred suppliers - sorted by preferred supplier */ $sql = "SELECT purchdata.supplierno, purchdata.stockid, purchdata.price, @@ -160,7 +160,7 @@ $SupplierID = ''; if (IsEmailAddress($_SESSION['UserEmail'])){ - $UserDetails = ' <a href="mailto:' . $_SESSION['UserEmail'] . '">' . $_SESSION['UsersRealName']. '</a>'; + $UserDetails = ' ' . $_SESSION['UsersRealName'] . ' '; } else { $UserDetails = ' ' . $_SESSION['UsersRealName'] . ' '; } @@ -533,8 +533,7 @@ echo '</select> </td><td>'; echo '<button type="submit" name="SearchOrders">' . _('Search') . '</button></td>'; - echo ' <td><a href="' . $rootpath . '/SelectOrderItems.php?NewOrder=Yes">' . - _('Add Sales Order') . '</a></td></tr></table>'; + echo ' <td>' . InternalLink($rootpath, 'SelectOrderItems.php?NewOrder=Yes', _('Add Sales Order')) . '</td></tr></table>'; } $SQL="SELECT categoryid, @@ -888,89 +887,48 @@ if ($_POST['Quotations']=='Orders_Only'){ - /*Check authority to create POs if user has authority then show the check boxes to select sales orders to place POs for otherwise don't provide this option */ - if ($AuthRow['cancreate']==0 AND $myrow['poplaced']==0){ //cancreate==0 if the user can create POs and not already placed - printf('<td><a href="%s">%s</a></td> - <td><a href="%s">' . _('Invoice') . '</a></td> - <td><a target="_blank" href="%s">' . $PrintText . ' <img src="' .$rootpath.'/css/'.$theme.'/images/pdf.png" title="' . _('Click for PDF') . '" /></a></td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td><input type="checkbox" name="PlacePO_%s" value"" /><input type="hidden" name="OrderNo_PO_%s" value="%s" /></td> - </tr>', - $ModifyPage, - $myrow['orderno'], - $Confirm_Invoice, - $PrintDispatchNote, - $myrow['name'], - $myrow['brname'], - $myrow['customerref'], - $FormatedOrderDate, - $FormatedDelDate, - $myrow['deliverto'], - $FormatedOrderValue, - $i, - $i, - $myrow['orderno']); - } else { //User is not authorised to create POs so don't even show the option - printf('<td><a href="%s">%s</a></td> - <td><a href="%s">' . _('Invoice') . '</a></td> - <td><a target="_blank" href="%s">' . $PrintText . ' <img src="' .$rootpath.'/css/'.$theme.'/images/pdf.png" title="' . _('Click for PDF') . '" /></a></td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - </tr>', - $ModifyPage, - $myrow['orderno'], - $Confirm_Invoice, - $PrintDispatchNote, - $myrow['name'], - $myrow['brname'], - $myrow['customerref'], - $FormatedOrderDate, - $FormatedDelDate, - $myrow['deliverto'], - $FormatedOrderValue); - } + /*Check authority to create POs if user has authority then show the check boxes to select sales orders to place POs for otherwise don't provide this option */ + if ($AuthRow['cancreate']==0 AND $myrow['poplaced']==0){ //cancreate==0 if the user can create POs and not already placed + echo '<td>' . InternalLink('', $ModifyPage, $myrow['orderno']) . '</td> + <td>' . InternalLink('', $Confirm_Invoice, _('Invoice')) . '</td> + <td>' . InternalLink('', $PrintDispatchNote, $PrintText . ' <img src="' . $rootpath . '/css/' . $theme . '/images/pdf.png" title="' . _('Click for PDF') . '" />') . '</td> + <td>' . $myrow['name'] . '</td> + <td>' . $myrow['brname'] . '</td> + <td>' . $myrow['customerref'] . '</td> + <td>' . $FormatedOrderDate . '</td> + <td>' . $FormatedDelDate . '</td> + <td>' . $myrow['deliverto'] . '</td> + <td class="number">' . $FormatedOrderValue . '</td> + <td><input type="checkbox" name="PlacePO_' . $i . '" value"" /><input type="hidden" name="OrderNo_PO_' . $i . '" value="' . $myrow['orderno'] . '" /></td> + </tr>'; + } else { //User is not authorised to create POs so don't even show the option + echo '<td>' . InternalLink('', $ModifyPage, $myrow['orderno']) . '</td> + <td>' . InternalLink('', $Confirm_Invoice, _('Invoice')) . '</td> + <td>' . InternalLink('', $PrintDispatchNote, $PrintText . ' <img src="' .$rootpath.'/css/'.$theme.'/images/pdf.png" title="' . _('Click for PDF') . ' />') . '</td> + <td>' . $myrow['name'] . '</td> + <td>' . $myrow['brname'] . '</td> + <td>' . $myrow['customerref'] . '</td> + <td>' . $FormatedOrderDate . '</td> + <td>' . $FormatedDelDate . '</td> + <td>' . $myrow['deliverto'] . '</td> + <td class="number">' . $FormatedOrderValue . '</td> + </tr>'; + } } else { //must be quotes only - printf('<td><a href="%s">%s</a></td> - <td><a target="_blank" href="%s">' . _('Landscape') . '</a> <a target="_blank" href="%s">' . _('Portrait') . '</a></td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - </tr>', - $ModifyPage, - $myrow['orderno'], - $PrintQuotation, - $PrintQuotationPortrait, - $myrow['name'], - $myrow['brname'], - $myrow['customerref'], - $FormatedOrderDate, - $FormatedDelDate, - html_entity_decode($myrow['deliverto'],ENT_QUOTES,'UTF-8'), - $FormatedOrderValue); + echo '<td>' . InternalLink('', $ModifyPage, $myrow['orderno']) . '</td> + <td>' . InternalLink('', $PrintQuotation, _('Landscape')) . ' ' . InternalLink('', $PrintQuotationPortrait, _('Portrait')) . '</td> + <td>' . $myrow['name'] . '</td> + <td>' . $myrow['brname'] . '</td> + <td>' . $myrow['customerref'] . '</td> + <td>' . $FormatedOrderDate . '</td> + <td>' . $FormatedDelDate . '</td> + <td>' . html_entity_decode($myrow['deliverto'],ENT_QUOTES,'UTF-8') . '</td> + <td class="number">' . $FormatedOrderValue . '</td> + </tr>'; } - $i++; - $j++; + $i++; $OrdersTotal += $myrow['ordervalue']; - if ($j == 12){ - $j=1; - echo $tableheader; - } //end of page full new headings if }//end while loop through orders to display if ($_POST['Quotations']=='Orders_Only' AND $AuthRow['cancreate']==0){ //cancreate==0 means can create POs Modified: trunk/SelectSupplier.php =================================================================== --- trunk/SelectSupplier.php 2012-08-23 21:01:40 UTC (rev 9548) +++ trunk/SelectSupplier.php 2012-08-24 11:13:04 UTC (rev 9549) @@ -135,7 +135,7 @@ echo '<tr><td valign=top class="select">'; /* Inquiry Options */ echo '</td><td valign=top class="select">'; /* Supplier Transactions */ echo '</td><td valign=top class="select">'; /* Supplier Maintenance */ - echo '<a href="' . $rootpath . '/Suppliers.php?">' . _('Add a New Supplier') . '</a><br />'; + echo InternalLink($rootpath, 'Suppliers.php?', _('Add a New Supplier')) . '<br />'; echo '</td></tr></table>'; } Modified: trunk/SelectWorkOrder.php =================================================================== --- trunk/SelectWorkOrder.php 2012-08-23 21:01:40 UTC (rev 9548) +++ trunk/SelectWorkOrder.php 2012-08-24 11:13:04 UTC (rev 9549) @@ -144,7 +144,7 @@ echo '</select>   '; echo '<button type="submit" name="SearchOrders">' . _('Search') . '</button>'; - echo ' <a href="' . $rootpath . '/WorkOrderEntry.php">' . _('New Work Order') . '</a></td></tr></table><br />'; + echo ' ' . InternalLink($rootpath, 'WorkOrderEntry.php', _('New Work Order')) . '</td></tr></table><br />'; } $SQL="SELECT categoryid, @@ -338,31 +338,18 @@ $FormatedStartDate = ConvertSQLDate($myrow['startdate']); - printf('<td><a href="%s">%s</a></td> - <td><a href="%s">' . _('Status') . '</a></td> - <td><a href="%s">' . _('Receive') . '</a></td> - <td><a href="%s">' . _('Issue To') . '</a></td> - <td><a href="%s">' . _('Costing') . '</a></td> - <td>%s - %s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td>%s</td> - <td>%s</td> - </tr>', - $ModifyPage, - $myrow['wo'], - $Status_WO, - $Receive_WO, - $Issue_WO, - $Costing_WO, - $myrow['stockid'], - $myrow['description'], - $myrow['qtyreqd'], - $myrow['qtyrecd'], - $myrow['qtyreqd']-$myrow['qtyrecd'], - $FormatedStartDate, - $FormatedRequiredByDate); + echo '<td>'. InternalLink('', $ModifyPage, $myrow['wo']) . '</td> + <td>' . InternalLink('', $Status_WO, _('Status')) . '</td> + <td>' . InternalLink('', $Receive_WO, _('Receive')) . '</td> + <td>' . InternalLink('', $Issue_WO, _('Issue To')) . '</td> + <td>' . InternalLink('', $Costing_WO, _('Costing')) . '</td> + <td>' . $myrow['stockid'] . ' - ' . $myrow['description'] . '</td> + <td class="number">' . $myrow['qtyreqd'] . '</td> + <td class="number">' . $myrow['qtyrecd'] . '</td> + <td class="number">' . $myrow['qtyreqd']-$myrow['qtyrecd'] . '</td> + <td>' . $FormatedStartDate . '</td> + <td>' . $FormatedRequiredByDate . '</td> + </tr>'; $j++; if ($j == 12){ Modified: trunk/Shipments.php =================================================================== --- trunk/Shipments.php 2012-08-23 21:01:40 UTC (rev 9548) +++ trunk/Shipments.php 2012-08-24 11:13:04 UTC (rev 9549) @@ -18,29 +18,29 @@ if (!isset($_SESSION['SupplierID']) AND !isset($_SESSION['Shipment'])){ prnMsg( _('To set up a shipment') . ', ' . _('the supplier must first be selected from the Select Supplier page'), 'error'); - echo '<table class="selection"> - <tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSupplier.php">' . _('Select the Supplier') . '</a></li> - </td></tr></table></div>'; - include('includes/footer.inc'); - exit; + echo '<table class="selection"> + <tr><td class="menu_group_item"> + <li>'. InternalLink($rootpath, 'SelectSupplier.php', _('Select the Supplier')) . '</li> + </td></tr></table></div>'; + include('includes/footer.inc'); + exit; } if (isset($_GET['SelectedShipment'])){ if (isset($_SESSION['Shipment'])){ - unset ($_SESSION['Shipment']->LineItems); - unset ($_SESSION['Shipment']); + unset ($_SESSION['Shipment']->LineItems); + unset ($_SESSION['Shipment']); } - $_SESSION['Shipment'] = new Shipment; + $_SESSION['Shipment'] = new Shipment; - $_SESSION['Shipment']->GLLink = $_SESSION['CompanyRecord']['gllink_stock']; + $_SESSION['Shipment']->GLLink = $_SESSION['CompanyRecord']['gllink_stock']; /*read in all the guff from the selected shipment into the Shipment Class variable - the class code is included in the main script before this script is included */ - $ShipmentHeaderSQL = "SELECT shipments.supplierid, - suppliers.suppname, + $ShipmentHeaderSQL = "SELECT shipments.supplierid, + suppliers.suppname, shipments.eta, suppliers.currcode, shipments.vessel, @@ -50,39 +50,39 @@ ON shipments.supplierid = suppliers.supplierid WHERE shipments.shiptref = '" . $_GET['SelectedShipment'] . "'"; - $ErrMsg = _('Shipment').' '. $_GET['SelectedShipment'] . ' ' . _('cannot be retrieved because a database error occurred'); - $GetShiptHdrResult = DB_query($ShipmentHeaderSQL,$db, $ErrMsg); + $ErrMsg = _('Shipment').' '. $_GET['SelectedShipment'] . ' ' . _('cannot be retrieved because a database error occurred'); + $GetShiptHdrResult = DB_query($ShipmentHeaderSQL,$db, $ErrMsg); - if (DB_num_rows($GetShiptHdrResult)==0) { + if (DB_num_rows($GetShiptHdrResult)==0) { prnMsg ( _('Unable to locate Shipment') . ' '. $_GET['SelectedShipment'] . ' ' . _('in the database'), 'error'); - include('includes/footer.inc'); - exit(); + include('includes/footer.inc'); + exit(); } - if (DB_num_rows($GetShiptHdrResult)==1) { + if (DB_num_rows($GetShiptHdrResult)==1) { - $myrow = DB_fetch_array($GetShiptHdrResult); + $myrow = DB_fetch_array($GetShiptHdrResult); - if ($myrow['closed']==1){ + if ($myrow['closed']==1){ prnMsg( _('Shipment No.') .' '. $_GET['SelectedShipment'] .': '. _('The selected shipment is already closed and no further modifications to the shipment are possible'), 'error'); include('includes/footer.inc'); exit; - } - $_SESSION['Shipment']->ShiptRef = $_GET['SelectedShipment']; - $_SESSION['Shipment']->SupplierID = $myrow['supplierid']; - $_SESSION['Shipment']->SupplierName = $myrow['suppname']; - $_SESSION['Shipment']->CurrCode = $myrow['currcode']; - $_SESSION['Shipment']->ETA = $myrow['eta']; - $_SESSION['Shipment']->Vessel = $myrow['vessel']; - $_SESSION['Shipment']->VoyageRef = $myrow['voyageref']; + } + $_SESSION['Shipment']->ShiptRef = $_GET['SelectedShipment']; + $_SESSION['Shipment']->SupplierID = $myrow['supplierid']; + $_SESSION['Shipment']->SupplierName = $myrow['suppname']; + $_SESSION['Shipment']->CurrCode = $myrow['currcode']; + $_SESSION['Shipment']->ETA = $myrow['eta']; + $_SESSION['Shipment']->Vessel = $myrow['vessel']; + $_SESSION['Shipment']->VoyageRef = $myrow['voyageref']; /*now populate the shipment details records */ - $LineItemsSQL = "SELECT purchorderdetails.podetailitem, - purchorders.orderno, + $LineItemsSQL = "SELECT purchorderdetails.podetailitem, + purchorders.orderno, purchorderdetails.itemcode, purchorderdetails.itemdescription, purchorderdetails.deliverydate, @@ -100,16 +100,16 @@ INNER JOIN purchorders ON purchorderdetails.orderno=purchorders.orderno WHERE purchorderdetails.shiptref='" . $_GET['SelectedShipment'] . "'"; - $ErrMsg = _('The lines on the shipment cannot be retrieved because'). ' - ' . DB_error_msg($db); - $LineItemsResult = DB_query($LineItemsSQL,$db, $ErrMsg); + $ErrMsg = _('The lines on the shipment cannot be retrieved because'). ' - ' . DB_error_msg($db); + $LineItemsResult = DB_query($LineItemsSQL,$db, $ErrMsg); - if (DB_num_rows($GetShiptHdrResult)==0) { - prnMsg ( _('Unable to locate lines for Shipment') . ' '. $_GET['SelectedShipment'] . ' ' . _('in the database'), 'error'); - include('includes/footer.inc'); - exit(); - } + if (DB_num_rows($GetShiptHdrResult)==0) { + prnMsg ( _('Unable to locate lines for Shipment') . ' '. $_GET['SelectedShipment'] . ' ' . _('in the database'), 'error'); + include('includes/footer.inc'); + exit(); + } - if (DB_num_rows($LineItemsResult) > 0) { + if (DB_num_rows($LineItemsResult) > 0) { while ($myrow=DB_fetch_array($LineItemsResult)) { @@ -136,8 +136,8 @@ $myrow=DB_fetch_array($LineItemsResult); $_SESSION['Shipment']->StockLocation = $myrow['intostocklocation']; - } //end of checks on returned data set - } + } //end of checks on returned data set + } } // end of reading in the existing shipment @@ -420,7 +420,7 @@ <td class="number">' . locale_number_format($LnItm->QtyInvoiced,$LnItm->DecimalPlaces) . '</td> <td class="number">' . locale_money_format($LnItm->UnitPrice,$_SESSION['Shipment']->CurrCode) . '</td> <td class="number">' . locale_money_format($LnItm->StdCostUnit,$_SESSION['Shipment']->CurrCode) . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $LnItm->PODetailItem . '">'. _('Delete'). '</a></td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $LnItm->PODetailItem, _('Delete')) . '</td> </tr>'; }//for each line on the shipment echo '</table>'; @@ -496,7 +496,7 @@ <td>' . $myrow['units'] . '</td> <td class="number">' . locale_number_format($myrow['quantityrecd'],$myrow['decimalplaces']) . '</td> <td class="number">' . ConvertSQLDate($myrow['deliverydate']) . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Add=' . $myrow['podetailitem'] . '">'. _('Add').'</a></td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Add=' . $myrow['podetailitem'], _('Add')) . '</td> </tr>'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-24 13:33:53
|
Revision: 9550 http://weberp.svn.sourceforge.net/weberp/?rev=9550&view=rev Author: tim_schofield Date: 2012-08-24 13:33:46 +0000 (Fri, 24 Aug 2012) Log Message: ----------- Replace <a tags with InternalLink() function Modified Paths: -------------- trunk/SalesAnalysis_UserDefined.php trunk/SalesCategories.php trunk/SalesGLPostings.php trunk/SalesPeople.php trunk/SalesTypes.php trunk/SecurityTokens.php trunk/SelectAsset.php trunk/SelectCompletedOrder.php trunk/SelectContract.php trunk/SelectCreditItems.php trunk/SelectGLAccount.php trunk/SelectOrderItems.php trunk/css/silverwolf/images/sales.png Modified: trunk/SalesAnalysis_UserDefined.php =================================================================== --- trunk/SalesAnalysis_UserDefined.php 2012-08-24 11:13:04 UTC (rev 9549) +++ trunk/SalesAnalysis_UserDefined.php 2012-08-24 13:33:46 UTC (rev 9550) @@ -24,8 +24,8 @@ $title = _('User Defined Sales Analysis Problem'); include('includes/header.inc'); echo '<br />' . _('The report did not have any none zero lines of information to show and so it has not been created'); - echo '<br /><a href="' . $rootpath . '/SalesAnalRepts.php?SelectedReport=' . $_GET['ReportID'] . '">' . _('Look at the design of this report') . '</a>'; - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'SalesAnalRepts.php?SelectedReport=' . $_GET['ReportID'], _('Look at the design of this report')); + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } @@ -44,7 +44,7 @@ echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/' . $_SESSION['reports_dir'] . '/SalesAnalysis.csv">'; echo '<p>' . _('You should automatically be forwarded to the CSV Sales Analysis file when it is ready') . '. ' . _('If this does not happen') . - ' <a href="' . $rootpath . '/' . $_SESSION['reports_dir'] . '/SalesAnalysis.csv">' . _('click here') . '</a> ' . _('to continue') . '<br /></p>'; + . InternalLink($rootpath, '/' . $_SESSION['reports_dir'] . '/SalesAnalysis.csv', _('click here')) . _('to continue') . '<br /></p>'; include('includes/footer.inc'); } ?> \ No newline at end of file Modified: trunk/SalesCategories.php =================================================================== --- trunk/SalesCategories.php 2012-08-24 11:13:04 UTC (rev 9549) +++ trunk/SalesCategories.php 2012-08-24 13:33:46 UTC (rev 9550) @@ -65,7 +65,11 @@ if ($UploadTheFile=='Yes'){ $result = move_uploaded_file($_FILES['ItemPicture']['tmp_name'], $filename); - $message = ($result)?_('File url') .'<a href="'. $filename .'">' . $filename . '</a>' : _('Something is wrong with uploading a file.'); + if ($result) { + $message = _('File url') . InternalLink('', $filename, $filename); + } else { + _('Something is wrong with uploading a file.'); + } } /* EOR Add Image upload for New Item - by Ori */ } @@ -180,7 +184,7 @@ // ---------------------------------------------------------------------------------------- // Calculate Path for navigation -$CategoryPath = '<a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?ParentCategory=NULL">' . _('Main') . '</a>' . " \\ "; +$CategoryPath = InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?ParentCategory=NULL', _('Main')) . " \\ "; $TempPath = ''; if (isset($ParentCategory)) { $TmpParentID = $ParentCategory; @@ -196,8 +200,7 @@ if (DB_num_rows($result) > 0) { $row = DB_fetch_array($result); $LastParentName = $row['salescatname']; - $TempPath = '<a href="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?ParentCategory='.$TmpParentID.'">'.$LastParentName . - '</a>'." \\ ".$TempPath; + $TempPath = InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?ParentCategory='.$TmpParentID, $LastParentName) . " \\ ".$TempPath; $TmpParentID = $row['parentcatid']; // Set For Next Round } else { $Buzy = false; @@ -265,22 +268,12 @@ $ParentCategory='NULL'; } - printf('<td>%s</td> - <td>%s</td> - <td><a href="%sParentCategory=%s">' . _('Select') . '</td> - <td><a href="%sSelectedCategory=%s&ParentCategory=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedCategory=%s&delete=yes&EditName=1&ParentCategory=%s">' . _('Delete') . '</td> - </tr>', - $myrow['salescatname'], - $CatImgLink, - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['salescatid'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['salescatid'], - $ParentCategory, - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['salescatid'], - $ParentCategory); + echo '<td>' . $myrow['salescatname'] . '</td> + <td>' . $CatImgLink . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?ParentCategory=' . $myrow['salescatid'], _('Select')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedCategory=' . $myrow['salescatid'] . '&ParentCategory=' . $ParentCategory, _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedCategory=' . $myrow['salescatid'] . '&delete=yes&EditName=1&ParentCategory=' . $ParentCategory, _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP echo '</table>'; @@ -340,7 +333,7 @@ <td>' . _('Image File') . '</td> <td> <img src="'.$rootpath . '/' . $_SESSION['part_pics_dir'] . '/' . 'cat_'.$myrow['salescatid'].'.jpg" width="64px" /> - <a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DeleteImage='.$myrow['salescatid'].'">' . _('Delete Image') . '</a> + ' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DeleteImage='.$myrow['salescatid'], _('Delete Image')) . ' </td> </tr>'; } @@ -455,9 +448,7 @@ echo '<td>' . $myrow['stockid'] . '</td>'; echo '<td>' . $myrow['description'] . '</td>'; - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?ParentCategory='.$ParentCategory.'&DelStockID='.$myrow['stockid'].'">'. - _('Remove'). - '</a></td></tr>'; + echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?ParentCategory='.$ParentCategory.'&DelStockID='.$myrow['stockid'], _('Remove')). '</td></tr>'; } echo '</table>'; } else { Modified: trunk/SalesGLPostings.php =================================================================== --- trunk/SalesGLPostings.php 2012-08-24 11:13:04 UTC (rev 9549) +++ trunk/SalesGLPostings.php 2012-08-24 13:33:46 UTC (rev 9550) @@ -126,22 +126,14 @@ $k=1; } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%sSelectedSalesPostingID=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedSalesPostingID=%s&delete=yes">'. _('Delete') . '</td></tr>', - $myrow['area'], - $myrow['stkcat'], - $myrow['salestype'], - $myrow['salesglcode'], - $myrow['discountglcode'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['id'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['id']); + echo '<td>' . $myrow['area'] . '</td> + <td>' . $myrow['stkcat'] . '</td> + <td>' . $myrow['salestype'] . '</td> + <td>' . $myrow['salesglcode'] . '</td> + <td>' . $myrow['discountglcode'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedSalesPostingID=' . $myrow['id'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedSalesPostingID=' . $myrow['id'] . '&delete=yes', _('Delete')) . '</td> + </tr>'; } } @@ -239,22 +231,14 @@ $k=1; } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%sSelectedSalesPostingID=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedSalesPostingID=%s&delete=yes">'. _('Delete') . '</td></tr>', - $myrow['area'], - $myrow['stkcat'], - $myrow['salestype'], - $myrow['chart1name'], - $myrow['chart2name'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['id'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['id']); + echo '<td>' . $myrow['area'] . '</td> + <td>' . $myrow['stkcat'] . '</td> + <td>' . $myrow['salestype'] . '</td> + <td>' . $myrow['chart1name'] . '</td> + <td>' . $myrow['chart2name'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedSalesPostingID=' . $myrow['id'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedSalesPostingID=' . $myrow['id'] . '&delete=yes', _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP echo '</table>'; @@ -264,7 +248,7 @@ //end of ifs and buts! if (isset($SelectedSalesPostingID)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Show All Sales Posting Codes Defined') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Show All Sales Posting Codes Defined')) . '</div>'; } Modified: trunk/SalesPeople.php =================================================================== --- trunk/SalesPeople.php 2012-08-24 11:13:04 UTC (rev 9549) +++ trunk/SalesPeople.php 2012-08-24 13:33:46 UTC (rev 9550) @@ -211,37 +211,25 @@ $ActiveText = _('No'); } - printf(' - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td>%s</td> - <td><a href="%sSelectedSaleperson=%s">'. _('Edit') . '</a></td> - <td><a href="%sSelectedSaleperson=%s&delete=1">' . _('Delete') . '</a></td> - </tr>', - $myrow['salesmancode'], - $myrow['salesmanname'], - $myrow['smantel'], - $myrow['smanfax'], - $myrow['commissionrate1'], - $myrow['breakpoint'], - $myrow['commissionrate2'], - $ActiveText, - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['salesmancode'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['salesmancode']); + echo ' + <td>' . $myrow['salesmancode'] . '</td> + <td>' . $myrow['salesmanname'] . '</td> + <td>' . $myrow['smantel'] . '</td> + <td>' . $myrow['smanfax'] . '</td> + <td class="number">' . $myrow['commissionrate1'] . '</td> + <td class="number">' . $myrow['breakpoint'] . '</td> + <td class="number">' . $myrow['commissionrate2'] . '</td> + <td>' . $ActiveText . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedSaleperson=' . $myrow['salesmancode'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedSaleperson=' . $myrow['salesmancode'] . '&delete=1', _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP echo '</table><br />'; } //end of ifs and buts! if (isset($SelectedSalesPerson)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Show All Sales People') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Show All Sales People')) . '</div>'; } if (! isset($_GET['delete'])) { Modified: trunk/SalesTypes.php =================================================================== --- trunk/SalesTypes.php 2012-08-24 11:13:04 UTC (rev 9549) +++ trunk/SalesTypes.php 2012-08-24 13:33:46 UTC (rev 9550) @@ -190,17 +190,11 @@ $k=1; } - printf('<td>%s</td> - <td>%s</td> - <td><a href="%sSelectedType=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedType=%s&delete=yes" onclick=\'return confirm("' . _('Are you sure you wish to delete this price list and all the prices it may have set up?') . '");\'>' . _('Delete') . '</td> - </tr>', - $myrow['typeabbrev'], - $myrow['sales_type'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['typeabbrev'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['typeabbrev']); + echo '<td>' . $myrow['typeabbrev'] . '</td> + <td>' . $myrow['sales_type'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedType=' . $myrow['typeabbrev'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedType=' . $myrow['typeabbrev'] . '&delete=yes', _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP echo '</table>'; @@ -209,7 +203,7 @@ //end of ifs and buts! if (isset($SelectedType)) { - echo '<p><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Show All Sales Types Defined') . '</a></div></p>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Show All Sales Types Defined')) . '</div>'; } if (! isset($_GET['delete'])) { Modified: trunk/SecurityTokens.php =================================================================== --- trunk/SecurityTokens.php 2012-08-24 11:13:04 UTC (rev 9549) +++ trunk/SecurityTokens.php 2012-08-24 13:33:46 UTC (rev 9550) @@ -73,7 +73,7 @@ while ($myrow = DB_fetch_array($result,$db)){ echo '<tr><td>'.$myrow[0].'</td><td>'.$myrow[1].'</td><td> - <a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedToken=' . $myrow[0] . '&Action=edit">' . _('Edit') . '</a></td></tr>'; + ' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedToken=' . $myrow[0] . '&Action=edit', _('Edit')) . '</td></tr>'; } echo '</table><p></p>'; Modified: trunk/SelectAsset.php =================================================================== --- trunk/SelectAsset.php 2012-08-24 11:13:04 UTC (rev 9549) +++ trunk/SelectAsset.php 2012-08-24 13:33:46 UTC (rev 9550) @@ -35,7 +35,7 @@ $result = DB_query($SQL, $db); if (DB_num_rows($result) == 0) { echo '<p><font size="4" color="red">' . _('Problem Report') . ':</font><br />' . _('There are no asset categories currently defined please use the link below to set them up'); - echo '<br /><a href="' . $rootpath . '/FixedAssetCategories.php">' . _('Define Asset Categories') . '</a></font></p>'; + echo '<br />' . InternalLink($rootpath, 'FixedAssetCategories.php', _('Define Asset Categories')) . '</font></p>'; exit; } // end of showing search facilities Modified: trunk/SelectCompletedOrder.php =================================================================== --- trunk/SelectCompletedOrder.php 2012-08-24 11:13:04 UTC (rev 9549) +++ trunk/SelectCompletedOrder.php 2012-08-24 13:33:46 UTC (rev 9550) @@ -562,24 +562,15 @@ $FormatedOrderDate = ConvertSQLDate($myrow['orddate']); $FormatedOrderValue = locale_money_format($myrow['ordervalue'],$myrow['currcode']); - printf('<td><a href="%s">%s</a></td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - </tr>', - $ViewPage, - $myrow['orderno'], - $myrow['name'], - $myrow['brname'], - $myrow['customerref'], - $FormatedOrderDate, - $FormatedDelDate, - $myrow['deliverto'], - $FormatedOrderValue); + echo '<td>' . InternalLink('', $ViewPage, $myrow['orderno']) . '</td> + <td>' . $myrow['name'] . '</td> + <td>' . $myrow['brname'] . '</td> + <td>' . $myrow['customerref'] . '</td> + <td>' . $FormatedOrderDate . '</td> + <td>' . $FormatedDelDate . '</td> + <td>' . $myrow['deliverto'] . '</td> + <td class="number">' . $FormatedOrderValue . '</td> + </tr>'; //end of page full new headings if } Modified: trunk/SelectContract.php =================================================================== --- trunk/SelectContract.php 2012-08-24 11:13:04 UTC (rev 9549) +++ trunk/SelectContract.php 2012-08-24 13:33:46 UTC (rev 9550) @@ -62,8 +62,8 @@ echo '</select></td> '; } -echo '<td><button type="submit" name="SearchContracts">' . _('Search') . '</button></td>'; -echo '<td> <a href="' . $rootpath . '/Contracts.php">' . _('New Contract') . '</a></td></tr></table></p>'; +echo '<td><button type="submit" name="SearchContracts">' . _('Search') . '</button></td> + td> ' . InternalLink($rootpath, 'Contracts.php', _('New Contract')) . '</td></tr></table></p>'; //figure out the SQL required from the inputs available @@ -162,22 +162,22 @@ $FormatedRequiredDate = ConvertSQLDate($myrow['requireddate']); if ($myrow['status']==0 OR $myrow['status']==1){ //still setting up the contract - echo '<td><a href="' . $ModifyPage . '">' . _('Modify') . '</a></td>'; + echo '<td>' . InternalLink('', $ModifyPage, _('Modify')) . '</td>'; } else { echo '<td>' . _('n/a') . '</td>'; } if ($myrow['status']==1 OR $myrow['status']==2){ // quoted or ordered - echo '<td><a href="' . $OrderModifyPage . '">' . $myrow['orderno'] . '</a></td>'; + echo '<td>' . InternalLink('', $OrderModifyPage, $myrow['orderno']) . '</td>'; } else { echo '<td>' . _('n/a') . '</td>'; } if ($myrow['status']==2){ //the customer has accepted the quote but not completed contract yet - echo '<td><a href="' . $IssueToWOPage . '">' . $myrow['wo'] . '</a></td>'; + echo '<td>' . InternalLink('', $IssueToWOPage, $myrow['wo']) . '</td>'; } else { echo '<td>' . _('n/a') . '</td>'; } if ($myrow['status']==2 OR $myrow['status']==3){ - echo '<td><a href="' . $CostingPage . '">' . _('View') . '</a></td>'; + echo '<td>' . InternalLink('', $CostingPage, _('View')) . '</td>'; } else { echo '<td>' . _('n/a') . '</td>'; } Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2012-08-24 11:13:04 UTC (rev 9549) +++ trunk/SelectCreditItems.php 2012-08-24 13:33:46 UTC (rev 9550) @@ -30,7 +30,7 @@ if (isset($_POST['ProcessCredit']) and !isset($_SESSION['CreditItems'.$identifier])){ prnMsg(_('This credit note has already been processed. Refreshing the page will not enter the credit note again') . '<br />' . _('Please use the navigation links provided rather than using the browser back button and then having to refresh'),'info'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } @@ -662,7 +662,7 @@ if ($LineItem->Controlled==0){ echo '<td><input type="text" class="number" name="Quantity_' . $LineItem->LineNumber . '" maxlength="6" size="6" value="' . locale_number_format($LineItem->Quantity, $LineItem->DecimalPlaces) . '" /></td>'; } else { - echo '<td class="number"><a href="' . $rootpath . '/CreditItemsControlled.php?LineNo=' . $LineItem->LineNumber . '">' . $LineItem->Quantity . '</a> + echo '<td class="number">' . InternalLink($rootpath, 'CreditItemsControlled.php?LineNo=' . $LineItem->LineNumber, $LineItem->Quantity) . ' <input type="hidden" name="Quantity_' . $LineItem->LineNumber . '" value="' . $LineItem->Quantity . '" /></td>'; } @@ -720,7 +720,7 @@ echo '<td class="number">' . $DisplayTaxAmount . '</td> <td class="number">' . $DisplayGrossLineTotal . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $LineItem->LineNumber . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this line item from the credit note?') . '\');">' . _('Delete') . '</a></td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $LineItem->LineNumber, _('Delete')) . '</td> </tr>'; @@ -1998,13 +1998,13 @@ unset($_SESSION['CreditItems'.$identifier]); echo prnMsg(_('Credit Note number') . ' ' . $CreditNo . ' ' . _('processed') , 'success'); - echo '<div class="centre"><a target="_blank" href="' . $rootpath . '/PrintCustTrans.php?FromTransNo=' . $CreditNo . '&InvOrCredit=Credit">' . _('Show this Credit Note on screen') . '</a><br />'; + echo '<div class="centre">' . InternalLink($rootpath, 'PrintCustTrans.php?FromTransNo=' . $CreditNo . '&InvOrCredit=Credit', _('Show this Credit Note on screen')) . '<br />'; if ($_SESSION['InvoicePortraitFormat']==0){ - echo '<a href="' . $rootpath . '/PrintCustTrans.php?FromTransNo=' . $CreditNo . '&InvOrCredit=Credit&PrintPDF=True">' . _('Print this Credit Note') . '</a>'; + echo InternalLink($rootpath, 'PrintCustTrans.php?FromTransNo=' . $CreditNo . '&InvOrCredit=Credit&PrintPDF=True', _('Print this Credit Note')); } else { - echo '<a href="' . $rootpath . '/PrintCustTransPortrait.php?FromTransNo=' . $CreditNo . '&InvOrCredit=Credit&PrintPDF=True">' . _('Print this Credit Note') . '</a>'; + echo InternalLink($rootpath, 'PrintCustTransPortrait.php?FromTransNo=' . $CreditNo . '&InvOrCredit=Credit&PrintPDF=True', _('Print this Credit Note')); } - echo '<p><a href="' . $rootpath . '/SelectCreditItems.php">' . _('Enter Another Credit Note') . '</a></p></div>'; + echo '<p>' . InternalLink($rootpath, 'SelectCreditItems.php', _('Enter Another Credit Note')) . '</p></div>'; } /*end of process credit note */ Modified: trunk/SelectGLAccount.php =================================================================== --- trunk/SelectGLAccount.php 2012-08-24 11:13:04 UTC (rev 9549) +++ trunk/SelectGLAccount.php 2012-08-24 13:33:46 UTC (rev 9550) @@ -20,9 +20,11 @@ $AccountID = $_POST['Select']; $_POST['Select'] = NULL; - echo '<br /><div class="centre"><a href="' . $rootpath . '/GLAccounts.php?SelectedAccount=' . $AccountID . '">' . _('Edit Account') . '</a>'; - echo '<br /><a href="' . $rootpath . '/GLAccountInquiry.php?Account=' . $AccountID . '">' . _('Account Inquiry') . '</a>'; - echo '<br /><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('New Search') . '</a></div>'; + echo '<br /> + <div class="centre"> + ' . InternalLink($rootpath, 'GLAccounts.php?SelectedAccount=' . $AccountID, _('Edit Account')) . '<br /> + ' . InternalLink($rootpath, 'GLAccountInquiry.php?Account=' . $AccountID, _('Account Inquiry')) . '<br /> + ' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('New Search')) . '</div>'; } elseif (isset($_POST['Search'])){ @@ -32,7 +34,7 @@ if ($_POST['Keywords']=='' and $_POST['GLCode']=='') { $msg=_('At least one Account Name keyword OR an extract of an Account Code must be entered for the search'); } else { - If (mb_strlen($_POST['Keywords'])>0) { + if (mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2012-08-24 11:13:04 UTC (rev 9549) +++ trunk/SelectOrderItems.php 2012-08-24 13:33:46 UTC (rev 9550) @@ -1062,8 +1062,8 @@ if (isset($_POST['DeliveryDetails'])){ echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/DeliveryDetails.php?identifier='.$identifier . '">'; prnMsg(_('You should automatically be forwarded to the entry of the delivery details page') . '. ' . _('if this does not happen') . ' (' . _('if the browser does not support META Refresh') . ') ' . - '<a href="' . $rootpath . '/DeliveryDetails.php?identifier='.$identifier . '">' . _('click here') . '</a> ' . _('to continue'), 'info'); - exit; + InternalLink($rootpath, 'DeliveryDetails.php?identifier='.$identifier, _('click here')) . _('to continue'), 'info'); + exit; } if (isset($NewItem)){ @@ -1255,7 +1255,7 @@ echo '<input type="hidden" name="POLine_' . $OrderLine->LineNumber . '" value="" />'; } - echo '<td><a target="_blank" href="' . $rootpath . '/StockStatus.php?identifier='.$identifier . '&StockID=' . $OrderLine->StockID . '&DebtorNo=' . $_SESSION['Items'.$identifier]->DebtorNo . '">' . $OrderLine->StockID . '</a></td> + echo '<td>' . InternalLink($rootpath, 'StockStatus.php?identifier='.$identifier . '&StockID=' . $OrderLine->StockID . '&DebtorNo=' . $_SESSION['Items'.$identifier]->DebtorNo, $OrderLine->StockID) . '</td> <td title="'. $OrderLine->LongDescription . '">' . $OrderLine->ItemDescription . '</td>'; echo '<td><input class="number" tabindex="2" type="text" name="Quantity_' . $OrderLine->LineNumber . '" size="6" maxlength="6" value="' . locale_number_format($OrderLine->Quantity, $OrderLine->DecimalPlaces) . '" />'; @@ -1300,7 +1300,7 @@ echo '<td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ItemDue_' . $OrderLine->LineNumber . '" size="10" maxlength="10" value="' . $LineDueDate . '" /></td>'; - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . $RemTxt . '</a></td> + echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier . '&Delete=' . $OrderLine->LineNumber, $RemTxt) . '</td> <td>' . $LineComments . '</td></tr>'; if ($_SESSION['AllowOrderLineItemNarrative'] == 1){ Modified: trunk/css/silverwolf/images/sales.png =================================================================== --- trunk/css/silverwolf/images/sales.png 2012-08-24 11:13:04 UTC (rev 9549) +++ trunk/css/silverwolf/images/sales.png 2012-08-24 13:33:46 UTC (rev 9550) @@ -1,10 +1,32 @@ \x89PNG |
From: <tim...@us...> - 2012-08-24 19:44:08
|
Revision: 9551 http://weberp.svn.sourceforge.net/weberp/?rev=9551&view=rev Author: tim_schofield Date: 2012-08-24 19:44:01 +0000 (Fri, 24 Aug 2012) Log Message: ----------- Replace <a tags with InternalLink() function Modified Paths: -------------- trunk/Prices.php trunk/PrintCustOrder.php trunk/PrintCustOrder_generic.php trunk/PrintSalesOrder_generic.php trunk/PurchData.php trunk/RecurringSalesOrders.php trunk/ReorderLevel.php trunk/ReprintGRN.php trunk/ReverseGRN.php trunk/SalesAnalReptCols.php trunk/SalesAnalRepts.php Modified: trunk/Prices.php =================================================================== --- trunk/Prices.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/Prices.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -29,7 +29,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . '</img>' . $title.'</p>'; -echo '<div class="centre"><a href="' . $rootpath . '/SelectProduct.php">' . _('Back to Items') . '</a></div>'; +echo '<div class="centre">' . InternalLink($rootpath, 'SelectProduct.php', _('Back to Items')) . '</div>'; $result = DB_query("SELECT stockmaster.description, Modified: trunk/PrintCustOrder.php =================================================================== --- trunk/PrintCustOrder.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/PrintCustOrder.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -12,10 +12,10 @@ include('includes/header.inc'); echo '<div class="centre">'; prnMsg( _('Select an Order Number to Print before calling this page') , 'error'); - echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; + echo '<table class="table_index"><tr><td class="menu_group_item"> + <li>'. InternalLink($rootpath, 'SelectSalesOrder.php', _('Outstanding Sales Orders')) . '</li> + <li>'. InternalLink($rootpath, 'SelectCompletedOrder.php', _('Completed Sales Orders')) . '</li> + </td></tr></table></div>'; include('includes/footer.inc'); exit; } @@ -63,15 +63,15 @@ /* Javier */ $ListCount = 0; $title = _('Print Packing Slip Error'); - include('includes/header.inc'); - echo '<div class="centre"><br /><br /><br />'; + include('includes/header.inc'); + echo '<div class="centre"><br /><br /><br />'; prnMsg( _('Unable to Locate Order Number') . ' : ' . $_GET['TransNo'] . ' ', 'error'); - echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; - include('includes/footer.inc'); - exit(); + echo '<table class="table_index"><tr><td class="menu_group_item"> + <li>'. InternalLink($rootpath, 'SelectSalesOrder.php' . _('Outstanding Sales Orders')) . '</li> + <li>'. InternalLink($rootpath, 'SelectCompletedOrder.php', _('Completed Sales Orders')) . '</li> + </td></tr></table></div>'; + include('includes/footer.inc'); + exit(); } elseif (DB_num_rows($result)==1){ /*There is only one order header returned - thats good! */ /* Javier */ $ListCount = 1; @@ -79,23 +79,22 @@ $myrow = DB_fetch_array($result); if ($myrow['printedpackingslip']==1 AND ($_GET['Reprint']!='OK' OR !isset($_GET['Reprint']))){ $title = _('Print Packing Slip Error'); - include('includes/header.inc'); + include('includes/header.inc'); echo '<br />'; prnMsg( _('The packing slip for order number') . ' ' . $_GET['TransNo'] . ' ' . _('has previously been printed') . '. ' . _('It was printed on'). ' ' . ConvertSQLDate($myrow['datepackingslipprinted']) . '<br />' . _('This check is there to ensure that duplicate packing slips are not produced and dispatched more than once to the customer'), 'warn' ); - echo '<p><a href="' . $rootpath . '/PrintCustOrder.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK">' - . _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed') . '</a></p>' . - '<a href="' . $rootpath. '/PrintCustOrder_generic.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK">'. _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed'). '</a>'; + echo '<p>' . InternalLink($rootpath, 'PrintCustOrder.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK', _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed')) . '</p>' . + . InternalLink($rootpath, 'PrintCustOrder_generic.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK', _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed')); echo '<br /><br /><br />'; echo _('Or select another Order Number to Print'); - echo '<table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; + echo '<table class="table_index"><tr><td class="menu_group_item"> + <li>'. InternalLink($rootpath, 'SelectSalesOrder.php', _('Outstanding Sales Orders')) . '</li> + <li>'. InternalLink($rootpath, 'SelectCompletedOrder.php', _('Completed Sales Orders')) . '</li> + </td></tr></table></div>'; - include('includes/footer.inc'); + include('includes/footer.inc'); exit; }//packing slip has been printed. } @@ -176,15 +175,15 @@ if ($YPos-$line_height <= 136){ /* We reached the end of the page so finsih off the page and start a newy */ - $PageNumber++; - include ('includes/PDFOrderPageHeader.inc'); + $PageNumber++; + include ('includes/PDFOrderPageHeader.inc'); } //end if need a new page headed up /*increment a line down for the next line item */ $YPos -= ($line_height); - } //end while there are line items to print out + } //end while there are line items to print out $pdf->OutputF($_SESSION['DatabaseName'] . '_Customer_Order_' . $_GET['TransNo'] . '_' . Date('Y-m-d_h-m-s') .'.pdf'); $pdf-> __destruct(); @@ -195,8 +194,8 @@ $title = _('Print Packing Slip Error'); include('includes/header.inc'); echo '<br />'. _('There were no outstanding items on the order to deliver. A dispatch note cannot be printed'). - '<br /><a href="' . $rootpath . '/SelectSalesOrder.php">'. _('Print Another Packing Slip/Order'). - '</a>' . '<br />'. '<a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + '<br />' . InternalLink($rootpath, 'SelectSalesOrder.php', _('Print Another Packing Slip/Order')). + '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } /*end if there are order details to show on the order*/ Modified: trunk/PrintCustOrder_generic.php =================================================================== --- trunk/PrintCustOrder_generic.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/PrintCustOrder_generic.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -8,17 +8,17 @@ include('includes/SQL_CommonFunctions.inc'); //Get Out if we have no order number to work with -If (!isset($_GET['TransNo']) OR $_GET['TransNo']==""){ - $title = _('Select Order To Print'); - include('includes/header.inc'); - echo '<div class="centre"><br /><br /><br />'; - prnMsg( _('Select an Order Number to Print before calling this page') , 'error'); - echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php?">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php?">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; - include('includes/footer.inc'); - exit(); +if (!isset($_GET['TransNo']) OR $_GET['TransNo']==""){ + $title = _('Select Order To Print'); + include('includes/header.inc'); + echo '<div class="centre"><br /><br /><br />'; + prnMsg( _('Select an Order Number to Print before calling this page') , 'error'); + echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> + <li>'. InternalLink($rootpath, 'SelectSalesOrder.php', _('Outstanding Sales Orders')) . '</li> + <li>'. InternalLink($rootpath, 'SelectCompletedOrder.php', _('Completed Sales Orders')) . '</li> + </td></tr></table></div><br /><br /><br />'; + include('includes/footer.inc'); + exit(); } /*retrieve the order details from the database to print */ @@ -60,43 +60,42 @@ //If there are no rows, there's a problem. if (DB_num_rows($result)==0){ - $title = _('Print Packing Slip Error'); - include('includes/header.inc'); - echo '<div class="centre"><br /><br /><br />'; - prnMsg( _('Unable to Locate Order Number') . ' : ' . $_GET['TransNo'] . ' ', 'error'); - echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php?">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php?">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; - include('includes/footer.inc'); - exit(); + $title = _('Print Packing Slip Error'); + include('includes/header.inc'); + echo '<div class="centre"><br /><br /><br />'; + prnMsg( _('Unable to Locate Order Number') . ' : ' . $_GET['TransNo'] . ' ', 'error'); + echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> + <li>'. InternalLink($rootpath, 'SelectSalesOrder.php', _('Outstanding Sales Orders')) . '</li> + <li>'. InternalLink($rootpath, 'SelectCompletedOrder.php', _('Completed Sales Orders')) . '</li> + </td></tr></table></div>'; + include('includes/footer.inc'); + exit(); } elseif (DB_num_rows($result)==1){ /*There is only one order header returned - thats good! */ - $myrow = DB_fetch_array($result); - /* Place the deliver blind variable into a hold variable to used when - producing the packlist */ - $DeliverBlind = $myrow['deliverblind']; - if ($myrow['printedpackingslip']==1 AND ($_GET['Reprint']!='OK' OR !isset($_GET['Reprint']))){ - $title = _('Print Packing Slip Error'); - include('includes/header.inc'); - echo '<br />'; - prnMsg( _('The packing slip for order number') . ' ' . $_GET['TransNo'] . ' ' . - _('has previously been printed') . '. ' . _('It was printed on'). ' ' . ConvertSQLDate($myrow['datepackingslipprinted']) . - '<br />' . _('This check is there to ensure that duplicate packing slips are not produced and dispatched more than once to the customer'), 'warn' ); - echo '<p><a href="' . $rootpath . '/PrintCustOrder.php?&TransNo=' . $_GET['TransNo'] . '&Reprint=OK">' - . _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed') . '</a></p>' . - '<a href="' . $rootpath. '/PrintCustOrder_generic.php?&TransNo=' . $_GET['TransNo'] . '&Reprint=OK">'. _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed'). '</a>'; + $myrow = DB_fetch_array($result); + /* Place the deliver blind variable into a hold variable to used when + producing the packlist */ + $DeliverBlind = $myrow['deliverblind']; + if ($myrow['printedpackingslip']==1 AND ($_GET['Reprint']!='OK' OR !isset($_GET['Reprint']))){ + $title = _('Print Packing Slip Error'); + include('includes/header.inc'); + echo '<br />'; + prnMsg( _('The packing slip for order number') . ' ' . $_GET['TransNo'] . ' ' . + _('has previously been printed') . '. ' . _('It was printed on'). ' ' . ConvertSQLDate($myrow['datepackingslipprinted']) . + '<br />' . _('This check is there to ensure that duplicate packing slips are not produced and dispatched more than once to the customer'), 'warn' ); + echo '<p>' . InternalLink($rootpath, 'PrintCustOrder.php?&TransNo=' . $_GET['TransNo'] . '&Reprint=OK', _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed') . '</p>' . + InternalLink($rootpath, 'PrintCustOrder_generic.php?&TransNo=' . $_GET['TransNo'] . '&Reprint=OK', _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed')); - echo '<br /><br /><br />'; - echo _('Or select another Order Number to Print'); - echo '<table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php?">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php?">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; + echo '<br /><br /><br />'; + echo _('Or select another Order Number to Print'); + echo '<table class="table_index"><tr><td class="menu_group_item"> + <li>'. InternalLink($rootpath, 'SelectSalesOrder.php', _('Outstanding Sales Orders')) . '</li> + <li>'. InternalLink($rootpath, 'SelectCompletedOrder.php', _('Completed Sales Orders')) . '</li> + </td></tr></table></div><br /><br /><br />'; - include('includes/footer.inc'); - exit; - }//packing slip has been printed. + include('includes/footer.inc'); + exit; + }//packing slip has been printed. } /*retrieve the order details from the database to print */ @@ -143,7 +142,7 @@ while ($myrow2=DB_fetch_array($result)){ - $ListCount ++; + $ListCount ++; $DisplayQty = locale_number_format($myrow2['quantity'],$myrow2['decimalplaces']); $DisplayPrevDel = locale_number_format($myrow2['qtyinvoiced'],$myrow2['decimalplaces']); @@ -173,12 +172,12 @@ } /*end for loop to print the whole lot twice */ if ($ListCount == 0) { //UldisN - $title = _('Print Packing Slip Error'); - include('includes/header.inc'); - echo '<br />'. _('There were no outstanding items on the order to deliver') . '. ' . _('A packing slip cannot be printed'). - '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?">'. _('Print Another Packing Slip/Order'). - '</a>' . '<br />'. '<a href="' . $rootpath . '/index.php?">' . _('Back to the menu') . '</a>'; - include('includes/footer.inc'); + $title = _('Print Packing Slip Error'); + include('includes/header.inc'); + echo '<br />'. _('There were no outstanding items on the order to deliver') . '. ' . _('A packing slip cannot be printed'). + '<br />' . InternalLink($rootpath, 'SelectSalesOrder.php', _('Print Another Packing Slip/Order')). + '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); + include('includes/footer.inc'); exit; } else { $pdf->OutputF($_SESSION['DatabaseName'] . '_PackingSlip_' . date('Y-m-d_h-m-s') . '.pdf');//UldisN Modified: trunk/PrintSalesOrder_generic.php =================================================================== --- trunk/PrintSalesOrder_generic.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/PrintSalesOrder_generic.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -13,10 +13,10 @@ include('includes/header.inc'); echo '<div class="centre"><br /><br /><br />'; prnMsg( _('Select an Order Number to Print before calling this page') , 'error'); - echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; + echo '<table class="table_index"><tr><td class="menu_group_item"> + <li>'. InternalLink($rootpath, 'SelectSalesOrder.php', _('Outstanding Sales Orders')) . '</li> + <li>'. InternalLink($rootpath, 'SelectCompletedOrder.php', _('Completed Sales Orders')) . '</li> + </td></tr></table></div>'; include('includes/footer.inc'); exit(); } @@ -65,8 +65,8 @@ echo '<div class="centre"><br /><br /><br />'; prnMsg( _('Unable to Locate Order Number') . ' : ' . $_GET['TransNo'] . ' ', 'error'); echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> + <li>'. InternalLink($rootpath, 'SelectSalesOrder.php', _('Outstanding Sales Orders')) . '</li> + <li>'. InternalLink($rootpath, 'SelectCompletedOrder.php', _('Completed Sales Orders')) . '</li> </td></tr></table></div><br /><br /><br />'; include('includes/footer.inc'); exit(); @@ -83,15 +83,14 @@ prnMsg( _('The packing slip for order number') . ' ' . $_GET['TransNo'] . ' ' . _('has previously been printed') . '. ' . _('It was printed on'). ' ' . ConvertSQLDate($myrow['datepackingslipprinted']) . '<br />' . _('This check is there to ensure that duplicate packing slips are not produced and dispatched more than once to the customer'), 'warn' ); - echo '<p><a href="' . $rootpath . '/PrintCustOrder.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK">' - . _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed') . '</a></p>' . - '<a href="' . $rootpath. '/PrintCustOrder_generic.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK">'. _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed'). '</a>'; + echo '<p>' . InternalLink($rootpath, 'PrintCustOrder.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK', _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed')) . '</p>' . + InternalLink($rootpath, 'PrintCustOrder_generic.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK', _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed')); echo '<br /><br /><br />'; echo _('Or select another Order Number to Print'); echo '<table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> + <li>'. InternalLink($rootpath, 'SelectSalesOrder.php', _('Outstanding Sales Orders')) . '</li> + <li>'. InternalLink($rootpath, 'SelectCompletedOrder.php', _('Completed Sales Orders')) . '</li> </td></tr></table></div><br /><br /><br />'; include('includes/footer.inc'); @@ -178,8 +177,8 @@ $title = _('Print Packing Slip Error'); include('includes/header.inc'); echo '<p>'. _('There were no outstanding items on the order to deliver. A packing slip cannot be printed'). - '<br /><a href="' . $rootpath . '/SelectSalesOrder.php">'. _('Print Another Packing Slip/Order'). - '</a>' . '<br />'. '<a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a></p>'; + '<br />' . InternalLink($rootpath, 'SelectSalesOrder.php', _('Print Another Packing Slip/Order')). + '</a>' . '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')) . '</p>'; include('includes/footer.inc'); exit; } else { Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/PurchData.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -25,7 +25,7 @@ $NoPurchasingData=0; -echo '<a href="' . $rootpath . '/SelectProduct.php">' . _('Back to Items') . '</a><br />'; +echo InternalLink($rootpath, 'SelectProduct.php', _('Back to Items')) . '<br />'; if (isset($_POST['SupplierDescription'])) { $_POST['SupplierDescription'] = trim($_POST['SupplierDescription']); @@ -217,42 +217,20 @@ } else { $DisplayPreferred = _('No'); } - printf('<td>%s</td> - <td class="number">%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s ' . _('days') . '</td> - <td>%s</td> - <td><a href="%s?StockID=%s&SupplierID=%s&Edit=1&EffectiveFrom=%s">' . _('Edit') . '</a></td> - <td><a href="%s?StockID=%s&SupplierID=%s&Copy=1&EffectiveFrom=%s">' . _('Copy') . '</a></td> - <td><a href="%s?StockID=%s&SupplierID=%s&Delete=1&EffectiveFrom=%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this suppliers price?') . '\');">' . _('Delete') . '</a></td> - </tr>', - $myrow['suppname'], - locale_number_format($myrow['price'], 4), - $myrow['currcode'], - ConvertSQLDate($myrow['effectivefrom']), - $myrow['unitname'], - locale_number_format($myrow['conversionfactor'], 4), - locale_number_format($myrow['price']/$myrow['conversionfactor'],4), - locale_number_format($myrow['minorderqty'], $myrow['uomdecimalplaces']), - locale_number_format($myrow['leadtime'], 0), - $DisplayPreferred, - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), - $StockID, - $myrow['supplierno'], - $myrow['effectivefrom'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), - $StockID, - $myrow['supplierno'], - $myrow['effectivefrom'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), - $StockID, - $myrow['supplierno'], - $myrow['effectivefrom']); + echo '<td>' . $myrow['suppname'] . '</td> + <td class="number">' . locale_number_format($myrow['price'], 4) . '</td> + <td>' . $myrow['currcode'] . '</td> + <td>' . ConvertSQLDate($myrow['effectivefrom']) . '</td> + <td>' . $myrow['unitname'] . '</td> + <td class="number">' . locale_number_format($myrow['conversionfactor'], 4) . '</td> + <td class="number">' . locale_number_format($myrow['price']/$myrow['conversionfactor'],4) . '</td> + <td class="number">' . locale_number_format($myrow['minorderqty'], $myrow['uomdecimalplaces']) . '</td> + <td class="number">' . locale_number_format($myrow['leadtime'], 0) . ' ' . _('days') . '</td> + <td>' . $DisplayPreferred . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?StockID=' . $StockID . '&SupplierID=' . $myrow['supplierno'] . '&Edit=1&EffectiveFrom=' . $myrow['effectivefrom'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?StockID=' . $StockID . '&SupplierID=' . $myrow['supplierno'] . '&Copy=1&EffectiveFrom=' . $myrow['effectivefrom'], _('Copy')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?StockID=' . $StockID . '&SupplierID=' . $myrow['supplierno'] . '&Delete=1&EffectiveFrom=' . $myrow['effectivefrom'], _('Delete')) . '</td> + </tr>'; } //end of while loop echo '</table><br />'; if ($CountPreferreds > 1) { @@ -576,10 +554,10 @@ echo '</div><br />'; echo '<div class="centre">'; if (isset($StockLocation) and isset($StockID) AND mb_strlen($StockID) != 0) { - echo '<br /><a href="' . $rootpath . '/StockStatus.php?StockID=' . $StockID . '">' . _('Show Stock Status') . '</a>'; - echo '<br /><a href="' . $rootpath . '/StockMovements.php?StockID=' . $StockID . '&StockLocation=' . $StockLocation . '">' . _('Show Stock Movements') . '</a>'; - echo '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?SelectedStockItem=' . $StockID . '&StockLocation=' . $StockLocation . '">' . _('Search Outstanding Sales Orders') . '</a>'; - echo '<br /><a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedStockItem=' . $StockID . '">' . _('Search Completed Sales Orders') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'StockStatus.php?StockID=' . $StockID, _('Show Stock Status')); + echo '<br />' . InternalLink($rootpath, 'StockMovements.php?StockID=' . $StockID . '&StockLocation=' . $StockLocation, _('Show Stock Movements')); + echo '<br />' . InternalLink($rootpath, 'SelectSalesOrder.php?SelectedStockItem=' . $StockID . '&StockLocation=' . $StockLocation, _('Search Outstanding Sales Orders')); + echo '<br />' . InternalLink($rootpath, 'SelectCompletedOrder.php?SelectedStockItem=' . $StockID, _('Search Completed Sales Orders')); } echo '</form></div>'; } Modified: trunk/RecurringSalesOrders.php =================================================================== --- trunk/RecurringSalesOrders.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/RecurringSalesOrders.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -173,7 +173,7 @@ prnMsg(_('Successfully deleted recurring sales order template number') . ' ' . $_POST['ExistingRecurrOrderNo'],'success'); - echo '<p><a href="'.$rootpath.'/SelectRecurringSalesOrder.php">'. _('Select A Recurring Sales Order Template') .'</a></p>'; + echo '<p>' . InternalLink($rootpath, 'SelectRecurringSalesOrder.php', _('Select A Recurring Sales Order Template')) .'</p>'; unset($_SESSION['Items'.$identifier]->LineItems); unset($_SESSION['Items'.$identifier]); @@ -296,9 +296,9 @@ prnMsg(_('The recurring order template has been updated'),'success'); } - echo '<p><a href="'.$rootpath.'/SelectOrderItems.php?NewOrder=Yes">'. _('Enter New Sales Order') .'</a></p>'; + echo '<p>' . InternalLink($rootpath, 'SelectOrderItems.php?NewOrder=Yes', _('Enter New Sales Order')) .'</p>'; - echo '<p><a href="'.$rootpath.'/SelectRecurringSalesOrder.php">'. _('Select A Recurring Sales Order Template') .'</a></p>'; + echo '<p>' . InternalLink($rootpath, 'SelectRecurringSalesOrder.php', _('Select A Recurring Sales Order Template')) .'</p>'; unset($_SESSION['Items'.$identifier]->LineItems); unset($_SESSION['Items'.$identifier]); Modified: trunk/ReorderLevel.php =================================================================== --- trunk/ReorderLevel.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/ReorderLevel.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -60,7 +60,7 @@ $title = _('Reorder Level') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The Reorder Level report could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $sql; } @@ -175,7 +175,7 @@ $title = _('Print Reorder Level Report'); include('includes/header.inc'); prnMsg(_('There were no items with demand greater than supply'),'error'); - echo '<br /><a href="' . $rootpath . '/index.php?">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php?', _('Back to the menu')); include('includes/footer.inc'); exit; } else { @@ -224,7 +224,7 @@ </table> <br />'; prnMsg(_('There are no stock categories currently defined please use the link below to set them up'),'warn'); - echo '<br /><a href="' . $rootpath . '/StockCategories.php">' . _('Define Stock Categories') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'StockCategories.php', _('Define Stock Categories')); include ('includes/footer.inc'); exit; } Modified: trunk/ReprintGRN.php =================================================================== --- trunk/ReprintGRN.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/ReprintGRN.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -86,7 +86,7 @@ echo '<td>' . $myrow['itemdescription'] . '</td>'; echo '<td>' . $myrow['deliverydate'] . '</td>'; echo '<td class="number">' . locale_number_format($myrow['qtyrecd'], $myrow['decimalplaces']) . '</td>'; - echo '<td><a href="PDFGrn.php?GRNNo=' . $myrow['grnbatch'] .'&PONo=' . $_POST['PONumber'] . '">' . _('Reprint') . '</a></td>'; + echo '<td>' . InternalLink('', 'PDFGrn.php?GRNNo=' . $myrow['grnbatch'] .'&PONo=' . $_POST['PONumber'], _('Reprint')) . '</td>'; echo '</tr>'; } echo '</table>'; Modified: trunk/ReverseGRN.php =================================================================== --- trunk/ReverseGRN.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/ReverseGRN.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -336,7 +336,7 @@ echo '<br />' . _('GRN number') . ' ' . $_GET['GRNNo'] . ' ' . _('for') . ' ' . $QtyToReverse . ' x ' . $GRN['itemcode'] . ' - ' . $GRN['itemdescription'] . ' ' . _('has been reversed') . '<br />'; unset($_GET['GRNNo']); // to ensure it cant be done again!! - echo '<a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Select another GRN to Reverse') . '</a>'; + echo InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Select another GRN to Reverse')); /*end of Process Goods Received Reversal entry */ } else { @@ -407,7 +407,7 @@ $DisplayQtyInv = locale_number_format($myrow['quantityinv'],$myrow['decimalplaces']); $DisplayQtyRev = locale_number_format($myrow['qtytoreverse'],$myrow['decimalplaces']); $DisplayDateDel = ConvertSQLDate($myrow['deliverydate']); - $LinkToRevGRN = '<a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?GRNNo=' . $myrow['grnno'] . '">' . _('Reverse') . '</a>'; + $LinkToRevGRN = InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?GRNNo=' . $myrow['grnno'], _('Reverse')); printf('<td>%s</td> <td>%s</td> Modified: trunk/SalesAnalReptCols.php =================================================================== --- trunk/SalesAnalReptCols.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/SalesAnalReptCols.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -278,41 +278,24 @@ $BudOrAct = _('N/A'); } - printf('<td><a href="%sReportID=%s&SelectedCol=%s">%s</a></td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%sReportID=%s&SelectedCol=%s&delete=1">' . _('Delete') . '</td></tr>', - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $ReportID, - $myrow[1], - $myrow[1], - $myrow[2], - $myrow[3], - $Calc, - $myrow[5], - $myrow[6], - $myrow[7], - $myrow[8], - $myrow[9], - $myrow[10], - $BudOrAct, - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $ReportID, - $myrow[1]); + echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?ReportID=' . $ReportID . '&SelectedCol=' . $myrow[1], $myrow[1]) . '</td> + <td>' . $myrow[2] . '</td> + <td>' . $myrow[3] . '</td> + <td>' . $Calc . '</td> + <td>' . $myrow[5] . '</td> + <td>' . $myrow[6] . '</td> + <td>' . $myrow[7] . '</td> + <td>' . $myrow[8] . '</td> + <td>' . $myrow[9] . '</td> + <td>' . $myrow[10] . '</td> + <td>' . $BudOrAct . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?ReportID=' . $ReportID . '&SelectedCol=' . $myrow[1] . '&delete=1', _('Delete')) . '</td></tr>'; } while ($myrow = DB_fetch_array($result)); //END WHILE LIST LOOP } -echo '</table><br /><div class="centre"><a href="' . $rootpath . '/SalesAnalRepts.php">' . _('Maintain Report Headers') . '</a></div><br />'; +echo '</table><br /><div class="centre">' . InternalLink($rootpath, 'SalesAnalRepts.php', _('Maintain Report Headers')) . '</div><br />'; if (DB_num_rows($result)>10){ prnMsg(_('WARNING') . ': ' . _('User defined reports can have up to 10 columns defined') . '. ' . _('The report will not be able to be run until some columns are deleted'),'warn'); } Modified: trunk/SalesAnalRepts.php =================================================================== --- trunk/SalesAnalRepts.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/SalesAnalRepts.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -294,26 +294,14 @@ } - printf('<td>%s</td> - <td>%s</td> - <td><a href="%sSelectedReport=%s\">' . _('Design') . '</a></td> - <td><a href="%s/SalesAnalReptCols.php?ReportID=%s">' . _('Define Columns') . '</a></td> - <td><a href="%s/SalesAnalysis_UserDefined.php?ReportID=%s&ProducePDF=True">' . _('Make PDF Report') . '</a></td> - <td><a href="%s/SalesAnalysis_UserDefined.php?ReportID=%s&ProduceCVSFile=True">' . _('Make CSV File') . '</a></td> - <td><a href="%sSelectedReport=%s&delete=1" onclick="return confirm("' . _('Are you sure you wish to remove this report design?') . '");">' . _('Delete') . '</td> - </tr>', - $myrow[0], - $myrow[1], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow[0], - $rootpath, - $myrow[0], - $rootpath, - $myrow[0], - $rootpath, - $myrow[0], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow[0]); + echo '<td>' . $myrow['reportid'] . '</td> + <td>' . $myrow['reportheading'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedReport=' . $myrow['reportid'], _('Design')) . '</td> + <td>' . InternalLink($rootpath, 'SalesAnalReptCols.php?ReportID=' . $myrow['reportid'], _('Define Columns')) . '</td> + <td>' . InternalLink($rootpath, 'SalesAnalysis_UserDefined.php?ReportID=' . $myrow['reportid'] . '&ProducePDF=True', _('Make PDF Report')) . '</td> + <td>' . InternalLink($rootpath, 'SalesAnalysis_UserDefined.php?ReportID=' . $myrow['reportid'] . '&ProduceCVSFile=True', _('Make CSV File')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedReport=' . $myrow['reportid'] . '&delete=1', _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP @@ -325,7 +313,7 @@ if (isset($SelectedReport)) { - echo '<a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Show All Defined Reports') . '</a>'; + echo InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Show All Defined Reports')); } echo '<br />'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-25 17:45:42
|
Revision: 9552 http://weberp.svn.sourceforge.net/weberp/?rev=9552&view=rev Author: tim_schofield Date: 2012-08-25 17:45:34 +0000 (Sat, 25 Aug 2012) Log Message: ----------- Replace <a tags with new InternalLink() function Modified Paths: -------------- trunk/POReport.php trunk/PO_Items.php trunk/PO_OrderDetails.php trunk/PO_PDFPurchOrder.php trunk/PO_SelectOSPurchOrder.php trunk/PO_SelectPurchOrder.php trunk/PricesByCost.php trunk/Prices_Customer.php Removed Paths: ------------- trunk/css/silverwolf/images/inventory-original.png trunk/css/silverwolf/images/maintenance-original.png Modified: trunk/POReport.php =================================================================== --- trunk/POReport.php 2012-08-24 19:44:01 UTC (rev 9551) +++ trunk/POReport.php 2012-08-25 17:45:34 UTC (rev 9552) @@ -71,8 +71,7 @@ submitcsv($db, $PartNumber, $PartNumberOp, $SupplierId, $SupplierIdOp, $SupplierName, $SupplierNameOp, $SaveSummaryType); } else { - echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/maintenance.png" title="' . _('Search') . '" alt="" />' . $title . '</p>'; - display($db); + display($db, $rootpath, $theme); } //####_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT#### @@ -692,32 +691,18 @@ else { $ViewPurchOrder = $rootpath . '/PO_Header.php?ModifyOrderNumber=' . $myrow['orderno']; } - printf('<td><a href="' . $ViewPurchOrder . '">%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="'.$rootpath . '/SelectProduct.php?StockID=%s">%s</a></td> - <td><a href="'.$rootpath . '/SelectSupplier.php?SupplierID=%s">%s</a></td> - <td class="number">%s</td> - <td class="number">%s %s</td> - <td class="number">%s %s</td> - <td class="number">%s</td> - <td>%s</td><td>%s</td></tr>', - $myrow['orderno'], - ConvertSQLDate($myrow['orddate']), - $myrow['initiator'], - $myrow['itemcode'] , - $myrow['description'] , - $myrow['supplierno'], - $myrow['suppname'], - locale_number_format($myrow['quantityord'], $myrow['decimalplaces']) , - $myrow['currcode'], - locale_money_format($myrow['extcost'], $myrow['currcode']) , - $myrow['currcode'], - locale_money_format($myrow['extprice'], $myrow['currcode']) , - locale_number_format($myrow['qtyinvoiced'], $myrow['decimalplaces']) , - $myrow['linestatus'], - ConvertSQLDate($myrow['deliverydate']) - ); + echo '<td>' . InternalLink('', $ViewPurchOrder, $myrow['orderno']) . '</td> + <td>' . ConvertSQLDate($myrow['orddate']) . '</td> + <td>' . $myrow['initiator'] . '</td> + <td>' . InternalLink($rootpath, 'SelectProduct.php?StockID=' . $myrow['itemcode'], $myrow['description']) . '</td> + <td>' . InternalLink($rootpath, 'SelectSupplier.php?SupplierID=' . $myrow['supplierno'], $myrow['suppname']) . '</td> + <td class="number">' . locale_number_format($myrow['quantityord'], $myrow['decimalplaces']) . '</td> + <td class="number">' . $myrow['currcode'] . ' ' . locale_money_format($myrow['extcost'], $myrow['currcode']) . '</td> + <td class="number">' . $myrow['currcode'] . ' ' . locale_money_format($myrow['extprice'], $myrow['currcode']) . '</td> + <td class="number">' . locale_number_format($myrow['qtyinvoiced'], $myrow['decimalplaces']) . '</td> + <td>' . $myrow['linestatus'] . '</td> + <td>' . ConvertSQLDate($myrow['deliverydate']) . '</td> + </tr>'; $LastDecimalPlaces = $myrow['decimalplaces']; $TotalQty+= $myrow['quantityord']; @@ -755,32 +740,18 @@ else { $ViewPurchOrder = $rootpath . '/PO_Header.php?ModifyOrderNumber=' . $myrow['orderno']; } - printf('<td><a href="' . $ViewPurchOrder . '">%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="'.$rootpath . '/SelectProduct.php?StockID=%s">%s</a></td> - <td><a href="'.$rootpath . '/SelectSupplier.php?SupplierID=%s">%s</a></td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td>%s</td> - <td>%s</td> - </tr>', - $myrow['orderno'], - ConvertSQLDate($myrow['orddate']) , - $myrow['initiator'], - $myrow['itemcode'], - $myrow['description'], - $myrow['supplierno'], - $myrow['suppname'], - locale_number_format($myrow['quantityord'], $myrow['decimalplaces']) , - locale_money_format($myrow['extcost'], $myrow['currcode']) , - locale_money_format($myrow['extprice'], $myrow['currcode']) , - locale_number_format($myrow['qtyinvoiced'], $myrow['decimalplaces']) , - $myrow['linestatus'], - ConvertSQLDate($myrow['deliverydate']) - ); + echo '<td>' . InternalLink('', $ViewPurchOrder, $myrow['orderno']) . '</td> + <td>' . ConvertSQLDate($myrow['orddate']) . '</td> + <td>' . $myrow['initiator'] . '</td> + <td>' . InternalLink($rootpath, 'SelectProduct.php?StockID=' . $myrow['itemcode'], $myrow['description']) . '</td> + <td>' . InternalLink($rootpath, 'SelectSupplier.php?SupplierID=' . $myrow['supplierno'], $myrow['suppname']) . '</td> + <td class="number">' . locale_number_format($myrow['quantityord'], $myrow['decimalplaces']) . '</td> + <td class="number">' . locale_money_format($myrow['extcost'], $myrow['currcode']) . '</td> + <td class="number">' . locale_money_format($myrow['extprice'], $myrow['currcode']) . '</td> + <td class="number">' . locale_number_format($myrow['qtyinvoiced'], $myrow['decimalplaces']) . '</td> + <td>' . $myrow['linestatus'] . '</td> + <td>' . ConvertSQLDate($myrow['deliverydate']) . '</td> + </tr>'; $LastDecimalPlaces = $myrow['decimalplaces']; $TotalQty+= $myrow['quantityord']; @@ -864,8 +835,13 @@ else { $ViewPurchOrder = $rootpath . '/PO_Header.php?ModifyOrderNumber=' . $myrow['orderno']; } - printf('<td><a href="' . $ViewPurchOrder . '">%s</td> - <td>%s</td><td class="number">%s</td><td class="number">%s</td><td class="number">%s</td><td class="number">%s</td></tr>', $myrow[$summarytype], $myrow[$description], locale_number_format($myrow['quantityord'], $myrow['decimalplaces']), locale_money_format($myrow['extcost'], $myrow['currcode']) , locale_money_format($myrow['extprice'], $myrow['currcode']) , locale_number_format($myrow['qtyinvoiced'], $myrow['decimalplaces']), $suppname); + echo '<td>' . InternalLink('', $ViewPurchOrder, $myrow[$summarytype]) . '</td> + <td>' . $myrow[$description] . '</td> + <td class="number">' . locale_number_format($myrow['quantityord'], $myrow['decimalplaces']) . '</td> + <td class="number">' . locale_money_format($myrow['extcost'], $myrow['currcode']) . '</td> + <td class="number">' . locale_money_format($myrow['extprice'], $myrow['currcode']) . '</td> + <td class="number">' . locale_number_format($myrow['qtyinvoiced'], $myrow['decimalplaces']) . '</td> + </tr>'; $TotalQty+= $myrow['quantityord']; $TotalExtCost+= $myrow['extcost']; $TotalExtPrice+= $myrow['extprice']; @@ -892,7 +868,7 @@ echo '<input type="hidden" name="SortBy" value="' . $_POST['SortBy'] . '" />'; echo '<input type="hidden" name="SummaryType" value="' . $_POST['SummaryType'] . '" />'; echo '<br /><div class="centre"><button type="submit" name="submitcsv">' . _('Export as csv file') . '</button></div></td>'; - echo '<br /><div class="centre"><a href="">' . _('Return to Selection') . '</a></div>'; + echo '<br /><div class="centre">' . _('Return to Selection') . '</div>'; echo '</form>'; } // End of if inputerror != 1 @@ -1487,15 +1463,14 @@ fclose($FileHandle); echo '<div class="centre"><p>' . _('The report has been exported as a csv file.') . '</p>'; - echo '<p><a href="' . $FileName . '">' . _('click here') . '</a> ' . _('to view the file') . '</div></p>'; - echo '<div class="centre"><a href="">' . _('Return to Selection') . '</a></div>'; + echo '<p>' . InternalLink('', $FileName, _('click here')) . _('to view the file') . '</div></p>'; } // End of if inputerror != 1 } // End of function submitcvs() -function display(&$db) //####DISPLAY_DISPLAY_DISPLAY_DISPLAY_DISPLAY_DISPLAY_##### +function display(&$db, $rootpath, $theme) //####DISPLAY_DISPLAY_DISPLAY_DISPLAY_DISPLAY_DISPLAY_##### { @@ -1506,6 +1481,11 @@ echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; + echo '<tr> + <th class="header" colspan="4"> + <img src="' . $rootpath . '/css/' . $theme . '/images/maintenance.png" title="' . _('Search') . '" alt="" />' . _('Purchase Order Report') . ' + </th> + </tr>'; echo '<tr><td>' . _('Report Type') . ':</td>'; echo '<td><select name="ReportType">'; echo '<option selected="True" value="Detail">' . _('Detail') . '</option>'; @@ -1597,16 +1577,12 @@ echo '<option value="suppname">' . _('Supplier Name') . '</option>'; echo '<option value="month">' . _('Month') . '</option>'; echo '<option value="categoryid">' . _('Stock Category') . '</option>'; - echo '</select></td><td> </td></tr>'; - echo '<tr><td> </td></tr> - <tr> - <td colspan="4"><div class="centre"><button type="submit" name="submit">' . _('Run Inquiry') . '</button></div></td> - </tr> - <tr> - <td colspan="4"><div class="centre"><button type="submit" name="submitcsv">' . _('Export as csv file') . '</button></div></td> - </tr> - </table> - <br/>'; + echo '</select></td>'; + echo '</table> + <div class="centre"> + <button type="submit" name="submit">' . _('Run Inquiry') . '</button> + <button type="submit" name="submitcsv">' . _('Export as csv file') . '</button> + </div>'; echo '</form>'; } // End of function display() Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2012-08-24 19:44:01 UTC (rev 9551) +++ trunk/PO_Items.php 2012-08-25 17:45:34 UTC (rev 9552) @@ -1068,7 +1068,7 @@ <td><input type="text" name="StockCode" size="15" maxlength="18" value="' . $_POST['StockCode'] . '" /></td> </tr> <tr><td></td> - <td><font size="3"><b>' . _('OR') . ' </b></font><a target="_blank" href="'.$rootpath.'/Stocks.php">' . _('Create a New Stock Item') . '</a></td></tr> + <td><font size="3"><b>' . _('OR') . ' </b></font>' . InternalLink($rootpath, 'Stocks.php', _('Create a New Stock Item')) . '</td></tr> </table><br /> <div class="centre"><button type="submit" name="Search">' . _('Search Now') . '</button> <button type="submit" name="NonStockOrder">' . _('Order a non stock item') . '</button> @@ -1086,7 +1086,7 @@ <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Units') . '</th> - <th colspan="2"><a href="#end">'._('Go to end of list').'</a></th> + <th colspan="2">'._('Go to end of list').'</th> </tr>'; echo $TableHeader; Modified: trunk/PO_OrderDetails.php =================================================================== --- trunk/PO_OrderDetails.php 2012-08-24 19:44:01 UTC (rev 9551) +++ trunk/PO_OrderDetails.php 2012-08-25 17:45:34 UTC (rev 9552) @@ -36,7 +36,7 @@ echo '<table class="table_index"> <tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/PO_SelectPurchOrder.php">' . _('Outstanding Purchase Orders') . '</a></li> + <li>'. InternalLink($rootpath, 'PO_SelectPurchOrder.php', _('Outstanding Purchase Orders')) . '</li> </td></tr></table>'; include('includes/footer.inc'); exit; @@ -67,10 +67,10 @@ } else { prnMsg ( _('The order requested could not be retrieved') . ' - ' . _('the SQL returned either several purchase orders'), 'error'); } - echo '<table class="table_index"> - <tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/PO_SelectPurchOrder.php">' . _('Outstanding Sales Orders') . '</a></li> - </td></tr></table>'; + echo '<table class="table_index"> + <tr><td class="menu_group_item"> + <li>' . InternalLink($rootpath, 'PO_SelectPurchOrder.php', _('Outstanding Sales Orders')) . '</li> + </td></tr></table>'; include('includes/footer.inc'); exit; @@ -82,12 +82,15 @@ $OrderCurrCode = $myrow['currcode']; /* SHOW ALL THE ORDER INFO IN ONE PLACE */ -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Purchase Order') . '" alt="" />' . ' ' . $title . '</p>'; echo '<table class="selection" cellpadding="2">'; +echo '<tr> + <th class="header" colspan="2"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Purchase Order') . '" alt="" />' . ' ' . $title . ' + </th> + </tr>'; echo '<tr><th colspan="8" class="header">'. _('Order Header Details'). '</th></tr>'; -echo '<tr><th style="text-align:left">' . _('Supplier Code'). '</td><td><a href="SelectSupplier.php?SupplierID='.$myrow['supplierid'].'">' . $myrow['supplierid'] . '</a></td> - <th style="text-align:left">' . _('Supplier Name'). '</td><td><a href="SelectSupplier.php?SupplierID='.$myrow['supplierid'].'">' . $myrow['suppname'] . '</a></td></tr>'; +echo '<tr><th style="text-align:left">' . _('Supplier Code'). '</td><td>' . InternalLink('', 'SelectSupplier.php?SupplierID='.$myrow['supplierid'], $myrow['supplierid']) . '</td> + <th style="text-align:left">' . _('Supplier Name'). '</td><td>' . InternalLink('', 'SelectSupplier.php?SupplierID='.$myrow['supplierid'], $myrow['suppname']) . '</td></tr>'; echo '<tr><th style="text-align:left">' . _('Ordered On'). '</td><td>' . ConvertSQLDate($myrow['orddate']) . '</td> <th style="text-align:left">' . _('Delivery Address 1'). '</td><td>' . $myrow['deladd1'] . '</td></tr>'; @@ -112,10 +115,10 @@ if ($myrow['dateprinted'] == ''){ echo '<i>'. _('Not yet printed') . '</i> '; - echo '[<a href="PO_PDFPurchOrder.php?OrderNo='. $_GET['OrderNo'] .'">'. _('Print') .'</a>]'; + echo '[' . InternalLink('', 'PO_PDFPurchOrder.php?OrderNo='. $_GET['OrderNo'], _('Print')) . ']'; } else { echo _('Printed on').' '. ConvertSQLDate($myrow['dateprinted']). ' '; - echo '[<a href="PO_PDFPurchOrder.php?OrderNo='. $_GET['OrderNo'] .'">'. _('Print a Copy') .'</a>]'; + echo '[' . InternalLink('', 'PO_PDFPurchOrder.php?OrderNo='. $_GET['OrderNo'], _('Print a Copy')) . ']'; } echo '</td></tr>'; @@ -173,14 +176,14 @@ // if overdue and outstanding quantities, then highlight as so if (($myrow['quantityord'] - $myrow['quantityrecd'] > 0) AND Date1GreaterThanDate2(Date($_SESSION['DefaultDateFormat']), $DisplayReqdDate)){ - echo '<tr class="OsRow">'; + echo '<tr class="OsRow">'; } else { - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k=1; + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k=1; } } Modified: trunk/PO_PDFPurchOrder.php =================================================================== --- trunk/PO_PDFPurchOrder.php 2012-08-24 19:44:01 UTC (rev 9551) +++ trunk/PO_PDFPurchOrder.php 2012-08-25 17:45:34 UTC (rev 9552) @@ -11,14 +11,14 @@ prnMsg( _('Select a Purchase Order Number to Print before calling this page') , 'error'); echo '<br /><br /><br /><table class="table_index"> <tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/PO_SelectOSPurchOrder.php">' . _('Outstanding Purchase Orders') . '</a></li> - <li><a href="'. $rootpath . '/PO_SelectPurchOrder.php">' . _('Purchase Order Inquiry') . '</a></li> + <li>'. InternalLink($rootpath, 'PO_SelectOSPurchOrder.php', _('Outstanding Purchase Orders')) . '</li> + <li>'. InternalLink($rootpath, 'PO_SelectPurchOrder.php', _('Purchase Order Inquiry')) . '</li> </td></tr></table></div><br /><br /><br />'; include('includes/footer.inc'); exit(); echo '<div class="centre"><br /><br /><br />' . _('This page must be called with a purchase order number to print'); - echo '<br /><a href="'. $rootpath . '/index.php">' . _('Back to the menu') . '</a></div>'; + echo '<br />'. InternalLink($rootpath, 'index.php', _('Back to the menu')) . '</div>'; exit; } if (isset($_GET['OrderNo'])){ @@ -99,12 +99,12 @@ if (DB_num_rows($result)==0){ /*There is no order header returned */ $title = _('Print Purchase Order Error'); include('includes/header.inc'); - echo '<div class="centre"><br /><br /><br />'; + echo '<div class="centre">'; prnMsg( _('Unable to Locate Purchase Order Number') . ' : ' . $OrderNo . ' ', 'error'); echo '<br /><br /><br /><table class="table_index"> <tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/PO_SelectOSPurchOrder.php">' . _('Outstanding Purchase Orders') . '</a></li> - <li><a href="'. $rootpath . '/PO_SelectPurchOrder.php">' . _('Purchase Order Inquiry') . '</a></li> + <li>'. InternalLink($rootpath, 'PO_SelectOSPurchOrder.php', _('Outstanding Purchase Orders')) . '</li> + <li>'. InternalLink($rootpath, 'PO_SelectPurchOrder.php', _('Purchase Order Inquiry')) . '</li> </td></tr></table></div><br /><br /><br />'; include('includes/footer.inc'); exit(); @@ -122,13 +122,10 @@ _('This check is there to ensure that duplicate purchase orders are not sent to the supplier resulting in several deliveries of the same supplies'), 'warn'); echo '<br /><table class="table_index"> <tr><td class="menu_group_item"> - <li><a href="' . $rootpath . '/PO_PDFPurchOrder.php?OrderNo=' . $OrderNo . '&ViewingOnly=1">'. - _('Print This Order as a Copy'). '</a> - <li><a href="' . $rootpath . '/PO_Header.php?ModifyOrderNumber=' . $OrderNo . '">'. - _('Modify the order to allow a real reprint'). '</a>' . - '<li><a href="'. $rootpath .'/PO_SelectPurchOrder.php">'. - _('Select another order'). '</a>'. - '<li><a href="' . $rootpath . '/index.php">'. _('Back to the menu').'</a>'; + <li>' . InternalLink($rootpath, 'PO_PDFPurchOrder.php?OrderNo=' . $OrderNo . '&ViewingOnly=1'. _('Print This Order as a Copy')) . ' + <li>' . InternalLink($rootpath, 'PO_Header.php?ModifyOrderNumber=' . $OrderNo, _('Modify the order to allow a real reprint')) . ' + <li>' . InternalLink($rootpath, 'PO_SelectPurchOrder.php">', _('Select another order')) . ' + <li>' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; }//AllowedToPrint @@ -337,8 +334,7 @@ $emailresult=DB_query($emailsql, $db); $emailrow=DB_fetch_array($emailresult); $date = date($_SESSION['DefaultDateFormat']); - $StatusComment=$date.' - Printed by <a href="mailto:'.$emailrow['email'].'">'.$_SESSION['UserID']. - '</a><br />'.$comment; + $StatusComment=$date.' - Printed by ' . $_SESSION['UserID'] . '<br />'.$comment; $sql = " UPDATE purchorders SET @@ -351,11 +347,10 @@ $result = DB_query($sql,$db); } } /* There was enough info to either print or email the purchase order */ - else { /*the user has just gone into the page need to ask the question whether to print the order or email it to the supplier */ + else { /*the user has just gone into the page need to ask the question whether to print the order or email it to the supplier */ include ('includes/header.inc'); - echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/printer.png" title="' . _('Search') . '" alt="" />' . ' ' . - $title . '</p><br />'; + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/printer.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p><br />'; echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/PO_SelectOSPurchOrder.php =================================================================== --- trunk/PO_SelectOSPurchOrder.php 2012-08-24 19:44:01 UTC (rev 9551) +++ trunk/PO_SelectOSPurchOrder.php 2012-08-25 17:45:34 UTC (rev 9552) @@ -135,7 +135,7 @@ */ if (!isset($OrderNumber) or $OrderNumber=='' ){ - echo '<a href="' . $rootpath . '/PO_Header.php?NewOrder=Yes">' . _('Add Purchase Order') . '</a>'; + echo InternalLink($rootpath, 'PO_Header.php?NewOrder=Yes', _('Add Purchase Order')); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p>'; echo '<table class="selection"><tr><td>'._('Order Number') . ': <input type="text" name="OrderNumber" maxlength="8" size="9" /> ' . _('Into Stock Location') . ':<select name="StockLocation"> '; @@ -471,29 +471,26 @@ $ModifyPage = $rootpath . '/PO_Header.php?ModifyOrderNumber=' . $myrow['orderno']; if ($myrow['status'] == 'Printed') { - $ReceiveOrder = '<a href="'.$rootpath . '/GoodsReceived.php?PONumber=' . $myrow['orderno'].'">'. - _('Receive').'</a>'; + $ReceiveOrder = InternalLink($rootpath, 'GoodsReceived.php?PONumber=' . $myrow['orderno'], _('Receive')); } else { $ReceiveOrder = _('Receive'); } if ($myrow['allowprint'] == 1){ - $PrintPurchOrder = '<a target="_blank" href="' . $rootpath . '/PO_PDFPurchOrder.php?OrderNo=' . $myrow['orderno'] . '">' . _('Print Now') . '</a>'; + $PrintPurchOrder = InternalLink($rootpath, 'PO_PDFPurchOrder.php?OrderNo=' . $myrow['orderno'], _('Print Now')); } else { // not open yet // $PrintPurchOrder = '<font color=GREY>' . _('Printed') . '</font>'; } if ($myrow['status']=='Authorised') { - $PrintPurchOrder = '<a target="_blank" href="' . $rootpath . '/PO_PDFPurchOrder.php?OrderNo=' . $myrow['orderno'] . '&realorderno=' . $myrow['realorderno'] . '&ViewingOnly=2"> - ' . _('Print') . ' - </a>'; + $PrintPurchOrder = InternalLink($rootpath, 'PO_PDFPurchOrder.php?OrderNo=' . $myrow['orderno'] . '&realorderno=' . $myrow['realorderno'] . '&ViewingOnly=2', _('Print')); } else { $PrintPurchOrder = _('Printed'); } - $PrintPurchOrder2 = '<a target="_blank" href="' . $rootpath . '/PO_PDFPurchOrder.php?OrderNo=' . $myrow['orderno'] . '&realorderno=' . $myrow['realorderno'] . '&ViewingOnly=1">' . _('Show') . '</a>'; + $PrintPurchOrder2 = InternalLink($rootpath, 'PO_PDFPurchOrder.php?OrderNo=' . $myrow['orderno'] . '&realorderno=' . $myrow['realorderno'] . '&ViewingOnly=1', _('Show')); - $s2 = '<a target="_blank" href="' . $rootpath . '/PO_PDFPurchOrder.php?OrderNo=' . $myrow['orderno'] . '&realorderno=' . $myrow['realorderno'] . '&ViewingOnly=1">' . $myrow['realorderno']. '</a>'; + $s2 = InternalLink($rootpath, 'PO_PDFPurchOrder.php?OrderNo=' . $myrow['orderno'] . '&realorderno=' . $myrow['realorderno'] . '&ViewingOnly=1', $myrow['realorderno']); $FormatedOrderDate = ConvertSQLDate($myrow['orddate']); $FormatedOrderValue = locale_money_format($myrow['ordervalue'],$myrow['currcode']); @@ -507,10 +504,10 @@ echo '<td class="number">'.$FormatedOrderValue.'</td>'; } echo '<td>'._($myrow['status']).'</td> - <td><a href="'.$ModifyPage.'">' . _('Modify') . '</a></td> - <td>'.$PrintPurchOrder.'</td> - <td>'.$ReceiveOrder.'</td> - </tr>'; + <td>'.InternalLink('', $ModifyPage, _('Modify')) . '</td> + <td>'.$PrintPurchOrder.'</td> + <td>'.$ReceiveOrder.'</td> + </tr>'; //end of page full new headings if } //end of while loop Modified: trunk/PO_SelectPurchOrder.php =================================================================== --- trunk/PO_SelectPurchOrder.php 2012-08-24 19:44:01 UTC (rev 9551) +++ trunk/PO_SelectPurchOrder.php 2012-08-25 17:45:34 UTC (rev 9552) @@ -392,7 +392,7 @@ $FormatedOrderValue = locale_money_format($myrow['ordervalue'], $myrow['currcode']); /* View Supplier Currency Requisition Order Date Initiator Order Total ModifyPage, $myrow["orderno"], $myrow["suppname"], $myrow["currcode"], $myrow["requisitionno"] $FormatedOrderDate, $myrow["initiator"] $FormatedOrderValue Order Status*/ - echo '<td><a href="' . $ViewPurchOrder . '">' . $myrow['orderno'] . '</a></td> + echo '<td>' . InternalLink('', $ViewPurchOrder, $myrow['orderno']) . '</td> <td>' . $myrow['suppname'] . '</td> <td>' . $myrow['currcode'] . '</td> <td>' . $myrow['requisitionno'] . '</td> Modified: trunk/PricesByCost.php =================================================================== --- trunk/PricesByCost.php 2012-08-24 19:44:01 UTC (rev 9551) +++ trunk/PricesByCost.php 2012-08-25 17:45:34 UTC (rev 9552) @@ -5,8 +5,6 @@ $title = _('Update of Prices By A Multiple Of Cost'); include ('includes/header.inc'); -echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . _('Update Price By Cost') . '</p>'; - if (isset($_POST['submit']) or isset($_POST['update'])) { if ($_POST['Margin'] == '') { header('Location: PricesByCost.php'); @@ -117,7 +115,7 @@ DB_free_result($result); //clear the old result $result = DB_query($sql, $db); //re-run the query with the updated prices $numrow = DB_num_rows($result); // get the new number - should be the same!! - echo '<p><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Back') . '<a/></div></p>'; + echo '<p><div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Back')) . '</div></p>'; include('includes/footer.inc'); exit; } @@ -144,6 +142,12 @@ if ($numrow > 0) { //the number of prices returned from the main prices query is echo '<table class="selection">'; + + echo '<tr> + <th class="header" colspan="12"> + <img src="' . $rootpath . '/css/' . $theme . '/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . _('Update Price By Cost') . ' + </th> + </tr>'; echo '<tr><th>' . _('Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Customer') . '</th> @@ -222,14 +226,13 @@ echo '<input type="hidden" name="Counter" value="' . $PriceCounter . '" />'; echo '<tr> <td colspan="12" style="text-align:center"><button type="submit" name="submit">' . _('Update') . '</button> - <a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '"><button type="submit">' . _('Back') . '</button><a/></td> + ' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), '<button type="submit">' . _('Back') . '</button>') . '</td> </tr></form>'; } else { prnMsg(_('There were no prices meeting the criteria specified to review'),'info'); - echo '<p><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Back') . '<a/></div></p>'; + echo '<p><div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Back')) . '</div></p>'; } } else { /*The option to submit was not hit so display form */ - echo '<div class="page_help_text">' . _('Prices can be displayed based on their relation to cost') . '</div><br />'; echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -237,7 +240,13 @@ FROM stockcategory ORDER BY categorydescription"; $result1 = DB_query($SQL, $db); + echo '<tr> + <th class="header" colspan="12"> + <img src="' . $rootpath . '/css/' . $theme . '/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . _('Update Price By Cost') . ' + </th> + </tr>'; + echo '<tr> <td>' . _('Category') . ':</td> <td><select name="StockCat">'; echo '<option value="all">' . _('All Categories') . '' . '</option>'; @@ -283,7 +292,7 @@ } //end while loop DB_data_seek($result, 0); echo '</select></td></tr>'; - echo '</table><br /><div class="centre"><button type="submit" name="submit">' . _('Submit') . '</button></div>'; + echo '</table><div class="centre"><button type="submit" name="submit">' . _('Submit') . '</button></div>'; } /*end of else not submit */ include ('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2012-08-24 19:44:01 UTC (rev 9551) +++ trunk/Prices_Customer.php 2012-08-25 17:45:34 UTC (rev 9552) @@ -308,8 +308,8 @@ <td class="number">'.locale_number_format($myrow['decimalplaces'],0).'</td> <td>'.ConvertSQLDate($myrow['startdate']).'</td> <td>'.$EndDateDisplay.'</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8').'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</a></td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8').'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&delete=yes">' . _('Delete') . '</a></td> + <td>'.InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8').'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1', _('Edit')) . '</td> + <td>'.InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8').'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&delete=yes', _('Delete')) . '</td> </tr>'; } //END WHILE LIST LOOP Deleted: trunk/css/silverwolf/images/inventory-original.png =================================================================== --- trunk/css/silverwolf/images/inventory-original.png 2012-08-24 19:44:01 UTC (rev 9551) +++ trunk/css/silverwolf/images/inventory-original.png 2012-08-25 17:45:34 UTC (rev 9552) @@ -1,13 +0,0 @@ -\x89PNG - - |
From: <tim...@us...> - 2012-08-26 09:03:54
|
Revision: 9557 http://weberp.svn.sourceforge.net/weberp/?rev=9557&view=rev Author: tim_schofield Date: 2012-08-26 09:03:42 +0000 (Sun, 26 Aug 2012) Log Message: ----------- Replace <a tags with new InternalLink() function Modified Paths: -------------- trunk/PDFQuotationPortrait.php trunk/PDFRemittanceAdvice.php trunk/PDFStockCheckComparison.php trunk/PDFStockTransfer.php trunk/PDFStockTransfer_departments.php trunk/PDFTopItems.php trunk/PO_AuthorisationLevels.php trunk/PO_AuthoriseMyOrders.php trunk/PO_Header.php trunk/PO_Items.php Modified: trunk/PDFQuotationPortrait.php =================================================================== --- trunk/PDFQuotationPortrait.php 2012-08-25 19:44:45 UTC (rev 9556) +++ trunk/PDFQuotationPortrait.php 2012-08-26 09:03:42 UTC (rev 9557) @@ -7,16 +7,16 @@ include('includes/SQL_CommonFunctions.inc'); //Get Out if we have no order number to work with -If (!isset($_GET['QuotationNo']) or $_GET['QuotationNo']==""){ - $title = _('Select Quotation To Print'); - include('includes/header.inc'); - echo '<div class="centre"><br /><br /><br />'; - prnMsg( _('Select a Quotation to Print before calling this page') , 'error'); - echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php?Quotations=Quotes_Only">' . _('Quotations') . '</a></li> - </td></tr></table></div><br /><br /><br />'; - include('includes/footer.inc'); - exit(); +if (!isset($_GET['QuotationNo']) or $_GET['QuotationNo']==""){ + $title = _('Select Quotation To Print'); + include('includes/header.inc'); + echo '<div class="centre"><br /><br /><br />'; + prnMsg( _('Select a Quotation to Print before calling this page') , 'error'); + echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> + <li>'. InternalLink($rootpath, 'SelectSalesOrder.php?Quotations=Quotes_Only', _('Quotations')) . '</li> + </td></tr></table></div><br /><br /><br />'; + include('includes/footer.inc'); + exit(); } /*retrieve the order details from the database to print */ @@ -60,18 +60,18 @@ //If there are no rows, there's a problem. if (DB_num_rows($result)==0){ - $title = _('Print Quotation Error'); - include('includes/header.inc'); - echo '<div class="centre"><br /><br /><br />'; - prnMsg( _('Unable to Locate Quotation Number') . ' : ' . $_GET['QuotationNo'] . ' ', 'error'); - echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php?Quotations=Quotes_Only">' . _('Outstanding Quotations') . '</a></li> - </td></tr></table></div><br /><br /><br />'; - include('includes/footer.inc'); - exit; + $title = _('Print Quotation Error'); + include('includes/header.inc'); + echo '<div class="centre"><br /><br /><br />'; + prnMsg( _('Unable to Locate Quotation Number') . ' : ' . $_GET['QuotationNo'] . ' ', 'error'); + echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> + <li>'. InternalLink($rootpath, 'SelectSalesOrder.php?Quotations=Quotes_Only', _('Outstanding Quotations')) . '</li> + </td></tr></table></div><br /><br /><br />'; + include('includes/footer.inc'); + exit; } elseif (DB_num_rows($result)==1){ /*There is only one order header returned - thats good! */ - $myrow = DB_fetch_array($result); + $myrow = DB_fetch_array($result); } /*retrieve the order details from the database to print */ @@ -120,7 +120,7 @@ while ($myrow2=DB_fetch_array($result)){ - $ListCount ++; + $ListCount ++; if ((mb_strlen($myrow2['narrative']) >200 AND $YPos-$line_height <= 75) OR (mb_strlen($myrow2['narrative']) >1 AND $YPos-$line_height <= 62) @@ -238,12 +238,12 @@ //$pdfcode = $pdf->output('PDFQuotation.pdf', 'I'); //$len = mb_strlen($pdfcode); if ($ListCount == 0){ - $title = _('Print Quotation Error'); - include('includes/header.inc'); - echo '<br />'. _('There were no items on the quotation') . '. ' . _('The quotation cannot be printed'). - '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?Quotation=Quotes_only">'. _('Print Another Quotation'). - '</a>' . '<br />'. '<a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; - include('includes/footer.inc'); + $title = _('Print Quotation Error'); + include('includes/header.inc'); + echo '<br />'. _('There were no items on the quotation') . '. ' . _('The quotation cannot be printed'). + '<br />' . InternalLink($rootpath, 'SelectSalesOrder.php?Quotation=Quotes_only', _('Print Another Quotation')) . + '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); + include('includes/footer.inc'); exit; } else { /* @@ -256,7 +256,7 @@ //echo 'here'; $pdf->Output('PDFQuotation.pdf', 'I'); */ - $pdf->OutputF($_SESSION['DatabaseName'] . '_Quotation_' . date('Y-m-d_h-m-s') . '.pdf');//UldisN - $pdf->__destruct(); //UldisN + $pdf->OutputF($_SESSION['DatabaseName'] . '_Quotation_' . date('Y-m-d_h-m-s') . '.pdf');//UldisN + $pdf->__destruct(); //UldisN } ?> \ No newline at end of file Modified: trunk/PDFRemittanceAdvice.php =================================================================== --- trunk/PDFRemittanceAdvice.php 2012-08-25 19:44:45 UTC (rev 9556) +++ trunk/PDFRemittanceAdvice.php 2012-08-26 09:03:42 UTC (rev 9557) @@ -36,7 +36,7 @@ $title = _('Print Remittance Advices Error'); include('includes/header.inc'); prnMsg(_('There were no remittance advices to print out for the supplier range and payment date specified'),'warn'); - echo '<br /><a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'">'. _('Back').'</a>'; + echo '<br />' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Back')); include('includes/footer.inc'); exit; } @@ -80,7 +80,7 @@ $title = _('Remittance Advice Problem Report'); include('includes/header.inc'); prnMsg(_('The details of the payment to the supplier could not be retrieved because') . ' - ' . DB_error_msg($db),'error'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . _('The SQL that failed was') . ' ' . $sql; } Modified: trunk/PDFStockCheckComparison.php =================================================================== --- trunk/PDFStockCheckComparison.php 2012-08-25 19:44:45 UTC (rev 9556) +++ trunk/PDFStockCheckComparison.php 2012-08-26 09:03:42 UTC (rev 9557) @@ -6,7 +6,7 @@ include('includes/session.inc'); -If (isset($_POST['PrintPDF']) AND isset($_POST['ReportOrClose'])){ +if (isset($_POST['PrintPDF']) AND isset($_POST['ReportOrClose'])){ include('includes/PDFStarter.php'); $pdf->addInfo('Title', _('Check Comparison Report') ); @@ -35,8 +35,8 @@ include('includes/header.inc'); echo '<br />'; prnMsg( _('The inventory check file could not be retrieved because'). ' - ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">'. _('Back to the menu').'</a>'; - if ($debug==1){ + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); + if ($debug==1) { echo '<br />' . $sql; } include('includes/footer.inc'); @@ -61,7 +61,7 @@ include('includes/header.inc'); echo '<br />'; prnMsg( _('The inventory counts file could not be retrieved because'). ' - ' . DB_error_msg($db). 'error'); - echo '<br /><a href="' .$rootpath .'/index.php">'. _('Back to the menu').'</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />'. $sql; } @@ -205,7 +205,7 @@ include('includes/header.inc'); echo '<br />'; prnMsg(_('There is no inventory check data to report on'), 'warn'); - echo '<br />'. _('To start an inventory check first run the'). ' <a href="' . $rootpath . '/StockCheck.php">'. _('inventory check sheets') . '</a> - '. _('and select the option to create new Inventory Comparison data file'); + echo '<br />'. _('To start an inventory check first run the') . InternalLink($rootpath, 'StockCheck.php', _('inventory check sheets')) . ' - '. _('and select the option to create new Inventory Comparison data file'); include('includes/footer.inc'); exit; } @@ -257,18 +257,17 @@ if (DB_error_no($db) !=0) { $title = _('Inventory Comparison') . ' - ' . _('Problem Report') . '.... '; - include('includes/header.inc'); - echo '<br />'; + include('includes/header.inc'); + echo '<br />'; prnMsg( _('The inventory counts could not be retrieved by the SQL because').' - ' . DB_error_msg($db), 'error'); - echo '<br /><a href="' .$rootpath .'/index.php">'. _('Back to the menu'). '</a>'; - if ($debug==1){ - echo '<br />'. $SQL; - } - include('includes/footer.inc'); - exit; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); + if ($debug==1){ + echo '<br />'. $SQL; + } + include('includes/footer.inc'); + exit; } - if (DB_num_rows($Counts)==0){ $LeftOvers = $pdf->addTextWrap(380, $YPos,160, $FontSize, _('No counts entered'), 'left'); if ($_POST['ZeroCounts']=='Adjust'){ Modified: trunk/PDFStockTransfer.php =================================================================== --- trunk/PDFStockTransfer.php 2012-08-25 19:44:45 UTC (rev 9556) +++ trunk/PDFStockTransfer.php 2012-08-26 09:03:42 UTC (rev 9557) @@ -62,7 +62,7 @@ $title = _('Print Stock Transfer - Error'); include ('includes/header.inc'); prnMsg(_('There was no transfer found with number') . ': ' . $_GET['TransferNo'], 'error'); - echo '<div class="centre"><a href="PDFStockTransfer.php">' . _('Try Again') .'</a></div>'; + echo '<div class="centre">' . InternalLink('PDFStockTransfer.php', _('Try Again')) .'</div>'; include ('includes/footer.inc'); exit; } Modified: trunk/PDFStockTransfer_departments.php =================================================================== --- trunk/PDFStockTransfer_departments.php 2012-08-25 19:44:45 UTC (rev 9556) +++ trunk/PDFStockTransfer_departments.php 2012-08-26 09:03:42 UTC (rev 9557) @@ -61,7 +61,7 @@ $title = _('Print Stock Transfer - Error'); include ('includes/header.inc'); prnMsg(_('There was no transfer found with number') . ': ' . $_GET['TransferNo'], 'error'); - echo '<a href="PDFStockTransfer_departments.php">' . _('Try Again') .'</a>'; + echo InternalLink('', 'PDFStockTransfer_departments.php', _('Try Again')); include ('includes/footer.inc'); exit; } Modified: trunk/PDFTopItems.php =================================================================== --- trunk/PDFTopItems.php 2012-08-25 19:44:45 UTC (rev 9556) +++ trunk/PDFTopItems.php 2012-08-26 09:03:42 UTC (rev 9557) @@ -123,7 +123,7 @@ $title = _('Print Price List Error'); include ('includes/header.inc'); prnMsg(_('There were no records returned '), 'warn'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include ('includes/footer.inc'); exit; } else { Modified: trunk/PO_AuthorisationLevels.php =================================================================== --- trunk/PO_AuthorisationLevels.php 2012-08-25 19:44:45 UTC (rev 9556) +++ trunk/PO_AuthorisationLevels.php 2012-08-26 09:03:42 UTC (rev 9557) @@ -112,13 +112,15 @@ $ErrMsg = _('The authentication details cannot be retrieved because'); $Result=DB_query($sql,$db,$ErrMsg); -echo '<table class="selection"><tr>'; -echo '<th>'._('User ID').'</th>'; -echo '<th>'._('User Name').'</th>'; -echo '<th>'._('Currency').'</th>'; -echo '<th>'._('Create Order').'</th>'; -echo '<th>'._('Can Release').'<br />'. _('Invoices').'</th>'; -echo '<th>'._('Authority Level').'</th></tr>'; +echo '<table class="selection"> + <tr> + <th>'._('User ID').'</th> + <th>'._('User Name').'</th> + <th>'._('Currency').'</th> + <th>'._('Create Order').'</th> + <th>'._('Can Release').'<br />'. _('Invoices').'</th> + <th>'._('Authority Level').'</th> + </tr>'; while ($myrow=DB_fetch_array($Result)) { if ($myrow['cancreate']==0) { @@ -137,8 +139,8 @@ echo '<td>'.$CanCreate.'</td>'; echo '<td>'.$OffHold.'</td>'; echo '<td class="number">'.locale_money_format($myrow['authlevel'],$myrow['currabrev']).'</td>'; - echo '<td><a href="'.$rootpath.'/PO_AuthorisationLevels.php?Edit=Yes&UserID=' . $myrow['userid'] . '&Currency='.$myrow['currabrev'].'">'._('Edit').'</td>'; - echo '<td><a href="'.$rootpath.'/PO_AuthorisationLevels.php?Delete=Yes&UserID=' . $myrow['userid'] . '&Currency='.$myrow['currabrev'].'">'._('Delete').'</td></tr>'; + echo '<td>' . InternalLink($rootpath, 'PO_AuthorisationLevels.php?Edit=Yes&UserID=' . $myrow['userid'] . '&Currency='.$myrow['currabrev'], _('Edit')) . '</td>'; + echo '<td>' . InternalLink($rootpath, 'PO_AuthorisationLevels.php?Delete=Yes&UserID=' . $myrow['userid'] . '&Currency='.$myrow['currabrev'], _('Delete')) . '</td></tr>'; } echo '</table><br />'; Modified: trunk/PO_AuthoriseMyOrders.php =================================================================== --- trunk/PO_AuthoriseMyOrders.php 2012-08-25 19:44:45 UTC (rev 9556) +++ trunk/PO_AuthoriseMyOrders.php 2012-08-26 09:03:42 UTC (rev 9557) @@ -19,7 +19,7 @@ if (mb_substr($key,0,6)=='status') { $orderno=mb_substr($key,6); $status=$_POST['status'.$orderno]; - $comment=date($_SESSION['DefaultDateFormat']).' - '._('Authorised by').' '.'<a href="mailto:'. $emailrow['email'].'">'.$_SESSION['UserID'].'</a><br />'.$_POST['comment']; + $comment=date($_SESSION['DefaultDateFormat']).' - '._('Authorised by') . ' ' . $_SESSION['UserID'] . '<br />'.$_POST['comment']; $sql="UPDATE purchorders SET status='".$status."', stat_comment='".$comment."', @@ -84,7 +84,7 @@ echo '<td>'.$myrow['orderno'].'</td>'; echo '<td>'.$myrow['suppname'].'</td>'; echo '<td>'.ConvertSQLDate($myrow['orddate']).'</td>'; - echo '<td><a href="mailto:'.$myrow['email'].'">'.$myrow['realname'].'</a></td>'; + echo '<td>' . $myrow['realname'].'</td>'; echo '<td>'.ConvertSQLDate($myrow['deliverydate']).'</td>'; echo '<td><select name=status'.$myrow['orderno'].'>'; echo '<option selected="True" value="Pending">'._('Pending').'</option>'; Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2012-08-25 19:44:45 UTC (rev 9556) +++ trunk/PO_Header.php 2012-08-26 09:03:42 UTC (rev 9557) @@ -80,7 +80,7 @@ $_POST['StatusComments'] = ' - '.$_POST['StatusComments']; } if (IsEmailAddress($_SESSION['UserEmail'])){ - $UserChangedStatus = ' <a href="mailto:' . $_SESSION['UserEmail'] . '">' . $_SESSION['UsersRealName']. '</a>'; + $UserChangedStatus = ' ' . $_SESSION['UsersRealName'] . ' '; } else { $UserChangedStatus = ' ' . $_SESSION['UsersRealName'] . ' '; } @@ -249,13 +249,13 @@ echo '<br />'; prnMsg(_('You should automatically be forwarded to the entry of the purchase order line items page') . '. ' . _('If this does not happen') . ' (' . _('if the browser does not support META Refresh') . ') ' . - '<a href="$rootpath/PO_Items.php?identifier='.$identifier . '">' . _('click here') . '</a> ' . _('to continue'),'info'); + InternalLink($rootpath, '/PO_Items.php?identifier='.$identifier, _('click here')) . _('to continue'),'info'); include('includes/footer.inc'); exit; } } /* end of if isset _POST'EnterLines' */ -echo '<span style="float:left"><a href="'. $rootpath . '/PO_SelectOSPurchOrder.php?identifier='.$identifier.'">'. _('Back to Purchase Orders'). '</a></span>'; +echo '<span style="float:left">' . InternalLink($rootpath, 'PO_SelectOSPurchOrder.php?identifier='.$identifier, _('Back to Purchase Orders')) . '</span>'; /*The page can be called with ModifyOrderNumber=x where x is a purchase * order number. The page then looks up the details of order x and allows @@ -298,7 +298,7 @@ if ($_SESSION['PO'.$identifier]->Any_Already_Received()==0){ $_SESSION['RequireSupplierSelection']=1; $_SESSION['PO'.$identifier]->Status = 'Pending'; - $_SESSION['PO'.$identifier]->StatusComments==date($_SESSION['DefaultDateFormat']).' - ' . _('Supplier changed by') . ' <a href="mailto:'. $_SESSION['UserEmail'] .'">'.$_SESSION['UserID']. '</a> - '.$_POST['StatusComments'].'<br />'.$_POST['StatusCommentsComplete']; + $_SESSION['PO'.$identifier]->StatusComments==date($_SESSION['DefaultDateFormat']).' - ' . _('Supplier changed by') . $_SESSION['UserID'] . ' - ' . $_POST['StatusComments'].'<br />'.$_POST['StatusCommentsComplete']; } else { echo '<br /><br />'; prnMsg(_('Cannot modify the supplier of the order once some of the order has been received'),'warn'); @@ -456,7 +456,7 @@ $_SESSION['PO'.$identifier]->Port = $_POST['Port']; } else { - prnMsg( _('You do not have the authority to raise Purchase Orders for') . ' ' . $myrow['suppname'] .'. ' . _('Please Consult your system administrator for more information.') . '<br />' . _('You can setup authorisations'). ' ' . '<a href="PO_AuthorisationLevels.php">' . _('here') . '</a>', 'warn'); + prnMsg( _('You do not have the authority to raise Purchase Orders for') . ' ' . $myrow['suppname'] .'. ' . _('Please Consult your system administrator for more information.') . '<br />' . _('You can setup authorisations'). ' ' . InternalLink('PO_AuthorisationLevels.php', _('here')), 'warn'); include('includes/footer.inc'); exit; } @@ -617,7 +617,7 @@ echo '<br /><table class="table_index"><tr><td class="menu_group_item">'; /* the link */ - echo '<li><a href="'.$rootpath.'/PO_Items.php?NewItem=' . $Purch_Item . '&identifier=' . $identifier . '">' . _('Enter Line Item to this purchase order') . '</a></li>'; + echo '<li>' . InternalLink($rootpath, 'PO_Items.php?NewItem=' . $Purch_Item . '&identifier=' . $identifier, _('Enter Line Item to this purchase order')) . '</li>'; echo '</td></tr></table></div><br />'; @@ -760,10 +760,14 @@ $_POST['Requisition'] = ''; } - echo '<tr><td>' . _('Initiated By') . ':</td> - <td><input type="hidden" name="Initiator" size="11" maxlength="10" value="' . $_POST['Initiator'] . '" />' . $_POST['Initiator'] . '</td></tr>'; - echo '<tr><td>' . _('Requisition Ref') . ':</td> - <td><input type="text" name="Requisition" size="16" maxlength="15" value="' . $_POST['Requisition'] . '" /></td></tr>'; + echo '<tr> + <td>' . _('Initiated By') . ':</td> + <td><input type="hidden" name="Initiator" size="11" maxlength="10" value="' . $_POST['Initiator'] . '" />' . $_POST['Initiator'] . '</td> + </tr>'; + echo '<tr> + <td>' . _('Requisition Ref') . ':</td> + <td><input type="text" name="Requisition" size="16" maxlength="15" value="' . $_POST['Requisition'] . '" /></td> + </tr>'; echo '<tr><td>' . _('Date Printed') . ':</td><td>'; if (isset($_SESSION['PO'.$identifier]->DatePurchaseOrderPrinted) AND mb_strlen($_SESSION['PO'.$identifier]->DatePurchaseOrderPrinted)>6){ @@ -787,7 +791,7 @@ </select>'; echo '<button type="submit" name="AllowRePrint">' . _('Update') . '</button></td></tr>'; } elseif ($Printed) { - echo '<tr><td colspan="2"><a target="_blank" href="' . $rootpath . '/PO_PDFPurchOrder.php?OrderNo=' . $_SESSION['ExistingOrder'.$identifier] . '&identifier='.$identifier. '">' . _('Reprint Now') . '</a></td></tr>'; + echo '<tr><td colspan="2">' . InternalLink($rootpath, 'PO_PDFPurchOrder.php?OrderNo=' . $_SESSION['ExistingOrder'.$identifier] . '&identifier='.$identifier, _('Reprint Now')) . '</td></tr>'; } echo '</table>'; @@ -796,7 +800,7 @@ echo '<tr><th colspan="3" class="header">' . _('Order Status') . '</th></th></tr>'; if($_SESSION['ExistingOrder'.$identifier] != 0 and $_SESSION['PO'.$identifier]->Status == PurchOrder::STATUS_PRINTED){ - echo '<tr><td><a href="' .$rootpath . '/GoodsReceived.php?&PONumber=' . $_SESSION['PO'.$identifier]->OrderNo . '&identifier='.$identifier.'">'._('Receive this order').'</a></td></tr>'; + echo '<tr><td>' . InternalLink($rootpath, 'GoodsReceived.php?&PONumber=' . $_SESSION['PO'.$identifier]->OrderNo . '&identifier='.$identifier, _('Receive this order')) . '</td></tr>'; } switch ($_SESSION['PO'.$identifier]->Status) { Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2012-08-25 19:44:45 UTC (rev 9556) +++ trunk/PO_Items.php 2012-08-26 09:03:42 UTC (rev 9557) @@ -27,7 +27,7 @@ $Maximum_Number_Of_Parts_To_Show=50; if (!isset($_POST['Commit'])) { - echo '<a href="'.$rootpath.'/PO_Header.php?identifier=' . $identifier. '">' ._('Back To Purchase Order Header') . '</a><br />'; + echo InternalLink($rootpath, 'PO_Header.php?identifier=' . $identifier, _('Back To Purchase Order Header')) . '<br />'; } // add new request here 08-09-26 @@ -102,8 +102,8 @@ if ($_SESSION['ExistingOrder'.$identifier]==0){ /*its a new order to be inserted */ - $StatusComment=date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created by') . ' <a href="mailto:'. $_SESSION['UserEmail'] .'">'.$_SESSION['PO'.$identifier]->Initiator. - '</a> - '.$_SESSION['PO'.$identifier]->StatusMessage.'<br />'; + $StatusComment=date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created by') . ' '.$_SESSION['PO'.$identifier]->Initiator. + ' - '.$_SESSION['PO'.$identifier]->StatusMessage.'<br />'; /*Get the order number */ $_SESSION['PO'.$identifier]->OrderNo = GetNextTransNo(18, $db); @@ -383,15 +383,12 @@ } /* end of the loop round the detail line items on the order */ echo '<br /><br />'; prnMsg(_('Purchase Order') . ' ' . $_SESSION['PO'.$identifier]->OrderNo . ' ' . _('has been updated'),'success'); - if ($_SESSION['PO'.$identifier]->AllowPrintPO==1){ - // echo '<br /><a target="_blank" href="'.$rootpath.'/PO_PDFPurchOrder.php?OrderNo=' . $_SESSION['PO'.$identifier]->OrderNo . '">' . _('Print Purchase Order') . '</a>'; - } } /*end of if its a new order or an existing one */ $Result = DB_Txn_Commit($db); unset($_SESSION['PO'.$identifier]); /*Clear the PO data to allow a newy to be input*/ - echo '<br /><a href="'.$rootpath.'/PO_SelectOSPurchOrder.php?">' . _('Return To PO List') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'PO_SelectOSPurchOrder.php', _('Return To PO List')); include('includes/footer.inc'); exit; } /*end if there were no input errors trapped */ @@ -961,7 +958,7 @@ <td><input type="text" class="number" name="Price' . $POLine->LineNo . '" size="11" value="' .$DisplayPrice.'" /></td> <td class="number">' . $DisplayLineTotal . '</td> <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'].'" name="ReqDelDate' . $POLine->LineNo.'" size="11" value="' .$POLine->ReqDelDate .'" /></td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier. '&Delete=' . $POLine->LineNo . '">' . _('Delete') . '</a></td></tr>'; + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier. '&Delete=' . $POLine->LineNo, _('Delete')) . '</td></tr>'; $_SESSION['PO'.$identifier]->Total = $_SESSION['PO'.$identifier]->Total + $LineTotal; } } @@ -1011,7 +1008,7 @@ echo '<option value="' . $AssetRow['assetid'] . '">' . $AssetRow['assetid'] . ' - '. $DatePurchased . ' - ' . $AssetRow['description'] . '</option>'; } - echo'</select><a href="FixedAssetItems.php" target=_blank>'. _('New Fixed Asset') . '</a></td> + echo'</select>' . InternalLink('', 'FixedAssetItems.php"', _('New Fixed Asset')) . '</td> <tr><td>'._('Quantity to purchase').'</td> <td><input type="text" class="number" name="Qty" size="10" /></td></tr> <tr><td>'._('Price per item').'</td> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-26 10:20:35
|
Revision: 9558 http://weberp.svn.sourceforge.net/weberp/?rev=9558&view=rev Author: tim_schofield Date: 2012-08-26 10:20:27 +0000 (Sun, 26 Aug 2012) Log Message: ----------- Replace <a tags with new InternalLink() function Modified Paths: -------------- trunk/PDFCustomerList.php trunk/PDFGLJournal.php trunk/PDFGrn.php trunk/PDFLowGP.php trunk/PDFPickingList.php trunk/PDFPriceList.php trunk/PDFPrintLabel.php trunk/PDFQuotation.php trunk/PcExpensesTypeTab.php trunk/PcTabs.php trunk/PcTypeTabs.php trunk/PrintCustOrder.php trunk/PrintCustOrder_generic.php trunk/SalesAnalysis_UserDefined.php Modified: trunk/PDFCustomerList.php =================================================================== --- trunk/PDFCustomerList.php 2012-08-26 09:03:42 UTC (rev 9557) +++ trunk/PDFCustomerList.php 2012-08-26 10:20:27 UTC (rev 9558) @@ -231,7 +231,7 @@ $title = _('Customer List') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The customer List could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db) ); - echo '<br /><a href="' .$rootpath .'/index.php">'. _('Back to the menu'). '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />'. $SQL; } @@ -240,12 +240,12 @@ } if (DB_num_rows($CustomersResult) == 0) { - $title = _('Customer List') . ' - ' . _('Problem Report') . '....'; - include('includes/header.inc'); - prnMsg( _('This report has no output because there were no customers retrieved'), 'error' ); - echo '<br /><a href="' .$rootpath .'/index.php">'. _('Back to the menu'). '</a>'; - include('includes/footer.inc'); - exit; + $title = _('Customer List') . ' - ' . _('Problem Report') . '....'; + include('includes/header.inc'); + prnMsg( _('This report has no output because there were no customers retrieved'), 'error' ); + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); + include('includes/footer.inc'); + exit; } Modified: trunk/PDFGLJournal.php =================================================================== --- trunk/PDFGLJournal.php 2012-08-26 09:03:42 UTC (rev 9557) +++ trunk/PDFGLJournal.php 2012-08-26 10:20:27 UTC (rev 9558) @@ -101,7 +101,7 @@ $title = _('GRN Error'); include('includes/header.inc'); prnMsg(_('There were no GRN to print'),'warn'); - echo '<br /><a href="'.$rootpath.'/index.php">'. _('Back to the menu').'</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } else { Modified: trunk/PDFGrn.php =================================================================== --- trunk/PDFGrn.php 2012-08-26 09:03:42 UTC (rev 9557) +++ trunk/PDFGrn.php 2012-08-26 10:20:27 UTC (rev 9558) @@ -143,7 +143,7 @@ $title = _('GRN Error'); include('includes/header.inc'); prnMsg(_('There were no GRN to print'),'warn'); - echo '<br /><a href="'.$rootpath.'/index.php">'. _('Back to the menu').'</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } else { Modified: trunk/PDFLowGP.php =================================================================== --- trunk/PDFLowGP.php 2012-08-26 09:03:42 UTC (rev 9557) +++ trunk/PDFLowGP.php 2012-08-26 10:20:27 UTC (rev 9558) @@ -58,7 +58,7 @@ include('includes/header.inc'); prnMsg(_('The low GP items could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />'.$SQL; } @@ -70,7 +70,7 @@ include('includes/header.inc'); prnMsg(_('No low GP items retrieved'), 'warn'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />'.$SQL; } Modified: trunk/PDFPickingList.php =================================================================== --- trunk/PDFPickingList.php 2012-08-26 09:03:42 UTC (rev 9557) +++ trunk/PDFPickingList.php 2012-08-26 10:20:27 UTC (rev 9558) @@ -130,7 +130,7 @@ echo '<br />'; prnMsg( _('Unable to Locate any orders for this criteria '), 'info'); echo '<br /><table class="selection"><tr><td> - <a href="'. $rootpath . '/PDFPickingList.php">' . _('Enter Another Date') . '</a> + '. InternalLink($rootpath, 'PDFPickingList.php', _('Enter Another Date')) . ' </td></tr></table><br />'; include('includes/footer.inc'); exit(); Modified: trunk/PDFPriceList.php =================================================================== --- trunk/PDFPriceList.php 2012-08-26 09:03:42 UTC (rev 9557) +++ trunk/PDFPriceList.php 2012-08-26 10:20:27 UTC (rev 9558) @@ -26,7 +26,7 @@ include('includes/header.inc'); echo '<br />'; prnMsg( _('The customer must first be selected from the select customer link') . '. ' . _('Re-run the price list once the customer has been selected') ); - echo '<br /><br /><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Back') . '</a>'; + echo '<br /><br />' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Back')); include('includes/footer.inc'); exit; } @@ -34,7 +34,7 @@ $title = _('Special price List - No Customer Selected'); include('includes/header.inc'); prnMsg(_('The effective date must be entered in the format') . ' ' . $_SESSION['DefaultDateFormat'],'error'); - echo '<br /><br /><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Back') . '</a>'; + echo '<br /><br />' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Back')); include('includes/footer.inc'); exit; } @@ -120,7 +120,7 @@ $title = _('Price List') . ' - ' . _('Problem Report....'); include('includes/header.inc'); prnMsg( _('The Price List could not be retrieved by the SQL because'). ' - ' . DB_error_msg($db), 'error'); - echo '<br /><a href="' .$rootpath .'/index.php">'. _('Back to the menu'). '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ prnMsg(_('For debugging purposes the SQL used was:') . $SQL,'error'); } @@ -131,7 +131,7 @@ $title = _('Print Price List Error'); include('includes/header.inc'); prnMsg(_('There were no price details to print out for the customer or category specified'),'warn'); - echo '<br /><a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'">'. _('Back').'</a>'; + echo '<br />' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Back')); include('includes/footer.inc'); exit; } Modified: trunk/PDFPrintLabel.php =================================================================== --- trunk/PDFPrintLabel.php 2012-08-26 09:03:42 UTC (rev 9557) +++ trunk/PDFPrintLabel.php 2012-08-26 10:20:27 UTC (rev 9558) @@ -16,7 +16,7 @@ $title = _('Print Labels'); include('includes/header.inc'); echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Price Labels') . '" alt="" /> - ' . ' ' . _('Select Labels to Print') . '</p>'; + ' . ' ' . _('Select Labels to Print') . '</p>'; $SQL = "SELECT prices.stockid, stockmaster.description, @@ -24,7 +24,7 @@ prices.price, currencies.decimalplaces FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid + ON stockmaster.categoryid=stockcategory.categoryid INNER JOIN prices ON stockmaster.stockid=prices.stockid INNER JOIN currencies @@ -45,7 +45,7 @@ if (DB_error_no($db) !=0) { prnMsg( _('The Price Labels could not be retrieved by the SQL because'). ' - ' . DB_error_msg($db), 'error'); - echo '<br /><a href="' .$rootpath .'/index.php">'. _('Back to the menu'). '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')) . '</a>'; if ($debug==1){ prnMsg(_('For debugging purposes the SQL used was:') . $SQL,'error'); } @@ -54,7 +54,7 @@ } if (DB_num_rows($LabelsResult)==0){ prnMsg(_('There were no price labels to print out for the category specified'),'warn'); - echo '<br /><a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'. _('Back').'</a>'; + echo '<br />' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), _('Back')); include('includes/footer.inc'); exit; } @@ -113,7 +113,7 @@ </div> <br /> <div style="text-align: right"> - <a href="'. $rootpath . '/Labels.php">' . _('Label Template Maintenance'). '</a> + ' . InternalLink($rootpath, 'Labels.php', _('Label Template Maintenance')) . ' </div> </form>'; include('includes/footer.inc'); @@ -270,7 +270,7 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Price Labels') . '" alt="" /> - ' . ' ' . _('Print Price Labels') . '</p>'; + ' . ' ' . _('Print Price Labels') . '</p>'; if (!isset($_POST['FromCriteria']) OR !isset($_POST['ToCriteria'])) { @@ -300,7 +300,7 @@ echo '</select></td></tr>'; echo '<tr><td>' . _('To Inventory Category Code'). ':</td> - <td><select name="ToCriteria">'; + <td><select name="ToCriteria">'; /*Set the index for the categories result set back to 0 */ DB_data_seek($CatResult,0); @@ -310,8 +310,9 @@ } echo '</select></td></tr>'; - echo '<tr><td>' . _('For Sales Type/Price List').':</td> - <td><select name="SalesType">'; + echo '<tr> + <td>' . _('For Sales Type/Price List').':</td> + <td><select name="SalesType">'; $sql = "SELECT sales_type, typeabbrev FROM salestypes"; $SalesTypesResult=DB_query($sql,$db); @@ -325,7 +326,7 @@ echo '</select></td></tr>'; echo '<tr><td>' . _('For Currency').':</td> - <td><select name="Currency">'; + <td><select name="Currency">'; $sql = "SELECT currabrev, country, currency FROM currencies"; $CurrenciesResult=DB_query($sql,$db); @@ -339,8 +340,8 @@ echo '</select></td></tr>'; echo '<tr><td>' . _('Effective As At') . ':</td>'; - echo '<td><input type="text" size="11" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveDate" value="' . Date($_SESSION['DefaultDateFormat']) . '" />'; - echo '</td></tr>'; + echo '<td><input type="text" size="11" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveDate" value="' . Date($_SESSION['DefaultDateFormat']) . '" />'; + echo '</td></tr>'; echo '</table> <br /> @@ -349,7 +350,7 @@ </div> <br /> <div style="text-align: right"> - <a href="'. $rootpath . '/Labels.php">' . _('Label Template Maintenance'). '</a> + ' . InternalLink($rootpath, 'Labels.php', _('Label Template Maintenance')) . ' </div> </form>'; Modified: trunk/PDFQuotation.php =================================================================== --- trunk/PDFQuotation.php 2012-08-26 09:03:42 UTC (rev 9557) +++ trunk/PDFQuotation.php 2012-08-26 10:20:27 UTC (rev 9558) @@ -12,9 +12,9 @@ include('includes/header.inc'); echo '<div class="centre"><br /><br /><br />'; prnMsg( _('Select a Quotation to Print before calling this page') , 'error'); - echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php?Quotations=Quotes_Only">' . _('Quotations') . '</a></li> - </td></tr></table></div><br /><br /><br />'; + echo '<table class="table_index"><tr><td class="menu_group_item"> + <li>' . InternalLink($rootpath, 'SelectSalesOrder.php?Quotations=Quotes_Only', _('Quotations')) . '</li> + </td></tr></table></div>'; include('includes/footer.inc'); exit(); } @@ -65,7 +65,7 @@ echo '<div class="centre"><br /><br /><br />'; prnMsg( _('Unable to Locate Quotation Number') . ' : ' . $_GET['QuotationNo'] . ' ', 'error'); echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php?Quotations=Quotes_Only">' . _('Outstanding Quotations') . '</a></li> + <li>' . InternalLink($rootpath, 'SelectSalesOrder.php?Quotations=Quotes_Only', _('Outstanding Quotations')) . '</li> </td></tr></table></div><br /><br /><br />'; include('includes/footer.inc'); exit; @@ -241,8 +241,8 @@ $title = _('Print Quotation Error'); include('includes/header.inc'); echo '<br />'. _('There were no items on the quotation') . '. ' . _('The quotation cannot be printed'). - '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?Quotation=Quotes_only">'. _('Print Another Quotation'). - '</a>' . '<br />'. '<a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + '<br />' . InternalLink($rootpath, 'SelectSalesOrder.php?Quotation=Quotes_only', _('Print Another Quotation')) . + '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } else { Modified: trunk/PcExpensesTypeTab.php =================================================================== --- trunk/PcExpensesTypeTab.php 2012-08-26 09:03:42 UTC (rev 9557) +++ trunk/PcExpensesTypeTab.php 2012-08-26 10:20:27 UTC (rev 9558) @@ -138,20 +138,23 @@ echo '</table>'; // close table in first column echo '</td></tr></table>'; // close main table - echo '<br /><div class="centre"> + echo '<div class="centre"> <button type="submit" name=process>' . _('Accept') . '</button> - <button type="submit" name=Cancel>' . _('Cancel') . '</button></div>'; + <button type="submit" name=Cancel>' . _('Cancel') . '</button> + </div>'; echo '</form>'; } else { - echo '<p><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Select another type of tab') . '</a></div></p>'; + echo '<p><div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Select another type of tab')) . '</div></p>'; - $sql = "SELECT pctabexpenses.codeexpense, pcexpenses.description - FROM pctabexpenses,pcexpenses - WHERE pctabexpenses.codeexpense=pcexpenses.codeexpense - AND pctabexpenses.typetabcode='".$SelectedTab."' + $sql = "SELECT pctabexpenses.codeexpense, + pcexpenses.description + FROM pctabexpenses + INNER JOIN pcexpenses + ON pctabexpenses.codeexpense=pcexpenses.codeexpense + WHERE pctabexpenses.typetabcode='".$SelectedTab."' ORDER BY pctabexpenses.codeexpense ASC"; $result = DB_query($sql,$db); @@ -165,7 +168,7 @@ $k=0; //row colour counter - while ($myrow = DB_fetch_row($result)) { + while ($myrow = DB_fetch_array($result)) { if ($k==1){ echo '<tr class="EvenTableRows">'; $k=0; @@ -174,15 +177,10 @@ $k=1; } - printf('<td>%s</td> - <td>%s</td> - <td><a href="%s?SelectedType=%s&delete=yes&SelectedTab=' . $SelectedTab . '" onclick="return confirm("' . - _('Are you sure you wish to delete this code and the expense it may have set up?') . '");">' . _('Delete') . '</td> - </tr>', - $myrow[0], - $myrow[1], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), - $myrow[0]); + echo '<td>' . $myrow['codeexpense'] . '</td> + <td>' . $myrow['description'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedType=' . $myrow['codeexpense'] . '&delete=yes&SelectedTab=' . $SelectedTab, _('Delete')) . '</td> + </tr>'; $k++; } //END WHILE LIST LOOP Modified: trunk/PcTabs.php =================================================================== --- trunk/PcTabs.php 2012-08-26 09:03:42 UTC (rev 9557) +++ trunk/PcTabs.php 2012-08-26 10:20:27 UTC (rev 9558) @@ -234,31 +234,18 @@ $DescriptionName=DB_fetch_array($ResultName); - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%sSelectedTab=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedTab=%s&delete=yes" onclick=\'return confirm("' . _('Are you sure you wish to delete this code and all the description it may have set up?') . '");\'>' . _('Delete') . '</td> - </tr>', - $myrow['tabcode'], - $myrow['usercode'], - $myrow['typetabdescription'], - $myrow['currency'], - locale_money_format($myrow['tablimit'],$myrow['currency']), - $myrow['assigner'], - $myrow['authorizer'], - $myrow['glaccountassignment'].' - '.$Description[0], - $myrow['glaccountpcash'].' - '.$DescriptionName[0], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['tabcode'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['tabcode']); + echo '<td>' . $myrow['tabcode'] . '</td> + <td>' . $myrow['usercode'] . '</td> + <td>' . $myrow['typetabdescription'] . '</td> + <td>' . $myrow['currency'] . '</td> + <td class="number">' . locale_money_format($myrow['tablimit'],$myrow['currency']) . '</td> + <td>' . $myrow['assigner'] . '</td> + <td>' . $myrow['authorizer'] . '</td> + <td>' . $myrow['glaccountassignment'].' - '.$Description[0] . '</td> + <td>' . $myrow['glaccountpcash'].' - '.$DescriptionName[0] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedTab=' . $myrow['tabcode'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedTab=' . $myrow['tabcode'] . '&delete=yes', _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP echo '</table>'; @@ -267,7 +254,7 @@ //end of ifs and buts! if (isset($SelectedTab)) { - echo '<p><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Show All Petty Cash Tabs Defined') . '</a></div></p>'; + echo '<p><div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Show All Petty Cash Tabs Defined')) . '</div></p>'; } if (!isset($_GET['delete'])) { Modified: trunk/PcTypeTabs.php =================================================================== --- trunk/PcTypeTabs.php 2012-08-26 09:03:42 UTC (rev 9557) +++ trunk/PcTypeTabs.php 2012-08-26 10:20:27 UTC (rev 9558) @@ -168,15 +168,11 @@ $k=1; } - printf('<td>%s</td> - <td>%s</td> - <td><a href="%sSelectedTab=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedTab=%s&delete=yes" onclick=\'return confirm("' . _('Are you sure you wish to delete this code and all the description it may have set up?') . '");\'>' . _('Delete') . '</td> - </tr>', - $myrow['typetabcode'], - $myrow['typetabdescription'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'). '?', $myrow['typetabcode'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'). '?', $myrow['typetabcode']); + echo '<td>' . $myrow['typetabcode'] . '</td> + <td>' . $myrow['typetabdescription'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'). '?SelectedTab=' . $myrow['typetabcode'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'). '?SelectedTab=' . $myrow['typetabcode'] . '&delete=yes', _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP echo '</table>'; @@ -184,9 +180,9 @@ //end of ifs and buts! if (isset($SelectedTab)) { - - echo '<p><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Show All Types Tabs Defined') . '</a></div></p>'; + echo '<p><div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Show All Types Tabs Defined')) . '</div></p>'; } + if (! isset($_GET['delete'])) { echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; Modified: trunk/PrintCustOrder.php =================================================================== --- trunk/PrintCustOrder.php 2012-08-26 09:03:42 UTC (rev 9557) +++ trunk/PrintCustOrder.php 2012-08-26 10:20:27 UTC (rev 9558) @@ -85,7 +85,7 @@ _('has previously been printed') . '. ' . _('It was printed on'). ' ' . ConvertSQLDate($myrow['datepackingslipprinted']) . '<br />' . _('This check is there to ensure that duplicate packing slips are not produced and dispatched more than once to the customer'), 'warn' ); echo '<p>' . InternalLink($rootpath, 'PrintCustOrder.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK', _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed')) . '</p>' . - . InternalLink($rootpath, 'PrintCustOrder_generic.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK', _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed')); + InternalLink($rootpath, 'PrintCustOrder_generic.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK', _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed')); echo '<br /><br /><br />'; echo _('Or select another Order Number to Print'); Modified: trunk/PrintCustOrder_generic.php =================================================================== --- trunk/PrintCustOrder_generic.php 2012-08-26 09:03:42 UTC (rev 9557) +++ trunk/PrintCustOrder_generic.php 2012-08-26 10:20:27 UTC (rev 9558) @@ -83,7 +83,7 @@ prnMsg( _('The packing slip for order number') . ' ' . $_GET['TransNo'] . ' ' . _('has previously been printed') . '. ' . _('It was printed on'). ' ' . ConvertSQLDate($myrow['datepackingslipprinted']) . '<br />' . _('This check is there to ensure that duplicate packing slips are not produced and dispatched more than once to the customer'), 'warn' ); - echo '<p>' . InternalLink($rootpath, 'PrintCustOrder.php?&TransNo=' . $_GET['TransNo'] . '&Reprint=OK', _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed') . '</p>' . + echo '<p>' . InternalLink($rootpath, 'PrintCustOrder.php?&TransNo=' . $_GET['TransNo'] . '&Reprint=OK', _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed')) . '</p>' . InternalLink($rootpath, 'PrintCustOrder_generic.php?&TransNo=' . $_GET['TransNo'] . '&Reprint=OK', _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed')); echo '<br /><br /><br />'; Modified: trunk/SalesAnalysis_UserDefined.php =================================================================== --- trunk/SalesAnalysis_UserDefined.php 2012-08-26 09:03:42 UTC (rev 9557) +++ trunk/SalesAnalysis_UserDefined.php 2012-08-26 10:20:27 UTC (rev 9558) @@ -44,7 +44,7 @@ echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/' . $_SESSION['reports_dir'] . '/SalesAnalysis.csv">'; echo '<p>' . _('You should automatically be forwarded to the CSV Sales Analysis file when it is ready') . '. ' . _('If this does not happen') . - . InternalLink($rootpath, '/' . $_SESSION['reports_dir'] . '/SalesAnalysis.csv', _('click here')) . _('to continue') . '<br /></p>'; + InternalLink($rootpath, '/' . $_SESSION['reports_dir'] . '/SalesAnalysis.csv', _('click here')) . _('to continue') . '<br /></p>'; include('includes/footer.inc'); } ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-26 11:43:51
|
Revision: 9559 http://weberp.svn.sourceforge.net/weberp/?rev=9559&view=rev Author: tim_schofield Date: 2012-08-26 11:43:45 +0000 (Sun, 26 Aug 2012) Log Message: ----------- Replace <a tags with new InternalLink() function Modified Paths: -------------- trunk/PcAssignCashToTab.php trunk/PcAuthorizeExpenses.php trunk/PcClaimExpensesFromTab.php trunk/PcExpenses.php Modified: trunk/PcAssignCashToTab.php =================================================================== --- trunk/PcAssignCashToTab.php 2012-08-26 10:20:27 UTC (rev 9558) +++ trunk/PcAssignCashToTab.php 2012-08-26 11:43:45 UTC (rev 9559) @@ -205,7 +205,7 @@ if (!isset($_POST['submit'])) { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $title. '</p>'; } - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Select Another Petty Cash Tab ') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Select Another Petty Cash Tab ')) . '</div>'; if (! isset($_GET['edit']) OR isset ($_POST['Go'])){ @@ -286,12 +286,10 @@ <td>'.$AuthorisedDate.'</td> <td>'.$myrow['notes'].'</td> <td>'.$myrow['receipt'].'</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedIndex='.$myrow['counterindex'].'&SelectedTabs=' . - $SelectedTabs . '&Days=' . $Days . '&edit=yes">' . _('Edit') . '</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedIndex='.$myrow['counterindex'].'&SelectedTabs=' . - $SelectedTabs . '&Days=' . $Days . '&delete=yes" onclick=\'return confirm("' . - _('Are you sure you wish to delete this code and the expense it may have set up?') . '");\'>' . - _('Delete') . '</td> + <td>'.InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedIndex='.$myrow['counterindex'].'&SelectedTabs=' . + $SelectedTabs . '&Days=' . $Days . '&edit=yes', _('Edit')) . '</td> + <td>'.InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedIndex='.$myrow['counterindex'].'&SelectedTabs=' . + $SelectedTabs . '&Days=' . $Days . '&delete=yes', _('Delete')) . '</td> </tr>'; }else{ echo '<td>'.ConvertSQLDate($myrow['date']).'</td> Modified: trunk/PcAuthorizeExpenses.php =================================================================== --- trunk/PcAuthorizeExpenses.php 2012-08-26 10:20:27 UTC (rev 9558) +++ trunk/PcAuthorizeExpenses.php 2012-08-26 11:43:45 UTC (rev 9559) @@ -72,7 +72,7 @@ $Days=30; } echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; - echo '<p><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Select another tab') . '</a></div></p>'; + echo '<p><div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Select another tab')) . '</div></p>'; echo '<br /><table class="selection">'; echo '<tr><th colspan="7">' . _('Detail Of Movement For Last ') .': '; echo '<input type="text" class="number" name="Days" value="' . $Days . '" maxlength="3" size="4" /> Days '; Modified: trunk/PcClaimExpensesFromTab.php =================================================================== --- trunk/PcClaimExpensesFromTab.php 2012-08-26 10:20:27 UTC (rev 9558) +++ trunk/PcClaimExpensesFromTab.php 2012-08-26 11:43:45 UTC (rev 9559) @@ -197,7 +197,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Payment Entry') . '" alt="" />' . ' ' . $title . '</p>'; /* RICARD */ - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Select another tab') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Select another tab')) . '</div>'; if (! isset($_GET['edit']) OR isset ($_POST['GO'])){ echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; @@ -279,25 +279,15 @@ if (($myrow['date'] == '0000-00-00') and ($Description['0'] != 'ASSIGNCASH')){ // only movements NOT authorized can be modified or deleted - printf('<td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%sSelectedIndex=%s&SelectedTabs='.$SelectedTabs.'&Days='.$Days.'&edit=yes">' . _('Edit') . '</td> - <td><a href="%sSelectedIndex=%s&SelectedTabs='.$SelectedTabs.'&Days='.$Days.'&delete=yes" onclick="return confirm("' . _('Are you sure you wish to delete this code and the expense it may have set up?') . '");">' . _('Delete') . '</td> - </tr>', - ConvertSQLDate($myrow['date']), - $Description['description'], - locale_money_format($myrow['amount'],$TabRow['currency']), - $AuthorisedDate, - $myrow['notes'], - $myrow['receipt'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['counterindex'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['counterindex']); + echo '<td>' . ConvertSQLDate($myrow['date']) . '</td> + <td>' . $Description['description'] . '</td> + <td class="number">' . locale_money_format($myrow['amount'],$TabRow['currency']) . '</td> + <td>' . $AuthorisedDate . '</td> + <td>' . $myrow['notes'] . '</td> + <td>' . $myrow['receipt'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedIndex=' . $myrow['counterindex'] . '&SelectedTabs='.$SelectedTabs.'&Days='.$Days.'&edit=yes', _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedIndex=' . $myrow['counterindex'] . '&SelectedTabs='.$SelectedTabs.'&Days='.$Days.'&delete=yes', _('Delete')) . '</td> + </tr>'; } else { printf('<td>%s</td> <td>%s</td> Modified: trunk/PcExpenses.php =================================================================== --- trunk/PcExpenses.php 2012-08-26 10:20:27 UTC (rev 9558) +++ trunk/PcExpenses.php 2012-08-26 11:43:45 UTC (rev 9559) @@ -195,7 +195,7 @@ $k=0; //row colour counter - while ($myrow = DB_fetch_row($result)) { + while ($myrow = DB_fetch_array($result)) { if ($k==1){ echo '<tr class="EvenTableRows">'; $k=0; @@ -206,34 +206,27 @@ $sqldesc="SELECT accountname FROM chartmaster - WHERE accountcode='". $myrow[2] . "'"; + WHERE accountcode='". $myrow['glaccount'] . "'"; $ResultDes = DB_query($sqldesc,$db); $Description=DB_fetch_array($ResultDes); $SqlDescTag="SELECT tagdescription FROM tags - WHERE tagref='". $myrow[3] . "'"; + WHERE tagref='". $myrow['tag'] . "'"; $ResultDesTag = DB_query($SqlDescTag,$db); $DescriptionTag=DB_fetch_array($ResultDesTag); - printf('<td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%sSelectedExpense=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedExpense=%s&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this expense code and all the details it may have set up?') . '\');">' . _('Delete') . '</td> - </tr>', - $myrow[0], - $myrow[1], - $myrow[2], - $Description['accountname'], - $DescriptionTag['tagdescription'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', $myrow[0], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', $myrow[0]); + echo '<td>' . $myrow['codeexpense'] . '</td> + <td>' . $myrow['description'] . '</td> + <td class="number">' . $myrow['glaccount'] . '</td> + <td>' . $Description['accountname'] . '</td> + <td>' . $DescriptionTag['tagdescription'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedExpense=' . $myrow['codeexpense'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedExpense=' . $myrow['codeexpense'] . '&delete=yes', _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP echo '</table>'; @@ -242,7 +235,7 @@ //end of ifs and buts! if (isset($SelectedExpense)) { - echo '<p><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Show All Petty Cash Expenses Defined') . '</a></div></p>'; + echo '<p><div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Show All Petty Cash Expenses Defined')) . '</div></p>'; } if (! isset($_GET['delete'])) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-26 12:51:53
|
Revision: 9564 http://weberp.svn.sourceforge.net/weberp/?rev=9564&view=rev Author: tim_schofield Date: 2012-08-26 12:51:46 +0000 (Sun, 26 Aug 2012) Log Message: ----------- Replace <a tags with new InternalLink() function Modified Paths: -------------- trunk/PaymentAllocations.php trunk/PaymentMethods.php trunk/PaymentTerms.php trunk/Payments.php Modified: trunk/PaymentAllocations.php =================================================================== --- trunk/PaymentAllocations.php 2012-08-26 12:04:04 UTC (rev 9563) +++ trunk/PaymentAllocations.php 2012-08-26 12:51:46 UTC (rev 9564) @@ -29,7 +29,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Payments') . '" alt="" />' . ' ' . _('Payment Allocation for Supplier') . ': ' . $SuppID . _(' and') . ' ' . _('Invoice') . ': ' . $InvID . '</p>'; -echo '<div class="page_help_text">' . _('This shows how the payment to the supplier was allocated') . '<a href="SupplierInquiry.php?&SupplierID=' . $SuppID . '"><br /> ' . _('Back to supplier inquiry') . '</a></div><br />'; +echo '<div class="page_help_text">' . _('This shows how the payment to the supplier was allocated') . InternalLink('', 'SupplierInquiry.php?&SupplierID=' . $SuppID, _('Back to supplier inquiry')) . '</div><br />'; //echo "<br /><font size="4" color=BLUE>Payment Allocation for Supplier: '$SuppID' and Invoice: '$InvID'</font>"; Modified: trunk/PaymentMethods.php =================================================================== --- trunk/PaymentMethods.php 2012-08-26 12:04:04 UTC (rev 9563) +++ trunk/PaymentMethods.php 2012-08-26 12:51:46 UTC (rev 9564) @@ -198,8 +198,8 @@ <td>' . ($myrow['paymenttype'] ? _('Yes') : _('No')) . '</td> <td>' . ($myrow['receipttype'] ? _('Yes') : _('No')) . '</td> <td>' . ($myrow['usepreprintedstationery'] ? _('Yes') : _('No')) . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedPaymentID=' . $myrow['paymentid'] . '">' . _('Edit') . '</a></td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedPaymentID=' . $myrow['paymentid'] . '&delete=1">' . _('Delete') .'</a></td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedPaymentID=' . $myrow['paymentid'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedPaymentID=' . $myrow['paymentid'] . '&delete=1', _('Delete')) .'</td> </tr>'; } //END WHILE LIST LOOP @@ -208,7 +208,7 @@ if (isset($SelectedPaymentID)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Review Payment Methods') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Review Payment Methods')) . '</div>'; } echo '<br />'; Modified: trunk/PaymentTerms.php =================================================================== --- trunk/PaymentTerms.php 2012-08-26 12:04:04 UTC (rev 9563) +++ trunk/PaymentTerms.php 2012-08-26 12:51:46 UTC (rev 9564) @@ -184,42 +184,35 @@ <th>' . _('Due After (Days)') . '</th> </tr>'; - while ($myrow=DB_fetch_row($result)) { + while ($myrow=DB_fetch_array($result)) { - if ($myrow[3]==0) { + if ($myrow['dayinfollowingmonth']==0) { $FollMthText = _('N/A'); } else { - $FollMthText = $myrow[3] . _('th'); + $FollMthText = $myrow['dayinfollowingmonth'] . _('th'); } - if ($myrow[2]==0) { + if ($myrow['daysbeforedue']==0) { $DueAfterText = _('N/A'); } else { - $DueAfterText = $myrow[2] . ' ' . _('days'); + $DueAfterText = $myrow['daysbeforedue'] . ' ' . _('days'); } - printf('<tr><td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%s&SelectedTerms=%s">' . _('Edit') . '</a></td> - <td><a href="%s&SelectedTerms=%s&delete=1">' . _('Delete') . '</a></td> - </tr>', - $myrow[0], - $myrow[1], - $FollMthText, - $DueAfterText, - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow[0], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'). '?', - $myrow[0]); + echo '<tr> + <td>' . $myrow['termsindicator'] . '</td> + <td>' . $myrow['terms'] . '</td> + <td>' . $FollMthText . '</td> + <td>' . $DueAfterText . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedTerms=' . $myrow['termsindicator'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedTerms=' . $myrow['termsindicator'] . '&delete=1', _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP echo '</table><br />'; } //end of ifs and buts! if (isset($SelectedTerms)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Show all Payment Terms Definitions') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Show all Payment Terms Definitions')) . '</div>'; } if (!isset($_GET['delete'])) { Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2012-08-26 12:04:04 UTC (rev 9563) +++ trunk/Payments.php 2012-08-26 12:51:46 UTC (rev 9564) @@ -276,10 +276,7 @@ AND ($myrow[0] == 1)) { // it is a supplier payment by cheque and haven't printed yet so print cheque - echo '<br /> - <a href="' . $rootpath . '/PrintCheque.php?ChequeNum=' . $_POST['ChequeNum'] . '">' . _('Print Cheque using pre-printed stationery') . '</a> - <br /> - <br />'; + echo '<br />' . InternalLink($rootpath, 'PrintCheque.php?ChequeNum=' . $_POST['ChequeNum'], _('Print Cheque using pre-printed stationery')); echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier.'">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -620,10 +617,9 @@ WHERE supplierid='".$LastSupplier."'"; $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); - echo '<br /><a href="' . $rootpath . '/Payments.php?SupplierID=' . $LastSupplier . '">' . - _('Enter another Payment for') . ' ' . $myrow['suppname'] . '</a>'; + echo '<br />' . InternalLink($rootpath, 'Payments.php?SupplierID=' . $LastSupplier, _('Enter another Payment for') . ' ' . $myrow['suppname']); } else { - echo '<br /><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'">' . _('Enter another General Ledger Payment') . '</a><br />'; + echo '<br />' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Enter another General Ledger Payment')); } } @@ -757,7 +753,7 @@ if (DB_num_rows($AccountsResults)==0){ echo '</select></td></tr></table><br />'; - prnMsg( _('Bank Accounts have not yet been defined. You must first') . ' <a href="' . $rootpath . '/BankAccounts.php">' . _('define the bank accounts') . '</a> ' . _('and general ledger accounts to be affected'),'warn'); + prnMsg( _('Bank Accounts have not yet been defined. You must first') . InternalLink($rootpath, 'BankAccounts.php', _('define the bank accounts')) . _('and general ledger accounts to be affected'),'warn'); include('includes/footer.inc'); exit; } else { @@ -1033,7 +1029,7 @@ <td>' . $PaymentItem->GLCode . ' - ' . $PaymentItem->GLActName . '</td> <td>' . stripslashes($PaymentItem->Narrative) . '</td> <td>' . $PaymentItem->tag . ' - ' . $TagName . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $PaymentItem->ID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this payment analysis item?') . '\');">' . _('Delete') . '</a></td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $PaymentItem->ID, _('Delete')) . '</td> </tr>'; $PaymentTotal += filter_currency_input($PaymentItem->Amount); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-26 13:44:24
|
Revision: 9565 http://weberp.svn.sourceforge.net/weberp/?rev=9565&view=rev Author: tim_schofield Date: 2012-08-26 13:44:17 +0000 (Sun, 26 Aug 2012) Log Message: ----------- Replace <a tags with new InternalLink() function Modified Paths: -------------- trunk/MRPReport.php trunk/MRPReschedules.php trunk/MRPShortages.php trunk/NoSalesItems.php trunk/OffersReceived.php trunk/OrderDetails.php trunk/OutstandingGRNs.php Modified: trunk/MRPReport.php =================================================================== --- trunk/MRPReport.php 2012-08-26 12:51:46 UTC (rev 9564) +++ trunk/MRPReport.php 2012-08-26 13:44:17 UTC (rev 9565) @@ -36,7 +36,7 @@ $title = _('Print MRP Report Error'); include('includes/header.inc'); prnMsg(_('The MRP calculation must be run before this report will have any output. MRP requires set up of many parameters, including, EOQ, lead times, minimums, bills of materials, demand types, master schedule etc'),'error'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } @@ -47,7 +47,7 @@ $title = _('Print MRP Report Warning'); include('includes/header.inc'); prnMsg(_('The MRP calculation must be run before this report will have any output. MRP requires set up of many parameters, including, EOQ, lead times, minimums, bills of materials, demand types, master schedule, etc'), 'warn'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } @@ -147,7 +147,7 @@ $title = _('MRP Report') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The MRP Report could not be retrieved by the SQL because') . ' ' . DB_error_msg($holddb),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $sql; } @@ -503,7 +503,7 @@ $result1 = DB_query($SQL, $db); if (DB_num_rows($result1) == 0) { echo '<p><font size="4" color="red">' . _('Problem Report') . ':</font><br />' . _('There are no stock categories currently defined please use the link below to set them up'); - echo '<br /><a href="' . $rootpath . '/StockCategories.php">' . _('Define Stock Categories') . '</a></font></p>'; + echo '<br />' . InternalLink($rootpath, 'StockCategories.php', _('Define Stock Categories')) . '</font></p>'; exit; } @@ -762,8 +762,8 @@ echo '<td><button type="submit" name="Select" value="'.$myrow['stockid'].'">'.$myrow['stockid'].'</button></td> <td>'.$myrow['description'].'</td> <td class="number">'.$qoh.'</td> - <td>'.$myrow['units'].'</td> - <td><a target="_blank" href="' . $rootpath . '/StockStatus.php?&StockID='.$myrow['stockid'].'">' . _('View') . '</a></td> + <td>' . $myrow['units'].'</td> + <td>' . InternalLink($rootpath, 'StockStatus.php?&StockID='.$myrow['stockid'], _('View')) . '</td> </tr>'; $j++; if ($j == 20 AND ($RowIndex + 1 != $_SESSION['DisplayRecordsMax'])) { Modified: trunk/MRPReschedules.php =================================================================== --- trunk/MRPReschedules.php 2012-08-26 12:51:46 UTC (rev 9564) +++ trunk/MRPReschedules.php 2012-08-26 13:44:17 UTC (rev 9565) @@ -15,7 +15,7 @@ include('includes/header.inc'); echo '<br />'; prnMsg( _('The MRP calculation must be run before you can run this report').'<br />'. - _('To run the MRP calculation click').' '.'<a href="'.$rootpath .'/MRP.php">'._('here').'</a>', 'error'); + _('To run the MRP calculation click').' '. InternalLink($rootpath, 'MRP.php', _('here')), 'error'); include('includes/footer.inc'); exit; } @@ -46,7 +46,7 @@ $title = _('MRP Reschedules') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The MRP reschedules could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $sql; } @@ -58,7 +58,7 @@ $title = _('MRP Reschedules') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('No MRP reschedule retrieved'), 'warn'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $sql; } Modified: trunk/MRPShortages.php =================================================================== --- trunk/MRPShortages.php 2012-08-26 12:51:46 UTC (rev 9564) +++ trunk/MRPShortages.php 2012-08-26 13:44:17 UTC (rev 9565) @@ -14,7 +14,7 @@ include('includes/header.inc'); echo '<br />'; prnMsg( _('The MRP calculation must be run before you can run this report').'<br />'. - _('To run the MRP calculation click').' '.'<a href="'.$rootpath .'/MRP.php">'._('here').'</a>', 'error'); + _('To run the MRP calculation click').' '. InternalLink($rootpath, 'MRP.php', _('here')), 'error'); include('includes/footer.inc'); exit; } @@ -155,7 +155,7 @@ $title = _('MRP Shortages and Excesses') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The MRP shortages and excesses could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $sql; } @@ -167,7 +167,7 @@ $title = _('MRP Shortages and Excesses') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('No MRP shortages - Excess retrieved'), 'warn'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $sql; } Modified: trunk/NoSalesItems.php =================================================================== --- trunk/NoSalesItems.php 2012-08-26 12:51:46 UTC (rev 9564) +++ trunk/NoSalesItems.php 2012-08-26 13:44:17 UTC (rev 9565) @@ -178,7 +178,7 @@ $QOHRow = DB_fetch_array($QOHResult); $QOH = $QOHRow['totalquantity']; - $CodeLink = '<a href="' . $rootpath . '/SelectProduct.php?StockID=' . $myrow['stockid'] . '">' . $myrow['stockid'] . '</a>'; + $CodeLink = InternalLink($rootpath, 'SelectProduct.php?StockID=' . $myrow['stockid'], $myrow['stockid']); printf('<td class="number">%s</td> <td>%s</td> <td>%s</td> @@ -199,7 +199,7 @@ } echo '</table>'; echo '<br />'; - echo '<div style="text-align: right"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Select New Options') . '</a></div>'; + echo '<div style="text-align: right">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), _('Select New Options')) . '</div>'; } include ('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/OffersReceived.php =================================================================== --- trunk/OffersReceived.php 2012-08-26 12:51:46 UTC (rev 9564) +++ trunk/OffersReceived.php 2012-08-26 13:44:17 UTC (rev 9565) @@ -222,7 +222,7 @@ $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>'); $result = $mail->send(array($Email), 'smtp'); prnMsg(_('The accepted offers from').' '.$SupplierName.' '._('have been converted to purchase orders and an email sent to') - .' '.$Email."\n"._('Please review the order contents').' '.'<a href="'.$rootpath . '/PO_Header.php?&ModifyOrderNumber=' . $OrderNo.'">'._('here').'</a>', 'success'); + .' '.$Email."\n"._('Please review the order contents').' '. InternalLink($rootpath, 'PO_Header.php?&ModifyOrderNumber=' . $OrderNo, _('here')), 'success'); } if (sizeOf($rejects)>0){ $MailText=_('This email has been automatically generated by the webERP installation at').' '. Modified: trunk/OrderDetails.php =================================================================== --- trunk/OrderDetails.php 2012-08-26 12:51:46 UTC (rev 9564) +++ trunk/OrderDetails.php 2012-08-26 13:44:17 UTC (rev 9565) @@ -61,7 +61,7 @@ echo '<tr><th colspan="4" class="header">'._('Order Header Details For Order No').' '.$_GET['OrderNumber'].'</th></tr>'; echo '<tr> <th style="text-align: left">' . _('Customer Code') . ':</th> - <td class="OddTableRows"><font><a href="' . $rootpath . '/SelectCustomer.php?Select=' . $myrow['debtorno'] . '">' . $myrow['debtorno'] . '</a></td> + <td class="OddTableRows"><font>' . InternalLink($rootpath, 'SelectCustomer.php?Select=' . $myrow['debtorno'], $myrow['debtorno']) . '</td> <th style="text-align: left">' . _('Customer Name') . ':</th><td><font>' . $myrow['name'] . '</td> </tr>'; echo '<tr> @@ -101,7 +101,7 @@ </tr>'; echo '<tr> <th style="text-align: left">' . _('Email') . ':</th> - <td class="OddTableRows"><font><a href="mailto:' . $myrow['contactemail'] . '">' . $myrow['contactemail'] . '</a></font></td> + <td class="OddTableRows"><font>' . $myrow['contactemail'] . '</font></td> <th style="text-align: left">' . _('Delivery Address 6') . ':</th> <td class="OddTableRows"><font>' . $myrow['deladd6'] . '</font></td> </tr>'; Modified: trunk/OutstandingGRNs.php =================================================================== --- trunk/OutstandingGRNs.php 2012-08-26 12:51:46 UTC (rev 9564) +++ trunk/OutstandingGRNs.php 2012-08-26 13:44:17 UTC (rev 9565) @@ -54,7 +54,7 @@ $title = _('Outstanding GRN Valuation') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg(_('The outstanding GRNs valuation details could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />'.$SQL; } @@ -66,7 +66,7 @@ $title = _('Outstanding GRN Valuation') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg(_('No outstanding GRNs valuation details retrieved'), 'warn'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />'.$SQL; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-26 19:49:10
|
Revision: 9566 http://weberp.svn.sourceforge.net/weberp/?rev=9566&view=rev Author: tim_schofield Date: 2012-08-26 19:49:04 +0000 (Sun, 26 Aug 2012) Log Message: ----------- Replace <a tags with new InternalLink() function Modified Paths: -------------- trunk/MRPDemandTypes.php trunk/MRPDemands.php trunk/MRPPlannedPurchaseOrders.php trunk/MRPPlannedWorkOrders.php Modified: trunk/MRPDemandTypes.php =================================================================== --- trunk/MRPDemandTypes.php 2012-08-26 13:44:17 UTC (rev 9565) +++ trunk/MRPDemandTypes.php 2012-08-26 19:49:04 UTC (rev 9566) @@ -78,13 +78,13 @@ // PREVENT DELETES IF DEPENDENT RECORDS IN 'MRPDemands' $sql= "SELECT COUNT(*) FROM mrpdemands - WHERE mrpdemands.mrpdemandtype='" . $SelectedDT . "' - GROUP BY mrpdemandtype"; + WHERE mrpdemands.mrpdemandtype='" . $SelectedDT . "' + GROUP BY mrpdemandtype"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); if ($myrow[0]>0) { prnMsg(_('Cannot delete this demand type because MRP Demand records exist for this type') . '<br />' . _('There are') . ' ' . $myrow[0] . ' ' ._('MRP Demands referring to this type'),'warn'); - } else { + } else { $sql="DELETE FROM mrpdemandtypes WHERE mrpdemandtype='" . $SelectedDT . "'"; $result = DB_query($sql,$db); prnMsg(_('The selected demand type record has been deleted'),'succes'); @@ -102,7 +102,7 @@ //or deletion of the records $sql = "SELECT mrpdemandtype, - description + description FROM mrpdemandtypes"; $result = DB_query($sql,$db); @@ -113,19 +113,14 @@ <th>' . _('Description') . '</th> </tr>'; - while ($myrow = DB_fetch_row($result)) { + while ($myrow = DB_fetch_array($result)) { - printf('<tr><td>%s</td> - <td>%s</td> - <td><a href="%s&SelectedDT=%s">' . _('Edit') . '</td> - <td><a href="%s&SelectedDT=%s&delete=yes">' . _('Delete') .'</td> - </tr>', - $myrow[0], - $myrow[1], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow[0], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow[0]); + echo '<tr> + <td>' . $myrow['mrpdemandtype'] . '</td> + <td>' . $myrow['description'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), '?&SelectedDT=' . $myrow['mrpdemandtype'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), '?&SelectedDT=' . $myrow['mrpdemandtype'] . '&delete=yes', _('Delete')) .'</td> + </tr>'; } //END WHILE LIST LOOP @@ -135,7 +130,7 @@ //end of ifs and buts! if (isset($SelectedDT) and !isset($_GET['delete'])) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Show all Demand Types') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Show all Demand Types')) . '</div>'; } echo '<br /><form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; @@ -145,7 +140,7 @@ //editing an existing demand type $sql = "SELECT mrpdemandtype, - description + description FROM mrpdemandtypes WHERE mrpdemandtype='" . $SelectedDT . "'"; Modified: trunk/MRPDemands.php =================================================================== --- trunk/MRPDemands.php 2012-08-26 13:44:17 UTC (rev 9565) +++ trunk/MRPDemands.php 2012-08-26 19:49:04 UTC (rev 9566) @@ -226,7 +226,7 @@ // If wanted to have a Confirm routine before did actually deletion, could check if // deletion = "yes"; if it did, display link that redirects back to this page -// like this - <a href=" ' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?&delete=confirm&StockID=' . "$StockID" . ' "> +// like this - < a href=" ' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?&delete=confirm&StockID=' . "$StockID" . ' "> // that sets delete=confirm. If delete=confirm, do actually deletion. // This deletes an individual record by DemandID if called from a listall that shows // edit/delete or deletes all of a particular demand type if press Delete Demand Type button. @@ -292,14 +292,15 @@ while ($myrow = DB_fetch_row($result)) { $displaydate = ConvertSQLDate($myrow[4]); $ctr++; - echo '<tr><td>'.$myrow[1].'</td> + echo '<tr> + <td>'.$myrow[1].'</td> <td>'.$myrow[5].'</td> <td>'.$myrow[2].'</td> <td>'.$myrow[3].'</td> <td>'.$displaydate.'</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?&DemandID='.$myrow[0].'&StockID='.$myrow[1].'">' . _('Edit') . '</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?&DemandID='.$myrow[0].'&StockID='.$myrow[1].'&delete=yes">' . _('Delete') .'</td> - </tr>'; + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?&DemandID='.$myrow[0].'&StockID='.$myrow[1], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?&DemandID='.$myrow[0].'&StockID='.$myrow[1].'&delete=yes', _('Delete')) .'</td> + </tr>'; } //END WHILE LIST LOOP @@ -327,7 +328,7 @@ <td><font size="1">' . _('Enter extract of the') . ' <b>' . _('Stock Code') . '</b>:</font></td> <td><input tabindex="2" type="text" name="StockCode" size="15" maxlength="20" /></td> <td><font size="3"><b>' . _('OR') . '</b></font></td> - <td><a href="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?&listall=yes"><font size="3">' . _('List All Demands') .'</font></a></td></tr> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?&listall=yes', _('List All Demands')) .'</td></tr> <tr><td colspan="7"><div class="centre"><button tabindex="3" type="submit" name="Search">' . _('Search Now') . '</button></div></td></tr></table>'; } else { if (isset($DemandID)) { @@ -402,7 +403,7 @@ echo '<button type="submit" name="deletesome">' . _('Delete Demand Type') . '</button></div><br />'; // If mrpdemand record exists, display option to delete it if ((isset($DemandID)) AND (DB_num_rows($result) > 0)) { - echo '<br /><br /><a href=" ' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?delete=yes&StockID='.$StockID.'&DemandID=' . $DemandID . '">' . _('Or Delete Record') .'</a>'; + echo InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?delete=yes&StockID='.$StockID.'&DemandID=' . $DemandID, _('Or Delete Record')); } } echo '</form>'; Modified: trunk/MRPPlannedPurchaseOrders.php =================================================================== --- trunk/MRPPlannedPurchaseOrders.php 2012-08-26 13:44:17 UTC (rev 9565) +++ trunk/MRPPlannedPurchaseOrders.php 2012-08-26 19:49:04 UTC (rev 9566) @@ -13,7 +13,7 @@ include('includes/header.inc'); echo '<br />'; prnMsg( _('The MRP calculation must be run before you can run this report').'<br />'. - _('To run the MRP calculation click').' '.'<a href='.$rootpath .'/MRP.php>'._('here').'</a>', 'error'); + _('To run the MRP calculation click').' ' . InternalLink($rootpath, 'MRP.php', _('here')), 'error'); include('includes/footer.inc'); exit; } @@ -112,7 +112,7 @@ $title = _('MRP Planned Purchase Orders') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The MRP planned purchase orders could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $sql; } @@ -123,7 +123,7 @@ $title = _('Print MRP Planned Purchase Orders Error'); include('includes/header.inc'); prnMsg(_('There were no items with planned purchase orders'),'info'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } Modified: trunk/MRPPlannedWorkOrders.php =================================================================== --- trunk/MRPPlannedWorkOrders.php 2012-08-26 13:44:17 UTC (rev 9565) +++ trunk/MRPPlannedWorkOrders.php 2012-08-26 19:49:04 UTC (rev 9566) @@ -12,7 +12,7 @@ include('includes/header.inc'); echo '<br />'; prnMsg( _('The MRP calculation must be run before you can run this report').'<br />'. - _('To run the MRP calculation click').' '.'<a href="' . $rootpath . '/MRP.php">'._('here').'</a>', 'error'); + _('To run the MRP calculation click').' '. InternalLink($rootpath, 'MRP.php', _('here')), 'error'); include('includes/footer.inc'); exit; } @@ -105,7 +105,7 @@ $title = _('MRP Planned Work Orders') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The MRP planned work orders could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $sql; } @@ -116,7 +116,7 @@ $title = _('MRP Planned Work Orders'); include('includes/header.inc'); prnMsg(_('There were no items with demand greater than supply'),'info'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } @@ -275,14 +275,7 @@ $k++; } - printf('<td><a href="%s/WorkOrderEntry.php?NewItem=%s&ReqQty=%s&StartDate=%s&ReqDate=%s">%s</a></td>', - $rootpath, - $myrow['part'], - $myrow['supplyquantity'], - ConvertSQLDate($myrow['mrpdate']), - ConvertSQLDate($myrow['duedate']), - _('Convert') - ); + echo '<td>' . InternalLink($rootpath, 'WorkOrderEntry.php?NewItem=' . $myrow['part'] . '&ReqQty=' . $myrow['supplyquantity'] . '&StartDate=' . ConvertSQLDate($myrow['mrpdate']) . '&ReqDate=' . ConvertSQLDate($myrow['duedate']), _('Convert')) . '</td>'; printf("\n". '<td>%s <input type="hidden" name="%s_part" value="%s" /></td>', $myrow['part'], $j, $myrow['part']); printf("\n". '<td>%s</td>', $myrow['description']); printf("\n". '<td>%s</td>', ConvertSQLDate($myrow['mrpdate'])); @@ -311,7 +304,7 @@ locale_money_format($Total_Extcost,$_SESSION['CompanyRecord']['currencydefault']) ); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-26 22:51:04
|
Revision: 9567 http://weberp.svn.sourceforge.net/weberp/?rev=9567&view=rev Author: tim_schofield Date: 2012-08-26 22:50:57 +0000 (Sun, 26 Aug 2012) Log Message: ----------- Replace <a tags with new InternalLink() function Modified Paths: -------------- trunk/InternalStockCategoriesByRole.php trunk/InternalStockRequest.php trunk/InternalStockRequestFulfill.php trunk/InventoryPlanning.php trunk/InventoryPlanningPrefSupplier.php trunk/InventoryQuantities.php trunk/InventoryValuation.php trunk/Labels.php trunk/Locations.php trunk/MailInventoryValuation.php trunk/Manufacturers.php Modified: trunk/InternalStockCategoriesByRole.php =================================================================== --- trunk/InternalStockCategoriesByRole.php 2012-08-26 19:49:04 UTC (rev 9566) +++ trunk/InternalStockCategoriesByRole.php 2012-08-26 22:50:57 UTC (rev 9567) @@ -144,7 +144,7 @@ //end of ifs and buts! if (isset($_POST['process'])OR isset($SelectedRole)) { - echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Stock Categories available as internal for role') . ' ' .$SelectedRole. '</a></div>'; + echo '<br /><div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), _('Stock Categories available as internal for role') . ' ' .$SelectedRole) . '</div>'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -179,16 +179,10 @@ $k=1; } - printf('<td>%s</td> - <td>%s</td> - <td><a href="%s?SelectedType=%s&delete=yes&SelectedRole=' . $SelectedRole . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this internal stock category code?') . '\');">' . _('Delete') . '</a></td> - </tr>', - $myrow['categoryid'], - $myrow['categorydescription'], - htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), - $myrow['categoryid'], - htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), - $myrow['categoryid']); + echo '<td>' . $myrow['categoryid'] . '</td> + <td>' . $myrow['categorydescription'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedType=' . $myrow['categoryid'] . '&delete=yes&SelectedRole=' . $SelectedRole, _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP echo '</table>'; Modified: trunk/InternalStockRequest.php =================================================================== --- trunk/InternalStockRequest.php 2012-08-26 19:49:04 UTC (rev 9566) +++ trunk/InternalStockRequest.php 2012-08-26 22:50:57 UTC (rev 9567) @@ -121,7 +121,7 @@ } DB_Txn_Commit($db); prnMsg( _('The internal stock request has been entered and now needs to be authorised'), 'success'); - echo '<br /><div class="centre"><a href="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?New=Yes">' . _('Create another request') . '</a></div>'; + echo '<br /><div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?New=Yes', _('Create another request')) . '</div>'; include('includes/footer.inc'); unset($_SESSION['Request']); exit; @@ -270,8 +270,8 @@ <td>' . $LineItems->ItemDescription . '</td> <td class="number">' . locale_number_format($LineItems->Quantity, $LineItems->DecimalPlaces) . '</td> <td>' . $LineItems->UOM . '</td> - <td><a href="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Edit='.$LineItems->LineNumber.'">' . _('Edit') . '</a></td> - <td><a href="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete='.$LineItems->LineNumber.'">' . _('Delete') . '</a></td> + <td>'. InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Edit='.$LineItems->LineNumber, _('Edit')) . '</td> + <td>'. InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete='.$LineItems->LineNumber, _('Delete')) . '</td> </tr>'; } @@ -292,7 +292,7 @@ $result1 = DB_query($SQL, $db); if (DB_num_rows($result1) == 0) { echo '<p><font size="4" color="red">' . _('Problem Report') . ':</font><br />' . _('There are no stock categories currently defined please use the link below to set them up').'</p>'; - echo '<br /><a href="' . $rootpath . '/StockCategories.php">' . _('Define Stock Categories') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'StockCategories.php', _('Define Stock Categories')); exit; } echo '<table class="selection"><tr>'; @@ -562,7 +562,7 @@ <td>'.$myrow['description'].'</td> <td class="number">' . $qoh . '</td> <td>' . $myrow['units'] . '</td> - <td><a target="_blank" href="' . $rootpath . '/StockStatus.php?StockID=' . $myrow['stockid'].'">' . _('View') . '</a></td> + <td>' . InternalLink($rootpath, 'StockStatus.php?StockID=' . $myrow['stockid'], _('View')) . '</td> <td>' . $ItemStatus . '</td> </tr>'; //end of page full new headings if Modified: trunk/InternalStockRequestFulfill.php =================================================================== --- trunk/InternalStockRequestFulfill.php 2012-08-26 19:49:04 UTC (rev 9566) +++ trunk/InternalStockRequestFulfill.php 2012-08-26 22:50:57 UTC (rev 9567) @@ -253,7 +253,7 @@ if (DB_num_rows($result)==0) { prnMsg( _('There are no outstanding authorised requests for this location'), 'info'); echo '<br />'; - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Select another location') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Select another location')) . '</div>'; include('includes/footer.inc'); exit; } Modified: trunk/InventoryPlanning.php =================================================================== --- trunk/InventoryPlanning.php 2012-08-26 19:49:04 UTC (rev 9566) +++ trunk/InventoryPlanning.php 2012-08-26 22:50:57 UTC (rev 9567) @@ -103,7 +103,7 @@ $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg(_('The inventory quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $SQL; } @@ -253,7 +253,7 @@ $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The sales quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $SQL; } @@ -282,7 +282,7 @@ $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The sales order demand quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $SQL; } @@ -309,7 +309,7 @@ $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The sales order demand quantities from parent assemblies could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $SQL; } @@ -347,7 +347,7 @@ $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The purchase order quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $SQL; } @@ -410,7 +410,7 @@ $title = _('Print Inventory Planning Report Empty'); include('includes/header.inc'); prnMsg( _('There were no items in the range and location specified'), 'error'); - echo '<br /><a href="'.$rootpath.'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } else { Modified: trunk/InventoryPlanningPrefSupplier.php =================================================================== --- trunk/InventoryPlanningPrefSupplier.php 2012-08-26 19:49:04 UTC (rev 9566) +++ trunk/InventoryPlanningPrefSupplier.php 2012-08-26 22:50:57 UTC (rev 9567) @@ -207,7 +207,7 @@ $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg(_('The inventory quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $SQL; } @@ -275,7 +275,7 @@ $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The sales quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $SQL; } @@ -309,7 +309,7 @@ $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The sales order demand quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $SQL; } @@ -354,7 +354,7 @@ $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The sales order demand quantities from parent assemblies could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $SQL; } @@ -402,7 +402,7 @@ $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The purchase order quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $SQL; } @@ -458,7 +458,7 @@ $title = _('Print Inventory Planning Report Empty'); include('includes/header.inc'); prnMsg( _('There were no items in the range and location specified'),'error'); - echo '<br /><a href="'.$rootpath.'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } else { Modified: trunk/InventoryQuantities.php =================================================================== --- trunk/InventoryQuantities.php 2012-08-26 19:49:04 UTC (rev 9566) +++ trunk/InventoryQuantities.php 2012-08-26 22:50:57 UTC (rev 9567) @@ -83,7 +83,7 @@ $title = _('Inventory Quantities') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The Inventory Quantity report could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $sql; } @@ -94,7 +94,7 @@ $title = _('Print Inventory Quantities Report'); include('includes/header.inc'); prnMsg(_('There were no items with inventory quantities'),'error'); - echo '<br /><a href="'.$rootpath.'/index.php?">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } @@ -161,7 +161,7 @@ </table> <br />'; prnMsg(_('There are no stock categories currently defined please use the link below to set them up'),'warn'); - echo '<br /><a href="' . $rootpath . '/StockCategories.php">' . _('Define Stock Categories') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'StockCategories.php', _('Define Stock Categories')); include ('includes/footer.inc'); exit; } Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2012-08-26 19:49:04 UTC (rev 9566) +++ trunk/InventoryValuation.php 2012-08-26 22:50:57 UTC (rev 9567) @@ -77,7 +77,7 @@ $title = _('Inventory Valuation') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The inventory valuation could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br /> '. $SQL; } @@ -88,7 +88,7 @@ $title = _('Print Inventory Valuation Error'); include('includes/header.inc'); prnMsg(_('There were no items with any value to print out for the location specified'),'info'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } Modified: trunk/Labels.php =================================================================== --- trunk/Labels.php 2012-08-26 19:49:04 UTC (rev 9566) +++ trunk/Labels.php 2012-08-26 22:50:57 UTC (rev 9567) @@ -213,55 +213,28 @@ } } if (isset($Paper)){ - printf('<td>%s</td> - <td>%s</td> - <td colspan="2">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td><a href="%sSelectedLabelID=%s">' . _('Edit') . '</a></td> - <td><a href="%sSelectedLabelID=%s&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this label?') . '\');">' . _('Delete') . '</a></td> - </tr>', - $myrow['description'], - $NoOfRows . ' x ' . $NoOfCols, - $Paper, - $myrow['height'], - $myrow['width'], - $myrow['rowheight'], - $myrow['columnwidth'], - htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', - $myrow['labelid'], - htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', - $myrow['labelid'], - $rootpath . '/LabelFields.php?', - $myrow['labelid']); + echo '<td>' . $myrow['description'] . '</td> + <td>' . $NoOfRows . ' x ' . $NoOfCols . '</td> + <td colspan="2">' . $Paper . '</td> + <td class="number">' . $myrow['height'] . '</td> + <td class="number">' . $myrow['width'] . '</td> + <td class="number">' . $myrow['rowheight'] . '</td> + <td class="number">' . $myrow['columnwidth'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedLabelID=' . $myrow['labelid'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedLabelID=' . $myrow['labelid'] . '&delete=yes', _('Delete')) . '</td> + </tr>'; } else { - printf('<td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td><a href="%sSelectedLabelID=%s">' . _('Edit') . '</a></td> - <td><a href="%sSelectedLabelID=%s&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this label?') . '\');">' . _('Delete') . '</a></td> - </tr>', - $myrow['description'], - $NoOfRows . ' x ' . $NoOfCols, - $myrow['pagewidth'], - $myrow['pageheight'], - $myrow['height'], - $myrow['width'], - $myrow['rowheight'], - $myrow['columnwidth'], - htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', - $myrow['labelid'], - htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', - $myrow['labelid'], - $rootpath . '/LabelFields.php?', - $myrow['labelid']); + echo '<td>' . $myrow['description'] . '</td> + <td>' . $NoOfRows . ' x ' . $NoOfCols . '</td> + <td class="number">' . $myrow['pagewidth'] . '</td> + <td class="number">' . $myrow['pageheight'] . '</td> + <td class="number">' . $myrow['height'] . '</td> + <td class="number">' . $myrow['width'] . '</td> + <td class="number">' . $myrow['rowheight'] . '</td> + <td class="number">' . $myrow['columnwidth'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedLabelID=' . $myrow['labelid'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedLabelID=' . $myrow['labelid'] . '&delete=yes', _('Delete')) . '</td> + </tr>'; } } //END WHILE LIST LOOP @@ -274,7 +247,7 @@ if (isset($SelectedLabelID)) { echo '<div class="centre"> - <a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">' . _('Review all defined label records') . '</a> + ' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), _('Review all defined label records')) . ' </div>'; } @@ -494,7 +467,7 @@ <option value="0">' . _('No') . '</option>'; } echo '</select></td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedLabelID=' . $SelectedLabelID . '&DeleteField=' . $myrow['labelfieldid'] .' onclick="return confirm(\'' . _('Are you sure you wish to delete this label field?') . '\');">' . _('Delete') . '</a></td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedLabelID=' . $SelectedLabelID . '&DeleteField=' . $myrow['labelfieldid'], _('Delete')) . '</td> </tr>'; $i++; } @@ -532,7 +505,7 @@ </div> <br /> <div class="centre"> - <a href="' . $rootpath . '/PDFPrintLabel.php">' . _('Print Labels') . '</a> + ' . InternalLink($rootpath, 'PDFPrintLabel.php', _('Print Labels') . ' </div> </form>'; Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2012-08-26 19:49:04 UTC (rev 9566) +++ trunk/Locations.php 2012-08-26 22:50:57 UTC (rev 9567) @@ -341,43 +341,35 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Inventory') . '" alt="" />' . ' ' . $title . '</p>'; echo '<table class="selection">'; - echo '<tr><th>' . _('Location Code') . '</th> + echo '<tr> + <th>' . _('Location Code') . '</th> <th>' . _('Location Name') . '</th> <th>' . _('Tax Province') . '</th> <th>' . _('Managed') . '</th> </tr>'; -$k=0; //row colour counter -while ($myrow = DB_fetch_array($result)) { - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k=1; - } + $k=0; //row colour counter + while ($myrow = DB_fetch_array($result)) { + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k=1; + } - if($myrow['managed'] == 1) { - $myrow['managed'] = _('Yes'); - } else { - $myrow['managed'] = _('No'); - } + if($myrow['managed'] == 1) { + $myrow['managed'] = _('Yes'); + } else { + $myrow['managed'] = _('No'); + } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%sSelectedLocation=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedLocation=%s&delete=1">' . _('Delete') . '</td> - </tr>', - $myrow['loccode'], - $myrow['locationname'], - $myrow['description'], - $myrow['managed'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['loccode'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['loccode']); + echo '<td>' . $myrow['loccode'] . '</td> + <td>' . $myrow['locationname'] . '</td> + <td>' . $myrow['description'] . '</td> + <td>' . $myrow['managed'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedLocation=' . $myrow['loccode'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedLocation=' . $myrow['loccode'] . '&delete=1', _('Delete')) . '</td>'; } //END WHILE LIST LOOP @@ -549,7 +541,7 @@ echo '</form>'; if (isset($SelectedLocation)) { - echo '<div style="text-align: right;"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Review Records') . '</a></div>'; + echo '<div style="text-align: right;">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Review Records')) . '</div>'; } } //end if record deleted no point displaying form to add record Modified: trunk/MailInventoryValuation.php =================================================================== --- trunk/MailInventoryValuation.php 2012-08-26 19:49:04 UTC (rev 9566) +++ trunk/MailInventoryValuation.php 2012-08-26 22:50:57 UTC (rev 9567) @@ -116,7 +116,7 @@ $title = _('Inventory Valuation') . ' - ' . _('Problem Report'); include('includes/header.inc'); echo _('The inventory valuation could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $SQL; } @@ -212,7 +212,7 @@ $title = _('Print Inventory Valuation Error'); include('includes/header.inc'); echo '<br />' . _('There were no items with any value to print out for the location specified'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; // Javier: needs check } else { Modified: trunk/Manufacturers.php =================================================================== --- trunk/Manufacturers.php 2012-08-26 19:49:04 UTC (rev 9566) +++ trunk/Manufacturers.php 2012-08-26 22:50:57 UTC (rev 9567) @@ -202,7 +202,7 @@ echo '<td>' . $myrow['telephone'].'</td>'; echo '<td>' . $myrow['fax'].'</td>'; echo '<td>' . $myrow['email'].'</td>'; - echo '<td><a href="'.$rootpath . '/Manufacturers.php?ManufacturerID='.$myrow['id'].'">'._('Edit').'</a></td></tr>'; + echo '<td>' . InternalLink($rootpath, 'Manufacturers.php?ManufacturerID='.$myrow['id'], _('Edit')) . '</td></tr>'; } echo '</table><div class="centre">'; echo '<br /><button tabindex="3" type="submit" name="Create">' . _('Create New Manufacturer') . '</button>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |