From: <dai...@us...> - 2012-02-16 07:36:45
|
Revision: 4912 http://web-erp.svn.sourceforge.net/web-erp/?rev=4912&view=rev Author: daintree Date: 2012-02-16 07:36:36 +0000 (Thu, 16 Feb 2012) Log Message: ----------- Modified Paths: -------------- trunk/AccountGroups.php trunk/AccountSections.php trunk/AddCustomerContacts.php trunk/AddCustomerTypeNotes.php trunk/UpgradeDatabase.php trunk/index.php Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2012-02-15 16:52:21 UTC (rev 4911) +++ trunk/AccountGroups.php 2012-02-16 07:36:36 UTC (rev 4912) @@ -52,7 +52,8 @@ $i=1; $sql="SELECT count(groupname) - FROM accountgroups WHERE groupname='".$_POST['GroupName']."'"; + FROM accountgroups + WHERE groupname='".$_POST['GroupName']."'"; $DbgMsg = _('The SQL that was used to retrieve the information was'); $ErrMsg = _('Could not check whether the group exists because'); @@ -115,7 +116,7 @@ $Errors[$i] = 'SequenceInTB'; $i++; } - if (!ctype_digit($_POST['SequenceInTB']) or $_POST['SequenceInTB'] > 10000) { + if (!ctype_digit($_POST['SequenceInTB']) OR $_POST['SequenceInTB'] > 10000) { $InputError = 1; prnMsg( _('The sequence in the TB must be numeric and less than') . ' 10,000','error'); $Errors[$i] = 'SequenceInTB'; Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2012-02-15 16:52:21 UTC (rev 4911) +++ trunk/AccountSections.php 2012-02-16 07:36:36 UTC (rev 4912) @@ -14,9 +14,8 @@ if( DB_num_rows($result) == 0 ) { $sql = "INSERT INTO accountsection (sectionid, - sectionname - ) VALUES ( - 1, + sectionname) + VALUES (1, 'Income')"; $result = DB_query($sql,$db); } @@ -26,9 +25,8 @@ if( DB_num_rows($result) == 0 ) { $sql = "INSERT INTO accountsection (sectionid, - sectionname - ) VALUES ( - 2, + sectionname) + VALUES (2, 'Cost Of Sales')"; $result = DB_query($sql,$db); } @@ -58,7 +56,7 @@ WHERE sectionid='".$_POST['SectionID']."'"; $result=DB_query($sql, $db); - if ((DB_num_rows($result)!=0 and !isset($_POST['SelectedSectionID']))) { + if ((DB_num_rows($result)!=0 AND !isset($_POST['SelectedSectionID']))) { $InputError = 1; prnMsg( _('The account section already exists in the database'),'error'); $Errors[$i] = 'SectionID'; @@ -77,20 +75,20 @@ $Errors[$i] = 'SectionName'; $i++; } - if (isset($_POST['SectionID']) and (!is_numeric($_POST['SectionID']))) { + if (isset($_POST['SectionID']) AND (!is_numeric($_POST['SectionID']))) { $InputError = 1; prnMsg( _('The section number must be an integer'),'error'); $Errors[$i] = 'SectionID'; $i++; } - if (isset($_POST['SectionID']) and mb_strpos($_POST['SectionID'],".")>0) { + if (isset($_POST['SectionID']) AND mb_strpos($_POST['SectionID'],".")>0) { $InputError = 1; prnMsg( _('The section number must be an integer'),'error'); $Errors[$i] = 'SectionID'; $i++; } - if (isset($_POST['SelectedSectionID']) and $_POST['SelectedSectionID']!='' AND $InputError !=1) { + if (isset($_POST['SelectedSectionID']) AND $_POST['SelectedSectionID']!='' AND $InputError !=1) { /*SelectedSectionID could also exist if submit had not been clicked this code would not run in this case cos submit is false of course see the delete code below*/ @@ -149,7 +147,7 @@ unset ($_POST['SectionName']); } -if (!isset($_GET['SelectedSectionID']) and !isset($_POST['SelectedSectionID'])) { +if (!isset($_GET['SelectedSectionID']) AND !isset($_POST['SelectedSectionID'])) { /* An account section could be posted when one has been edited and is being updated or GOT when selected for modification Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php 2012-02-15 16:52:21 UTC (rev 4911) +++ trunk/AddCustomerContacts.php 2012-02-16 07:36:36 UTC (rev 4912) @@ -34,7 +34,7 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - if (isset($_POST['Con_ID']) and !is_long((integer)$_POST['Con_ID'])) { + if (isset($_POST['Con_ID']) AND !is_long((integer)$_POST['Con_ID'])) { $InputError = 1; prnMsg( _('The Contact ID must be an integer.'), 'error'); } elseif (mb_strlen($_POST['ContactName']) >40) { @@ -43,12 +43,12 @@ } elseif( trim($_POST['ContactName']) == '' ) { $InputError = 1; prnMsg( _('The contact name may not be empty'), 'error'); - } elseif (!IsEmailAddress($_POST['ContactEmail']) and mb_strlen($_POST['ContactEmail'])>0){ + } elseif (!IsEmailAddress($_POST['ContactEmail']) AND mb_strlen($_POST['ContactEmail'])>0){ $InputError = 1; prnMsg( _('The contact email address is not a valid email address'), 'error'); } - if (isset($Id) and ($Id and $InputError !=1)) { + if (isset($Id) AND ($Id AND $InputError !=1)) { $sql = "UPDATE custcontacts SET contactname='" . $_POST['ContactName'] . "', role='" . $_POST['ContactRole'] . "', phoneno='" . $_POST['ContactPhone'] . "', @@ -89,7 +89,7 @@ unset($_POST['ContactEmail']); unset($_POST['Con_ID']); } -} elseif (isset($_GET['delete']) and $_GET['delete']) { +} elseif (isset($_GET['delete']) AND $_GET['delete']) { //the link to delete a selected record was clicked instead of the submit button // PREVENT DELETES IF DEPENDENT RECORDS IN 'SalesOrders' @@ -127,7 +127,8 @@ <th>' . _('Role') . '</th> <th>' . _('Phone no') . '</th> <th>' . _('Email') . '</th> - <th>' . _('Notes') . '</th>'; + <th>' . _('Notes') . '</th> + </tr>'; $k=0; //row colour counter @@ -208,7 +209,8 @@ echo '<table class="selection">'; } - echo '<tr><td>'. _('Contact Name') . '</td>'; + echo '<tr> + <td>'. _('Contact Name') . '</td>'; if (isset($_POST['ContactName'])) { echo '<td><input type="text" name="ContactName" value="' . $_POST['ContactName']. '" size="35" maxlength="40" /></td> </tr>'; @@ -225,7 +227,8 @@ echo '<td><input type="text" name="ContactRole" size="35" maxlength="40" /></td> </tr>'; } - echo '<tr><td>' . _('Phone') . '</td>'; + echo '<tr> + <td>' . _('Phone') . '</td>'; if (isset($_POST['ContactPhone'])) { echo '<td><input type="text" name="ContactPhone" value="' . $_POST['ContactPhone'] . '" size="35" maxlength="40" /></td> </tr>'; Modified: trunk/AddCustomerTypeNotes.php =================================================================== --- trunk/AddCustomerTypeNotes.php 2012-02-15 16:52:21 UTC (rev 4911) +++ trunk/AddCustomerTypeNotes.php 2012-02-16 07:36:36 UTC (rev 4912) @@ -111,7 +111,8 @@ <th>' . _('Date') . '</th> <th>' . _('Note') . '</th> <th>' . _('href') . '</th> - <th>' . _('Priority') . '</th>'; + <th>' . _('Priority') . '</th> + </tr>'; $k=0; //row colour counter Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2012-02-15 16:52:21 UTC (rev 4911) +++ trunk/UpgradeDatabase.php 2012-02-16 07:36:36 UTC (rev 4912) @@ -133,9 +133,9 @@ $SQLScripts[] = './sql/mysql/upgrade4.05-4.06.sql'; case '4.06.6': $SQLScripts[] = './sql/mysql/upgrade4.06-4.07.sql'; - case '4.06.7': + case '4.07.0': $SQLScripts[] = './sql/mysql/upgrade4.07-4.08.sql'; - case '4.07.0': + case '4.08': break; } //end switch } Modified: trunk/index.php =================================================================== --- trunk/index.php 2012-02-15 16:52:21 UTC (rev 4911) +++ trunk/index.php 2012-02-16 07:36:36 UTC (rev 4912) @@ -8,7 +8,7 @@ /*The module link codes are hard coded in a switch statement below to determine the options to show for each tab */ include('includes/IndexArray.php'); -if (isset($SupplierLogin) and $SupplierLogin==1){ +if (isset($SupplierLogin) AND $SupplierLogin==1){ echo '<table class="table_index"> <tr> <td class="menu_group_item"> @@ -28,7 +28,7 @@ </table>'; include('includes/footer.inc'); exit; -} elseif (isset($SupplierLogin) and $SupplierLogin==0){ +} elseif (isset($SupplierLogin) AND $SupplierLogin==0){ echo '<table class="table_index"> <tr> <td class="menu_group_item"> @@ -72,9 +72,13 @@ $_SESSION['Module']=$ModuleLink[$i]; } if ($ModuleLink[$i] == $_SESSION['Module']){ - echo '<tr><td class="main_menu_selected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td></tr>'; + echo '<tr> + <td class="main_menu_selected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td> + </tr>'; } else { - echo '<tr><td class="main_menu_unselected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td></tr>'; + echo '<tr> + <td class="main_menu_unselected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td> + </tr>'; } } $i++; @@ -199,13 +203,13 @@ $Title= array(_('Custom Reports'), _('Standard Reports and Forms')); $sql= "SELECT id, - reporttype, - defaultreport, - groupname, - reportname - FROM reports - ORDER BY groupname, - reportname"; + reporttype, + defaultreport, + groupname, + reportname + FROM reports + ORDER BY groupname, + reportname"; $Result=DB_query($sql,$db,'','',false,true); $ReportList = ''; while ($Temp = DB_fetch_array($Result)) $ReportList[] = $Temp; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |