[Weberp-svn] SF.net SVN: weberp:[5195] trunk
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2011-04-13 19:02:14
|
Revision: 5195 http://weberp.svn.sourceforge.net/weberp/?rev=5195&view=rev Author: tim_schofield Date: 2011-04-13 19:02:08 +0000 (Wed, 13 Apr 2011) Log Message: ----------- XHTML and quoting changes Modified Paths: -------------- trunk/InventoryQuantities.php trunk/Locations.php trunk/MRPReschedules.php trunk/Numbers/Words/lang.bg.php trunk/Numbers/Words/lang.es.php trunk/Numbers/Words/lang.es_AR.php trunk/Numbers/Words/lang.ru.php trunk/OutstandingGRNs.php trunk/PaymentMethods.php Modified: trunk/InventoryQuantities.php =================================================================== --- trunk/InventoryQuantities.php 2011-04-13 11:12:16 UTC (rev 5194) +++ trunk/InventoryQuantities.php 2011-04-13 19:02:08 UTC (rev 5195) @@ -83,9 +83,9 @@ $title = _('Inventory Quantities') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The Inventory Quantity report could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); - echo "<br><a href='" .$rootpath .'/index.php?' . SID . "'>" . _('Back to the menu') . '</a>'; + echo '<br><a href="' .$rootpath .'/index.php?' . SID . '">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br>$sql"; + echo '<br>' . $sql; } include('includes/footer.inc'); exit; @@ -94,7 +94,7 @@ $title = _('Print Inventory Quantities Report'); include('includes/header.inc'); prnMsg(_('There were no items with inventory quantities'),'error'); - echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; + echo '<br><a href="'.$rootpath.'/index.php?">' . _('Back to the menu') . '</a>'; include('includes/footer.inc'); exit; } @@ -148,12 +148,12 @@ echo '<div class="page_help_text">' . _('Use this report to display the quantity of Inventory items in different categories.') . '</div><br>'; - echo '</br></br><form action=' . $_SERVER['PHP_SELF'] . " method='post'><table>"; + echo '</br></br><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class=selection><tr><td>'; - echo '<tr><td>' . _('Selection') . ":</td><td><select name='Selection'>"; - echo "<option selected value='All'>" . _('All'); - echo "<option value='Multiple'>" . _('Only Parts With Multiple Locations'); + echo '<tr><td>' . _('Selection') . ':</td><td><select name="Selection">'; + echo '<option selected value="All">' . _('All') . '</option>'; + echo '<option value="Multiple">' . _('Only Parts With Multiple Locations') . '</option>'; echo '</select></td></tr>'; $SQL="SELECT categoryid, categorydescription FROM stockcategory where stocktype<>'A' ORDER BY categorydescription"; @@ -185,7 +185,7 @@ } } echo '</select></td></tr>'; - echo "</table><p><div class='centre'><input type=submit name='PrintPDF' value='" . _('Print PDF') . "'></div>"; + echo '</table><p><div class="centre"><input type=submit name="PrintPDF" value="' . _('Print PDF') . '"></div>'; include('includes/footer.inc'); Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2011-04-13 11:12:16 UTC (rev 5194) +++ trunk/Locations.php 2011-04-13 19:02:08 UTC (rev 5195) @@ -347,12 +347,12 @@ $myrow['managed'] = _('No'); } - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> - <td><a href='%sSelectedLocation=%s'>" . _('Edit') . "</td> - <td><a href='%sSelectedLocation=%s&delete=1'>" . _('Delete') . '</td> + <td><a href="%sSelectedLocation=%s">' . _('Edit') . '</td> + <td><a href="%sSelectedLocation=%s&delete=1">' . _('Delete') . '</td> </tr>', $myrow['loccode'], $myrow['locationname'], @@ -374,11 +374,11 @@ if (isset($SelectedLocation)) { echo '<a href="' . $_SERVER['PHP_SELF'] . '">' . _('Review Records') . '</a>'; } -echo "<p>"; +echo '<br />'; if (!isset($_GET['delete'])) { - echo "<form method='post' action='" . $_SERVER['PHP_SELF'] . '?' . SID . "'>"; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedLocation)) { @@ -424,8 +424,8 @@ $_POST['Managed'] = $myrow['managed']; - echo "<input type=hidden name=SelectedLocation VALUE=" . $SelectedLocation . '>'; - echo "<input type=hidden name=LocCode VALUE=" . $_POST['LocCode'] . '>'; + echo '<input type=hidden name=SelectedLocation VALUE="' . $SelectedLocation . '>'; + echo '<input type=hidden name=LocCode VALUE="' . $_POST['LocCode'] . '>'; echo '<table class=selection>'; echo '<tr><th colspan=2><font size=3 color=blue>'._('Amend Location details').'</font></th></tr>'; echo '<tr><td>' . _('Location Code') . ':</td><td>'; Modified: trunk/MRPReschedules.php =================================================================== --- trunk/MRPReschedules.php 2011-04-13 11:12:16 UTC (rev 5194) +++ trunk/MRPReschedules.php 2011-04-13 19:02:08 UTC (rev 5195) @@ -46,9 +46,9 @@ $title = _('MRP Reschedules') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The MRP reschedules could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); - echo "<br><a href='" .$rootpath .'/index.php?' . SID . "'>" . _('Back to the menu') . '</a>'; + echo '<br><a href="' .$rootpath .'/index.php?' . SID . '">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br>$sql"; + echo '<br>' . $sql; } include('includes/footer.inc'); exit; @@ -58,9 +58,9 @@ $title = _('MRP Reschedules') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('No MRP reschedule retrieved'), 'warn'); - echo "<br><a href='" .$rootpath .'/index.php?' . SID . "'>" . _('Back to the menu') . '</a>'; + echo '<br><a href="' .$rootpath .'/index.php?' . SID . '">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br>$sql"; + echo '<br>' . $sql; } include('includes/footer.inc'); exit; @@ -114,32 +114,7 @@ PrintHeader($pdf,$YPos,$PageNumber,$Page_Height,$Top_Margin,$Left_Margin,$Page_Width, $Right_Margin); } -/*Print out the grand totals */ - //$pdf->addTextWrap(80,$YPos,260-$Left_Margin,$FontSize,_('Grand Total Value'), 'right'); - //$DisplayTotalVal = number_format($Tot_Val,2); - //$pdf->addTextWrap(500,$YPos,60,$FontSize,$DisplayTotalVal, 'right'); -/* UldisN - $pdfcode = $pdf->output(); - $len = strlen($pdfcode); - if ($len<=20){ - $title = _('Print MRP Reschedules Error'); - include('includes/header.inc'); - prnMsg(_('There were no items with due dates different from MRP dates'),'error'); - echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; - include('includes/footer.inc'); - exit; - } else { - header('Content-type: application/pdf'); - header("Content-Length: " . $len); - header('Content-Disposition: inline; filename=MRPReschedules.pdf'); - header('Expires: 0'); - header('Cache-Control: private, post-check=0, pre-check=0'); - header('Pragma: public'); - - $pdf->Output('MRPRescedules.pdf', 'I'); - } -*/ $pdf->OutputD($_SESSION['DatabaseName'] . '_MRPReschedules_' . date('Y-m-d').'.pdf');//UldisN $pdf->__destruct(); //UldisN @@ -151,19 +126,19 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Stock') . '" alt="" />' . ' ' . $title . '</p>'; - echo '</br></br><form action=' . $_SERVER['PHP_SELF'] . " method='post'><table class=selection>"; + echo '</br></br><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<tr><td>' . _('Print Option') . ":</td><td><select name='Fill'>"; - echo "<option selected value='yes'>" . _('Print With Alternating Highlighted Lines'); - echo "<option value='no'>" . _('Plain Print'); + echo '<tr><td>' . _('Print Option') . ':</td><td><select name="Fill">'; + echo '<option selected value="yes">' . _('Print With Alternating Highlighted Lines'); + echo '<option value="no">' . _('Plain Print'); echo '</select></td></tr>'; - echo '<tr><td>' . _('Selection') . ":</td><td><select name='Selection'>"; - echo "<option selected value='All'>" . _('All')."</option>"; - echo "<option value='WO'>" . _('Work Orders Only')."</option>"; - echo "<option value='PO'>" . _('Purchase Orders Only')."</option>"; + echo '<tr><td>' . _('Selection') . ':</td><td><select name="Selection">'; + echo '<option selected value="All">' . _('All').'</option>'; + echo '<option value="WO">' . _('Work Orders Only').'</option>'; + echo '<option value="PO">' . _('Purchase Orders Only').'</option>'; echo '</select></td></tr>'; - echo "</table><br>"; - echo "<div class='centre'><input type=submit name='PrintPDF' value='" . _('Print PDF') . "'></div>"; + echo '</table><br>'; + echo '<div class="centre"><input type=submit name="PrintPDF" value="' . _('Print PDF') . '"></div>'; include('includes/footer.inc'); Modified: trunk/Numbers/Words/lang.bg.php =================================================================== --- trunk/Numbers/Words/lang.bg.php 2011-04-13 11:12:16 UTC (rev 5194) +++ trunk/Numbers/Words/lang.bg.php 2011-04-13 19:02:08 UTC (rev 5195) @@ -26,7 +26,7 @@ /** * Class for translating numbers into Bulgarian. * - * @author Kouber Saparev <ko...@ph...> + * @author Kouber Saparev <ko...@ph...> * @package Numbers_Words */ class Numbers_Words_bg extends Numbers_Words @@ -73,7 +73,7 @@ /** * The words for digits (except zero). Note that, there are three genders for them (neuter, masculine and feminine). - * The words for 3 to 9 (masculine) and for 2 to 9 (feminine) are the same as neuter, so they're filled + * The words for 3 to 9 (masculine) and for 2 to 9 (feminine) are the same as neuter, so they are filled * in the _initDigits() method, which is invoked from the constructor. * @var string * @access private @@ -118,7 +118,7 @@ * @access private */ var $_and = '\xE8'; - + /** * The word separator. * @var string @@ -271,7 +271,7 @@ /** * Fills the _digits array for masculine and feminine genders with - * corresponding references to neuter words (when they're the same). + * corresponding references to neuter words (when they are the same). * * @return void * @@ -353,12 +353,12 @@ the array may vary. */ $ret = array(); - + // extract the value of each digit from the three-digit number $e = $num%10; // ones $d = ($num-$e)%100/10; // tens $s = ($num-$d*10-$e)%1000/100; // hundreds - + // process the "hundreds" digit. if ($s) { switch ($s) { Modified: trunk/Numbers/Words/lang.es.php =================================================================== --- trunk/Numbers/Words/lang.es.php 2011-04-13 11:12:16 UTC (rev 5194) +++ trunk/Numbers/Words/lang.es.php 2011-04-13 19:02:08 UTC (rev 5195) @@ -35,7 +35,7 @@ /** * Class for translating numbers into Spanish (Castellano). * It supports up to decallones (10^6). - * It doesn't support spanish tonic accents (acentos). + * It does not support spanish tonic accents (acentos). * * @author Xavier Noguer * @package Numbers_Words @@ -50,14 +50,14 @@ * @access public */ var $locale = 'es'; - + /** * Language name in English * @var string * @access public */ var $lang = 'Spanish'; - + /** * Native language name * @var string Modified: trunk/Numbers/Words/lang.es_AR.php =================================================================== --- trunk/Numbers/Words/lang.es_AR.php 2011-04-13 11:12:16 UTC (rev 5194) +++ trunk/Numbers/Words/lang.es_AR.php 2011-04-13 19:02:08 UTC (rev 5195) @@ -19,9 +19,9 @@ // +----------------------------------------------------------------------+ // $Id: lang.es_AR.php,v 1.1 2006/11/17 05:59:52 daintree Exp $ // -// Numbers_Words class extension to spell numbers in Argentinian Spanish -// +// Numbers_Words class extension to spell numbers in Argentinian Spanish // +// /** * Class for translating numbers into Argentinian Spanish. @@ -38,7 +38,7 @@ /** * Class for translating numbers into Argentinian Spanish. * It supports up to decallones (10^6). - * It doesn't support spanish tonic accents (acentos). + * It does not support spanish tonic accents (acentos). * * @author Martin Marrese * @package Numbers_Words @@ -53,14 +53,14 @@ * @access public */ var $locale = 'es_AR'; - + /** * Language name in English * @var string * @access public */ var $lang = 'Spanish'; - + /** * Native language name * @var string @@ -109,7 +109,7 @@ * @access private */ var $_sep = ' '; - + /** * The currency names (based on the below links, * informations from central bank websites and on encyclopedias) @@ -166,7 +166,7 @@ * @access public */ var $def_currency = 'ARS'; // Argentinian Peso - + // }}} // {{{ toWords() /** @@ -405,7 +405,7 @@ $dec = $this->toWords(trim($dec)); $ret.= ' con ' . trim ($dec); } - + return $ret; } // }}} @@ -446,7 +446,7 @@ $ret = $curr_names[0][0]; } $ret .= $this->_sep . trim($this->toWords($decimal)); - + if ($fraction !== false) { if ($convert_fraction) { $ret .= $this->_sep .'con'. $this->_sep . trim($this->toWords($fraction)); @@ -469,6 +469,6 @@ // }}} - + } ?> Modified: trunk/Numbers/Words/lang.ru.php =================================================================== --- trunk/Numbers/Words/lang.ru.php 2011-04-13 11:12:16 UTC (rev 5194) +++ trunk/Numbers/Words/lang.ru.php 2011-04-13 19:02:08 UTC (rev 5195) @@ -66,14 +66,14 @@ * @access public */ var $lang_native = '\xD0\xF3\xF1\xF1\xEA\xE8\xE9'; - + /** * The word for the minus sign * @var string * @access private */ var $_minus = '\xEC\xE8\xED\xF3\xF1'; // minus sign - + /** * The sufixes for exponents (singular) * Names partly based on: @@ -188,7 +188,7 @@ ); /** - * The array containing the teens' :) names + * The array containing the teens :) names * @var array * @access private */ @@ -205,7 +205,7 @@ ); /** - * The array containing the tens' names + * The array containing the tens names * @var array * @access private */ @@ -221,7 +221,7 @@ ); /** - * The array containing the hundreds' names + * The array containing the hundreds names * @var array * @access private */ @@ -238,7 +238,7 @@ ); /** - * The array containing the digits + * The array containing the digits * for neutral, male and female * @var array * @access private @@ -268,7 +268,7 @@ */ var $_currency_names = array( 'ALL' => array( - array(1,'\xEB\xE5\xEA','\xEB\xE5\xEA\xE0','\xEB\xE5\xEA\xEE\xE2'), + array(1,'\xEB\xE5\xEA','\xEB\xE5\xEA\xE0','\xEB\xE5\xEA\xEE\xE2'), array(2,'\xEA\xE8\xED\xE4\xE0\xF0\xEA\xE0','\xEA\xE8\xED\xE4\xE0\xF0\xEA\xE8','\xEA\xE8\xED\xE4\xE0\xF0\xEE\xEA') ), 'AUD' => array( @@ -276,15 +276,15 @@ array(1,'\xF6\xE5\xED\xF2','\xF6\xE5\xED\xF2\xE0','\xF6\xE5\xED\xF2\xEE\xE2') ), 'BGN' => array( - array(1,'\xEB\xE5\xE2','\xEB\xE5\xE2\xE0','\xEB\xE5\xE2\xEE\xE2'), + array(1,'\xEB\xE5\xE2','\xEB\xE5\xE2\xE0','\xEB\xE5\xE2\xEE\xE2'), array(2,'\xF1\xF2\xEE\xF2\xE8\xED\xEA\xE0','\xF1\xF2\xEE\xF2\xE8\xED\xEA\xE8','\xF1\xF2\xEE\xF2\xE8\xED\xEE\xEA') ), 'BRL' => array( - array(1,'\xE1\xF0\xE0\xE7\xE8\xEB\xFC\xF1\xEA\xE8\xE9 \xF0\xE5\xE0\xEB','\xE1\xF0\xE0\xE7\xE8\xEB\xFC\xF1\xEA\xE8\xF5 \xF0\xE5\xE0\xEB\xE0','\xE1\xF0\xE0\xE7\xE8\xEB\xFC\xF1\xEA\xE8\xF5 \xF0\xE5\xE0\xEB\xEE\xE2'), + array(1,'\xE1\xF0\xE0\xE7\xE8\xEB\xFC\xF1\xEA\xE8\xE9 \xF0\xE5\xE0\xEB','\xE1\xF0\xE0\xE7\xE8\xEB\xFC\xF1\xEA\xE8\xF5 \xF0\xE5\xE0\xEB\xE0','\xE1\xF0\xE0\xE7\xE8\xEB\xFC\xF1\xEA\xE8\xF5 \xF0\xE5\xE0\xEB\xEE\xE2'), array(1,'\xF1\xE5\xED\xF2\xE0\xE2\xEE','\xF1\xE5\xED\xF2\xE0\xE2\xEE','\xF1\xE5\xED\xF2\xE0\xE2\xEE') ), 'BYR' => array( - array(1,'\xE1\xE5\xEB\xEE\xF0\xF3\xF1\xF1\xEA\xE8\xE9 \xF0\xF3\xE1\xEB\xFC','\xE1\xE5\xEB\xEE\xF0\xF3\xF1\xF1\xEA\xE8\xF5 \xF0\xF3\xE1\xEB\xFF','\xE1\xE5\xEB\xEE\xF0\xF3\xF1\xF1\xEA\xE8\xF5 \xF0\xF3\xE1\xEB\xE5\xE9'), + array(1,'\xE1\xE5\xEB\xEE\xF0\xF3\xF1\xF1\xEA\xE8\xE9 \xF0\xF3\xE1\xEB\xFC','\xE1\xE5\xEB\xEE\xF0\xF3\xF1\xF1\xEA\xE8\xF5 \xF0\xF3\xE1\xEB\xFF','\xE1\xE5\xEB\xEE\xF0\xF3\xF1\xF1\xEA\xE8\xF5 \xF0\xF3\xE1\xEB\xE5\xE9'), array(2,'\xEA\xEE\xEF\xE5\xE9\xEA\xE0','\xEA\xEE\xEF\xE5\xE9\xEA\xE8','\xEA\xEE\xEF\xE5\xE5\xEA') ), 'CAD' => array( @@ -434,7 +434,7 @@ * @access private * @author Andrey Demenev <de...@on...> */ - function toWords($num, $gender = 1) + function toWords($num, $gender = 1) { return $this->_toWordsWithCase($num, $dummy, $gender); } @@ -459,9 +459,9 @@ { $ret = ''; $case = 3; - + $num = trim($num); - + $sign = ""; if (substr($num, 0, 1) == '-') { $sign = $this->_minus . $this->_sep; @@ -472,7 +472,7 @@ if ($num == 0 || $num == '') { $ret .= $this->_digits[$gender][0]; } - + else { $power = 0; while ($power < strlen($num)) { @@ -533,7 +533,7 @@ */ function _groupToWords($num, $gender, &$case) { - $ret = ''; + $ret = ''; $case = 3; if ((int)$num == 0) { $ret = ''; Modified: trunk/OutstandingGRNs.php =================================================================== --- trunk/OutstandingGRNs.php 2011-04-13 11:12:16 UTC (rev 5194) +++ trunk/OutstandingGRNs.php 2011-04-13 19:02:08 UTC (rev 5195) @@ -51,9 +51,9 @@ $title = _('Outstanding GRN Valuation') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg(_('The outstanding GRNs valuation details could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo "<br><a href='" .$rootpath ."/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; + echo '<br><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br>".$SQL; + echo '<br>'.$SQL; } include('includes/footer.inc'); exit; @@ -63,9 +63,9 @@ $title = _('Outstanding GRN Valuation') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg(_('No outstanding GRNs valuation details retrieved'), 'warn'); - echo "<br><a href='" .$rootpath ."/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; + echo '<br><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br>$SQL"; + echo '<br>'.$SQL; } include('includes/footer.inc'); exit; @@ -142,28 +142,7 @@ $LeftOvers = $pdf->addTextWrap(500,$YPos,60,$FontSize,$DisplayTotalVal, 'right'); $pdf->line($Left_Margin, $YPos+$line_height-2,$Page_Width-$Right_Margin, $YPos+$line_height-2); $YPos -=(2*$line_height); -/* UldisN - $pdfcode = $pdf->output(); - $len = strlen($pdfcode); - if ($len<=20){ - $title = _('Outstanding GRNs Valuation Error'); - include('includes/header.inc'); - prnMsg(_('There were no GRNs with any value to print out for the specified supplier range'),'info'); - echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; - include('includes/footer.inc'); - exit; - } else { - header('Content-type: application/pdf'); - header('Content-Length: ' . $len); - header('Content-Disposition: inline; filename=OSGRNsValuation.pdf'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - - $pdf->Output('OutstandingGRNs.pdf','I'); - } -*/ $pdf->OutputD($_SESSION['DatabaseName'] . '_OSGRNsValuation_' . date('Y-m-d').'.pdf');//UldisN $pdf->__destruct(); //UldisN } else { /*The option to print PDF was not hit */ @@ -174,15 +153,15 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; - echo '<form action=' . $_SERVER['PHP_SELF'] . " method='POST'><table class=selection>"; + echo '<form action=' . $_SERVER['PHP_SELF'] . ' method="POST"><table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<tr><td>' . _('From Supplier Code') . ":</td> - <td><input type=text name='FromCriteria' value='0'></td></tr>"; - echo '<tr><td>' . _('To Supplier Code'). ":</td> - <td><input type=text name='ToCriteria' value='zzzzzzz'></td></tr>"; + echo '<tr><td>' . _('From Supplier Code') . ':</td> + <td><input type=text name="FromCriteria" value="0"></td></tr>'; + echo '<tr><td>' . _('To Supplier Code'). ':</td> + <td><input type=text name="ToCriteria" value="zzzzzzz"></td></tr>'; - echo "</table><br><div class='centre'><input type=Submit Name='PrintPDF' Value='" . _('Print PDF') . "'></div>"; + echo '</table><br><div class="centre"><input type=Submit Name="PrintPDF" Value="' . _('Print PDF') . '"></div>'; include('includes/footer.inc'); Modified: trunk/PaymentMethods.php =================================================================== --- trunk/PaymentMethods.php 2011-04-13 11:12:16 UTC (rev 5194) +++ trunk/PaymentMethods.php 2011-04-13 19:02:08 UTC (rev 5195) @@ -36,9 +36,9 @@ //first off validate inputs sensible - if (strpos($_POST['MethodName'],'&')>0 OR strpos($_POST['MethodName'],"'")>0) { + if (ContainsIllegalCharacters($_POST['MethodName'])) { $InputError = 1; - prnMsg( _('The payment method cannot contain the character') . " '&' " . _('or the character') ." '",'error'); + prnMsg( _('The payment method cannot contain illegal characters'),'error'); $Errors[$i] = 'MethodName'; $i++; } @@ -186,13 +186,13 @@ $ErrMsg = _('Could not get payment methods because'); $result = DB_query($sql,$db,$ErrMsg); - echo "<table class=selection> + echo '<table class=selection> <tr> - <th>" . _('Payment Method') . "</th> - <th>" . _('For Payments') . "</th> - <th>" . _('For Receipts') . "</th> - <th>" . _('Use Pre-printed') .'<br />' . _('Stationery') . "</th> - </tr>"; + <th>' . _('Payment Method') . '</th> + <th>' . _('For Payments') . '</th> + <th>' . _('For Receipts') . '</th> + <th>' . _('Use Pre-printed') .'<br />' . _('Stationery') . '</th> + </tr>'; $k=0; //row colour counter while ($myrow = DB_fetch_array($result)) { @@ -226,7 +226,7 @@ if (! isset($_GET['delete'])) { - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + echo '<form method="post action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedPaymentID)) { @@ -253,8 +253,8 @@ $_POST['ForReceipt'] = $myrow['receipttype']; $_POST['ForPreprint'] = $myrow['forpreprint']; - echo "<input type=hidden name='SelectedPaymentID' VALUE='" . $_POST['MethodID'] . "'>"; - echo "<table class=selection>"; + echo '<input type=hidden name="SelectedPaymentID" VALUE="' . $_POST['MethodID'] . '">'; + echo '<table class=selection>'; } } else { @@ -262,30 +262,30 @@ $_POST['ForPayment'] = 1; // Default is use for payment $_POST['ForReceipt'] = 1; // Default is use for receipts $_POST['ForPreprint'] = 0; // Default is use for receipts - echo "<table class=selection>"; + echo '<table class=selection>'; } - echo "<tr> - <td>" . _('Payment Method') . ':' . "</td> - <td><input type='Text' ". (in_array('MethodName',$Errors) ? 'class="inputerror"' : '' ) ." name='MethodName' size=30 maxlength=30 value='" . $_POST['MethodName'] . "'></td> - </tr>"; - echo "<tr> - <td>" . _('Use For Payments') . ':' . "</td> - <td><select name='ForPayment'>"; - echo "<option".($_POST['ForPayment'] ? ' selected' : '') ." VALUE='1'>" . _('Yes'); - echo "<option".($_POST['ForPayment'] ? '' : ' selected') ." VALUE='0'>" . _('No'); - echo "</select></td></tr>"; - echo "<tr> - <td>" . _('Use For Receipts') . ':' . "</td> - <td><select name='ForReceipt'>"; - echo "<option".($_POST['ForReceipt'] ? ' selected' : '') ." VALUE='1'>" . _('Yes'); - echo "<option".($_POST['ForReceipt'] ? '' : ' selected') ." VALUE='0'>" . _('No'); - echo "</select></td></tr>"; - echo "<tr> - <td>" . _('Use Pre-printed Stationery') . ':' . "</td> - <td><select name='ForPreprint'>"; - echo "<option".($_POST['ForPreprint'] ? ' selected' : '') ." VALUE='1'>" . _('Yes'); - echo "<option".($_POST['ForPreprint'] ? '' : ' selected') ." VALUE='0'>" . _('No'); - echo "</select></td></tr>"; + echo '<tr> + <td>' . _('Payment Method') . ':' . '</td> + <td><input type="text" '. (in_array('MethodName',$Errors) ? 'class="inputerror"' : '' ) .' name="MethodName" size=30 maxlength=30 value="' . $_POST['MethodName'] . '"></td> + </tr>'; + echo '<tr> + <td>' . _('Use For Payments') . ':' . '</td> + <td><select name="ForPayment">'; + echo '<option'.($_POST['ForPayment'] ? ' selected' : '') .' VALUE="1">' . _('Yes') . '</option>'; + echo '<option'.($_POST['ForPayment'] ? '' : ' selected') .' VALUE="0">' . _('No') . '</option>'; + echo '</select></td></tr>'; + echo '<tr> + <td>' . _('Use For Receipts') . ':' . '</td> + <td><select name="ForReceipt">'; + echo '<option'.($_POST['ForReceipt'] ? ' selected' : '') .' VALUE="1">' . _('Yes') . '</option>'; + echo '<option'.($_POST['ForReceipt'] ? '' : ' selected') .' VALUE="0">' . _('No') . '</option>'; + echo '</select></td></tr>'; + echo '<tr> + <td>' . _('Use Pre-printed Stationery') . ':' . '</td> + <td><select name="ForPreprint">'; + echo '<option'.($_POST['ForPreprint'] ? ' selected' : '') .' VALUE="1">' . _('Yes') . '</option>'; + echo '<option'.($_POST['ForPreprint'] ? '' : ' selected') .' VALUE="0">' . _('No') . '</option>'; + echo '</select></td></tr>'; echo '</table>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |