[Weberp-svn] SF.net SVN: weberp:[9573] trunk
Brought to you by:
sotandeka,
tim_schofield
|
From: <tim...@us...> - 2012-08-27 22:22:21
|
Revision: 9573
http://weberp.svn.sourceforge.net/weberp/?rev=9573&view=rev
Author: tim_schofield
Date: 2012-08-27 22:22:14 +0000 (Mon, 27 Aug 2012)
Log Message:
-----------
Replace <a tags with new InternalLink() function
Modified Paths:
--------------
trunk/BOMExtendedQty.php
trunk/BOMIndented.php
trunk/BOMIndentedReverse.php
trunk/BOMInquiry.php
trunk/BOMListing.php
trunk/BOMs.php
trunk/BankReconciliation.php
trunk/ConfirmDispatchControlled_Invoice.php
trunk/ConfirmDispatch_Invoice.php
trunk/ContractBOM.php
trunk/ContractOtherReqts.php
trunk/Contracts.php
trunk/CounterSales.php
Modified: trunk/BOMExtendedQty.php
===================================================================
--- trunk/BOMExtendedQty.php 2012-08-27 20:03:59 UTC (rev 9572)
+++ trunk/BOMExtendedQty.php 2012-08-27 22:22:14 UTC (rev 9573)
@@ -152,7 +152,7 @@
if (DB_error_no($db) !=0) {
prnMsg( _('The Quantiy Extended BOM Listing could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error');
- echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>';
+ echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu'));
if ($debug==1){
echo '<br />' . $sql;
}
Modified: trunk/BOMIndented.php
===================================================================
--- trunk/BOMIndented.php 2012-08-27 20:03:59 UTC (rev 9572)
+++ trunk/BOMIndented.php 2012-08-27 22:22:14 UTC (rev 9573)
@@ -151,7 +151,7 @@
$title = _('Indented BOM Listing') . ' - ' . _('Problem Report');
include('includes/header.inc');
prnMsg( _('The Indented BOM Listing could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error');
- echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>';
+ echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu'));
if ($debug==1){
echo '<br />'.$sql;
}
Modified: trunk/BOMIndentedReverse.php
===================================================================
--- trunk/BOMIndentedReverse.php 2012-08-27 20:03:59 UTC (rev 9572)
+++ trunk/BOMIndentedReverse.php 2012-08-27 22:22:14 UTC (rev 9573)
@@ -153,7 +153,7 @@
$title = _('Indented BOM Listing') . ' - ' . _('Problem Report');
include('includes/header.inc');
prnMsg( _('The Indented BOM Listing could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error');
- echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>';
+ echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu'));
if ($debug==1){
echo '<br />'.$sql;
}
Modified: trunk/BOMInquiry.php
===================================================================
--- trunk/BOMInquiry.php 2012-08-27 20:03:59 UTC (rev 9572)
+++ trunk/BOMInquiry.php 2012-08-27 22:22:14 UTC (rev 9573)
@@ -78,7 +78,7 @@
$k++;
}
- $ComponentLink = '<a href="'.$rootpath.'/SelectProduct.php?StockID=' . $myrow['component'] . '">' . $myrow['component'] . '</a>';
+ $ComponentLink = InternalLink($rootpath, 'SelectProduct.php?StockID=' . $myrow['component'], $myrow['component']);
/* Component Code Description Quantity Std Cost* Total Cost */
printf('<td>%s</td>
Modified: trunk/BOMListing.php
===================================================================
--- trunk/BOMListing.php 2012-08-27 20:03:59 UTC (rev 9572)
+++ trunk/BOMListing.php 2012-08-27 22:22:14 UTC (rev 9573)
@@ -45,7 +45,7 @@
$title = _('Bill of Materials Listing') . ' - ' . _('Problem Report');
include('includes/header.inc');
prnMsg(_('The Bill of Material listing could not be retrieved by the SQL because'),'error');
- echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>';
+ echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu'));
if ($debug==1){
echo '<br />' . $SQL;
}
Modified: trunk/BOMs.php
===================================================================
--- trunk/BOMs.php 2012-08-27 20:03:59 UTC (rev 9572)
+++ trunk/BOMs.php 2012-08-27 22:22:14 UTC (rev 9573)
@@ -413,7 +413,7 @@
break;
}
- echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Select a Different BOM') . '</a></div><br />';
+ echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Select a Different BOM')) . '</div><br />';
echo '<table class="selection">';
// Display Manufatured Parent Items
$sql = "SELECT bom.parent,
@@ -432,8 +432,7 @@
if( DB_num_rows($result) > 0 ) {
echo '<tr><td><div class="centre">'._('Manufactured parent items').' : ';
while ($myrow = DB_fetch_array($result)){
- echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select='.$myrow['parent'].'">'.
- $myrow['description'].' ('.$myrow['parent'].')</a>';
+ echo (($ix)?', ':'').InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select='.$myrow['parent'], $myrow['description'].' ('.$myrow['parent'].')');
$ix++;
} //end while loop
echo '</div></td></tr>';
@@ -453,8 +452,7 @@
echo (($reqnl)?'<br />':'').'<tr><td><div class="centre">'._('Assembly parent items').' : ';
$ix = 0;
while ($myrow = DB_fetch_array($result)){
- echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select='.$myrow['parent'].'">'.
- $myrow['description'].' ('.$myrow['parent'].')</a>';
+ echo (($ix)?', ':'').InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select='.$myrow['parent'], $myrow['description'].' ('.$myrow['parent'].')') . '</a>';
$ix++;
} //end while loop
echo '</div></td></tr>';
@@ -473,8 +471,7 @@
echo (($reqnl)?'<br />':'').'<tr><td><div class="centre">'._('Kit sets').' : ';
$ix = 0;
while ($myrow = DB_fetch_array($result)){
- echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select='.$myrow['parent'].'">'.
- $myrow['description'].' ('.$myrow['parent'].')</a>';
+ echo (($ix)?', ':''). InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select='.$myrow['parent'], $myrow['description'].' ('.$myrow['parent'].')');
$ix++;
} //end while loop
echo '</div></td></tr>';
@@ -493,8 +490,7 @@
echo (($reqnl)?'<br />':'').'<tr><td><div class="centre">'._('Phantom').' : ';
$ix = 0;
while ($myrow = DB_fetch_array($result)){
- echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select='.$myrow['parent'].'">'.
- $myrow['description'].' ('.$myrow['parent'].')</a>';
+ echo (($ix)?', ':'').InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select='.$myrow['parent'], $myrow['description'].' ('.$myrow['parent'].')');
$ix++;
} //end while loop
echo '</div></td></tr>';
@@ -653,7 +649,7 @@
if (DB_num_rows($result)==0){
prnMsg( _('There are no work centres set up yet') . '. ' . _('Please use the link below to set up work centres') . '.','warn');
- echo '<a href="'.$rootpath.'/WorkCentres.php">' . _('Work Centre Maintenance') . '</a></td></tr></table><br />';
+ echo InternalLink($rootpath, 'WorkCentres.php', _('Work Centre Maintenance')) . '</td></tr></table><br />';
include('includes/footer.inc');
exit;
}
Modified: trunk/BankReconciliation.php
===================================================================
--- trunk/BankReconciliation.php 2012-08-27 20:03:59 UTC (rev 9572)
+++ trunk/BankReconciliation.php 2012-08-27 22:22:14 UTC (rev 9573)
@@ -108,7 +108,7 @@
if (DB_num_rows($AccountsResults)==0){
echo '</select></td></tr></table><br />' . _('Bank Accounts have not yet been defined') . '. ' . _('You must first') .
- '<a href="' . $rootpath . '/BankAccounts.php">' . _('define the bank accounts') . '</a>' . ' ' . _('and general ledger accounts to be affected') . '.';
+ InternalLink($rootpath, 'BankAccounts.php', _('define the bank accounts')) . ' ' . _('and general ledger accounts to be affected') . '.';
include('includes/footer.inc');
exit;
} else {
Modified: trunk/ConfirmDispatchControlled_Invoice.php
===================================================================
--- trunk/ConfirmDispatchControlled_Invoice.php 2012-08-27 20:03:59 UTC (rev 9572)
+++ trunk/ConfirmDispatchControlled_Invoice.php 2012-08-27 22:22:14 UTC (rev 9573)
@@ -14,12 +14,11 @@
echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="" alt="" />' . ' ' . $title . '</p>';
if (isset($_GET['LineNo'])){
- $LineNo = (int)$_GET['LineNo'];
+ $LineNo = (int)$_GET['LineNo'];
} elseif (isset($_POST['LineNo'])){
- $LineNo = (int)$_POST['LineNo'];
+ $LineNo = (int)$_POST['LineNo'];
} else {
- echo '<div class="centre"><a href="' . $rootpath . '/ConfirmDispatch_Invoice.php">'.
- _('Select a line item to invoice').'</a><br />';
+ echo '<div class="centre">' . InternalLink($rootpath, 'ConfirmDispatch_Invoice.php', _('Select a line item to invoice')) . '<br />';
echo '<br />';
prnMsg( _('This page can only be opened if a line item on a sales order to be invoiced has been selected') . '. ' . _('Please do that first'),'error');
echo '</div>';
@@ -29,8 +28,7 @@
if (!isset($_SESSION['Items']) OR !isset($_SESSION['ProcessingOrder'])) {
/* This page can only be called with a sales order number to invoice */
- echo '<div class="centre"><a href="' . $rootpath . '/SelectSalesOrder.php">'. _('Select a sales order to invoice').
- '</a><br />';
+ echo '<div class="centre">' . InternalLink($rootpath, 'SelectSalesOrder.php', _('Select a sales order to invoice'));
prnMsg( _('This page can only be opened if a sales order and line item has been selected Please do that first'),'error');
echo '</div>';
include('includes/footer.inc');
@@ -44,8 +42,7 @@
//Make sure this item is really controlled
if ( $LineItem->Controlled != 1 ){
- echo '<div class="centre"><a href="' . $rootpath . '/ConfirmDispatch_Invoice.php">'. _('Back to the Sales Order'). '</a></div>';
- echo '<br />';
+ echo '<div class="centre">' . InternalLink($rootpath, 'ConfirmDispatch_Invoice.php', _('Back to the Sales Order')) . '</div>';
prnMsg( _('The line item must be defined as controlled to require input of the batch numbers or serial numbers being sold'),'error');
include('includes/footer.inc');
exit;
@@ -72,7 +69,7 @@
of the item selected for dispatch */
$_SESSION['Items']->LineItems[$LineNo]->QtyDispatched = $TotalQuantity;
-echo '<br /><div style="text-align: right"><a href="'. $rootpath. '/ConfirmDispatch_Invoice.php">'. _('Back to Confirmation of Dispatch') . '/' . _('Invoice'). '</a></div>';
+echo '<br /><div style="text-align: right">' . InternalLink($rootpath, 'ConfirmDispatch_Invoice.php', _('Back to Confirmation of Dispatch') . '/' . _('Invoice')) . '</div>';
include('includes/footer.inc');
exit;
Modified: trunk/ConfirmDispatch_Invoice.php
===================================================================
--- trunk/ConfirmDispatch_Invoice.php 2012-08-27 20:03:59 UTC (rev 9572)
+++ trunk/ConfirmDispatch_Invoice.php 2012-08-27 22:22:14 UTC (rev 9573)
@@ -17,7 +17,7 @@
if (!isset($_GET['OrderNumber']) and !isset($_SESSION['ProcessingOrder'])) {
/* This page can only be called with an order number for invoicing*/
- echo '<div class="centre"><a href="' . $rootpath . '/SelectSalesOrder.php">' . _('Select a sales order to invoice'). '</a></div>';
+ echo '<div class="centre">' . InternalLink($rootpath, 'SelectSalesOrder.php', _('Select a sales order to invoice')) . '</div>';
echo '<br /><br />';
prnMsg( _('This page can only be opened if an order has been selected Please select an order first from the delivery details screen click on Confirm for invoicing'), 'error' );
include ('includes/footer.inc');
@@ -327,7 +327,7 @@
echo '<td class="number">' . $LnItm->QtyDispatched . '</td>';
} else {
echo '<td class="number"><input type="hidden" name="' . $LnItm->LineNumber . '_QtyDispatched" value="' .$LnItm->QtyDispatched . '" />
- <a href="' . $rootpath .'/ConfirmDispatchControlled_Invoice.php?LineNo='. $LnItm->LineNumber.'">' .$LnItm->QtyDispatched . '</a></td>';
+ ' . InternalLink($rootpath, 'ConfirmDispatchControlled_Invoice.php?LineNo='. $LnItm->LineNumber, $LnItm->QtyDispatched) . '</td>';
}
} else {
if (isset($_POST['ProcessInvoice'])) {
@@ -395,13 +395,13 @@
if ($LnItm->Controlled==1){
if (!isset($_POST['ProcessInvoice'])) {
- echo '<td><a href="' . $rootpath . '/ConfirmDispatchControlled_Invoice.php?LineNo='. $LnItm->LineNumber.'">';
if ($LnItm->Serialised==1){
- echo _('Enter Serial Numbers');
+ $Caption = _('Enter Serial Numbers');
} else { /*Just batch/roll/lot control */
- echo _('Enter Batch/Roll/Lot #');
+ $Caption = _('Enter Batch/Roll/Lot #');
}
- echo '</a></td>';
+ echo '<td>' . InternalLink($rootpath, 'ConfirmDispatchControlled_Invoice.php?LineNo='. $LnItm->LineNumber, $Caption);
+ echo '</td>';
}
}
echo '</tr>';
@@ -432,8 +432,8 @@
} else {
$FreightCost =0;
}
- if (!is_numeric($BestShipper)){
- $SQL = "SELECT shipper_id FROM shippers WHERE shipper_id=" . $_SESSION['Default_Shipper'];
+ if (!is_numeric($BestShipper)){
+ $SQL = "SELECT shipper_id FROM shippers WHERE shipper_id=" . $_SESSION['Default_Shipper'];
$ErrMsg = _('There was a problem testing for a default shipper because');
$TestShipperExists = DB_query($SQL,$db, $ErrMsg);
if (DB_num_rows($TestShipperExists)==1){
@@ -447,7 +447,7 @@
$BestShipper = $ShipperReturned[0];
} else {
prnMsg( _('There are no shippers defined') . '. ' . _('Please use the link below to set up shipping freight companies, the system expects the shipping company to be selected or a default freight company to be used'),'error');
- echo '<a href="' . $rootpath . 'Shippers.php">'. _('Enter') . '/' . _('Amend Freight Companies'). '</a>';
+ echo InternalLink($rootpath, 'Shippers.php', _('Enter') . '/' . _('Amend Freight Companies'));
}
}
}
@@ -701,15 +701,15 @@
_('the session shows quantity of'). ' ' . $_SESSION['Items']->LineItems[$myrow['orderlineno']]->Quantity .
' ' . _('and quantity invoice of'). ' ' . $_SESSION['Items']->LineItems[$myrow['orderlineno']]->QtyInv;
- prnMsg( _('This order has been changed or invoiced since this delivery was started to be confirmed') . ' ' . _('Processing halted.') . ' ' . _('To enter and confirm this dispatch, it must be re-selected and re-read again to update the changes made by the other user'), 'error');
- echo '<br />';
+ prnMsg( _('This order has been changed or invoiced since this delivery was started to be confirmed') . ' ' . _('Processing halted.') . ' ' . _('To enter and confirm this dispatch, it must be re-selected and re-read again to update the changes made by the other user'), 'error');
+ echo '<br />';
- echo '<div class="centre"><a href="'. $rootpath . '/SelectSalesOrder.php?">'. _('Select a sales order for confirming deliveries and invoicing'). '</a></div>';
+ echo '<div class="centre">' . InternalLink($rootpath, 'SelectSalesOrder.php', _('Select a sales order for confirming deliveries and invoicing')) . '</div>';
- unset($_SESSION['Items']->LineItems);
- unset($_SESSION['Items']);
- unset($_SESSION['ProcessingOrder']);
- include('includes/footer.inc');
+ unset($_SESSION['Items']->LineItems);
+ unset($_SESSION['Items']);
+ unset($_SESSION['ProcessingOrder']);
+ include('includes/footer.inc');
exit;
}
} /*loop through all line items of the order to ensure none have been invoiced since started looking at this order*/
@@ -930,7 +930,7 @@
/* Need to get the current location quantity
will need it later for the stock movement */
- $SQL="SELECT locstock.quantity
+ $SQL="SELECT locstock.quantity
FROM locstock
WHERE locstock.stockid='" . $OrderLine->StockID . "'
AND loccode= '" . $_SESSION['Items']->Location . "'";
@@ -938,8 +938,8 @@
$Result = DB_query($SQL, $db, $ErrMsg);
if (DB_num_rows($Result)==1){
- $LocQtyRow = DB_fetch_row($Result);
- $QtyOnHandPrior = $LocQtyRow[0];
+ $LocQtyRow = DB_fetch_row($Result);
+ $QtyOnHandPrior = $LocQtyRow[0];
} else {
/* There must be some error this should never happen */
$QtyOnHandPrior = 0;
@@ -977,7 +977,7 @@
$StandardCost += ($AssParts['standard'] * $AssParts['quantity']) ;
/* Need to get the current location quantity
will need it later for the stock movement */
- $SQL="SELECT locstock.quantity
+ $SQL="SELECT locstock.quantity
FROM locstock
WHERE locstock.stockid='" . $AssParts['component'] . "'
AND loccode= '" . $_SESSION['Items']->Location . "'";
@@ -985,9 +985,9 @@
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Can not retrieve assembly components location stock quantities because ');
$DbgMsg = _('The SQL that failed was');
$Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true);
- if (DB_num_rows($Result)==1){
- $LocQtyRow = DB_fetch_row($Result);
- $QtyOnHandPrior = $LocQtyRow[0];
+ if (DB_num_rows($Result)==1){
+ $LocQtyRow = DB_fetch_row($Result);
+ $QtyOnHandPrior = $LocQtyRow[0];
} else {
/*There must be some error this should never happen */
$QtyOnHandPrior = 0;
@@ -1053,7 +1053,7 @@
$OrderLine->StandardCost=0;
}
if ($MBFlag=='B' OR $MBFlag=='M'){
- $SQL = "INSERT INTO stockmoves (stockid,
+ $SQL = "INSERT INTO stockmoves (stockid,
type,
transno,
loccode,
@@ -1089,7 +1089,7 @@
'" . $OrderLine->ConversionFactor . "'
)";
} else {
- // its an assembly or dummy and assemblies/dummies always have nil stock (by definition they are made up at the time of dispatch so new qty on hand will be nil
+ // its an assembly or dummy and assemblies/dummies always have nil stock (by definition they are made up at the time of dispatch so new qty on hand will be nil
if (empty($OrderLine->StandardCost)) {
$OrderLine->StandardCost=0;
}
@@ -1159,7 +1159,7 @@
if ($OrderLine->Controlled ==1){
foreach($OrderLine->SerialItems as $Item){
- /*We need to add the StockSerialItem record and
+ /*We need to add the StockSerialItem record and
The StockSerialMoves as well */
$SQL = "UPDATE stockserialitems SET quantity= quantity - " . $Item->BundleQty . "
@@ -1624,12 +1624,14 @@
echo '<br /><div class="centre">';
if ($_SESSION['InvoicePortraitFormat']==0){
- echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="">' . ' ' . '<a target="_blank" href="'.$rootpath.'/PrintCustTrans.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this invoice'). ' (' . _('Landscape') . ')</a><br /><br />';
+ echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="">' . ' ' .
+ InternalLink($rootpath, 'PrintCustTrans.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True', _('Print this invoice'). ' (' . _('Landscape') . ')' );
} else {
- echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="">' . ' ' . '<a target="_blank" href="'.$rootpath.'/PrintCustTransPortrait.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this invoice'). ' (' . _('Portrait') . ')</a><br /><br />';
+ echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="">' . ' ' .
+ InternalLink($rootpath, 'PrintCustTransPortrait.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True', _('Print this invoice'). ' (' . _('Portrait') . ')' );
}
- echo '<a href="'.$rootpath.'/SelectSalesOrder.php">'. _('Select another order for invoicing'). '</a><br /><br />';
- echo '<a href="'.$rootpath.'/SelectOrderItems.php?NewOrder=Yes">'._('Sales Order Entry').'</a></div><br />';
+ echo InternalLink($rootpath, 'SelectSalesOrder.php', _('Select another order for invoicing'));
+ echo InternalLink($rootpath, 'SelectOrderItems.php?NewOrder=Yes', _('Sales Order Entry'));
/*end of process invoice */
Modified: trunk/ContractBOM.php
===================================================================
--- trunk/ContractBOM.php 2012-08-27 20:03:59 UTC (rev 9572)
+++ trunk/ContractBOM.php 2012-08-27 22:22:14 UTC (rev 9573)
@@ -38,7 +38,7 @@
if (isset($_POST['BackToHeader'])){
echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/Contracts.php?identifier='.$identifier. '" />';
echo '<br />';
- prnMsg(_('You should automatically be forwarded to the Contract page. If this does not happen perhaps the browser does not support META Refresh') . '<a href="' . $rootpath . '/Contracts.php?identifier='.$identifier . '">' . _('click here') . '</a> ' . _('to continue'),'info');
+ prnMsg(_('You should automatically be forwarded to the Contract page. If this does not happen perhaps the browser does not support META Refresh') . InternalLink($rootpath, 'Contracts.php?identifier='.$identifier, _('click here') . '</a> ' . _('to continue')),'info');
include('includes/footer.inc');
exit;
}
@@ -268,7 +268,7 @@
<td>' . $ContractComponent->UOM . '</td>
<td class="number">' . locale_number_format($ContractComponent->ItemCost,4) . '</td>
<td class="number">' . $DisplayLineTotal . '</td>
- <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier. '&Delete=' . $ContractComponent->ComponentID . '">' . _('Delete') . '</a></td></tr>';
+ <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier. '&Delete=' . $ContractComponent->ComponentID, _('Delete')) . '</td></tr>';
$TotalCost += $LineTotal;
}
@@ -324,7 +324,7 @@
<td><input type="text" name="StockCode" size="15" maxlength="18" value="' . $_POST['StockCode'] . '" /></td>
</tr>
<tr><td></td>
- <td><font size="3"><b>' . _('OR') . ' </b></font><a target="_blank" href="'.$rootpath.'/Stocks.php?">' . _('Create a New Stock Item') . '</a></td></tr>
+ <td><font size="3"><b>' . _('OR') . ' </b></font>' . InternalLink($rootpath, 'Stocks.php', _('Create a New Stock Item')) . '</td></tr>
</table><br />
<div class="centre"><button type="submit" name="Search">' . _('Search Now') . '</button>
</div><br />';
Modified: trunk/ContractOtherReqts.php
===================================================================
--- trunk/ContractOtherReqts.php 2012-08-27 20:03:59 UTC (rev 9572)
+++ trunk/ContractOtherReqts.php 2012-08-27 22:22:14 UTC (rev 9573)
@@ -40,7 +40,8 @@
if (isset($_POST['BackToHeader'])){
echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/Contracts.php?identifier='.$identifier. '" />';
echo '<br />';
- prnMsg(_('You should automatically be forwarded to the Contract page. If this does not happen perhaps the browser does not support META Refresh') . '<a href="' . $rootpath . '/Contracts.php?identifier='.$identifier . '">' . _('click here') . '</a> ' . _('to continue'),'info');
+ prnMsg(_('You should automatically be forwarded to the Contract page. If this does not happen perhaps the browser does not support META Refresh') .
+ InternalLink($rootpath, 'Contracts.php?identifier='.$identifier, _('click here')) . _('to continue'),'info');
include('includes/footer.inc');
exit;
}
@@ -116,7 +117,7 @@
<td><input type="text" class="number" name="Qty' . $ContractReqtID . '" size="11" value="' . locale_number_format($ContractComponent->Quantity,2) . '" /></td>
<td><input type="text" class="number" name="CostPerUnit' . $ContractReqtID . '" size="11" value="' . locale_money_format($ContractComponent->CostPerUnit,$_SESSION['Contract'.$identifier]->CurrCode) . '" /></td>
<td class="number">' . $DisplayLineTotal . '</td>
- <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier. '&Delete=' . $ContractReqtID . '">' . _('Delete') . '</a></td></tr>';
+ <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier. '&Delete=' . $ContractReqtID, _('Delete')) . '</td></tr>';
$TotalCost += $LineTotal;
}
Modified: trunk/Contracts.php
===================================================================
--- trunk/Contracts.php 2012-08-27 20:03:59 UTC (rev 9572)
+++ trunk/Contracts.php 2012-08-27 22:22:14 UTC (rev 9573)
@@ -84,7 +84,7 @@
echo '<meta http-equiv="refresh" content="0; url=' . $rootpath . '/ContractBOM.php?identifier='.$identifier. '" />';
echo '<br />';
prnMsg(_('You should automatically be forwarded to the entry of the Contract line items page') . '. ' .
- _('If this does not happen') . ' (' . _('if the browser does not support META Refresh') . ') ' . '<a href="' . $rootpath . '/ContractBOM.php?identifier='.$identifier . '">' . _('click here') . '</a> ' . _('to continue'),'info');
+ _('If this does not happen') . ' (' . _('if the browser does not support META Refresh') . ') ' . InternalLink($rootpath, 'ContractBOM.php?identifier='.$identifier, _('click here')) . _('to continue'),'info');
include('includes/footer.inc');
exit;
}
@@ -93,13 +93,13 @@
echo '<br />';
prnMsg(_('You should automatically be forwarded to the entry of the Contract requirements page') . '. ' .
_('If this does not happen') . ' (' . _('if the browser does not support META Refresh') . ') ' .
- '<a href="' . $rootpath . '/ContractOtherReqts.php?identifier=' . $identifier . '">' . _('click here') . '</a> ' . _('to continue'),'info');
+ InternalLink($rootpath, 'ContractOtherReqts.php?identifier=' . $identifier, _('click here')) . _('to continue'),'info');
include('includes/footer.inc');
exit;
}
} /* end of if going to contract BOM or contract requriements */
-echo '<a href="'. $rootpath . '/SelectContract.php">'. _('Back to Contract Selection'). '</a><br />';
+echo InternalLink($rootpath, 'SelectContract.php', _('Back to Contract Selection')) . '<br />';
//attempting to upload the drawing image file
if (isset($_FILES['Drawing']) AND $_FILES['Drawing']['name'] !='' AND $_SESSION['Contract'.$identifier]->ContractRef!='') {
@@ -129,7 +129,7 @@
if ($UploadTheFile=='Yes'){
$result = move_uploaded_file($_FILES['Drawing']['tmp_name'], $filename);
- $message = ($result)?_('File url') . '<a href="' . $filename . '">' . $filename . '</a>' : _('Something is wrong with uploading the file');
+ $message = ($result)?_('File url') . InternalLink('', $filename, $filename) : _('Something is wrong with uploading the file');
}
}
@@ -376,7 +376,7 @@
$DbgMsg = _('The SQL that failed to update the quotation was');
$UpdQuoteResult = DB_query($sql,$db,$ErrMsg,$DbgMsg);
prnMsg(_('The contract quotation has been updated based on the new contract cost and margin'),'success');
- echo '<br /><a href="' .$rootpath . '/SelectSalesOrder.php?OrderNumber=' . $_SESSION['Contract'.$identifier]->OrderNo . '&Quotations=Quotes_Only">' . _('Go to Quotation') . ' ' . $_SESSION['Contract'.$identifier]->OrderNo . '</a>';
+ echo '<br />' . InternalLink($rootpath, 'SelectSalesOrder.php?OrderNumber=' . $_SESSION['Contract'.$identifier]->OrderNo . '&Quotations=Quotes_Only', _('Go to Quotation') . ' ' . $_SESSION['Contract'.$identifier]->OrderNo);
}
if ($ExistingContract['status'] == 0 AND $_POST['Status']==1){
@@ -595,7 +595,7 @@
$_SESSION['Contract'.$identifier]->Status=1;
$_SESSION['Contract'.$identifier]->OrderNo=$OrderNo;
prnMsg(_('The contract has been made into quotation number') . ' ' . $OrderNo,'info');
- echo '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?OrderNumber=' . $OrderNo . '&Quotations=Quotes_Only">' . _('Go to quotation number:') . ' ' . $OrderNo . '</a>';
+ echo '<br />' . InternalLink($rootpath, 'SelectSalesOrder.php?OrderNumber=' . $OrderNo . '&Quotations=Quotes_Only', _('Go to quotation number:') . ' ' . $OrderNo);
} //end of if making a quotation
@@ -727,7 +727,7 @@
}
}
- echo '</select><a target="_blank" href="'. $rootpath . '/StockCategories.php">' . _('Add or Modify Contract Categories') . '</a></td></tr>';
+ echo '</select>' . InternalLink($rootpath, 'StockCategories.php', _('Add or Modify Contract Categories')) . '</td></tr>';
$sql = "SELECT loccode, locationname FROM locations";
$ErrMsg = _('The stock locations could not be retrieved because');
@@ -751,7 +751,7 @@
if (DB_num_rows($result)==0){
prnMsg( _('There are no work centres set up yet') . '. ' . _('Please use the link below to set up work centres'),'warn');
- echo '<br /><a href="'.$rootpath.'/WorkCentres.php">' . _('Work Centre Maintenance') . '</a>';
+ echo '<br />' . InternalLink($rootpath, 'WorkCentres.php', _('Work Centre Maintenance'));
include('includes/footer.inc');
exit;
}
@@ -830,7 +830,7 @@
if ($_SESSION['Contract'.$identifier]->Status >=1) {
echo '<tr>
<td>' . _('Quotation Reference/Sales Order No') . ':</td>
- <td><a href="' . $rootpath . '/SelectSalesOrder.php?OrderNumber=' . $_SESSION['Contract'.$identifier]->OrderNo . '&Quotations=Quotes_Only">' . $_SESSION['Contract'.$identifier]->OrderNo . '</a></td>
+ <td>' . InternalLink($rootpath, 'SelectSalesOrder.php?OrderNumber=' . $_SESSION['Contract'.$identifier]->OrderNo . '&Quotations=Quotes_Only', $_SESSION['Contract'.$identifier]->OrderNo) . '</td>
</tr>';
}
if ($_SESSION['Contract'.$identifier]->Status!=2 and isset($_SESSION['Contract'.$identifier]->WO)) {
Modified: trunk/CounterSales.php
===================================================================
--- trunk/CounterSales.php 2012-08-27 20:03:59 UTC (rev 9572)
+++ trunk/CounterSales.php 2012-08-27 22:22:14 UTC (rev 9573)
@@ -243,7 +243,7 @@
echo '<br /><br />';
prnMsg(_('This sale has been cancelled as requested'),'success');
- echo '<br /><br /><a href="' .htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Start a new Counter Sale') . '</a>';
+ echo InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Start a new Counter Sale'));
include('includes/footer.inc');
exit;
@@ -668,7 +668,7 @@
echo '<input type="hidden" name="POLine_' . $OrderLine->LineNumber . '" value="" />';
echo '<input type="hidden" name="ItemDue_' . $OrderLine->LineNumber . '" value="'.$OrderLine->ItemDue.'" />';
- echo '<td><a target="_blank" href="' . $rootpath . '/StockStatus.php?identifier='.$identifier . '&StockID=' . $OrderLine->StockID . '&DebtorNo=' . $_SESSION['Items'.$identifier]->DebtorNo . '">' . $OrderLine->StockID . '</a></td>
+ echo '<td>' . InternalLink($rootpath, 'StockStatus.php?identifier='.$identifier . '&StockID=' . $OrderLine->StockID . '&DebtorNo=' . $_SESSION['Items'.$identifier]->DebtorNo, $OrderLine->StockID) . '</td>
<td>' . $OrderLine->ItemDescription . '</td>';
echo '<td><input class="number" tabindex="2" type="text" name="Quantity_' . ($OrderLine->LineNumber) . '" size="6" maxlength="6" value="' . locale_number_format($OrderLine->Quantity,$OrderLine->DecimalPlaces) . '" /></td>';
@@ -720,7 +720,7 @@
$_SESSION['Items'.$identifier]->TaxGLCodes=$TaxGLCodes;
echo '<td class="number">' . locale_money_format($TaxLineTotal ,$_SESSION['Items'.$identifier]->DefaultCurrency) . '</td>';
echo '<td class="number">' . locale_money_format($SubTotal + $TaxLineTotal ,$_SESSION['Items'.$identifier]->DefaultCurrency) . '</td>';
- echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . _('Delete') . '</a></td></tr>';
+ echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier . '&Delete=' . $OrderLine->LineNumber, _('Delete')) . '</td></tr>';
if ($_SESSION['AllowOrderLineItemNarrative'] == 1){
echo $RowStarter;
@@ -1893,11 +1893,11 @@
echo '<br /><div class="centre">';
if ($_SESSION['InvoicePortraitFormat']==0){
- echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a target="_blank" href="'.$rootpath.'/PDFReceipt.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this receipt'). '</a><br /><br />';
+ echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . InternalLink($rootpath, 'PDFReceipt.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True', _('Print this receipt')) . '<br /><br />';
} else {
- echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a target="_blank" href="'.$rootpath.'/PDFReceipt.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this receipt'). '</a><br /><br />';
+ echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . InternalLink($rootpath, 'PDFReceipt.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True', _('Print this receipt')) . '<br /><br />';
}
- echo '<br /><a href="' .htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Start a new Counter Sale') . '</a></div>';
+ echo '<br />' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Start a new Counter Sale')) . '</div>';
}
// There were input errors so don't process nuffin
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|