本文整理汇总了PHP中ContainsIllegalCharacters函数的典型用法代码示例。如果您正苦于以下问题:PHP ContainsIllegalCharacters函数的具体用法?PHP ContainsIllegalCharacters怎么用?PHP ContainsIllegalCharacters使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ContainsIllegalCharacters函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _
$title = _('Customer EDI Set Up');
include 'includes/header.inc';
echo '<a href="' . $rootpath . '/SelectCustomer.php">' . _('Back to Customers') . '</a><br />';
if (isset($Errors)) {
unset($Errors);
}
$Errors = array();
$i = 0;
echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p><br />';
if (isset($_POST['submit'])) {
//initialise no input errors assumed initially before we test
$InputError = 0;
/* actions to take once the user has clicked the submit button
ie the page has called itself with some user input */
//first off validate inputs sensible
if (ContainsIllegalCharacters($_POST['EDIReference'])) {
$InputError = 1;
prnMsg(_('The customers EDI reference code cannot contain any of the illegal characters'), 'warn');
}
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 (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';
$i++;
}
示例2: elseif
echo '<br />';
$Errors[$i] = 'CodeExpense';
$i++;
} elseif (mb_strlen($_POST['CodeExpense']) > 20) {
$InputError = 1;
prnMsg(_('The Expense code must be twenty characters or less long'), 'error');
echo '<br />';
$Errors[$i] = 'CodeExpense';
$i++;
} elseif (ContainsIllegalCharacters($_POST['CodeExpense'])) {
$InputError = 1;
prnMsg(_('The Expense code cannot contain any of the following characters " \' - &'), 'error');
echo '<br />';
$Errors[$i] = 'CodeExpense';
$i++;
} elseif (ContainsIllegalCharacters($_POST['Description'])) {
$InputError = 1;
prnMsg(_('The Expense description cannot contain any of the following characters " \' - &'), 'error');
echo '<br />';
$Errors[$i] = 'Description';
$i++;
} elseif (mb_strlen($_POST['Description']) > 50) {
$InputError = 1;
prnMsg(_('The tab code must be Fifty characters or less long'), 'error');
echo '<br />';
echo '<br />';
$Errors[$i] = 'Description';
$i++;
} elseif (mb_strlen($_POST['Description']) == 0) {
$InputError = 1;
echo prnMsg(_('The tab code description must be entered'), 'error');
示例3: _
/*Script to Delete all sales transactions*/
$PageSecurity = 15;
include 'includes/session.inc';
$title = _('UTILITY PAGE Change A Stock Code');
include 'includes/header.inc';
include 'includes/SQL_CommonFunctions.inc';
if (isset($_POST['ProcessStockChange'])) {
$_POST['NewStockID'] = strtoupper($_POST['NewStockID']);
/*First check the stock code exists */
$result = DB_query("SELECT stockid FROM stockmaster WHERE stockid='" . $_POST['OldStockID'] . "'", $db);
if (DB_num_rows($result) == 0) {
prnMsg(_('The stock code') . ': ' . $_POST['OldStockID'] . ' ' . _('does not currently exist as a stock code in the system'), 'error');
include 'includes/footer.inc';
exit;
}
if (ContainsIllegalCharacters($_POST['NewStockID'])) {
prnMsg(_('The new stock code to change the old code to contains illegal characters - no changes will be made'), 'error');
include 'includes/footer.inc';
exit;
}
if ($_POST['NewStockID'] == '') {
prnMsg(_('The new stock code to change the old code to must be entered as well'), 'error');
include 'includes/footer.inc';
exit;
}
/*Now check that the new code doesn't already exist */
$result = DB_query("SELECT stockid FROM stockmaster WHERE stockid='" . $_POST['NewStockID'] . "'", $db);
if (DB_num_rows($result) != 0) {
echo '<br><br>';
prnMsg(_('The replacement stock code') . ': ' . $_POST['NewStockID'] . ' ' . _('already exists as a stock code in the system') . ' - ' . _('a unique stock code must be entered for the new code'), 'error');
include 'includes/footer.inc';
示例4: DB_query
$result = DB_query($sql, $db);
$myrow = DB_fetch_array($result);
$CustomerName = $myrow['name'];
echo '<p class="page_title_text">
<img src="' . $RootPath . '/css/' . $Theme . '/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer') . ' : ' . $_SESSION['CustomerID'] . ' - ' . $CustomerName . _(' has been selected') . '</p>
<br />';
if (isset($_POST['submit'])) {
//initialise no input errors assumed initially before we test
$InputError = 0;
/* actions to take once the user has clicked the submit button
ie the page has called itself with some user input */
//first off validate inputs sensible
if (mb_strlen($_POST['UserID']) < 4) {
$InputError = 1;
prnMsg(_('The user ID entered must be at least 4 characters long'), 'error');
} elseif (ContainsIllegalCharacters($_POST['UserID']) or mb_strstr($_POST['UserID'], ' ')) {
$InputError = 1;
prnMsg(_('User names cannot contain any of the following characters') . " - ' & + \" \\ " . _('or a space'), 'error');
} elseif (mb_strlen($_POST['Password']) < 5) {
if (!$SelectedUser) {
$InputError = 1;
prnMsg(_('The password entered must be at least 5 characters long'), 'error');
}
} elseif (mb_strstr($_POST['Password'], $_POST['UserID']) != false) {
$InputError = 1;
prnMsg(_('The password cannot contain the user id'), 'error');
} 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 (mb_strlen($_POST['BranchCode']) > 0 and $InputError != 1) {
示例5: _
include 'includes/session.inc';
$Title = _('Units Of Measure');
include 'includes/header.inc';
echo '<p class="page_title_text"><img src="' . $RootPath . '/css/' . $Theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title . '</p>';
if (isset($_GET['SelectedMeasureID'])) {
$SelectedMeasureID = $_GET['SelectedMeasureID'];
} elseif (isset($_POST['SelectedMeasureID'])) {
$SelectedMeasureID = $_POST['SelectedMeasureID'];
}
if (isset($_POST['Submit'])) {
//initialise no input errors assumed initially before we test
$InputError = 0;
/* actions to take once the user has clicked the submit button
ie the page has called itself with some user input */
//first off validate inputs sensible
if (ContainsIllegalCharacters($_POST['MeasureName'])) {
$InputError = 1;
prnMsg(_('The unit of measure cannot contain any of the illegal characters'), 'error');
}
if (trim($_POST['MeasureName']) == '') {
$InputError = 1;
prnMsg(_('The unit of measure may not be empty'), 'error');
}
if (isset($_POST['SelectedMeasureID']) and $_POST['SelectedMeasureID'] != '' and $InputError != 1) {
/*SelectedMeasureID could also exist if submit had not been clicked this code would not run in this case cos submit is false of course see the delete code below*/
// Check the name does not clash
$sql = "SELECT count(*) FROM unitsofmeasure\n\t\t\t\tWHERE unitid <> '" . $SelectedMeasureID . "'\n\t\t\t\tAND unitname " . LIKE . " '" . $_POST['MeasureName'] . "'";
$result = DB_query($sql);
$myrow = DB_fetch_row($result);
if ($myrow[0] > 0) {
$InputError = 1;
示例6: header
/* Was the Cancel button pressed the last time through ? */
if (isset($_POST['EnterCompanyDetails'])) {
header('Location:' . $RootPath . '/CompanyPreferences.php?' . SID);
exit;
}
$Title = _('Make New Company Database Utility');
include 'includes/header.inc';
/* Your webserver user MUST have read/write access to here,
otherwise you'll be wasting your time */
if (!is_writeable('./companies/')) {
prnMsg(_('The web-server does not appear to be able to write to the companies directory to create the required directories for the new company and to upload the logo to. The system administrator will need to modify the permissions on your installation before a new company can be created'), 'error');
include 'includes/footer.inc';
exit;
}
if (isset($_POST['submit']) and isset($_POST['NewDatabase'])) {
if (mb_strlen($_POST['NewDatabase']) > 32 or ContainsIllegalCharacters($_POST['NewDatabase'])) {
prnMsg(_('Company database must not contain spaces, \\& or " or \''), 'error');
} else {
$_POST['NewDatabase'] = strtolower($_POST['NewDatabase']);
echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?' . SID . '">';
echo '<div class="centre">';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
/* check for directory existence */
if (!file_exists('./companies/' . $_POST['NewDatabase']) and (isset($_FILES['LogoFile']) and $_FILES['LogoFile']['name'] != '')) {
$result = $_FILES['LogoFile']['error'];
$UploadTheLogo = 'Yes';
//Assume all is well to start off with
$filename = './companies/' . $_POST['NewDatabase'] . '/logo.jpg';
//But check for the worst
if (mb_strtoupper(mb_substr(trim($_FILES['LogoFile']['name']), mb_strlen($_FILES['LogoFile']['name']) - 3)) != 'JPG') {
prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'), 'warn');
示例7: array
include 'includes/footer.inc';
exit;
}
$ModuleList = array(_('Orders'), _('Receivables'), _('Payables'), _('Purchasing'), _('Inventory'), _('Manufacturing'), _('General Ledger'), _('Asset Manager'), _('Petty Cash'), _('Setup'));
echo '<a href="' . $RootPath . '/SelectSupplier.php?">' . _('Back to Suppliers') . '</a><br />';
echo '<p class="page_title_text"><img src="' . $RootPath . '/css/' . $Theme . '/images/supplier.png" title="' . _('Supplier') . '" alt="" />' . ' ' . _('Supplier') . ' : ' . $_SESSION['SupplierID'] . _(' has been selected') . '</p><br />';
if (isset($_POST['submit'])) {
//initialise no input errors assumed initially before we test
$InputError = 0;
/* actions to take once the user has clicked the submit button
ie the page has called itself with some user input */
//first off validate inputs sensible
if (mb_strlen($_POST['UserID']) < 4) {
$InputError = 1;
prnMsg(_('The user ID entered must be at least 4 characters long'), 'error');
} elseif (ContainsIllegalCharacters($_POST['UserID'])) {
$InputError = 1;
prnMsg(_('User names cannot contain any of the following characters') . " - ' & + \" \\ " . _('or a space'), 'error');
} elseif (mb_strlen($_POST['Password']) < 5) {
$InputError = 1;
prnMsg(_('The password entered must be at least 5 characters long'), 'error');
} elseif (mb_strstr($_POST['Password'], $_POST['UserID']) != False) {
$InputError = 1;
prnMsg(_('The password cannot contain the user id'), 'error');
}
/* Make a comma separated list of modules allowed ready to update the database*/
$i = 0;
$ModulesAllowed = '';
while ($i < count($ModuleList)) {
$ModulesAllowed .= ' ' . ',';
//no any modules allowed for the suppliers
示例8: DB_query
$InputError = 0;
$i = 1;
/* actions to take once the user has clicked the submit button
ie the page has called itself with some user input */
//first off validate inputs sensible
if (isset($_POST['SectionID'])) {
$sql = "SELECT sectionid\n\t\t\t\t\tFROM accountsection\n\t\t\t\t\tWHERE sectionid='" . $_POST['SectionID'] . "'";
$result = DB_query($sql, $db);
if (DB_num_rows($result) != 0 and !isset($_POST['SelectedSectionID'])) {
$InputError = 1;
prnMsg(_('The account section already exists in the database'), 'error');
$Errors[$i] = 'SectionID';
$i++;
}
}
if (ContainsIllegalCharacters($_POST['SectionName'])) {
$InputError = 1;
prnMsg(_('The account section name cannot contain any illegal characters'), 'error');
$Errors[$i] = 'SectionName';
$i++;
}
if (mb_strlen($_POST['SectionName']) == 0) {
$InputError = 1;
prnMsg(_('The account section name must contain at least one character'), 'error');
$Errors[$i] = 'SectionName';
$i++;
}
if (isset($_POST['SectionID']) and !is_numeric($_POST['SectionID'])) {
$InputError = 1;
prnMsg(_('The section number must be an integer'), 'error');
$Errors[$i] = 'SectionID';
示例9: _
<?php
include 'includes/session.inc';
$Title = _('Stock Of Controlled Items');
include 'includes/header.inc';
echo '<p class="page_title_text noPrint" >
<img src="' . $RootPath . '/css/' . $Theme . '/images/inventory.png" title="' . _('Inventory') . '" alt="" /><b>' . $Title . '</b>
</p>';
if (isset($_GET['StockID'])) {
if (ContainsIllegalCharacters($_GET['StockID'])) {
prnMsg(_('The stock code sent to this page appears to be invalid'), 'error');
include 'includes/footer.inc';
exit;
}
$StockID = trim(mb_strtoupper($_GET['StockID']));
} else {
prnMsg(_('This page must be called with parameters specifying the item to show the serial references and quantities') . '. ' . _('It cannot be displayed without the proper parameters being passed'), 'error');
include 'includes/footer.inc';
exit;
}
$result = DB_query("SELECT description,\n\t\t\t\t\t\t\tunits,\n\t\t\t\t\t\t\tmbflag,\n\t\t\t\t\t\t\tdecimalplaces,\n\t\t\t\t\t\t\tserialised,\n\t\t\t\t\t\t\tcontrolled,\n\t\t\t\t\t\t\tperishable\n\t\t\t\t\t\tFROM stockmaster\n\t\t\t\t\t\tWHERE stockid='" . $StockID . "'", $db, _('Could not retrieve the requested item because'));
$myrow = DB_fetch_array($result);
$Description = $myrow['description'];
$UOM = $myrow['units'];
$DecimalPlaces = $myrow['decimalplaces'];
$Serialised = $myrow['serialised'];
$Controlled = $myrow['controlled'];
$Perishable = $myrow['perishable'];
if ($myrow['mbflag'] == 'K' or $myrow['mbflag'] == 'A' or $myrow['mbflag'] == 'D') {
prnMsg(_('This item is either a kitset or assembly or a dummy part and cannot have a stock holding') . '. ' . _('This page cannot be displayed') . '. ' . _('Only serialised or controlled items can be displayed in this page'), 'error');
include 'includes/footer.inc';
示例10: prnMsg
if ($myrow[0] > 0 and isset($_POST['New'])) {
$InputError = 1;
prnMsg(_('The company number already exists in the database'), 'error');
$Errors[$i] = 'DebtorNo';
$i++;
} elseif (strlen($_POST['CustName']) > 40 or strlen($_POST['CustName']) == 0) {
$InputError = 1;
prnMsg(_('The company name must be entered and be forty characters or less long'), 'error');
$Errors[$i] = 'CustName';
$i++;
} elseif (strlen($_POST['DebtorNo']) == 0) {
$InputError = 1;
prnMsg(_('The debtor code cannot be empty'), 'error');
$Errors[$i] = 'DebtorNo';
$i++;
} elseif (ContainsIllegalCharacters($_POST['DebtorNo']) or strpos($_POST['DebtorNo'], ' ')) {
$InputError = 1;
prnMsg(_('The customer code cannot contain any of the illefal characters'), 'error');
$Errors[$i] = 'DebtorNo';
$i++;
} elseif (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) {
$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) {
示例11: trim
$GroupName = trim($_GET['GroupName']);
} else {
prnMsg(_('The Group Name should be less than 100 and cannot contains illegal characters'), 'error');
include 'includes/footer.inc';
exit;
}
if (isset($_GET['UserId']) and mb_strlen($_GET['UserId']) < 21 and !ContainsIllegalCharacters($_GET['UserId'])) {
$UserId = $_GET['UserId'];
} else {
prnMsg(_('The User Id should be set and must be less than 21 and cannot contains illegal characters'), 'error');
include 'includes/footer.inc';
exit;
}
if (isset($_GET['GroupId']) and is_numeric($_GET['GroupId'])) {
$GroupId = (int) $_GET['GroupId'];
if (isset($_GET['GroupName']) and mb_strlen($_GET['GroupName']) <= 100 and !ContainsIllegalCharacters($_GET['GroupName'])) {
$GroupName = trim($_GET['GroupName']);
} else {
prnMsg(_('The Group Name should be less than 100 and cannot contains illegal characters'), 'error');
include 'includes/footer.inc';
exit;
}
}
$sql = "DELETE FROM mailgroupdetails WHERE userid = '" . $UserId . "' AND groupname = '" . $GroupName . "'";
$ErrMsg = 'Failed to delete the userid ' . $UserId . ' from group ' . $GroupName;
$result = DB_query($sql, $db, $ErrMsg);
GetUsers($GroupId, $GroupName);
}
if (!isset($_GET['Edit'])) {
//display the input form
?>
示例12: _
include 'includes/session.inc';
$Title = _('Departments');
include 'includes/header.inc';
echo '<p class="page_title_text noPrint" ><img src="' . $RootPath . '/css/' . $Theme . '/images/magnifier.png" title="' . _('Departments') . '" alt="" />' . ' ' . $Title . '</p>';
if (isset($_GET['SelectedDepartmentID'])) {
$SelectedDepartmentID = $_GET['SelectedDepartmentID'];
} elseif (isset($_POST['SelectedDepartmentID'])) {
$SelectedDepartmentID = $_POST['SelectedDepartmentID'];
}
if (isset($_POST['Submit'])) {
//initialise no input errors assumed initially before we test
$InputError = 0;
/* actions to take once the user has clicked the submit button
ie the page has called itself with some user input */
//first off validate inputs sensible
if (ContainsIllegalCharacters($_POST['DepartmentName'])) {
$InputError = 1;
prnMsg(_('The description of the department must not contain the character') . " '&' " . _('or the character') . " '", 'error');
}
if (trim($_POST['DepartmentName']) == '') {
$InputError = 1;
prnMsg(_('The Name of the Department should not be empty'), 'error');
}
if (isset($_POST['SelectedDepartmentID']) and $_POST['SelectedDepartmentID'] != '' and $InputError != 1) {
/*SelectedDepartmentID could also exist if submit had not been clicked this code would not run in this case cos submit is false of course see the delete code below*/
// Check the name does not clash
$sql = "SELECT count(*) FROM departments\n\t\t\t\tWHERE departmentid <> '" . $SelectedDepartmentID . "'\n\t\t\t\tAND description " . LIKE . " '" . $_POST['DepartmentName'] . "'";
$result = DB_query($sql, $db);
$myrow = DB_fetch_row($result);
if ($myrow[0] > 0) {
$InputError = 1;
示例13: _
$BookMark = 'Z_ChangeGLAccountCode';
// Anchor's id in the manual's html document.
include 'includes/header.inc';
echo '<p class="page_title_text"><img alt="" src="' . $RootPath . '/css/' . $Theme . '/images/gl.png" title="' . _('Change A GL Account Code') . '" /> ' . _('Change A GL Account Code') . '</p>';
// Page title.
include 'includes/SQL_CommonFunctions.inc';
if (isset($_POST['ProcessGLAccountCode'])) {
$InputError = 0;
$_POST['NewAccountCode'] = mb_strtoupper($_POST['NewAccountCode']);
/*First check the code exists */
$result = DB_query("SELECT accountcode FROM chartmaster WHERE accountcode='" . $_POST['OldAccountCode'] . "'");
if (DB_num_rows($result) == 0) {
prnMsg(_('The GL account code') . ': ' . $_POST['OldAccountCode'] . ' ' . _('does not currently exist as a GL account code in the system'), 'error');
$InputError = 1;
}
if (ContainsIllegalCharacters($_POST['NewAccountCode'])) {
prnMsg(_('The new GL account code to change the old code to contains illegal characters - no changes will be made'), 'error');
$InputError = 1;
}
if ($_POST['NewAccountCode'] == '') {
prnMsg(_('The new GL account code to change the old code to must be entered as well'), 'error');
$InputError = 1;
}
/*Now check that the new code doesn't already exist */
$result = DB_query("SELECT accountcode FROM chartmaster WHERE accountcode='" . $_POST['NewAccountCode'] . "'");
if (DB_num_rows($result) != 0) {
echo '<br /><br />';
prnMsg(_('The replacement GL account code') . ': ' . $_POST['NewAccountCode'] . ' ' . _('already exists as a GL account code in the system') . ' - ' . _('a unique GL account code must be entered for the new code'), 'error');
$InputError = 1;
}
if ($InputError == 0) {
示例14: prnMsg
$InputError = 0;
/* actions to take once the user has clicked the submit button
ie the page has called itself with some user input */
//first off validate inputs sensible
$i = 1;
if ($_POST['TypeTabCode'] == '') {
$InputError = 1;
prnMsg('<br />' . _('The Tabs type code cannot be an empty string'), 'error');
$Errors[$i] = 'TypeTabCode';
$i++;
} elseif (mb_strlen($_POST['TypeTabCode']) > 20) {
$InputError = 1;
echo prnMsg(_('The tab code must be twenty characters or less long'), 'error');
$Errors[$i] = 'TypeTabCode';
$i++;
} 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) {
$InputError = 1;
echo prnMsg(_('The tab code must be Fifty characters or less long'), 'error');
$Errors[$i] = 'TypeTabCode';
$i++;
}
if (isset($SelectedTab) and $InputError != 1) {
$sql = "UPDATE pctypetabs\n\t\t\tSET typetabdescription = '" . $_POST['TypeTabDescription'] . "'\n\t\t\tWHERE typetabcode = '" . $SelectedTab . "'";
$msg = _('The Tabs type') . ' ' . $SelectedTab . ' ' . _('has been updated');
} elseif ($InputError != 1) {
// First check the type is not being duplicated
$checkSql = "SELECT count(*)\n\t\t\t\t FROM pctypetabs\n\t\t\t\t WHERE typetabcode = '" . $_POST['TypeTabCode'] . "'";
$checkresult = DB_query($checkSql, $db);
示例15: _
$Title = _('Customer EDI Set Up');
include 'includes/header.inc';
echo '<a href="' . $RootPath . '/SelectCustomer.php">' . _('Back to Customers') . '</a><br />';
if (isset($Errors)) {
unset($Errors);
}
$Errors = array();
$i = 0;
echo '<p class="page_title_text"><img src="' . $RootPath . '/css/' . $Theme . '/images/customer.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title . '</p><br />';
if (isset($_POST['submit'])) {
//initialise no input errors assumed initially before we test
$InputError = 0;
/* actions to take once the user has clicked the submit button
ie the page has called itself with some user input */
//first off validate inputs sensible
if (ContainsIllegalCharacters($_POST['EDIReference']) or mb_strstr($_POST['EDIReference'], ' ')) {
$InputError = 1;
prnMsg(_('The customers EDI reference code cannot contain any of the following characters') . ' - \' & + \\" ' . _('or a space'), 'warn');
}
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 (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';
$i++;
}