Thread: [Weberp-svn] SF.net SVN: weberp:[9568] trunk (Page 15)
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2012-08-27 10:52:04
|
Revision: 9568 http://weberp.svn.sourceforge.net/weberp/?rev=9568&view=rev Author: tim_schofield Date: 2012-08-27 10:51:56 +0000 (Mon, 27 Aug 2012) Log Message: ----------- Replace <a tags with new InternalLink() function Modified Paths: -------------- trunk/GLAccountCSV.php trunk/GLAccountInquiry.php trunk/GLAccounts.php trunk/GLBalanceSheet.php trunk/GLJournal.php trunk/GLJournalInquiry.php trunk/GLProfit_Loss.php trunk/GLTagProfit_Loss.php trunk/GLTags.php trunk/GLTransInquiry.php trunk/GLTrialBalance.php trunk/GoodsReceived.php trunk/GoodsReceivedControlled.php trunk/Labels.php Modified: trunk/GLAccountCSV.php =================================================================== --- trunk/GLAccountCSV.php 2012-08-26 22:50:57 UTC (rev 9567) +++ trunk/GLAccountCSV.php 2012-08-27 10:51:56 UTC (rev 9568) @@ -265,7 +265,7 @@ } /*end for each SelectedAccount */ fclose($fp); - echo '<div class="centre"><a href="' . $FileName . '">' . _('click here') . '</a> ' . _('to view the file') . '</div><br />'; + echo '<div class="centre">' . InternalLink('', $FileName, _('click here')) . _('to view the file') . '</div><br />'; } /* end of if CreateCSV button hit */ include('includes/footer.inc'); Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2012-08-26 22:50:57 UTC (rev 9567) +++ trunk/GLAccountInquiry.php 2012-08-27 10:51:56 UTC (rev 9568) @@ -270,24 +270,15 @@ if ($tagrow['tagdescription']=='') { $tagrow['tagdescription']=_('None'); } - printf('<td>%s</td> - <td class="number"><a href="%s">%s</a></td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td>%s</td> - <td class="number"><b>%s</b></td> - <td>%s</td> - </tr>', - $myrow['typename'], - $URL_to_TransDetail, - $myrow['typeno'], - $FormatedTranDate, - $DebitAmount, - $CreditAmount, - $myrow['narrative'], - locale_money_format($RunningTotal,$_SESSION['CompanyRecord']['currencydefault']), - $tagrow['tagdescription']); + echo '<td>' . $myrow['typename'] . '</td> + <td class="number">' . InternalLink('', $URL_to_TransDetail, $myrow['typeno']) . '</td> + <td>' . $FormatedTranDate . '</td> + <td class="number">' . $DebitAmount . '</td> + <td class="number">' . $CreditAmount . '</td> + <td>' . $myrow['narrative'] . '</td> + <td class="number"><b>' . locale_money_format($RunningTotal,$_SESSION['CompanyRecord']['currencydefault']) . '</b></td> + <td>' . $tagrow['tagdescription'] . '</td> + </tr>'; } Modified: trunk/GLAccounts.php =================================================================== --- trunk/GLAccounts.php 2012-08-26 22:50:57 UTC (rev 9567) +++ trunk/GLAccounts.php 2012-08-27 10:51:56 UTC (rev 9568) @@ -319,21 +319,13 @@ } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%s&SelectedAccount=%s">' . _('Edit') . '</td> - <td><a href="%s&SelectedAccount=%s&delete=1" onclick="return confirm("' . _('Are you sure you wish to delete this account? Additional checks will be performed in any event to ensure data integrity is not compromised.') . '");">' . _('Delete') . '</td> - </tr>', - $myrow[0], - $myrow[1], - $myrow[2], - $myrow[3], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow[0], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow[0]); + echo '<td>' . $myrow[0] . '</td> + <td>' . $myrow[1] . '</td> + <td>' . $myrow[2] . '</td> + <td>' . $myrow[3] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?&SelectedAccount=' . $myrow[0], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?&SelectedAccount=' . $myrow[0] . '&delete=1', _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP @@ -345,7 +337,7 @@ echo '<br />'; if (isset($SelectedAccount)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Show All Accounts') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Show All Accounts')) . '</div>'; } echo '<br />'; Modified: trunk/GLBalanceSheet.php =================================================================== --- trunk/GLBalanceSheet.php 2012-08-26 22:50:57 UTC (rev 9567) +++ trunk/GLBalanceSheet.php 2012-08-27 10:51:56 UTC (rev 9568) @@ -87,7 +87,7 @@ $title = _('Balance Sheet') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The accumulated profits brought forward could not be calculated by the SQL because') . ' - ' . DB_error_msg($db) ); - 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; } @@ -125,7 +125,7 @@ $title = _('Balance Sheet') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) ); - 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; } @@ -288,7 +288,7 @@ $title = _('Print Balance Sheet Error'); include('includes/header.inc'); prnMsg( _('There were no entries to print out for the selections specified') ); - 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 { @@ -529,7 +529,7 @@ $k++; } - $ActEnquiryURL = '<a href="' . $rootpath . '/GLAccountInquiry.php?Period=' . $_POST['BalancePeriodEnd'] . '&Account=' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . '</a>'; + $ActEnquiryURL = InternalLink($rootpath, 'GLAccountInquiry.php?Period=' . $_POST['BalancePeriodEnd'] . '&Account=' . $myrow['accountcode'], $myrow['accountcode']); $PrintString = '<td>%s</td> <td>%s</td> Modified: trunk/GLJournal.php =================================================================== --- trunk/GLJournal.php 2012-08-26 22:50:57 UTC (rev 9567) +++ trunk/GLJournal.php 2012-08-27 10:51:56 UTC (rev 9568) @@ -388,7 +388,7 @@ } echo '<td>' . $JournalItem->Narrative . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $JournalItem->ID . '">'._('Delete').'</a></td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $JournalItem->ID, _('Delete')) . '</td> </tr>'; } Modified: trunk/GLJournalInquiry.php =================================================================== --- trunk/GLJournalInquiry.php 2012-08-26 22:50:57 UTC (rev 9567) +++ trunk/GLJournalInquiry.php 2012-08-27 10:51:56 UTC (rev 9568) @@ -106,7 +106,7 @@ <td class="number">'.$myrow['tag'] . ' - ' . $myrow['tagdescription'].'</td>'; if ($myrow['typeno']!=$LastJournal) { - echo '<td class="number"><a href="PDFGLJournal.php?JournalNo='.$myrow['typeno'].'">'._('Print') .'</a></td></tr>'; + echo '<td class="number">' . InternalLink('', 'PDFGLJournal.php?JournalNo='.$myrow['typeno'], _('Print')) . '</td></tr>'; $LastJournal = $myrow['typeno']; } else { Modified: trunk/GLProfit_Loss.php =================================================================== --- trunk/GLProfit_Loss.php 2012-08-26 22:50:57 UTC (rev 9567) +++ trunk/GLProfit_Loss.php 2012-08-27 10:51:56 UTC (rev 9568) @@ -162,7 +162,7 @@ $title = _('Profit and Loss') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) ); - 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; } @@ -174,7 +174,7 @@ include('includes/header.inc'); echo '<br />'; prnMsg( _('There were no entries to print out for the selections specified'),'warn' ); - 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; } @@ -907,7 +907,7 @@ $k++; } - $ActEnquiryURL = '<a href="' . $rootpath . '/GLAccountInquiry.php?Period=' . $_POST['ToPeriod'] . '&Account=' . $myrow['accountcode'] . '&Show=Yes">' . $myrow['accountcode'] . '</a>'; + $ActEnquiryURL = InternalLink($rootpath, 'GLAccountInquiry.php?Period=' . $_POST['ToPeriod'] . '&Account=' . $myrow['accountcode'] . '&Show=Yes', $myrow['accountcode']); if ($Section ==1){ printf('<td>%s</td> Modified: trunk/GLTagProfit_Loss.php =================================================================== --- trunk/GLTagProfit_Loss.php 2012-08-26 22:50:57 UTC (rev 9567) +++ trunk/GLTagProfit_Loss.php 2012-08-27 10:51:56 UTC (rev 9568) @@ -7,7 +7,6 @@ include('includes/SQL_CommonFunctions.inc'); include('includes/AccountSectionsDef.inc'); // This loads the $Sections variable - if (isset($_POST['FromPeriod']) and ($_POST['FromPeriod'] > $_POST['ToPeriod'])){ prnMsg(_('The selected period from is actually after the period to') . '! ' . _('Please reselect the reporting period'),'error'); $_POST['SelectADifferentPeriod']='Select A Different Period'; @@ -39,7 +38,6 @@ ORDER BY periodno DESC"; $Periods = DB_query($sql,$db); - while ($myrow=DB_fetch_array($Periods,$db)){ if(isset($_POST['FromPeriod']) AND $_POST['FromPeriod']!=''){ if( $_POST['FromPeriod']== $myrow['periodno']){ @@ -96,11 +94,11 @@ $result=DB_query($SQL,$db); echo '<option value="0">0 - None' . '</option>'; while ($myrow=DB_fetch_array($result)){ - if (isset($_POST['tag']) and $_POST['tag']==$myrow['tagref']){ + if (isset($_POST['tag']) and $_POST['tag']==$myrow['tagref']){ echo '<option selected="True" value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; - } else { + } else { echo '<option value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; - } + } } echo '</select></td>'; // End select tag @@ -181,7 +179,7 @@ $title = _('Income and Expenditure') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) ); - 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; } @@ -193,7 +191,7 @@ include('includes/header.inc'); echo '<br />'; prnMsg( _('There were no entries to print out for the selections specified'),'info'); - 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; } @@ -625,7 +623,7 @@ echo '<tr> <td colspan="3"></td> - <td><hr /></td> + <td><hr /></td> <td></td> <td><hr /></td> <td></td> @@ -747,7 +745,7 @@ $k++; } - $ActEnquiryURL = '<a href="' . $rootpath . '/GLAccountInquiry.php?Period=' . $_POST['ToPeriod'] . '&Account=' . $myrow['account'] . '&Show=Yes">' . $myrow['account'] . '</a>'; + $ActEnquiryURL = InternalLink($rootpath, 'GLAccountInquiry.php?Period=' . $_POST['ToPeriod'] . '&Account=' . $myrow['account'] . '&Show=Yes', $myrow['account']); if ($Section ==4){ printf('<td>%s</td> Modified: trunk/GLTags.php =================================================================== --- trunk/GLTags.php 2012-08-26 22:50:57 UTC (rev 9567) +++ trunk/GLTags.php 2012-08-27 10:51:56 UTC (rev 9568) @@ -49,16 +49,20 @@ echo '</form>'; -echo '<table class="selection">'; -echo '<tr><th>'. _('Tag ID') .'</th>'; -echo '<th>'. _('Description'). '</th>'; +echo '<table class="selection"> + <tr> + <th>'. _('Tag ID') .'</th> + <th>'. _('Description'). '</th> + </tr>'; $sql="SELECT tagref, tagdescription FROM tags order by tagref"; $result= DB_query($sql,$db); while ($myrow = DB_fetch_array($result,$db)){ - echo '<tr><td>'.$myrow[0].'</td><td>'.$myrow[1].'</td><td> - <a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedTag=' . $myrow[0] . '&Action=edit">' . _('Edit') . '</a></td></tr>'; + echo '<tr> + <td>'.$myrow[0].'</td><td>'.$myrow[1].'</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedTag=' . $myrow[0] . '&Action=edit', _('Edit')) . '</td> + </tr>'; } echo '</table><p></p>'; Modified: trunk/GLTransInquiry.php =================================================================== --- trunk/GLTransInquiry.php 2012-08-26 22:50:57 UTC (rev 9567) +++ trunk/GLTransInquiry.php 2012-08-27 10:51:56 UTC (rev 9568) @@ -8,7 +8,7 @@ include('includes/header.inc'); // Page Border -$menuUrl = '<a href="'. $rootpath . '/index.php?Application=GL">' . _('General Ledger Menu') . '</a></div>'; +$menuUrl = InternalLink($rootpath, 'index.php?Application=GL', _('General Ledger Menu')) . '</div>'; if ( !isset($_GET['TypeID']) OR !isset($_GET['TransNo']) ) { prnMsg(_('This page requires a valid transaction type and number'),'warn'); @@ -135,7 +135,7 @@ } echo '<td>' . $TranDate . '</td> <td>' . MonthAndYearFromSQLDate($TransRow['lastdate_in_period']) . '</td> - <td><a href="' . $URL . '">' . $TransRow['accountname'] . '</a></td> + <td>' . InternalLink('', $URL, $TransRow['accountname']) . '</td> <td class="number">' . $DebitAmount . '</td> <td class="number">' . $CreditAmount . '</td> <td>' . $TransRow['narrative'] . '</td> @@ -172,7 +172,7 @@ } echo '<td>' . $TranDate . '</td> <td>' . MonthAndYearFromSQLDate($TransRow['lastdate_in_period']) . '</td> - <td><a href="' . $URL . $DetailRow[0] . $date . '">' . $TransRow['accountname'] . ' - ' . $DetailRow[5] . '</a></td> + <td>' . InternalLink('', $URL . $DetailRow[0] . $date, $TransRow['accountname'] . ' - ' . $DetailRow[5]) . '</td> <td class="number">' . $Debit . '</td> <td class="number">' . $Credit . '</td> <td>' . $TransRow['narrative'] . '</td> Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2012-08-26 22:50:57 UTC (rev 9567) +++ trunk/GLTrialBalance.php 2012-08-27 10:51:56 UTC (rev 9568) @@ -147,7 +147,7 @@ $title = _('Trial Balance') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) ); - 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; } @@ -159,7 +159,7 @@ include('includes/header.inc'); echo '<br />'; prnMsg( _('There were no entries to print out for the selections specified') ); - 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; } @@ -596,7 +596,7 @@ $CheckPeriodActual += $AccountPeriodActual; $CheckPeriodBudget += $AccountPeriodBudget; - $ActEnquiryURL = '<a href="'. $rootpath . '/GLAccountInquiry.php?Period=' . $_POST['ToPeriod'] . '&Account=' . $myrow['accountcode'] . '&Show=Yes">' . $myrow['accountcode'] . '</a>'; + $ActEnquiryURL = InternalLink($rootpath, 'GLAccountInquiry.php?Period=' . $_POST['ToPeriod'] . '&Account=' . $myrow['accountcode'] . '&Show=Yes', $myrow['accountcode']); printf('<td>%s</td> <td>%s</td> Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2012-08-26 22:50:57 UTC (rev 9567) +++ trunk/GoodsReceived.php 2012-08-27 10:51:56 UTC (rev 9568) @@ -16,12 +16,11 @@ $title = _('Receive Purchase Orders'); include('includes/header.inc'); -echo '<a href="'. $rootpath . '/PO_SelectOSPurchOrder.php">' . _('Back to Purchase Orders'). '</a><br />'; +echo InternalLink($rootpath, 'PO_SelectOSPurchOrder.php', _('Back to Purchase Orders')) . '<br />'; if (isset($_GET['PONumber']) and $_GET['PONumber']<=0 and !isset($_SESSION['PO'])) { /* This page can only be called with a purchase order number for invoicing*/ - echo '<div class="centre"><a href= "' . $rootpath . '/PO_SelectOSPurchOrder.php">'. - _('Select a purchase order to receive').'</a></div>'; + echo '<div class="centre">' . InternalLink($rootpath, 'PO_SelectOSPurchOrder.php', _('Select a purchase order to receive')) . '</div>'; echo '<br />'. _('This page can only be opened if a purchase order has been selected. Please select a purchase order first'); include ('includes/footer.inc'); exit; @@ -159,7 +158,7 @@ //Now Display LineItem if (file_exists($_SESSION['part_pics_dir'] . '/' . $LnItm->StockID . '.jpg')) { - echo '<td><a href="' . $rootpath . '/' . $_SESSION['part_pics_dir'] . '/' . $LnItm->StockID . '.jpg" target="_blank">'. $LnItm->StockID . '</a><br /></td>'; + echo '<td>' . InternalLink($rootpath, '/' . $_SESSION['part_pics_dir'] . '/' . $LnItm->StockID . '.jpg', $LnItm->StockID) . '<br /></td>'; } else { echo '<td>'. $LnItm->StockID . '</td>'; } @@ -173,7 +172,7 @@ if ($LnItm->Controlled == 1) { echo '<input type="hidden" name="RecvQty_' . $LnItm->LineNo . '" value="' . $LnItm->ReceiveQty . '" /> - <a href="GoodsReceivedControlled.php?LineNo=' . $LnItm->LineNo . '" />' . locale_number_format($LnItm->ReceiveQty,$LnItm->DecimalPlaces) . '</a></td>'; + ' . InternalLink('', 'GoodsReceivedControlled.php?LineNo=' . $LnItm->LineNo, locale_number_format($LnItm->ReceiveQty,$LnItm->DecimalPlaces)) . '</td>'; } else { echo '<input type="text" class="number" name="RecvQty_' . $LnItm->LineNo . '" maxlength="10" size="10" value="' . locale_number_format($LnItm->ReceiveQty,$LnItm->DecimalPlaces) . '" /></td>'; @@ -192,11 +191,9 @@ if ($LnItm->Controlled == 1) { if ($LnItm->Serialised==1){ - echo '<td><a href="GoodsReceivedControlled.php?LineNo=' . $LnItm->LineNo . '">'. - _('Enter Serial Nos'). '</a></td>'; + echo '<td>' . InternalLink('', 'GoodsReceivedControlled.php?LineNo=' . $LnItm->LineNo, _('Enter Serial Nos')) . '</td>'; } else { - echo '<td><a href="GoodsReceivedControlled.php?LineNo=' . $LnItm->LineNo . '">'. - _('Enter Batches'). '</a></td>'; + echo '<td>' . InternaLink('', 'GoodsReceivedControlled.php?LineNo=' . $LnItm->LineNo, _('Enter Batches')) . '</td>'; } } echo '</tr>'; @@ -346,9 +343,8 @@ <td>' . $myrow['quantityrecd'] . '</td></tr>'; echo '</table>'; } - echo '<div class="centre"><a href="'.$rootpath.'/PO_SelectOSPurchOrder.php">'. - _('Select a different purchase order for receiving goods against').'</a></div>'; - echo '<div class="centre"><a href="'.$rootpath.'/GoodsReceived.php?PONumber=' . $_SESSION['PO']->OrderNumber . '">'. _('Re-read the updated purchase order for receiving goods against'). '</a></div>'; + echo '<div class="centre">' . InternalLink($rootpath, 'PO_SelectOSPurchOrder.php', _('Select a different purchase order for receiving goods against')) . '</div>'; + echo '<div class="centre">' . InternalLink($rootpath, 'GoodsReceived.php?PONumber=' . $_SESSION['PO']->OrderNumber, _('Re-read the updated purchase order for receiving goods against')) . '</div>'; unset($_SESSION['PO']->LineItems); unset($_SESSION['PO']); unset($_POST['ProcessGoodsReceived']); @@ -732,16 +728,15 @@ unset($_POST['ProcessGoodsReceived']); echo '<br /><div class="centre">'. _('GRN number'). ' '. $GRN .' '. _('has been processed').'<br />'; - echo '<br /><a href=PDFGrn.php?GRNNo='.$GRN .'&PONo='.$PONo.'>'. _('Print this Goods Received Note (GRN)').'</a><br /><br />'; - echo '<a href="' . $rootpath . '/PO_SelectOSPurchOrder.php">' . - _('Select a different purchase order for receiving goods against'). '</a></div>'; + echo '<br />' . InternalLink('', 'PDFGrn.php?GRNNo='.$GRN .'&PONo='.$PONo, _('Print this Goods Received Note (GRN)')); + echo '<br />' . InternalLink($rootpath, 'PO_SelectOSPurchOrder.php', _('Select a different purchase order for receiving goods against')) . '</div>'; /*end of process goods received entry */ include('includes/footer.inc'); exit; } else { /*Process Goods received not set so show a link to allow mod of line items on order and allow input of date goods received*/ - echo '<br /><div class="centre"><a href="' . $rootpath . '/PO_Items.php">' . _('Modify Order Items'). '</a></div>'; + echo '<br /><div class="centre">' . InternalLink($rootpath, 'PO_Items.php', _('Modify Order Items')) . '</div>'; echo '<br /><div class="centre"><button type="submit" name="Update">' . _('Update') . '</button></div><br />'; echo '<div class="centre"><button type="submit" name="ProcessGoodsReceived">' . _('Process Goods Received') . '</button></div><br />'; Modified: trunk/GoodsReceivedControlled.php =================================================================== --- trunk/GoodsReceivedControlled.php 2012-08-26 22:50:57 UTC (rev 9567) +++ trunk/GoodsReceivedControlled.php 2012-08-27 10:51:56 UTC (rev 9568) @@ -16,8 +16,7 @@ if (!isset($_SESSION['PO'])) { /* This page can only be called with a purchase order number for receiving*/ - echo '<div class="centre"><a href="' . $rootpath . '/PO_SelectOSPurchOrder.php">'. - _('Select a purchase order to receive'). '</a></div><br />'; + echo '<div class="centre">' . InternalLink($rootpath, 'PO_SelectOSPurchOrder.php', _('Select a purchase order to receive')) . '</div><br />'; prnMsg( _('This page can only be opened if a purchase order and line item has been selected') . '. ' . _('Please do that first'),'error'); include('includes/footer.inc'); exit; @@ -28,8 +27,7 @@ } else if ($_POST['LineNo']>0){ $LineNo = $_POST['LineNo']; } else { - echo '<div class="centre"><a href="' . $rootpath . '/GoodsReceived.php">'. - _('Select a line Item to Receive').'</a></div>'; + echo '<div class="centre">' . InternalLink($rootpath, 'GoodsReceived.php', _('Select a line Item to Receive')) . '</div>'; prnMsg( _('This page can only be opened if a Line Item on a PO has been selected') . '. ' . _('Please do that first'), 'error'); include( 'includes/footer.inc'); exit; @@ -40,8 +38,7 @@ if ($LineItem->Controlled !=1 ){ /*This page only relavent for controlled items */ - echo '<div class="centre"><a href="' . $rootpath . '/GoodsReceived.php">'. - _('Back to the Purchase Order'). '</a></div>'; + echo '<div class="centre">' . InternalLink($rootpath, 'GoodsReceived.php', _('Back to the Purchase Order')) . '</div>'; prnMsg( _('The line being received must be controlled as defined in the item definition'), 'error'); include('includes/footer.inc'); exit; @@ -63,7 +60,7 @@ include ('includes/InputSerialItems.php'); echo '<div style="text-align: right">'; -echo '<br /><a href="'.$rootpath.'/GoodsReceived.php">'. _('Back To Purchase Order'). ' # '. $_SESSION['PO']->OrderNo . '</a>'; +echo '<br />' . InternalLink($rootpath, 'GoodsReceived.php', _('Back To Purchase Order'). ' # '. $_SESSION['PO']->OrderNo); echo '</div>'; Modified: trunk/Labels.php =================================================================== --- trunk/Labels.php 2012-08-26 22:50:57 UTC (rev 9567) +++ trunk/Labels.php 2012-08-27 10:51:56 UTC (rev 9568) @@ -505,7 +505,7 @@ </div> <br /> <div class="centre"> - ' . InternalLink($rootpath, 'PDFPrintLabel.php', _('Print Labels') . ' + ' . InternalLink($rootpath, 'PDFPrintLabel.php', _('Print Labels')) . ' </div> </form>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-27 11:17:34
|
Revision: 9569 http://weberp.svn.sourceforge.net/weberp/?rev=9569&view=rev Author: tim_schofield Date: 2012-08-27 11:17:24 +0000 (Mon, 27 Aug 2012) Log Message: ----------- Replace <a tags with new InternalLink() function Modified Paths: -------------- trunk/GeocodeSetup.php trunk/GetStockImage.php trunk/geo_displaymap_customers.php trunk/geo_displaymap_suppliers.php trunk/geocode.php trunk/includes/MiscFunctions.php Modified: trunk/GeocodeSetup.php =================================================================== --- trunk/GeocodeSetup.php 2012-08-27 10:51:56 UTC (rev 9568) +++ trunk/GeocodeSetup.php 2012-08-27 11:17:24 UTC (rev 9569) @@ -135,9 +135,9 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Geocode Setup') . '" alt="" />'. _('Setup configuration for Geocoding of Customers and Suppliers') .'</p>'; echo '<div class="page_help_text">'. _('Get a google API key at ') . - '<a href="http://code.google.com/apis/maps/signup.html" target="_blank"> http://code.google.com/apis/maps/signup.html</a></div>'; + ExternalLink('http://code.google.com/apis/maps/signup.html', 'http://code.google.com/apis/maps/signup.html') . '</div>'; echo '<br /><div class="page_help_text">'. _('Find the lat/long for your map center point at ') . - '<a href="http://www.batchgeocode.com/lookup/" target="_blank">http://www.batchgeocode.com/lookup/</a></div><br />'; + ExternalLink('http://www.batchgeocode.com/lookup/', 'http://www.batchgeocode.com/lookup/' . '</div><br />'; prnMsg(_('Set the maps centre point using the Center Longitude and Center Latitude. Set the maps screen size using the height and width in pixels (px)'),'info'); echo '</div><br />'; echo '<table class="selection">'; @@ -163,28 +163,16 @@ $k=1; } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%s?SelectedParam=%s">' . _('Edit') . '</a></td> - <td><a href="%s?SelectedParam=%s&delete=%s">'. _('Delete') .'</a></td> - </tr>', - $myrow[0], - $myrow[1], - $myrow[2], - $myrow[3], - $myrow[4], - $myrow[5], - $myrow[6], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), - $myrow[0], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), - $myrow[0], - $myrow[0]); + echo '<td>' . $myrow[0] . '</td> + <td>' . $myrow[1] . '</td> + <td>' . $myrow[2] . '</td> + <td>' . $myrow[3] . '</td> + <td>' . $myrow[4] . '</td> + <td>' . $myrow[5] . '</td> + <td>' . $myrow[6] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedParam=' . $myrow[0], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedParam=' . $myrow[0] . '&delete=' . $myrow[0], _('Delete')) .'</td> + </tr>'; } //END WHILE LIST LOOP echo '</table>'; @@ -192,7 +180,7 @@ } //end of ifs and buts! if (isset($SelectedParam)) { - echo '<div class="centre"><br /><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Show Defined Geocode Param Codes') . '</a><br /></div>'; + echo '<div class="centre"><br />' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Show Defined Geocode Param Codes')) . '</div>'; } if (!isset($_GET['delete'])) { @@ -277,9 +265,11 @@ echo '<div class="page_help_text">' . _('When ready, click on the link below to run the GeoCode process. This will Geocode all Branches and Suppliers. This may take some time. Errors will be returned to the screen.') . '</p>'; echo '<p>' . _('Suppliers and Customer Branches are geocoded when being entered/updated. You can rerun the geocode process from this screen at any time.') . '</p></div><br />'; -echo '<div class="centre"><a href="' . $rootpath . '/geocode.php">' . _('Run GeoCode process (may take a long time)') . '</a></p><br />'; -echo '<a href="' . $rootpath . '/geo_displaymap_customers.php">' . _('Display Map of Customer Branches') . '</a><br />'; -echo '<a href="' . $rootpath . '/geo_displaymap_suppliers.php">' . _('Display Map of Suppliers') . '</a></div>'; +echo '<div class="centre">' . + InternalLink($rootpath, 'geocode.php', _('Run GeoCode process (may take a long time)')) . '<br />' . + InternalLink($rootpath, 'geo_displaymap_customers.php', _('Display Map of Customer Branches')) . '<br />' . + InternalLink($rootpath, 'geo_displaymap_suppliers.php', _('Display Map of Suppliers')) . ' + </div>'; } //end if record deleted no point displaying form to add record include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/GetStockImage.php =================================================================== --- trunk/GetStockImage.php 2012-08-27 10:51:56 UTC (rev 9568) +++ trunk/GetStockImage.php 2012-08-27 11:17:24 UTC (rev 9569) @@ -143,7 +143,7 @@ $title = _('Stock Image Retrieval ....'); include('includes/header.inc'); prnMsg( _('The Image could not be retrieved because it does not exist'), '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; } Modified: trunk/geo_displaymap_customers.php =================================================================== --- trunk/geo_displaymap_customers.php 2012-08-27 10:51:56 UTC (rev 9568) +++ trunk/geo_displaymap_customers.php 2012-08-27 11:17:24 UTC (rev 9569) @@ -93,7 +93,7 @@ </p> </body> <? -echo '<div class="centre"><a href="' . $rootpath . '/GeocodeSetup.php">' . _('Go to Geocode Setup') . '</a></div>'; +echo '<div class="centre">' . InternalLink($rootpath, 'GeocodeSetup.php', _('Go to Geocode Setup')) . '</div>'; include ('includes/footer.inc'); ?> </html> Modified: trunk/geo_displaymap_suppliers.php =================================================================== --- trunk/geo_displaymap_suppliers.php 2012-08-27 10:51:56 UTC (rev 9568) +++ trunk/geo_displaymap_suppliers.php 2012-08-27 11:17:24 UTC (rev 9569) @@ -93,7 +93,7 @@ </p> </body> <? -echo '<div class="centre"><a href="' . $rootpath . '/GeocodeSetup.php">' . _('Go to Geocode Setup') . '</a></div>'; +echo '<div class="centre">' . InternalLink($rootpath, 'GeocodeSetup.php', _('Go to Geocode Setup')) . '</div>'; include ('includes/footer.inc'); ?> </html> Modified: trunk/geocode.php =================================================================== --- trunk/geocode.php 2012-08-27 10:51:56 UTC (rev 9568) +++ trunk/geocode.php 2012-08-27 11:17:24 UTC (rev 9569) @@ -63,45 +63,45 @@ $geocode_pending = true; while ($geocode_pending) { - $address = $row['braddress1'] . ', ' . $row['braddress2'] . ', ' . $row['braddress3'] . ', ' . $row['braddress4']; - $id = $row['branchcode']; - $debtorno =$row['debtorno']; - $request_url = $base_url . '&q=' . urlencode($address); - $xml = simplexml_load_string(utf8_encode(file_get_contents($request_url))) or die('url not loading'); + $address = $row['braddress1'] . ', ' . $row['braddress2'] . ', ' . $row['braddress3'] . ', ' . $row['braddress4']; + $id = $row['branchcode']; + $debtorno =$row['debtorno']; + $request_url = $base_url . '&q=' . urlencode($address); + $xml = simplexml_load_string(utf8_encode(file_get_contents($request_url))) or die('url not loading'); // $xml = simplexml_load_file($request_url) or die("url not loading"); - $status = $xml->Response->Status->code; - if (strcmp($status, "200") == 0) { - // Successful geocode - $geocode_pending = false; - $coordinates = $xml->Response->Placemark->Point->coordinates; - $coordinatesSplit = explode(",", $coordinates); - // Format: Longitude, Latitude, Altitude - $lat = $coordinatesSplit[1]; - $lng = $coordinatesSplit[0]; + $status = $xml->Response->Status->code; + if (strcmp($status, "200") == 0) { + // Successful geocode + $geocode_pending = false; + $coordinates = $xml->Response->Placemark->Point->coordinates; + $coordinatesSplit = explode(",", $coordinates); + // Format: Longitude, Latitude, Altitude + $lat = $coordinatesSplit[1]; + $lng = $coordinatesSplit[0]; - $query = sprintf("UPDATE custbranch " . - " SET lat = '%s', lng = '%s' " . - " WHERE branchcode = '%s' " . - " AND debtorno = '%s' LIMIT 1;", - mysql_real_escape_string($lat), - mysql_real_escape_string($lng), - mysql_real_escape_string($id), - mysql_real_escape_string($debtorno)); - $update_result = mysql_query($query); - if (!$update_result) { - die("Invalid query: " . mysql_error()); - } - } else if (strcmp($status, "620") == 0) { - // sent geocodes too fast - $delay += 100000; - } else { - // failure to geocode - $geocode_pending = false; - echo '<p>' . _('Customer Branch Code:') . $id . ', Address: ' . $address . _('failed to geocode.'); - echo 'Received status ' . $status . '</p><br />'; - } - usleep($delay); + $query = sprintf("UPDATE custbranch " . + " SET lat = '%s', lng = '%s' " . + " WHERE branchcode = '%s' " . + " AND debtorno = '%s' LIMIT 1;", + mysql_real_escape_string($lat), + mysql_real_escape_string($lng), + mysql_real_escape_string($id), + mysql_real_escape_string($debtorno)); + $update_result = mysql_query($query); + if (!$update_result) { + die("Invalid query: " . mysql_error()); + } + } else if (strcmp($status, "620") == 0) { + // sent geocodes too fast + $delay += 100000; + } else { + // failure to geocode + $geocode_pending = false; + echo '<p>' . _('Customer Branch Code:') . $id . ', Address: ' . $address . _('failed to geocode.'); + echo 'Received status ' . $status . '</p><br />'; + } + usleep($delay); } } @@ -110,46 +110,46 @@ $geocode_pending = true; while ($geocode_pending) { - $address = $row2['address1'] . ", " . $row2['address2'] . ", " . $row2['address3'] . ", " . $row2['address4']; - $id = $row2['supplierid']; - $request_url = $base_url . "&q=" . urlencode($address); - $xml = simplexml_load_string(utf8_encode(file_get_contents($request_url))) or die("url not loading"); + $address = $row2['address1'] . ", " . $row2['address2'] . ", " . $row2['address3'] . ", " . $row2['address4']; + $id = $row2['supplierid']; + $request_url = $base_url . "&q=" . urlencode($address); + $xml = simplexml_load_string(utf8_encode(file_get_contents($request_url))) or die("url not loading"); // $xml = simplexml_load_file($request_url) or die("url not loading"); - $status = $xml->Response->Status->code; - if (strcmp($status, "200") == 0) { - // Successful geocode - $geocode_pending = false; - $coordinates = $xml->Response->Placemark->Point->coordinates; - $coordinatesSplit = explode(",", $coordinates); - // Format: Longitude, Latitude, Altitude - $lat = $coordinatesSplit[1]; - $lng = $coordinatesSplit[0]; + $status = $xml->Response->Status->code; + if (strcmp($status, "200") == 0) { + // Successful geocode + $geocode_pending = false; + $coordinates = $xml->Response->Placemark->Point->coordinates; + $coordinatesSplit = explode(",", $coordinates); + // Format: Longitude, Latitude, Altitude + $lat = $coordinatesSplit[1]; + $lng = $coordinatesSplit[0]; - $query = sprintf("UPDATE suppliers " . - " SET lat = '%s', lng = '%s' " . - " WHERE supplierid = '%s' LIMIT 1;", - mysql_real_escape_string($lat), - mysql_real_escape_string($lng), - mysql_real_escape_string($id)); - $update_result = mysql_query($query); - if (!$update_result) { - die("Invalid query: " . mysql_error()); - } - } else if (strcmp($status, "620") == 0) { - // sent geocodes too fast - $delay += 100000; - } else { - // failure to geocode - $geocode_pending = false; - echo '<p>' . _('Supplier Code: ') . $id . ', Address: ' . $address . ' failed to geocode.'; - echo 'Received status ' . $status . '</p><br />'; - } - usleep($delay); + $query = sprintf("UPDATE suppliers " . + " SET lat = '%s', lng = '%s' " . + " WHERE supplierid = '%s' LIMIT 1;", + mysql_real_escape_string($lat), + mysql_real_escape_string($lng), + mysql_real_escape_string($id)); + $update_result = mysql_query($query); + if (!$update_result) { + die("Invalid query: " . mysql_error()); + } + } else if (strcmp($status, "620") == 0) { + // sent geocodes too fast + $delay += 100000; + } else { + // failure to geocode + $geocode_pending = false; + echo '<p>' . _('Supplier Code: ') . $id . ', Address: ' . $address . ' failed to geocode.'; + echo 'Received status ' . $status . '</p><br />'; + } + usleep($delay); } } echo '<br />'; -echo '<br /><div class="centre"><a href="' . $rootpath . '/GeocodeSetup.php">' . _('Go back to Geocode Setup') . '</a></div>'; +echo '<br /><div class="centre">' . InternalLink($rootpath, 'GeocodeSetup.php', _('Go back to Geocode Setup')) . '</div>'; include ('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2012-08-27 10:51:56 UTC (rev 9568) +++ trunk/includes/MiscFunctions.php 2012-08-27 11:17:24 UTC (rev 9569) @@ -7,9 +7,9 @@ /********************************************/ function reverse_escape($str) { - $search=array("\\\\","\\0","\\n","\\r","\Z","\'",'\"'); - $replace=array("\\","\0","\n","\r","\x1a","'",'"'); - return str_replace($search,$replace,$str); + $search=array("\\\\","\\0","\\n","\\r","\Z","\'",'\"'); + $replace=array("\\","\0","\n","\r","\x1a","'",'"'); + return str_replace($search,$replace,$str); } function locale_number_format($Number, $DecimalPlaces) { @@ -238,6 +238,10 @@ return false; } +function ExternalLink($URL, $Caption) { + return '<a href="' . $URL . '" target="_blank">' . $Caption . '</a>'; +} + function InternalLink($rootpath, $Script, $Caption, $Class='', $Title='') { if ($Title=='') { $Title = $Caption; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-27 12:33:08
|
Revision: 9570 http://weberp.svn.sourceforge.net/weberp/?rev=9570&view=rev Author: tim_schofield Date: 2012-08-27 12:32:57 +0000 (Mon, 27 Aug 2012) Log Message: ----------- Replace <a tags with new InternalLink() function Modified Paths: -------------- trunk/FTP_RadioBeacon.php trunk/FixedAssetCategories.php trunk/FixedAssetDepreciation.php trunk/FixedAssetItems.php trunk/FixedAssetLocations.php trunk/FreightCosts.php trunk/GeocodeSetup.php Modified: trunk/FTP_RadioBeacon.php =================================================================== --- trunk/FTP_RadioBeacon.php 2012-08-27 11:17:24 UTC (rev 9569) +++ trunk/FTP_RadioBeacon.php 2012-08-27 12:32:57 UTC (rev 9570) @@ -79,48 +79,27 @@ $ModifyPage = $rootpath . 'SelectOrderItems.php?&ModifyOrderNumber=' . $myrow['orderno']; if ($myrow['printedpackingslip'] ==1){ - printf('<td><font size="2"><a href="%s">%s</a></font></td> + echo '<td><font size="2">' . InternalLink('', $ModifyPage, $myrow['orderno']) . '</font></td> <td><font color="red" size="2">' . _('Already') . '<br />' . _('Sent') . '</font></td> - <td><font size="2">%s</font></td> - <td><font size="2">%s</font></td> - <td><font size="2">%s</font></td> - <td><font size="2">%s</font></td> - <td><font size="2">%s</font></td> - <td><font size="2">%s</font></td> - <td class="number"><font size="2">%s</font></td> - <td><font size="2">%s</font></td></tr>', - $ModifyPage, - $myrow['orderno'], - $myrow['name'], - $myrow['brname'], - $myrow['customerref'], - $FormatedOrderDate, - $FormatedDelDate, - $myrow['deliverto'], - $FormatedOrderValue, - $FormatedDateLastSent); + <td><font size="2">' . $myrow['name'] . '</font></td> + <td><font size="2">' . $myrow['brname'] . '</font></td> + <td><font size="2">' . $myrow['customerref'] . '</font></td> + <td><font size="2">' . $FormatedOrderDate . '</font></td> + <td><font size="2">' . $FormatedDelDate . '</font></td> + <td><font size="2">' . $myrow['deliverto'] . '</font></td> + <td class="number"><font size="2">' . $FormatedOrderValue . '</font></td> + <td><font size="2">' . $FormatedDateLastSent . '</font></td></tr>'; } else { - printf('<td><font size="2"><a href="%s">%s</a></font></td> - <td><font size="2"><a href="%s">' . _('Send') . '</a></font></td> - <td><font size="2">%s</font></td> - <td><font size="2">%s</font></td> - <td><font size="2">%s</font></td> - <td><font size="2">%s</font></td> - <td><font size="2">%s</font></td> - <td><font size="2">%s</font></td> - <td class="number"><font size="2">%s</font></td> - <td><font size="2">%s</font></td></tr>', - $ModifyPage, - $myrow['orderno'], - $FTPDispatchNote, - $myrow['name'], - $myrow['brname'], - $myrow['customerref'], - $FormatedOrderDate, - $FormatedDelDate, - $myrow['deliverto'], - $FormatedOrderValue, - $FormatedDateLastSent); + echo '<td><font size="2">' . InternalLink('', $ModifyPage, $myrow['orderno']) . '</font></td> + <td><font size="2">' . InternalLink('', $FTPDispatchNote, _('Send')) . '</font></td> + <td><font size="2">' . $myrow['name'] . '</font></td> + <td><font size="2">' . $myrow['brname'] . '</font></td> + <td><font size="2">' . $myrow['customerref'] . '</font></td> + <td><font size="2">' . $FormatedOrderDate . '</font></td> + <td><font size="2">' . $FormatedDelDate . '</font></td> + <td><font size="2">' . $myrow['deliverto'] . '</font></td> + <td class="number"><font size="2">' . $FormatedOrderValue . '</font></td> + <td><font size="2">' . $FormatedDateLastSent . '</font></td></tr>'; } $j++; if ($j == 12){ @@ -183,9 +162,8 @@ $myrow = DB_fetch_array($result); if ($myrow['printedpackingslip']==1){ prnMsg(_('Order Number') . ' ' . $_GET['OrderNo'] . ' ' . _('has previously been sent to Radio Beacon') . '. ' . _('It was sent on') . ' ' . ConvertSQLDate($myrow['datepackingslipprinted']) . '<br />' . _('To re-send the order with the balance not previously dispatched and invoiced the order must be modified to allow a reprint (or re-send)') . '.<br />' . _('This check is there to ensure that duplication of dispatches to the customer are avoided'),'warn'); - echo '<p><a href="'.$rootpath.'/SelectOrderItems.php?ModifyOrderNumber=' . $_GET['OrderNo'] . '">' . - _('Modify the order to allow a re-send or reprint') . ' (' . _('Select Delivery Details') . ')' . '</a></p>'; - echo '<p><a href="'.$rootpath.'/index.php">' . _('Back to the menu') . '</a></p>'; + echo '<p>' . InternalLink($rootpath, 'SelectOrderItems.php?ModifyOrderNumber=' . $_GET['OrderNo'], _('Modify the order to allow a re-send or reprint') . ' (' . _('Select Delivery Details') . ')' ) . '</p>'; + echo '<p>' . InternalLink($rootpath, 'index.php', _('Back to the menu')) . '</p>'; include('includes/footer.inc'); exit; } Modified: trunk/FixedAssetCategories.php =================================================================== --- trunk/FixedAssetCategories.php 2012-08-27 11:17:24 UTC (rev 9569) +++ trunk/FixedAssetCategories.php 2012-08-27 12:32:57 UTC (rev 9570) @@ -172,31 +172,21 @@ echo '<tr class="OddTableRows">'; $k=1; } - printf('<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</td> - <td><a href="%sSelectedCategory=%s">' . _('Edit') . '</a></td> - <td><a href="%sSelectedCategory=%s&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this fixed asset category? Additional checks will be performed before actual deletion to ensure data integrity is not compromised.') . '\');">' . _('Delete') . '</a></td> - </tr>', - $myrow['categoryid'], - $myrow['categorydescription'], - $myrow['costact'], - $myrow['depnact'], - $myrow['disposalact'], - $myrow['accumdepnact'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['categoryid'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['categoryid']); + echo '<td>' . $myrow['categoryid'] . '</td> + <td>' . $myrow['depnact'] . '</td> + <td class="number">' . $myrow['categorydescription'] . '</td> + <td class="number">' . $myrow['costact'] . '</td> + <td class="number">' . $myrow['disposalact'] . '</td> + <td class="number">' . $myrow['accumdepnact'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedCategory=' . $myrow['categoryid'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedCategory=' . $myrow['categoryid'] . '&delete=yes', _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP - } // End DB_num_rows() check. - else { - echo '<tr><td style="text-align:center;" colspan="0">' . _('No Fixed Asset Categories Found') . '</td></tr>'; - } + } // End DB_num_rows() check. + else { + echo '<tr><td style="text-align:center;" colspan="0">' . _('No Fixed Asset Categories Found') . '</td></tr>'; + } echo '</table>'; } @@ -204,7 +194,7 @@ //end of ifs and buts! if (isset($SelectedCategory)) { - echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' ._('Show All Fixed Asset Categories') . '</a></div><br />'; + echo '<br /><div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Show All Fixed Asset Categories')) . '</div><br />'; } echo '<form onsubmit="return SubmitForm(this, \'\')" name="CategoryForm" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; Modified: trunk/FixedAssetDepreciation.php =================================================================== --- trunk/FixedAssetDepreciation.php 2012-08-27 11:17:24 UTC (rev 9569) +++ trunk/FixedAssetDepreciation.php 2012-08-27 12:32:57 UTC (rev 9570) @@ -260,7 +260,7 @@ $result = DB_Txn_Commit($db); prnMsg(_('Depreciation') . ' ' . $TransNo . ' ' . _('has been successfully entered'),'success'); unset($_POST['ProcessDate']); - echo '<br /><a href="index.php' . '">' ._('Return to main menu').'</a>'; + echo '<br />' . InternalLink('', 'index.php', _('Return to main menu')); /*And post the journal too */ include ('includes/GLPostings.inc'); } else { Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2012-08-27 11:17:24 UTC (rev 9569) +++ trunk/FixedAssetItems.php 2012-08-27 12:32:57 UTC (rev 9570) @@ -7,7 +7,7 @@ include('includes/header.inc'); include('includes/SQL_CommonFunctions.inc'); -echo '<a href="' . $rootpath . '/SelectAsset.php">' . _('Back to Select') . '</a><br />' . "\n"; +echo InternalLink($rootpath, 'SelectAsset.php', _('Back to Select')) . '<br />' . "\n"; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Fixed Asset Items') . '" alt="" />' . ' ' . $title . '</p>'; @@ -61,7 +61,7 @@ if ($UploadTheFile=='Yes'){ $result = move_uploaded_file($_FILES['ItemPicture']['tmp_name'], $filename); - $message = ($result)?_('File url') ."<a href='". $filename ."'>" . $filename . '</a>' : _('Something is wrong with uploading a file'); + $message = ($result)?_('File url') . InternalLink('', $filename, $filename) : _('Something is wrong with uploading a file'); } /* EOR Add Image upload for New Item - by Ori */ } @@ -504,7 +504,7 @@ } $category=$myrow['categoryid']; } -echo '</select><a target="_blank" href="'. $rootpath . '/FixedAssetCategories.php">'.' ' . _('Add or Modify Asset Categories') . '</a></td></tr>'; +echo '</select>' . InternalLink($rootpath, 'FixedAssetCategories.php', ' ' . _('Add or Modify Asset Categories')) . '</td></tr>'; if (!isset($_POST['AssetCategoryID'])) { $_POST['AssetCategoryID']=$category; } @@ -526,7 +526,7 @@ echo '<option value="' . $myrow['locationid'] .'">' . $myrow['locationdescription'] . '</option>'; } } - echo '</select><a target="_blank" href="'. $rootpath . '/FixedAssetLocations.php">'.' ' . _('Add Asset Location') . '</a></td></tr>'; + echo '</select>'. InternalLink($rootpath, 'FixedAssetLocations.php', ' ' . _('Add Asset Location')) . '</td></tr>'; echo '<tr><td>' . _('Bar Code') . ':</td><td><input ' . (in_array('BarCode',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="BarCode" size="22" maxlength="20" value="' . $_POST['BarCode'] . '" /></td></tr>'; Modified: trunk/FixedAssetLocations.php =================================================================== --- trunk/FixedAssetLocations.php 2012-08-27 11:17:24 UTC (rev 9569) +++ trunk/FixedAssetLocations.php 2012-08-27 12:32:57 UTC (rev 9570) @@ -103,7 +103,7 @@ $parentresult=DB_query($parentsql, $db); $parentrow=DB_fetch_array($parentresult); echo '<td>'.$parentrow['locationdescription'].'</td>'; - echo '<td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedLocation='.$myrow['locationid'].'">' . _('Edit') . '</td>'; + echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedLocation='.$myrow['locationid'], _('Edit')) . '</td>'; } echo '</table><br />'; Modified: trunk/FreightCosts.php =================================================================== --- trunk/FreightCosts.php 2012-08-27 11:17:24 UTC (rev 9569) +++ trunk/FreightCosts.php 2012-08-27 12:32:57 UTC (rev 9570) @@ -227,30 +227,16 @@ } - printf('<td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td><a href="%sSelectedFreightCost=%s&LocationFrom=%s&ShipperID=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedFreightCost=%s&LocationFrom=%s&ShipperID=%s&delete=yes">' . _('Delete') . '</td></tr>', - $myrow[1], - $myrow[2], - $myrow[3], - $myrow[4], - $myrow[5], - $myrow[6], - $myrow[7], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow[0], - $LocationFrom, - $ShipperID, - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow[0], - $LocationFrom, - $ShipperID); + echo '<td>' . $myrow[1] . '</td> + <td class="number">' . $myrow[2] . '</td> + <td class="number">' . $myrow[3] . '</td> + <td class="number">' . $myrow[4] . '</td> + <td class="number">' . $myrow[5] . '</td> + <td class="number">' . $myrow[6] . '</td> + <td class="number">' . $myrow[7] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedFreightCost=' . $myrow[0] . '&LocationFrom=' . $LocationFrom . '&ShipperID=' . $ShipperID, _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedFreightCost=' . $myrow[0] . '&LocationFrom=' . $LocationFrom . '&ShipperID=' . $ShipperID . '&delete=yes', _('Delete')) . '</td> + </tr>'; } @@ -261,7 +247,7 @@ //end of ifs and buts! if (isset($SelectedFreightCost)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?LocationFrom=' . $LocationFrom . '&ShipperID=' . $ShipperID . '">' . _('Show all freight costs for') . ' ' . $ShipperName . ' ' . _('from') . ' ' . $LocationName . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?LocationFrom=' . $LocationFrom . '&ShipperID=' . $ShipperID, _('Show all freight costs for') . ' ' . $ShipperName . ' ' . _('from') . ' ' . $LocationName) . '</div>'; } if (isset($LocationFrom) AND isset($ShipperID)) { Modified: trunk/GeocodeSetup.php =================================================================== --- trunk/GeocodeSetup.php 2012-08-27 11:17:24 UTC (rev 9569) +++ trunk/GeocodeSetup.php 2012-08-27 12:32:57 UTC (rev 9570) @@ -137,7 +137,7 @@ echo '<div class="page_help_text">'. _('Get a google API key at ') . ExternalLink('http://code.google.com/apis/maps/signup.html', 'http://code.google.com/apis/maps/signup.html') . '</div>'; echo '<br /><div class="page_help_text">'. _('Find the lat/long for your map center point at ') . - ExternalLink('http://www.batchgeocode.com/lookup/', 'http://www.batchgeocode.com/lookup/' . '</div><br />'; + ExternalLink('http://www.batchgeocode.com/lookup/', 'http://www.batchgeocode.com/lookup/') . '</div><br />'; prnMsg(_('Set the maps centre point using the Center Longitude and Center Latitude. Set the maps screen size using the height and width in pixels (px)'),'info'); echo '</div><br />'; echo '<table class="selection">'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-27 12:53:40
|
Revision: 9571 http://weberp.svn.sourceforge.net/weberp/?rev=9571&view=rev Author: tim_schofield Date: 2012-08-27 12:53:29 +0000 (Mon, 27 Aug 2012) Log Message: ----------- Replace <a tags with new InternalLink() function Modified Paths: -------------- trunk/EDIMessageFormat.php trunk/EmailConfirmation.php trunk/EmailCustTrans.php trunk/Factors.php Modified: trunk/EDIMessageFormat.php =================================================================== --- trunk/EDIMessageFormat.php 2012-08-27 12:32:57 UTC (rev 9570) +++ trunk/EDIMessageFormat.php 2012-08-27 12:53:29 UTC (rev 9571) @@ -144,19 +144,12 @@ } - printf('<td>%s</td> - <td class="number">%s</td> - <td>%s</td> - <td><a href="%sSelectedMessageLine=%s">' . _('Edit') . '</a></td> - <td><a href="%sdelete=%s">' . _('Delete') . '</a></td> - </tr>', - $myrow[1], - $myrow[2], - $myrow[3], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow[0], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow[0]); + echo '<td>' . $myrow[1] . '</td> + <td class="number">' . $myrow[2] . '</td> + <td>' . $myrow[3] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedMessageLine=' . $myrow[0], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?delete=' . $myrow[0], _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP echo '</table><br />'; @@ -189,7 +182,7 @@ $_POST['SequenceNo'] = $myrow['sequenceno']; $_POST['LineText'] = $myrow['linetext']; - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?MessageType=INVOIC&PartnerCode=' . $myrow['partnercode'] . '">' . _('Review Message Lines') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?MessageType=INVOIC&PartnerCode=' . $myrow['partnercode'], _('Review Message Lines')) . '</div>'; echo '<input type="hidden" name="SelectedMessageLine" value="' . $SelectedMessageLine . '" />'; echo '<input type="hidden" name="MessageType" value="' . $myrow['messagetype'] . '" />'; Modified: trunk/EmailConfirmation.php =================================================================== --- trunk/EmailConfirmation.php 2012-08-27 12:32:57 UTC (rev 9570) +++ trunk/EmailConfirmation.php 2012-08-27 12:53:29 UTC (rev 9571) @@ -6,16 +6,16 @@ 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(); + $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(); } $MailTo = $_GET['EMail']; @@ -62,46 +62,45 @@ //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><br /><br /><br />'; + 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']; - $DeliveryDate = $myrow['salesorders.deliverydate']; - 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']; + $DeliveryDate = $myrow['salesorders.deliverydate']; + 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>'; - include('includes/footer.inc'); - exit; - }//packing slip has been printed. - $MailSubject = "Order Confirmation-Sales Order " . $_GET['TransNo'] . " - Your PO " . - $myrow['customerref'] ; + include('includes/footer.inc'); + exit; + }//packing slip has been printed. + $MailSubject = "Order Confirmation-Sales Order " . $_GET['TransNo'] . " - Your PO " . + $myrow['customerref'] ; } /*retrieve the order details from the database to print */ @@ -111,8 +110,8 @@ LETS GO */ $MailMessage = "<html><head><title>Email Confirmation</title></head><body>" . - "<table cellpadding='2' cellspacing='2'><tr>" . - "<td align='center' colspan='4'><h1>" . $_SESSION['CompanyRecord']['coyname'] . "</h1>" ; + "<table cellpadding='2' cellspacing='2'><tr>" . + "<td align='center' colspan='4'><h1>" . $_SESSION['CompanyRecord']['coyname'] . "</h1>" ; $MailMessage = $MailMessage . "</td></tr>"; $MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . $_SESSION['CompanyRecord']['regoffice1'] . "</b></td></tr>"; @@ -126,9 +125,9 @@ $MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . $_SESSION['CompanyRecord']['email'] . "</b><br /><br /><br /></td></tr>"; $MailMessage = $MailMessage . "<table><tr><td align='center' colspan='4'> - <h2> Order Acknowledgement</h2></td></tr>"; + <h2> Order Acknowledgement</h2></td></tr>"; $MailMessage = $MailMessage . "<tr><td align='center' colspan='4'> <b>Order Number " . - $_GET['TransNo'] . "</b><br /><br /><br /></td></tr>"; + $_GET['TransNo'] . "</b><br /><br /><br /></td></tr>"; $MailMessage = $MailMessage . "<tr><td colspan='4'> <b>Delivered To:</b></td></tr>"; $MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . $myrow['deliverto'] . "</b></td></tr>"; @@ -136,14 +135,14 @@ $myrow['deladd1'] . "</b></td></tr>"; if(mb_strlen(trim($myrow['deladd2']))) { - $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd2'] . "</b></td></tr>"; - $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . - ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5']. "</b><br /><br /><br /></td></tr>"; + $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd2'] . "</b></td></tr>"; + $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . + ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5']. "</b><br /><br /><br /></td></tr>"; } else { - $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . ' ' . - $myrow['deladd4'] . ' ' . $myrow['deladd5'] . "</b><br /><br /><br /></td></tr>"; + $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . ' ' . + $myrow['deladd4'] . ' ' . $myrow['deladd5'] . "</b><br /><br /><br /></td></tr>"; } $MailMessage = $MailMessage . "</table><table border='1' width='50%'><tr>"; if($_REQUEST['POLine'] == 1){ @@ -152,7 +151,7 @@ $MailMessage = $MailMessage . "<td>Stock Code</td> <td>Description</td> <td>Quantity Ordered</td> - <td>Due Date</td></tr>"; + <td>Due Date</td></tr>"; $sql = "SELECT salesorderdetails.stkcode, @@ -178,18 +177,18 @@ $DisplayQty = locale_number_format($myrow2['quantity'],$myrow2['decimalplaces']); $DisplayPrevDel = locale_number_format($myrow2['qtyinvoiced'],$myrow2['decimalplaces']); $DisplayQtySupplied = locale_number_format($myrow2['quantity'] - $myrow2['qtyinvoiced'],$myrow2['decimalplaces']); - $StkCode[$i] = $myrow2['stkcode']; - $DscCode[$i] = $myrow2['description']; - $QtyCode[$i] = $DisplayQty ; - $POLine[$i] = $myrow2['poline']; - if($myrow2['itemdue'] =='') - { - $ItemDue[$i] = date('M d, Y',strtotime($DeliveryDate)); - } - else - { - $ItemDue[$i] = date('M d, Y',strtotime($myrow2['itemdue'])); - } + $StkCode[$i] = $myrow2['stkcode']; + $DscCode[$i] = $myrow2['description']; + $QtyCode[$i] = $DisplayQty ; + $POLine[$i] = $myrow2['poline']; + if($myrow2['itemdue'] =='') + { + $ItemDue[$i] = date('M d, Y',strtotime($DeliveryDate)); + } + else + { + $ItemDue[$i] = date('M d, Y',strtotime($myrow2['itemdue'])); + } $MailMessage = $MailMessage . '<tr>'; if($_REQUEST['POLine'] == 1){ $MailMessage = $MailMessage . '<td align="right">' . $POLine[$i] . '</td>'; @@ -200,7 +199,7 @@ <td align="center">' . $ItemDue[$i] . '</td> </tr>'; - $i = $i + 1; + $i = $i + 1; } //end while there are line items to print out Modified: trunk/EmailCustTrans.php =================================================================== --- trunk/EmailCustTrans.php 2012-08-27 12:32:57 UTC (rev 9570) +++ trunk/EmailCustTrans.php 2012-08-27 12:53:29 UTC (rev 9571) @@ -19,11 +19,11 @@ if ($_SESSION['InvoicePortraitFormat']==0){ echo '<meta http-equiv="Refresh" content=\'0; url=' . $rootpath . '/PrintCustTrans.php?FromTransNo=' . $_POST['TransNo'] . '&PrintPDF=Yes&InvOrCredit=' . $_POST['InvOrCredit'] .'&Email=' . $_POST['EmailAddr'] . "'>"; - prnMsg(_('The transaction should have been emailed off') . '. ' . _('If this does not happen') . ' (' . _('if the browser does not support META Refresh') . ')' . '<a href="' . $rootpath . '/PrintCustTrans.php?FromTransNo=' . $_POST['FromTransNo'] . '&PrintPDF=Yes&InvOrCredit=' . $_POST['InvOrCredit'] .'&Email=' . $_POST['EmailAddr'] . '">' . _('click here') . '</a> ' . _('to email the customer transaction'),'success'); + prnMsg(_('The transaction should have been emailed off') . '. ' . _('If this does not happen') . ' (' . _('if the browser does not support META Refresh') . ')' . InternalLink($rootpath, 'PrintCustTrans.php?FromTransNo=' . $_POST['FromTransNo'] . '&PrintPDF=Yes&InvOrCredit=' . $_POST['InvOrCredit'] .'&Email=' . $_POST['EmailAddr'], _('click here')) . _('to email the customer transaction'),'success'); } else { echo '<meta http-equiv="Refresh" content=\'0; url=' . $rootpath . '/PrintCustTransPortrait.php?FromTransNo=' . $_POST['TransNo'] . '&PrintPDF=Yes&InvOrCredit=' . $_POST['InvOrCredit'] .'&Email=' . $_POST['EmailAddr'] . '">'; - prnMsg(_('The transaction should have been emailed off. If this does not happen (perhaps the browser does not support META Refresh)') . '<a href="' . $rootpath . '/PrintCustTransPortrait.php?FromTransNo=' . $_POST['FromTransNo'] . '&PrintPDF=Yes&InvOrCredit=' . $_POST['InvOrCredit'] .'&Email=' . $_POST['EmailAddr'] . '">' . _('click here') . '</a> ' . _('to email the customer transaction'),'success'); + prnMsg(_('The transaction should have been emailed off. If this does not happen (perhaps the browser does not support META Refresh)') . InternalLink($rootpath, 'PrintCustTransPortrait.php?FromTransNo=' . $_POST['FromTransNo'] . '&PrintPDF=Yes&InvOrCredit=' . $_POST['InvOrCredit'] .'&Email=' . $_POST['EmailAddr'], _('click here')) . _('to email the customer transaction'),'success'); } exit; } elseif (isset($_POST['DoIt'])) { Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2012-08-27 12:32:57 UTC (rev 9570) +++ trunk/Factors.php 2012-08-27 12:53:29 UTC (rev 9571) @@ -202,7 +202,7 @@ echo '<td>' . $myrow['telephone'].'</td>'; echo '<td>' . $myrow['fax'].'</td>'; echo '<td>' . $myrow['email'].'</td>'; - echo '<td><a href="'.$rootpath . '/Factors.php?FactorID='.$myrow['id'].'">'._('Edit').'</a></td></tr>'; + echo '<td>' . InternalLink($rootpath, 'Factors.php?FactorID='.$myrow['id'], _('Edit')) . '</td></tr>'; } echo '</table><br /><div class="centre">'; echo '<br /><button tabindex="3" type="submit" name="Create">' . _('Create New Factor') . '</button>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-27 20:04:07
|
Revision: 9572 http://weberp.svn.sourceforge.net/weberp/?rev=9572&view=rev Author: tim_schofield Date: 2012-08-27 20:03:59 +0000 (Mon, 27 Aug 2012) Log Message: ----------- Replace <a tags with new InternalLink() function Modified Paths: -------------- trunk/CreditItemsControlled.php trunk/Credit_Invoice.php trunk/Currencies.php trunk/CustEDISetup.php trunk/CustLoginSetup.php trunk/CustomerAllocations.php trunk/CustomerBranches.php trunk/CustomerReceipt.php trunk/CustomerTransInquiry.php trunk/Customers.php trunk/DailyBankTransactions.php trunk/DebtorsAtPeriodEnd.php trunk/DeliveryDetails.php trunk/Departments.php trunk/DiscountCategories.php trunk/DiscountMatrix.php Modified: trunk/CreditItemsControlled.php =================================================================== --- trunk/CreditItemsControlled.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/CreditItemsControlled.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -25,11 +25,11 @@ if (isset($_GET['LineNo'])){ - $LineNo = $_GET['LineNo']; + $LineNo = $_GET['LineNo']; } elseif (isset($_POST['LineNo'])){ - $LineNo = $_POST['LineNo']; + $LineNo = $_POST['LineNo']; } else { - echo '<div class="centre"><a href="' . $rootpath . '/' . $CreditLink . '">'. _('Select Credit Items'). '</a><br /><br />'; + echo '<div class="centre">' . InternalLink($rootpath, $CreditLink, _('Select Credit Items')); prnMsg( _('This page can only be opened if a Line Item on a credit note has been selected.') . ' ' . _('Please do that first'), 'error'); echo '</div>'; include('includes/footer.inc'); @@ -40,7 +40,7 @@ if (!isset($_SESSION['CreditItems'])) { /* This page can only be called with a credit note entry part entered */ - echo '<div class="centre"><a href="' . $rootpath . '/' . $CreditLink . '">'. _('Select Credit Items'). '</a><br /><br />'; + echo '<div class="centre">' . InternalLink($rootpath, $CreditLink, _('Select Credit Items')); prnMsg( _('This page can only be opened if a controlled credit note line item has been selected.') . ' ' . _('Please do that first'),'error'); echo '</div>'; include('includes/footer.inc'); @@ -53,7 +53,7 @@ //Make sure this item is really controlled if ( $LineItem->Controlled != 1 ){ - echo '<div class="centre"><a href="' . $rootpath . '/' . $CreditLink . '">'. _('Back to Credit Note Entry').'</a></div>'; + echo '<div class="centre">' . InternalLink($rootpath, $CreditLink, _('Back to Credit Note Entry')) . '</div>'; echo '<br />'; prnMsg( _('Notice') . ' - ' . _('The line item must be defined as controlled to require input of the batch numbers or serial numbers being credited'),'warn'); include('includes/footer.inc'); @@ -73,7 +73,7 @@ echo '<input type="hidden" name="CreditInvoice" value="Yes" />'; } -echo '<br /><a href="' . $rootpath . '/' . $CreditLink . '">'. _('Back to Credit Note Entry'). '</a>'; +echo '<br />' . InternalLink($rootpath, $CreditLink, _('Back to Credit Note Entry')); echo '<br /><font size="2"><b>'. _('Credit of Controlled Item'). ' ' . $LineItem->StockID . ' - ' . $LineItem->ItemDescription . ' '. _('from') .' '. $_SESSION['CreditItems']->CustomerName . '</b></font></div>'; Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/Credit_Invoice.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -189,7 +189,7 @@ } else { /* there are no stock movement records created for that invoice */ - echo '<div class="centre"><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a></div>'; + echo '<div class="centre">' . InternalLink($rootpath, 'index.php', _('Back to the menu')) . '</div>'; prnMsg( _('There are no line items that were retrieved for this invoice') . '. ' . _('The automatic credit program can not create a credit note from this invoice'),'warn'); include('includes/footer.inc'); exit; @@ -320,7 +320,7 @@ if ($LnItm->Controlled==1){ - echo '<td><input type="hidden" name="Quantity_' . $LnItm->LineNumber .'" value="' . $LnItm->QtyDispatched . '" /><a href="'.$rootpath.'/CreditItemsControlled.php?LineNo=' . $LnItm->LineNumber . '&CreditInvoice=Yes>' . $LnItm->QtyDispatched . '</a></td>'; + echo '<td><input type="hidden" name="Quantity_' . $LnItm->LineNumber .'" value="' . $LnItm->QtyDispatched . '" />' . InternalLink($rootpath, 'CreditItemsControlled.php?LineNo=' . $LnItm->LineNumber . '&CreditInvoice=Yes', $LnItm->QtyDispatched) . '</td>'; } else { @@ -387,7 +387,7 @@ echo '<td class="number">' . $DisplayTaxAmount . '</td> <td class="number">' . $DisplayGrossLineTotal . '</td> - <td><a href="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $LnItm->LineNumber . '">' . _('Delete') . '</a></td></tr>'; + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $LnItm->LineNumber, _('Delete')) . '</td></tr>'; echo '<tr'.$RowStarter . '><td colspan="12"><textarea tabindex="'.$j.'" name="Narrative_' . $LnItm->LineNumber . '" cols=100% rows=1>' . $LnItm->Narrative . '</textarea><br /><hr></td></tr>'; $j++; @@ -1463,9 +1463,9 @@ echo '<div class="centre">'._('Credit Note number') . ' ' . $CreditNo . ' ' . _('has been processed'); if ($_SESSION['InvoicePortraitFormat']==0){ - echo '<br/><a href="'. $rootpath . '/PrintCustTrans.php?FromTransNo=' . $CreditNo . '&InvOrCredit=Credit&PrintPDF=True">' . _('Print this credit note') . '</a>'; + echo '<br/>' . InternalLink($rootpath, 'PrintCustTrans.php?FromTransNo=' . $CreditNo . '&InvOrCredit=Credit&PrintPDF=True', _('Print this credit note')); } else { - echo '<br/><a href="'. $rootpath . '/PrintCustTransPortrait.php?FromTransNo=' . $CreditNo . '&InvOrCredit=Credit&PrintPDF=True">' . _('Print this credit note') . '</a>'; + echo '<br/>' . InternalLink($rootpath, 'PrintCustTransPortrait.php?FromTransNo=' . $CreditNo . '&InvOrCredit=Credit&PrintPDF=True', _('Print this credit note')); } echo '</div>'; /*end of process credit note */ Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/Currencies.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -234,62 +234,30 @@ } if ($myrow[1]!=$FunctionalCurrency){ - printf('<td><img src="%s" /></td> - <td>%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><a href="%s&SelectedCurrency=%s">%s</a></td> - <td><a href="%s&SelectedCurrency=%s&delete=1">%s</a></td> - <td><a href="%s/ExchangeRateTrend.php?%s">' . _('Graph') . '</a></td> - </tr>', - $ImageFile, - $myrow['currabrev'], - $myrow['currency'], - $myrow['country'], - $myrow['hundredsname'], - locale_number_format($myrow['decimalplaces'],0), - locale_number_format($myrow['rate'],5), - locale_number_format(GetCurrencyRate($myrow['currabrev'],$CurrencyRatesArray),5), - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['currabrev'], - _('Edit'), - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['currabrev'], - _('Delete'), - $rootpath, - 'CurrencyToShow=' . $myrow['currabrev']); + echo '<td><img src="' . $ImageFile . '" /></td> + <td>' . $myrow['currabrev'] . '</td> + <td>' . $myrow['currency'] . '</td> + <td>' . $myrow['country'] . '</td> + <td>' . $myrow['hundredsname'] . '</td> + <td class="number">' . locale_number_format($myrow['decimalplaces'],0) . '</td> + <td class="number">' . locale_number_format($myrow['rate'],5) . '</td> + <td class="number">' . locale_number_format(GetCurrencyRate($myrow['currabrev'],$CurrencyRatesArray),5) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedCurrency=' . $myrow['currabrev'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedCurrency=' . $myrow['currabrev'] . '&delete=1', _('Delete')) . '</td> + <td>' . InternalLink($rootpath, 'ExchangeRateTrend.php?CurrencyToShow=' . $myrow['currabrev'], _('Graph')) . '</td> + </tr>'; } else { - printf('<td><img src="%s" /></td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td colspan="2">%s</td> - <td><a href="%s&SelectedCurrency=%s">%s</a></td> - <td><a href="%s/ExchangeRateTrend.php?%s">' . _('Graph') . '</a></td> - </tr>', - $ImageFile, - $myrow['currabrev'], - $myrow['currency'], - $myrow['country'], - $myrow['hundredsname'], - $myrow['decimalplaces'], - 1, - _('Functional Currency'), - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['currabrev'], - _('Edit'), - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['currabrev'], - _('Delete'), - $rootpath, - 'CurrencyToShow=' . $myrow['currabrev']); + echo '<td><img src="' . $ImageFile . '" /></td> + <td>' . $myrow['currabrev'] . '</td> + <td>' . $myrow['currency'] . '</td> + <td>' . $myrow['country'] . '</td> + <td>' . $myrow['hundredsname'] . '</td> + <td class="number">' . $myrow['decimalplaces'] . '</td> + <td class="number">1</td> + <td colspan="2">' . _('Functional Currency') . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedCurrency=' . $myrow['currabrev'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?ExchangeRateTrend.php?' . $myrow['currabrev'], _('Graph')) . '</td> + </tr>'; } } //END WHILE LIST LOOP @@ -298,7 +266,7 @@ if (isset($SelectedCurrency)) { - echo '<div class="centre"><a href="' .htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'._('Show all currency definitions').'</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Show all currency definitions')) . '</div>'; } echo '<br />'; Modified: trunk/CustEDISetup.php =================================================================== --- trunk/CustEDISetup.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/CustEDISetup.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -6,7 +6,7 @@ $title = _('Customer EDI Set Up'); include('includes/header.inc'); -echo '<a href="' . $rootpath . '/SelectCustomer.php">' . _('Back to Customers') . '</a><br />'; +echo InternalLink($rootpath, 'SelectCustomer.php', _('Back to Customers')) . '<br />'; if (isset($Errors)) { unset($Errors); @@ -106,7 +106,7 @@ echo '<option selected="True" value="1">'._('Enabled') . '</option>'; } -echo '</select><a href="'.$rootpath.'/EDIMessageFormat.php?MessageType=INVOIC&PartnerCode=' . $_SESSION['CustomerID'] . '">'._('Create') . '/' . _('Edit Invoice Message Format').'</a></td></tr>'; +echo '</select>' . InternalLink($rootpath, 'EDIMessageFormat.php?MessageType=INVOIC&PartnerCode=' . $_SESSION['CustomerID'], _('Create') . '/' . _('Edit Invoice Message Format')) . '</td></tr>'; echo '<tr><td>'._('Enable Receiving of EDI Orders').':</td> <td><select tabindex="2" name="EDIOrders">'; Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/CustLoginSetup.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -19,7 +19,7 @@ _('Petty Cash'), _('Setup')); -echo '<a href="' . $rootpath . '/SelectCustomer.php">' . _('Back to Customers') . '</a><br />'; +echo InternalLink($rootpath, 'SelectCustomer.php', _('Back to Customers')) . '<br />'; $sql="SELECT name FROM debtorsmaster @@ -275,35 +275,20 @@ /*The SecurityHeadings array is defined in config.php */ - printf('<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>%s</td> - <td><a href="%sSelectedUser=%s">' . _('Edit') . '</a></td> - <td><a href="%sSelectedUser=%s&delete=1">' . _('Delete') . '</a></td> - </tr>', - $myrow[0], - $myrow[1], - $myrow[2], - $myrow[3], - $myrow[4], - $myrow[5], - $LastVisitDate, - $SecurityRoles[($myrow[7])], - $myrow[8], - $myrow[9], - $myrow[10], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow[0], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow[0]); + echo '<td>' . $myrow[0] . '</td> + <td>' . $myrow[1] . '</td> + <td>' . $myrow[2] . '</td> + <td>' . $myrow[3] . '</td> + <td>' . $myrow[4] . '</td> + <td>' . $myrow[5] . '</td> + <td>' . $LastVisitDate . '</td> + <td>' . $SecurityRoles[($myrow[7])] . '</td> + <td>' . $myrow[8] . '</td> + <td>' . $myrow[9] . '</td> + <td>' . $myrow[10] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedUser=' . $myrow[0], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedUser=' . $myrow[0] . '&delete=1', _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP echo '</table><br />'; @@ -311,7 +296,7 @@ if (isset($SelectedUser)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'">' . _('Review Existing Users') . '</a></div><br />'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Review Existing Users')) . '</div><br />'; } echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; Modified: trunk/CustomerAllocations.php =================================================================== --- trunk/CustomerAllocations.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/CustomerAllocations.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -489,7 +489,7 @@ <td>' . ConvertSQLDate($myrow['trandate']) . '</td> <td class="number">' . locale_money_format($myrow['total'],$myrow['currcode']) . '</td> <td class="number">' . locale_money_format($myrow['total']-$myrow['alloc'],$myrow['currcode']) . '</td>'; - echo '<td><a href=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'). '?AllocTrans=' . $myrow['id'] . '>' . _('Allocate') . '</a></td></tr>'; + echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'). '?AllocTrans=' . $myrow['id'], _('Allocate')) . '</td></tr>'; } DB_free_result($result); echo '</table><br />'; @@ -529,7 +529,7 @@ $k=0; while ($myrow = DB_fetch_array($result)) { - $allocate = '<a href=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'). '?AllocTrans=' . $myrow['id'] . '>' . _('Allocate') . '</a>'; + $allocate = InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'). '?AllocTrans=' . $myrow['id'], _('Allocate')); if ( $curDebtor != $myrow['debtorno'] ) { if ( $curTrans > 1 ) { Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/CustomerBranches.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -31,9 +31,6 @@ $SelectedBranch = mb_strtoupper($_POST['SelectedBranch']); } -// This link is already available on the menu on this page -//echo "<a href='" . $rootpath . '/SelectCustomer.php'>" . _('Back to Customers') . '</a><br />'; - if (isset($Errors)) { unset($Errors); } @@ -238,7 +235,7 @@ )"; } echo '<br />'; - $msg = _('Customer branch').' <b>' . $_POST['BranchCode'] . ': ' . $_POST['BrName'] . ' </b>'._('has been added, add another branch, or return to') . '<a href="index.php">'._('Main Menu') . '</a>'; + $msg = _('Customer branch').' <b>' . $_POST['BranchCode'] . ': ' . $_POST['BrName'] . ' </b>'._('has been added, add another branch, or return to') . InternalLink('', 'index.php', _('Main Menu')); //run the SQL from either of the above possibilites @@ -396,39 +393,23 @@ } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="Mailto:%s">%s</a></td> - <td>%s</td> - <td>%s</td> - <td><a href="%s?DebtorNo=%s&SelectedBranch=%s">%s</td> - <td><a href="%s?DebtorNo=%s&SelectedBranch=%s&delete=yes" onclick=\'return confirm("' . _('Are you sure you wish to delete this branch?') . '");\'>%s</td></tr>', - $myrow[10], - $myrow[2], - $myrow[5], - $myrow[3], - $myrow[4], - $myrow[6], - $myrow[7], - $myrow[8], - $myrow[8], - $myrow[9], - ($myrow[11]?_('No'):_('Yes')), - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), - $DebtorNo, - urlencode($myrow[1]), - _('Edit'), - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), - $DebtorNo, - urlencode($myrow[1]), - _('Delete Branch')); - if ($myrow[11]){ $TotalDisable++; } - else { $TotalEnable++; } + echo '<td>' . $myrow[10] . '</td> + <td>' . $myrow[2] . '</td> + <td>' . $myrow[5] . '</td> + <td>' . $myrow[3] . '</td> + <td>' . $myrow[4] . '</td> + <td>' . $myrow[6] . '</td> + <td>' . $myrow[7] . '</td> + <td>' . $myrow[8] . '</td> + <td>' . $myrow[9] . '</td> + <td>' . ($myrow[11]?_('No'):_('Yes')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorNo=' . $DebtorNo . '&SelectedBranch=' . urlencode($myrow[1]), _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorNo=' . $DebtorNo . '&SelectedBranch=' . urlencode($myrow[1]) . '&delete=yes', _('Delete Branch')) . '</td></tr>'; + if ($myrow[11]){ + $TotalDisable++; + } else { + $TotalEnable++; + } } while ($myrow = DB_fetch_row($result)); //END WHILE LIST LOOP @@ -539,7 +520,7 @@ echo '<p Class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Change Details for Branch'). ' '. $SelectedBranch . '</p>'; if (isset($SelectedBranch)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorNo=' . $DebtorNo. '">' . _('Show all branches defined for'). ' '. $DebtorNo . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorNo=' . $DebtorNo, _('Show all branches defined for'). ' '. $DebtorNo) . '</div>'; } echo '<br /><table class="selection">'; echo '<tr><th colspan="2"><div class="centre"><b>'._('Change Branch').'</b></th></tr>'; @@ -589,7 +570,7 @@ if (DB_num_rows($result)==0){ echo '</table>'; prnMsg(_('There are no sales people defined as yet') . ' - ' . _('customer branches must be allocated to a sales person') . '. ' . _('Please use the link below to define at least one sales person'),'error'); - echo '<p align="center"><a href="' . $rootpath . '/SalesPeople.php?">'._('Define Sales People') . '</a></p>'; + echo '<p align="center">' . InternalLink($rootpath, 'SalesPeople.php', _('Define Sales People')) . '</p>'; include('includes/footer.inc'); exit; } @@ -651,7 +632,7 @@ if (DB_num_rows($result)==0){ echo '</table>'; prnMsg(_('There are no areas defined as yet') . ' - ' . _('customer branches must be allocated to an area') . '. ' . _('Please use the link below to define at least one sales area'),'error'); - echo '<br /><a href="'.$rootpath.'/Areas.php?">'._('Define Sales Areas').'</a>'; + echo '<br />' . InternalLink($rootpath, 'Areas.php', _('Define Sales Areas')); include('includes/footer.inc'); exit; } @@ -676,7 +657,7 @@ if (DB_num_rows($result)==0){ echo '</table>'; prnMsg(_('There are no stock locations defined as yet') . ' - ' . _('customer branches must refer to a default location where stock is normally drawn from') . '. ' . _('Please use the link below to define at least one stock location'),'error'); - echo '<br /><a href="'.$rootpath.'/Locations.php?">'._('Define Stock Locations').'</a>'; + echo '<br />' . InternalLink($rootpath, 'Locations.php', _('Define Stock Locations')); include('includes/footer.inc'); exit; } @@ -726,7 +707,7 @@ echo '<td><input tabindex="17" type="text" name="FaxNo" size="22" maxlength="20" value="'. $_POST['FaxNo'].'" /></td></tr>'; if (!isset($_POST['Email'])) {$_POST['Email']='';} - echo '<tr><td>'.(($_POST['Email']) ? '<a href="Mailto:'.$_POST['Email'].'">'._('Email').':</a>' : _('Email').':').'</td>'; + echo '<tr><td>'.(($_POST['Email']) ? _('Email') : _('Email').':').'</td>'; //only display email link if there is an email address echo '<td><input tabindex="18" type="text" name="Email" size="56" maxlength="55" value="'. $_POST['Email'].'" /></td></tr>'; Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/CustomerReceipt.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -231,8 +231,7 @@ $k=0; //Table row counter for row styles $CustomerReceiptCounter=1; //Count lines of customer receipts in this batch - echo '<br /><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Allocate') . '" alt="" />' . - ' ' . _('Summary of Receipt Batch').'</p><br />'; + echo '<br /><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Allocate') . '" alt="" />' . ' ' . _('Summary of Receipt Batch').'</p><br />'; echo '<table class="selection"><tr><th>'._('Batch Number').'</th> <th>'._('Date Banked').'</th> @@ -261,7 +260,7 @@ <td class="number">'.locale_money_format($ReceiptItem->Amount/$_SESSION['ReceiptBatch']->ExRate/$_SESSION['ReceiptBatch']->FunctionalExRate,$_SESSION['ReceiptBatch']->Currency) .'</td>'; if ($ReceiptItem->GLCode ==''){ - echo '<td><a target="_blank" href="' . $rootpath . '/PDFReceipt.php?BatchNumber=' . $_SESSION['ReceiptBatch']->BatchNo. '&ReceiptNumber='.$CustomerReceiptCounter.'">'._('Print a Customer Receipt').'</a></td></tr>'; + echo '<td>' . InternalLink($rootpath, 'PDFReceipt.php?BatchNumber=' . $_SESSION['ReceiptBatch']->BatchNo. '&ReceiptNumber='.$CustomerReceiptCounter, _('Print a Customer Receipt')) . '</td></tr>'; $CustomerReceiptCounter += 1; } @@ -532,10 +531,10 @@ prnMsg( _('Receipt batch') . ' ' . $_SESSION['ReceiptBatch']->BatchNo . ' ' . _('has been successfully entered into the database'),'success'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . - '<a href="' . $rootpath . '/PDFBankingSummary.php?BatchNo=' . $_SESSION['ReceiptBatch']->BatchNo . '">' . _('Print PDF Batch Summary') . '</a></p>'; + InternalLink($rootpath, 'PDFBankingSummary.php?BatchNo=' . $_SESSION['ReceiptBatch']->BatchNo, _('Print PDF Batch Summary')) . '</p>'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/allocation.png" title="' . _('Allocate') . '" alt="" />' . ' ' . - '<a href="' . $rootpath . '/CustomerAllocations.php">' . _('Allocate Receipts') . '</a></p>'; - echo '<p class="page_title_text">•<a href="' . $rootpath . '/CustomerReceipt.php?NewReceipt=Yes&Type=Customer">' . _('Enter Receipts') . '</a></p>'; + InternalLink($rootpath, 'CustomerAllocations.php', _('Allocate Receipts')) . '</p>'; + echo '<p class="page_title_text">•' . InternalLink($rootpath, 'CustomerReceipt.php?NewReceipt=Yes&Type=Customer', _('Enter Receipts')) . '</p>'; unset($_SESSION['ReceiptBatch']); include('includes/footer.inc'); exit; @@ -748,7 +747,7 @@ if (DB_num_rows($AccountsResults)==0){ echo '</select></td></tr></table><br />'; - prnMsg(_('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'),'info'); + prnMsg(_('Bank Accounts have not yet been defined') . '. ' . _('You must first') . ' ' . InternalLink($rootpath, 'BankAccounts.php', _('define the bank accounts')) . _('and general ledger accounts to be affected'),'info'); include('includes/footer.inc'); exit; } else { @@ -1051,7 +1050,7 @@ <td class="number" width="10%">' . locale_money_format($ReceiptItem->Amount, $_SESSION['ReceiptBatch']->Currency) . '</td> <td class="number" width="10%">' . locale_money_format($ReceiptItem->Discount,$_SESSION['ReceiptBatch']->Currency) . '</td> <td class="number" width="10%">' . $ReceiptItem->tag . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $ReceiptItem->ID . '&Type='.$_GET['Type'].'">' . _('Delete') . '</a></td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $ReceiptItem->ID . '&Type='.$_GET['Type'], _('Delete')) . '</td> </tr>'; $BatchTotal= $BatchTotal + $ReceiptItem->Amount; } Modified: trunk/CustomerTransInquiry.php =================================================================== --- trunk/CustomerTransInquiry.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/CustomerTransInquiry.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -106,68 +106,49 @@ $k++; } - $format_base = '<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td width="200">%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td>%s</td>'; + $format_base = ''; if ($_POST['TransType']==10){ /* invoices */ - printf($format_base.' - <td><a target="_blank" href="%s/PrintCustTrans.php?FromTransNo=%s&InvOrCredit=Invoice"><img src="%s" title="' . _('Click to preview the invoice') . '" /></a></td> - </tr>', - $myrow['typename'], - $myrow['transno'], - ConvertSQLDate($myrow['trandate']), - $myrow['debtorno'], - $myrow['branchcode'], - $myrow['reference'], - $myrow['invtext'], - $myrow['order_'], - locale_number_format($myrow['rate'],4), - locale_money_format($myrow['totalamt'],$myrow['currcode']), - $myrow['currcode'], - $rootpath, - $myrow['transno'], - $rootpath.'/css/'.$theme.'/images/preview.gif'); + echo '<td>' . $myrow['typename'] . '</td> + <td>' . $myrow['transno'] . '</td> + <td>' . ConvertSQLDate($myrow['trandate']) . '</td> + <td>' . $myrow['debtorno'] . '</td> + <td>' . $myrow['branchcode'] . '</td> + <td>' . $myrow['reference'] . '</td> + <td width="200">' . $myrow['invtext'] , '</td> + <td>' . $myrow['order_'] . '</td> + <td class="number">' . locale_number_format($myrow['rate'],4) . '</td> + <td class="number">' . locale_money_format($myrow['totalamt'],$myrow['currcode']) . '</td> + <td>' . $myrow['currcode'] . '</td> + <td>' . InternalLink($rootpath, 'PrintCustTrans.php?FromTransNo=' . $myrow['transno'] . '&InvOrCredit=Invoice"', '<img src="' . $rootpath.'/css/'.$theme.'/images/preview.gif' . '" title="' . _('Click to preview the invoice') . '" />') . '</td> + </tr>'; } elseif ($_POST['TransType']==11){ /* credit notes */ - printf($format_base.' - <td><a target="_blank" href="%s/PrintCustTrans.php?FromTransNo=%s&InvOrCredit=Credit"><img src="%s" title="' . _('Click to preview the credit') . '" /></a></td> - </tr>', - $myrow['typename'], - $myrow['transno'], - ConvertSQLDate($myrow['trandate']), - $myrow['debtorno'], - $myrow['branchcode'], - $myrow['reference'], - $myrow['invtext'], - $myrow['order_'], - locale_number_format($myrow['rate'],4), - locale_money_format($myrow['totalamt'],$myrow['currcode']), - $myrow['currcode'], - $rootpath, - $myrow['transno'], - $rootpath.'/css/'.$theme.'/images/preview.gif'); + echo '<td>' . $myrow['typename'] . '</td> + <td>' . $myrow['transno'] . '</td> + <td>' . ConvertSQLDate($myrow['trandate']) . '</td> + <td>' . $myrow['debtorno'] . '</td> + <td>' . $myrow['branchcode'] . '</td> + <td>' . $myrow['reference'] . '</td> + <td width="200">' . $myrow['invtext'] . '</td> + <td>' . $myrow['order_'] . '</td> + <td class="number">' . locale_number_format($myrow['rate'],4) . '</td> + <td class="number">' . locale_money_format($myrow['totalamt'],$myrow['currcode']) . '</td> + <td>' . $myrow['currcode'] . '</td> + <td>' . InternalLink($rootpath, 'PrintCustTrans.php?FromTransNo=' . $myrow['transno'] . '&InvOrCredit=Credit">', '<img src="' . $rootpath.'/css/'.$theme.'/images/preview.gif') . '" title="' . _('Click to preview the credit') . '" />') . '</td> + </tr>'; } else { /* otherwise */ - printf($format_base . '</tr>', - $myrow['typename'], - $myrow['transno'], - ConvertSQLDate($myrow['trandate']), - $myrow['debtorno'], - $myrow['branchcode'], - $myrow['reference'], - $myrow['invtext'], - $myrow['order_'], - locale_number_format($myrow['rate'],4), - locale_money_format($myrow['totalamt'],$myrow['currcode']), - $myrow['currcode']); + echo '<td>' . $myrow['typename'] . '</td> + <td>' . $myrow['transno'] . '</td> + <td>' . ConvertSQLDate($myrow['trandate']) . '</td> + <td>' . $myrow['debtorno'] . '</td> + <td>' . $myrow['branchcode'] . '</td> + <td>' . $myrow['reference'] . '</td> + <td width="200">' . $myrow['invtext'] . '</td> + <td>' . $myrow['order_'] . '</td> + <td class="number">' . locale_number_format($myrow['rate'],4) . '</td> + <td class="number">' . locale_money_format($myrow['totalamt'],$myrow['currcode']) . '</td> + <td>' . $myrow['currcode'] . '</td></tr>'; } } Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/Customers.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -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') . ') ' . - '<a href="' . $rootpath . '/CustomerBranches.php?DebtorNo=' . $_POST['DebtorNo'] . '"></a></div>'; + InternalLink($rootpath, 'CustomerBranches.php?DebtorNo=' . $_POST['DebtorNo'], $_POST['DebtorNo']) '</div>'; include('includes/footer.inc'); exit; @@ -418,7 +418,7 @@ $myrow=DB_fetch_row($result); if ($myrow[0]==0) { prnMsg( _('In order to create a new customer you must first set up at least one sales type/price list').'<br />'. - _('Click').' '.'<a target="_blank" href="' . $rootpath . '/SalesTypes.php">' . _('here').' ' . '</a>'._('to set up your price lists'),'warning').'<br />'; + _('Click').' '. InternalLink($rootpath, 'SalesTypes.php', _('here')).' ' . '</a>'._('to set up your price lists'),'warning').'<br />'; $SetupErrors += 1; } $sql="SELECT COUNT(typeid) @@ -427,12 +427,12 @@ $myrow=DB_fetch_row($result); if ($myrow[0]==0) { prnMsg( _('In order to create a new customer you must first set up at least one customer type').'<br />'. - _('Click').' '.'<a target="_blank" href="' . $rootpath . '/CustomerTypes.php">' . _('here').' ' . '</a>'._('to set up your customer types'),'warning'); + _('Click').' '. InternalLink($rootpath, 'CustomerTypes.php', _('here')) . _('to set up your customer types'),'warning'); $SetupErrors += 1; } if ($SetupErrors>0) { - echo '<br /><div class="centre"><a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'" >'._('Click here to continue').'</a></div>'; + echo '<br /><div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Click here to continue')) . '</div>'; include('includes/footer.inc'); exit; } @@ -487,7 +487,7 @@ $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 InternalLink('', 'SalesTypes.php?', _('Setup Types')); echo '<tr><td colspan="2">' . prnMsg(_('No sales types/price lists defined'),'error') . '</td></tr>'; } else { echo '<tr><td>' . _('Sales Type/Price List') . ':</td> @@ -504,7 +504,7 @@ $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 InternalLink('', 'SalesTypes.php', _('Setup Types')); echo '<tr><td colspan="2">' . prnMsg(_('No Customer types/price lists defined'),'error') . '</td></tr>'; } else { echo '<tr><td>' . _('Customer Type') . ':</td> @@ -943,35 +943,19 @@ } if (isset($_GET['Modify'])) { - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - </tr>', - $myrow['contactname'], - $myrow['role'], - $myrow['phoneno'], - $myrow['notes'], - $myrow['contid'], - $myrow['debtorno'], - $myrow['debtorno']); + echo '<td>' . $myrow['contactname'] . '</td> + <td>' . $myrow['role'] . '</td> + <td>' . $myrow['phoneno'] . '</td> + <td>' . $myrow['notes'] . '</td> + </tr>'; } else { - printf('<td>%s</td> - <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> - </tr>', - $myrow['contactname'], - $myrow['role'], - $myrow['phoneno'], - $myrow['notes'], - $myrow['contid'], - $myrow['debtorno'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['contid'], - $myrow['debtorno']); + echo '<td>' . $myrow['contactname'] . '</td> + <td>' . $myrow['role'] . '</td> + <td>' . $myrow['phoneno'] . '</td> + <td>' . $myrow['notes'] . '</td> + <td>' . InternalLink('', 'AddCustomerContacts.php?Id=' . $myrow['contid'] . '&DebtorNo=' . $myrow['debtorno'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?ID=' . $myrow['contid'] . '&DebtorNo=' . $myrow['debtorno'] . '&delete=1', _('Delete')) . '</td> + </tr>'; } }//END WHILE LIST LOOP echo '</table>'; Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/DailyBankTransactions.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -31,7 +31,7 @@ if (DB_num_rows($AccountsResults)==0){ echo '</select></td></tr></table>'; - prnMsg( _('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'),'warn'); + prnMsg( _('Bank Accounts have not yet been defined. You must first') . InternalLink($rootpath, 'BankAccounts.php', _('define the bank accounts')) . _('and general ledger accounts to be affected'),'warn'); include('includes/footer.inc'); exit; } else { Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/DebtorsAtPeriodEnd.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -58,7 +58,7 @@ $title = _('Customer Balances') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg(_('The customer details 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; } @@ -70,7 +70,7 @@ $title = _('Customer Balances') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg(_('The customer details listing has no clients to report on'),'warn'); - echo '<br /><a href="'.$rootpath.'/index.php">' . _('Back to the menu') . '</a>'; + echo InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/DeliveryDetails.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -243,7 +243,7 @@ $BestShipper = $ShipperReturned[0]; } else { prnMsg(_('We have a problem') . ' - ' . _('there are no shippers defined'). '. ' . _('Please use the link below to set up shipping or 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')); } } if (isset($_SESSION['Items'.$identifier]->ShipVia) AND $_SESSION['Items'.$identifier]->ShipVia!=''){ @@ -258,7 +258,8 @@ if(isset($_POST['MakeRecurringOrder']) AND ! $InputErrors){ echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/RecurringSalesOrders.php?identifier='.$identifier . '&NewRecurringOrder=Yes">'; - prnMsg(_('You should automatically be forwarded to the entry of recurring order details page') . '. ' . _('If this does not happen') . '(' . _('if the browser does not support META Refresh') . ') ' ."<a href='" . $rootpath . '/RecurringOrders.php?identifier='.$identifier . "&NewRecurringOrder=Yes'>". _('click here') .'</a> '. _('to continue'),'info'); + prnMsg(_('You should automatically be forwarded to the entry of recurring order details page') . '. ' . _('If this does not happen') . '(' . _('if the browser does not support META Refresh') . ') ' . + InternalLink($rootpath, 'RecurringOrders.php?identifier='.$identifier . '&NewRecurringOrder=Yes', _('click here')) . _('to continue'),'info'); include('includes/footer.inc'); exit; } @@ -267,7 +268,8 @@ if (isset($_POST['BackToLineDetails'])){ echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/SelectOrderItems.php?identifier='.$identifier . '">'; - prnMsg(_('You should automatically be forwarded to the entry of the order line details page') . '. ' . _('If this does not happen') . '(' . _('if the browser does not support META Refresh') . ') ' ."<a href='" . $rootpath . '/SelectOrderItems.php?identifier='.$identifier . "'>". _('click here') .'</a> '. _('to continue'),'info'); + prnMsg(_('You should automatically be forwarded to the entry of the order line details page') . '. ' . _('If this does not happen') . '(' . _('if the browser does not support META Refresh') . ') ' . + InternalLink($rootpath, 'SelectOrderItems.php?identifier='.$identifier, _('click here')) . _('to continue'),'info'); include('includes/footer.inc'); exit; @@ -599,21 +601,21 @@ echo '<br /><table class="selection"> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" /></td> - <td>' . ' ' . '<a target="_blank" href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $OrderNo . '">'. _('Print packing slip') . ' (' . _('Preprinted stationery') . ')' .'</a></td> + <td>' . ' ' . InternalLink($rootpath, 'PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $OrderNo, _('Print packing slip') . ' (' . _('Preprinted stationery') . ')') . '</td> </tr>'; echo '<tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" /></td> - <td>' . ' ' . '<a target="_blank" href="' . $rootpath . '/PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $OrderNo . '">'. _('Print packing slip') . ' (' . _('Laser') . ')' .'</a></td> + <td>' . ' ' . InternalLink($rootpath, 'PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $OrderNo, _('Print packing slip') . ' (' . _('Laser') . ')') .'</td> </tr>'; echo '<tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt="" /></td> - <td>' . ' ' . '<a href="' . $rootpath . '/ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $OrderNo .'">'. _('Confirm Dispatch and Produce Invoice') .'</a></td> + <td>' . ' ' . InternalLink($rootpath, 'ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $OrderNo, _('Confirm Dispatch and Produce Invoice')) . '</td> </tr>'; //Add option to Print Sales Orders or Proforma invoice echo '<tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/pdf.png" title="' . _('Sales Order') . '" alt="" /></td> - <td>' . ' ' . '<a href="' . $rootpath . '/PrintSalesOrder_generic.php?identifier='.$identifier . '&TransNo=' . $OrderNo .'">'. _('Print Sales Order / Pro-forma Invoice') .'</a></td> + <td>' . ' ' . InternalLink($rootpath, 'PrintSalesOrder_generic.php?identifier='.$identifier . '&TransNo=' . $OrderNo, _('Print Sales Order / Pro-forma Invoice')) .'</td> </tr>'; echo '</table>'; @@ -622,20 +624,20 @@ echo '<br /><table class="selection"> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt="" /></td> - <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotation.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Landscape)') .'</a></td> + <td>' . ' ' . InternalLink($rootpath, 'PDFQuotation.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo, _('Print Quotation (Landscape)')) . '</td> </tr> </table>'; echo '<br /><table class="selection"> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt="" /></td> - <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotationPortrait.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Portrait)') .'</a></td> + <td>' . ' ' . InternalLink($rootpath, 'PDFQuotationPortrait.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo, _('Print Quotation (Portrait)')) .'</td> </tr> </table>'; } echo '<br /><table class="selection"> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt="" /></td> - <td>' . ' ' . '<a href="'. $rootpath .'/SelectOrderItems.php?identifier='.$identifier . '&NewOrder=Yes">'. _('Add Another Sales Order') .'</a></td> + <td>' . ' ' . InternalLink($rootpath, 'SelectOrderItems.php?identifier='.$identifier . '&NewOrder=Yes', _('Add Another Sales Order')) .'</td> </tr> </table>'; } else { @@ -817,13 +819,13 @@ echo '<br /><table class="selection"> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt=""></td> - <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotation.php?identifier='.$identifier . '&QuotationNo=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Print Quotation (Landscape)') .'</a></td> + <td>' . ' ' . InternalLink($rootpath, 'PDFQuotation.php?identifier='.$identifier . '&QuotationNo=' . $_SESSION['ExistingOrder'.$identifier], _('Print Quotation (Landscape)')) .'</td> </tr> </table>'; echo '<br /><table class="selection"> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt="" /></td> - <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotationPortrait.php?identifier='.$identifier . '&QuotationNo=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Print Quotation (Portrait)') .'</a></td> + <td>' . ' ' . InternalLink($rootpath, 'PDFQuotationPortrait.php?identifier='.$identifier . '&QuotationNo=' . $_SESSION['ExistingOrder'.$identifier], _('Print Quotation (Portrait)')) .'</td> </tr> </table>'; }else{ @@ -834,19 +836,19 @@ <table class="selection"> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" /></td> - <td><a target="_blank" href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Print packing slip - pre-printed stationery') .'</a></td> + <td>' . InternalLink($rootpath, 'PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'.$identifier], _('Print packing slip - pre-printed stationery')) .'</td> </tr>'; echo '<tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" /></td> - <td><a target="_blank" href="' . $rootpath . '/PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Print packing slip') . ' (' . _('Laser') . ')' .'</a></td> + <td>' . InternalLink($rootpath, 'PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'.$identifier], _('Print packing slip') . ' (' . _('Laser') . ')') .'</td> </tr>'; echo '<tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt="" /></td> - <td><a href="' . $rootpath .'/ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Confirm Order Delivery Quantities and Produce Invoice') .'</a></td> + <td>' . InternalLink($rootpath, 'ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $_SESSION['ExistingOrder'.$identifier], _('Confirm Order Delivery Quantities and Produce Invoice')) . '</td> </tr>'; echo '<tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt="" /></td> - <td><a href="' . $rootpath .'/SelectSalesOrder.php?identifier='.$identifier . '">'. _('Select A Different Order') .'</a></td> + <td>' . InternalLink($rootpath, 'SelectSalesOrder.php?identifier='.$identifier, _('Select A Different Order')) .'</td> </tr> </table>'; }//end of print orders Modified: trunk/Departments.php =================================================================== --- trunk/Departments.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/Departments.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -188,8 +188,8 @@ echo '<td>' . $myrow['description'] . '</td>'; echo '<td>' . $myrow['authoriser'] . '</td>'; - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedDepartmentID=' . $myrow['departmentid'] . '">' . _('Edit') . '</a></td>'; - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedDepartmentID=' . $myrow['departmentid'] . '&delete=1">' . _('Delete') .'</a></td>'; + echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedDepartmentID=' . $myrow['departmentid'], _('Edit')) . '</td>'; + echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedDepartmentID=' . $myrow['departmentid'] . '&delete=1', _('Delete')) .'</td>'; echo '</tr>'; } //END WHILE LIST LOOP @@ -198,7 +198,7 @@ if (isset($SelectedDepartmentID)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('View all Departments') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('View all Departments')) . '</div>'; } echo '<br />'; Modified: trunk/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/DiscountCategories.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -213,14 +213,10 @@ } $DeleteURL = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=yes&StockID=' . $myrow['stockid'] . '&DiscountCategory=' . $myrow['discountcategory']; - printf('<td>%s</td> - <td>%s - %s</td> - <td><a href="%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this discount category?') . '\');">'. _('Delete') .'</td> - </tr>', - $myrow['discountcategory'], - $myrow['stockid'], - $myrow['description'], - $DeleteURL); + echo '<td>' . $myrow['discountcategory'] . '</td> + <td>' . $myrow['stockid'] . ' - ' . $myrow['description'] . '</td> + <td>' . InternalLink('', $DeleteURL, _('Delete')) .'</td> + </tr>'; } Modified: trunk/DiscountMatrix.php =================================================================== --- trunk/DiscountMatrix.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/DiscountMatrix.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -174,17 +174,12 @@ } $DeleteURL = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=yes&SalesType=' . $myrow['salestype'] . '&DiscountCategory=' . $myrow['discountcategory'] . '&QuantityBreak=' . $myrow['quantitybreak']; - printf('<td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td><a href="%s">' . _('Delete') . '</td> - </tr>', - $myrow['sales_type'], - $myrow['discountcategory'], - $myrow['quantitybreak'], - $myrow['discountrate']*100 , - $DeleteURL); + echo '<td>' . $myrow['sales_type'] . '</td> + <td>' . $myrow['discountcategory'] . '</td> + <td class="number">' . $myrow['quantitybreak'] . '</td> + <td class="number">' . $myrow['discountrate']*100 . '</td> + <td>' . InternalLink('', $DeleteURL, _('Delete')) . '</td> + </tr>'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <tim...@us...> - 2012-08-28 02:48:52
|
Revision: 9574 http://weberp.svn.sourceforge.net/weberp/?rev=9574&view=rev Author: tim_schofield Date: 2012-08-28 02:48:46 +0000 (Tue, 28 Aug 2012) Log Message: ----------- Replace <a tags with new InternalLink() function Modified Paths: -------------- trunk/AgedDebtors.php trunk/AgedSuppliers.php trunk/Areas.php trunk/BackupDatabase.php Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2012-08-27 22:22:14 UTC (rev 9573) +++ trunk/AgedDebtors.php 2012-08-28 02:48:46 UTC (rev 9574) @@ -363,7 +363,7 @@ $title = _('Aged Customer Account Analysis') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg(_('The details of outstanding transactions for customer') . ' - ' . $AgedAnalysis['debtorno'] . ' ' . _('could not be retrieved 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 />' . _('The SQL that failed was') . '<br />' . $sql; } @@ -428,7 +428,7 @@ $title = _('Aged Customer Account Analysis') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg(_('There are no customers with balances meeting the criteria specified to list'),'info'); - 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 { Modified: trunk/AgedSuppliers.php =================================================================== --- trunk/AgedSuppliers.php 2012-08-27 22:22:14 UTC (rev 9573) +++ trunk/AgedSuppliers.php 2012-08-28 02:48:46 UTC (rev 9574) @@ -108,7 +108,7 @@ $title = _('Aged Supplier Account Analysis') . ' - ' . _('Problem Report') ; include('includes/header.inc'); prnMsg(_('The Supplier details 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; } @@ -192,7 +192,7 @@ $title = _('Aged Supplier Account Analysis - Problem Report'); include('includes/header.inc'); prnMsg(_('The details of outstanding transactions for Supplier') . ' - ' . $AgedAnalysis['supplierid'] . ' ' . _('could not be retrieved 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 />' . _('The SQL that failed was') . '<br />' . $sql; } Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2012-08-27 22:22:14 UTC (rev 9573) +++ trunk/Areas.php 2012-08-28 02:48:46 UTC (rev 9574) @@ -175,7 +175,7 @@ //end of ifs and buts! if (isset($SelectedArea)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Review Areas Defined') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Review Areas Defined')) . '</div>'; } Modified: trunk/BackupDatabase.php =================================================================== --- trunk/BackupDatabase.php 2012-08-27 22:22:14 UTC (rev 9573) +++ trunk/BackupDatabase.php 2012-08-28 02:48:46 UTC (rev 9574) @@ -37,7 +37,7 @@ exec($Command,$CommandOutput, $ReturnValue); if ($ReturnValue ==0) { - prnMsg(_('The backup file has now been created. You must now download this to your computer because in case the web-server has a disk failure the backup would then not on the same machine. Use the link below') . '<br /><br /><a href="' . $BackupFile . '">' . _('Download the backup file to your locale machine') . '</a>','success'); + prnMsg(_('The backup file has now been created. You must now download this to your computer because in case the web-server has a disk failure the backup would then not on the same machine. Use the link below') . '<br />' . InternalLink('', $BackupFile, _('Download the backup file to your locale machine')),'success'); prnMsg(_('Once you have downloaded the database backup file to your local machine you should use the link below to delete it - backup files can consume a lot of space on your hosting account and will accumulate if not deleted - they also contain sensitive information which would otherwise be available for others to download!'),'info'); echo '<br /> <br /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-28 09:06:12
|
Revision: 9575 http://weberp.svn.sourceforge.net/weberp/?rev=9575&view=rev Author: tim_schofield Date: 2012-08-28 09:06:05 +0000 (Tue, 28 Aug 2012) Log Message: ----------- Replace <a tags with new InternalLink() function Modified Paths: -------------- trunk/AddCustomerContacts.php trunk/AddCustomerNotes.php trunk/AddCustomerTypeNotes.php trunk/BOMs.php Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php 2012-08-28 02:48:46 UTC (rev 9574) +++ trunk/AddCustomerContacts.php 2012-08-28 09:06:05 UTC (rev 9575) @@ -146,7 +146,7 @@ echo '<td>'.$myrow['contactname'].'</td> <td>'.$myrow['role'].'</td> <td>'.$myrow['phoneno'].'</td> - <td><a href=mailto:'.$myrow['email'].'>'.$myrow['email'].'</a></td> + <td>'.$myrow['email'].'</td> <td>'.$myrow['notes'].'</td> <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Id='.$myrow['contid'].'&DebtorNo='.$myrow['debtorno'].'"', _('Edit')) .' </td> <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Id='.$myrow['contid'].'&DebtorNo='.$myrow['debtorno'].'&delete=1', _('Delete')). '</td></tr>'; Modified: trunk/AddCustomerNotes.php =================================================================== --- trunk/AddCustomerNotes.php 2012-08-28 02:48:46 UTC (rev 9574) +++ trunk/AddCustomerNotes.php 2012-08-28 09:06:05 UTC (rev 9575) @@ -132,7 +132,7 @@ } echo '<td>'.ConvertSQLDate($myrow['date']).'</td> <td>'.$myrow['note'].'</td> - <td><a href="'.$myrow['href'].'">'.$myrow['href'].'</a></td> + <td>'.$myrow['href'].'</td> <td>'.$myrow['priority'].'</td> <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Id='.$myrow['noteid'].'&DebtorNo='.$myrow['debtorno'], _('Edit')).' </td> <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Id='.$myrow['noteid'].'&DebtorNo='.$myrow['debtorno'].'&delete=1', _('Delete')). '</td></tr>'; Modified: trunk/AddCustomerTypeNotes.php =================================================================== --- trunk/AddCustomerTypeNotes.php 2012-08-28 02:48:46 UTC (rev 9574) +++ trunk/AddCustomerTypeNotes.php 2012-08-28 09:06:05 UTC (rev 9575) @@ -125,30 +125,19 @@ echo '<tr class="EvenTableRows">'; $k=1; } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%sId=%s&DebtorType=%s">'. _('Edit').' </td> - <td><a href="%sId=%s&DebtorType=%s&delete=1">'. _('Delete'). '</td></tr>', - $myrow['date'], - $myrow['note'], - $myrow['href'], - $myrow['priority'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['noteid'], - $myrow['typeid'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['noteid'], - $myrow['typeid']); - + echo '<td>' . $myrow['date'] . '</td> + <td>' . $myrow['note'] . '</td> + <td>' . $myrow['href'] . '</td> + <td>' . $myrow['priority'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Id=' . $myrow['noteid'] . '&DebtorType=' . $myrow['typeid'], _('Edit')) . ' </td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Id=' . $myrow['noteid'] . '&DebtorType=' . $myrow['typeid'] . '&delete=1', _('Delete')). '</td></tr>'; } //END WHILE LIST LOOP echo '</table>'; } if (isset($Id)) { echo '<div class="centre"> - <a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?DebtorType=' . $DebtorType . '">' . _('Review all notes for this Customer Type') .'</a> + ' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF']) . '?DebtorType=' . $DebtorType, _('Review all notes for this Customer Type')) .' </div>'; } Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2012-08-28 02:48:46 UTC (rev 9574) +++ trunk/BOMs.php 2012-08-28 09:06:05 UTC (rev 9575) @@ -112,11 +112,11 @@ $Level1 = str_repeat('- ',$Level-1).$Level; if( $myrow[7]=='B' OR $myrow[7]=='K' OR $myrow[7]=='D') { - $DrillText = '%s%s'; + $DrillText = $DrillLink.$DrillID; $DrillLink = '<div class="centre">'._('No lower levels').'</div>'; $DrillID=''; } else { - $DrillText = '<a href="%s&Select=%s">' . _('Drill Down'); + $DrillText = InternalLink('', $DrillLink . '&Select=' . $DrillID, _('Drill Down')); $DrillLink = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?'; $DrillID=$myrow[0]; } @@ -135,39 +135,20 @@ } else { $QuantityOnHand = number_format($myrow[10],$myrow[11]); } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td><a href="%sSelect=%s&SelectedComponent=%s">' . _('Edit') . '</a></td> + echo '<td>' . $Level1 . '</td> + <td>' . $myrow[0] . '</td> + <td>' . $myrow[1] . '</td> + <td>' . $myrow[2] . '</td> + <td>' . $myrow[3] . '</td> + <td class="number">' . $myrow[4] . '</td> + <td>' . ConvertSQLDate($myrow[5]) . '</td> + <td>' . ConvertSQLDate($myrow[6]) . '</td> + <td>' . $AutoIssue . '</td> + <td class="number">' . $QuantityOnHand . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select=' . $Parent . '&SelectedComponent=' . $myrow[0], _('Edit')) . '</td> <td>'.$DrillText.'</a></td> - <td><a href="%sSelect=%s&SelectedComponent=%s&delete=1&ReSelect=%s">' . _('Delete') . '</a></td> - </tr>', - $Level1, - $myrow[0], - $myrow[1], - $myrow[2], - $myrow[3], - $myrow[4], - ConvertSQLDate($myrow[5]), - ConvertSQLDate($myrow[6]), - $AutoIssue, - $QuantityOnHand, - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $Parent, - $myrow[0], - $DrillLink, - $DrillID, - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $Parent, - $myrow[0], - $UltimateParent); + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select=' . $Parent . '&SelectedComponent=' . $myrow[0] . '&delete=1&ReSelect=' . $UltimateParent, _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP } //end of function DisplayBOMItems This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-29 19:39:07
|
Revision: 9576 http://weberp.svn.sourceforge.net/weberp/?rev=9576&view=rev Author: tim_schofield Date: 2012-08-29 19:39:01 +0000 (Wed, 29 Aug 2012) Log Message: ----------- Improvements to table printing functions Modified Paths: -------------- trunk/PrintTable.php trunk/css/silverwolf/sub.css trunk/javascripts/FormFunctions.js Modified: trunk/PrintTable.php =================================================================== --- trunk/PrintTable.php 2012-08-28 09:06:05 UTC (rev 9575) +++ trunk/PrintTable.php 2012-08-29 19:39:01 UTC (rev 9576) @@ -37,16 +37,19 @@ $pdf->RoundRectangle($Left_Margin-5, $YPos-5, $Page_Width-$Left_Margin-$Right_Margin, ($line_height*1), 10); +$BottomOfTitle=$YPos-5-($line_height*3); + $ColumnNames=explode('</th>', $_POST['Columns']); $ColumnWidths=explode('px', $_POST['ColumnWidths']); +$ColumnAligns=explode('x', $_POST['ColumnAligns']); $TotalWidth=0; for ($i=0; $i<count($ColumnWidths); $i++) { $TotalWidth+=$ColumnWidths[$i]; } -for ($i=0; $i<count($ColumnWidths); $i++) { - $LeftOvers = $pdf->addTextWrap($XPos,$YPos-$line_height,$Page_Width-$Left_Margin,$FontSize, strip_tags($ColumnNames[$i]), 'centre'); +for ($i=0; $i<count($ColumnWidths)-1; $i++) { + $LeftOvers = $pdf->addTextWrap($XPos,$YPos-$line_height,$ColumnWidths[$i],$FontSize, strip_tags($ColumnNames[$i]), $ColumnAligns[$i]); $XPos+=($Page_Width-$Left_Margin-$Right_Margin)*($ColumnWidths[$i]/$TotalWidth); } @@ -62,12 +65,19 @@ $ColumnValues=explode('</td>', $Row[$row]); $XPos=$Left_Margin; $YPos-=$line_height; - for ($i=0; $i<count($ColumnWidths); $i++) { - $LeftOvers = $pdf->addTextWrap($XPos,$YPos-$line_height,$Page_Width-$Left_Margin,$FontSize, strip_tags($ColumnValues[$i]), 'centre'); + for ($i=0; $i<count($ColumnWidths)-1; $i++) { + if ($ColumnAligns[$i]=='right') { + $Align='right'; + } else { + $Align='left'; + } + $LeftOvers = $pdf->addTextWrap($XPos,$YPos-$line_height,$ColumnWidths[$i],$FontSize, strip_tags($ColumnValues[$i]), $Align, 0); $XPos+=($Page_Width-$Left_Margin-$Right_Margin)*($ColumnWidths[$i]/$TotalWidth); } } +$pdf->RoundRectangle($Left_Margin-5, $BottomOfTitle, $Page_Width-$Left_Margin-$Right_Margin, $BottomOfTitle-$YPos+$line_height, 10); + $pdf->OutputF($_SESSION['DatabaseName'] . '_TablePrint_' . date('Y-m-d_h-m-s') . '.pdf'); $pdf->__destruct(); Modified: trunk/css/silverwolf/sub.css =================================================================== --- trunk/css/silverwolf/sub.css 2012-08-28 09:06:05 UTC (rev 9575) +++ trunk/css/silverwolf/sub.css 2012-08-29 19:39:01 UTC (rev 9576) @@ -708,10 +708,11 @@ font-family: Calibri, Tahoma, Geneva, sans-serif; position: absolute; left: 1em; top: 2em; z-index: 99; margin-left: 0; width: 250px; + text-shadow: 0px 0px #324D5D; + text-align: left; + font-size: 12px; } .tooltip:hover img { - border: 0; margin: -10px 0 0 -55px; - float: left; position: absolute; } .tooltip:hover em { font-family: Candara, Tahoma, Geneva, sans-serif; font-size: 1.2em; font-weight: bold; Modified: trunk/javascripts/FormFunctions.js =================================================================== --- trunk/javascripts/FormFunctions.js 2012-08-28 09:06:05 UTC (rev 9575) +++ trunk/javascripts/FormFunctions.js 2012-08-29 19:39:01 UTC (rev 9576) @@ -198,6 +198,7 @@ } function OpenSearchWindow(TargetURL, CallingURL) { + alert(CallingURL); document.getElementById("SearchMask").setAttribute("class", "mask"); document.getElementById("SearchWindow").setAttribute("class", "searchwindow"); if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari @@ -243,19 +244,30 @@ function PrintTable(t) { var rows=new Array(); var columnWidths=''; + var columnAligns=''; var PostData=''; parentElem=t.parentNode; row=parentElem.parentNode; table=row.parentNode; + for (var i = 0; i < table.rows.length; i++) { + if(table.rows[i].cells[0].tagName=='TD') { + MainRow=i; + } + if(table.rows[i].cells[0].tagName=='TH' && table.rows[i].cells[0].className!='header') { + HeaderRow=i; + } + } header=table.rows[0].cells[0].innerHTML; PostData=PostData+'Header'+'='+header+'&'; - columns=table.rows[1].innerHTML; + columns=table.rows[HeaderRow].innerHTML; PostData=PostData+'Columns'+'='+columns+'&'; - for (var i = 0; i < table.rows[1].cells.length; i++) { - s=getComputedStyle(table.rows[1].cells[i], null); + for (var i = 0; i < table.rows[MainRow].cells.length; i++) { + s=getComputedStyle(table.rows[MainRow].cells[i], null); columnWidths=columnWidths+s.width; + columnAligns=columnAligns+s.textAlign+'x'; } PostData=PostData+'ColumnWidths'+'='+columnWidths+'&'; + PostData=PostData+'ColumnAligns'+'='+columnAligns+'&'; for (var i = 2; i < table.rows.length; i++) { PostData=PostData+'Row'+(i-2)+'='+table.rows[i].innerHTML+'&'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-30 19:14:12
|
Revision: 9578 http://weberp.svn.sourceforge.net/weberp/?rev=9578&view=rev Author: tim_schofield Date: 2012-08-30 19:14:05 +0000 (Thu, 30 Aug 2012) Log Message: ----------- Thomas Timothy Lie: Fix more typos in gettext strings Modified Paths: -------------- trunk/BOMExtendedQty.php trunk/BOMIndentedReverse.php trunk/ConfirmDispatch_Invoice.php trunk/CounterSales.php trunk/FixedAssetLocations.php trunk/GLProfit_Loss.php trunk/Labels.php trunk/MRP.php trunk/MRPCalendar.php trunk/PurchData.php trunk/WOSerialNos.php trunk/reportwriter/languages/en_US/reports.php Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/BOMExtendedQty.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -27,7 +27,7 @@ part char(20), extendedqpa double, sortpart text) DEFAULT CHARSET=utf8"; - $ErrMsg = _('The SQL to to create passbom failed with the message'); + $ErrMsg = _('The SQL to create passbom failed with the message'); $result = DB_query($sql,$db,$ErrMsg); $sql = "CREATE TEMPORARY TABLE tempbom ( Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/BOMIndentedReverse.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -28,7 +28,7 @@ part char(20), sortpart text) DEFAULT CHARSET=utf8"; - $ErrMsg = _('The SQL to to create passbom failed with the message'); + $ErrMsg = _('The SQL to create passbom failed with the message'); $result = DB_query($sql,$db,$ErrMsg); $sql = "CREATE TEMPORARY TABLE tempbom ( Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/ConfirmDispatch_Invoice.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -1446,7 +1446,7 @@ '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', '" . -$DisposalRow['cost'] . "')"; - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The reversal of asset cost on dispoal GL posting could not be inserted because'); + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The reversal of asset cost on disposal GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/CounterSales.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -906,7 +906,7 @@ WHERE custbranch.debtorno ='". $_SESSION['Items'.$identifier]->DebtorNo . "' AND custbranch.branchcode = '" . $_SESSION['Items'.$identifier]->Branch . "'"; - $ErrMsg = _('We were unable to load the area where the sale is to from the custbranch table'); + $ErrMsg = _('We were unable to load the area from the custbranch table where the sale is to'); $Result = DB_query($SQL,$db, $ErrMsg); $myrow = DB_fetch_row($Result); $Area = $myrow[0]; Modified: trunk/FixedAssetLocations.php =================================================================== --- trunk/FixedAssetLocations.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/FixedAssetLocations.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -73,7 +73,7 @@ $result = DB_query($sql,$db); $myrow=DB_fetch_row($result); if ($myrow[0]>0) { - prnMsg(_('You have assets in this location location so it cannot be removed'), 'warn'); + prnMsg(_('You have assets in this location so it cannot be removed'), 'warn'); $InputError=1; } if ($InputError==0) { Modified: trunk/GLProfit_Loss.php =================================================================== --- trunk/GLProfit_Loss.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/GLProfit_Loss.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -17,7 +17,7 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . _('Print Profit and Loss Report') . '</p>'; - echo '<div class="page_help_text">' . _('Profit and loss statement (P&L), also called an Income Statment, or Statement of Operations, this is the statement that indicates how the revenue (money received from the sale of products and services before expenses are taken out, also known as the "top line") is transformed into the net income (the result after all revenues and expenses have been accounted for, also known as the "bottom line").') . '<br />' + echo '<div class="page_help_text">' . _('Profit and loss statement (P&L), also called an Income Statement, or Statement of Operations, this is the statement that indicates how the revenue (money received from the sale of products and services before expenses are taken out, also known as the "top line") is transformed into the net income (the result after all revenues and expenses have been accounted for, also known as the "bottom line").') . '<br />' . _('The purpose of the income statement is to show whether the company made or lost money during the period being reported.') . '<br />' . _('The P&L represents a period of time. This contrasts with the Balance Sheet, which represents a single moment in time.') . '<br />' . _('webERP is an "accrual" based system (not a "cash based" system). Accrual systems include items when they are invoiced to the customer, and when expenses are owed based on the supplier invoice date.') . '</div>'; Modified: trunk/Labels.php =================================================================== --- trunk/Labels.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/Labels.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -42,7 +42,7 @@ WHERE labelfieldid='" . $_POST['LabelFieldID' . $i] . "'", $db); } else { - prnMsg (_('Entries for Vertical Position, Horizonal Position, and Font Size must be integers.'),'error'); + prnMsg (_('Entries for Vertical Position, Horizontal Position, and Font Size must be integers.'),'error'); } } } @@ -406,7 +406,7 @@ FROM labelfields WHERE labelid = '" . $SelectedLabelID . "' ORDER BY vpos DESC"; - $ErrMsg = _('Could note get the label fields because'); + $ErrMsg = _('Could not get the label fields because'); $result = DB_query($SQL,$db,$ErrMsg); $i=0; echo '<table class="selection"> @@ -416,7 +416,7 @@ <tr> <th>' . _('Field') . '</th> <th>' . _('Vertical') . '<br />' . _('Position') . '<br />(VPos)</th> - <th>' . _('Horizonal') . '<br />' . _('Position') . '<br />(HPos)</th> + <th>' . _('Horizontal') . '<br />' . _('Position') . '<br />(HPos)</th> <th>' . _('Font Size') . '</th> <th>' . _('Bar-code') . '</th> </tr>'; Modified: trunk/MRP.php =================================================================== --- trunk/MRP.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/MRP.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -23,7 +23,7 @@ $sql = "CREATE TEMPORARY TABLE passbom (part char(20), sortpart text) DEFAULT CHARSET=utf8"; - $ErrMsg = _('The SQL to to create passbom failed with the message'); + $ErrMsg = _('The SQL to create passbom failed with the message'); $result = DB_query($sql,$db,$ErrMsg); $sql = "CREATE TEMPORARY TABLE tempbom (parent char(20), Modified: trunk/MRPCalendar.php =================================================================== --- trunk/MRPCalendar.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/MRPCalendar.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -81,7 +81,7 @@ manufacturingflag smallint(6) NOT NULL default '1', INDEX (daynumber), PRIMARY KEY (calendardate)) DEFAULT CHARSET=utf8"; - $ErrMsg = _('The SQL to to create passbom failed with the message'); + $ErrMsg = _('The SQL to create passbom failed with the message'); $result = DB_query($sql,$db,$ErrMsg); $i = 0; Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/PurchData.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -98,7 +98,7 @@ WHERE purchdata.stockid='".$StockID."' AND purchdata.supplierno='".$SupplierID."' AND purchdata.effectivefrom < '" . FormatDateForSQL($_POST['EffectiveFrom']) . "'"; - $ErrMsg = _('The preferred supplier details could not be update because'); + $ErrMsg = _('The preferred supplier details could not be updated because'); $DbgMsg = _('The SQL that failed was'); $UpdResult = DB_query($sql, $db, $ErrMsg, $DbgMsg); prnMsg(_('Supplier preferred flag has been updated'), 'success'); Modified: trunk/WOSerialNos.php =================================================================== --- trunk/WOSerialNos.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/WOSerialNos.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -264,7 +264,7 @@ WHERE wo='" . $WO . "' AND stockid='" . $StockID . "'"; -$ErrMsg = _('Could note get the work order serial/batch items'); +$ErrMsg = _('Could not get the work order serial/batch items'); $WOSerialNoResult = DB_query($sql,$db,$ErrMsg); if (DB_num_rows($WOSerialNoResult)==0){ Modified: trunk/reportwriter/languages/en_US/reports.php =================================================================== --- trunk/reportwriter/languages/en_US/reports.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/reportwriter/languages/en_US/reports.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -37,8 +37,8 @@ define('RPT_RPTBROWSE',_('Or browse for a report to upload.')); // Error messages for importing reports -define('RPT_IMP_ERMSG1',_('The filesize exceeds the upload_max_filesize directive in you php.ini settings.')); -define('RPT_IMP_ERMSG2',_('The filesize exceeds the MAX_FLE_SIZE directive in the webERP form.')); +define('RPT_IMP_ERMSG1',_('The filesize exceeds the upload_max_filesize directive in your php.ini settings.')); +define('RPT_IMP_ERMSG2',_('The filesize exceeds the MAX_FILE_SIZE directive in the webERP form.')); define('RPT_IMP_ERMSG3',_('The file was not completely uploaded. Please retry.')); define('RPT_IMP_ERMSG4',_('No file was selected to upload.')); define('RPT_IMP_ERMSG5',_('Unknown php upload error, php returned error # ')); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-09-03 15:57:21
|
Revision: 9582 http://weberp.svn.sourceforge.net/weberp/?rev=9582&view=rev Author: tim_schofield Date: 2012-09-03 15:57:12 +0000 (Mon, 03 Sep 2012) Log Message: ----------- Thomas Timothy Lie: Fix more typos in gettext strings Modified Paths: -------------- trunk/ContractBOM.php trunk/Z_ChangeStockCode.php trunk/includes/PDFSuppTransListingPageHeader.inc Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php 2012-09-03 12:29:41 UTC (rev 9581) +++ trunk/ContractBOM.php 2012-09-03 15:57:12 UTC (rev 9582) @@ -158,7 +158,7 @@ if($_SESSION['Contract'.$identifier]->Status!=2){ $_SESSION['Contract'.$identifier]->Remove_ContractComponent($_GET['Delete']); } else { - prnMsg( _('The contract BOM cannot be alterned because the customer has already placed the order'),'warn'); + prnMsg( _('The contract BOM cannot be altered because the customer has already placed the order'),'warn'); } } Modified: trunk/Z_ChangeStockCode.php =================================================================== --- trunk/Z_ChangeStockCode.php 2012-09-03 12:29:41 UTC (rev 9581) +++ trunk/Z_ChangeStockCode.php 2012-09-03 15:57:12 UTC (rev 9582) @@ -228,7 +228,7 @@ echo '<br />' . _('Changing the contract BOM table records'); $sql = "UPDATE contractbom SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to contract BOM records failed'); + $ErrMsg = _('The SQL to update the contract BOM records failed'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); echo ' ... ' . _('completed'); Modified: trunk/includes/PDFSuppTransListingPageHeader.inc =================================================================== --- trunk/includes/PDFSuppTransListingPageHeader.inc 2012-09-03 12:29:41 UTC (rev 9581) +++ trunk/includes/PDFSuppTransListingPageHeader.inc 2012-09-03 15:57:12 UTC (rev 9582) @@ -12,13 +12,13 @@ Switch ($_POST['TransType']) { case 20: - $TransType=_('Suppier Invoices'); + $TransType=_('Supplier Invoices'); break; case 21: - $TransType=_('Suppier Credit Notes'); + $TransType=_('Supplier Credit Notes'); break; case 22: - $TransType=_('Suppier Payments'); + $TransType=_('Supplier Payments'); } $XPos = $Left_Margin; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |