Thread: [Weberp-svn] SF.net SVN: weberp:[4191] trunk/Customers.php
Brought to you by:
sotandeka,
tim_schofield
From: <sot...@us...> - 2011-01-09 11:56:58
|
Revision: 4191 http://weberp.svn.sourceforge.net/weberp/?rev=4191&view=rev Author: sotandeka Date: 2011-01-09 11:56:52 +0000 (Sun, 09 Jan 2011) Log Message: ----------- Correct the quotes in SQL literals Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-01-09 11:56:18 UTC (rev 4190) +++ trunk/Customers.php 2011-01-09 11:56:52 UTC (rev 4191) @@ -427,8 +427,8 @@ /* First check that all the necessary items have been setup */ $SetupErrors=0; //Count errors - $sql='SELECT COUNT(typeabbrev) - FROM salestypes'; + $sql="SELECT COUNT(typeabbrev) + FROM salestypes"; $result=DB_query($sql, $db); $myrow=DB_fetch_row($result); if ($myrow[0]==0) { @@ -436,8 +436,8 @@ _('Click').' '.'<a target="_blank" href="' . $rootpath . '/SalesTypes.php">' . _('here').' ' . '</a>'._('to set up your price lists'),'warning').'<br />'; $SetupErrors += 1; } - $sql='SELECT COUNT(typeid) - FROM debtortype'; + $sql="SELECT COUNT(typeid) + FROM debtortype"; $result=DB_query($sql, $db); $myrow=DB_fetch_row($result); if ($myrow[0]==0) { @@ -491,7 +491,7 @@ echo '</table></td><td><table class=selection>'; // Show Sales Type drop down list - $result=DB_query('SELECT typeabbrev, sales_type FROM salestypes ',$db); + $result=DB_query("SELECT typeabbrev, sales_type FROM salestypes",$db); if (DB_num_rows($result)==0){ $DataError =1; echo '<a href="SalesTypes.php?" target="_parent">Setup Types</a>'; @@ -508,7 +508,7 @@ } // Show Customer Type drop down list - $result=DB_query('SELECT typeid, typename FROM debtortype ',$db); + $result=DB_query("SELECT typeid, typename FROM debtortype",$db); if (DB_num_rows($result)==0){ $DataError =1; echo '<a href="SalesTypes.php?" target="_parent">Setup Types</a>'; @@ -541,7 +541,7 @@ echo '<tr><td>' . _('Tax Reference') . ":</td> <td><input tabindex=15 type='Text' name='TaxRef' size=22 maxlength=20></td></tr>"; - $result=DB_query('SELECT terms, termsindicator FROM paymentterms',$db); + $result=DB_query("SELECT terms, termsindicator FROM paymentterms",$db); if (DB_num_rows($result)==0){ $DataError =1; echo '<tr><td colspan=2>' . prnMsg(_('There are no payment terms currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; @@ -559,7 +559,7 @@ } echo '<tr><td>' . _('Credit Status') . ':</td><td><select tabindex=16 name="HoldReason">'; - $result=DB_query('SELECT reasoncode, reasondescription FROM holdreasons',$db); + $result=DB_query("SELECT reasoncode, reasondescription FROM holdreasons",$db); if (DB_num_rows($result)==0){ $DataError =1; echo '<tr><td colspan=2>' . prnMsg(_('There are no credit statuses currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; @@ -571,13 +571,13 @@ echo '</select></td></tr>'; } - $result=DB_query('SELECT currency, currabrev FROM currencies',$db); + $result=DB_query("SELECT currency, currabrev FROM currencies",$db); if (DB_num_rows($result)==0){ $DataError =1; echo '<tr><td colspan=2>' . prnMsg(_('There are no currencies currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; } else { if (!isset($_POST['CurrCode'])){ - $CurrResult = DB_query('SELECT currencydefault FROM companies WHERE coycode=1',$db); + $CurrResult = DB_query("SELECT currencydefault FROM companies WHERE coycode=1",$db); $myrow = DB_fetch_row($CurrResult); $_POST['CurrCode'] = $myrow[0]; } @@ -733,11 +733,11 @@ } // Select sales types for drop down list if (isset($_GET['Modify'])) { - $result=DB_query('SELECT sales_type FROM salestypes WHERE typeabbrev="'.$_POST['SalesType'].'"',$db); + $result=DB_query("SELECT sales_type FROM salestypes WHERE typeabbrev='".$_POST['SalesType']."'",$db); $myrow=DB_fetch_array($result); echo '<tr><td>' . _('Sales Type') . ":</td><td>".$myrow['sales_type']."</td></tr>"; } else { - $result=DB_query('SELECT typeabbrev, sales_type FROM salestypes ',$db); + $result=DB_query("SELECT typeabbrev, sales_type FROM salestypes",$db); echo '<tr><td>' . _('Sales Type') . '/' . _('Price List') . ":</td> <td><select name='SalesType'>"; while ($myrow = DB_fetch_array($result)) { @@ -798,7 +798,7 @@ $myrow=DB_fetch_array($result); echo '<tr><td>' . _('Payment Terms') . ":</td><td>".$myrow['terms']."</td></tr>"; } else { - $result=DB_query('SELECT terms, termsindicator FROM paymentterms',$db); + $result=DB_query("SELECT terms, termsindicator FROM paymentterms",$db); echo '<tr><td>' . _('Payment Terms') . ":</td> <td><select name='PaymentTerms'>"; while ($myrow = DB_fetch_array($result)) { @@ -813,11 +813,11 @@ } if (isset($_GET['Modify'])) { - $result=DB_query('SELECT reasondescription FROM holdreasons WHERE reasoncode="'.$_POST['HoldReason'].'"',$db); + $result=DB_query("SELECT reasondescription FROM holdreasons WHERE reasoncode='".$_POST['HoldReason']."'",$db); $myrow=DB_fetch_array($result); echo '<tr><td>' . _('Credit Status') . ":</td><td>".$myrow['reasondescription']."</td></tr>"; } else { - $result=DB_query('SELECT reasoncode, reasondescription FROM holdreasons',$db); + $result=DB_query("SELECT reasoncode, reasondescription FROM holdreasons",$db); echo '<tr><td>' . _('Credit Status') . ":</td> <td><select name='HoldReason'>"; while ($myrow = DB_fetch_array($result)) { @@ -832,11 +832,11 @@ } if (isset($_GET['Modify'])) { - $result=DB_query('SELECT currency FROM currencies WHERE currabrev="'.$_POST['CurrCode'].'"',$db); + $result=DB_query("SELECT currency FROM currencies WHERE currabrev='".$_POST['CurrCode']."'",$db); $myrow=DB_fetch_array($result); echo '<tr><td>' . _('Credit Status') . ":</td><td>".$myrow['currency']."</td></tr>"; } else { - $result=DB_query('SELECT currency, currabrev FROM currencies',$db); + $result=DB_query("SELECT currency, currabrev FROM currencies",$db); echo '<tr><td>' . _('Customers Currency') . ":</td> <td><select name='CurrCode'>"; while ($myrow = DB_fetch_array($result)) { @@ -890,7 +890,7 @@ echo '</select></td></tr></table></td></tr>'; echo '<tr><td colspan=2>'; - $sql = 'SELECT * FROM custcontacts where debtorno="'.$DebtorNo.'" ORDER BY contid'; + $sql = "SELECT * FROM custcontacts where debtorno='".$DebtorNo."' ORDER BY contid"; $result = DB_query($sql,$db); echo '<table class=selection>'; @@ -982,20 +982,20 @@ } if (isset($_POST['update'])) { - $SQLupdatecc='UPDATE custcontacts - SET contactname="'.$_POST['custname'].'", - role="'.$_POST['role'].'", - phoneno="'.$_POST['phoneno'].'", - notes="'.DB_escape_string($_POST['notes']).'" - Where debtorno="'.$DebtorNo.'" - and contid="'.$Edit.'"'; + $SQLupdatecc="UPDATE custcontacts + SET contactname='".$_POST['custname']."', + role='".$_POST['role']."', + phoneno='".$_POST['phoneno']."', + notes='".DB_escape_string($_POST['notes'])."' + Where debtorno='".$DebtorNo."' + and contid='".$Edit."'"; $resultupcc = DB_query($SQLupdatecc,$db); echo '<br>'.$SQLupdatecc; echo '<meta http-equiv="Refresh" content="0; url="' . $_SERVER['PHP_SELF'] . '?'.SID.'&DebtorNo='.$DebtorNo.'&ID='.$ID.'">'; } if (isset($_GET['delete'])) { - $SQl='DELETE FROM custcontacts where debtorno="'.$DebtorNo.'" - and contid="'.$ID.'"'; + $SQl="DELETE FROM custcontacts where debtorno='".$DebtorNo."' + and contid='".$ID."'"; $resultupcc = DB_query($SQl,$db); echo '<meta http-equiv="Refresh" content="0; url=' . $_SERVER['PHP_SELF'] . '?'.SID.'&DebtorNo='.$DebtorNo.'">'; @@ -1021,4 +1021,4 @@ } // end of main ifs include('includes/footer.inc'); -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-03-27 13:44:16
|
Revision: 4933 http://weberp.svn.sourceforge.net/weberp/?rev=4933&view=rev Author: tim_schofield Date: 2011-03-27 13:44:10 +0000 (Sun, 27 Mar 2011) Log Message: ----------- Properly check for illegal characters in the customer code Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-03-27 13:44:00 UTC (rev 4932) +++ trunk/Customers.php 2011-03-27 13:44:10 UTC (rev 4933) @@ -51,7 +51,7 @@ prnMsg( _('The debtor code cannot be empty'),'error'); $Errors[$i] = 'DebtorNo'; $i++; - } elseif ($_SESSION['AutoDebtorNo']==0 AND ContainsIllegalCharacters($_POST['DebtorNo'])) { + } elseif ($_SESSION['AutoDebtorNo']==0 AND (ContainsIllegalCharacters($_POST['DebtorNo']) OR strpos($_POST['DebtorNo'], ' '))) { $InputError = 1; prnMsg( _('The customer code cannot contain any of the following characters') . " . - ' & + \" " . _('or a space'),'error'); $Errors[$i] = 'DebtorNo'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-04-01 20:50:32
|
Revision: 5030 http://weberp.svn.sourceforge.net/weberp/?rev=5030&view=rev Author: tim_schofield Date: 2011-04-01 20:50:25 +0000 (Fri, 01 Apr 2011) Log Message: ----------- Phil: HTML fixes Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-04-01 20:09:09 UTC (rev 5029) +++ trunk/Customers.php 2011-04-01 20:50:25 UTC (rev 5030) @@ -1,10 +1,7 @@ <?php /* $Id$ */ -/* $Revision: 1.44 $ */ -//$PageSecurity = 3; - include('includes/session.inc'); $title = _('Customer Maintenance'); @@ -56,9 +53,6 @@ prnMsg( _('The customer code cannot contain any of the following characters') . " . - ' & + \" " . _('or a space'),'error'); $Errors[$i] = 'DebtorNo'; $i++; -// } elseif (ContainsIllegalCharacters($_POST['Address1']) OR ContainsIllegalCharacters($_POST['Address2'])) { -// $InputError = 1; -// prnMsg( _('Lines of the address must not contain illegal characters'),'error'); } elseif (strlen($_POST['Address1']) >40) { $InputError = 1; prnMsg( _('The Line 1 of the address must be forty characters or less long'),'error'); @@ -225,7 +219,7 @@ $ErrMsg = _('The customer could not be updated because'); $result = DB_query($sql,$db,$ErrMsg); prnMsg( _('Customer updated'),'success'); - echo '<br>'; + echo '<br />'; } else { //it is a new customer /* set the DebtorNo if $AutoDebtorNo in config.php has been set to @@ -323,7 +317,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg( _('Cannot delete the customer record because orders have been created against it'),'warn'); - echo '<br> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('orders against this customer'); + echo '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('orders against this customer'); } else { $sql= "SELECT COUNT(*) FROM salesanalysis WHERE cust='" . $_POST['DebtorNo'] . "'"; $result = DB_query($sql,$db); @@ -331,7 +325,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg( _('Cannot delete this customer record because sales analysis records exist for it'),'warn'); - echo '<br> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('sales analysis records against this customer'); + echo '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('sales analysis records against this customer'); } else { $sql= "SELECT COUNT(*) FROM custbranch WHERE debtorno='" . $_POST['DebtorNo'] . "'"; $result = DB_query($sql,$db); @@ -339,7 +333,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg(_('Cannot delete this customer because there are branch records set up against it'),'warn'); - echo '<br> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('branch records relating to this customer'); + echo '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('branch records relating to this customer'); } } } @@ -417,9 +411,6 @@ $Add = $_GET['Add']; } -// This link is already on menu bar -//echo "<a href='" . $rootpath . '/SelectCustomer.php?' . SID . "'>" . _('Back to Customers') . '</a><br>'; - if (!isset($DebtorNo)) { /*If the page was called without $_POST['DebtorNo'] passed to page then assume a new customer is to be entered show a form with a Debtor Code field other wise the form showing the fields with the existing entries against the customer will show for editing with only a hidden DebtorNo field*/ @@ -493,43 +484,40 @@ // Show Sales Type drop down list $result=DB_query("SELECT typeabbrev, sales_type FROM salestypes",$db); if (DB_num_rows($result)==0){ - $DataError =1; - echo '<a href="SalesTypes.php?" target="_parent">Setup Types</a>'; - echo '<tr><td colspan=2>' . prnMsg(_('No sales types/price lists defined'),'error') . '</td></tr>'; - } else { - echo '<tr><td>' . _('Sales Type/Price List') . ':</td> - <td><select tabindex=9 name="SalesType">'; + $DataError =1; + echo '<a href="SalesTypes.php?" target="_parent">Setup Types</a>'; + echo '<tr><td colspan=2>' . prnMsg(_('No sales types/price lists defined'),'error') . '</td></tr>'; + } else { + echo '<tr><td>' . _('Sales Type/Price List') . ':</td> + <td><select tabindex=9 name="SalesType">'; - while ($myrow = DB_fetch_array($result)) { - echo '<option value="'. $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; - } //end while loopre - DB_data_seek($result,0); - echo '</select></td></tr>'; - } + while ($myrow = DB_fetch_array($result)) { + echo '<option value="'. $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; + } //end while loopre + DB_data_seek($result,0); + echo '</select></td></tr>'; + } // Show Customer Type drop down list - $result=DB_query("SELECT typeid, typename FROM debtortype",$db); - if (DB_num_rows($result)==0){ - $DataError =1; - echo '<a href="SalesTypes.php?" target="_parent">Setup Types</a>'; - echo '<tr><td colspan=2>' . prnMsg(_('No Customer types/price lists defined'),'error') . '</td></tr>'; - } else { - echo '<tr><td>' . _('Customer Type') . ':</td> - <td><select tabindex=9 name="typeid">'; + $result=DB_query("SELECT typeid, typename FROM debtortype",$db); + if (DB_num_rows($result)==0){ + $DataError =1; + echo '<a href="SalesTypes.php?" target="_parent">' . _('Setup Types') . '</a>'; + echo '<tr><td colspan=2>' . prnMsg(_('No Customer types/price lists defined'),'error') . '</td></tr>'; + } else { + echo '<tr><td>' . _('Customer Type') . ':</td> + <td><select tabindex=9 name="typeid">'; - while ($myrow = DB_fetch_array($result)) { - echo '<option value="'. $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; - } //end while loop - DB_data_seek($result,0); - echo '</select></td></tr>'; - } + while ($myrow = DB_fetch_array($result)) { + echo '<option value="'. $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; + } //end while loop + DB_data_seek($result,0); + echo '</select></td></tr>'; + } - - - - $DateString = Date($_SESSION['DefaultDateFormat']); - echo '<tr><td>' . _('Customer Since') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td><td><input tabindex=10 type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ClientSince" value="' . $DateString . '" size=12 maxlength=10></td></tr>'; + echo '<tr><td>' . _('Customer Since') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td> + <td><input tabindex=10 type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ClientSince" value="' . $DateString . '" size=12 maxlength=10></td></tr>'; echo '<tr><td>' . _('Discount Percent') . ':</td> <td><input tabindex=11 type="textbox" class="number" name="Discount" value=0 size=5 maxlength=4></td></tr>'; echo '<tr><td>' . _('Discount Code') . ':</td> @@ -594,20 +582,19 @@ echo '</select></td></tr>'; } - /*added line 8/23/2007 by Morris Kelly to set po line parameter Y/N*/ - echo '<tr><td>' . _('Customer PO Line on SO') . ":</td><td><select tabindex=18 name='CustomerPOLine'>"; - echo '<option selected value=0>' . _('No'); - echo '<option value=1>' . _('Yes'); + echo '<tr><td>' . _('Customer PO Line on SO') . ':</td><td><select tabindex="18" name="CustomerPOLine">'; + echo '<option selected value=0>' . _('No') . '</option>'; + echo '<option value=1>' . _('Yes') . '</option>'; echo '</select></td></tr>'; - echo '<tr><td>' . _('Invoice Addressing') . ":</td><td><select tabindex=19 name='AddrInvBranch'>"; - echo '<option selected VALUE=0>' . _('Address to HO'); - echo '<option VALUE=1>' . _('Address to Branch'); + echo '<tr><td>' . _('Invoice Addressing') . ':</td><td><select tabindex="19" name="AddrInvBranch">'; + echo '<option selected VALUE=0>' . _('Address to HO') . '</option>'; + echo '<option VALUE=1>' . _('Address to Branch') . '</option>'; echo '</select></td></tr>'; echo'</table></td></tr></table>'; if ($DataError ==0){ - echo "<br><div class='centre'><input tabindex=20 type='Submit' name='submit' value='" . _('Add New Customer') . "'> <input tabindex=21 type=submit action=RESET VALUE='" . _('Reset') . "'></div>"; + echo "<br /><div class='centre'><input tabindex=20 type='Submit' name='submit' value='" . _('Add New Customer') . "'> <input tabindex=21 type=submit action=RESET VALUE='" . _('Reset') . "'></div>"; } echo '</form>'; @@ -982,24 +969,24 @@ } if (isset($_POST['update'])) { - $SQLupdatecc="UPDATE custcontacts - SET contactname='".$_POST['custname']."', - role='".$_POST['role']."', - phoneno='".$_POST['phoneno']."', - notes='".DB_escape_string($_POST['notes'])."' - Where debtorno='".$DebtorNo."' - and contid='".$Edit."'"; - $resultupcc = DB_query($SQLupdatecc,$db); - echo '<br>'.$SQLupdatecc; - echo '<meta http-equiv="Refresh" content="0; url="' . $_SERVER['PHP_SELF'] . '?'.SID.'&DebtorNo='.$DebtorNo.'&ID='.$ID.'">'; - } + $SQLupdatecc="UPDATE custcontacts + SET contactname='".$_POST['custname']."', + role='".$_POST['role']."', + phoneno='".$_POST['phoneno']."', + notes='".DB_escape_string($_POST['notes'])."' + Where debtorno='".$DebtorNo."' + and contid='".$Edit."'"; + $resultupcc = DB_query($SQLupdatecc,$db); + echo '<br />'.$SQLupdatecc; + echo '<meta http-equiv="Refresh" content="0; url="' . $_SERVER['PHP_SELF'] . '?'.SID.'&DebtorNo='.$DebtorNo.'&ID='.$ID.'">'; + } if (isset($_GET['delete'])) { $SQl="DELETE FROM custcontacts where debtorno='".$DebtorNo."' and contid='".$ID."'"; $resultupcc = DB_query($SQl,$db); echo '<meta http-equiv="Refresh" content="0; url=' . $_SERVER['PHP_SELF'] . '?'.SID.'&DebtorNo='.$DebtorNo.'">'; - echo '<br>'.$SQl; + echo '<br />'.$SQl; prnmsg('Contact Deleted','success'); } @@ -1007,18 +994,18 @@ echo'</td></tr></table>'; if (isset($_POST['New']) and $_POST['New']) { - echo "<div class='centre'><input type='Submit' name='submit' VALUE='" . _('Add New Customer') . - "'> <input type=submit name='reset' VALUE='" . _('Reset') . "'></div></form>"; + echo '<div class="centre"><input type="Submit" name="submit" VALUE="' . _('Add New Customer') . + '"> <input type=submit name="reset" VALUE="' . _('Reset') . '"></div></form>'; } else if (!isset($_GET['Modify'])){ - echo "<br><div class='centre'><input type='Submit' name='submit' VALUE='" . _('Update Customer') . "'>"; + echo '<br /><div class="centre"><input type="Submit" name="submit" VALUE="' . _('Update Customer') . '">'; echo ' <input type="Submit" name="delete" VALUE="' . _('Delete Customer') . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">'; } if(isset($_POST['addcontact']) AND (isset($_POST['addcontact'])!='')) { - echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/AddCustomerContacts.php?' . SID . '&DebtorNo=' .$DebtorNo.'">'; + echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/AddCustomerContacts.php?DebtorNo=' .$DebtorNo.'">'; } echo '</div>'; } // end of main ifs include('includes/footer.inc'); -?> +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-12 13:30:09
|
Revision: 5969 http://weberp.svn.sourceforge.net/weberp/?rev=5969&view=rev Author: tim_schofield Date: 2011-07-12 13:30:03 +0000 (Tue, 12 Jul 2011) Log Message: ----------- Remove unnecessary use of SID Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-12 13:29:51 UTC (rev 5968) +++ trunk/Customers.php 2011-07-12 13:30:03 UTC (rev 5969) @@ -281,7 +281,7 @@ $BranchCode = mb_substr($_POST['DebtorNo'],0,4); - echo "<meta http-equiv='Refresh' content='0; url=" . $rootpath ."/CustomerBranches.php?" . SID . "&DebtorNo=" . $_POST['DebtorNo'] . "'>"; + echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath .'/CustomerBranches.php?DebtorNo=' . $_POST['DebtorNo'] . '">'; echo '<div class="centre">' . _('You should automatically be forwarded to the entry of a new Customer Branch page') . '. ' . _('If this does not happen') .' (' . _('if the browser does not support META Refresh') . ') ' . @@ -935,7 +935,7 @@ $myrow[5], $myrow[0], $myrow[1], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $myrow[0], $myrow[1]); } @@ -979,14 +979,14 @@ and contid='".$Edit."'"; $resultupcc = DB_query($SQLupdatecc,$db); echo '<br />'.$SQLupdatecc; - echo '<meta http-equiv="Refresh" content="0; url="' . $_SERVER['PHP_SELF'] . '?'.SID.'&DebtorNo='.$DebtorNo.'&ID='.$ID.'">'; + echo '<meta http-equiv="Refresh" content="0; url="' . $_SERVER['PHP_SELF'] . '?DebtorNo='.$DebtorNo.'&ID='.$ID.'">'; } if (isset($_GET['delete'])) { $SQl="DELETE FROM custcontacts where debtorno='".$DebtorNo."' and contid='".$ID."'"; $resultupcc = DB_query($SQl,$db); - echo '<meta http-equiv="Refresh" content="0; url=' . $_SERVER['PHP_SELF'] . '?'.SID.'&DebtorNo='.$DebtorNo.'">'; + echo '<meta http-equiv="Refresh" content="0; url=' . $_SERVER['PHP_SELF'] . '?DebtorNo='.$DebtorNo.'">'; echo '<br />'.$SQl; prnmsg('Contact Deleted','success'); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-14 16:01:19
|
Revision: 6197 http://weberp.svn.sourceforge.net/weberp/?rev=6197&view=rev Author: tim_schofield Date: 2011-07-14 16:01:12 +0000 (Thu, 14 Jul 2011) Log Message: ----------- XHTML quoting corrections Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-14 16:01:01 UTC (rev 6196) +++ trunk/Customers.php 2011-07-14 16:01:12 UTC (rev 6197) @@ -450,7 +450,7 @@ $DataError =0; - echo '<table class=selection cellspacing=4><tr><td valign=top><table class=selection>'; + echo '<table class="selection" cellspacing=4><tr><td valign=top><table class="selection">'; /* if $AutoDebtorNo in config.php has not been set or if it has been set to a number less than one, then provide an input box for the DebtorNo to manually assigned */ @@ -479,7 +479,7 @@ echo '<tr><td>' . _('Address Line 6') . ':</td> <td><input tabindex=8 type="Text" name="Address6" size=17 maxlength=15></td></tr>'; - echo '</table></td><td><table class=selection>'; + echo '</table></td><td><table class="selection">'; // Show Sales Type drop down list $result=DB_query("SELECT typeabbrev, sales_type FROM salestypes",$db); @@ -605,7 +605,7 @@ echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection cellspacing=4><tr><td valign=top><table class=selection>'; + echo '<table class="selection" cellspacing=4><tr><td valign=top><table class="selection">'; if (!isset($_POST['New'])) { $sql = "SELECT debtorsmaster.debtorno, @@ -695,7 +695,7 @@ echo '<tr><td>' . _('Address Line 4 (Postal Code)') . ':</td><td>' . $_POST['Address4'] . '</td></tr>'; echo '<tr><td>' . _('Address Line 5') . ':</td><td>' . $_POST['Address5'] . '</td></tr>'; echo '<tr><td>' . _('Address Line 6') . ':</td><td>' . $_POST['Address6'] . '</td></tr>'; - echo '</table></td><td><table class=selection>'; + echo '</table></td><td><table class="selection">'; } else { echo '<tr><td>' . _('Customer Name') . ':</td> <td><input ' . (in_array('CustName',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="CustName" value="' . $_POST['CustName'] . '" size=42 maxlength=40></td></tr>'; @@ -717,7 +717,7 @@ <td><input ' . (in_array('Address5',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="Address5" size=42 maxlength=40 value="' . $_POST['Address5'] . '"></td></tr>'; echo '<tr><td>' . _('Address Line 6') . ':</td> <td><input ' . (in_array('Address6',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="Address6" size=42 maxlength=40 value="' . $_POST['Address6'] . '"></td></tr>'; - echo '</table></td><td><table class=selection>'; + echo '</table></td><td><table class="selection">'; } // Select sales types for drop down list if (isset($_GET['Modify'])) { @@ -881,7 +881,7 @@ $sql = "SELECT * FROM custcontacts where debtorno='".$DebtorNo."' ORDER BY contid"; $result = DB_query($sql,$db); - echo '<table class=selection>'; + echo '<table class="selection">'; if (isset($_GET['Modify'])) { echo '<tr> <th>' . _('Name') . '</th> @@ -954,7 +954,7 @@ $_POST['role']=$myrowcc['role']; $_POST['phoneno']=$myrowcc['phoneno']; $_POST['notes']=$myrowcc['notes']; - echo '<table class=selection>'; + echo '<table class="selection">'; echo '<tr> <td>' . _('Name') . '</td><td><input type=text name="custname" value="'.$_POST['custname'].'"></td></tr><tr> <td>' . _('Role') . '</td><td><input type=text name="role" value="'.$_POST['role'].'"></td></tr><tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-15 15:09:25
|
Revision: 6336 http://weberp.svn.sourceforge.net/weberp/?rev=6336&view=rev Author: tim_schofield Date: 2011-07-15 15:09:19 +0000 (Fri, 15 Jul 2011) Log Message: ----------- XHTML quoting corrections Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-15 15:09:07 UTC (rev 6335) +++ trunk/Customers.php 2011-07-15 15:09:19 UTC (rev 6336) @@ -770,13 +770,13 @@ <tr><td>' . _('Customer Since') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td> <td><input ' . (in_array('ClientSince',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ClientSince" size=11 maxlength=10 value=' . $_POST['ClientSince'] . '></td></tr>'; echo '<tr><td>' . _('Discount Percent') . ':</td> - <td><input type="Text" name="Discount" class=number size=5 maxlength=4 value=' . $_POST['Discount'] . '></td></tr>'; + <td><input type="Text" name="Discount" class="number" size=5 maxlength=4 value=' . $_POST['Discount'] . '></td></tr>'; echo '<tr><td>' . _('Discount Code') . ':</td> <td><input ' . (in_array('DiscountCode',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="DiscountCode" size=3 maxlength=2 value="' . $_POST['DiscountCode'] . '"></td></tr>'; echo '<tr><td>' . _('Payment Discount Percent') . ':</td> - <td><input ' . (in_array('PymtDiscount',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" class=number name="PymtDiscount" size=5 maxlength=4 value=' . $_POST['PymtDiscount'] . '></td></tr>'; + <td><input ' . (in_array('PymtDiscount',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" class="number" name="PymtDiscount" size=5 maxlength=4 value=' . $_POST['PymtDiscount'] . '></td></tr>'; echo '<tr><td>' . _('Credit Limit') . ':</td> - <td><input ' . (in_array('CreditLimit',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" class=number name="CreditLimit" size=16 maxlength=14 value=' . $_POST['CreditLimit'] . '></td></tr>'; + <td><input ' . (in_array('CreditLimit',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" class="number" name="CreditLimit" size=16 maxlength=14 value=' . $_POST['CreditLimit'] . '></td></tr>'; echo '<tr><td>' . _('Tax Reference') . ':</td> <td><input type="Text" name="TaxRef" size=22 maxlength=20 value="' . $_POST['TaxRef'] . '"></td></tr>'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-15 22:31:11
|
Revision: 6433 http://weberp.svn.sourceforge.net/weberp/?rev=6433&view=rev Author: tim_schofield Date: 2011-07-15 22:31:05 +0000 (Fri, 15 Jul 2011) Log Message: ----------- XHTML quoting corrections Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-15 22:30:54 UTC (rev 6432) +++ trunk/Customers.php 2011-07-15 22:31:05 UTC (rev 6433) @@ -956,8 +956,8 @@ $_POST['notes']=$myrowcc['notes']; echo '<table class="selection">'; echo '<tr> - <td>' . _('Name') . '</td><td><input type=text name="custname" value="'.$_POST['custname'].'"></td></tr><tr> - <td>' . _('Role') . '</td><td><input type=text name="role" value="'.$_POST['role'].'"></td></tr><tr> + <td>' . _('Name') . '</td><td><input type="text" name="custname" value="'.$_POST['custname'].'"></td></tr><tr> + <td>' . _('Role') . '</td><td><input type="text" name="role" value="'.$_POST['role'].'"></td></tr><tr> <td>' . _('Phone no') . '</td><td><input type="text" name="phoneno" value="'.$_POST['phoneno'].'"></td></tr><tr> <td>' . _('Notes') . '</td><td><textarea name="notes">'.$_POST['notes'].'</textarea></td></tr> <tr><td colspan=2><input type=submit name=update value=update></td></tr></table> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-16 09:54:53
|
Revision: 6515 http://weberp.svn.sourceforge.net/weberp/?rev=6515&view=rev Author: tim_schofield Date: 2011-07-16 09:54:47 +0000 (Sat, 16 Jul 2011) Log Message: ----------- XHTML quoting corrections Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-16 09:54:36 UTC (rev 6514) +++ trunk/Customers.php 2011-07-16 09:54:47 UTC (rev 6515) @@ -671,11 +671,11 @@ $_POST['CustomerPOLine'] = $myrow['customerpoline']; $_POST['typeid'] = $myrow['typeid']; - echo '<input type=hidden name="DebtorNo" value="' . $DebtorNo . '">'; + echo '<input type="hidden" name="DebtorNo" value="' . $DebtorNo . '">'; } else { // its a new customer being added - echo '<input type=hidden name="New" value="Yes">'; + echo '<input type="hidden" name="New" value="Yes" />'; /* if $AutoDebtorNo in config.php has not been set or if it has been set to a number less than one, then provide an input box for the DebtorNo to manually assigned */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-16 12:57:17
|
Revision: 6568 http://weberp.svn.sourceforge.net/weberp/?rev=6568&view=rev Author: tim_schofield Date: 2011-07-16 12:57:11 +0000 (Sat, 16 Jul 2011) Log Message: ----------- XHTML quoting corrections Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-16 12:57:00 UTC (rev 6567) +++ trunk/Customers.php 2011-07-16 12:57:11 UTC (rev 6568) @@ -438,7 +438,7 @@ } if ($SetupErrors>0) { - echo '<br /><div class=centre><a href="'.$_SERVER['PHP_SELF'] .'" >'._('Click here to continue').'</a></div>'; + echo '<br /><div class="centre"><a href="'.$_SERVER['PHP_SELF'] .'" >'._('Click here to continue').'</a></div>'; include('includes/footer.inc'); exit; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-16 18:17:43
|
Revision: 6694 http://weberp.svn.sourceforge.net/weberp/?rev=6694&view=rev Author: tim_schofield Date: 2011-07-16 18:17:37 +0000 (Sat, 16 Jul 2011) Log Message: ----------- XHTML quoting corrections Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-16 18:17:26 UTC (rev 6693) +++ trunk/Customers.php 2011-07-16 18:17:37 UTC (rev 6694) @@ -595,7 +595,7 @@ echo'</table></td></tr></table>'; if ($DataError ==0){ echo '<br /><div class="centre"><input tabindex=20 type="Submit" name="submit" value="' . _('Add New Customer') . - '"> <input tabindex=21 type=submit action=RESET value="' . _('Reset') . '"></div>'; + '"> <input tabindex=21 type="submit" action=RESET value="' . _('Reset') . '"></div>'; } echo '</form>'; @@ -960,7 +960,7 @@ <td>' . _('Role') . '</td><td><input type="text" name="role" value="'.$_POST['role'].'"></td></tr><tr> <td>' . _('Phone no') . '</td><td><input type="text" name="phoneno" value="'.$_POST['phoneno'].'"></td></tr><tr> <td>' . _('Notes') . '</td><td><textarea name="notes">'.$_POST['notes'].'</textarea></td></tr> - <tr><td colspan=2><input type=submit name=update value=update></td></tr></table> + <tr><td colspan=2><input type="submit" name=update value=update></td></tr></table> '; echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?DebtorNo='.$DebtorNo.'&ID'.$ID.'">'; @@ -995,8 +995,8 @@ echo'</td></tr></table>'; if (isset($_POST['New']) and $_POST['New']) { - echo '<div class="centre"><input type="Submit" name="submit" value="' . _('Add New Customer') . - '"> <input type=submit name="reset" value="' . _('Reset') . '"></div></form>'; + echo '<div class="centre"><input type="submit" name="submit" value="' . _('Add New Customer') . '" /> + <input type="submit" name="reset" value="' . _('Reset') . '" /></div></form>'; } else if (!isset($_GET['Modify'])){ echo '<br /><div class="centre"><input type="Submit" name="submit" value="' . _('Update Customer') . '">'; echo ' <input type="Submit" name="delete" value="' . _('Delete Customer') . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-26 14:02:34
|
Revision: 6982 http://weberp.svn.sourceforge.net/weberp/?rev=6982&view=rev Author: tim_schofield Date: 2011-07-26 14:02:28 +0000 (Tue, 26 Jul 2011) Log Message: ----------- XHTML corrections to code Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-26 14:02:17 UTC (rev 6981) +++ trunk/Customers.php 2011-07-26 14:02:28 UTC (rev 6982) @@ -572,7 +572,7 @@ echo '<tr><td>' . _('Customer Currency') . ':</td><td><select tabindex=17 name="CurrCode">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['CurrCode']==$myrow['currabrev']){ - echo '<option selected value='. $myrow['currabrev'] . '>' . $myrow['currency'] . '</option>'; + echo '<option selected="True" value='. $myrow['currabrev'] . '>' . $myrow['currency'] . '</option>'; } else { echo '<option value='. $myrow['currabrev'] . '>' . $myrow['currency'] . '</option>'; } @@ -583,12 +583,12 @@ } echo '<tr><td>' . _('Customer PO Line on SO') . ':</td><td><select tabindex="18" name="CustomerPOLine">'; - echo '<option selected value=0>' . _('No') . '</option>'; + echo '<option selected="True" value=0>' . _('No') . '</option>'; echo '<option value=1>' . _('Yes') . '</option>'; echo '</select></td></tr>'; echo '<tr><td>' . _('Invoice Addressing') . ':</td><td><select tabindex="19" name="AddrInvBranch">'; - echo '<option selected value=0>' . _('Address to HO') . '</option>'; + echo '<option selected="True" value=0>' . _('Address to HO') . '</option>'; echo '<option value=1>' . _('Address to Branch') . '</option>'; echo '</select></td></tr>'; @@ -730,7 +730,7 @@ <td><select name="SalesType">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['SalesType']==$myrow['typeabbrev']){ - echo '<option selected value="'. $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; + echo '<option selected="True" value="'. $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; } else { echo '<option value="'. $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; } @@ -749,7 +749,7 @@ <td><select name="typeid">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['typeid']==$myrow['typeid']){ - echo '<option selected value="'. $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; + echo '<option selected="True" value="'. $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } else { echo '<option value="'. $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } @@ -791,7 +791,7 @@ <td><select name="PaymentTerms">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['PaymentTerms']==$myrow['termsindicator']){ - echo '<option selected value="'. $myrow['termsindicator'] . '">' . $myrow['terms'] . '</option>'; + echo '<option selected="True" value="'. $myrow['termsindicator'] . '">' . $myrow['terms'] . '</option>'; } else { echo '<option value='. $myrow['termsindicator'] . '">' . $myrow['terms'] . '</option>'; } @@ -810,7 +810,7 @@ <td><select name="HoldReason">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['HoldReason']==$myrow['reasoncode']){ - echo '<option selected value='. $myrow['reasoncode'] . '">' . $myrow['reasondescription'] . '</option>'; + echo '<option selected="True" value='. $myrow['reasoncode'] . '">' . $myrow['reasondescription'] . '</option>'; } else { echo '<option value='. $myrow['reasoncode'] . '">' . $myrow['reasondescription'] . '</option>'; } @@ -829,7 +829,7 @@ <td><select name="CurrCode">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['CurrCode']==$myrow['currabrev']){ - echo '<option selected value='. $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; + echo '<option selected="True" value='. $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; } else { echo '<option value='. $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; } @@ -848,11 +848,11 @@ echo '<tr><td>' . _('Require Customer PO Line on SO') . ':</td> <td><select name="CustomerPOLine">'; if ($_POST['CustomerPOLine']==0){ - echo '<option selected value=0>' . _('No') . '</option>'; + echo '<option selected="True" value=0>' . _('No') . '</option>'; echo '<option value=1>' . _('Yes') . '</option>'; } else { echo '<option value=0>' . _('No') . '</option>'; - echo '<option selected value=1>' . _('Yes') . '</option>'; + echo '<option selected="True" value=1>' . _('Yes') . '</option>'; } echo '</select></td></tr>'; } @@ -867,11 +867,11 @@ echo '<tr><td>' . _('Invoice Addressing') . ':</td> <td><select name="AddrInvBranch">'; if ($_POST['InvAddrBranch']==0){ - echo '<option selected value=0>' . _('Address to HO') . '</option>'; + echo '<option selected="True" value=0>' . _('Address to HO') . '</option>'; echo '<option value=1>' . _('Address to Branch') . '</option>'; } else { echo '<option value=0>' . _('Address to HO') . '</option>'; - echo '<option selected value=1>' . _('Address to Branch') . '</option>'; + echo '<option selected="True" value=1>' . _('Address to Branch') . '</option>'; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-26 18:42:22
|
Revision: 7015 http://weberp.svn.sourceforge.net/weberp/?rev=7015&view=rev Author: tim_schofield Date: 2011-07-26 18:42:15 +0000 (Tue, 26 Jul 2011) Log Message: ----------- XHTML corrections to code Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-26 18:03:03 UTC (rev 7014) +++ trunk/Customers.php 2011-07-26 18:42:15 UTC (rev 7015) @@ -446,38 +446,38 @@ echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<input type="Hidden" name="New" value="Yes">'; + echo '<input type="hidden" name="New" value="Yes" />'; $DataError =0; - echo '<table class="selection" cellspacing=4><tr><td valign=top><table class="selection">'; + echo '<table class="selection" cellspacing="4"><tr><td valign="top"><table class="selection">'; /* if $AutoDebtorNo in config.php has not been set or if it has been set to a number less than one, then provide an input box for the DebtorNo to manually assigned */ if ($_SESSION['AutoDebtorNo']==0) { - echo '<tr><td>' . _('Customer Code') . ':</td><td><input tabindex=1 type="Text" name="DebtorNo" size=11 maxlength=10></td></tr>'; + echo '<tr><td>' . _('Customer Code') . ':</td><td><input tabindex="1" type="text" name="DebtorNo" size="11" maxlength="10" /></td></tr>'; } echo '<tr><td>' . _('Customer Name') . ':</td> - <td><input tabindex=2 type="Text" name="CustName" size=42 maxlength=40></td></tr>'; + <td><input tabindex="2" type="text" name="CustName" size="42" maxlength="40" /></td></tr>'; echo '<tr><td>' . _('Telephone') . ':</td> - <td><input tabindex=2 type="Text" name="Phone" size=30 maxlength=40></td></tr>'; + <td><input tabindex="2" type="text" name="Phone" size="30" maxlength="40" /></td></tr>'; echo '<tr><td>' . _('Facsimile') . ':</td> - <td><input tabindex=2 type="Text" name="Fax" size=30 maxlength=40></td></tr>'; + <td><input tabindex="2" type="text" name="Fax" size="30" maxlength="40" /></td></tr>'; echo '<tr><td>' . _('Email Address') . ':</td> - <td><input tabindex=2 type="Text" name="Email" size=30 maxlength=40></td></tr>'; + <td><input tabindex="2" type="text" name="Email" size="30" maxlength="40" /></td></tr>'; echo '<tr><td>' . _('Address Line 1 (Street)') . ':</td> - <td><input tabindex=3 type="Text" name="Address1" size=42 maxlength=40></td></tr>'; + <td><input tabindex="3" type="text" name="Address1" size="42" maxlength="40" /></td></tr>'; echo '<tr><td>' . _('Address Line 2 (Suburb/City)') . ':</td> - <td><input tabindex=4 type="Text" name="Address2" size=42 maxlength=40></td></tr>'; + <td><input tabindex="4" type="text" name="Address2" size="42" maxlength="40" /></td></tr>'; echo '<tr><td>' . _('Address Line 3 (State/Province)') . ':</td> - <td><input tabindex=5 type="Text" name="Address3" size=42 maxlength=40></td></tr>'; + <td><input tabindex="5" type="text" name="Address3" size="42" maxlength="40" /></td></tr>'; echo '<tr><td>' . _('Address Line 4 (Postal Code)') . ':</td> - <td><input tabindex=6 type="Text" name="Address4" size=42 maxlength=40></td></tr>'; + <td><input tabindex="6" type="text" name="Address4" size="42" maxlength="40" /></td></tr>'; echo '<tr><td>' . _('Address Line 5') . ':</td> - <td><input tabindex=7 type="Text" name="Address5" size=22 maxlength=20></td></tr>'; + <td><input tabindex="7" type="text" name="Address5" size="22" maxlength="20" /></td></tr>'; echo '<tr><td>' . _('Address Line 6') . ':</td> - <td><input tabindex=8 type="Text" name="Address6" size=17 maxlength=15></td></tr>'; + <td><input tabindex="8" type="text" name="Address6" size="17" maxlength="15" /></td></tr>'; echo '</table></td><td><table class="selection">'; @@ -486,10 +486,10 @@ if (DB_num_rows($result)==0){ $DataError =1; echo '<a href="SalesTypes.php?" target="_parent">Setup Types</a>'; - echo '<tr><td colspan=2>' . prnMsg(_('No sales types/price lists defined'),'error') . '</td></tr>'; + echo '<tr><td colspan="2">' . prnMsg(_('No sales types/price lists defined'),'error') . '</td></tr>'; } else { echo '<tr><td>' . _('Sales Type/Price List') . ':</td> - <td><select tabindex=9 name="SalesType">'; + <td><select tabindex="9" name="SalesType">'; while ($myrow = DB_fetch_array($result)) { echo '<option value="'. $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; @@ -502,11 +502,11 @@ $result=DB_query("SELECT typeid, typename FROM debtortype",$db); if (DB_num_rows($result)==0){ $DataError =1; - echo '<a href="SalesTypes.php?" target="_parent">' . _('Setup Types') . '</a>'; - echo '<tr><td colspan=2>' . prnMsg(_('No Customer types/price lists defined'),'error') . '</td></tr>'; + echo '<a href="SalesTypes.php" target="_parent">' . _('Setup Types') . '</a>'; + echo '<tr><td colspan="2">' . prnMsg(_('No Customer types/price lists defined'),'error') . '</td></tr>'; } else { echo '<tr><td>' . _('Customer Type') . ':</td> - <td><select tabindex=9 name="typeid">'; + <td><select tabindex="9" name="typeid">'; while ($myrow = DB_fetch_array($result)) { echo '<option value="'. $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; @@ -517,26 +517,26 @@ $DateString = Date($_SESSION['DefaultDateFormat']); echo '<tr><td>' . _('Customer Since') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td> - <td><input tabindex=10 type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ClientSince" value="' . $DateString . '" size=12 maxlength=10></td></tr>'; + <td><input tabindex="10" type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ClientSince" value="' . $DateString . '" size="12" maxlength="10" /></td></tr>'; echo '<tr><td>' . _('Discount Percent') . ':</td> - <td><input tabindex=11 type="textbox" class="number" name="Discount" value=0 size=5 maxlength=4></td></tr>'; + <td><input tabindex="11" type="text" class="number" name="Discount" value="0" size="5" maxlength="4" /></td></tr>'; echo '<tr><td>' . _('Discount Code') . ':</td> - <td><input tabindex=12 type="text" name="DiscountCode" size=3 maxlength=2></td></tr>'; + <td><input tabindex="12" type="text" name="DiscountCode" size="3" maxlength="2" /></td></tr>'; echo '<tr><td>' . _('Payment Discount Percent') . ':</td> - <td><input tabindex=13 type="textbox" class ="number" name="PymtDiscount" value=0 size=5 maxlength=4></td></tr>'; + <td><input tabindex="13" type="text" class ="number" name="PymtDiscount" value="0" size="5" maxlength="4" /></td></tr>'; echo '<tr><td>' . _('Credit Limit') . ':</td> - <td><input tabindex=14 type="text" class="number" name="CreditLimit" value=' . $_SESSION['DefaultCreditLimit'] . ' size=16 maxlength=14></td></tr>'; + <td><input tabindex="14" type="text" class="number" name="CreditLimit" value="' . $_SESSION['DefaultCreditLimit'] . '" size="16" maxlength="14" /></td></tr>'; echo '<tr><td>' . _('Tax Reference') . ':</td> - <td><input tabindex=15 type="Text" name="TaxRef" size=22 maxlength=20></td></tr>'; + <td><input tabindex="15" type="text" name="TaxRef" size="22" maxlength="20" /></td></tr>'; $result=DB_query("SELECT terms, termsindicator FROM paymentterms",$db); if (DB_num_rows($result)==0){ $DataError =1; - echo '<tr><td colspan=2>' . prnMsg(_('There are no payment terms currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; + echo '<tr><td colspan="2">' . prnMsg(_('There are no payment terms currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; } else { echo '<tr><td>' . _('Payment Terms') . ':</td> - <td><select tabindex=15 name="PaymentTerms">'; + <td><select tabindex="15" name="PaymentTerms">'; while ($myrow = DB_fetch_array($result)) { echo '<option value="'. $myrow['termsindicator'] . '">' . $myrow['terms'] . '</option>'; @@ -545,12 +545,12 @@ echo '</select></td></tr>'; } - echo '<tr><td>' . _('Credit Status') . ':</td><td><select tabindex=16 name="HoldReason">'; + echo '<tr><td>' . _('Credit Status') . ':</td><td><select tabindex="16" name="HoldReason">'; $result=DB_query("SELECT reasoncode, reasondescription FROM holdreasons",$db); if (DB_num_rows($result)==0){ $DataError =1; - echo '<tr><td colspan=2>' . prnMsg(_('There are no credit statuses currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; + echo '<tr><td colspan="2">' . prnMsg(_('There are no credit statuses currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; } else { while ($myrow = DB_fetch_array($result)) { echo '<option value="'. $myrow['reasoncode'] . '">' . $myrow['reasondescription'] . '</option>'; @@ -562,19 +562,19 @@ $result=DB_query("SELECT currency, currabrev FROM currencies",$db); if (DB_num_rows($result)==0){ $DataError =1; - echo '<tr><td colspan=2>' . prnMsg(_('There are no currencies currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; + echo '<tr><td colspan="2">' . prnMsg(_('There are no currencies currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; } else { if (!isset($_POST['CurrCode'])){ $CurrResult = DB_query("SELECT currencydefault FROM companies WHERE coycode=1",$db); $myrow = DB_fetch_row($CurrResult); $_POST['CurrCode'] = $myrow[0]; } - echo '<tr><td>' . _('Customer Currency') . ':</td><td><select tabindex=17 name="CurrCode">'; + echo '<tr><td>' . _('Customer Currency') . ':</td><td><select tabindex="17" name="CurrCode">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['CurrCode']==$myrow['currabrev']){ - echo '<option selected="True" value='. $myrow['currabrev'] . '>' . $myrow['currency'] . '</option>'; + echo '<option selected="True" value="'. $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; } else { - echo '<option value='. $myrow['currabrev'] . '>' . $myrow['currency'] . '</option>'; + echo '<option value="'. $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; } } //end while loop DB_data_seek($result,0); @@ -583,19 +583,19 @@ } echo '<tr><td>' . _('Customer PO Line on SO') . ':</td><td><select tabindex="18" name="CustomerPOLine">'; - echo '<option selected="True" value=0>' . _('No') . '</option>'; - echo '<option value=1>' . _('Yes') . '</option>'; + echo '<option selected="True" value="0">' . _('No') . '</option>'; + echo '<option value="1">' . _('Yes') . '</option>'; echo '</select></td></tr>'; echo '<tr><td>' . _('Invoice Addressing') . ':</td><td><select tabindex="19" name="AddrInvBranch">'; - echo '<option selected="True" value=0>' . _('Address to HO') . '</option>'; - echo '<option value=1>' . _('Address to Branch') . '</option>'; + echo '<option selected="True" value="0">' . _('Address to HO') . '</option>'; + echo '<option value="1">' . _('Address to Branch') . '</option>'; echo '</select></td></tr>'; echo'</table></td></tr></table>'; if ($DataError ==0){ - echo '<br /><div class="centre"><input tabindex=20 type="Submit" name="submit" value="' . _('Add New Customer') . - '"> <input tabindex=21 type="submit" action=RESET value="' . _('Reset') . '"></div>'; + echo '<br /><div class="centre"><input tabindex="20" type="submit" name="submit" value="' . _('Add New Customer') . + '" /> <input tabindex="21" type="submit" action="reset" value="' . _('Reset') . '" /></div>'; } echo '</form>'; @@ -605,7 +605,7 @@ echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection" cellspacing=4><tr><td valign=top><table class="selection">'; + echo '<table class="selection" cellspacing="4"><tr><td valign="top"><table class="selection">'; if (!isset($_POST['New'])) { $sql = "SELECT debtorsmaster.debtorno, @@ -671,7 +671,7 @@ $_POST['CustomerPOLine'] = $myrow['customerpoline']; $_POST['typeid'] = $myrow['typeid']; - echo '<input type="hidden" name="DebtorNo" value="' . $DebtorNo . '">'; + echo '<input type="hidden" name="DebtorNo" value="' . $DebtorNo . '" />'; } else { // its a new customer being added @@ -681,7 +681,7 @@ then provide an input box for the DebtorNo to manually assigned */ if ($_SESSION['AutoDebtorNo']== 0 ) { echo '<tr><td>' . _('Customer Code') . ':</td> - <td><input ' . (in_array('DebtorNo',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="DebtorNo" value="' . $DebtorNo . '" size=12 maxlength=10></td></tr>'; + <td><input ' . (in_array('DebtorNo',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="DebtorNo" value="' . $DebtorNo . '" size="12" maxlength="10" /></td></tr>'; } } if (isset($_GET['Modify'])) { @@ -698,32 +698,32 @@ echo '</table></td><td><table class="selection">'; } else { echo '<tr><td>' . _('Customer Name') . ':</td> - <td><input ' . (in_array('CustName',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="CustName" value="' . $_POST['CustName'] . '" size=42 maxlength=40></td></tr>'; + <td><input ' . (in_array('CustName',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="CustName" value="' . $_POST['CustName'] . '" size="42" maxlength="40" /></td></tr>'; echo '<tr><td>' . _('Telephone') . ':</td> - <td><input ' . (in_array('Phone',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="Phone" value="' . $_POST['Phone'] . '" size=42 maxlength=40></td></tr>'; + <td><input ' . (in_array('Phone',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Phone" value="' . $_POST['Phone'] . '" size="42" maxlength="40" /></td></tr>'; echo '<tr><td>' . _('Facsimile') . ':</td> - <td><input ' . (in_array('Fax',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="Fax" value="' . $_POST['Fax'] . '" size=42 maxlength=40></td></tr>'; + <td><input ' . (in_array('Fax',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Fax" value="' . $_POST['Fax'] . '" size="42" maxlength="40" /></td></tr>'; echo '<tr><td>' . _('Email Address') . ':</td> - <td><input ' . (in_array('Email',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="Email" value="' . $_POST['Email'] . '" size=42 maxlength=40></td></tr>'; + <td><input ' . (in_array('Email',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Email" value="' . $_POST['Email'] . '" size="42" maxlength="40" /></td></tr>'; echo '<tr><td>' . _('Address Line 1 (Street)') . ':</td> - <td><input ' . (in_array('Address1',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="Address1" size=42 maxlength=40 value="' . $_POST['Address1'] . '"></td></tr>'; + <td><input ' . (in_array('Address1',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Address1" size="42" maxlength="40" value="' . $_POST['Address1'] . '" /></td></tr>'; echo '<tr><td>' . _('Address Line 2 (Suburb/City)') . ':</td> - <td><input ' . (in_array('Address2',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="Address2" size=42 maxlength=40 value="' . $_POST['Address2'] . '"></td></tr>'; + <td><input ' . (in_array('Address2',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Address2" size="42" maxlength="40" value="' . $_POST['Address2'] . '" /></td></tr>'; echo '<tr><td>' . _('Address Line 3 (State/Province)') . ':</td> - <td><input ' . (in_array('Address3',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="Address3" size=42 maxlength=40 value="' . $_POST['Address3'] . '"></td></tr>'; + <td><input ' . (in_array('Address3',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Address3" size="42" maxlength="40" value="' . $_POST['Address3'] . '" /></td></tr>'; echo '<tr><td>' . _('Address Line 4 (Postal Code)') . ':</td> - <td><input ' . (in_array('Address4',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="Address4" size=42 maxlength=40 value="' . $_POST['Address4'] . '"></td></tr>'; + <td><input ' . (in_array('Address4',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Address4" size="42" maxlength="40" value="' . $_POST['Address4'] . '" /></td></tr>'; echo '<tr><td>' . _('Address Line 5') . ':</td> - <td><input ' . (in_array('Address5',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="Address5" size=42 maxlength=40 value="' . $_POST['Address5'] . '"></td></tr>'; + <td><input ' . (in_array('Address5',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Address5" size="42" maxlength="40" value="' . $_POST['Address5'] . '" /></td></tr>'; echo '<tr><td>' . _('Address Line 6') . ':</td> - <td><input ' . (in_array('Address6',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="Address6" size=42 maxlength=40 value="' . $_POST['Address6'] . '"></td></tr>'; + <td><input ' . (in_array('Address6',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Address6" size="42" maxlength="40" value="' . $_POST['Address6'] . '" /></td></tr>'; echo '</table></td><td><table class="selection">'; } // Select sales types for drop down list if (isset($_GET['Modify'])) { $result=DB_query("SELECT sales_type FROM salestypes WHERE typeabbrev='".$_POST['SalesType']."'",$db); $myrow=DB_fetch_array($result); - echo '<tr><td>' . _('Sales Type') . ":</td><td>".$myrow['sales_type']."</td></tr>"; + echo '<tr><td>' . _('Sales Type') . ':</td><td>'.$myrow['sales_type'].'</td></tr>'; } else { $result=DB_query("SELECT typeabbrev, sales_type FROM salestypes",$db); echo '<tr><td>' . _('Sales Type') . '/' . _('Price List') . ':</td> @@ -736,13 +736,14 @@ } } //end while loop DB_data_seek($result,0); + echo '</select></td></tr>'; } // Select Customer types for drop down list for SELECT/UPDATE if (isset($_GET['Modify'])) { $result=DB_query("SELECT typename FROM debtortype WHERE typeid='".$_POST['typeid']."'",$db); $myrow=DB_fetch_array($result); - echo '<tr><td>' . _('Customer Type') . ":</td><td>".$myrow['typename']."</td></tr>"; + echo '<tr><td>' . _('Customer Type') . ':</td><td>'.$myrow['typename'].'</td></tr>'; } else { $result=DB_query("SELECT typeid, typename FROM debtortype ORDER BY typename",$db); echo '<tr><td>' . _('Customer Type') . ':</td> @@ -755,11 +756,11 @@ } } //end while loop DB_data_seek($result,0); + echo '</select></td></tr>'; } if (isset($_GET['Modify'])) { - echo '</select></td></tr> - <tr><td>' . _('Customer Since') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td><td>' . $_POST['ClientSince'] . '</td></tr>'; + echo '<tr><td>' . _('Customer Since') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td><td>' . $_POST['ClientSince'] . '</td></tr>'; echo '<tr><td>' . _('Discount Percent') . ':</td><td>' . $_POST['Discount'] . '</td></tr>'; echo '<tr><td>' . _('Discount Code') . ':</td><td>' . $_POST['DiscountCode'] . '</td></tr>'; echo '<tr><td>' . _('Payment Discount Percent') . ':</td><td>' . $_POST['PymtDiscount'] . '</td></tr>'; @@ -768,17 +769,17 @@ } else { echo '</select></td></tr> <tr><td>' . _('Customer Since') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td> - <td><input ' . (in_array('ClientSince',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ClientSince" size=11 maxlength=10 value=' . $_POST['ClientSince'] . '></td></tr>'; + <td><input ' . (in_array('ClientSince',$Errors) ? 'class="inputerror"' : '' ) .' type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ClientSince" size="11" maxlength="10" value="' . $_POST['ClientSince'] . '" /></td></tr>'; echo '<tr><td>' . _('Discount Percent') . ':</td> - <td><input type="Text" name="Discount" class="number" size=5 maxlength=4 value=' . $_POST['Discount'] . '></td></tr>'; + <td><input type="text" name="Discount" class="number" size="5" maxlength="4" value="' . $_POST['Discount'] . '" /></td></tr>'; echo '<tr><td>' . _('Discount Code') . ':</td> - <td><input ' . (in_array('DiscountCode',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="DiscountCode" size=3 maxlength=2 value="' . $_POST['DiscountCode'] . '"></td></tr>'; + <td><input ' . (in_array('DiscountCode',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="DiscountCode" size="3" maxlength="2" value="' . $_POST['DiscountCode'] . '" /></td></tr>'; echo '<tr><td>' . _('Payment Discount Percent') . ':</td> - <td><input ' . (in_array('PymtDiscount',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" class="number" name="PymtDiscount" size=5 maxlength=4 value=' . $_POST['PymtDiscount'] . '></td></tr>'; + <td><input ' . (in_array('PymtDiscount',$Errors) ? 'class="inputerror"' : '' ) .' type="text" class="number" name="PymtDiscount" size="5" maxlength="4" value="' . $_POST['PymtDiscount'] . '" /></td></tr>'; echo '<tr><td>' . _('Credit Limit') . ':</td> - <td><input ' . (in_array('CreditLimit',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" class="number" name="CreditLimit" size=16 maxlength=14 value=' . $_POST['CreditLimit'] . '></td></tr>'; + <td><input ' . (in_array('CreditLimit',$Errors) ? 'class="inputerror"' : '' ) .' type="text" class="number" name="CreditLimit" size="16" maxlength="14" value="' . $_POST['CreditLimit'] . '" /></td></tr>'; echo '<tr><td>' . _('Tax Reference') . ':</td> - <td><input type="Text" name="TaxRef" size=22 maxlength=20 value="' . $_POST['TaxRef'] . '"></td></tr>'; + <td><input type="text" name="TaxRef" size="22" maxlength="20" value="' . $_POST['TaxRef'] . '" /></td></tr>'; } if (isset($_GET['Modify'])) { @@ -793,7 +794,7 @@ if ($_POST['PaymentTerms']==$myrow['termsindicator']){ echo '<option selected="True" value="'. $myrow['termsindicator'] . '">' . $myrow['terms'] . '</option>'; } else { - echo '<option value='. $myrow['termsindicator'] . '">' . $myrow['terms'] . '</option>'; + echo '<option value="'. $myrow['termsindicator'] . '">' . $myrow['terms'] . '</option>'; } } //end while loop DB_data_seek($result,0); @@ -803,16 +804,16 @@ if (isset($_GET['Modify'])) { $result=DB_query("SELECT reasondescription FROM holdreasons WHERE reasoncode='".$_POST['HoldReason']."'",$db); $myrow=DB_fetch_array($result); - echo '<tr><td>' . _('Credit Status') . ":</td><td>".$myrow['reasondescription']."</td></tr>"; + echo '<tr><td>' . _('Credit Status') . ':</td><td>'.$myrow['reasondescription'].'</td></tr>'; } else { $result=DB_query("SELECT reasoncode, reasondescription FROM holdreasons",$db); echo '<tr><td>' . _('Credit Status') . ':</td> <td><select name="HoldReason">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['HoldReason']==$myrow['reasoncode']){ - echo '<option selected="True" value='. $myrow['reasoncode'] . '">' . $myrow['reasondescription'] . '</option>'; + echo '<option selected="True" value="'. $myrow['reasoncode'] . '">' . $myrow['reasondescription'] . '</option>'; } else { - echo '<option value='. $myrow['reasoncode'] . '">' . $myrow['reasondescription'] . '</option>'; + echo '<option value="'. $myrow['reasoncode'] . '">' . $myrow['reasondescription'] . '</option>'; } } //end while loop DB_data_seek($result,0); @@ -822,16 +823,16 @@ if (isset($_GET['Modify'])) { $result=DB_query("SELECT currency FROM currencies WHERE currabrev='".$_POST['CurrCode']."'",$db); $myrow=DB_fetch_array($result); - echo '<tr><td>' . _('Credit Status') . ":</td><td>".$myrow['currency']."</td></tr>"; + echo '<tr><td>' . _('Credit Status') . ':</td><td>'.$myrow['currency'].'</td></tr>'; } else { $result=DB_query("SELECT currency, currabrev FROM currencies",$db); echo '<tr><td>' . _('Customers Currency') . ':</td> <td><select name="CurrCode">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['CurrCode']==$myrow['currabrev']){ - echo '<option selected="True" value='. $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; + echo '<option selected="True" value="'. $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; } else { - echo '<option value='. $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; + echo '<option value="'. $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; } } //end while loop DB_data_seek($result,0); @@ -848,11 +849,11 @@ echo '<tr><td>' . _('Require Customer PO Line on SO') . ':</td> <td><select name="CustomerPOLine">'; if ($_POST['CustomerPOLine']==0){ - echo '<option selected="True" value=0>' . _('No') . '</option>'; - echo '<option value=1>' . _('Yes') . '</option>'; + echo '<option selected="True" value="0">' . _('No') . '</option>'; + echo '<option value="1">' . _('Yes') . '</option>'; } else { - echo '<option value=0>' . _('No') . '</option>'; - echo '<option selected="True" value=1>' . _('Yes') . '</option>'; + echo '<option value="0">' . _('No') . '</option>'; + echo '<option selected="True" value="1">' . _('Yes') . '</option>'; } echo '</select></td></tr>'; } @@ -867,16 +868,16 @@ echo '<tr><td>' . _('Invoice Addressing') . ':</td> <td><select name="AddrInvBranch">'; if ($_POST['InvAddrBranch']==0){ - echo '<option selected="True" value=0>' . _('Address to HO') . '</option>'; - echo '<option value=1>' . _('Address to Branch') . '</option>'; + echo '<option selected="True" value="0">' . _('Address to HO') . '</option>'; + echo '<option value="1">' . _('Address to Branch') . '</option>'; } else { - echo '<option value=0>' . _('Address to HO') . '</option>'; - echo '<option selected="True" value=1>' . _('Address to Branch') . '</option>'; + echo '<option value="0">' . _('Address to HO') . '</option>'; + echo '<option selected="True" value="1">' . _('Address to Branch') . '</option>'; } + echo '</select></td></tr></table>'; } - echo '</select></td></tr></table></td></tr>'; - echo '<tr><td colspan=2>'; +// echo '</td></tr><tr><td colspan="2">'; $sql = "SELECT * FROM custcontacts where debtorno='".$DebtorNo."' ORDER BY contid"; $result = DB_query($sql,$db); @@ -895,7 +896,7 @@ <th>' . _('Phone Number') . '</th> <th>' . _('Notes') . '</th> <th>' . _('Edit') . '</th> - <th colspan=2><input type="Submit" name="addcontact" value="Add Contact"></th></tr>'; + <th colspan="2"><input type="submit" name="addcontact" value="Add Contact" /></th></tr>'; } $k=0; //row colour counter @@ -942,7 +943,7 @@ }//END WHILE LIST LOOP echo '</table>'; // echo "<input type='Submit' name='addcontact' value='" . _('ADD Contact') . "'>"; - echo '<form method="post" action=' . $_SERVER['PHP_SELF'] . '?DebtorNo="'.$DebtorNo.'"&ID='.$ID.'&Edit'.$Edit.'>'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?DebtorNo='.$DebtorNo.'&ID='.$ID.'&Edit'.$Edit.'">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($Edit) and $Edit!='') { $SQLcustcontacts="SELECT * from custcontacts @@ -954,14 +955,27 @@ $_POST['role']=$myrowcc['role']; $_POST['phoneno']=$myrowcc['phoneno']; $_POST['notes']=$myrowcc['notes']; - echo '<table class="selection">'; - echo '<tr> - <td>' . _('Name') . '</td><td><input type="text" name="custname" value="'.$_POST['custname'].'"></td></tr><tr> - <td>' . _('Role') . '</td><td><input type="text" name="role" value="'.$_POST['role'].'"></td></tr><tr> - <td>' . _('Phone no') . '</td><td><input type="text" name="phoneno" value="'.$_POST['phoneno'].'"></td></tr><tr> - <td>' . _('Notes') . '</td><td><textarea name="notes">'.$_POST['notes'].'</textarea></td></tr> - <tr><td colspan=2><input type="submit" name=update value=update></td></tr></table> - '; + echo '<table class="selection"> + <tr> + <td>' . _('Name') . '</td> + <td><input type="text" name="custname" value="'.$_POST['custname'].'" /></td> + </tr> + <tr> + <td>' . _('Role') . '</td> + <td><input type="text" name="role" value="'.$_POST['role'].'" /></td> + </tr> + <tr> + <td>' . _('Phone no') . '</td> + <td><input type="text" name="phoneno" value="'.$_POST['phoneno'].'" /></td> + </tr> + <tr> + <td>' . _('Notes') . '</td> + <td><textarea name="notes">'.$_POST['notes'].'</textarea></td> + </tr> + <tr> + <td colspan="2"><input type="submit" name="update" value="update" /></td> + </tr> + </table>'; echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?DebtorNo='.$DebtorNo.'&ID'.$ID.'">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -979,7 +993,7 @@ and contid='".$Edit."'"; $resultupcc = DB_query($SQLupdatecc,$db); echo '<br />'.$SQLupdatecc; - echo '<meta http-equiv="Refresh" content="0; url="' . $_SERVER['PHP_SELF'] . '?DebtorNo='.$DebtorNo.'&ID='.$ID.'">'; + echo '<meta http-equiv="Refresh" content="0; url="' . $_SERVER['PHP_SELF'] . '?DebtorNo='.$DebtorNo.'&ID='.$ID.'" />'; } if (isset($_GET['delete'])) { $SQl="DELETE FROM custcontacts where debtorno='".$DebtorNo."' @@ -992,20 +1006,21 @@ } - echo'</td></tr></table>'; +// echo'</td></tr></table>'; if (isset($_POST['New']) and $_POST['New']) { echo '<div class="centre"><input type="submit" name="submit" value="' . _('Add New Customer') . '" /> <input type="submit" name="reset" value="' . _('Reset') . '" /></div></form>'; } else if (!isset($_GET['Modify'])){ - echo '<br /><div class="centre"><input type="Submit" name="submit" value="' . _('Update Customer') . '">'; - echo ' <input type="Submit" name="delete" value="' . _('Delete Customer') . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">'; + echo '<br /><div class="centre"><input type="Submit" name="submit" value="' . _('Update Customer') . '" />'; + echo ' <input type="Submit" name="delete" value="' . _('Delete Customer') . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');" /></div></form>'; + } else { + echo '</form>'; } if(isset($_POST['addcontact']) AND (isset($_POST['addcontact'])!='')) { - echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/AddCustomerContacts.php?DebtorNo=' .$DebtorNo.'">'; + echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/AddCustomerContacts.php?DebtorNo=' .$DebtorNo.'" />'; } - echo '</div>'; } // end of main ifs include('includes/footer.inc'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-27 20:43:19
|
Revision: 7093 http://weberp.svn.sourceforge.net/weberp/?rev=7093&view=rev Author: tim_schofield Date: 2011-07-27 20:43:13 +0000 (Wed, 27 Jul 2011) Log Message: ----------- XHTML corrections to code Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-27 20:42:58 UTC (rev 7092) +++ trunk/Customers.php 2011-07-27 20:43:13 UTC (rev 7093) @@ -1012,8 +1012,8 @@ echo '<div class="centre"><input type="submit" name="submit" value="' . _('Add New Customer') . '" /> <input type="submit" name="reset" value="' . _('Reset') . '" /></div></form>'; } else if (!isset($_GET['Modify'])){ - echo '<br /><div class="centre"><input type="Submit" name="submit" value="' . _('Update Customer') . '" />'; - echo ' <input type="Submit" name="delete" value="' . _('Delete Customer') . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');" /></div></form>'; + echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Update Customer') . '" />'; + echo ' <input type="submit" name="delete" value="' . _('Delete Customer') . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');" /></div></form>'; } else { echo '</form>'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-07 16:34:30
|
Revision: 7643 http://weberp.svn.sourceforge.net/weberp/?rev=7643&view=rev Author: tim_schofield Date: 2011-08-07 16:34:24 +0000 (Sun, 07 Aug 2011) Log Message: ----------- XHTML corrections to code Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-08-07 16:34:12 UTC (rev 7642) +++ trunk/Customers.php 2011-08-07 16:34:24 UTC (rev 7643) @@ -9,8 +9,7 @@ include('includes/header.inc'); include('includes/SQL_CommonFunctions.inc'); -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . - '" alt="" />' . ' ' . _('Customer Maintenance') . '</p>'; +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer Maintenance') . '</p>'; if (isset($Errors)) { unset($Errors); @@ -594,8 +593,8 @@ echo'</table></td></tr></table>'; if ($DataError ==0){ - echo '<br /><div class="centre"><input tabindex="20" type="submit" name="submit" value="' . _('Add New Customer') . - '" /> <input tabindex="21" type="submit" action="reset" value="' . _('Reset') . '" /></div>'; + echo '<br /><div class="centre"><input tabindex="20" type="submit" name="submit" value="' . _('Add New Customer') . '" /> + <input tabindex="21" type="submit" action="reset" value="' . _('Reset') . '" /></div>'; } echo '</form>'; @@ -703,7 +702,7 @@ <td><input ' . (in_array('Phone',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Phone" value="' . $_POST['Phone'] . '" size="42" maxlength="40" /></td></tr>'; echo '<tr><td>' . _('Facsimile') . ':</td> <td><input ' . (in_array('Fax',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Fax" value="' . $_POST['Fax'] . '" size="42" maxlength="40" /></td></tr>'; - echo '<tr><td>' . _('Email Address') . ':</td> + echo '<tr><td>' . _('Email Address') . ':</td> <td><input ' . (in_array('Email',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Email" value="' . $_POST['Email'] . '" size="42" maxlength="40" /></td></tr>'; echo '<tr><td>' . _('Address Line 1 (Street)') . ':</td> <td><input ' . (in_array('Address1',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Address1" size="42" maxlength="40" value="' . $_POST['Address1'] . '" /></td></tr>'; @@ -942,7 +941,7 @@ } }//END WHILE LIST LOOP echo '</table>'; - // echo "<input type='Submit' name='addcontact' value='" . _('ADD Contact') . "'>"; + // echo "<input type='Submit' name='addcontact' value='" . _('ADD Contact') . "' />"; echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?DebtorNo='.$DebtorNo.'&ID='.$ID.'&Edit'.$Edit.'">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($Edit) and $Edit!='') { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-09-21 19:40:46
|
Revision: 8178 http://weberp.svn.sourceforge.net/weberp/?rev=8178&view=rev Author: tim_schofield Date: 2011-09-21 19:40:39 +0000 (Wed, 21 Sep 2011) Log Message: ----------- Show numbers in correct formatting for the users locale Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-09-19 20:00:49 UTC (rev 8177) +++ trunk/Customers.php 2011-09-21 19:40:39 UTC (rev 8178) @@ -107,12 +107,12 @@ $Errors[$i] = 'Email'; $i++; } - elseif (!is_numeric($_POST['CreditLimit'])) { + elseif (!is_numeric(filter_currency_input($_POST['CreditLimit']))) { $InputError = 1; prnMsg( _('The credit limit must be numeric'),'error'); $Errors[$i] = 'CreditLimit'; $i++; - } elseif (!is_numeric($_POST['PymtDiscount'])) { + } elseif (!is_numeric(filter_number_input($_POST['PymtDiscount']))) { $InputError = 1; prnMsg( _('The payment discount must be numeric'),'error'); $Errors[$i] = 'PymtDiscount'; @@ -122,7 +122,7 @@ prnMsg( _('The customer since field must be a date in the format') . ' ' . $_SESSION['DefaultDateFormat'],'error'); $Errors[$i] = 'ClientSince'; $i++; - } elseif (!is_numeric($_POST['Discount'])) { + } elseif (!is_numeric(filter_number_input($_POST['Discount']))) { $InputError = 1; prnMsg( _('The discount percentage must be numeric'),'error'); $Errors[$i] = 'Discount'; @@ -169,10 +169,11 @@ clientsince='" . $SQL_ClientSince. "', holdreason='" . $_POST['HoldReason'] . "', paymentterms='" . $_POST['PaymentTerms'] . "', - discount='" . ($_POST['Discount'])/100 . "', + discount=" . filter_number_input($_POST['Discount']) . "/100, discountcode='" . $_POST['DiscountCode'] . "', - pymtdiscount='" . ($_POST['PymtDiscount'])/100 . "', - creditlimit='" . $_POST['CreditLimit'] . "', + discountcode='" . $_POST['DiscountCode'] . "', + pymtdiscount=" . filter_number_input($_POST['PymtDiscount']) . "/100, + creditlimit='" . filter_currency_input($_POST['CreditLimit']) . "', salestype = '" . $_POST['SalesType'] . "', invaddrbranch='" . $_POST['AddrInvBranch'] . "', taxref='" . $_POST['TaxRef'] . "', @@ -180,7 +181,6 @@ typeid='" . $_POST['typeid'] . "' WHERE debtorno = '" . $_POST['DebtorNo'] . "'"; } else { - $currsql = "SELECT currcode FROM debtorsmaster where debtorno = '" . $_POST['DebtorNo'] . "'"; @@ -199,10 +199,10 @@ clientsince='" . $SQL_ClientSince . "', holdreason='" . $_POST['HoldReason'] . "', paymentterms='" . $_POST['PaymentTerms'] . "', - discount='" . ($_POST['Discount'])/100 . "', + discount=" . filter_number_input($_POST['Discount']) . "/100, discountcode='" . $_POST['DiscountCode'] . "', - pymtdiscount='" . ($_POST['PymtDiscount'])/100 . "', - creditlimit='" . $_POST['CreditLimit'] . "', + pymtdiscount=" . filter_number_input($_POST['PymtDiscount']) . "/100, + creditlimit='" . filter_currency_input($_POST['CreditLimit']) . "', salestype = '" . $_POST['SalesType'] . "', invaddrbranch='" . $_POST['AddrInvBranch'] . "', taxref='" . $_POST['TaxRef'] . "', @@ -264,10 +264,10 @@ '" . $SQL_ClientSince . "', '" . $_POST['HoldReason'] . "', '" . $_POST['PaymentTerms'] . "', - '" . ($_POST['Discount'])/100 . "', + " . filter_number_input($_POST['Discount']) . "/100, '" . $_POST['DiscountCode'] . "', - '" . ($_POST['PymtDiscount'])/100 . "', - '" . $_POST['CreditLimit'] . "', + " . filter_number_input($_POST['PymtDiscount']) . "/100, + '" . filter_currency_input($_POST['CreditLimit']) . "', '" . $_POST['SalesType'] . "', '" . $_POST['AddrInvBranch'] . "', '" . $_POST['TaxRef'] . "', @@ -762,21 +762,20 @@ echo '<tr><td>' . _('Customer Since') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td><td>' . $_POST['ClientSince'] . '</td></tr>'; echo '<tr><td>' . _('Discount Percent') . ':</td><td>' . $_POST['Discount'] . '</td></tr>'; echo '<tr><td>' . _('Discount Code') . ':</td><td>' . $_POST['DiscountCode'] . '</td></tr>'; - echo '<tr><td>' . _('Payment Discount Percent') . ':</td><td>' . $_POST['PymtDiscount'] . '</td></tr>'; - echo '<tr><td>' . _('Credit Limit') . ':</td><td>' . number_format($_POST['CreditLimit'],2) . '</td></tr>'; + echo '<tr><td>' . _('Payment Discount Percent') . ':</td><td>' . locale_number_format($_POST['PymtDiscount'],2) . '</td></tr>'; + echo '<tr><td>' . _('Credit Limit') . ':</td><td>' . locale_money_format($_POST['CreditLimit'],$_POST['CurrCode']) . '</td></tr>'; echo '<tr><td>' . _('Tax Reference') . ':</td><td>' . $_POST['TaxRef'] . '</td></tr>'; } else { - echo '</select></td></tr> - <tr><td>' . _('Customer Since') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td> + echo '<tr><td>' . _('Customer Since') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td> <td><input ' . (in_array('ClientSince',$Errors) ? 'class="inputerror"' : '' ) .' type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ClientSince" size="11" maxlength="10" value="' . $_POST['ClientSince'] . '" /></td></tr>'; echo '<tr><td>' . _('Discount Percent') . ':</td> <td><input type="text" name="Discount" class="number" size="5" maxlength="4" value="' . $_POST['Discount'] . '" /></td></tr>'; echo '<tr><td>' . _('Discount Code') . ':</td> <td><input ' . (in_array('DiscountCode',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="DiscountCode" size="3" maxlength="2" value="' . $_POST['DiscountCode'] . '" /></td></tr>'; echo '<tr><td>' . _('Payment Discount Percent') . ':</td> - <td><input ' . (in_array('PymtDiscount',$Errors) ? 'class="inputerror"' : '' ) .' type="text" class="number" name="PymtDiscount" size="5" maxlength="4" value="' . $_POST['PymtDiscount'] . '" /></td></tr>'; + <td><input ' . (in_array('PymtDiscount',$Errors) ? 'class="inputerror"' : '' ) .' type="text" class="number" name="PymtDiscount" size="5" maxlength="4" value="' . locale_number_format($_POST['PymtDiscount'],2) . '" /></td></tr>'; echo '<tr><td>' . _('Credit Limit') . ':</td> - <td><input ' . (in_array('CreditLimit',$Errors) ? 'class="inputerror"' : '' ) .' type="text" class="number" name="CreditLimit" size="16" maxlength="14" value="' . $_POST['CreditLimit'] . '" /></td></tr>'; + <td><input type="text" class="number" name="CreditLimit" size="16" maxlength="14" value="' . locale_money_format($_POST['CreditLimit'],$_POST['CurrCode']) . '" /></td></tr>'; echo '<tr><td>' . _('Tax Reference') . ':</td> <td><input type="text" name="TaxRef" size="22" maxlength="20" value="' . $_POST['TaxRef'] . '" /></td></tr>'; } @@ -859,9 +858,9 @@ if (isset($_GET['Modify'])) { if ($_POST['CustomerPOLine']==0){ - echo '<tr><td>' . _('Invoice Addressing') . ':</td><td>'._('Address to HO').'</td></tr>'; + echo '<tr><td>' . _('Invoice Addressing') . ':</td><td>'._('Address to HO').'</td></tr></table>'; } else { - echo '<tr><td>' . _('Invoice Addressing') . ':</td><td>'._('Address to Branch').'</td></tr>'; + echo '<tr><td>' . _('Invoice Addressing') . ':</td><td>'._('Address to Branch').'</td></tr></table>'; } } else { echo '<tr><td>' . _('Invoice Addressing') . ':</td> @@ -873,7 +872,7 @@ echo '<option value="0">' . _('Address to HO') . '</option>'; echo '<option selected="True" value="1">' . _('Address to Branch') . '</option>'; } - echo '</select></td></tr></table>'; + echo '</select></td></tr></table></td></tr></table><br />'; } // echo '</td></tr><tr><td colspan="2">'; @@ -926,8 +925,8 @@ <td>%s</td> <td>%s</td> <td>%s</td> - <td><a href="AddCustomerContacts.php?Id=%s&DebtorNo=%s">'. _('Edit'). '</a></td> - <td><a href="%sID=%s&DebtorNo=%s&delete=1">'. _('Delete'). '</a></td> + <td><a href="AddCustomerContacts.php?Id=%s&DebtorNo=%s">'. _('Edit'). '</a></td> + <td><a href="%sID=%s&DebtorNo=%s&delete=1">'. _('Delete'). '</a></td> </tr>', $myrow[2], $myrow[3], This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-12-26 15:55:40
|
Revision: 8398 http://weberp.svn.sourceforge.net/weberp/?rev=8398&view=rev Author: tim_schofield Date: 2011-12-26 15:55:33 +0000 (Mon, 26 Dec 2011) Log Message: ----------- Remove select * sql, only retrieve fields we need Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-12-26 15:55:22 UTC (rev 8397) +++ trunk/Customers.php 2011-12-26 15:55:33 UTC (rev 8398) @@ -877,7 +877,15 @@ // echo '</td></tr><tr><td colspan="2">'; - $sql = "SELECT * FROM custcontacts where debtorno='".$DebtorNo."' ORDER BY contid"; + $sql = "SELECT contid, + debtorno, + contactname, + role, + phoneno, + notes + FROM custcontacts + WHERE debtorno='".$DebtorNo."' + ORDER BY contid"; $result = DB_query($sql,$db); echo '<table class="selection">'; @@ -913,13 +921,13 @@ <td>%s</td> <td>%s</td> </tr>', - $myrow[2], - $myrow[3], - $myrow[4], - $myrow[5], - $myrow[0], - $myrow[1], - $myrow[1]); + $myrow['contactname'], + $myrow['role'], + $myrow['phoneno'], + $myrow['notes'], + $myrow['contid'], + $myrow['debtorno'], + $myrow['debtorno']); } else { printf('<td>%s</td> <td>%s</td> @@ -928,15 +936,15 @@ <td><a href="AddCustomerContacts.php?Id=%s&DebtorNo=%s">'. _('Edit'). '</a></td> <td><a href="%sID=%s&DebtorNo=%s&delete=1">'. _('Delete'). '</a></td> </tr>', - $myrow[2], - $myrow[3], - $myrow[4], - $myrow[5], - $myrow[0], - $myrow[1], + $myrow['contactname'], + $myrow['role'], + $myrow['phoneno'], + $myrow['notes'], + $myrow['contid'], + $myrow['debtorno'], $_SERVER['PHP_SELF'] . '?', - $myrow[0], - $myrow[1]); + $myrow['contid'], + $myrow['debtorno']); } }//END WHILE LIST LOOP echo '</table>'; @@ -944,9 +952,13 @@ echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?DebtorNo='.$DebtorNo.'&ID='.$ID.'&Edit'.$Edit.'">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($Edit) and $Edit!='') { - $SQLcustcontacts="SELECT * from custcontacts + $SQLcustcontacts="SELECT contactname, + role, + phoneno, + notes + FROM custcontacts WHERE debtorno='".$DebtorNo."' - and contid='".$ID."'"; + AND contid='".$ID."'"; $resultcc = DB_query($SQLcustcontacts,$db); $myrowcc = DB_fetch_array($resultcc); $_POST['custname']=$myrowcc['contactname']; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Tu...@us...> - 2012-02-20 05:51:23
|
Revision: 8536 http://weberp.svn.sourceforge.net/weberp/?rev=8536&view=rev Author: TurboPT Date: 2012-02-20 05:51:17 +0000 (Mon, 20 Feb 2012) Log Message: ----------- 1. Reworked table tags to align their pairing. The page footer was getting crammed in to the right-hand side of the form instead of appearing at the bottom of the page as expected. 2. Removed two redundant form/FormID pairs. 3. Added comments about code block eliminations. [to be done in another change] Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2012-02-19 22:26:40 UTC (rev 8535) +++ trunk/Customers.php 2012-02-20 05:51:17 UTC (rev 8536) @@ -694,7 +694,6 @@ echo '<tr><td>' . _('Address Line 4 (Postal Code)') . ':</td><td>' . $_POST['Address4'] . '</td></tr>'; echo '<tr><td>' . _('Address Line 5') . ':</td><td>' . $_POST['Address5'] . '</td></tr>'; echo '<tr><td>' . _('Address Line 6') . ':</td><td>' . $_POST['Address6'] . '</td></tr>'; - echo '</table></td><td><table class="selection">'; } else { echo '<tr><td>' . _('Customer Name') . ':</td> <td><input ' . (in_array('CustName',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="CustName" value="' . $_POST['CustName'] . '" size="42" maxlength="40" /></td></tr>'; @@ -716,8 +715,10 @@ <td><input ' . (in_array('Address5',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Address5" size="42" maxlength="40" value="' . $_POST['Address5'] . '" /></td></tr>'; echo '<tr><td>' . _('Address Line 6') . ':</td> <td><input ' . (in_array('Address6',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Address6" size="42" maxlength="40" value="' . $_POST['Address6'] . '" /></td></tr>'; - echo '</table></td><td><table class="selection">'; } + + echo '</table></td><td><table class="selection">'; + // Select sales types for drop down list if (isset($_GET['Modify'])) { $result=DB_query("SELECT sales_type FROM salestypes WHERE typeabbrev='".$_POST['SalesType']."'",$db); @@ -858,9 +859,9 @@ if (isset($_GET['Modify'])) { if ($_POST['CustomerPOLine']==0){ - echo '<tr><td>' . _('Invoice Addressing') . ':</td><td>'._('Address to HO').'</td></tr></table>'; + echo '<tr><td>' . _('Invoice Addressing') . ':</td><td>'._('Address to HO').'</td></tr>'; } else { - echo '<tr><td>' . _('Invoice Addressing') . ':</td><td>'._('Address to Branch').'</td></tr></table>'; + echo '<tr><td>' . _('Invoice Addressing') . ':</td><td>'._('Address to Branch').'</td></tr>'; } } else { echo '<tr><td>' . _('Invoice Addressing') . ':</td> @@ -872,10 +873,10 @@ echo '<option value="0">' . _('Address to HO') . '</option>'; echo '<option selected="True" value="1">' . _('Address to Branch') . '</option>'; } - echo '</select></td></tr></table></td></tr></table><br />'; + echo '</select></td></tr>'; } -// echo '</td></tr><tr><td colspan="2">'; + echo '</table></td></tr></table><br />'; $sql = "SELECT contid, debtorno, @@ -889,6 +890,8 @@ $result = DB_query($sql,$db); echo '<table class="selection">'; + echo '<caption>' . _('Customer Contacts') . '</caption>'; + if (isset($_GET['Modify'])) { echo '<tr> <th>' . _('Name') . '</th> @@ -901,9 +904,9 @@ <th>' . _('Role') . '</th> <th>' . _('Phone Number') . '</th> <th>' . _('Notes') . '</th> - <th>' . _('Edit') . '</th> <th colspan="2"><input type="submit" name="addcontact" value="Add Contact" /></th></tr>'; } + $k=0; //row colour counter while ($myrow = DB_fetch_array($result)) { @@ -948,10 +951,11 @@ } }//END WHILE LIST LOOP echo '</table>'; - // echo "<input type='Submit' name='addcontact' value='" . _('ADD Contact') . "' />"; - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorNo='.$DebtorNo.'&ID='.$ID.'&Edit'.$Edit.'">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + if (isset($Edit) and $Edit!='') { +// I don't think this block is needed anymore? +// The AddCustomerContact script exists to add/edit contacts. +// [as referenced by the 'edit' hyperlink, and the meta refresh at the end of this script] $SQLcustcontacts="SELECT contactname, role, phoneno, @@ -986,14 +990,11 @@ <td colspan="2"><input type="submit" name="update" value="update" /></td> </tr> </table>'; - - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorNo='.$DebtorNo.'&ID'.$ID.'">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - - } - if (isset($_POST['update'])) { + if (isset($_POST['update'])) { +// I don't think this block is needed anymore, either? +// [same reason as mentioned in the block above] $SQLupdatecc="UPDATE custcontacts SET contactname='".$_POST['custname']."', role='".$_POST['role']."', @@ -1006,6 +1007,7 @@ echo '<meta http-equiv="Refresh" content="0; url="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorNo='.$DebtorNo.'&ID='.$ID.'" />'; } if (isset($_GET['delete'])) { +// This block is accessed using a Customer Contact's delete hyperlink. $SQl="DELETE FROM custcontacts where debtorno='".$DebtorNo."' and contid='".$ID."'"; $resultupcc = DB_query($SQl,$db); @@ -1015,9 +1017,6 @@ prnMsg('Contact Deleted','success'); } - -// echo'</td></tr></table>'; - if (isset($_POST['New']) and $_POST['New']) { echo '<div class="centre"><input type="submit" name="submit" value="' . _('Add New Customer') . '" /> <input type="submit" name="reset" value="' . _('Reset') . '" /></div></form>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-06-23 22:46:26
|
Revision: 9056 http://weberp.svn.sourceforge.net/weberp/?rev=9056&view=rev Author: tim_schofield Date: 2012-06-23 22:46:20 +0000 (Sat, 23 Jun 2012) Log Message: ----------- Layout changes Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2012-06-23 20:52:36 UTC (rev 9055) +++ trunk/Customers.php 2012-06-23 22:46:20 UTC (rev 9056) @@ -444,7 +444,7 @@ $DataError =0; - echo '<table class="selection" cellspacing="4"><tr><td valign="top"><table class="selection">'; + echo '<table class="selection" cellspacing="4"><tr><td valign="top"><table style="background: transparent">'; /* if $AutoDebtorNo in config.php has not been set or if it has been set to a number less than one, then provide an input box for the DebtorNo to manually assigned */ @@ -473,7 +473,7 @@ echo '<tr><td>' . _('Address Line 6') . ':</td> <td><input tabindex="8" type="text" name="Address6" size="17" maxlength="15" /></td></tr>'; - echo '</table></td><td><table class="selection">'; + echo '</table></td><td><table style="background: transparent">'; // Show Sales Type drop down list $result=DB_query("SELECT typeabbrev, sales_type FROM salestypes",$db); @@ -599,7 +599,7 @@ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection" cellspacing="4"><tr><td valign="top"><table class="selection">'; + echo '<table class="selection" cellspacing="4"><tr><td valign="top"><table style="background: transparent">'; if (!isset($_POST['New'])) { $sql = "SELECT debtorsmaster.debtorno, @@ -712,7 +712,7 @@ <td><input ' . (in_array('Address6',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Address6" size="42" maxlength="40" value="' . $_POST['Address6'] . '" /></td></tr>'; } - echo '</table></td><td><table class="selection">'; + echo '</table></td><td><table style="background: transparent">'; // Select sales types for drop down list if (isset($_GET['Modify'])) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-06-30 10:52:56
|
Revision: 9312 http://weberp.svn.sourceforge.net/weberp/?rev=9312&view=rev Author: tim_schofield Date: 2012-06-30 10:52:50 +0000 (Sat, 30 Jun 2012) Log Message: ----------- Provide event handler for new Ajax functionality Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2012-06-30 10:52:41 UTC (rev 9311) +++ trunk/Customers.php 2012-06-30 10:52:50 UTC (rev 9312) @@ -439,7 +439,7 @@ exit; } - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="New" value="Yes" />'; @@ -599,7 +599,7 @@ //DebtorNo exists - either passed when calling the form or from the form itself - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection" cellspacing="4"><tr><td valign="top"><table style="background: transparent">'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-07-09 10:19:13
|
Revision: 9393 http://weberp.svn.sourceforge.net/weberp/?rev=9393&view=rev Author: tim_schofield Date: 2012-07-09 10:19:02 +0000 (Mon, 09 Jul 2012) Log Message: ----------- Tidy up screen for new UI Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2012-07-09 10:18:53 UTC (rev 9392) +++ trunk/Customers.php 2012-07-09 10:19:02 UTC (rev 9393) @@ -11,8 +11,6 @@ include('includes/header.inc'); include('includes/SQL_CommonFunctions.inc'); -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer Maintenance') . '</p>'; - if (isset($Errors)) { unset($Errors); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-07-11 08:31:05
|
Revision: 9405 http://weberp.svn.sourceforge.net/weberp/?rev=9405&view=rev Author: tim_schofield Date: 2012-07-11 08:30:54 +0000 (Wed, 11 Jul 2012) Log Message: ----------- Improvements for new interface Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2012-07-11 08:17:16 UTC (rev 9404) +++ trunk/Customers.php 2012-07-11 08:30:54 UTC (rev 9405) @@ -345,7 +345,7 @@ } //end if Delete Customer } -if(isset($reset)){ +if(isset($_POST['reset'])){ unset($_POST['CustName']); unset($_POST['Address1']); unset($_POST['Address2']); @@ -444,7 +444,15 @@ $DataError =0; - echo '<table class="selection" cellspacing="4"><tr><td valign="top"><table style="background: transparent">'; + echo '<br /><table class="selection" cellspacing="4"> + <tr> + <th colspan="4" class="header"> + <img width="24px" src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Customer Details') . '" alt="" />' . _('Customer Details') . ' + </th> + </tr> + <tr> + <td valign="top"> + <table style="background: transparent">'; /* if $AutoDebtorNo in config.php has not been set or if it has been set to a number less than one, then provide an input box for the DebtorNo to manually assigned */ @@ -588,8 +596,15 @@ echo'</table></td></tr></table>'; if ($DataError ==0){ - echo '<br /><div class="centre"><button tabindex="20" type="submit" name="submit">' . _('Add New Customer') . '</button> - <button tabindex="21" type="submit" action="reset">' . _('Reset') . '</button></div>'; + echo '<br /> + <div class="centre"> + <button tabindex="20" type="submit" name="submit"> + <img src="'.$rootpath.'/css/'.$theme.'/images/tick.png" title="' . _('Save') . '" alt="" class="ButtonIcon" />' . _('Add New Customer') . ' + </button> + <button tabindex="21" type="submit" name="reset"> + <img src="'.$rootpath.'/css/'.$theme.'/images/cross.png" title="' . _('Save') . '" alt="" class="ButtonIcon" />' . _('Cancel') . ' + </button> + </div>'; } echo '</form>'; @@ -599,7 +614,6 @@ echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection" cellspacing="4"><tr><td valign="top"><table style="background: transparent">'; if (!isset($_POST['New'])) { $sql = "SELECT debtorsmaster.debtorno, @@ -637,9 +651,16 @@ $myrow = DB_fetch_array($result); /* if $AutoDebtorNo in config.php has not been set or if it has been set to a number less than one, then display the DebtorNo */ + echo '<br /> + <table class="selection" cellspacing="4">'; + echo '<tr> + <th colspan="4" class="header">' . _('Customer Details for') . ' ' . $myrow['debtorno'] . ' - ' . $myrow['name'] . '</th> + </tr>'; + echo '<tr><td valign="top"><table style="background: transparent">'; if ($_SESSION['AutoDebtorNo']== 0 ) { - echo '<tr><td>' . _('Customer Code') . ':</td> - <td>' . $DebtorNo. '</td></tr>'; + echo '<tr> + <td>' . _('Customer Code') . ':</td> + <td>' . $DebtorNo. '</td></tr>'; } $_POST['CustName'] = $myrow['name']; $_POST['Address1'] = $myrow['address1']; @@ -674,8 +695,10 @@ /* if $AutoDebtorNo in config.php has not been set or if it has been set to a number less than one, then provide an input box for the DebtorNo to manually assigned */ if ($_SESSION['AutoDebtorNo']== 0 ) { - echo '<tr><td>' . _('Customer Code') . ':</td> - <td><input ' . (in_array('DebtorNo',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="DebtorNo" value="' . $DebtorNo . '" size="12" maxlength="10" /></td></tr>'; + echo '<tr> + <td>' . _('Customer Code') . ':</td> + <td><input ' . (in_array('DebtorNo',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="DebtorNo" value="' . $DebtorNo . '" size="12" maxlength="10" /></td> + </tr>'; } } if (isset($_GET['Modify'])) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-07-11 09:51:26
|
Revision: 9411 http://weberp.svn.sourceforge.net/weberp/?rev=9411&view=rev Author: tim_schofield Date: 2012-07-11 09:51:15 +0000 (Wed, 11 Jul 2012) Log Message: ----------- Finish off new interface improvements Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2012-07-11 09:51:03 UTC (rev 9410) +++ trunk/Customers.php 2012-07-11 09:51:15 UTC (rev 9411) @@ -654,7 +654,10 @@ echo '<br /> <table class="selection" cellspacing="4">'; echo '<tr> - <th colspan="4" class="header">' . _('Customer Details for') . ' ' . $myrow['debtorno'] . ' - ' . $myrow['name'] . '</th> + <th colspan="4" class="header"> + <img width="24px" src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Customer Details') . '" alt="" /> + ' . _('Customer Details for') . ' ' . $myrow['debtorno'] . ' - ' . $myrow['name'] . ' + </th> </tr>'; echo '<tr><td valign="top"><table style="background: transparent">'; if ($_SESSION['AutoDebtorNo']== 0 ) { @@ -908,7 +911,7 @@ $result = DB_query($sql,$db); echo '<table class="selection">'; - echo '<tr><th class="header" colspan="6">' . _('Customer Contacts') . '</th></tr>'; + echo '<tr><th class="header" colspan="6"><img width="24px" src="' . $rootpath . '/css/' . $theme . '/images/group_add.png" title="' . _('Customer Contacts') . '" alt="" />' . _('Customer Contacts') . '</th></tr>'; if (isset($_GET['Modify'])) { echo '<tr> @@ -922,7 +925,10 @@ <th>' . _('Role') . '</th> <th>' . _('Phone Number') . '</th> <th>' . _('Notes') . '</th> - <th colspan="2"><button type="submit" name="addcontact">' . _('Add Contact') . '</button></th></tr>'; + <th colspan="2"> + <button type="submit" name="addcontact"> + <img src="'.$rootpath.'/css/'.$theme.'/images/add.png" title="' . _('Save') . '" alt="" class="ButtonIcon" />' . _('Add Contact') . ' + </button></th></tr>'; } $k=0; //row colour counter @@ -1036,11 +1042,15 @@ } if (isset($_POST['New']) and $_POST['New']) { - echo '<div class="centre"><button type="submit" name="submit">' . _('Add New Customer') . '</button> - <button type="submit" name="reset">' . _('Reset') . '</button></div></form>'; + echo '<div class="centre"><button type="submit" name="submit"> + <img src="'.$rootpath.'/css/'.$theme.'/images/tick.png" title="' . _('Save') . '" alt="" class="ButtonIcon" />' . _('Add New Customer') . '</button> + <button type="submit" name="reset"> + <img src="'.$rootpath.'/css/'.$theme.'/images/tick.png" title="' . _('Cancel') . '" alt="" class="ButtonIcon" />' . _('Cancel') . '</button></div></form>'; } else if (!isset($_GET['Modify'])){ - echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Update Customer') . '</button>'; - echo ' <button type="submit" name="delete" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . _('Delete Customer') . '</button></div><br /></form>'; + echo '<br /><div class="centre"><button type="submit" name="submit"> + <img src="'.$rootpath.'/css/'.$theme.'/images/tick.png" title="' . _('Save') . '" alt="" class="ButtonIcon" />' . _('Update Customer') . '</button>'; + echo ' <button type="submit" name="delete" onclick="return confirm(\'' . _('Are You Sure?') . '\');"> + <img src="'.$rootpath.'/css/'.$theme.'/images/cross.png" title="' . _('Delete') . '" alt="" class="ButtonIcon" />' . _('Delete Customer') . '</button></div><br /></form>'; } else { echo '</form>'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Tu...@us...> - 2012-09-03 12:28:14
|
Revision: 9580 http://weberp.svn.sourceforge.net/weberp/?rev=9580&view=rev Author: TurboPT Date: 2012-09-03 12:28:08 +0000 (Mon, 03 Sep 2012) Log Message: ----------- Add missing concat before closing div tag. Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2012-09-01 07:20:03 UTC (rev 9579) +++ trunk/Customers.php 2012-09-03 12:28:08 UTC (rev 9580) @@ -279,7 +279,7 @@ echo '<div class="centre">' . _('You should automatically be forwarded to the entry of a new Customer Branch page') . '. ' . _('If this does not happen') .' (' . _('if the browser does not support META Refresh') . ') ' . - InternalLink($rootpath, 'CustomerBranches.php?DebtorNo=' . $_POST['DebtorNo'], $_POST['DebtorNo']) '</div>'; + InternalLink($rootpath, 'CustomerBranches.php?DebtorNo=' . $_POST['DebtorNo'], $_POST['DebtorNo']) . '</div>'; include('includes/footer.inc'); exit; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-09-06 09:17:02
|
Revision: 9584 http://weberp.svn.sourceforge.net/weberp/?rev=9584&view=rev Author: tim_schofield Date: 2012-09-06 09:16:51 +0000 (Thu, 06 Sep 2012) Log Message: ----------- Improvements for new layout Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2012-09-06 09:16:39 UTC (rev 9583) +++ trunk/Customers.php 2012-09-06 09:16:51 UTC (rev 9584) @@ -213,7 +213,6 @@ $ErrMsg = _('The customer could not be updated because'); $result = DB_query($sql,$db,$ErrMsg); prnMsg( _('Customer updated'),'success'); - echo '<br />'; } else { //it is a new customer /* set the DebtorNo if $AutoDebtorNo in config.php has been set to @@ -302,7 +301,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg( _('This customer cannot be deleted because there are transactions that refer to it'),'warn'); - echo '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('transactions against this customer'); + echo _('There are') . ' ' . $myrow[0] . ' ' . _('transactions against this customer'); } else { $sql= "SELECT COUNT(*) FROM salesorders WHERE debtorno='" . $_POST['DebtorNo'] . "'"; @@ -311,7 +310,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg( _('Cannot delete the customer record because orders have been created against it'),'warn'); - echo '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('orders against this customer'); + echo _('There are') . ' ' . $myrow[0] . ' ' . _('orders against this customer'); } else { $sql= "SELECT COUNT(*) FROM salesanalysis WHERE cust='" . $_POST['DebtorNo'] . "'"; $result = DB_query($sql,$db); @@ -319,7 +318,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg( _('Cannot delete this customer record because sales analysis records exist for it'),'warn'); - echo '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('sales analysis records against this customer'); + echo _('There are') . ' ' . $myrow[0] . ' ' . _('sales analysis records against this customer'); } else { $sql= "SELECT COUNT(*) FROM custbranch WHERE debtorno='" . $_POST['DebtorNo'] . "'"; $result = DB_query($sql,$db); @@ -327,7 +326,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg(_('Cannot delete this customer because there are branch records set up against it'),'warn'); - echo '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('branch records relating to this customer'); + echo _('There are') . ' ' . $myrow[0] . ' ' . _('branch records relating to this customer'); } } } @@ -444,7 +443,7 @@ $DataError =0; - echo '<br /><table class="selection" cellspacing="4"> + echo '<table class="selection" cellspacing="4"> <tr> <th colspan="4" class="header"> <img width="24px" src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Customer Details') . '" alt="" />' . _('Customer Details') . ' @@ -457,29 +456,52 @@ /* if $AutoDebtorNo in config.php has not been set or if it has been set to a number less than one, then provide an input box for the DebtorNo to manually assigned */ if ($_SESSION['AutoDebtorNo']==0) { - echo '<tr><td>' . _('Customer Code') . ':</td><td><input tabindex="1" type="text" name="DebtorNo" size="11" maxlength="10" /></td></tr>'; + echo '<tr> + <td>' . _('Customer Code') . ':</td> + <td><input tabindex="1" type="text" name="DebtorNo" size="11" maxlength="10" /></td> + </tr>'; } - echo '<tr><td>' . _('Customer Name') . ':</td> - <td><input tabindex="2" type="text" name="CustName" size="42" maxlength="40" /></td></tr>'; - echo '<tr><td>' . _('Telephone') . ':</td> - <td><input tabindex="2" type="text" name="Phone" size="30" maxlength="40" /></td></tr>'; - echo '<tr><td>' . _('Facsimile') . ':</td> - <td><input tabindex="2" type="text" name="Fax" size="30" maxlength="40" /></td></tr>'; - echo '<tr><td>' . _('Email Address') . ':</td> - <td><input tabindex="2" type="text" name="Email" size="30" maxlength="40" /></td></tr>'; - echo '<tr><td>' . _('Address Line 1 (Street)') . ':</td> - <td><input tabindex="3" type="text" name="Address1" size="42" maxlength="40" /></td></tr>'; - echo '<tr><td>' . _('Address Line 2 (Suburb/City)') . ':</td> - <td><input tabindex="4" type="text" name="Address2" size="42" maxlength="40" /></td></tr>'; - echo '<tr><td>' . _('Address Line 3 (State/Province)') . ':</td> - <td><input tabindex="5" type="text" name="Address3" size="42" maxlength="40" /></td></tr>'; - echo '<tr><td>' . _('Address Line 4 (Postal Code)') . ':</td> - <td><input tabindex="6" type="text" name="Address4" size="42" maxlength="40" /></td></tr>'; - echo '<tr><td>' . _('Address Line 5') . ':</td> - <td><input tabindex="7" type="text" name="Address5" size="22" maxlength="20" /></td></tr>'; - echo '<tr><td>' . _('Address Line 6') . ':</td> - <td><input tabindex="8" type="text" name="Address6" size="17" maxlength="15" /></td></tr>'; + echo '<tr> + <td>' . _('Customer Name') . ':</td> + <td><input tabindex="2" type="text" name="CustName" size="42" maxlength="40" /></td> + </tr>'; + echo '<tr> + <td>' . _('Telephone') . ':</td> + <td><input tabindex="2" type="text" name="Phone" size="30" maxlength="40" /></td> + </tr>'; + echo '<tr> + <td>' . _('Facsimile') . ':</td> + <td><input tabindex="2" type="text" name="Fax" size="30" maxlength="40" /></td> + </tr>'; + echo '<tr> + <td>' . _('Email Address') . ':</td> + <td><input tabindex="2" type="text" name="Email" size="30" maxlength="40" /></td> + </tr>'; + echo '<tr> + <td>' . _('Address Line 1 (Street)') . ':</td> + <td><input tabindex="3" type="text" name="Address1" size="42" maxlength="40" /></td> + </tr>'; + echo '<tr> + <td>' . _('Address Line 2 (Suburb/City)') . ':</td> + <td><input tabindex="4" type="text" name="Address2" size="42" maxlength="40" /></td> + </tr>'; + echo '<tr> + <td>' . _('Address Line 3 (State/Province)') . ':</td> + <td><input tabindex="5" type="text" name="Address3" size="42" maxlength="40" /></td> + </tr>'; + echo '<tr> + <td>' . _('Address Line 4 (Postal Code)') . ':</td> + <td><input tabindex="6" type="text" name="Address4" size="42" maxlength="40" /></td> + </tr>'; + echo '<tr> + <td>' . _('Address Line 5') . ':</td> + <td><input tabindex="7" type="text" name="Address5" size="22" maxlength="20" /></td> + </tr>'; + echo '<tr> + <td>' . _('Address Line 6') . ':</td> + <td><input tabindex="8" type="text" name="Address6" size="17" maxlength="15" /></td> + </tr>'; echo '</table></td><td><table style="background: transparent">'; @@ -596,15 +618,14 @@ echo'</table></td></tr></table>'; if ($DataError ==0){ - echo '<br /> - <div class="centre"> - <button tabindex="20" type="submit" name="submit"> - <img src="'.$rootpath.'/css/'.$theme.'/images/tick.png" title="' . _('Save') . '" alt="" class="ButtonIcon" />' . _('Add New Customer') . ' - </button> - <button tabindex="21" type="submit" name="reset"> - <img src="'.$rootpath.'/css/'.$theme.'/images/cross.png" title="' . _('Save') . '" alt="" class="ButtonIcon" />' . _('Cancel') . ' - </button> - </div>'; + echo '<div class="centre"> + <button tabindex="20" type="submit" name="submit"> + <img src="'.$rootpath.'/css/'.$theme.'/images/tick.png" title="' . _('Save') . '" alt="" class="ButtonIcon" />' . _('Add New Customer') . ' + </button> + <button tabindex="21" type="submit" name="reset"> + <img src="'.$rootpath.'/css/'.$theme.'/images/cross.png" title="' . _('Save') . '" alt="" class="ButtonIcon" />' . _('Cancel') . ' + </button> + </div>'; } echo '</form>'; @@ -651,8 +672,7 @@ $myrow = DB_fetch_array($result); /* if $AutoDebtorNo in config.php has not been set or if it has been set to a number less than one, then display the DebtorNo */ - echo '<br /> - <table class="selection" cellspacing="4">'; + echo '<table class="selection" cellspacing="4">'; echo '<tr> <th colspan="4" class="header"> <img width="24px" src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Customer Details') . '" alt="" /> @@ -897,7 +917,7 @@ echo '</select></td></tr>'; } - echo '</table></td></tr></table><br />'; + echo '</table></td></tr></table>'; $sql = "SELECT contid, debtorno, @@ -1011,7 +1031,7 @@ Where debtorno='".$DebtorNo."' and contid='".$Edit."'"; $resultupcc = DB_query($SQLupdatecc,$db); - echo '<br />'.$SQLupdatecc; + echo $SQLupdatecc; echo '<meta http-equiv="Refresh" content="0; url="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorNo='.$DebtorNo.'&ID='.$ID.'" />'; } if (isset($_GET['delete'])) { @@ -1021,7 +1041,7 @@ $resultupcc = DB_query($SQl,$db); echo '<meta http-equiv="Refresh" content="0; url=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorNo='.$DebtorNo.'">'; - echo '<br />'.$SQl; + echo $SQl; prnMsg('Contact Deleted','success'); } @@ -1031,10 +1051,10 @@ <button type="submit" name="reset"> <img src="'.$rootpath.'/css/'.$theme.'/images/tick.png" title="' . _('Cancel') . '" alt="" class="ButtonIcon" />' . _('Cancel') . '</button></div></form>'; } else if (!isset($_GET['Modify'])){ - echo '<br /><div class="centre"><button type="submit" name="submit"> + echo '<div class="centre"><button type="submit" name="submit"> <img src="'.$rootpath.'/css/'.$theme.'/images/tick.png" title="' . _('Save') . '" alt="" class="ButtonIcon" />' . _('Update Customer') . '</button>'; echo ' <button type="submit" name="delete" onclick="return confirm(\'' . _('Are You Sure?') . '\');"> - <img src="'.$rootpath.'/css/'.$theme.'/images/cross.png" title="' . _('Delete') . '" alt="" class="ButtonIcon" />' . _('Delete Customer') . '</button></div><br /></form>'; + <img src="'.$rootpath.'/css/'.$theme.'/images/cross.png" title="' . _('Delete') . '" alt="" class="ButtonIcon" />' . _('Delete Customer') . '</button></div></form>'; } else { echo '</form>'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |