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] |