| 
      
      
      From: <dai...@us...> - 2011-03-26 03:34:03
      
     | 
| Revision: 4517
          http://web-erp.svn.sourceforge.net/web-erp/?rev=4517&view=rev
Author:   daintree
Date:     2011-03-26 03:33:53 +0000 (Sat, 26 Mar 2011)
Log Message:
-----------
pre 4.03 release
Modified Paths:
--------------
    trunk/PcExpenses.php
    trunk/PcExpensesTypeTab.php
    trunk/PcTypeTabs.php
    trunk/doc/Change.log.html
    trunk/doc/Manual/ManualContents.php
    trunk/includes/session.inc
    trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo
    trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po
    trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo
    trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po
    trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo
    trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po
    trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot
    trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo
    trunk/locale/en_US.utf8/LC_MESSAGES/messages.po
    trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo
    trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po
    trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo
    trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po
    trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo
    trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po
    trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo
    trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po
    trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo
    trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po
    trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo
    trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po
    trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo
    trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po
    trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo
    trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po
    trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo
    trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po
    trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo
    trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po
    trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo
    trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po
    trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo
    trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po
    trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo
    trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po
    trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo
    trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po
    trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo
    trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po
    trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo
    trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po
    trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo
    trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po
    trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo
    trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po
    trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo
    trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po
    trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo
    trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po
    trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo
    trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po
    trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo
    trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po
    trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo
    trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po
    trunk/sql/mysql/upgrade3.11.1-4.00.sql
    trunk/sql/mysql/weberp-demo.sql
    trunk/sql/mysql/weberp-new.sql
Added Paths:
-----------
    trunk/companies/weberpdemo/logo.jpg
Removed Paths:
-------------
    trunk/companies/weberpdemo/logo.jpg
    trunk/companies/weberpdemo/logo.png
    trunk/companies/weberpdemo/logo1.jpg
    trunk/companies/weberpdemo/logo2.jpg
    trunk/companies/weberpdemo/logo4.jpg
    trunk/companies/weberpdemo/logo5.jpg
    trunk/companies/weberpdemo/logo6.jpg
    trunk/companies/weberpdemo/logo7.jpg
Modified: trunk/PcExpenses.php
===================================================================
--- trunk/PcExpenses.php	2011-03-24 09:12:22 UTC (rev 4516)
+++ trunk/PcExpenses.php	2011-03-26 03:33:53 UTC (rev 4517)
@@ -35,19 +35,29 @@
 
 	if ($_POST['codeexpense']=='' OR $_POST['codeexpense']==' ' OR $_POST['codeexpense']=='  ') {
 		$InputError = 1;
-		prnMsg('<br>' . _('The Expense type  code cannot be an empty string or spaces'),'error');
+		prnMsg(_('The Expense type  code cannot be an empty string or spaces'),'error');
 		$Errors[$i] = 'PcExpenses';
 		$i++;
 	} elseif (strlen($_POST['codeexpense']) >20) {
 		$InputError = 1;
-		echo prnMsg(_('The Expense code must be twenty characters or less long'),'error');
+		prnMsg(_('The Expense code must be twenty characters or less long'),'error');
 		$Errors[$i] = 'PcExpenses';
 		$i++;
-	}elseif (strlen($_POST['description']) >50) {
+	}elseif (ContainsIllegalCharacters($_POST['codeexpense'])){
 		$InputError = 1;
-		echo prnMsg(_('The tab code must be Fifty characters or less long'),'error');
+		prnMsg(_('The Expense code cannot contain any of the following characters " \' - &'),'error');
+		$Errors[$i] = 'PcExpenses';
+		$i++;
+	} elseif (ContainsIllegalCharacters($_POST['description'])){
+		$InputError = 1;
+		prnMsg(_('The Expense description cannot contain any of the following characters " \' - &'),'error');
 		$Errors[$i] = 'TypeTabCode';
 		$i++;
+	} elseif (strlen($_POST['description']) >50) {
+		$InputError = 1;
+		prnMsg(_('The tab code must be Fifty characters or less long'),'error');
+		$Errors[$i] = 'TypeTabCode';
+		$i++;
 	}
 
 	if (isset($SelectedExpense) AND $InputError !=1) {
@@ -71,7 +81,7 @@
 
 		if ( $checkrow[0] > 0 ) {
 			$InputError = 1;
-			prnMsg( _('The Expense type ') . $_POST['codeexpense'] . _(' already exist.'),'error');
+			prnMsg( _('The Expense type ') . $_POST['codeexpense'] . _(' already exists.'),'error');
 		} else {
 
 			// Add new record on submit
Modified: trunk/PcExpensesTypeTab.php
===================================================================
--- trunk/PcExpensesTypeTab.php	2011-03-24 09:12:22 UTC (rev 4516)
+++ trunk/PcExpensesTypeTab.php	2011-03-26 03:33:53 UTC (rev 4517)
@@ -15,7 +15,10 @@
 } elseif (isset($_GET['SelectedType'])){
 	$SelectedType = strtoupper($_GET['SelectedType']);
 }
-
+if (ContainsIllegalCharacters($SelectedType) OR strpos($SelectedType,' ')>0){
+	$InputError = 1;
+	prnMsg(_('The petty cash tab type contain any of the following characters " \' - & or a space'),'error');
+} 
 if (isset($_POST['SelectedTabs'])){
 	$SelectedTabs = strtoupper($_POST['SelectedTabs']);
 } elseif (isset($_GET['SelectedTabs'])){
@@ -162,8 +165,8 @@
 		</tr>",
 		$myrow[0],
 		$myrow[1],
-		$_SERVER['PHP_SELF'] . '?' . SID, $myrow[0],
-		$_SERVER['PHP_SELF'] . '?' . SID, $myrow[0]);
+		$_SERVER['PHP_SELF'], $myrow[0],
+		$_SERVER['PHP_SELF'], $myrow[0]);
 	}
 	//END WHILE LIST LOOP
 	echo '</table>';
@@ -173,7 +176,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'] . '" />';
 	echo '<br /><table  class=selection>'; //Main table
 
Modified: trunk/PcTypeTabs.php
===================================================================
--- trunk/PcTypeTabs.php	2011-03-24 09:12:22 UTC (rev 4516)
+++ trunk/PcTypeTabs.php	2011-03-26 03:33:53 UTC (rev 4517)
@@ -33,18 +33,21 @@
 	//first off validate inputs sensible
 	$i=1;
 
-	if ($_POST['typetabcode']=='' OR $_POST['typetabcode']==' ' OR $_POST['typetabcode']=='  ') {
+	if ($_POST['TypeTabCode']=='' OR $_POST['TypeTabCode']==' ' OR $_POST['TypeTabCode']=='  ') {
 		$InputError = 1;
 		prnMsg('<br>' . _('The Tabs type code cannot be an empty string or spaces'),'error');
 		$Errors[$i] = 'TypeTabCode';
 		$i++;
-	} elseif (strlen($_POST['typetabcode']) >20) {
+	} elseif (strlen($_POST['TypeTabCode']) >20) {
 		$InputError = 1;
 		echo prnMsg(_('The tab code must be twenty characters or less long'),'error');
 		$Errors[$i] = 'TypeTabCode';
 		$i++;
-	}elseif (strlen($_POST['typetabdescription']) >50) {
+	}elseif (ContainsIllegalCharacters($_POST['TypeTabCode']) OR strpos($_POST['TypeTabCode'],' ')>0){
 		$InputError = 1;
+		prnMsg(_('The petty cash tab type code cannot contain any of the following characters " \' - & or a space'),'error');
+	} elseif (strlen($_POST['TypeTabDescription']) >50) {
+		$InputError = 1;
 		echo prnMsg(_('The tab code must be Fifty characters or less long'),'error');
 		$Errors[$i] = 'TypeTabCode';
 		$i++;
@@ -53,7 +56,7 @@
 	if (isset($SelectedTab) AND $InputError !=1) {
 
 		$sql = "UPDATE pctypetabs
-			SET typetabdescription = '" . $_POST['typetabdescription'] . "'
+			SET typetabdescription = '" . $_POST['TypeTabDescription'] . "'
 			WHERE typetabcode = '".$SelectedTab."'";
 
 		$msg = _('The Tabs type') . ' ' . $SelectedTab . ' ' .  _('has been updated');
@@ -63,7 +66,7 @@
 
 		$checkSql = "SELECT count(*)
 				 FROM pctypetabs
-				 WHERE typetabcode = '" . $_POST['typetabcode'] . "'";
+				 WHERE typetabcode = '" . $_POST['TypeTabCode'] . "'";
 
 		$checkresult = DB_query($checkSql,$db);
 		$checkrow = DB_fetch_row($checkresult);
@@ -78,10 +81,10 @@
 			$sql = "INSERT INTO pctypetabs
 						(typetabcode,
 			 			 typetabdescription)
-				VALUES ('" . $_POST['typetabcode'] . "',
-					'" . $_POST['typetabdescription'] . "')";
+				VALUES ('" . $_POST['TypeTabCode'] . "',
+					'" . $_POST['TypeTabDescription'] . "')";
 
-			$msg = _('Tabs type') . ' ' . $_POST["typetabcode"] .  ' ' . _('has been created');
+			$msg = _('Tabs type') . ' ' . $_POST['TypeTabCode'] .  ' ' . _('has been created');
 
 		}
 	}
@@ -92,35 +95,35 @@
 		prnMsg($msg,'success');
 
 		unset($SelectedTab);
-		unset($_POST['typetabcode']);
-		unset($_POST['typetabdescription']);
+		unset($_POST['TypeTabCode']);
+		unset($_POST['TypeTabDescription']);
 	}
 
 } elseif ( isset($_GET['delete']) ) {
 
 	// PREVENT DELETES IF DEPENDENT RECORDS IN 'PcTabExpenses'
 
-	$sqlpctabexpenses= "SELECT COUNT(*)
+	$SQLPcTabExpenses= "SELECT COUNT(*)
 		FROM pctabexpenses
 		WHERE typetabcode='".$SelectedTab."'";
 
 	$ErrMsg = _('The number of tabs using this Tab type could not be retrieved');
-	$resultpctabexpenses = DB_query($sqlpctabexpenses,$db,$ErrMsg);
+	$ResultPcTabExpenses = DB_query($SQLPcTabExpenses,$db,$ErrMsg);
 
-	$myrowpctabexpenses = DB_fetch_row($resultpctabexpenses);
+	$myrowPcTabExpenses = DB_fetch_row($ResultPcTabExpenses);
 
-	$sqlpctabs= "SELECT COUNT(*)
+	$SqlPcTabs= "SELECT COUNT(*)
 		FROM pctabs
 		WHERE typetabcode='".$SelectedTab."'";
 
 	$ErrMsg = _('The number of tabs using this Tab type could not be retrieved');
-	$resultpctabs = DB_query($sqlpctabs,$db,$ErrMsg);
+	$ResultPcTabs = DB_query($SqlPcTabs,$db,$ErrMsg);
 
-	$myrowpctabs = DB_fetch_row($resultpctabs);
-	if ($myrowpctabexpenses[0]>0 or $myrowpctabs[0]>0) {
+	$myrowPcTabs = DB_fetch_row($ResultPcTabs);
+	if ($myrowPcTabExpenses[0]>0 or $myrowPcTabs[0]>0) {
 		prnMsg(_('Cannot delete this tab type because tabs have been created using this tab type'),'error');
 		echo '<br>';
-		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'] . '" />';
 		echo '<p><div class="centre"><input type=submit name=return VALUE="' . _('Return to list of tab types') . '"></div>';
 		echo '</form>';
@@ -150,10 +153,10 @@
 	$result = DB_query($sql,$db);
 
 	echo '<table class=selection>';
-	echo "<tr>
-		<th>" . _('Type Of Tab') . "</th>
-		<th>" . _('Description') . "</th>
-	</tr>";
+	echo '<tr>
+		<th>' . _('Type Of Tab') . '</th>
+		<th>' . _('Description') . '</th>
+	</tr>';
 
 $k=0; //row colour counter
 
@@ -173,8 +176,8 @@
 		</tr>",
 		$myrow['0'],
 		$myrow['1'],
-		$_SERVER['PHP_SELF'] . '?' . SID, $myrow['0'],
-		$_SERVER['PHP_SELF'] . '?' . SID, $myrow['0']);
+		$_SERVER['PHP_SELF']. '?', $myrow['0'],
+		$_SERVER['PHP_SELF']. '?', $myrow['0']);
 	}
 	//END WHILE LIST LOOP
 	echo '</table>';
@@ -183,11 +186,11 @@
 //end of ifs and buts!
 if (isset($SelectedTab)) {
 
-	echo '<p><div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '">' . _('Show All Types Tabs Defined') . '</a></div><p>';
+	echo '<p><div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Show All Types Tabs Defined') . '</a></div><p>';
 }
 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'] . '" />';
 	echo '<p><table class=selection>'; //Main table
 
@@ -202,30 +205,30 @@
 		$result = DB_query($sql, $db);
 		$myrow = DB_fetch_array($result);
 
-		$_POST['typetabcode'] = $myrow['typetabcode'];
-		$_POST['typetabdescription']  = $myrow['typetabdescription'];
+		$_POST['TypeTabCode'] = $myrow['typetabcode'];
+		$_POST['TypeTabDescription']  = $myrow['typetabdescription'];
 
 		echo "<input type=hidden name='SelectedTab' VALUE=" . $SelectedTab . ">";
-		echo "<input type=hidden name='typetabcode' VALUE=" . $_POST['typetabcode']. ">";
+		echo "<input type=hidden name='TypeTabCode' VALUE=" . $_POST['TypeTabCode']. ">";
 		echo "<table> <tr><td>" . _('Code Of Type Of Tab') . ":</td><td>";
 
 		// We dont allow the user to change an existing type code
 
-		echo $_POST['typetabcode'] . '</td></tr>';
+		echo $_POST['TypeTabCode'] . '</td></tr>';
 
 	} else 	{
 
 		// This is a new type so the user may volunteer a type code
 
 		echo "<table class=selection><tr><td>" . _('Code Of Type Of Tab') . ":</td><td><input type='Text'
-				" . (in_array('TypeTabCode',$Errors) ? 'class="inputerror"' : '' ) ." name='typetabcode'></td></tr>";
+				" . (in_array('TypeTabCode',$Errors) ? 'class="inputerror"' : '' ) ." name='TypeTabCode'></td></tr>";
 
 	}
 
-	if (!isset($_POST['typetabdescription'])) {
-		$_POST['typetabdescription']='';
+	if (!isset($_POST['TypeTabDescription'])) {
+		$_POST['TypeTabDescription']='';
 	}
-	echo "<tr><td>" . _('Description Of Type of Tab') . ":</td><td><input type='Text' name='typetabdescription' size=50 maxlength=49 value='" . $_POST['typetabdescription'] . "'></td></tr>";
+	echo "<tr><td>" . _('Description Of Type of Tab') . ":</td><td><input type='Text' name='TypeTabDescription' size=50 maxlength=49 value='" . $_POST['TypeTabDescription'] . "'></td></tr>";
 
 	echo '</td></tr></table>'; // close main table
 
Deleted: trunk/companies/weberpdemo/logo.jpg
===================================================================
(Binary files differ)
Copied: trunk/companies/weberpdemo/logo.jpg (from rev 4516, trunk/companies/weberpdemo/logo2.jpg)
===================================================================
(Binary files differ)
Deleted: trunk/companies/weberpdemo/logo.png
===================================================================
--- trunk/companies/weberpdemo/logo.png	2011-03-24 09:12:22 UTC (rev 4516)
+++ trunk/companies/weberpdemo/logo.png	2011-03-26 03:33:53 UTC (rev 4517)
@@ -1,678 +0,0 @@
-\x89PNG
-
- |