From: <vv...@us...> - 2012-04-08 01:24:57
|
Revision: 5233 http://web-erp.svn.sourceforge.net/web-erp/?rev=5233&view=rev Author: vvs2012 Date: 2012-04-08 01:24:49 +0000 (Sun, 08 Apr 2012) Log Message: ----------- xhtml Modified Paths: -------------- trunk/Prices.php trunk/PricesBasedOnMarkUp.php trunk/PricesByCost.php trunk/Prices_Customer.php Modified: trunk/Prices.php =================================================================== --- trunk/Prices.php 2012-04-07 18:47:08 UTC (rev 5232) +++ trunk/Prices.php 2012-04-08 01:24:49 UTC (rev 5233) @@ -206,16 +206,16 @@ $result = DB_query($sql,$db); if (DB_num_rows($result) > 0) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '"> - <table class="selection"> + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<table class="selection"> <tr> <th colspan="7"> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />' . _('Pricing for part') . ': <input type="text" name="Item" size="22" value="' . $Item . '" maxlength="20" /> <input type="submit" name="NewPart" value="' . _('Review Prices') . '" /></th> - </tr> - </form>'; + </tr>'; echo '<tr><th>' . _('Currency') . '</th> <th>' . _('Sales Type') . '</th> @@ -246,8 +246,8 @@ <td class="number">' . locale_number_format($myrow['price'],$myrow['currdecimalplaces']) . '</td> <td>' . ConvertSQLDate($myrow['startdate']) . '</td> <td>' . $EndDateDisplay . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Item=' . $myrow['stockid'] . '&TypeAbbrev=' .$myrow['typeabbrev'] . '&CurrAbrev=' . $myrow['currabrev'] . '&Price=' . $myrow['price'] . '&StartDate=' . $myrow['startdate'] . '&EndDate=' . $myrow['enddate'] . '&Edit=1">' . _('Edit') . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Item=' . $myrow['stockid'] . '&TypeAbbrev=' .$myrow['typeabbrev'] . '&CurrAbrev=' . $myrow['currabrev'] . '&StartDate=' . $myrow['startdate'] . '&EndDate=' . $myrow['enddate'] . '&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</td></tr>'; + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Item=' . $myrow['stockid'] . '&TypeAbbrev=' .$myrow['typeabbrev'] . '&CurrAbrev=' . $myrow['currabrev'] . '&Price=' . $myrow['price'] . '&StartDate=' . $myrow['startdate'] . '&EndDate=' . $myrow['enddate'] . '&Edit=1">' . _('Edit') . '</a></td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Item=' . $myrow['stockid'] . '&TypeAbbrev=' .$myrow['typeabbrev'] . '&CurrAbrev=' . $myrow['currabrev'] . '&StartDate=' . $myrow['startdate'] . '&EndDate=' . $myrow['enddate'] . '&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</a></td></tr>'; } else { echo '<td>' . $myrow['currency'] . '</td> @@ -259,12 +259,15 @@ } //END WHILE LIST LOOP - echo '</table><p>'; + echo '</table><br />'; + echo '</div> + </form>'; } else { prnMsg(_('There are no prices set up for this part'),'warn'); } echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($_GET['Edit'])){ echo '<input type="hidden" name="OldTypeAbbrev" value="' . $_GET['TypeAbbrev'] .'" />'; @@ -289,7 +292,7 @@ $result = DB_query($SQL,$db); echo '<br /><table class="selection">'; - echo '<tr><th colspan="5"><font color="blue" size="3"><b>' . $Item . ' - ' . $PartDescription . '</b></font></th></tr>'; + echo '<tr><th colspan="5"><h3>' . $Item . ' - ' . $PartDescription . '</h3></th></tr>'; echo '<tr><td>' . _('Currency') . ':</td> <td><select name="CurrAbrev">'; while ($myrow = DB_fetch_array($result)) { @@ -333,8 +336,8 @@ echo '<tr><td>' . _('Price Effective From Date') . ':</td> <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="StartDate" size="10" maxlength="10" value="' . $_POST['StartDate'] . '" /></td></tr>'; echo '<tr><td>' . _('Price Effective To Date') . ':</td> - <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="EndDate" size="10" maxlength="10" value="' . $_POST['EndDate'] . '" /></td></tr>'; - echo '<input type="hidden" name="Item" value="' . $Item.'" />'; + <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="EndDate" size="10" maxlength="10" value="' . $_POST['EndDate'] . '" />'; + echo '<input type="hidden" name="Item" value="' . $Item.'" /></td></tr>'; echo '<tr><td>' . _('Price') . ':</td> <td> <input type="text" class="number" name="Price" size="12" maxlength="11" value="'; @@ -349,7 +352,8 @@ </div>'; } -echo '</form>'; +echo '</div> + </form>'; include('includes/footer.inc'); Modified: trunk/PricesBasedOnMarkUp.php =================================================================== --- trunk/PricesBasedOnMarkUp.php 2012-04-07 18:47:08 UTC (rev 5232) +++ trunk/PricesBasedOnMarkUp.php 2012-04-08 01:24:49 UTC (rev 5233) @@ -7,22 +7,23 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . $title.'</p>'; -echo '<br /><div class="page_help_text">' . _('This page adds new prices or updates already existing prices for a specified sales type (price list) and currency for the stock category selected - based on a percentage mark up from cost prices or from preferred supplier cost data or from another price list. The rounding factor ensures that prices are at least this amount or a multiple of it. A rounding factor of 5 would mean that prices would be a minimum of 5 and other prices would be expressed as multiples of 5.') . '</div><br /><div class="centre">'; +echo '<br /><div class="page_help_text">' . _('This page adds new prices or updates already existing prices for a specified sales type (price list) and currency for the stock category selected - based on a percentage mark up from cost prices or from preferred supplier cost data or from another price list. The rounding factor ensures that prices are at least this amount or a multiple of it. A rounding factor of 5 would mean that prices would be a minimum of 5 and other prices would be expressed as multiples of 5.') . '</div><br />'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $SQL = 'SELECT sales_type, typeabbrev FROM salestypes'; $PricesResult = DB_query($SQL,$db); -echo '<p><table class="selection"> +echo '<br /><table class="selection"> <tr> <td>' . _('Select the Price List to update') .':</td> <td><select name="PriceList">'; if (!isset($_POST['PriceList']) OR $_POST['PriceList']=='0'){ - echo '<option selected="selected" value="0">' . _('No Price List Selected'); + echo '<option selected="selected" value="0">' . _('No Price List Selected') . '</option>'; } while ($PriceLists=DB_fetch_array($PricesResult)){ @@ -161,9 +162,10 @@ <td><input type="text" name="IncreasePercent" class="number" size="4" maxlength="4" value="' . $_POST['IncreasePercent'] . '" /></td></tr></table>'; -echo '<p><div class="centre"><input type="submit" name="UpdatePrices" value="' . _('Update Prices') . '\' onclick="return confirm(\'' . _('Are you sure you wish to update or add all the prices according to the criteria selected?') . '\');" /></div>'; +echo '<br /><div class="centre"><input type="submit" name="UpdatePrices" value="' . _('Update Prices') . '" onclick="return confirm(\'' . _('Are you sure you wish to update or add all the prices according to the criteria selected?') . '\');" /></div>'; -echo '</form>'; +echo '</div> + </form>'; if (isset($_POST['UpdatePrices'])){ $InputError =0; //assume the best Modified: trunk/PricesByCost.php =================================================================== --- trunk/PricesByCost.php 2012-04-07 18:47:08 UTC (rev 5232) +++ trunk/PricesByCost.php 2012-04-08 01:24:49 UTC (rev 5233) @@ -160,7 +160,8 @@ <th>' . _('List Price') . '</th> <tr>'; $k = 0; //row colour counter - echo '<form action="' .htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'" method="post" name="update">'; + echo '<form action="' .htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'" method="post" id="update">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo'<input type="hidden" value="' . $_POST['StockCat'] . '" name="StockCat" /> <input type="hidden" value="' . $_POST['Margin'] . '" name="Margin" /> @@ -220,18 +221,20 @@ echo '<tr> <td style="text-align:right" colspan="4"><input type="submit" name="submit" value="' . _('Update') . '" onclick="return confirm(\'' . _('If the prices above do not have a commencement date as today, this will create new prices with commencement date of today at the entered figures and update the existing prices with historical start dates to have an end date of yesterday. Are You Sure?') . '\');" /></td> <td style="text-align:left" colspan="3"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '"><input type="submit" value="' . _('Back') . '" /></a></td> - </tr></form>'; + </tr> + </div> + </form>'; } else { prnMsg(_('There were no prices meeting the criteria specified to review'),'info'); - echo '<p><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Back') . '<a/></div><p>'; + echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Back') . '<a/></div>'; } } else { /*The option to submit was not hit so display form */ echo '<div class="page_help_text">' . _('Prices can be displayed based on their relation to cost') . '</div><br />'; echo '<br /> - <br /> - <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> - <table class="selection">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; $SQL = "SELECT categoryid, categorydescription FROM stockcategory @@ -240,7 +243,7 @@ echo '<tr> <td>' . _('Category') . ':</td> <td><select name="StockCat">'; - echo '<option value="all">' . _('All Categories') . ''; + echo '<option value="all">' . _('All Categories') . '</option>'; while ($myrow1 = DB_fetch_array($result1)) { echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } @@ -283,7 +286,9 @@ DB_data_seek($result, 0); echo '</select></td></tr>'; echo '</table> - <br /><p><div class="centre"><input type="submit" name="submit" value="' . _('Submit') . '" /></div></p>'; + <br /><div class="centre"><input type="submit" name="submit" value="' . _('Submit') . '" /></div>'; + echo '</div> + </form>'; } /*end of else not submit */ include ('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2012-04-07 18:47:08 UTC (rev 5232) +++ trunk/Prices_Customer.php 2012-04-08 01:24:49 UTC (rev 5233) @@ -12,7 +12,7 @@ WHERE debtorsmaster.debtorno='" . $_SESSION['CustomerID'] . "'",$db); $myrow = DB_fetch_array($result); -$title = _('Special Prices for') . ' '. $myrow['name']; +$title = _('Special Prices for') . ' '. htmlspecialchars($myrow['name'], ENT_QUOTES, 'UTF-8'); include('includes/header.inc'); @@ -34,7 +34,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . _('Special Customer Prices').'</p><br />'; -echo '<font color=BLUE><b>' . $myrow['name'] . ' ' . _('in') . ' ' . $myrow['currcode'] . '<br />' . ' ' . _('for') . ' '; +echo '<b>' . htmlspecialchars($myrow['name'], ENT_QUOTES, 'UTF-8') . ' ' . _('in') . ' ' . $myrow['currcode'] . '<br />' . ' ' . _('for') . ' '; $CurrCode = $myrow['currcode']; $SalesType = $myrow['salestype']; @@ -55,7 +55,7 @@ exit; } -echo $Item . ' - ' . $myrow[0] . '</b></font></p>'; +echo $Item . ' - ' . $myrow[0] . '</b><br />'; if (isset($_POST['submit'])) { @@ -199,7 +199,7 @@ $DbgMsg = _('The SQL used to retrieve these records was'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); -echo '<table><tr><td valign=top>'; +echo '<table><tr><td valign="top">'; echo '<table class="selection">'; if (DB_num_rows($result) == 0) { @@ -274,18 +274,19 @@ <td class="number">'.$myrow['conversionfactor'].'</td> <td>'.ConvertSQLDate($myrow['startdate']).'</td> <td>'.$EndDateDisplay.'</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode']. - '&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'] .'&EndDate='.$myrow['enddate'].'&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</td> + <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode']. + '&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</a></td> + <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'] .'&EndDate='.$myrow['enddate'].'&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</a></td> </tr>'; } //END WHILE LIST LOOP } -echo '</table></tr></table><p />'; +echo '</table></td></tr></table><br />'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="Item" value="' . $Item . '" />'; @@ -335,19 +336,19 @@ while ($myrow=DB_fetch_array($result)) { if ($myrow['branchcode']==$_GET['Branch']) { - echo '<option selected="selected" value="'.$myrow['branchcode'].'">'.$myrow['brname'].'</option>'; + echo '<option selected="selected" value="'.$myrow['branchcode'].'">'.htmlspecialchars($myrow['brname'], ENT_QUOTES, 'UTF-8').'</option>'; } else { - echo '<option value="'.$myrow['branchcode'].'">'.$myrow['brname'].'</option>'; + echo '<option value="'.$myrow['branchcode'].'">'.htmlspecialchars($myrow['brname'], ENT_QUOTES, 'UTF-8').'</option>'; } } echo '</select></td></tr>'; echo '<tr> <td>' . _('Start Date') . ':</td> - <td><input type="text" name="StartDate" class="date" alt='.$_SESSION['DefaultDateFormat']. ' size="11" maxlength="10" value="' . $_POST['StartDate'] . '" /></td> + <td><input type="text" name="StartDate" class="date" alt="'.$_SESSION['DefaultDateFormat']. '" size="11" maxlength="10" value="' . $_POST['StartDate'] . '" /></td> </tr>'; echo '<tr> <td>' . _('End Date') . ':</td> - <td><input type="text" name="EndDate" class=date alt='.$_SESSION['DefaultDateFormat']. ' size="11" maxlength="10" value="' . $_POST['EndDate'] . '" /></td></tr>'; + <td><input type="text" name="EndDate" class="date" alt="'.$_SESSION['DefaultDateFormat']. '" size="11" maxlength="10" value="' . $_POST['EndDate'] . '" /></td></tr>'; echo '<tr><td>' . _('Price') . ':</td> <td><input type="text" class="number" name="Price" size="11" maxlength="10" value="' . locale_number_format($_POST['Price'],2) . '" /></td> @@ -359,6 +360,7 @@ <div class="centre"> <input type="submit" name="submit" value="' . _('Enter Information') . '" /> </div> + </div> </form>'; include('includes/footer.inc'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |