[Weberp-svn] SF.net SVN: weberp:[9551] trunk
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2012-08-24 19:44:08
|
Revision: 9551 http://weberp.svn.sourceforge.net/weberp/?rev=9551&view=rev Author: tim_schofield Date: 2012-08-24 19:44:01 +0000 (Fri, 24 Aug 2012) Log Message: ----------- Replace <a tags with InternalLink() function Modified Paths: -------------- trunk/Prices.php trunk/PrintCustOrder.php trunk/PrintCustOrder_generic.php trunk/PrintSalesOrder_generic.php trunk/PurchData.php trunk/RecurringSalesOrders.php trunk/ReorderLevel.php trunk/ReprintGRN.php trunk/ReverseGRN.php trunk/SalesAnalReptCols.php trunk/SalesAnalRepts.php Modified: trunk/Prices.php =================================================================== --- trunk/Prices.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/Prices.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -29,7 +29,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . '</img>' . $title.'</p>'; -echo '<div class="centre"><a href="' . $rootpath . '/SelectProduct.php">' . _('Back to Items') . '</a></div>'; +echo '<div class="centre">' . InternalLink($rootpath, 'SelectProduct.php', _('Back to Items')) . '</div>'; $result = DB_query("SELECT stockmaster.description, Modified: trunk/PrintCustOrder.php =================================================================== --- trunk/PrintCustOrder.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/PrintCustOrder.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -12,10 +12,10 @@ include('includes/header.inc'); echo '<div class="centre">'; prnMsg( _('Select an Order Number to Print before calling this page') , 'error'); - echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; + echo '<table class="table_index"><tr><td class="menu_group_item"> + <li>'. InternalLink($rootpath, 'SelectSalesOrder.php', _('Outstanding Sales Orders')) . '</li> + <li>'. InternalLink($rootpath, 'SelectCompletedOrder.php', _('Completed Sales Orders')) . '</li> + </td></tr></table></div>'; include('includes/footer.inc'); exit; } @@ -63,15 +63,15 @@ /* Javier */ $ListCount = 0; $title = _('Print Packing Slip Error'); - include('includes/header.inc'); - echo '<div class="centre"><br /><br /><br />'; + include('includes/header.inc'); + echo '<div class="centre"><br /><br /><br />'; prnMsg( _('Unable to Locate Order Number') . ' : ' . $_GET['TransNo'] . ' ', 'error'); - echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; - include('includes/footer.inc'); - exit(); + echo '<table class="table_index"><tr><td class="menu_group_item"> + <li>'. InternalLink($rootpath, 'SelectSalesOrder.php' . _('Outstanding Sales Orders')) . '</li> + <li>'. InternalLink($rootpath, 'SelectCompletedOrder.php', _('Completed Sales Orders')) . '</li> + </td></tr></table></div>'; + include('includes/footer.inc'); + exit(); } elseif (DB_num_rows($result)==1){ /*There is only one order header returned - thats good! */ /* Javier */ $ListCount = 1; @@ -79,23 +79,22 @@ $myrow = DB_fetch_array($result); if ($myrow['printedpackingslip']==1 AND ($_GET['Reprint']!='OK' OR !isset($_GET['Reprint']))){ $title = _('Print Packing Slip Error'); - include('includes/header.inc'); + include('includes/header.inc'); echo '<br />'; prnMsg( _('The packing slip for order number') . ' ' . $_GET['TransNo'] . ' ' . _('has previously been printed') . '. ' . _('It was printed on'). ' ' . ConvertSQLDate($myrow['datepackingslipprinted']) . '<br />' . _('This check is there to ensure that duplicate packing slips are not produced and dispatched more than once to the customer'), 'warn' ); - echo '<p><a href="' . $rootpath . '/PrintCustOrder.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK">' - . _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed') . '</a></p>' . - '<a href="' . $rootpath. '/PrintCustOrder_generic.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK">'. _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed'). '</a>'; + echo '<p>' . InternalLink($rootpath, 'PrintCustOrder.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK', _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed')) . '</p>' . + . InternalLink($rootpath, 'PrintCustOrder_generic.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK', _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed')); echo '<br /><br /><br />'; echo _('Or select another Order Number to Print'); - echo '<table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; + echo '<table class="table_index"><tr><td class="menu_group_item"> + <li>'. InternalLink($rootpath, 'SelectSalesOrder.php', _('Outstanding Sales Orders')) . '</li> + <li>'. InternalLink($rootpath, 'SelectCompletedOrder.php', _('Completed Sales Orders')) . '</li> + </td></tr></table></div>'; - include('includes/footer.inc'); + include('includes/footer.inc'); exit; }//packing slip has been printed. } @@ -176,15 +175,15 @@ if ($YPos-$line_height <= 136){ /* We reached the end of the page so finsih off the page and start a newy */ - $PageNumber++; - include ('includes/PDFOrderPageHeader.inc'); + $PageNumber++; + include ('includes/PDFOrderPageHeader.inc'); } //end if need a new page headed up /*increment a line down for the next line item */ $YPos -= ($line_height); - } //end while there are line items to print out + } //end while there are line items to print out $pdf->OutputF($_SESSION['DatabaseName'] . '_Customer_Order_' . $_GET['TransNo'] . '_' . Date('Y-m-d_h-m-s') .'.pdf'); $pdf-> __destruct(); @@ -195,8 +194,8 @@ $title = _('Print Packing Slip Error'); include('includes/header.inc'); echo '<br />'. _('There were no outstanding items on the order to deliver. A dispatch note cannot be printed'). - '<br /><a href="' . $rootpath . '/SelectSalesOrder.php">'. _('Print Another Packing Slip/Order'). - '</a>' . '<br />'. '<a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + '<br />' . InternalLink($rootpath, 'SelectSalesOrder.php', _('Print Another Packing Slip/Order')). + '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } /*end if there are order details to show on the order*/ Modified: trunk/PrintCustOrder_generic.php =================================================================== --- trunk/PrintCustOrder_generic.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/PrintCustOrder_generic.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -8,17 +8,17 @@ include('includes/SQL_CommonFunctions.inc'); //Get Out if we have no order number to work with -If (!isset($_GET['TransNo']) OR $_GET['TransNo']==""){ - $title = _('Select Order To Print'); - include('includes/header.inc'); - echo '<div class="centre"><br /><br /><br />'; - prnMsg( _('Select an Order Number to Print before calling this page') , 'error'); - echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php?">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php?">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; - include('includes/footer.inc'); - exit(); +if (!isset($_GET['TransNo']) OR $_GET['TransNo']==""){ + $title = _('Select Order To Print'); + include('includes/header.inc'); + echo '<div class="centre"><br /><br /><br />'; + prnMsg( _('Select an Order Number to Print before calling this page') , 'error'); + echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> + <li>'. InternalLink($rootpath, 'SelectSalesOrder.php', _('Outstanding Sales Orders')) . '</li> + <li>'. InternalLink($rootpath, 'SelectCompletedOrder.php', _('Completed Sales Orders')) . '</li> + </td></tr></table></div><br /><br /><br />'; + include('includes/footer.inc'); + exit(); } /*retrieve the order details from the database to print */ @@ -60,43 +60,42 @@ //If there are no rows, there's a problem. if (DB_num_rows($result)==0){ - $title = _('Print Packing Slip Error'); - include('includes/header.inc'); - echo '<div class="centre"><br /><br /><br />'; - prnMsg( _('Unable to Locate Order Number') . ' : ' . $_GET['TransNo'] . ' ', 'error'); - echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php?">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php?">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; - include('includes/footer.inc'); - exit(); + $title = _('Print Packing Slip Error'); + include('includes/header.inc'); + echo '<div class="centre"><br /><br /><br />'; + prnMsg( _('Unable to Locate Order Number') . ' : ' . $_GET['TransNo'] . ' ', 'error'); + echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> + <li>'. InternalLink($rootpath, 'SelectSalesOrder.php', _('Outstanding Sales Orders')) . '</li> + <li>'. InternalLink($rootpath, 'SelectCompletedOrder.php', _('Completed Sales Orders')) . '</li> + </td></tr></table></div>'; + include('includes/footer.inc'); + exit(); } elseif (DB_num_rows($result)==1){ /*There is only one order header returned - thats good! */ - $myrow = DB_fetch_array($result); - /* Place the deliver blind variable into a hold variable to used when - producing the packlist */ - $DeliverBlind = $myrow['deliverblind']; - if ($myrow['printedpackingslip']==1 AND ($_GET['Reprint']!='OK' OR !isset($_GET['Reprint']))){ - $title = _('Print Packing Slip Error'); - include('includes/header.inc'); - echo '<br />'; - prnMsg( _('The packing slip for order number') . ' ' . $_GET['TransNo'] . ' ' . - _('has previously been printed') . '. ' . _('It was printed on'). ' ' . ConvertSQLDate($myrow['datepackingslipprinted']) . - '<br />' . _('This check is there to ensure that duplicate packing slips are not produced and dispatched more than once to the customer'), 'warn' ); - echo '<p><a href="' . $rootpath . '/PrintCustOrder.php?&TransNo=' . $_GET['TransNo'] . '&Reprint=OK">' - . _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed') . '</a></p>' . - '<a href="' . $rootpath. '/PrintCustOrder_generic.php?&TransNo=' . $_GET['TransNo'] . '&Reprint=OK">'. _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed'). '</a>'; + $myrow = DB_fetch_array($result); + /* Place the deliver blind variable into a hold variable to used when + producing the packlist */ + $DeliverBlind = $myrow['deliverblind']; + if ($myrow['printedpackingslip']==1 AND ($_GET['Reprint']!='OK' OR !isset($_GET['Reprint']))){ + $title = _('Print Packing Slip Error'); + include('includes/header.inc'); + echo '<br />'; + prnMsg( _('The packing slip for order number') . ' ' . $_GET['TransNo'] . ' ' . + _('has previously been printed') . '. ' . _('It was printed on'). ' ' . ConvertSQLDate($myrow['datepackingslipprinted']) . + '<br />' . _('This check is there to ensure that duplicate packing slips are not produced and dispatched more than once to the customer'), 'warn' ); + echo '<p>' . InternalLink($rootpath, 'PrintCustOrder.php?&TransNo=' . $_GET['TransNo'] . '&Reprint=OK', _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed') . '</p>' . + InternalLink($rootpath, 'PrintCustOrder_generic.php?&TransNo=' . $_GET['TransNo'] . '&Reprint=OK', _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed')); - echo '<br /><br /><br />'; - echo _('Or select another Order Number to Print'); - echo '<table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php?">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php?">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; + echo '<br /><br /><br />'; + echo _('Or select another Order Number to Print'); + echo '<table class="table_index"><tr><td class="menu_group_item"> + <li>'. InternalLink($rootpath, 'SelectSalesOrder.php', _('Outstanding Sales Orders')) . '</li> + <li>'. InternalLink($rootpath, 'SelectCompletedOrder.php', _('Completed Sales Orders')) . '</li> + </td></tr></table></div><br /><br /><br />'; - include('includes/footer.inc'); - exit; - }//packing slip has been printed. + include('includes/footer.inc'); + exit; + }//packing slip has been printed. } /*retrieve the order details from the database to print */ @@ -143,7 +142,7 @@ while ($myrow2=DB_fetch_array($result)){ - $ListCount ++; + $ListCount ++; $DisplayQty = locale_number_format($myrow2['quantity'],$myrow2['decimalplaces']); $DisplayPrevDel = locale_number_format($myrow2['qtyinvoiced'],$myrow2['decimalplaces']); @@ -173,12 +172,12 @@ } /*end for loop to print the whole lot twice */ if ($ListCount == 0) { //UldisN - $title = _('Print Packing Slip Error'); - include('includes/header.inc'); - echo '<br />'. _('There were no outstanding items on the order to deliver') . '. ' . _('A packing slip cannot be printed'). - '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?">'. _('Print Another Packing Slip/Order'). - '</a>' . '<br />'. '<a href="' . $rootpath . '/index.php?">' . _('Back to the menu') . '</a>'; - include('includes/footer.inc'); + $title = _('Print Packing Slip Error'); + include('includes/header.inc'); + echo '<br />'. _('There were no outstanding items on the order to deliver') . '. ' . _('A packing slip cannot be printed'). + '<br />' . InternalLink($rootpath, 'SelectSalesOrder.php', _('Print Another Packing Slip/Order')). + '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); + include('includes/footer.inc'); exit; } else { $pdf->OutputF($_SESSION['DatabaseName'] . '_PackingSlip_' . date('Y-m-d_h-m-s') . '.pdf');//UldisN Modified: trunk/PrintSalesOrder_generic.php =================================================================== --- trunk/PrintSalesOrder_generic.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/PrintSalesOrder_generic.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -13,10 +13,10 @@ include('includes/header.inc'); echo '<div class="centre"><br /><br /><br />'; prnMsg( _('Select an Order Number to Print before calling this page') , 'error'); - echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; + echo '<table class="table_index"><tr><td class="menu_group_item"> + <li>'. InternalLink($rootpath, 'SelectSalesOrder.php', _('Outstanding Sales Orders')) . '</li> + <li>'. InternalLink($rootpath, 'SelectCompletedOrder.php', _('Completed Sales Orders')) . '</li> + </td></tr></table></div>'; include('includes/footer.inc'); exit(); } @@ -65,8 +65,8 @@ echo '<div class="centre"><br /><br /><br />'; prnMsg( _('Unable to Locate Order Number') . ' : ' . $_GET['TransNo'] . ' ', 'error'); echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> + <li>'. InternalLink($rootpath, 'SelectSalesOrder.php', _('Outstanding Sales Orders')) . '</li> + <li>'. InternalLink($rootpath, 'SelectCompletedOrder.php', _('Completed Sales Orders')) . '</li> </td></tr></table></div><br /><br /><br />'; include('includes/footer.inc'); exit(); @@ -83,15 +83,14 @@ prnMsg( _('The packing slip for order number') . ' ' . $_GET['TransNo'] . ' ' . _('has previously been printed') . '. ' . _('It was printed on'). ' ' . ConvertSQLDate($myrow['datepackingslipprinted']) . '<br />' . _('This check is there to ensure that duplicate packing slips are not produced and dispatched more than once to the customer'), 'warn' ); - echo '<p><a href="' . $rootpath . '/PrintCustOrder.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK">' - . _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed') . '</a></p>' . - '<a href="' . $rootpath. '/PrintCustOrder_generic.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK">'. _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed'). '</a>'; + echo '<p>' . InternalLink($rootpath, 'PrintCustOrder.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK', _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed')) . '</p>' . + InternalLink($rootpath, 'PrintCustOrder_generic.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK', _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed')); echo '<br /><br /><br />'; echo _('Or select another Order Number to Print'); echo '<table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> + <li>'. InternalLink($rootpath, 'SelectSalesOrder.php', _('Outstanding Sales Orders')) . '</li> + <li>'. InternalLink($rootpath, 'SelectCompletedOrder.php', _('Completed Sales Orders')) . '</li> </td></tr></table></div><br /><br /><br />'; include('includes/footer.inc'); @@ -178,8 +177,8 @@ $title = _('Print Packing Slip Error'); include('includes/header.inc'); echo '<p>'. _('There were no outstanding items on the order to deliver. A packing slip cannot be printed'). - '<br /><a href="' . $rootpath . '/SelectSalesOrder.php">'. _('Print Another Packing Slip/Order'). - '</a>' . '<br />'. '<a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a></p>'; + '<br />' . InternalLink($rootpath, 'SelectSalesOrder.php', _('Print Another Packing Slip/Order')). + '</a>' . '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')) . '</p>'; include('includes/footer.inc'); exit; } else { Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/PurchData.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -25,7 +25,7 @@ $NoPurchasingData=0; -echo '<a href="' . $rootpath . '/SelectProduct.php">' . _('Back to Items') . '</a><br />'; +echo InternalLink($rootpath, 'SelectProduct.php', _('Back to Items')) . '<br />'; if (isset($_POST['SupplierDescription'])) { $_POST['SupplierDescription'] = trim($_POST['SupplierDescription']); @@ -217,42 +217,20 @@ } else { $DisplayPreferred = _('No'); } - printf('<td>%s</td> - <td class="number">%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s ' . _('days') . '</td> - <td>%s</td> - <td><a href="%s?StockID=%s&SupplierID=%s&Edit=1&EffectiveFrom=%s">' . _('Edit') . '</a></td> - <td><a href="%s?StockID=%s&SupplierID=%s&Copy=1&EffectiveFrom=%s">' . _('Copy') . '</a></td> - <td><a href="%s?StockID=%s&SupplierID=%s&Delete=1&EffectiveFrom=%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this suppliers price?') . '\');">' . _('Delete') . '</a></td> - </tr>', - $myrow['suppname'], - locale_number_format($myrow['price'], 4), - $myrow['currcode'], - ConvertSQLDate($myrow['effectivefrom']), - $myrow['unitname'], - locale_number_format($myrow['conversionfactor'], 4), - locale_number_format($myrow['price']/$myrow['conversionfactor'],4), - locale_number_format($myrow['minorderqty'], $myrow['uomdecimalplaces']), - locale_number_format($myrow['leadtime'], 0), - $DisplayPreferred, - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), - $StockID, - $myrow['supplierno'], - $myrow['effectivefrom'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), - $StockID, - $myrow['supplierno'], - $myrow['effectivefrom'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), - $StockID, - $myrow['supplierno'], - $myrow['effectivefrom']); + echo '<td>' . $myrow['suppname'] . '</td> + <td class="number">' . locale_number_format($myrow['price'], 4) . '</td> + <td>' . $myrow['currcode'] . '</td> + <td>' . ConvertSQLDate($myrow['effectivefrom']) . '</td> + <td>' . $myrow['unitname'] . '</td> + <td class="number">' . locale_number_format($myrow['conversionfactor'], 4) . '</td> + <td class="number">' . locale_number_format($myrow['price']/$myrow['conversionfactor'],4) . '</td> + <td class="number">' . locale_number_format($myrow['minorderqty'], $myrow['uomdecimalplaces']) . '</td> + <td class="number">' . locale_number_format($myrow['leadtime'], 0) . ' ' . _('days') . '</td> + <td>' . $DisplayPreferred . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?StockID=' . $StockID . '&SupplierID=' . $myrow['supplierno'] . '&Edit=1&EffectiveFrom=' . $myrow['effectivefrom'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?StockID=' . $StockID . '&SupplierID=' . $myrow['supplierno'] . '&Copy=1&EffectiveFrom=' . $myrow['effectivefrom'], _('Copy')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?StockID=' . $StockID . '&SupplierID=' . $myrow['supplierno'] . '&Delete=1&EffectiveFrom=' . $myrow['effectivefrom'], _('Delete')) . '</td> + </tr>'; } //end of while loop echo '</table><br />'; if ($CountPreferreds > 1) { @@ -576,10 +554,10 @@ echo '</div><br />'; echo '<div class="centre">'; if (isset($StockLocation) and isset($StockID) AND mb_strlen($StockID) != 0) { - echo '<br /><a href="' . $rootpath . '/StockStatus.php?StockID=' . $StockID . '">' . _('Show Stock Status') . '</a>'; - echo '<br /><a href="' . $rootpath . '/StockMovements.php?StockID=' . $StockID . '&StockLocation=' . $StockLocation . '">' . _('Show Stock Movements') . '</a>'; - echo '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?SelectedStockItem=' . $StockID . '&StockLocation=' . $StockLocation . '">' . _('Search Outstanding Sales Orders') . '</a>'; - echo '<br /><a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedStockItem=' . $StockID . '">' . _('Search Completed Sales Orders') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'StockStatus.php?StockID=' . $StockID, _('Show Stock Status')); + echo '<br />' . InternalLink($rootpath, 'StockMovements.php?StockID=' . $StockID . '&StockLocation=' . $StockLocation, _('Show Stock Movements')); + echo '<br />' . InternalLink($rootpath, 'SelectSalesOrder.php?SelectedStockItem=' . $StockID . '&StockLocation=' . $StockLocation, _('Search Outstanding Sales Orders')); + echo '<br />' . InternalLink($rootpath, 'SelectCompletedOrder.php?SelectedStockItem=' . $StockID, _('Search Completed Sales Orders')); } echo '</form></div>'; } Modified: trunk/RecurringSalesOrders.php =================================================================== --- trunk/RecurringSalesOrders.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/RecurringSalesOrders.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -173,7 +173,7 @@ prnMsg(_('Successfully deleted recurring sales order template number') . ' ' . $_POST['ExistingRecurrOrderNo'],'success'); - echo '<p><a href="'.$rootpath.'/SelectRecurringSalesOrder.php">'. _('Select A Recurring Sales Order Template') .'</a></p>'; + echo '<p>' . InternalLink($rootpath, 'SelectRecurringSalesOrder.php', _('Select A Recurring Sales Order Template')) .'</p>'; unset($_SESSION['Items'.$identifier]->LineItems); unset($_SESSION['Items'.$identifier]); @@ -296,9 +296,9 @@ prnMsg(_('The recurring order template has been updated'),'success'); } - echo '<p><a href="'.$rootpath.'/SelectOrderItems.php?NewOrder=Yes">'. _('Enter New Sales Order') .'</a></p>'; + echo '<p>' . InternalLink($rootpath, 'SelectOrderItems.php?NewOrder=Yes', _('Enter New Sales Order')) .'</p>'; - echo '<p><a href="'.$rootpath.'/SelectRecurringSalesOrder.php">'. _('Select A Recurring Sales Order Template') .'</a></p>'; + echo '<p>' . InternalLink($rootpath, 'SelectRecurringSalesOrder.php', _('Select A Recurring Sales Order Template')) .'</p>'; unset($_SESSION['Items'.$identifier]->LineItems); unset($_SESSION['Items'.$identifier]); Modified: trunk/ReorderLevel.php =================================================================== --- trunk/ReorderLevel.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/ReorderLevel.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -60,7 +60,7 @@ $title = _('Reorder Level') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The Reorder Level report 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; } @@ -175,7 +175,7 @@ $title = _('Print Reorder Level Report'); include('includes/header.inc'); prnMsg(_('There were no items with demand greater than supply'),'error'); - echo '<br /><a href="' . $rootpath . '/index.php?">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php?', _('Back to the menu')); include('includes/footer.inc'); exit; } else { @@ -224,7 +224,7 @@ </table> <br />'; prnMsg(_('There are no stock categories currently defined please use the link below to set them up'),'warn'); - echo '<br /><a href="' . $rootpath . '/StockCategories.php">' . _('Define Stock Categories') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'StockCategories.php', _('Define Stock Categories')); include ('includes/footer.inc'); exit; } Modified: trunk/ReprintGRN.php =================================================================== --- trunk/ReprintGRN.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/ReprintGRN.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -86,7 +86,7 @@ echo '<td>' . $myrow['itemdescription'] . '</td>'; echo '<td>' . $myrow['deliverydate'] . '</td>'; echo '<td class="number">' . locale_number_format($myrow['qtyrecd'], $myrow['decimalplaces']) . '</td>'; - echo '<td><a href="PDFGrn.php?GRNNo=' . $myrow['grnbatch'] .'&PONo=' . $_POST['PONumber'] . '">' . _('Reprint') . '</a></td>'; + echo '<td>' . InternalLink('', 'PDFGrn.php?GRNNo=' . $myrow['grnbatch'] .'&PONo=' . $_POST['PONumber'], _('Reprint')) . '</td>'; echo '</tr>'; } echo '</table>'; Modified: trunk/ReverseGRN.php =================================================================== --- trunk/ReverseGRN.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/ReverseGRN.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -336,7 +336,7 @@ echo '<br />' . _('GRN number') . ' ' . $_GET['GRNNo'] . ' ' . _('for') . ' ' . $QtyToReverse . ' x ' . $GRN['itemcode'] . ' - ' . $GRN['itemdescription'] . ' ' . _('has been reversed') . '<br />'; unset($_GET['GRNNo']); // to ensure it cant be done again!! - echo '<a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Select another GRN to Reverse') . '</a>'; + echo InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Select another GRN to Reverse')); /*end of Process Goods Received Reversal entry */ } else { @@ -407,7 +407,7 @@ $DisplayQtyInv = locale_number_format($myrow['quantityinv'],$myrow['decimalplaces']); $DisplayQtyRev = locale_number_format($myrow['qtytoreverse'],$myrow['decimalplaces']); $DisplayDateDel = ConvertSQLDate($myrow['deliverydate']); - $LinkToRevGRN = '<a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?GRNNo=' . $myrow['grnno'] . '">' . _('Reverse') . '</a>'; + $LinkToRevGRN = InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?GRNNo=' . $myrow['grnno'], _('Reverse')); printf('<td>%s</td> <td>%s</td> Modified: trunk/SalesAnalReptCols.php =================================================================== --- trunk/SalesAnalReptCols.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/SalesAnalReptCols.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -278,41 +278,24 @@ $BudOrAct = _('N/A'); } - printf('<td><a href="%sReportID=%s&SelectedCol=%s">%s</a></td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%sReportID=%s&SelectedCol=%s&delete=1">' . _('Delete') . '</td></tr>', - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $ReportID, - $myrow[1], - $myrow[1], - $myrow[2], - $myrow[3], - $Calc, - $myrow[5], - $myrow[6], - $myrow[7], - $myrow[8], - $myrow[9], - $myrow[10], - $BudOrAct, - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $ReportID, - $myrow[1]); + echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?ReportID=' . $ReportID . '&SelectedCol=' . $myrow[1], $myrow[1]) . '</td> + <td>' . $myrow[2] . '</td> + <td>' . $myrow[3] . '</td> + <td>' . $Calc . '</td> + <td>' . $myrow[5] . '</td> + <td>' . $myrow[6] . '</td> + <td>' . $myrow[7] . '</td> + <td>' . $myrow[8] . '</td> + <td>' . $myrow[9] . '</td> + <td>' . $myrow[10] . '</td> + <td>' . $BudOrAct . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?ReportID=' . $ReportID . '&SelectedCol=' . $myrow[1] . '&delete=1', _('Delete')) . '</td></tr>'; } while ($myrow = DB_fetch_array($result)); //END WHILE LIST LOOP } -echo '</table><br /><div class="centre"><a href="' . $rootpath . '/SalesAnalRepts.php">' . _('Maintain Report Headers') . '</a></div><br />'; +echo '</table><br /><div class="centre">' . InternalLink($rootpath, 'SalesAnalRepts.php', _('Maintain Report Headers')) . '</div><br />'; if (DB_num_rows($result)>10){ prnMsg(_('WARNING') . ': ' . _('User defined reports can have up to 10 columns defined') . '. ' . _('The report will not be able to be run until some columns are deleted'),'warn'); } Modified: trunk/SalesAnalRepts.php =================================================================== --- trunk/SalesAnalRepts.php 2012-08-24 13:33:46 UTC (rev 9550) +++ trunk/SalesAnalRepts.php 2012-08-24 19:44:01 UTC (rev 9551) @@ -294,26 +294,14 @@ } - printf('<td>%s</td> - <td>%s</td> - <td><a href="%sSelectedReport=%s\">' . _('Design') . '</a></td> - <td><a href="%s/SalesAnalReptCols.php?ReportID=%s">' . _('Define Columns') . '</a></td> - <td><a href="%s/SalesAnalysis_UserDefined.php?ReportID=%s&ProducePDF=True">' . _('Make PDF Report') . '</a></td> - <td><a href="%s/SalesAnalysis_UserDefined.php?ReportID=%s&ProduceCVSFile=True">' . _('Make CSV File') . '</a></td> - <td><a href="%sSelectedReport=%s&delete=1" onclick="return confirm("' . _('Are you sure you wish to remove this report design?') . '");">' . _('Delete') . '</td> - </tr>', - $myrow[0], - $myrow[1], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow[0], - $rootpath, - $myrow[0], - $rootpath, - $myrow[0], - $rootpath, - $myrow[0], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow[0]); + echo '<td>' . $myrow['reportid'] . '</td> + <td>' . $myrow['reportheading'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedReport=' . $myrow['reportid'], _('Design')) . '</td> + <td>' . InternalLink($rootpath, 'SalesAnalReptCols.php?ReportID=' . $myrow['reportid'], _('Define Columns')) . '</td> + <td>' . InternalLink($rootpath, 'SalesAnalysis_UserDefined.php?ReportID=' . $myrow['reportid'] . '&ProducePDF=True', _('Make PDF Report')) . '</td> + <td>' . InternalLink($rootpath, 'SalesAnalysis_UserDefined.php?ReportID=' . $myrow['reportid'] . '&ProduceCVSFile=True', _('Make CSV File')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedReport=' . $myrow['reportid'] . '&delete=1', _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP @@ -325,7 +313,7 @@ if (isset($SelectedReport)) { - echo '<a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Show All Defined Reports') . '</a>'; + echo InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Show All Defined Reports')); } echo '<br />'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |