|
From: <dai...@us...> - 2011-10-17 09:29:40
|
Revision: 4724
http://web-erp.svn.sourceforge.net/web-erp/?rev=4724&view=rev
Author: daintree
Date: 2011-10-17 09:29:33 +0000 (Mon, 17 Oct 2011)
Log Message:
-----------
number_formats
Modified Paths:
--------------
trunk/TopItems.php
trunk/UnitsOfMeasure.php
trunk/UpgradeDatabase.php
Modified: trunk/TopItems.php
===================================================================
--- trunk/TopItems.php 2011-10-17 09:14:05 UTC (rev 4723)
+++ trunk/TopItems.php 2011-10-17 09:29:33 UTC (rev 4724)
@@ -10,7 +10,9 @@
//check if input already
if (!(isset($_POST['Search']))) {
- echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Top Sales Order Search') . '" alt="" />' . ' ' . _('Top Sales Order Search') . '</p>';
+ echo '<p class="page_title_text">
+ <img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Top Sales Order Search') . '" alt="" />' . ' ' . _('Top Sales Order Search') . '
+ </p>';
echo '<form action="' . $_SERVER['PHP_SELF'] . '?name="SelectCustomer" method="post">';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
echo '<table class="selection">';
Modified: trunk/UnitsOfMeasure.php
===================================================================
--- trunk/UnitsOfMeasure.php 2011-10-17 09:14:05 UTC (rev 4723)
+++ trunk/UnitsOfMeasure.php 2011-10-17 09:29:33 UTC (rev 4724)
@@ -25,9 +25,9 @@
//first off validate inputs sensible
- if (mb_strpos($_POST['MeasureName'],'&')>0 OR mb_strpos($_POST['MeasureName'],"'")>0) {
+ if (ContainsIllegalCharacters($_POST['MeasureName'])) {
$InputError = 1;
- prnMsg( _('The unit of measure cannot contain the character') . " '&' " . _('or the character') ." '",'error');
+ prnMsg( _('The unit of measure cannot contain any of the illegal characters') ,'error');
}
if (trim($_POST['MeasureName']) == '') {
$InputError = 1;
@@ -81,11 +81,8 @@
$InputError = 1;
prnMsg( _('The unit of measure can not be created because another with the same name already exists.'),'error');
} else {
- $sql = "INSERT INTO unitsofmeasure (
- unitname )
- VALUES (
- '" . $_POST['MeasureName'] ."'
- )";
+ $sql = "INSERT INTO unitsofmeasure (unitname )
+ VALUES ('" . $_POST['MeasureName'] ."')";
}
$msg = _('New unit of measure added');
}
@@ -186,7 +183,7 @@
echo '<td>' . $myrow[1] . '</td>';
echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?SelectedMeasureID=' . $myrow[0] . '">' . _('Edit') . '</a></td>';
- echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?SelectedMeasureID=' . $myrow[0] . '&delete=1">' . _('Delete') .'</a></td>';
+ echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?SelectedMeasureID=' . $myrow[0] . '&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this unit of measure?') . '\');">' . _('Delete') .'</a></td>';
echo '</tr>';
} //END WHILE LIST LOOP
@@ -195,10 +192,12 @@
if (isset($SelectedMeasureID)) {
- echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Review Units of Measure') . '</a></div>';
+ echo '<div class="centre">
+ <a href="' . $_SERVER['PHP_SELF'] . '">' . _('Review Units of Measure') . '</a>
+ </div>';
}
-echo '<p>';
+echo '<p />';
if (! isset($_GET['delete'])) {
@@ -223,7 +222,7 @@
$_POST['MeasureID'] = $myrow['unitid'];
$_POST['MeasureName'] = $myrow['unitname'];
- echo '<input type="hidden" name="SelectedMeasureID" value="' . $_POST['MeasureID'] . '">';
+ echo '<input type="hidden" name="SelectedMeasureID" value="' . $_POST['MeasureID'] . '" />';
echo '<table class="selection">';
}
@@ -233,11 +232,13 @@
}
echo '<tr>
<td>' . _('Unit of Measure') . ':' . '</td>
- <td><input type="text" name="MeasureName" size="30" maxlength="30" value="' . $_POST['MeasureName'] . '"></td>
+ <td><input type="text" name="MeasureName" size="30" maxlength="30" value="' . $_POST['MeasureName'] . '" /></td>
</tr>';
echo '</table>';
- echo '<div class="centre"><input type="submit" name="Submit" value=' . _('Enter Information') . '></div>';
+ echo '<div class="centre">
+ <input type="submit" name="Submit" value=' . _('Enter Information') . '>
+ </div>';
echo '</form>';
Modified: trunk/UpgradeDatabase.php
===================================================================
--- trunk/UpgradeDatabase.php 2011-10-17 09:14:05 UTC (rev 4723)
+++ trunk/UpgradeDatabase.php 2011-10-17 09:29:33 UTC (rev 4724)
@@ -14,22 +14,26 @@
if (!isset($_SESSION['VersionNumber'])){
prnMsg(_('The webERP code is version') . ' ' . $Version . ' ' . _('and the database version is not actually recorded at this version'),'info');
- echo '<table><tr><td>' . _('Select the version you are upgrading from:') . '</td>
- <td><select name="OldVersion" >';
- echo '<option selected value="Manual">' . _('Apply database changes manually') . '</option>';
- echo '<option value="3.00">' . _('Version 3.00') . '</option>';
- echo '<option value="3.01">' . _('Version 3.01') . '</option>';
- echo '<option value="3.02">' . _('Version 3.02') . '</option>';
- echo '<option value="3.03">' . _('Version 3.03') . '</option>';
- echo '<option value="3.04">' . _('Version 3.04') . '</option>';
- echo '<option value="3.05">' . _('Version 3.05') . '</option>';
- echo '<option value="3.06">' . _('Version 3.06') . '</option>';
- echo '<option value="3.07">' . _('Version 3.07') . '</option>';
- echo '<option value="3.08">' . _('Version 3.08') . '</option>';
- echo '<option value="3.09">' . _('Version 3.09') . '</option>';
- echo '<option value="3.10">' . _('Version 3.10') . '</option>';
- echo '<option value="3.11.x">' . _('Version 3.11 or 4.01 - 4.02') . '</option>';
- echo '</select></td></tr></table>';
+ echo '<table class="selection">
+ <tr>
+ <td>' . _('Select the version you are upgrading from:') . '</td>
+ <td><select name="OldVersion" >
+ <option selected value="Manual">' . _('Apply database changes manually') . '</option>
+ <option value="3.00">' . _('Version 3.00') . '</option>
+ <option value="3.01">' . _('Version 3.01') . '</option>
+ <option value="3.02">' . _('Version 3.02') . '</option>
+ <option value="3.03">' . _('Version 3.03') . '</option>
+ <option value="3.04">' . _('Version 3.04') . '</option>
+ <option value="3.05">' . _('Version 3.05') . '</option>
+ <option value="3.06">' . _('Version 3.06') . '</option>
+ <option value="3.07">' . _('Version 3.07') . '</option>
+ <option value="3.08">' . _('Version 3.08') . '</option>
+ <option value="3.09">' . _('Version 3.09') . '</option>
+ <option value="3.10">' . _('Version 3.10') . '</option>
+ <option value="3.11.x">' . _('Version 3.11 or 4.01 - 4.02') . '</option>
+ </select></td>
+ </tr>
+ </table>';
} else {
if ($_SESSION['VersionNumber']=='4.00RC1'){
$_SESSION['VersionNumber']='3.12';
@@ -130,8 +134,11 @@
$ScriptFileEntries = sizeof($SQLEntries);
$sql ='';
$InAFunction = false;
- echo '<br /><table>
- <tr><th colspan=2>' . _('Applying') . ' ' . $SQLScriptFile . '</th></tr>';
+ echo '<br />
+ <table>
+ <tr>
+ <th colspan="2">' . _('Applying') . ' ' . $SQLScriptFile . '</th>
+ </tr>';
for ($i=0; $i<=$ScriptFileEntries; $i++) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|