This list is closed, nobody may subscribe to it.
2011 |
Jan
(14) |
Feb
(42) |
Mar
(56) |
Apr
(60) |
May
(54) |
Jun
(48) |
Jul
(74) |
Aug
(52) |
Sep
(68) |
Oct
(64) |
Nov
(42) |
Dec
(62) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2012 |
Jan
(142) |
Feb
(270) |
Mar
(374) |
Apr
(230) |
May
(214) |
Jun
(116) |
Jul
(234) |
Aug
(66) |
Sep
(120) |
Oct
(16) |
Nov
(17) |
Dec
(41) |
2013 |
Jan
(19) |
Feb
(18) |
Mar
(8) |
Apr
(40) |
May
(121) |
Jun
(42) |
Jul
(127) |
Aug
(145) |
Sep
(27) |
Oct
(38) |
Nov
(83) |
Dec
(61) |
2014 |
Jan
(33) |
Feb
(35) |
Mar
(59) |
Apr
(41) |
May
(38) |
Jun
(45) |
Jul
(17) |
Aug
(58) |
Sep
(46) |
Oct
(51) |
Nov
(55) |
Dec
(36) |
2015 |
Jan
(57) |
Feb
(67) |
Mar
(70) |
Apr
(34) |
May
(32) |
Jun
(11) |
Jul
(3) |
Aug
(17) |
Sep
(16) |
Oct
(13) |
Nov
(30) |
Dec
(30) |
2016 |
Jan
(17) |
Feb
(12) |
Mar
(17) |
Apr
(20) |
May
(47) |
Jun
(15) |
Jul
(13) |
Aug
(30) |
Sep
(32) |
Oct
(20) |
Nov
(32) |
Dec
(24) |
2017 |
Jan
(16) |
Feb
|
Mar
(11) |
Apr
(11) |
May
(5) |
Jun
(42) |
Jul
(9) |
Aug
(10) |
Sep
(14) |
Oct
(15) |
Nov
(2) |
Dec
(29) |
2018 |
Jan
(28) |
Feb
(49) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <dai...@us...> - 2011-07-05 10:36:20
|
Revision: 4624 http://web-erp.svn.sourceforge.net/web-erp/?rev=4624&view=rev Author: daintree Date: 2011-07-05 10:36:13 +0000 (Tue, 05 Jul 2011) Log Message: ----------- </br> changed to <br /> Modified Paths: -------------- trunk/BOMExtendedQty.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/GLBudgets.php trunk/InventoryQuantities.php trunk/MRP.php trunk/MRPCalendar.php trunk/MRPCreateDemands.php trunk/MRPPlannedWorkOrders.php trunk/MRPReschedules.php trunk/PricesByCost.php trunk/ReorderLevel.php trunk/ReorderLevelLocation.php trunk/StockTransfers.php trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/BOMExtendedQty.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -82,7 +82,7 @@ AND bom.effectiveto >= NOW() AND bom.effectiveafter <= NOW()"; $result = DB_query($sql,$db); - //echo "</br>sql is $sql</br>"; + //echo "<br />sql is $sql<br />"; // This while routine finds the other levels as long as $ComponentCounter - the // component counter finds there are more components that are used as // assemblies at lower levels @@ -258,7 +258,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo '</br></br><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table class="selection">'; + echo '<br /><br /><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Part') . ':</td> <td><input type ="text" name="Part" size="20">'; @@ -276,8 +276,8 @@ <option value="no">' . _('Plain Print') . '</option> </select></td></tr>'; echo '</table> - </br> - </br> + <br /> + <br /> <div class="centre"> <br /><input type=submit name="PrintPDF" value="' . _('Print PDF') . '"> </div>'; Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/BOMIndented.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -79,7 +79,7 @@ AND bom.effectiveto >= NOW() AND bom.effectiveafter <= NOW()"; $result = DB_query($sql,$db); - //echo "</br>sql is $sql</br>"; + //echo "<br />sql is $sql<br />"; // This while routine finds the other levels as long as $ComponentCounter - the // component counter - finds there are more components that are used as // assemblies at lower levels @@ -245,8 +245,8 @@ 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 '</br> - </br> + echo '<br /> + <br /> <form action="' . $_SERVER['PHP_SELF'] . '" method="post"> <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/BOMIndentedReverse.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -234,8 +234,8 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo '</br> - </br> + echo '<br /> + <br /> <form action=' . $_SERVER['PHP_SELF'] . ' method="post"> <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/GLBudgets.php =================================================================== --- trunk/GLBudgets.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/GLBudgets.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -30,7 +30,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table>'; -echo '</br><tr><td>'. _('Select GL Account'). ":</td><td><select name='SelectedAccount' +echo '<br /><tr><td>'. _('Select GL Account'). ":</td><td><select name='SelectedAccount' onChange='ReloadForm(selectaccount.Select)'>"; $SQL = "SELECT accountcode, @@ -68,7 +68,7 @@ echo '<br /><table><tr><td><input type="submit" name="Previous" value="' . _('Prev Account') . '"></td>'; echo '<td><input type="submit" name="Select" value="' . _('Select Account') . '"></td>'; echo '<td><input type="submit" name="Next" value="' . _('Next Account') . '"></td></tr>'; -echo '</table></br>'; +echo '</table><br />'; echo '</form>'; // End of account selection @@ -213,7 +213,7 @@ echo '<input type="hidden" name="SelectedAccount" value='.$SelectedAccount.'>'; echo '<script>defaultControl(document.form.1next);</script>'; - echo '</br><div class="centre"><input type="submit" name=update value="' . _('Update') . '"></div></form>'; + echo '<br /><div class="centre"><input type="submit" name=update value="' . _('Update') . '"></div></form>'; $SQL="SELECT MIN(periodno) FROM periods"; $result=DB_query($SQL,$db); Modified: trunk/InventoryQuantities.php =================================================================== --- trunk/InventoryQuantities.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/InventoryQuantities.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -146,7 +146,7 @@ echo '<div class="page_help_text">' . _('Use this report to display the quantity of Inventory items in different categories.') . '</div><br />'; - echo '</br></br><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table>'; + echo '<br /><br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"><tr><td>'; echo '<tr><td>' . _('Selection') . ':</td><td><select name="Selection">'; Modified: trunk/MRP.php =================================================================== --- trunk/MRP.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/MRP.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -13,8 +13,8 @@ } // MRP - Create levels table based on bom - echo '</br>' ._('Start time') . ': ' . date('h:i:s') . '</br>'; - echo '</br>' . _('Initialising tables .....') . '</br>'; + echo '<br />' ._('Start time') . ': ' . date('h:i:s') . '<br />'; + echo '<br />' . _('Initialising tables .....') . '<br />'; flush(); $result = DB_query("DROP TABLE IF EXISTS tempbom",$db); $result = DB_query("DROP TABLE IF EXISTS passbom",$db); @@ -59,7 +59,7 @@ FROM bom LEFT JOIN bom as bom2 ON bom.parent = bom2.component WHERE bom2.component IS NULL"; $result = DB_query($sql,$db); - //echo "</br>sql is $sql</br>"; + //echo "<br />sql is $sql<br />"; // This while routine finds the other levels as long as $compctr - the // component counter - finds there are more components that are used as // assemblies at lower levels @@ -584,7 +584,7 @@ echo '<td><input type="checkbox" name="pansizeflag" value="y" checked></td></tr>'; echo '<tr><td>' ._('Use Shrinkage?') . ':</td>'; echo '<td><input type="checkbox" name="shrinkageflag" value="y" checked></td></tr>'; - echo '</table></td></tr></table><div class="centre"></br></br><input type="submit" name="submit" value="' . _('Run MRP') . '"></div>'; + echo '</table></td></tr></table><div class="centre"><br /><br /><input type="submit" name="submit" value="' . _('Run MRP') . '"></div>'; echo '</form>'; } // End of Main program logic ------------------------------------------------------- @@ -594,7 +594,7 @@ // Create an array of mrprequirements and an array of mrpsupplies, then read through // them seeing if all requirements are covered by supplies. Create a planned order // for any unmet requirements. Change dates if necessary for the supplies. - //echo '</br>Part is ' . "$part" . '</br>'; + //echo '<br />Part is ' . "$part" . '<br />'; // Get decimal places from stockmaster for rounding of shrinkage factor $sql = "SELECT decimalplaces FROM stockmaster WHERE stockid = '" . $part . "'"; Modified: trunk/MRPCalendar.php =================================================================== --- trunk/MRPCalendar.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/MRPCalendar.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -210,7 +210,7 @@ $ErrMsg = _('The SQL to find the parts selected failed with the message'); $result = DB_query($sql,$db,$ErrMsg); - echo '</br><table class="selection"> + echo '<br /><table class="selection"> <tr bgcolor ="#800000"> <th>' . _('Date') . '</th> <th>' . _('Manufacturing Date') . '</th> @@ -231,7 +231,7 @@ } //END WHILE LIST LOOP echo '</table>'; - echo '</br></br>'; + echo '<br /><br />'; unset ($ChangeDate); display($db,$ChangeDate); Modified: trunk/MRPCreateDemands.php =================================================================== --- trunk/MRPCreateDemands.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/MRPCreateDemands.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -61,7 +61,7 @@ " . $WhereLocation . " " . $WhereCategory . " GROUP BY salesorderdetails.stkcode"; -//echo "</br>$sql</br>"; +//echo "<br />$sql<br />"; $result = DB_query($sql,$db); // To get the quantity per period, get the whole number amount of the total quantity divided // by the number of periods and also get the remainder from that calculation. Put the whole Modified: trunk/MRPPlannedWorkOrders.php =================================================================== --- trunk/MRPPlannedWorkOrders.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/MRPPlannedWorkOrders.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -315,7 +315,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . $title . '</p>'; - echo '</br></br><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table class="selection">'; + echo '<br /><br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Consolidation') . ':</td><td><select name="Consolidation">'; Modified: trunk/MRPReschedules.php =================================================================== --- trunk/MRPReschedules.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/MRPReschedules.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -124,7 +124,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Stock') . '" alt="" />' . ' ' . $title . '</p>'; - echo '</br></br><form action="' . $_SERVER['PHP_SELF'] . '" method="post"> + echo '<br /><br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post"> <table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Print Option') . ':</td><td><select name="Fill">'; Modified: trunk/PricesByCost.php =================================================================== --- trunk/PricesByCost.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/PricesByCost.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -227,7 +227,7 @@ } } else { /*The option to submit was not hit so display form */ echo '<div class="page_help_text">' . _('Use this report to display price list with the cost.') . '</div><br />'; - echo '</br></br><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table class=selection>'; + echo '<br /><br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $SQL = "SELECT categoryid, categorydescription @@ -280,7 +280,7 @@ DB_data_seek($result, 0); echo '</select></td></tr>'; echo '</table> - </br><p><div class="centre"><input type="submit" name="submit" value="' . _('Submit') . '"></div></p>'; + <br /><p><div class="centre"><input type="submit" name="submit" value="' . _('Submit') . '"></div></p>'; } /*end of else not submit */ include ('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/ReorderLevel.php =================================================================== --- trunk/ReorderLevel.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/ReorderLevel.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -161,7 +161,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . _('Inventory Reorder Level Report') . '</p>'; echo '<div class="page_help_text">' . _('Use this report to display the reorder levels for Inventory items in different categories.') . '</div><br />'; - echo '</br></br><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table>'; + echo '<br /><br /><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $sql = "SELECT loccode, locationname Modified: trunk/ReorderLevelLocation.php =================================================================== --- trunk/ReorderLevelLocation.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/ReorderLevelLocation.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -162,7 +162,7 @@ echo '<div class="page_help_text">' . _('Use this report to display the reorder levels for Inventory items in different categories.') . '</div><br />'; - echo '</br></br><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table>'; + echo '<br /><br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $sql = "SELECT loccode, locationname @@ -203,7 +203,7 @@ echo '<option value="2">'. _('Code') . '</option>'; echo '</select></td></tr>'; - echo '</table></br><p><div class="centre"><input type=submit name="submit" value="' . _('Submit') . '"></div></p>'; + echo '</table><br /><p><div class="centre"><input type=submit name="submit" value="' . _('Submit') . '"></div></p>'; } /*end of else not submit */ include('includes/footer.inc'); Modified: trunk/StockTransfers.php =================================================================== --- trunk/StockTransfers.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/StockTransfers.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -424,7 +424,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 /><a href="PDFStockTransfer.php?TransferNo='.$TransferNumber.'">' . _('Print Transfer Note') . '</a>'; unset ($_SESSION['Transfer']); include ('includes/footer.inc'); exit; Modified: trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po 2011-07-05 10:36:13 UTC (rev 4624) @@ -35232,7 +35232,7 @@ #: includes/DefineLabelClass.php:40 msgid "Max text<br />length" -msgstr "Maximale</br>Textlänge" +msgstr "Maximale<br />Textlänge" #: includes/DefineLabelClass.php:41 msgid "Font size" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-05 10:36:20
|
Revision: 4624 http://web-erp.svn.sourceforge.net/web-erp/?rev=4624&view=rev Author: daintree Date: 2011-07-05 10:36:13 +0000 (Tue, 05 Jul 2011) Log Message: ----------- </br> changed to <br /> Modified Paths: -------------- trunk/BOMExtendedQty.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/GLBudgets.php trunk/InventoryQuantities.php trunk/MRP.php trunk/MRPCalendar.php trunk/MRPCreateDemands.php trunk/MRPPlannedWorkOrders.php trunk/MRPReschedules.php trunk/PricesByCost.php trunk/ReorderLevel.php trunk/ReorderLevelLocation.php trunk/StockTransfers.php trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/BOMExtendedQty.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -82,7 +82,7 @@ AND bom.effectiveto >= NOW() AND bom.effectiveafter <= NOW()"; $result = DB_query($sql,$db); - //echo "</br>sql is $sql</br>"; + //echo "<br />sql is $sql<br />"; // This while routine finds the other levels as long as $ComponentCounter - the // component counter finds there are more components that are used as // assemblies at lower levels @@ -258,7 +258,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo '</br></br><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table class="selection">'; + echo '<br /><br /><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Part') . ':</td> <td><input type ="text" name="Part" size="20">'; @@ -276,8 +276,8 @@ <option value="no">' . _('Plain Print') . '</option> </select></td></tr>'; echo '</table> - </br> - </br> + <br /> + <br /> <div class="centre"> <br /><input type=submit name="PrintPDF" value="' . _('Print PDF') . '"> </div>'; Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/BOMIndented.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -79,7 +79,7 @@ AND bom.effectiveto >= NOW() AND bom.effectiveafter <= NOW()"; $result = DB_query($sql,$db); - //echo "</br>sql is $sql</br>"; + //echo "<br />sql is $sql<br />"; // This while routine finds the other levels as long as $ComponentCounter - the // component counter - finds there are more components that are used as // assemblies at lower levels @@ -245,8 +245,8 @@ 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 '</br> - </br> + echo '<br /> + <br /> <form action="' . $_SERVER['PHP_SELF'] . '" method="post"> <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/BOMIndentedReverse.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -234,8 +234,8 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo '</br> - </br> + echo '<br /> + <br /> <form action=' . $_SERVER['PHP_SELF'] . ' method="post"> <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/GLBudgets.php =================================================================== --- trunk/GLBudgets.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/GLBudgets.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -30,7 +30,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table>'; -echo '</br><tr><td>'. _('Select GL Account'). ":</td><td><select name='SelectedAccount' +echo '<br /><tr><td>'. _('Select GL Account'). ":</td><td><select name='SelectedAccount' onChange='ReloadForm(selectaccount.Select)'>"; $SQL = "SELECT accountcode, @@ -68,7 +68,7 @@ echo '<br /><table><tr><td><input type="submit" name="Previous" value="' . _('Prev Account') . '"></td>'; echo '<td><input type="submit" name="Select" value="' . _('Select Account') . '"></td>'; echo '<td><input type="submit" name="Next" value="' . _('Next Account') . '"></td></tr>'; -echo '</table></br>'; +echo '</table><br />'; echo '</form>'; // End of account selection @@ -213,7 +213,7 @@ echo '<input type="hidden" name="SelectedAccount" value='.$SelectedAccount.'>'; echo '<script>defaultControl(document.form.1next);</script>'; - echo '</br><div class="centre"><input type="submit" name=update value="' . _('Update') . '"></div></form>'; + echo '<br /><div class="centre"><input type="submit" name=update value="' . _('Update') . '"></div></form>'; $SQL="SELECT MIN(periodno) FROM periods"; $result=DB_query($SQL,$db); Modified: trunk/InventoryQuantities.php =================================================================== --- trunk/InventoryQuantities.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/InventoryQuantities.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -146,7 +146,7 @@ echo '<div class="page_help_text">' . _('Use this report to display the quantity of Inventory items in different categories.') . '</div><br />'; - echo '</br></br><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table>'; + echo '<br /><br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"><tr><td>'; echo '<tr><td>' . _('Selection') . ':</td><td><select name="Selection">'; Modified: trunk/MRP.php =================================================================== --- trunk/MRP.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/MRP.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -13,8 +13,8 @@ } // MRP - Create levels table based on bom - echo '</br>' ._('Start time') . ': ' . date('h:i:s') . '</br>'; - echo '</br>' . _('Initialising tables .....') . '</br>'; + echo '<br />' ._('Start time') . ': ' . date('h:i:s') . '<br />'; + echo '<br />' . _('Initialising tables .....') . '<br />'; flush(); $result = DB_query("DROP TABLE IF EXISTS tempbom",$db); $result = DB_query("DROP TABLE IF EXISTS passbom",$db); @@ -59,7 +59,7 @@ FROM bom LEFT JOIN bom as bom2 ON bom.parent = bom2.component WHERE bom2.component IS NULL"; $result = DB_query($sql,$db); - //echo "</br>sql is $sql</br>"; + //echo "<br />sql is $sql<br />"; // This while routine finds the other levels as long as $compctr - the // component counter - finds there are more components that are used as // assemblies at lower levels @@ -584,7 +584,7 @@ echo '<td><input type="checkbox" name="pansizeflag" value="y" checked></td></tr>'; echo '<tr><td>' ._('Use Shrinkage?') . ':</td>'; echo '<td><input type="checkbox" name="shrinkageflag" value="y" checked></td></tr>'; - echo '</table></td></tr></table><div class="centre"></br></br><input type="submit" name="submit" value="' . _('Run MRP') . '"></div>'; + echo '</table></td></tr></table><div class="centre"><br /><br /><input type="submit" name="submit" value="' . _('Run MRP') . '"></div>'; echo '</form>'; } // End of Main program logic ------------------------------------------------------- @@ -594,7 +594,7 @@ // Create an array of mrprequirements and an array of mrpsupplies, then read through // them seeing if all requirements are covered by supplies. Create a planned order // for any unmet requirements. Change dates if necessary for the supplies. - //echo '</br>Part is ' . "$part" . '</br>'; + //echo '<br />Part is ' . "$part" . '<br />'; // Get decimal places from stockmaster for rounding of shrinkage factor $sql = "SELECT decimalplaces FROM stockmaster WHERE stockid = '" . $part . "'"; Modified: trunk/MRPCalendar.php =================================================================== --- trunk/MRPCalendar.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/MRPCalendar.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -210,7 +210,7 @@ $ErrMsg = _('The SQL to find the parts selected failed with the message'); $result = DB_query($sql,$db,$ErrMsg); - echo '</br><table class="selection"> + echo '<br /><table class="selection"> <tr bgcolor ="#800000"> <th>' . _('Date') . '</th> <th>' . _('Manufacturing Date') . '</th> @@ -231,7 +231,7 @@ } //END WHILE LIST LOOP echo '</table>'; - echo '</br></br>'; + echo '<br /><br />'; unset ($ChangeDate); display($db,$ChangeDate); Modified: trunk/MRPCreateDemands.php =================================================================== --- trunk/MRPCreateDemands.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/MRPCreateDemands.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -61,7 +61,7 @@ " . $WhereLocation . " " . $WhereCategory . " GROUP BY salesorderdetails.stkcode"; -//echo "</br>$sql</br>"; +//echo "<br />$sql<br />"; $result = DB_query($sql,$db); // To get the quantity per period, get the whole number amount of the total quantity divided // by the number of periods and also get the remainder from that calculation. Put the whole Modified: trunk/MRPPlannedWorkOrders.php =================================================================== --- trunk/MRPPlannedWorkOrders.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/MRPPlannedWorkOrders.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -315,7 +315,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . $title . '</p>'; - echo '</br></br><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table class="selection">'; + echo '<br /><br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Consolidation') . ':</td><td><select name="Consolidation">'; Modified: trunk/MRPReschedules.php =================================================================== --- trunk/MRPReschedules.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/MRPReschedules.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -124,7 +124,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Stock') . '" alt="" />' . ' ' . $title . '</p>'; - echo '</br></br><form action="' . $_SERVER['PHP_SELF'] . '" method="post"> + echo '<br /><br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post"> <table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Print Option') . ':</td><td><select name="Fill">'; Modified: trunk/PricesByCost.php =================================================================== --- trunk/PricesByCost.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/PricesByCost.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -227,7 +227,7 @@ } } else { /*The option to submit was not hit so display form */ echo '<div class="page_help_text">' . _('Use this report to display price list with the cost.') . '</div><br />'; - echo '</br></br><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table class=selection>'; + echo '<br /><br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $SQL = "SELECT categoryid, categorydescription @@ -280,7 +280,7 @@ DB_data_seek($result, 0); echo '</select></td></tr>'; echo '</table> - </br><p><div class="centre"><input type="submit" name="submit" value="' . _('Submit') . '"></div></p>'; + <br /><p><div class="centre"><input type="submit" name="submit" value="' . _('Submit') . '"></div></p>'; } /*end of else not submit */ include ('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/ReorderLevel.php =================================================================== --- trunk/ReorderLevel.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/ReorderLevel.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -161,7 +161,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . _('Inventory Reorder Level Report') . '</p>'; echo '<div class="page_help_text">' . _('Use this report to display the reorder levels for Inventory items in different categories.') . '</div><br />'; - echo '</br></br><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table>'; + echo '<br /><br /><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $sql = "SELECT loccode, locationname Modified: trunk/ReorderLevelLocation.php =================================================================== --- trunk/ReorderLevelLocation.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/ReorderLevelLocation.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -162,7 +162,7 @@ echo '<div class="page_help_text">' . _('Use this report to display the reorder levels for Inventory items in different categories.') . '</div><br />'; - echo '</br></br><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table>'; + echo '<br /><br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $sql = "SELECT loccode, locationname @@ -203,7 +203,7 @@ echo '<option value="2">'. _('Code') . '</option>'; echo '</select></td></tr>'; - echo '</table></br><p><div class="centre"><input type=submit name="submit" value="' . _('Submit') . '"></div></p>'; + echo '</table><br /><p><div class="centre"><input type=submit name="submit" value="' . _('Submit') . '"></div></p>'; } /*end of else not submit */ include('includes/footer.inc'); Modified: trunk/StockTransfers.php =================================================================== --- trunk/StockTransfers.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/StockTransfers.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -424,7 +424,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 /><a href="PDFStockTransfer.php?TransferNo='.$TransferNumber.'">' . _('Print Transfer Note') . '</a>'; unset ($_SESSION['Transfer']); include ('includes/footer.inc'); exit; Modified: trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po 2011-07-05 10:36:13 UTC (rev 4624) @@ -35232,7 +35232,7 @@ #: includes/DefineLabelClass.php:40 msgid "Max text<br />length" -msgstr "Maximale</br>Textlänge" +msgstr "Maximale<br />Textlänge" #: includes/DefineLabelClass.php:41 msgid "Font size" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-05 10:27:34
|
Revision: 4623 http://web-erp.svn.sourceforge.net/web-erp/?rev=4623&view=rev Author: daintree Date: 2011-07-05 10:27:25 +0000 (Tue, 05 Jul 2011) Log Message: ----------- various Modified Paths: -------------- trunk/EDIProcessOrders.php trunk/EDISendInvoices.php trunk/EmailConfirmation.php trunk/EmailCustTrans.php trunk/ExchangeRateTrend.php trunk/Factors.php trunk/FixedAssetRegister.php trunk/PDFQuotation.php trunk/PDFQuotationPortrait.php trunk/ShipmentCosting.php trunk/TaxAuthorityRates.php trunk/includes/LanguagesArray.php trunk/includes/PDFQuotationPageHeader.inc trunk/includes/PDFQuotationPortraitPageHeader.inc trunk/includes/RFC822.php trunk/includes/tcpdf/tcpdf.php trunk/sql/mysql/upgrade4.04.4-4.04.5.sql Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/EDIProcessOrders.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -76,7 +76,7 @@ while ($LineText = fgets($fp) AND $TryNextFile != True){ /* get each line of the order file */ $LineText = StripTrailingComma($LineText); - echo "<br />".$LineText; + echo '<br />' . $LineText; if ($SegTag != mb_substr($LineText,0,3)){ $SegCounter=1; @@ -140,7 +140,7 @@ $Order->Comments .= "\n" . _('blanket order'); break; case '224': - $EmailText .= "\n\n" . _('This order is URGENT') . "</font>"; + $EmailText .= "\n\n" . _('This order is URGENT') . '</font>'; $Order->Comments .= "\n" . _('URGENT ORDER'); break; case '226': @@ -184,7 +184,7 @@ $EmailText .= "\n" . _('Customers order ref') . ': ' . $BGM_C106[0]; } if (isset($BGM_elements[2])){ - echo "<br />echo BGM_elements[2] " .$BGM_elements[2]; + echo '<br />echo BGM_elements[2] ' .$BGM_elements[2]; $BGM_1225 = explode(':',$BGM_elements[2]); $MsgFunction = $BGM_1225[0]; @@ -457,22 +457,23 @@ case 'SN': /*Store Number - get the branch details from the store number - snag here too cos need to ensure got the Customer detail first before try looking up its branches */ $BranchResult = DB_query("SELECT branchcode, - brname, - braddress1, - braddress2, - braddress3, - braddress4, - braddress5, - braddress6, - contactname, - defaultlocation, - phoneno, - email - FROM custbranch INNER JOIN debtorsmaster ON custbranch.debtorno = custbranch.debtorno WHERE custbranchcode='" . $NAD_C082[0] . "' AND custbranch.debtorno='" . $Order->DebtorNo . "' AND debtorsmaster.ediorders=1",$db); + brname, + braddress1, + braddress2, + braddress3, + braddress4, + braddress5, + braddress6, + contactname, + defaultlocation, + phoneno, + email + FROM custbranch INNER JOIN debtorsmaster ON custbranch.debtorno = custbranch.debtorno WHERE custbranchcode='" . $NAD_C082[0] . "' AND custbranch.debtorno='" . $Order->DebtorNo . "' AND debtorsmaster.ediorders=1",$db); if (DB_num_rows($BranchResult)!=1){ $EmailText .= "\n" . _('The Store number was specified as') . ' ' . $NAD_C082[0] . ' ' . _('Unfortunately there are either no branches of customer code') . ' ' . $Order->DebtorNo . ' ' ._('or several that match this store number') . '. ' . _('This order could not be processed further'); $TryNextFile = True; /* Look for other EDI msgs */ - $CreateOrder = False; /*Dont create order in system */ } else { + $CreateOrder = False; /*Dont create order in system */ + } else { $BranchRow = DB_fetch_array($BranchResult); $Order->BranchCode = $BranchRow['branchcode']; $Order->DeliverTo = $BranchRow['brname']; Modified: trunk/EDISendInvoices.php =================================================================== --- trunk/EDISendInvoices.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/EDISendInvoices.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -8,16 +8,16 @@ include('includes/htmlMimeMail.php'); // need for sending email attachments /*Get the Customers who are enabled for EDI invoicing */ -$sql = 'SELECT debtorno, - edireference, - editransport, - ediaddress, - ediserveruser, - ediserverpwd, - daysbeforedue, - dayinfollowingmonth - FROM debtorsmaster INNER JOIN paymentterms ON debtorsmaster.paymentterms=paymentterms.termsindicator - WHERE ediinvoices=1'; +$sql = "SELECT debtorno, + edireference, + editransport, + ediaddress, + ediserveruser, + ediserverpwd, + daysbeforedue, + dayinfollowingmonth + FROM debtorsmaster INNER JOIN paymentterms ON debtorsmaster.paymentterms=paymentterms.termsindicator + WHERE ediinvoices=1"; $EDIInvCusts = DB_query($sql,$db); @@ -30,29 +30,29 @@ /*Figure out if there are any unset invoices or credits for the customer */ $sql = "SELECT debtortrans.id, - transno, - type, - order_, - trandate, - ovgst, - ovamount, - ovfreight, - ovdiscount, - debtortrans.branchcode, - custbranchcode, - invtext, - shipvia, - rate, - brname, - braddress1, - braddress2, - braddress3, - braddress4 - FROM debtortrans INNER JOIN custbranch ON custbranch.debtorno = debtortrans.debtorno - AND custbranch.branchcode = debtortrans.branchcode - WHERE (type=10 or type=11) - AND edisent=0 - AND debtortrans.debtorno='" . $CustDetails['debtorno'] . "'"; + transno, + type, + order_, + trandate, + ovgst, + ovamount, + ovfreight, + ovdiscount, + debtortrans.branchcode, + custbranchcode, + invtext, + shipvia, + rate, + brname, + braddress1, + braddress2, + braddress3, + braddress4 + FROM debtortrans INNER JOIN custbranch ON custbranch.debtorno = debtortrans.debtorno + AND custbranch.branchcode = debtortrans.branchcode + WHERE (type=10 or type=11) + AND edisent=0 + AND debtortrans.debtorno='" . $CustDetails['debtorno'] . "'"; $ErrMsg = _('There was a problem retrieving the customer transactions because'); $TransHeaders = DB_query($sql,$db,$ErrMsg); @@ -135,34 +135,34 @@ if ($TransDetail['type']==10){ /*its an invoice */ $sql = "SELECT stockmoves.stockid, - stockmaster.description, - -stockmoves.qty as quantity, - stockmoves.discountpercent, - ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . "* -stockmoves.qty) AS fxnet, - (stockmoves.price * " . $ExchRate . ") AS fxprice, - stockmoves.taxrate, - stockmaster.units - FROM stockmoves, - stockmaster - WHERE stockmoves.stockid = stockmaster.stockid - AND stockmoves.type=10 - AND stockmoves.transno='" . $TransNo . "' - AND stockmoves.show_on_inv_crds=1"; + stockmaster.description, + -stockmoves.qty as quantity, + stockmoves.discountpercent, + ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . "* -stockmoves.qty) AS fxnet, + (stockmoves.price * " . $ExchRate . ") AS fxprice, + stockmoves.taxrate, + stockmaster.units + FROM stockmoves, + stockmaster + WHERE stockmoves.stockid = stockmaster.stockid + AND stockmoves.type=10 + AND stockmoves.transno='" . $TransNo . "' + AND stockmoves.show_on_inv_crds=1"; } else { /* credit note */ $sql = "SELECT stockmoves.stockid, - stockmaster.description, - stockmoves.qty as quantity, - stockmoves.discountpercent, - ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . " * stockmoves.qty) as fxnet, - (stockmoves.price * " . $ExchRate . ") AS fxprice, - stockmoves.taxrate, - stockmaster.units - FROM stockmoves, - stockmaster - WHERE stockmoves.stockid = stockmaster.stockid - AND stockmoves.type=11 and stockmoves.transno='" . $TransNo . "' - AND stockmoves.show_on_inv_crds=1"; + stockmaster.description, + stockmoves.qty as quantity, + stockmoves.discountpercent, + ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . " * stockmoves.qty) as fxnet, + (stockmoves.price * " . $ExchRate . ") AS fxprice, + stockmoves.taxrate, + stockmaster.units + FROM stockmoves, + stockmaster + WHERE stockmoves.stockid = stockmaster.stockid + AND stockmoves.type=11 and stockmoves.transno='" . $TransNo . "' + AND stockmoves.show_on_inv_crds=1"; } $TransLinesResult = DB_query($sql,$db); @@ -174,9 +174,9 @@ $StockID = $TransLines['StockID']; $sql = "SELECT partnerstockid FROM ediitemmapping - WHERE supporcust='CUST' - AND partnercode ='" . $CustDetails['debtorno'] . "' - AND stockid='" . $TransLines['stockid'] . "'"; + WHERE supporcust='CUST' + AND partnercode ='" . $CustDetails['debtorno'] . "' + AND stockid='" . $TransLines['stockid'] . "'"; $CustStkResult = DB_query($sql,$db); if (DB_num_rows($CustStkResult)==1){ Modified: trunk/EmailConfirmation.php =================================================================== --- trunk/EmailConfirmation.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/EmailConfirmation.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -1,108 +1,144 @@ <?php /* $Id$*/ -//$PageSecurity = 2; include('includes/session.inc'); 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?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; - include('includes/footer.inc'); - exit(); + $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"> + <ul> + <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> + <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> + </ul> + </td> + </tr> + </table> + </div> + <br /> + <br /> + <br />'; + include('includes/footer.inc'); + exit(); } -$MailTo = $_GET['EMail']; -$headers = 'From: Bethany Manufacturing <sa...@be...>' . '\n'; -$headers .= 'MIME-Version: 1.0\n' . 'Content-Type: text/html; charset="utf-8"\n'; +$MailTo = $_GET['EMail']; +$headers = 'From: Bethany Manufacturing <sa...@be...>' . '\n'; +$headers .= 'MIME-Version: 1.0\n' . 'Content-Type: text/html; charset="utf-8"\n'; /*retrieve the order details from the database to print */ $ErrMsg = _('There was a problem retrieving the order header details for Order Number') . ' ' . $_GET['TransNo'] . ' ' . _('from the database'); $sql = "SELECT salesorders.debtorno, - salesorders.customerref, - salesorders.comments, - salesorders.orddate, - salesorders.deliverto, - salesorders.deladd1, - salesorders.deladd2, - salesorders.deladd3, - salesorders.deladd4, - salesorders.deladd5, - salesorders.deladd6, - salesorders.deliverblind, - debtorsmaster.name, - debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, - debtorsmaster.address5, - debtorsmaster.address6, - shippers.shippername, - salesorders.printedpackingslip, - salesorders.datepackingslipprinted, - locations.locationname, - salesorders.deliverydate - FROM salesorders, - debtorsmaster, - shippers, - locations - WHERE salesorders.debtorno=debtorsmaster.debtorno - AND salesorders.shipvia=shippers.shipper_id - AND salesorders.fromstkloc=locations.loccode - AND salesorders.orderno=" . $_GET['TransNo']; + salesorders.customerref, + salesorders.comments, + salesorders.orddate, + salesorders.deliverto, + salesorders.deladd1, + salesorders.deladd2, + salesorders.deladd3, + salesorders.deladd4, + salesorders.deladd5, + salesorders.deladd6, + salesorders.deliverblind, + debtorsmaster.name, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + debtorsmaster.address5, + debtorsmaster.address6, + shippers.shippername, + salesorders.printedpackingslip, + salesorders.datepackingslipprinted, + locations.locationname, + salesorders.deliverydate + FROM salesorders, + debtorsmaster, + shippers, + locations + WHERE salesorders.debtorno=debtorsmaster.debtorno + AND salesorders.shipvia=shippers.shipper_id + AND salesorders.fromstkloc=locations.loccode + AND salesorders.orderno='" . $_GET['TransNo'] . "'"; $result=DB_query($sql,$db, $ErrMsg); //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?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('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"> + <ul> + <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> + <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> + </ul> + </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); - /* Place the deliver blind variable into a hold variable to used when - producing the packlist */ - $DeliverBlind = $myrow['deliverblind']; - $DeliveryDate = $myrow['salesorders.deliverydate']; - if ($myrow['printedpackingslip']==1 AND ($_GET['Reprint']!='OK' OR !isset($_GET['Reprint']))){ - $title = _('Print Packing Slip Error'); - include('includes/header.inc'); - echo '<p>'; - 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?' . SID . '&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?' . SID . '&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']; + $DeliveryDate = $myrow['salesorders.deliverydate']; + if ($myrow['printedpackingslip']==1 AND ($_GET['Reprint']!='OK' OR !isset($_GET['Reprint']))){ + $title = _('Print Packing Slip Error'); + include('includes/header.inc'); + 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><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></p>'; - 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?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('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"> + <ul> + <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> + <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> + </ul> + </td> + </tr> + </table> + </div> + <br /> + <br /> + <br />'; - include('includes/footer.inc'); - exit; - }//packing slip has been printed. - $MailSubject = "Order Confirmation-Sales Order " . $_GET['TransNo'] . " - Your PO " . - $myrow['customerref'] ; + include('includes/footer.inc'); + exit; + }//packing slip has been printed. + $MailSubject = _('Order Confirmation-Sales Order') . ' ' . $_GET['TransNo'] . ' - '. _('Your PO') . ' ' . $myrow['customerref'] ; } /*retrieve the order details from the database to print */ @@ -111,49 +147,52 @@ ) LETS GO */ -$MailMessage = "<html><head><title>Email Confirmation</title></head><body>" . - "<Table cellpadding='2' cellspacing='2'><tr>" . - "<td align='center' colspan='4'><H1>" . $_SESSION['CompanyRecord']['coyname'] . "</H1>" ; -$MailMessage = $MailMessage . "</td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $_SESSION['CompanyRecord']['regoffice1'] . "</td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $_SESSION['CompanyRecord']['regoffice4'] . ","; -$MailMessage = $MailMessage . "<b>" . - $_SESSION['CompanyRecord']['regoffice5'] . "</td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $_SESSION['CompanyRecord']['telephone'] . ' ' . _('Fax'). ': ' . - $_SESSION['CompanyRecord']['fax'] . "</td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $_SESSION['CompanyRecord']['email'] . "<br /><br /><br /></td></tr>"; -$MailMessage = $MailMessage . "<Table><tr><td align='center' colspan='4'> - <h2> Order Acknowledgement</h2></td></tr>"; -$MailMessage = $MailMessage . "<tr><td align='center' colspan='4'> <b>Order Number " . - $_GET['TransNo'] . "</b><br /><br /><br /></td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>Delivered To:</b></td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $myrow['deliverto'] . "</td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $myrow['deladd1'] . "</td></tr>"; -If(mb_strlen(trim($myrow['deladd2']))) -{ - $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd2'] . "</td></tr>"; - $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . - ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5']. "<br /><br /><br /></td></tr>"; +$MailMessage = '<html><head><title>' . _('Email Confirmation') . '</title></head> + <body> + <table cellpadding="2" cellspacing="2"> + <tr> + <td align="center" colspan="4"><h1>' . $_SESSION['CompanyRecord']['coyname'] . '</h1></td> + </tr> + <tr><td colspan="4"> <b>' . $_SESSION['CompanyRecord']['regoffice1'] . '</td> + </tr> + <tr><td colspan="4"> <b>' . $_SESSION['CompanyRecord']['regoffice4'] . ',<b>' . $_SESSION['CompanyRecord']['regoffice5'] . '</td> + </tr> + <tr><td colspan="4"> <b>' . $_SESSION['CompanyRecord']['telephone'] . ' ' . _('Fax'). ': ' . $_SESSION['CompanyRecord']['fax'] . '</td> + </tr> + <tr><td colspan="4"> <b>' . $_SESSION['CompanyRecord']['email'] . '<br /><br /><br /></td> + </tr> + </table> + <table> + <tr><td align="center" colspan="4"> + <h2>' . _('Order Acknowledgement') . '</h2></td> + </tr> + <tr><td align="center" colspan="4"> <b>' . _('Order Number') . ' ' . $_GET['TransNo'] . '</b><br /><br /><br /></td> + </tr> + <tr><td colspan="4"> <b>' . _('Delivered To') . ':</b></td> + </tr> + <tr><td colspan="4"> <b>' . $myrow['deliverto'] . '</td> + </tr> + <tr><td colspan="4"> <b>' . $myrow['deladd1'] . '</td> + </tr>'; + +if(mb_strlen(trim($myrow['deladd2']))) { + $MailMessage .= '<tr><td> <b>' . $myrow['deladd2'] . '</td></tr> + <tr><td> <b>' . $myrow['deladd3'] . ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5']. '<br /><br /><br /></td> + </tr>'; +} else { + $MailMessage .= '<tr><td> <b>' . $myrow['deladd3'] . ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5'] . '<br /><br /><br /></td> + </tr>'; } -else -{ - $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . ' ' . - $myrow['deladd4'] . ' ' . $myrow['deladd5'] . "<br /><br /><br /></td></tr>"; -} -$MailMessage = $MailMessage . "</table><table border='1' width='50%'><tr>"; +$MailMessage .= '</table> + <table border="1" width="50%"><tr>'; if($_REQUEST['POLine'] == 1){ - $MailMessage = $MailMessage . " <td>PO Line</td>"; + $MailMessage .= '<td>' . _('PO Line') . '</td>'; } - $MailMessage = $MailMessage . "<td>Stock Code</td> - <td>Description</td> - <td>Quantity Ordered</td> - <td>Due Date</td></tr>"; + $MailMessage .= '<td>' . _('Stock Code') . '</td> + <td>' . _('Description') . '</td> + <td>' . _('Quantity Ordered') . '</td> + <td>' . _('Due Date') . '</td> + </tr>'; $sql = "SELECT salesorderdetails.stkcode, @@ -181,33 +220,31 @@ $DscCode[$i] = $myrow2['description']; $QtyCode[$i] = $DisplayQty ; $POLine[$i] = $myrow2['poline']; - If($myrow2['itemdue'] =='') - { + if($myrow2['itemdue'] =='') { $ItemDue[$i] = date('M d, Y',strtotime($DeliveryDate)); - } - else - { + } else { $ItemDue[$i] = date('M d, Y',strtotime($myrow2['itemdue'])); } - $MailMessage = $MailMessage . "<tr>"; + $MailMessage .= '<tr>'; if($_REQUEST['POLine'] == 1){ - $MailMessage = $MailMessage . "<td align='right'>" . $POLine[$i] . "</td>"; + $MailMessage .= '<td align="right">' . $POLine[$i] . '</td>'; } - $MailMessage = $MailMessage . "<td>" . $myrow2['stkcode'] . - "</td><td>" . - $myrow2['description'] . "</td><td align='right'>" . - $DisplayQty . "</td><td align='center'>" . $ItemDue[$i] . - "</td></tr>"; + $MailMessage .= '<td>' . $myrow2['stkcode'] . '</td><td>' . $myrow2['description'] . '</td> + <td align="right">' . $DisplayQty . '</td> + <td align="center">' . $ItemDue[$i] . '</td> + </tr>'; $i = $i + 1; } //end while there are line items to print out } /*end if there are order details to show on the order*/ -$MailMessage = $MailMessage . "</Table></body></html>"; +$MailMessage .= '</table> + </body> + </html>'; // echo $MailMessage . "=mailMessage<br />"; IF(mail( $MailTo, $MailSubject, $MailMessage, $headers )){ - echo " The following E-Mail was sent to $MailTo:"; + echo ' ' ._('The following E-Mail was sent to') . ' ' . $MailTo . ' :'; } ?> <html> Modified: trunk/EmailCustTrans.php =================================================================== --- trunk/EmailCustTrans.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/EmailCustTrans.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -47,8 +47,8 @@ FROM custbranch INNER JOIN debtortrans ON custbranch.debtorno= debtortrans.debtorno AND custbranch.branchcode=debtortrans.branchcode - WHERE debtortrans.type='" . $TypeCode . "' - AND debtortrans.transno='" .$_GET['FromTransNo'] . "'"; + WHERE debtortrans.type='" . $TypeCode . "' + AND debtortrans.transno='" .$_GET['FromTransNo'] . "'"; $ErrMsg = _('There was a problem retrieving the contact details for the customer'); $ContactResult=DB_query($SQL,$db,$ErrMsg); Modified: trunk/ExchangeRateTrend.php =================================================================== --- trunk/ExchangeRateTrend.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/ExchangeRateTrend.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -1,9 +1,7 @@ <?php -/* $Revision: 1.3 $ */ + /* $Id$*/ -//$PageSecurity = 2; - include('includes/session.inc'); $title = _('View Currency Trends'); @@ -29,33 +27,30 @@ _('View Currency Trend') . '" alt="" />' . ' ' . _('View Currency Trend') . '</p>'; echo '<table>'; // First column - $SQL = 'SELECT * FROM currencies'; + $SQL = "SELECT * FROM currencies"; $result=DB_query($SQL,$db); // CurrencyToShow Currency Picker echo '<tr><td><select name="CurrencyToShow" onChange="ReloadForm(update.submit)">'; - DB_data_seek($result,0); - while ($myrow=DB_fetch_array($result)) { - if ($myrow['currabrev']!=$_SESSION['CompanyRecord']['currencydefault']){ - if ( $CurrencyToShow==$myrow['currabrev'] ) { - echo '<option selected value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>'; - } else { - echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>'; - } + DB_data_seek($result,0); + while ($myrow=DB_fetch_array($result)) { + if ($myrow['currabrev']!=$_SESSION['CompanyRecord']['currencydefault']){ + if ( $CurrencyToShow==$myrow['currabrev'] ) { + echo '<option selected value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>'; + } else { + echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>'; } } - echo '</select></td></tr>'; + } + echo '</select></td></tr>'; echo '</table>'; /*close off the table in the third column */ - - echo '<p><div class="centre"><input type=submit name=submit VALUE="' . _('Accept') . '"></div>'; + echo '<p><div class="centre"><input type=submit name=submit value="' . _('Accept') . '"></div>'; echo '</form>'; - - // ************** // SHOW OUR GRAPH // ************** @@ -66,7 +61,7 @@ echo '<p></div><table class=selection>'; echo '<tr><th><div class="centre"><font size=4 color=BLUE><b><U>' . $FunctionalCurrency . ' / ' . $CurrencyToShow . '</b></U></font></th></tr>'; - echo '<tr><td><img src=' . $image . ' alt="Trend Currently Unavailable"></td></tr>'; + echo '<tr><td><img src=' . $image . ' alt="' ._('Trend Currently Unavailable') . '"></td></tr>'; echo '</table>'; Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/Factors.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -151,19 +151,19 @@ if (isset($FactorID) and isset($_POST['Amend'])) { $sql = "SELECT id, - coyname, - address1, - address2, - address3, - address4, - address5, - address6, - contact, - telephone, - fax, - email - FROM factorcompanies - WHERE id = '".$FactorID."'"; + coyname, + address1, + address2, + address3, + address4, + address5, + address6, + contact, + telephone, + fax, + email + FROM factorcompanies + WHERE id = '".$FactorID."'"; $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); @@ -208,7 +208,6 @@ <td><input tabindex=2 type="text" name="Address1" size=42 maxlength=40 value="' . $_POST['Address1'] .'"></td></tr>'; echo '<tr><td>' . _('Address Line 2') . ':</td> <td><input tabindex=3 type="text" name="Address2" size=42 maxlength=40 value="' . $_POST['Address2'] .'"></td></tr>'; - echo '<tr><td>' . _('Address Line 3') . ':</td> <td><input tabindex=4 type="text" name="Address3" size=42 maxlength=40 value="' .$_POST['Address3'] .'"></td></tr>'; echo '<tr><td>' . _('Address Line 4') . ':</td> @@ -248,32 +247,34 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="New" value="No">'; - echo '<table class=selection><tr> - <th>' . _('ID') . '</th> - <th>' . _('Company Name').'</th> - <th>' . _('Address 1').'</th> - <th>' . _('Address 2').'</th> - <th>' . _('Address 3').'</th> - <th>' . _('Address 4').'</th> - <th>' . _('Address 5').'</th> - <th>' . _('Address 6').'</th> - <th>' . _('Contact').'</th> - <th>' . _('Telephone').'</th> - <th>' . _('Fax Number').'</th> - <th>' . _('Email').'</th></tr>'; + echo '<table class=selection> + <tr> + <th>' . _('ID') . '</th> + <th>' . _('Company Name').'</th> + <th>' . _('Address 1').'</th> + <th>' . _('Address 2').'</th> + <th>' . _('Address 3').'</th> + <th>' . _('Address 4').'</th> + <th>' . _('Address 5').'</th> + <th>' . _('Address 6').'</th> + <th>' . _('Contact').'</th> + <th>' . _('Telephone').'</th> + <th>' . _('Fax Number').'</th> + <th>' . _('Email').'</th> + </tr>'; $sql = "SELECT id, - coyname, - address1, - address2, - address3, - address4, - address5, - address6, - contact, - telephone, - fax, - email - FROM factorcompanies"; + coyname, + address1, + address2, + address3, + address4, + address5, + address6, + contact, + telephone, + fax, + email + FROM factorcompanies"; $result=DB_query($sql, $db); $j=1; while ($myrow = DB_fetch_array($result)) { @@ -307,6 +308,5 @@ } - include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/FixedAssetRegister.php =================================================================== --- trunk/FixedAssetRegister.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/FixedAssetRegister.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -1,5 +1,5 @@ <?php -//$PageSecurity = 11; + include ('includes/session.inc'); $title = _('Fixed Asset Register'); $csv_output = ''; @@ -15,36 +15,36 @@ $DateFrom = FormatDateForSQL($_POST['FromDate']); $DateTo = FormatDateForSQL($_POST['ToDate']); $sql = "SELECT fixedassets.assetid, - fixedassets.description, - fixedassets.longdescription, - fixedassets.assetcategoryid, - fixedassets.serialno, - fixedassetlocations.locationdescription, - fixedassets.datepurchased, - fixedassetlocations.parentlocationid, - fixedassets.assetlocation, - fixedassets.disposaldate, - SUM(CASE WHEN (fixedassettrans.transdate <'" . $DateFrom . "' AND fixedassettrans.fixedassettranstype='cost') THEN fixedassettrans.amount ELSE 0 END) AS costbfwd, - SUM(CASE WHEN (fixedassettrans.transdate <'" . $DateFrom . "' AND fixedassettrans.fixedassettranstype='depn') THEN fixedassettrans.amount ELSE 0 END) AS depnbfwd, - SUM(CASE WHEN (fixedassettrans.transdate >='" . $DateFrom ."' AND fixedassettrans.transdate <='" . $DateTo . "' AND fixedassettrans.fixedassettranstype='cost') THEN fixedassettrans.amount ELSE 0 END) AS periodadditions, - SUM(CASE WHEN fixedassettrans.transdate >='" . $DateFrom . "' AND fixedassettrans.transdate <='" . $DateTo . "' AND fixedassettrans.fixedassettranstype='depn' THEN fixedassettrans.amount ELSE 0 END) AS perioddepn, - SUM(CASE WHEN fixedassettrans.transdate >='" . $DateFrom . "' AND fixedassettrans.transdate <='" . $DateTo . "' AND fixedassettrans.fixedassettranstype='disposal' THEN fixedassettrans.amount ELSE 0 END) AS perioddisposal - FROM fixedassets - INNER JOIN fixedassetcategories ON fixedassets.assetcategoryid=fixedassetcategories.categoryid - INNER JOIN fixedassetlocations ON fixedassets.assetlocation=fixedassetlocations.locationid - INNER JOIN fixedassettrans ON fixedassets.assetid=fixedassettrans.assetid - WHERE fixedassets.assetcategoryid " . LIKE . "'" . $_POST['AssetCategory'] . "' - AND fixedassets.assetid " . LIKE . "'" . $_POST['AssetID'] . "' - AND fixedassets.assetlocation " . LIKE . "'" . $_POST['AssetLocation'] . "' - GROUP BY fixedassets.assetid, - fixedassets.description, - fixedassets.longdescription, - fixedassets.assetcategoryid, - fixedassets.serialno, - fixedassetlocations.locationdescription, - fixedassets.datepurchased, - fixedassetlocations.parentlocationid, - fixedassets.assetlocation"; + fixedassets.description, + fixedassets.longdescription, + fixedassets.assetcategoryid, + fixedassets.serialno, + fixedassetlocations.locationdescription, + fixedassets.datepurchased, + fixedassetlocations.parentlocationid, + fixedassets.assetlocation, + fixedassets.disposaldate, + SUM(CASE WHEN (fixedassettrans.transdate <'" . $DateFrom . "' AND fixedassettrans.fixedassettranstype='cost') THEN fixedassettrans.amount ELSE 0 END) AS costbfwd, + SUM(CASE WHEN (fixedassettrans.transdate <'" . $DateFrom . "' AND fixedassettrans.fixedassettranstype='depn') THEN fixedassettrans.amount ELSE 0 END) AS depnbfwd, + SUM(CASE WHEN (fixedassettrans.transdate >='" . $DateFrom ."' AND fixedassettrans.transdate <='" . $DateTo . "' AND fixedassettrans.fixedassettranstype='cost') THEN fixedassettrans.amount ELSE 0 END) AS periodadditions, + SUM(CASE WHEN fixedassettrans.transdate >='" . $DateFrom . "' AND fixedassettrans.transdate <='" . $DateTo . "' AND fixedassettrans.fixedassettranstype='depn' THEN fixedassettrans.amount ELSE 0 END) AS perioddepn, + SUM(CASE WHEN fixedassettrans.transdate >='" . $DateFrom . "' AND fixedassettrans.transdate <='" . $DateTo . "' AND fixedassettrans.fixedassettranstype='disposal' THEN fixedassettrans.amount ELSE 0 END) AS perioddisposal + FROM fixedassets + INNER JOIN fixedassetcategories ON fixedassets.assetcategoryid=fixedassetcategories.categoryid + INNER JOIN fixedassetlocations ON fixedassets.assetlocation=fixedassetlocations.locationid + INNER JOIN fixedassettrans ON fixedassets.assetid=fixedassettrans.assetid + WHERE fixedassets.assetcategoryid " . LIKE . "'" . $_POST['AssetCategory'] . "' + AND fixedassets.assetid " . LIKE . "'" . $_POST['AssetID'] . "' + AND fixedassets.assetlocation " . LIKE . "'" . $_POST['AssetLocation'] . "' + GROUP BY fixedassets.assetid, + fixedassets.description, + fixedassets.longdescription, + fixedassets.assetcategoryid, + fixedassets.serialno, + fixedassetlocations.locationdescription, + fixedassets.datepurchased, + fixedassetlocations.parentlocationid, + fixedassets.assetlocation"; $result = DB_query($sql, $db); if (isset($_POST['pdf'])) { $FontSize = 10; @@ -116,8 +116,7 @@ $Ancestors[$i] = $ParentRow['locationdescription']; } */ - if (Date1GreaterThanDate2(ConvertSQLDate($myrow['disposaldate']),$_POST['FromDate']) - OR $myrow['disposaldate']='0000-00-00'){ + if (Date1GreaterThanDate2(ConvertSQLDate($myrow['disposaldate']),$_POST['FromDate']) OR $myrow['disposaldate']='0000-00-00') { if ($myrow['disposaldate']!='0000-00-00' AND Date1GreaterThanDate2($_POST['ToDate'], ConvertSQLDate($myrow['disposaldate']))){ /*The asset was disposed during the period */ @@ -221,14 +220,14 @@ echo '<input type=hidden name=AssetLocation value=' . $_POST['AssetLocation'] . '>'; //Total Values echo '<tr><th style="vertical-align:top" colspan="5">' . _('TOTAL') . '</th>'; - echo '<th style="text-align:right">' . number_format($TotalCostBfwd, 2) . '</th>'; - echo '<th style="text-align:right">' . number_format($TotalDepnBfwd, 2) . '</th>'; - echo '<th style="text-align:right">' . number_format($TotalAdditions, 2) . '</th>'; - echo '<th style="text-align:right">' . number_format($TotalDepn, 2) . '</th>'; - echo '<th style="text-align:right">' . number_format($TotalCostCfwd, 2) . '</th>'; - echo '<th style="text-align:right">' . number_format($TotalDepnCfwd, 2) . '</th>'; - echo '<th style="text-align:right">' . number_format($TotalNBV, 2) . '</th>'; - echo '<th style="text-align:right">' . number_format($TotalDisposals, 2) . '</th></tr>'; + echo '<th style="text-align:right">' . number_format($TotalCostBfwd, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>'; + echo '<th style="text-align:right">' . number_format($TotalDepnBfwd, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>'; + echo '<th style="text-align:right">' . number_format($TotalAdditions, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>'; + echo '<th style="text-align:right">' . number_format($TotalDepn, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>'; + echo '<th style="text-align:right">' . number_format($TotalCostCfwd, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>'; + echo '<th style="text-align:right">' . number_format($TotalDepnCfwd, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>'; + echo '<th style="text-align:right">' . number_format($TotalNBV, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>'; + echo '<th style="text-align:right">' . number_format($TotalDisposals, $_SESSION['CompanyRecord']['decimalplaces']) . '</th></tr>'; echo '</table>'; echo '<br /><div class="centre"><input type="Submit" name="pdf" value="' . _('Print as a pdf') . '"> '; echo '<input type="Submit" name="csv" value="' . _('Print as CSV') . '"></div></form>'; @@ -238,7 +237,7 @@ echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title; $result = DB_query('SELECT categoryid,categorydescription FROM fixedassetcategories', $db); - echo '<form name="RegisterForm" method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '"><table class="selection">'; + echo '<form name="RegisterForm" method="post" action="' . $_SERVER['PHP_SELF'] . '"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><th>' . _('Asset Category') . '</th>'; echo '<td><select name=AssetCategory>'; @@ -251,7 +250,7 @@ } } echo '</select></td></tr>'; - $sql = 'SELECT locationid, locationdescription FROM fixedassetlocations'; + $sql = "SELECT locationid, locationdescription FROM fixedassetlocations"; $result = DB_query($sql, $db); echo '<tr><th>' . _('Asset Location') . '</th>'; echo '<td><select name=AssetLocation>'; @@ -264,7 +263,7 @@ } } echo '</select></td></tr>'; - $sql = 'SELECT assetid, description FROM fixedassets'; + $sql = "SELECT assetid, description FROM fixedassets"; $result = DB_query($sql, $db); echo '<tr><th>' . _('Asset') . '</th>'; echo '<td><select name="AssetID">'; @@ -278,18 +277,19 @@ } echo '</select></td></tr>'; if (empty($_POST['FromDate'])) { - $_POST['FromDate'] = date($_SESSION['DefaultDateFormat'], mktime(0, 0, 0, date("m"), date("d"), date("Y") - 1)); + $_POST['FromDate'] = date($_SESSION['DefaultDateFormat'], mktime(0, 0, 0, date('m'), date('d'), date('Y') - 1)); } if (empty($_POST['ToDate'])) { $_POST['ToDate'] = date($_SESSION['DefaultDateFormat']); } - echo '<tr><th>' . _(' From Date') . "</th><td><input type='text' class='date' alt='" . $_SESSION['DefaultDateFormat'] . "' name='FromDate' maxlength=10 size=11 value='" . $_POST['FromDate'] . "'></td>"; + echo '<tr><th>' . _(' From Date') . '</th><td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" maxlength=10 size=11 value="' . $_POST['FromDate'] . '"></td>'; echo '</tr>'; - echo '<tr><th>' . _('To Date ') . "</th><td><input type='text' class='date' alt='" . $_SESSION['DefaultDateFormat'] . "' name='ToDate' maxlength=10 size=11 value='" . $_POST['ToDate'] . "'></td>"; - echo '</tr>'; - - echo '</table><br />'; + echo '<tr><th>' . _('To Date ') . '</th><td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength="10" size="11" value="' . $_POST['ToDate'] . '"></td> + </tr> + </table> + <br />'; + echo '<div class="centre"><input type="Submit" name="submit" value="' . _('Show Assets') . '"> '; echo '<input type="Submit" name="pdf" value="' . _('Print as a pdf') . '"> '; echo '<input type="Submit" name = "csv" value= "' . _('Print as CSV') . '"></div>'; Modified: trunk/PDFQuotation.php =================================================================== --- trunk/PDFQuotation.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/PDFQuotation.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -22,37 +22,37 @@ $ErrMsg = _('There was a problem retrieving the quotation header details for Order Number') . ' ' . $_GET['QuotationNo'] . ' ' . _('from the database'); $sql = "SELECT salesorders.customerref, - salesorders.comments, - salesorders.orddate, - salesorders.deliverto, - salesorders.deladd1, - salesorders.deladd2, - salesorders.deladd3, - salesorders.deladd4, - salesorders.deladd5, - salesorders.deladd6, - debtorsmaster.name, - debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, - debtorsmaster.address5, - debtorsmaster.address6, - shippers.shippername, - salesorders.printedpackingslip, - salesorders.datepackingslipprinted, - salesorders.branchcode, - locations.taxprovinceid, - locations.locationname - FROM salesorders, - debtorsmaster, - shippers, - locations - WHERE salesorders.debtorno=debtorsmaster.debtorno - AND salesorders.shipvia=shippers.shipper_id - AND salesorders.fromstkloc=locations.loccode - AND salesorders.quotation=1 - AND salesorders.orderno='" . $_GET['QuotationNo'] ."'"; + salesorders.comments, + salesorders.orddate, + salesorders.deliverto, + salesorders.deladd1, + salesorders.deladd2, + salesorders.deladd3, + salesorders.deladd4, + salesorders.deladd5, + salesorders.deladd6, + debtorsmaster.name, + debtorsmaster.currcode, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + debtorsmaster.address5, + debtorsmaster.address6, + shippers.shippername, + salesorders.printedpackingslip, + salesorders.datepackingslipprinted, + salesorders.branchcode, + locations.taxprovinceid, + locations.locationname + FROM salesorders INNER JOIN debtorsmaster + ON salesorders.debtorno=debtorsmaster.debtorno + INNER JOIN shippers + ON salesorders.shipvia=shippers.shipper_id + INNER JOIN locations + ON salesorders.fromstkloc=locations.loccode + WHERE salesorders.quotation=1 + AND salesorders.orderno='" . $_GET['QuotationNo'] ."'"; $result=DB_query($sql,$db, $ErrMsg); @@ -62,9 +62,20 @@ 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?'. SID .'&Quotations=Quotes_Only">' . _('Outstanding Quotations') . '</a></li> - </td></tr></table></div><br /><br /><br />'; + echo '<br /> + <br /> + <br /> + <table class="table_index"> + <tr> + <td class="menu_group_item"> + <ul><li><a href="'. $rootpath . '/SelectSalesOrder.php?Quotations=Quotes_Only">' . _('Outstanding Quotations') . '</a></li></ul> + </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! */ @@ -105,7 +116,7 @@ $result=DB_query($sql,$db, $ErrMsg); -$ListCount = 0; // UldisN +$ListCount = 0; if (DB_num_rows($result)>0){ /*Yes there are line items to start the ball rolling with a page header */ @@ -136,13 +147,19 @@ $TaxProv = $myrow['taxprovinceid']; $TaxCat = $myrow2['taxcatid']; $Branch = $myrow['branchcode']; - $sql3 = " select taxgrouptaxes.taxauthid from taxgrouptaxes INNER JOIN custbranch ON taxgrouptaxes.taxgroupid=custbranch.taxgroupid WHERE custbranch.branchcode='" .$Branch ."'"; + $sql3 = "SELECT taxgrouptaxes.taxauthid + FROM taxgrouptaxes INNER JOIN custbranch + ON taxgrouptaxes.taxgroupid=custbranch.taxgroupid + WHERE custbranch.branchcode='" .$Branch ."'"; $result3=DB_query($sql3,$db, $ErrMsg); while ($myrow3=DB_fetch_array($result3)){ $TaxAuth = $myrow3['taxauthid']; } - $sql4 = "SELECT * FROM taxauthrates WHERE dispatchtaxprovince='" .$TaxProv ."' AND taxcatid='" .$TaxCat ."' AND taxauthority='" .$TaxAuth ."'"; + $sql4 = "SELECT * FROM taxauthrates + WHERE dispatchtaxprovince='" .$TaxProv ."' + AND taxcatid='" .$TaxCat ."' + AND taxauthority='" .$TaxAuth ."'"; $result4=DB_query($sql4,$db, $ErrMsg); while ($myrow4=DB_fetch_array($result4)){ $TaxClass = 100 * $myrow4['taxrate']; @@ -227,9 +244,9 @@ if ($ListCount == 0){ $title = _('Print Quotation Error'); include('includes/header.inc'); - echo '<p>'. _('There were no items on the quotation') . '. ' . _('The quotation cannot be printed'). - '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?' . SID . '&Quotation=Quotes_only">'. _('Print Another Quotation'). - '</a>' . '<br />'. '<a href="' . $rootpath . '/index.php?' . SID . '">' . _('Back to the menu') . '</a>'; + prnMsg(_('There were no items on the quotation') . '. ' . _('The quotation cannot be printed'),'info'); + echo '<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'); exit; } else { Modified: trunk/PDFQuotationPortrait.php =================================================================== --- trunk/PDFQuotationPortrait.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/PDFQuotationPortrait.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -9,11 +9,26 @@ If (!isset($_GET['QuotationNo']) || $_GET['QuotationNo']==""){ $title = _('Select Quotation To Print'); include('includes/header.inc'); - echo '<div class="centre"><br /><br /><br />'; + 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?'. SID .'&Quotations=Quotes_Only">' . _('Quotations') . '</a></li> - </td></tr></table></div><br /><br /><br />'; + echo '<br /> + <br /> + <br /> + <table class="table_index"> + <tr> + <td class="menu_group_item"> + <ul><li><a href="'. $rootpath . '/SelectSalesOrder.php?Quotations=Quotes_Only">' . _('Quotations') . '</a></li> + </ul> + </td> + </tr> + </table> + </div> + <br /> + <br /> + <br />'; include('includes/footer.inc'); exit(); } @@ -22,37 +37,37 @@ $ErrMsg = _('There was a problem retrieving the quotation header details for Order Number') . ' ' . $_GET['QuotationNo'] . ' ' . _('from the database'); $sql = "SELECT salesorders.customerref, - salesorders.comments, - salesorders.orddate, - salesorders.deliverto, - salesorders.deladd1, - salesorders.deladd2, - salesorders.deladd3, - salesorders.deladd4, - salesorders.deladd5, - salesorders.deladd6, - debtorsmaster.name, - debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, - debtorsmaster.address5, - debtorsmaster.address6, - shippers.shippername, - salesorders.printedpackingslip, - salesorders.datepackingslipprinted, - salesorders.branchcode, - locations.taxprovinceid, - locations.locationname - FROM salesorders, - debtorsmaster, - shippers, - locations - WHERE salesorders.debtorno=debtorsmaster.debtorno - AND salesorders.shipvia=shippers.shipper_id - AND salesorders.fromstkloc=locations.loccode - AND salesorders.quotation=1 - AND salesorders.orderno='" . $_GET['QuotationNo'] ."'"; + salesorders.comments, + salesorders.orddate, + salesorders.deliverto, + salesorders.deladd1, + salesorders.deladd2, + salesorders.deladd3, + salesorders.deladd4, + salesorders.deladd5, + salesorders.deladd6, + debtorsmaster.name, + debtorsmaster.currcode, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + debtorsmaster.address5, + debtorsmaster.address6, + shippers.shippername, + salesorders.printedpackingslip, + salesorders.datepackingslipprinted, + salesorders.branchcode, + locations.taxprovinceid, + locations.locationname + FROM salesorders INNER JOIN debtorsmaster + ON salesorders.debtorno=debtorsmaster.debtorno + INNER JOIN shippers + ON salesorders.shipvia=shippers.shipper_id + INNER JOIN locations + ON salesorders.fromstkloc=locations.loccode + WHERE salesorders.quotation=1 + AND salesorders.orderno='" . $_GET['QuotationNo'] ."'"; $result=DB_query($sql,$db, $ErrMsg); @@ -60,11 +75,25 @@ if (DB_num_rows($result)==0){ $title = _('Print Quotation Error'); include('includes/header.inc'); - echo '<div class="centre"><br /><br /><br />'; + 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?'. SID .'&Quotations=Quotes_Only">' . _('Outstanding Quotations') . '</a></li> - </td></tr></table></div><br /><br /><br />'; + echo '<br /> + <br /> + <br /> + <table class="table_index"> + <tr> + <td class="menu_group_item"> + <ul><li><a href="'. $rootpath . '/SelectSalesOrder.php?Quotations=Quotes_Only">' . _('Outstanding Quotations') . '</a></li></ul> + </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! */ Modified: trunk/ShipmentCosting.php =================================================================== --- trunk/ShipmentCosting.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/ShipmentCosting.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -624,8 +624,8 @@ if ($_SESSION['WeightedAverageCosting']==0){ /* We are standard costing - so show the option to update costs - under W. Avg cost updates are implicit */ echo _('Update Standard Costs') .':<select name="UpdateCost"> - <option selected VALUE="Yes">'. _('Yes') . '</option> - <option VALUE="No">'. _('No') . '</option> + <option selected value="Yes">'. _('Yes') . '</option> + <option value="No">'. _('No') . '</option> </select>'; } echo '<br /><br /><input type=submit name="Close" VALUE="'. _('Confirm OK to Close'). '">'; Modified: trunk/TaxAuthorityRates.php =================================================================== --- trunk/TaxAuthorityRates.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/TaxAuthorityRates.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -1,8 +1,6 @@ <?php /* $Id$*/ -//$PageSecurity = 11; // only allow accountant access - if (isset($_POST['TaxAuthority'])){ $TaxAuthority = $_POST['TaxAuthority']; } @@ -17,10 +15,9 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Supplier Types') . '" alt="" />' . $title. '</p>'; -/* <-- $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 /><a href="' . $rootpath . '/TaxAuthorities.php">' . _('click here') . '</a> ' . _('to go to the Tax Authority page'),'error'); include ('includes/footer.inc'); exit; } @@ -29,11 +26,11 @@ if (isset($_POST['UpdateRates'])){ $TaxRatesResult = DB_query("SELECT taxauthrates.taxcatid, - taxauthrates.taxrate, - taxauthrates.dispatchtaxprovince - FROM taxauthrates - WHERE taxauthrates.taxauthority='" . $TaxAuthority . "'", - $db); + taxauthrates.taxrate, + taxauthrates.dispatchtaxprovince + FROM taxauthrates + WHERE taxauthrates.taxauthority='" . $TaxAuthority . "'", + $db); while ($myrow=DB_fetch_array($TaxRatesResult)){ @@ -55,34 +52,35 @@ $TaxAuthDetail = DB_query("SELECT description FROM taxauthorities WHERE taxid='" . $TaxAuthority . "'",$db); $myrow = DB_fetch_row($TaxAuthDetail); -echo '<form action="' . $_SERVER['PHP_SELF'] . '?' . SID .'" method=post>'; +echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<input type=hidden name="TaxAuthority" VALUE=' . $TaxAuthority . '>'; +echo '<input type=hidden name="TaxAuthority" value="' . $TaxAuthority . '">'; $TaxRatesResult = DB_query("SELECT taxauthrates.taxcatid, - taxcategories.taxcatname, - taxauthrates.taxrate, - taxauthrates.dispatchtaxprovince, - taxprovinces.taxprovincename - FROM taxauthrates INNER JOIN taxauthorities - ON taxauthrates.taxauthority=taxauthorities.taxid - INNER JOIN taxprovinces - ON taxauthrates.dispatchtaxprovince= taxprovinces.taxprovinceid - INNER JOIN taxcategories - ON taxauthrates.taxcatid=taxcategories.taxcatid - WHERE taxauthrates.taxauthority='" . $TaxAuthority . "' - ORDER BY taxauthrates.dispatchtaxprovince, - taxauthrates.taxcatid", - $db); + taxcategories.taxcatname, + taxauthrates.taxrate, + taxauthrates.dispatchtaxprovince, + taxprovinces.taxprovincename + FROM taxauthrates INNER JOIN taxauthorities + ON taxauthrates.taxauthority=taxauthorities.taxid + INNER JOIN taxprovinces + ON taxauthrates.dispatchtaxprovince= taxprovinces.taxprovinceid + INNER JOIN taxcategories + ON taxauthrates.taxcatid=taxcategories.taxcatid + WHERE taxauthrates.taxauthority='" . $TaxAuthority . "' + ORDER BY taxauthrates.dispatchtaxprovince, + taxauthrates.taxcatid", + $db); if (DB_num_rows($TaxRatesResult)>0){ - echo '<table cellpadding=2 class=selection>'; + echo '<table cellpadding=2 class="selection">'; echo '<tr><th colspan=3><font size=3 color=navy>' . _('Update') . ' ' . $myrow[0] . ' ' . _('Rates') . '</font></th></tr>'; $TableHeader = '<tr><th>' . _('Deliveries From') . '<br />' . _('Tax Province') . '</th> <th>' . _('Tax Category') . '</th> - <th>' . _('Tax Rate') . ' %</th></tr>'; + <th>' . _('Tax Rate') . ' %</th> + </tr>'; echo $TableHeader; $j = 1; $k = 0; //row counter to determine background colour @@ -104,7 +102,7 @@ printf('<td>%s</td> <td>%s</td> - <td><input type=text class="number" name=%s maxlength=5 size=5 value=%s></td> + <td><input type="text" class="number" name=%s maxlength=5 size=5 value=%s></td> </tr>', $myrow['taxprovincename'], $myrow['taxcatname'], @@ -116,7 +114,9 @@ } //end of while loop echo '</table>'; -echo "<br /><div class='centre'><input type=submit name='UpdateRates' VALUE='" . _('Update Rates') . "'>"; +echo '<br /> + <div class="centre"> + <input type=submit name="UpdateRates" VALUE="' . _('Update Rates') . '">'; } //end if tax taxcatid/rates to show else { prnMsg(_('There are no tax rates to show - perhaps the dispatch tax province records have not yet been created?'),'warn'); @@ -124,10 +124,10 @@ echo '</form>'; -echo '<br /><br /><a href="' . $rootpath . '/TaxAuthorities.php?' . SID . '">' . _('Tax Authorities') . '</a>'; -echo '<br /><a href="' . $rootpath . '/TaxGroups.php?' . SID . '">' . _('Tax Groupings') . '</a>'; -echo '<br /><a href="' . $rootpath . '/TaxCategories.php?' . SID . '">' . _('Tax Categories') . '</a>'; -echo '<br /><a href="' . $rootpath . '/TaxProvinces.php?' . SID . '">' . _('Dispatch Tax Provinces') . '</a>'; +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 '</div>'; include( 'includes/footer.inc' ); Modified: trunk/includes/LanguagesArray.php =================================================================== --- trunk/includes/LanguagesArray.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/includes/LanguagesArray.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -1,32 +1,32 @@ -<?php -$LanguagesArray = array(); -$LanguagesArray['en_US.utf8'] = _('English US'); -$LanguagesArray['en_GB.utf8'] = _('English British'); -$LanguagesArray['cz_CZ.utf8'] = _('Czechoslovakian'); -$LanguagesArray['de_DE.utf8'] = _('German'); -$LanguagesArray['el_GR.utf8'] = _('Greek'); -$LanguagesArray['es_ES.utf8'] = _('Spanish'); -$LanguagesArray['et_EE.utf8'] = _('Estonian'); -$LanguagesArray['fa_IR.utf8'] = _('Arabic'); -$LanguagesArray['fr_FR.utf8'] = _('French'); -$LanguagesArray['hi_IN.utf8'] = _('Hindi'); -$LanguagesArray['hr_HR.utf8'] = _('H... [truncated message content] |
From: <dai...@us...> - 2011-07-05 10:27:34
|
Revision: 4623 http://web-erp.svn.sourceforge.net/web-erp/?rev=4623&view=rev Author: daintree Date: 2011-07-05 10:27:25 +0000 (Tue, 05 Jul 2011) Log Message: ----------- various Modified Paths: -------------- trunk/EDIProcessOrders.php trunk/EDISendInvoices.php trunk/EmailConfirmation.php trunk/EmailCustTrans.php trunk/ExchangeRateTrend.php trunk/Factors.php trunk/FixedAssetRegister.php trunk/PDFQuotation.php trunk/PDFQuotationPortrait.php trunk/ShipmentCosting.php trunk/TaxAuthorityRates.php trunk/includes/LanguagesArray.php trunk/includes/PDFQuotationPageHeader.inc trunk/includes/PDFQuotationPortraitPageHeader.inc trunk/includes/RFC822.php trunk/includes/tcpdf/tcpdf.php trunk/sql/mysql/upgrade4.04.4-4.04.5.sql Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/EDIProcessOrders.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -76,7 +76,7 @@ while ($LineText = fgets($fp) AND $TryNextFile != True){ /* get each line of the order file */ $LineText = StripTrailingComma($LineText); - echo "<br />".$LineText; + echo '<br />' . $LineText; if ($SegTag != mb_substr($LineText,0,3)){ $SegCounter=1; @@ -140,7 +140,7 @@ $Order->Comments .= "\n" . _('blanket order'); break; case '224': - $EmailText .= "\n\n" . _('This order is URGENT') . "</font>"; + $EmailText .= "\n\n" . _('This order is URGENT') . '</font>'; $Order->Comments .= "\n" . _('URGENT ORDER'); break; case '226': @@ -184,7 +184,7 @@ $EmailText .= "\n" . _('Customers order ref') . ': ' . $BGM_C106[0]; } if (isset($BGM_elements[2])){ - echo "<br />echo BGM_elements[2] " .$BGM_elements[2]; + echo '<br />echo BGM_elements[2] ' .$BGM_elements[2]; $BGM_1225 = explode(':',$BGM_elements[2]); $MsgFunction = $BGM_1225[0]; @@ -457,22 +457,23 @@ case 'SN': /*Store Number - get the branch details from the store number - snag here too cos need to ensure got the Customer detail first before try looking up its branches */ $BranchResult = DB_query("SELECT branchcode, - brname, - braddress1, - braddress2, - braddress3, - braddress4, - braddress5, - braddress6, - contactname, - defaultlocation, - phoneno, - email - FROM custbranch INNER JOIN debtorsmaster ON custbranch.debtorno = custbranch.debtorno WHERE custbranchcode='" . $NAD_C082[0] . "' AND custbranch.debtorno='" . $Order->DebtorNo . "' AND debtorsmaster.ediorders=1",$db); + brname, + braddress1, + braddress2, + braddress3, + braddress4, + braddress5, + braddress6, + contactname, + defaultlocation, + phoneno, + email + FROM custbranch INNER JOIN debtorsmaster ON custbranch.debtorno = custbranch.debtorno WHERE custbranchcode='" . $NAD_C082[0] . "' AND custbranch.debtorno='" . $Order->DebtorNo . "' AND debtorsmaster.ediorders=1",$db); if (DB_num_rows($BranchResult)!=1){ $EmailText .= "\n" . _('The Store number was specified as') . ' ' . $NAD_C082[0] . ' ' . _('Unfortunately there are either no branches of customer code') . ' ' . $Order->DebtorNo . ' ' ._('or several that match this store number') . '. ' . _('This order could not be processed further'); $TryNextFile = True; /* Look for other EDI msgs */ - $CreateOrder = False; /*Dont create order in system */ } else { + $CreateOrder = False; /*Dont create order in system */ + } else { $BranchRow = DB_fetch_array($BranchResult); $Order->BranchCode = $BranchRow['branchcode']; $Order->DeliverTo = $BranchRow['brname']; Modified: trunk/EDISendInvoices.php =================================================================== --- trunk/EDISendInvoices.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/EDISendInvoices.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -8,16 +8,16 @@ include('includes/htmlMimeMail.php'); // need for sending email attachments /*Get the Customers who are enabled for EDI invoicing */ -$sql = 'SELECT debtorno, - edireference, - editransport, - ediaddress, - ediserveruser, - ediserverpwd, - daysbeforedue, - dayinfollowingmonth - FROM debtorsmaster INNER JOIN paymentterms ON debtorsmaster.paymentterms=paymentterms.termsindicator - WHERE ediinvoices=1'; +$sql = "SELECT debtorno, + edireference, + editransport, + ediaddress, + ediserveruser, + ediserverpwd, + daysbeforedue, + dayinfollowingmonth + FROM debtorsmaster INNER JOIN paymentterms ON debtorsmaster.paymentterms=paymentterms.termsindicator + WHERE ediinvoices=1"; $EDIInvCusts = DB_query($sql,$db); @@ -30,29 +30,29 @@ /*Figure out if there are any unset invoices or credits for the customer */ $sql = "SELECT debtortrans.id, - transno, - type, - order_, - trandate, - ovgst, - ovamount, - ovfreight, - ovdiscount, - debtortrans.branchcode, - custbranchcode, - invtext, - shipvia, - rate, - brname, - braddress1, - braddress2, - braddress3, - braddress4 - FROM debtortrans INNER JOIN custbranch ON custbranch.debtorno = debtortrans.debtorno - AND custbranch.branchcode = debtortrans.branchcode - WHERE (type=10 or type=11) - AND edisent=0 - AND debtortrans.debtorno='" . $CustDetails['debtorno'] . "'"; + transno, + type, + order_, + trandate, + ovgst, + ovamount, + ovfreight, + ovdiscount, + debtortrans.branchcode, + custbranchcode, + invtext, + shipvia, + rate, + brname, + braddress1, + braddress2, + braddress3, + braddress4 + FROM debtortrans INNER JOIN custbranch ON custbranch.debtorno = debtortrans.debtorno + AND custbranch.branchcode = debtortrans.branchcode + WHERE (type=10 or type=11) + AND edisent=0 + AND debtortrans.debtorno='" . $CustDetails['debtorno'] . "'"; $ErrMsg = _('There was a problem retrieving the customer transactions because'); $TransHeaders = DB_query($sql,$db,$ErrMsg); @@ -135,34 +135,34 @@ if ($TransDetail['type']==10){ /*its an invoice */ $sql = "SELECT stockmoves.stockid, - stockmaster.description, - -stockmoves.qty as quantity, - stockmoves.discountpercent, - ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . "* -stockmoves.qty) AS fxnet, - (stockmoves.price * " . $ExchRate . ") AS fxprice, - stockmoves.taxrate, - stockmaster.units - FROM stockmoves, - stockmaster - WHERE stockmoves.stockid = stockmaster.stockid - AND stockmoves.type=10 - AND stockmoves.transno='" . $TransNo . "' - AND stockmoves.show_on_inv_crds=1"; + stockmaster.description, + -stockmoves.qty as quantity, + stockmoves.discountpercent, + ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . "* -stockmoves.qty) AS fxnet, + (stockmoves.price * " . $ExchRate . ") AS fxprice, + stockmoves.taxrate, + stockmaster.units + FROM stockmoves, + stockmaster + WHERE stockmoves.stockid = stockmaster.stockid + AND stockmoves.type=10 + AND stockmoves.transno='" . $TransNo . "' + AND stockmoves.show_on_inv_crds=1"; } else { /* credit note */ $sql = "SELECT stockmoves.stockid, - stockmaster.description, - stockmoves.qty as quantity, - stockmoves.discountpercent, - ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . " * stockmoves.qty) as fxnet, - (stockmoves.price * " . $ExchRate . ") AS fxprice, - stockmoves.taxrate, - stockmaster.units - FROM stockmoves, - stockmaster - WHERE stockmoves.stockid = stockmaster.stockid - AND stockmoves.type=11 and stockmoves.transno='" . $TransNo . "' - AND stockmoves.show_on_inv_crds=1"; + stockmaster.description, + stockmoves.qty as quantity, + stockmoves.discountpercent, + ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . " * stockmoves.qty) as fxnet, + (stockmoves.price * " . $ExchRate . ") AS fxprice, + stockmoves.taxrate, + stockmaster.units + FROM stockmoves, + stockmaster + WHERE stockmoves.stockid = stockmaster.stockid + AND stockmoves.type=11 and stockmoves.transno='" . $TransNo . "' + AND stockmoves.show_on_inv_crds=1"; } $TransLinesResult = DB_query($sql,$db); @@ -174,9 +174,9 @@ $StockID = $TransLines['StockID']; $sql = "SELECT partnerstockid FROM ediitemmapping - WHERE supporcust='CUST' - AND partnercode ='" . $CustDetails['debtorno'] . "' - AND stockid='" . $TransLines['stockid'] . "'"; + WHERE supporcust='CUST' + AND partnercode ='" . $CustDetails['debtorno'] . "' + AND stockid='" . $TransLines['stockid'] . "'"; $CustStkResult = DB_query($sql,$db); if (DB_num_rows($CustStkResult)==1){ Modified: trunk/EmailConfirmation.php =================================================================== --- trunk/EmailConfirmation.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/EmailConfirmation.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -1,108 +1,144 @@ <?php /* $Id$*/ -//$PageSecurity = 2; include('includes/session.inc'); 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?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; - include('includes/footer.inc'); - exit(); + $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"> + <ul> + <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> + <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> + </ul> + </td> + </tr> + </table> + </div> + <br /> + <br /> + <br />'; + include('includes/footer.inc'); + exit(); } -$MailTo = $_GET['EMail']; -$headers = 'From: Bethany Manufacturing <sa...@be...>' . '\n'; -$headers .= 'MIME-Version: 1.0\n' . 'Content-Type: text/html; charset="utf-8"\n'; +$MailTo = $_GET['EMail']; +$headers = 'From: Bethany Manufacturing <sa...@be...>' . '\n'; +$headers .= 'MIME-Version: 1.0\n' . 'Content-Type: text/html; charset="utf-8"\n'; /*retrieve the order details from the database to print */ $ErrMsg = _('There was a problem retrieving the order header details for Order Number') . ' ' . $_GET['TransNo'] . ' ' . _('from the database'); $sql = "SELECT salesorders.debtorno, - salesorders.customerref, - salesorders.comments, - salesorders.orddate, - salesorders.deliverto, - salesorders.deladd1, - salesorders.deladd2, - salesorders.deladd3, - salesorders.deladd4, - salesorders.deladd5, - salesorders.deladd6, - salesorders.deliverblind, - debtorsmaster.name, - debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, - debtorsmaster.address5, - debtorsmaster.address6, - shippers.shippername, - salesorders.printedpackingslip, - salesorders.datepackingslipprinted, - locations.locationname, - salesorders.deliverydate - FROM salesorders, - debtorsmaster, - shippers, - locations - WHERE salesorders.debtorno=debtorsmaster.debtorno - AND salesorders.shipvia=shippers.shipper_id - AND salesorders.fromstkloc=locations.loccode - AND salesorders.orderno=" . $_GET['TransNo']; + salesorders.customerref, + salesorders.comments, + salesorders.orddate, + salesorders.deliverto, + salesorders.deladd1, + salesorders.deladd2, + salesorders.deladd3, + salesorders.deladd4, + salesorders.deladd5, + salesorders.deladd6, + salesorders.deliverblind, + debtorsmaster.name, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + debtorsmaster.address5, + debtorsmaster.address6, + shippers.shippername, + salesorders.printedpackingslip, + salesorders.datepackingslipprinted, + locations.locationname, + salesorders.deliverydate + FROM salesorders, + debtorsmaster, + shippers, + locations + WHERE salesorders.debtorno=debtorsmaster.debtorno + AND salesorders.shipvia=shippers.shipper_id + AND salesorders.fromstkloc=locations.loccode + AND salesorders.orderno='" . $_GET['TransNo'] . "'"; $result=DB_query($sql,$db, $ErrMsg); //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?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('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"> + <ul> + <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> + <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> + </ul> + </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); - /* Place the deliver blind variable into a hold variable to used when - producing the packlist */ - $DeliverBlind = $myrow['deliverblind']; - $DeliveryDate = $myrow['salesorders.deliverydate']; - if ($myrow['printedpackingslip']==1 AND ($_GET['Reprint']!='OK' OR !isset($_GET['Reprint']))){ - $title = _('Print Packing Slip Error'); - include('includes/header.inc'); - echo '<p>'; - 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?' . SID . '&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?' . SID . '&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']; + $DeliveryDate = $myrow['salesorders.deliverydate']; + if ($myrow['printedpackingslip']==1 AND ($_GET['Reprint']!='OK' OR !isset($_GET['Reprint']))){ + $title = _('Print Packing Slip Error'); + include('includes/header.inc'); + 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><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></p>'; - 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?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('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"> + <ul> + <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> + <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> + </ul> + </td> + </tr> + </table> + </div> + <br /> + <br /> + <br />'; - include('includes/footer.inc'); - exit; - }//packing slip has been printed. - $MailSubject = "Order Confirmation-Sales Order " . $_GET['TransNo'] . " - Your PO " . - $myrow['customerref'] ; + include('includes/footer.inc'); + exit; + }//packing slip has been printed. + $MailSubject = _('Order Confirmation-Sales Order') . ' ' . $_GET['TransNo'] . ' - '. _('Your PO') . ' ' . $myrow['customerref'] ; } /*retrieve the order details from the database to print */ @@ -111,49 +147,52 @@ ) LETS GO */ -$MailMessage = "<html><head><title>Email Confirmation</title></head><body>" . - "<Table cellpadding='2' cellspacing='2'><tr>" . - "<td align='center' colspan='4'><H1>" . $_SESSION['CompanyRecord']['coyname'] . "</H1>" ; -$MailMessage = $MailMessage . "</td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $_SESSION['CompanyRecord']['regoffice1'] . "</td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $_SESSION['CompanyRecord']['regoffice4'] . ","; -$MailMessage = $MailMessage . "<b>" . - $_SESSION['CompanyRecord']['regoffice5'] . "</td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $_SESSION['CompanyRecord']['telephone'] . ' ' . _('Fax'). ': ' . - $_SESSION['CompanyRecord']['fax'] . "</td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $_SESSION['CompanyRecord']['email'] . "<br /><br /><br /></td></tr>"; -$MailMessage = $MailMessage . "<Table><tr><td align='center' colspan='4'> - <h2> Order Acknowledgement</h2></td></tr>"; -$MailMessage = $MailMessage . "<tr><td align='center' colspan='4'> <b>Order Number " . - $_GET['TransNo'] . "</b><br /><br /><br /></td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>Delivered To:</b></td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $myrow['deliverto'] . "</td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $myrow['deladd1'] . "</td></tr>"; -If(mb_strlen(trim($myrow['deladd2']))) -{ - $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd2'] . "</td></tr>"; - $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . - ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5']. "<br /><br /><br /></td></tr>"; +$MailMessage = '<html><head><title>' . _('Email Confirmation') . '</title></head> + <body> + <table cellpadding="2" cellspacing="2"> + <tr> + <td align="center" colspan="4"><h1>' . $_SESSION['CompanyRecord']['coyname'] . '</h1></td> + </tr> + <tr><td colspan="4"> <b>' . $_SESSION['CompanyRecord']['regoffice1'] . '</td> + </tr> + <tr><td colspan="4"> <b>' . $_SESSION['CompanyRecord']['regoffice4'] . ',<b>' . $_SESSION['CompanyRecord']['regoffice5'] . '</td> + </tr> + <tr><td colspan="4"> <b>' . $_SESSION['CompanyRecord']['telephone'] . ' ' . _('Fax'). ': ' . $_SESSION['CompanyRecord']['fax'] . '</td> + </tr> + <tr><td colspan="4"> <b>' . $_SESSION['CompanyRecord']['email'] . '<br /><br /><br /></td> + </tr> + </table> + <table> + <tr><td align="center" colspan="4"> + <h2>' . _('Order Acknowledgement') . '</h2></td> + </tr> + <tr><td align="center" colspan="4"> <b>' . _('Order Number') . ' ' . $_GET['TransNo'] . '</b><br /><br /><br /></td> + </tr> + <tr><td colspan="4"> <b>' . _('Delivered To') . ':</b></td> + </tr> + <tr><td colspan="4"> <b>' . $myrow['deliverto'] . '</td> + </tr> + <tr><td colspan="4"> <b>' . $myrow['deladd1'] . '</td> + </tr>'; + +if(mb_strlen(trim($myrow['deladd2']))) { + $MailMessage .= '<tr><td> <b>' . $myrow['deladd2'] . '</td></tr> + <tr><td> <b>' . $myrow['deladd3'] . ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5']. '<br /><br /><br /></td> + </tr>'; +} else { + $MailMessage .= '<tr><td> <b>' . $myrow['deladd3'] . ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5'] . '<br /><br /><br /></td> + </tr>'; } -else -{ - $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . ' ' . - $myrow['deladd4'] . ' ' . $myrow['deladd5'] . "<br /><br /><br /></td></tr>"; -} -$MailMessage = $MailMessage . "</table><table border='1' width='50%'><tr>"; +$MailMessage .= '</table> + <table border="1" width="50%"><tr>'; if($_REQUEST['POLine'] == 1){ - $MailMessage = $MailMessage . " <td>PO Line</td>"; + $MailMessage .= '<td>' . _('PO Line') . '</td>'; } - $MailMessage = $MailMessage . "<td>Stock Code</td> - <td>Description</td> - <td>Quantity Ordered</td> - <td>Due Date</td></tr>"; + $MailMessage .= '<td>' . _('Stock Code') . '</td> + <td>' . _('Description') . '</td> + <td>' . _('Quantity Ordered') . '</td> + <td>' . _('Due Date') . '</td> + </tr>'; $sql = "SELECT salesorderdetails.stkcode, @@ -181,33 +220,31 @@ $DscCode[$i] = $myrow2['description']; $QtyCode[$i] = $DisplayQty ; $POLine[$i] = $myrow2['poline']; - If($myrow2['itemdue'] =='') - { + if($myrow2['itemdue'] =='') { $ItemDue[$i] = date('M d, Y',strtotime($DeliveryDate)); - } - else - { + } else { $ItemDue[$i] = date('M d, Y',strtotime($myrow2['itemdue'])); } - $MailMessage = $MailMessage . "<tr>"; + $MailMessage .= '<tr>'; if($_REQUEST['POLine'] == 1){ - $MailMessage = $MailMessage . "<td align='right'>" . $POLine[$i] . "</td>"; + $MailMessage .= '<td align="right">' . $POLine[$i] . '</td>'; } - $MailMessage = $MailMessage . "<td>" . $myrow2['stkcode'] . - "</td><td>" . - $myrow2['description'] . "</td><td align='right'>" . - $DisplayQty . "</td><td align='center'>" . $ItemDue[$i] . - "</td></tr>"; + $MailMessage .= '<td>' . $myrow2['stkcode'] . '</td><td>' . $myrow2['description'] . '</td> + <td align="right">' . $DisplayQty . '</td> + <td align="center">' . $ItemDue[$i] . '</td> + </tr>'; $i = $i + 1; } //end while there are line items to print out } /*end if there are order details to show on the order*/ -$MailMessage = $MailMessage . "</Table></body></html>"; +$MailMessage .= '</table> + </body> + </html>'; // echo $MailMessage . "=mailMessage<br />"; IF(mail( $MailTo, $MailSubject, $MailMessage, $headers )){ - echo " The following E-Mail was sent to $MailTo:"; + echo ' ' ._('The following E-Mail was sent to') . ' ' . $MailTo . ' :'; } ?> <html> Modified: trunk/EmailCustTrans.php =================================================================== --- trunk/EmailCustTrans.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/EmailCustTrans.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -47,8 +47,8 @@ FROM custbranch INNER JOIN debtortrans ON custbranch.debtorno= debtortrans.debtorno AND custbranch.branchcode=debtortrans.branchcode - WHERE debtortrans.type='" . $TypeCode . "' - AND debtortrans.transno='" .$_GET['FromTransNo'] . "'"; + WHERE debtortrans.type='" . $TypeCode . "' + AND debtortrans.transno='" .$_GET['FromTransNo'] . "'"; $ErrMsg = _('There was a problem retrieving the contact details for the customer'); $ContactResult=DB_query($SQL,$db,$ErrMsg); Modified: trunk/ExchangeRateTrend.php =================================================================== --- trunk/ExchangeRateTrend.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/ExchangeRateTrend.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -1,9 +1,7 @@ <?php -/* $Revision: 1.3 $ */ + /* $Id$*/ -//$PageSecurity = 2; - include('includes/session.inc'); $title = _('View Currency Trends'); @@ -29,33 +27,30 @@ _('View Currency Trend') . '" alt="" />' . ' ' . _('View Currency Trend') . '</p>'; echo '<table>'; // First column - $SQL = 'SELECT * FROM currencies'; + $SQL = "SELECT * FROM currencies"; $result=DB_query($SQL,$db); // CurrencyToShow Currency Picker echo '<tr><td><select name="CurrencyToShow" onChange="ReloadForm(update.submit)">'; - DB_data_seek($result,0); - while ($myrow=DB_fetch_array($result)) { - if ($myrow['currabrev']!=$_SESSION['CompanyRecord']['currencydefault']){ - if ( $CurrencyToShow==$myrow['currabrev'] ) { - echo '<option selected value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>'; - } else { - echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>'; - } + DB_data_seek($result,0); + while ($myrow=DB_fetch_array($result)) { + if ($myrow['currabrev']!=$_SESSION['CompanyRecord']['currencydefault']){ + if ( $CurrencyToShow==$myrow['currabrev'] ) { + echo '<option selected value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>'; + } else { + echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>'; } } - echo '</select></td></tr>'; + } + echo '</select></td></tr>'; echo '</table>'; /*close off the table in the third column */ - - echo '<p><div class="centre"><input type=submit name=submit VALUE="' . _('Accept') . '"></div>'; + echo '<p><div class="centre"><input type=submit name=submit value="' . _('Accept') . '"></div>'; echo '</form>'; - - // ************** // SHOW OUR GRAPH // ************** @@ -66,7 +61,7 @@ echo '<p></div><table class=selection>'; echo '<tr><th><div class="centre"><font size=4 color=BLUE><b><U>' . $FunctionalCurrency . ' / ' . $CurrencyToShow . '</b></U></font></th></tr>'; - echo '<tr><td><img src=' . $image . ' alt="Trend Currently Unavailable"></td></tr>'; + echo '<tr><td><img src=' . $image . ' alt="' ._('Trend Currently Unavailable') . '"></td></tr>'; echo '</table>'; Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/Factors.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -151,19 +151,19 @@ if (isset($FactorID) and isset($_POST['Amend'])) { $sql = "SELECT id, - coyname, - address1, - address2, - address3, - address4, - address5, - address6, - contact, - telephone, - fax, - email - FROM factorcompanies - WHERE id = '".$FactorID."'"; + coyname, + address1, + address2, + address3, + address4, + address5, + address6, + contact, + telephone, + fax, + email + FROM factorcompanies + WHERE id = '".$FactorID."'"; $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); @@ -208,7 +208,6 @@ <td><input tabindex=2 type="text" name="Address1" size=42 maxlength=40 value="' . $_POST['Address1'] .'"></td></tr>'; echo '<tr><td>' . _('Address Line 2') . ':</td> <td><input tabindex=3 type="text" name="Address2" size=42 maxlength=40 value="' . $_POST['Address2'] .'"></td></tr>'; - echo '<tr><td>' . _('Address Line 3') . ':</td> <td><input tabindex=4 type="text" name="Address3" size=42 maxlength=40 value="' .$_POST['Address3'] .'"></td></tr>'; echo '<tr><td>' . _('Address Line 4') . ':</td> @@ -248,32 +247,34 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="New" value="No">'; - echo '<table class=selection><tr> - <th>' . _('ID') . '</th> - <th>' . _('Company Name').'</th> - <th>' . _('Address 1').'</th> - <th>' . _('Address 2').'</th> - <th>' . _('Address 3').'</th> - <th>' . _('Address 4').'</th> - <th>' . _('Address 5').'</th> - <th>' . _('Address 6').'</th> - <th>' . _('Contact').'</th> - <th>' . _('Telephone').'</th> - <th>' . _('Fax Number').'</th> - <th>' . _('Email').'</th></tr>'; + echo '<table class=selection> + <tr> + <th>' . _('ID') . '</th> + <th>' . _('Company Name').'</th> + <th>' . _('Address 1').'</th> + <th>' . _('Address 2').'</th> + <th>' . _('Address 3').'</th> + <th>' . _('Address 4').'</th> + <th>' . _('Address 5').'</th> + <th>' . _('Address 6').'</th> + <th>' . _('Contact').'</th> + <th>' . _('Telephone').'</th> + <th>' . _('Fax Number').'</th> + <th>' . _('Email').'</th> + </tr>'; $sql = "SELECT id, - coyname, - address1, - address2, - address3, - address4, - address5, - address6, - contact, - telephone, - fax, - email - FROM factorcompanies"; + coyname, + address1, + address2, + address3, + address4, + address5, + address6, + contact, + telephone, + fax, + email + FROM factorcompanies"; $result=DB_query($sql, $db); $j=1; while ($myrow = DB_fetch_array($result)) { @@ -307,6 +308,5 @@ } - include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/FixedAssetRegister.php =================================================================== --- trunk/FixedAssetRegister.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/FixedAssetRegister.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -1,5 +1,5 @@ <?php -//$PageSecurity = 11; + include ('includes/session.inc'); $title = _('Fixed Asset Register'); $csv_output = ''; @@ -15,36 +15,36 @@ $DateFrom = FormatDateForSQL($_POST['FromDate']); $DateTo = FormatDateForSQL($_POST['ToDate']); $sql = "SELECT fixedassets.assetid, - fixedassets.description, - fixedassets.longdescription, - fixedassets.assetcategoryid, - fixedassets.serialno, - fixedassetlocations.locationdescription, - fixedassets.datepurchased, - fixedassetlocations.parentlocationid, - fixedassets.assetlocation, - fixedassets.disposaldate, - SUM(CASE WHEN (fixedassettrans.transdate <'" . $DateFrom . "' AND fixedassettrans.fixedassettranstype='cost') THEN fixedassettrans.amount ELSE 0 END) AS costbfwd, - SUM(CASE WHEN (fixedassettrans.transdate <'" . $DateFrom . "' AND fixedassettrans.fixedassettranstype='depn') THEN fixedassettrans.amount ELSE 0 END) AS depnbfwd, - SUM(CASE WHEN (fixedassettrans.transdate >='" . $DateFrom ."' AND fixedassettrans.transdate <='" . $DateTo . "' AND fixedassettrans.fixedassettranstype='cost') THEN fixedassettrans.amount ELSE 0 END) AS periodadditions, - SUM(CASE WHEN fixedassettrans.transdate >='" . $DateFrom . "' AND fixedassettrans.transdate <='" . $DateTo . "' AND fixedassettrans.fixedassettranstype='depn' THEN fixedassettrans.amount ELSE 0 END) AS perioddepn, - SUM(CASE WHEN fixedassettrans.transdate >='" . $DateFrom . "' AND fixedassettrans.transdate <='" . $DateTo . "' AND fixedassettrans.fixedassettranstype='disposal' THEN fixedassettrans.amount ELSE 0 END) AS perioddisposal - FROM fixedassets - INNER JOIN fixedassetcategories ON fixedassets.assetcategoryid=fixedassetcategories.categoryid - INNER JOIN fixedassetlocations ON fixedassets.assetlocation=fixedassetlocations.locationid - INNER JOIN fixedassettrans ON fixedassets.assetid=fixedassettrans.assetid - WHERE fixedassets.assetcategoryid " . LIKE . "'" . $_POST['AssetCategory'] . "' - AND fixedassets.assetid " . LIKE . "'" . $_POST['AssetID'] . "' - AND fixedassets.assetlocation " . LIKE . "'" . $_POST['AssetLocation'] . "' - GROUP BY fixedassets.assetid, - fixedassets.description, - fixedassets.longdescription, - fixedassets.assetcategoryid, - fixedassets.serialno, - fixedassetlocations.locationdescription, - fixedassets.datepurchased, - fixedassetlocations.parentlocationid, - fixedassets.assetlocation"; + fixedassets.description, + fixedassets.longdescription, + fixedassets.assetcategoryid, + fixedassets.serialno, + fixedassetlocations.locationdescription, + fixedassets.datepurchased, + fixedassetlocations.parentlocationid, + fixedassets.assetlocation, + fixedassets.disposaldate, + SUM(CASE WHEN (fixedassettrans.transdate <'" . $DateFrom . "' AND fixedassettrans.fixedassettranstype='cost') THEN fixedassettrans.amount ELSE 0 END) AS costbfwd, + SUM(CASE WHEN (fixedassettrans.transdate <'" . $DateFrom . "' AND fixedassettrans.fixedassettranstype='depn') THEN fixedassettrans.amount ELSE 0 END) AS depnbfwd, + SUM(CASE WHEN (fixedassettrans.transdate >='" . $DateFrom ."' AND fixedassettrans.transdate <='" . $DateTo . "' AND fixedassettrans.fixedassettranstype='cost') THEN fixedassettrans.amount ELSE 0 END) AS periodadditions, + SUM(CASE WHEN fixedassettrans.transdate >='" . $DateFrom . "' AND fixedassettrans.transdate <='" . $DateTo . "' AND fixedassettrans.fixedassettranstype='depn' THEN fixedassettrans.amount ELSE 0 END) AS perioddepn, + SUM(CASE WHEN fixedassettrans.transdate >='" . $DateFrom . "' AND fixedassettrans.transdate <='" . $DateTo . "' AND fixedassettrans.fixedassettranstype='disposal' THEN fixedassettrans.amount ELSE 0 END) AS perioddisposal + FROM fixedassets + INNER JOIN fixedassetcategories ON fixedassets.assetcategoryid=fixedassetcategories.categoryid + INNER JOIN fixedassetlocations ON fixedassets.assetlocation=fixedassetlocations.locationid + INNER JOIN fixedassettrans ON fixedassets.assetid=fixedassettrans.assetid + WHERE fixedassets.assetcategoryid " . LIKE . "'" . $_POST['AssetCategory'] . "' + AND fixedassets.assetid " . LIKE . "'" . $_POST['AssetID'] . "' + AND fixedassets.assetlocation " . LIKE . "'" . $_POST['AssetLocation'] . "' + GROUP BY fixedassets.assetid, + fixedassets.description, + fixedassets.longdescription, + fixedassets.assetcategoryid, + fixedassets.serialno, + fixedassetlocations.locationdescription, + fixedassets.datepurchased, + fixedassetlocations.parentlocationid, + fixedassets.assetlocation"; $result = DB_query($sql, $db); if (isset($_POST['pdf'])) { $FontSize = 10; @@ -116,8 +116,7 @@ $Ancestors[$i] = $ParentRow['locationdescription']; } */ - if (Date1GreaterThanDate2(ConvertSQLDate($myrow['disposaldate']),$_POST['FromDate']) - OR $myrow['disposaldate']='0000-00-00'){ + if (Date1GreaterThanDate2(ConvertSQLDate($myrow['disposaldate']),$_POST['FromDate']) OR $myrow['disposaldate']='0000-00-00') { if ($myrow['disposaldate']!='0000-00-00' AND Date1GreaterThanDate2($_POST['ToDate'], ConvertSQLDate($myrow['disposaldate']))){ /*The asset was disposed during the period */ @@ -221,14 +220,14 @@ echo '<input type=hidden name=AssetLocation value=' . $_POST['AssetLocation'] . '>'; //Total Values echo '<tr><th style="vertical-align:top" colspan="5">' . _('TOTAL') . '</th>'; - echo '<th style="text-align:right">' . number_format($TotalCostBfwd, 2) . '</th>'; - echo '<th style="text-align:right">' . number_format($TotalDepnBfwd, 2) . '</th>'; - echo '<th style="text-align:right">' . number_format($TotalAdditions, 2) . '</th>'; - echo '<th style="text-align:right">' . number_format($TotalDepn, 2) . '</th>'; - echo '<th style="text-align:right">' . number_format($TotalCostCfwd, 2) . '</th>'; - echo '<th style="text-align:right">' . number_format($TotalDepnCfwd, 2) . '</th>'; - echo '<th style="text-align:right">' . number_format($TotalNBV, 2) . '</th>'; - echo '<th style="text-align:right">' . number_format($TotalDisposals, 2) . '</th></tr>'; + echo '<th style="text-align:right">' . number_format($TotalCostBfwd, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>'; + echo '<th style="text-align:right">' . number_format($TotalDepnBfwd, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>'; + echo '<th style="text-align:right">' . number_format($TotalAdditions, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>'; + echo '<th style="text-align:right">' . number_format($TotalDepn, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>'; + echo '<th style="text-align:right">' . number_format($TotalCostCfwd, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>'; + echo '<th style="text-align:right">' . number_format($TotalDepnCfwd, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>'; + echo '<th style="text-align:right">' . number_format($TotalNBV, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>'; + echo '<th style="text-align:right">' . number_format($TotalDisposals, $_SESSION['CompanyRecord']['decimalplaces']) . '</th></tr>'; echo '</table>'; echo '<br /><div class="centre"><input type="Submit" name="pdf" value="' . _('Print as a pdf') . '"> '; echo '<input type="Submit" name="csv" value="' . _('Print as CSV') . '"></div></form>'; @@ -238,7 +237,7 @@ echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title; $result = DB_query('SELECT categoryid,categorydescription FROM fixedassetcategories', $db); - echo '<form name="RegisterForm" method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '"><table class="selection">'; + echo '<form name="RegisterForm" method="post" action="' . $_SERVER['PHP_SELF'] . '"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><th>' . _('Asset Category') . '</th>'; echo '<td><select name=AssetCategory>'; @@ -251,7 +250,7 @@ } } echo '</select></td></tr>'; - $sql = 'SELECT locationid, locationdescription FROM fixedassetlocations'; + $sql = "SELECT locationid, locationdescription FROM fixedassetlocations"; $result = DB_query($sql, $db); echo '<tr><th>' . _('Asset Location') . '</th>'; echo '<td><select name=AssetLocation>'; @@ -264,7 +263,7 @@ } } echo '</select></td></tr>'; - $sql = 'SELECT assetid, description FROM fixedassets'; + $sql = "SELECT assetid, description FROM fixedassets"; $result = DB_query($sql, $db); echo '<tr><th>' . _('Asset') . '</th>'; echo '<td><select name="AssetID">'; @@ -278,18 +277,19 @@ } echo '</select></td></tr>'; if (empty($_POST['FromDate'])) { - $_POST['FromDate'] = date($_SESSION['DefaultDateFormat'], mktime(0, 0, 0, date("m"), date("d"), date("Y") - 1)); + $_POST['FromDate'] = date($_SESSION['DefaultDateFormat'], mktime(0, 0, 0, date('m'), date('d'), date('Y') - 1)); } if (empty($_POST['ToDate'])) { $_POST['ToDate'] = date($_SESSION['DefaultDateFormat']); } - echo '<tr><th>' . _(' From Date') . "</th><td><input type='text' class='date' alt='" . $_SESSION['DefaultDateFormat'] . "' name='FromDate' maxlength=10 size=11 value='" . $_POST['FromDate'] . "'></td>"; + echo '<tr><th>' . _(' From Date') . '</th><td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" maxlength=10 size=11 value="' . $_POST['FromDate'] . '"></td>'; echo '</tr>'; - echo '<tr><th>' . _('To Date ') . "</th><td><input type='text' class='date' alt='" . $_SESSION['DefaultDateFormat'] . "' name='ToDate' maxlength=10 size=11 value='" . $_POST['ToDate'] . "'></td>"; - echo '</tr>'; - - echo '</table><br />'; + echo '<tr><th>' . _('To Date ') . '</th><td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength="10" size="11" value="' . $_POST['ToDate'] . '"></td> + </tr> + </table> + <br />'; + echo '<div class="centre"><input type="Submit" name="submit" value="' . _('Show Assets') . '"> '; echo '<input type="Submit" name="pdf" value="' . _('Print as a pdf') . '"> '; echo '<input type="Submit" name = "csv" value= "' . _('Print as CSV') . '"></div>'; Modified: trunk/PDFQuotation.php =================================================================== --- trunk/PDFQuotation.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/PDFQuotation.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -22,37 +22,37 @@ $ErrMsg = _('There was a problem retrieving the quotation header details for Order Number') . ' ' . $_GET['QuotationNo'] . ' ' . _('from the database'); $sql = "SELECT salesorders.customerref, - salesorders.comments, - salesorders.orddate, - salesorders.deliverto, - salesorders.deladd1, - salesorders.deladd2, - salesorders.deladd3, - salesorders.deladd4, - salesorders.deladd5, - salesorders.deladd6, - debtorsmaster.name, - debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, - debtorsmaster.address5, - debtorsmaster.address6, - shippers.shippername, - salesorders.printedpackingslip, - salesorders.datepackingslipprinted, - salesorders.branchcode, - locations.taxprovinceid, - locations.locationname - FROM salesorders, - debtorsmaster, - shippers, - locations - WHERE salesorders.debtorno=debtorsmaster.debtorno - AND salesorders.shipvia=shippers.shipper_id - AND salesorders.fromstkloc=locations.loccode - AND salesorders.quotation=1 - AND salesorders.orderno='" . $_GET['QuotationNo'] ."'"; + salesorders.comments, + salesorders.orddate, + salesorders.deliverto, + salesorders.deladd1, + salesorders.deladd2, + salesorders.deladd3, + salesorders.deladd4, + salesorders.deladd5, + salesorders.deladd6, + debtorsmaster.name, + debtorsmaster.currcode, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + debtorsmaster.address5, + debtorsmaster.address6, + shippers.shippername, + salesorders.printedpackingslip, + salesorders.datepackingslipprinted, + salesorders.branchcode, + locations.taxprovinceid, + locations.locationname + FROM salesorders INNER JOIN debtorsmaster + ON salesorders.debtorno=debtorsmaster.debtorno + INNER JOIN shippers + ON salesorders.shipvia=shippers.shipper_id + INNER JOIN locations + ON salesorders.fromstkloc=locations.loccode + WHERE salesorders.quotation=1 + AND salesorders.orderno='" . $_GET['QuotationNo'] ."'"; $result=DB_query($sql,$db, $ErrMsg); @@ -62,9 +62,20 @@ 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?'. SID .'&Quotations=Quotes_Only">' . _('Outstanding Quotations') . '</a></li> - </td></tr></table></div><br /><br /><br />'; + echo '<br /> + <br /> + <br /> + <table class="table_index"> + <tr> + <td class="menu_group_item"> + <ul><li><a href="'. $rootpath . '/SelectSalesOrder.php?Quotations=Quotes_Only">' . _('Outstanding Quotations') . '</a></li></ul> + </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! */ @@ -105,7 +116,7 @@ $result=DB_query($sql,$db, $ErrMsg); -$ListCount = 0; // UldisN +$ListCount = 0; if (DB_num_rows($result)>0){ /*Yes there are line items to start the ball rolling with a page header */ @@ -136,13 +147,19 @@ $TaxProv = $myrow['taxprovinceid']; $TaxCat = $myrow2['taxcatid']; $Branch = $myrow['branchcode']; - $sql3 = " select taxgrouptaxes.taxauthid from taxgrouptaxes INNER JOIN custbranch ON taxgrouptaxes.taxgroupid=custbranch.taxgroupid WHERE custbranch.branchcode='" .$Branch ."'"; + $sql3 = "SELECT taxgrouptaxes.taxauthid + FROM taxgrouptaxes INNER JOIN custbranch + ON taxgrouptaxes.taxgroupid=custbranch.taxgroupid + WHERE custbranch.branchcode='" .$Branch ."'"; $result3=DB_query($sql3,$db, $ErrMsg); while ($myrow3=DB_fetch_array($result3)){ $TaxAuth = $myrow3['taxauthid']; } - $sql4 = "SELECT * FROM taxauthrates WHERE dispatchtaxprovince='" .$TaxProv ."' AND taxcatid='" .$TaxCat ."' AND taxauthority='" .$TaxAuth ."'"; + $sql4 = "SELECT * FROM taxauthrates + WHERE dispatchtaxprovince='" .$TaxProv ."' + AND taxcatid='" .$TaxCat ."' + AND taxauthority='" .$TaxAuth ."'"; $result4=DB_query($sql4,$db, $ErrMsg); while ($myrow4=DB_fetch_array($result4)){ $TaxClass = 100 * $myrow4['taxrate']; @@ -227,9 +244,9 @@ if ($ListCount == 0){ $title = _('Print Quotation Error'); include('includes/header.inc'); - echo '<p>'. _('There were no items on the quotation') . '. ' . _('The quotation cannot be printed'). - '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?' . SID . '&Quotation=Quotes_only">'. _('Print Another Quotation'). - '</a>' . '<br />'. '<a href="' . $rootpath . '/index.php?' . SID . '">' . _('Back to the menu') . '</a>'; + prnMsg(_('There were no items on the quotation') . '. ' . _('The quotation cannot be printed'),'info'); + echo '<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'); exit; } else { Modified: trunk/PDFQuotationPortrait.php =================================================================== --- trunk/PDFQuotationPortrait.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/PDFQuotationPortrait.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -9,11 +9,26 @@ If (!isset($_GET['QuotationNo']) || $_GET['QuotationNo']==""){ $title = _('Select Quotation To Print'); include('includes/header.inc'); - echo '<div class="centre"><br /><br /><br />'; + 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?'. SID .'&Quotations=Quotes_Only">' . _('Quotations') . '</a></li> - </td></tr></table></div><br /><br /><br />'; + echo '<br /> + <br /> + <br /> + <table class="table_index"> + <tr> + <td class="menu_group_item"> + <ul><li><a href="'. $rootpath . '/SelectSalesOrder.php?Quotations=Quotes_Only">' . _('Quotations') . '</a></li> + </ul> + </td> + </tr> + </table> + </div> + <br /> + <br /> + <br />'; include('includes/footer.inc'); exit(); } @@ -22,37 +37,37 @@ $ErrMsg = _('There was a problem retrieving the quotation header details for Order Number') . ' ' . $_GET['QuotationNo'] . ' ' . _('from the database'); $sql = "SELECT salesorders.customerref, - salesorders.comments, - salesorders.orddate, - salesorders.deliverto, - salesorders.deladd1, - salesorders.deladd2, - salesorders.deladd3, - salesorders.deladd4, - salesorders.deladd5, - salesorders.deladd6, - debtorsmaster.name, - debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, - debtorsmaster.address5, - debtorsmaster.address6, - shippers.shippername, - salesorders.printedpackingslip, - salesorders.datepackingslipprinted, - salesorders.branchcode, - locations.taxprovinceid, - locations.locationname - FROM salesorders, - debtorsmaster, - shippers, - locations - WHERE salesorders.debtorno=debtorsmaster.debtorno - AND salesorders.shipvia=shippers.shipper_id - AND salesorders.fromstkloc=locations.loccode - AND salesorders.quotation=1 - AND salesorders.orderno='" . $_GET['QuotationNo'] ."'"; + salesorders.comments, + salesorders.orddate, + salesorders.deliverto, + salesorders.deladd1, + salesorders.deladd2, + salesorders.deladd3, + salesorders.deladd4, + salesorders.deladd5, + salesorders.deladd6, + debtorsmaster.name, + debtorsmaster.currcode, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + debtorsmaster.address5, + debtorsmaster.address6, + shippers.shippername, + salesorders.printedpackingslip, + salesorders.datepackingslipprinted, + salesorders.branchcode, + locations.taxprovinceid, + locations.locationname + FROM salesorders INNER JOIN debtorsmaster + ON salesorders.debtorno=debtorsmaster.debtorno + INNER JOIN shippers + ON salesorders.shipvia=shippers.shipper_id + INNER JOIN locations + ON salesorders.fromstkloc=locations.loccode + WHERE salesorders.quotation=1 + AND salesorders.orderno='" . $_GET['QuotationNo'] ."'"; $result=DB_query($sql,$db, $ErrMsg); @@ -60,11 +75,25 @@ if (DB_num_rows($result)==0){ $title = _('Print Quotation Error'); include('includes/header.inc'); - echo '<div class="centre"><br /><br /><br />'; + 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?'. SID .'&Quotations=Quotes_Only">' . _('Outstanding Quotations') . '</a></li> - </td></tr></table></div><br /><br /><br />'; + echo '<br /> + <br /> + <br /> + <table class="table_index"> + <tr> + <td class="menu_group_item"> + <ul><li><a href="'. $rootpath . '/SelectSalesOrder.php?Quotations=Quotes_Only">' . _('Outstanding Quotations') . '</a></li></ul> + </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! */ Modified: trunk/ShipmentCosting.php =================================================================== --- trunk/ShipmentCosting.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/ShipmentCosting.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -624,8 +624,8 @@ if ($_SESSION['WeightedAverageCosting']==0){ /* We are standard costing - so show the option to update costs - under W. Avg cost updates are implicit */ echo _('Update Standard Costs') .':<select name="UpdateCost"> - <option selected VALUE="Yes">'. _('Yes') . '</option> - <option VALUE="No">'. _('No') . '</option> + <option selected value="Yes">'. _('Yes') . '</option> + <option value="No">'. _('No') . '</option> </select>'; } echo '<br /><br /><input type=submit name="Close" VALUE="'. _('Confirm OK to Close'). '">'; Modified: trunk/TaxAuthorityRates.php =================================================================== --- trunk/TaxAuthorityRates.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/TaxAuthorityRates.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -1,8 +1,6 @@ <?php /* $Id$*/ -//$PageSecurity = 11; // only allow accountant access - if (isset($_POST['TaxAuthority'])){ $TaxAuthority = $_POST['TaxAuthority']; } @@ -17,10 +15,9 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Supplier Types') . '" alt="" />' . $title. '</p>'; -/* <-- $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 /><a href="' . $rootpath . '/TaxAuthorities.php">' . _('click here') . '</a> ' . _('to go to the Tax Authority page'),'error'); include ('includes/footer.inc'); exit; } @@ -29,11 +26,11 @@ if (isset($_POST['UpdateRates'])){ $TaxRatesResult = DB_query("SELECT taxauthrates.taxcatid, - taxauthrates.taxrate, - taxauthrates.dispatchtaxprovince - FROM taxauthrates - WHERE taxauthrates.taxauthority='" . $TaxAuthority . "'", - $db); + taxauthrates.taxrate, + taxauthrates.dispatchtaxprovince + FROM taxauthrates + WHERE taxauthrates.taxauthority='" . $TaxAuthority . "'", + $db); while ($myrow=DB_fetch_array($TaxRatesResult)){ @@ -55,34 +52,35 @@ $TaxAuthDetail = DB_query("SELECT description FROM taxauthorities WHERE taxid='" . $TaxAuthority . "'",$db); $myrow = DB_fetch_row($TaxAuthDetail); -echo '<form action="' . $_SERVER['PHP_SELF'] . '?' . SID .'" method=post>'; +echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<input type=hidden name="TaxAuthority" VALUE=' . $TaxAuthority . '>'; +echo '<input type=hidden name="TaxAuthority" value="' . $TaxAuthority . '">'; $TaxRatesResult = DB_query("SELECT taxauthrates.taxcatid, - taxcategories.taxcatname, - taxauthrates.taxrate, - taxauthrates.dispatchtaxprovince, - taxprovinces.taxprovincename - FROM taxauthrates INNER JOIN taxauthorities - ON taxauthrates.taxauthority=taxauthorities.taxid - INNER JOIN taxprovinces - ON taxauthrates.dispatchtaxprovince= taxprovinces.taxprovinceid - INNER JOIN taxcategories - ON taxauthrates.taxcatid=taxcategories.taxcatid - WHERE taxauthrates.taxauthority='" . $TaxAuthority . "' - ORDER BY taxauthrates.dispatchtaxprovince, - taxauthrates.taxcatid", - $db); + taxcategories.taxcatname, + taxauthrates.taxrate, + taxauthrates.dispatchtaxprovince, + taxprovinces.taxprovincename + FROM taxauthrates INNER JOIN taxauthorities + ON taxauthrates.taxauthority=taxauthorities.taxid + INNER JOIN taxprovinces + ON taxauthrates.dispatchtaxprovince= taxprovinces.taxprovinceid + INNER JOIN taxcategories + ON taxauthrates.taxcatid=taxcategories.taxcatid + WHERE taxauthrates.taxauthority='" . $TaxAuthority . "' + ORDER BY taxauthrates.dispatchtaxprovince, + taxauthrates.taxcatid", + $db); if (DB_num_rows($TaxRatesResult)>0){ - echo '<table cellpadding=2 class=selection>'; + echo '<table cellpadding=2 class="selection">'; echo '<tr><th colspan=3><font size=3 color=navy>' . _('Update') . ' ' . $myrow[0] . ' ' . _('Rates') . '</font></th></tr>'; $TableHeader = '<tr><th>' . _('Deliveries From') . '<br />' . _('Tax Province') . '</th> <th>' . _('Tax Category') . '</th> - <th>' . _('Tax Rate') . ' %</th></tr>'; + <th>' . _('Tax Rate') . ' %</th> + </tr>'; echo $TableHeader; $j = 1; $k = 0; //row counter to determine background colour @@ -104,7 +102,7 @@ printf('<td>%s</td> <td>%s</td> - <td><input type=text class="number" name=%s maxlength=5 size=5 value=%s></td> + <td><input type="text" class="number" name=%s maxlength=5 size=5 value=%s></td> </tr>', $myrow['taxprovincename'], $myrow['taxcatname'], @@ -116,7 +114,9 @@ } //end of while loop echo '</table>'; -echo "<br /><div class='centre'><input type=submit name='UpdateRates' VALUE='" . _('Update Rates') . "'>"; +echo '<br /> + <div class="centre"> + <input type=submit name="UpdateRates" VALUE="' . _('Update Rates') . '">'; } //end if tax taxcatid/rates to show else { prnMsg(_('There are no tax rates to show - perhaps the dispatch tax province records have not yet been created?'),'warn'); @@ -124,10 +124,10 @@ echo '</form>'; -echo '<br /><br /><a href="' . $rootpath . '/TaxAuthorities.php?' . SID . '">' . _('Tax Authorities') . '</a>'; -echo '<br /><a href="' . $rootpath . '/TaxGroups.php?' . SID . '">' . _('Tax Groupings') . '</a>'; -echo '<br /><a href="' . $rootpath . '/TaxCategories.php?' . SID . '">' . _('Tax Categories') . '</a>'; -echo '<br /><a href="' . $rootpath . '/TaxProvinces.php?' . SID . '">' . _('Dispatch Tax Provinces') . '</a>'; +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 '</div>'; include( 'includes/footer.inc' ); Modified: trunk/includes/LanguagesArray.php =================================================================== --- trunk/includes/LanguagesArray.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/includes/LanguagesArray.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -1,32 +1,32 @@ -<?php -$LanguagesArray = array(); -$LanguagesArray['en_US.utf8'] = _('English US'); -$LanguagesArray['en_GB.utf8'] = _('English British'); -$LanguagesArray['cz_CZ.utf8'] = _('Czechoslovakian'); -$LanguagesArray['de_DE.utf8'] = _('German'); -$LanguagesArray['el_GR.utf8'] = _('Greek'); -$LanguagesArray['es_ES.utf8'] = _('Spanish'); -$LanguagesArray['et_EE.utf8'] = _('Estonian'); -$LanguagesArray['fa_IR.utf8'] = _('Arabic'); -$LanguagesArray['fr_FR.utf8'] = _('French'); -$LanguagesArray['hi_IN.utf8'] = _('Hindi'); -$LanguagesArray['hr_HR.utf8'] = _('H... [truncated message content] |
From: <dai...@us...> - 2011-07-03 04:33:29
|
Revision: 4622 http://web-erp.svn.sourceforge.net/web-erp/?rev=4622&view=rev Author: daintree Date: 2011-07-03 04:33:19 +0000 (Sun, 03 Jul 2011) Log Message: ----------- strtoupper to mb_strtoupper Modified Paths: -------------- trunk/AccountGroups.php trunk/Areas.php trunk/BOMExtendedQty.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/BOMInquiry.php trunk/Contracts.php trunk/CounterSales.php trunk/Currencies.php trunk/CustomerBranches.php trunk/CustomerTypes.php trunk/Customers.php trunk/DiscountCategories.php trunk/Factors.php trunk/FixedAssetCategories.php trunk/FixedAssetDepreciation.php trunk/FixedAssetItems.php trunk/GetStockImage.php trunk/Locations.php trunk/MRPCalendar.php trunk/MRPDemandTypes.php trunk/MRPDemands.php trunk/MRPReport.php trunk/Numbers/Words/lang.dk.php trunk/Numbers/Words/lang.en_GB.php trunk/Numbers/Words/lang.en_US.php trunk/Numbers/Words/lang.es_AR.php trunk/Numbers/Words/lang.he.php trunk/Numbers/Words/lang.hu_HU.php trunk/Numbers/Words/lang.pl.php trunk/Numbers/Words/lang.pt_BR.php trunk/Numbers/Words/lang.ru.php trunk/POReport.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/PrintCustStatements.php trunk/PurchData.php trunk/SalesCategories.php trunk/SalesInquiry.php trunk/SalesPeople.php trunk/SalesTypes.php trunk/SelectAsset.php trunk/SelectCustomer.php trunk/SelectOrderItems.php trunk/SelectProduct.php trunk/SelectSalesOrder.php trunk/SelectSupplier.php trunk/SelectWorkOrder.php trunk/SpecialOrder.php trunk/StockAdjustments.php trunk/StockCategories.php trunk/StockCostUpdate.php trunk/StockLocMovements.php trunk/StockLocStatus.php trunk/StockLocTransfer.php trunk/StockMovements.php trunk/StockQuantityByDate.php trunk/StockReorderLevel.php trunk/StockSerialItems.php trunk/StockStatus.php trunk/StockTransfers.php trunk/StockUsage.php trunk/StockUsageGraph.php trunk/Stocks.php trunk/SupplierTypes.php trunk/Suppliers.php trunk/WhereUsedInquiry.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/Z_ChangeStockCategory.php trunk/Z_ChangeStockCode.php trunk/Z_ImportFixedAssets.php trunk/Z_ImportStocks.php trunk/Z_MakeNewCompany.php trunk/Z_poAddLanguage.php trunk/doc/Change.log trunk/includes/DefineCartClass.php trunk/includes/MiscFunctions.php trunk/includes/htmlMimeMail.php trunk/includes/mimePart.php trunk/includes/tcpdf/2dbarcodes.php trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/tcpdf.php trunk/reportwriter/WriteForm.inc trunk/reportwriter/admin/RCFunctions.inc Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/AccountGroups.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -262,7 +262,7 @@ <td>' . $PandLText . '</td> <td>' . $myrow[4] . '</td>'; echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?SelectedAccountGroup=' . htmlentities($myrow[0], ENT_QUOTES,'UTF-8') . '">' . _('Edit') . '</a></td>'; - echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?SelectedAccountGroup=' . htmlentities($myrow[0], ENT_QUOTES,'UTF-8') . '&delete=1">' . _('Delete') .'</a></td></tr>'; + echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?SelectedAccountGroup=' . htmlentities($myrow[0], ENT_QUOTES,'UTF-8') . '&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this account group?') . '\');">' . _('Delete') .'</a></td></tr>'; } //END WHILE LIST LOOP echo '</table>'; Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Areas.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -10,9 +10,9 @@ if (isset($_GET['SelectedArea'])){ - $SelectedArea = strtoupper($_GET['SelectedArea']); + $SelectedArea = mb_strtoupper($_GET['SelectedArea']); } elseif (isset($_POST['SelectedArea'])){ - $SelectedArea = strtoupper($_POST['SelectedArea']); + $SelectedArea = mb_strtoupper($_POST['SelectedArea']); } if (isset($Errors)) { @@ -30,7 +30,7 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - $_POST['AreaCode'] = strtoupper($_POST['AreaCode']); + $_POST['AreaCode'] = mb_strtoupper($_POST['AreaCode']); $sql = "SELECT count(areacode) from areas WHERE areacode='".$_POST['AreaCode']."'"; $result = DB_query($sql, $db); $myrow = DB_fetch_row($result); Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/BOMExtendedQty.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -303,7 +303,7 @@ $YPos -=$line_height; $pdf->addTextWrap($Left_Margin,$YPos,300,$FontSize,_('Extended Quantity BOM Listing For ') - . strtoupper($_POST['Part'])); + . mb_strtoupper($_POST['Part'])); $pdf->addTextWrap($Page_Width-$Right_Margin-140,$YPos,160,$FontSize,_('Printed') . ': ' . Date($_SESSION['DefaultDateFormat']) . ' ' . _('Page') . ' ' . $PageNumber,'left'); $YPos -=$line_height; Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/BOMIndented.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -315,7 +315,7 @@ $YPos =$YPos - (2*$line_height); $pdf->addTextWrap($Left_Margin+1,$YPos,40,$FontSize,_('Assembly:'),'',0); - $pdf->addTextWrap(85,$YPos,100,$FontSize,strtoupper($_POST['Part']),'',0); + $pdf->addTextWrap(85,$YPos,100,$FontSize,mb_strtoupper($_POST['Part']),'',0); $pdf->addTextWrap(185,$YPos,150,$FontSize,$assemblydesc,'',0); $YPos -=(2*$line_height); $Xpos = $Left_Margin+5; Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/BOMIndentedReverse.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -291,7 +291,7 @@ $YPos =$YPos - $line_height; $pdf->addTextWrap($Left_Margin+1,$YPos,60,$FontSize,_('Component:'),'',0); - $pdf->addTextWrap(100,$YPos,100,$FontSize,strtoupper($_POST['Part']),'',0); + $pdf->addTextWrap(100,$YPos,100,$FontSize,mb_strtoupper($_POST['Part']),'',0); $pdf->addTextWrap(200,$YPos,150,$FontSize,$assemblydesc,'',0); $YPos -=(2*$line_height); $Xpos = $Left_Margin+5; Modified: trunk/BOMInquiry.php =================================================================== --- trunk/BOMInquiry.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/BOMInquiry.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -7,9 +7,9 @@ include('includes/header.inc'); if (isset($_GET['StockID'])){ - $StockID =trim(strtoupper($_GET['StockID'])); + $StockID =trim(mb_strtoupper($_GET['StockID'])); } elseif (isset($_POST['StockID'])){ - $StockID =trim(strtoupper($_POST['StockID'])); + $StockID =trim(mb_strtoupper($_POST['StockID'])); } if (!isset($_POST['StockID'])) { Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Contracts.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -107,7 +107,7 @@ $filename = $_SESSION['part_pics_dir'] . '/' . $_SESSION['Contract'.$identifier]->ContractRef . '.jpg'; //But check for the worst - if (strtoupper(mb_substr(trim($_FILES['Drawing']['name']),mb_strlen($_FILES['Drawing']['name'])-3))!='JPG'){ + if (mb_strtoupper(mb_substr(trim($_FILES['Drawing']['name']),mb_strlen($_FILES['Drawing']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['Drawing']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check @@ -611,7 +611,7 @@ } else { if (mb_strlen($_POST['CustKeywords'])>0) { //insert wildcard characters in spaces - $_POST['CustKeywords'] = strtoupper(trim($_POST['CustKeywords'])); + $_POST['CustKeywords'] = mb_strtoupper(trim($_POST['CustKeywords'])); $SearchString = '%' . str_replace(' ', '%', $_POST['CustKeywords']) . '%'; $SQL = "SELECT custbranch.brname, @@ -630,7 +630,7 @@ } elseif (mb_strlen($_POST['CustCode'])>0){ - $_POST['CustCode'] = strtoupper(trim($_POST['CustCode'])); + $_POST['CustCode'] = mb_strtoupper(trim($_POST['CustCode'])); $SQL = "SELECT custbranch.brname, custbranch.contactname, Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/CounterSales.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -223,7 +223,7 @@ } if (isset($_POST['Keywords']) AND mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; if ($_POST['StockCat']=='All'){ @@ -256,7 +256,7 @@ } else if (mb_strlen($_POST['StockCode'])>0){ - $_POST['StockCode'] = strtoupper($_POST['StockCode']); + $_POST['StockCode'] = mb_strtoupper($_POST['StockCode']); $SearchString = '%' . $_POST['StockCode'] . '%'; if ($_POST['StockCat']=='All'){ @@ -382,7 +382,7 @@ $i++; if (isset($_POST[$QuickEntryCode])) { - $NewItem = strtoupper($_POST[$QuickEntryCode]); + $NewItem = mb_strtoupper($_POST[$QuickEntryCode]); } if (isset($_POST[$QuickEntryQty])) { $NewItemQty = $_POST[$QuickEntryQty]; Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Currencies.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -237,7 +237,7 @@ $k++; } // Lets show the country flag - $ImageFile = 'flags/' . strtoupper($myrow[1]) . '.gif'; + $ImageFile = 'flags/' . mb_strtoupper($myrow[1]) . '.gif'; if(!file_exists($ImageFile)){ $ImageFile = 'flags/blank.gif'; Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/CustomerBranches.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -7,9 +7,9 @@ include('includes/header.inc'); if (isset($_GET['DebtorNo'])) { - $DebtorNo = strtoupper($_GET['DebtorNo']); + $DebtorNo = mb_strtoupper($_GET['DebtorNo']); } else if (isset($_POST['DebtorNo'])){ - $DebtorNo = strtoupper($_POST['DebtorNo']); + $DebtorNo = mb_strtoupper($_POST['DebtorNo']); } if (!isset($DebtorNo)) { @@ -22,9 +22,9 @@ if (isset($_GET['SelectedBranch'])){ - $SelectedBranch = strtoupper($_GET['SelectedBranch']); + $SelectedBranch = mb_strtoupper($_GET['SelectedBranch']); } else if (isset($_POST['SelectedBranch'])){ - $SelectedBranch = strtoupper($_POST['SelectedBranch']); + $SelectedBranch = mb_strtoupper($_POST['SelectedBranch']); } if (isset($Errors)) { @@ -44,7 +44,7 @@ //first off validate inputs sensible - $_POST['BranchCode'] = strtoupper($_POST['BranchCode']); + $_POST['BranchCode'] = mb_strtoupper($_POST['BranchCode']); if (ContainsIllegalCharacters($_POST['BranchCode']) OR strstr($_POST['BranchCode'],' ')) { $InputError = 1; Modified: trunk/CustomerTypes.php =================================================================== --- trunk/CustomerTypes.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/CustomerTypes.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -7,9 +7,9 @@ include('includes/header.inc'); if (isset($_POST['SelectedType'])){ - $SelectedType = strtoupper($_POST['SelectedType']); + $SelectedType = mb_strtoupper($_POST['SelectedType']); } elseif (isset($_GET['SelectedType'])){ - $SelectedType = strtoupper($_GET['SelectedType']); + $SelectedType = mb_strtoupper($_GET['SelectedType']); } if (isset($Errors)) { Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Customers.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -29,7 +29,7 @@ //first off validate inputs sensible - $_POST['DebtorNo'] = strtoupper($_POST['DebtorNo']); + $_POST['DebtorNo'] = mb_strtoupper($_POST['DebtorNo']); $sql="SELECT COUNT(debtorno) FROM debtorsmaster WHERE debtorno='".$_POST['DebtorNo']."'"; $result=DB_query($sql,$db); Modified: trunk/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/DiscountCategories.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -31,7 +31,7 @@ FROM stockmaster WHERE mbflag <>'K' AND mbflag<>'D' - AND stockid='" . strtoupper($_POST['StockID']) . "'",$db); + AND stockid='" . mb_strtoupper($_POST['StockID']) . "'",$db); if (DB_num_rows($result)==0){ $InputError = 1; prnMsg(_('The stock item entered must be set up as either a manufactured or purchased or assembly item'),'warn'); @@ -40,9 +40,9 @@ if ($InputError !=1) { $sql = "UPDATE stockmaster SET discountcategory='" . $_POST['DiscountCategory'] . "' - WHERE stockid='" . strtoupper($_POST['StockID']) . "'"; + WHERE stockid='" . mb_strtoupper($_POST['StockID']) . "'"; - $result = DB_query($sql,$db, _('The discount category') . ' ' . $_POST['DiscountCategory'] . ' ' . _('record for') . ' ' . strtoupper($_POST['StockID']) . ' ' . _('could not be updated because')); + $result = DB_query($sql,$db, _('The discount category') . ' ' . $_POST['DiscountCategory'] . ' ' . _('record for') . ' ' . mb_strtoupper($_POST['StockID']) . ' ' . _('could not be updated because')); prnMsg(_('The stock master has been updated with this discount category'),'success'); unset($_POST['DiscountCategory']); @@ -53,7 +53,7 @@ } elseif (isset($_GET['Delete']) and $_GET['Delete']=='yes') { /*the link to delete a selected record was clicked instead of the submit button */ - $sql="UPDATE stockmaster SET discountcategory='' WHERE stockid='" . trim(strtoupper($_GET['StockID'])) ."'"; + $sql="UPDATE stockmaster SET discountcategory='' WHERE stockid='" . trim(mb_strtoupper($_GET['StockID'])) ."'"; $result = DB_query($sql,$db); prnMsg( _('The stock master record has been updated to no discount category'),'success'); echo '<br />'; Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Factors.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -9,10 +9,10 @@ include('includes/header.inc'); if (isset($_GET['FactorID'])){ - $FactorID = strtoupper($_GET['FactorID']); + $FactorID = mb_strtoupper($_GET['FactorID']); $_POST['Amend']=True; } elseif (isset($_POST['FactorID'])){ - $FactorID = strtoupper($_POST['FactorID']); + $FactorID = mb_strtoupper($_POST['FactorID']); } else { unset($FactorID); } Modified: trunk/FixedAssetCategories.php =================================================================== --- trunk/FixedAssetCategories.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/FixedAssetCategories.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -12,9 +12,9 @@ _('Fixed Asset Categories') . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_GET['SelectedCategory'])){ - $SelectedCategory = strtoupper($_GET['SelectedCategory']); + $SelectedCategory = mb_strtoupper($_GET['SelectedCategory']); } else if (isset($_POST['SelectedCategory'])){ - $SelectedCategory = strtoupper($_POST['SelectedCategory']); + $SelectedCategory = mb_strtoupper($_POST['SelectedCategory']); } if (isset($_POST['submit'])) { @@ -27,7 +27,7 @@ //first off validate inputs sensible - $_POST['CategoryID'] = strtoupper($_POST['CategoryID']); + $_POST['CategoryID'] = mb_strtoupper($_POST['CategoryID']); if (mb_strlen($_POST['CategoryID']) > 6) { $InputError = 1; @@ -96,13 +96,12 @@ depnact, disposalact, accumdepnact) - VALUES ( - '" . $_POST['CategoryID'] . "', - '" . $_POST['CategoryDescription'] . "', - '" . $_POST['CostAct'] . "', - '" . $_POST['DepnAct'] . "', - '" . $_POST['DisposalAct'] . "', - '" . $_POST['AccumDepnAct'] . "')"; + VALUES ('" . $_POST['CategoryID'] . "', + '" . $_POST['CategoryDescription'] . "', + '" . $_POST['CostAct'] . "', + '" . $_POST['DepnAct'] . "', + '" . $_POST['DisposalAct'] . "', + '" . $_POST['AccumDepnAct'] . "')"; $ErrMsg = _('Could not insert the new fixed asset category') . $_POST['CategoryDescription'] . _('because'); $result = DB_query($sql,$db,$ErrMsg); prnMsg(_('A new fixed asset category record has been added for') . ' ' . $_POST['CategoryDescription'],'success'); @@ -144,22 +143,25 @@ links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ - $sql = 'SELECT categoryid, + $sql = "SELECT categoryid, categorydescription, costact, depnact, disposalact, accumdepnact - FROM fixedassetcategories'; + FROM fixedassetcategories"; $result = DB_query($sql,$db); - echo '<br /><table class=selection>'; - echo '<tr><th>' . _('Cat Code') . '</th> + echo '<br /> + <table class="selection">'; + echo '<tr> + <th>' . _('Cat Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Cost GL') . '</th> <th>' . _('P & L Depn GL') . '</th> <th>' . _('Disposal GL') . '</th> - <th>' . _('Accum Depn GL') . '</th></tr>'; + <th>' . _('Accum Depn GL') . '</th> + </tr>'; $k=0; //row colour counter @@ -178,7 +180,7 @@ <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 fixed asset category? Additional checks will be performed before actual deletion to ensure data integrity is not compromised.') . '");">' . _('Delete') . '</td> + <td><a href="%sSelectedCategory=%s&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this fixed asset category? Additional checks will be performed before actual deletion to ensure data integrity is not compromised.') . '\');">' . _('Delete') . '</td> </tr>', $myrow['categoryid'], $myrow['categorydescription'], @@ -186,9 +188,9 @@ $myrow['depnact'], $myrow['disposalact'], $myrow['accumdepnact'], - $_SERVER['PHP_SELF'] . '?' . SID, + $_SERVER['PHP_SELF'] . '?', $myrow['categoryid'], - $_SERVER['PHP_SELF'] . '?' . SID, + $_SERVER['PHP_SELF'] . '?', $myrow['categoryid']); } //END WHILE LIST LOOP @@ -201,7 +203,7 @@ echo '<br /><div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '">' ._('Show All Fixed Asset Categories') . '</a></div>'; } -echo '<form name="CategoryForm" method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; +echo '<form name="CategoryForm" method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedCategory) and !isset($_POST['submit'])) { @@ -238,23 +240,21 @@ } //SQL to poulate account selection boxes -$sql = 'SELECT accountcode, +$sql = "SELECT accountcode, accountname - FROM chartmaster, - accountgroups - WHERE chartmaster.group_=accountgroups.groupname and - accountgroups.pandl=0 - ORDER BY accountcode'; + FROM chartmaster INNER JOIN accountgroups + ON chartmaster.group_=accountgroups.groupname + WHERE accountgroups.pandl=0 + ORDER BY accountcode"; $BSAccountsResult = DB_query($sql,$db); -$sql = 'SELECT accountcode, +$sql = "SELECT accountcode, accountname - FROM chartmaster, - accountgroups - WHERE chartmaster.group_=accountgroups.groupname and - accountgroups.pandl!=0 - ORDER BY accountcode'; + FROM chartmaster INNER JOIN accountgroups + ON chartmaster.group_=accountgroups.groupname + WHERE accountgroups.pandl!=0 + ORDER BY accountcode"; $PnLAccountsResult = DB_query($sql,$db); Modified: trunk/FixedAssetDepreciation.php =================================================================== --- trunk/FixedAssetDepreciation.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/FixedAssetDepreciation.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -9,13 +9,13 @@ /*Get the last period depreciation (depn is transtype =44) was posted for */ -$result = DB_query('SELECT periods.lastdate_in_period, +$result = DB_query("SELECT periods.lastdate_in_period, max(fixedassettrans.periodno) FROM fixedassettrans INNER JOIN periods ON fixedassettrans.periodno=periods.periodno WHERE transtype=44 GROUP BY periods.lastdate_in_period - ORDER BY periods.lastdate_in_period DESC',$db); + ORDER BY periods.lastdate_in_period DESC",$db); $LastDepnRun = DB_fetch_row($result); @@ -65,7 +65,7 @@ fixedassetcategories.accumdepnact, fixedassetcategories.depnact, fixedassetcategories.categorydescription -ORDER BY assetcategoryid, assetid"; + ORDER BY assetcategoryid, assetid"; $AssetsResult=DB_query($sql, $db); $InputError = false; //always hope for the best @@ -104,11 +104,11 @@ if ($AssetCategoryDescription != $AssetRow['categorydescription'] OR $AssetCategoryDescription =='0'){ if ($AssetCategoryDescription !='0'){ //then print totals echo '<tr><th colspan=3 align="right">' . _('Total for') . ' ' . $AssetCategoryDescription . ' </th> - <th class="number">' . number_format($TotalCategoryCost,2) . '</th> - <th class="number">' . number_format($TotalCategoryAccumDepn,2) . '</th> - <th class="number">' . number_format(($TotalCategoryCost-$TotalCategoryAccumDepn),2) . '</th> + <th class="number">' . number_format($TotalCategoryCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format($TotalCategoryAccumDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format(($TotalCategoryCost-$TotalCategoryAccumDepn),$_SESSION['CompanyRecord']['decimalplaces']) . '</th> <th colspan=2></th> - <th class="number">' . number_format($TotalCategoryDepn,2) . '</th> + <th class="number">' . number_format($TotalCategoryDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> </tr>'; } echo '<tr><th colspan=9 align="left">' . $AssetRow['categorydescription'] . '</th></tr>'; @@ -147,12 +147,12 @@ echo '<td>' . $AssetRow['assetid'] . '</td> <td>' . $AssetRow['description'] . '</td> <td>' . ConvertSQLDate($AssetRow['datepurchased']) . '</td> - <td class="number">' . number_format($AssetRow['costtotal'],2) . '</td> - <td class="number">' . number_format($AssetRow['depnbfwd'],2) . '</td> - <td class="number">' . number_format($AssetRow['costtotal']-$AssetRow['depnbfwd'],2) . '</td> + <td class="number">' . number_format($AssetRow['costtotal'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . number_format($AssetRow['depnbfwd'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . number_format($AssetRow['costtotal']-$AssetRow['depnbfwd'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> <td align="center">' . $DepreciationType . '</td> <td class="number">' . $AssetRow['depnrate'] . '</td> - <td class="number">' . number_format($NewDepreciation ,2) . '</td> + <td class="number">' . number_format($NewDepreciation ,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> </tr>'; $TotalCategoryCost +=$AssetRow['costtotal']; $TotalCategoryAccumDepn +=$AssetRow['depnbfwd']; @@ -227,18 +227,18 @@ } //end if Committing the depreciation to DB } //end loop around the assets to calculate depreciation for echo '<tr><th colspan=3 align="right">' . _('Total for') . ' ' . $AssetCategoryDescription . ' </th> - <th class="number">' . number_format($TotalCategoryCost,2) . '</th> - <th class="number">' . number_format($TotalCategoryAccumDepn,2) . '</th> - <th class="number">' . number_format(($TotalCategoryCost-$TotalCategoryAccumDepn),2) . '</th> + <th class="number">' . number_format($TotalCategoryCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format($TotalCategoryAccumDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format(($TotalCategoryCost-$TotalCategoryAccumDepn),$_SESSION['CompanyRecord']['decimalplaces']) . '</th> <th colspan=2></th> - <th class="number">' . number_format($TotalCategoryDepn,2) . '</th> + <th class="number">' . number_format($TotalCategoryDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> </tr>'; echo '<tr><th colspan=3 align="right">' . _('GRAND Total') . ' </th> - <th class="number">' . number_format($TotalCost,2) . '</th> - <th class="number">' . number_format($TotalAccumDepn,2) . '</th> - <th class="number">' . number_format(($TotalCost-$TotalAccumDepn),2) . '</th> + <th class="number">' . number_format($TotalCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format($TotalAccumDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format(($TotalCost-$TotalAccumDepn),$_SESSION['CompanyRecord']['decimalplaces']) . '</th> <th colspan=2></th> - <th class="number">' . number_format($TotalDepn,2) . '</th> + <th class="number">' . number_format($TotalDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> </tr>'; echo '</table><hr><p></p>'; @@ -247,11 +247,11 @@ $result = DB_Txn_Commit($db); prnMsg(_('Depreciation') . ' ' . $TransNo . ' ' . _('has been successfully entered'),'success'); unset($_POST['ProcessDate']); - echo '<br /><a href="index.php' . '?' . SID . '">' ._('Return to main menu').'</a>'; + echo '<br /><a href="index.php">' ._('Return to main menu').'</a>'; /*And post the journal too */ include ('includes/GLPostings.inc'); } else { - echo '<form action=' . $_SERVER['PHP_SELF'] . '?' . SID . ' method=post name="form">'; + echo '<form action=' . $_SERVER['PHP_SELF'] . ' 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 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/FixedAssetItems.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -30,7 +30,7 @@ $filename = $_SESSION['part_pics_dir'] . '/ASSET_' . $AssetID . '.jpg'; //But check for the worst - if (strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ + if (mb_strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['ItemPicture']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check Modified: trunk/GetStockImage.php =================================================================== --- trunk/GetStockImage.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/GetStockImage.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -68,7 +68,7 @@ } $filepath = $_SESSION['part_pics_dir'] . $pathsep; -$stockid = trim(strtoupper($_GET['StockID'])); +$stockid = trim(mb_strtoupper($_GET['StockID'])); if( isset($_GET['bgcolor']) ) $bgcolor = $_GET['bgcolor']; if( isset($_GET['textcolor']) ) Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Locations.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -22,7 +22,7 @@ /* actions to take once the user has clicked the submit button ie the page has called itself with some user input */ - $_POST['LocCode']=strtoupper($_POST['LocCode']); + $_POST['LocCode']=mb_strtoupper($_POST['LocCode']); if( trim($_POST['LocCode']) == '' ) { $InputError = 1; prnMsg( _('The location code may not be empty'), 'error'); Modified: trunk/MRPCalendar.php =================================================================== --- trunk/MRPCalendar.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/MRPCalendar.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -11,9 +11,9 @@ if (isset($_POST['ChangeDate'])){ - $ChangeDate =trim(strtoupper($_POST['ChangeDate'])); + $ChangeDate =trim(mb_strtoupper($_POST['ChangeDate'])); } elseif (isset($_GET['ChangeDate'])){ - $ChangeDate =trim(strtoupper($_GET['ChangeDate'])); + $ChangeDate =trim(mb_strtoupper($_GET['ChangeDate'])); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . Modified: trunk/MRPDemandTypes.php =================================================================== --- trunk/MRPDemandTypes.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/MRPDemandTypes.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -8,9 +8,9 @@ //SelectedDT is the Selected MRPDemandType if (isset($_POST['SelectedDT'])){ - $SelectedDT = trim(strtoupper($_POST['SelectedDT'])); + $SelectedDT = trim(mb_strtoupper($_POST['SelectedDT'])); } elseif (isset($_GET['SelectedDT'])){ - $SelectedDT = trim(strtoupper($_GET['SelectedDT'])); + $SelectedDT = trim(mb_strtoupper($_GET['SelectedDT'])); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . @@ -26,8 +26,8 @@ //first off validate inputs sensible - if (trim(strtoupper($_POST['MRPDemandType']) == 'WO') or - trim(strtoupper($_POST['MRPDemandType']) == 'SO')) { + if (trim(mb_strtoupper($_POST['MRPDemandType']) == 'WO') or + trim(mb_strtoupper($_POST['MRPDemandType']) == 'SO')) { $InputError = 1; prnMsg(_('The Demand Type is reserved for the system'),'error'); } @@ -57,7 +57,7 @@ $sql = "INSERT INTO mrpdemandtypes (mrpdemandtype, description) - VALUES ('" . trim(strtoupper($_POST['MRPDemandType'])) . "', + VALUES ('" . trim(mb_strtoupper($_POST['MRPDemandType'])) . "', '" . $_POST['Description'] . "' )"; $msg = _('The new demand type has been added to the database'); Modified: trunk/MRPDemands.php =================================================================== --- trunk/MRPDemands.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/MRPDemands.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -18,9 +18,9 @@ } if (isset($_POST['StockID'])){ - $StockID =trim(strtoupper($_POST['StockID'])); + $StockID =trim(mb_strtoupper($_POST['StockID'])); } elseif (isset($_GET['StockID'])){ - $StockID =trim(strtoupper($_GET['StockID'])); + $StockID =trim(mb_strtoupper($_GET['StockID'])); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . @@ -191,7 +191,7 @@ if ($myrow[0]>0) { //If $myrow[0] > 0, it means this is an edit, so do an update $sql = "UPDATE mrpdemands SET quantity = '" . $_POST['Quantity'] . "', - mrpdemandtype = '" . trim(strtoupper($_POST['MRPDemandtype'])) . "', + mrpdemandtype = '" . trim(mb_strtoupper($_POST['MRPDemandtype'])) . "', duedate = '" . $FormatedDuedate . "' WHERE demandid = '" . $DemandID . "'"; $msg = _("The MRP demand record has been updated for").' '.$StockID; @@ -203,7 +203,7 @@ quantity, duedate) VALUES ('" . $StockID . "', - '" . trim(strtoupper($_POST['MRPDemandtype'])) . "', + '" . trim(mb_strtoupper($_POST['MRPDemandtype'])) . "', '" . $_POST['Quantity'] . "', '" . $FormatedDuedate . "' )"; Modified: trunk/MRPReport.php =================================================================== --- trunk/MRPReport.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/MRPReport.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -569,7 +569,7 @@ } if ($_POST['Keywords']) { //insert wildcard characters in spaces - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; if ($_POST['StockCat'] == 'All') { $SQL = "SELECT stockmaster.stockid, @@ -608,7 +608,7 @@ ORDER BY stockmaster.stockid"; } } elseif (isset($_POST['StockCode'])) { - $_POST['StockCode'] = strtoupper($_POST['StockCode']); + $_POST['StockCode'] = mb_strtoupper($_POST['StockCode']); if ($_POST['StockCat'] == 'All') { $SQL = "SELECT stockmaster.stockid, stockmaster.description, Modified: trunk/Numbers/Words/lang.dk.php =================================================================== --- trunk/Numbers/Words/lang.dk.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Numbers/Words/lang.dk.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -368,7 +368,7 @@ * @since Numbers_Words 0.4 */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.en_GB.php =================================================================== --- trunk/Numbers/Words/lang.en_GB.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Numbers/Words/lang.en_GB.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -380,7 +380,7 @@ * @since Numbers_Words 0.13.1 */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.en_US.php =================================================================== --- trunk/Numbers/Words/lang.en_US.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Numbers/Words/lang.en_US.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -472,7 +472,7 @@ * @since Numbers_Words 0.4 */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.es_AR.php =================================================================== --- trunk/Numbers/Words/lang.es_AR.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Numbers/Words/lang.es_AR.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -430,7 +430,7 @@ * @author Martin Marrese */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.he.php =================================================================== --- trunk/Numbers/Words/lang.he.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Numbers/Words/lang.he.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -462,7 +462,7 @@ * @since Numbers_Words 0.4 */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.hu_HU.php =================================================================== --- trunk/Numbers/Words/lang.hu_HU.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Numbers/Words/lang.hu_HU.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -359,7 +359,7 @@ * @since Numbers_Words 0.4 */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.pl.php =================================================================== --- trunk/Numbers/Words/lang.pl.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Numbers/Words/lang.pl.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -439,7 +439,7 @@ * @since Numbers_Words 0.4 */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.pt_BR.php =================================================================== --- trunk/Numbers/Words/lang.pt_BR.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Numbers/Words/lang.pt_BR.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -279,7 +279,7 @@ * @since Numbers_Words 0.10.1 */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_name[$int_curr])){ $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.ru.php =================================================================== --- trunk/Numbers/Words/lang.ru.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Numbers/Words/lang.ru.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -599,7 +599,7 @@ */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/POReport.php =================================================================== --- trunk/POReport.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/POReport.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -21,18 +21,18 @@ if (isset($_POST['submit']) or isset($_POST['submitcsv'])) { if (isset($_POST['PartNumber'])){ - $PartNumber = trim(strtoupper($_POST['PartNumber'])); + $PartNumber = trim(mb_strtoupper($_POST['PartNumber'])); } elseif (isset($_GET['PartNumber'])){ - $PartNumber = trim(strtoupper($_GET['PartNumber'])); + $PartNumber = trim(mb_strtoupper($_GET['PartNumber'])); } # Part Number operator - either LIKE or = $PartNumberOp = $_POST['PartNumberOp']; if (isset($_POST['SupplierId'])){ - $SupplierId = trim(strtoupper($_POST['SupplierId'])); + $SupplierId = trim(mb_strtoupper($_POST['SupplierId'])); } elseif (isset($_GET['SupplierId'])){ - $SupplierId = trim(strtoupper($_GET['SupplierId'])); + $SupplierId = trim(mb_strtoupper($_GET['SupplierId'])); } $SupplierIdOp = $_POST['SupplierIdOp']; @@ -45,9 +45,9 @@ } if (isset($_POST['SupplierName'])){ - $SupplierName = trim(strtoupper($_POST['SupplierName'])); + $SupplierName = trim(mb_strtoupper($_POST['SupplierName'])); } elseif (isset($_GET['SupplierName'])){ - $SupplierName = trim(strtoupper($_GET['SupplierName'])); + $SupplierName = trim(mb_strtoupper($_GET['SupplierName'])); } // Had to add supplierid to SummaryType when do summary by name because there could be several accounts Modified: trunk/PcAssignCashToTab.php =================================================================== --- trunk/PcAssignCashToTab.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/PcAssignCashToTab.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -6,9 +6,9 @@ include('includes/header.inc'); if (isset($_POST['SelectedTabs'])){ - $SelectedTabs = strtoupper($_POST['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_POST['SelectedTabs']); } elseif (isset($_GET['SelectedTabs'])){ - $SelectedTabs = strtoupper($_GET['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_GET['SelectedTabs']); } if (isset($_POST['SelectedIndex'])){ Modified: trunk/PcAuthorizeExpenses.php =================================================================== --- trunk/PcAuthorizeExpenses.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/PcAuthorizeExpenses.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -7,9 +7,9 @@ include('includes/SQL_CommonFunctions.inc'); if (isset($_POST['SelectedTabs'])){ - $SelectedTabs = strtoupper($_POST['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_POST['SelectedTabs']); } elseif (isset($_GET['SelectedTabs'])){ - $SelectedTabs = strtoupper($_GET['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_GET['SelectedTabs']); } if (isset($_POST['SelectedIndex'])){ Modified: trunk/PcClaimExpensesFromTab.php =================================================================== --- trunk/PcClaimExpensesFromTab.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/PcClaimExpensesFromTab.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -8,9 +8,9 @@ if (isset($_POST['SelectedTabs'])){ - $SelectedTabs = strtoupper($_POST['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_POST['SelectedTabs']); } elseif (isset($_GET['SelectedTabs'])){ - $SelectedTabs = strtoupper($_GET['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_GET['SelectedTabs']); } if (isset($_POST['SelectedIndex'])){ Modified: trunk/PcExpenses.php =================================================================== --- trunk/PcExpenses.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/PcExpenses.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -10,9 +10,9 @@ . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_POST['SelectedExpense'])){ - $SelectedExpense = strtoupper($_POST['SelectedExpense']); + $SelectedExpense = mb_strtoupper($_POST['SelectedExpense']); } elseif (isset($_GET['SelectedExpense'])){ - $SelectedExpense = strtoupper($_GET['SelectedExpense']); + $SelectedExpense = mb_strtoupper($_GET['SelectedExpense']); } if (isset($_POST['Cancel'])) { Modified: trunk/PcExpensesTypeTab.php =================================================================== --- trunk/PcExpensesTypeTab.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/PcExpensesTypeTab.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -10,9 +10,9 @@ . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_POST['SelectedType'])){ - $SelectedType = strtoupper($_POST['SelectedType']); + $SelectedType = mb_strtoupper($_POST['SelectedType']); } elseif (isset($_GET['SelectedType'])){ - $SelectedType = strtoupper($_GET['SelectedType']); + $SelectedType = mb_strtoupper($_GET['SelectedType']); } else { $SelectedType=''; } @@ -23,9 +23,9 @@ } if (isset($_POST['SelectedTab'])){ - $SelectedTab = strtoupper($_POST['SelectedTab']); + $SelectedTab = mb_strtoupper($_POST['SelectedTab']); } elseif (isset($_GET['SelectedTab'])){ - $SelectedTab = strtoupper($_GET['SelectedTab']); + $SelectedTab = mb_strtoupper($_GET['SelectedTab']); } if (isset($_POST['Cancel'])) { Modified: trunk/PcReportTab.php =================================================================== --- trunk/PcReportTab.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/PcReportTab.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -8,9 +8,9 @@ $title = _('Petty Cash Management Report'); if (isset($_POST['SelectedTabs'])){ - $SelectedTabs = strtoupper($_POST['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_POST['SelectedTabs']); } elseif (isset($_GET['SelectedTabs'])){ - $SelectedTabs = strtoupper($_GET['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_GET['SelectedTabs']); } if ((! isset($_POST['FromDate']) AND ! isset($_POST['ToDate'])) OR isset($_POST['SelectDifferentDate'])){ Modified: trunk/PcTabs.php =================================================================== --- trunk/PcTabs.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/PcTabs.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -9,9 +9,9 @@ . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_POST['SelectedTab'])){ - $SelectedTab = strtoupper($_POST['SelectedTab']); + $SelectedTab = mb_strtoupper($_POST['SelectedTab']); } elseif (isset($_GET['SelectedTab'])){ - $SelectedTab = strtoupper($_GET['SelectedTab']); + $SelectedTab = mb_strtoupper($_GET['SelectedTab']); } if (isset($_POST['Cancel'])) { Modified: trunk/PcTypeTabs.php =================================================================== --- trunk/PcTypeTabs.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/PcTypeTabs.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -9,9 +9,9 @@ . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_POST['SelectedTab'])){ - $SelectedTab = strtoupper($_POST['SelectedTab']); + $SelectedTab = mb_strtoupper($_POST['SelectedTab']); } elseif (isset($_GET['SelectedTab'])){ - $SelectedTab = strtoupper($_GET['SelectedTab']); + $SelectedTab = mb_strtoupper($_GET['SelectedTab']); } if (isset($Errors)) { Modified: trunk/Prices.php =================================================================== --- trunk/Prices.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Prices.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -14,9 +14,9 @@ if (isset($_GET['Item'])){ - $Item = trim(strtoupper($_GET['Item'])); + $Item = trim(mb_strtoupper($_GET['Item'])); }elseif (isset($_POST['Item'])){ - $Item = trim(strtoupper($_POST['Item'])); + $Item = trim(mb_strtoupper($_POST['Item'])); } if (!isset($_POST['TypeAbbrev']) OR $_POST['TypeAbbrev']==''){ Modified: trunk/PrintCustStatements.php =================================================================== --- trunk/PrintCustStatements.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/PrintCustStatements.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -33,12 +33,12 @@ } If (isset($_POST['PrintPDF']) && isset($_POST['FromCust']) && $_POST['FromCust']!=''){ - $_POST['FromCust'] = strtoupper($_POST['FromCust']); + $_POST['FromCust'] = mb_strtoupper($_POST['FromCust']); If (!isset($_POST['ToCust'])){ $_POST['ToCust'] = $_POST['FromCust']; } else { - $_POST['ToCust'] = strtoupper($_POST['ToCust']); + $_POST['ToCust'] = mb_strtoupper($_POST['ToCust']); } include('includes/PDFStarter.php'); $pdf->addInfo('Title', _('Customer Statements') ); Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/PurchData.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -8,15 +8,15 @@ include ('includes/header.inc'); if (isset($_GET['SupplierID'])) { - $SupplierID = trim(strtoupper($_GET['SupplierID'])); + $SupplierID = trim(mb_strtoupper($_GET['SupplierID'])); } elseif (isset($_POST['SupplierID'])) { - $SupplierID = trim(strtoupper($_POST['SupplierID'])); + $SupplierID = trim(mb_strtoupper($_POST['SupplierID'])); } if (isset($_GET['StockID'])) { - $StockID = trim(strtoupper($_GET['StockID'])); + $StockID = trim(mb_strtoupper($_GET['StockID'])); } elseif (isset($_POST['StockID'])) { - $StockID = trim(strtoupper($_POST['StockID'])); + $StockID = trim(mb_strtoupper($_POST['StockID'])); } if (isset($_POST['StockUOM'])) { Modified: trunk/SalesCategories.php =================================================================== --- trunk/SalesCategories.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SalesCategories.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -11,24 +11,24 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_GET['SelectedCategory'])){ - $SelectedCategory = strtoupper($_GET['SelectedCategory']); + $SelectedCategory = mb_strtoupper($_GET['SelectedCategory']); } else if (isset($_POST['SelectedCategory'])){ - $SelectedCategory = strtoupper($_POST['SelectedCategory']); + $SelectedCategory = mb_strtoupper($_POST['SelectedCategory']); } if (isset($_GET['ParentCategory'])){ - $ParentCategory = strtoupper($_GET['ParentCategory']); + $ParentCategory = mb_strtoupper($_GET['ParentCategory']); } else if (isset($_POST['ParentCategory'])){ - $ParentCategory = strtoupper($_POST['ParentCategory']); + $ParentCategory = mb_strtoupper($_POST['ParentCategory']); } if( isset($ParentCategory) AND $ParentCategory == 0 ) { unset($ParentCategory); } if (isset($_GET['EditName'])){ - $EditName = strtoupper($_GET['EditName']); + $EditName = mb_strtoupper($_GET['EditName']); } else if (isset($_POST['EditName'])){ - $EditName = strtoupper($_POST['EditName']); + $EditName = mb_strtoupper($_POST['EditName']); } if (isset($SelectedCategory) AND isset($_FILES['ItemPicture']) AND $_FILES['ItemPicture']['name'] !='') { @@ -39,7 +39,7 @@ $FileName = $_SESSION['part_pics_dir'] . '/cat_' . $SelectedCategory . '.jpg'; //But check for the worst - if (strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ + if (mb_strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['ItemPicture']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check Modified: trunk/SalesInquiry.php =================================================================== --- trunk/SalesInquiry.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SalesInquiry.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -20,26 +20,26 @@ } if (isset($_POST['PartNumber'])){ - $PartNumber = trim(strtoupper($_POST['PartNumber'])); + $PartNumber = trim(mb_strtoupper($_POST['PartNumber'])); } elseif (isset($_GET['PartNumber'])){ - $PartNumber = trim(strtoupper($_GET['PartNumber'])); + $PartNumber = trim(mb_strtoupper($_GET['PartNumber'])); } # Part Number operator - either LIKE or = $PartNumberOp = $_POST['PartNumberOp']; if (isset($_POST['DebtorNo'])){ - $DebtorNo = trim(strtoupper($_POST['DebtorNo'])); + $DebtorNo = trim(mb_strtoupper($_POST['DebtorNo'])); } elseif (isset($_GET['DebtorNo'])){ - $DebtorNo = trim(strtoupper($_GET['DebtorNo'])); + $DebtorNo = trim(mb_strtoupper($_GET['DebtorNo'])); } $DebtorNoOp = $_POST['DebtorNoOp']; if (isset($_POST['DebtorName'])){ - $DebtorName = trim(strtoupper($_POST['DebtorName'])); + $DebtorName = trim(mb_strtoupper($_POST['DebtorName'])); } elseif (isset($_GET['DebtorName'])){ - $DebtorName = trim(strtoupper($_GET['DebtorName'])); + $DebtorName = trim(mb_strtoupper($_GET['DebtorName'])); } $DebtorNameOp = $_POST['DebtorNameOp']; Modified: trunk/SalesPeople.php =================================================================== --- trunk/SalesPeople.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SalesPeople.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -6,9 +6,9 @@ include('includes/header.inc'); if (isset($_GET['SelectedSaleperson'])){ - $SelectedSaleperson =strtoupper($_GET['SelectedSaleperson']); + $SelectedSaleperson =mb_strtoupper($_GET['SelectedSaleperson']); } elseif(isset($_POST['SelectedSaleperson'])){ - $SelectedSaleperson =strtoupper($_POST['SelectedSaleperson']); + $SelectedSaleperson =mb_strtoupper($_POST['SelectedSaleperson']); } if (isset($Errors)) { Modified: trunk/SalesTypes.php =================================================================== --- trunk/SalesTypes.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SalesTypes.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -6,9 +6,9 @@ include('includes/header.inc'); if (isset($_POST['SelectedType'])){ - $SelectedType = strtoupper($_POST['SelectedType']); + $SelectedType = mb_strtoupper($_POST['SelectedType']); } elseif (isset($_GET['SelectedType'])){ - $SelectedType = strtoupper($_GET['SelectedType']); + $SelectedType = mb_strtoupper($_GET['SelectedType']); } if (isset($Errors)) { Modified: trunk/SelectAsset.php =================================================================== --- trunk/SelectAsset.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SelectAsset.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -25,7 +25,7 @@ } } if (isset($_POST['AssetCode'])) { - $_POST['AssetCode'] = trim(strtoupper($_POST['AssetCode'])); + $_POST['AssetCode'] = trim(mb_strtoupper($_POST['AssetCode'])); } // Always show the search facilities $SQL = 'SELECT categoryid, @@ -123,7 +123,7 @@ if ($_POST['Keywords']) { //insert wildcard characters in spaces - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; if ($_POST['AssetCategory'] == 'ALL') { if ($_POST['AssetLocation']=='ALL'){ Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SelectCustomer.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -91,7 +91,7 @@ } if (mb_strlen($_POST['Keywords'])>0) { $msg = _('Search Result: Customer Name has been used in search') . '<br />'; - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); } elseif (mb_strlen($_POST['CustCode'])>0) { $msg = _('Search Result: Customer Code has been used in search') . '<br />'; } elseif (mb_strlen($_POST['CustPhone'])>0) { @@ -124,7 +124,7 @@ } else { if (mb_strlen($_POST['Keywords']) > 0) { //using the customer name - $_POST['Keywords'] = strtoupper(trim($_POST['Keywords'])); + $_POST['Keywords'] = mb_strtoupper(trim($_POST['Keywords'])); //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; $SQL = "SELECT debtorsmaster.debtorno, @@ -144,7 +144,7 @@ WHERE debtorsmaster.name " . LIKE . " '" . $SearchString . "' AND debtorsmaster.typeid = debtortype.typeid"; } elseif (mb_strlen($_POST['CustCode']) > 0) { - $_POST['CustCode'] = strtoupper(trim($_POST['CustCode'])); + $_POST['CustCode'] = mb_strtoupper(trim($_POST['CustCode'])); $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name, debtorsmaster.address1, Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SelectOrderItems.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -305,7 +305,7 @@ } else { if (mb_strlen($_POST['CustKeywords'])>0) { //insert wildcard characters in spaces - $_POST['CustKeywords'] = strtoupper(trim($_POST['CustKeywords'])); + $_POST['CustKeywords'] = mb_strtoupper(trim($_POST['CustKeywords'])); $SearchString = '%' . str_replace(' ', '%', $_POST['CustKeywords']) . '%'; $SQL = "SELECT custbranch.brname, @@ -328,7 +328,7 @@ } elseif (mb_strlen($_POST['CustCode'])>0){ - $_POST['CustCode'] = strtoupper(trim($_POST['CustCode'])); + $_POST['CustCode'] = mb_strtoupper(trim($_POST['CustCode'])); $SQL = "SELECT custbranch.brname, custbranch.contactname, @@ -766,7 +766,7 @@ } if (isset($_POST['Keywords']) AND mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; if ($_POST['StockCat']=='All'){ @@ -797,7 +797,7 @@ } elseif (mb_strlen($_POST['StockCode'])>0){ - $_POST['StockCode'] = strtoupper($_POST['StockCode']); + $_POST['StockCode'] = mb_strtoupper($_POST['StockCode']); $SearchString = '%' . $_POST['StockCode'] . '%'; if ($_POST['StockCat']=='All'){ @@ -918,7 +918,7 @@ $i++; if (isset($_POST[$QuickEntryCode])) { - $NewItem = strtoupper($_POST[$QuickEntryCode]); + $NewItem = mb_strtoupper($_POST[$QuickEntryCode]); } if (isset($_POST[$QuickEntryQty])) { $NewItemQty = $_POST[$QuickEntryQty]; Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SelectProduct.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -10,8 +10,8 @@ if (isset($_GET['StockID'])) { //The page is called with a StockID - $_GET['StockID'] = trim(strtoupper($_GET['StockID'])); - $_POST['Select'] = trim(strtoupper($_GET['StockID'])); + $_GET['StockID'] = trim(mb_strtoupper($_GET['StockID'])); + $_POST['Select'] = trim(mb_strtoupper($_GET['StockID'])); } echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/inventory.png" title="' . _('Inventory Items') . '" alt="" />' . ' ' . _('Inventory Items') . '</p>'; if (isset($_GET['NewSearch']) or isset($_POST['Next']) or isset($_POST['Previous']) or isset($_POST['Go'])) { @@ -27,7 +27,7 @@ } } if (isset($_POST['StockCode'])) { - $_POST['StockCode'] = trim(strtoupper($_POST['StockCode'])); + $_POST['StockCode'] = trim(mb_strtoupper($_POST['StockCode'])); } // Always show the search facilities $SQL = "SELECT categoryid, @@ -534,7 +534,7 @@ } if ($_POST['Keywords']) { //insert wildcard characters in spaces - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; if ($_POST['StockCat'] == 'All') { $SQL = "SELECT stockmaster.stockid, @@ -575,7 +575,7 @@ ORDER BY stockmaster.stockid"; } } elseif (isset($_POST['StockCode'])) { - $_POST['StockCode'] = strtoupper($_POST['StockCode']); + $_POST['StockCode'] = mb_strtoupper($_POST['StockCode']); if ($_POST['StockCat'] == 'All') { $SQL = "SELECT stockmaster.stockid, stockmaster.description, Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SelectSalesOrder.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -398,9 +398,9 @@ } if (isset($_POST['StockID'])){ - $StockID = trim(strtoupper($_POST['StockID'])); + $StockID = trim(mb_strtoupper($_POST['StockID'])); } elseif (isset($_GET['StockID'])){ - $StockID = trim(strtoupper($_GET['StockID'])); + $StockID = trim(mb_strtoupper($_GET['StockID'])); } if (!isset($StockID)) { Modified: trunk/SelectSupplier.php =================================================================== --- trunk/SelectSupplier.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SelectSupplier.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -88,7 +88,7 @@ ORDER BY suppname"; } else { if (mb_strlen($_POST['Keywords']) > 0) { - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; $SQL = "SELECT supplierid, @@ -102,7 +102,7 @@ WHERE suppname " . LIKE . " '" . $SearchString . "' ORDER BY suppname"; } elseif (mb_strlen($_POST['SupplierCode']) > 0) { - $_POST['SupplierCode'] = strtoupper($_POST['SupplierCode']); + $_POST['SupplierCode'] = mb_strtoupper($_POST['SupplierCode']); $SQL = "SELECT supplierid, suppname, currcode, Modified: trunk/SelectWorkOrder.php =================================================================== --- trunk/SelectWorkOrder.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SelectWorkOrder.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -89,9 +89,9 @@ } if (isset($_POST['StockID'])){ - $StockID = trim(strtoupper($_POST['StockID'])); + $StockID = trim(mb_strtoupper($_POST['Stoc... [truncated message content] |
From: <dai...@us...> - 2011-07-03 04:33:28
|
Revision: 4622 http://web-erp.svn.sourceforge.net/web-erp/?rev=4622&view=rev Author: daintree Date: 2011-07-03 04:33:19 +0000 (Sun, 03 Jul 2011) Log Message: ----------- strtoupper to mb_strtoupper Modified Paths: -------------- trunk/AccountGroups.php trunk/Areas.php trunk/BOMExtendedQty.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/BOMInquiry.php trunk/Contracts.php trunk/CounterSales.php trunk/Currencies.php trunk/CustomerBranches.php trunk/CustomerTypes.php trunk/Customers.php trunk/DiscountCategories.php trunk/Factors.php trunk/FixedAssetCategories.php trunk/FixedAssetDepreciation.php trunk/FixedAssetItems.php trunk/GetStockImage.php trunk/Locations.php trunk/MRPCalendar.php trunk/MRPDemandTypes.php trunk/MRPDemands.php trunk/MRPReport.php trunk/Numbers/Words/lang.dk.php trunk/Numbers/Words/lang.en_GB.php trunk/Numbers/Words/lang.en_US.php trunk/Numbers/Words/lang.es_AR.php trunk/Numbers/Words/lang.he.php trunk/Numbers/Words/lang.hu_HU.php trunk/Numbers/Words/lang.pl.php trunk/Numbers/Words/lang.pt_BR.php trunk/Numbers/Words/lang.ru.php trunk/POReport.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/PrintCustStatements.php trunk/PurchData.php trunk/SalesCategories.php trunk/SalesInquiry.php trunk/SalesPeople.php trunk/SalesTypes.php trunk/SelectAsset.php trunk/SelectCustomer.php trunk/SelectOrderItems.php trunk/SelectProduct.php trunk/SelectSalesOrder.php trunk/SelectSupplier.php trunk/SelectWorkOrder.php trunk/SpecialOrder.php trunk/StockAdjustments.php trunk/StockCategories.php trunk/StockCostUpdate.php trunk/StockLocMovements.php trunk/StockLocStatus.php trunk/StockLocTransfer.php trunk/StockMovements.php trunk/StockQuantityByDate.php trunk/StockReorderLevel.php trunk/StockSerialItems.php trunk/StockStatus.php trunk/StockTransfers.php trunk/StockUsage.php trunk/StockUsageGraph.php trunk/Stocks.php trunk/SupplierTypes.php trunk/Suppliers.php trunk/WhereUsedInquiry.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/Z_ChangeStockCategory.php trunk/Z_ChangeStockCode.php trunk/Z_ImportFixedAssets.php trunk/Z_ImportStocks.php trunk/Z_MakeNewCompany.php trunk/Z_poAddLanguage.php trunk/doc/Change.log trunk/includes/DefineCartClass.php trunk/includes/MiscFunctions.php trunk/includes/htmlMimeMail.php trunk/includes/mimePart.php trunk/includes/tcpdf/2dbarcodes.php trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/tcpdf.php trunk/reportwriter/WriteForm.inc trunk/reportwriter/admin/RCFunctions.inc Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/AccountGroups.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -262,7 +262,7 @@ <td>' . $PandLText . '</td> <td>' . $myrow[4] . '</td>'; echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?SelectedAccountGroup=' . htmlentities($myrow[0], ENT_QUOTES,'UTF-8') . '">' . _('Edit') . '</a></td>'; - echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?SelectedAccountGroup=' . htmlentities($myrow[0], ENT_QUOTES,'UTF-8') . '&delete=1">' . _('Delete') .'</a></td></tr>'; + echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?SelectedAccountGroup=' . htmlentities($myrow[0], ENT_QUOTES,'UTF-8') . '&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this account group?') . '\');">' . _('Delete') .'</a></td></tr>'; } //END WHILE LIST LOOP echo '</table>'; Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Areas.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -10,9 +10,9 @@ if (isset($_GET['SelectedArea'])){ - $SelectedArea = strtoupper($_GET['SelectedArea']); + $SelectedArea = mb_strtoupper($_GET['SelectedArea']); } elseif (isset($_POST['SelectedArea'])){ - $SelectedArea = strtoupper($_POST['SelectedArea']); + $SelectedArea = mb_strtoupper($_POST['SelectedArea']); } if (isset($Errors)) { @@ -30,7 +30,7 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - $_POST['AreaCode'] = strtoupper($_POST['AreaCode']); + $_POST['AreaCode'] = mb_strtoupper($_POST['AreaCode']); $sql = "SELECT count(areacode) from areas WHERE areacode='".$_POST['AreaCode']."'"; $result = DB_query($sql, $db); $myrow = DB_fetch_row($result); Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/BOMExtendedQty.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -303,7 +303,7 @@ $YPos -=$line_height; $pdf->addTextWrap($Left_Margin,$YPos,300,$FontSize,_('Extended Quantity BOM Listing For ') - . strtoupper($_POST['Part'])); + . mb_strtoupper($_POST['Part'])); $pdf->addTextWrap($Page_Width-$Right_Margin-140,$YPos,160,$FontSize,_('Printed') . ': ' . Date($_SESSION['DefaultDateFormat']) . ' ' . _('Page') . ' ' . $PageNumber,'left'); $YPos -=$line_height; Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/BOMIndented.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -315,7 +315,7 @@ $YPos =$YPos - (2*$line_height); $pdf->addTextWrap($Left_Margin+1,$YPos,40,$FontSize,_('Assembly:'),'',0); - $pdf->addTextWrap(85,$YPos,100,$FontSize,strtoupper($_POST['Part']),'',0); + $pdf->addTextWrap(85,$YPos,100,$FontSize,mb_strtoupper($_POST['Part']),'',0); $pdf->addTextWrap(185,$YPos,150,$FontSize,$assemblydesc,'',0); $YPos -=(2*$line_height); $Xpos = $Left_Margin+5; Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/BOMIndentedReverse.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -291,7 +291,7 @@ $YPos =$YPos - $line_height; $pdf->addTextWrap($Left_Margin+1,$YPos,60,$FontSize,_('Component:'),'',0); - $pdf->addTextWrap(100,$YPos,100,$FontSize,strtoupper($_POST['Part']),'',0); + $pdf->addTextWrap(100,$YPos,100,$FontSize,mb_strtoupper($_POST['Part']),'',0); $pdf->addTextWrap(200,$YPos,150,$FontSize,$assemblydesc,'',0); $YPos -=(2*$line_height); $Xpos = $Left_Margin+5; Modified: trunk/BOMInquiry.php =================================================================== --- trunk/BOMInquiry.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/BOMInquiry.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -7,9 +7,9 @@ include('includes/header.inc'); if (isset($_GET['StockID'])){ - $StockID =trim(strtoupper($_GET['StockID'])); + $StockID =trim(mb_strtoupper($_GET['StockID'])); } elseif (isset($_POST['StockID'])){ - $StockID =trim(strtoupper($_POST['StockID'])); + $StockID =trim(mb_strtoupper($_POST['StockID'])); } if (!isset($_POST['StockID'])) { Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Contracts.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -107,7 +107,7 @@ $filename = $_SESSION['part_pics_dir'] . '/' . $_SESSION['Contract'.$identifier]->ContractRef . '.jpg'; //But check for the worst - if (strtoupper(mb_substr(trim($_FILES['Drawing']['name']),mb_strlen($_FILES['Drawing']['name'])-3))!='JPG'){ + if (mb_strtoupper(mb_substr(trim($_FILES['Drawing']['name']),mb_strlen($_FILES['Drawing']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['Drawing']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check @@ -611,7 +611,7 @@ } else { if (mb_strlen($_POST['CustKeywords'])>0) { //insert wildcard characters in spaces - $_POST['CustKeywords'] = strtoupper(trim($_POST['CustKeywords'])); + $_POST['CustKeywords'] = mb_strtoupper(trim($_POST['CustKeywords'])); $SearchString = '%' . str_replace(' ', '%', $_POST['CustKeywords']) . '%'; $SQL = "SELECT custbranch.brname, @@ -630,7 +630,7 @@ } elseif (mb_strlen($_POST['CustCode'])>0){ - $_POST['CustCode'] = strtoupper(trim($_POST['CustCode'])); + $_POST['CustCode'] = mb_strtoupper(trim($_POST['CustCode'])); $SQL = "SELECT custbranch.brname, custbranch.contactname, Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/CounterSales.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -223,7 +223,7 @@ } if (isset($_POST['Keywords']) AND mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; if ($_POST['StockCat']=='All'){ @@ -256,7 +256,7 @@ } else if (mb_strlen($_POST['StockCode'])>0){ - $_POST['StockCode'] = strtoupper($_POST['StockCode']); + $_POST['StockCode'] = mb_strtoupper($_POST['StockCode']); $SearchString = '%' . $_POST['StockCode'] . '%'; if ($_POST['StockCat']=='All'){ @@ -382,7 +382,7 @@ $i++; if (isset($_POST[$QuickEntryCode])) { - $NewItem = strtoupper($_POST[$QuickEntryCode]); + $NewItem = mb_strtoupper($_POST[$QuickEntryCode]); } if (isset($_POST[$QuickEntryQty])) { $NewItemQty = $_POST[$QuickEntryQty]; Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Currencies.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -237,7 +237,7 @@ $k++; } // Lets show the country flag - $ImageFile = 'flags/' . strtoupper($myrow[1]) . '.gif'; + $ImageFile = 'flags/' . mb_strtoupper($myrow[1]) . '.gif'; if(!file_exists($ImageFile)){ $ImageFile = 'flags/blank.gif'; Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/CustomerBranches.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -7,9 +7,9 @@ include('includes/header.inc'); if (isset($_GET['DebtorNo'])) { - $DebtorNo = strtoupper($_GET['DebtorNo']); + $DebtorNo = mb_strtoupper($_GET['DebtorNo']); } else if (isset($_POST['DebtorNo'])){ - $DebtorNo = strtoupper($_POST['DebtorNo']); + $DebtorNo = mb_strtoupper($_POST['DebtorNo']); } if (!isset($DebtorNo)) { @@ -22,9 +22,9 @@ if (isset($_GET['SelectedBranch'])){ - $SelectedBranch = strtoupper($_GET['SelectedBranch']); + $SelectedBranch = mb_strtoupper($_GET['SelectedBranch']); } else if (isset($_POST['SelectedBranch'])){ - $SelectedBranch = strtoupper($_POST['SelectedBranch']); + $SelectedBranch = mb_strtoupper($_POST['SelectedBranch']); } if (isset($Errors)) { @@ -44,7 +44,7 @@ //first off validate inputs sensible - $_POST['BranchCode'] = strtoupper($_POST['BranchCode']); + $_POST['BranchCode'] = mb_strtoupper($_POST['BranchCode']); if (ContainsIllegalCharacters($_POST['BranchCode']) OR strstr($_POST['BranchCode'],' ')) { $InputError = 1; Modified: trunk/CustomerTypes.php =================================================================== --- trunk/CustomerTypes.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/CustomerTypes.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -7,9 +7,9 @@ include('includes/header.inc'); if (isset($_POST['SelectedType'])){ - $SelectedType = strtoupper($_POST['SelectedType']); + $SelectedType = mb_strtoupper($_POST['SelectedType']); } elseif (isset($_GET['SelectedType'])){ - $SelectedType = strtoupper($_GET['SelectedType']); + $SelectedType = mb_strtoupper($_GET['SelectedType']); } if (isset($Errors)) { Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Customers.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -29,7 +29,7 @@ //first off validate inputs sensible - $_POST['DebtorNo'] = strtoupper($_POST['DebtorNo']); + $_POST['DebtorNo'] = mb_strtoupper($_POST['DebtorNo']); $sql="SELECT COUNT(debtorno) FROM debtorsmaster WHERE debtorno='".$_POST['DebtorNo']."'"; $result=DB_query($sql,$db); Modified: trunk/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/DiscountCategories.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -31,7 +31,7 @@ FROM stockmaster WHERE mbflag <>'K' AND mbflag<>'D' - AND stockid='" . strtoupper($_POST['StockID']) . "'",$db); + AND stockid='" . mb_strtoupper($_POST['StockID']) . "'",$db); if (DB_num_rows($result)==0){ $InputError = 1; prnMsg(_('The stock item entered must be set up as either a manufactured or purchased or assembly item'),'warn'); @@ -40,9 +40,9 @@ if ($InputError !=1) { $sql = "UPDATE stockmaster SET discountcategory='" . $_POST['DiscountCategory'] . "' - WHERE stockid='" . strtoupper($_POST['StockID']) . "'"; + WHERE stockid='" . mb_strtoupper($_POST['StockID']) . "'"; - $result = DB_query($sql,$db, _('The discount category') . ' ' . $_POST['DiscountCategory'] . ' ' . _('record for') . ' ' . strtoupper($_POST['StockID']) . ' ' . _('could not be updated because')); + $result = DB_query($sql,$db, _('The discount category') . ' ' . $_POST['DiscountCategory'] . ' ' . _('record for') . ' ' . mb_strtoupper($_POST['StockID']) . ' ' . _('could not be updated because')); prnMsg(_('The stock master has been updated with this discount category'),'success'); unset($_POST['DiscountCategory']); @@ -53,7 +53,7 @@ } elseif (isset($_GET['Delete']) and $_GET['Delete']=='yes') { /*the link to delete a selected record was clicked instead of the submit button */ - $sql="UPDATE stockmaster SET discountcategory='' WHERE stockid='" . trim(strtoupper($_GET['StockID'])) ."'"; + $sql="UPDATE stockmaster SET discountcategory='' WHERE stockid='" . trim(mb_strtoupper($_GET['StockID'])) ."'"; $result = DB_query($sql,$db); prnMsg( _('The stock master record has been updated to no discount category'),'success'); echo '<br />'; Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Factors.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -9,10 +9,10 @@ include('includes/header.inc'); if (isset($_GET['FactorID'])){ - $FactorID = strtoupper($_GET['FactorID']); + $FactorID = mb_strtoupper($_GET['FactorID']); $_POST['Amend']=True; } elseif (isset($_POST['FactorID'])){ - $FactorID = strtoupper($_POST['FactorID']); + $FactorID = mb_strtoupper($_POST['FactorID']); } else { unset($FactorID); } Modified: trunk/FixedAssetCategories.php =================================================================== --- trunk/FixedAssetCategories.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/FixedAssetCategories.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -12,9 +12,9 @@ _('Fixed Asset Categories') . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_GET['SelectedCategory'])){ - $SelectedCategory = strtoupper($_GET['SelectedCategory']); + $SelectedCategory = mb_strtoupper($_GET['SelectedCategory']); } else if (isset($_POST['SelectedCategory'])){ - $SelectedCategory = strtoupper($_POST['SelectedCategory']); + $SelectedCategory = mb_strtoupper($_POST['SelectedCategory']); } if (isset($_POST['submit'])) { @@ -27,7 +27,7 @@ //first off validate inputs sensible - $_POST['CategoryID'] = strtoupper($_POST['CategoryID']); + $_POST['CategoryID'] = mb_strtoupper($_POST['CategoryID']); if (mb_strlen($_POST['CategoryID']) > 6) { $InputError = 1; @@ -96,13 +96,12 @@ depnact, disposalact, accumdepnact) - VALUES ( - '" . $_POST['CategoryID'] . "', - '" . $_POST['CategoryDescription'] . "', - '" . $_POST['CostAct'] . "', - '" . $_POST['DepnAct'] . "', - '" . $_POST['DisposalAct'] . "', - '" . $_POST['AccumDepnAct'] . "')"; + VALUES ('" . $_POST['CategoryID'] . "', + '" . $_POST['CategoryDescription'] . "', + '" . $_POST['CostAct'] . "', + '" . $_POST['DepnAct'] . "', + '" . $_POST['DisposalAct'] . "', + '" . $_POST['AccumDepnAct'] . "')"; $ErrMsg = _('Could not insert the new fixed asset category') . $_POST['CategoryDescription'] . _('because'); $result = DB_query($sql,$db,$ErrMsg); prnMsg(_('A new fixed asset category record has been added for') . ' ' . $_POST['CategoryDescription'],'success'); @@ -144,22 +143,25 @@ links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ - $sql = 'SELECT categoryid, + $sql = "SELECT categoryid, categorydescription, costact, depnact, disposalact, accumdepnact - FROM fixedassetcategories'; + FROM fixedassetcategories"; $result = DB_query($sql,$db); - echo '<br /><table class=selection>'; - echo '<tr><th>' . _('Cat Code') . '</th> + echo '<br /> + <table class="selection">'; + echo '<tr> + <th>' . _('Cat Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Cost GL') . '</th> <th>' . _('P & L Depn GL') . '</th> <th>' . _('Disposal GL') . '</th> - <th>' . _('Accum Depn GL') . '</th></tr>'; + <th>' . _('Accum Depn GL') . '</th> + </tr>'; $k=0; //row colour counter @@ -178,7 +180,7 @@ <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 fixed asset category? Additional checks will be performed before actual deletion to ensure data integrity is not compromised.') . '");">' . _('Delete') . '</td> + <td><a href="%sSelectedCategory=%s&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this fixed asset category? Additional checks will be performed before actual deletion to ensure data integrity is not compromised.') . '\');">' . _('Delete') . '</td> </tr>', $myrow['categoryid'], $myrow['categorydescription'], @@ -186,9 +188,9 @@ $myrow['depnact'], $myrow['disposalact'], $myrow['accumdepnact'], - $_SERVER['PHP_SELF'] . '?' . SID, + $_SERVER['PHP_SELF'] . '?', $myrow['categoryid'], - $_SERVER['PHP_SELF'] . '?' . SID, + $_SERVER['PHP_SELF'] . '?', $myrow['categoryid']); } //END WHILE LIST LOOP @@ -201,7 +203,7 @@ echo '<br /><div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '">' ._('Show All Fixed Asset Categories') . '</a></div>'; } -echo '<form name="CategoryForm" method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; +echo '<form name="CategoryForm" method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedCategory) and !isset($_POST['submit'])) { @@ -238,23 +240,21 @@ } //SQL to poulate account selection boxes -$sql = 'SELECT accountcode, +$sql = "SELECT accountcode, accountname - FROM chartmaster, - accountgroups - WHERE chartmaster.group_=accountgroups.groupname and - accountgroups.pandl=0 - ORDER BY accountcode'; + FROM chartmaster INNER JOIN accountgroups + ON chartmaster.group_=accountgroups.groupname + WHERE accountgroups.pandl=0 + ORDER BY accountcode"; $BSAccountsResult = DB_query($sql,$db); -$sql = 'SELECT accountcode, +$sql = "SELECT accountcode, accountname - FROM chartmaster, - accountgroups - WHERE chartmaster.group_=accountgroups.groupname and - accountgroups.pandl!=0 - ORDER BY accountcode'; + FROM chartmaster INNER JOIN accountgroups + ON chartmaster.group_=accountgroups.groupname + WHERE accountgroups.pandl!=0 + ORDER BY accountcode"; $PnLAccountsResult = DB_query($sql,$db); Modified: trunk/FixedAssetDepreciation.php =================================================================== --- trunk/FixedAssetDepreciation.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/FixedAssetDepreciation.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -9,13 +9,13 @@ /*Get the last period depreciation (depn is transtype =44) was posted for */ -$result = DB_query('SELECT periods.lastdate_in_period, +$result = DB_query("SELECT periods.lastdate_in_period, max(fixedassettrans.periodno) FROM fixedassettrans INNER JOIN periods ON fixedassettrans.periodno=periods.periodno WHERE transtype=44 GROUP BY periods.lastdate_in_period - ORDER BY periods.lastdate_in_period DESC',$db); + ORDER BY periods.lastdate_in_period DESC",$db); $LastDepnRun = DB_fetch_row($result); @@ -65,7 +65,7 @@ fixedassetcategories.accumdepnact, fixedassetcategories.depnact, fixedassetcategories.categorydescription -ORDER BY assetcategoryid, assetid"; + ORDER BY assetcategoryid, assetid"; $AssetsResult=DB_query($sql, $db); $InputError = false; //always hope for the best @@ -104,11 +104,11 @@ if ($AssetCategoryDescription != $AssetRow['categorydescription'] OR $AssetCategoryDescription =='0'){ if ($AssetCategoryDescription !='0'){ //then print totals echo '<tr><th colspan=3 align="right">' . _('Total for') . ' ' . $AssetCategoryDescription . ' </th> - <th class="number">' . number_format($TotalCategoryCost,2) . '</th> - <th class="number">' . number_format($TotalCategoryAccumDepn,2) . '</th> - <th class="number">' . number_format(($TotalCategoryCost-$TotalCategoryAccumDepn),2) . '</th> + <th class="number">' . number_format($TotalCategoryCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format($TotalCategoryAccumDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format(($TotalCategoryCost-$TotalCategoryAccumDepn),$_SESSION['CompanyRecord']['decimalplaces']) . '</th> <th colspan=2></th> - <th class="number">' . number_format($TotalCategoryDepn,2) . '</th> + <th class="number">' . number_format($TotalCategoryDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> </tr>'; } echo '<tr><th colspan=9 align="left">' . $AssetRow['categorydescription'] . '</th></tr>'; @@ -147,12 +147,12 @@ echo '<td>' . $AssetRow['assetid'] . '</td> <td>' . $AssetRow['description'] . '</td> <td>' . ConvertSQLDate($AssetRow['datepurchased']) . '</td> - <td class="number">' . number_format($AssetRow['costtotal'],2) . '</td> - <td class="number">' . number_format($AssetRow['depnbfwd'],2) . '</td> - <td class="number">' . number_format($AssetRow['costtotal']-$AssetRow['depnbfwd'],2) . '</td> + <td class="number">' . number_format($AssetRow['costtotal'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . number_format($AssetRow['depnbfwd'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . number_format($AssetRow['costtotal']-$AssetRow['depnbfwd'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> <td align="center">' . $DepreciationType . '</td> <td class="number">' . $AssetRow['depnrate'] . '</td> - <td class="number">' . number_format($NewDepreciation ,2) . '</td> + <td class="number">' . number_format($NewDepreciation ,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> </tr>'; $TotalCategoryCost +=$AssetRow['costtotal']; $TotalCategoryAccumDepn +=$AssetRow['depnbfwd']; @@ -227,18 +227,18 @@ } //end if Committing the depreciation to DB } //end loop around the assets to calculate depreciation for echo '<tr><th colspan=3 align="right">' . _('Total for') . ' ' . $AssetCategoryDescription . ' </th> - <th class="number">' . number_format($TotalCategoryCost,2) . '</th> - <th class="number">' . number_format($TotalCategoryAccumDepn,2) . '</th> - <th class="number">' . number_format(($TotalCategoryCost-$TotalCategoryAccumDepn),2) . '</th> + <th class="number">' . number_format($TotalCategoryCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format($TotalCategoryAccumDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format(($TotalCategoryCost-$TotalCategoryAccumDepn),$_SESSION['CompanyRecord']['decimalplaces']) . '</th> <th colspan=2></th> - <th class="number">' . number_format($TotalCategoryDepn,2) . '</th> + <th class="number">' . number_format($TotalCategoryDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> </tr>'; echo '<tr><th colspan=3 align="right">' . _('GRAND Total') . ' </th> - <th class="number">' . number_format($TotalCost,2) . '</th> - <th class="number">' . number_format($TotalAccumDepn,2) . '</th> - <th class="number">' . number_format(($TotalCost-$TotalAccumDepn),2) . '</th> + <th class="number">' . number_format($TotalCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format($TotalAccumDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format(($TotalCost-$TotalAccumDepn),$_SESSION['CompanyRecord']['decimalplaces']) . '</th> <th colspan=2></th> - <th class="number">' . number_format($TotalDepn,2) . '</th> + <th class="number">' . number_format($TotalDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> </tr>'; echo '</table><hr><p></p>'; @@ -247,11 +247,11 @@ $result = DB_Txn_Commit($db); prnMsg(_('Depreciation') . ' ' . $TransNo . ' ' . _('has been successfully entered'),'success'); unset($_POST['ProcessDate']); - echo '<br /><a href="index.php' . '?' . SID . '">' ._('Return to main menu').'</a>'; + echo '<br /><a href="index.php">' ._('Return to main menu').'</a>'; /*And post the journal too */ include ('includes/GLPostings.inc'); } else { - echo '<form action=' . $_SERVER['PHP_SELF'] . '?' . SID . ' method=post name="form">'; + echo '<form action=' . $_SERVER['PHP_SELF'] . ' 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 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/FixedAssetItems.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -30,7 +30,7 @@ $filename = $_SESSION['part_pics_dir'] . '/ASSET_' . $AssetID . '.jpg'; //But check for the worst - if (strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ + if (mb_strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['ItemPicture']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check Modified: trunk/GetStockImage.php =================================================================== --- trunk/GetStockImage.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/GetStockImage.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -68,7 +68,7 @@ } $filepath = $_SESSION['part_pics_dir'] . $pathsep; -$stockid = trim(strtoupper($_GET['StockID'])); +$stockid = trim(mb_strtoupper($_GET['StockID'])); if( isset($_GET['bgcolor']) ) $bgcolor = $_GET['bgcolor']; if( isset($_GET['textcolor']) ) Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Locations.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -22,7 +22,7 @@ /* actions to take once the user has clicked the submit button ie the page has called itself with some user input */ - $_POST['LocCode']=strtoupper($_POST['LocCode']); + $_POST['LocCode']=mb_strtoupper($_POST['LocCode']); if( trim($_POST['LocCode']) == '' ) { $InputError = 1; prnMsg( _('The location code may not be empty'), 'error'); Modified: trunk/MRPCalendar.php =================================================================== --- trunk/MRPCalendar.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/MRPCalendar.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -11,9 +11,9 @@ if (isset($_POST['ChangeDate'])){ - $ChangeDate =trim(strtoupper($_POST['ChangeDate'])); + $ChangeDate =trim(mb_strtoupper($_POST['ChangeDate'])); } elseif (isset($_GET['ChangeDate'])){ - $ChangeDate =trim(strtoupper($_GET['ChangeDate'])); + $ChangeDate =trim(mb_strtoupper($_GET['ChangeDate'])); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . Modified: trunk/MRPDemandTypes.php =================================================================== --- trunk/MRPDemandTypes.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/MRPDemandTypes.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -8,9 +8,9 @@ //SelectedDT is the Selected MRPDemandType if (isset($_POST['SelectedDT'])){ - $SelectedDT = trim(strtoupper($_POST['SelectedDT'])); + $SelectedDT = trim(mb_strtoupper($_POST['SelectedDT'])); } elseif (isset($_GET['SelectedDT'])){ - $SelectedDT = trim(strtoupper($_GET['SelectedDT'])); + $SelectedDT = trim(mb_strtoupper($_GET['SelectedDT'])); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . @@ -26,8 +26,8 @@ //first off validate inputs sensible - if (trim(strtoupper($_POST['MRPDemandType']) == 'WO') or - trim(strtoupper($_POST['MRPDemandType']) == 'SO')) { + if (trim(mb_strtoupper($_POST['MRPDemandType']) == 'WO') or + trim(mb_strtoupper($_POST['MRPDemandType']) == 'SO')) { $InputError = 1; prnMsg(_('The Demand Type is reserved for the system'),'error'); } @@ -57,7 +57,7 @@ $sql = "INSERT INTO mrpdemandtypes (mrpdemandtype, description) - VALUES ('" . trim(strtoupper($_POST['MRPDemandType'])) . "', + VALUES ('" . trim(mb_strtoupper($_POST['MRPDemandType'])) . "', '" . $_POST['Description'] . "' )"; $msg = _('The new demand type has been added to the database'); Modified: trunk/MRPDemands.php =================================================================== --- trunk/MRPDemands.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/MRPDemands.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -18,9 +18,9 @@ } if (isset($_POST['StockID'])){ - $StockID =trim(strtoupper($_POST['StockID'])); + $StockID =trim(mb_strtoupper($_POST['StockID'])); } elseif (isset($_GET['StockID'])){ - $StockID =trim(strtoupper($_GET['StockID'])); + $StockID =trim(mb_strtoupper($_GET['StockID'])); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . @@ -191,7 +191,7 @@ if ($myrow[0]>0) { //If $myrow[0] > 0, it means this is an edit, so do an update $sql = "UPDATE mrpdemands SET quantity = '" . $_POST['Quantity'] . "', - mrpdemandtype = '" . trim(strtoupper($_POST['MRPDemandtype'])) . "', + mrpdemandtype = '" . trim(mb_strtoupper($_POST['MRPDemandtype'])) . "', duedate = '" . $FormatedDuedate . "' WHERE demandid = '" . $DemandID . "'"; $msg = _("The MRP demand record has been updated for").' '.$StockID; @@ -203,7 +203,7 @@ quantity, duedate) VALUES ('" . $StockID . "', - '" . trim(strtoupper($_POST['MRPDemandtype'])) . "', + '" . trim(mb_strtoupper($_POST['MRPDemandtype'])) . "', '" . $_POST['Quantity'] . "', '" . $FormatedDuedate . "' )"; Modified: trunk/MRPReport.php =================================================================== --- trunk/MRPReport.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/MRPReport.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -569,7 +569,7 @@ } if ($_POST['Keywords']) { //insert wildcard characters in spaces - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; if ($_POST['StockCat'] == 'All') { $SQL = "SELECT stockmaster.stockid, @@ -608,7 +608,7 @@ ORDER BY stockmaster.stockid"; } } elseif (isset($_POST['StockCode'])) { - $_POST['StockCode'] = strtoupper($_POST['StockCode']); + $_POST['StockCode'] = mb_strtoupper($_POST['StockCode']); if ($_POST['StockCat'] == 'All') { $SQL = "SELECT stockmaster.stockid, stockmaster.description, Modified: trunk/Numbers/Words/lang.dk.php =================================================================== --- trunk/Numbers/Words/lang.dk.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Numbers/Words/lang.dk.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -368,7 +368,7 @@ * @since Numbers_Words 0.4 */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.en_GB.php =================================================================== --- trunk/Numbers/Words/lang.en_GB.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Numbers/Words/lang.en_GB.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -380,7 +380,7 @@ * @since Numbers_Words 0.13.1 */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.en_US.php =================================================================== --- trunk/Numbers/Words/lang.en_US.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Numbers/Words/lang.en_US.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -472,7 +472,7 @@ * @since Numbers_Words 0.4 */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.es_AR.php =================================================================== --- trunk/Numbers/Words/lang.es_AR.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Numbers/Words/lang.es_AR.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -430,7 +430,7 @@ * @author Martin Marrese */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.he.php =================================================================== --- trunk/Numbers/Words/lang.he.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Numbers/Words/lang.he.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -462,7 +462,7 @@ * @since Numbers_Words 0.4 */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.hu_HU.php =================================================================== --- trunk/Numbers/Words/lang.hu_HU.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Numbers/Words/lang.hu_HU.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -359,7 +359,7 @@ * @since Numbers_Words 0.4 */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.pl.php =================================================================== --- trunk/Numbers/Words/lang.pl.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Numbers/Words/lang.pl.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -439,7 +439,7 @@ * @since Numbers_Words 0.4 */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.pt_BR.php =================================================================== --- trunk/Numbers/Words/lang.pt_BR.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Numbers/Words/lang.pt_BR.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -279,7 +279,7 @@ * @since Numbers_Words 0.10.1 */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_name[$int_curr])){ $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.ru.php =================================================================== --- trunk/Numbers/Words/lang.ru.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Numbers/Words/lang.ru.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -599,7 +599,7 @@ */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/POReport.php =================================================================== --- trunk/POReport.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/POReport.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -21,18 +21,18 @@ if (isset($_POST['submit']) or isset($_POST['submitcsv'])) { if (isset($_POST['PartNumber'])){ - $PartNumber = trim(strtoupper($_POST['PartNumber'])); + $PartNumber = trim(mb_strtoupper($_POST['PartNumber'])); } elseif (isset($_GET['PartNumber'])){ - $PartNumber = trim(strtoupper($_GET['PartNumber'])); + $PartNumber = trim(mb_strtoupper($_GET['PartNumber'])); } # Part Number operator - either LIKE or = $PartNumberOp = $_POST['PartNumberOp']; if (isset($_POST['SupplierId'])){ - $SupplierId = trim(strtoupper($_POST['SupplierId'])); + $SupplierId = trim(mb_strtoupper($_POST['SupplierId'])); } elseif (isset($_GET['SupplierId'])){ - $SupplierId = trim(strtoupper($_GET['SupplierId'])); + $SupplierId = trim(mb_strtoupper($_GET['SupplierId'])); } $SupplierIdOp = $_POST['SupplierIdOp']; @@ -45,9 +45,9 @@ } if (isset($_POST['SupplierName'])){ - $SupplierName = trim(strtoupper($_POST['SupplierName'])); + $SupplierName = trim(mb_strtoupper($_POST['SupplierName'])); } elseif (isset($_GET['SupplierName'])){ - $SupplierName = trim(strtoupper($_GET['SupplierName'])); + $SupplierName = trim(mb_strtoupper($_GET['SupplierName'])); } // Had to add supplierid to SummaryType when do summary by name because there could be several accounts Modified: trunk/PcAssignCashToTab.php =================================================================== --- trunk/PcAssignCashToTab.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/PcAssignCashToTab.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -6,9 +6,9 @@ include('includes/header.inc'); if (isset($_POST['SelectedTabs'])){ - $SelectedTabs = strtoupper($_POST['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_POST['SelectedTabs']); } elseif (isset($_GET['SelectedTabs'])){ - $SelectedTabs = strtoupper($_GET['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_GET['SelectedTabs']); } if (isset($_POST['SelectedIndex'])){ Modified: trunk/PcAuthorizeExpenses.php =================================================================== --- trunk/PcAuthorizeExpenses.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/PcAuthorizeExpenses.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -7,9 +7,9 @@ include('includes/SQL_CommonFunctions.inc'); if (isset($_POST['SelectedTabs'])){ - $SelectedTabs = strtoupper($_POST['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_POST['SelectedTabs']); } elseif (isset($_GET['SelectedTabs'])){ - $SelectedTabs = strtoupper($_GET['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_GET['SelectedTabs']); } if (isset($_POST['SelectedIndex'])){ Modified: trunk/PcClaimExpensesFromTab.php =================================================================== --- trunk/PcClaimExpensesFromTab.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/PcClaimExpensesFromTab.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -8,9 +8,9 @@ if (isset($_POST['SelectedTabs'])){ - $SelectedTabs = strtoupper($_POST['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_POST['SelectedTabs']); } elseif (isset($_GET['SelectedTabs'])){ - $SelectedTabs = strtoupper($_GET['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_GET['SelectedTabs']); } if (isset($_POST['SelectedIndex'])){ Modified: trunk/PcExpenses.php =================================================================== --- trunk/PcExpenses.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/PcExpenses.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -10,9 +10,9 @@ . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_POST['SelectedExpense'])){ - $SelectedExpense = strtoupper($_POST['SelectedExpense']); + $SelectedExpense = mb_strtoupper($_POST['SelectedExpense']); } elseif (isset($_GET['SelectedExpense'])){ - $SelectedExpense = strtoupper($_GET['SelectedExpense']); + $SelectedExpense = mb_strtoupper($_GET['SelectedExpense']); } if (isset($_POST['Cancel'])) { Modified: trunk/PcExpensesTypeTab.php =================================================================== --- trunk/PcExpensesTypeTab.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/PcExpensesTypeTab.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -10,9 +10,9 @@ . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_POST['SelectedType'])){ - $SelectedType = strtoupper($_POST['SelectedType']); + $SelectedType = mb_strtoupper($_POST['SelectedType']); } elseif (isset($_GET['SelectedType'])){ - $SelectedType = strtoupper($_GET['SelectedType']); + $SelectedType = mb_strtoupper($_GET['SelectedType']); } else { $SelectedType=''; } @@ -23,9 +23,9 @@ } if (isset($_POST['SelectedTab'])){ - $SelectedTab = strtoupper($_POST['SelectedTab']); + $SelectedTab = mb_strtoupper($_POST['SelectedTab']); } elseif (isset($_GET['SelectedTab'])){ - $SelectedTab = strtoupper($_GET['SelectedTab']); + $SelectedTab = mb_strtoupper($_GET['SelectedTab']); } if (isset($_POST['Cancel'])) { Modified: trunk/PcReportTab.php =================================================================== --- trunk/PcReportTab.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/PcReportTab.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -8,9 +8,9 @@ $title = _('Petty Cash Management Report'); if (isset($_POST['SelectedTabs'])){ - $SelectedTabs = strtoupper($_POST['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_POST['SelectedTabs']); } elseif (isset($_GET['SelectedTabs'])){ - $SelectedTabs = strtoupper($_GET['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_GET['SelectedTabs']); } if ((! isset($_POST['FromDate']) AND ! isset($_POST['ToDate'])) OR isset($_POST['SelectDifferentDate'])){ Modified: trunk/PcTabs.php =================================================================== --- trunk/PcTabs.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/PcTabs.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -9,9 +9,9 @@ . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_POST['SelectedTab'])){ - $SelectedTab = strtoupper($_POST['SelectedTab']); + $SelectedTab = mb_strtoupper($_POST['SelectedTab']); } elseif (isset($_GET['SelectedTab'])){ - $SelectedTab = strtoupper($_GET['SelectedTab']); + $SelectedTab = mb_strtoupper($_GET['SelectedTab']); } if (isset($_POST['Cancel'])) { Modified: trunk/PcTypeTabs.php =================================================================== --- trunk/PcTypeTabs.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/PcTypeTabs.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -9,9 +9,9 @@ . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_POST['SelectedTab'])){ - $SelectedTab = strtoupper($_POST['SelectedTab']); + $SelectedTab = mb_strtoupper($_POST['SelectedTab']); } elseif (isset($_GET['SelectedTab'])){ - $SelectedTab = strtoupper($_GET['SelectedTab']); + $SelectedTab = mb_strtoupper($_GET['SelectedTab']); } if (isset($Errors)) { Modified: trunk/Prices.php =================================================================== --- trunk/Prices.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Prices.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -14,9 +14,9 @@ if (isset($_GET['Item'])){ - $Item = trim(strtoupper($_GET['Item'])); + $Item = trim(mb_strtoupper($_GET['Item'])); }elseif (isset($_POST['Item'])){ - $Item = trim(strtoupper($_POST['Item'])); + $Item = trim(mb_strtoupper($_POST['Item'])); } if (!isset($_POST['TypeAbbrev']) OR $_POST['TypeAbbrev']==''){ Modified: trunk/PrintCustStatements.php =================================================================== --- trunk/PrintCustStatements.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/PrintCustStatements.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -33,12 +33,12 @@ } If (isset($_POST['PrintPDF']) && isset($_POST['FromCust']) && $_POST['FromCust']!=''){ - $_POST['FromCust'] = strtoupper($_POST['FromCust']); + $_POST['FromCust'] = mb_strtoupper($_POST['FromCust']); If (!isset($_POST['ToCust'])){ $_POST['ToCust'] = $_POST['FromCust']; } else { - $_POST['ToCust'] = strtoupper($_POST['ToCust']); + $_POST['ToCust'] = mb_strtoupper($_POST['ToCust']); } include('includes/PDFStarter.php'); $pdf->addInfo('Title', _('Customer Statements') ); Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/PurchData.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -8,15 +8,15 @@ include ('includes/header.inc'); if (isset($_GET['SupplierID'])) { - $SupplierID = trim(strtoupper($_GET['SupplierID'])); + $SupplierID = trim(mb_strtoupper($_GET['SupplierID'])); } elseif (isset($_POST['SupplierID'])) { - $SupplierID = trim(strtoupper($_POST['SupplierID'])); + $SupplierID = trim(mb_strtoupper($_POST['SupplierID'])); } if (isset($_GET['StockID'])) { - $StockID = trim(strtoupper($_GET['StockID'])); + $StockID = trim(mb_strtoupper($_GET['StockID'])); } elseif (isset($_POST['StockID'])) { - $StockID = trim(strtoupper($_POST['StockID'])); + $StockID = trim(mb_strtoupper($_POST['StockID'])); } if (isset($_POST['StockUOM'])) { Modified: trunk/SalesCategories.php =================================================================== --- trunk/SalesCategories.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SalesCategories.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -11,24 +11,24 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_GET['SelectedCategory'])){ - $SelectedCategory = strtoupper($_GET['SelectedCategory']); + $SelectedCategory = mb_strtoupper($_GET['SelectedCategory']); } else if (isset($_POST['SelectedCategory'])){ - $SelectedCategory = strtoupper($_POST['SelectedCategory']); + $SelectedCategory = mb_strtoupper($_POST['SelectedCategory']); } if (isset($_GET['ParentCategory'])){ - $ParentCategory = strtoupper($_GET['ParentCategory']); + $ParentCategory = mb_strtoupper($_GET['ParentCategory']); } else if (isset($_POST['ParentCategory'])){ - $ParentCategory = strtoupper($_POST['ParentCategory']); + $ParentCategory = mb_strtoupper($_POST['ParentCategory']); } if( isset($ParentCategory) AND $ParentCategory == 0 ) { unset($ParentCategory); } if (isset($_GET['EditName'])){ - $EditName = strtoupper($_GET['EditName']); + $EditName = mb_strtoupper($_GET['EditName']); } else if (isset($_POST['EditName'])){ - $EditName = strtoupper($_POST['EditName']); + $EditName = mb_strtoupper($_POST['EditName']); } if (isset($SelectedCategory) AND isset($_FILES['ItemPicture']) AND $_FILES['ItemPicture']['name'] !='') { @@ -39,7 +39,7 @@ $FileName = $_SESSION['part_pics_dir'] . '/cat_' . $SelectedCategory . '.jpg'; //But check for the worst - if (strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ + if (mb_strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['ItemPicture']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check Modified: trunk/SalesInquiry.php =================================================================== --- trunk/SalesInquiry.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SalesInquiry.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -20,26 +20,26 @@ } if (isset($_POST['PartNumber'])){ - $PartNumber = trim(strtoupper($_POST['PartNumber'])); + $PartNumber = trim(mb_strtoupper($_POST['PartNumber'])); } elseif (isset($_GET['PartNumber'])){ - $PartNumber = trim(strtoupper($_GET['PartNumber'])); + $PartNumber = trim(mb_strtoupper($_GET['PartNumber'])); } # Part Number operator - either LIKE or = $PartNumberOp = $_POST['PartNumberOp']; if (isset($_POST['DebtorNo'])){ - $DebtorNo = trim(strtoupper($_POST['DebtorNo'])); + $DebtorNo = trim(mb_strtoupper($_POST['DebtorNo'])); } elseif (isset($_GET['DebtorNo'])){ - $DebtorNo = trim(strtoupper($_GET['DebtorNo'])); + $DebtorNo = trim(mb_strtoupper($_GET['DebtorNo'])); } $DebtorNoOp = $_POST['DebtorNoOp']; if (isset($_POST['DebtorName'])){ - $DebtorName = trim(strtoupper($_POST['DebtorName'])); + $DebtorName = trim(mb_strtoupper($_POST['DebtorName'])); } elseif (isset($_GET['DebtorName'])){ - $DebtorName = trim(strtoupper($_GET['DebtorName'])); + $DebtorName = trim(mb_strtoupper($_GET['DebtorName'])); } $DebtorNameOp = $_POST['DebtorNameOp']; Modified: trunk/SalesPeople.php =================================================================== --- trunk/SalesPeople.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SalesPeople.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -6,9 +6,9 @@ include('includes/header.inc'); if (isset($_GET['SelectedSaleperson'])){ - $SelectedSaleperson =strtoupper($_GET['SelectedSaleperson']); + $SelectedSaleperson =mb_strtoupper($_GET['SelectedSaleperson']); } elseif(isset($_POST['SelectedSaleperson'])){ - $SelectedSaleperson =strtoupper($_POST['SelectedSaleperson']); + $SelectedSaleperson =mb_strtoupper($_POST['SelectedSaleperson']); } if (isset($Errors)) { Modified: trunk/SalesTypes.php =================================================================== --- trunk/SalesTypes.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SalesTypes.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -6,9 +6,9 @@ include('includes/header.inc'); if (isset($_POST['SelectedType'])){ - $SelectedType = strtoupper($_POST['SelectedType']); + $SelectedType = mb_strtoupper($_POST['SelectedType']); } elseif (isset($_GET['SelectedType'])){ - $SelectedType = strtoupper($_GET['SelectedType']); + $SelectedType = mb_strtoupper($_GET['SelectedType']); } if (isset($Errors)) { Modified: trunk/SelectAsset.php =================================================================== --- trunk/SelectAsset.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SelectAsset.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -25,7 +25,7 @@ } } if (isset($_POST['AssetCode'])) { - $_POST['AssetCode'] = trim(strtoupper($_POST['AssetCode'])); + $_POST['AssetCode'] = trim(mb_strtoupper($_POST['AssetCode'])); } // Always show the search facilities $SQL = 'SELECT categoryid, @@ -123,7 +123,7 @@ if ($_POST['Keywords']) { //insert wildcard characters in spaces - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; if ($_POST['AssetCategory'] == 'ALL') { if ($_POST['AssetLocation']=='ALL'){ Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SelectCustomer.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -91,7 +91,7 @@ } if (mb_strlen($_POST['Keywords'])>0) { $msg = _('Search Result: Customer Name has been used in search') . '<br />'; - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); } elseif (mb_strlen($_POST['CustCode'])>0) { $msg = _('Search Result: Customer Code has been used in search') . '<br />'; } elseif (mb_strlen($_POST['CustPhone'])>0) { @@ -124,7 +124,7 @@ } else { if (mb_strlen($_POST['Keywords']) > 0) { //using the customer name - $_POST['Keywords'] = strtoupper(trim($_POST['Keywords'])); + $_POST['Keywords'] = mb_strtoupper(trim($_POST['Keywords'])); //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; $SQL = "SELECT debtorsmaster.debtorno, @@ -144,7 +144,7 @@ WHERE debtorsmaster.name " . LIKE . " '" . $SearchString . "' AND debtorsmaster.typeid = debtortype.typeid"; } elseif (mb_strlen($_POST['CustCode']) > 0) { - $_POST['CustCode'] = strtoupper(trim($_POST['CustCode'])); + $_POST['CustCode'] = mb_strtoupper(trim($_POST['CustCode'])); $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name, debtorsmaster.address1, Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SelectOrderItems.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -305,7 +305,7 @@ } else { if (mb_strlen($_POST['CustKeywords'])>0) { //insert wildcard characters in spaces - $_POST['CustKeywords'] = strtoupper(trim($_POST['CustKeywords'])); + $_POST['CustKeywords'] = mb_strtoupper(trim($_POST['CustKeywords'])); $SearchString = '%' . str_replace(' ', '%', $_POST['CustKeywords']) . '%'; $SQL = "SELECT custbranch.brname, @@ -328,7 +328,7 @@ } elseif (mb_strlen($_POST['CustCode'])>0){ - $_POST['CustCode'] = strtoupper(trim($_POST['CustCode'])); + $_POST['CustCode'] = mb_strtoupper(trim($_POST['CustCode'])); $SQL = "SELECT custbranch.brname, custbranch.contactname, @@ -766,7 +766,7 @@ } if (isset($_POST['Keywords']) AND mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; if ($_POST['StockCat']=='All'){ @@ -797,7 +797,7 @@ } elseif (mb_strlen($_POST['StockCode'])>0){ - $_POST['StockCode'] = strtoupper($_POST['StockCode']); + $_POST['StockCode'] = mb_strtoupper($_POST['StockCode']); $SearchString = '%' . $_POST['StockCode'] . '%'; if ($_POST['StockCat']=='All'){ @@ -918,7 +918,7 @@ $i++; if (isset($_POST[$QuickEntryCode])) { - $NewItem = strtoupper($_POST[$QuickEntryCode]); + $NewItem = mb_strtoupper($_POST[$QuickEntryCode]); } if (isset($_POST[$QuickEntryQty])) { $NewItemQty = $_POST[$QuickEntryQty]; Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SelectProduct.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -10,8 +10,8 @@ if (isset($_GET['StockID'])) { //The page is called with a StockID - $_GET['StockID'] = trim(strtoupper($_GET['StockID'])); - $_POST['Select'] = trim(strtoupper($_GET['StockID'])); + $_GET['StockID'] = trim(mb_strtoupper($_GET['StockID'])); + $_POST['Select'] = trim(mb_strtoupper($_GET['StockID'])); } echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/inventory.png" title="' . _('Inventory Items') . '" alt="" />' . ' ' . _('Inventory Items') . '</p>'; if (isset($_GET['NewSearch']) or isset($_POST['Next']) or isset($_POST['Previous']) or isset($_POST['Go'])) { @@ -27,7 +27,7 @@ } } if (isset($_POST['StockCode'])) { - $_POST['StockCode'] = trim(strtoupper($_POST['StockCode'])); + $_POST['StockCode'] = trim(mb_strtoupper($_POST['StockCode'])); } // Always show the search facilities $SQL = "SELECT categoryid, @@ -534,7 +534,7 @@ } if ($_POST['Keywords']) { //insert wildcard characters in spaces - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; if ($_POST['StockCat'] == 'All') { $SQL = "SELECT stockmaster.stockid, @@ -575,7 +575,7 @@ ORDER BY stockmaster.stockid"; } } elseif (isset($_POST['StockCode'])) { - $_POST['StockCode'] = strtoupper($_POST['StockCode']); + $_POST['StockCode'] = mb_strtoupper($_POST['StockCode']); if ($_POST['StockCat'] == 'All') { $SQL = "SELECT stockmaster.stockid, stockmaster.description, Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SelectSalesOrder.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -398,9 +398,9 @@ } if (isset($_POST['StockID'])){ - $StockID = trim(strtoupper($_POST['StockID'])); + $StockID = trim(mb_strtoupper($_POST['StockID'])); } elseif (isset($_GET['StockID'])){ - $StockID = trim(strtoupper($_GET['StockID'])); + $StockID = trim(mb_strtoupper($_GET['StockID'])); } if (!isset($StockID)) { Modified: trunk/SelectSupplier.php =================================================================== --- trunk/SelectSupplier.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SelectSupplier.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -88,7 +88,7 @@ ORDER BY suppname"; } else { if (mb_strlen($_POST['Keywords']) > 0) { - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; $SQL = "SELECT supplierid, @@ -102,7 +102,7 @@ WHERE suppname " . LIKE . " '" . $SearchString . "' ORDER BY suppname"; } elseif (mb_strlen($_POST['SupplierCode']) > 0) { - $_POST['SupplierCode'] = strtoupper($_POST['SupplierCode']); + $_POST['SupplierCode'] = mb_strtoupper($_POST['SupplierCode']); $SQL = "SELECT supplierid, suppname, currcode, Modified: trunk/SelectWorkOrder.php =================================================================== --- trunk/SelectWorkOrder.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/SelectWorkOrder.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -89,9 +89,9 @@ } if (isset($_POST['StockID'])){ - $StockID = trim(strtoupper($_POST['StockID'])); + $StockID = trim(mb_strtoupper($_POST['Stoc... [truncated message content] |
From: <dai...@us...> - 2011-07-03 03:36:00
|
Revision: 4621 http://web-erp.svn.sourceforge.net/web-erp/?rev=4621&view=rev Author: daintree Date: 2011-07-03 03:35:49 +0000 (Sun, 03 Jul 2011) Log Message: ----------- substr to mb_substr Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/ContractBOM.php trunk/Contracts.php trunk/CounterSales.php trunk/CustomerBranches.php trunk/Customers.php trunk/DailySalesInquiry.php trunk/EDIProcessOrders.php trunk/FixedAssetItems.php trunk/FixedAssetTransfer.php trunk/FormDesigner.php trunk/GetStockImage.php trunk/Numbers/Words/lang.bg.php trunk/Numbers/Words/lang.cs.php trunk/Numbers/Words/lang.de.php trunk/Numbers/Words/lang.dk.php trunk/Numbers/Words/lang.en_100.php trunk/Numbers/Words/lang.en_GB.php trunk/Numbers/Words/lang.en_US.php trunk/Numbers/Words/lang.es.php trunk/Numbers/Words/lang.es_AR.php trunk/Numbers/Words/lang.et.php trunk/Numbers/Words/lang.fr.php trunk/Numbers/Words/lang.fr_BE.php trunk/Numbers/Words/lang.he.php trunk/Numbers/Words/lang.hu_HU.php trunk/Numbers/Words/lang.id.php trunk/Numbers/Words/lang.it_IT.php trunk/Numbers/Words/lang.lt.php trunk/Numbers/Words/lang.nl.php trunk/Numbers/Words/lang.pl.php trunk/Numbers/Words/lang.pt_BR.php trunk/Numbers/Words/lang.ru.php trunk/Numbers/Words/lang.sv.php trunk/Numbers/Words.php trunk/OffersReceived.php trunk/PO_AuthoriseMyOrders.php trunk/PO_Items.php trunk/PageSecurity.php trunk/SalesCategories.php trunk/SelectCreditItems.php trunk/SelectOrderItems.php trunk/SpecialOrder.php trunk/Stocks.php trunk/SupplierCredit.php trunk/SupplierInvoice.php trunk/SupplierTenders.php trunk/Suppliers.php trunk/UpgradeDatabase.php trunk/WorkOrderReceive.php trunk/Z_ImportChartOfAccounts.php trunk/Z_MakeNewCompany.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_poAddLanguage.php trunk/Z_poEditLangModule.php trunk/Z_poEditLangRemaining.php trunk/api/api_branches.php trunk/api/api_customers.php trunk/api/api_debtortransactions.php trunk/api/api_glaccounts.php trunk/api/api_glgroups.php trunk/api/api_glsections.php trunk/api/api_locations.php trunk/api/api_purchdata.php trunk/api/api_salesareas.php trunk/api/api_salesman.php trunk/api/api_salesorders.php trunk/api/api_salestypes.php trunk/api/api_stock.php trunk/api/api_stockcategories.php trunk/api/api_suppliers.php trunk/api/api_workorders.php trunk/config.distrib.php trunk/doc/Change.log trunk/doc/Manual/ManualAPIFunctions.php trunk/includes/ConstructSQLForUserDefinedSalesReport.inc trunk/includes/DateFunctions.inc trunk/includes/DefineCartClass.php trunk/includes/EDIVariableSubstitution.inc trunk/includes/EDIconfig.inc trunk/includes/FreightCalculation.inc trunk/includes/LanguageSetup.php trunk/includes/MiscFunctions.php trunk/includes/PDFSalesAnalysis.inc trunk/includes/RFC822.php trunk/includes/class.pdf.php trunk/includes/header.inc trunk/includes/htmlMimeMail.php trunk/includes/mimePart.php trunk/includes/php-gettext/gettext.inc trunk/includes/php-gettext/streams.php trunk/includes/phplot/ChangeLog trunk/includes/phplot/NEWS.txt trunk/includes/phplot/contrib/color_range.test1.php trunk/includes/phplot/contrib/prune_labels.test.php trunk/includes/phplot/phplot.php trunk/includes/smtp.php trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/config/tcpdf_config.php trunk/includes/tcpdf/config/tcpdf_config_alt.php trunk/includes/tcpdf/tcpdf.php trunk/install/index.php trunk/install/save.php trunk/javascripts/MiscFunctions.js trunk/reportwriter/FormMaker.php trunk/reportwriter/ReportMaker.php trunk/reportwriter/WriteForm.inc trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/RCFunctions.inc trunk/reportwriter/admin/forms/ReportsCritSetup.html Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/ConfirmDispatch_Invoice.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -577,7 +577,7 @@ $ErrMsg = _('Could not retrieve the quantity left at the location once this order is invoiced (for the purposes of checking that stock will not go negative because)'); $Result = DB_query($SQL,$db,$ErrMsg); $CheckNegRow = DB_fetch_array($Result); - if (($CheckNegRow['mbflag']=='B' OR $CheckNegRow['mbflag']=='M') AND substr($OrderLine->StockID,0,4)!='ASSET'){ + if (($CheckNegRow['mbflag']=='B' OR $CheckNegRow['mbflag']=='M') AND mb_substr($OrderLine->StockID,0,4)!='ASSET'){ if ($CheckNegRow['quantity'] < $OrderLine->QtyDispatched){ prnMsg( _('Invoicing the selected order would result in negative stock. The system parameters are set to prohibit negative stocks from occurring. This invoice cannot be created until the stock on hand is corrected.'),'error',$OrderLine->StockID . ' ' . $CheckNegRow['description'] . ' - ' . _('Negative Stock Prohibited')); $NegativesFound = true; @@ -798,13 +798,13 @@ foreach ($_SESSION['Items']->LineItems as $OrderLine) { /*Test to see if the item being sold is an asset */ - if (substr($OrderLine->StockID,0,6)=='ASSET-'){ + if (mb_substr($OrderLine->StockID,0,6)=='ASSET-'){ $IsAsset = true; $HyphenOccursAt = mb_strpos($OrderLine->StockID,'-',6); if ($HyphenOccursAt == false){ - $AssetNumber = intval(substr($OrderLine->StockID,6)); + $AssetNumber = intval(mb_substr($OrderLine->StockID,6)); } else { - $AssetNumber = intval(substr($OrderLine->StockID,6,mb_strlen($OrderLine->StockID)-$HyphenOccursAt-1)); + $AssetNumber = intval(mb_substr($OrderLine->StockID,6,mb_strlen($OrderLine->StockID)-$HyphenOccursAt-1)); } prnMsg (_('The asset number beind disposed of is:') . ' ' . $AssetNumber, 'info'); } else { Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/ContractBOM.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -165,8 +165,8 @@ if (isset($_POST['NewItem'])){ /* NewItem is set from the part selection list as the part code selected */ /* take the form entries and enter the data from the form into the PurchOrder class variable */ foreach ($_POST as $ItemCode => $Quantity) { - if (substr($ItemCode, 0, 3)=='Qty') { - $ItemCode=substr($ItemCode, 3, mb_strlen($ItemCode)-3); + if (mb_substr($ItemCode, 0, 3)=='Qty') { + $ItemCode=mb_substr($ItemCode, 3, mb_strlen($ItemCode)-3); $AlreadyOnThisBOM = 0; if (count($_SESSION['Contract'.$identifier]->ContractBOM)!=0){ Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Contracts.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -107,7 +107,7 @@ $filename = $_SESSION['part_pics_dir'] . '/' . $_SESSION['Contract'.$identifier]->ContractRef . '.jpg'; //But check for the worst - if (strtoupper(substr(trim($_FILES['Drawing']['name']),mb_strlen($_FILES['Drawing']['name'])-3))!='JPG'){ + if (strtoupper(mb_substr(trim($_FILES['Drawing']['name']),mb_strlen($_FILES['Drawing']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['Drawing']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/CounterSales.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -36,7 +36,7 @@ if (isset($_POST['OrderItems'])){ foreach ($_POST as $key => $value) { if (strstr($key,'itm')) { - $NewItemArray[substr($key,3)] = trim($value); + $NewItemArray[mb_substr($key,3)] = trim($value); } } } Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/CustomerBranches.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -443,7 +443,7 @@ $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); echo '<div class="page_help_text">'._('No Branches are defined for').' - '.$myrow[0]. '. ' . _('You must have a minimum of one branch for each Customer. Please add a branch now.') .'</div>'; - $_POST['BranchCode'] = substr($DebtorNo,0,10); + $_POST['BranchCode'] = mb_substr($DebtorNo,0,10); $_POST['BrName'] = $myrow[0]; $_POST['BrAddress1'] = $myrow[1]; $_POST['BrAddress2'] = $myrow[2]; Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Customers.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -280,7 +280,7 @@ $ErrMsg = _('This customer could not be added because'); $result = DB_query($sql,$db,$ErrMsg); - $BranchCode = substr($_POST['DebtorNo'],0,4); + $BranchCode = mb_substr($_POST['DebtorNo'],0,4); echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath .'/CustomerBranches.php?DebtorNo=' . $_POST['DebtorNo'] . '">'; Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/DailySalesInquiry.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -68,7 +68,7 @@ } if (mb_strlen($Date_Array[2])>4) { - $Date_Array[2]= substr($Date_Array[2],0,2); + $Date_Array[2]= mb_substr($Date_Array[2],0,2); } $StartDateSQL = date('Y-m-d', mktime(0,0,0, (int)$Date_Array[1],1,(int)$Date_Array[0])); Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/EDIProcessOrders.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -78,9 +78,9 @@ $LineText = StripTrailingComma($LineText); echo "<br />".$LineText; - if ($SegTag != substr($LineText,0,3)){ + if ($SegTag != mb_substr($LineText,0,3)){ $SegCounter=1; - $SegTag = substr($LineText,0,3); + $SegTag = mb_substr($LineText,0,3); } else { $SegCounter++; if ($SegCounter > $Seg[$SegID]['MaxOccur']){ @@ -119,17 +119,17 @@ echo '<br />' . _('The segment tag') . ' ' . $SegTag . ' ' . _('is being processed'); switch ($SegTag){ case 'UNH': - $UNH_elements = explode ('+',substr($LineText,4)); + $UNH_elements = explode ('+',mb_substr($LineText,4)); $Order->Comments .= _('Customer EDI Ref') . ': ' . $UNH_elements[0]; $EmailText .= "\n" . _('EDI Message Ref') . ': ' . $UNH_elements[0]; - if (substr($UNH_elements[1],0,6)!='ORDERS'){ + if (mb_substr($UNH_elements[1],0,6)!='ORDERS'){ $EmailText .= "\n" . _('This message is not an order'); $TryNextFile = True; } break; case 'BGM': - $BGM_elements = explode('+',substr($LineText,4)); + $BGM_elements = explode('+',mb_substr($LineText,4)); $BGM_C002 = explode(':',$BGM_elements[0]); switch ($BGM_C002[0]){ case '220': @@ -239,7 +239,7 @@ break; case 'DTM': /*explode into an arrage all items delimited by the : - only after the + */ - $DTM_C507 = explode(':',substr($LineText,4)); + $DTM_C507 = explode(':',mb_substr($LineText,4)); $LocalFormatDate = ConvertEDIDate($DTM_C507[1],$DTM_C507[2]); switch ($DTM_C507[0]){ @@ -294,7 +294,7 @@ break; case 'PAI': /*explode into an array all items delimited by the : - only after the + */ - $PAI_C534 = explode(':',substr($LineText,4)); + $PAI_C534 = explode(':',mb_substr($LineText,4)); if ($PAI_C534[0]=='1'){ $EmailText .= "\n" . _('Payment will be effected by a direct payment for this order'); } elseif($PAI_C534[0]=='OA'){ @@ -318,7 +318,7 @@ } break; case 'ALI': - $ALI = explode('+',substr($LineText,4)); + $ALI = explode('+',mb_substr($LineText,4)); if (mb_strlen($ALI[0])>1){ $EmailText .= "\n" . _('Goods of origin') . ' ' . $ALI[0]; } @@ -347,7 +347,7 @@ } break; case 'FTX': - $FTX = explode('+',substr($LineText,4)); + $FTX = explode('+',mb_substr($LineText,4)); /*agreed coded text is not catered for ... yet only free form text */ if (mb_strlen($FTX[3])>5){ @@ -357,7 +357,7 @@ } break; case 'RFF': - $RFF = explode(':',substr($LineText,4)); + $RFF = explode(':',mb_substr($LineText,4)); switch ($RFF[0]){ case 'AE': $MsgText = "\n" . _('Authorisation for expense no') . ' ' . $RFF[1]; @@ -404,7 +404,7 @@ $EmailText .= $MsgText; break; case 'NAD': - $NAD = explode('+',substr($LineText,4)); + $NAD = explode('+',mb_substr($LineText,4)); $NAD_C082 = explode(':', $NAD[1]); $NAD_C058 = explode(':', $NAD[2]); /*Not used according to MIG */ $NAD_C080 = explode(':', $NAD[3]); @@ -561,7 +561,7 @@ function StripTrailingComma ($StringToStrip){ if (strrpos($StringToStrip,"'")){ - Return substr($StringToStrip,0,strrpos($StringToStrip,"'")); + Return mb_substr($StringToStrip,0,strrpos($StringToStrip,"'")); } else { Return $StringToStrip; } Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/FixedAssetItems.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -30,7 +30,7 @@ $filename = $_SESSION['part_pics_dir'] . '/ASSET_' . $AssetID . '.jpg'; //But check for the worst - if (strtoupper(substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ + if (strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['ItemPicture']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check Modified: trunk/FixedAssetTransfer.php =================================================================== --- trunk/FixedAssetTransfer.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/FixedAssetTransfer.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -9,8 +9,8 @@ include('includes/header.inc'); foreach ($_POST as $AssetToMove => $Value) { //Value is not used? - if (substr($AssetToMove,0,4)=='Move') { // the form variable is of the format MoveAssetID so need to strip the move bit off - $AssetID=substr($AssetToMove,4); + if (mb_substr($AssetToMove,0,4)=='Move') { // the form variable is of the format MoveAssetID so need to strip the move bit off + $AssetID=mb_substr($AssetToMove,4); $sql="UPDATE fixedassets SET assetlocation='".$_POST['Location'.$AssetID] ."' WHERE assetid='". $AssetID . "'"; Modified: trunk/FormDesigner.php =================================================================== --- trunk/FormDesigner.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/FormDesigner.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -78,8 +78,8 @@ /*First create a simple xml object from the main file */ $FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/'.$_POST['FormName']); $FormDesign['name']=$_POST['formname']; - if (substr($_POST['PaperSize'],-8)=='Portrait') { - $_POST['PaperSize']=substr($_POST['PaperSize'],0,mb_strlen($_POST['PaperSize'])-9); + if (mb_substr($_POST['PaperSize'],-8)=='Portrait') { + $_POST['PaperSize']=mb_substr($_POST['PaperSize'],0,mb_strlen($_POST['PaperSize'])-9); } $FormDesign->PaperSize=$_POST['PaperSize']; $FormDesign->LineHeight=$_POST['LineHeight']; @@ -164,8 +164,8 @@ /* Select the paper size/orientation */ echo '<th width=33%>'._('Paper Size').'<select name="PaperSize">'; foreach ($Papers as $Paper) { - if (substr($Paper,-8)=='Portrait') { - $PaperValue=substr($Paper,0,mb_strlen($Paper)-9); + if (mb_substr($Paper,-8)=='Portrait') { + $PaperValue=mb_substr($Paper,0,mb_strlen($Paper)-9); } else { $PaperValue=$Paper; } Modified: trunk/GetStockImage.php =================================================================== --- trunk/GetStockImage.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/GetStockImage.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -22,26 +22,26 @@ // Color decode function function DecodeBgColor( $colorstr ) { if ( $colorstr[0] == '#' ) { - $colorstr = substr($colorstr,1,mb_strlen($colorstr)); + $colorstr = mb_substr($colorstr,1,mb_strlen($colorstr)); } $red = 0; if(mb_strlen($colorstr) > 1) { - $red = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,mb_strlen($colorstr)); + $red = hexdec(mb_substr($colorstr,0,2)); + $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); } $green = 0; if(mb_strlen($colorstr) > 1) { - $green = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,mb_strlen($colorstr)); + $green = hexdec(mb_substr($colorstr,0,2)); + $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); } $blue = 0; if(mb_strlen($colorstr) > 1) { - $blue = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,mb_strlen($colorstr)); + $blue = hexdec(mb_substr($colorstr,0,2)); + $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); } if(mb_strlen($colorstr) > 1) { - $alpha = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,mb_strlen($colorstr)); + $alpha = hexdec(mb_substr($colorstr,0,2)); + $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); } if ( isset($alpha) ) return array('red' => $red, 'green' => $green, 'blue' => $blue, 'alpha' => $alpha ); @@ -120,8 +120,8 @@ if( $i === false ) $type = 'png'; else { - $type = strtolower(substr($stockid,$i+1,mb_strlen($stockid))); - $stockid = substr($stockid,0,$i); + $type = strtolower(mb_substr($stockid,$i+1,mb_strlen($stockid))); + $stockid = mb_substr($stockid,0,$i); if($blanktext && !isset($text)) $text = ''; } Modified: trunk/Numbers/Words/lang.bg.php =================================================================== --- trunk/Numbers/Words/lang.bg.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.bg.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -311,8 +311,8 @@ if (is_string($num)) { $ret = array(); $mb_strlen = mb_strlen($num); - $first = substr($num, 0, $mb_strlen%3); - preg_match_all('/\d{3}/', substr($num, $mb_strlen%3, $mb_strlen), $m); + $first = mb_substr($num, 0, $mb_strlen%3); + preg_match_all('/\d{3}/', mb_substr($num, $mb_strlen%3, $mb_strlen), $m); $ret =& $m[0]; if ($first) array_unshift($ret, $first); return $ret; @@ -446,9 +446,9 @@ if (!$num || preg_match('/^-?0+$/', $num) || !preg_match('/^-?\d+$/', $num)) return $this->_zero; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret_minus = $this->_minus . $this->_sep; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // if the absolute value is greater than 9.99*10^302, return infinity Modified: trunk/Numbers/Words/lang.cs.php =================================================================== --- trunk/Numbers/Words/lang.cs.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.cs.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -169,9 +169,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -185,8 +185,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -198,7 +198,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -210,13 +210,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.de.php =================================================================== --- trunk/Numbers/Words/lang.de.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.de.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -158,9 +158,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -174,8 +174,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -187,7 +187,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -199,13 +199,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.dk.php =================================================================== --- trunk/Numbers/Words/lang.dk.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.dk.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -172,9 +172,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -188,8 +188,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -201,7 +201,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -213,13 +213,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.en_100.php =================================================================== --- trunk/Numbers/Words/lang.en_100.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.en_100.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -146,9 +146,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -162,8 +162,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -176,7 +176,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -188,13 +188,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.en_GB.php =================================================================== --- trunk/Numbers/Words/lang.en_GB.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.en_GB.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -204,9 +204,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -220,8 +220,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -233,7 +233,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -245,13 +245,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.en_US.php =================================================================== --- trunk/Numbers/Words/lang.en_US.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.en_US.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -296,9 +296,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -312,8 +312,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -325,7 +325,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -337,13 +337,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.es.php =================================================================== --- trunk/Numbers/Words/lang.es.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.es.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -129,10 +129,10 @@ $ret = ''; // add a the word for the minus sign if necessary - if (substr($num, 0, 1) == '-') + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } @@ -147,13 +147,13 @@ { // convert the number above the first 6 digits // with it's corresponding $power. - $snum = substr($num, 0, -6); + $snum = mb_substr($num, 0, -6); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $ret .= $this->toWords($snum, $power + 6); } } - $num = substr($num, -6); + $num = mb_substr($num, -6); if ($num == 0) { return $ret; } Modified: trunk/Numbers/Words/lang.es_AR.php =================================================================== --- trunk/Numbers/Words/lang.es_AR.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.es_AR.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -189,10 +189,10 @@ $ret = ''; // add a the word for the minus sign if necessary - if (substr($num, 0, 1) == '-') + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } @@ -212,13 +212,13 @@ { // convert the number above the first 6 digits // with it's corresponding $power. - $snum = substr($num, 0, -6); + $snum = mb_substr($num, 0, -6); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $ret .= $this->toWords($snum, $power + 6); } } - $num = substr($num, -6); + $num = mb_substr($num, -6); if ($num == 0) { return $ret; } Modified: trunk/Numbers/Words/lang.et.php =================================================================== --- trunk/Numbers/Words/lang.et.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.et.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -235,9 +235,9 @@ function toWords($num, $power = 0, $powsuffix = '') { $ret = ''; - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } $num = trim($num); @@ -248,7 +248,7 @@ $curp = $maxp; for ($p = $maxp; $p > 0; --$p) { // power if (isset($this->_exponent[$p])) { - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -260,7 +260,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -272,13 +272,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.fr.php =================================================================== --- trunk/Numbers/Words/lang.fr.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.fr.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -264,8 +264,8 @@ if (is_string($num)) { $ret = array(); $mb_strlen = mb_strlen($num); - $first = substr($num, 0, $mb_strlen%3); - preg_match_all('/\d{3}/', substr($num, $mb_strlen%3, $mb_strlen), $m); + $first = mb_substr($num, 0, $mb_strlen%3); + preg_match_all('/\d{3}/', mb_substr($num, $mb_strlen%3, $mb_strlen), $m); $ret =& $m[0]; if ($first) array_unshift($ret, $first); return $ret; @@ -397,9 +397,9 @@ if (!$num || preg_match('/^-?0+$/', $num) || !preg_match('/^-?\d+$/', $num)) return $this->_zero; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_minus . $this->_sep; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // if the absolute value is greater than 9.99*10^302, return infinity Modified: trunk/Numbers/Words/lang.fr_BE.php =================================================================== --- trunk/Numbers/Words/lang.fr_BE.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.fr_BE.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -268,8 +268,8 @@ if (is_string($num)) { $ret = array(); $mb_strlen = mb_strlen($num); - $first = substr($num, 0, $mb_strlen%3); - preg_match_all('/\d{3}/', substr($num, $mb_strlen%3, $mb_strlen), $m); + $first = mb_substr($num, 0, $mb_strlen%3); + preg_match_all('/\d{3}/', mb_substr($num, $mb_strlen%3, $mb_strlen), $m); $ret =& $m[0]; if ($first) array_unshift($ret, $first); return $ret; @@ -375,9 +375,9 @@ if (!$num || preg_match('/^-?0+$/', $num) || !preg_match('/^-?\d+$/', $num)) return $this->_zero; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_minus . $this->_sep; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // if the absolute value is greater than 9.99*10^302, return infinity Modified: trunk/Numbers/Words/lang.he.php =================================================================== --- trunk/Numbers/Words/lang.he.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.he.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -313,9 +313,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -329,8 +329,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -342,7 +342,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -354,13 +354,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.hu_HU.php =================================================================== --- trunk/Numbers/Words/lang.hu_HU.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.hu_HU.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -204,9 +204,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -220,8 +220,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -233,7 +233,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -245,13 +245,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.id.php =================================================================== --- trunk/Numbers/Words/lang.id.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.id.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -131,9 +131,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -147,8 +147,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -160,7 +160,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -172,16 +172,16 @@ switch(mb_strlen($num)) { case 4: - $th = (int)substr($num,-4,1); + $th = (int)mb_substr($num,-4,1); case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.it_IT.php =================================================================== --- trunk/Numbers/Words/lang.it_IT.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.it_IT.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -125,10 +125,10 @@ $ret = ''; // add a the word for the minus sign if necessary - if (substr($num, 0, 1) == '-') + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } @@ -143,13 +143,13 @@ { // convert the number above the first 6 digits // with it's corresponding $power. - $snum = substr($num, 0, -6); + $snum = mb_substr($num, 0, -6); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $ret .= $this->toWords($snum, $power + 6); } } - $num = substr($num, -6); + $num = mb_substr($num, -6); if ($num == 0) { return $ret; } Modified: trunk/Numbers/Words/lang.lt.php =================================================================== --- trunk/Numbers/Words/lang.lt.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.lt.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -136,9 +136,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -152,8 +152,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -165,7 +165,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -177,13 +177,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.nl.php =================================================================== --- trunk/Numbers/Words/lang.nl.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.nl.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -166,9 +166,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -182,8 +182,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -195,7 +195,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -207,13 +207,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.pl.php =================================================================== --- trunk/Numbers/Words/lang.pl.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.pl.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -225,9 +225,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -241,8 +241,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -254,7 +254,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -266,13 +266,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: @@ -476,18 +476,18 @@ * @since Numbers_Words 0.4 */ function _get_numlevel($num) { - $num = (int)substr($num,-3); + $num = (int)mb_substr($num,-3); $h = $t = $d = $lev = 0; switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.pt_BR.php =================================================================== --- trunk/Numbers/Words/lang.pt_BR.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.pt_BR.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -219,9 +219,9 @@ $num = trim($num); - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces Modified: trunk/Numbers/Words/lang.ru.php =================================================================== --- trunk/Numbers/Words/lang.ru.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.ru.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -463,9 +463,9 @@ $num = trim($num); $sign = ""; - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $sign = $this->_minus . $this->_sep; - $num = substr($num, 1); + $num = mb_substr($num, 1); } while (mb_strlen($num) % 3) $num = '0' . $num; @@ -483,7 +483,7 @@ } else { $groupgender = 1; } - $group = $this->_groupToWords(substr($num,-$power-3,3),$groupgender,$_case); + $group = $this->_groupToWords(mb_substr($num,-$power-3,3),$groupgender,$_case); if (!$power) { $case = $_case; } @@ -547,7 +547,7 @@ $hundreds = (int)$num{0}; if ($hundreds) { $ret = $this->_hundreds[$hundreds]; - if (substr($num,1) != '00') { + if (mb_substr($num,1) != '00') { $ret .= $this->_sep; } $case = 3; Modified: trunk/Numbers/Words/lang.sv.php =================================================================== --- trunk/Numbers/Words/lang.sv.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.sv.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -157,9 +157,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -173,8 +173,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -186,7 +186,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -198,13 +198,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words.php =================================================================== --- trunk/Numbers/Words.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -65,10 +65,10 @@ if (!file_exists('Numbers/Words/lang.' . $locale . '.php')){ //try to drop off the .utf8 suffix then recheck if (mb_strpos($locale,'.utf8')){ - $locale = substr($locale, 0,mb_strpos($locale,'.utf8')); + $locale = mb_substr($locale, 0,mb_strpos($locale,'.utf8')); } if (!file_exists('Numbers/Words/lang.' . $locale . '.php')){ - $locale = substr($locale,0,2); + $locale = mb_substr($locale,0,2); } if (!file_exists('Numbers/Words/lang.' . $locale . '.php')){ $locale = 'en_US'; Modified: trunk/OffersReceived.php =================================================================== --- trunk/OffersReceived.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/OffersReceived.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -134,8 +134,8 @@ $rejects=array(); $defers=array(); foreach ($_POST as $key => $value) { - if(substr($key,0,6)=='action') { - $OfferID=substr($key,6); + if(mb_substr($key,0,6)=='action') { + $OfferID=mb_substr($key,6); switch ($value) { case 1: $accepts[]=$OfferID; Modified: trunk/PO_AuthoriseMyOrders.php =================================================================== --- trunk/PO_AuthoriseMyOrders.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/PO_AuthoriseMyOrders.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -17,8 +17,8 @@ if (isset($_POST['UpdateAll'])) { foreach ($_POST as $key => $value) { - if (substr($key,0,6)=='status') { - $OrderNo=substr($key,6); + 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']; Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/PO_Items.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -504,9 +504,9 @@ foreach ($_POST as $FormVariableName => $Quantity) { - if (substr($FormVariableName, 0, 6)=='NewQty') { //if the form variable represents a Qty to add to the order + if (mb_substr($FormVariableName, 0, 6)=='NewQty') { //if the form variable represents a Qty to add to the order - $ItemCode = substr($FormVariableName, 6, mb_strlen($FormVariableName)-6); + $ItemCode = mb_substr($FormVariableName, 6, mb_strlen($FormVariableName)-6); $AlreadyOnThisOrder = 0; if ($_SESSION['PO_AllowSameItemMultipleTimes'] ==false){ Modified: trunk/PageSecurity.php =================================================================== --- trunk/PageSecurity.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/PageSecurity.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -13,7 +13,7 @@ if (isset($_POST['Update'])) { foreach ($_POST as $ScriptName => $PageSecurityValue) { if ($ScriptName!='Update' and $ScriptName!='FormID') { - $ScriptName = substr($ScriptName, 0, mb_strlen($ScriptName)-4).'.php'; + $ScriptName = mb_substr($ScriptName, 0, mb_strlen($ScriptName)-4).'.php'; $sql="UPDATE scripts SET pagesecurity='".$PageSecurityValue."' WHERE script='".$ScriptName."'"; $UpdateResult=DB_query($sql, $db,_('Could not update the page security value for the script because')); } Modified: trunk/SalesCategories.php =================================================================== --- trunk/SalesCategories.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/SalesCategories.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -39,7 +39,7 @@ $FileName = $_SESSION['part_pics_dir'] . '/cat_' . $SelectedCategory . '.jpg'; //But check for the worst - if (strtoupper(substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ + if (strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['ItemPicture']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/SelectCreditItems.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -116,8 +116,8 @@ /*will only be true if page called from customer selection form parse the $Select string into customer code and branch code */ - $_SESSION['CreditItems']->Branch = substr($_POST['Select'],mb_strpos($_POST['Select'],' - ')+3); - $_POST['Select'] = substr($_POST['Select'],0,mb_strpos($_POST['Select'],' - ')); + $_SESSION['CreditItems']->Branch = mb_substr($_POST['Select'],mb_strpos($_POST['Select'],' - ')+3); + $_POST['Select'] = mb_substr($_POST['Select'],0,mb_strpos($_POST['Select'],' - ')); /*Now retrieve customer information - name, salestype, currency, terms etc */ Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/SelectOrderItems.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -25,7 +25,7 @@ if (isset($_POST['order_items'])){ foreach ($_POST as $key => $value) { if (strstr($key,'itm')) { - $NewItem_array[substr($key,3)] = trim($value); + $NewItem_array[mb_substr($key,3)] = trim($value); } } } Modified: trunk/SpecialOrder.php =================================================================== --- trunk/SpecialOrder.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/SpecialOrder.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -332,7 +332,7 @@ if ($PartCount[0]!=0){ $PartAlreadyExists =True; if (mb_strlen($PartCode)==20){ - $PartCode = "*" . strtoupper(substr($_SESSION['SPL']->PurchOrderNo,0,13)) . "_" . $SPLLine->LineNo; + $PartCode = "*" . strtoupper(mb_substr($_SESSION['SPL']->PurchOrderNo,0,13)) . "_" . $SPLLine->LineNo; } $PartCode = $PartCode . $Counter; $Counter++; Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Stocks.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -43,7 +43,7 @@ $filename = $_SESSION['part_pics_dir'] . '/' . $StockID . '.jpg'; //But check for the worst - if (strtoupper(substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ + if (strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['ItemPicture']['size'] > ($_SE... [truncated message content] |
From: <dai...@us...> - 2011-07-03 03:35:59
|
Revision: 4621 http://web-erp.svn.sourceforge.net/web-erp/?rev=4621&view=rev Author: daintree Date: 2011-07-03 03:35:49 +0000 (Sun, 03 Jul 2011) Log Message: ----------- substr to mb_substr Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/ContractBOM.php trunk/Contracts.php trunk/CounterSales.php trunk/CustomerBranches.php trunk/Customers.php trunk/DailySalesInquiry.php trunk/EDIProcessOrders.php trunk/FixedAssetItems.php trunk/FixedAssetTransfer.php trunk/FormDesigner.php trunk/GetStockImage.php trunk/Numbers/Words/lang.bg.php trunk/Numbers/Words/lang.cs.php trunk/Numbers/Words/lang.de.php trunk/Numbers/Words/lang.dk.php trunk/Numbers/Words/lang.en_100.php trunk/Numbers/Words/lang.en_GB.php trunk/Numbers/Words/lang.en_US.php trunk/Numbers/Words/lang.es.php trunk/Numbers/Words/lang.es_AR.php trunk/Numbers/Words/lang.et.php trunk/Numbers/Words/lang.fr.php trunk/Numbers/Words/lang.fr_BE.php trunk/Numbers/Words/lang.he.php trunk/Numbers/Words/lang.hu_HU.php trunk/Numbers/Words/lang.id.php trunk/Numbers/Words/lang.it_IT.php trunk/Numbers/Words/lang.lt.php trunk/Numbers/Words/lang.nl.php trunk/Numbers/Words/lang.pl.php trunk/Numbers/Words/lang.pt_BR.php trunk/Numbers/Words/lang.ru.php trunk/Numbers/Words/lang.sv.php trunk/Numbers/Words.php trunk/OffersReceived.php trunk/PO_AuthoriseMyOrders.php trunk/PO_Items.php trunk/PageSecurity.php trunk/SalesCategories.php trunk/SelectCreditItems.php trunk/SelectOrderItems.php trunk/SpecialOrder.php trunk/Stocks.php trunk/SupplierCredit.php trunk/SupplierInvoice.php trunk/SupplierTenders.php trunk/Suppliers.php trunk/UpgradeDatabase.php trunk/WorkOrderReceive.php trunk/Z_ImportChartOfAccounts.php trunk/Z_MakeNewCompany.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_poAddLanguage.php trunk/Z_poEditLangModule.php trunk/Z_poEditLangRemaining.php trunk/api/api_branches.php trunk/api/api_customers.php trunk/api/api_debtortransactions.php trunk/api/api_glaccounts.php trunk/api/api_glgroups.php trunk/api/api_glsections.php trunk/api/api_locations.php trunk/api/api_purchdata.php trunk/api/api_salesareas.php trunk/api/api_salesman.php trunk/api/api_salesorders.php trunk/api/api_salestypes.php trunk/api/api_stock.php trunk/api/api_stockcategories.php trunk/api/api_suppliers.php trunk/api/api_workorders.php trunk/config.distrib.php trunk/doc/Change.log trunk/doc/Manual/ManualAPIFunctions.php trunk/includes/ConstructSQLForUserDefinedSalesReport.inc trunk/includes/DateFunctions.inc trunk/includes/DefineCartClass.php trunk/includes/EDIVariableSubstitution.inc trunk/includes/EDIconfig.inc trunk/includes/FreightCalculation.inc trunk/includes/LanguageSetup.php trunk/includes/MiscFunctions.php trunk/includes/PDFSalesAnalysis.inc trunk/includes/RFC822.php trunk/includes/class.pdf.php trunk/includes/header.inc trunk/includes/htmlMimeMail.php trunk/includes/mimePart.php trunk/includes/php-gettext/gettext.inc trunk/includes/php-gettext/streams.php trunk/includes/phplot/ChangeLog trunk/includes/phplot/NEWS.txt trunk/includes/phplot/contrib/color_range.test1.php trunk/includes/phplot/contrib/prune_labels.test.php trunk/includes/phplot/phplot.php trunk/includes/smtp.php trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/config/tcpdf_config.php trunk/includes/tcpdf/config/tcpdf_config_alt.php trunk/includes/tcpdf/tcpdf.php trunk/install/index.php trunk/install/save.php trunk/javascripts/MiscFunctions.js trunk/reportwriter/FormMaker.php trunk/reportwriter/ReportMaker.php trunk/reportwriter/WriteForm.inc trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/RCFunctions.inc trunk/reportwriter/admin/forms/ReportsCritSetup.html Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/ConfirmDispatch_Invoice.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -577,7 +577,7 @@ $ErrMsg = _('Could not retrieve the quantity left at the location once this order is invoiced (for the purposes of checking that stock will not go negative because)'); $Result = DB_query($SQL,$db,$ErrMsg); $CheckNegRow = DB_fetch_array($Result); - if (($CheckNegRow['mbflag']=='B' OR $CheckNegRow['mbflag']=='M') AND substr($OrderLine->StockID,0,4)!='ASSET'){ + if (($CheckNegRow['mbflag']=='B' OR $CheckNegRow['mbflag']=='M') AND mb_substr($OrderLine->StockID,0,4)!='ASSET'){ if ($CheckNegRow['quantity'] < $OrderLine->QtyDispatched){ prnMsg( _('Invoicing the selected order would result in negative stock. The system parameters are set to prohibit negative stocks from occurring. This invoice cannot be created until the stock on hand is corrected.'),'error',$OrderLine->StockID . ' ' . $CheckNegRow['description'] . ' - ' . _('Negative Stock Prohibited')); $NegativesFound = true; @@ -798,13 +798,13 @@ foreach ($_SESSION['Items']->LineItems as $OrderLine) { /*Test to see if the item being sold is an asset */ - if (substr($OrderLine->StockID,0,6)=='ASSET-'){ + if (mb_substr($OrderLine->StockID,0,6)=='ASSET-'){ $IsAsset = true; $HyphenOccursAt = mb_strpos($OrderLine->StockID,'-',6); if ($HyphenOccursAt == false){ - $AssetNumber = intval(substr($OrderLine->StockID,6)); + $AssetNumber = intval(mb_substr($OrderLine->StockID,6)); } else { - $AssetNumber = intval(substr($OrderLine->StockID,6,mb_strlen($OrderLine->StockID)-$HyphenOccursAt-1)); + $AssetNumber = intval(mb_substr($OrderLine->StockID,6,mb_strlen($OrderLine->StockID)-$HyphenOccursAt-1)); } prnMsg (_('The asset number beind disposed of is:') . ' ' . $AssetNumber, 'info'); } else { Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/ContractBOM.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -165,8 +165,8 @@ if (isset($_POST['NewItem'])){ /* NewItem is set from the part selection list as the part code selected */ /* take the form entries and enter the data from the form into the PurchOrder class variable */ foreach ($_POST as $ItemCode => $Quantity) { - if (substr($ItemCode, 0, 3)=='Qty') { - $ItemCode=substr($ItemCode, 3, mb_strlen($ItemCode)-3); + if (mb_substr($ItemCode, 0, 3)=='Qty') { + $ItemCode=mb_substr($ItemCode, 3, mb_strlen($ItemCode)-3); $AlreadyOnThisBOM = 0; if (count($_SESSION['Contract'.$identifier]->ContractBOM)!=0){ Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Contracts.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -107,7 +107,7 @@ $filename = $_SESSION['part_pics_dir'] . '/' . $_SESSION['Contract'.$identifier]->ContractRef . '.jpg'; //But check for the worst - if (strtoupper(substr(trim($_FILES['Drawing']['name']),mb_strlen($_FILES['Drawing']['name'])-3))!='JPG'){ + if (strtoupper(mb_substr(trim($_FILES['Drawing']['name']),mb_strlen($_FILES['Drawing']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['Drawing']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/CounterSales.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -36,7 +36,7 @@ if (isset($_POST['OrderItems'])){ foreach ($_POST as $key => $value) { if (strstr($key,'itm')) { - $NewItemArray[substr($key,3)] = trim($value); + $NewItemArray[mb_substr($key,3)] = trim($value); } } } Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/CustomerBranches.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -443,7 +443,7 @@ $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); echo '<div class="page_help_text">'._('No Branches are defined for').' - '.$myrow[0]. '. ' . _('You must have a minimum of one branch for each Customer. Please add a branch now.') .'</div>'; - $_POST['BranchCode'] = substr($DebtorNo,0,10); + $_POST['BranchCode'] = mb_substr($DebtorNo,0,10); $_POST['BrName'] = $myrow[0]; $_POST['BrAddress1'] = $myrow[1]; $_POST['BrAddress2'] = $myrow[2]; Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Customers.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -280,7 +280,7 @@ $ErrMsg = _('This customer could not be added because'); $result = DB_query($sql,$db,$ErrMsg); - $BranchCode = substr($_POST['DebtorNo'],0,4); + $BranchCode = mb_substr($_POST['DebtorNo'],0,4); echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath .'/CustomerBranches.php?DebtorNo=' . $_POST['DebtorNo'] . '">'; Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/DailySalesInquiry.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -68,7 +68,7 @@ } if (mb_strlen($Date_Array[2])>4) { - $Date_Array[2]= substr($Date_Array[2],0,2); + $Date_Array[2]= mb_substr($Date_Array[2],0,2); } $StartDateSQL = date('Y-m-d', mktime(0,0,0, (int)$Date_Array[1],1,(int)$Date_Array[0])); Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/EDIProcessOrders.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -78,9 +78,9 @@ $LineText = StripTrailingComma($LineText); echo "<br />".$LineText; - if ($SegTag != substr($LineText,0,3)){ + if ($SegTag != mb_substr($LineText,0,3)){ $SegCounter=1; - $SegTag = substr($LineText,0,3); + $SegTag = mb_substr($LineText,0,3); } else { $SegCounter++; if ($SegCounter > $Seg[$SegID]['MaxOccur']){ @@ -119,17 +119,17 @@ echo '<br />' . _('The segment tag') . ' ' . $SegTag . ' ' . _('is being processed'); switch ($SegTag){ case 'UNH': - $UNH_elements = explode ('+',substr($LineText,4)); + $UNH_elements = explode ('+',mb_substr($LineText,4)); $Order->Comments .= _('Customer EDI Ref') . ': ' . $UNH_elements[0]; $EmailText .= "\n" . _('EDI Message Ref') . ': ' . $UNH_elements[0]; - if (substr($UNH_elements[1],0,6)!='ORDERS'){ + if (mb_substr($UNH_elements[1],0,6)!='ORDERS'){ $EmailText .= "\n" . _('This message is not an order'); $TryNextFile = True; } break; case 'BGM': - $BGM_elements = explode('+',substr($LineText,4)); + $BGM_elements = explode('+',mb_substr($LineText,4)); $BGM_C002 = explode(':',$BGM_elements[0]); switch ($BGM_C002[0]){ case '220': @@ -239,7 +239,7 @@ break; case 'DTM': /*explode into an arrage all items delimited by the : - only after the + */ - $DTM_C507 = explode(':',substr($LineText,4)); + $DTM_C507 = explode(':',mb_substr($LineText,4)); $LocalFormatDate = ConvertEDIDate($DTM_C507[1],$DTM_C507[2]); switch ($DTM_C507[0]){ @@ -294,7 +294,7 @@ break; case 'PAI': /*explode into an array all items delimited by the : - only after the + */ - $PAI_C534 = explode(':',substr($LineText,4)); + $PAI_C534 = explode(':',mb_substr($LineText,4)); if ($PAI_C534[0]=='1'){ $EmailText .= "\n" . _('Payment will be effected by a direct payment for this order'); } elseif($PAI_C534[0]=='OA'){ @@ -318,7 +318,7 @@ } break; case 'ALI': - $ALI = explode('+',substr($LineText,4)); + $ALI = explode('+',mb_substr($LineText,4)); if (mb_strlen($ALI[0])>1){ $EmailText .= "\n" . _('Goods of origin') . ' ' . $ALI[0]; } @@ -347,7 +347,7 @@ } break; case 'FTX': - $FTX = explode('+',substr($LineText,4)); + $FTX = explode('+',mb_substr($LineText,4)); /*agreed coded text is not catered for ... yet only free form text */ if (mb_strlen($FTX[3])>5){ @@ -357,7 +357,7 @@ } break; case 'RFF': - $RFF = explode(':',substr($LineText,4)); + $RFF = explode(':',mb_substr($LineText,4)); switch ($RFF[0]){ case 'AE': $MsgText = "\n" . _('Authorisation for expense no') . ' ' . $RFF[1]; @@ -404,7 +404,7 @@ $EmailText .= $MsgText; break; case 'NAD': - $NAD = explode('+',substr($LineText,4)); + $NAD = explode('+',mb_substr($LineText,4)); $NAD_C082 = explode(':', $NAD[1]); $NAD_C058 = explode(':', $NAD[2]); /*Not used according to MIG */ $NAD_C080 = explode(':', $NAD[3]); @@ -561,7 +561,7 @@ function StripTrailingComma ($StringToStrip){ if (strrpos($StringToStrip,"'")){ - Return substr($StringToStrip,0,strrpos($StringToStrip,"'")); + Return mb_substr($StringToStrip,0,strrpos($StringToStrip,"'")); } else { Return $StringToStrip; } Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/FixedAssetItems.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -30,7 +30,7 @@ $filename = $_SESSION['part_pics_dir'] . '/ASSET_' . $AssetID . '.jpg'; //But check for the worst - if (strtoupper(substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ + if (strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['ItemPicture']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check Modified: trunk/FixedAssetTransfer.php =================================================================== --- trunk/FixedAssetTransfer.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/FixedAssetTransfer.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -9,8 +9,8 @@ include('includes/header.inc'); foreach ($_POST as $AssetToMove => $Value) { //Value is not used? - if (substr($AssetToMove,0,4)=='Move') { // the form variable is of the format MoveAssetID so need to strip the move bit off - $AssetID=substr($AssetToMove,4); + if (mb_substr($AssetToMove,0,4)=='Move') { // the form variable is of the format MoveAssetID so need to strip the move bit off + $AssetID=mb_substr($AssetToMove,4); $sql="UPDATE fixedassets SET assetlocation='".$_POST['Location'.$AssetID] ."' WHERE assetid='". $AssetID . "'"; Modified: trunk/FormDesigner.php =================================================================== --- trunk/FormDesigner.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/FormDesigner.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -78,8 +78,8 @@ /*First create a simple xml object from the main file */ $FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/'.$_POST['FormName']); $FormDesign['name']=$_POST['formname']; - if (substr($_POST['PaperSize'],-8)=='Portrait') { - $_POST['PaperSize']=substr($_POST['PaperSize'],0,mb_strlen($_POST['PaperSize'])-9); + if (mb_substr($_POST['PaperSize'],-8)=='Portrait') { + $_POST['PaperSize']=mb_substr($_POST['PaperSize'],0,mb_strlen($_POST['PaperSize'])-9); } $FormDesign->PaperSize=$_POST['PaperSize']; $FormDesign->LineHeight=$_POST['LineHeight']; @@ -164,8 +164,8 @@ /* Select the paper size/orientation */ echo '<th width=33%>'._('Paper Size').'<select name="PaperSize">'; foreach ($Papers as $Paper) { - if (substr($Paper,-8)=='Portrait') { - $PaperValue=substr($Paper,0,mb_strlen($Paper)-9); + if (mb_substr($Paper,-8)=='Portrait') { + $PaperValue=mb_substr($Paper,0,mb_strlen($Paper)-9); } else { $PaperValue=$Paper; } Modified: trunk/GetStockImage.php =================================================================== --- trunk/GetStockImage.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/GetStockImage.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -22,26 +22,26 @@ // Color decode function function DecodeBgColor( $colorstr ) { if ( $colorstr[0] == '#' ) { - $colorstr = substr($colorstr,1,mb_strlen($colorstr)); + $colorstr = mb_substr($colorstr,1,mb_strlen($colorstr)); } $red = 0; if(mb_strlen($colorstr) > 1) { - $red = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,mb_strlen($colorstr)); + $red = hexdec(mb_substr($colorstr,0,2)); + $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); } $green = 0; if(mb_strlen($colorstr) > 1) { - $green = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,mb_strlen($colorstr)); + $green = hexdec(mb_substr($colorstr,0,2)); + $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); } $blue = 0; if(mb_strlen($colorstr) > 1) { - $blue = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,mb_strlen($colorstr)); + $blue = hexdec(mb_substr($colorstr,0,2)); + $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); } if(mb_strlen($colorstr) > 1) { - $alpha = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,mb_strlen($colorstr)); + $alpha = hexdec(mb_substr($colorstr,0,2)); + $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); } if ( isset($alpha) ) return array('red' => $red, 'green' => $green, 'blue' => $blue, 'alpha' => $alpha ); @@ -120,8 +120,8 @@ if( $i === false ) $type = 'png'; else { - $type = strtolower(substr($stockid,$i+1,mb_strlen($stockid))); - $stockid = substr($stockid,0,$i); + $type = strtolower(mb_substr($stockid,$i+1,mb_strlen($stockid))); + $stockid = mb_substr($stockid,0,$i); if($blanktext && !isset($text)) $text = ''; } Modified: trunk/Numbers/Words/lang.bg.php =================================================================== --- trunk/Numbers/Words/lang.bg.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.bg.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -311,8 +311,8 @@ if (is_string($num)) { $ret = array(); $mb_strlen = mb_strlen($num); - $first = substr($num, 0, $mb_strlen%3); - preg_match_all('/\d{3}/', substr($num, $mb_strlen%3, $mb_strlen), $m); + $first = mb_substr($num, 0, $mb_strlen%3); + preg_match_all('/\d{3}/', mb_substr($num, $mb_strlen%3, $mb_strlen), $m); $ret =& $m[0]; if ($first) array_unshift($ret, $first); return $ret; @@ -446,9 +446,9 @@ if (!$num || preg_match('/^-?0+$/', $num) || !preg_match('/^-?\d+$/', $num)) return $this->_zero; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret_minus = $this->_minus . $this->_sep; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // if the absolute value is greater than 9.99*10^302, return infinity Modified: trunk/Numbers/Words/lang.cs.php =================================================================== --- trunk/Numbers/Words/lang.cs.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.cs.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -169,9 +169,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -185,8 +185,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -198,7 +198,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -210,13 +210,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.de.php =================================================================== --- trunk/Numbers/Words/lang.de.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.de.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -158,9 +158,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -174,8 +174,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -187,7 +187,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -199,13 +199,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.dk.php =================================================================== --- trunk/Numbers/Words/lang.dk.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.dk.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -172,9 +172,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -188,8 +188,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -201,7 +201,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -213,13 +213,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.en_100.php =================================================================== --- trunk/Numbers/Words/lang.en_100.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.en_100.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -146,9 +146,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -162,8 +162,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -176,7 +176,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -188,13 +188,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.en_GB.php =================================================================== --- trunk/Numbers/Words/lang.en_GB.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.en_GB.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -204,9 +204,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -220,8 +220,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -233,7 +233,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -245,13 +245,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.en_US.php =================================================================== --- trunk/Numbers/Words/lang.en_US.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.en_US.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -296,9 +296,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -312,8 +312,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -325,7 +325,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -337,13 +337,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.es.php =================================================================== --- trunk/Numbers/Words/lang.es.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.es.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -129,10 +129,10 @@ $ret = ''; // add a the word for the minus sign if necessary - if (substr($num, 0, 1) == '-') + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } @@ -147,13 +147,13 @@ { // convert the number above the first 6 digits // with it's corresponding $power. - $snum = substr($num, 0, -6); + $snum = mb_substr($num, 0, -6); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $ret .= $this->toWords($snum, $power + 6); } } - $num = substr($num, -6); + $num = mb_substr($num, -6); if ($num == 0) { return $ret; } Modified: trunk/Numbers/Words/lang.es_AR.php =================================================================== --- trunk/Numbers/Words/lang.es_AR.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.es_AR.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -189,10 +189,10 @@ $ret = ''; // add a the word for the minus sign if necessary - if (substr($num, 0, 1) == '-') + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } @@ -212,13 +212,13 @@ { // convert the number above the first 6 digits // with it's corresponding $power. - $snum = substr($num, 0, -6); + $snum = mb_substr($num, 0, -6); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $ret .= $this->toWords($snum, $power + 6); } } - $num = substr($num, -6); + $num = mb_substr($num, -6); if ($num == 0) { return $ret; } Modified: trunk/Numbers/Words/lang.et.php =================================================================== --- trunk/Numbers/Words/lang.et.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.et.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -235,9 +235,9 @@ function toWords($num, $power = 0, $powsuffix = '') { $ret = ''; - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } $num = trim($num); @@ -248,7 +248,7 @@ $curp = $maxp; for ($p = $maxp; $p > 0; --$p) { // power if (isset($this->_exponent[$p])) { - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -260,7 +260,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -272,13 +272,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.fr.php =================================================================== --- trunk/Numbers/Words/lang.fr.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.fr.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -264,8 +264,8 @@ if (is_string($num)) { $ret = array(); $mb_strlen = mb_strlen($num); - $first = substr($num, 0, $mb_strlen%3); - preg_match_all('/\d{3}/', substr($num, $mb_strlen%3, $mb_strlen), $m); + $first = mb_substr($num, 0, $mb_strlen%3); + preg_match_all('/\d{3}/', mb_substr($num, $mb_strlen%3, $mb_strlen), $m); $ret =& $m[0]; if ($first) array_unshift($ret, $first); return $ret; @@ -397,9 +397,9 @@ if (!$num || preg_match('/^-?0+$/', $num) || !preg_match('/^-?\d+$/', $num)) return $this->_zero; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_minus . $this->_sep; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // if the absolute value is greater than 9.99*10^302, return infinity Modified: trunk/Numbers/Words/lang.fr_BE.php =================================================================== --- trunk/Numbers/Words/lang.fr_BE.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.fr_BE.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -268,8 +268,8 @@ if (is_string($num)) { $ret = array(); $mb_strlen = mb_strlen($num); - $first = substr($num, 0, $mb_strlen%3); - preg_match_all('/\d{3}/', substr($num, $mb_strlen%3, $mb_strlen), $m); + $first = mb_substr($num, 0, $mb_strlen%3); + preg_match_all('/\d{3}/', mb_substr($num, $mb_strlen%3, $mb_strlen), $m); $ret =& $m[0]; if ($first) array_unshift($ret, $first); return $ret; @@ -375,9 +375,9 @@ if (!$num || preg_match('/^-?0+$/', $num) || !preg_match('/^-?\d+$/', $num)) return $this->_zero; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_minus . $this->_sep; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // if the absolute value is greater than 9.99*10^302, return infinity Modified: trunk/Numbers/Words/lang.he.php =================================================================== --- trunk/Numbers/Words/lang.he.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.he.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -313,9 +313,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -329,8 +329,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -342,7 +342,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -354,13 +354,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.hu_HU.php =================================================================== --- trunk/Numbers/Words/lang.hu_HU.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.hu_HU.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -204,9 +204,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -220,8 +220,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -233,7 +233,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -245,13 +245,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.id.php =================================================================== --- trunk/Numbers/Words/lang.id.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.id.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -131,9 +131,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -147,8 +147,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -160,7 +160,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -172,16 +172,16 @@ switch(mb_strlen($num)) { case 4: - $th = (int)substr($num,-4,1); + $th = (int)mb_substr($num,-4,1); case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.it_IT.php =================================================================== --- trunk/Numbers/Words/lang.it_IT.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.it_IT.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -125,10 +125,10 @@ $ret = ''; // add a the word for the minus sign if necessary - if (substr($num, 0, 1) == '-') + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } @@ -143,13 +143,13 @@ { // convert the number above the first 6 digits // with it's corresponding $power. - $snum = substr($num, 0, -6); + $snum = mb_substr($num, 0, -6); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $ret .= $this->toWords($snum, $power + 6); } } - $num = substr($num, -6); + $num = mb_substr($num, -6); if ($num == 0) { return $ret; } Modified: trunk/Numbers/Words/lang.lt.php =================================================================== --- trunk/Numbers/Words/lang.lt.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.lt.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -136,9 +136,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -152,8 +152,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -165,7 +165,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -177,13 +177,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.nl.php =================================================================== --- trunk/Numbers/Words/lang.nl.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.nl.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -166,9 +166,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -182,8 +182,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -195,7 +195,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -207,13 +207,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.pl.php =================================================================== --- trunk/Numbers/Words/lang.pl.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.pl.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -225,9 +225,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -241,8 +241,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -254,7 +254,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -266,13 +266,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: @@ -476,18 +476,18 @@ * @since Numbers_Words 0.4 */ function _get_numlevel($num) { - $num = (int)substr($num,-3); + $num = (int)mb_substr($num,-3); $h = $t = $d = $lev = 0; switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.pt_BR.php =================================================================== --- trunk/Numbers/Words/lang.pt_BR.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.pt_BR.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -219,9 +219,9 @@ $num = trim($num); - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces Modified: trunk/Numbers/Words/lang.ru.php =================================================================== --- trunk/Numbers/Words/lang.ru.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.ru.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -463,9 +463,9 @@ $num = trim($num); $sign = ""; - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $sign = $this->_minus . $this->_sep; - $num = substr($num, 1); + $num = mb_substr($num, 1); } while (mb_strlen($num) % 3) $num = '0' . $num; @@ -483,7 +483,7 @@ } else { $groupgender = 1; } - $group = $this->_groupToWords(substr($num,-$power-3,3),$groupgender,$_case); + $group = $this->_groupToWords(mb_substr($num,-$power-3,3),$groupgender,$_case); if (!$power) { $case = $_case; } @@ -547,7 +547,7 @@ $hundreds = (int)$num{0}; if ($hundreds) { $ret = $this->_hundreds[$hundreds]; - if (substr($num,1) != '00') { + if (mb_substr($num,1) != '00') { $ret .= $this->_sep; } $case = 3; Modified: trunk/Numbers/Words/lang.sv.php =================================================================== --- trunk/Numbers/Words/lang.sv.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.sv.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -157,9 +157,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -173,8 +173,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -186,7 +186,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -198,13 +198,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words.php =================================================================== --- trunk/Numbers/Words.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -65,10 +65,10 @@ if (!file_exists('Numbers/Words/lang.' . $locale . '.php')){ //try to drop off the .utf8 suffix then recheck if (mb_strpos($locale,'.utf8')){ - $locale = substr($locale, 0,mb_strpos($locale,'.utf8')); + $locale = mb_substr($locale, 0,mb_strpos($locale,'.utf8')); } if (!file_exists('Numbers/Words/lang.' . $locale . '.php')){ - $locale = substr($locale,0,2); + $locale = mb_substr($locale,0,2); } if (!file_exists('Numbers/Words/lang.' . $locale . '.php')){ $locale = 'en_US'; Modified: trunk/OffersReceived.php =================================================================== --- trunk/OffersReceived.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/OffersReceived.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -134,8 +134,8 @@ $rejects=array(); $defers=array(); foreach ($_POST as $key => $value) { - if(substr($key,0,6)=='action') { - $OfferID=substr($key,6); + if(mb_substr($key,0,6)=='action') { + $OfferID=mb_substr($key,6); switch ($value) { case 1: $accepts[]=$OfferID; Modified: trunk/PO_AuthoriseMyOrders.php =================================================================== --- trunk/PO_AuthoriseMyOrders.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/PO_AuthoriseMyOrders.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -17,8 +17,8 @@ if (isset($_POST['UpdateAll'])) { foreach ($_POST as $key => $value) { - if (substr($key,0,6)=='status') { - $OrderNo=substr($key,6); + 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']; Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/PO_Items.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -504,9 +504,9 @@ foreach ($_POST as $FormVariableName => $Quantity) { - if (substr($FormVariableName, 0, 6)=='NewQty') { //if the form variable represents a Qty to add to the order + if (mb_substr($FormVariableName, 0, 6)=='NewQty') { //if the form variable represents a Qty to add to the order - $ItemCode = substr($FormVariableName, 6, mb_strlen($FormVariableName)-6); + $ItemCode = mb_substr($FormVariableName, 6, mb_strlen($FormVariableName)-6); $AlreadyOnThisOrder = 0; if ($_SESSION['PO_AllowSameItemMultipleTimes'] ==false){ Modified: trunk/PageSecurity.php =================================================================== --- trunk/PageSecurity.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/PageSecurity.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -13,7 +13,7 @@ if (isset($_POST['Update'])) { foreach ($_POST as $ScriptName => $PageSecurityValue) { if ($ScriptName!='Update' and $ScriptName!='FormID') { - $ScriptName = substr($ScriptName, 0, mb_strlen($ScriptName)-4).'.php'; + $ScriptName = mb_substr($ScriptName, 0, mb_strlen($ScriptName)-4).'.php'; $sql="UPDATE scripts SET pagesecurity='".$PageSecurityValue."' WHERE script='".$ScriptName."'"; $UpdateResult=DB_query($sql, $db,_('Could not update the page security value for the script because')); } Modified: trunk/SalesCategories.php =================================================================== --- trunk/SalesCategories.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/SalesCategories.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -39,7 +39,7 @@ $FileName = $_SESSION['part_pics_dir'] . '/cat_' . $SelectedCategory . '.jpg'; //But check for the worst - if (strtoupper(substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ + if (strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['ItemPicture']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/SelectCreditItems.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -116,8 +116,8 @@ /*will only be true if page called from customer selection form parse the $Select string into customer code and branch code */ - $_SESSION['CreditItems']->Branch = substr($_POST['Select'],mb_strpos($_POST['Select'],' - ')+3); - $_POST['Select'] = substr($_POST['Select'],0,mb_strpos($_POST['Select'],' - ')); + $_SESSION['CreditItems']->Branch = mb_substr($_POST['Select'],mb_strpos($_POST['Select'],' - ')+3); + $_POST['Select'] = mb_substr($_POST['Select'],0,mb_strpos($_POST['Select'],' - ')); /*Now retrieve customer information - name, salestype, currency, terms etc */ Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/SelectOrderItems.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -25,7 +25,7 @@ if (isset($_POST['order_items'])){ foreach ($_POST as $key => $value) { if (strstr($key,'itm')) { - $NewItem_array[substr($key,3)] = trim($value); + $NewItem_array[mb_substr($key,3)] = trim($value); } } } Modified: trunk/SpecialOrder.php =================================================================== --- trunk/SpecialOrder.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/SpecialOrder.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -332,7 +332,7 @@ if ($PartCount[0]!=0){ $PartAlreadyExists =True; if (mb_strlen($PartCode)==20){ - $PartCode = "*" . strtoupper(substr($_SESSION['SPL']->PurchOrderNo,0,13)) . "_" . $SPLLine->LineNo; + $PartCode = "*" . strtoupper(mb_substr($_SESSION['SPL']->PurchOrderNo,0,13)) . "_" . $SPLLine->LineNo; } $PartCode = $PartCode . $Counter; $Counter++; Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Stocks.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -43,7 +43,7 @@ $filename = $_SESSION['part_pics_dir'] . '/' . $StockID . '.jpg'; //But check for the worst - if (strtoupper(substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ + if (strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['ItemPicture']['size'] > ($_SE... [truncated message content] |
From: <dai...@us...> - 2011-07-03 03:27:58
|
Revision: 4620 http://web-erp.svn.sourceforge.net/web-erp/?rev=4620&view=rev Author: daintree Date: 2011-07-03 03:27:48 +0000 (Sun, 03 Jul 2011) Log Message: ----------- strpos to mb_strpos Modified Paths: -------------- trunk/AccountSections.php trunk/ConfirmDispatch_Invoice.php trunk/Contracts.php trunk/Customers.php trunk/DailySalesInquiry.php trunk/DeliveryDetails.php trunk/MRPCreateDemands.php trunk/Numbers/Words.php trunk/PO_PDFPurchOrder.php trunk/PcExpensesTypeTab.php trunk/PcTypeTabs.php trunk/SelectCreditItems.php trunk/Stocks.php trunk/SuppPriceList.php trunk/Tax.php trunk/TaxCategories.php trunk/TaxProvinces.php trunk/UnitsOfMeasure.php trunk/UpgradeDatabase.php trunk/Z_MakeNewCompany.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_poEditLangModule.php trunk/api/api_debtortransactions.php trunk/doc/Change.log trunk/doc/Manual/ManualAPIFunctions.php trunk/includes/ConstructSQLForUserDefinedSalesReport.inc trunk/includes/DateFunctions.inc trunk/includes/EDIVariableSubstitution.inc trunk/includes/EDIconfig.inc trunk/includes/RFC822.php trunk/includes/class.pdf.php trunk/includes/phplot/phplot.php trunk/includes/smtp.php trunk/includes/tcpdf/CHANGELOG.TXT trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/tcpdf.php trunk/install/save.php trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/RCFunctions.inc trunk/reportwriter/admin/forms/ReportsCritSetup.html trunk/reportwriter/forms/FormsFilter.html trunk/reportwriter/forms/ReportsFilter.html Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/AccountSections.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -86,7 +86,7 @@ $Errors[$i] = 'SectionID'; $i++; } - if (isset($_POST['SectionID']) and strpos($_POST['SectionID'],".")>0) { + if (isset($_POST['SectionID']) and mb_strpos($_POST['SectionID'],".")>0) { $InputError = 1; prnMsg( _('The section number must be an integer'),'error'); $Errors[$i] = 'SectionID'; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/ConfirmDispatch_Invoice.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -800,7 +800,7 @@ /*Test to see if the item being sold is an asset */ if (substr($OrderLine->StockID,0,6)=='ASSET-'){ $IsAsset = true; - $HyphenOccursAt = strpos($OrderLine->StockID,'-',6); + $HyphenOccursAt = mb_strpos($OrderLine->StockID,'-',6); if ($HyphenOccursAt == false){ $AssetNumber = intval(substr($OrderLine->StockID,6)); } else { Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Contracts.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -224,7 +224,7 @@ prnMsg(_('The contract reference is expected to be more than 2 characters long. Please alter the contract reference before proceeding.'),'error'); $InputError = true; } - if(ContainsIllegalCharacters($_POST['ContractRef']) OR strpos($_POST['ContractRef'],' ')>0){ + if(ContainsIllegalCharacters($_POST['ContractRef']) OR mb_strpos($_POST['ContractRef'],' ')>0){ prnMsg(_('The contract reference cannot contain any spaces, slashes, or inverted commas. Please alter the contract reference before proceeding.'),'error'); $InputError = true; } Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Customers.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -49,7 +49,7 @@ prnMsg( _('The debtor code cannot be empty'),'error'); $Errors[$i] = 'DebtorNo'; $i++; - } elseif ($_SESSION['AutoDebtorNo']==0 AND (ContainsIllegalCharacters($_POST['DebtorNo']) OR strpos($_POST['DebtorNo'], ' '))) { + } elseif ($_SESSION['AutoDebtorNo']==0 AND (ContainsIllegalCharacters($_POST['DebtorNo']) OR mb_strpos($_POST['DebtorNo'], ' '))) { $InputError = 1; prnMsg( _('The customer code cannot contain any of the following characters') . " . - ' & + \" " . _('or a space'),'error'); $Errors[$i] = 'DebtorNo'; Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/DailySalesInquiry.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -59,11 +59,11 @@ echo '</form></div>'; echo '<br />'; /*Now get and display the sales data returned */ -if (strpos($EndDateSQL,'/')) { +if (mb_strpos($EndDateSQL,'/')) { $Date_Array = explode('/',$EndDateSQL); -} elseif (strpos ($EndDateSQL,'-')) { +} elseif (mb_strpos ($EndDateSQL,'-')) { $Date_Array = explode('-',$EndDateSQL); -} elseif (strpos ($EndDateSQL,'.')) { +} elseif (mb_strpos ($EndDateSQL,'.')) { $Date_Array = explode('.',$EndDateSQL); } Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/DeliveryDetails.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -61,7 +61,7 @@ $InputErrors =1; prnMsg(_('You should enter the street address in the box provided') . '. ' . _('Orders cannot be accepted without a valid street address'),'error'); } -// if (strpos($_POST['BrAdd1'],_('Box'))>0){ +// if (mb_strpos($_POST['BrAdd1'],_('Box'))>0){ // prnMsg(_('You have entered the word') . ' "' . _('Box') . '" ' . _('in the street address') . '. ' . _('Items cannot be delivered to') . ' ' ._('box') . ' ' . _('addresses'),'warn'); // } if (!is_numeric($_POST['FreightCost'])){ Modified: trunk/MRPCreateDemands.php =================================================================== --- trunk/MRPCreateDemands.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/MRPCreateDemands.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -83,11 +83,11 @@ // Create array of dates based on DistDate and adding either weeks or months $FormatedDistdate = FormatDateForSQL($_POST['DistDate']); -if (strpos($FormatedDistdate,"/")) { +if (mb_strpos($FormatedDistdate,"/")) { list($yyyy,$mm,$dd) = explode("/",$FormatedDistdate); -} else if (strpos($FormatedDistdate,"-")) { +} else if (mb_strpos($FormatedDistdate,"-")) { list($yyyy,$mm,$dd) = explode("-",$FormatedDistdate); -} else if (strpos($FormatedDistdate,".")) { +} else if (mb_strpos($FormatedDistdate,".")) { list($yyyy,$mm,$dd) = explode(".",$FormatedDistdate); } Modified: trunk/Numbers/Words.php =================================================================== --- trunk/Numbers/Words.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Numbers/Words.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -64,8 +64,8 @@ //Phil mods to ensure correct translation used. if (!file_exists('Numbers/Words/lang.' . $locale . '.php')){ //try to drop off the .utf8 suffix then recheck - if (strpos($locale,'.utf8')){ - $locale = substr($locale, 0,strpos($locale,'.utf8')); + if (mb_strpos($locale,'.utf8')){ + $locale = substr($locale, 0,mb_strpos($locale,'.utf8')); } if (!file_exists('Numbers/Words/lang.' . $locale . '.php')){ $locale = substr($locale,0,2); @@ -132,7 +132,7 @@ @$obj =& new $classname; - if (strpos($num, '.') === false) + if (mb_strpos($num, '.') === false) { $ret = trim($obj->toCurrencyWords($int_curr, $num)); } else { Modified: trunk/PO_PDFPurchOrder.php =================================================================== --- trunk/PO_PDFPurchOrder.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/PO_PDFPurchOrder.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -385,7 +385,7 @@ if (DB_num_rows($ContactsResult)>0){ echo '<tr><td>'. _('Email to') .':</td><td><select name="EmailTo">'; while ($ContactDetails = DB_fetch_array($ContactsResult)){ - if (mb_strlen($ContactDetails['email'])>2 AND strpos($ContactDetails['email'],'@')>0){ + if (mb_strlen($ContactDetails['email'])>2 AND mb_strpos($ContactDetails['email'],'@')>0){ if ($_POST['EmailTo']==$ContactDetails['email']){ echo '<option selected value="' . $ContactDetails['email'] . '">' . $ContactDetails['Contact'] . ' - ' . $ContactDetails['email'] . '</option>'; } else { Modified: trunk/PcExpensesTypeTab.php =================================================================== --- trunk/PcExpensesTypeTab.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/PcExpensesTypeTab.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -17,7 +17,7 @@ $SelectedType=''; } -if (!isset($_GET['delete']) and (ContainsIllegalCharacters($SelectedType) OR strpos($SelectedType,' ')>0)){ +if (!isset($_GET['delete']) and (ContainsIllegalCharacters($SelectedType) OR mb_strpos($SelectedType,' ')>0)){ $InputError = 1; prnMsg(_('The petty cash tab type contain any of the following characters " \' - & or a space'),'error'); } Modified: trunk/PcTypeTabs.php =================================================================== --- trunk/PcTypeTabs.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/PcTypeTabs.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -41,7 +41,7 @@ echo prnMsg(_('The tab code must be twenty characters or less long'),'error'); $Errors[$i] = 'TypeTabCode'; $i++; - }elseif (ContainsIllegalCharacters($_POST['TypeTabCode']) OR strpos($_POST['TypeTabCode'],' ')>0){ + }elseif (ContainsIllegalCharacters($_POST['TypeTabCode']) OR mb_strpos($_POST['TypeTabCode'],' ')>0){ $InputError = 1; prnMsg(_('The petty cash tab type code cannot contain any of the illegal characters'),'error'); } elseif (mb_strlen($_POST['TypeTabDescription']) >50) { Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/SelectCreditItems.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -116,8 +116,8 @@ /*will only be true if page called from customer selection form parse the $Select string into customer code and branch code */ - $_SESSION['CreditItems']->Branch = substr($_POST['Select'],strpos($_POST['Select'],' - ')+3); - $_POST['Select'] = substr($_POST['Select'],0,strpos($_POST['Select'],' - ')); + $_SESSION['CreditItems']->Branch = substr($_POST['Select'],mb_strpos($_POST['Select'],' - ')+3); + $_POST['Select'] = substr($_POST['Select'],0,mb_strpos($_POST['Select'],' - ')); /*Now retrieve customer information - name, salestype, currency, terms etc */ Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Stocks.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -102,7 +102,7 @@ $Errors[$i] = 'StockID'; $i++; } - if (ContainsIllegalCharacters($StockID) OR strpos($StockID,' ')) { + if (ContainsIllegalCharacters($StockID) OR mb_strpos($StockID,' ')) { $InputError = 1; prnMsg(_('The stock item code cannot contain any of the following characters') . " - ' & + \" \\ " . _('or a space'),'error'); $Errors[$i] = 'StockID'; Modified: trunk/SuppPriceList.php =================================================================== --- trunk/SuppPriceList.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/SuppPriceList.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -138,11 +138,11 @@ // 4) Height 5) Text 6) Alignment 7) Border 8) Fill - True to use SetFillColor // and False to set to transparent - if (strpos($myrow[3],'-')) { + if (mb_strpos($myrow[3],'-')) { $DateArray=explode('-', $myrow[3]); - } else if (strpos($myrow[3],'/')) { + } else if (mb_strpos($myrow[3],'/')) { $DateArray=explode('/', $myrow[3]); - } else if (strpos($myrow[3],'.')) { + } else if (mb_strpos($myrow[3],'.')) { $DateArray=explode('.', $myrow[3]); } $dateprice=date($_SESSION['DefaultDateFormat'], mktime(0,0,0,$DateArray[1],$DateArray[2],$DateArray[0])); Modified: trunk/Tax.php =================================================================== --- trunk/Tax.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Tax.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -127,9 +127,9 @@ /*Now do the inputs from SuppTrans */ /*Only have dates in SuppTrans no periods so need to get the starting date */ - if (strpos($PeriodEnd,'/')) { + if (mb_strpos($PeriodEnd,'/')) { $Date_Array = explode('/',$PeriodEnd); - } elseif (strpos($PeriodEnd,'.')) { + } elseif (mb_strpos($PeriodEnd,'.')) { $Date_Array = explode('.',$PeriodEnd); } if ($_SESSION['DefaultDateFormat']=='d/m/Y'){ Modified: trunk/TaxCategories.php =================================================================== --- trunk/TaxCategories.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/TaxCategories.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -26,7 +26,7 @@ //first off validate inputs sensible - if (strpos($_POST['TaxCategoryName'],'&')>0 OR strpos($_POST['TaxCategoryName'],"'")>0) { + if (mb_strpos($_POST['TaxCategoryName'],'&')>0 OR mb_strpos($_POST['TaxCategoryName'],"'")>0) { $InputError = 1; prnMsg( _('The tax category name cannot contain the character') . " '&' " . _('or the character') ." '",'error'); } Modified: trunk/TaxProvinces.php =================================================================== --- trunk/TaxProvinces.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/TaxProvinces.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -25,7 +25,7 @@ //first off validate inputs sensible - if (strpos($_POST['TaxProvinceName'],'&')>0 OR strpos($_POST['TaxProvinceName'],"'")>0) { + if (mb_strpos($_POST['TaxProvinceName'],'&')>0 OR mb_strpos($_POST['TaxProvinceName'],"'")>0) { $InputError = 1; prnMsg( _('The tax province name cannot contain the character') . " '&' " . _('or the character') ." '",'error'); } Modified: trunk/UnitsOfMeasure.php =================================================================== --- trunk/UnitsOfMeasure.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/UnitsOfMeasure.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -25,7 +25,7 @@ //first off validate inputs sensible - if (strpos($_POST['MeasureName'],'&')>0 OR strpos($_POST['MeasureName'],"'")>0) { + if (mb_strpos($_POST['MeasureName'],'&')>0 OR mb_strpos($_POST['MeasureName'],"'")>0) { $InputError = 1; prnMsg( _('The unit of measure cannot contain the character') . " '&' " . _('or the character') ." '",'error'); } Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/UpgradeDatabase.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -159,7 +159,7 @@ if (substr($SQLEntries[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLEntries[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLEntries[$i],';')>0 AND ! $InAFunction){ $sql = substr($sql,0,mb_strlen($sql)-1); $result = DB_query($sql, $db, '','', false, false); echo '<tr><td>' . $sql . '</td>'; Modified: trunk/Z_MakeNewCompany.php =================================================================== --- trunk/Z_MakeNewCompany.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_MakeNewCompany.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -118,7 +118,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.04-3.05.php =================================================================== --- trunk/Z_Upgrade_3.04-3.05.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.04-3.05.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -49,7 +49,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.05-3.06.php =================================================================== --- trunk/Z_Upgrade_3.05-3.06.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.05-3.06.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -41,7 +41,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.07-3.08.php =================================================================== --- trunk/Z_Upgrade_3.07-3.08.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.07-3.08.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -41,7 +41,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.08-3.09.php =================================================================== --- trunk/Z_Upgrade_3.08-3.09.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.08-3.09.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -41,7 +41,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.09-3.10.php =================================================================== --- trunk/Z_Upgrade_3.09-3.10.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.09-3.10.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -41,7 +41,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.10-3.11.php =================================================================== --- trunk/Z_Upgrade_3.10-3.11.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.10-3.11.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -51,7 +51,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $sql = substr($sql,0,mb_strlen($sql)-1); $result = DB_query($sql, $db, $ErrMsg, $DBMsg, false, false); switch (DB_error_no($db)) { Modified: trunk/Z_Upgrade_3.11-4.00.php =================================================================== --- trunk/Z_Upgrade_3.11-4.00.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.11-4.00.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -51,7 +51,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $sql = substr($sql,0,mb_strlen($sql)-1); $result = DB_query($sql, $db, $ErrMsg, $DBMsg, false, false); switch (DB_error_no($db)) { Modified: trunk/Z_poEditLangModule.php =================================================================== --- trunk/Z_poEditLangModule.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_poEditLangModule.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -144,7 +144,7 @@ for ($i=1; $i<=$TotalLines; $i++) { - $b = strpos($AlsoIn[$i], $_POST['module']); + $b = mb_strpos($AlsoIn[$i], $_POST['module']); if ($b === False) { /* skip it */ Modified: trunk/api/api_debtortransactions.php =================================================================== --- trunk/api/api_debtortransactions.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/api/api_debtortransactions.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -20,11 +20,11 @@ //for MySQL dates are in the format YYYY-mm-dd - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -53,9 +53,9 @@ $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (strpos($TranDate,'/')>0) { + if (mb_strpos($TranDate,'/')>0) { $DateArray = explode('/',$TranDate); - } elseif (strpos($TranDate,'.')>0) { + } elseif (mb_strpos($TranDate,'.')>0) { $DateArray = explode('.',$TranDate); } if ($DateFormat=='d/m/Y') { Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/doc/Change.log 2011-07-03 03:27:48 UTC (rev 4620) @@ -2666,7 +2666,7 @@ 28/8/04 Steve - Minor changes to theme default.css files 28/8/04 Steve - SelectCustomer.php SelectProduct.php SelectSupplier.php all modified to allow paging where a large result set is returned 25/8/04 SelectCreditItems.php now allows text line entries with each line of the credit note -23/8/04 SelectOrderItems.php SelectCreditItems.php strrpos works differently in PHP 5 changed to use strpos +23/8/04 SelectOrderItems.php SelectCreditItems.php strrpos works differently in PHP 5 changed to use mb_strpos 14/8/04 Changed ConfirmDispatch_Invoice.php to allow entry of consignment reference also changed PrintCustTrans.php and PDFPrintCustTransPageHeader.inc to print out the narrative on sales order lines and the consignment number 14/8/04 Changed SelectOrderItems.php to allow entry of narrative and update narrative entries also show warning when quick entries not processed. 14/8/04 Changed DefineCartClass.inc to have a Narrative variable in LineItems and a Consignment variable in the header Modified: trunk/doc/Manual/ManualAPIFunctions.php =================================================================== --- trunk/doc/Manual/ManualAPIFunctions.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/doc/Manual/ManualAPIFunctions.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -26,7 +26,7 @@ $weberppassword = $myrow[0]; $ServerString = $_SERVER['HTTP_HOST'].$rootpath; -$FirstBitOfURL = substr($ServerString,0,strpos($ServerString,'/doc/Manual')); +$FirstBitOfURL = substr($ServerString,0,mb_strpos($ServerString,'/doc/Manual')); $ServerURL = "http://". $FirstBitOfURL ."/api/api_xml-rpc.php"; Modified: trunk/includes/ConstructSQLForUserDefinedSalesReport.inc =================================================================== --- trunk/includes/ConstructSQLForUserDefinedSalesReport.inc 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/ConstructSQLForUserDefinedSalesReport.inc 2011-07-03 03:27:48 UTC (rev 4620) @@ -257,7 +257,7 @@ The first 6 Columns are defined by the group by fields so for eg the first col defined will be col 7 and so on - thats why need to add 6 to the col defined as */ - $length_ColNum = strpos($SQLSelectCls, 'AS col' . ($Cols['colnumerator'] + 8) , 7); + $length_ColNum = mb_strpos($SQLSelectCls, 'AS col' . ($Cols['colnumerator'] + 8) , 7); If ($length_ColNum == 0) { @@ -274,9 +274,9 @@ /*find the comma just before the Select Cls statement for the numerator column */ do { - $strt_ColNum = strpos( $SQLSelectCls, ',', $strt_ColNum + 1) + 1; + $strt_ColNum = mb_strpos( $SQLSelectCls, ',', $strt_ColNum + 1) + 1; - } while (strpos($SQLSelectCls, ',', $strt_ColNum) < $length_ColNum && strpos($SQLSelectCls, ',' , $strt_ColNum)!=0); + } while (mb_strpos($SQLSelectCls, ',', $strt_ColNum) < $length_ColNum && mb_strpos($SQLSelectCls, ',' , $strt_ColNum)!=0); /*The length of the element in the select clause defining the column will be from the comma to the @@ -288,7 +288,7 @@ /*The denominator column is also required if the constant is not used so do the same again for the denominator */ - $length_ColDen = strpos($SQLSelectCls, 'AS col' . (($Cols['coldenominator']) + 8), 7); + $length_ColDen = mb_strpos($SQLSelectCls, 'AS col' . (($Cols['coldenominator']) + 8), 7); If ($length_ColDen == 0){ prnMsg (_('Calculated fields must use columns defined in the report specification') . '. ' . _('The denominator column number entered for this calculation is not defined in the report'),'error',_('Calculation With Undefined Denominator')); Exit; @@ -299,9 +299,9 @@ /*find the comma just before the Select Cls statement for the denominator column */ do { - $strt_ColDen = strpos( $SQLSelectCls, ',', $strt_ColDen +1)+1; + $strt_ColDen = mb_strpos( $SQLSelectCls, ',', $strt_ColDen +1)+1; - } while (strpos($SQLSelectCls, ',', $strt_ColDen) < $length_ColDen && strpos($SQLSelectCls, ',' , $strt_ColDen)!=0); + } while (mb_strpos($SQLSelectCls, ',', $strt_ColDen) < $length_ColDen && mb_strpos($SQLSelectCls, ',' , $strt_ColDen)!=0); $length_ColDen = $length_ColDen - $strt_ColDen - 1; Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/DateFunctions.inc 2011-07-03 03:27:48 UTC (rev 4620) @@ -21,11 +21,11 @@ //echo '<BR>The date entered is ' . $DateEntry; - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } elseif (mb_strlen($DateEntry)==6) { $Date_Array[0]= substr($DateEntry,0,2); @@ -83,11 +83,11 @@ function MonthAndYearFromSQLDate($DateEntry) { - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -101,11 +101,11 @@ function DayOfWeekFromSQLDate($DateEntry) { - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -119,11 +119,11 @@ function DayOfMonthFromSQLDate($DateEntry) { - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -154,11 +154,11 @@ //for MySQL dates are in the format YYYY-mm-dd - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } else { prnMsg(_('The date does not appear to be in a valid format. The date being converted from SQL format was:') . ' ' . $DateEntry,'error'); @@ -199,11 +199,11 @@ //for MySQL dates are in the format YYYY-mm-dd //EDI format 102 dates are in the format CCYYMMDD - just need to lose the seperator - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -223,11 +223,11 @@ $DateEntry = trim($DateEntry); - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } elseif (mb_strlen($DateEntry)==6) { $Date_Array[0]= substr($DateEntry,0,2); @@ -332,11 +332,11 @@ $DateEntry =trim($DateEntry); - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } elseif (mb_strlen($DateEntry)==6) { $Date_Array[0]= substr($DateEntry,0,2); @@ -388,11 +388,11 @@ $DateEntry = trim($DateEntry); - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } elseif (mb_strlen($DateEntry)==6) { $Date_Array[0]= substr($DateEntry,0,2); @@ -455,11 +455,11 @@ $DateEntry = trim($DateEntry); - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } elseif (mb_strlen($DateEntry)==6) { $Date_Array[0]= substr($DateEntry,0,2); @@ -581,11 +581,11 @@ $TranDate = trim($TranDate); - if (strpos($TranDate,'/')) { + if (mb_strpos($TranDate,'/')) { $Date_Array = explode('/',$TranDate); - } elseif (strpos ($TranDate,'-')) { + } elseif (mb_strpos ($TranDate,'-')) { $Date_Array = explode('-',$TranDate); - } elseif (strpos ($TranDate,'.')) { + } elseif (mb_strpos ($TranDate,'.')) { $Date_Array = explode('.',$TranDate); } @@ -648,11 +648,11 @@ $DateToAddTo = trim($DateToAddTo); - if (strpos($DateToAddTo,'/')) { + if (mb_strpos($DateToAddTo,'/')) { $Date_Array = explode('/',$DateToAddTo); - } elseif (strpos ($DateToAddTo,'-')) { + } elseif (mb_strpos ($DateToAddTo,'-')) { $Date_Array = explode('-',$DateToAddTo); - } elseif (strpos ($DateToAddTo,'.')) { + } elseif (mb_strpos ($DateToAddTo,'.')) { $Date_Array = explode('.',$DateToAddTo); } @@ -723,18 +723,18 @@ $Date1 = trim($Date1); $Date2 = trim($Date2); - if (strpos($Date1,'/')) { + if (mb_strpos($Date1,'/')) { $Date1_array = explode('/',$Date1); - } elseif (strpos ($Date1,'-')) { + } elseif (mb_strpos ($Date1,'-')) { $Date1_array = explode('-',$Date1); - } elseif (strpos ($Date1,'.')) { + } elseif (mb_strpos ($Date1,'.')) { $Date1_array = explode('.',$Date1); } - if (strpos($Date2,'/')) { + if (mb_strpos($Date2,'/')) { $Date2_array = explode('/',$Date2); - } elseif (strpos ($Date2,'-')) { + } elseif (mb_strpos ($Date2,'-')) { $Date2_array = explode('-',$Date2); - } elseif (strpos ($Date2,'.')) { + } elseif (mb_strpos ($Date2,'.')) { $Date2_array = explode('.',$Date2); } @@ -850,11 +850,11 @@ /* Convert the transaction date into a unix time stamp.*/ - if (strpos($TransDate,'/')) { + if (mb_strpos($TransDate,'/')) { $Date_Array = explode('/',$TransDate); - } elseif (strpos ($TransDate,'-')) { + } elseif (mb_strpos ($TransDate,'-')) { $Date_Array = explode('-',$TransDate); - } elseif (strpos ($TransDate,'.')) { + } elseif (mb_strpos ($TransDate,'.')) { $Date_Array = explode('.',$TransDate); } if (($_SESSION['DefaultDateFormat']=='d/m/Y') or ($_SESSION['DefaultDateFormat']=='d.m.Y')){ Modified: trunk/includes/EDIVariableSubstitution.inc =================================================================== --- trunk/includes/EDIVariableSubstitution.inc 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/EDIVariableSubstitution.inc 2011-07-03 03:27:48 UTC (rev 4620) @@ -5,14 +5,14 @@ $PositionPointer = 0; $NewLineText =''; /* now get each occurence of [ in the line */ - while (strpos ($MsgLineText,'[',$PositionPointer)!=False){ + while (mb_strpos ($MsgLineText,'[',$PositionPointer)!=False){ $LastPositionPointer = $PositionPointer; - $PositionPointer = strpos ($MsgLineText,'[',$PositionPointer); + $PositionPointer = mb_strpos ($MsgLineText,'[',$PositionPointer); $NewLineText = $NewLineText . substr($MsgLineText,$LastPositionPointer,$PositionPointer-$LastPositionPointer); $LastPositionPointer = $PositionPointer; - $PositionPointer = strpos ($MsgLineText,']',$PositionPointer); + $PositionPointer = mb_strpos ($MsgLineText,']',$PositionPointer); $VariableName = substr($MsgLineText,$LastPositionPointer+1,$PositionPointer-$LastPositionPointer-1); Modified: trunk/includes/EDIconfig.inc =================================================================== --- trunk/includes/EDIconfig.inc 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/EDIconfig.inc 2011-07-03 03:27:48 UTC (rev 4620) @@ -58,14 +58,14 @@ $PoistionPointer = 0; $NewLineText =''; /* now get each occurence of [ in the line */ - while (strpos ($LineDetails['linetext'],'[',$PoistionPointer)!=False){ + while (mb_strpos ($LineDetails['linetext'],'[',$PoistionPointer)!=False){ $LastPositionPointer = $PoistionPointer; - $PositionPointer = strpos ($LineDetails['linetext'],'[',$PoistionPointer); + $PositionPointer = mb_strpos ($LineDetails['linetext'],'[',$PoistionPointer); $NewLineText = $NewLineText . substr($LineDetails['linetext'],$LastPositionPointer,$PoistionPointer-$LastPositionPointer); $LastPositionPointer = $PoistionPointer; - $PositionPointer = strpos ($LineDetails['linetext'],']',$PoistionPointer); + $PositionPointer = mb_strpos ($LineDetails['linetext'],']',$PoistionPointer); $VariableName = substr($LineDetails['linetext'],$LastPositionPointer,$PoistionPointer-$LastPositionPointer); Modified: trunk/includes/RFC822.php =================================================================== --- trunk/includes/RFC822.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/RFC822.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -211,7 +211,7 @@ // brackets/quotes etc then something's fubar. // First check there's a colon at all: - if (strpos($string, ':') === false) { + if (mb_strpos($string, ':') === false) { $this->error = 'Invalid address: ' . $string; return false; } @@ -579,7 +579,7 @@ $comments[] = $comment; // +1 is for the trailing ) - $_mailbox = substr($_mailbox, strpos($_mailbox, $comment)+mb_strlen($comment)+1); + $_mailbox = substr($_mailbox, mb_strpos($_mailbox, $comment)+mb_strlen($comment)+1); } else { break; } @@ -647,7 +647,7 @@ function _validateRouteAddr($route_addr) { // Check for colon. - if (strpos($route_addr, ':') !== false) { + if (mb_strpos($route_addr, ':') !== false) { $parts = explode(':', $route_addr); $route = $this->_splitCheck($parts, ':'); } else { @@ -784,7 +784,7 @@ $addr_spec = trim($addr_spec); // Split on @ sign if there is one. - if (strpos($addr_spec, '@') !== false) { + if (mb_strpos($addr_spec, '@') !== false) { $parts = explode('@', $addr_spec); $local_part = $this->_splitCheck($parts, '@'); $domain = substr($addr_spec, mb_strlen($local_part . '@')); Modified: trunk/includes/class.pdf.php =================================================================== --- trunk/includes/class.pdf.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/class.pdf.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -282,13 +282,13 @@ $b2='LR'; } else { $b2=''; - if(is_int(strpos($border,'L'))) { + if(is_int(mb_strpos($border,'L'))) { $b2.='L'; } - if(is_int(strpos($border,'R'))) { + if(is_int(mb_strpos($border,'R'))) { $b2.='R'; } - $b=is_int(strpos($border,'T')) ? $b2.'T' : $b2; + $b=is_int(mb_strpos($border,'T')) ? $b2.'T' : $b2; } } $sep=-1; Modified: trunk/includes/phplot/phplot.php =================================================================== --- trunk/includes/phplot/phplot.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/phplot/phplot.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -1850,7 +1850,7 @@ $asked = strtolower(trim($which_opt)); # Look for the supplied value in a comma/space separated list. - if (strpos(", $which_acc,", ", $asked,") !== False) + if (mb_strpos(", $which_acc,", ", $asked,") !== False) return $asked; $this->PrintError("$which_func(): '$which_opt' not in available choices: '$which_acc'."); @@ -1889,7 +1889,7 @@ */ protected function CheckDataType($valid_types) { - if (strpos(", $valid_types,", ", $this->data_type,") !== False) + if (mb_strpos(", $valid_types,", ", $this->data_type,") !== False) return TRUE; $this->PrintError("Data type '$this->data_type' is not valid for '$this->plot_type' plots." Modified: trunk/includes/smtp.php =================================================================== --- trunk/includes/smtp.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/smtp.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -336,7 +336,7 @@ $loops = 0; if(is_resource($this->connection)){ - while((strpos($return, CRLF) === FALSE OR substr($line,3,1) !== ' ') AND $loops < 100){ + while((mb_strpos($return, CRLF) === FALSE OR substr($line,3,1) !== ' ') AND $loops < 100){ $line = fgets($this->connection, 512); $return .= $line; $loops++; Modified: trunk/includes/tcpdf/CHANGELOG.TXT =================================================================== --- trunk/includes/tcpdf/CHANGELOG.TXT 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/tcpdf/CHANGELOG.TXT 2011-07-03 03:27:48 UTC (rev 4620) @@ -798,7 +798,7 @@ - The following Unicode to CID-0 tables were added on fonts folder: uni2cid_ak12.php, uni2cid_aj16.php, uni2cid_ag15.php, uni2cid_ac15.php. 4.0.024 (2008-09-12) - - "stripos" function was replaced with "strpos + strtolower" for backward compatibility with PHP4. + - "stripos" function was replaced with "mb_strpos + strtolower" for backward compatibility with PHP4. - support for Spot Colors were added. Check the new example n. 37 and the following new functions: AddSpotColor() SetDrawSpotColor() Modified: trunk/includes/tcpdf/barcodes.php =================================================================== --- trunk/includes/tcpdf/barcodes.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/tcpdf/barcodes.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -948,7 +948,7 @@ $sum = $startid; $clen = mb_strlen($code); for ($i = 0; $i < $clen; ++$i) { - $sum += (strpos($keys, $code{$i}) * ($i+1)); + $sum += (mb_strpos($keys, $code{$i}) * ($i+1)); } $check = ($sum % 103); // add start, check and stop codes @@ -957,7 +957,7 @@ $k = 0; $len = mb_strlen($code); for ($i = 0; $i < $len; ++$i) { - $ck = strpos($keys, $code{$i}); + $ck = mb_strpos($keys, $code{$i}); if (($i == 0) OR ($i > ($len-4))) { $char_num = ord($code{$i}); $seq = $chr[$char_num]; Modified: trunk/includes/tcpdf/tcpdf.php =================================================================== --- trunk/includes/tcpdf/tcpdf.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/tcpdf/tcpdf.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -3277,23 +3277,23 @@ $tempstyle = strtoupper($style); $style = ''; // underline - if (strpos($tempstyle, 'U') !== false) { + if (mb_strpos($tempstyle, 'U') !== false) { $this->underline = true; } else { $this->underline = false; } // line through (deleted) - if (strpos($tempstyle, 'D') !== false) { + if (mb_strpos($tempstyle, 'D') !== false) { $this->linethrough = true; } else { $this->linethrough = false; } // bold - if (strpos($tempstyle, 'B') !== false) { + if (mb_strpos($tempstyle, 'B') !== false) { $style .= 'B'; } // oblique - if (strpos($tempstyle, 'I') !== false) { + if (mb_strpos($tempstyle, 'I') !== false) { $style .= 'I'; } $bistyle = $style; @@ -3392,7 +3392,7 @@ $styles = array('' => '', 'B' => ',Bold', 'I' => ',Italic', 'BI' => ',BoldItalic'); $sname = $name.$styles[$bistyle]; // artificial bold - if (strpos($bistyle, 'B') !== false) { + if (mb_strpos($bistyle, 'B') !== false) { if (isset($desc['StemV'])) { $desc['StemV'] *= 2; } else { @@ -3400,7 +3400,7 @@ } } // artificial italic - if (strpos($bistyle, 'I') !== false) { + if (mb_strpos($bistyle, 'I') !== false) { if (isset($desc['ItalicAngle'])) { $desc['ItalicAngle'] -= 11; } else { @@ -4022,7 +4022,7 @@ } if (is_string($border)) { $lm = ($this->LineWidth / 2); - if (strpos($border,'L') !== false) { + if (mb_strpos($border,'L') !== false) { if ($this->rtl) { $xk = ($x - $w) * $k; } else { @@ -4030,7 +4030,7 @@ } $s .= sprintf('%.2F %.2F m %.2F %.2F l S ', $xk, (($this->h - $y + $lm) * $k), $xk, (($this->h - ($y + $h + $lm)) * $k)); } - if (strpos($border,'T') !== false) { + if (mb_strpos($border,'T') !== false) { if ($this->rtl) { $xk = ($x - $w + $lm) * $k; $xwk = ($x - $lm) * $k; @@ -4040,7 +4040,7 @@ } $s .= sprintf('%.2F %.2F m %.2F %.2F l S ', $xk, (($this->h - $y) * $k), $xwk, (($this->h - $y) * $k)); } - if (strpos($border,'R') !== false) { + if (mb_strpos($border,'R') !== false) { if ($this->rtl) { $xk = $x * $k; } else { @@ -4048,7 +4048,7 @@ } $s .= sprintf('%.2F %.2F m %.2F %.2F l S ', $xk, (($this->h - $y + $lm) * $k), $xk, (($this->h - ($y + $h + $lm))* $k)); } - if (strpos($border,'B') !== false) { + if (mb_strpos($border,'B') !== false) { if ($this->rtl) { $xk = ($x - $w + $lm) * $k; $xwk = ($x - $lm) * $k; @@ -4459,16 +4459,16 @@ if ($border == 1) { $cborder = 'LTR'; } else { - if (!(false === strpos($border, 'L'))) { + if (!(false === mb_strpos($border, 'L'))) { $cborder .= 'L'; } - if (!(false === strpos($border, 'T'))) { + if (!(false === mb_strpos($border, 'T'))) { $cborder .= 'T'; } - if (!(false === strpos($border, 'R'))) { + if (!(false === mb_strpos($border, 'R'))) { $cborder .= 'R'; } - if ((!$this->opencell) AND (!(false === strpos($border, 'B')))) { + if ((!$this->opencell) AND (!(false === mb_strpos($border, 'B')))) { $cborder .= 'B'; } } @@ -4478,16 +4478,16 @@ if ($border == 1) { $cborder = 'LR'; } else { - if (!(false === strpos($border, 'L'))) { + if (!(false === mb_strpos($border, 'L'))) { $cborder .= 'L'; } - if ((!$this->opencell) AND (!(false === strpos($border, 'T')))) { + if ((!$this->opencell) AND (!(false === mb_strpos($border, 'T')))) { $cborder .= 'T'; } - if (!(false === strpos($border, 'R'))) { + if (!(false === mb_strpos($border, 'R'))) { $cborder .= 'R'; } - if ((!$this->opencell) AND (!(false === strpos($border, 'B')))) { + if ((!$this->opencell) AND (!(false === mb_strpos($border, 'B')))) { $cborder .= 'B'; } } @@ -4497,16 +4497,16 @@ if ($border == 1) { $cborder = 'LRB'; } else { - if (!(false === strpos($border, 'L'))) { + if (!(false === mb_strpos($border, 'L'))) { $cborder .= 'L'; } - if ((!$this->opencell) AND (!(false === strpos($border, 'T')))) { + if ((!$this->opencell) AND (!(false === mb_strpos($border, 'T')))) { $cborder .= 'T'; } - if (!(false === strpos($border, 'R'))) { + if (!(false === mb_strpos($border, 'R'))) { $cborder .= 'R'; } - if (!(false === strpos($border, 'B'))) { + if (!(false === mb_strpos($border, 'B'))) { $cborder .= 'B'; } } @@ -5441,7 +5441,7 @@ } elseif ($ct == 2) { $trns = array(ord(substr($t, 1, 1)), ord(substr($t, 3, 1)), ord(substr($t, 5, 1))); } else { - $pos = strpos($t, chr(0)); + $pos = mb_strpos($t, chr(0)); if ($pos !== false) { $trns = array($pos); } @@ -5743,7 +5743,7 @@ // define the ByteRange $byte_range = array(); $byte_range[0] = 0; - $byte_range[1] = strpos($pdfdoc, $this->byterange_string) + $byterange_string_len + 10; + $byte_range[1] = mb_strpos($pdfdoc, $this->byterange_string) + $byterange_string_len + 10; $byte_range[2] = $byte_range[1] + $this->signature_max_length + 2; $byte_range[3] = mb_strlen($pdfdoc) - $byte_range[2]; $pdfdoc = substr($pdfdoc, 0, $byte_range[1]).substr($pdfdoc, $byte_range[2]); @@ -5772,7 +5772,7 @@ $signature = file_get_contents($tempsign, false, null, $pdfdoc_length); unlink($tempsign); // extract signature - $signature = substr($signature, (strpos($signature, "%%EOF\n\n------") + 13)); + $signature = substr($signature, (mb_strpos($signature, "%%EOF\n\n------") + 13)); $tmparr = explode("\n\n", $signature); $signature = $tmparr[1]; unset($tmparr); @@ -8249,7 +8249,7 @@ $returncolor = false; $color = preg_replace('/[\s]*/', '', $color); // remove extra spaces $color = strtolower($color); - if (($dotpos = strpos($color, '.')) !== false) { + if (($dotpos = mb_strpos($color, '.')) !== false) { // remove class parent (i.e.: color.red) $color = substr($color, ($dotpos + 1)); } @@ -9016,7 +9016,7 @@ * @see SetLineStyle() */ public function Rect($x, $y, $w, $h, $style='', $border_style=array(), $fill_color=array()) { - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { + if (!(false === mb_strpos($style, 'F')) AND isset($fill_color)) { $this->SetFillColorArray($fill_color); } switch ($style) { @@ -9114,7 +9114,7 @@ * @since 2.1.000 (2008-01-08) */ public function Curve($x0, $y0, $x1, $y1, $x2, $y2, $x3, $y3, $style='', $line_style=array(), $fill_color=array()) { - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { + if (!(false === mb_strpos($style, 'F')) AND isset($fill_color)) { $this->SetFillColorArray($fill_color); } switch ($style) { @@ -9171,7 +9171,7 @@ * @since 3.0008 (2008-05-12) */ public function Polycurve($x0, $y0, $segments, $style='', $line_style=array(), $fill_color=array()) { - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { + if (!(false === mb_strpos($style, 'F')) AND isset($fill_color)) { $this->SetFillColorArray($fill_color); } switch ($style) { @@ -9243,7 +9243,7 @@ return; } if ($rx) { - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { + if (!(false === mb_strpos($style, 'F')) AND isset($fill_color)) { $this->SetFillColorArray($fill_color); } switch ($style) { @@ -9404,7 +9404,7 @@ } $nc += 4; } - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { + if (!(false === mb_strpos($style, 'F')) AND isset($fill_color)) { $this->SetFillColorArray($fill_color); } switch ($style) { @@ -9623,7 +9623,7 @@ if ('0000' == $round_corner) { // Not rounded $this->Rect($x, $y, $w, $h, $style, $border_style, $fill_color); } else { // Rounded - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { + if (!(false === mb_strpos($style, 'F')) AND isset($fill_color)) { $this->SetFillColorArray($fill_color); } switch ($style) { @@ -10495,7 +10495,7 @@ if (empty($this->javascript) AND empty($this->js_objects)) { return; } - if (strpos($this->javascript, 'this.addField') > 0) { + if (mb_strpos($this->javascript, 'this.addField') > 0) { if (!$this->ur) { //$this->setUserRights(); } @@ -12542,7 +12542,7 @@ preg_match("/%%Creator:([^\r\n]+)/", $data, $regs); # find Creator if (count($regs) > 1) { $version_str = trim($regs[1]); # e.g. "Adobe Illustrator(R) 8.0" - if (strpos($version_str, 'Adobe Illustrator') !== false) { + if (mb_strpos($version_str, 'Adobe Illustrator') !== false) { $versexp = explode(' ', $version_str); $version = (float)array_pop($versexp); if ($version >= 9) { @@ -12551,7 +12551,7 @@ } } // strip binary bytes in front of PS-header - $start = strpos($data, '%!PS-Adobe'); + $start = mb_strpos($data, '%!PS-Adobe'); if ($start > 0) { $data = substr($data, $start); } @@ -12562,17 +12562,17 @@ } else { $this->Error('No BoundingBox found in EPS file: '.$file); } - $start = strpos($data, '%%EndSetup'); + $start = mb_strpos($data, '%%EndSetup'); if ($start === false) { - $start = strpos($data, '%%EndProlog'); + $start = mb_strpos($data, '%%EndProlog'); } if ($start === false) { - $start = strpos($data, '%%BoundingBox'); + $start = mb_strpos($data, '%%BoundingBox'); } $data = substr($data, $start); - $end = strpos($data, '%%PageTrailer'); + $end = mb_strpos($data, '%%PageTrailer'); if ($end===false) { - $end = strpos($data, 'showpage'); + $end = mb_strpos($data, 'showpage'); } if ($end) { $data = substr($data, 0, $end); @@ -13350,7 +13350,7 @@ $repTable = array("\t" => ' ', "\0" => ' ', "\x0B" => ' ', "\\" => "\\\\"); $html = strtr($html, $repTable); $offset = 0; - while (($offset < mb_strlen($html)) AND ($pos = strpos($html, '</pre>', $offset)) !== false) { + while (($offset < mb_strlen($html)) AND ($pos = mb_strpos($html, '</pre>', $offset)) !== false) { $html_a = substr($html, 0, $offset); $html_b = substr($html, $offset, ($pos - $offset + 6)); while (preg_match("'<xre([^\>]*)>(.*?)\n(.*?)</pre>'si", $html_b)) { @@ -13361,7 +13361,7 @@ $offset = mb_strlen($html_a.$html_b); } $offset = 0; - while (($offset < mb_strlen($html)) AND ($pos = strpos($html, '</textarea>', $offset)) !== false) { + while (($offset < mb_strlen($html)) AND ($pos = mb_strpos($html, '</textarea>', $offset)) !== false) { $html_a = substr($html, 0, $offset); $html_b = substr($html, $offset, ($pos - $offset + 11)); while (preg_match("'<textarea([^\>]*)>(.*?)\n(.*?)</textarea>'si", $html_b)) { @@ -13375,7 +13375,7 @@ $html = preg_replace("'([\s]*)<option'si", "<option", $html); $html = preg_replace("'</option>([\s]*)'si", "</option>", $html); $offset = 0; - while (($offset < mb_strlen($html)) AND ($pos = strpos($html, '</option>', $offset)) !== false) { + while (($offset < mb_strlen($html)) AND ($pos = mb_strpos($html, '</option>', $offset)) !== false) { $html_a = substr($html, 0, $offset); $html_b = substr($html, $offset, ($pos - $offset + 9)); while (preg_match("'<option([^\>]*)>(.*?)</option>'si", $html_b)) { @@ -14300,7 +14300,7 @@ } } elseif (($plalign == 'R') AND (!$this->rtl)) { // right alignment on LTR document - if (intval($this->revstrpos($pmid, ')]')) == (intval($this->revstrpos($pmid, ' )]')) + 1)) { + if (intval($this->revmb_strpos($pmid, ')]')) == (intval($this->revmb_strpos($pmid, ' )]')) + 1)) { // remove last space (if any) $linew -= $one_space_width; $mdiff = abs($tw - $linew); @@ -14308,11 +14308,11 @@ $t_x = $mdiff; } elseif (($plalign == 'L') AND ($this->rtl)) { // left alignment on RTL document - if ((intval($this->revstrpos($pmid, '[( ')) == intval($this->revstrpos($pmid, '[('))) OR (intval($this->revstrpos($pmid, '[('.chr(0).chr(32))) == intval($this->revstrpos($pmid, '[(')))) { + if ((intval($this->revmb_strpos($pmid, '[( ')) == intval($this->revmb_strpos($pmid, '[('))) OR (intval($this->revmb_strpos($pmid, '[('.chr(0).chr(32))) == intval($this->revmb_strpos($pmid, '[(')))) { // remove first space (if any) $linew -= $one_space_width; } - if (intval(strpos($pmid, '[(')) == (intval($this->revstrpos($pmid, '[(')))) { + if (intval(mb_strpos($pmid, '[(')) == (intval($this->revmb_strpos($pmid, '[(')))) { // remove last space (if any) $linew -= $one_space_width; if (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) { @@ -14378,12 +14378,12 @@ global $spacew; while (preg_match('/([0-9\.\+\-]*)[\s](Td|cm|m|l|c|re)[\s]/x', $pmid, $strpiece, PREG_OFFSET_CAPTURE, $offset) == 1) { // check if we are inside a string section '[( ... )]' - $stroffset = strpos($pmid, '[(', $offset); + $stroffset = mb_strpos($pmid, '[(', $offset); if (($stroffset !== false) AND ($stroffset <= $strpiece[2][1])) { // set offset to the end of string section - $offset = strpos($pmid, ')]', $stroffset); + $offset = mb_strpos($pmid, ')]', $stroffset); while (($offset !== false) AND ($pmid{($offset - 1)} == '\\')) { - $offset = strpos($pmid, ')]', ($offset + 1)); + $offset = mb_strpos($pmid, ')]', ($offset + 1)); } if ($offset === false) { $this->Error('HTML Justification: malformed PDF code.'); @@ -14396,13 +14396,13 @@ $spacew = ($spacewidth * $ns); } $offset = $strpiece[2][1] + mb_strlen($strpiece[2][0]); - $epsposbeg = strpos($pmid, 'q'.$this->epsmarker, $offset); - $epsposend = strpos($pmid, $this->epsmarker.'Q', $offset) + mb_strlen($this->epsmarker.'Q'); + $epsposbeg = mb_strpos($pmid, 'q'.$this->epsmarker, $offset); + $epsposend = mb_strpos($pmid, $this->epsmarker.'Q', $offset) + mb_strlen($this->epsmarker.'Q'); if ((($epsposbeg > 0) AND ($epsposend > 0) AND ($offset > $epsposbeg) AND ($offset < $epsposend)) OR (($epsposbeg === false) AND ($epsposend > 0) AND ($offset < $epsposend))) { // shift EPS images $trx = sprintf('1 0 0 1 %.3F 0 cm', $spacew); - $epsposbeg = strpos($pmid, 'q'.$this->epsmarker, ($prev_epsposbeg - 6)); + $epsposbeg = mb_strpos($pmid, 'q'.$this->epsmarker, ($prev_epsposbeg - 6)); $pmid_b = substr($pmid, 0, $epsposbeg); $pmid_m = substr($pmid, $epsposbeg, ($epsposend - $epsposbeg)); $pmid_e = substr($pmid, $epsposend); @@ -14971,7 +14971,7 @@ } } elseif (($plalign == 'R') AND (!$this->rtl)) { // right alignment on LTR document - if (intval($this->revstrpos($pmid, ')]')) == (intval($this->revstrpos($pmid, ' )]')) + 1)) { + if (intval($this->revmb_strpos($pmid, ')]')) == (intval($this->revmb_strpos($pmid, ' )]')) + 1)) { // remove last space (if any) $linew -= $one_space_width; $mdiff = abs($tw - $linew); @@ -14979,11 +14979,11 @@ $t_x = $mdiff; } elseif (($plalign == 'L') AND ($this->rtl)) { // left alignment on RTL document - if ((intval($this->revstrpos($pmid, '[( ')) == intval($this->revstrpos($pmid, '[('))) OR (intval($this->revstrpos($pmid, '[('.chr(0).chr(32))) == intval($this->revstrpos($pmid, '[(')))) { + if ((intval($this->revmb_strpos($pmid, '[( ')) == intval($this->revmb_strpos($pmid, '[('))) OR (intval($this->revmb_strpos($pmid, '[('.chr(0).chr(32))) == intval($this->revmb_strpos($pmid, '[(')))) { // remove first space (if any) $linew -= $one_space_width; } - if (intval(strpos($pmid, '[(')) == (intval($this->revstrpos($pmid, '[(')))) { + if (intval(mb_strpos($pmid, '[(')) == (intval($this->revmb_strpos($pmid, '[(')))) { // remove last space (if any) $linew -= $one_space_width; if (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) { @@ -15574,7 +15574,7 @@ $options = explode ("\r", $tag['attribute']['opt']); $values = array(); foreach ($options as $val) { - if (strpos($val, "\t") !== false) { + if (mb_strpos($val, "\t") !== false) { $opts = explode("\t", $val); $values[] = $opts; $w = max($w, $this->GetStringWidth($opts[1])); @@ -17276,10 +17276,10 @@ * @access public * @since 4.8.038 (2010-03-13) */ - public function revstrpos($haystack, $needle, $offset = 0) { + public function revmb_strpos($haystack, $needle, $offset = 0) { $length = mb_strlen($haystack); $offset = ($offset > 0)?($length - $offset):abs($offset); - $pos = strpos(strrev($haystack), strrev($needle), $offset); + $pos = mb_strpos(strrev($haystack), strrev($needle), $offset); return ($pos === false)?false:($length - $pos - mb_strlen($needle)); } Modified: trunk/install/save.php =================================================================== --- trunk/install/save.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/install/save.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -361,7 +361,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ // Database created above with correct name. if (strncasecmp($SQL, ' CREATE DATABASE ', 17) AND strncasecmp($SQL, ' USE ', 5)){ Modified: trunk/reportwriter/WriteReport.inc =================================================================== --- trunk/reportwriter/WriteReport.inc 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/reportwriter/WriteReport.inc 2011-07-03 03:27:48 UTC (rev 4620) @@ -544,7 +544,7 @@ $CSVOutput = ''; // Write the column headings foreach ($Heading as $mycolumn) { // check for embedded commas and enclose in quotes - if (strpos($mycolumn,',')===false) $CSVOutput .= $mycolumn.','; else $CSVOutput .= '"'.$mycolumn.'",'; + if (mb_strpos($mycolumn,',')===false) $CSVOutput .= $mycolumn.','; else $CSVOutput .= '"'.$mycolumn.'",'; } $CSVOutput = substr($CSVOutput,0,-1).chr(10); // Strip the last comma off and add line feed // Now write each data line and totals @@ -561,7 +561,7 @@ default: $CSVLine = ''; foreach ($myrow as $mycolumn) { // check for embedded commas and enclose in quotes - if (strpos($mycolumn,',')===false) $CSVLine .= $mycolumn.','; else $CSVLine .= '"'.$mycolumn.'",'; + if (mb_strpos($mycolumn,',')===false) $CSVLine .= $mycolumn.','; else $CSVLine .= '"'.$mycolumn.'",'; } $CSVLine = substr($CSVLine,0,-1); // Strip ... [truncated message content] |
From: <dai...@us...> - 2011-07-03 03:27:57
|
Revision: 4620 http://web-erp.svn.sourceforge.net/web-erp/?rev=4620&view=rev Author: daintree Date: 2011-07-03 03:27:48 +0000 (Sun, 03 Jul 2011) Log Message: ----------- strpos to mb_strpos Modified Paths: -------------- trunk/AccountSections.php trunk/ConfirmDispatch_Invoice.php trunk/Contracts.php trunk/Customers.php trunk/DailySalesInquiry.php trunk/DeliveryDetails.php trunk/MRPCreateDemands.php trunk/Numbers/Words.php trunk/PO_PDFPurchOrder.php trunk/PcExpensesTypeTab.php trunk/PcTypeTabs.php trunk/SelectCreditItems.php trunk/Stocks.php trunk/SuppPriceList.php trunk/Tax.php trunk/TaxCategories.php trunk/TaxProvinces.php trunk/UnitsOfMeasure.php trunk/UpgradeDatabase.php trunk/Z_MakeNewCompany.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_poEditLangModule.php trunk/api/api_debtortransactions.php trunk/doc/Change.log trunk/doc/Manual/ManualAPIFunctions.php trunk/includes/ConstructSQLForUserDefinedSalesReport.inc trunk/includes/DateFunctions.inc trunk/includes/EDIVariableSubstitution.inc trunk/includes/EDIconfig.inc trunk/includes/RFC822.php trunk/includes/class.pdf.php trunk/includes/phplot/phplot.php trunk/includes/smtp.php trunk/includes/tcpdf/CHANGELOG.TXT trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/tcpdf.php trunk/install/save.php trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/RCFunctions.inc trunk/reportwriter/admin/forms/ReportsCritSetup.html trunk/reportwriter/forms/FormsFilter.html trunk/reportwriter/forms/ReportsFilter.html Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/AccountSections.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -86,7 +86,7 @@ $Errors[$i] = 'SectionID'; $i++; } - if (isset($_POST['SectionID']) and strpos($_POST['SectionID'],".")>0) { + if (isset($_POST['SectionID']) and mb_strpos($_POST['SectionID'],".")>0) { $InputError = 1; prnMsg( _('The section number must be an integer'),'error'); $Errors[$i] = 'SectionID'; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/ConfirmDispatch_Invoice.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -800,7 +800,7 @@ /*Test to see if the item being sold is an asset */ if (substr($OrderLine->StockID,0,6)=='ASSET-'){ $IsAsset = true; - $HyphenOccursAt = strpos($OrderLine->StockID,'-',6); + $HyphenOccursAt = mb_strpos($OrderLine->StockID,'-',6); if ($HyphenOccursAt == false){ $AssetNumber = intval(substr($OrderLine->StockID,6)); } else { Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Contracts.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -224,7 +224,7 @@ prnMsg(_('The contract reference is expected to be more than 2 characters long. Please alter the contract reference before proceeding.'),'error'); $InputError = true; } - if(ContainsIllegalCharacters($_POST['ContractRef']) OR strpos($_POST['ContractRef'],' ')>0){ + if(ContainsIllegalCharacters($_POST['ContractRef']) OR mb_strpos($_POST['ContractRef'],' ')>0){ prnMsg(_('The contract reference cannot contain any spaces, slashes, or inverted commas. Please alter the contract reference before proceeding.'),'error'); $InputError = true; } Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Customers.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -49,7 +49,7 @@ prnMsg( _('The debtor code cannot be empty'),'error'); $Errors[$i] = 'DebtorNo'; $i++; - } elseif ($_SESSION['AutoDebtorNo']==0 AND (ContainsIllegalCharacters($_POST['DebtorNo']) OR strpos($_POST['DebtorNo'], ' '))) { + } elseif ($_SESSION['AutoDebtorNo']==0 AND (ContainsIllegalCharacters($_POST['DebtorNo']) OR mb_strpos($_POST['DebtorNo'], ' '))) { $InputError = 1; prnMsg( _('The customer code cannot contain any of the following characters') . " . - ' & + \" " . _('or a space'),'error'); $Errors[$i] = 'DebtorNo'; Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/DailySalesInquiry.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -59,11 +59,11 @@ echo '</form></div>'; echo '<br />'; /*Now get and display the sales data returned */ -if (strpos($EndDateSQL,'/')) { +if (mb_strpos($EndDateSQL,'/')) { $Date_Array = explode('/',$EndDateSQL); -} elseif (strpos ($EndDateSQL,'-')) { +} elseif (mb_strpos ($EndDateSQL,'-')) { $Date_Array = explode('-',$EndDateSQL); -} elseif (strpos ($EndDateSQL,'.')) { +} elseif (mb_strpos ($EndDateSQL,'.')) { $Date_Array = explode('.',$EndDateSQL); } Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/DeliveryDetails.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -61,7 +61,7 @@ $InputErrors =1; prnMsg(_('You should enter the street address in the box provided') . '. ' . _('Orders cannot be accepted without a valid street address'),'error'); } -// if (strpos($_POST['BrAdd1'],_('Box'))>0){ +// if (mb_strpos($_POST['BrAdd1'],_('Box'))>0){ // prnMsg(_('You have entered the word') . ' "' . _('Box') . '" ' . _('in the street address') . '. ' . _('Items cannot be delivered to') . ' ' ._('box') . ' ' . _('addresses'),'warn'); // } if (!is_numeric($_POST['FreightCost'])){ Modified: trunk/MRPCreateDemands.php =================================================================== --- trunk/MRPCreateDemands.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/MRPCreateDemands.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -83,11 +83,11 @@ // Create array of dates based on DistDate and adding either weeks or months $FormatedDistdate = FormatDateForSQL($_POST['DistDate']); -if (strpos($FormatedDistdate,"/")) { +if (mb_strpos($FormatedDistdate,"/")) { list($yyyy,$mm,$dd) = explode("/",$FormatedDistdate); -} else if (strpos($FormatedDistdate,"-")) { +} else if (mb_strpos($FormatedDistdate,"-")) { list($yyyy,$mm,$dd) = explode("-",$FormatedDistdate); -} else if (strpos($FormatedDistdate,".")) { +} else if (mb_strpos($FormatedDistdate,".")) { list($yyyy,$mm,$dd) = explode(".",$FormatedDistdate); } Modified: trunk/Numbers/Words.php =================================================================== --- trunk/Numbers/Words.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Numbers/Words.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -64,8 +64,8 @@ //Phil mods to ensure correct translation used. if (!file_exists('Numbers/Words/lang.' . $locale . '.php')){ //try to drop off the .utf8 suffix then recheck - if (strpos($locale,'.utf8')){ - $locale = substr($locale, 0,strpos($locale,'.utf8')); + if (mb_strpos($locale,'.utf8')){ + $locale = substr($locale, 0,mb_strpos($locale,'.utf8')); } if (!file_exists('Numbers/Words/lang.' . $locale . '.php')){ $locale = substr($locale,0,2); @@ -132,7 +132,7 @@ @$obj =& new $classname; - if (strpos($num, '.') === false) + if (mb_strpos($num, '.') === false) { $ret = trim($obj->toCurrencyWords($int_curr, $num)); } else { Modified: trunk/PO_PDFPurchOrder.php =================================================================== --- trunk/PO_PDFPurchOrder.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/PO_PDFPurchOrder.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -385,7 +385,7 @@ if (DB_num_rows($ContactsResult)>0){ echo '<tr><td>'. _('Email to') .':</td><td><select name="EmailTo">'; while ($ContactDetails = DB_fetch_array($ContactsResult)){ - if (mb_strlen($ContactDetails['email'])>2 AND strpos($ContactDetails['email'],'@')>0){ + if (mb_strlen($ContactDetails['email'])>2 AND mb_strpos($ContactDetails['email'],'@')>0){ if ($_POST['EmailTo']==$ContactDetails['email']){ echo '<option selected value="' . $ContactDetails['email'] . '">' . $ContactDetails['Contact'] . ' - ' . $ContactDetails['email'] . '</option>'; } else { Modified: trunk/PcExpensesTypeTab.php =================================================================== --- trunk/PcExpensesTypeTab.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/PcExpensesTypeTab.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -17,7 +17,7 @@ $SelectedType=''; } -if (!isset($_GET['delete']) and (ContainsIllegalCharacters($SelectedType) OR strpos($SelectedType,' ')>0)){ +if (!isset($_GET['delete']) and (ContainsIllegalCharacters($SelectedType) OR mb_strpos($SelectedType,' ')>0)){ $InputError = 1; prnMsg(_('The petty cash tab type contain any of the following characters " \' - & or a space'),'error'); } Modified: trunk/PcTypeTabs.php =================================================================== --- trunk/PcTypeTabs.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/PcTypeTabs.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -41,7 +41,7 @@ echo prnMsg(_('The tab code must be twenty characters or less long'),'error'); $Errors[$i] = 'TypeTabCode'; $i++; - }elseif (ContainsIllegalCharacters($_POST['TypeTabCode']) OR strpos($_POST['TypeTabCode'],' ')>0){ + }elseif (ContainsIllegalCharacters($_POST['TypeTabCode']) OR mb_strpos($_POST['TypeTabCode'],' ')>0){ $InputError = 1; prnMsg(_('The petty cash tab type code cannot contain any of the illegal characters'),'error'); } elseif (mb_strlen($_POST['TypeTabDescription']) >50) { Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/SelectCreditItems.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -116,8 +116,8 @@ /*will only be true if page called from customer selection form parse the $Select string into customer code and branch code */ - $_SESSION['CreditItems']->Branch = substr($_POST['Select'],strpos($_POST['Select'],' - ')+3); - $_POST['Select'] = substr($_POST['Select'],0,strpos($_POST['Select'],' - ')); + $_SESSION['CreditItems']->Branch = substr($_POST['Select'],mb_strpos($_POST['Select'],' - ')+3); + $_POST['Select'] = substr($_POST['Select'],0,mb_strpos($_POST['Select'],' - ')); /*Now retrieve customer information - name, salestype, currency, terms etc */ Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Stocks.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -102,7 +102,7 @@ $Errors[$i] = 'StockID'; $i++; } - if (ContainsIllegalCharacters($StockID) OR strpos($StockID,' ')) { + if (ContainsIllegalCharacters($StockID) OR mb_strpos($StockID,' ')) { $InputError = 1; prnMsg(_('The stock item code cannot contain any of the following characters') . " - ' & + \" \\ " . _('or a space'),'error'); $Errors[$i] = 'StockID'; Modified: trunk/SuppPriceList.php =================================================================== --- trunk/SuppPriceList.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/SuppPriceList.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -138,11 +138,11 @@ // 4) Height 5) Text 6) Alignment 7) Border 8) Fill - True to use SetFillColor // and False to set to transparent - if (strpos($myrow[3],'-')) { + if (mb_strpos($myrow[3],'-')) { $DateArray=explode('-', $myrow[3]); - } else if (strpos($myrow[3],'/')) { + } else if (mb_strpos($myrow[3],'/')) { $DateArray=explode('/', $myrow[3]); - } else if (strpos($myrow[3],'.')) { + } else if (mb_strpos($myrow[3],'.')) { $DateArray=explode('.', $myrow[3]); } $dateprice=date($_SESSION['DefaultDateFormat'], mktime(0,0,0,$DateArray[1],$DateArray[2],$DateArray[0])); Modified: trunk/Tax.php =================================================================== --- trunk/Tax.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Tax.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -127,9 +127,9 @@ /*Now do the inputs from SuppTrans */ /*Only have dates in SuppTrans no periods so need to get the starting date */ - if (strpos($PeriodEnd,'/')) { + if (mb_strpos($PeriodEnd,'/')) { $Date_Array = explode('/',$PeriodEnd); - } elseif (strpos($PeriodEnd,'.')) { + } elseif (mb_strpos($PeriodEnd,'.')) { $Date_Array = explode('.',$PeriodEnd); } if ($_SESSION['DefaultDateFormat']=='d/m/Y'){ Modified: trunk/TaxCategories.php =================================================================== --- trunk/TaxCategories.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/TaxCategories.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -26,7 +26,7 @@ //first off validate inputs sensible - if (strpos($_POST['TaxCategoryName'],'&')>0 OR strpos($_POST['TaxCategoryName'],"'")>0) { + if (mb_strpos($_POST['TaxCategoryName'],'&')>0 OR mb_strpos($_POST['TaxCategoryName'],"'")>0) { $InputError = 1; prnMsg( _('The tax category name cannot contain the character') . " '&' " . _('or the character') ." '",'error'); } Modified: trunk/TaxProvinces.php =================================================================== --- trunk/TaxProvinces.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/TaxProvinces.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -25,7 +25,7 @@ //first off validate inputs sensible - if (strpos($_POST['TaxProvinceName'],'&')>0 OR strpos($_POST['TaxProvinceName'],"'")>0) { + if (mb_strpos($_POST['TaxProvinceName'],'&')>0 OR mb_strpos($_POST['TaxProvinceName'],"'")>0) { $InputError = 1; prnMsg( _('The tax province name cannot contain the character') . " '&' " . _('or the character') ." '",'error'); } Modified: trunk/UnitsOfMeasure.php =================================================================== --- trunk/UnitsOfMeasure.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/UnitsOfMeasure.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -25,7 +25,7 @@ //first off validate inputs sensible - if (strpos($_POST['MeasureName'],'&')>0 OR strpos($_POST['MeasureName'],"'")>0) { + if (mb_strpos($_POST['MeasureName'],'&')>0 OR mb_strpos($_POST['MeasureName'],"'")>0) { $InputError = 1; prnMsg( _('The unit of measure cannot contain the character') . " '&' " . _('or the character') ." '",'error'); } Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/UpgradeDatabase.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -159,7 +159,7 @@ if (substr($SQLEntries[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLEntries[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLEntries[$i],';')>0 AND ! $InAFunction){ $sql = substr($sql,0,mb_strlen($sql)-1); $result = DB_query($sql, $db, '','', false, false); echo '<tr><td>' . $sql . '</td>'; Modified: trunk/Z_MakeNewCompany.php =================================================================== --- trunk/Z_MakeNewCompany.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_MakeNewCompany.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -118,7 +118,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.04-3.05.php =================================================================== --- trunk/Z_Upgrade_3.04-3.05.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.04-3.05.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -49,7 +49,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.05-3.06.php =================================================================== --- trunk/Z_Upgrade_3.05-3.06.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.05-3.06.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -41,7 +41,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.07-3.08.php =================================================================== --- trunk/Z_Upgrade_3.07-3.08.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.07-3.08.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -41,7 +41,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.08-3.09.php =================================================================== --- trunk/Z_Upgrade_3.08-3.09.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.08-3.09.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -41,7 +41,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.09-3.10.php =================================================================== --- trunk/Z_Upgrade_3.09-3.10.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.09-3.10.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -41,7 +41,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.10-3.11.php =================================================================== --- trunk/Z_Upgrade_3.10-3.11.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.10-3.11.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -51,7 +51,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $sql = substr($sql,0,mb_strlen($sql)-1); $result = DB_query($sql, $db, $ErrMsg, $DBMsg, false, false); switch (DB_error_no($db)) { Modified: trunk/Z_Upgrade_3.11-4.00.php =================================================================== --- trunk/Z_Upgrade_3.11-4.00.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.11-4.00.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -51,7 +51,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $sql = substr($sql,0,mb_strlen($sql)-1); $result = DB_query($sql, $db, $ErrMsg, $DBMsg, false, false); switch (DB_error_no($db)) { Modified: trunk/Z_poEditLangModule.php =================================================================== --- trunk/Z_poEditLangModule.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_poEditLangModule.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -144,7 +144,7 @@ for ($i=1; $i<=$TotalLines; $i++) { - $b = strpos($AlsoIn[$i], $_POST['module']); + $b = mb_strpos($AlsoIn[$i], $_POST['module']); if ($b === False) { /* skip it */ Modified: trunk/api/api_debtortransactions.php =================================================================== --- trunk/api/api_debtortransactions.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/api/api_debtortransactions.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -20,11 +20,11 @@ //for MySQL dates are in the format YYYY-mm-dd - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -53,9 +53,9 @@ $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (strpos($TranDate,'/')>0) { + if (mb_strpos($TranDate,'/')>0) { $DateArray = explode('/',$TranDate); - } elseif (strpos($TranDate,'.')>0) { + } elseif (mb_strpos($TranDate,'.')>0) { $DateArray = explode('.',$TranDate); } if ($DateFormat=='d/m/Y') { Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/doc/Change.log 2011-07-03 03:27:48 UTC (rev 4620) @@ -2666,7 +2666,7 @@ 28/8/04 Steve - Minor changes to theme default.css files 28/8/04 Steve - SelectCustomer.php SelectProduct.php SelectSupplier.php all modified to allow paging where a large result set is returned 25/8/04 SelectCreditItems.php now allows text line entries with each line of the credit note -23/8/04 SelectOrderItems.php SelectCreditItems.php strrpos works differently in PHP 5 changed to use strpos +23/8/04 SelectOrderItems.php SelectCreditItems.php strrpos works differently in PHP 5 changed to use mb_strpos 14/8/04 Changed ConfirmDispatch_Invoice.php to allow entry of consignment reference also changed PrintCustTrans.php and PDFPrintCustTransPageHeader.inc to print out the narrative on sales order lines and the consignment number 14/8/04 Changed SelectOrderItems.php to allow entry of narrative and update narrative entries also show warning when quick entries not processed. 14/8/04 Changed DefineCartClass.inc to have a Narrative variable in LineItems and a Consignment variable in the header Modified: trunk/doc/Manual/ManualAPIFunctions.php =================================================================== --- trunk/doc/Manual/ManualAPIFunctions.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/doc/Manual/ManualAPIFunctions.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -26,7 +26,7 @@ $weberppassword = $myrow[0]; $ServerString = $_SERVER['HTTP_HOST'].$rootpath; -$FirstBitOfURL = substr($ServerString,0,strpos($ServerString,'/doc/Manual')); +$FirstBitOfURL = substr($ServerString,0,mb_strpos($ServerString,'/doc/Manual')); $ServerURL = "http://". $FirstBitOfURL ."/api/api_xml-rpc.php"; Modified: trunk/includes/ConstructSQLForUserDefinedSalesReport.inc =================================================================== --- trunk/includes/ConstructSQLForUserDefinedSalesReport.inc 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/ConstructSQLForUserDefinedSalesReport.inc 2011-07-03 03:27:48 UTC (rev 4620) @@ -257,7 +257,7 @@ The first 6 Columns are defined by the group by fields so for eg the first col defined will be col 7 and so on - thats why need to add 6 to the col defined as */ - $length_ColNum = strpos($SQLSelectCls, 'AS col' . ($Cols['colnumerator'] + 8) , 7); + $length_ColNum = mb_strpos($SQLSelectCls, 'AS col' . ($Cols['colnumerator'] + 8) , 7); If ($length_ColNum == 0) { @@ -274,9 +274,9 @@ /*find the comma just before the Select Cls statement for the numerator column */ do { - $strt_ColNum = strpos( $SQLSelectCls, ',', $strt_ColNum + 1) + 1; + $strt_ColNum = mb_strpos( $SQLSelectCls, ',', $strt_ColNum + 1) + 1; - } while (strpos($SQLSelectCls, ',', $strt_ColNum) < $length_ColNum && strpos($SQLSelectCls, ',' , $strt_ColNum)!=0); + } while (mb_strpos($SQLSelectCls, ',', $strt_ColNum) < $length_ColNum && mb_strpos($SQLSelectCls, ',' , $strt_ColNum)!=0); /*The length of the element in the select clause defining the column will be from the comma to the @@ -288,7 +288,7 @@ /*The denominator column is also required if the constant is not used so do the same again for the denominator */ - $length_ColDen = strpos($SQLSelectCls, 'AS col' . (($Cols['coldenominator']) + 8), 7); + $length_ColDen = mb_strpos($SQLSelectCls, 'AS col' . (($Cols['coldenominator']) + 8), 7); If ($length_ColDen == 0){ prnMsg (_('Calculated fields must use columns defined in the report specification') . '. ' . _('The denominator column number entered for this calculation is not defined in the report'),'error',_('Calculation With Undefined Denominator')); Exit; @@ -299,9 +299,9 @@ /*find the comma just before the Select Cls statement for the denominator column */ do { - $strt_ColDen = strpos( $SQLSelectCls, ',', $strt_ColDen +1)+1; + $strt_ColDen = mb_strpos( $SQLSelectCls, ',', $strt_ColDen +1)+1; - } while (strpos($SQLSelectCls, ',', $strt_ColDen) < $length_ColDen && strpos($SQLSelectCls, ',' , $strt_ColDen)!=0); + } while (mb_strpos($SQLSelectCls, ',', $strt_ColDen) < $length_ColDen && mb_strpos($SQLSelectCls, ',' , $strt_ColDen)!=0); $length_ColDen = $length_ColDen - $strt_ColDen - 1; Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/DateFunctions.inc 2011-07-03 03:27:48 UTC (rev 4620) @@ -21,11 +21,11 @@ //echo '<BR>The date entered is ' . $DateEntry; - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } elseif (mb_strlen($DateEntry)==6) { $Date_Array[0]= substr($DateEntry,0,2); @@ -83,11 +83,11 @@ function MonthAndYearFromSQLDate($DateEntry) { - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -101,11 +101,11 @@ function DayOfWeekFromSQLDate($DateEntry) { - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -119,11 +119,11 @@ function DayOfMonthFromSQLDate($DateEntry) { - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -154,11 +154,11 @@ //for MySQL dates are in the format YYYY-mm-dd - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } else { prnMsg(_('The date does not appear to be in a valid format. The date being converted from SQL format was:') . ' ' . $DateEntry,'error'); @@ -199,11 +199,11 @@ //for MySQL dates are in the format YYYY-mm-dd //EDI format 102 dates are in the format CCYYMMDD - just need to lose the seperator - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -223,11 +223,11 @@ $DateEntry = trim($DateEntry); - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } elseif (mb_strlen($DateEntry)==6) { $Date_Array[0]= substr($DateEntry,0,2); @@ -332,11 +332,11 @@ $DateEntry =trim($DateEntry); - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } elseif (mb_strlen($DateEntry)==6) { $Date_Array[0]= substr($DateEntry,0,2); @@ -388,11 +388,11 @@ $DateEntry = trim($DateEntry); - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } elseif (mb_strlen($DateEntry)==6) { $Date_Array[0]= substr($DateEntry,0,2); @@ -455,11 +455,11 @@ $DateEntry = trim($DateEntry); - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } elseif (mb_strlen($DateEntry)==6) { $Date_Array[0]= substr($DateEntry,0,2); @@ -581,11 +581,11 @@ $TranDate = trim($TranDate); - if (strpos($TranDate,'/')) { + if (mb_strpos($TranDate,'/')) { $Date_Array = explode('/',$TranDate); - } elseif (strpos ($TranDate,'-')) { + } elseif (mb_strpos ($TranDate,'-')) { $Date_Array = explode('-',$TranDate); - } elseif (strpos ($TranDate,'.')) { + } elseif (mb_strpos ($TranDate,'.')) { $Date_Array = explode('.',$TranDate); } @@ -648,11 +648,11 @@ $DateToAddTo = trim($DateToAddTo); - if (strpos($DateToAddTo,'/')) { + if (mb_strpos($DateToAddTo,'/')) { $Date_Array = explode('/',$DateToAddTo); - } elseif (strpos ($DateToAddTo,'-')) { + } elseif (mb_strpos ($DateToAddTo,'-')) { $Date_Array = explode('-',$DateToAddTo); - } elseif (strpos ($DateToAddTo,'.')) { + } elseif (mb_strpos ($DateToAddTo,'.')) { $Date_Array = explode('.',$DateToAddTo); } @@ -723,18 +723,18 @@ $Date1 = trim($Date1); $Date2 = trim($Date2); - if (strpos($Date1,'/')) { + if (mb_strpos($Date1,'/')) { $Date1_array = explode('/',$Date1); - } elseif (strpos ($Date1,'-')) { + } elseif (mb_strpos ($Date1,'-')) { $Date1_array = explode('-',$Date1); - } elseif (strpos ($Date1,'.')) { + } elseif (mb_strpos ($Date1,'.')) { $Date1_array = explode('.',$Date1); } - if (strpos($Date2,'/')) { + if (mb_strpos($Date2,'/')) { $Date2_array = explode('/',$Date2); - } elseif (strpos ($Date2,'-')) { + } elseif (mb_strpos ($Date2,'-')) { $Date2_array = explode('-',$Date2); - } elseif (strpos ($Date2,'.')) { + } elseif (mb_strpos ($Date2,'.')) { $Date2_array = explode('.',$Date2); } @@ -850,11 +850,11 @@ /* Convert the transaction date into a unix time stamp.*/ - if (strpos($TransDate,'/')) { + if (mb_strpos($TransDate,'/')) { $Date_Array = explode('/',$TransDate); - } elseif (strpos ($TransDate,'-')) { + } elseif (mb_strpos ($TransDate,'-')) { $Date_Array = explode('-',$TransDate); - } elseif (strpos ($TransDate,'.')) { + } elseif (mb_strpos ($TransDate,'.')) { $Date_Array = explode('.',$TransDate); } if (($_SESSION['DefaultDateFormat']=='d/m/Y') or ($_SESSION['DefaultDateFormat']=='d.m.Y')){ Modified: trunk/includes/EDIVariableSubstitution.inc =================================================================== --- trunk/includes/EDIVariableSubstitution.inc 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/EDIVariableSubstitution.inc 2011-07-03 03:27:48 UTC (rev 4620) @@ -5,14 +5,14 @@ $PositionPointer = 0; $NewLineText =''; /* now get each occurence of [ in the line */ - while (strpos ($MsgLineText,'[',$PositionPointer)!=False){ + while (mb_strpos ($MsgLineText,'[',$PositionPointer)!=False){ $LastPositionPointer = $PositionPointer; - $PositionPointer = strpos ($MsgLineText,'[',$PositionPointer); + $PositionPointer = mb_strpos ($MsgLineText,'[',$PositionPointer); $NewLineText = $NewLineText . substr($MsgLineText,$LastPositionPointer,$PositionPointer-$LastPositionPointer); $LastPositionPointer = $PositionPointer; - $PositionPointer = strpos ($MsgLineText,']',$PositionPointer); + $PositionPointer = mb_strpos ($MsgLineText,']',$PositionPointer); $VariableName = substr($MsgLineText,$LastPositionPointer+1,$PositionPointer-$LastPositionPointer-1); Modified: trunk/includes/EDIconfig.inc =================================================================== --- trunk/includes/EDIconfig.inc 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/EDIconfig.inc 2011-07-03 03:27:48 UTC (rev 4620) @@ -58,14 +58,14 @@ $PoistionPointer = 0; $NewLineText =''; /* now get each occurence of [ in the line */ - while (strpos ($LineDetails['linetext'],'[',$PoistionPointer)!=False){ + while (mb_strpos ($LineDetails['linetext'],'[',$PoistionPointer)!=False){ $LastPositionPointer = $PoistionPointer; - $PositionPointer = strpos ($LineDetails['linetext'],'[',$PoistionPointer); + $PositionPointer = mb_strpos ($LineDetails['linetext'],'[',$PoistionPointer); $NewLineText = $NewLineText . substr($LineDetails['linetext'],$LastPositionPointer,$PoistionPointer-$LastPositionPointer); $LastPositionPointer = $PoistionPointer; - $PositionPointer = strpos ($LineDetails['linetext'],']',$PoistionPointer); + $PositionPointer = mb_strpos ($LineDetails['linetext'],']',$PoistionPointer); $VariableName = substr($LineDetails['linetext'],$LastPositionPointer,$PoistionPointer-$LastPositionPointer); Modified: trunk/includes/RFC822.php =================================================================== --- trunk/includes/RFC822.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/RFC822.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -211,7 +211,7 @@ // brackets/quotes etc then something's fubar. // First check there's a colon at all: - if (strpos($string, ':') === false) { + if (mb_strpos($string, ':') === false) { $this->error = 'Invalid address: ' . $string; return false; } @@ -579,7 +579,7 @@ $comments[] = $comment; // +1 is for the trailing ) - $_mailbox = substr($_mailbox, strpos($_mailbox, $comment)+mb_strlen($comment)+1); + $_mailbox = substr($_mailbox, mb_strpos($_mailbox, $comment)+mb_strlen($comment)+1); } else { break; } @@ -647,7 +647,7 @@ function _validateRouteAddr($route_addr) { // Check for colon. - if (strpos($route_addr, ':') !== false) { + if (mb_strpos($route_addr, ':') !== false) { $parts = explode(':', $route_addr); $route = $this->_splitCheck($parts, ':'); } else { @@ -784,7 +784,7 @@ $addr_spec = trim($addr_spec); // Split on @ sign if there is one. - if (strpos($addr_spec, '@') !== false) { + if (mb_strpos($addr_spec, '@') !== false) { $parts = explode('@', $addr_spec); $local_part = $this->_splitCheck($parts, '@'); $domain = substr($addr_spec, mb_strlen($local_part . '@')); Modified: trunk/includes/class.pdf.php =================================================================== --- trunk/includes/class.pdf.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/class.pdf.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -282,13 +282,13 @@ $b2='LR'; } else { $b2=''; - if(is_int(strpos($border,'L'))) { + if(is_int(mb_strpos($border,'L'))) { $b2.='L'; } - if(is_int(strpos($border,'R'))) { + if(is_int(mb_strpos($border,'R'))) { $b2.='R'; } - $b=is_int(strpos($border,'T')) ? $b2.'T' : $b2; + $b=is_int(mb_strpos($border,'T')) ? $b2.'T' : $b2; } } $sep=-1; Modified: trunk/includes/phplot/phplot.php =================================================================== --- trunk/includes/phplot/phplot.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/phplot/phplot.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -1850,7 +1850,7 @@ $asked = strtolower(trim($which_opt)); # Look for the supplied value in a comma/space separated list. - if (strpos(", $which_acc,", ", $asked,") !== False) + if (mb_strpos(", $which_acc,", ", $asked,") !== False) return $asked; $this->PrintError("$which_func(): '$which_opt' not in available choices: '$which_acc'."); @@ -1889,7 +1889,7 @@ */ protected function CheckDataType($valid_types) { - if (strpos(", $valid_types,", ", $this->data_type,") !== False) + if (mb_strpos(", $valid_types,", ", $this->data_type,") !== False) return TRUE; $this->PrintError("Data type '$this->data_type' is not valid for '$this->plot_type' plots." Modified: trunk/includes/smtp.php =================================================================== --- trunk/includes/smtp.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/smtp.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -336,7 +336,7 @@ $loops = 0; if(is_resource($this->connection)){ - while((strpos($return, CRLF) === FALSE OR substr($line,3,1) !== ' ') AND $loops < 100){ + while((mb_strpos($return, CRLF) === FALSE OR substr($line,3,1) !== ' ') AND $loops < 100){ $line = fgets($this->connection, 512); $return .= $line; $loops++; Modified: trunk/includes/tcpdf/CHANGELOG.TXT =================================================================== --- trunk/includes/tcpdf/CHANGELOG.TXT 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/tcpdf/CHANGELOG.TXT 2011-07-03 03:27:48 UTC (rev 4620) @@ -798,7 +798,7 @@ - The following Unicode to CID-0 tables were added on fonts folder: uni2cid_ak12.php, uni2cid_aj16.php, uni2cid_ag15.php, uni2cid_ac15.php. 4.0.024 (2008-09-12) - - "stripos" function was replaced with "strpos + strtolower" for backward compatibility with PHP4. + - "stripos" function was replaced with "mb_strpos + strtolower" for backward compatibility with PHP4. - support for Spot Colors were added. Check the new example n. 37 and the following new functions: AddSpotColor() SetDrawSpotColor() Modified: trunk/includes/tcpdf/barcodes.php =================================================================== --- trunk/includes/tcpdf/barcodes.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/tcpdf/barcodes.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -948,7 +948,7 @@ $sum = $startid; $clen = mb_strlen($code); for ($i = 0; $i < $clen; ++$i) { - $sum += (strpos($keys, $code{$i}) * ($i+1)); + $sum += (mb_strpos($keys, $code{$i}) * ($i+1)); } $check = ($sum % 103); // add start, check and stop codes @@ -957,7 +957,7 @@ $k = 0; $len = mb_strlen($code); for ($i = 0; $i < $len; ++$i) { - $ck = strpos($keys, $code{$i}); + $ck = mb_strpos($keys, $code{$i}); if (($i == 0) OR ($i > ($len-4))) { $char_num = ord($code{$i}); $seq = $chr[$char_num]; Modified: trunk/includes/tcpdf/tcpdf.php =================================================================== --- trunk/includes/tcpdf/tcpdf.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/tcpdf/tcpdf.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -3277,23 +3277,23 @@ $tempstyle = strtoupper($style); $style = ''; // underline - if (strpos($tempstyle, 'U') !== false) { + if (mb_strpos($tempstyle, 'U') !== false) { $this->underline = true; } else { $this->underline = false; } // line through (deleted) - if (strpos($tempstyle, 'D') !== false) { + if (mb_strpos($tempstyle, 'D') !== false) { $this->linethrough = true; } else { $this->linethrough = false; } // bold - if (strpos($tempstyle, 'B') !== false) { + if (mb_strpos($tempstyle, 'B') !== false) { $style .= 'B'; } // oblique - if (strpos($tempstyle, 'I') !== false) { + if (mb_strpos($tempstyle, 'I') !== false) { $style .= 'I'; } $bistyle = $style; @@ -3392,7 +3392,7 @@ $styles = array('' => '', 'B' => ',Bold', 'I' => ',Italic', 'BI' => ',BoldItalic'); $sname = $name.$styles[$bistyle]; // artificial bold - if (strpos($bistyle, 'B') !== false) { + if (mb_strpos($bistyle, 'B') !== false) { if (isset($desc['StemV'])) { $desc['StemV'] *= 2; } else { @@ -3400,7 +3400,7 @@ } } // artificial italic - if (strpos($bistyle, 'I') !== false) { + if (mb_strpos($bistyle, 'I') !== false) { if (isset($desc['ItalicAngle'])) { $desc['ItalicAngle'] -= 11; } else { @@ -4022,7 +4022,7 @@ } if (is_string($border)) { $lm = ($this->LineWidth / 2); - if (strpos($border,'L') !== false) { + if (mb_strpos($border,'L') !== false) { if ($this->rtl) { $xk = ($x - $w) * $k; } else { @@ -4030,7 +4030,7 @@ } $s .= sprintf('%.2F %.2F m %.2F %.2F l S ', $xk, (($this->h - $y + $lm) * $k), $xk, (($this->h - ($y + $h + $lm)) * $k)); } - if (strpos($border,'T') !== false) { + if (mb_strpos($border,'T') !== false) { if ($this->rtl) { $xk = ($x - $w + $lm) * $k; $xwk = ($x - $lm) * $k; @@ -4040,7 +4040,7 @@ } $s .= sprintf('%.2F %.2F m %.2F %.2F l S ', $xk, (($this->h - $y) * $k), $xwk, (($this->h - $y) * $k)); } - if (strpos($border,'R') !== false) { + if (mb_strpos($border,'R') !== false) { if ($this->rtl) { $xk = $x * $k; } else { @@ -4048,7 +4048,7 @@ } $s .= sprintf('%.2F %.2F m %.2F %.2F l S ', $xk, (($this->h - $y + $lm) * $k), $xk, (($this->h - ($y + $h + $lm))* $k)); } - if (strpos($border,'B') !== false) { + if (mb_strpos($border,'B') !== false) { if ($this->rtl) { $xk = ($x - $w + $lm) * $k; $xwk = ($x - $lm) * $k; @@ -4459,16 +4459,16 @@ if ($border == 1) { $cborder = 'LTR'; } else { - if (!(false === strpos($border, 'L'))) { + if (!(false === mb_strpos($border, 'L'))) { $cborder .= 'L'; } - if (!(false === strpos($border, 'T'))) { + if (!(false === mb_strpos($border, 'T'))) { $cborder .= 'T'; } - if (!(false === strpos($border, 'R'))) { + if (!(false === mb_strpos($border, 'R'))) { $cborder .= 'R'; } - if ((!$this->opencell) AND (!(false === strpos($border, 'B')))) { + if ((!$this->opencell) AND (!(false === mb_strpos($border, 'B')))) { $cborder .= 'B'; } } @@ -4478,16 +4478,16 @@ if ($border == 1) { $cborder = 'LR'; } else { - if (!(false === strpos($border, 'L'))) { + if (!(false === mb_strpos($border, 'L'))) { $cborder .= 'L'; } - if ((!$this->opencell) AND (!(false === strpos($border, 'T')))) { + if ((!$this->opencell) AND (!(false === mb_strpos($border, 'T')))) { $cborder .= 'T'; } - if (!(false === strpos($border, 'R'))) { + if (!(false === mb_strpos($border, 'R'))) { $cborder .= 'R'; } - if ((!$this->opencell) AND (!(false === strpos($border, 'B')))) { + if ((!$this->opencell) AND (!(false === mb_strpos($border, 'B')))) { $cborder .= 'B'; } } @@ -4497,16 +4497,16 @@ if ($border == 1) { $cborder = 'LRB'; } else { - if (!(false === strpos($border, 'L'))) { + if (!(false === mb_strpos($border, 'L'))) { $cborder .= 'L'; } - if ((!$this->opencell) AND (!(false === strpos($border, 'T')))) { + if ((!$this->opencell) AND (!(false === mb_strpos($border, 'T')))) { $cborder .= 'T'; } - if (!(false === strpos($border, 'R'))) { + if (!(false === mb_strpos($border, 'R'))) { $cborder .= 'R'; } - if (!(false === strpos($border, 'B'))) { + if (!(false === mb_strpos($border, 'B'))) { $cborder .= 'B'; } } @@ -5441,7 +5441,7 @@ } elseif ($ct == 2) { $trns = array(ord(substr($t, 1, 1)), ord(substr($t, 3, 1)), ord(substr($t, 5, 1))); } else { - $pos = strpos($t, chr(0)); + $pos = mb_strpos($t, chr(0)); if ($pos !== false) { $trns = array($pos); } @@ -5743,7 +5743,7 @@ // define the ByteRange $byte_range = array(); $byte_range[0] = 0; - $byte_range[1] = strpos($pdfdoc, $this->byterange_string) + $byterange_string_len + 10; + $byte_range[1] = mb_strpos($pdfdoc, $this->byterange_string) + $byterange_string_len + 10; $byte_range[2] = $byte_range[1] + $this->signature_max_length + 2; $byte_range[3] = mb_strlen($pdfdoc) - $byte_range[2]; $pdfdoc = substr($pdfdoc, 0, $byte_range[1]).substr($pdfdoc, $byte_range[2]); @@ -5772,7 +5772,7 @@ $signature = file_get_contents($tempsign, false, null, $pdfdoc_length); unlink($tempsign); // extract signature - $signature = substr($signature, (strpos($signature, "%%EOF\n\n------") + 13)); + $signature = substr($signature, (mb_strpos($signature, "%%EOF\n\n------") + 13)); $tmparr = explode("\n\n", $signature); $signature = $tmparr[1]; unset($tmparr); @@ -8249,7 +8249,7 @@ $returncolor = false; $color = preg_replace('/[\s]*/', '', $color); // remove extra spaces $color = strtolower($color); - if (($dotpos = strpos($color, '.')) !== false) { + if (($dotpos = mb_strpos($color, '.')) !== false) { // remove class parent (i.e.: color.red) $color = substr($color, ($dotpos + 1)); } @@ -9016,7 +9016,7 @@ * @see SetLineStyle() */ public function Rect($x, $y, $w, $h, $style='', $border_style=array(), $fill_color=array()) { - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { + if (!(false === mb_strpos($style, 'F')) AND isset($fill_color)) { $this->SetFillColorArray($fill_color); } switch ($style) { @@ -9114,7 +9114,7 @@ * @since 2.1.000 (2008-01-08) */ public function Curve($x0, $y0, $x1, $y1, $x2, $y2, $x3, $y3, $style='', $line_style=array(), $fill_color=array()) { - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { + if (!(false === mb_strpos($style, 'F')) AND isset($fill_color)) { $this->SetFillColorArray($fill_color); } switch ($style) { @@ -9171,7 +9171,7 @@ * @since 3.0008 (2008-05-12) */ public function Polycurve($x0, $y0, $segments, $style='', $line_style=array(), $fill_color=array()) { - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { + if (!(false === mb_strpos($style, 'F')) AND isset($fill_color)) { $this->SetFillColorArray($fill_color); } switch ($style) { @@ -9243,7 +9243,7 @@ return; } if ($rx) { - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { + if (!(false === mb_strpos($style, 'F')) AND isset($fill_color)) { $this->SetFillColorArray($fill_color); } switch ($style) { @@ -9404,7 +9404,7 @@ } $nc += 4; } - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { + if (!(false === mb_strpos($style, 'F')) AND isset($fill_color)) { $this->SetFillColorArray($fill_color); } switch ($style) { @@ -9623,7 +9623,7 @@ if ('0000' == $round_corner) { // Not rounded $this->Rect($x, $y, $w, $h, $style, $border_style, $fill_color); } else { // Rounded - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { + if (!(false === mb_strpos($style, 'F')) AND isset($fill_color)) { $this->SetFillColorArray($fill_color); } switch ($style) { @@ -10495,7 +10495,7 @@ if (empty($this->javascript) AND empty($this->js_objects)) { return; } - if (strpos($this->javascript, 'this.addField') > 0) { + if (mb_strpos($this->javascript, 'this.addField') > 0) { if (!$this->ur) { //$this->setUserRights(); } @@ -12542,7 +12542,7 @@ preg_match("/%%Creator:([^\r\n]+)/", $data, $regs); # find Creator if (count($regs) > 1) { $version_str = trim($regs[1]); # e.g. "Adobe Illustrator(R) 8.0" - if (strpos($version_str, 'Adobe Illustrator') !== false) { + if (mb_strpos($version_str, 'Adobe Illustrator') !== false) { $versexp = explode(' ', $version_str); $version = (float)array_pop($versexp); if ($version >= 9) { @@ -12551,7 +12551,7 @@ } } // strip binary bytes in front of PS-header - $start = strpos($data, '%!PS-Adobe'); + $start = mb_strpos($data, '%!PS-Adobe'); if ($start > 0) { $data = substr($data, $start); } @@ -12562,17 +12562,17 @@ } else { $this->Error('No BoundingBox found in EPS file: '.$file); } - $start = strpos($data, '%%EndSetup'); + $start = mb_strpos($data, '%%EndSetup'); if ($start === false) { - $start = strpos($data, '%%EndProlog'); + $start = mb_strpos($data, '%%EndProlog'); } if ($start === false) { - $start = strpos($data, '%%BoundingBox'); + $start = mb_strpos($data, '%%BoundingBox'); } $data = substr($data, $start); - $end = strpos($data, '%%PageTrailer'); + $end = mb_strpos($data, '%%PageTrailer'); if ($end===false) { - $end = strpos($data, 'showpage'); + $end = mb_strpos($data, 'showpage'); } if ($end) { $data = substr($data, 0, $end); @@ -13350,7 +13350,7 @@ $repTable = array("\t" => ' ', "\0" => ' ', "\x0B" => ' ', "\\" => "\\\\"); $html = strtr($html, $repTable); $offset = 0; - while (($offset < mb_strlen($html)) AND ($pos = strpos($html, '</pre>', $offset)) !== false) { + while (($offset < mb_strlen($html)) AND ($pos = mb_strpos($html, '</pre>', $offset)) !== false) { $html_a = substr($html, 0, $offset); $html_b = substr($html, $offset, ($pos - $offset + 6)); while (preg_match("'<xre([^\>]*)>(.*?)\n(.*?)</pre>'si", $html_b)) { @@ -13361,7 +13361,7 @@ $offset = mb_strlen($html_a.$html_b); } $offset = 0; - while (($offset < mb_strlen($html)) AND ($pos = strpos($html, '</textarea>', $offset)) !== false) { + while (($offset < mb_strlen($html)) AND ($pos = mb_strpos($html, '</textarea>', $offset)) !== false) { $html_a = substr($html, 0, $offset); $html_b = substr($html, $offset, ($pos - $offset + 11)); while (preg_match("'<textarea([^\>]*)>(.*?)\n(.*?)</textarea>'si", $html_b)) { @@ -13375,7 +13375,7 @@ $html = preg_replace("'([\s]*)<option'si", "<option", $html); $html = preg_replace("'</option>([\s]*)'si", "</option>", $html); $offset = 0; - while (($offset < mb_strlen($html)) AND ($pos = strpos($html, '</option>', $offset)) !== false) { + while (($offset < mb_strlen($html)) AND ($pos = mb_strpos($html, '</option>', $offset)) !== false) { $html_a = substr($html, 0, $offset); $html_b = substr($html, $offset, ($pos - $offset + 9)); while (preg_match("'<option([^\>]*)>(.*?)</option>'si", $html_b)) { @@ -14300,7 +14300,7 @@ } } elseif (($plalign == 'R') AND (!$this->rtl)) { // right alignment on LTR document - if (intval($this->revstrpos($pmid, ')]')) == (intval($this->revstrpos($pmid, ' )]')) + 1)) { + if (intval($this->revmb_strpos($pmid, ')]')) == (intval($this->revmb_strpos($pmid, ' )]')) + 1)) { // remove last space (if any) $linew -= $one_space_width; $mdiff = abs($tw - $linew); @@ -14308,11 +14308,11 @@ $t_x = $mdiff; } elseif (($plalign == 'L') AND ($this->rtl)) { // left alignment on RTL document - if ((intval($this->revstrpos($pmid, '[( ')) == intval($this->revstrpos($pmid, '[('))) OR (intval($this->revstrpos($pmid, '[('.chr(0).chr(32))) == intval($this->revstrpos($pmid, '[(')))) { + if ((intval($this->revmb_strpos($pmid, '[( ')) == intval($this->revmb_strpos($pmid, '[('))) OR (intval($this->revmb_strpos($pmid, '[('.chr(0).chr(32))) == intval($this->revmb_strpos($pmid, '[(')))) { // remove first space (if any) $linew -= $one_space_width; } - if (intval(strpos($pmid, '[(')) == (intval($this->revstrpos($pmid, '[(')))) { + if (intval(mb_strpos($pmid, '[(')) == (intval($this->revmb_strpos($pmid, '[(')))) { // remove last space (if any) $linew -= $one_space_width; if (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) { @@ -14378,12 +14378,12 @@ global $spacew; while (preg_match('/([0-9\.\+\-]*)[\s](Td|cm|m|l|c|re)[\s]/x', $pmid, $strpiece, PREG_OFFSET_CAPTURE, $offset) == 1) { // check if we are inside a string section '[( ... )]' - $stroffset = strpos($pmid, '[(', $offset); + $stroffset = mb_strpos($pmid, '[(', $offset); if (($stroffset !== false) AND ($stroffset <= $strpiece[2][1])) { // set offset to the end of string section - $offset = strpos($pmid, ')]', $stroffset); + $offset = mb_strpos($pmid, ')]', $stroffset); while (($offset !== false) AND ($pmid{($offset - 1)} == '\\')) { - $offset = strpos($pmid, ')]', ($offset + 1)); + $offset = mb_strpos($pmid, ')]', ($offset + 1)); } if ($offset === false) { $this->Error('HTML Justification: malformed PDF code.'); @@ -14396,13 +14396,13 @@ $spacew = ($spacewidth * $ns); } $offset = $strpiece[2][1] + mb_strlen($strpiece[2][0]); - $epsposbeg = strpos($pmid, 'q'.$this->epsmarker, $offset); - $epsposend = strpos($pmid, $this->epsmarker.'Q', $offset) + mb_strlen($this->epsmarker.'Q'); + $epsposbeg = mb_strpos($pmid, 'q'.$this->epsmarker, $offset); + $epsposend = mb_strpos($pmid, $this->epsmarker.'Q', $offset) + mb_strlen($this->epsmarker.'Q'); if ((($epsposbeg > 0) AND ($epsposend > 0) AND ($offset > $epsposbeg) AND ($offset < $epsposend)) OR (($epsposbeg === false) AND ($epsposend > 0) AND ($offset < $epsposend))) { // shift EPS images $trx = sprintf('1 0 0 1 %.3F 0 cm', $spacew); - $epsposbeg = strpos($pmid, 'q'.$this->epsmarker, ($prev_epsposbeg - 6)); + $epsposbeg = mb_strpos($pmid, 'q'.$this->epsmarker, ($prev_epsposbeg - 6)); $pmid_b = substr($pmid, 0, $epsposbeg); $pmid_m = substr($pmid, $epsposbeg, ($epsposend - $epsposbeg)); $pmid_e = substr($pmid, $epsposend); @@ -14971,7 +14971,7 @@ } } elseif (($plalign == 'R') AND (!$this->rtl)) { // right alignment on LTR document - if (intval($this->revstrpos($pmid, ')]')) == (intval($this->revstrpos($pmid, ' )]')) + 1)) { + if (intval($this->revmb_strpos($pmid, ')]')) == (intval($this->revmb_strpos($pmid, ' )]')) + 1)) { // remove last space (if any) $linew -= $one_space_width; $mdiff = abs($tw - $linew); @@ -14979,11 +14979,11 @@ $t_x = $mdiff; } elseif (($plalign == 'L') AND ($this->rtl)) { // left alignment on RTL document - if ((intval($this->revstrpos($pmid, '[( ')) == intval($this->revstrpos($pmid, '[('))) OR (intval($this->revstrpos($pmid, '[('.chr(0).chr(32))) == intval($this->revstrpos($pmid, '[(')))) { + if ((intval($this->revmb_strpos($pmid, '[( ')) == intval($this->revmb_strpos($pmid, '[('))) OR (intval($this->revmb_strpos($pmid, '[('.chr(0).chr(32))) == intval($this->revmb_strpos($pmid, '[(')))) { // remove first space (if any) $linew -= $one_space_width; } - if (intval(strpos($pmid, '[(')) == (intval($this->revstrpos($pmid, '[(')))) { + if (intval(mb_strpos($pmid, '[(')) == (intval($this->revmb_strpos($pmid, '[(')))) { // remove last space (if any) $linew -= $one_space_width; if (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) { @@ -15574,7 +15574,7 @@ $options = explode ("\r", $tag['attribute']['opt']); $values = array(); foreach ($options as $val) { - if (strpos($val, "\t") !== false) { + if (mb_strpos($val, "\t") !== false) { $opts = explode("\t", $val); $values[] = $opts; $w = max($w, $this->GetStringWidth($opts[1])); @@ -17276,10 +17276,10 @@ * @access public * @since 4.8.038 (2010-03-13) */ - public function revstrpos($haystack, $needle, $offset = 0) { + public function revmb_strpos($haystack, $needle, $offset = 0) { $length = mb_strlen($haystack); $offset = ($offset > 0)?($length - $offset):abs($offset); - $pos = strpos(strrev($haystack), strrev($needle), $offset); + $pos = mb_strpos(strrev($haystack), strrev($needle), $offset); return ($pos === false)?false:($length - $pos - mb_strlen($needle)); } Modified: trunk/install/save.php =================================================================== --- trunk/install/save.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/install/save.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -361,7 +361,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ // Database created above with correct name. if (strncasecmp($SQL, ' CREATE DATABASE ', 17) AND strncasecmp($SQL, ' USE ', 5)){ Modified: trunk/reportwriter/WriteReport.inc =================================================================== --- trunk/reportwriter/WriteReport.inc 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/reportwriter/WriteReport.inc 2011-07-03 03:27:48 UTC (rev 4620) @@ -544,7 +544,7 @@ $CSVOutput = ''; // Write the column headings foreach ($Heading as $mycolumn) { // check for embedded commas and enclose in quotes - if (strpos($mycolumn,',')===false) $CSVOutput .= $mycolumn.','; else $CSVOutput .= '"'.$mycolumn.'",'; + if (mb_strpos($mycolumn,',')===false) $CSVOutput .= $mycolumn.','; else $CSVOutput .= '"'.$mycolumn.'",'; } $CSVOutput = substr($CSVOutput,0,-1).chr(10); // Strip the last comma off and add line feed // Now write each data line and totals @@ -561,7 +561,7 @@ default: $CSVLine = ''; foreach ($myrow as $mycolumn) { // check for embedded commas and enclose in quotes - if (strpos($mycolumn,',')===false) $CSVLine .= $mycolumn.','; else $CSVLine .= '"'.$mycolumn.'",'; + if (mb_strpos($mycolumn,',')===false) $CSVLine .= $mycolumn.','; else $CSVLine .= '"'.$mycolumn.'",'; } $CSVLine = substr($CSVLine,0,-1); // Strip ... [truncated message content] |
From: <dai...@us...> - 2011-07-03 03:01:47
|
Revision: 4619 http://web-erp.svn.sourceforge.net/web-erp/?rev=4619&view=rev Author: daintree Date: 2011-07-03 03:01:39 +0000 (Sun, 03 Jul 2011) Log Message: ----------- various Modified Paths: -------------- trunk/CustWhereAlloc.php trunk/DailyBankTransactions.php trunk/DailySalesInquiry.php trunk/DebtorsAtPeriodEnd.php trunk/DeliveryDetails.php trunk/DiscountCategories.php trunk/DiscountMatrix.php trunk/EDIMessageFormat.php trunk/EDIProcessOrders.php trunk/PDFDeliveryDifferences.php trunk/PDFQuotation.php trunk/PDFQuotationPortrait.php trunk/PDFStockCheckComparison.php trunk/PrintCheque.php trunk/PrintCustStatements.php trunk/WorkOrderCosting.php trunk/doc/Change.log Modified: trunk/CustWhereAlloc.php =================================================================== --- trunk/CustWhereAlloc.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/CustWhereAlloc.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -12,7 +12,8 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Customer Where Allocated'). '" alt="" />' . $title . '</p>'; -echo '<table class=selection cellpadding=2><tr>'; +echo '<table class="selection" cellpadding=2> + <tr>'; echo '<td>' . _('Type') . ':</td> <td><select tabindex=1 name="TransType"> '; @@ -36,7 +37,9 @@ echo '<td>'._('Transaction Number').':</td> <td><input tabindex=2 type="text" name="TransNo" maxlength=10 size=10 value="'. $_POST['TransNo'] . '"></td>'; -echo '</tr></table><br /> +echo '</tr> + </table> + <br /> <div class="centre"><input tabindex=3 type="submit" name="ShowResults" value="' . _('Show How Allocated') . '"></div>'; if (isset($_POST['ShowResults']) AND $_POST['TransNo']==''){ @@ -49,9 +52,9 @@ /*First off get the DebtorTransID of the transaction (invoice normally) selected */ $sql = "SELECT id, - ovamount+ovgst AS totamt - FROM debtortrans - WHERE type='" . $_POST['TransType'] . "' AND transno = '" . $_POST['TransNo']."'"; + ovamount+ovgst AS totamt + FROM debtortrans + WHERE type='" . $_POST['TransType'] . "' AND transno = '" . $_POST['TransNo']."'"; $result = DB_query($sql , $db); @@ -60,25 +63,26 @@ $AllocToID = $myrow['id']; $sql = "SELECT type, - transno, - trandate, - debtortrans.debtorno, - reference, - rate, - ovamount+ovgst+ovfreight+ovdiscount as totalamt, - custallocns.amt - FROM debtortrans - INNER JOIN custallocns ON debtortrans.id=custallocns.transid_allocfrom - WHERE custallocns.transid_allocto='". $AllocToID."'"; + transno, + trandate, + debtortrans.debtorno, + reference, + rate, + ovamount+ovgst+ovfreight+ovdiscount as totalamt, + custallocns.amt + FROM debtortrans + INNER JOIN custallocns + ON debtortrans.id=custallocns.transid_allocfrom + WHERE custallocns.transid_allocto='". $AllocToID."'"; $ErrMsg = _('The customer transactions for the selected criteria could not be retrieved because'); - $TransResult = DB_query($sql, $db, $ErrMsg); if (DB_num_rows($TransResult)==0){ prnMsg(_('There are no allocations made against this transaction'),'info'); } else { - echo '<br /><table cellpadding=2 class=selection>'; + echo '<br /> + <table cellpadding=2 class="selection">'; echo '<tr> <th colspan=6><div class="centre"><font size=3 color=blue><b>'._('Allocations made against invoice number') . ' ' . $_POST['TransNo'] . '<br />'._('Transaction Total').': '. number_format($myrow['totamt'],2) . '</font></b></div></th> @@ -91,7 +95,7 @@ <th>' . _('Ex Rate') . '</th> <th>' . _('Amount') . '</th> <th>' . _('Alloc') . '</th> - </tr>'; + </tr>'; echo $tableheader; $RowCounter = 1; Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DailyBankTransactions.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -30,7 +30,8 @@ <td><select name="BankAccount">'; if (DB_num_rows($AccountsResults)==0){ - echo '</select></td></tr></table><p>'; + echo '</select></td> + </tr></table>'; 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'); include('includes/footer.inc'); exit; @@ -41,9 +42,9 @@ $_POST['BankAccount']=$myrow['accountcode']; } if ($_POST['BankAccount']==$myrow['accountcode']){ - echo '<option selected value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode']; + echo '<option selected value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode'] . '</option>'; } else { - echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode']; + echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode'] . '</option>'; } } echo '</select></td></tr>'; @@ -95,9 +96,9 @@ } else { $BankDetailRow = DB_fetch_array($BankResult); echo '<table class=selection> - <tr> - <th colspan=7><font size=3 color=blue>' . _('Account Transactions For').' '.$BankDetailRow['bankaccountname'].' '._('Between').' '.$_POST['FromTransDate'] . ' ' . _('and') . ' ' . $_POST['ToTransDate'] . '</font></th> - </tr>'; + <tr> + <th colspan=7><font size=3 color=blue>' . _('Account Transactions For').' '.$BankDetailRow['bankaccountname'].' '._('Between').' '.$_POST['FromTransDate'] . ' ' . _('and') . ' ' . $_POST['ToTransDate'] . '</font></th> + </tr>'; echo '<tr> <th>' . ('Date') . '</th> <th>'._('Transaction type').'</th> Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DailySalesInquiry.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -52,7 +52,10 @@ } echo '</select></td>'; -echo '</tr></table><br /><div class="centre"><input tabindex=4 type=submit name="ShowResults" VALUE="' . _('Show Daily Sales For The Selected Month') . '">'; +echo '</tr> + </table> + <br /> + <div class="centre"><input tabindex=4 type=submit name="ShowResults" value="' . _('Show Daily Sales For The Selected Month') . '">'; echo '</form></div>'; echo '<br />'; /*Now get and display the sales data returned */ @@ -92,13 +95,14 @@ echo '<table cellpadding=2 class=selection>'; echo'<tr> - <th>' . _('Sunday') . '</th> - <th>' . _('Monday') . '</th> - <th>' . _('Tuesday') . '</th> - <th>' . _('Wednesday') . '</th> - <th>' . _('Thursday') . '</th> - <th>' . _('Friday') . '</th> - <th>' . _('Saturday') . '</th></tr>'; + <th>' . _('Sunday') . '</th> + <th>' . _('Monday') . '</th> + <th>' . _('Tuesday') . '</th> + <th>' . _('Wednesday') . '</th> + <th>' . _('Thursday') . '</th> + <th>' . _('Friday') . '</th> + <th>' . _('Saturday') . '</th> + </tr>'; $CumulativeTotalSales = 0; $CumulativeTotalCost = 0; Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DebtorsAtPeriodEnd.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -27,28 +27,29 @@ /*Now figure out the aged analysis for the customer range under review */ $SQL = "SELECT debtorsmaster.debtorno, - debtorsmaster.name, - currencies.currency, - SUM((debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc)/debtortrans.rate) AS balance, - SUM(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc) AS fxbalance, - SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' THEN - (debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount)/debtortrans.rate ELSE 0 END) AS afterdatetrans, - SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' - AND (debtortrans.type=11 OR debtortrans.type=12) THEN - debtortrans.diffonexch ELSE 0 END) AS afterdatediffonexch, - SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' THEN - debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount ELSE 0 END - ) AS fxafterdatetrans - FROM debtorsmaster, - currencies, - debtortrans - WHERE debtorsmaster.currcode = currencies.currabrev - AND debtorsmaster.debtorno = debtortrans.debtorno - AND debtorsmaster.debtorno >= '" . $_POST['FromCriteria'] . "' + debtorsmaster.name, + currencies.currency, + currencies.decimalplaces, + SUM((debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc)/debtortrans.rate) AS balance, + SUM(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc) AS fxbalance, + SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' THEN + (debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount)/debtortrans.rate ELSE 0 END) AS afterdatetrans, + SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' + AND (debtortrans.type=11 OR debtortrans.type=12) THEN + debtortrans.diffonexch ELSE 0 END) AS afterdatediffonexch, + SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' THEN + debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount ELSE 0 END + ) AS fxafterdatetrans + FROM debtorsmaster INNER JOIN currencies + ON debtorsmaster.currcode = currencies.currabrev + INNER JOIN debtortrans + ON debtorsmaster.debtorno = debtortrans.debtorno + WHERE debtorsmaster.debtorno >= '" . $_POST['FromCriteria'] . "' AND debtorsmaster.debtorno <= '" . $_POST['ToCriteria'] . "' GROUP BY debtorsmaster.debtorno, debtorsmaster.name, - currencies.currency"; + currencies.currency, + currencies.decimalplaces"; $CustomerResult = DB_query($SQL,$db,'','',false,false); @@ -84,8 +85,8 @@ if (abs($Balance)>0.009 OR ABS($FXBalance)>0.009) { - $DisplayBalance = number_format($DebtorBalances['balance'] - $DebtorBalances['afterdatetrans'],2); - $DisplayFXBalance = number_format($DebtorBalances['fxbalance'] - $DebtorBalances['fxafterdatetrans'],2); + $DisplayBalance = number_format($DebtorBalances['balance'] - $DebtorBalances['afterdatetrans'],$DebtorBalances['decimalplaces']); + $DisplayFXBalance = number_format($DebtorBalances['fxbalance'] - $DebtorBalances['fxafterdatetrans'],$DebtorBalances['decimalplaces']); $TotBal += $Balance; @@ -109,7 +110,7 @@ include('includes/PDFDebtorBalsPageHeader.inc'); } - $DisplayTotBalance = number_format($TotBal,2); + $DisplayTotBalance = number_format($TotBal,$_SESSION['CompanyRecord']['decimalplaces']); $LeftOvers = $pdf->addTextWrap(50,$YPos,160,$FontSize,_('Total balances'),'left'); $LeftOvers = $pdf->addTextWrap(220,$YPos,60,$FontSize,$DisplayTotBalance,'right'); Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DeliveryDetails.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -40,7 +40,7 @@ if (isset($_POST['ProcessOrder']) OR isset($_POST['MakeRecurringOrder'])) { /*need to check for input errors in any case before order processed */ - $_POST['Update']='Yes rerun the validation checks'; + $_POST['Update']='Yes rerun the validation checks'; //no need for gettext! /*store the old freight cost before it is recalculated to ensure that there has been no change - test for change after freight recalculated and get user to re-confirm if changed */ @@ -126,22 +126,22 @@ } } $sql = "SELECT custbranch.brname, - custbranch.braddress1, - custbranch.braddress2, - custbranch.braddress3, - custbranch.braddress4, - custbranch.braddress5, - custbranch.braddress6, - custbranch.phoneno, - custbranch.email, - custbranch.defaultlocation, - custbranch.defaultshipvia, - custbranch.deliverblind, - custbranch.specialinstructions, - custbranch.estdeliverydays - FROM custbranch - WHERE custbranch.branchcode='" . $_SESSION['Items'.$identifier]->Branch . "' - AND custbranch.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "'"; + custbranch.braddress1, + custbranch.braddress2, + custbranch.braddress3, + custbranch.braddress4, + custbranch.braddress5, + custbranch.braddress6, + custbranch.phoneno, + custbranch.email, + custbranch.defaultlocation, + custbranch.defaultshipvia, + custbranch.deliverblind, + custbranch.specialinstructions, + custbranch.estdeliverydays + FROM custbranch + WHERE custbranch.branchcode='" . $_SESSION['Items'.$identifier]->Branch . "' + AND custbranch.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "'"; $ErrMsg = _('The customer branch record of the customer selected') . ': ' . $_SESSION['Items'.$identifier]->CustomerName . ' ' . _('cannot be retrieved because'); $DbgMsg = _('SQL used to retrieve the branch details was') . ':'; @@ -256,7 +256,7 @@ if(isset($_POST['MakeRecurringOrder']) AND ! $InputErrors){ echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/RecurringSalesOrders.php?identifier='.$identifier . '&NewRecurringOrder=Yes">'; - prnMsg(_('You should automatically be forwarded to the entry of recurring order details page') . '. ' . _('If this does not happen') . '(' . _('if the browser does not support META Refresh') . ') ' ."<a href='" . $rootpath . '/RecurringOrders.php?identifier='.$identifier . "&NewRecurringOrder=Yes'>". _('click here') .'</a> '. _('to continue'),'info'); + prnMsg(_('You should automatically be forwarded to the entry of recurring order details page') . '. ' . _('If this does not happen') . '(' . _('if the browser does not support META Refresh') . ') ' . '<a href="' . $rootpath . '/RecurringOrders.php?identifier='.$identifier . '&NewRecurringOrder=Yes">'. _('click here') .'</a> '. _('to continue'),'info'); include('includes/footer.inc'); exit; } @@ -569,7 +569,7 @@ if ($_POST['Quotation']==0) { /*then its not a quotation its a real order */ - echo '<br /><table class=selection> + echo '<br /><table class="selection"> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td> <td>' . ' ' . '<a target="_blank" href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $OrderNo . '">'. _('Print packing slip') . ' (' . _('Preprinted stationery') . ')' .'</a></td> @@ -591,13 +591,13 @@ echo '<br /><table class=selection> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt=""></td> - <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotation.php?' . SID .'identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Landscape)') .'</a></td> + <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotation.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Landscape)') .'</a></td> </tr> </table>'; echo '<br /><table class=selection> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt=""></td> - <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotationPortrait.php?' . SID .'identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Portrait)') .'</a></td> + <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotationPortrait.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Portrait)') .'</a></td> </tr> </table>'; } @@ -639,7 +639,7 @@ $ErrMsg = _('Could not update the contract status'); $DbgMsg = _('The SQL that failed to update the contract status was'); $UpdContractResult=DB_query("UPDATE contracts SET status=2, - wo='" . $WONo . "' + wo='" . $WONo . "' WHERE orderno='" .$_SESSION['ExistingOrder'] . "'", $db,$ErrMsg,$DbgMsg,true); $ErrMsg = _('Could not insert the contract bill of materials'); $InsContractBOM = DB_query("INSERT INTO bom (parent, @@ -653,7 +653,7 @@ workcentreadded, '" . $_SESSION['Items'.$identifier]->Location ."', '" . Date('Y-m-d') . "', - '2037-12-31' + '2099-12-31' FROM contractbom WHERE contractref='" . $ContractRow['contractref'] . "'",$db,$ErrMsg,$DbgMsg); @@ -707,31 +707,30 @@ } //end test to see if the order was a contract quotation being changed to an order - $HeaderSQL = "UPDATE salesorders - SET debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "', - branchcode = '" . $_SESSION['Items'.$identifier]->Branch . "', - customerref = '". DB_escape_string($_SESSION['Items'.$identifier]->CustRef) ."', - comments = '". DB_escape_string($_SESSION['Items'.$identifier]->Comments) ."', - ordertype = '" . $_SESSION['Items'.$identifier]->DefaultSalesType . "', - shipvia = '" . $_POST['ShipVia'] . "', - deliverydate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->DeliveryDate)) . "', - quotedate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->QuoteDate)) . "', - confirmeddate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->ConfirmedDate)) . "', - deliverto = '" . DB_escape_string($_SESSION['Items'.$identifier]->DeliverTo) . "', - deladd1 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd1) . "', - deladd2 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd2) . "', - deladd3 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd3) . "', - deladd4 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd4) . "', - deladd5 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd5) . "', - deladd6 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd6) . "', - contactphone = '" . $_SESSION['Items'.$identifier]->PhoneNo . "', - contactemail = '" . $_SESSION['Items'.$identifier]->Email . "', - freightcost = '" . $_SESSION['Items'.$identifier]->FreightCost ."', - fromstkloc = '" . $_SESSION['Items'.$identifier]->Location ."', - printedpackingslip = '" . $_POST['ReprintPackingSlip'] . "', - quotation = '" . $_SESSION['Items'.$identifier]->Quotation . "', - deliverblind = '" . $_SESSION['Items'.$identifier]->DeliverBlind . "' - WHERE salesorders.orderno='" . $_SESSION['ExistingOrder'] ."'"; + $HeaderSQL = "UPDATE salesorders SET debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + branchcode = '" . $_SESSION['Items'.$identifier]->Branch . "', + customerref = '". DB_escape_string($_SESSION['Items'.$identifier]->CustRef) ."', + comments = '". DB_escape_string($_SESSION['Items'.$identifier]->Comments) ."', + ordertype = '" . $_SESSION['Items'.$identifier]->DefaultSalesType . "', + shipvia = '" . $_POST['ShipVia'] . "', + deliverydate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->DeliveryDate)) . "', + quotedate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->QuoteDate)) . "', + confirmeddate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->ConfirmedDate)) . "', + deliverto = '" . DB_escape_string($_SESSION['Items'.$identifier]->DeliverTo) . "', + deladd1 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd1) . "', + deladd2 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd2) . "', + deladd3 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd3) . "', + deladd4 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd4) . "', + deladd5 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd5) . "', + deladd6 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd6) . "', + contactphone = '" . $_SESSION['Items'.$identifier]->PhoneNo . "', + contactemail = '" . $_SESSION['Items'.$identifier]->Email . "', + freightcost = '" . $_SESSION['Items'.$identifier]->FreightCost ."', + fromstkloc = '" . $_SESSION['Items'.$identifier]->Location ."', + printedpackingslip = '" . $_POST['ReprintPackingSlip'] . "', + quotation = '" . $_SESSION['Items'.$identifier]->Quotation . "', + deliverblind = '" . $_SESSION['Items'.$identifier]->DeliverBlind . "' + WHERE salesorders.orderno='" . $_SESSION['ExistingOrder'] ."'"; $DbgMsg = _('The SQL that was used to update the order and failed was'); $ErrMsg = _('The order cannot be updated because'); Modified: trunk/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DiscountCategories.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -28,10 +28,10 @@ //first off validate inputs sensible $result = DB_query("SELECT stockid - FROM stockmaster - WHERE mbflag <>'K' - AND mbflag<>'D' - AND stockid='" . strtoupper($_POST['StockID']) . "'",$db); + FROM stockmaster + WHERE mbflag <>'K' + AND mbflag<>'D' + AND stockid='" . strtoupper($_POST['StockID']) . "'",$db); if (DB_num_rows($result)==0){ $InputError = 1; prnMsg(_('The stock item entered must be set up as either a manufactured or purchased or assembly item'),'warn'); @@ -59,8 +59,8 @@ echo '<br />'; } elseif (isset($_POST['SubmitCategory'])) { $sql="UPDATE stockmaster - SET discountcategory='".$_POST['DiscountCategory']."' - WHERE categoryid='".$_POST['stockcategory']."'"; + SET discountcategory='".$_POST['DiscountCategory']."' + WHERE categoryid='".$_POST['stockcategory']."'"; $result=DB_query($sql, $db); } @@ -85,7 +85,10 @@ } echo '</select></td>'; - echo '<td><input type="submit" name="select" value="'._('Select').'"></td></tr></table><br />'; + echo '<td><input type="submit" name="select" value="'._('Select').'"></td> + </tr> + </table> + <br />'; } echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; @@ -125,7 +128,8 @@ <td><input type="text" name="PartID" size=10 maxlength=10 value="' . $_POST['PartID'] . '"></td> <td>' . _('Partial description') . ':</td> <td><input type="text" name="PartDesc" size=10 value="' . $_POST['PartDesc'] .'" maxlength=10></td> - <td><input type="submit" name="search" value="' . _('Search') .'"></td></tr>'; + <td><input type="submit" name="search" value="' . _('Search') .'"></td> + </tr>'; echo '</table>'; @@ -212,7 +216,7 @@ printf('<td>%s</td> <td>%s - %s</td> - <td><a href="%s">'. _('Delete') .'</td> + <td><a href="%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this discount category?') . '\');">'. _('Delete') .'</td> </tr>', $myrow['discountcategory'], $myrow['stockid'], Modified: trunk/DiscountMatrix.php =================================================================== --- trunk/DiscountMatrix.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DiscountMatrix.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -136,23 +136,25 @@ echo '<div class="centre"><input tabindex=5 type="submit" name="submit" value="' . _('Enter Information') . '"></div><br />'; $sql = "SELECT sales_type, - salestype, - discountcategory, - quantitybreak, - discountrate - FROM discountmatrix INNER JOIN salestypes - ON discountmatrix.salestype=salestypes.typeabbrev - ORDER BY salestype, - discountcategory, - quantitybreak"; + salestype, + discountcategory, + quantitybreak, + discountrate + FROM discountmatrix INNER JOIN salestypes + ON discountmatrix.salestype=salestypes.typeabbrev + ORDER BY salestype, + discountcategory, + quantitybreak"; $result = DB_query($sql,$db); echo '<table class=selection>'; -echo '<tr><th>' . _('Sales Type') . '</th> +echo '<tr> + <th>' . _('Sales Type') . '</th> <th>' . _('Discount Category') . '</th> <th>' . _('Quantity Break') . '</th> - <th>' . _('Discount Rate') . ' %' . '</th></tr>'; + <th>' . _('Discount Rate') . ' %' . '</th> + </tr>'; $k=0; //row colour counter @@ -170,7 +172,7 @@ <td>%s</td> <td class="number">%s</td> <td class="number">%s</td> - <td><a href="%s">' . _('Delete') . '</td> + <td><a href="%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this discount matrix record?') . '\');">' . _('Delete') . '</td> </tr>', $myrow['sales_type'], $myrow['discountcategory'], Modified: trunk/EDIMessageFormat.php =================================================================== --- trunk/EDIMessageFormat.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/EDIMessageFormat.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -31,13 +31,13 @@ sequenceno, section, linetext) - SELECT '".$PartnerCode."', - 'INVOIC', - sequenceno, - section, - linetext - FROM edimessageformat - WHERE partnercode='DEFAULT' + SELECT '".$PartnerCode."', + 'INVOIC', + sequenceno, + section, + linetext + FROM edimessageformat + WHERE partnercode='DEFAULT' AND messagetype='INVOIC'"; $ErrMsg = _('There was an error inserting the default template invoice message records for') . ' ' . $PartnerCode . ' ' . _('because'); @@ -113,23 +113,23 @@ or deletion of the records*/ $sql = "SELECT id, - section, - sequenceno, - linetext - FROM edimessageformat - WHERE partnercode='" . $PartnerCode . "' - AND messagetype='" . $MessageType . "' - ORDER BY sequenceno"; + section, + sequenceno, + linetext + FROM edimessageformat + WHERE partnercode='" . $PartnerCode . "' + AND messagetype='" . $MessageType . "' + ORDER BY sequenceno"; $result = DB_query($sql,$db); echo '<table class=selection>'; echo '<tr><th colspan=5><font size=3>' . _('Definition of') . ' ' . $MessageType . ' ' . _('for') . ' ' . $PartnerCode.'</font></th></tr>'; $TableHeader = '<tr> - <th>' . _('Section') . '</th> - <th>' . _('Sequence') . '</th> - <th>' . _('Format String') . '</th> - </tr>'; + <th>' . _('Section') . '</th> + <th>' . _('Sequence') . '</th> + <th>' . _('Format String') . '</th> + </tr>'; echo $TableHeader; $k=0; //row colour counter @@ -145,18 +145,18 @@ printf('<td>%s</td> - <td class=number>%s</td> - <td>%s</td> - <td><a href="%s&SelectedMessageLine=%s">' . _('Edit') . '</a></td> - <td><a href="%s&delete=%s">' . _('Delete') . '</a></td> - </tr>', - $myrow[1], - $myrow[2], - $myrow[3], - $_SERVER['PHP_SELF'] . '?' . SID, - $myrow[0], - $_SERVER['PHP_SELF'] . '?' . SID, - $myrow[0]); + <td class=number>%s</td> + <td>%s</td> + <td><a href="%s&SelectedMessageLine=%s">' . _('Edit') . '</a></td> + <td><a href="%s&delete=%s">' . _('Delete') . '</a></td> + </tr>', + $myrow[1], + $myrow[2], + $myrow[3], + $_SERVER['PHP_SELF'] . '?' . SID, + $myrow[0], + $_SERVER['PHP_SELF'] . '?' . SID, + $myrow[0]); } //END WHILE LIST LOOP echo '</table><p>'; Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/EDIProcessOrders.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -1,10 +1,7 @@ <?php -/* $Revision: 1.20 $ */ /* $Id$*/ -//$PageSecurity =11; - include ('includes/session.inc'); $title = _('Process EDI Orders'); @@ -40,7 +37,7 @@ /*Read in the EANCOM Order Segments for the current seg group from the segments table */ -$sql = 'SELECT id, segtag, maxoccur, seggroup FROM edi_orders_segs'; +$sql = "SELECT id, segtag, maxoccur, seggroup FROM edi_orders_segs"; $OrderSeg = DB_query($sql,$db); $i=0; $Seg = array(); @@ -58,7 +55,7 @@ while (false !== ($OrderFile=readdir($dirhandle))){ /*there are files in the incoming orders dir */ $TryNextFile = False; - echo "<br />$OrderFile"; + echo '<br />' . $OrderFile; /*Counter that keeps track of the array pointer for the 1st seg in the current seg group */ $FirstSegInGrp =0; @@ -541,7 +538,7 @@ } else { $mail->setSubject(_('EDI Order Message') . ' ' . $Order->CustRef); - $EDICustServPerson ="'phil' <phil@localhost>"; + $EDICustServPerson = $_SESSION['PurchasingManagerEmail']; $Recipients = array($EDICustServPerson); } @@ -556,7 +553,6 @@ - } /*end of the loop around all the incoming order files in the incoming orders directory */ Modified: trunk/PDFDeliveryDifferences.php =================================================================== --- trunk/PDFDeliveryDifferences.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/PDFDeliveryDifferences.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -2,9 +2,6 @@ /* $Id$*/ -/* $Revision: 1.15 $ */ - -//$PageSecurity = 3; include ('includes/session.inc'); include('includes/SQL_CommonFunctions.inc'); @@ -27,42 +24,51 @@ echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' . _('Delivery Differences Report') . '</p>'; - echo "<form method='post' action='" . $_SERVER['PHP_SELF'] . '?' . sid . "'>"; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection><tr><td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . - ":</td><td><input type=text class=date alt='".$_SESSION['DefaultDateFormat']. - "' name='FromDate' maxlength=10 size=10 value='" . - Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . "'></td></tr>"; - echo '<tr><td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ":</td><td><input type=text class=date alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td></tr>"; + echo '<table class=selection> + <tr> + <td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . ':</td> + <td><input type=text class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . '"></td> + </tr>'; + echo '<tr> + <td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ':</td><td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + </tr>'; echo '<tr><td>' . _('Inventory Category') . '</td><td>'; $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; $result = DB_query($sql,$db); - echo "<select name='CategoryID'>"; - echo "<option selected value='All'>" . _('Over All Categories'); + echo '<select name="CategoryID">'; + echo '<option selected value="All">' . _('Over All Categories') . '</option>'; - while ($myrow=DB_fetch_array($result)){ - echo "<option value='" . $myrow['categoryid'] . "'>" . $myrow['categorydescription']; - } + while ($myrow=DB_fetch_array($result)){ + echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; + } - echo '</select></td></tr>'; - echo '<tr><td>' . _('Inventory Location') . ":</td><td><select name='Location'>"; - echo "<option selected value='All'>" . _('All Locations'); + echo '<tr><td>' . _('Inventory Location') . ':</td> + <td><select name="Location"> + <option selected value="All">' . _('All Locations') . '</option>'; - $result= DB_query('SELECT loccode, locationname FROM locations',$db); - while ($myrow=DB_fetch_array($result)){ - echo "<option value='" . $myrow['loccode'] . "'>" . $myrow['locationname']; - } + $result= DB_query("SELECT loccode, locationname FROM locations",$db); + while ($myrow=DB_fetch_array($result)){ + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } echo '</select></td></tr>'; - echo '<tr><td>' . _('Email the report off') . ":</td><td><select name='Email'>"; - echo "<option selected value='No'>" . _('No'); - echo "<option value='Yes'>" . _('Yes'); - echo "</select></td></tr></table><br /><div class='centre'><input type=submit name='Go' VALUE='" . _('Create PDF') . "'></div>"; + echo '<tr><td>' . _('Email the report off') . ':</td> + <td><select name="Email"> + <option selected value="No">' . _('No') . '</option> + <option value="Yes">' . _('Yes') . '</option> + </select> + </td> + </tr> + </table> + <br /> + <div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '"></div>'; if ($InputError==1){ prnMsg($msg,'error'); @@ -257,20 +263,8 @@ $YPos-=$line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,200,$FontSize,_('DIFOT') . ' ' . 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->stream(); -*/ $ReportFileName = $_SESSION['DatabaseName'] . '_DeliveryDifferences_' . date('Y-m-d').'.pdf'; -$pdf->OutputD($ReportFileName);//UldisN +$pdf->OutputD($ReportFileName); if ($_POST['Email']=='Yes'){ if (file_exists($_SESSION['reports_dir'] . '/'.$ReportFileName)){ Modified: trunk/PDFQuotation.php =================================================================== --- trunk/PDFQuotation.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/PDFQuotation.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -84,8 +84,8 @@ $FontSize=12; $PageNumber = 1; $line_height=15; -// $pdf->selectFont('./fonts/Helvetica.afm'); + /* Now ... Has the order got any line items still outstanding to be invoiced */ $ErrMsg = _('There was a problem retrieving the quotation line details for quotation Number') . ' ' . @@ -224,28 +224,16 @@ } /*end if there are line details to show on the quotation*/ -//$pdfcode = $pdf->output('PDFQuotation.pdf', 'I'); -//$len = mb_strlen($pdfcode); if ($ListCount == 0){ - $title = _('Print Quotation Error'); - include('includes/header.inc'); - echo '<p>'. _('There were no items on the quotation') . '. ' . _('The quotation cannot be printed'). - '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?' . SID . '&Quotation=Quotes_only">'. _('Print Another Quotation'). - '</a>' . '<br />'. '<a href="' . $rootpath . '/index.php?' . SID . '">' . _('Back to the menu') . '</a>'; - include('includes/footer.inc'); + $title = _('Print Quotation Error'); + include('includes/header.inc'); + echo '<p>'. _('There were no items on the quotation') . '. ' . _('The quotation cannot be printed'). + '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?' . SID . '&Quotation=Quotes_only">'. _('Print Another Quotation'). + '</a>' . '<br />'. '<a href="' . $rootpath . '/index.php?' . SID . '">' . _('Back to the menu') . '</a>'; + include('includes/footer.inc'); exit; } else { -/* - header('Content-type: application/pdf'); - header('Content-Length: ' . $len); - header('Content-Disposition: inline; filename=Quotation.pdf'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); -//echo 'here'; - $pdf->Output('PDFQuotation.pdf', 'I'); -*/ - $pdf->OutputI($_SESSION['DatabaseName'] . '_Quotation_' . date('Y-m-d') . '.pdf');//UldisN - $pdf->__destruct(); //UldisN + $pdf->OutputI($_SESSION['DatabaseName'] . '_Quotation_' . date('Y-m-d') . '.pdf'); + $pdf->__destruct(); } ?> \ No newline at end of file Modified: trunk/PDFQuotationPortrait.php =================================================================== --- trunk/PDFQuotationPortrait.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/PDFQuotationPortrait.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -2,7 +2,6 @@ /* $Id: PDFQuotationPortrait.php 4491 2011-02-15 06:31:08Z daintree $ */ - include('includes/session.inc'); include('includes/SQL_CommonFunctions.inc'); @@ -59,18 +58,17 @@ //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?'. SID .'&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><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'&Quotations=Quotes_Only">' . _('Outstanding Quotations') . '</a></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 */ @@ -85,7 +83,6 @@ $FontSize=12; $PageNumber = 1; $line_height=24; -// $pdf->selectFont('./fonts/Helvetica.afm'); /* Now ... Has the order got any line items still outstanding to be invoiced */ @@ -137,13 +134,19 @@ $TaxProv = $myrow['taxprovinceid']; $TaxCat = $myrow2['taxcatid']; $Branch = $myrow['branchcode']; - $sql3 = " select taxgrouptaxes.taxauthid from taxgrouptaxes INNER JOIN custbranch ON taxgrouptaxes.taxgroupid=custbranch.taxgroupid WHERE custbranch.branchcode='" .$Branch ."'"; + $sql3 = " SELECT taxgrouptaxes.taxauthid + FROM taxgrouptaxes INNER JOIN custbranch + ON taxgrouptaxes.taxgroupid=custbranch.taxgroupid + WHERE custbranch.branchcode='" .$Branch ."'"; $result3=DB_query($sql3,$db, $ErrMsg); while ($myrow3=DB_fetch_array($result3)){ $TaxAuth = $myrow3['taxauthid']; } - $sql4 = "SELECT * FROM taxauthrates WHERE dispatchtaxprovince='" .$TaxProv ."' AND taxcatid='" .$TaxCat ."' AND taxauthority='" .$TaxAuth ."'"; + $sql4 = "SELECT * FROM taxauthrates + WHERE dispatchtaxprovince='" .$TaxProv ."' + AND taxcatid='" .$TaxCat ."' + AND taxauthority='" .$TaxAuth ."'"; $result4=DB_query($sql4,$db, $ErrMsg); while ($myrow4=DB_fetch_array($result4)){ $TaxClass = 100 * $myrow4['taxrate']; @@ -162,9 +165,9 @@ $LeftOvers = $pdf->addTextWrap(120,$YPos,295,$FontSize,$myrow2['description']); $LeftOvers = $pdf->addTextWrap(180,$YPos,85,$FontSize,$DisplayQty,'right'); $LeftOvers = $pdf->addTextWrap(230,$YPos,85,$FontSize,$DisplayPrice,'right'); - if ($DisplayDiscount > 0){ - $LeftOvers = $pdf->addTextWrap(280,$YPos,85,$FontSize,$DisplayDiscount,'right'); - } + if ($DisplayDiscount > 0){ + $LeftOvers = $pdf->addTextWrap(280,$YPos,85,$FontSize,$DisplayDiscount,'right'); + } $LeftOvers = $pdf->addTextWrap(330,$YPos,85,$FontSize,$DisplayTaxClass,'right'); $LeftOvers = $pdf->addTextWrap(410,$YPos,85,$FontSize,$DisplayTaxAmount,'center'); $LeftOvers = $pdf->addTextWrap(460,$YPos,90,$FontSize,$DisplayTotal,'right'); @@ -185,12 +188,11 @@ } //end while there are line items to print out if ((mb_strlen($myrow['comments']) >200 AND $YPos-$line_height <= 75) - OR (mb_strlen($myrow['comments']) >1 AND $YPos-$line_height <= 62) - OR $YPos-$line_height <= 50){ - /* We reached the end of the page so finsih off the page and start a newy */ - $PageNumber++; - include ('includes/PDFQuotationPageHeader.inc'); - + OR (mb_strlen($myrow['comments']) >1 AND $YPos-$line_height <= 62) + OR $YPos-$line_height <= 50){ + /* We reached the end of the page so finsih off the page and start a newy */ + $PageNumber++; + include ('includes/PDFQuotationPageHeader.inc'); } //end if need a new page headed up $LeftOvers = $pdf->addTextWrap($XPos,$YPos-80,200,10,_('Notes:')); @@ -225,28 +227,16 @@ } /*end if there are line details to show on the quotation*/ -//$pdfcode = $pdf->output('PDFQuotation.pdf', 'I'); -//$len = mb_strlen($pdfcode); if ($ListCount == 0){ $title = _('Print Quotation Error'); include('includes/header.inc'); echo '<p>'. _('There were no items on the quotation') . '. ' . _('The quotation cannot be printed'). - '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?' . SID . '&Quotation=Quotes_only">'. _('Print Another Quotation'). - '</a>' . '<br />'. '<a href="' . $rootpath . '/index.php?' . SID . '">' . _('Back to the menu') . '</a>'; + '<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'); exit; } else { -/* - header('Content-type: application/pdf'); - header('Content-Length: ' . $len); - header('Content-Disposition: inline; filename=Quotation.pdf'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); -//echo 'here'; - $pdf->Output('PDFQuotation.pdf', 'I'); -*/ - $pdf->OutputI($_SESSION['DatabaseName'] . '_Quotation_' . date('Y-m-d') . '.pdf');//UldisN - $pdf->__destruct(); //UldisN + $pdf->OutputI($_SESSION['DatabaseName'] . '_Quotation_' . date('Y-m-d') . '.pdf'); + $pdf->__destruct(); } ?> Modified: trunk/PDFStockCheckComparison.php =================================================================== --- trunk/PDFStockCheckComparison.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/PDFStockCheckComparison.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -2,9 +2,6 @@ /* $Id$*/ -/* $Revision: 1.18 $ */ - -//$PageSecurity = 2; include('includes/session.inc'); If (isset($_POST['PrintPDF']) AND isset($_POST['ReportOrClose'])){ @@ -254,7 +251,11 @@ $LeftOvers = $pdf->addTextWrap(135,$YPos,180,$FontSize,$CheckItemRow['description'], 'left'); $LeftOvers = $pdf->addTextWrap(315,$YPos,60,$FontSize,$CheckItemRow['qoh'], 'right'); - $SQL = "SELECT qtycounted, reference FROM stockcounts WHERE loccode ='" . $Location . "' AND stockid = '" . $CheckItemRow['stockid'] . "'"; + $SQL = "SELECT qtycounted, + reference + FROM stockcounts + WHERE loccode ='" . $Location . "' + AND stockid = '" . $CheckItemRow['stockid'] . "'"; $Counts = DB_query($SQL,$db,'','',false,false); @@ -306,33 +307,10 @@ } /*end STOCK comparison while loop */ $YPos -= (2*$line_height); -/* - $pdfcode = $pdf->output(); - $len = mb_strlen($pdfcode); - if ($len<=20){ - $title = _('Print Stock check comparison Error'); - include('includes/header.inc'); - echo '<p>'; - prnMsg( _('There were no Inventory Comparison sheets to print out'), 'error'); - echo '<br /><a href="' . $rootpath . '/index.php?' . SID . '">' . _('Back to the menu') . '</a>'; - include('includes/footer.inc'); - exit; - } else { - header('Content-type: application/pdf'); - header('Content-Length: ' . $len); - header('Content-Disposition: inline; filename=StockComparison.pdf'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); + $pdf->OutputD($_SESSION['DatabaseName'] . '_StockComparison_' . date('Y-m-d') . '.pdf'); + $pdf->__destruct(); - $pdf->Output('StockCheckComparison.pdf', 'I'); - - } -*/ - $pdf->OutputD($_SESSION['DatabaseName'] . '_StockComparison_' . date('Y-m-d') . '.pdf');//UldisN - $pdf->__destruct(); //UldisN - if ($_POST['ReportOrClose']=='ReportAndClose'){ //need to print the report first before this but don't risk re-adjusting all the stock!! $sql = "TRUNCATE TABLE stockcheckfreeze"; Modified: trunk/PrintCheque.php =================================================================== --- trunk/PrintCheque.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/PrintCheque.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -2,10 +2,6 @@ /* $Id$*/ -/* $Revision: 1.5 $ */ - -//$PageSecurity = 5; - include('includes/DefinePaymentClass.php'); include('includes/session.inc'); include('Numbers/Words.php'); @@ -58,8 +54,6 @@ $LeftOvers = $pdf->addTextWrap(375,$YPos,100,$FontSize, number_format($_SESSION['PaymentDetail']->Amount,2), 'right'); - - // remittance advice 1 $YPos -= 14*$line_height; $LeftOvers = $pdf->addTextWrap(0,$YPos,$Page_Width,$FontSize,_('Remittance Advice'), 'center'); @@ -87,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,number_format(round($_SESSION['PaymentDetail']->Amount,2),2), '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->__destruct(); //UldisN -?> +$pdf->OutputD($_SESSION['DatabaseName'] . '_Cheque_' . date('Y-m-d') . '_ChequeNum_' . $_GET['ChequeNum'] . '.pdf'); +$pdf->__destruct(); +?> \ No newline at end of file Modified: trunk/PrintCustStatements.php =================================================================== --- trunk/PrintCustStatements.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/PrintCustStatements.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -2,10 +2,6 @@ /* $Id$*/ -/* $Revision: 1.19 $ */ - -//$PageSecurity = 2; - include('includes/session.inc'); include('includes/SQL_CommonFunctions.inc'); @@ -15,6 +11,7 @@ if (isset($_POST['PrintPDF'])) { $PaperSize='A4_Landscape'; } + if (isset($_GET['PrintPDF'])) { $FromCust = $_GET['FromCust']; $ToCust = $_GET['ToCust']; @@ -25,18 +22,16 @@ $PaperSize='A4_Landscape'; } - - if (isset($_GET['FromCust'])) { $getFrom = $_GET['FromCust']; $_POST['FromCust'] = $getFrom; } + if (isset($_GET['ToCust'])) { $getTo = $_GET['ToCust']; $_POST['ToCust'] = $getTo; } - If (isset($_POST['PrintPDF']) && isset($_POST['FromCust']) && $_POST['FromCust']!=''){ $_POST['FromCust'] = strtoupper($_POST['FromCust']); @@ -57,30 +52,30 @@ $ErrMsg = _('There was a problem settling the old transactions.'); $DbgMsg = _('The SQL used to settle outstanding transactions was'); $sql = "UPDATE debtortrans SET settled=1 - WHERE ABS(debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debtortrans.ovgst-debtortrans.alloc)<0.009"; + WHERE ABS(debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debtortrans.ovgst-debtortrans.alloc)<0.009"; $SettleAsNec = DB_query($sql,$db, $ErrMsg, $DbgMsg); /*Figure out who all the customers in this range are */ $ErrMsg= _('There was a problem retrieving the customer information for the statements from the database'); $sql = "SELECT debtorsmaster.debtorno, - debtorsmaster.name, - debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, - debtorsmaster.address5, - debtorsmaster.address6, - debtorsmaster.lastpaid, - debtorsmaster.lastpaiddate, - currencies.currency, - paymentterms.terms - FROM debtorsmaster INNER JOIN currencies - ON debtorsmaster.currcode=currencies.currabrev - INNER JOIN paymentterms - ON debtorsmaster.paymentterms=paymentterms.termsindicator - WHERE debtorsmaster.debtorno >='" . $_POST['FromCust'] ."' - AND debtorsmaster.debtorno <='" . $_POST['ToCust'] ."' - ORDER BY debtorsmaster.debtorno"; + debtorsmaster.name, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + debtorsmaster.address5, + debtorsmaster.address6, + debtorsmaster.lastpaid, + debtorsmaster.lastpaiddate, + currencies.currency, + paymentterms.terms + FROM debtorsmaster INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + INNER JOIN paymentterms + ON debtorsmaster.paymentterms=paymentterms.termsindicator + WHERE debtorsmaster.debtorno >='" . $_POST['FromCust'] ."' + AND debtorsmaster.debtorno <='" . $_POST['ToCust'] ."' + ORDER BY debtorsmaster.debtorno"; $StatementResults=DB_query($sql,$db, $ErrMsg); if (DB_Num_Rows($StatementResults) == 0){ @@ -99,16 +94,16 @@ /*now get all the outstanding transaction ie Settled=0 */ $ErrMsg = _('There was a problem retrieving the outstanding transactions for') . ' ' . $StmtHeader['name'] . ' '. _('from the database') . '.'; $sql = "SELECT systypes.typename, - debtortrans.transno, - debtortrans.trandate, - debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debtortrans.ovgst as total, - debtortrans.alloc, - debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debtortrans.ovgst-debtortrans.alloc as ostdg - FROM debtortrans INNER JOIN systypes - ON debtortrans.type=systypes.typeid - WHERE debtortrans.debtorno='" . $StmtHeader['debtorno'] . "' - AND debtortrans.settled=0 - ORDER BY debtortrans.id"; + debtortrans.transno, + debtortrans.trandate, + debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debtortrans.ovgst as total, + debtortrans.alloc, + debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debtortrans.ovgst-debtortrans.alloc as ostdg + FROM debtortrans INNER JOIN systypes + ON debtortrans.type=systypes.typeid + WHERE debtortrans.debtorno='" . $StmtHeader['debtorno'] . "' + AND debtortrans.settled=0 + ORDER BY debtortrans.id"; $OstdgTrans=DB_query($sql,$db, $ErrMsg); @@ -118,22 +113,22 @@ $ErrMsg = _('There was a problem retrieving the transactions that were settled over the course of the last month for'). ' ' . $StmtHeader['name'] . ' ' . _('from the database'); if ($_SESSION['Show_Settled_LastMonth']==1){ $sql = "SELECT DISTINCT debtortrans.id, - systypes.typename, - debtortrans.transno, - debtortrans.trandate, - debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debtortrans.ovgst AS total, - debtortrans.alloc, - debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debtortrans.ovgst-debtortrans.alloc AS ostdg - FROM debtortrans INNER JOIN systypes - ON debtortrans.type=systypes.typeid - INNER JOIN custallocns - ON (debtortrans.id=custallocns.transid_allocfrom - OR debtortrans.id=custallocns.transid_allocto) - WHERE custallocns.datealloc >='" . - Date('Y-m-d',Mktime(0,0,0,Date('m')-1,Date('d'),Date('y'))) . "' - AND debtortrans.debtorno='" . $StmtHeader['debtorno'] . "' - AND debtortrans.settled=1 - ORDER BY debtortrans.id"; + systypes.typename, + debtortrans.transno, + debtortrans.trandate, + debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debtortrans.ovgst AS total, + debtortrans.alloc, + debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debtortrans.ovgst-debtortrans.alloc AS ostdg + FROM debtortrans INNER JOIN systypes + ON debtortrans.type=systypes.typeid + INNER JOIN custallocns + ON (debtortrans.id=custallocns.transid_allocfrom + OR debtortrans.id=custallocns.transid_allocto) + WHERE custallocns.datealloc >='" . + Date('Y-m-d',Mktime(0,0,0,Date('m')-1,Date('d'),Date('y'))) . "' + AND debtortrans.debtorno='" . $StmtHeader['debtorno'] . "' + AND debtortrans.settled=1 + ORDER BY debtortrans.id"; $SetldTrans=DB_query($sql,$db, $ErrMsg); $NumberOfRecordsReturned += DB_num_rows($SetldTrans); @@ -273,72 +268,72 @@ /*Now figure out the aged analysis for the customer under review */ $SQL = "SELECT debtorsmaster.name, - currencies.currency, - paymentterms.terms, - debtorsmaster.creditlimit, - holdreasons.dissallowinvoices, - holdreasons.reasondescription, - SUM(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + - debtortrans.ovdiscount - debtortrans.alloc) AS balance, - SUM(CASE WHEN paymentterms.daysbeforedue > 0 THEN - CASE WHEN (TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate)) >= - paymentterms.daysbeforedue - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + - debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - ELSE - CASE WHEN TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . interval('1', 'MONTH') . "), " . interval('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') . ")) >= 0 - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + - debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - END) AS due, - Sum(CASE WHEN paymentterms.daysbeforedue > 0 THEN - CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue - AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= - (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + - debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - ELSE - CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . interval('1','MONTH') . "), " . interval('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') .")) >= " . $_SESSION['PastDueDays1'] . ") - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + - debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - END) AS overdue1, - Sum(CASE WHEN paymentterms.daysbeforedue > 0 THEN - CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue - AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + - " . $_SESSION['PastDueDays2'] . ") - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + - debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - ELSE - CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . interval('1','MONTH') . "), " . - interval('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') . ")) - >= " . $_SESSION['PastDueDays2'] . ") - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + - debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - END) AS overdue2 - FROM debtorsmaster INNER JOIN paymentterms - ON debtorsmaster.paymentterms = paymentterms.termsindicator - INNER JOIN currencies - ON debtorsmaster.currcode = currencies.currabrev - INNER JOIN holdreasons - ON debtorsmaster.holdreason = holdreasons.reasoncode - INNER JOIN debtortrans - ON debtorsmaster.debtorno = debtortrans.debtorno - WHERE - debtorsmaster.debtorno = '" . $StmtHeader['debtorno'] . "' - GROUP BY - debtorsmaster.name, - currencies.currency, - paymentterms.terms, - paymentterms.daysbeforedue, - paymentterms.dayinfollowingmonth, - debtorsmaster.creditlimit, - holdreasons.dissallowinvoices, - holdreasons.reasondescription"; + currencies.currency, + paymentterms.terms, + debtorsmaster.creditlimit, + holdreasons.dissallowinvoices, + holdreasons.reasondescription, + SUM(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + + debtortrans.ovdiscount - debtortrans.alloc) AS balance, + SUM(CASE WHEN paymentterms.daysbeforedue > 0 THEN + CASE WHEN (TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate)) >= + paymentterms.daysbeforedue + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + ELSE + CASE WHEN TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . interval('1', 'MONTH') . "), " . interval('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') . ")) >= 0 + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + END) AS due, + Sum(CASE WHEN paymentterms.daysbeforedue > 0 THEN + CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue + AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= + (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + ELSE + CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . interval('1','MONTH') . "), " . interval('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') .")) >= " . $_SESSION['PastDueDays1'] . ") + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + END) AS overdue1, + Sum(CASE WHEN paymentterms.daysbeforedue > 0 THEN + CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue + AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + + " . $_SESSION['PastDueDays2'] . ") + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + ELSE + CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . interval('1','MONTH') . "), " . + interval('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') . ")) + >= " . $_SESSION['PastDueDays2'] . ") + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + END) AS overdue2 + FROM debtorsmaster INNER JOIN paymentterms + ON debtorsmaster.paymentterms = paymentterms.termsindicator + INNER JOIN currencies + ON debtorsmaster.currcode = currencies.currabrev + INNER JOIN holdreasons + ON debtorsmaster.holdreason = holdreasons.reasoncode + INNER JOIN debtortrans + ON debtorsmaster.debtorno = debtortrans.debtorno + WHERE + debtorsmaster.debtorno = '" . $StmtHeader['debtorno'] . "' + GROUP BY + debtorsmaster.name, + currencies.currency, + paymentterms.terms, + paymentterms.daysbeforedue, + paymentterms.dayinfollowingmonth, + debtorsmaster.creditlimit, + holdreasons.dissallowinvoices, + holdreasons.reasondescription"; $ErrMsg = 'The customer detail... [truncated message content] |
From: <dai...@us...> - 2011-07-03 03:01:47
|
Revision: 4619 http://web-erp.svn.sourceforge.net/web-erp/?rev=4619&view=rev Author: daintree Date: 2011-07-03 03:01:39 +0000 (Sun, 03 Jul 2011) Log Message: ----------- various Modified Paths: -------------- trunk/CustWhereAlloc.php trunk/DailyBankTransactions.php trunk/DailySalesInquiry.php trunk/DebtorsAtPeriodEnd.php trunk/DeliveryDetails.php trunk/DiscountCategories.php trunk/DiscountMatrix.php trunk/EDIMessageFormat.php trunk/EDIProcessOrders.php trunk/PDFDeliveryDifferences.php trunk/PDFQuotation.php trunk/PDFQuotationPortrait.php trunk/PDFStockCheckComparison.php trunk/PrintCheque.php trunk/PrintCustStatements.php trunk/WorkOrderCosting.php trunk/doc/Change.log Modified: trunk/CustWhereAlloc.php =================================================================== --- trunk/CustWhereAlloc.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/CustWhereAlloc.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -12,7 +12,8 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Customer Where Allocated'). '" alt="" />' . $title . '</p>'; -echo '<table class=selection cellpadding=2><tr>'; +echo '<table class="selection" cellpadding=2> + <tr>'; echo '<td>' . _('Type') . ':</td> <td><select tabindex=1 name="TransType"> '; @@ -36,7 +37,9 @@ echo '<td>'._('Transaction Number').':</td> <td><input tabindex=2 type="text" name="TransNo" maxlength=10 size=10 value="'. $_POST['TransNo'] . '"></td>'; -echo '</tr></table><br /> +echo '</tr> + </table> + <br /> <div class="centre"><input tabindex=3 type="submit" name="ShowResults" value="' . _('Show How Allocated') . '"></div>'; if (isset($_POST['ShowResults']) AND $_POST['TransNo']==''){ @@ -49,9 +52,9 @@ /*First off get the DebtorTransID of the transaction (invoice normally) selected */ $sql = "SELECT id, - ovamount+ovgst AS totamt - FROM debtortrans - WHERE type='" . $_POST['TransType'] . "' AND transno = '" . $_POST['TransNo']."'"; + ovamount+ovgst AS totamt + FROM debtortrans + WHERE type='" . $_POST['TransType'] . "' AND transno = '" . $_POST['TransNo']."'"; $result = DB_query($sql , $db); @@ -60,25 +63,26 @@ $AllocToID = $myrow['id']; $sql = "SELECT type, - transno, - trandate, - debtortrans.debtorno, - reference, - rate, - ovamount+ovgst+ovfreight+ovdiscount as totalamt, - custallocns.amt - FROM debtortrans - INNER JOIN custallocns ON debtortrans.id=custallocns.transid_allocfrom - WHERE custallocns.transid_allocto='". $AllocToID."'"; + transno, + trandate, + debtortrans.debtorno, + reference, + rate, + ovamount+ovgst+ovfreight+ovdiscount as totalamt, + custallocns.amt + FROM debtortrans + INNER JOIN custallocns + ON debtortrans.id=custallocns.transid_allocfrom + WHERE custallocns.transid_allocto='". $AllocToID."'"; $ErrMsg = _('The customer transactions for the selected criteria could not be retrieved because'); - $TransResult = DB_query($sql, $db, $ErrMsg); if (DB_num_rows($TransResult)==0){ prnMsg(_('There are no allocations made against this transaction'),'info'); } else { - echo '<br /><table cellpadding=2 class=selection>'; + echo '<br /> + <table cellpadding=2 class="selection">'; echo '<tr> <th colspan=6><div class="centre"><font size=3 color=blue><b>'._('Allocations made against invoice number') . ' ' . $_POST['TransNo'] . '<br />'._('Transaction Total').': '. number_format($myrow['totamt'],2) . '</font></b></div></th> @@ -91,7 +95,7 @@ <th>' . _('Ex Rate') . '</th> <th>' . _('Amount') . '</th> <th>' . _('Alloc') . '</th> - </tr>'; + </tr>'; echo $tableheader; $RowCounter = 1; Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DailyBankTransactions.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -30,7 +30,8 @@ <td><select name="BankAccount">'; if (DB_num_rows($AccountsResults)==0){ - echo '</select></td></tr></table><p>'; + echo '</select></td> + </tr></table>'; 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'); include('includes/footer.inc'); exit; @@ -41,9 +42,9 @@ $_POST['BankAccount']=$myrow['accountcode']; } if ($_POST['BankAccount']==$myrow['accountcode']){ - echo '<option selected value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode']; + echo '<option selected value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode'] . '</option>'; } else { - echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode']; + echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode'] . '</option>'; } } echo '</select></td></tr>'; @@ -95,9 +96,9 @@ } else { $BankDetailRow = DB_fetch_array($BankResult); echo '<table class=selection> - <tr> - <th colspan=7><font size=3 color=blue>' . _('Account Transactions For').' '.$BankDetailRow['bankaccountname'].' '._('Between').' '.$_POST['FromTransDate'] . ' ' . _('and') . ' ' . $_POST['ToTransDate'] . '</font></th> - </tr>'; + <tr> + <th colspan=7><font size=3 color=blue>' . _('Account Transactions For').' '.$BankDetailRow['bankaccountname'].' '._('Between').' '.$_POST['FromTransDate'] . ' ' . _('and') . ' ' . $_POST['ToTransDate'] . '</font></th> + </tr>'; echo '<tr> <th>' . ('Date') . '</th> <th>'._('Transaction type').'</th> Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DailySalesInquiry.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -52,7 +52,10 @@ } echo '</select></td>'; -echo '</tr></table><br /><div class="centre"><input tabindex=4 type=submit name="ShowResults" VALUE="' . _('Show Daily Sales For The Selected Month') . '">'; +echo '</tr> + </table> + <br /> + <div class="centre"><input tabindex=4 type=submit name="ShowResults" value="' . _('Show Daily Sales For The Selected Month') . '">'; echo '</form></div>'; echo '<br />'; /*Now get and display the sales data returned */ @@ -92,13 +95,14 @@ echo '<table cellpadding=2 class=selection>'; echo'<tr> - <th>' . _('Sunday') . '</th> - <th>' . _('Monday') . '</th> - <th>' . _('Tuesday') . '</th> - <th>' . _('Wednesday') . '</th> - <th>' . _('Thursday') . '</th> - <th>' . _('Friday') . '</th> - <th>' . _('Saturday') . '</th></tr>'; + <th>' . _('Sunday') . '</th> + <th>' . _('Monday') . '</th> + <th>' . _('Tuesday') . '</th> + <th>' . _('Wednesday') . '</th> + <th>' . _('Thursday') . '</th> + <th>' . _('Friday') . '</th> + <th>' . _('Saturday') . '</th> + </tr>'; $CumulativeTotalSales = 0; $CumulativeTotalCost = 0; Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DebtorsAtPeriodEnd.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -27,28 +27,29 @@ /*Now figure out the aged analysis for the customer range under review */ $SQL = "SELECT debtorsmaster.debtorno, - debtorsmaster.name, - currencies.currency, - SUM((debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc)/debtortrans.rate) AS balance, - SUM(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc) AS fxbalance, - SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' THEN - (debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount)/debtortrans.rate ELSE 0 END) AS afterdatetrans, - SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' - AND (debtortrans.type=11 OR debtortrans.type=12) THEN - debtortrans.diffonexch ELSE 0 END) AS afterdatediffonexch, - SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' THEN - debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount ELSE 0 END - ) AS fxafterdatetrans - FROM debtorsmaster, - currencies, - debtortrans - WHERE debtorsmaster.currcode = currencies.currabrev - AND debtorsmaster.debtorno = debtortrans.debtorno - AND debtorsmaster.debtorno >= '" . $_POST['FromCriteria'] . "' + debtorsmaster.name, + currencies.currency, + currencies.decimalplaces, + SUM((debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc)/debtortrans.rate) AS balance, + SUM(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc) AS fxbalance, + SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' THEN + (debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount)/debtortrans.rate ELSE 0 END) AS afterdatetrans, + SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' + AND (debtortrans.type=11 OR debtortrans.type=12) THEN + debtortrans.diffonexch ELSE 0 END) AS afterdatediffonexch, + SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' THEN + debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount ELSE 0 END + ) AS fxafterdatetrans + FROM debtorsmaster INNER JOIN currencies + ON debtorsmaster.currcode = currencies.currabrev + INNER JOIN debtortrans + ON debtorsmaster.debtorno = debtortrans.debtorno + WHERE debtorsmaster.debtorno >= '" . $_POST['FromCriteria'] . "' AND debtorsmaster.debtorno <= '" . $_POST['ToCriteria'] . "' GROUP BY debtorsmaster.debtorno, debtorsmaster.name, - currencies.currency"; + currencies.currency, + currencies.decimalplaces"; $CustomerResult = DB_query($SQL,$db,'','',false,false); @@ -84,8 +85,8 @@ if (abs($Balance)>0.009 OR ABS($FXBalance)>0.009) { - $DisplayBalance = number_format($DebtorBalances['balance'] - $DebtorBalances['afterdatetrans'],2); - $DisplayFXBalance = number_format($DebtorBalances['fxbalance'] - $DebtorBalances['fxafterdatetrans'],2); + $DisplayBalance = number_format($DebtorBalances['balance'] - $DebtorBalances['afterdatetrans'],$DebtorBalances['decimalplaces']); + $DisplayFXBalance = number_format($DebtorBalances['fxbalance'] - $DebtorBalances['fxafterdatetrans'],$DebtorBalances['decimalplaces']); $TotBal += $Balance; @@ -109,7 +110,7 @@ include('includes/PDFDebtorBalsPageHeader.inc'); } - $DisplayTotBalance = number_format($TotBal,2); + $DisplayTotBalance = number_format($TotBal,$_SESSION['CompanyRecord']['decimalplaces']); $LeftOvers = $pdf->addTextWrap(50,$YPos,160,$FontSize,_('Total balances'),'left'); $LeftOvers = $pdf->addTextWrap(220,$YPos,60,$FontSize,$DisplayTotBalance,'right'); Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DeliveryDetails.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -40,7 +40,7 @@ if (isset($_POST['ProcessOrder']) OR isset($_POST['MakeRecurringOrder'])) { /*need to check for input errors in any case before order processed */ - $_POST['Update']='Yes rerun the validation checks'; + $_POST['Update']='Yes rerun the validation checks'; //no need for gettext! /*store the old freight cost before it is recalculated to ensure that there has been no change - test for change after freight recalculated and get user to re-confirm if changed */ @@ -126,22 +126,22 @@ } } $sql = "SELECT custbranch.brname, - custbranch.braddress1, - custbranch.braddress2, - custbranch.braddress3, - custbranch.braddress4, - custbranch.braddress5, - custbranch.braddress6, - custbranch.phoneno, - custbranch.email, - custbranch.defaultlocation, - custbranch.defaultshipvia, - custbranch.deliverblind, - custbranch.specialinstructions, - custbranch.estdeliverydays - FROM custbranch - WHERE custbranch.branchcode='" . $_SESSION['Items'.$identifier]->Branch . "' - AND custbranch.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "'"; + custbranch.braddress1, + custbranch.braddress2, + custbranch.braddress3, + custbranch.braddress4, + custbranch.braddress5, + custbranch.braddress6, + custbranch.phoneno, + custbranch.email, + custbranch.defaultlocation, + custbranch.defaultshipvia, + custbranch.deliverblind, + custbranch.specialinstructions, + custbranch.estdeliverydays + FROM custbranch + WHERE custbranch.branchcode='" . $_SESSION['Items'.$identifier]->Branch . "' + AND custbranch.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "'"; $ErrMsg = _('The customer branch record of the customer selected') . ': ' . $_SESSION['Items'.$identifier]->CustomerName . ' ' . _('cannot be retrieved because'); $DbgMsg = _('SQL used to retrieve the branch details was') . ':'; @@ -256,7 +256,7 @@ if(isset($_POST['MakeRecurringOrder']) AND ! $InputErrors){ echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/RecurringSalesOrders.php?identifier='.$identifier . '&NewRecurringOrder=Yes">'; - prnMsg(_('You should automatically be forwarded to the entry of recurring order details page') . '. ' . _('If this does not happen') . '(' . _('if the browser does not support META Refresh') . ') ' ."<a href='" . $rootpath . '/RecurringOrders.php?identifier='.$identifier . "&NewRecurringOrder=Yes'>". _('click here') .'</a> '. _('to continue'),'info'); + prnMsg(_('You should automatically be forwarded to the entry of recurring order details page') . '. ' . _('If this does not happen') . '(' . _('if the browser does not support META Refresh') . ') ' . '<a href="' . $rootpath . '/RecurringOrders.php?identifier='.$identifier . '&NewRecurringOrder=Yes">'. _('click here') .'</a> '. _('to continue'),'info'); include('includes/footer.inc'); exit; } @@ -569,7 +569,7 @@ if ($_POST['Quotation']==0) { /*then its not a quotation its a real order */ - echo '<br /><table class=selection> + echo '<br /><table class="selection"> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td> <td>' . ' ' . '<a target="_blank" href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $OrderNo . '">'. _('Print packing slip') . ' (' . _('Preprinted stationery') . ')' .'</a></td> @@ -591,13 +591,13 @@ echo '<br /><table class=selection> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt=""></td> - <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotation.php?' . SID .'identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Landscape)') .'</a></td> + <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotation.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Landscape)') .'</a></td> </tr> </table>'; echo '<br /><table class=selection> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt=""></td> - <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotationPortrait.php?' . SID .'identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Portrait)') .'</a></td> + <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotationPortrait.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Portrait)') .'</a></td> </tr> </table>'; } @@ -639,7 +639,7 @@ $ErrMsg = _('Could not update the contract status'); $DbgMsg = _('The SQL that failed to update the contract status was'); $UpdContractResult=DB_query("UPDATE contracts SET status=2, - wo='" . $WONo . "' + wo='" . $WONo . "' WHERE orderno='" .$_SESSION['ExistingOrder'] . "'", $db,$ErrMsg,$DbgMsg,true); $ErrMsg = _('Could not insert the contract bill of materials'); $InsContractBOM = DB_query("INSERT INTO bom (parent, @@ -653,7 +653,7 @@ workcentreadded, '" . $_SESSION['Items'.$identifier]->Location ."', '" . Date('Y-m-d') . "', - '2037-12-31' + '2099-12-31' FROM contractbom WHERE contractref='" . $ContractRow['contractref'] . "'",$db,$ErrMsg,$DbgMsg); @@ -707,31 +707,30 @@ } //end test to see if the order was a contract quotation being changed to an order - $HeaderSQL = "UPDATE salesorders - SET debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "', - branchcode = '" . $_SESSION['Items'.$identifier]->Branch . "', - customerref = '". DB_escape_string($_SESSION['Items'.$identifier]->CustRef) ."', - comments = '". DB_escape_string($_SESSION['Items'.$identifier]->Comments) ."', - ordertype = '" . $_SESSION['Items'.$identifier]->DefaultSalesType . "', - shipvia = '" . $_POST['ShipVia'] . "', - deliverydate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->DeliveryDate)) . "', - quotedate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->QuoteDate)) . "', - confirmeddate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->ConfirmedDate)) . "', - deliverto = '" . DB_escape_string($_SESSION['Items'.$identifier]->DeliverTo) . "', - deladd1 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd1) . "', - deladd2 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd2) . "', - deladd3 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd3) . "', - deladd4 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd4) . "', - deladd5 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd5) . "', - deladd6 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd6) . "', - contactphone = '" . $_SESSION['Items'.$identifier]->PhoneNo . "', - contactemail = '" . $_SESSION['Items'.$identifier]->Email . "', - freightcost = '" . $_SESSION['Items'.$identifier]->FreightCost ."', - fromstkloc = '" . $_SESSION['Items'.$identifier]->Location ."', - printedpackingslip = '" . $_POST['ReprintPackingSlip'] . "', - quotation = '" . $_SESSION['Items'.$identifier]->Quotation . "', - deliverblind = '" . $_SESSION['Items'.$identifier]->DeliverBlind . "' - WHERE salesorders.orderno='" . $_SESSION['ExistingOrder'] ."'"; + $HeaderSQL = "UPDATE salesorders SET debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + branchcode = '" . $_SESSION['Items'.$identifier]->Branch . "', + customerref = '". DB_escape_string($_SESSION['Items'.$identifier]->CustRef) ."', + comments = '". DB_escape_string($_SESSION['Items'.$identifier]->Comments) ."', + ordertype = '" . $_SESSION['Items'.$identifier]->DefaultSalesType . "', + shipvia = '" . $_POST['ShipVia'] . "', + deliverydate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->DeliveryDate)) . "', + quotedate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->QuoteDate)) . "', + confirmeddate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->ConfirmedDate)) . "', + deliverto = '" . DB_escape_string($_SESSION['Items'.$identifier]->DeliverTo) . "', + deladd1 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd1) . "', + deladd2 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd2) . "', + deladd3 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd3) . "', + deladd4 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd4) . "', + deladd5 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd5) . "', + deladd6 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd6) . "', + contactphone = '" . $_SESSION['Items'.$identifier]->PhoneNo . "', + contactemail = '" . $_SESSION['Items'.$identifier]->Email . "', + freightcost = '" . $_SESSION['Items'.$identifier]->FreightCost ."', + fromstkloc = '" . $_SESSION['Items'.$identifier]->Location ."', + printedpackingslip = '" . $_POST['ReprintPackingSlip'] . "', + quotation = '" . $_SESSION['Items'.$identifier]->Quotation . "', + deliverblind = '" . $_SESSION['Items'.$identifier]->DeliverBlind . "' + WHERE salesorders.orderno='" . $_SESSION['ExistingOrder'] ."'"; $DbgMsg = _('The SQL that was used to update the order and failed was'); $ErrMsg = _('The order cannot be updated because'); Modified: trunk/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DiscountCategories.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -28,10 +28,10 @@ //first off validate inputs sensible $result = DB_query("SELECT stockid - FROM stockmaster - WHERE mbflag <>'K' - AND mbflag<>'D' - AND stockid='" . strtoupper($_POST['StockID']) . "'",$db); + FROM stockmaster + WHERE mbflag <>'K' + AND mbflag<>'D' + AND stockid='" . strtoupper($_POST['StockID']) . "'",$db); if (DB_num_rows($result)==0){ $InputError = 1; prnMsg(_('The stock item entered must be set up as either a manufactured or purchased or assembly item'),'warn'); @@ -59,8 +59,8 @@ echo '<br />'; } elseif (isset($_POST['SubmitCategory'])) { $sql="UPDATE stockmaster - SET discountcategory='".$_POST['DiscountCategory']."' - WHERE categoryid='".$_POST['stockcategory']."'"; + SET discountcategory='".$_POST['DiscountCategory']."' + WHERE categoryid='".$_POST['stockcategory']."'"; $result=DB_query($sql, $db); } @@ -85,7 +85,10 @@ } echo '</select></td>'; - echo '<td><input type="submit" name="select" value="'._('Select').'"></td></tr></table><br />'; + echo '<td><input type="submit" name="select" value="'._('Select').'"></td> + </tr> + </table> + <br />'; } echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; @@ -125,7 +128,8 @@ <td><input type="text" name="PartID" size=10 maxlength=10 value="' . $_POST['PartID'] . '"></td> <td>' . _('Partial description') . ':</td> <td><input type="text" name="PartDesc" size=10 value="' . $_POST['PartDesc'] .'" maxlength=10></td> - <td><input type="submit" name="search" value="' . _('Search') .'"></td></tr>'; + <td><input type="submit" name="search" value="' . _('Search') .'"></td> + </tr>'; echo '</table>'; @@ -212,7 +216,7 @@ printf('<td>%s</td> <td>%s - %s</td> - <td><a href="%s">'. _('Delete') .'</td> + <td><a href="%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this discount category?') . '\');">'. _('Delete') .'</td> </tr>', $myrow['discountcategory'], $myrow['stockid'], Modified: trunk/DiscountMatrix.php =================================================================== --- trunk/DiscountMatrix.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DiscountMatrix.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -136,23 +136,25 @@ echo '<div class="centre"><input tabindex=5 type="submit" name="submit" value="' . _('Enter Information') . '"></div><br />'; $sql = "SELECT sales_type, - salestype, - discountcategory, - quantitybreak, - discountrate - FROM discountmatrix INNER JOIN salestypes - ON discountmatrix.salestype=salestypes.typeabbrev - ORDER BY salestype, - discountcategory, - quantitybreak"; + salestype, + discountcategory, + quantitybreak, + discountrate + FROM discountmatrix INNER JOIN salestypes + ON discountmatrix.salestype=salestypes.typeabbrev + ORDER BY salestype, + discountcategory, + quantitybreak"; $result = DB_query($sql,$db); echo '<table class=selection>'; -echo '<tr><th>' . _('Sales Type') . '</th> +echo '<tr> + <th>' . _('Sales Type') . '</th> <th>' . _('Discount Category') . '</th> <th>' . _('Quantity Break') . '</th> - <th>' . _('Discount Rate') . ' %' . '</th></tr>'; + <th>' . _('Discount Rate') . ' %' . '</th> + </tr>'; $k=0; //row colour counter @@ -170,7 +172,7 @@ <td>%s</td> <td class="number">%s</td> <td class="number">%s</td> - <td><a href="%s">' . _('Delete') . '</td> + <td><a href="%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this discount matrix record?') . '\');">' . _('Delete') . '</td> </tr>', $myrow['sales_type'], $myrow['discountcategory'], Modified: trunk/EDIMessageFormat.php =================================================================== --- trunk/EDIMessageFormat.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/EDIMessageFormat.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -31,13 +31,13 @@ sequenceno, section, linetext) - SELECT '".$PartnerCode."', - 'INVOIC', - sequenceno, - section, - linetext - FROM edimessageformat - WHERE partnercode='DEFAULT' + SELECT '".$PartnerCode."', + 'INVOIC', + sequenceno, + section, + linetext + FROM edimessageformat + WHERE partnercode='DEFAULT' AND messagetype='INVOIC'"; $ErrMsg = _('There was an error inserting the default template invoice message records for') . ' ' . $PartnerCode . ' ' . _('because'); @@ -113,23 +113,23 @@ or deletion of the records*/ $sql = "SELECT id, - section, - sequenceno, - linetext - FROM edimessageformat - WHERE partnercode='" . $PartnerCode . "' - AND messagetype='" . $MessageType . "' - ORDER BY sequenceno"; + section, + sequenceno, + linetext + FROM edimessageformat + WHERE partnercode='" . $PartnerCode . "' + AND messagetype='" . $MessageType . "' + ORDER BY sequenceno"; $result = DB_query($sql,$db); echo '<table class=selection>'; echo '<tr><th colspan=5><font size=3>' . _('Definition of') . ' ' . $MessageType . ' ' . _('for') . ' ' . $PartnerCode.'</font></th></tr>'; $TableHeader = '<tr> - <th>' . _('Section') . '</th> - <th>' . _('Sequence') . '</th> - <th>' . _('Format String') . '</th> - </tr>'; + <th>' . _('Section') . '</th> + <th>' . _('Sequence') . '</th> + <th>' . _('Format String') . '</th> + </tr>'; echo $TableHeader; $k=0; //row colour counter @@ -145,18 +145,18 @@ printf('<td>%s</td> - <td class=number>%s</td> - <td>%s</td> - <td><a href="%s&SelectedMessageLine=%s">' . _('Edit') . '</a></td> - <td><a href="%s&delete=%s">' . _('Delete') . '</a></td> - </tr>', - $myrow[1], - $myrow[2], - $myrow[3], - $_SERVER['PHP_SELF'] . '?' . SID, - $myrow[0], - $_SERVER['PHP_SELF'] . '?' . SID, - $myrow[0]); + <td class=number>%s</td> + <td>%s</td> + <td><a href="%s&SelectedMessageLine=%s">' . _('Edit') . '</a></td> + <td><a href="%s&delete=%s">' . _('Delete') . '</a></td> + </tr>', + $myrow[1], + $myrow[2], + $myrow[3], + $_SERVER['PHP_SELF'] . '?' . SID, + $myrow[0], + $_SERVER['PHP_SELF'] . '?' . SID, + $myrow[0]); } //END WHILE LIST LOOP echo '</table><p>'; Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/EDIProcessOrders.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -1,10 +1,7 @@ <?php -/* $Revision: 1.20 $ */ /* $Id$*/ -//$PageSecurity =11; - include ('includes/session.inc'); $title = _('Process EDI Orders'); @@ -40,7 +37,7 @@ /*Read in the EANCOM Order Segments for the current seg group from the segments table */ -$sql = 'SELECT id, segtag, maxoccur, seggroup FROM edi_orders_segs'; +$sql = "SELECT id, segtag, maxoccur, seggroup FROM edi_orders_segs"; $OrderSeg = DB_query($sql,$db); $i=0; $Seg = array(); @@ -58,7 +55,7 @@ while (false !== ($OrderFile=readdir($dirhandle))){ /*there are files in the incoming orders dir */ $TryNextFile = False; - echo "<br />$OrderFile"; + echo '<br />' . $OrderFile; /*Counter that keeps track of the array pointer for the 1st seg in the current seg group */ $FirstSegInGrp =0; @@ -541,7 +538,7 @@ } else { $mail->setSubject(_('EDI Order Message') . ' ' . $Order->CustRef); - $EDICustServPerson ="'phil' <phil@localhost>"; + $EDICustServPerson = $_SESSION['PurchasingManagerEmail']; $Recipients = array($EDICustServPerson); } @@ -556,7 +553,6 @@ - } /*end of the loop around all the incoming order files in the incoming orders directory */ Modified: trunk/PDFDeliveryDifferences.php =================================================================== --- trunk/PDFDeliveryDifferences.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/PDFDeliveryDifferences.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -2,9 +2,6 @@ /* $Id$*/ -/* $Revision: 1.15 $ */ - -//$PageSecurity = 3; include ('includes/session.inc'); include('includes/SQL_CommonFunctions.inc'); @@ -27,42 +24,51 @@ echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' . _('Delivery Differences Report') . '</p>'; - echo "<form method='post' action='" . $_SERVER['PHP_SELF'] . '?' . sid . "'>"; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection><tr><td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . - ":</td><td><input type=text class=date alt='".$_SESSION['DefaultDateFormat']. - "' name='FromDate' maxlength=10 size=10 value='" . - Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . "'></td></tr>"; - echo '<tr><td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ":</td><td><input type=text class=date alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td></tr>"; + echo '<table class=selection> + <tr> + <td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . ':</td> + <td><input type=text class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . '"></td> + </tr>'; + echo '<tr> + <td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ':</td><td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + </tr>'; echo '<tr><td>' . _('Inventory Category') . '</td><td>'; $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; $result = DB_query($sql,$db); - echo "<select name='CategoryID'>"; - echo "<option selected value='All'>" . _('Over All Categories'); + echo '<select name="CategoryID">'; + echo '<option selected value="All">' . _('Over All Categories') . '</option>'; - while ($myrow=DB_fetch_array($result)){ - echo "<option value='" . $myrow['categoryid'] . "'>" . $myrow['categorydescription']; - } + while ($myrow=DB_fetch_array($result)){ + echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; + } - echo '</select></td></tr>'; - echo '<tr><td>' . _('Inventory Location') . ":</td><td><select name='Location'>"; - echo "<option selected value='All'>" . _('All Locations'); + echo '<tr><td>' . _('Inventory Location') . ':</td> + <td><select name="Location"> + <option selected value="All">' . _('All Locations') . '</option>'; - $result= DB_query('SELECT loccode, locationname FROM locations',$db); - while ($myrow=DB_fetch_array($result)){ - echo "<option value='" . $myrow['loccode'] . "'>" . $myrow['locationname']; - } + $result= DB_query("SELECT loccode, locationname FROM locations",$db); + while ($myrow=DB_fetch_array($result)){ + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } echo '</select></td></tr>'; - echo '<tr><td>' . _('Email the report off') . ":</td><td><select name='Email'>"; - echo "<option selected value='No'>" . _('No'); - echo "<option value='Yes'>" . _('Yes'); - echo "</select></td></tr></table><br /><div class='centre'><input type=submit name='Go' VALUE='" . _('Create PDF') . "'></div>"; + echo '<tr><td>' . _('Email the report off') . ':</td> + <td><select name="Email"> + <option selected value="No">' . _('No') . '</option> + <option value="Yes">' . _('Yes') . '</option> + </select> + </td> + </tr> + </table> + <br /> + <div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '"></div>'; if ($InputError==1){ prnMsg($msg,'error'); @@ -257,20 +263,8 @@ $YPos-=$line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,200,$FontSize,_('DIFOT') . ' ' . 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->stream(); -*/ $ReportFileName = $_SESSION['DatabaseName'] . '_DeliveryDifferences_' . date('Y-m-d').'.pdf'; -$pdf->OutputD($ReportFileName);//UldisN +$pdf->OutputD($ReportFileName); if ($_POST['Email']=='Yes'){ if (file_exists($_SESSION['reports_dir'] . '/'.$ReportFileName)){ Modified: trunk/PDFQuotation.php =================================================================== --- trunk/PDFQuotation.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/PDFQuotation.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -84,8 +84,8 @@ $FontSize=12; $PageNumber = 1; $line_height=15; -// $pdf->selectFont('./fonts/Helvetica.afm'); + /* Now ... Has the order got any line items still outstanding to be invoiced */ $ErrMsg = _('There was a problem retrieving the quotation line details for quotation Number') . ' ' . @@ -224,28 +224,16 @@ } /*end if there are line details to show on the quotation*/ -//$pdfcode = $pdf->output('PDFQuotation.pdf', 'I'); -//$len = mb_strlen($pdfcode); if ($ListCount == 0){ - $title = _('Print Quotation Error'); - include('includes/header.inc'); - echo '<p>'. _('There were no items on the quotation') . '. ' . _('The quotation cannot be printed'). - '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?' . SID . '&Quotation=Quotes_only">'. _('Print Another Quotation'). - '</a>' . '<br />'. '<a href="' . $rootpath . '/index.php?' . SID . '">' . _('Back to the menu') . '</a>'; - include('includes/footer.inc'); + $title = _('Print Quotation Error'); + include('includes/header.inc'); + echo '<p>'. _('There were no items on the quotation') . '. ' . _('The quotation cannot be printed'). + '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?' . SID . '&Quotation=Quotes_only">'. _('Print Another Quotation'). + '</a>' . '<br />'. '<a href="' . $rootpath . '/index.php?' . SID . '">' . _('Back to the menu') . '</a>'; + include('includes/footer.inc'); exit; } else { -/* - header('Content-type: application/pdf'); - header('Content-Length: ' . $len); - header('Content-Disposition: inline; filename=Quotation.pdf'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); -//echo 'here'; - $pdf->Output('PDFQuotation.pdf', 'I'); -*/ - $pdf->OutputI($_SESSION['DatabaseName'] . '_Quotation_' . date('Y-m-d') . '.pdf');//UldisN - $pdf->__destruct(); //UldisN + $pdf->OutputI($_SESSION['DatabaseName'] . '_Quotation_' . date('Y-m-d') . '.pdf'); + $pdf->__destruct(); } ?> \ No newline at end of file Modified: trunk/PDFQuotationPortrait.php =================================================================== --- trunk/PDFQuotationPortrait.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/PDFQuotationPortrait.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -2,7 +2,6 @@ /* $Id: PDFQuotationPortrait.php 4491 2011-02-15 06:31:08Z daintree $ */ - include('includes/session.inc'); include('includes/SQL_CommonFunctions.inc'); @@ -59,18 +58,17 @@ //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?'. SID .'&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><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'&Quotations=Quotes_Only">' . _('Outstanding Quotations') . '</a></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 */ @@ -85,7 +83,6 @@ $FontSize=12; $PageNumber = 1; $line_height=24; -// $pdf->selectFont('./fonts/Helvetica.afm'); /* Now ... Has the order got any line items still outstanding to be invoiced */ @@ -137,13 +134,19 @@ $TaxProv = $myrow['taxprovinceid']; $TaxCat = $myrow2['taxcatid']; $Branch = $myrow['branchcode']; - $sql3 = " select taxgrouptaxes.taxauthid from taxgrouptaxes INNER JOIN custbranch ON taxgrouptaxes.taxgroupid=custbranch.taxgroupid WHERE custbranch.branchcode='" .$Branch ."'"; + $sql3 = " SELECT taxgrouptaxes.taxauthid + FROM taxgrouptaxes INNER JOIN custbranch + ON taxgrouptaxes.taxgroupid=custbranch.taxgroupid + WHERE custbranch.branchcode='" .$Branch ."'"; $result3=DB_query($sql3,$db, $ErrMsg); while ($myrow3=DB_fetch_array($result3)){ $TaxAuth = $myrow3['taxauthid']; } - $sql4 = "SELECT * FROM taxauthrates WHERE dispatchtaxprovince='" .$TaxProv ."' AND taxcatid='" .$TaxCat ."' AND taxauthority='" .$TaxAuth ."'"; + $sql4 = "SELECT * FROM taxauthrates + WHERE dispatchtaxprovince='" .$TaxProv ."' + AND taxcatid='" .$TaxCat ."' + AND taxauthority='" .$TaxAuth ."'"; $result4=DB_query($sql4,$db, $ErrMsg); while ($myrow4=DB_fetch_array($result4)){ $TaxClass = 100 * $myrow4['taxrate']; @@ -162,9 +165,9 @@ $LeftOvers = $pdf->addTextWrap(120,$YPos,295,$FontSize,$myrow2['description']); $LeftOvers = $pdf->addTextWrap(180,$YPos,85,$FontSize,$DisplayQty,'right'); $LeftOvers = $pdf->addTextWrap(230,$YPos,85,$FontSize,$DisplayPrice,'right'); - if ($DisplayDiscount > 0){ - $LeftOvers = $pdf->addTextWrap(280,$YPos,85,$FontSize,$DisplayDiscount,'right'); - } + if ($DisplayDiscount > 0){ + $LeftOvers = $pdf->addTextWrap(280,$YPos,85,$FontSize,$DisplayDiscount,'right'); + } $LeftOvers = $pdf->addTextWrap(330,$YPos,85,$FontSize,$DisplayTaxClass,'right'); $LeftOvers = $pdf->addTextWrap(410,$YPos,85,$FontSize,$DisplayTaxAmount,'center'); $LeftOvers = $pdf->addTextWrap(460,$YPos,90,$FontSize,$DisplayTotal,'right'); @@ -185,12 +188,11 @@ } //end while there are line items to print out if ((mb_strlen($myrow['comments']) >200 AND $YPos-$line_height <= 75) - OR (mb_strlen($myrow['comments']) >1 AND $YPos-$line_height <= 62) - OR $YPos-$line_height <= 50){ - /* We reached the end of the page so finsih off the page and start a newy */ - $PageNumber++; - include ('includes/PDFQuotationPageHeader.inc'); - + OR (mb_strlen($myrow['comments']) >1 AND $YPos-$line_height <= 62) + OR $YPos-$line_height <= 50){ + /* We reached the end of the page so finsih off the page and start a newy */ + $PageNumber++; + include ('includes/PDFQuotationPageHeader.inc'); } //end if need a new page headed up $LeftOvers = $pdf->addTextWrap($XPos,$YPos-80,200,10,_('Notes:')); @@ -225,28 +227,16 @@ } /*end if there are line details to show on the quotation*/ -//$pdfcode = $pdf->output('PDFQuotation.pdf', 'I'); -//$len = mb_strlen($pdfcode); if ($ListCount == 0){ $title = _('Print Quotation Error'); include('includes/header.inc'); echo '<p>'. _('There were no items on the quotation') . '. ' . _('The quotation cannot be printed'). - '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?' . SID . '&Quotation=Quotes_only">'. _('Print Another Quotation'). - '</a>' . '<br />'. '<a href="' . $rootpath . '/index.php?' . SID . '">' . _('Back to the menu') . '</a>'; + '<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'); exit; } else { -/* - header('Content-type: application/pdf'); - header('Content-Length: ' . $len); - header('Content-Disposition: inline; filename=Quotation.pdf'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); -//echo 'here'; - $pdf->Output('PDFQuotation.pdf', 'I'); -*/ - $pdf->OutputI($_SESSION['DatabaseName'] . '_Quotation_' . date('Y-m-d') . '.pdf');//UldisN - $pdf->__destruct(); //UldisN + $pdf->OutputI($_SESSION['DatabaseName'] . '_Quotation_' . date('Y-m-d') . '.pdf'); + $pdf->__destruct(); } ?> Modified: trunk/PDFStockCheckComparison.php =================================================================== --- trunk/PDFStockCheckComparison.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/PDFStockCheckComparison.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -2,9 +2,6 @@ /* $Id$*/ -/* $Revision: 1.18 $ */ - -//$PageSecurity = 2; include('includes/session.inc'); If (isset($_POST['PrintPDF']) AND isset($_POST['ReportOrClose'])){ @@ -254,7 +251,11 @@ $LeftOvers = $pdf->addTextWrap(135,$YPos,180,$FontSize,$CheckItemRow['description'], 'left'); $LeftOvers = $pdf->addTextWrap(315,$YPos,60,$FontSize,$CheckItemRow['qoh'], 'right'); - $SQL = "SELECT qtycounted, reference FROM stockcounts WHERE loccode ='" . $Location . "' AND stockid = '" . $CheckItemRow['stockid'] . "'"; + $SQL = "SELECT qtycounted, + reference + FROM stockcounts + WHERE loccode ='" . $Location . "' + AND stockid = '" . $CheckItemRow['stockid'] . "'"; $Counts = DB_query($SQL,$db,'','',false,false); @@ -306,33 +307,10 @@ } /*end STOCK comparison while loop */ $YPos -= (2*$line_height); -/* - $pdfcode = $pdf->output(); - $len = mb_strlen($pdfcode); - if ($len<=20){ - $title = _('Print Stock check comparison Error'); - include('includes/header.inc'); - echo '<p>'; - prnMsg( _('There were no Inventory Comparison sheets to print out'), 'error'); - echo '<br /><a href="' . $rootpath . '/index.php?' . SID . '">' . _('Back to the menu') . '</a>'; - include('includes/footer.inc'); - exit; - } else { - header('Content-type: application/pdf'); - header('Content-Length: ' . $len); - header('Content-Disposition: inline; filename=StockComparison.pdf'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); + $pdf->OutputD($_SESSION['DatabaseName'] . '_StockComparison_' . date('Y-m-d') . '.pdf'); + $pdf->__destruct(); - $pdf->Output('StockCheckComparison.pdf', 'I'); - - } -*/ - $pdf->OutputD($_SESSION['DatabaseName'] . '_StockComparison_' . date('Y-m-d') . '.pdf');//UldisN - $pdf->__destruct(); //UldisN - if ($_POST['ReportOrClose']=='ReportAndClose'){ //need to print the report first before this but don't risk re-adjusting all the stock!! $sql = "TRUNCATE TABLE stockcheckfreeze"; Modified: trunk/PrintCheque.php =================================================================== --- trunk/PrintCheque.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/PrintCheque.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -2,10 +2,6 @@ /* $Id$*/ -/* $Revision: 1.5 $ */ - -//$PageSecurity = 5; - include('includes/DefinePaymentClass.php'); include('includes/session.inc'); include('Numbers/Words.php'); @@ -58,8 +54,6 @@ $LeftOvers = $pdf->addTextWrap(375,$YPos,100,$FontSize, number_format($_SESSION['PaymentDetail']->Amount,2), 'right'); - - // remittance advice 1 $YPos -= 14*$line_height; $LeftOvers = $pdf->addTextWrap(0,$YPos,$Page_Width,$FontSize,_('Remittance Advice'), 'center'); @@ -87,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,number_format(round($_SESSION['PaymentDetail']->Amount,2),2), '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->__destruct(); //UldisN -?> +$pdf->OutputD($_SESSION['DatabaseName'] . '_Cheque_' . date('Y-m-d') . '_ChequeNum_' . $_GET['ChequeNum'] . '.pdf'); +$pdf->__destruct(); +?> \ No newline at end of file Modified: trunk/PrintCustStatements.php =================================================================== --- trunk/PrintCustStatements.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/PrintCustStatements.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -2,10 +2,6 @@ /* $Id$*/ -/* $Revision: 1.19 $ */ - -//$PageSecurity = 2; - include('includes/session.inc'); include('includes/SQL_CommonFunctions.inc'); @@ -15,6 +11,7 @@ if (isset($_POST['PrintPDF'])) { $PaperSize='A4_Landscape'; } + if (isset($_GET['PrintPDF'])) { $FromCust = $_GET['FromCust']; $ToCust = $_GET['ToCust']; @@ -25,18 +22,16 @@ $PaperSize='A4_Landscape'; } - - if (isset($_GET['FromCust'])) { $getFrom = $_GET['FromCust']; $_POST['FromCust'] = $getFrom; } + if (isset($_GET['ToCust'])) { $getTo = $_GET['ToCust']; $_POST['ToCust'] = $getTo; } - If (isset($_POST['PrintPDF']) && isset($_POST['FromCust']) && $_POST['FromCust']!=''){ $_POST['FromCust'] = strtoupper($_POST['FromCust']); @@ -57,30 +52,30 @@ $ErrMsg = _('There was a problem settling the old transactions.'); $DbgMsg = _('The SQL used to settle outstanding transactions was'); $sql = "UPDATE debtortrans SET settled=1 - WHERE ABS(debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debtortrans.ovgst-debtortrans.alloc)<0.009"; + WHERE ABS(debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debtortrans.ovgst-debtortrans.alloc)<0.009"; $SettleAsNec = DB_query($sql,$db, $ErrMsg, $DbgMsg); /*Figure out who all the customers in this range are */ $ErrMsg= _('There was a problem retrieving the customer information for the statements from the database'); $sql = "SELECT debtorsmaster.debtorno, - debtorsmaster.name, - debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, - debtorsmaster.address5, - debtorsmaster.address6, - debtorsmaster.lastpaid, - debtorsmaster.lastpaiddate, - currencies.currency, - paymentterms.terms - FROM debtorsmaster INNER JOIN currencies - ON debtorsmaster.currcode=currencies.currabrev - INNER JOIN paymentterms - ON debtorsmaster.paymentterms=paymentterms.termsindicator - WHERE debtorsmaster.debtorno >='" . $_POST['FromCust'] ."' - AND debtorsmaster.debtorno <='" . $_POST['ToCust'] ."' - ORDER BY debtorsmaster.debtorno"; + debtorsmaster.name, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + debtorsmaster.address5, + debtorsmaster.address6, + debtorsmaster.lastpaid, + debtorsmaster.lastpaiddate, + currencies.currency, + paymentterms.terms + FROM debtorsmaster INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + INNER JOIN paymentterms + ON debtorsmaster.paymentterms=paymentterms.termsindicator + WHERE debtorsmaster.debtorno >='" . $_POST['FromCust'] ."' + AND debtorsmaster.debtorno <='" . $_POST['ToCust'] ."' + ORDER BY debtorsmaster.debtorno"; $StatementResults=DB_query($sql,$db, $ErrMsg); if (DB_Num_Rows($StatementResults) == 0){ @@ -99,16 +94,16 @@ /*now get all the outstanding transaction ie Settled=0 */ $ErrMsg = _('There was a problem retrieving the outstanding transactions for') . ' ' . $StmtHeader['name'] . ' '. _('from the database') . '.'; $sql = "SELECT systypes.typename, - debtortrans.transno, - debtortrans.trandate, - debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debtortrans.ovgst as total, - debtortrans.alloc, - debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debtortrans.ovgst-debtortrans.alloc as ostdg - FROM debtortrans INNER JOIN systypes - ON debtortrans.type=systypes.typeid - WHERE debtortrans.debtorno='" . $StmtHeader['debtorno'] . "' - AND debtortrans.settled=0 - ORDER BY debtortrans.id"; + debtortrans.transno, + debtortrans.trandate, + debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debtortrans.ovgst as total, + debtortrans.alloc, + debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debtortrans.ovgst-debtortrans.alloc as ostdg + FROM debtortrans INNER JOIN systypes + ON debtortrans.type=systypes.typeid + WHERE debtortrans.debtorno='" . $StmtHeader['debtorno'] . "' + AND debtortrans.settled=0 + ORDER BY debtortrans.id"; $OstdgTrans=DB_query($sql,$db, $ErrMsg); @@ -118,22 +113,22 @@ $ErrMsg = _('There was a problem retrieving the transactions that were settled over the course of the last month for'). ' ' . $StmtHeader['name'] . ' ' . _('from the database'); if ($_SESSION['Show_Settled_LastMonth']==1){ $sql = "SELECT DISTINCT debtortrans.id, - systypes.typename, - debtortrans.transno, - debtortrans.trandate, - debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debtortrans.ovgst AS total, - debtortrans.alloc, - debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debtortrans.ovgst-debtortrans.alloc AS ostdg - FROM debtortrans INNER JOIN systypes - ON debtortrans.type=systypes.typeid - INNER JOIN custallocns - ON (debtortrans.id=custallocns.transid_allocfrom - OR debtortrans.id=custallocns.transid_allocto) - WHERE custallocns.datealloc >='" . - Date('Y-m-d',Mktime(0,0,0,Date('m')-1,Date('d'),Date('y'))) . "' - AND debtortrans.debtorno='" . $StmtHeader['debtorno'] . "' - AND debtortrans.settled=1 - ORDER BY debtortrans.id"; + systypes.typename, + debtortrans.transno, + debtortrans.trandate, + debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debtortrans.ovgst AS total, + debtortrans.alloc, + debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debtortrans.ovgst-debtortrans.alloc AS ostdg + FROM debtortrans INNER JOIN systypes + ON debtortrans.type=systypes.typeid + INNER JOIN custallocns + ON (debtortrans.id=custallocns.transid_allocfrom + OR debtortrans.id=custallocns.transid_allocto) + WHERE custallocns.datealloc >='" . + Date('Y-m-d',Mktime(0,0,0,Date('m')-1,Date('d'),Date('y'))) . "' + AND debtortrans.debtorno='" . $StmtHeader['debtorno'] . "' + AND debtortrans.settled=1 + ORDER BY debtortrans.id"; $SetldTrans=DB_query($sql,$db, $ErrMsg); $NumberOfRecordsReturned += DB_num_rows($SetldTrans); @@ -273,72 +268,72 @@ /*Now figure out the aged analysis for the customer under review */ $SQL = "SELECT debtorsmaster.name, - currencies.currency, - paymentterms.terms, - debtorsmaster.creditlimit, - holdreasons.dissallowinvoices, - holdreasons.reasondescription, - SUM(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + - debtortrans.ovdiscount - debtortrans.alloc) AS balance, - SUM(CASE WHEN paymentterms.daysbeforedue > 0 THEN - CASE WHEN (TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate)) >= - paymentterms.daysbeforedue - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + - debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - ELSE - CASE WHEN TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . interval('1', 'MONTH') . "), " . interval('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') . ")) >= 0 - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + - debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - END) AS due, - Sum(CASE WHEN paymentterms.daysbeforedue > 0 THEN - CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue - AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= - (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + - debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - ELSE - CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . interval('1','MONTH') . "), " . interval('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') .")) >= " . $_SESSION['PastDueDays1'] . ") - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + - debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - END) AS overdue1, - Sum(CASE WHEN paymentterms.daysbeforedue > 0 THEN - CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue - AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + - " . $_SESSION['PastDueDays2'] . ") - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + - debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - ELSE - CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . interval('1','MONTH') . "), " . - interval('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') . ")) - >= " . $_SESSION['PastDueDays2'] . ") - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + - debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - END) AS overdue2 - FROM debtorsmaster INNER JOIN paymentterms - ON debtorsmaster.paymentterms = paymentterms.termsindicator - INNER JOIN currencies - ON debtorsmaster.currcode = currencies.currabrev - INNER JOIN holdreasons - ON debtorsmaster.holdreason = holdreasons.reasoncode - INNER JOIN debtortrans - ON debtorsmaster.debtorno = debtortrans.debtorno - WHERE - debtorsmaster.debtorno = '" . $StmtHeader['debtorno'] . "' - GROUP BY - debtorsmaster.name, - currencies.currency, - paymentterms.terms, - paymentterms.daysbeforedue, - paymentterms.dayinfollowingmonth, - debtorsmaster.creditlimit, - holdreasons.dissallowinvoices, - holdreasons.reasondescription"; + currencies.currency, + paymentterms.terms, + debtorsmaster.creditlimit, + holdreasons.dissallowinvoices, + holdreasons.reasondescription, + SUM(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + + debtortrans.ovdiscount - debtortrans.alloc) AS balance, + SUM(CASE WHEN paymentterms.daysbeforedue > 0 THEN + CASE WHEN (TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate)) >= + paymentterms.daysbeforedue + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + ELSE + CASE WHEN TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . interval('1', 'MONTH') . "), " . interval('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') . ")) >= 0 + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + END) AS due, + Sum(CASE WHEN paymentterms.daysbeforedue > 0 THEN + CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue + AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= + (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + ELSE + CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . interval('1','MONTH') . "), " . interval('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') .")) >= " . $_SESSION['PastDueDays1'] . ") + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + END) AS overdue1, + Sum(CASE WHEN paymentterms.daysbeforedue > 0 THEN + CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue + AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + + " . $_SESSION['PastDueDays2'] . ") + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + ELSE + CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . interval('1','MONTH') . "), " . + interval('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') . ")) + >= " . $_SESSION['PastDueDays2'] . ") + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + END) AS overdue2 + FROM debtorsmaster INNER JOIN paymentterms + ON debtorsmaster.paymentterms = paymentterms.termsindicator + INNER JOIN currencies + ON debtorsmaster.currcode = currencies.currabrev + INNER JOIN holdreasons + ON debtorsmaster.holdreason = holdreasons.reasoncode + INNER JOIN debtortrans + ON debtorsmaster.debtorno = debtortrans.debtorno + WHERE + debtorsmaster.debtorno = '" . $StmtHeader['debtorno'] . "' + GROUP BY + debtorsmaster.name, + currencies.currency, + paymentterms.terms, + paymentterms.daysbeforedue, + paymentterms.dayinfollowingmonth, + debtorsmaster.creditlimit, + holdreasons.dissallowinvoices, + holdreasons.reasondescription"; $ErrMsg = 'The customer detail... [truncated message content] |
From: <dai...@us...> - 2011-07-02 23:05:11
|
Revision: 4618 http://web-erp.svn.sourceforge.net/web-erp/?rev=4618&view=rev Author: daintree Date: 2011-07-02 23:04:59 +0000 (Sat, 02 Jul 2011) Log Message: ----------- <br> replaced with <br /> Modified Paths: -------------- trunk/Areas.php trunk/BankMatching.php trunk/CustomerBranches.php trunk/CustomerReceipt.php trunk/DailyBankTransactions.php trunk/DailySalesInquiry.php trunk/EDIMessageFormat.php trunk/EDIProcessOrders.php trunk/EmailConfirmation.php trunk/EmailCustTrans.php trunk/FixedAssetLocations.php trunk/FixedAssetRegister.php trunk/FixedAssetTransfer.php trunk/FormDesigner.php trunk/GLAccountCSV.php trunk/GLAccountInquiry.php trunk/GLAccountReport.php trunk/GLAccounts.php trunk/GLBalanceSheet.php trunk/GLTagProfit_Loss.php trunk/GLTrialBalance.php trunk/GeocodeSetup.php trunk/GetStockImage.php trunk/GoodsReceivedControlled.php trunk/InventoryPlanningPrefSupplier.php trunk/Labels.php trunk/Locations.php trunk/MRPCalendar.php trunk/MRPDemandTypes.php trunk/MRPPlannedPurchaseOrders.php trunk/MailInventoryValuation.php trunk/Numbers/Words/lang.cs.php trunk/Numbers/Words/lang.lt.php trunk/OrderDetails.php trunk/PDFChequeListing.php trunk/PDFCustTransListing.php trunk/PDFCustomerList.php trunk/PDFDIFOT.php trunk/PDFDeliveryDifferences.php trunk/PDFGrn.php trunk/PDFPeriodStockTransListing.php trunk/PDFPriceList.php trunk/PDFPrintLabel.php trunk/PDFQuotation.php trunk/PDFQuotationPortrait.php trunk/PDFRemittanceAdvice.php trunk/PDFStockCheckComparison.php trunk/PDFStockLocTransfer.php trunk/PDFStockTransfer.php trunk/PDFSuppTransListing.php trunk/POReport.php trunk/PO_AuthorisationLevels.php trunk/PO_AuthoriseMyOrders.php trunk/PO_Chk_ShiptRef_JobRef.php trunk/PO_OrderDetails.php trunk/PO_SelectOSPurchOrder.php trunk/PO_SelectPurchOrder.php trunk/PaymentAllocations.php trunk/PaymentTerms.php trunk/PcExpenses.php trunk/PcTabs.php trunk/PricesByCost.php trunk/Prices_Customer.php trunk/PrintCustOrder.php trunk/PrintCustStatements.php trunk/PrintCustTrans.php trunk/RecurringSalesOrders.php trunk/ReorderLevel.php trunk/ReorderLevelLocation.php trunk/SMTPServer.php trunk/SalesAnalReptCols.php trunk/SalesByTypePeriodInquiry.php trunk/SalesCategoryPeriodInquiry.php trunk/SalesGraph.php trunk/SalesPeople.php trunk/SalesTopItemsInquiry.php trunk/SalesTypes.php trunk/SelectAsset.php trunk/SelectCreditItems.php trunk/SelectGLAccount.php trunk/SelectSalesOrder.php trunk/Shipments.php trunk/Shippers.php trunk/Shipt_Select.php trunk/StockAdjustments.php trunk/StockCostUpdate.php trunk/StockCounts.php trunk/StockDispatch.php trunk/StockLocMovements.php trunk/StockLocTransferReceive.php trunk/StockSerialItemResearch.php trunk/StockTransferControlled.php trunk/StockUsageGraph.php trunk/SuppContractChgs.php trunk/SuppFixedAssetChgs.php trunk/SuppLoginSetup.php trunk/SuppPaymentRun.php trunk/SuppPriceList.php trunk/SupplierContacts.php trunk/SupplierInvoice.php trunk/TaxAuthorities.php trunk/TaxAuthorityRates.php trunk/TaxCategories.php trunk/TaxProvinces.php trunk/WhereUsedInquiry.php trunk/WorkCentres.php trunk/WorkOrderCosting.php trunk/WorkOrderReceive.php trunk/WorkOrderStatus.php trunk/Z_BottomUpCosts.php trunk/Z_ChangeCustomerCode.php trunk/Z_ChangeStockCategory.php trunk/Z_CheckAllocs.php trunk/Z_DeleteInvoice.php trunk/Z_ImportChartOfAccounts.php trunk/Z_ImportGLAccountGroups.php trunk/Z_ImportGLAccountSections.php trunk/Z_ImportPartCodes.php trunk/Z_MakeNewCompany.php trunk/Z_ReverseSuppPaymentRun.php trunk/Z_UpdateChartDetailsBFwd.php trunk/Z_Upgrade3.10.php trunk/Z_Upgrade_3.10-3.11.php trunk/Z_Upgrade_3.11-4.00.php trunk/Z_index.php trunk/Z_poAddLanguage.php trunk/Z_poEditLangHeader.php trunk/Z_poEditLangModule.php trunk/Z_poEditLangRemaining.php trunk/Z_poRebuildDefault.php trunk/doc/Manual/ManualAPIFunctions.php trunk/geocode.php trunk/includes/DefineLabelClass.php trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsKeyed.php trunk/includes/InputSerialItemsSequential.php trunk/includes/OutputSerialItems.php trunk/includes/tcpdf/2dbarcodes.php trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/tcpdf.php trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/Manual/ManualARInquiries.html trunk/locale/de_DE.utf8/Manual/ManualARReports.html trunk/locale/de_DE.utf8/Manual/ManualARTransactions.html trunk/locale/de_DE.utf8/Manual/ManualAccountsPayable.html trunk/locale/de_DE.utf8/Manual/ManualAccountsReceivable.html trunk/locale/de_DE.utf8/Manual/ManualContents.php trunk/locale/de_DE.utf8/Manual/ManualContributors.html trunk/locale/de_DE.utf8/Manual/ManualCreatingNewSystem.html trunk/locale/de_DE.utf8/Manual/ManualCreditStatus.html trunk/locale/de_DE.utf8/Manual/ManualDevelopmentStructure.html trunk/locale/de_DE.utf8/Manual/ManualGeneralLedger.html trunk/locale/de_DE.utf8/Manual/ManualGettingStarted.html trunk/locale/de_DE.utf8/Manual/ManualHeader.html trunk/locale/de_DE.utf8/Manual/ManualIntroduction.html trunk/locale/de_DE.utf8/Manual/ManualInventory.html trunk/locale/de_DE.utf8/Manual/ManualManufacturing.html trunk/locale/de_DE.utf8/Manual/ManualMultilanguage.html trunk/locale/de_DE.utf8/Manual/ManualNewScripts.html trunk/locale/de_DE.utf8/Manual/ManualPaymentTerms.html trunk/locale/de_DE.utf8/Manual/ManualPrices.html trunk/locale/de_DE.utf8/Manual/ManualReportBuilder.html trunk/locale/de_DE.utf8/Manual/ManualRequirements.html trunk/locale/de_DE.utf8/Manual/ManualSalesAnalysis.html trunk/locale/de_DE.utf8/Manual/ManualSalesOrders.html trunk/locale/de_DE.utf8/Manual/ManualSalesPeople.html trunk/locale/de_DE.utf8/Manual/ManualSalesTypes.html trunk/locale/de_DE.utf8/Manual/ManualSecuritySchema.html trunk/locale/de_DE.utf8/Manual/ManualSecuritySchemaorig.html trunk/locale/de_DE.utf8/Manual/ManualShipments.html trunk/locale/de_DE.utf8/Manual/ManualSpecialUtilities.html trunk/locale/de_DE.utf8/Manual/ManualSystemConventions.html trunk/locale/de_DE.utf8/Manual/ManualTax.html trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages-P-Y.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/Manual/ManualAPIFunctions.php trunk/locale/zh_CN.utf8/Manual/ManualContents.php trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/Manual/ManualAPIFunctions.php trunk/locale/zh_HK.utf8/Manual/ManualContents.php trunk/reportwriter/FormMaker.php trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/RCFunctions.inc trunk/reportwriter/admin/forms/ReportsCritSetup.html trunk/reportwriter/admin/forms/ReportsImport.html trunk/reportwriter/admin/forms/TplFrmCBlk.html trunk/reportwriter/admin/forms/TplFrmCDta.html trunk/reportwriter/admin/forms/TplFrmData.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/TplFrmLine.html trunk/reportwriter/languages/en_US/reports.php trunk/sql/mysql/upgrade2.9-2.9a.sql trunk/sql/mysql/weberp-demo.sql Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/Areas.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -113,7 +113,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg( _('Cannot delete this area because customer branches have been created using this area'),'warn'); - echo '<br>' . _('There are') . ' ' . $myrow[0] . ' ' . _('branches using this area code'); + echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('branches using this area code'); } else { $sql= "SELECT COUNT(*) FROM salesanalysis WHERE salesanalysis.area ='$SelectedArea'"; @@ -122,7 +122,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg( _('Cannot delete this area because sales analysis records exist that use this area'),'warn'); - echo '<br>' . _('There are') . ' ' . $myrow[0] . ' ' . _('sales analysis records referring this area code'); + echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('sales analysis records referring this area code'); } } @@ -178,7 +178,7 @@ if (!isset($_GET['delete'])) { - echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '"><br>'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '"><br />'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedArea)) { Modified: trunk/BankMatching.php =================================================================== --- trunk/BankMatching.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/BankMatching.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -75,7 +75,7 @@ $_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 '<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 action="'. $_SERVER['PHP_SELF'] . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -136,7 +136,7 @@ echo '</select></td></tr>'; -echo '</table><br><div class="centre"><input tabindex="6" type=submit name="ShowTransactions" value="' . _('Show selected') . ' ' . $TypeName . '">'; +echo '</table><br /><div class="centre"><input tabindex="6" type=submit name="ShowTransactions" value="' . _('Show selected') . ' ' . $TypeName . '">'; echo '<p><a href="' . $rootpath . '/BankReconciliation.php">' . _('Show reconciliation') . '</a></div>'; echo '<hr />'; Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/CustomerBranches.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -534,7 +534,7 @@ if (isset($SelectedBranch)) { echo '<div class="centre"><a href=' . $_SERVER['PHP_SELF'] . '?DebtorNo=' . $DebtorNo. '>' . _('Show all branches defined for'). ' '. $DebtorNo . '</a></div>'; } - echo '<br><table class="selection">'; + echo '<br /><table class="selection">'; echo '<tr><th colspan=2><div class="centre"><b>'._('Change Branch').'</b></th></tr>'; echo '<tr><td>'._('Branch Code').':</td><td>'; Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/CustomerReceipt.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -571,7 +571,7 @@ if (DB_error_no($db) !=0) { prnMsg(_('The searched customer records requested cannot be retrieved because') . ' - ' . DB_error_msg($db),'error'); if ($debug==1){ - prnMsg(_('SQL used to retrieve the customer details was') . '<br>' . $sql,'error'); + prnMsg(_('SQL used to retrieve the customer details was') . '<br />' . $sql,'error'); } } elseif (DB_num_rows($CustomerSearchResult)==1){ $myrow=DB_fetch_array($CustomerSearchResult); @@ -723,7 +723,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Enter Receipt') . '" alt="">' . ' ' . _('Enter Customer Receipt') . '</p>'; echo '<div class="page_help_text">' . _('To enter a payment TO a customer (ie. to pay out a credit note), enter a negative payment amount.') . '</div>'; } -echo '<br><table class=selection><tr><td>' . _('Bank Account') . ':</td> +echo '<br /><table class=selection><tr><td>' . _('Bank Account') . ':</td> <td><select tabindex=1 name="BankAccount" onChange="ReloadForm(form1.BatchInput)">'; if (DB_num_rows($AccountsResults)==0){ @@ -895,7 +895,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . $_SESSION['CustomerRecord']['name'] . ' - (' . _('All amounts stated in') . ' ' . $_SESSION['CustomerRecord']['currency'] . ')' . _('Terms') . ': ' . $_SESSION['CustomerRecord']['terms'] . '<br/>' . _('Credit Limit') . ': ' . number_format($_SESSION['CustomerRecord']['creditlimit'],0) . ' ' . _('Credit Status') . ': ' . $_SESSION['CustomerRecord']['reasondescription']; if ($_SESSION['CustomerRecord']['dissallowinvoices']!=0){ - echo '<br><font color=red size=4><b>' . _('ACCOUNT ON HOLD') . '</font></b><br/>'; + echo '<br /><font color=red size=4><b>' . _('ACCOUNT ON HOLD') . '</font></b><br/>'; } echo '<table width="90%" class=selection> @@ -914,7 +914,7 @@ <td class=number>' . number_format(($_SESSION['CustomerRecord']['overdue1']-$_SESSION['CustomerRecord']['overdue2']) ,2) . '</td> <td class=number>' . number_format($_SESSION['CustomerRecord']['overdue2'],2) . '</td> </tr> - </table><br>'; + </table><br />'; echo '<table class="selection">'; @@ -1009,7 +1009,7 @@ echo '<td>' . _('Narrative') . ':</td>'; echo '<td><textarea name="Narrative" cols=40 rows=1></textarea></td>'; echo '</table>'; - echo '<br><div class="centre"><input tabindex=14 type="submit" name="Process" value="' . _('Accept') . '">'; + echo '<br /><div class="centre"><input tabindex=14 type="submit" name="Process" value="' . _('Accept') . '">'; echo '<input tabindex=14 type="submit" name="Cancel" value="' . _('Cancel') . '"></div>'; } elseif (isset($_SESSION['ReceiptBatch']) AND !isset($_POST['GLEntry'])){ @@ -1028,7 +1028,7 @@ echo '<td>' . _('Customer invoice number') . ':</td>'; echo '<td><input tabindex=11 type="text" name="CustInvNo" size=8 maxlength=8></td>'; echo '</tr></table>'; - echo '<div class="centre"><br>'; + echo '<div class="centre"><br />'; echo '<input tabindex=11 type=submit name="Search" value="' . _('Search Now') . '">'; echo '<br/><br/><input tabindex=12 type=submit name="GLEntry" value="' . _('Enter A GL Receipt') . '"><br /></div>'; Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/DailyBankTransactions.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -58,7 +58,7 @@ </tr>'; echo '</table>'; - echo '<br><div class="centre"><input type="submit" name="Show" value="' . _('Show transactions'). '"></div>'; + echo '<br /><div class="centre"><input type="submit" name="Show" value="' . _('Show transactions'). '"></div>'; echo '</form>'; } else { $SQL = "SELECT bankaccountname, @@ -133,7 +133,7 @@ echo '<form action="' . $_SERVER['PHP_SELF'] . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br><div class="centre"><input type="submit" name="Return" value="' . _('Select Another Date'). '"></div>'; + echo '<br /><div class="centre"><input type="submit" name="Return" value="' . _('Select Another Date'). '"></div>'; echo '</form>'; } include('includes/footer.inc'); Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/DailySalesInquiry.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -8,7 +8,7 @@ include('includes/DefineCartClass.php'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Daily Sales') . '" alt="" />' . ' ' . _('Daily Sales') . '</p>'; -echo '<div class="page_help_text">' . _('Select the month to show daily sales for') . '</div><br>'; +echo '<div class="page_help_text">' . _('Select the month to show daily sales for') . '</div><br />'; echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/EDIMessageFormat.php =================================================================== --- trunk/EDIMessageFormat.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/EDIMessageFormat.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -162,7 +162,7 @@ echo '</table><p>'; if (DB_num_rows($result)==0){ echo '<div class="centre"><input tabindex=1 type=submit name="NewEDIInvMsg" value="' . - _('Create New EDI Invoice Message From Default Template') . '"></div><br>'; + _('Create New EDI Invoice Message From Default Template') . '"></div><br />'; } } //end of ifs SelectedLine is not set @@ -240,7 +240,7 @@ echo '<td>'; echo '<input tabindex=4 type="Text" name="LineText" size=50 maxlength=50 VALUE='.$_POST['LineText'] .'>'; echo '</td></tr>'; -echo '</table><br>'; +echo '</table><br />'; if (isset($_GET['SelectedMessageLine'])) { echo '<div class="centre"><input tabindex=5 type="submit" name="update" value="'. _('Update Information'). '"></div>'; } else { Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/EDIProcessOrders.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -58,7 +58,7 @@ while (false !== ($OrderFile=readdir($dirhandle))){ /*there are files in the incoming orders dir */ $TryNextFile = False; - echo "<br>$OrderFile"; + echo "<br />$OrderFile"; /*Counter that keeps track of the array pointer for the 1st seg in the current seg group */ $FirstSegInGrp =0; @@ -79,7 +79,7 @@ while ($LineText = fgets($fp) AND $TryNextFile != True){ /* get each line of the order file */ $LineText = StripTrailingComma($LineText); - echo "<br>".$LineText; + echo "<br />".$LineText; if ($SegTag != substr($LineText,0,3)){ $SegCounter=1; @@ -87,7 +87,7 @@ } else { $SegCounter++; if ($SegCounter > $Seg[$SegID]['MaxOccur']){ - $EmailText = $EmailText . "\n" . _('The EANCOM Standard only allows for') . ' ' . $Seg[$SegID]['MaxOccur'] . ' ' ._('occurrences of the segment') . ' ' . $Seg[$SegID]['SegTag'] . ' ' . _('this is the') . ' ' . $SegCounter . ' ' . _('occurrence') . '<br>' . _('The segment line read as follows') . ':<br>' . $LineText; + $EmailText = $EmailText . "\n" . _('The EANCOM Standard only allows for') . ' ' . $Seg[$SegID]['MaxOccur'] . ' ' ._('occurrences of the segment') . ' ' . $Seg[$SegID]['SegTag'] . ' ' . _('this is the') . ' ' . $SegCounter . ' ' . _('occurrence') . '<br />' . _('The segment line read as follows') . ':<br />' . $LineText; } } @@ -114,12 +114,12 @@ if ($SegTag != $Seg[$SegID]['SegTag']){ - $EmailText .= "\n" . _('ERROR') . ': ' . _('Unable to identify segment tag') . ' ' . $SegTag . ' ' . _('from the message line') . '<br>' . $LineText . '<br><font color=RED><b>' . _('This message processing has been aborted and separate advice will be required from the customer to obtain details of the order') . '<b></font>'; + $EmailText .= "\n" . _('ERROR') . ': ' . _('Unable to identify segment tag') . ' ' . $SegTag . ' ' . _('from the message line') . '<br />' . $LineText . '<br /><font color=RED><b>' . _('This message processing has been aborted and separate advice will be required from the customer to obtain details of the order') . '<b></font>'; $TryNextFile = True; } - echo '<br>' . _('The segment tag') . ' ' . $SegTag . ' ' . _('is being processed'); + echo '<br />' . _('The segment tag') . ' ' . $SegTag . ' ' . _('is being processed'); switch ($SegTag){ case 'UNH': $UNH_elements = explode ('+',substr($LineText,4)); @@ -181,13 +181,13 @@ } /*end switch for type of order */ if (isset($BGM_elements[1])){ - echo '<br>echo BGM_elements[1] ' .$BGM_elements[1]; + echo '<br />echo BGM_elements[1] ' .$BGM_elements[1]; $BGM_C106 = explode(':',$BGM_elements[1]); $Order->CustRef = $BGM_C106[0]; $EmailText .= "\n" . _('Customers order ref') . ': ' . $BGM_C106[0]; } if (isset($BGM_elements[2])){ - echo "<br>echo BGM_elements[2] " .$BGM_elements[2]; + echo "<br />echo BGM_elements[2] " .$BGM_elements[2]; $BGM_1225 = explode(':',$BGM_elements[2]); $MsgFunction = $BGM_1225[0]; @@ -222,7 +222,7 @@ if (isset($BGM_1225[1])){ $ResponseCode = $BGM_1225[1]; - echo '<br>' . _('Response Code') . ': ' . $ResponseCode; + echo '<br />' . _('Response Code') . ': ' . $ResponseCode; switch ($ResponseCode) { case 'AC': $EmailText .= "\n" . _('Please acknowledge to customer with detail and changes made to the order'); Modified: trunk/EmailConfirmation.php =================================================================== --- trunk/EmailConfirmation.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/EmailConfirmation.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -9,12 +9,12 @@ If (!isset($_GET['TransNo']) OR $_GET['TransNo']==""){ $title = _('Select Order To Print'); include('includes/header.inc'); - echo '<div class="centre"><br><br><br>'; + 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"> + echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> <li><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li> <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br><br><br>'; + </td></tr></table></div><br /><br /><br />'; include('includes/footer.inc'); exit(); } @@ -65,12 +65,12 @@ if (DB_num_rows($result)==0){ $title = _('Print Packing Slip Error'); include('includes/header.inc'); - echo '<div class="centre"><br><br><br>'; + 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"> + echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> <li><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li> <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br><br><br>'; + </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! */ @@ -86,17 +86,17 @@ echo '<p>'; 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' ); + '<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?' . SID . '&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?' . SID . '&TransNo=' . $_GET['TransNo'] . '&Reprint=OK">'. _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed'). '</a>'; - echo '<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><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li> <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br><br><br>'; + </td></tr></table></div><br /><br /><br />'; include('includes/footer.inc'); exit; @@ -125,11 +125,11 @@ $_SESSION['CompanyRecord']['telephone'] . ' ' . _('Fax'). ': ' . $_SESSION['CompanyRecord']['fax'] . "</td></tr>"; $MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $_SESSION['CompanyRecord']['email'] . "<br><br><br></td></tr>"; + $_SESSION['CompanyRecord']['email'] . "<br /><br /><br /></td></tr>"; $MailMessage = $MailMessage . "<Table><tr><td align='center' colspan='4'> <h2> Order Acknowledgement</h2></td></tr>"; $MailMessage = $MailMessage . "<tr><td align='center' colspan='4'> <b>Order Number " . - $_GET['TransNo'] . "</b><br><br><br></td></tr>"; + $_GET['TransNo'] . "</b><br /><br /><br /></td></tr>"; $MailMessage = $MailMessage . "<tr><td colspan='4'> <b>Delivered To:</b></td></tr>"; $MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . $myrow['deliverto'] . "</td></tr>"; @@ -139,12 +139,12 @@ { $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd2'] . "</td></tr>"; $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . - ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5']. "<br><br><br></td></tr>"; + ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5']. "<br /><br /><br /></td></tr>"; } else { $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . ' ' . - $myrow['deladd4'] . ' ' . $myrow['deladd5'] . "<br><br><br></td></tr>"; + $myrow['deladd4'] . ' ' . $myrow['deladd5'] . "<br /><br /><br /></td></tr>"; } $MailMessage = $MailMessage . "</table><table border='1' width='50%'><tr>"; if($_REQUEST['POLine'] == 1){ @@ -205,7 +205,7 @@ } /*end if there are order details to show on the order*/ $MailMessage = $MailMessage . "</Table></body></html>"; -// echo $MailMessage . "=mailMessage<br>"; +// echo $MailMessage . "=mailMessage<br />"; IF(mail( $MailTo, $MailSubject, $MailMessage, $headers )){ echo " The following E-Mail was sent to $MailTo:"; } @@ -225,7 +225,7 @@ <td align='center' colspan='4'> <h2> Order Acknowledgement</h2></td> </tr> <tr> - <td align='center' colspan='4'> <b>Order Number <?=$_GET['TransNo']?> </b><br><br><br></td> + <td align='center' colspan='4'> <b>Order Number <?=$_GET['TransNo']?> </b><br /><br /><br /></td> </tr> <tr> <td colspan='2' nowrap width="50%"> <b><?=$_SESSION['CompanyRecord']['coyname']?></b></td> @@ -251,10 +251,10 @@ </tr> <tr> <td colspan='2' nowrap width="50%"> - <b><?=$_SESSION['CompanyRecord']['email']?><br><br><br> + <b><?=$_SESSION['CompanyRecord']['email']?><br /><br /><br /> </td> <td nowrap width="50%"> - <b><?=$myrow['deladd3']?> <?=$myrow['deladd4'] ?> <?=$myrow['deladd5']?><br><br><br> + <b><?=$myrow['deladd3']?> <?=$myrow['deladd4'] ?> <?=$myrow['deladd5']?><br /><br /><br /> </td> </tr> </table> Modified: trunk/EmailCustTrans.php =================================================================== --- trunk/EmailCustTrans.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/EmailCustTrans.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -64,7 +64,7 @@ <td><input type="text" name="EmailAddr" maxlength=60 size=60 value="' . $EmailAddress . '"></td> </table>'; -echo '<br><div class="centre"><input type=submit name="DoIt" value="' . _('OK') . '">'; +echo '<br /><div class="centre"><input type=submit name="DoIt" value="' . _('OK') . '">'; echo '</div></form>'; include ('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/FixedAssetLocations.php =================================================================== --- trunk/FixedAssetLocations.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/FixedAssetLocations.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -102,7 +102,7 @@ echo '<td><a href="'.$_SERVER['PHP_SELF'] . '?' . SID.'SelectedLocation='.$myrow['locationid'].'">' . _('Edit') . '</td>'; } -echo '</table><br>'; +echo '</table><br />'; echo '<form name="LocationForm" method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '"><table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><th style="text-align:left">'._('Location ID').'</th>'; @@ -133,7 +133,7 @@ echo '</select>'; echo '</td></tr>'; -echo '</table><br>'; +echo '</table><br />'; //Batman: ParentLocationID checking the location ID Modified: trunk/FixedAssetRegister.php =================================================================== --- trunk/FixedAssetRegister.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/FixedAssetRegister.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -76,7 +76,7 @@ echo '<form name="RegisterForm" method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '"><table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<div class="centre">' ._('From') . ':' . $_POST['FromDate'] . ' ' . _('to') . ' ' . $_POST['ToDate'] . '</div>'; - echo '<br><table width=80% cellspacing="1" class=selection><tr>'; + echo '<br /><table width=80% cellspacing="1" class=selection><tr>'; echo '<th>' . _('Asset ID') . '</th>'; echo '<th>' . _('Description') . '</th>'; echo '<th>' . _('Serial Number') . '</th>'; @@ -164,13 +164,13 @@ echo '<tr><td style="vertical-align:top">' . $myrow['assetid'] . '</td>'; echo '<td style="vertical-align:top">' . $myrow['longdescription'] . '</td>'; echo '<td style="vertical-align:top">' . $myrow['serialno'] . '</td>'; - echo '<td>' . $myrow['locationdescription'] . '<br>'; + echo '<td>' . $myrow['locationdescription'] . '<br />'; /* Not reworked yet * for ($i = 1;$i < sizeOf($Ancestors) - 1;$i++) { for ($j = 0;$j < $i;$j++) { echo ' '; } - echo '|_' . $Ancestors[$i] . '<br>'; + echo '|_' . $Ancestors[$i] . '<br />'; } */ echo '</td><td style="vertical-align:top">' . ConvertSQLDate($myrow['datepurchased']) . '</td>'; @@ -230,7 +230,7 @@ echo '<th style="text-align:right">' . number_format($TotalNBV, 2) . '</th>'; echo '<th style="text-align:right">' . number_format($TotalDisposals, 2) . '</th></tr>'; echo '</table>'; - echo '<br><div class="centre"><input type="Submit" name="pdf" value="' . _('Print as a pdf') . '"> '; + echo '<br /><div class="centre"><input type="Submit" name="pdf" value="' . _('Print as a pdf') . '"> '; echo '<input type="Submit" name="csv" value="' . _('Print as CSV') . '"></div></form>'; } } else { @@ -289,7 +289,7 @@ echo '<tr><th>' . _('To Date ') . "</th><td><input type='text' class='date' alt='" . $_SESSION['DefaultDateFormat'] . "' name='ToDate' maxlength=10 size=11 value='" . $_POST['ToDate'] . "'></td>"; echo '</tr>'; - echo '</table><br>'; + echo '</table><br />'; echo '<div class="centre"><input type="Submit" name="submit" value="' . _('Show Assets') . '"> '; echo '<input type="Submit" name="pdf" value="' . _('Print as a pdf') . '"> '; echo '<input type="Submit" name = "csv" value= "' . _('Print as CSV') . '"></div>'; Modified: trunk/FixedAssetTransfer.php =================================================================== --- trunk/FixedAssetTransfer.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/FixedAssetTransfer.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -67,9 +67,9 @@ echo '<input type="text" name="AssetID" size=15 maxlength=18>'; } - echo '</td></tr></table><br>'; + echo '</td></tr></table><br />'; - echo '<div class="centre"><input type=submit name="Search" value="'. _('Search Now') . '"></div></form><br>'; + echo '<div class="centre"><input type=submit name="Search" value="'. _('Search Now') . '"></div></form><br />'; } if (isset($_POST['Search'])) { Modified: trunk/FormDesigner.php =================================================================== --- trunk/FormDesigner.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/FormDesigner.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -154,7 +154,7 @@ $FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/'.$_POST['FormName']); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Form Design') . '" alt="">' . ' ' . _('Form Design').'<br />'. $FormDesign['name'] . ''; -echo '<div class="page_help_text">' . _('Enter the changes that you want in the form layout below.') .'<br /> '. _('All measurements are in millimetres') . '.</div><br>'; +echo '<div class="page_help_text">' . _('Enter the changes that you want in the form layout below.') .'<br /> '. _('All measurements are in millimetres') . '.</div><br />'; $Papers=array('A4_Landscape', 'A4_Portrait', 'A5_Landscape', 'A5_Portrait', 'A3_Landscape', 'A3_Portrait', 'letter_Portrait', 'letter_Landscape', 'legal_Portrait', 'legal_Landscape'); // Possible paper sizes/orientations echo '<form method="post" id="Form" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/GLAccountCSV.php =================================================================== --- trunk/GLAccountCSV.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/GLAccountCSV.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -16,7 +16,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('General Ledger Account Inquiry') . '" alt="" />' . ' ' . _('General Ledger Account Report') . '</p>'; -echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple accounts and periods') . '</div><br>'; +echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple accounts and periods') . '</div><br />'; echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -258,7 +258,7 @@ } /*end for each SelectedAccount */ fclose($fp); - echo '<p><a href="' . $FileName . '">' . _('click here') . '</a> ' . _('to view the file') . '<br>'; + echo '<p><a href="' . $FileName . '">' . _('click here') . '</a> ' . _('to view the file') . '<br />'; } /* end of if CreateCSV button hit */ include('includes/footer.inc'); Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/GLAccountInquiry.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -23,7 +23,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('General Ledger Account Inquiry') . '" alt="" />' . ' ' . _('General Ledger Account Inquiry') . '</p>'; -echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple periods') . '</div><br>'; +echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple periods') . '</div><br />'; echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -145,7 +145,7 @@ $ErrMsg = _('The transactions for account') . ' ' . $SelectedAccount . ' ' . _('could not be retrieved because') ; $TransResult = DB_query($sql,$db,$ErrMsg); - echo '<br><table class=selection>'; + echo '<br /><table class=selection>'; echo '<tr><th colspan=8><b>' ._('Transactions for account').' '.$SelectedAccount. ' - '. $SelectedAccountName.'</b></th></tr>'; $TableHeader = '<tr> @@ -233,7 +233,7 @@ <td colspan=2></td> </tr>'; } - $IntegrityReport .= '<br>' . _('Period') . ': ' . $PeriodNo . _('Account movement per transaction') . ': ' . number_format($PeriodTotal,2) . ' ' . _('Movement per ChartDetails record') . ': ' . number_format($ChartDetailRow['actual'],2) . ' ' . _('Period difference') . ': ' . number_format($PeriodTotal -$ChartDetailRow['actual'],3); + $IntegrityReport .= '<br />' . _('Period') . ': ' . $PeriodNo . _('Account movement per transaction') . ': ' . number_format($PeriodTotal,2) . ' ' . _('Movement per ChartDetails record') . ': ' . number_format($ChartDetailRow['actual'],2) . ' ' . _('Period difference') . ': ' . number_format($PeriodTotal -$ChartDetailRow['actual'],3); if (ABS($PeriodTotal -$ChartDetailRow['actual'])>0.01){ $ShowIntegrityReport = True; Modified: trunk/GLAccountReport.php =================================================================== --- trunk/GLAccountReport.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/GLAccountReport.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -226,7 +226,7 @@ $title = _('Print GL Accounts Report Error'); include('includes/header.inc'); prnMsg (_('There were no accounts to print out'),'error'); - echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; + echo "<br /><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; include('includes/footer.inc'); exit; } else { @@ -251,7 +251,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('General Ledger Account Inquiry') . '" alt="" />' . ' ' . _('General Ledger Account Report') . '</p>'; - echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple accounts and periods') . '</div><br>'; + echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple accounts and periods') . '</div><br />'; echo "<form method='POST' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/GLAccounts.php =================================================================== --- trunk/GLAccounts.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/GLAccounts.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -77,7 +77,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg(_('Cannot delete this account because chart details have been created using this account and at least one period has postings to it'),'warn'); - echo '<br>' . _('There are') . ' ' . $myrow[0] . ' ' . _('chart details that require this account code'); + echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('chart details that require this account code'); } else { // PREVENT DELETES IF DEPENDENT RECORDS IN 'GLTrans' @@ -91,7 +91,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg( _('Cannot delete this account because transactions have been created using this account'),'warn'); - echo '<br>' . _('There are') . ' ' . $myrow[0] . ' ' . _('transactions that require this account code'); + echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('transactions that require this account code'); } else { //PREVENT DELETES IF Company default accounts set up to this account @@ -255,7 +255,7 @@ echo '</select></td></tr></table>'; - echo '<br><div class="centre"><input type="Submit" name="submit" value="'. _('Enter Information') . '"></div>'; + echo '<br /><div class="centre"><input type="Submit" name="submit" value="'. _('Enter Information') . '"></div>'; echo '</form>'; @@ -281,7 +281,7 @@ $result = DB_query($sql,$db,$ErrMsg); - echo '<br><table class=selection>'; + echo '<br /><table class=selection>'; echo '<tr> <th>' . _('Account Code') . '</th> <th>' . _('Account Name') . '</th> Modified: trunk/GLBalanceSheet.php =================================================================== --- trunk/GLBalanceSheet.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/GLBalanceSheet.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -20,8 +20,8 @@ echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . _('Balance Sheet') . '</p></div>'; echo '<div class="page_help_text">' - . _('Balance Sheet (or statement of financial position) is a summary of balances. Assets, liabilities and ownership equity are listed as of a specific date, such as the end of its financial year. Of the four basic financial statements, the balance sheet is the only statement which applies to a single point in time.') . '<br>' - . _('The balance sheet has three parts: assets, liabilities and ownership equity. The main categories of assets are listed first and are followed by the liabilities. The difference between the assets and the liabilities is known as equity or the net assets or the net worth or capital of the company and according to the accounting equation, net worth must equal assets minus liabilities.') . '<br>' + . _('Balance Sheet (or statement of financial position) is a summary of balances. Assets, liabilities and ownership equity are listed as of a specific date, such as the end of its financial year. Of the four basic financial statements, the balance sheet is the only statement which applies to a single point in time.') . '<br />' + . _('The balance sheet has three parts: assets, liabilities and ownership equity. The main categories of assets are listed first and are followed by the liabilities. The difference between the assets and the liabilities is known as equity or the net assets or the net worth or capital of the company and according to the accounting equation, net worth must equal assets minus liabilities.') . '<br />' . _('webERP is an "accrual" based system (not a "cash based" system). Accrual systems include items when they are invoiced to the customer, and when expenses are owed based on the supplier invoice date.') . '</div>'; echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">'; @@ -54,8 +54,8 @@ echo '</table>'; - echo '<br><div class="centre"><input type=submit Name="ShowBalanceSheet" Value="'._('Show on Screen (HTML)').'"></div>'; - echo '<br><div class="centre"><input type=submit Name="PrintPDF" Value="'._('Produce PDF Report').'"></div>'; + echo '<br /><div class="centre"><input type=submit Name="ShowBalanceSheet" Value="'._('Show on Screen (HTML)').'"></div>'; + echo '<br /><div class="centre"><input type=submit Name="PrintPDF" Value="'._('Produce PDF Report').'"></div>'; /*Now do the posting while the user is thinking about the period to select */ include ('includes/GLPostings.inc'); @@ -90,9 +90,9 @@ $title = _('Balance Sheet') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The accumulated profits brought forward could not be calculated by the SQL because') . ' - ' . DB_error_msg($db) ); - echo '<br><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; if ($debug==1){ - echo '<br>'. $SQL; + echo '<br />'. $SQL; } include('includes/footer.inc'); exit; @@ -128,9 +128,9 @@ $title = _('Balance Sheet') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) ); - echo '<br><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; if ($debug==1){ - echo '<br>'. $SQL; + echo '<br />'. $SQL; } include('includes/footer.inc'); exit; @@ -291,7 +291,7 @@ $title = _('Print Balance Sheet Error'); include('includes/header.inc'); prnMsg( _('There were no entries to print out for the selections specified') ); - echo '<br><a href="'. $rootpath.'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="'. $rootpath.'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; include('includes/footer.inc'); exit; } else { @@ -658,7 +658,7 @@ </tr>'; echo '</table>'; - echo '<br><div class="centre"><input type=submit Name="SelectADifferentPeriod" Value="'._('Select A Different Balance Date').'"></div>'; + echo '<br /><div class="centre"><input type=submit Name="SelectADifferentPeriod" Value="'._('Select A Different Balance Date').'"></div>'; } echo '</form>'; Modified: trunk/GLTagProfit_Loss.php =================================================================== --- trunk/GLTagProfit_Loss.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/GLTagProfit_Loss.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -104,10 +104,10 @@ echo '<option selected VALUE="Detailed">'._('All Accounts') . '</option>'; echo '</select></td></tr>'; - echo '</table><br>'; + echo '</table><br />'; - echo "<div class='centre'><input type=submit Name='ShowPL' Value='"._('Show Statement of Income and Expenditure')."'><br>"; - echo "<br><input type=submit Name='PrintPDF' Value='"._('PrintPDF')."'></div>"; + echo "<div class='centre'><input type=submit Name='ShowPL' Value='"._('Show Statement of Income and Expenditure')."'><br />"; + echo "<br /><input type=submit Name='PrintPDF' Value='"._('PrintPDF')."'></div>"; /*Now do the posting while the user is thinking about the period to select */ @@ -172,9 +172,9 @@ $title = _('Income and Expenditure') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) ); - echo '<br><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; if ($debug == 1){ - echo '<br>'. $SQL; + echo '<br />'. $SQL; } include('includes/footer.inc'); exit; @@ -184,7 +184,7 @@ include('includes/header.inc'); echo '<p>'; prnMsg( _('There were no entries to print out for the selections specified'),'info'); - echo '<br><a href="'. $rootpath.'/index.php">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="'. $rootpath.'/index.php">'. _('Back to the menu'). '</a>'; include('includes/footer.inc'); exit; } Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/GLTrialBalance.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -92,7 +92,7 @@ echo '<option value ="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } - echo '</select></td></tr></table><br>'; + echo '</select></td></tr></table><br />'; echo '<div class="centre"><input type=submit Name="ShowTB" Value="' . _('Show Trial Balance') .'">'; echo '<input type=submit Name="PrintPDF" Value="'._('PrintPDF').'"></div>'; @@ -151,9 +151,9 @@ $title = _('Trial Balance') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) ); - echo '<br><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; if ($debug==1){ - echo '<br>'. $SQL; + echo '<br />'. $SQL; } include('includes/footer.inc'); exit; @@ -163,7 +163,7 @@ include('includes/header.inc'); echo '<p>'; prnMsg( _('There were no entries to print out for the selections specified') ); - echo '<br><a href="'. $rootpath.'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="'. $rootpath.'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; include('includes/footer.inc'); exit; } @@ -710,7 +710,7 @@ number_format($CheckPeriodActual,2), number_format($CheckPeriodBudget,2)); - echo '</table><br>'; + echo '</table><br />'; echo '<div class="centre"><input type=submit Name="SelectADifferentPeriod" Value="' . _('Select A Different Period') . '"></div>'; } echo '</form>'; Modified: trunk/GeocodeSetup.php =================================================================== --- trunk/GeocodeSetup.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/GeocodeSetup.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -137,7 +137,7 @@ '<a href="http://code.google.com/apis/maps/signup.html" target="_blank"> http://code.google.com/apis/maps/signup.html</a></b>'; echo '<div class="centre"><p>'. _('Find the lat/long for your map center point at ') . '<a href="http://www.batchgeocode.com/lookup/" target="_blank">http://www.batchgeocode.com/lookup/</a></b>'; - echo '<p>'. _('Set the maps centre point using the Center Longitude and Center Latitude. Set the maps screen size using the height and width in pixels (px)').'</div><br>'; + echo '<p>'. _('Set the maps centre point using the Center Longitude and Center Latitude. Set the maps screen size using the height and width in pixels (px)').'</div><br />'; echo '<table border=1>'; echo '<tr> @@ -189,7 +189,7 @@ } //end of ifs and buts! if (isset($SelectedParam)) { - echo '<div class="centre"><br><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Show Defined Geocode Param Codes') . '</a><br></div>'; + echo '<div class="centre"><br /><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Show Defined Geocode Param Codes') . '</a><br /></div>'; } if (!isset($_GET['delete'])) { @@ -243,7 +243,7 @@ if (!isset($_POST['geocode_key'])) { $_POST['geocode_key'] = ''; } - echo '<br><tr> + echo '<br /><tr> <td>'. _('Geocode Key') .':</td> <td><input ' . (in_array('geocode_key',$Errors) ? 'class="inputerror"' : '' ) . ' tabindex=2 type="text" name="geocode_key" VALUE="'. $_POST['geocode_key'] .'" size=28 maxlength=300> @@ -264,13 +264,13 @@ <tr><td>'. _('Geocode Host') . '</td> <td><input tabindex=7 type="text" name="map_host" VALUE="'. $_POST['map_host'] .'" size=20 maxlength=300></td></tr> </table> - <div class="centre"><input tabindex=4 type="Submit" name="submit" value="' . _('Enter Information') . '"</div><br><br> + <div class="centre"><input tabindex=4 type="Submit" name="submit" value="' . _('Enter Information') . '"</div><br /><br /> </form>'; echo '<div class="page_help_text">' . _('When ready, click on the link below to run the GeoCode process. This will Geocode all Branches and Suppliers. This may take some time. Errors will be returned to the screen.') . '</p>'; -echo '<p>' . _('Suppliers and Customer Branches are geocoded when being entered/updated. You can rerun the geocode process from this screen at any time.') . '</p></div><br>'; +echo '<p>' . _('Suppliers and Customer Branches are geocoded when being entered/updated. You can rerun the geocode process from this screen at any time.') . '</p></div><br />'; -echo '<div class="centre"><a href="' . $rootpath . '/geocode.php">' . _('Run GeoCode process (may take a long time)') . '</a></p><br>'; -echo '<a href="' . $rootpath . '/geo_displaymap_customers.php">' . _('Display Map of Customer Branches') . '</a><br>'; +echo '<div class="centre"><a href="' . $rootpath . '/geocode.php">' . _('Run GeoCode process (may take a long time)') . '</a></p><br />'; +echo '<a href="' . $rootpath . '/geo_displaymap_customers.php">' . _('Display Map of Customer Branches') . '</a><br />'; echo '<a href="' . $rootpath . '/geo_displaymap_suppliers.php">' . _('Display Map of Suppliers') . '</a></div>'; } //end if record deleted no point displaying form to add record include('includes/footer.inc'); Modified: trunk/GetStockImage.php =================================================================== --- trunk/GetStockImage.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/GetStockImage.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -151,7 +151,7 @@ $title = _('Stock Image Retrieval ....'); include('includes/header.inc'); prnMsg( _('The Image could not be retrieved because it does not exist'), 'error'); - echo '<br><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; include('includes/footer.inc'); exit; } @@ -160,9 +160,9 @@ $title = _('Stock Image Retrieval ....'); include('includes/header.inc'); echo 'The image ' . $filename . ' using functype ' . $functype - . '<br> The tmpfilename = ' . $tmpfilename . '<br> The temppath = ' . $filepath . '<br>The stockid = ' . $stockid . '<br> filepath . stockid .jpg = ' . $filepath . $stockid .'.jpg<br> The result of file_exists($filepath . $stockid .jpg) =' . file_exists($filepath . $stockid .'.jpg') - . '<br>filepath = ' . $filepath - . '<br>rootpath = ' . $rootpath; + . '<br /> The tmpfilename = ' . $tmpfilename . '<br /> The temppath = ' . $filepath . '<br />The stockid = ' . $stockid . '<br /> filepath . stockid .jpg = ' . $filepath . $stockid .'.jpg<br /> The result of file_exists($filepath . $stockid .jpg) =' . file_exists($filepath . $stockid .'.jpg') + . '<br />filepath = ' . $filepath + . '<br />rootpath = ' . $rootpath; include('includes/footer.inc'); exit; */ Modified: trunk/GoodsReceivedControlled.php =================================================================== --- trunk/GoodsReceivedControlled.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/GoodsReceivedControlled.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -24,7 +24,7 @@ if (!isset($_SESSION['PO'.$identifier])) { /* This page can only be called with a purchase order number for receiving*/ echo '<div class="centre"><a href="' . $rootpath . '/PO_SelectOSPurchOrder.php">'. - _('Select a purchase order to receive'). '</a></div><br>'; + _('Select a purchase order to receive'). '</a></div><br />'; prnMsg( _('This page can only be opened if a purchase order and line item has been selected') . '. ' . _('Please do that first'),'error'); include('includes/footer.inc'); exit; @@ -59,9 +59,9 @@ ********************************************/ echo '<div class="centre">'; -echo '<br><a href="'.$rootpath.'/GoodsReceived.php?identifier=' .$identifier . '">'. _('Back To Purchase Order'). ' # '. $_SESSION['PO'.$identifier]->OrderNo . '</a>'; +echo '<br /><a href="'.$rootpath.'/GoodsReceived.php?identifier=' .$identifier . '">'. _('Back To Purchase Order'). ' # '. $_SESSION['PO'.$identifier]->OrderNo . '</a>'; -echo '<br><font size=2><b>'. _('Receive controlled item'). ' '. $LineItem->StockID . ' - ' . $LineItem->ItemDescription . +echo '<br /><font size=2><b>'. _('Receive controlled item'). ' '. $LineItem->StockID . ' - ' . $LineItem->ItemDescription . ' ' . _('on order') . ' ' . $_SESSION['PO'.$identifier]->OrderNo . ' ' . _('from') . ' ' . $_SESSION['PO'.$identifier]->SupplierName . '</b></font></div>'; /** vars needed by InputSerialItem : **/ @@ -72,7 +72,7 @@ $ShowExisting = false; include ('includes/InputSerialItems.php'); -//echo '<br><input type=submit name=\'AddBatches\' VALUE=\'Enter\'><br>'; +//echo '<br /><input type=submit name=\'AddBatches\' VALUE=\'Enter\'><br />'; /*TotalQuantity set inside this include file from the sum of the bundles of the item selected for dispatch */ Modified: trunk/InventoryPlanningPrefSupplier.php =================================================================== --- trunk/InventoryPlanningPrefSupplier.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/InventoryPlanningPrefSupplier.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -208,9 +208,9 @@ $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?' . SID . "'>" . _('Back to the menu') . '</a>'; + echo "<br /><a href='" .$rootpath .'/index.php?' . SID . "'>" . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br>$SQL"; + echo "<br />$SQL"; } include('includes/footer.inc'); exit; @@ -276,9 +276,9 @@ $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?' . SID . "'>" . _('Back to the menu') . '</a>'; + echo "<br /><a href='" .$rootpath .'/index.php?' . SID . "'>" . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br>$SQL"; + echo "<br />$SQL"; } include('includes/footer.... [truncated message content] |
From: <dai...@us...> - 2011-07-02 23:05:10
|
Revision: 4618 http://web-erp.svn.sourceforge.net/web-erp/?rev=4618&view=rev Author: daintree Date: 2011-07-02 23:04:59 +0000 (Sat, 02 Jul 2011) Log Message: ----------- <br> replaced with <br /> Modified Paths: -------------- trunk/Areas.php trunk/BankMatching.php trunk/CustomerBranches.php trunk/CustomerReceipt.php trunk/DailyBankTransactions.php trunk/DailySalesInquiry.php trunk/EDIMessageFormat.php trunk/EDIProcessOrders.php trunk/EmailConfirmation.php trunk/EmailCustTrans.php trunk/FixedAssetLocations.php trunk/FixedAssetRegister.php trunk/FixedAssetTransfer.php trunk/FormDesigner.php trunk/GLAccountCSV.php trunk/GLAccountInquiry.php trunk/GLAccountReport.php trunk/GLAccounts.php trunk/GLBalanceSheet.php trunk/GLTagProfit_Loss.php trunk/GLTrialBalance.php trunk/GeocodeSetup.php trunk/GetStockImage.php trunk/GoodsReceivedControlled.php trunk/InventoryPlanningPrefSupplier.php trunk/Labels.php trunk/Locations.php trunk/MRPCalendar.php trunk/MRPDemandTypes.php trunk/MRPPlannedPurchaseOrders.php trunk/MailInventoryValuation.php trunk/Numbers/Words/lang.cs.php trunk/Numbers/Words/lang.lt.php trunk/OrderDetails.php trunk/PDFChequeListing.php trunk/PDFCustTransListing.php trunk/PDFCustomerList.php trunk/PDFDIFOT.php trunk/PDFDeliveryDifferences.php trunk/PDFGrn.php trunk/PDFPeriodStockTransListing.php trunk/PDFPriceList.php trunk/PDFPrintLabel.php trunk/PDFQuotation.php trunk/PDFQuotationPortrait.php trunk/PDFRemittanceAdvice.php trunk/PDFStockCheckComparison.php trunk/PDFStockLocTransfer.php trunk/PDFStockTransfer.php trunk/PDFSuppTransListing.php trunk/POReport.php trunk/PO_AuthorisationLevels.php trunk/PO_AuthoriseMyOrders.php trunk/PO_Chk_ShiptRef_JobRef.php trunk/PO_OrderDetails.php trunk/PO_SelectOSPurchOrder.php trunk/PO_SelectPurchOrder.php trunk/PaymentAllocations.php trunk/PaymentTerms.php trunk/PcExpenses.php trunk/PcTabs.php trunk/PricesByCost.php trunk/Prices_Customer.php trunk/PrintCustOrder.php trunk/PrintCustStatements.php trunk/PrintCustTrans.php trunk/RecurringSalesOrders.php trunk/ReorderLevel.php trunk/ReorderLevelLocation.php trunk/SMTPServer.php trunk/SalesAnalReptCols.php trunk/SalesByTypePeriodInquiry.php trunk/SalesCategoryPeriodInquiry.php trunk/SalesGraph.php trunk/SalesPeople.php trunk/SalesTopItemsInquiry.php trunk/SalesTypes.php trunk/SelectAsset.php trunk/SelectCreditItems.php trunk/SelectGLAccount.php trunk/SelectSalesOrder.php trunk/Shipments.php trunk/Shippers.php trunk/Shipt_Select.php trunk/StockAdjustments.php trunk/StockCostUpdate.php trunk/StockCounts.php trunk/StockDispatch.php trunk/StockLocMovements.php trunk/StockLocTransferReceive.php trunk/StockSerialItemResearch.php trunk/StockTransferControlled.php trunk/StockUsageGraph.php trunk/SuppContractChgs.php trunk/SuppFixedAssetChgs.php trunk/SuppLoginSetup.php trunk/SuppPaymentRun.php trunk/SuppPriceList.php trunk/SupplierContacts.php trunk/SupplierInvoice.php trunk/TaxAuthorities.php trunk/TaxAuthorityRates.php trunk/TaxCategories.php trunk/TaxProvinces.php trunk/WhereUsedInquiry.php trunk/WorkCentres.php trunk/WorkOrderCosting.php trunk/WorkOrderReceive.php trunk/WorkOrderStatus.php trunk/Z_BottomUpCosts.php trunk/Z_ChangeCustomerCode.php trunk/Z_ChangeStockCategory.php trunk/Z_CheckAllocs.php trunk/Z_DeleteInvoice.php trunk/Z_ImportChartOfAccounts.php trunk/Z_ImportGLAccountGroups.php trunk/Z_ImportGLAccountSections.php trunk/Z_ImportPartCodes.php trunk/Z_MakeNewCompany.php trunk/Z_ReverseSuppPaymentRun.php trunk/Z_UpdateChartDetailsBFwd.php trunk/Z_Upgrade3.10.php trunk/Z_Upgrade_3.10-3.11.php trunk/Z_Upgrade_3.11-4.00.php trunk/Z_index.php trunk/Z_poAddLanguage.php trunk/Z_poEditLangHeader.php trunk/Z_poEditLangModule.php trunk/Z_poEditLangRemaining.php trunk/Z_poRebuildDefault.php trunk/doc/Manual/ManualAPIFunctions.php trunk/geocode.php trunk/includes/DefineLabelClass.php trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsKeyed.php trunk/includes/InputSerialItemsSequential.php trunk/includes/OutputSerialItems.php trunk/includes/tcpdf/2dbarcodes.php trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/tcpdf.php trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/Manual/ManualARInquiries.html trunk/locale/de_DE.utf8/Manual/ManualARReports.html trunk/locale/de_DE.utf8/Manual/ManualARTransactions.html trunk/locale/de_DE.utf8/Manual/ManualAccountsPayable.html trunk/locale/de_DE.utf8/Manual/ManualAccountsReceivable.html trunk/locale/de_DE.utf8/Manual/ManualContents.php trunk/locale/de_DE.utf8/Manual/ManualContributors.html trunk/locale/de_DE.utf8/Manual/ManualCreatingNewSystem.html trunk/locale/de_DE.utf8/Manual/ManualCreditStatus.html trunk/locale/de_DE.utf8/Manual/ManualDevelopmentStructure.html trunk/locale/de_DE.utf8/Manual/ManualGeneralLedger.html trunk/locale/de_DE.utf8/Manual/ManualGettingStarted.html trunk/locale/de_DE.utf8/Manual/ManualHeader.html trunk/locale/de_DE.utf8/Manual/ManualIntroduction.html trunk/locale/de_DE.utf8/Manual/ManualInventory.html trunk/locale/de_DE.utf8/Manual/ManualManufacturing.html trunk/locale/de_DE.utf8/Manual/ManualMultilanguage.html trunk/locale/de_DE.utf8/Manual/ManualNewScripts.html trunk/locale/de_DE.utf8/Manual/ManualPaymentTerms.html trunk/locale/de_DE.utf8/Manual/ManualPrices.html trunk/locale/de_DE.utf8/Manual/ManualReportBuilder.html trunk/locale/de_DE.utf8/Manual/ManualRequirements.html trunk/locale/de_DE.utf8/Manual/ManualSalesAnalysis.html trunk/locale/de_DE.utf8/Manual/ManualSalesOrders.html trunk/locale/de_DE.utf8/Manual/ManualSalesPeople.html trunk/locale/de_DE.utf8/Manual/ManualSalesTypes.html trunk/locale/de_DE.utf8/Manual/ManualSecuritySchema.html trunk/locale/de_DE.utf8/Manual/ManualSecuritySchemaorig.html trunk/locale/de_DE.utf8/Manual/ManualShipments.html trunk/locale/de_DE.utf8/Manual/ManualSpecialUtilities.html trunk/locale/de_DE.utf8/Manual/ManualSystemConventions.html trunk/locale/de_DE.utf8/Manual/ManualTax.html trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages-P-Y.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/Manual/ManualAPIFunctions.php trunk/locale/zh_CN.utf8/Manual/ManualContents.php trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/Manual/ManualAPIFunctions.php trunk/locale/zh_HK.utf8/Manual/ManualContents.php trunk/reportwriter/FormMaker.php trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/RCFunctions.inc trunk/reportwriter/admin/forms/ReportsCritSetup.html trunk/reportwriter/admin/forms/ReportsImport.html trunk/reportwriter/admin/forms/TplFrmCBlk.html trunk/reportwriter/admin/forms/TplFrmCDta.html trunk/reportwriter/admin/forms/TplFrmData.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/TplFrmLine.html trunk/reportwriter/languages/en_US/reports.php trunk/sql/mysql/upgrade2.9-2.9a.sql trunk/sql/mysql/weberp-demo.sql Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/Areas.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -113,7 +113,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg( _('Cannot delete this area because customer branches have been created using this area'),'warn'); - echo '<br>' . _('There are') . ' ' . $myrow[0] . ' ' . _('branches using this area code'); + echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('branches using this area code'); } else { $sql= "SELECT COUNT(*) FROM salesanalysis WHERE salesanalysis.area ='$SelectedArea'"; @@ -122,7 +122,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg( _('Cannot delete this area because sales analysis records exist that use this area'),'warn'); - echo '<br>' . _('There are') . ' ' . $myrow[0] . ' ' . _('sales analysis records referring this area code'); + echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('sales analysis records referring this area code'); } } @@ -178,7 +178,7 @@ if (!isset($_GET['delete'])) { - echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '"><br>'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '"><br />'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedArea)) { Modified: trunk/BankMatching.php =================================================================== --- trunk/BankMatching.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/BankMatching.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -75,7 +75,7 @@ $_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 '<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 action="'. $_SERVER['PHP_SELF'] . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -136,7 +136,7 @@ echo '</select></td></tr>'; -echo '</table><br><div class="centre"><input tabindex="6" type=submit name="ShowTransactions" value="' . _('Show selected') . ' ' . $TypeName . '">'; +echo '</table><br /><div class="centre"><input tabindex="6" type=submit name="ShowTransactions" value="' . _('Show selected') . ' ' . $TypeName . '">'; echo '<p><a href="' . $rootpath . '/BankReconciliation.php">' . _('Show reconciliation') . '</a></div>'; echo '<hr />'; Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/CustomerBranches.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -534,7 +534,7 @@ if (isset($SelectedBranch)) { echo '<div class="centre"><a href=' . $_SERVER['PHP_SELF'] . '?DebtorNo=' . $DebtorNo. '>' . _('Show all branches defined for'). ' '. $DebtorNo . '</a></div>'; } - echo '<br><table class="selection">'; + echo '<br /><table class="selection">'; echo '<tr><th colspan=2><div class="centre"><b>'._('Change Branch').'</b></th></tr>'; echo '<tr><td>'._('Branch Code').':</td><td>'; Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/CustomerReceipt.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -571,7 +571,7 @@ if (DB_error_no($db) !=0) { prnMsg(_('The searched customer records requested cannot be retrieved because') . ' - ' . DB_error_msg($db),'error'); if ($debug==1){ - prnMsg(_('SQL used to retrieve the customer details was') . '<br>' . $sql,'error'); + prnMsg(_('SQL used to retrieve the customer details was') . '<br />' . $sql,'error'); } } elseif (DB_num_rows($CustomerSearchResult)==1){ $myrow=DB_fetch_array($CustomerSearchResult); @@ -723,7 +723,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Enter Receipt') . '" alt="">' . ' ' . _('Enter Customer Receipt') . '</p>'; echo '<div class="page_help_text">' . _('To enter a payment TO a customer (ie. to pay out a credit note), enter a negative payment amount.') . '</div>'; } -echo '<br><table class=selection><tr><td>' . _('Bank Account') . ':</td> +echo '<br /><table class=selection><tr><td>' . _('Bank Account') . ':</td> <td><select tabindex=1 name="BankAccount" onChange="ReloadForm(form1.BatchInput)">'; if (DB_num_rows($AccountsResults)==0){ @@ -895,7 +895,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . $_SESSION['CustomerRecord']['name'] . ' - (' . _('All amounts stated in') . ' ' . $_SESSION['CustomerRecord']['currency'] . ')' . _('Terms') . ': ' . $_SESSION['CustomerRecord']['terms'] . '<br/>' . _('Credit Limit') . ': ' . number_format($_SESSION['CustomerRecord']['creditlimit'],0) . ' ' . _('Credit Status') . ': ' . $_SESSION['CustomerRecord']['reasondescription']; if ($_SESSION['CustomerRecord']['dissallowinvoices']!=0){ - echo '<br><font color=red size=4><b>' . _('ACCOUNT ON HOLD') . '</font></b><br/>'; + echo '<br /><font color=red size=4><b>' . _('ACCOUNT ON HOLD') . '</font></b><br/>'; } echo '<table width="90%" class=selection> @@ -914,7 +914,7 @@ <td class=number>' . number_format(($_SESSION['CustomerRecord']['overdue1']-$_SESSION['CustomerRecord']['overdue2']) ,2) . '</td> <td class=number>' . number_format($_SESSION['CustomerRecord']['overdue2'],2) . '</td> </tr> - </table><br>'; + </table><br />'; echo '<table class="selection">'; @@ -1009,7 +1009,7 @@ echo '<td>' . _('Narrative') . ':</td>'; echo '<td><textarea name="Narrative" cols=40 rows=1></textarea></td>'; echo '</table>'; - echo '<br><div class="centre"><input tabindex=14 type="submit" name="Process" value="' . _('Accept') . '">'; + echo '<br /><div class="centre"><input tabindex=14 type="submit" name="Process" value="' . _('Accept') . '">'; echo '<input tabindex=14 type="submit" name="Cancel" value="' . _('Cancel') . '"></div>'; } elseif (isset($_SESSION['ReceiptBatch']) AND !isset($_POST['GLEntry'])){ @@ -1028,7 +1028,7 @@ echo '<td>' . _('Customer invoice number') . ':</td>'; echo '<td><input tabindex=11 type="text" name="CustInvNo" size=8 maxlength=8></td>'; echo '</tr></table>'; - echo '<div class="centre"><br>'; + echo '<div class="centre"><br />'; echo '<input tabindex=11 type=submit name="Search" value="' . _('Search Now') . '">'; echo '<br/><br/><input tabindex=12 type=submit name="GLEntry" value="' . _('Enter A GL Receipt') . '"><br /></div>'; Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/DailyBankTransactions.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -58,7 +58,7 @@ </tr>'; echo '</table>'; - echo '<br><div class="centre"><input type="submit" name="Show" value="' . _('Show transactions'). '"></div>'; + echo '<br /><div class="centre"><input type="submit" name="Show" value="' . _('Show transactions'). '"></div>'; echo '</form>'; } else { $SQL = "SELECT bankaccountname, @@ -133,7 +133,7 @@ echo '<form action="' . $_SERVER['PHP_SELF'] . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br><div class="centre"><input type="submit" name="Return" value="' . _('Select Another Date'). '"></div>'; + echo '<br /><div class="centre"><input type="submit" name="Return" value="' . _('Select Another Date'). '"></div>'; echo '</form>'; } include('includes/footer.inc'); Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/DailySalesInquiry.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -8,7 +8,7 @@ include('includes/DefineCartClass.php'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Daily Sales') . '" alt="" />' . ' ' . _('Daily Sales') . '</p>'; -echo '<div class="page_help_text">' . _('Select the month to show daily sales for') . '</div><br>'; +echo '<div class="page_help_text">' . _('Select the month to show daily sales for') . '</div><br />'; echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/EDIMessageFormat.php =================================================================== --- trunk/EDIMessageFormat.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/EDIMessageFormat.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -162,7 +162,7 @@ echo '</table><p>'; if (DB_num_rows($result)==0){ echo '<div class="centre"><input tabindex=1 type=submit name="NewEDIInvMsg" value="' . - _('Create New EDI Invoice Message From Default Template') . '"></div><br>'; + _('Create New EDI Invoice Message From Default Template') . '"></div><br />'; } } //end of ifs SelectedLine is not set @@ -240,7 +240,7 @@ echo '<td>'; echo '<input tabindex=4 type="Text" name="LineText" size=50 maxlength=50 VALUE='.$_POST['LineText'] .'>'; echo '</td></tr>'; -echo '</table><br>'; +echo '</table><br />'; if (isset($_GET['SelectedMessageLine'])) { echo '<div class="centre"><input tabindex=5 type="submit" name="update" value="'. _('Update Information'). '"></div>'; } else { Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/EDIProcessOrders.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -58,7 +58,7 @@ while (false !== ($OrderFile=readdir($dirhandle))){ /*there are files in the incoming orders dir */ $TryNextFile = False; - echo "<br>$OrderFile"; + echo "<br />$OrderFile"; /*Counter that keeps track of the array pointer for the 1st seg in the current seg group */ $FirstSegInGrp =0; @@ -79,7 +79,7 @@ while ($LineText = fgets($fp) AND $TryNextFile != True){ /* get each line of the order file */ $LineText = StripTrailingComma($LineText); - echo "<br>".$LineText; + echo "<br />".$LineText; if ($SegTag != substr($LineText,0,3)){ $SegCounter=1; @@ -87,7 +87,7 @@ } else { $SegCounter++; if ($SegCounter > $Seg[$SegID]['MaxOccur']){ - $EmailText = $EmailText . "\n" . _('The EANCOM Standard only allows for') . ' ' . $Seg[$SegID]['MaxOccur'] . ' ' ._('occurrences of the segment') . ' ' . $Seg[$SegID]['SegTag'] . ' ' . _('this is the') . ' ' . $SegCounter . ' ' . _('occurrence') . '<br>' . _('The segment line read as follows') . ':<br>' . $LineText; + $EmailText = $EmailText . "\n" . _('The EANCOM Standard only allows for') . ' ' . $Seg[$SegID]['MaxOccur'] . ' ' ._('occurrences of the segment') . ' ' . $Seg[$SegID]['SegTag'] . ' ' . _('this is the') . ' ' . $SegCounter . ' ' . _('occurrence') . '<br />' . _('The segment line read as follows') . ':<br />' . $LineText; } } @@ -114,12 +114,12 @@ if ($SegTag != $Seg[$SegID]['SegTag']){ - $EmailText .= "\n" . _('ERROR') . ': ' . _('Unable to identify segment tag') . ' ' . $SegTag . ' ' . _('from the message line') . '<br>' . $LineText . '<br><font color=RED><b>' . _('This message processing has been aborted and separate advice will be required from the customer to obtain details of the order') . '<b></font>'; + $EmailText .= "\n" . _('ERROR') . ': ' . _('Unable to identify segment tag') . ' ' . $SegTag . ' ' . _('from the message line') . '<br />' . $LineText . '<br /><font color=RED><b>' . _('This message processing has been aborted and separate advice will be required from the customer to obtain details of the order') . '<b></font>'; $TryNextFile = True; } - echo '<br>' . _('The segment tag') . ' ' . $SegTag . ' ' . _('is being processed'); + echo '<br />' . _('The segment tag') . ' ' . $SegTag . ' ' . _('is being processed'); switch ($SegTag){ case 'UNH': $UNH_elements = explode ('+',substr($LineText,4)); @@ -181,13 +181,13 @@ } /*end switch for type of order */ if (isset($BGM_elements[1])){ - echo '<br>echo BGM_elements[1] ' .$BGM_elements[1]; + echo '<br />echo BGM_elements[1] ' .$BGM_elements[1]; $BGM_C106 = explode(':',$BGM_elements[1]); $Order->CustRef = $BGM_C106[0]; $EmailText .= "\n" . _('Customers order ref') . ': ' . $BGM_C106[0]; } if (isset($BGM_elements[2])){ - echo "<br>echo BGM_elements[2] " .$BGM_elements[2]; + echo "<br />echo BGM_elements[2] " .$BGM_elements[2]; $BGM_1225 = explode(':',$BGM_elements[2]); $MsgFunction = $BGM_1225[0]; @@ -222,7 +222,7 @@ if (isset($BGM_1225[1])){ $ResponseCode = $BGM_1225[1]; - echo '<br>' . _('Response Code') . ': ' . $ResponseCode; + echo '<br />' . _('Response Code') . ': ' . $ResponseCode; switch ($ResponseCode) { case 'AC': $EmailText .= "\n" . _('Please acknowledge to customer with detail and changes made to the order'); Modified: trunk/EmailConfirmation.php =================================================================== --- trunk/EmailConfirmation.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/EmailConfirmation.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -9,12 +9,12 @@ If (!isset($_GET['TransNo']) OR $_GET['TransNo']==""){ $title = _('Select Order To Print'); include('includes/header.inc'); - echo '<div class="centre"><br><br><br>'; + 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"> + echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> <li><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li> <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br><br><br>'; + </td></tr></table></div><br /><br /><br />'; include('includes/footer.inc'); exit(); } @@ -65,12 +65,12 @@ if (DB_num_rows($result)==0){ $title = _('Print Packing Slip Error'); include('includes/header.inc'); - echo '<div class="centre"><br><br><br>'; + 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"> + echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> <li><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li> <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br><br><br>'; + </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! */ @@ -86,17 +86,17 @@ echo '<p>'; 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' ); + '<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?' . SID . '&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?' . SID . '&TransNo=' . $_GET['TransNo'] . '&Reprint=OK">'. _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed'). '</a>'; - echo '<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><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li> <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br><br><br>'; + </td></tr></table></div><br /><br /><br />'; include('includes/footer.inc'); exit; @@ -125,11 +125,11 @@ $_SESSION['CompanyRecord']['telephone'] . ' ' . _('Fax'). ': ' . $_SESSION['CompanyRecord']['fax'] . "</td></tr>"; $MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $_SESSION['CompanyRecord']['email'] . "<br><br><br></td></tr>"; + $_SESSION['CompanyRecord']['email'] . "<br /><br /><br /></td></tr>"; $MailMessage = $MailMessage . "<Table><tr><td align='center' colspan='4'> <h2> Order Acknowledgement</h2></td></tr>"; $MailMessage = $MailMessage . "<tr><td align='center' colspan='4'> <b>Order Number " . - $_GET['TransNo'] . "</b><br><br><br></td></tr>"; + $_GET['TransNo'] . "</b><br /><br /><br /></td></tr>"; $MailMessage = $MailMessage . "<tr><td colspan='4'> <b>Delivered To:</b></td></tr>"; $MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . $myrow['deliverto'] . "</td></tr>"; @@ -139,12 +139,12 @@ { $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd2'] . "</td></tr>"; $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . - ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5']. "<br><br><br></td></tr>"; + ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5']. "<br /><br /><br /></td></tr>"; } else { $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . ' ' . - $myrow['deladd4'] . ' ' . $myrow['deladd5'] . "<br><br><br></td></tr>"; + $myrow['deladd4'] . ' ' . $myrow['deladd5'] . "<br /><br /><br /></td></tr>"; } $MailMessage = $MailMessage . "</table><table border='1' width='50%'><tr>"; if($_REQUEST['POLine'] == 1){ @@ -205,7 +205,7 @@ } /*end if there are order details to show on the order*/ $MailMessage = $MailMessage . "</Table></body></html>"; -// echo $MailMessage . "=mailMessage<br>"; +// echo $MailMessage . "=mailMessage<br />"; IF(mail( $MailTo, $MailSubject, $MailMessage, $headers )){ echo " The following E-Mail was sent to $MailTo:"; } @@ -225,7 +225,7 @@ <td align='center' colspan='4'> <h2> Order Acknowledgement</h2></td> </tr> <tr> - <td align='center' colspan='4'> <b>Order Number <?=$_GET['TransNo']?> </b><br><br><br></td> + <td align='center' colspan='4'> <b>Order Number <?=$_GET['TransNo']?> </b><br /><br /><br /></td> </tr> <tr> <td colspan='2' nowrap width="50%"> <b><?=$_SESSION['CompanyRecord']['coyname']?></b></td> @@ -251,10 +251,10 @@ </tr> <tr> <td colspan='2' nowrap width="50%"> - <b><?=$_SESSION['CompanyRecord']['email']?><br><br><br> + <b><?=$_SESSION['CompanyRecord']['email']?><br /><br /><br /> </td> <td nowrap width="50%"> - <b><?=$myrow['deladd3']?> <?=$myrow['deladd4'] ?> <?=$myrow['deladd5']?><br><br><br> + <b><?=$myrow['deladd3']?> <?=$myrow['deladd4'] ?> <?=$myrow['deladd5']?><br /><br /><br /> </td> </tr> </table> Modified: trunk/EmailCustTrans.php =================================================================== --- trunk/EmailCustTrans.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/EmailCustTrans.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -64,7 +64,7 @@ <td><input type="text" name="EmailAddr" maxlength=60 size=60 value="' . $EmailAddress . '"></td> </table>'; -echo '<br><div class="centre"><input type=submit name="DoIt" value="' . _('OK') . '">'; +echo '<br /><div class="centre"><input type=submit name="DoIt" value="' . _('OK') . '">'; echo '</div></form>'; include ('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/FixedAssetLocations.php =================================================================== --- trunk/FixedAssetLocations.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/FixedAssetLocations.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -102,7 +102,7 @@ echo '<td><a href="'.$_SERVER['PHP_SELF'] . '?' . SID.'SelectedLocation='.$myrow['locationid'].'">' . _('Edit') . '</td>'; } -echo '</table><br>'; +echo '</table><br />'; echo '<form name="LocationForm" method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '"><table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><th style="text-align:left">'._('Location ID').'</th>'; @@ -133,7 +133,7 @@ echo '</select>'; echo '</td></tr>'; -echo '</table><br>'; +echo '</table><br />'; //Batman: ParentLocationID checking the location ID Modified: trunk/FixedAssetRegister.php =================================================================== --- trunk/FixedAssetRegister.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/FixedAssetRegister.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -76,7 +76,7 @@ echo '<form name="RegisterForm" method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '"><table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<div class="centre">' ._('From') . ':' . $_POST['FromDate'] . ' ' . _('to') . ' ' . $_POST['ToDate'] . '</div>'; - echo '<br><table width=80% cellspacing="1" class=selection><tr>'; + echo '<br /><table width=80% cellspacing="1" class=selection><tr>'; echo '<th>' . _('Asset ID') . '</th>'; echo '<th>' . _('Description') . '</th>'; echo '<th>' . _('Serial Number') . '</th>'; @@ -164,13 +164,13 @@ echo '<tr><td style="vertical-align:top">' . $myrow['assetid'] . '</td>'; echo '<td style="vertical-align:top">' . $myrow['longdescription'] . '</td>'; echo '<td style="vertical-align:top">' . $myrow['serialno'] . '</td>'; - echo '<td>' . $myrow['locationdescription'] . '<br>'; + echo '<td>' . $myrow['locationdescription'] . '<br />'; /* Not reworked yet * for ($i = 1;$i < sizeOf($Ancestors) - 1;$i++) { for ($j = 0;$j < $i;$j++) { echo ' '; } - echo '|_' . $Ancestors[$i] . '<br>'; + echo '|_' . $Ancestors[$i] . '<br />'; } */ echo '</td><td style="vertical-align:top">' . ConvertSQLDate($myrow['datepurchased']) . '</td>'; @@ -230,7 +230,7 @@ echo '<th style="text-align:right">' . number_format($TotalNBV, 2) . '</th>'; echo '<th style="text-align:right">' . number_format($TotalDisposals, 2) . '</th></tr>'; echo '</table>'; - echo '<br><div class="centre"><input type="Submit" name="pdf" value="' . _('Print as a pdf') . '"> '; + echo '<br /><div class="centre"><input type="Submit" name="pdf" value="' . _('Print as a pdf') . '"> '; echo '<input type="Submit" name="csv" value="' . _('Print as CSV') . '"></div></form>'; } } else { @@ -289,7 +289,7 @@ echo '<tr><th>' . _('To Date ') . "</th><td><input type='text' class='date' alt='" . $_SESSION['DefaultDateFormat'] . "' name='ToDate' maxlength=10 size=11 value='" . $_POST['ToDate'] . "'></td>"; echo '</tr>'; - echo '</table><br>'; + echo '</table><br />'; echo '<div class="centre"><input type="Submit" name="submit" value="' . _('Show Assets') . '"> '; echo '<input type="Submit" name="pdf" value="' . _('Print as a pdf') . '"> '; echo '<input type="Submit" name = "csv" value= "' . _('Print as CSV') . '"></div>'; Modified: trunk/FixedAssetTransfer.php =================================================================== --- trunk/FixedAssetTransfer.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/FixedAssetTransfer.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -67,9 +67,9 @@ echo '<input type="text" name="AssetID" size=15 maxlength=18>'; } - echo '</td></tr></table><br>'; + echo '</td></tr></table><br />'; - echo '<div class="centre"><input type=submit name="Search" value="'. _('Search Now') . '"></div></form><br>'; + echo '<div class="centre"><input type=submit name="Search" value="'. _('Search Now') . '"></div></form><br />'; } if (isset($_POST['Search'])) { Modified: trunk/FormDesigner.php =================================================================== --- trunk/FormDesigner.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/FormDesigner.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -154,7 +154,7 @@ $FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/'.$_POST['FormName']); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Form Design') . '" alt="">' . ' ' . _('Form Design').'<br />'. $FormDesign['name'] . ''; -echo '<div class="page_help_text">' . _('Enter the changes that you want in the form layout below.') .'<br /> '. _('All measurements are in millimetres') . '.</div><br>'; +echo '<div class="page_help_text">' . _('Enter the changes that you want in the form layout below.') .'<br /> '. _('All measurements are in millimetres') . '.</div><br />'; $Papers=array('A4_Landscape', 'A4_Portrait', 'A5_Landscape', 'A5_Portrait', 'A3_Landscape', 'A3_Portrait', 'letter_Portrait', 'letter_Landscape', 'legal_Portrait', 'legal_Landscape'); // Possible paper sizes/orientations echo '<form method="post" id="Form" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/GLAccountCSV.php =================================================================== --- trunk/GLAccountCSV.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/GLAccountCSV.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -16,7 +16,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('General Ledger Account Inquiry') . '" alt="" />' . ' ' . _('General Ledger Account Report') . '</p>'; -echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple accounts and periods') . '</div><br>'; +echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple accounts and periods') . '</div><br />'; echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -258,7 +258,7 @@ } /*end for each SelectedAccount */ fclose($fp); - echo '<p><a href="' . $FileName . '">' . _('click here') . '</a> ' . _('to view the file') . '<br>'; + echo '<p><a href="' . $FileName . '">' . _('click here') . '</a> ' . _('to view the file') . '<br />'; } /* end of if CreateCSV button hit */ include('includes/footer.inc'); Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/GLAccountInquiry.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -23,7 +23,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('General Ledger Account Inquiry') . '" alt="" />' . ' ' . _('General Ledger Account Inquiry') . '</p>'; -echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple periods') . '</div><br>'; +echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple periods') . '</div><br />'; echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -145,7 +145,7 @@ $ErrMsg = _('The transactions for account') . ' ' . $SelectedAccount . ' ' . _('could not be retrieved because') ; $TransResult = DB_query($sql,$db,$ErrMsg); - echo '<br><table class=selection>'; + echo '<br /><table class=selection>'; echo '<tr><th colspan=8><b>' ._('Transactions for account').' '.$SelectedAccount. ' - '. $SelectedAccountName.'</b></th></tr>'; $TableHeader = '<tr> @@ -233,7 +233,7 @@ <td colspan=2></td> </tr>'; } - $IntegrityReport .= '<br>' . _('Period') . ': ' . $PeriodNo . _('Account movement per transaction') . ': ' . number_format($PeriodTotal,2) . ' ' . _('Movement per ChartDetails record') . ': ' . number_format($ChartDetailRow['actual'],2) . ' ' . _('Period difference') . ': ' . number_format($PeriodTotal -$ChartDetailRow['actual'],3); + $IntegrityReport .= '<br />' . _('Period') . ': ' . $PeriodNo . _('Account movement per transaction') . ': ' . number_format($PeriodTotal,2) . ' ' . _('Movement per ChartDetails record') . ': ' . number_format($ChartDetailRow['actual'],2) . ' ' . _('Period difference') . ': ' . number_format($PeriodTotal -$ChartDetailRow['actual'],3); if (ABS($PeriodTotal -$ChartDetailRow['actual'])>0.01){ $ShowIntegrityReport = True; Modified: trunk/GLAccountReport.php =================================================================== --- trunk/GLAccountReport.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/GLAccountReport.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -226,7 +226,7 @@ $title = _('Print GL Accounts Report Error'); include('includes/header.inc'); prnMsg (_('There were no accounts to print out'),'error'); - echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; + echo "<br /><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; include('includes/footer.inc'); exit; } else { @@ -251,7 +251,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('General Ledger Account Inquiry') . '" alt="" />' . ' ' . _('General Ledger Account Report') . '</p>'; - echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple accounts and periods') . '</div><br>'; + echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple accounts and periods') . '</div><br />'; echo "<form method='POST' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/GLAccounts.php =================================================================== --- trunk/GLAccounts.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/GLAccounts.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -77,7 +77,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg(_('Cannot delete this account because chart details have been created using this account and at least one period has postings to it'),'warn'); - echo '<br>' . _('There are') . ' ' . $myrow[0] . ' ' . _('chart details that require this account code'); + echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('chart details that require this account code'); } else { // PREVENT DELETES IF DEPENDENT RECORDS IN 'GLTrans' @@ -91,7 +91,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg( _('Cannot delete this account because transactions have been created using this account'),'warn'); - echo '<br>' . _('There are') . ' ' . $myrow[0] . ' ' . _('transactions that require this account code'); + echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('transactions that require this account code'); } else { //PREVENT DELETES IF Company default accounts set up to this account @@ -255,7 +255,7 @@ echo '</select></td></tr></table>'; - echo '<br><div class="centre"><input type="Submit" name="submit" value="'. _('Enter Information') . '"></div>'; + echo '<br /><div class="centre"><input type="Submit" name="submit" value="'. _('Enter Information') . '"></div>'; echo '</form>'; @@ -281,7 +281,7 @@ $result = DB_query($sql,$db,$ErrMsg); - echo '<br><table class=selection>'; + echo '<br /><table class=selection>'; echo '<tr> <th>' . _('Account Code') . '</th> <th>' . _('Account Name') . '</th> Modified: trunk/GLBalanceSheet.php =================================================================== --- trunk/GLBalanceSheet.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/GLBalanceSheet.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -20,8 +20,8 @@ echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . _('Balance Sheet') . '</p></div>'; echo '<div class="page_help_text">' - . _('Balance Sheet (or statement of financial position) is a summary of balances. Assets, liabilities and ownership equity are listed as of a specific date, such as the end of its financial year. Of the four basic financial statements, the balance sheet is the only statement which applies to a single point in time.') . '<br>' - . _('The balance sheet has three parts: assets, liabilities and ownership equity. The main categories of assets are listed first and are followed by the liabilities. The difference between the assets and the liabilities is known as equity or the net assets or the net worth or capital of the company and according to the accounting equation, net worth must equal assets minus liabilities.') . '<br>' + . _('Balance Sheet (or statement of financial position) is a summary of balances. Assets, liabilities and ownership equity are listed as of a specific date, such as the end of its financial year. Of the four basic financial statements, the balance sheet is the only statement which applies to a single point in time.') . '<br />' + . _('The balance sheet has three parts: assets, liabilities and ownership equity. The main categories of assets are listed first and are followed by the liabilities. The difference between the assets and the liabilities is known as equity or the net assets or the net worth or capital of the company and according to the accounting equation, net worth must equal assets minus liabilities.') . '<br />' . _('webERP is an "accrual" based system (not a "cash based" system). Accrual systems include items when they are invoiced to the customer, and when expenses are owed based on the supplier invoice date.') . '</div>'; echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">'; @@ -54,8 +54,8 @@ echo '</table>'; - echo '<br><div class="centre"><input type=submit Name="ShowBalanceSheet" Value="'._('Show on Screen (HTML)').'"></div>'; - echo '<br><div class="centre"><input type=submit Name="PrintPDF" Value="'._('Produce PDF Report').'"></div>'; + echo '<br /><div class="centre"><input type=submit Name="ShowBalanceSheet" Value="'._('Show on Screen (HTML)').'"></div>'; + echo '<br /><div class="centre"><input type=submit Name="PrintPDF" Value="'._('Produce PDF Report').'"></div>'; /*Now do the posting while the user is thinking about the period to select */ include ('includes/GLPostings.inc'); @@ -90,9 +90,9 @@ $title = _('Balance Sheet') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The accumulated profits brought forward could not be calculated by the SQL because') . ' - ' . DB_error_msg($db) ); - echo '<br><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; if ($debug==1){ - echo '<br>'. $SQL; + echo '<br />'. $SQL; } include('includes/footer.inc'); exit; @@ -128,9 +128,9 @@ $title = _('Balance Sheet') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) ); - echo '<br><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; if ($debug==1){ - echo '<br>'. $SQL; + echo '<br />'. $SQL; } include('includes/footer.inc'); exit; @@ -291,7 +291,7 @@ $title = _('Print Balance Sheet Error'); include('includes/header.inc'); prnMsg( _('There were no entries to print out for the selections specified') ); - echo '<br><a href="'. $rootpath.'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="'. $rootpath.'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; include('includes/footer.inc'); exit; } else { @@ -658,7 +658,7 @@ </tr>'; echo '</table>'; - echo '<br><div class="centre"><input type=submit Name="SelectADifferentPeriod" Value="'._('Select A Different Balance Date').'"></div>'; + echo '<br /><div class="centre"><input type=submit Name="SelectADifferentPeriod" Value="'._('Select A Different Balance Date').'"></div>'; } echo '</form>'; Modified: trunk/GLTagProfit_Loss.php =================================================================== --- trunk/GLTagProfit_Loss.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/GLTagProfit_Loss.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -104,10 +104,10 @@ echo '<option selected VALUE="Detailed">'._('All Accounts') . '</option>'; echo '</select></td></tr>'; - echo '</table><br>'; + echo '</table><br />'; - echo "<div class='centre'><input type=submit Name='ShowPL' Value='"._('Show Statement of Income and Expenditure')."'><br>"; - echo "<br><input type=submit Name='PrintPDF' Value='"._('PrintPDF')."'></div>"; + echo "<div class='centre'><input type=submit Name='ShowPL' Value='"._('Show Statement of Income and Expenditure')."'><br />"; + echo "<br /><input type=submit Name='PrintPDF' Value='"._('PrintPDF')."'></div>"; /*Now do the posting while the user is thinking about the period to select */ @@ -172,9 +172,9 @@ $title = _('Income and Expenditure') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) ); - echo '<br><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; if ($debug == 1){ - echo '<br>'. $SQL; + echo '<br />'. $SQL; } include('includes/footer.inc'); exit; @@ -184,7 +184,7 @@ include('includes/header.inc'); echo '<p>'; prnMsg( _('There were no entries to print out for the selections specified'),'info'); - echo '<br><a href="'. $rootpath.'/index.php">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="'. $rootpath.'/index.php">'. _('Back to the menu'). '</a>'; include('includes/footer.inc'); exit; } Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/GLTrialBalance.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -92,7 +92,7 @@ echo '<option value ="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } - echo '</select></td></tr></table><br>'; + echo '</select></td></tr></table><br />'; echo '<div class="centre"><input type=submit Name="ShowTB" Value="' . _('Show Trial Balance') .'">'; echo '<input type=submit Name="PrintPDF" Value="'._('PrintPDF').'"></div>'; @@ -151,9 +151,9 @@ $title = _('Trial Balance') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) ); - echo '<br><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; if ($debug==1){ - echo '<br>'. $SQL; + echo '<br />'. $SQL; } include('includes/footer.inc'); exit; @@ -163,7 +163,7 @@ include('includes/header.inc'); echo '<p>'; prnMsg( _('There were no entries to print out for the selections specified') ); - echo '<br><a href="'. $rootpath.'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="'. $rootpath.'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; include('includes/footer.inc'); exit; } @@ -710,7 +710,7 @@ number_format($CheckPeriodActual,2), number_format($CheckPeriodBudget,2)); - echo '</table><br>'; + echo '</table><br />'; echo '<div class="centre"><input type=submit Name="SelectADifferentPeriod" Value="' . _('Select A Different Period') . '"></div>'; } echo '</form>'; Modified: trunk/GeocodeSetup.php =================================================================== --- trunk/GeocodeSetup.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/GeocodeSetup.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -137,7 +137,7 @@ '<a href="http://code.google.com/apis/maps/signup.html" target="_blank"> http://code.google.com/apis/maps/signup.html</a></b>'; echo '<div class="centre"><p>'. _('Find the lat/long for your map center point at ') . '<a href="http://www.batchgeocode.com/lookup/" target="_blank">http://www.batchgeocode.com/lookup/</a></b>'; - echo '<p>'. _('Set the maps centre point using the Center Longitude and Center Latitude. Set the maps screen size using the height and width in pixels (px)').'</div><br>'; + echo '<p>'. _('Set the maps centre point using the Center Longitude and Center Latitude. Set the maps screen size using the height and width in pixels (px)').'</div><br />'; echo '<table border=1>'; echo '<tr> @@ -189,7 +189,7 @@ } //end of ifs and buts! if (isset($SelectedParam)) { - echo '<div class="centre"><br><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Show Defined Geocode Param Codes') . '</a><br></div>'; + echo '<div class="centre"><br /><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Show Defined Geocode Param Codes') . '</a><br /></div>'; } if (!isset($_GET['delete'])) { @@ -243,7 +243,7 @@ if (!isset($_POST['geocode_key'])) { $_POST['geocode_key'] = ''; } - echo '<br><tr> + echo '<br /><tr> <td>'. _('Geocode Key') .':</td> <td><input ' . (in_array('geocode_key',$Errors) ? 'class="inputerror"' : '' ) . ' tabindex=2 type="text" name="geocode_key" VALUE="'. $_POST['geocode_key'] .'" size=28 maxlength=300> @@ -264,13 +264,13 @@ <tr><td>'. _('Geocode Host') . '</td> <td><input tabindex=7 type="text" name="map_host" VALUE="'. $_POST['map_host'] .'" size=20 maxlength=300></td></tr> </table> - <div class="centre"><input tabindex=4 type="Submit" name="submit" value="' . _('Enter Information') . '"</div><br><br> + <div class="centre"><input tabindex=4 type="Submit" name="submit" value="' . _('Enter Information') . '"</div><br /><br /> </form>'; echo '<div class="page_help_text">' . _('When ready, click on the link below to run the GeoCode process. This will Geocode all Branches and Suppliers. This may take some time. Errors will be returned to the screen.') . '</p>'; -echo '<p>' . _('Suppliers and Customer Branches are geocoded when being entered/updated. You can rerun the geocode process from this screen at any time.') . '</p></div><br>'; +echo '<p>' . _('Suppliers and Customer Branches are geocoded when being entered/updated. You can rerun the geocode process from this screen at any time.') . '</p></div><br />'; -echo '<div class="centre"><a href="' . $rootpath . '/geocode.php">' . _('Run GeoCode process (may take a long time)') . '</a></p><br>'; -echo '<a href="' . $rootpath . '/geo_displaymap_customers.php">' . _('Display Map of Customer Branches') . '</a><br>'; +echo '<div class="centre"><a href="' . $rootpath . '/geocode.php">' . _('Run GeoCode process (may take a long time)') . '</a></p><br />'; +echo '<a href="' . $rootpath . '/geo_displaymap_customers.php">' . _('Display Map of Customer Branches') . '</a><br />'; echo '<a href="' . $rootpath . '/geo_displaymap_suppliers.php">' . _('Display Map of Suppliers') . '</a></div>'; } //end if record deleted no point displaying form to add record include('includes/footer.inc'); Modified: trunk/GetStockImage.php =================================================================== --- trunk/GetStockImage.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/GetStockImage.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -151,7 +151,7 @@ $title = _('Stock Image Retrieval ....'); include('includes/header.inc'); prnMsg( _('The Image could not be retrieved because it does not exist'), 'error'); - echo '<br><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; include('includes/footer.inc'); exit; } @@ -160,9 +160,9 @@ $title = _('Stock Image Retrieval ....'); include('includes/header.inc'); echo 'The image ' . $filename . ' using functype ' . $functype - . '<br> The tmpfilename = ' . $tmpfilename . '<br> The temppath = ' . $filepath . '<br>The stockid = ' . $stockid . '<br> filepath . stockid .jpg = ' . $filepath . $stockid .'.jpg<br> The result of file_exists($filepath . $stockid .jpg) =' . file_exists($filepath . $stockid .'.jpg') - . '<br>filepath = ' . $filepath - . '<br>rootpath = ' . $rootpath; + . '<br /> The tmpfilename = ' . $tmpfilename . '<br /> The temppath = ' . $filepath . '<br />The stockid = ' . $stockid . '<br /> filepath . stockid .jpg = ' . $filepath . $stockid .'.jpg<br /> The result of file_exists($filepath . $stockid .jpg) =' . file_exists($filepath . $stockid .'.jpg') + . '<br />filepath = ' . $filepath + . '<br />rootpath = ' . $rootpath; include('includes/footer.inc'); exit; */ Modified: trunk/GoodsReceivedControlled.php =================================================================== --- trunk/GoodsReceivedControlled.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/GoodsReceivedControlled.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -24,7 +24,7 @@ if (!isset($_SESSION['PO'.$identifier])) { /* This page can only be called with a purchase order number for receiving*/ echo '<div class="centre"><a href="' . $rootpath . '/PO_SelectOSPurchOrder.php">'. - _('Select a purchase order to receive'). '</a></div><br>'; + _('Select a purchase order to receive'). '</a></div><br />'; prnMsg( _('This page can only be opened if a purchase order and line item has been selected') . '. ' . _('Please do that first'),'error'); include('includes/footer.inc'); exit; @@ -59,9 +59,9 @@ ********************************************/ echo '<div class="centre">'; -echo '<br><a href="'.$rootpath.'/GoodsReceived.php?identifier=' .$identifier . '">'. _('Back To Purchase Order'). ' # '. $_SESSION['PO'.$identifier]->OrderNo . '</a>'; +echo '<br /><a href="'.$rootpath.'/GoodsReceived.php?identifier=' .$identifier . '">'. _('Back To Purchase Order'). ' # '. $_SESSION['PO'.$identifier]->OrderNo . '</a>'; -echo '<br><font size=2><b>'. _('Receive controlled item'). ' '. $LineItem->StockID . ' - ' . $LineItem->ItemDescription . +echo '<br /><font size=2><b>'. _('Receive controlled item'). ' '. $LineItem->StockID . ' - ' . $LineItem->ItemDescription . ' ' . _('on order') . ' ' . $_SESSION['PO'.$identifier]->OrderNo . ' ' . _('from') . ' ' . $_SESSION['PO'.$identifier]->SupplierName . '</b></font></div>'; /** vars needed by InputSerialItem : **/ @@ -72,7 +72,7 @@ $ShowExisting = false; include ('includes/InputSerialItems.php'); -//echo '<br><input type=submit name=\'AddBatches\' VALUE=\'Enter\'><br>'; +//echo '<br /><input type=submit name=\'AddBatches\' VALUE=\'Enter\'><br />'; /*TotalQuantity set inside this include file from the sum of the bundles of the item selected for dispatch */ Modified: trunk/InventoryPlanningPrefSupplier.php =================================================================== --- trunk/InventoryPlanningPrefSupplier.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/InventoryPlanningPrefSupplier.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -208,9 +208,9 @@ $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?' . SID . "'>" . _('Back to the menu') . '</a>'; + echo "<br /><a href='" .$rootpath .'/index.php?' . SID . "'>" . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br>$SQL"; + echo "<br />$SQL"; } include('includes/footer.inc'); exit; @@ -276,9 +276,9 @@ $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?' . SID . "'>" . _('Back to the menu') . '</a>'; + echo "<br /><a href='" .$rootpath .'/index.php?' . SID . "'>" . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br>$SQL"; + echo "<br />$SQL"; } include('includes/footer.... [truncated message content] |
From: <dai...@us...> - 2011-07-02 22:51:52
|
Revision: 4617 http://web-erp.svn.sourceforge.net/web-erp/?rev=4617&view=rev Author: daintree Date: 2011-07-02 22:51:40 +0000 (Sat, 02 Jul 2011) Log Message: ----------- mb_strlen Modified Paths: -------------- trunk/AccountSections.php trunk/AddCustomerContacts.php trunk/AddCustomerNotes.php trunk/AddCustomerTypeNotes.php trunk/AgedDebtors.php trunk/AgedSuppliers.php trunk/Areas.php trunk/BOMInquiry.php trunk/BOMListing.php trunk/BOMs.php trunk/BankAccounts.php trunk/CompanyPreferences.php trunk/ConfirmDispatch_Invoice.php trunk/ContractBOM.php trunk/Contracts.php trunk/CounterSales.php trunk/CreditStatus.php trunk/Currencies.php trunk/CustEDISetup.php trunk/CustLoginSetup.php trunk/CustomerBranches.php trunk/CustomerReceipt.php trunk/CustomerTypes.php trunk/Customers.php trunk/DailySalesInquiry.php trunk/DebtorsAtPeriodEnd.php trunk/DeliveryDetails.php trunk/EDIProcessOrders.php trunk/EmailConfirmation.php trunk/Factors.php trunk/FixedAssetCategories.php trunk/FixedAssetItems.php trunk/FixedAssetLocations.php trunk/FormDesigner.php trunk/FreightCosts.php trunk/GLAccountReport.php trunk/GLAccounts.php trunk/GLTransInquiry.php trunk/GetStockImage.php trunk/InventoryPlanning.php trunk/InventoryValuation.php trunk/MRPDemandTypes.php trunk/MRPDemands.php trunk/MRPReport.php trunk/Numbers/Words/lang.bg.php trunk/Numbers/Words/lang.cs.php trunk/Numbers/Words/lang.de.php trunk/Numbers/Words/lang.dk.php trunk/Numbers/Words/lang.en_100.php trunk/Numbers/Words/lang.en_GB.php trunk/Numbers/Words/lang.en_US.php trunk/Numbers/Words/lang.es.php trunk/Numbers/Words/lang.es_AR.php trunk/Numbers/Words/lang.et.php trunk/Numbers/Words/lang.fr.php trunk/Numbers/Words/lang.fr_BE.php trunk/Numbers/Words/lang.he.php trunk/Numbers/Words/lang.hu_HU.php trunk/Numbers/Words/lang.id.php trunk/Numbers/Words/lang.it_IT.php trunk/Numbers/Words/lang.lt.php trunk/Numbers/Words/lang.nl.php trunk/Numbers/Words/lang.pl.php trunk/Numbers/Words/lang.pt_BR.php trunk/Numbers/Words/lang.ru.php trunk/Numbers/Words/lang.sv.php trunk/Numbers/Words.php trunk/OutstandingGRNs.php trunk/PDFDeliveryDifferences.php trunk/PDFPriceList.php trunk/PDFPrintLabel.php trunk/PDFQuotation.php trunk/PDFQuotationPortrait.php trunk/PDFRemittanceAdvice.php trunk/PDFStockCheckComparison.php trunk/PDFStockLocTransfer.php trunk/PDFTopItems.php trunk/POReport.php trunk/PO_Header.php trunk/PO_Items.php trunk/PO_PDFPurchOrder.php trunk/PageSecurity.php trunk/PaymentTerms.php trunk/PcExpenses.php trunk/PcTabs.php trunk/PcTypeTabs.php trunk/Prices.php trunk/Prices_Customer.php trunk/PrintCheque.php trunk/PrintCustStatements.php trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php trunk/PurchData.php trunk/ReorderLevel.php trunk/SalesAnalReptCols.php trunk/SalesAnalRepts.php trunk/SalesCategories.php trunk/SalesInquiry.php trunk/SalesPeople.php trunk/SalesTypes.php trunk/SecurityTokens.php trunk/SelectCompletedOrder.php trunk/SelectCreditItems.php trunk/SelectCustomer.php trunk/SelectGLAccount.php trunk/SelectOrderItems.php trunk/SelectSalesOrder.php trunk/SelectSupplier.php trunk/Shipments.php trunk/Shippers.php trunk/SpecialOrder.php trunk/StockAdjustments.php trunk/StockCategories.php trunk/StockCheck.php trunk/StockCounts.php trunk/StockSerialItemResearch.php trunk/StockTransfers.php trunk/Stocks.php trunk/SuppLoginSetup.php trunk/SuppPaymentRun.php trunk/SupplierBalsAtPeriodEnd.php trunk/SupplierContacts.php trunk/SupplierCredit.php trunk/SupplierInvoice.php trunk/SupplierTenders.php trunk/SupplierTypes.php trunk/Suppliers.php trunk/SystemParameters.php trunk/TaxGroups.php trunk/UpgradeDatabase.php trunk/WOSerialNos.php trunk/WWW_Access.php trunk/WWW_Users.php trunk/WorkCentres.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/WorkOrderReceive.php trunk/Z_CreateCompanyTemplateFile.php trunk/Z_DataExport.php trunk/Z_ImportChartOfAccounts.php trunk/Z_ImportFixedAssets.php trunk/Z_ImportStocks.php trunk/Z_MakeNewCompany.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_poAddLanguage.php trunk/Z_poEditLangModule.php trunk/Z_poEditLangRemaining.php trunk/api/api_customers.php trunk/api/api_debtortransactions.php trunk/api/api_glaccounts.php trunk/api/api_glsections.php trunk/api/api_locations.php trunk/api/api_login.php trunk/api/api_purchdata.php trunk/api/api_salesorders.php trunk/api/api_stock.php trunk/api/api_stockcategories.php trunk/api/api_suppliers.php trunk/api/api_workorders.php trunk/includes/Add_SerialItems.php trunk/includes/Add_SerialItemsOut.php trunk/includes/DateFunctions.inc trunk/includes/MiscFunctions.php trunk/includes/PDFOrderPageHeader.inc trunk/includes/PDFOrderPageHeader_generic.inc trunk/includes/PDFPickingListHeader.inc trunk/includes/PDFSalesOrder_generic.inc trunk/includes/PO_PDFOrderPageHeader.inc trunk/includes/RFC822.php trunk/includes/class.pdf.php trunk/includes/mimePart.php trunk/includes/php-gettext/gettext.inc trunk/includes/php-gettext/streams.php trunk/includes/phplot/phplot.php trunk/includes/smtp.php trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/config/tcpdf_config.php trunk/includes/tcpdf/config/tcpdf_config_alt.php trunk/includes/tcpdf/tcpdf.php trunk/install/save.php trunk/install/timezone.php trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.mo trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/reportwriter/WriteForm.inc trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/RCFunctions.inc trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/AccountSections.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -74,7 +74,7 @@ $Errors[$i] = 'SectionName'; $i++; } - if (strlen($_POST['SectionName'])==0) { + if (mb_strlen($_POST['SectionName'])==0) { $InputError = 1; prnMsg( _('The account section name must contain at least one character') ,'error'); $Errors[$i] = 'SectionName'; Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/AddCustomerContacts.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -39,13 +39,13 @@ if (isset($_POST['Con_ID']) and !is_long((integer)$_POST['Con_ID'])) { $InputError = 1; prnMsg( _('The Contact ID must be an integer.'), 'error'); - } elseif (strlen($_POST['ContactName']) >40) { + } elseif (mb_strlen($_POST['ContactName']) >40) { $InputError = 1; prnMsg( _('The contact name must be forty characters or less long'), 'error'); } elseif( trim($_POST['ContactName']) == '' ) { $InputError = 1; prnMsg( _('The contact name may not be empty'), 'error'); - }elseif (!IsEmailAddress($_POST['ContactEmail']) AND strlen($_POST['ContactEmail'])>0){ + }elseif (!IsEmailAddress($_POST['ContactEmail']) AND mb_strlen($_POST['ContactEmail'])>0){ $InputError = 1; prnMsg( _('The contact email address is not a valid email address'), 'error'); } Modified: trunk/AddCustomerNotes.php =================================================================== --- trunk/AddCustomerNotes.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/AddCustomerNotes.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -30,7 +30,7 @@ if (!is_long((integer)$_POST['priority'])) { $InputError = 1; prnMsg( _('The contact priority must be an integer.'), 'error'); - } elseif (strlen($_POST['note']) >200) { + } elseif (mb_strlen($_POST['note']) >200) { $InputError = 1; prnMsg( _("The contact's notes must be two hundred characters or less long"), 'error'); } elseif( trim($_POST['note']) == '' ) { Modified: trunk/AddCustomerTypeNotes.php =================================================================== --- trunk/AddCustomerTypeNotes.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/AddCustomerTypeNotes.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -28,7 +28,7 @@ if (!is_long((integer)$_POST['priority'])) { $InputError = 1; prnMsg(_('The Contact priority must be an integer.'), 'error'); - } elseif (strlen($_POST['note']) >200) { + } elseif (mb_strlen($_POST['note']) >200) { $InputError = 1; prnMsg(_("The contact's notes must be two hundred characters or less long"), 'error'); } elseif( trim($_POST['note']) == '' ) { Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/AgedDebtors.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -6,9 +6,9 @@ if (isset($_POST['PrintPDF']) and isset($_POST['FromCriteria']) - and strlen($_POST['FromCriteria'])>=1 + and mb_strlen($_POST['FromCriteria'])>=1 and isset($_POST['ToCriteria']) - and strlen($_POST['ToCriteria'])>=1) { + and mb_strlen($_POST['ToCriteria'])>=1) { include('includes/PDFStarter.php'); $pdf->addInfo('Title',_('Aged Customer Balance Listing')); Modified: trunk/AgedSuppliers.php =================================================================== --- trunk/AgedSuppliers.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/AgedSuppliers.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -6,9 +6,9 @@ If (isset($_POST['PrintPDF']) AND isset($_POST['FromCriteria']) - AND strlen($_POST['FromCriteria'])>=1 + AND mb_strlen($_POST['FromCriteria'])>=1 AND isset($_POST['ToCriteria']) - AND strlen($_POST['ToCriteria'])>=1){ + AND mb_strlen($_POST['ToCriteria'])>=1){ include('includes/PDFStarter.php'); Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/Areas.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -35,7 +35,7 @@ $result = DB_query($sql, $db); $myrow = DB_fetch_row($result); // mod to handle 3 char area codes - if (strlen($_POST['AreaCode']) > 3) { + if (mb_strlen($_POST['AreaCode']) > 3) { $InputError = 1; prnMsg(_('The area code must be three characters or less long'),'error'); $Errors[$i] = 'AreaCode'; @@ -45,7 +45,7 @@ prnMsg(_('The area code entered already exists'),'error'); $Errors[$i] = 'AreaCode'; $i++; - } elseif (strlen($_POST['AreaDescription']) >25) { + } elseif (mb_strlen($_POST['AreaDescription']) >25) { $InputError = 1; prnMsg(_('The area description must be twenty five characters or less long'),'error'); $Errors[$i] = 'AreaDescription'; Modified: trunk/BOMInquiry.php =================================================================== --- trunk/BOMInquiry.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/BOMInquiry.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -41,7 +41,7 @@ if ($_POST['Keywords']=='' AND $_POST['StockCode']=='') { prnMsg( _('At least one stock description keyword or an extract of a stock code must be entered for the search'), 'info' ); } else { - if (strlen($_POST['Keywords'])>0) { + if (mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -61,7 +61,7 @@ stockmaster.mbflag ORDER BY stockmaster.stockid"; - } elseif (strlen($_POST['StockCode'])>0){ + } elseif (mb_strlen($_POST['StockCode'])>0){ $sql = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units, Modified: trunk/BOMListing.php =================================================================== --- trunk/BOMListing.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/BOMListing.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -6,9 +6,9 @@ If (isset($_POST['PrintPDF']) AND isset($_POST['FromCriteria']) - AND strlen($_POST['FromCriteria'])>=1 + AND mb_strlen($_POST['FromCriteria'])>=1 AND isset($_POST['ToCriteria']) - AND strlen($_POST['ToCriteria'])>=1){ + AND mb_strlen($_POST['ToCriteria'])>=1){ include('includes/PDFStarter.php'); $pdf->addInfo('Title',_('Bill Of Material Listing')); Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/BOMs.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -745,7 +745,7 @@ if ($_POST['Keywords']=='' AND $_POST['StockCode']=='') { prnMsg( _('At least one stock description keyword or an extract of a stock code must be entered for the search'), 'info' ); } else { - if (strlen($_POST['Keywords'])>0) { + if (mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -765,7 +765,7 @@ stockmaster.mbflag ORDER BY stockmaster.stockid"; - } elseif (strlen($_POST['StockCode'])>0){ + } elseif (mb_strlen($_POST['StockCode'])>0){ $sql = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units, Modified: trunk/BankAccounts.php =================================================================== --- trunk/BankAccounts.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/BankAccounts.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -45,7 +45,7 @@ $Errors[$i] = 'AccountCode'; $i++; } - if (strlen($_POST['BankAccountName']) >50) { + if (mb_strlen($_POST['BankAccountName']) >50) { $InputError = 1; prnMsg(_('The bank account name must be fifty characters or less long'),'error'); $Errors[$i] = 'AccountName'; @@ -63,13 +63,13 @@ $Errors[$i] = 'AccountNumber'; $i++; } - if (strlen($_POST['BankAccountNumber']) >50) { + if (mb_strlen($_POST['BankAccountNumber']) >50) { $InputError = 1; prnMsg(_('The bank account number must be fifty characters or less long'),'error'); $Errors[$i] = 'AccountNumber'; $i++; } - if (strlen($_POST['BankAddress']) >50) { + if (mb_strlen($_POST['BankAddress']) >50) { $InputError = 1; prnMsg(_('The bank address must be fifty characters or less long'),'error'); $Errors[$i] = 'BankAddress'; Modified: trunk/CompanyPreferences.php =================================================================== --- trunk/CompanyPreferences.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/CompanyPreferences.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -25,67 +25,67 @@ //first off validate inputs sensible - if (strlen($_POST['CoyName']) > 40 OR strlen($_POST['CoyName'])==0) { + if (mb_strlen($_POST['CoyName']) > 40 OR mb_strlen($_POST['CoyName'])==0) { $InputError = 1; prnMsg(_('The company name must be entered and be fifty characters or less long'), 'error'); $Errors[$i] = 'CoyName'; $i++; } - if (strlen($_POST['RegOffice1']) >40) { + if (mb_strlen($_POST['RegOffice1']) >40) { $InputError = 1; prnMsg(_('The Line 1 of the address must be forty characters or less long'),'error'); $Errors[$i] = 'RegOffice1'; $i++; } - if (strlen($_POST['RegOffice2']) >40) { + if (mb_strlen($_POST['RegOffice2']) >40) { $InputError = 1; prnMsg(_('The Line 2 of the address must be forty characters or less long'),'error'); $Errors[$i] = 'RegOffice2'; $i++; } - if (strlen($_POST['RegOffice3']) >40) { + if (mb_strlen($_POST['RegOffice3']) >40) { $InputError = 1; prnMsg(_('The Line 3 of the address must be forty characters or less long'),'error'); $Errors[$i] = 'RegOffice3'; $i++; } - if (strlen($_POST['RegOffice4']) >40) { + if (mb_strlen($_POST['RegOffice4']) >40) { $InputError = 1; prnMsg(_('The Line 4 of the address must be forty characters or less long'),'error'); $Errors[$i] = 'RegOffice4'; $i++; } - if (strlen($_POST['RegOffice5']) >20) { + if (mb_strlen($_POST['RegOffice5']) >20) { $InputError = 1; prnMsg(_('The Line 5 of the address must be twenty characters or less long'),'error'); $Errors[$i] = 'RegOffice5'; $i++; } - if (strlen($_POST['RegOffice6']) >15) { + if (mb_strlen($_POST['RegOffice6']) >15) { $InputError = 1; prnMsg(_('The Line 6 of the address must be fifteen characters or less long'),'error'); $Errors[$i] = 'RegOffice6'; $i++; } - if (strlen($_POST['Telephone']) >25) { + if (mb_strlen($_POST['Telephone']) >25) { $InputError = 1; prnMsg(_('The telephone number must be 25 characters or less long'),'error'); $Errors[$i] = 'Telephone'; $i++; } - if (strlen($_POST['Fax']) >25) { + if (mb_strlen($_POST['Fax']) >25) { $InputError = 1; prnMsg(_('The fax number must be 25 characters or less long'),'error'); $Errors[$i] = 'Fax'; $i++; } - if (strlen($_POST['Email']) >55) { + if (mb_strlen($_POST['Email']) >55) { $InputError = 1; prnMsg(_('The email address must be 55 characters or less long'),'error'); $Errors[$i] = 'Email'; $i++; } - if (strlen($_POST['Email'])>0 and !IsEmailAddress($_POST['Email'])) { + if (mb_strlen($_POST['Email'])>0 and !IsEmailAddress($_POST['Email'])) { $InputError = 1; prnMsg(_('The email address is not correctly formed'),'error'); $Errors[$i] = 'Email'; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/ConfirmDispatch_Invoice.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -391,7 +391,7 @@ } } echo '</tr>'; - if (strlen($LnItm->Narrative)>1){ + if (mb_strlen($LnItm->Narrative)>1){ $narrative=str_replace('\r\n','<br />', $LnItm->Narrative); echo $RowStarter . '<td colspan=12>' . stripslashes($narrative) . '</td></tr>'; } @@ -804,7 +804,7 @@ if ($HyphenOccursAt == false){ $AssetNumber = intval(substr($OrderLine->StockID,6)); } else { - $AssetNumber = intval(substr($OrderLine->StockID,6,strlen($OrderLine->StockID)-$HyphenOccursAt-1)); + $AssetNumber = intval(substr($OrderLine->StockID,6,mb_strlen($OrderLine->StockID)-$HyphenOccursAt-1)); } prnMsg (_('The asset number beind disposed of is:') . ' ' . $AssetNumber, 'info'); } else { Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/ContractBOM.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -166,7 +166,7 @@ /* take the form entries and enter the data from the form into the PurchOrder class variable */ foreach ($_POST as $ItemCode => $Quantity) { if (substr($ItemCode, 0, 3)=='Qty') { - $ItemCode=substr($ItemCode, 3, strlen($ItemCode)-3); + $ItemCode=substr($ItemCode, 3, mb_strlen($ItemCode)-3); $AlreadyOnThisBOM = 0; if (count($_SESSION['Contract'.$identifier]->ContractBOM)!=0){ Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/Contracts.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -73,7 +73,7 @@ /*User hit the button to enter line items - then meta refresh to Contract_Items.php*/ $InputError = false; - if(strlen($_SESSION['Contract'.$identifier]->ContractRef)<2){ + if(mb_strlen($_SESSION['Contract'.$identifier]->ContractRef)<2){ prnMsg(_('The contract reference must be entered (and be longer than 2 characters) before the requirements of the contract can be setup'),'warn'); $InputError = true; } @@ -107,7 +107,7 @@ $filename = $_SESSION['part_pics_dir'] . '/' . $_SESSION['Contract'.$identifier]->ContractRef . '.jpg'; //But check for the worst - if (strtoupper(substr(trim($_FILES['Drawing']['name']),strlen($_FILES['Drawing']['name'])-3))!='JPG'){ + if (strtoupper(substr(trim($_FILES['Drawing']['name']),mb_strlen($_FILES['Drawing']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['Drawing']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check @@ -220,7 +220,7 @@ //First update the session['Contract'.$identifier] variable with all inputs from the form $InputError = False; //assume no errors on input then test for errors - if (strlen($_POST['ContractRef']) < 2){ + if (mb_strlen($_POST['ContractRef']) < 2){ prnMsg(_('The contract reference is expected to be more than 2 characters long. Please alter the contract reference before proceeding.'),'error'); $InputError = true; } @@ -235,7 +235,7 @@ prnMsg(_('The contract reference cannot be the same as a previously created stock item. Please modify the contract reference before continuing'),'error'); $InputError=true; } - if (strlen($_POST['ContractDescription'])<10){ + if (mb_strlen($_POST['ContractDescription'])<10){ prnMsg(_('The contract description is expected to be more than 10 characters long. Please alter the contract description in full before proceeding.'),'error'); $InputError = true; } @@ -609,7 +609,7 @@ if (($_POST['CustKeywords']=='') AND ($_POST['CustCode']=='') AND ($_POST['CustPhone']=='')) { prnMsg(_('At least one Customer Branch Name keyword OR an extract of a Customer Branch Code or Branch Phone Number must be entered for the search'), 'warn'); } else { - if (strlen($_POST['CustKeywords'])>0) { + if (mb_strlen($_POST['CustKeywords'])>0) { //insert wildcard characters in spaces $_POST['CustKeywords'] = strtoupper(trim($_POST['CustKeywords'])); $SearchString = '%' . str_replace(' ', '%', $_POST['CustKeywords']) . '%'; @@ -628,7 +628,7 @@ AND custbranch.disabletrans=0 ORDER BY custbranch.debtorno, custbranch.branchcode"; - } elseif (strlen($_POST['CustCode'])>0){ + } elseif (mb_strlen($_POST['CustCode'])>0){ $_POST['CustCode'] = strtoupper(trim($_POST['CustCode'])); @@ -646,7 +646,7 @@ AND custbranch.disabletrans=0 ORDER BY custbranch.debtorno"; - } elseif (strlen($_POST['CustPhone'])>0){ + } elseif (mb_strlen($_POST['CustPhone'])>0){ $SQL = "SELECT custbranch.brname, custbranch.contactname, custbranch.phoneno, Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/CounterSales.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -221,7 +221,7 @@ } else if ($_POST['Keywords']=='' AND $_POST['StockCode']=='') { $msg='<div class="page_help_text">' . _('Stock Category has been used in search') . '.</div>'; } - if (isset($_POST['Keywords']) AND strlen($_POST['Keywords'])>0) { + if (isset($_POST['Keywords']) AND mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $_POST['Keywords'] = strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -254,7 +254,7 @@ ORDER BY stockmaster.stockid"; } - } else if (strlen($_POST['StockCode'])>0){ + } else if (mb_strlen($_POST['StockCode'])>0){ $_POST['StockCode'] = strtoupper($_POST['StockCode']); $SearchString = '%' . $_POST['StockCode'] . '%'; Modified: trunk/CreditStatus.php =================================================================== --- trunk/CreditStatus.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/CreditStatus.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -47,11 +47,11 @@ $Errors[$i] = 'ReasonCode'; $i++; } - if (strlen($_POST['ReasonDescription']) > 30) { + if (mb_strlen($_POST['ReasonDescription']) > 30) { $InputError = 1; prnMsg(_('The credit status description must be thirty characters or less long'),'error'); } - if (strlen($_POST['ReasonDescription']) == 0) { + if (mb_strlen($_POST['ReasonDescription']) == 0) { $InputError = 1; prnMsg(_('The credit status description must be entered'),'error'); $Errors[$i] = 'ReasonDescription'; Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/Currencies.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -50,7 +50,7 @@ $Errors[$i] = 'Abbreviation'; $i++; } - if (strlen($_POST['Abbreviation']) > 3) { + if (mb_strlen($_POST['Abbreviation']) > 3) { $InputError = 1; prnMsg(_('The currency abbreviation must be 3 characters or less long and for automated currency updates to work correctly be one of the ISO4217 currency codes'),'error'); $Errors[$i] = 'Abbreviation'; @@ -78,19 +78,19 @@ $Errors[$i] = 'DecimalPlaces'; $i++; } - if (strlen($_POST['CurrencyName']) > 20) { + if (mb_strlen($_POST['CurrencyName']) > 20) { $InputError = 1; prnMsg(_('The currency name must be 20 characters or less long'),'error'); $Errors[$i] = 'CurrencyName'; $i++; } - if (strlen($_POST['Country']) > 50) { + if (mb_strlen($_POST['Country']) > 50) { $InputError = 1; prnMsg(_('The currency country must be 50 characters or less long'),'error'); $Errors[$i] = 'Country'; $i++; } - if (strlen($_POST['HundredsName']) > 15) { + if (mb_strlen($_POST['HundredsName']) > 15) { $InputError = 1; prnMsg(_('The hundredths name must be 15 characters or less long'),'error'); $Errors[$i] = 'HundredsName'; Modified: trunk/CustEDISetup.php =================================================================== --- trunk/CustEDISetup.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/CustEDISetup.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -30,13 +30,13 @@ $InputError = 1; prnMsg(_('The customers EDI reference code cannot contain any of the following characters') .' - \' & + \" ' . _('or a space'),'warn'); } - if (strlen($_POST['EDIReference'])<4 AND ($_POST['EDIInvoices']==1 OR $_POST['EDIOrders']==1)){ + if (mb_strlen($_POST['EDIReference'])<4 AND ($_POST['EDIInvoices']==1 OR $_POST['EDIOrders']==1)){ $InputError = 1; prnMsg(_('The customers EDI reference code must be set when EDI Invoices or EDI orders are activated'),'warn'); $Errors[$i] = 'EDIReference'; $i++; } - if (strlen($_POST['EDIAddress'])<4 AND $_POST['EDIInvoices']==1){ + if (mb_strlen($_POST['EDIAddress'])<4 AND $_POST['EDIInvoices']==1){ $InputError = 1; prnMsg(_('The customers EDI email address or FTP server address must be entered if EDI Invoices are to be sent'),'warn'); $Errors[$i] = 'EDIAddress'; Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/CustLoginSetup.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -37,13 +37,13 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - if (strlen($_POST['UserID'])<3){ + if (mb_strlen($_POST['UserID'])<3){ $InputError = 1; prnMsg(_('The user ID entered must be at least 4 characters long'),'error'); } elseif (ContainsIllegalCharacters($_POST['UserID']) OR strstr($_POST['UserID'],' ')) { $InputError = 1; prnMsg(_('User names cannot contain any of the following characters') . " - ' & + \" \\ " . _('or a space'),'error'); - } elseif (strlen($_POST['Password'])<5){ + } elseif (mb_strlen($_POST['Password'])<5){ if (!$SelectedUser){ $InputError = 1; prnMsg(_('The password entered must be at least 5 characters long'),'error'); @@ -51,12 +51,12 @@ } elseif (strstr($_POST['Password'],$_POST['UserID'])!= False){ $InputError = 1; prnMsg(_('The password cannot contain the user id'),'error'); - } elseif ((strlen($_POST['Cust'])>0) AND (strlen($_POST['BranchCode'])==0)) { + } elseif ((mb_strlen($_POST['Cust'])>0) AND (mb_strlen($_POST['BranchCode'])==0)) { $InputError = 1; prnMsg(_('If you enter a Customer Code you must also enter a Branch Code valid for this Customer'),'error'); } - if ((strlen($_POST['BranchCode'])>0) AND ($InputError !=1)) { + if ((mb_strlen($_POST['BranchCode'])>0) AND ($InputError !=1)) { // check that the entered branch is valid for the customer code $sql = "SELECT defaultlocation FROM custbranch Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/CustomerBranches.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -52,7 +52,7 @@ $Errors[$i] = 'BranchCode'; $i++; } - if (strlen($_POST['BranchCode'])==0) { + if (mb_strlen($_POST['BranchCode'])==0) { $InputError = 1; prnMsg(_('The Branch code must be at least one character long'),'error'); $Errors[$i] = 'BranchCode'; Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/CustomerReceipt.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -542,7 +542,7 @@ if ($_POST['Keywords']=="" AND $_POST['CustCode']=="" AND $_POST['CustInvNo']=="") { $msg=_('At least one Customer Name keyword OR an extract of a Customer Code must be entered for the search'); } else { - if (strlen($_POST['Keywords'])>0) { + if (mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -552,13 +552,13 @@ WHERE debtorsmaster.name " . LIKE . " '". $SearchString . "' AND debtorsmaster.currcode= '" . $_SESSION['ReceiptBatch']->Currency . "'"; - } elseif (strlen($_POST['CustCode'])>0){ + } elseif (mb_strlen($_POST['CustCode'])>0){ $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name FROM debtorsmaster WHERE debtorsmaster.debtorno " . LIKE . " '%" . $_POST['CustCode'] . "%' AND debtorsmaster.currcode= '" . $_SESSION['ReceiptBatch']->Currency . "'"; - } elseif (strlen($_POST['CustInvNo'])>0){ + } elseif (mb_strlen($_POST['CustInvNo'])>0){ $SQL = "SELECT debtortrans.debtorno, debtorsmaster.name FROM debtorsmaster LEFT JOIN debtortrans Modified: trunk/CustomerTypes.php =================================================================== --- trunk/CustomerTypes.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/CustomerTypes.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -32,14 +32,14 @@ //first off validate inputs sensible $i=1; - if (strlen($_POST['typename']) >100) { + if (mb_strlen($_POST['typename']) >100) { $InputError = 1; prnMsg(_('The customer type name description must be 100 characters or less long'),'error'); $Errors[$i] = 'CustomerType'; $i++; } - if (strlen($_POST['typename'])==0) { + if (mb_strlen($_POST['typename'])==0) { $InputError = 1; echo '<br />'; prnMsg(_('The customer type name description must contain at least one character'),'error'); Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/Customers.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -39,12 +39,12 @@ prnMsg( _('The customer number already exists in the database'),'error'); $Errors[$i] = 'DebtorNo'; $i++; - }elseif (strlen($_POST['CustName']) > 40 OR strlen($_POST['CustName'])==0) { + }elseif (mb_strlen($_POST['CustName']) > 40 OR mb_strlen($_POST['CustName'])==0) { $InputError = 1; prnMsg( _('The customer name must be entered and be forty characters or less long'),'error'); $Errors[$i] = 'CustName'; $i++; - } elseif ($_SESSION['AutoDebtorNo']==0 AND strlen($_POST['DebtorNo']) ==0) { + } elseif ($_SESSION['AutoDebtorNo']==0 AND mb_strlen($_POST['DebtorNo']) ==0) { $InputError = 1; prnMsg( _('The debtor code cannot be empty'),'error'); $Errors[$i] = 'DebtorNo'; @@ -54,56 +54,56 @@ prnMsg( _('The customer code cannot contain any of the following characters') . " . - ' & + \" " . _('or a space'),'error'); $Errors[$i] = 'DebtorNo'; $i++; - } elseif (strlen($_POST['Address1']) >40) { + } elseif (mb_strlen($_POST['Address1']) >40) { $InputError = 1; prnMsg( _('The Line 1 of the address must be forty characters or less long'),'error'); $Errors[$i] = 'Address1'; $i++; - } elseif (strlen($_POST['Address2']) >40) { + } elseif (mb_strlen($_POST['Address2']) >40) { $InputError = 1; prnMsg( _('The Line 2 of the address must be forty characters or less long'),'error'); $Errors[$i] = 'Address2'; $i++; - } elseif (strlen($_POST['Address3']) >40) { + } elseif (mb_strlen($_POST['Address3']) >40) { $InputError = 1; prnMsg( _('The Line 3 of the address must be forty characters or less long'),'error'); $Errors[$i] = 'Address3'; $i++; - } elseif (strlen($_POST['Address4']) >50) { + } elseif (mb_strlen($_POST['Address4']) >50) { $InputError = 1; prnMsg( _('The Line 4 of the address must be fifty characters or less long'),'error'); $Errors[$i] = 'Address4'; $i++; - } elseif (strlen($_POST['Address5']) >20) { + } elseif (mb_strlen($_POST['Address5']) >20) { $InputError = 1; prnMsg( _('The Line 5 of the address must be twenty characters or less long'),'error'); $Errors[$i] = 'Address5'; $i++; - } elseif (strlen($_POST['Address6']) >15) { + } elseif (mb_strlen($_POST['Address6']) >15) { $InputError = 1; prnMsg( _('The Line 6 of the address must be fifteen characters or less long'),'error'); $Errors[$i] = 'Address6'; $i++; } - elseif (strlen($_POST['Phone']) >25) { + elseif (mb_strlen($_POST['Phone']) >25) { $InputError = 1; prnMsg(_('The telephone number must be 25 characters or less long'),'error'); $Errors[$i] = 'Telephone'; $i++; } - elseif (strlen($_POST['Fax']) >25) { + elseif (mb_strlen($_POST['Fax']) >25) { $InputError = 1; prnMsg(_('The fax number must be 25 characters or less long'),'error'); $Errors[$i] = 'Fax'; $i++; } - elseif (strlen($_POST['Email']) >55) { + elseif (mb_strlen($_POST['Email']) >55) { $InputError = 1; prnMsg(_('The email address must be 55 characters or less long'),'error'); $Errors[$i] = 'Email'; $i++; } - elseif (strlen($_POST['Email'])>0 and !IsEmailAddress($_POST['Email'])) { + elseif (mb_strlen($_POST['Email'])>0 and !IsEmailAddress($_POST['Email'])) { $InputError = 1; prnMsg(_('The email address is not correctly formed'),'error'); $Errors[$i] = 'Email'; Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/DailySalesInquiry.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -64,7 +64,7 @@ $Date_Array = explode('.',$EndDateSQL); } -if (strlen($Date_Array[2])>4) { +if (mb_strlen($Date_Array[2])>4) { $Date_Array[2]= substr($Date_Array[2],0,2); } Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/DebtorsAtPeriodEnd.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -6,9 +6,9 @@ if (isset($_POST['PrintPDF']) AND isset($_POST['FromCriteria']) - AND strlen($_POST['FromCriteria'])>=1 + AND mb_strlen($_POST['FromCriteria'])>=1 AND isset($_POST['ToCriteria']) - AND strlen($_POST['ToCriteria'])>=1){ + AND mb_strlen($_POST['ToCriteria'])>=1){ include('includes/PDFStarter.php'); $pdf->addInfo('Title',_('Customer Balance Listing')); Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/DeliveryDetails.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -53,11 +53,11 @@ or isset($_POST['MakeRecurringOrder'])) { $InputErrors =0; - if (strlen($_POST['DeliverTo'])<=1){ + if (mb_strlen($_POST['DeliverTo'])<=1){ $InputErrors =1; prnMsg(_('You must enter the person or company to whom delivery should be made'),'error'); } - if (strlen($_POST['BrAdd1'])<=1){ + if (mb_strlen($_POST['BrAdd1'])<=1){ $InputErrors =1; prnMsg(_('You should enter the street address in the box provided') . '. ' . _('Orders cannot be accepted without a valid street address'),'error'); } @@ -77,13 +77,13 @@ prnMsg(_('You must select the type of packlist to print'),'error'); } -/* If (strlen($_POST['BrAdd3'])==0 OR !isset($_POST['BrAdd3'])){ +/* If (mb_strlen($_POST['BrAdd3'])==0 OR !isset($_POST['BrAdd3'])){ $InputErrors =1; echo "<br />A region or city must be entered.<br />"; } Maybe appropriate in some installations but not here - If (strlen($_POST['BrAdd2'])<=1){ + If (mb_strlen($_POST['BrAdd2'])<=1){ $InputErrors =1; echo "<br />You should enter the suburb in the box provided. Orders cannot be accepted without a valid suburb being entered.<br />"; } @@ -793,7 +793,7 @@ } -if (isset($_SESSION['Items'.$identifier]->SpecialInstructions) and strlen($_SESSION['Items'.$identifier]->SpecialInstructions)>0) { +if (isset($_SESSION['Items'.$identifier]->SpecialInstructions) and mb_strlen($_SESSION['Items'.$identifier]->SpecialInstructions)>0) { prnMsg($_SESSION['Items'.$identifier]->SpecialInstructions,'info'); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Delivery') . '" alt="" />' . ' ' . _('Delivery Details'); Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/EDIProcessOrders.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -322,10 +322,10 @@ break; case 'ALI': $ALI = explode('+',substr($LineText,4)); - if (strlen($ALI[0])>1){ + if (mb_strlen($ALI[0])>1){ $EmailText .= "\n" . _('Goods of origin') . ' ' . $ALI[0]; } - if (strlen($ALI[1])>1){ + if (mb_strlen($ALI[1])>1){ $EmailText .= "\n" . _('Duty regime code') . ' ' . $ALI[1]; } switch ($ALI[2]){ @@ -353,7 +353,7 @@ $FTX = explode('+',substr($LineText,4)); /*agreed coded text is not catered for ... yet only free form text */ - if (strlen($FTX[3])>5){ + if (mb_strlen($FTX[3])>5){ $FTX_C108=explode(':',$FTX[3]); $Order->Comments .= $FTX_C108[0] . " " . $FTX_C108[1] . ' ' . $FTX_C108[2] . ' ' . $FTX_C108[3] . ' ' . $FTX_C108[4]; $EmailText .= "\n" . $FTX_C108[0] . ' ' . $FTX_C108[1] . ' ' . $FTX_C108[2] . ' ' . $FTX_C108[3] . ' ' . $FTX_C108[4] . ' '; @@ -428,7 +428,7 @@ } break; } - if (strlen($NAD_C080[0])>0){ + if (mb_strlen($NAD_C080[0])>0){ $Order->CustomerName = $NAD_C080[0]; } break; @@ -445,10 +445,10 @@ /*Delivery Party - get the address and name etc */ /*Snag here - how do I figure out what branch to charge */ - if (strlen($NAD_C080[0])>0){ + if (mb_strlen($NAD_C080[0])>0){ $Order->DeliverTo = $NAD_C080[0]; } - if (strlen($NAD_C059[0])>0){ + if (mb_strlen($NAD_C059[0])>0){ $Order->DelAdd1 = $NAD_C059[0]; $Order->DelAdd2 = $NAD_C059[1]; $Order->DelAdd3 = $NAD_C059[2]; @@ -514,7 +514,7 @@ } /*end case Seg Tag*/ } /*end while get next line of message */ /*Thats the end of the message or had to abort */ - if (strlen($EmailText)>10){ + if (mb_strlen($EmailText)>10){ /*Now send the email off to the appropriate person */ $mail = new htmlMimeMail(); $mail->setText($EmailText); Modified: trunk/EmailConfirmation.php =================================================================== --- trunk/EmailConfirmation.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/EmailConfirmation.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -135,7 +135,7 @@ $myrow['deliverto'] . "</td></tr>"; $MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . $myrow['deladd1'] . "</td></tr>"; -If(strlen(trim($myrow['deladd2']))) +If(mb_strlen(trim($myrow['deladd2']))) { $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd2'] . "</td></tr>"; $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/Factors.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -33,11 +33,11 @@ if (isset($_POST['Submit']) OR isset($_POST['Update'])) { - if (strlen($_POST['FactorName']) > 40 or strlen($_POST['FactorName']) == 0 or $_POST['FactorName'] == '') { + if (mb_strlen($_POST['FactorName']) > 40 or mb_strlen($_POST['FactorName']) == 0 or $_POST['FactorName'] == '') { $InputError = 1; prnMsg(_('The factoring company name must be entered and be forty characters or less long'),'error'); } - if (strlen($_POST['Email'])>0 AND !IsEmailAddress($_POST['Email'])){ + if (mb_strlen($_POST['Email'])>0 AND !IsEmailAddress($_POST['Email'])){ prnMsg(_('The email address entered does not appear to be a valid email address format'),'error'); $InputError = 1; } Modified: trunk/FixedAssetCategories.php =================================================================== --- trunk/FixedAssetCategories.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/FixedAssetCategories.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -29,13 +29,13 @@ $_POST['CategoryID'] = strtoupper($_POST['CategoryID']); - if (strlen($_POST['CategoryID']) > 6) { + if (mb_strlen($_POST['CategoryID']) > 6) { $InputError = 1; prnMsg(_('The Fixed Asset Category code must be six characters or less long'),'error'); - } elseif (strlen($_POST['CategoryID'])==0) { + } elseif (mb_strlen($_POST['CategoryID'])==0) { $InputError = 1; prnMsg(_('The Fixed Asset Category code must be at least 1 character but less than six characters long'),'error'); - } elseif (strlen($_POST['CategoryDescription']) >20) { + } elseif (mb_strlen($_POST['CategoryDescription']) >20) { $InputError = 1; prnMsg(_('The Fixed Asset Category description must be twenty characters or less long'),'error'); } Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/FixedAssetItems.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -30,7 +30,7 @@ $filename = $_SESSION['part_pics_dir'] . '/ASSET_' . $AssetID . '.jpg'; //But check for the worst - if (strtoupper(substr(trim($_FILES['ItemPicture']['name']),strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ + if (strtoupper(substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['ItemPicture']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check @@ -72,20 +72,20 @@ $i=1; - if (!isset($_POST['Description']) or strlen($_POST['Description']) > 50 OR strlen($_POST['Description'])==0) { + if (!isset($_POST['Description']) or mb_strlen($_POST['Description']) > 50 OR mb_strlen($_POST['Description'])==0) { $InputError = 1; prnMsg (_('The asset description must be entered and be fifty characters or less long. It cannot be a zero length string either, a description is required'),'error'); $Errors[$i] = 'Description'; $i++; } - if (strlen($_POST['LongDescription'])==0) { + if (mb_strlen($_POST['LongDescription'])==0) { $InputError = 1; prnMsg (_('The asset long description cannot be a zero length string, a long description is required'),'error'); $Errors[$i] = 'LongDescription'; $i++; } - if (strlen($_POST['BarCode']) >20) { + if (mb_strlen($_POST['BarCode']) >20) { $InputError = 1; prnMsg(_('The barcode must be 20 characters or less long'),'error'); $Errors[$i] = 'BarCode'; @@ -272,7 +272,7 @@ prnMsg( _('Validation failed, no updates or deletes took place'), 'error'); } -} elseif (isset($_POST['delete']) AND strlen($_POST['delete']) >1 ) { +} elseif (isset($_POST['delete']) AND mb_strlen($_POST['delete']) >1 ) { //the button to delete a selected record was clicked instead of the submit button $CancelDelete = 0; Modified: trunk/FixedAssetLocations.php =================================================================== --- trunk/FixedAssetLocations.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/FixedAssetLocations.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -10,11 +10,11 @@ if (isset($_POST['submit']) and !isset($_POST['delete'])) { $InputError=0; - if (!isset($_POST['LocationID']) or strlen($_POST['LocationID'])<1) { + if (!isset($_POST['LocationID']) or mb_strlen($_POST['LocationID'])<1) { prnMsg(_('You must enter at least one character in the location ID'),'error'); $InputError=1; } - if (!isset($_POST['LocationDescription']) or strlen($_POST['LocationDescription'])<1) { + if (!isset($_POST['LocationDescription']) or mb_strlen($_POST['LocationDescription'])<1) { prnMsg(_('You must enter at least one character in the location description'),'error'); $InputError=1; } @@ -44,7 +44,7 @@ if (isset($_POST['update']) and !isset($_POST['delete'])) { $InputError=0; - if (!isset($_POST['LocationDescription']) or strlen($_POST['LocationDescription'])<1) { + if (!isset($_POST['LocationDescription']) or mb_strlen($_POST['LocationDescription'])<1) { prnMsg(_('You must enter at least one character in the location description'),'error'); $InputError=1; } Modified: trunk/FormDesigner.php =================================================================== --- trunk/FormDesigner.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/FormDesigner.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -79,7 +79,7 @@ $FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/'.$_POST['FormName']); $FormDesign['name']=$_POST['formname']; if (substr($_POST['PaperSize'],-8)=='Portrait') { - $_POST['PaperSize']=substr($_POST['PaperSize'],0,strlen($_POST['PaperSize'])-9); + $_POST['PaperSize']=substr($_POST['PaperSize'],0,mb_strlen($_POST['PaperSize'])-9); } $FormDesign->PaperSize=$_POST['PaperSize']; $FormDesign->LineHeight=$_POST['LineHeight']; @@ -165,7 +165,7 @@ echo '<th width=33%>'._('Paper Size').'<select name="PaperSize">'; foreach ($Papers as $Paper) { if (substr($Paper,-8)=='Portrait') { - $PaperValue=substr($Paper,0,strlen($Paper)-9); + $PaperValue=substr($Paper,0,mb_strlen($Paper)-9); } else { $PaperValue=$Paper; } Modified: trunk/FreightCosts.php =================================================================== --- trunk/FreightCosts.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/FreightCosts.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -79,7 +79,7 @@ $InputError = 0; //first off validate inputs sensible - if (strlen($_POST['Destination'])<2){ + if (mb_strlen($_POST['Destination'])<2){ $InputError=1; prnMsg(_('The entry for the destination must be at least two characters long') . '. ' . _('These entries are matched against the town names entered for customer delivery addresses'),'warn'); } Modified: trunk/GLAccountReport.php =================================================================== --- trunk/GLAccountReport.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/GLAccountReport.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -220,7 +220,7 @@ /* $pdfcode = $pdf->output(); - $len = strlen($pdfcode); + $len = mb_strlen($pdfcode); if ($len<=20){ $title = _('Print GL Accounts Report Error'); Modified: trunk/GLAccounts.php =================================================================== --- trunk/GLAccounts.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/GLAccounts.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -28,7 +28,7 @@ if (!is_long((integer)$_POST['AccountCode'])) { $InputError = 1; prnMsg(_('The account code must be an integer'),'warn'); - } elseif (strlen($_POST['AccountName']) >50) { + } elseif (mb_strlen($_POST['AccountName']) >50) { $InputError = 1; prnMsg( _('The account name must be fifty characters or less long'),'warn'); } Modified: trunk/GLTransInquiry.php =================================================================== --- trunk/GLTransInquiry.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/GLTransInquiry.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -116,7 +116,7 @@ } else { $URL = $rootpath . '/GLAccountInquiry.php?Account=' . $TransRow['account']; - if( strlen($TransRow['narrative'])==0 ) { + if( mb_strlen($TransRow['narrative'])==0 ) { $TransRow['narrative'] = ' '; } if ( $TransRow['posted']==0 ) { Modified: trunk/GetStockImage.php =================================================================== --- trunk/GetStockImage.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/GetStockImage.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -22,26 +22,26 @@ // Color decode function function DecodeBgColor( $colorstr ) { if ( $colorstr[0] == '#' ) { - $colorstr = substr($colorstr,1,strlen($colorstr)); + $colorstr = substr($colorstr,1,mb_strlen($colorstr)); } $red = 0; - if(strlen($colorstr) > 1) { + if(mb_strlen($colorstr) > 1) { $red = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,strlen($colorstr)); + $colorstr = substr($colorstr,2,mb_strlen($colorstr)); } $green = 0; - if(strlen($colorstr) > 1) { + if(mb_strlen($colorstr) > 1) { $green = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,strlen($colorstr)); + $colorstr = substr($colorstr,2,mb_strlen($colorstr)); } $blue = 0; - if(strlen($colorstr) > 1) { + if(mb_strlen($colorstr) > 1) { $blue = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,strlen($colorstr)); + $colorstr = substr($colorstr,2,mb_strlen($colorstr)); } - if(strlen($colorstr) > 1) { + if(mb_strlen($colorstr) > 1) { $alpha = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,strlen($colorstr)); + $colorstr = substr($colorstr,2,mb_strlen($colorstr)); } if ( isset($alpha) ) return array('red' => $red, 'green' => $green, 'blue' => $blue, 'alpha' => $alpha ); @@ -120,7 +120,7 @@ if( $i === false ) $type = 'png'; else { - $type = strtolower(substr($stockid,$i+1,strlen($stockid))); + $type = strtolower(substr($stockid,$i+1,mb_strlen($stockid))); $stockid = substr($stockid,0,$i); if($blanktext && !isset($text)) $text = ''; @@ -224,12 +224,12 @@ if(!isset($text)) $text = $stockid; - if(strlen($text) > 0 ) { + if(mb_strlen($text) > 0 ) { $fw = imagefontwidth($fontsize); $fh = imagefontheight($fontsize); $fy = (imagesy($im) - ($fh)) / 2; $fyh = $fy + $fh - 1; - $textwidth = $fw * strlen($text); + $textwidth = $fw * mb_strlen($text); $px = (imagesx($im) - $textwidth) / 2; if (!$notextbg) imagefilledrectangle($im,$px,$fy,imagesx($im)-($px+1),$fyh, $ixtextbgcolor ); @@ -323,12 +323,12 @@ // 0,0,0,0); if(!isset($text)) $text = $stockid; - if(strlen($text) > 0 ) { + if(mb_strlen($text) > 0 ) { $fw = imagefontwidth($fontsize); $fh = imagefontheight($fontsize); $fy = imagesy($im) - ($fh); $fyh = imagesy($im) - 1; - $textwidth = $fw * strlen($text); + $textwidth = $fw * mb_strlen($text); $px = (imagesx($im) - $textwidth) / 2; if (!$notextbg) imagefilledrectangle($im,$px,$fy,imagesx($im)-($px+1),$fyh, $ixtextbgcolor ); Modified: trunk/InventoryPlanning.php =================================================================== --- trunk/InventoryPlanning.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/InventoryPlanning.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -7,9 +7,9 @@ if (isset($_POST['PrintPDF']) and isset($_POST['FromCriteria']) - and strlen($_POST['FromCriteria'])>=1 + and mb_strlen($_POST['FromCriteria'])>=1 and isset($_POST['ToCriteria']) - and strlen($_POST['ToCriteria'])>=1) { + and mb_strlen($_POST['ToCriteria'])>=1) { include ('includes/class.pdf.php'); Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/InventoryValuation.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -6,9 +6,9 @@ if (isset($_POST['PrintPDF']) AND isset($_POST['FromCriteria']) - AND strlen($_POST['FromCriteria'])>=1 + AND mb_strlen($_POST['FromCriteria'])>=1 AND isset($_POST['ToCriteria']) - AND strlen($_POST['ToCriteria'])>=1){ + AND mb_strlen($_POST['ToCriteria'])>=1){ include('includes/PDFStarter.php'); Modified: trunk/MRPDemandTypes.php =================================================================== --- trunk/MRPDemandTypes.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/MRPDemandTypes.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -32,11 +32,11 @@ prnMsg(_('The Demand Type is reserved for the system'),'error'); } - if (strlen($_POST['MRPDemandType']) < 1) { + if (mb_strlen($_POST['MRPDemandType']) < 1) { $InputError = 1; prnMsg(_('The Demand Type code must be at least 1 character long'),'error'); } - if (strlen($_POST['Description'])<3) { + if (mb_strlen($_POST['Description'])<3) { $InputError = 1; prnMsg(_('The Demand Type description must be at least 3 characters long'),'error'); } Modified: trunk/MRPDemands.php =================================================================== --- trunk/MRPDemands.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/MRPDemands.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -58,7 +58,7 @@ if ($_POST['Keywords']=='' AND $_POST['StockCode']=='') { $msg=_('At least one stock description keyword or an extract of a stock code must be entered for the search'); } else { - if (strlen($_POST['Keywords'])>0) { + if (mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -68,7 +68,7 @@ WHERE stockmaster.description " . LIKE . " '" . $SearchString ."' ORDER BY stockmaster.stockid"; - } elseif (strlen($_POST['StockCode'])>0){ + } elseif (mb_strlen($_POST['StockCode'])>0){ $sql = "SELECT stockmaster.stockid, stockmaster.description FROM stockmaster Modified: trunk/MRPReport.php =================================================================== --- trunk/MRPReport.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/MRPReport.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -422,7 +422,7 @@ // Details for Demand/Supply Sections $i = 0; - while ((isset($Supplies[$i]) and strlen($Supplies[$i]['part'])) > 1 or (isset($Requirements[$i]) and strlen($Requirements[$i]['part']) > 1)){ + while ((isset($Supplies[$i]) and mb_strlen($Supplies[$i]['part'])) > 1 or (isset($Requirements[$i]) and mb_strlen($Requirements[$i]['part']) > 1)){ $YPos -=$line_height; $FontSize=7; @@ -436,7 +436,7 @@ // 1) X position 2) Y position 3) Width // 4) Height 5) Text To Display 6) Alignment 7) Border 8) Fill - True to use SetFillColor // and False to set for transparent - if (isset($Requirements[$i]['part']) and strlen($Requirements[$i]['part']) > 1) { + if (isset($Requirements[$i]['part']) and mb_strlen($Requirements[$i]['part']) > 1) { $FormatedReqDueDate = ConvertSQLDate($Requirements[$i]['daterequired']); $pdf->addTextWrap($Left_Margin,$YPos,55,$FontSize,$Requirements[$i]['mrpdemandtype'],''); $pdf->addTextWrap(80,$YPos,90,$FontSize,$Requirements[$i]['whererequired'],''); @@ -445,7 +445,7 @@ $myrow['decimalplaces']),'right'); $pdf->addTextWrap(240,$YPos,50,$FontSize,$FormatedReqDueDate,'right'); } - if (strlen($Supplies[$i]['part']) > 1) { + if (mb_strlen($Supplies[$i]['part']) > 1) { $suptype = $Supplies[$i]['ordertype']; // If ordertype is not QOH,PO,or WO, it is an MRP generated planned order and the // ordertype is actually the demandtype that caused the planned order Modified: trunk/Numbers/Words/lang.bg.php =================================================================== --- trunk/Numbers/Words/lang.bg.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/Numbers/Words/lang.bg.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -310,9 +310,9 @@ { if (is_string($num)) { $ret = array(); - $strlen = strlen($num); - $first = substr($num, 0, $strlen%3); - preg_match_all('/\d{3}/', substr($num, $strlen%3, $strlen), $m); + $mb_strlen = mb_strlen($num); + $first = substr($num, 0, $mb_strlen%3); + preg_match_all('/\d{3}/', substr($num, $mb_strlen%3, $mb_strlen), $m); $ret =& $m[0]; if ($first) array_unshift($ret, $first); return $ret; @@ -452,7 +452,7 @@ } // if the absolute value is greater than 9.99*10^302, return infinity - if (strlen($num)>306) { + if (mb_strlen($num)>306) { return $ret_minus . $this->_infinity; } Modified: trunk/Numbers/Words/lang.cs.php =================================================================== --- trunk/Numbers/Words/lang.cs.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/Numbers/Words/lang.cs.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -178,8 +178,8 @@ $num = trim($num); $num = preg_replace('/^0+/','',$num); - if (strlen($num) > 3) { - $maxp = strlen($num)-1; + if (mb_strlen($num) > 3) { + $maxp = mb_strlen($num)-1; $cur... [truncated message content] |
From: <dai...@us...> - 2011-07-02 22:51:51
|
Revision: 4617 http://web-erp.svn.sourceforge.net/web-erp/?rev=4617&view=rev Author: daintree Date: 2011-07-02 22:51:40 +0000 (Sat, 02 Jul 2011) Log Message: ----------- mb_strlen Modified Paths: -------------- trunk/AccountSections.php trunk/AddCustomerContacts.php trunk/AddCustomerNotes.php trunk/AddCustomerTypeNotes.php trunk/AgedDebtors.php trunk/AgedSuppliers.php trunk/Areas.php trunk/BOMInquiry.php trunk/BOMListing.php trunk/BOMs.php trunk/BankAccounts.php trunk/CompanyPreferences.php trunk/ConfirmDispatch_Invoice.php trunk/ContractBOM.php trunk/Contracts.php trunk/CounterSales.php trunk/CreditStatus.php trunk/Currencies.php trunk/CustEDISetup.php trunk/CustLoginSetup.php trunk/CustomerBranches.php trunk/CustomerReceipt.php trunk/CustomerTypes.php trunk/Customers.php trunk/DailySalesInquiry.php trunk/DebtorsAtPeriodEnd.php trunk/DeliveryDetails.php trunk/EDIProcessOrders.php trunk/EmailConfirmation.php trunk/Factors.php trunk/FixedAssetCategories.php trunk/FixedAssetItems.php trunk/FixedAssetLocations.php trunk/FormDesigner.php trunk/FreightCosts.php trunk/GLAccountReport.php trunk/GLAccounts.php trunk/GLTransInquiry.php trunk/GetStockImage.php trunk/InventoryPlanning.php trunk/InventoryValuation.php trunk/MRPDemandTypes.php trunk/MRPDemands.php trunk/MRPReport.php trunk/Numbers/Words/lang.bg.php trunk/Numbers/Words/lang.cs.php trunk/Numbers/Words/lang.de.php trunk/Numbers/Words/lang.dk.php trunk/Numbers/Words/lang.en_100.php trunk/Numbers/Words/lang.en_GB.php trunk/Numbers/Words/lang.en_US.php trunk/Numbers/Words/lang.es.php trunk/Numbers/Words/lang.es_AR.php trunk/Numbers/Words/lang.et.php trunk/Numbers/Words/lang.fr.php trunk/Numbers/Words/lang.fr_BE.php trunk/Numbers/Words/lang.he.php trunk/Numbers/Words/lang.hu_HU.php trunk/Numbers/Words/lang.id.php trunk/Numbers/Words/lang.it_IT.php trunk/Numbers/Words/lang.lt.php trunk/Numbers/Words/lang.nl.php trunk/Numbers/Words/lang.pl.php trunk/Numbers/Words/lang.pt_BR.php trunk/Numbers/Words/lang.ru.php trunk/Numbers/Words/lang.sv.php trunk/Numbers/Words.php trunk/OutstandingGRNs.php trunk/PDFDeliveryDifferences.php trunk/PDFPriceList.php trunk/PDFPrintLabel.php trunk/PDFQuotation.php trunk/PDFQuotationPortrait.php trunk/PDFRemittanceAdvice.php trunk/PDFStockCheckComparison.php trunk/PDFStockLocTransfer.php trunk/PDFTopItems.php trunk/POReport.php trunk/PO_Header.php trunk/PO_Items.php trunk/PO_PDFPurchOrder.php trunk/PageSecurity.php trunk/PaymentTerms.php trunk/PcExpenses.php trunk/PcTabs.php trunk/PcTypeTabs.php trunk/Prices.php trunk/Prices_Customer.php trunk/PrintCheque.php trunk/PrintCustStatements.php trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php trunk/PurchData.php trunk/ReorderLevel.php trunk/SalesAnalReptCols.php trunk/SalesAnalRepts.php trunk/SalesCategories.php trunk/SalesInquiry.php trunk/SalesPeople.php trunk/SalesTypes.php trunk/SecurityTokens.php trunk/SelectCompletedOrder.php trunk/SelectCreditItems.php trunk/SelectCustomer.php trunk/SelectGLAccount.php trunk/SelectOrderItems.php trunk/SelectSalesOrder.php trunk/SelectSupplier.php trunk/Shipments.php trunk/Shippers.php trunk/SpecialOrder.php trunk/StockAdjustments.php trunk/StockCategories.php trunk/StockCheck.php trunk/StockCounts.php trunk/StockSerialItemResearch.php trunk/StockTransfers.php trunk/Stocks.php trunk/SuppLoginSetup.php trunk/SuppPaymentRun.php trunk/SupplierBalsAtPeriodEnd.php trunk/SupplierContacts.php trunk/SupplierCredit.php trunk/SupplierInvoice.php trunk/SupplierTenders.php trunk/SupplierTypes.php trunk/Suppliers.php trunk/SystemParameters.php trunk/TaxGroups.php trunk/UpgradeDatabase.php trunk/WOSerialNos.php trunk/WWW_Access.php trunk/WWW_Users.php trunk/WorkCentres.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/WorkOrderReceive.php trunk/Z_CreateCompanyTemplateFile.php trunk/Z_DataExport.php trunk/Z_ImportChartOfAccounts.php trunk/Z_ImportFixedAssets.php trunk/Z_ImportStocks.php trunk/Z_MakeNewCompany.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_poAddLanguage.php trunk/Z_poEditLangModule.php trunk/Z_poEditLangRemaining.php trunk/api/api_customers.php trunk/api/api_debtortransactions.php trunk/api/api_glaccounts.php trunk/api/api_glsections.php trunk/api/api_locations.php trunk/api/api_login.php trunk/api/api_purchdata.php trunk/api/api_salesorders.php trunk/api/api_stock.php trunk/api/api_stockcategories.php trunk/api/api_suppliers.php trunk/api/api_workorders.php trunk/includes/Add_SerialItems.php trunk/includes/Add_SerialItemsOut.php trunk/includes/DateFunctions.inc trunk/includes/MiscFunctions.php trunk/includes/PDFOrderPageHeader.inc trunk/includes/PDFOrderPageHeader_generic.inc trunk/includes/PDFPickingListHeader.inc trunk/includes/PDFSalesOrder_generic.inc trunk/includes/PO_PDFOrderPageHeader.inc trunk/includes/RFC822.php trunk/includes/class.pdf.php trunk/includes/mimePart.php trunk/includes/php-gettext/gettext.inc trunk/includes/php-gettext/streams.php trunk/includes/phplot/phplot.php trunk/includes/smtp.php trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/config/tcpdf_config.php trunk/includes/tcpdf/config/tcpdf_config_alt.php trunk/includes/tcpdf/tcpdf.php trunk/install/save.php trunk/install/timezone.php trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.mo trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/reportwriter/WriteForm.inc trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/RCFunctions.inc trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/AccountSections.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -74,7 +74,7 @@ $Errors[$i] = 'SectionName'; $i++; } - if (strlen($_POST['SectionName'])==0) { + if (mb_strlen($_POST['SectionName'])==0) { $InputError = 1; prnMsg( _('The account section name must contain at least one character') ,'error'); $Errors[$i] = 'SectionName'; Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/AddCustomerContacts.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -39,13 +39,13 @@ if (isset($_POST['Con_ID']) and !is_long((integer)$_POST['Con_ID'])) { $InputError = 1; prnMsg( _('The Contact ID must be an integer.'), 'error'); - } elseif (strlen($_POST['ContactName']) >40) { + } elseif (mb_strlen($_POST['ContactName']) >40) { $InputError = 1; prnMsg( _('The contact name must be forty characters or less long'), 'error'); } elseif( trim($_POST['ContactName']) == '' ) { $InputError = 1; prnMsg( _('The contact name may not be empty'), 'error'); - }elseif (!IsEmailAddress($_POST['ContactEmail']) AND strlen($_POST['ContactEmail'])>0){ + }elseif (!IsEmailAddress($_POST['ContactEmail']) AND mb_strlen($_POST['ContactEmail'])>0){ $InputError = 1; prnMsg( _('The contact email address is not a valid email address'), 'error'); } Modified: trunk/AddCustomerNotes.php =================================================================== --- trunk/AddCustomerNotes.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/AddCustomerNotes.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -30,7 +30,7 @@ if (!is_long((integer)$_POST['priority'])) { $InputError = 1; prnMsg( _('The contact priority must be an integer.'), 'error'); - } elseif (strlen($_POST['note']) >200) { + } elseif (mb_strlen($_POST['note']) >200) { $InputError = 1; prnMsg( _("The contact's notes must be two hundred characters or less long"), 'error'); } elseif( trim($_POST['note']) == '' ) { Modified: trunk/AddCustomerTypeNotes.php =================================================================== --- trunk/AddCustomerTypeNotes.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/AddCustomerTypeNotes.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -28,7 +28,7 @@ if (!is_long((integer)$_POST['priority'])) { $InputError = 1; prnMsg(_('The Contact priority must be an integer.'), 'error'); - } elseif (strlen($_POST['note']) >200) { + } elseif (mb_strlen($_POST['note']) >200) { $InputError = 1; prnMsg(_("The contact's notes must be two hundred characters or less long"), 'error'); } elseif( trim($_POST['note']) == '' ) { Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/AgedDebtors.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -6,9 +6,9 @@ if (isset($_POST['PrintPDF']) and isset($_POST['FromCriteria']) - and strlen($_POST['FromCriteria'])>=1 + and mb_strlen($_POST['FromCriteria'])>=1 and isset($_POST['ToCriteria']) - and strlen($_POST['ToCriteria'])>=1) { + and mb_strlen($_POST['ToCriteria'])>=1) { include('includes/PDFStarter.php'); $pdf->addInfo('Title',_('Aged Customer Balance Listing')); Modified: trunk/AgedSuppliers.php =================================================================== --- trunk/AgedSuppliers.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/AgedSuppliers.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -6,9 +6,9 @@ If (isset($_POST['PrintPDF']) AND isset($_POST['FromCriteria']) - AND strlen($_POST['FromCriteria'])>=1 + AND mb_strlen($_POST['FromCriteria'])>=1 AND isset($_POST['ToCriteria']) - AND strlen($_POST['ToCriteria'])>=1){ + AND mb_strlen($_POST['ToCriteria'])>=1){ include('includes/PDFStarter.php'); Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/Areas.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -35,7 +35,7 @@ $result = DB_query($sql, $db); $myrow = DB_fetch_row($result); // mod to handle 3 char area codes - if (strlen($_POST['AreaCode']) > 3) { + if (mb_strlen($_POST['AreaCode']) > 3) { $InputError = 1; prnMsg(_('The area code must be three characters or less long'),'error'); $Errors[$i] = 'AreaCode'; @@ -45,7 +45,7 @@ prnMsg(_('The area code entered already exists'),'error'); $Errors[$i] = 'AreaCode'; $i++; - } elseif (strlen($_POST['AreaDescription']) >25) { + } elseif (mb_strlen($_POST['AreaDescription']) >25) { $InputError = 1; prnMsg(_('The area description must be twenty five characters or less long'),'error'); $Errors[$i] = 'AreaDescription'; Modified: trunk/BOMInquiry.php =================================================================== --- trunk/BOMInquiry.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/BOMInquiry.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -41,7 +41,7 @@ if ($_POST['Keywords']=='' AND $_POST['StockCode']=='') { prnMsg( _('At least one stock description keyword or an extract of a stock code must be entered for the search'), 'info' ); } else { - if (strlen($_POST['Keywords'])>0) { + if (mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -61,7 +61,7 @@ stockmaster.mbflag ORDER BY stockmaster.stockid"; - } elseif (strlen($_POST['StockCode'])>0){ + } elseif (mb_strlen($_POST['StockCode'])>0){ $sql = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units, Modified: trunk/BOMListing.php =================================================================== --- trunk/BOMListing.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/BOMListing.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -6,9 +6,9 @@ If (isset($_POST['PrintPDF']) AND isset($_POST['FromCriteria']) - AND strlen($_POST['FromCriteria'])>=1 + AND mb_strlen($_POST['FromCriteria'])>=1 AND isset($_POST['ToCriteria']) - AND strlen($_POST['ToCriteria'])>=1){ + AND mb_strlen($_POST['ToCriteria'])>=1){ include('includes/PDFStarter.php'); $pdf->addInfo('Title',_('Bill Of Material Listing')); Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/BOMs.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -745,7 +745,7 @@ if ($_POST['Keywords']=='' AND $_POST['StockCode']=='') { prnMsg( _('At least one stock description keyword or an extract of a stock code must be entered for the search'), 'info' ); } else { - if (strlen($_POST['Keywords'])>0) { + if (mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -765,7 +765,7 @@ stockmaster.mbflag ORDER BY stockmaster.stockid"; - } elseif (strlen($_POST['StockCode'])>0){ + } elseif (mb_strlen($_POST['StockCode'])>0){ $sql = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units, Modified: trunk/BankAccounts.php =================================================================== --- trunk/BankAccounts.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/BankAccounts.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -45,7 +45,7 @@ $Errors[$i] = 'AccountCode'; $i++; } - if (strlen($_POST['BankAccountName']) >50) { + if (mb_strlen($_POST['BankAccountName']) >50) { $InputError = 1; prnMsg(_('The bank account name must be fifty characters or less long'),'error'); $Errors[$i] = 'AccountName'; @@ -63,13 +63,13 @@ $Errors[$i] = 'AccountNumber'; $i++; } - if (strlen($_POST['BankAccountNumber']) >50) { + if (mb_strlen($_POST['BankAccountNumber']) >50) { $InputError = 1; prnMsg(_('The bank account number must be fifty characters or less long'),'error'); $Errors[$i] = 'AccountNumber'; $i++; } - if (strlen($_POST['BankAddress']) >50) { + if (mb_strlen($_POST['BankAddress']) >50) { $InputError = 1; prnMsg(_('The bank address must be fifty characters or less long'),'error'); $Errors[$i] = 'BankAddress'; Modified: trunk/CompanyPreferences.php =================================================================== --- trunk/CompanyPreferences.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/CompanyPreferences.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -25,67 +25,67 @@ //first off validate inputs sensible - if (strlen($_POST['CoyName']) > 40 OR strlen($_POST['CoyName'])==0) { + if (mb_strlen($_POST['CoyName']) > 40 OR mb_strlen($_POST['CoyName'])==0) { $InputError = 1; prnMsg(_('The company name must be entered and be fifty characters or less long'), 'error'); $Errors[$i] = 'CoyName'; $i++; } - if (strlen($_POST['RegOffice1']) >40) { + if (mb_strlen($_POST['RegOffice1']) >40) { $InputError = 1; prnMsg(_('The Line 1 of the address must be forty characters or less long'),'error'); $Errors[$i] = 'RegOffice1'; $i++; } - if (strlen($_POST['RegOffice2']) >40) { + if (mb_strlen($_POST['RegOffice2']) >40) { $InputError = 1; prnMsg(_('The Line 2 of the address must be forty characters or less long'),'error'); $Errors[$i] = 'RegOffice2'; $i++; } - if (strlen($_POST['RegOffice3']) >40) { + if (mb_strlen($_POST['RegOffice3']) >40) { $InputError = 1; prnMsg(_('The Line 3 of the address must be forty characters or less long'),'error'); $Errors[$i] = 'RegOffice3'; $i++; } - if (strlen($_POST['RegOffice4']) >40) { + if (mb_strlen($_POST['RegOffice4']) >40) { $InputError = 1; prnMsg(_('The Line 4 of the address must be forty characters or less long'),'error'); $Errors[$i] = 'RegOffice4'; $i++; } - if (strlen($_POST['RegOffice5']) >20) { + if (mb_strlen($_POST['RegOffice5']) >20) { $InputError = 1; prnMsg(_('The Line 5 of the address must be twenty characters or less long'),'error'); $Errors[$i] = 'RegOffice5'; $i++; } - if (strlen($_POST['RegOffice6']) >15) { + if (mb_strlen($_POST['RegOffice6']) >15) { $InputError = 1; prnMsg(_('The Line 6 of the address must be fifteen characters or less long'),'error'); $Errors[$i] = 'RegOffice6'; $i++; } - if (strlen($_POST['Telephone']) >25) { + if (mb_strlen($_POST['Telephone']) >25) { $InputError = 1; prnMsg(_('The telephone number must be 25 characters or less long'),'error'); $Errors[$i] = 'Telephone'; $i++; } - if (strlen($_POST['Fax']) >25) { + if (mb_strlen($_POST['Fax']) >25) { $InputError = 1; prnMsg(_('The fax number must be 25 characters or less long'),'error'); $Errors[$i] = 'Fax'; $i++; } - if (strlen($_POST['Email']) >55) { + if (mb_strlen($_POST['Email']) >55) { $InputError = 1; prnMsg(_('The email address must be 55 characters or less long'),'error'); $Errors[$i] = 'Email'; $i++; } - if (strlen($_POST['Email'])>0 and !IsEmailAddress($_POST['Email'])) { + if (mb_strlen($_POST['Email'])>0 and !IsEmailAddress($_POST['Email'])) { $InputError = 1; prnMsg(_('The email address is not correctly formed'),'error'); $Errors[$i] = 'Email'; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/ConfirmDispatch_Invoice.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -391,7 +391,7 @@ } } echo '</tr>'; - if (strlen($LnItm->Narrative)>1){ + if (mb_strlen($LnItm->Narrative)>1){ $narrative=str_replace('\r\n','<br />', $LnItm->Narrative); echo $RowStarter . '<td colspan=12>' . stripslashes($narrative) . '</td></tr>'; } @@ -804,7 +804,7 @@ if ($HyphenOccursAt == false){ $AssetNumber = intval(substr($OrderLine->StockID,6)); } else { - $AssetNumber = intval(substr($OrderLine->StockID,6,strlen($OrderLine->StockID)-$HyphenOccursAt-1)); + $AssetNumber = intval(substr($OrderLine->StockID,6,mb_strlen($OrderLine->StockID)-$HyphenOccursAt-1)); } prnMsg (_('The asset number beind disposed of is:') . ' ' . $AssetNumber, 'info'); } else { Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/ContractBOM.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -166,7 +166,7 @@ /* take the form entries and enter the data from the form into the PurchOrder class variable */ foreach ($_POST as $ItemCode => $Quantity) { if (substr($ItemCode, 0, 3)=='Qty') { - $ItemCode=substr($ItemCode, 3, strlen($ItemCode)-3); + $ItemCode=substr($ItemCode, 3, mb_strlen($ItemCode)-3); $AlreadyOnThisBOM = 0; if (count($_SESSION['Contract'.$identifier]->ContractBOM)!=0){ Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/Contracts.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -73,7 +73,7 @@ /*User hit the button to enter line items - then meta refresh to Contract_Items.php*/ $InputError = false; - if(strlen($_SESSION['Contract'.$identifier]->ContractRef)<2){ + if(mb_strlen($_SESSION['Contract'.$identifier]->ContractRef)<2){ prnMsg(_('The contract reference must be entered (and be longer than 2 characters) before the requirements of the contract can be setup'),'warn'); $InputError = true; } @@ -107,7 +107,7 @@ $filename = $_SESSION['part_pics_dir'] . '/' . $_SESSION['Contract'.$identifier]->ContractRef . '.jpg'; //But check for the worst - if (strtoupper(substr(trim($_FILES['Drawing']['name']),strlen($_FILES['Drawing']['name'])-3))!='JPG'){ + if (strtoupper(substr(trim($_FILES['Drawing']['name']),mb_strlen($_FILES['Drawing']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['Drawing']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check @@ -220,7 +220,7 @@ //First update the session['Contract'.$identifier] variable with all inputs from the form $InputError = False; //assume no errors on input then test for errors - if (strlen($_POST['ContractRef']) < 2){ + if (mb_strlen($_POST['ContractRef']) < 2){ prnMsg(_('The contract reference is expected to be more than 2 characters long. Please alter the contract reference before proceeding.'),'error'); $InputError = true; } @@ -235,7 +235,7 @@ prnMsg(_('The contract reference cannot be the same as a previously created stock item. Please modify the contract reference before continuing'),'error'); $InputError=true; } - if (strlen($_POST['ContractDescription'])<10){ + if (mb_strlen($_POST['ContractDescription'])<10){ prnMsg(_('The contract description is expected to be more than 10 characters long. Please alter the contract description in full before proceeding.'),'error'); $InputError = true; } @@ -609,7 +609,7 @@ if (($_POST['CustKeywords']=='') AND ($_POST['CustCode']=='') AND ($_POST['CustPhone']=='')) { prnMsg(_('At least one Customer Branch Name keyword OR an extract of a Customer Branch Code or Branch Phone Number must be entered for the search'), 'warn'); } else { - if (strlen($_POST['CustKeywords'])>0) { + if (mb_strlen($_POST['CustKeywords'])>0) { //insert wildcard characters in spaces $_POST['CustKeywords'] = strtoupper(trim($_POST['CustKeywords'])); $SearchString = '%' . str_replace(' ', '%', $_POST['CustKeywords']) . '%'; @@ -628,7 +628,7 @@ AND custbranch.disabletrans=0 ORDER BY custbranch.debtorno, custbranch.branchcode"; - } elseif (strlen($_POST['CustCode'])>0){ + } elseif (mb_strlen($_POST['CustCode'])>0){ $_POST['CustCode'] = strtoupper(trim($_POST['CustCode'])); @@ -646,7 +646,7 @@ AND custbranch.disabletrans=0 ORDER BY custbranch.debtorno"; - } elseif (strlen($_POST['CustPhone'])>0){ + } elseif (mb_strlen($_POST['CustPhone'])>0){ $SQL = "SELECT custbranch.brname, custbranch.contactname, custbranch.phoneno, Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/CounterSales.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -221,7 +221,7 @@ } else if ($_POST['Keywords']=='' AND $_POST['StockCode']=='') { $msg='<div class="page_help_text">' . _('Stock Category has been used in search') . '.</div>'; } - if (isset($_POST['Keywords']) AND strlen($_POST['Keywords'])>0) { + if (isset($_POST['Keywords']) AND mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $_POST['Keywords'] = strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -254,7 +254,7 @@ ORDER BY stockmaster.stockid"; } - } else if (strlen($_POST['StockCode'])>0){ + } else if (mb_strlen($_POST['StockCode'])>0){ $_POST['StockCode'] = strtoupper($_POST['StockCode']); $SearchString = '%' . $_POST['StockCode'] . '%'; Modified: trunk/CreditStatus.php =================================================================== --- trunk/CreditStatus.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/CreditStatus.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -47,11 +47,11 @@ $Errors[$i] = 'ReasonCode'; $i++; } - if (strlen($_POST['ReasonDescription']) > 30) { + if (mb_strlen($_POST['ReasonDescription']) > 30) { $InputError = 1; prnMsg(_('The credit status description must be thirty characters or less long'),'error'); } - if (strlen($_POST['ReasonDescription']) == 0) { + if (mb_strlen($_POST['ReasonDescription']) == 0) { $InputError = 1; prnMsg(_('The credit status description must be entered'),'error'); $Errors[$i] = 'ReasonDescription'; Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/Currencies.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -50,7 +50,7 @@ $Errors[$i] = 'Abbreviation'; $i++; } - if (strlen($_POST['Abbreviation']) > 3) { + if (mb_strlen($_POST['Abbreviation']) > 3) { $InputError = 1; prnMsg(_('The currency abbreviation must be 3 characters or less long and for automated currency updates to work correctly be one of the ISO4217 currency codes'),'error'); $Errors[$i] = 'Abbreviation'; @@ -78,19 +78,19 @@ $Errors[$i] = 'DecimalPlaces'; $i++; } - if (strlen($_POST['CurrencyName']) > 20) { + if (mb_strlen($_POST['CurrencyName']) > 20) { $InputError = 1; prnMsg(_('The currency name must be 20 characters or less long'),'error'); $Errors[$i] = 'CurrencyName'; $i++; } - if (strlen($_POST['Country']) > 50) { + if (mb_strlen($_POST['Country']) > 50) { $InputError = 1; prnMsg(_('The currency country must be 50 characters or less long'),'error'); $Errors[$i] = 'Country'; $i++; } - if (strlen($_POST['HundredsName']) > 15) { + if (mb_strlen($_POST['HundredsName']) > 15) { $InputError = 1; prnMsg(_('The hundredths name must be 15 characters or less long'),'error'); $Errors[$i] = 'HundredsName'; Modified: trunk/CustEDISetup.php =================================================================== --- trunk/CustEDISetup.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/CustEDISetup.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -30,13 +30,13 @@ $InputError = 1; prnMsg(_('The customers EDI reference code cannot contain any of the following characters') .' - \' & + \" ' . _('or a space'),'warn'); } - if (strlen($_POST['EDIReference'])<4 AND ($_POST['EDIInvoices']==1 OR $_POST['EDIOrders']==1)){ + if (mb_strlen($_POST['EDIReference'])<4 AND ($_POST['EDIInvoices']==1 OR $_POST['EDIOrders']==1)){ $InputError = 1; prnMsg(_('The customers EDI reference code must be set when EDI Invoices or EDI orders are activated'),'warn'); $Errors[$i] = 'EDIReference'; $i++; } - if (strlen($_POST['EDIAddress'])<4 AND $_POST['EDIInvoices']==1){ + if (mb_strlen($_POST['EDIAddress'])<4 AND $_POST['EDIInvoices']==1){ $InputError = 1; prnMsg(_('The customers EDI email address or FTP server address must be entered if EDI Invoices are to be sent'),'warn'); $Errors[$i] = 'EDIAddress'; Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/CustLoginSetup.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -37,13 +37,13 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - if (strlen($_POST['UserID'])<3){ + if (mb_strlen($_POST['UserID'])<3){ $InputError = 1; prnMsg(_('The user ID entered must be at least 4 characters long'),'error'); } elseif (ContainsIllegalCharacters($_POST['UserID']) OR strstr($_POST['UserID'],' ')) { $InputError = 1; prnMsg(_('User names cannot contain any of the following characters') . " - ' & + \" \\ " . _('or a space'),'error'); - } elseif (strlen($_POST['Password'])<5){ + } elseif (mb_strlen($_POST['Password'])<5){ if (!$SelectedUser){ $InputError = 1; prnMsg(_('The password entered must be at least 5 characters long'),'error'); @@ -51,12 +51,12 @@ } elseif (strstr($_POST['Password'],$_POST['UserID'])!= False){ $InputError = 1; prnMsg(_('The password cannot contain the user id'),'error'); - } elseif ((strlen($_POST['Cust'])>0) AND (strlen($_POST['BranchCode'])==0)) { + } elseif ((mb_strlen($_POST['Cust'])>0) AND (mb_strlen($_POST['BranchCode'])==0)) { $InputError = 1; prnMsg(_('If you enter a Customer Code you must also enter a Branch Code valid for this Customer'),'error'); } - if ((strlen($_POST['BranchCode'])>0) AND ($InputError !=1)) { + if ((mb_strlen($_POST['BranchCode'])>0) AND ($InputError !=1)) { // check that the entered branch is valid for the customer code $sql = "SELECT defaultlocation FROM custbranch Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/CustomerBranches.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -52,7 +52,7 @@ $Errors[$i] = 'BranchCode'; $i++; } - if (strlen($_POST['BranchCode'])==0) { + if (mb_strlen($_POST['BranchCode'])==0) { $InputError = 1; prnMsg(_('The Branch code must be at least one character long'),'error'); $Errors[$i] = 'BranchCode'; Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/CustomerReceipt.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -542,7 +542,7 @@ if ($_POST['Keywords']=="" AND $_POST['CustCode']=="" AND $_POST['CustInvNo']=="") { $msg=_('At least one Customer Name keyword OR an extract of a Customer Code must be entered for the search'); } else { - if (strlen($_POST['Keywords'])>0) { + if (mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -552,13 +552,13 @@ WHERE debtorsmaster.name " . LIKE . " '". $SearchString . "' AND debtorsmaster.currcode= '" . $_SESSION['ReceiptBatch']->Currency . "'"; - } elseif (strlen($_POST['CustCode'])>0){ + } elseif (mb_strlen($_POST['CustCode'])>0){ $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name FROM debtorsmaster WHERE debtorsmaster.debtorno " . LIKE . " '%" . $_POST['CustCode'] . "%' AND debtorsmaster.currcode= '" . $_SESSION['ReceiptBatch']->Currency . "'"; - } elseif (strlen($_POST['CustInvNo'])>0){ + } elseif (mb_strlen($_POST['CustInvNo'])>0){ $SQL = "SELECT debtortrans.debtorno, debtorsmaster.name FROM debtorsmaster LEFT JOIN debtortrans Modified: trunk/CustomerTypes.php =================================================================== --- trunk/CustomerTypes.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/CustomerTypes.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -32,14 +32,14 @@ //first off validate inputs sensible $i=1; - if (strlen($_POST['typename']) >100) { + if (mb_strlen($_POST['typename']) >100) { $InputError = 1; prnMsg(_('The customer type name description must be 100 characters or less long'),'error'); $Errors[$i] = 'CustomerType'; $i++; } - if (strlen($_POST['typename'])==0) { + if (mb_strlen($_POST['typename'])==0) { $InputError = 1; echo '<br />'; prnMsg(_('The customer type name description must contain at least one character'),'error'); Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/Customers.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -39,12 +39,12 @@ prnMsg( _('The customer number already exists in the database'),'error'); $Errors[$i] = 'DebtorNo'; $i++; - }elseif (strlen($_POST['CustName']) > 40 OR strlen($_POST['CustName'])==0) { + }elseif (mb_strlen($_POST['CustName']) > 40 OR mb_strlen($_POST['CustName'])==0) { $InputError = 1; prnMsg( _('The customer name must be entered and be forty characters or less long'),'error'); $Errors[$i] = 'CustName'; $i++; - } elseif ($_SESSION['AutoDebtorNo']==0 AND strlen($_POST['DebtorNo']) ==0) { + } elseif ($_SESSION['AutoDebtorNo']==0 AND mb_strlen($_POST['DebtorNo']) ==0) { $InputError = 1; prnMsg( _('The debtor code cannot be empty'),'error'); $Errors[$i] = 'DebtorNo'; @@ -54,56 +54,56 @@ prnMsg( _('The customer code cannot contain any of the following characters') . " . - ' & + \" " . _('or a space'),'error'); $Errors[$i] = 'DebtorNo'; $i++; - } elseif (strlen($_POST['Address1']) >40) { + } elseif (mb_strlen($_POST['Address1']) >40) { $InputError = 1; prnMsg( _('The Line 1 of the address must be forty characters or less long'),'error'); $Errors[$i] = 'Address1'; $i++; - } elseif (strlen($_POST['Address2']) >40) { + } elseif (mb_strlen($_POST['Address2']) >40) { $InputError = 1; prnMsg( _('The Line 2 of the address must be forty characters or less long'),'error'); $Errors[$i] = 'Address2'; $i++; - } elseif (strlen($_POST['Address3']) >40) { + } elseif (mb_strlen($_POST['Address3']) >40) { $InputError = 1; prnMsg( _('The Line 3 of the address must be forty characters or less long'),'error'); $Errors[$i] = 'Address3'; $i++; - } elseif (strlen($_POST['Address4']) >50) { + } elseif (mb_strlen($_POST['Address4']) >50) { $InputError = 1; prnMsg( _('The Line 4 of the address must be fifty characters or less long'),'error'); $Errors[$i] = 'Address4'; $i++; - } elseif (strlen($_POST['Address5']) >20) { + } elseif (mb_strlen($_POST['Address5']) >20) { $InputError = 1; prnMsg( _('The Line 5 of the address must be twenty characters or less long'),'error'); $Errors[$i] = 'Address5'; $i++; - } elseif (strlen($_POST['Address6']) >15) { + } elseif (mb_strlen($_POST['Address6']) >15) { $InputError = 1; prnMsg( _('The Line 6 of the address must be fifteen characters or less long'),'error'); $Errors[$i] = 'Address6'; $i++; } - elseif (strlen($_POST['Phone']) >25) { + elseif (mb_strlen($_POST['Phone']) >25) { $InputError = 1; prnMsg(_('The telephone number must be 25 characters or less long'),'error'); $Errors[$i] = 'Telephone'; $i++; } - elseif (strlen($_POST['Fax']) >25) { + elseif (mb_strlen($_POST['Fax']) >25) { $InputError = 1; prnMsg(_('The fax number must be 25 characters or less long'),'error'); $Errors[$i] = 'Fax'; $i++; } - elseif (strlen($_POST['Email']) >55) { + elseif (mb_strlen($_POST['Email']) >55) { $InputError = 1; prnMsg(_('The email address must be 55 characters or less long'),'error'); $Errors[$i] = 'Email'; $i++; } - elseif (strlen($_POST['Email'])>0 and !IsEmailAddress($_POST['Email'])) { + elseif (mb_strlen($_POST['Email'])>0 and !IsEmailAddress($_POST['Email'])) { $InputError = 1; prnMsg(_('The email address is not correctly formed'),'error'); $Errors[$i] = 'Email'; Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/DailySalesInquiry.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -64,7 +64,7 @@ $Date_Array = explode('.',$EndDateSQL); } -if (strlen($Date_Array[2])>4) { +if (mb_strlen($Date_Array[2])>4) { $Date_Array[2]= substr($Date_Array[2],0,2); } Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/DebtorsAtPeriodEnd.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -6,9 +6,9 @@ if (isset($_POST['PrintPDF']) AND isset($_POST['FromCriteria']) - AND strlen($_POST['FromCriteria'])>=1 + AND mb_strlen($_POST['FromCriteria'])>=1 AND isset($_POST['ToCriteria']) - AND strlen($_POST['ToCriteria'])>=1){ + AND mb_strlen($_POST['ToCriteria'])>=1){ include('includes/PDFStarter.php'); $pdf->addInfo('Title',_('Customer Balance Listing')); Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/DeliveryDetails.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -53,11 +53,11 @@ or isset($_POST['MakeRecurringOrder'])) { $InputErrors =0; - if (strlen($_POST['DeliverTo'])<=1){ + if (mb_strlen($_POST['DeliverTo'])<=1){ $InputErrors =1; prnMsg(_('You must enter the person or company to whom delivery should be made'),'error'); } - if (strlen($_POST['BrAdd1'])<=1){ + if (mb_strlen($_POST['BrAdd1'])<=1){ $InputErrors =1; prnMsg(_('You should enter the street address in the box provided') . '. ' . _('Orders cannot be accepted without a valid street address'),'error'); } @@ -77,13 +77,13 @@ prnMsg(_('You must select the type of packlist to print'),'error'); } -/* If (strlen($_POST['BrAdd3'])==0 OR !isset($_POST['BrAdd3'])){ +/* If (mb_strlen($_POST['BrAdd3'])==0 OR !isset($_POST['BrAdd3'])){ $InputErrors =1; echo "<br />A region or city must be entered.<br />"; } Maybe appropriate in some installations but not here - If (strlen($_POST['BrAdd2'])<=1){ + If (mb_strlen($_POST['BrAdd2'])<=1){ $InputErrors =1; echo "<br />You should enter the suburb in the box provided. Orders cannot be accepted without a valid suburb being entered.<br />"; } @@ -793,7 +793,7 @@ } -if (isset($_SESSION['Items'.$identifier]->SpecialInstructions) and strlen($_SESSION['Items'.$identifier]->SpecialInstructions)>0) { +if (isset($_SESSION['Items'.$identifier]->SpecialInstructions) and mb_strlen($_SESSION['Items'.$identifier]->SpecialInstructions)>0) { prnMsg($_SESSION['Items'.$identifier]->SpecialInstructions,'info'); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Delivery') . '" alt="" />' . ' ' . _('Delivery Details'); Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/EDIProcessOrders.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -322,10 +322,10 @@ break; case 'ALI': $ALI = explode('+',substr($LineText,4)); - if (strlen($ALI[0])>1){ + if (mb_strlen($ALI[0])>1){ $EmailText .= "\n" . _('Goods of origin') . ' ' . $ALI[0]; } - if (strlen($ALI[1])>1){ + if (mb_strlen($ALI[1])>1){ $EmailText .= "\n" . _('Duty regime code') . ' ' . $ALI[1]; } switch ($ALI[2]){ @@ -353,7 +353,7 @@ $FTX = explode('+',substr($LineText,4)); /*agreed coded text is not catered for ... yet only free form text */ - if (strlen($FTX[3])>5){ + if (mb_strlen($FTX[3])>5){ $FTX_C108=explode(':',$FTX[3]); $Order->Comments .= $FTX_C108[0] . " " . $FTX_C108[1] . ' ' . $FTX_C108[2] . ' ' . $FTX_C108[3] . ' ' . $FTX_C108[4]; $EmailText .= "\n" . $FTX_C108[0] . ' ' . $FTX_C108[1] . ' ' . $FTX_C108[2] . ' ' . $FTX_C108[3] . ' ' . $FTX_C108[4] . ' '; @@ -428,7 +428,7 @@ } break; } - if (strlen($NAD_C080[0])>0){ + if (mb_strlen($NAD_C080[0])>0){ $Order->CustomerName = $NAD_C080[0]; } break; @@ -445,10 +445,10 @@ /*Delivery Party - get the address and name etc */ /*Snag here - how do I figure out what branch to charge */ - if (strlen($NAD_C080[0])>0){ + if (mb_strlen($NAD_C080[0])>0){ $Order->DeliverTo = $NAD_C080[0]; } - if (strlen($NAD_C059[0])>0){ + if (mb_strlen($NAD_C059[0])>0){ $Order->DelAdd1 = $NAD_C059[0]; $Order->DelAdd2 = $NAD_C059[1]; $Order->DelAdd3 = $NAD_C059[2]; @@ -514,7 +514,7 @@ } /*end case Seg Tag*/ } /*end while get next line of message */ /*Thats the end of the message or had to abort */ - if (strlen($EmailText)>10){ + if (mb_strlen($EmailText)>10){ /*Now send the email off to the appropriate person */ $mail = new htmlMimeMail(); $mail->setText($EmailText); Modified: trunk/EmailConfirmation.php =================================================================== --- trunk/EmailConfirmation.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/EmailConfirmation.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -135,7 +135,7 @@ $myrow['deliverto'] . "</td></tr>"; $MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . $myrow['deladd1'] . "</td></tr>"; -If(strlen(trim($myrow['deladd2']))) +If(mb_strlen(trim($myrow['deladd2']))) { $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd2'] . "</td></tr>"; $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/Factors.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -33,11 +33,11 @@ if (isset($_POST['Submit']) OR isset($_POST['Update'])) { - if (strlen($_POST['FactorName']) > 40 or strlen($_POST['FactorName']) == 0 or $_POST['FactorName'] == '') { + if (mb_strlen($_POST['FactorName']) > 40 or mb_strlen($_POST['FactorName']) == 0 or $_POST['FactorName'] == '') { $InputError = 1; prnMsg(_('The factoring company name must be entered and be forty characters or less long'),'error'); } - if (strlen($_POST['Email'])>0 AND !IsEmailAddress($_POST['Email'])){ + if (mb_strlen($_POST['Email'])>0 AND !IsEmailAddress($_POST['Email'])){ prnMsg(_('The email address entered does not appear to be a valid email address format'),'error'); $InputError = 1; } Modified: trunk/FixedAssetCategories.php =================================================================== --- trunk/FixedAssetCategories.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/FixedAssetCategories.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -29,13 +29,13 @@ $_POST['CategoryID'] = strtoupper($_POST['CategoryID']); - if (strlen($_POST['CategoryID']) > 6) { + if (mb_strlen($_POST['CategoryID']) > 6) { $InputError = 1; prnMsg(_('The Fixed Asset Category code must be six characters or less long'),'error'); - } elseif (strlen($_POST['CategoryID'])==0) { + } elseif (mb_strlen($_POST['CategoryID'])==0) { $InputError = 1; prnMsg(_('The Fixed Asset Category code must be at least 1 character but less than six characters long'),'error'); - } elseif (strlen($_POST['CategoryDescription']) >20) { + } elseif (mb_strlen($_POST['CategoryDescription']) >20) { $InputError = 1; prnMsg(_('The Fixed Asset Category description must be twenty characters or less long'),'error'); } Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/FixedAssetItems.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -30,7 +30,7 @@ $filename = $_SESSION['part_pics_dir'] . '/ASSET_' . $AssetID . '.jpg'; //But check for the worst - if (strtoupper(substr(trim($_FILES['ItemPicture']['name']),strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ + if (strtoupper(substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['ItemPicture']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check @@ -72,20 +72,20 @@ $i=1; - if (!isset($_POST['Description']) or strlen($_POST['Description']) > 50 OR strlen($_POST['Description'])==0) { + if (!isset($_POST['Description']) or mb_strlen($_POST['Description']) > 50 OR mb_strlen($_POST['Description'])==0) { $InputError = 1; prnMsg (_('The asset description must be entered and be fifty characters or less long. It cannot be a zero length string either, a description is required'),'error'); $Errors[$i] = 'Description'; $i++; } - if (strlen($_POST['LongDescription'])==0) { + if (mb_strlen($_POST['LongDescription'])==0) { $InputError = 1; prnMsg (_('The asset long description cannot be a zero length string, a long description is required'),'error'); $Errors[$i] = 'LongDescription'; $i++; } - if (strlen($_POST['BarCode']) >20) { + if (mb_strlen($_POST['BarCode']) >20) { $InputError = 1; prnMsg(_('The barcode must be 20 characters or less long'),'error'); $Errors[$i] = 'BarCode'; @@ -272,7 +272,7 @@ prnMsg( _('Validation failed, no updates or deletes took place'), 'error'); } -} elseif (isset($_POST['delete']) AND strlen($_POST['delete']) >1 ) { +} elseif (isset($_POST['delete']) AND mb_strlen($_POST['delete']) >1 ) { //the button to delete a selected record was clicked instead of the submit button $CancelDelete = 0; Modified: trunk/FixedAssetLocations.php =================================================================== --- trunk/FixedAssetLocations.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/FixedAssetLocations.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -10,11 +10,11 @@ if (isset($_POST['submit']) and !isset($_POST['delete'])) { $InputError=0; - if (!isset($_POST['LocationID']) or strlen($_POST['LocationID'])<1) { + if (!isset($_POST['LocationID']) or mb_strlen($_POST['LocationID'])<1) { prnMsg(_('You must enter at least one character in the location ID'),'error'); $InputError=1; } - if (!isset($_POST['LocationDescription']) or strlen($_POST['LocationDescription'])<1) { + if (!isset($_POST['LocationDescription']) or mb_strlen($_POST['LocationDescription'])<1) { prnMsg(_('You must enter at least one character in the location description'),'error'); $InputError=1; } @@ -44,7 +44,7 @@ if (isset($_POST['update']) and !isset($_POST['delete'])) { $InputError=0; - if (!isset($_POST['LocationDescription']) or strlen($_POST['LocationDescription'])<1) { + if (!isset($_POST['LocationDescription']) or mb_strlen($_POST['LocationDescription'])<1) { prnMsg(_('You must enter at least one character in the location description'),'error'); $InputError=1; } Modified: trunk/FormDesigner.php =================================================================== --- trunk/FormDesigner.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/FormDesigner.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -79,7 +79,7 @@ $FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/'.$_POST['FormName']); $FormDesign['name']=$_POST['formname']; if (substr($_POST['PaperSize'],-8)=='Portrait') { - $_POST['PaperSize']=substr($_POST['PaperSize'],0,strlen($_POST['PaperSize'])-9); + $_POST['PaperSize']=substr($_POST['PaperSize'],0,mb_strlen($_POST['PaperSize'])-9); } $FormDesign->PaperSize=$_POST['PaperSize']; $FormDesign->LineHeight=$_POST['LineHeight']; @@ -165,7 +165,7 @@ echo '<th width=33%>'._('Paper Size').'<select name="PaperSize">'; foreach ($Papers as $Paper) { if (substr($Paper,-8)=='Portrait') { - $PaperValue=substr($Paper,0,strlen($Paper)-9); + $PaperValue=substr($Paper,0,mb_strlen($Paper)-9); } else { $PaperValue=$Paper; } Modified: trunk/FreightCosts.php =================================================================== --- trunk/FreightCosts.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/FreightCosts.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -79,7 +79,7 @@ $InputError = 0; //first off validate inputs sensible - if (strlen($_POST['Destination'])<2){ + if (mb_strlen($_POST['Destination'])<2){ $InputError=1; prnMsg(_('The entry for the destination must be at least two characters long') . '. ' . _('These entries are matched against the town names entered for customer delivery addresses'),'warn'); } Modified: trunk/GLAccountReport.php =================================================================== --- trunk/GLAccountReport.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/GLAccountReport.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -220,7 +220,7 @@ /* $pdfcode = $pdf->output(); - $len = strlen($pdfcode); + $len = mb_strlen($pdfcode); if ($len<=20){ $title = _('Print GL Accounts Report Error'); Modified: trunk/GLAccounts.php =================================================================== --- trunk/GLAccounts.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/GLAccounts.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -28,7 +28,7 @@ if (!is_long((integer)$_POST['AccountCode'])) { $InputError = 1; prnMsg(_('The account code must be an integer'),'warn'); - } elseif (strlen($_POST['AccountName']) >50) { + } elseif (mb_strlen($_POST['AccountName']) >50) { $InputError = 1; prnMsg( _('The account name must be fifty characters or less long'),'warn'); } Modified: trunk/GLTransInquiry.php =================================================================== --- trunk/GLTransInquiry.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/GLTransInquiry.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -116,7 +116,7 @@ } else { $URL = $rootpath . '/GLAccountInquiry.php?Account=' . $TransRow['account']; - if( strlen($TransRow['narrative'])==0 ) { + if( mb_strlen($TransRow['narrative'])==0 ) { $TransRow['narrative'] = ' '; } if ( $TransRow['posted']==0 ) { Modified: trunk/GetStockImage.php =================================================================== --- trunk/GetStockImage.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/GetStockImage.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -22,26 +22,26 @@ // Color decode function function DecodeBgColor( $colorstr ) { if ( $colorstr[0] == '#' ) { - $colorstr = substr($colorstr,1,strlen($colorstr)); + $colorstr = substr($colorstr,1,mb_strlen($colorstr)); } $red = 0; - if(strlen($colorstr) > 1) { + if(mb_strlen($colorstr) > 1) { $red = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,strlen($colorstr)); + $colorstr = substr($colorstr,2,mb_strlen($colorstr)); } $green = 0; - if(strlen($colorstr) > 1) { + if(mb_strlen($colorstr) > 1) { $green = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,strlen($colorstr)); + $colorstr = substr($colorstr,2,mb_strlen($colorstr)); } $blue = 0; - if(strlen($colorstr) > 1) { + if(mb_strlen($colorstr) > 1) { $blue = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,strlen($colorstr)); + $colorstr = substr($colorstr,2,mb_strlen($colorstr)); } - if(strlen($colorstr) > 1) { + if(mb_strlen($colorstr) > 1) { $alpha = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,strlen($colorstr)); + $colorstr = substr($colorstr,2,mb_strlen($colorstr)); } if ( isset($alpha) ) return array('red' => $red, 'green' => $green, 'blue' => $blue, 'alpha' => $alpha ); @@ -120,7 +120,7 @@ if( $i === false ) $type = 'png'; else { - $type = strtolower(substr($stockid,$i+1,strlen($stockid))); + $type = strtolower(substr($stockid,$i+1,mb_strlen($stockid))); $stockid = substr($stockid,0,$i); if($blanktext && !isset($text)) $text = ''; @@ -224,12 +224,12 @@ if(!isset($text)) $text = $stockid; - if(strlen($text) > 0 ) { + if(mb_strlen($text) > 0 ) { $fw = imagefontwidth($fontsize); $fh = imagefontheight($fontsize); $fy = (imagesy($im) - ($fh)) / 2; $fyh = $fy + $fh - 1; - $textwidth = $fw * strlen($text); + $textwidth = $fw * mb_strlen($text); $px = (imagesx($im) - $textwidth) / 2; if (!$notextbg) imagefilledrectangle($im,$px,$fy,imagesx($im)-($px+1),$fyh, $ixtextbgcolor ); @@ -323,12 +323,12 @@ // 0,0,0,0); if(!isset($text)) $text = $stockid; - if(strlen($text) > 0 ) { + if(mb_strlen($text) > 0 ) { $fw = imagefontwidth($fontsize); $fh = imagefontheight($fontsize); $fy = imagesy($im) - ($fh); $fyh = imagesy($im) - 1; - $textwidth = $fw * strlen($text); + $textwidth = $fw * mb_strlen($text); $px = (imagesx($im) - $textwidth) / 2; if (!$notextbg) imagefilledrectangle($im,$px,$fy,imagesx($im)-($px+1),$fyh, $ixtextbgcolor ); Modified: trunk/InventoryPlanning.php =================================================================== --- trunk/InventoryPlanning.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/InventoryPlanning.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -7,9 +7,9 @@ if (isset($_POST['PrintPDF']) and isset($_POST['FromCriteria']) - and strlen($_POST['FromCriteria'])>=1 + and mb_strlen($_POST['FromCriteria'])>=1 and isset($_POST['ToCriteria']) - and strlen($_POST['ToCriteria'])>=1) { + and mb_strlen($_POST['ToCriteria'])>=1) { include ('includes/class.pdf.php'); Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/InventoryValuation.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -6,9 +6,9 @@ if (isset($_POST['PrintPDF']) AND isset($_POST['FromCriteria']) - AND strlen($_POST['FromCriteria'])>=1 + AND mb_strlen($_POST['FromCriteria'])>=1 AND isset($_POST['ToCriteria']) - AND strlen($_POST['ToCriteria'])>=1){ + AND mb_strlen($_POST['ToCriteria'])>=1){ include('includes/PDFStarter.php'); Modified: trunk/MRPDemandTypes.php =================================================================== --- trunk/MRPDemandTypes.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/MRPDemandTypes.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -32,11 +32,11 @@ prnMsg(_('The Demand Type is reserved for the system'),'error'); } - if (strlen($_POST['MRPDemandType']) < 1) { + if (mb_strlen($_POST['MRPDemandType']) < 1) { $InputError = 1; prnMsg(_('The Demand Type code must be at least 1 character long'),'error'); } - if (strlen($_POST['Description'])<3) { + if (mb_strlen($_POST['Description'])<3) { $InputError = 1; prnMsg(_('The Demand Type description must be at least 3 characters long'),'error'); } Modified: trunk/MRPDemands.php =================================================================== --- trunk/MRPDemands.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/MRPDemands.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -58,7 +58,7 @@ if ($_POST['Keywords']=='' AND $_POST['StockCode']=='') { $msg=_('At least one stock description keyword or an extract of a stock code must be entered for the search'); } else { - if (strlen($_POST['Keywords'])>0) { + if (mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -68,7 +68,7 @@ WHERE stockmaster.description " . LIKE . " '" . $SearchString ."' ORDER BY stockmaster.stockid"; - } elseif (strlen($_POST['StockCode'])>0){ + } elseif (mb_strlen($_POST['StockCode'])>0){ $sql = "SELECT stockmaster.stockid, stockmaster.description FROM stockmaster Modified: trunk/MRPReport.php =================================================================== --- trunk/MRPReport.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/MRPReport.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -422,7 +422,7 @@ // Details for Demand/Supply Sections $i = 0; - while ((isset($Supplies[$i]) and strlen($Supplies[$i]['part'])) > 1 or (isset($Requirements[$i]) and strlen($Requirements[$i]['part']) > 1)){ + while ((isset($Supplies[$i]) and mb_strlen($Supplies[$i]['part'])) > 1 or (isset($Requirements[$i]) and mb_strlen($Requirements[$i]['part']) > 1)){ $YPos -=$line_height; $FontSize=7; @@ -436,7 +436,7 @@ // 1) X position 2) Y position 3) Width // 4) Height 5) Text To Display 6) Alignment 7) Border 8) Fill - True to use SetFillColor // and False to set for transparent - if (isset($Requirements[$i]['part']) and strlen($Requirements[$i]['part']) > 1) { + if (isset($Requirements[$i]['part']) and mb_strlen($Requirements[$i]['part']) > 1) { $FormatedReqDueDate = ConvertSQLDate($Requirements[$i]['daterequired']); $pdf->addTextWrap($Left_Margin,$YPos,55,$FontSize,$Requirements[$i]['mrpdemandtype'],''); $pdf->addTextWrap(80,$YPos,90,$FontSize,$Requirements[$i]['whererequired'],''); @@ -445,7 +445,7 @@ $myrow['decimalplaces']),'right'); $pdf->addTextWrap(240,$YPos,50,$FontSize,$FormatedReqDueDate,'right'); } - if (strlen($Supplies[$i]['part']) > 1) { + if (mb_strlen($Supplies[$i]['part']) > 1) { $suptype = $Supplies[$i]['ordertype']; // If ordertype is not QOH,PO,or WO, it is an MRP generated planned order and the // ordertype is actually the demandtype that caused the planned order Modified: trunk/Numbers/Words/lang.bg.php =================================================================== --- trunk/Numbers/Words/lang.bg.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/Numbers/Words/lang.bg.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -310,9 +310,9 @@ { if (is_string($num)) { $ret = array(); - $strlen = strlen($num); - $first = substr($num, 0, $strlen%3); - preg_match_all('/\d{3}/', substr($num, $strlen%3, $strlen), $m); + $mb_strlen = mb_strlen($num); + $first = substr($num, 0, $mb_strlen%3); + preg_match_all('/\d{3}/', substr($num, $mb_strlen%3, $mb_strlen), $m); $ret =& $m[0]; if ($first) array_unshift($ret, $first); return $ret; @@ -452,7 +452,7 @@ } // if the absolute value is greater than 9.99*10^302, return infinity - if (strlen($num)>306) { + if (mb_strlen($num)>306) { return $ret_minus . $this->_infinity; } Modified: trunk/Numbers/Words/lang.cs.php =================================================================== --- trunk/Numbers/Words/lang.cs.php 2011-07-02 22:41:11 UTC (rev 4616) +++ trunk/Numbers/Words/lang.cs.php 2011-07-02 22:51:40 UTC (rev 4617) @@ -178,8 +178,8 @@ $num = trim($num); $num = preg_replace('/^0+/','',$num); - if (strlen($num) > 3) { - $maxp = strlen($num)-1; + if (mb_strlen($num) > 3) { + $maxp = mb_strlen($num)-1; $cur... [truncated message content] |
From: <dai...@us...> - 2011-07-02 22:41:17
|
Revision: 4616 http://web-erp.svn.sourceforge.net/web-erp/?rev=4616&view=rev Author: daintree Date: 2011-07-02 22:41:11 +0000 (Sat, 02 Jul 2011) Log Message: ----------- mb_strlen Modified Paths: -------------- trunk/AccountGroups.php Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2011-07-02 22:16:21 UTC (rev 4615) +++ trunk/AccountGroups.php 2011-07-02 22:41:11 UTC (rev 4616) @@ -70,7 +70,7 @@ $Errors[$i] = 'GroupName'; $i++; } - if (strlen($_POST['GroupName'])==0){ + if (mb_strlen($_POST['GroupName'])==0){ $InputError = 1; prnMsg( _('The account group name must be at least one character long'),'error'); $Errors[$i] = 'GroupName'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-02 22:41:17
|
Revision: 4616 http://web-erp.svn.sourceforge.net/web-erp/?rev=4616&view=rev Author: daintree Date: 2011-07-02 22:41:11 +0000 (Sat, 02 Jul 2011) Log Message: ----------- mb_strlen Modified Paths: -------------- trunk/AccountGroups.php Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2011-07-02 22:16:21 UTC (rev 4615) +++ trunk/AccountGroups.php 2011-07-02 22:41:11 UTC (rev 4616) @@ -70,7 +70,7 @@ $Errors[$i] = 'GroupName'; $i++; } - if (strlen($_POST['GroupName'])==0){ + if (mb_strlen($_POST['GroupName'])==0){ $InputError = 1; prnMsg( _('The account group name must be at least one character long'),'error'); $Errors[$i] = 'GroupName'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-02 22:16:27
|
Revision: 4615 http://web-erp.svn.sourceforge.net/web-erp/?rev=4615&view=rev Author: daintree Date: 2011-07-02 22:16:21 +0000 (Sat, 02 Jul 2011) Log Message: ----------- remove utf-8 branch now merged into trunk Removed Paths: ------------- branches/utf-8/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-02 22:16:27
|
Revision: 4615 http://web-erp.svn.sourceforge.net/web-erp/?rev=4615&view=rev Author: daintree Date: 2011-07-02 22:16:21 +0000 (Sat, 02 Jul 2011) Log Message: ----------- remove utf-8 branch now merged into trunk Removed Paths: ------------- branches/utf-8/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-02 22:15:32
|
Revision: 4614 http://web-erp.svn.sourceforge.net/web-erp/?rev=4614&view=rev Author: daintree Date: 2011-07-02 22:15:26 +0000 (Sat, 02 Jul 2011) Log Message: ----------- Removed Paths: ------------- branches/3.11-stable/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-02 22:15:32
|
Revision: 4614 http://web-erp.svn.sourceforge.net/web-erp/?rev=4614&view=rev Author: daintree Date: 2011-07-02 22:15:26 +0000 (Sat, 02 Jul 2011) Log Message: ----------- Removed Paths: ------------- branches/3.11-stable/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-02 09:54:56
|
Revision: 4613 http://web-erp.svn.sourceforge.net/web-erp/?rev=4613&view=rev Author: daintree Date: 2011-07-02 09:54:48 +0000 (Sat, 02 Jul 2011) Log Message: ----------- mb_strlen Modified Paths: -------------- trunk/api/api_branches.php Modified: trunk/api/api_branches.php =================================================================== --- trunk/api/api_branches.php 2011-07-02 08:02:01 UTC (rev 4612) +++ trunk/api/api_branches.php 2011-07-02 09:54:48 UTC (rev 4613) @@ -17,7 +17,7 @@ /* Verify that the branch number is valid, and doesn't already exist.*/ function VerifyBranchNo($DebtorNumber, $BranchNumber, $i, $Errors, $db) { - if ((strlen($BranchNumber)<1) or (strlen($BranchNumber)>10)) { + if ((mb_strlen($BranchNumber)<1) or (mb_strlen($BranchNumber)>10)) { $Errors[$i] = IncorrectBranchNumberLength; } $Searchsql = "SELECT count(debtorno) @@ -34,7 +34,7 @@ /* Verify that the branch number exists.*/ function VerifyBranchNoExists($DebtorNumber, $BranchNumber, $i, $Errors, $db) { - if ((strlen($BranchNumber)<1) or (strlen($BranchNumber)>10)) { + if ((mb_strlen($BranchNumber)<1) or (mb_strlen($BranchNumber)>10)) { $Errors[$i] = IncorrectBranchNumberLength; } $Searchsql = "SELECT count(debtorno) @@ -52,7 +52,7 @@ /* Check that the name exists and is 40 characters or less long */ function VerifyBranchName($BranchName, $i, $Errors) { - if ((strlen($BranchName)<1) or (strlen($BranchName)>40)) { + if ((mb_strlen($BranchName)<1) or (mb_strlen($BranchName)>40)) { $Errors[$i] = IncorrectBranchNameLength; } return $Errors; @@ -60,7 +60,7 @@ /* Check that the address lines are correct length*/ function VerifyBranchAddressLine($AddressLine, $length, $i, $Errors) { - if (strlen($AddressLine)>$length) { + if (mb_strlen($AddressLine)>$length) { $Errors[$i] = InvalidAddressLine; } return $Errors; @@ -126,7 +126,7 @@ /* Check that the phone number only has 20 or fewer characters */ function VerifyPhoneNumber($PhoneNumber, $i, $Errors) { - if (strlen($PhoneNumber)>20) { + if (mb_strlen($PhoneNumber)>20) { $Errors[$i] = InvalidPhoneNumber; } return $Errors; @@ -134,7 +134,7 @@ /* Check that the fax number only has 20 or fewer characters */ function VerifyFaxNumber($FaxNumber, $i, $Errors) { - if (strlen($FaxNumber)>20) { + if (mb_strlen($FaxNumber)>20) { $Errors[$i] = InvalidFaxNumber; } return $Errors; @@ -142,7 +142,7 @@ /* Check that the contact name only has 30 or fewer characters */ function VerifyContactName($ContactName, $i, $Errors) { - if (strlen($ContactName)>30) { + if (mb_strlen($ContactName)>30) { $Errors[$i] = InvalidContactName; } return $Errors; @@ -158,7 +158,7 @@ /* Check that the email address is in a valid format and only has 55 or fewer characters */ function VerifyEmailAddress($EmailAddress, $i, $Errors) { - if (strlen($EmailAddress)>55 and !checkEmail($EmailAddress)) { + if (mb_strlen($EmailAddress)>55 and !checkEmail($EmailAddress)) { $Errors[$i] = InvalidEmailAddress; } return $Errors; @@ -221,7 +221,7 @@ /* Check that the special instructions only have 256 or fewer characters */ function VerifySpecialInstructions($SpecialInstructions, $i, $Errors) { - if (strlen($SpecialInstructions)>256) { + if (mb_strlen($SpecialInstructions)>256) { $Errors[$i] = InvalidSpecialInstructions; } return $Errors; @@ -229,7 +229,7 @@ /* Check that the customer branch code only has 30 or fewer characters */ function VerifyCustBranchCode($CustBranchCode, $i, $Errors) { - if (strlen($CustBranchCode)>30) { + if (mb_strlen($CustBranchCode)>30) { $Errors[$i] = InvalidCustBranchCode; } return $Errors; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-02 09:54:56
|
Revision: 4613 http://web-erp.svn.sourceforge.net/web-erp/?rev=4613&view=rev Author: daintree Date: 2011-07-02 09:54:48 +0000 (Sat, 02 Jul 2011) Log Message: ----------- mb_strlen Modified Paths: -------------- trunk/api/api_branches.php Modified: trunk/api/api_branches.php =================================================================== --- trunk/api/api_branches.php 2011-07-02 08:02:01 UTC (rev 4612) +++ trunk/api/api_branches.php 2011-07-02 09:54:48 UTC (rev 4613) @@ -17,7 +17,7 @@ /* Verify that the branch number is valid, and doesn't already exist.*/ function VerifyBranchNo($DebtorNumber, $BranchNumber, $i, $Errors, $db) { - if ((strlen($BranchNumber)<1) or (strlen($BranchNumber)>10)) { + if ((mb_strlen($BranchNumber)<1) or (mb_strlen($BranchNumber)>10)) { $Errors[$i] = IncorrectBranchNumberLength; } $Searchsql = "SELECT count(debtorno) @@ -34,7 +34,7 @@ /* Verify that the branch number exists.*/ function VerifyBranchNoExists($DebtorNumber, $BranchNumber, $i, $Errors, $db) { - if ((strlen($BranchNumber)<1) or (strlen($BranchNumber)>10)) { + if ((mb_strlen($BranchNumber)<1) or (mb_strlen($BranchNumber)>10)) { $Errors[$i] = IncorrectBranchNumberLength; } $Searchsql = "SELECT count(debtorno) @@ -52,7 +52,7 @@ /* Check that the name exists and is 40 characters or less long */ function VerifyBranchName($BranchName, $i, $Errors) { - if ((strlen($BranchName)<1) or (strlen($BranchName)>40)) { + if ((mb_strlen($BranchName)<1) or (mb_strlen($BranchName)>40)) { $Errors[$i] = IncorrectBranchNameLength; } return $Errors; @@ -60,7 +60,7 @@ /* Check that the address lines are correct length*/ function VerifyBranchAddressLine($AddressLine, $length, $i, $Errors) { - if (strlen($AddressLine)>$length) { + if (mb_strlen($AddressLine)>$length) { $Errors[$i] = InvalidAddressLine; } return $Errors; @@ -126,7 +126,7 @@ /* Check that the phone number only has 20 or fewer characters */ function VerifyPhoneNumber($PhoneNumber, $i, $Errors) { - if (strlen($PhoneNumber)>20) { + if (mb_strlen($PhoneNumber)>20) { $Errors[$i] = InvalidPhoneNumber; } return $Errors; @@ -134,7 +134,7 @@ /* Check that the fax number only has 20 or fewer characters */ function VerifyFaxNumber($FaxNumber, $i, $Errors) { - if (strlen($FaxNumber)>20) { + if (mb_strlen($FaxNumber)>20) { $Errors[$i] = InvalidFaxNumber; } return $Errors; @@ -142,7 +142,7 @@ /* Check that the contact name only has 30 or fewer characters */ function VerifyContactName($ContactName, $i, $Errors) { - if (strlen($ContactName)>30) { + if (mb_strlen($ContactName)>30) { $Errors[$i] = InvalidContactName; } return $Errors; @@ -158,7 +158,7 @@ /* Check that the email address is in a valid format and only has 55 or fewer characters */ function VerifyEmailAddress($EmailAddress, $i, $Errors) { - if (strlen($EmailAddress)>55 and !checkEmail($EmailAddress)) { + if (mb_strlen($EmailAddress)>55 and !checkEmail($EmailAddress)) { $Errors[$i] = InvalidEmailAddress; } return $Errors; @@ -221,7 +221,7 @@ /* Check that the special instructions only have 256 or fewer characters */ function VerifySpecialInstructions($SpecialInstructions, $i, $Errors) { - if (strlen($SpecialInstructions)>256) { + if (mb_strlen($SpecialInstructions)>256) { $Errors[$i] = InvalidSpecialInstructions; } return $Errors; @@ -229,7 +229,7 @@ /* Check that the customer branch code only has 30 or fewer characters */ function VerifyCustBranchCode($CustBranchCode, $i, $Errors) { - if (strlen($CustBranchCode)>30) { + if (mb_strlen($CustBranchCode)>30) { $Errors[$i] = InvalidCustBranchCode; } return $Errors; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-02 08:02:07
|
Revision: 4612 http://web-erp.svn.sourceforge.net/web-erp/?rev=4612&view=rev Author: daintree Date: 2011-07-02 08:02:01 +0000 (Sat, 02 Jul 2011) Log Message: ----------- use mb_strlen for multibyte string length tests as now using UTF-8 throughout Modified Paths: -------------- trunk/includes/LanguageSetup.php Modified: trunk/includes/LanguageSetup.php =================================================================== --- trunk/includes/LanguageSetup.php 2011-07-02 01:35:11 UTC (rev 4611) +++ trunk/includes/LanguageSetup.php 2011-07-02 08:02:01 UTC (rev 4612) @@ -2,6 +2,9 @@ /* $Id$ */ +/* Set internal character encoding to UTF-8 */ +mb_internal_encoding('UTF-8'); + /* This file is included in session.inc or PDFStarter.php or a report script that does not use PDFStarter.php to check for the existance of gettext function and setup the necessary enviroment to allow for automatic translation This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |