Thread: [Weberp-svn] SF.net SVN: weberp:[5161] trunk (Page 4)
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2011-04-10 09:15:19
|
Revision: 5161 http://weberp.svn.sourceforge.net/weberp/?rev=5161&view=rev Author: tim_schofield Date: 2011-04-10 09:15:12 +0000 (Sun, 10 Apr 2011) Log Message: ----------- XHTML updates and quoting changes Modified Paths: -------------- trunk/SuppLoginSetup.php trunk/SuppPriceList.php trunk/SuppShiptChgs.php trunk/SuppTransGLAnalysis.php trunk/SupplierTenders.php trunk/SupplierTransInquiry.php trunk/SupplierTypes.php trunk/SystemParameters.php trunk/TaxAuthorities.php trunk/TaxCategories.php Modified: trunk/SuppLoginSetup.php =================================================================== --- trunk/SuppLoginSetup.php 2011-04-09 20:02:49 UTC (rev 5160) +++ trunk/SuppLoginSetup.php 2011-04-10 09:15:12 UTC (rev 5161) @@ -20,7 +20,7 @@ _('Petty Cash'), _('Setup')); -echo "<a href='" . $rootpath . '/SelectSupplier.php?' . SID . "'>" . _('Back to Suppliers') . '</a><br>'; +echo '<a href="' . $rootpath . '/SelectSupplier.php?' . SID . '">' . _('Back to Suppliers') . '</a><br>'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Supplier') . '" alt="" />' . ' ' . _('Supplier') . ' : ' . $_SESSION['SupplierID'] . _(' has been selected') . '</p><br />'; //echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/group_add.png" title="' . _('Search') . '" alt="">' . ' ' . $title.'<br>'; @@ -79,7 +79,7 @@ prnMsg(_('The user ID entered must be at least 4 characters long'),'error'); } elseif (ContainsIllegalCharacters($_POST['UserID'])) { $InputError = 1; - prnMsg(_('User names cannot contain any of the following characters') . " - ' & + \" \\ " . _('or a space'),'error'); + prnMsg(_('User names cannot contain any illegal characters'),'error'); } elseif (strlen($_POST['Password'])<5){ if (!$SelectedUser){ $InputError = 1; @@ -101,7 +101,7 @@ $i=0; $ModulesAllowed = ''; while ($i < count($ModuleList)){ - $FormVbl = "Module_" . $i; + $FormVbl = 'Module_' . $i; $ModulesAllowed .= $_POST[($FormVbl)] . ','; $i++; } @@ -234,17 +234,17 @@ $result = DB_query($sql,$db); echo '<table class=selection>'; - echo "<tr><th>" . _('User Login') . "</th> - <th>" . _('Full Name') . "</th> - <th>" . _('Telephone') . "</th> - <th>" . _('Email') . "</th> - <th>" . _('Supplier Code') . "</th> - <th>" . _('Last Visit') . "</th> - <th>" . _('Security Role') ."</th> - <th>" . _('Report Size') ."</th> - <th>" . _('Theme') ."</th> - <th>" . _('Language') ."</th> - </tr>"; + echo '<tr><th>' . _('User Login') . '</th> + <th>' . _('Full Name') . '</th> + <th>' . _('Telephone') . '</th> + <th>' . _('Email') . '</th> + <th>' . _('Supplier Code') . '</th> + <th>' . _('Last Visit') . '</th> + <th>' . _('Security Role') .'</th> + <th>' . _('Report Size') .'</th> + <th>' . _('Theme') .'</th> + <th>' . _('Language') .'</th> + </tr>'; $k=0; //row colour counter @@ -261,19 +261,19 @@ /*The SecurityHeadings array is defined in config.php */ - echo "<td>".$myrow['userid']."</td> - <td>".$myrow['realname']."</td> - <td>".$myrow['phone']."</td> - <td>".$myrow['email']."</td> - <td>".$myrow['supplierid']."</td> - <td>".$LastVisitDate."</td> - <td>".$SecurityRoles[($myrow['fullaccess'])]."</td> - <td>".$myrow['pagesize']."</td> - <td>".$myrow['theme']."</td> - <td>".$myrow['language']."</td> - <td><a href=\"".$_SERVER['PHP_SELF'] . "?" . SID."&SelectedUser=".$myrow[0]."\">" . _('Edit') . "</a></td> - <td><a href=\"".$_SERVER['PHP_SELF'] . "?" . SID."&SelectedUser=".$myrow[0]."&delete=1\">" . _('Delete') . "</a></td> - </tr>"; + echo '<td>'.$myrow['userid'].'</td> + <td>'.$myrow['realname'].'</td> + <td>'.$myrow['phone'].'</td> + <td>'.$myrow['email'].'</td> + <td>'.$myrow['supplierid'].'</td> + <td>'.$LastVisitDate.'</td> + <td>'.$SecurityRoles[($myrow['fullaccess'])].'</td> + <td>'.$myrow['pagesize'].'</td> + <td>'.$myrow['theme'].'</td> + <td>'.$myrow['language'].'</td> + <td><a href="'.$_SERVER['PHP_SELF'] . '?SelectedUser='.$myrow[0].'">' . _('Edit') . '</a></td> + <td><a href="'.$_SERVER['PHP_SELF'] . '?SelectedUser='.$myrow[0].'&delete=1">' . _('Delete') . '</a></td> + </tr>'; } //END WHILE LIST LOOP echo '</table><br>'; @@ -281,10 +281,10 @@ if (isset($SelectedUser)) { - echo "<div class='centre'><a href='" . $_SERVER['PHP_SELF'] ."?" . SID . "'>" . _('Review Existing Users') . '</a></div><br>'; + echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] .'">' . _('Review Existing Users') . '</a></div><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'] . '" />'; if (isset($SelectedUser)) { @@ -324,16 +324,16 @@ $_POST['UserLanguage'] = $myrow['language']; $_POST['Blocked'] = $myrow['blocked']; - echo "<input type='hidden' name='SelectedUser' value='" . $SelectedUser . "'>"; - echo "<input type='hidden' name='UserID' value='" . $_POST['UserID'] . "'>"; - echo "<input type='hidden' name='ModulesAllowed' value='" . $_POST['ModulesAllowed'] . "'>"; + echo '<input type="hidden" name="SelectedUser" value="' . $SelectedUser . '">'; + echo '<input type="hidden" name="UserID" value="' . $_POST['UserID'] . '">'; + echo '<input type="hidden" name="ModulesAllowed" value="' . $_POST['ModulesAllowed'] . '">'; echo '<table class=selection> <tr><td>' . _('User code') . ':</td><td>'; echo $_POST['UserID'] . '</td></tr>'; } else { //end of if $SelectedUser only do the else when a new record is being entered - echo '<table class=selection><tr><td>' . _('User Login') . ":</td><td><input type='text' name='UserID' size=22 maxlength=20 ></td></tr>"; + echo '<table class=selection><tr><td>' . _('User Login') . ':</td><td><input type="text" name="UserID" size=22 maxlength=20 ></td></tr>'; /*set the default modules to show to all this had trapped a few people previously*/ @@ -362,28 +362,28 @@ if (!isset($_POST['Email'])) { $_POST['Email']=''; } -echo '<tr><td>' . _('Password') . ":</td> - <td><input type='password' name='Password' size=22 maxlength=20 value='" . $_POST['Password'] . "'></tr>"; -echo '<tr><td>' . _('Full Name') . ":</td> - <td><input type='text' name='RealName' value='" . $_POST['RealName'] . "' size=36 maxlength=35></td></tr>"; -echo '<tr><td>' . _('Telephone No') . ":</td> - <td><input type='text' name='Phone' value='" . $_POST['Phone'] . "' size=32 maxlength=30></td></tr>"; -echo '<tr><td>' . _('Email Address') .":</td> - <td><input type='text' name='Email' value='" . $_POST['Email'] ."' size=32 maxlength=55></td></tr>"; -echo '<tr><td>' . _('Security Role') . ":</td><td><select name='Access'>"; +echo '<tr><td>' . _('Password') . ':</td> + <td><input type="password" name="Password" size=22 maxlength=20 value="' . $_POST['Password'] . '"></tr>'; +echo '<tr><td>' . _('Full Name') . ':</td> + <td><input type="text" name="RealName" value="' . $_POST['RealName'] . '" size=36 maxlength=35></td></tr>'; +echo '<tr><td>' . _('Telephone No') . ':</td> + <td><input type="text" name="Phone" value="' . $_POST['Phone'] . '" size=32 maxlength=30></td></tr>'; +echo '<tr><td>' . _('Email Address') .':</td> + <td><input type="text" name="Email" value="' . $_POST['Email'] .'" size=32 maxlength=55></td></tr>'; +echo '<tr><td>' . _('Security Role') . ':</td><td><select name="Access">'; foreach ($SecurityRoles as $SecKey => $SecVal) { if (isset($_POST['Access']) and $SecKey == $_POST['Access']){ - echo "<option selected value=" . $SecKey . ">" . $SecVal; + echo '<option selected value="' . $SecKey . '">' . $SecVal . '</option>'; } else { - echo "<option value=" . $SecKey . ">" . $SecVal; + echo '<option value=' . $SecKey . '>' . $SecVal . '</option>'; } } echo '</select></td></tr>'; echo '<input type="hidden" name="ID" value="'.$_SESSION['UserID'].'">'; -echo '<tr><td>' . _('Default Location') . ":</td> - <td><select name='DefaultLocation'>"; +echo '<tr><td>' . _('Default Location') . ':</td> + <td><select name="DefaultLocation">'; $sql = "SELECT loccode, locationname FROM locations"; $result = DB_query($sql,$db); @@ -392,10 +392,10 @@ if (isset($_POST['DefaultLocation']) and $myrow['loccode'] == $_POST['DefaultLocation']){ - echo "<option selected value='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option selected value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo "<option Value='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } @@ -407,69 +407,69 @@ echo '<tr><td>'._('Supplier Code').':</td> <td>' . $_POST['Supp'] . '</td></tr>'; -echo '<tr><td>' . _('Reports Page Size') .":</td> - <td><select name='PageSize'>"; +echo '<tr><td>' . _('Reports Page Size') .':</td> + <td><select name="PageSize">'; if(isset($_POST['PageSize']) and $_POST['PageSize']=='A4'){ - echo "<option selected value='A4'>" . _('A4'); + echo '<option selected value="A4">' . _('A4') . '</option>'; } else { - echo "<option value='A4'>A4"; + echo '<option value="A4">A4' . '</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='A3'){ - echo "<option selected Value='A3'>" . _('A3'); + echo '<option selected Value="A3">' . _('A3') . '</option>'; } else { - echo "<option value='A3'>A3"; + echo '<option value="A3">A3' . '</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='A3_landscape'){ - echo "<option selected Value='A3_landscape'>" . _('A3') . ' ' . _('landscape'); + echo '<option selected Value="A3_landscape">' . _('A3') . ' ' . _('landscape') . '</option>'; } else { - echo "<option value='A3_landscape'>" . _('A3') . ' ' . _('landscape'); + echo '<option value="A3_landscape">' . _('A3') . ' ' . _('landscape') . '</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='letter'){ - echo "<option selected Value='letter'>" . _('Letter'); + echo '<option selected Value="letter">' . _('Letter') . '</option>'; } else { - echo "<option value='letter'>" . _('Letter'); + echo '<option value="letter">' . _('Letter') . '</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='letter_landscape'){ - echo "<option selected Value='letter_landscape'>" . _('Letter') . ' ' . _('landscape'); + echo '<option selected Value="letter_landscape">' . _('Letter') . ' ' . _('landscape') . '</option>'; } else { - echo "<option value='letter_landscape'>" . _('Letter') . ' ' . _('landscape'); + echo '<option value="letter_landscape">' . _('Letter') . ' ' . _('landscape') . '</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='legal'){ - echo "<option selected value='legal'>" . _('Legal'); + echo '<option selected value="legal">' . _('Legal') . '</option>'; } else { - echo "<option Value='legal'>" . _('Legal'); + echo '<option Value="legal2>' . _('Legal') . '</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='legal_landscape'){ - echo "<option selected value='legal_landscape'>" . _('Legal') . ' ' . _('landscape'); + echo '<option selected value="legal_landscape">' . _('Legal') . ' ' . _('landscape') . '</option>'; } else { - echo "<option value='legal_landscape'>" . _('Legal') . ' ' . _('landscape'); + echo '<option value="legal_landscape">' . _('Legal') . ' ' . _('landscape') . '</option>'; } echo '</select></td></tr>'; echo '<tr> - <td>' . _('Theme') . ":</td> - <td><select name='Theme'>"; + <td>' . _('Theme') . ':</td> + <td><select name="Theme">'; $ThemeDirectory = dir('css/'); while (false != ($ThemeName = $ThemeDirectory->read())){ - if (is_dir("css/$ThemeName") AND $ThemeName != '.' AND $ThemeName != '..' AND $ThemeName != 'CVS'){ + if (is_dir('css/' . $ThemeName ) AND $ThemeName != '.' AND $ThemeName != '..' AND $ThemeName != 'CVS'){ if (isset($_POST['Theme']) and $_POST['Theme'] == $ThemeName){ - echo "<option selected value='$ThemeName'>$ThemeName"; + echo '<option selected value="' . $ThemeName . '">$ThemeName'; } else if (!isset($_POST['Theme']) and ($_SESSION['DefaultTheme']==$ThemeName)) { - echo "<option selected value='$ThemeName'>$ThemeName"; + echo '<option selected value="' . $ThemeName . '">' . $ThemeName . '</option>'; } else { - echo "<option value='$ThemeName'>$ThemeName"; + echo '<option value="' . $ThemeName . '">' . $ThemeName . '</option>'; } } } @@ -478,8 +478,8 @@ echo '<tr> - <td>' . _('Language') . ":</td> - <td><select name='UserLanguage'>"; + <td>' . _('Language') . ':</td> + <td><select name="UserLanguage">'; $LangDirHandle = dir('locale/'); @@ -489,11 +489,11 @@ if (is_dir('locale/' . $LanguageEntry) AND $LanguageEntry != '..' AND $LanguageEntry != 'CVS' AND $LanguageEntry!='.'){ if (isset($_POST['UserLanguage']) and $_POST['UserLanguage'] == $LanguageEntry){ - echo "<option selected value='$LanguageEntry'>$LanguageEntry"; + echo '<option selected value="' . $LanguageEntry . '">' . $LanguageEntry . '</option>'; } elseif (!isset($_POST['UserLanguage']) and $LanguageEntry == $DefaultLanguage) { - echo "<option selected value='$LanguageEntry'>$LanguageEntry"; + echo '<option selected value="' . $LanguageEntry . '">' . $LanguageEntry . '</option>'; } else { - echo "<option value='$LanguageEntry'>$LanguageEntry"; + echo '<option value="' . $LanguageEntry . '>' . $LanguageEntry . '</option>'; } } } @@ -505,31 +505,31 @@ $i=0; foreach($ModuleList as $ModuleName){ - echo '<tr><td>' . _('Display') . ' ' . $ModuleName . ' ' . _('options') . ": </td><td><select name='Module_" . $i . "'>"; + echo '<tr><td>' . _('Display') . ' ' . $ModuleName . ' ' . _('options') . ': </td><td><select name="Module_' . $i . '">'; if ($ModulesAllowed[$i]==0){ - echo '<option selected value=0>' . _('No'); - echo '<option value=1>' . _('Yes'); + echo '<option selected value=0>' . _('No') . '</option>'; + echo '<option value=1>' . _('Yes') . '</option>'; } else { - echo '<option selected value=1>' . _('Yes'); - echo '<option value=0>' . _('No'); + echo '<option selected value=1>' . _('Yes') . '</option>'; + echo '<option value=0>' . _('No') . '</option>'; } echo '</select></td></tr>'; $i++; } -echo '<tr><td>' . _('Account Status') . ":</td><td><select name='Blocked'>"; +echo '<tr><td>' . _('Account Status') . ':</td><td><select name="Blocked">'; if ($_POST['Blocked']==0){ - echo '<option selected value=0>' . _('Open'); - echo '<option value=1>' . _('Blocked'); + echo '<option selected value=0>' . _('Open') . '</option>'; + echo '<option value=1>' . _('Blocked') . '</option>'; } else { - echo '<option selected value=1>' . _('Blocked'); - echo '<option value=0>' . _('Open'); + echo '<option selected value=1>' . _('Blocked') . '</option>'; + echo '<option value=0>' . _('Open') . '</option>'; } echo '</select></td></tr>'; -echo "</table><br> - <div class='centre'><input type='submit' name='submit' value='" . _('Enter Information') . "'></div></form>"; +echo '</table><br> + <div class="centre"><input type="submit" name="submit" value="' . _('Enter Information') . '"></div></form>'; if (isset($_GET['SelectedUser'])) { echo '<script type="text/javascript">defaultControl(document.forms[0].Password);</script>'; Modified: trunk/SuppPriceList.php =================================================================== --- trunk/SuppPriceList.php 2011-04-09 20:02:49 UTC (rev 5160) +++ trunk/SuppPriceList.php 2011-04-10 09:15:12 UTC (rev 5161) @@ -187,7 +187,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Purchase') . '" alt="" />' . ' ' . _('Supplier Price List') . '</p>'; echo '<div class="page_help_text">' . _('View the Price List from supplier') . '</div><br>'; - echo '<br/><form action=' . $_SERVER['PHP_SELF'] . " method='post'><table>"; + echo '<br/><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $sql = "SELECT supplierid,suppname FROM `suppliers`"; Modified: trunk/SuppShiptChgs.php =================================================================== --- trunk/SuppShiptChgs.php 2011-04-09 20:02:49 UTC (rev 5160) +++ trunk/SuppShiptChgs.php 2011-04-10 09:15:12 UTC (rev 5161) @@ -119,11 +119,10 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['ShiptSelection']) and $myrow['shiptref']==$_POST['ShiptSelection']) { - echo '<option selected VALUE='; + echo '<option selected VALUE="' . $myrow['shiptref'] . '">' . $myrow['shiptref'] . ' - ' . $myrow['vessel'] . ' ' . _('ETA') . ' ' . ConvertSQLDate($myrow['eta']) . ' ' . _('from') . ' ' . $myrow['suppname'] . '</option>';; } else { - echo '<option VALUE='; + echo '<option VALUE="' . $myrow['shiptref'] . '">' . $myrow['shiptref'] . ' - ' . $myrow['vessel'] . ' ' . _('ETA') . ' ' . ConvertSQLDate($myrow['eta']) . ' ' . _('from') . ' ' . $myrow['suppname'] . '</option>';; } - echo $myrow['shiptref'] . '>' . $myrow['shiptref'] . ' - ' . $myrow['vessel'] . ' ' . _('ETA') . ' ' . ConvertSQLDate($myrow['eta']) . ' ' . _('from') . ' ' . $myrow['suppname'] . '</option>'; } echo '</select></td></tr>'; Modified: trunk/SuppTransGLAnalysis.php =================================================================== --- trunk/SuppTransGLAnalysis.php 2011-04-09 20:02:49 UTC (rev 5160) +++ trunk/SuppTransGLAnalysis.php 2011-04-10 09:15:12 UTC (rev 5161) @@ -156,12 +156,10 @@ echo '<option value=""></option>'; while ($myrow = DB_fetch_array($result)) { if ($myrow['accountcode'] == $_POST['AcctSelection']) { - echo '<option selected VALUE='; + echo '<option selected VALUE="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; } else { - echo '<option VALUE='; + echo '<option VALUE="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; } - echo $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' - ' . $myrow['accountname']; - echo '</option>'; } echo '</select> Modified: trunk/SupplierTenders.php =================================================================== --- trunk/SupplierTenders.php 2011-04-09 20:02:49 UTC (rev 5160) +++ trunk/SupplierTenders.php 2011-04-10 09:15:12 UTC (rev 5161) @@ -141,7 +141,7 @@ if (isset($_SESSION['offer'])) { unset($_SESSION['offer']); } - 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 class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/supplier.png" title="' . _('Tenders') . '" alt="" />' . ' ' . _('Create or View Offers from') . ' '.$Supplier.'</p>'; @@ -152,7 +152,7 @@ echo '<option value=2>'._('Create a new offer from').' '.$Supplier .'</option>'; echo '<option value=3>'._('View any open tenders without an offer from').' '.$Supplier .'</option>'; echo '</select></td></tr>'; - echo '<input type=hidden name=SupplierID value="'.$_POST['SupplierID'].'"'; + echo '<input type=hidden name=SupplierID value="'.$_POST['SupplierID'].'" />'; echo '<tr><td colspan=2><div class=centre><input type="submit" name="submit" value="' . _('Select') . '"></div></td></tr>'; echo '</table></form>'; } Modified: trunk/SupplierTransInquiry.php =================================================================== --- trunk/SupplierTransInquiry.php 2011-04-09 20:02:49 UTC (rev 5160) +++ trunk/SupplierTransInquiry.php 2011-04-10 09:15:12 UTC (rev 5161) @@ -11,26 +11,26 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; -echo "<form action='" . $_SERVER['PHP_SELF'] . "' method=post>"; +echo '<form action="' . $_SERVER['PHP_SELF'] . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table cellpadding=2 class=selection><tr>'; -echo '<td>' . _('Type') . ":</td><td><select name='TransType'> "; +echo '<td>' . _('Type') . ':</td><td><select name="TransType"> '; $sql = "SELECT typeid, typename FROM systypes WHERE typeid >= 20 AND typeid <= 23"; $resultTypes = DB_query($sql,$db); -echo "<option Value='All'> All"; +echo '<option Value="All"> All </option>'; while ($myrow=DB_fetch_array($resultTypes)){ if (isset($_POST['TransType'])){ if ($myrow['typeid'] == $_POST['TransType']){ - echo "<option selected Value='" . $myrow['typeid'] . "'>" . $myrow['typename']; + echo '<option selected Value="' . $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } else { - echo "<option Value='" . $myrow['typeid'] . "'>" . $myrow['typename']; + echo '<option Value="' . $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } } else { - echo "<option Value='" . $myrow['typeid'] . "'>" . $myrow['typename']; + echo '<option Value="' . $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } } echo '</select></td>'; @@ -41,10 +41,10 @@ if (!isset($_POST['ToDate'])){ $_POST['ToDate'] = Date($_SESSION['DefaultDateFormat']); } -echo '<td>' . _('From') . ":</td><td><input type=TEXT class='date' alt='".$_SESSION['DefaultDateFormat']. "' name='FromDate' maxlength=10 size=11 VALUE=" . $_POST['FromDate'] . '></td>'; -echo '<td>' . _('To') . ":</td><td><input type=TEXT class='date' alt='".$_SESSION['DefaultDateFormat']. "' name='ToDate' maxlength=10 size=11 VALUE=" . $_POST['ToDate'] . '></td>'; +echo '<td>' . _('From') . ':</td><td><input type=TEXT class="date" alt="'.$_SESSION['DefaultDateFormat']. '" name="FromDate" maxlength=10 size=11 VALUE="' . $_POST['FromDate'] . '"></td>'; +echo '<td>' . _('To') . ':</td><td><input type=TEXT class="date" alt="'.$_SESSION['DefaultDateFormat']. '" name="ToDate" maxlength=10 size=11 VALUE="' . $_POST['ToDate'] . '"></td>'; -echo "</tr></table><br /><div class='centre'><input type=submit name='ShowResults' VALUE='" . _('Show Transactions') . "'>"; +echo '</tr></table><br /><div class="centre"><input type=submit name="ShowResults" VALUE="' . _('Show Transactions') . '">'; echo '</form></div><br />'; @@ -72,7 +72,7 @@ $sql = $sql . "trandate >='" . $SQL_FromDate . "' AND trandate <= '" . $SQL_ToDate . "'"; if ($_POST['TransType']!='All') { - $sql .= " AND type = " . $_POST['TransType']; + $sql .= " AND type = '" . $_POST['TransType'] . "'"; } $sql .= " ORDER BY id"; @@ -82,17 +82,17 @@ echo '<table cellpadding=2 class=selection>'; - $tableheader = "<tr> - <th>" . _('Type') . "</th> - <th>" . _('Number') . "</th> - <th>" . _('Supp Ref') . "</th> - <th>" . _('Date') . "</th> - <th>" . _('Supplier') . "</th> - <th>" . _('Comments') . "</th> - <th>" . _('Due Date') . "</th> - <th>" . _('Ex Rate') . "</th> - <th>" . _('Amount') . "</th> - <th>" . _('Currency') . '</th></tr>'; + $tableheader = '<tr> + <th>' . _('Type') . '</th> + <th>' . _('Number') . '</th> + <th>' . _('Supp Ref') . '</th> + <th>' . _('Date') . '</th> + <th>' . _('Supplier') . '</th> + <th>' . _('Comments') . '</th> + <th>' . _('Due Date') . '</th> + <th>' . _('Ex Rate') . '</th> + <th>' . _('Amount') . '</th> + <th>' . _('Currency') . '</th></tr>'; echo $tableheader; $RowCounter = 1; @@ -108,7 +108,7 @@ $k++; } - printf ("<td>%s</td> + printf ('<td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> @@ -117,7 +117,7 @@ <td>%s</td> <td class=number>%s</td> <td class=number>%s</td> - <td>%s</td></tr>", + <td>%s</td></tr>', $myrow['typename'], $myrow['transno'], $myrow['suppreference'], Modified: trunk/SupplierTypes.php =================================================================== --- trunk/SupplierTypes.php 2011-04-09 20:02:49 UTC (rev 5160) +++ trunk/SupplierTypes.php 2011-04-10 09:15:12 UTC (rev 5161) @@ -186,17 +186,17 @@ $k=1; } - printf(" + printf(' <td>%s</td> <td>%s</td> - <td><a href='%sSelectedType=%s'>" . _('Edit') . "</td> - <td><a href='%sSelectedType=%s&delete=yes' onclick=\"return confirm('" . - _('Are you sure you wish to delete this Supplier Type?') . "');\">" . _('Delete') . "</td> - </tr>", + <td><a href="%sSelectedType=%s">' . _('Edit') . '</td> + <td><a href="%sSelectedType=%s&delete=yes" onclick=\'return confirm("' . + _('Are you sure you wish to delete this Supplier Type?') . '");\'>' . _('Delete') . '</td> + </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>'; @@ -209,7 +209,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 echo '<td>'; // First column @@ -230,8 +230,8 @@ $_POST['typeid'] = $myrow['typeid']; $_POST['typename'] = $myrow['typename']; - echo "<input type=hidden name='SelectedType' VALUE=" . $SelectedType . ">"; - echo "<input type=hidden name='typeid' VALUE=" . $_POST['typeid'] . ">"; + echo '<input type=hidden name="SelectedType" VALUE="' . $SelectedType . '" />'; + echo '<input type=hidden name="typeid" VALUE="' . $_POST['typeid'] . '" />'; // We dont allow the user to change an existing type code @@ -242,7 +242,7 @@ if (!isset($_POST['typename'])) { $_POST['typename']=''; } - echo "<tr><td>" . _('Type Name') . ":</td><td><input type='Text' name='typename' value='" . $_POST['typename'] . "'></td></tr>"; + echo '<tr><td>' . _('Type Name') . ':</td><td><input type="Text" name="typename2 value="' . $_POST['typename'] . '"></td></tr>'; echo '<tr><td colspan=2><p><div class="centre"><input type=submit name=submit VALUE="' . _('Accept') . '"></div>'; Modified: trunk/SystemParameters.php =================================================================== --- trunk/SystemParameters.php 2011-04-09 20:02:49 UTC (rev 5160) +++ trunk/SystemParameters.php 2011-04-10 09:15:12 UTC (rev 5161) @@ -35,7 +35,7 @@ } elseif (strlen($_POST['X_DefaultCreditLimit']) > 12 || !is_numeric($_POST['X_DefaultCreditLimit']) ) { $InputError = 1; prnMsg(_('Default Credit Limit must be a number'),'error'); - } elseif (strstr($_POST['X_RomalpaClause'], "'") || strlen($_POST['X_RomalpaClause']) > 5000) { + } elseif (strstr($_POST['X_RomalpaClause'], "\'") || strlen($_POST['X_RomalpaClause']) > 5000) { $InputError = 1; prnMsg(_('The Romalpa Clause may not contain single quotes and may not be longer than 5000 chars'),'error'); } elseif (strlen($_POST['X_QuickEntries']) > 2 || !is_numeric($_POST['X_QuickEntries']) || Modified: trunk/TaxAuthorities.php =================================================================== --- trunk/TaxAuthorities.php 2011-04-09 20:02:49 UTC (rev 5160) +++ trunk/TaxAuthorities.php 2011-04-10 09:15:12 UTC (rev 5161) @@ -204,7 +204,7 @@ } -echo "<p><form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID .'>'; +echo '<p><form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedTaxAuthID)) { @@ -232,7 +232,7 @@ $_POST['BankSwift'] = $myrow['bankswift']; - echo "<input type=hidden name='SelectedTaxAuthID' VALUE=" . $SelectedTaxAuthID . '>'; + echo '<input type=hidden name="SelectedTaxAuthID" VALUE="' . $SelectedTaxAuthID . '">'; } //end of if $SelectedTaxAuthID only do the else when a new record is being entered @@ -259,11 +259,10 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['PurchTaxGLCode']) and $myrow['accountcode']==$_POST['PurchTaxGLCode']) { - echo '<option selected VALUE='; + echo '<option selected VALUE='. $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } else { - echo '<option VALUE='; + echo '<option VALUE=' . $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } - echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')'; } //end while loop @@ -277,11 +276,10 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['TaxGLCode']) and $myrow['accountcode']==$_POST['TaxGLCode']) { - echo "<option selected VALUE='"; + echo '<option selected VALUE="' . $myrow['accountcode'] . '">' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } else { - echo "<option VALUE='"; + echo '<option VALUE="' . $myrow['accountcode'] . '">' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } - echo $myrow['accountcode'] . "'>" . $myrow['accountname'] . ' ('.$myrow['accountcode'].')'; } //end while loop Modified: trunk/TaxCategories.php =================================================================== --- trunk/TaxCategories.php 2011-04-09 20:02:49 UTC (rev 5160) +++ trunk/TaxCategories.php 2011-04-10 09:15:12 UTC (rev 5161) @@ -28,9 +28,9 @@ //first off validate inputs sensible - if (strpos($_POST['TaxCategoryName'],'&')>0 OR strpos($_POST['TaxCategoryName'],"'")>0) { + if (ContainsIllegalCharacters($_POST['TaxCategoryName'])) { $InputError = 1; - prnMsg( _('The tax category name cannot contain the character') . " '&' " . _('or the character') ." '",'error'); + prnMsg( _('The tax category name contains illegal characters'),'error'); } if (trim($_POST['TaxCategoryName']) == '') { $InputError = 1; @@ -164,10 +164,10 @@ $ErrMsg = _('Could not get tax categories because'); $result = DB_query($sql,$db,$ErrMsg); - echo "<table class=selection> + echo '<table class=selection> <tr> - <th>" . _('Tax Categories') . "</th> - </tr>"; + <th>' . _('Tax Categories') . '</th> + </tr>'; $k=0; //row colour counter while ($myrow = DB_fetch_row($result)) { @@ -198,7 +198,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($SelectedTaxCategory)) { @@ -218,18 +218,18 @@ $_POST['TaxCategoryName'] = $myrow['taxcatname']; - echo "<input type=hidden name='SelectedTaxCategory' VALUE='" . $myrow['taxcatid'] . "'>"; - echo "<table class=selection>"; + echo '<input type=hidden name="SelectedTaxCategory" VALUE="' . $myrow['taxcatid'] . '">'; + echo '<table class=selection>'; } } else { $_POST['TaxCategoryName']=''; - echo "<table class=selection>"; + echo '<table class=selection>'; } - echo "<tr> - <td>" . _('Tax Category Name') . ':' . "</td> - <td><input type='Text' name='TaxCategoryName' size=30 maxlength=30 value='" . $_POST['TaxCategoryName'] . "'></td> - </tr>"; + echo '<tr> + <td>' . _('Tax Category Name') . ':' . '</td> + <td><input type="Text" name="TaxCategoryName" size=30 maxlength=30 value="' . $_POST['TaxCategoryName'] . '></td> + </tr>'; echo '</table>'; echo '<br /><div class="centre"><input type=Submit name=submit value=' . _('Enter Information') . '></div>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-04-10 18:13:57
|
Revision: 5165 http://weberp.svn.sourceforge.net/weberp/?rev=5165&view=rev Author: tim_schofield Date: 2011-04-10 18:13:50 +0000 (Sun, 10 Apr 2011) Log Message: ----------- XHTML updates and quoting changes Modified Paths: -------------- trunk/SupplierBalsAtPeriodEnd.php trunk/SupplierCredit.php trunk/SupplierInvoice.php trunk/SupplierTenderCreate.php trunk/Suppliers.php trunk/WorkOrderEntry.php Removed Paths: ------------- trunk/SystemCheck.php Modified: trunk/SupplierBalsAtPeriodEnd.php =================================================================== --- trunk/SupplierBalsAtPeriodEnd.php 2011-04-10 15:29:34 UTC (rev 5164) +++ trunk/SupplierBalsAtPeriodEnd.php 2011-04-10 18:13:50 UTC (rev 5165) @@ -54,9 +54,9 @@ $title = _('Supplier Balances - Problem Report'); include('includes/header.inc'); prnMsg(_('The Supplier 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; @@ -65,7 +65,7 @@ $title = _('Supplier Balances - Problem Report'); include('includes/header.inc'); prnMsg(_('There are no supplier balances to list'),'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; } @@ -126,16 +126,16 @@ } /*if $FromCriteria is not set then show a form to allow input */ - 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') . ":</font></td> - <td><input Type=text maxlength=6 size=7 name=FromCriteria value=".$_POST['FromCriteria']."></td></tr>"; - echo '<tr><td>' . _('To Supplier Code') . ":</td> - <td><input Type=text maxlength=6 size=7 name=ToCriteria value=".$_POST['ToCriteria']."></td></tr>"; + echo '<tr><td>' . _('From Supplier Code') . ':</font></td> + <td><input Type=text maxlength=6 size=7 name=FromCriteria value="'.$_POST['FromCriteria'].'"></td></tr>'; + echo '<tr><td>' . _('To Supplier Code') . ':</td> + <td><input Type=text maxlength=6 size=7 name=ToCriteria value="'.$_POST['ToCriteria'].'"></td></tr>'; - echo '<tr><td>' . _('Balances As At') . ":</td> - <td><select Name='PeriodEnd'>"; + echo '<tr><td>' . _('Balances As At') . ':</td> + <td><select Name="PeriodEnd">'; $sql = "SELECT periodno, lastdate_in_period,EXTRACT(YEAR_MONTH FROM lastdate_in_period) as YearMonth FROM periods ORDER BY periodno DESC"; @@ -145,7 +145,7 @@ while ($myrow = DB_fetch_array($Periods,$db)){ if ($myrow['YearMonth'] == date("Ym")) { // get the current month - echo '<option VALUE=' . $myrow['lastdate_in_period'] . ' selected="TRUE">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period'],'M',-1); + echo '<option VALUE=' . $myrow['lastdate_in_period'] . ' selected="TRUE">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period'],'M',-1).'</option>'; } else { echo '<option VALUE=' . $myrow['lastdate_in_period'] . '> '.MonthAndYearFromSQLDate($myrow['lastdate_in_period']).'</option>'; @@ -154,7 +154,7 @@ echo '</select></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'); }/*end of else not PrintPDF */ Modified: trunk/SupplierCredit.php =================================================================== --- trunk/SupplierCredit.php 2011-04-10 15:29:34 UTC (rev 5164) +++ trunk/SupplierCredit.php 2011-04-10 18:13:50 UTC (rev 5165) @@ -115,8 +115,8 @@ $_SESSION['SuppTrans']->SupplierID = $_GET['SupplierID']; $LocalTaxProvinceResult = DB_query("SELECT taxprovinceid - FROM locations - WHERE loccode = '" . $_SESSION['UserStockLocation'] . "'", $db); + FROM locations + WHERE loccode = '" . $_SESSION['UserStockLocation'] . "'", $db); if(DB_num_rows($LocalTaxProvinceResult)==0){ prnMsg(_('The tax province associated with your user account has not been set up in this database. Tax calculations are based on the tax group of the supplier and the tax province of the user entering the invoice. The system administrator should redefine your account with a valid default stocking location and this location should refer to a valid tax province'),'error'); @@ -264,10 +264,10 @@ /* everything below here only do if a Supplier is selected fisrt add a header to show who we are making an credit note for */ -echo "<table class=selection colspan=4><tr><th>" . _('Supplier') . "</th> - <th>" . _('Currency') . "</th> - <th>" . _('Terms') . "</th> - <th>" . _('Tax Group') . '</th></tr>'; +echo '<table class=selection colspan=4><tr><th>' . _('Supplier') . '</th> + <th>' . _('Currency') . '</th> + <th>' . _('Terms') . '</th> + <th>' . _('Tax Group') . '</th></tr>'; echo '<tr><td><font color=blue><b>' . $_SESSION['SuppTrans']->SupplierID . ' - ' . $_SESSION['SuppTrans']->SupplierName . '</b></font></td> @@ -277,20 +277,20 @@ </tr> </table>'; -echo "<form action='" . $_SERVER['PHP_SELF'] . "?" . SID . "' method=post name=form1>"; +echo '<form action="' . $_SERVER['PHP_SELF'] . ' method="post" name=form1>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br /><table class=selection>'; -echo '<tr><td><font color=red>' . _('Supplier Credit Note Reference') . ":</font></td> - <td><font size=2><input type=TEXT size=20 maxlength=20 name=SuppReference VALUE='" . $_SESSION['SuppTrans']->SuppReference . "'></td>"; +echo '<tr><td><font color=red>' . _('Supplier Credit Note Reference') . ':</font></td> + <td><font size=2><input type=TEXT size=20 maxlength=20 name=SuppReference VALUE="' . $_SESSION['SuppTrans']->SuppReference . '"></td>'; if (!isset($_SESSION['SuppTrans']->TranDate)){ $_SESSION['SuppTrans']->TranDate= Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))); } -echo '<td><font color=red>' . _('Credit Note Date') . ' (' . _('in format') . ' ' . $_SESSION['DefaultDateFormat'] . ") :</font></td> - <td><input type=TEXT class='date' alt='".$_SESSION['DefaultDateFormat']. "' size=11 maxlength=10 name='TranDate' VALUE=" . $_SESSION['SuppTrans']->TranDate . '></td>'; -echo '<td><font color=red>' . _('Exchange Rate') . ":</font></td> - <td><input type=TEXT class='number' size=11 maxlength=10 name='ExRate' VALUE=" . $_SESSION['SuppTrans']->ExRate . '></td></tr>'; +echo '<td><font color=red>' . _('Credit Note Date') . ' (' . _('in format') . ' ' . $_SESSION['DefaultDateFormat'] . ') :</font></td> + <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat']. '" size=11 maxlength=10 name="TranDate" VALUE="' . $_SESSION['SuppTrans']->TranDate . '"></td>'; +echo '<td><font color=red>' . _('Exchange Rate') . ':</font></td> + <td><input type=TEXT class="number" size=11 maxlength=10 name="ExRate" VALUE="' . $_SESSION['SuppTrans']->ExRate . '"></td></tr>'; echo '</table>'; echo '<br><div class="centre"><input type="submit" name="GRNS" VALUE="' . _('Purchase Orders') . '"> '; @@ -309,12 +309,12 @@ echo '<table cellpadding=2 class=selection> <tr><th colspan="6">' . _('Purchase Order Credits') . '</th></tr>'; - $TableHeader = "<tr><th>" . _('GRN') . "</th> - <th>" . _('Item Code') . "</th> - <th>" . _('Description') . "</th> - <th>" . _('Quantity') . '<br>' . _('Credited') . "</th> - <th>" . _('Price Credited') . '<br>' . _('in') . ' ' . $_SESSION['SuppTrans']->CurrCode . "</th> - <th>" . _('Line Total') . '<br>' . _('in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th></tr>'; + $TableHeader = '<tr><th>' . _('GRN') . '</th> + <th>' . _('Item Code') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Quantity') . '<br>' . _('Credited') . '</th> + <th>' . _('Price Credited') . '<br>' . _('in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th> + <th>' . _('Line Total') . '<br>' . _('in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th></tr>'; echo $TableHeader; $TotalGRNValue=0; @@ -487,13 +487,15 @@ <td colspan=2 class=number><input type=TEXT size="12" maxlength="10" name="OvAmount" VALUE=' . number_format($_SESSION['SuppTrans']->OvAmount,2) . '></td></tr>'; } -echo "<tr><td colspan=2><input type=Submit name='ToggleTaxMethod'VALUE='" . _('Change Tax Calculation Method') . - "'></td><td><select name='OverRideTax' onChange='ReloadForm(form1.ToggleTaxMethod)'>"; +echo '<tr><td colspan=2><input type=Submit name="ToggleTaxMethod" VALUE="' . _('Change Tax Calculation Method') . + '"></td><td><select name="OverRideTax" onChange="ReloadForm(form1.ToggleTaxMethod)">'; if ($_POST['OverRideTax']=='Man'){ - echo "<option VALUE='Auto'>" . _('Automatic') . "<option selected VALUE='Man'>" . _('Manual Entry'); + echo '<option VALUE="Auto">' . _('Automatic') . '</option>'; + echo '<option selected VALUE="Man">' . _('Manual Entry') . '</option>'; } else { - echo "<option selected VALUE='Auto'>" . _('Automatic') . "<option VALUE='Man'>" . _('Manual Entry'); + echo '<option selected VALUE="Auto">' . _('Automatic') . '</option>'; + echo '<option VALUE="Man">' . _('Manual Entry') . '</option>'; } echo '</select></td></tr>'; @@ -554,7 +556,7 @@ echo '<table class=selection><tr><td><font color=red>' . _('Comments') . '</font></td><td><textarea name=Comments cols=40 rows=2>' . $_SESSION['SuppTrans']->Comments . '</textarea></td></tr></table>'; -echo "<p><div class='centre'><input type=submit name='PostCreditNote' VALUE='" . _('Enter Credit Note') . "'></div>"; +echo '<p><div class="centre"><input type=submit name="PostCreditNote" VALUE="' . _('Enter Credit Note') . '"></div>'; if (isset($_POST['PostCreditNote'])){ @@ -843,7 +845,7 @@ /*The cost adjustment is the price variance / the total quantity in stock - But that's only provided that the total quantity in stock is > the quantity charged on this invoice + But thats only provided that the total quantity in stock is greater than the quantity charged on this invoice If the quantity on hand is less the amount charged on this invoice then some must have been sold and the price variance on these must be written off to price variances*/ @@ -883,21 +885,23 @@ /*Now post any remaining price variance to stock rather than price variances */ $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES (21, - '" . $CreditNoteNo . "', - '" . $SQLCreditNoteDate . "', - '" . $PeriodNo . "', - '" . $StockGLCode['stockact'] . "', - '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('Average Cost Adj') . - ' - ' . $EnteredGRN->ItemCode . ' x ' . $TotalQuantityOnHand . ' x ' . - number_format(($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . "', - '" . (-($PurchPriceVar - $WriteOffToVariances)) . "')"; + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES ( + 21, + '" . $CreditNoteNo . "', + '" . $SQLCreditNoteDate . "', + '" . $PeriodNo . "', + '" . $StockGLCode['stockact'] . "', + '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('Average Cost Adj') . + ' - ' . $EnteredGRN->ItemCode . ' x ' . $TotalQuantityOnHand . ' x ' . + number_format(($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . "', + '" . (-($PurchPriceVar - $WriteOffToVariances)) . "' + )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added for the price variance of the stock item because'); $DbgMsg = _('The following SQL to insert the GL transaction was used'); @@ -932,21 +936,23 @@ } else { //It must be Standard Costing $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES (21, - '" . $CreditNoteNo . "', - '" . $SQLCreditNoteDate . "', - '" . $PeriodNo . "', - '" . $StockGLCode['purchpricevaract'] . "', - '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') . ' ' . $EnteredGRN->GRNNo . - ' - ' . $EnteredGRN->ItemCode . ' x ' . $EnteredGRN->This_QuantityInv . ' x ' . _('price var of') . ' ' . - number_format(($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . "', - '" . (-$PurchPriceVar) . "')"; + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES ( + 21, + '" . $CreditNoteNo . "', + '" . $SQLCreditNoteDate . "', + '" . $PeriodNo . "', + '" . $StockGLCode['purchpricevaract'] . "', + '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') . ' ' . $EnteredGRN->GRNNo . + ' - ' . $EnteredGRN->ItemCode . ' x ' . $EnteredGRN->This_QuantityInv . ' x ' . _('price var of') . ' ' . + number_format(($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . "', + '" . (-$PurchPriceVar) . "' + )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added for the price variance of the stock item because'); $DbgMsg = _('The following SQL to insert the GL transaction was used'); @@ -965,29 +971,31 @@ /*Need to get the asset details for posting */ $result = DB_query("SELECT costact - FROM fixedassets INNER JOIN fixedassetcategories - ON fixedassets.assetcategoryid= fixedassetcategories.categoryid - WHERE assetid='" . $EnteredGRN->AssetID . "'",$db); + FROM fixedassets INNER JOIN fixedassetcategories + ON fixedassets.assetcategoryid= fixedassetcategories.categoryid + WHERE assetid='" . $EnteredGRN->AssetID . "'",$db); $AssetRow = DB_fetch_array($result); $GLCode = $AssetRow['costact']; } //the item was an asset $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES (21, - '" . $CreditNoteNo . "', - '" . $SQLCreditNoteDate . "', - '" . $PeriodNo . "', - '" . $GLCode . "', - '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') . ' ' . $EnteredGRN->GRNNo . ' - ' . - $EnteredGRN->ItemDescription . ' x ' . $EnteredGRN->This_QuantityInv . ' x ' . _('price var') . - ' ' . number_format(($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . "', - '" . (-$PurchPriceVar) . "')"; + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES ( + 21, + '" . $CreditNoteNo . "', + '" . $SQLCreditNoteDate . "', + '" . $PeriodNo . "', + '" . $GLCode . "', + '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') . ' ' . $EnteredGRN->GRNNo . ' - ' . + $EnteredGRN->ItemDescription . ' x ' . $EnteredGRN->This_QuantityInv . ' x ' . _('price var') . + ' ' . number_format(($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . "', + '" . (-$PurchPriceVar) . "' + )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added for the price variance of the stock item because'); $DbgMsg = _('The following SQL to insert the GL transaction was used'); @@ -1005,14 +1013,15 @@ account, narrative, amount) - VALUES (21, - '" . $CreditNoteNo . "', - '" . $SQLCreditNoteDate . "', - '" . $PeriodNo . "', - '" . $_SESSION['SuppTrans']->GRNAct . "', - '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') .' ' . $EnteredGRN->GRNNo . ' - ' . $EnteredGRN->ItemCode . ' x ' . - $EnteredGRN->This_QuantityInv . ' @ ' . $_SESSION['SuppTrans']->CurrCode . $EnteredGRN->ChgPrice . ' @ ' . _('a rate of') . ' ' . $_SESSION['SuppTrans']->ExRate . "', - '" . round(-$EnteredGRN->ChgPrice * $EnteredGRN->This_QuantityInv,2) / $_SESSION['SuppTrans']->ExRate . "' + VALUES ( + 21, + '" . $CreditNoteNo . "', + '" . $SQLCreditNoteDate . "', + '" . $PeriodNo . "', + '" . $_SESSION['SuppTrans']->GRNAct . "', + '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') .' ' . $EnteredGRN->GRNNo . ' - ' . $EnteredGRN->ItemCode . ' x ' . + $EnteredGRN->This_QuantityInv . ' @ ' . $_SESSION['SuppTrans']->CurrCode . $EnteredGRN->ChgPrice . ' @ ' . _('a rate of') . ' ' . $_SESSION['SuppTrans']->ExRate . "', + '" . round(-$EnteredGRN->ChgPrice * $EnteredGRN->This_QuantityInv,2) / $_SESSION['SuppTrans']->ExRate . "' )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added because'); @@ -1117,10 +1126,10 @@ $SQL = "INSERT INTO supptranstaxes (supptransid, taxauthid, taxamount) - VALUES ( - '" . $SuppTransID . "', - '" . $TaxTotals->TaxAuthID . "', - '" . -$TaxTotals->TaxOvAmount . "')"; + VALUES ( + '" . $SuppTransID . "', + '" . $TaxTotals->TaxAuthID . "', + '" . -$TaxTotals->TaxOvAmount . "')"; $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The supplier transaction taxes records could not be inserted because'); $DbgMsg = _('The following SQL to insert the supplier transaction taxes record was used:'); @@ -1153,17 +1162,18 @@ if (strlen($EnteredGRN->ShiptRef)>0 AND $EnteredGRN->ShiptRef!=0){ /* and insert the shipment charge records */ - $SQL = "INSERT INTO shipmentcharges (shiptref, + $SQL = "INSERT INTO shipmentcharges ( + shiptref, transtype, transno, stockid, value) - VALUES ( - '" . $EnteredGRN->ShiptRef . "', - 21, - '" . $CreditNoteNo . "', - '" . $EnteredGRN->ItemCode . "', - '" . round(-$EnteredGRN->This_QuantityInv * $EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate,2) . "' + VALUES ( + '" . $EnteredGRN->ShiptRef . "', + '21', + '" . $CreditNoteNo . "', + '" . $EnteredGRN->ItemCode . "', + '" . round(-$EnteredGRN->This_QuantityInv * $EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate,2) . "' )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The shipment charge record for the shipment') . ' ' . $EnteredGRN->ShiptRef . ' ' . _('could not be added because'); @@ -1176,21 +1186,23 @@ if ($PurchPriceVar !=0){ /*Add the fixed asset trans for the difference in the cost */ $SQL = "INSERT INTO fixedassettrans (assetid, - transtype, - transno, - transdate, - periodno, - inputdate, - fixedassettranstype, - amount) - VALUES ('" . $EnteredGRN->AssetID . "', - 21, - '" . $CreditNoteNo . "', - '" . $SQLCreditNoteDate . "', - '" . $PeriodNo . "', - '" . Date('Y-m-d') . "', - 'cost', - '" . -($PurchPriceVar) . "')"; + transtype, + transno, + transdate, + periodno, + inputdate, + fixedassettranstype, + amount) + VALUES ( + '" . $EnteredGRN->AssetID . "', + '21', + '" . $CreditNoteNo . "', + '" . $SQLCreditNoteDate . "', + '" . $PeriodNo . "', + '" . Date('Y-m-d') . "', + 'cost', + '" . -($PurchPriceVar) . "' + )"; $ErrMsg = _('CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE The fixed asset transaction could not be inserted because'); $DbgMsg = _('The following SQL to insert the fixed asset transaction record was used'); $Result = DB_query($SQL,$db,$ErrMsg, $DbgMsg, true); @@ -1215,10 +1227,10 @@ value) VALUES ( '" . $ShiptChg->ShiptRef . "', - 21, + '21', '" . $CreditNoteNo . "', '" . (-$ShiptChg->Amount/$_SESSION['SuppTrans']->ExRate) . "' - )"; + )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The shipment charge record for the shipment') . ' ' . $ShiptChg->ShiptRef . ' ' . _('could not be added because'); $DbgMsg = _('The following SQL to insert the Shipment charge record was used'); @@ -1264,29 +1276,31 @@ /* First the fixed asset transaction */ $SQL = "INSERT INTO fixedassettrans (assetid, - transtype, - transno, - transdate, - periodno, - inputdate, - fixedassettranstype, - amount) - VALUES ('" . $AssetAddition->AssetID . "', - 21, - '" . $CreditNoteNo . "', - '" . $SQLCreditNoteDate . "', - '" . $PeriodNo . "', - '" . Date('Y-m-d') . "', - 'cost', - '" . (-$AssetAddition->Amount / $_SESSION['SuppTrans']->ExRate) . "')"; + transtype, + transno, + transdate, + periodno, + inputdate, + fixedassettranstype, + amount) + VALUES ( + '" . $AssetAddition->AssetID . "', + '21', + '" . $CreditNoteNo . "', + '" . $SQLCreditNoteDate . "', + '" . $PeriodNo . "', + '" . Date('Y-m-d') . "', + 'cost', + '" . (-$AssetAddition->Amount / $_SESSION['SuppTrans']->ExRate) . "' + )"; $ErrMsg = _('CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE The fixed asset transaction could not be inserted because'); $DbgMsg = _('The following SQL to insert the fixed asset transaction record was used'); $Result = DB_query($SQL,$db,$ErrMsg, $DbgMsg, true); /*Now update the asset cost in fixedassets table */ $SQL = "UPDATE fixedassets - SET cost = cost - " . ($AssetAddition->Amount / $_SESSION['SuppTrans']->ExRate) . " - WHERE assetid = '" . $AssetAddition->AssetID . "'"; + SET cost = cost - " . ($AssetAddition->Amount / $_SESSION['SuppTrans']->ExRate) . " + WHERE assetid = '" . $AssetAddition->AssetID . "'"; $ErrMsg = _('CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE. The fixed asset cost was not able to be updated because:'); $DbgMsg = _('The following SQL was used to attempt the update of the asset cost:'); $Result = DB_query($SQL,$db,$ErrMsg, $DbgMsg, true); Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2011-04-10 15:29:34 UTC (rev 5164) +++ trunk/SupplierInvoice.php 2011-04-10 18:13:50 UTC (rev 5165) @@ -697,7 +697,7 @@ } foreach ($_SESSION['SuppTrans']->Assets as $AssetAddition){ - /* only the GL entries if the creditors->GL integration is enabled */ + /* only the GL entries if the creditors/GL integration is enabled */ $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -721,7 +721,7 @@ foreach ($_SESSION['SuppTrans']->Contracts as $Contract){ - /*contract postings need to get the WIP from the contract item's stock category record + /*contract postings need to get the WIP from the contract items stock category record * debit postings to this WIP account * the WIP account is tidied up when the contract is closed*/ $result = DB_query("SELECT wipact FROM stockcategory @@ -822,7 +822,7 @@ echo '<br>Total Qty On hand = ' . $TotalQuantityOnHand; /*The cost adjustment is the price variance / the total quantity in stock - But that's only provided that the total quantity in stock is > the quantity charged on this invoice + But that is only provided that the total quantity in stock is greater than the quantity charged on this invoice If the quantity on hand is less the amount charged on this invoice then some must have been sold and the price variance on these must be written off to price variances*/ Modified: trunk/SupplierTenderCreate.php =================================================================== --- trunk/SupplierTenderCreate.php 2011-04-10 15:29:34 UTC (rev 5164) +++ trunk/SupplierTenderCreate.php 2011-04-10 18:13:50 UTC (rev 5165) @@ -381,7 +381,7 @@ echo '<tr><td>' . $Supplier->SupplierCode . '</td>'; echo '<td>' . $Supplier->SupplierName . '</td>'; echo '<td>' . $Supplier->EmailAddress . '</td>'; - echo "<td><a href='" . $_SERVER['PHP_SELF'] . "?" . SID . "DeleteSupplier=" . $Supplier->SupplierCode . "'>" . _('Delete') . "</a></td></tr>"; + echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?DeleteSupplier=' . $Supplier->SupplierCode . '">' . _('Delete') . '</a></td></tr>'; } echo '</table></td>'; /* Item Details @@ -408,7 +408,7 @@ echo '<td>'.$LineItems->ItemDescription.'</td>'; echo '<td class="number">' . number_format($LineItems->Quantity,$LineItems->DecimalPlaces).'</td>'; echo '<td>'.$LineItems->Units.'</td>'; - echo "<td><a href='" . $_SERVER['PHP_SELF'] . "?" . SID . "DeleteItem=" . $LineItems->LineNo . "'>" . _('Delete') . "</a></td></tr>"; + echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?DeleteItem=' . $LineItems->LineNo . '">' . _('Delete') . '</a></td></tr>'; echo '</tr>'; } } @@ -488,28 +488,28 @@ } if (isset($_POST['Suppliers'])) { - echo "<form action='" . $_SERVER['PHP_SELF'] . '?' . SID . "' method=post>"; + echo '<form action="' . $_SERVER['PHP_SELF'] . ' method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search for Suppliers') . '</p> <table cellpadding=3 colspan=4 class=selection><tr><td>' . _('Enter a partial Name') . ':</font></td><td>'; if (isset($_POST['Keywords'])) { - echo "<input type='Text' name='Keywords' value='" . $_POST['Keywords'] . "' size=20 maxlength=25>"; + echo '<input type="Text" name="Keywords" value="' . $_POST['Keywords'] . '" size=20 maxlength=25>'; } else { - echo "<input type='Text' name='Keywords' size=20 maxlength=25>"; + echo '<input type="Text" name="Keywords" size=20 maxlength=25>'; } echo '</td><td><b>' . _('OR') . '</b></font></td><td>' . _('Enter a partial Code') . ':</font></td><td>'; if (isset($_POST['SupplierCode'])) { - echo "<input type='Text' name='SupplierCode' value='" . $_POST['SupplierCode'] . "' size=15 maxlength=18>"; + echo '<input type="text" name="SupplierCode" value="' . $_POST['SupplierCode'] . '" size=15 maxlength=18>'; } else { - echo "<input type='Text' name='SupplierCode' size=15 maxlength=18>"; + echo '<input type="Text" name="SupplierCode" size=15 maxlength=18>'; } - echo "</td></tr></table><br><div class='centre'><input type=submit name='SearchSupplier' value='" . _('Search Now') . "'></div>"; + echo '</td></tr></table><br><div class="centre"><input type=submit name="SearchSupplier" value="' . _('Search Now') . '"></div>'; echo '</form>'; } if (isset($_POST['SearchSupplier'])) { - echo "<form action='" . $_SERVER['PHP_SELF'] . '?' . SID . "' method=post>"; + echo '<form action="' . $_SERVER['PHP_SELF'] . ' method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $ListCount = DB_num_rows($result); $ListPageMax = ceil($ListCount / $_SESSION['DisplayRecordsMax']); @@ -524,7 +524,7 @@ } } if ($ListPageMax > 1) { - echo "<p> " . $_POST['PageOffset'] . ' ' . _('of') . ' ' . $ListPageMax . ' ' . _('pages') . '. ' . _('Go to Page') . ': '; + echo '<p> ' . $_POST['PageOffset'] . ' ' . _('of') . ' ' . $ListPageMax . ' ' . _('pages') . '. ' . _('Go to Page') . ': '; echo '<select name="PageOffset">'; $ListPage = 1; while ($ListPage <= $ListPageMax) { @@ -541,18 +541,18 @@ <input type=submit name="Next" value="' . _('Next') . '">'; echo '<p>'; } - echo "<input type=hidden name='Search' value='" . _('Search Now') . "'>"; + echo '<input type=hidden name="Search" value="' . _('Search Now') . '">'; echo '<br><br>'; - echo '<br><table cellpadding=2 colspan=7'; - $tableheader = "<tr> - <th>" . _('Code') . "</th> - <th>" . _('Supplier Name') . "</th> - <th>" . _('Currency') . "</th> - <th>" . _('Address 1') . "</th> - <th>" . _('Address 2') . "</th> - <th>" . _('Address 3') . "</th> - <th>" . _('Address 4') . "</th> - </tr>"; + echo '<br><table cellpadding=2 colspan=7>'; + $tableheader = '<tr> + <th>' . _('Code') . '</th> + <th>' . _('Supplier Name') . '</th> + <th>' . _('Currency') . '</th> + <th>' . _('Address 1') . '</th> + <th>' . _('Address 2') . '</th> + <th>' . _('Address 3') . '</th> + <th>' . _('Address 4') . '</th> + </tr>'; echo $tableheader; $j = 1; $k = 0; //row counter to determine background colour @@ -568,14 +568,14 @@ echo '<tr class="OddTableRows">'; $k = 1; } - echo "<td><input type=submit name='SelectedSupplier' value='".$myrow['supplierid']."'</td> - <td>".$myrow['suppname']."</td> - <td>".$myrow['currcode']."</td> - <td>".$myrow['address1']."</td> - <td>".$myrow['address2']."</td> - <td>".$myrow['address3']."</td> - <td>".$myrow['address4']."</td> - </tr>"; + echo '<td><input type=submit name="SelectedSupplier" value="'.$myrow['supplierid'].'" /></td> + <td>'.$myrow['suppname'].'</td> + <td>'.$myrow['currcode'].'</td> + <td>'.$myrow['address1'].'</td> + <td>'.$myrow['address2'].'</td> + <td>'.$myrow['address3'].'</td> + <td>'.$myrow['address4'].'</td> + </tr>'; $RowIndex = $RowIndex + 1; //end of page full new headings if } @@ -607,16 +607,16 @@ if (!isset($_POST['StockCat'])) { $_POST['StockCat'] = ""; } - if ($_POST['StockCat'] == "All") { - echo '<option selected value="All">' . _('All'); + if ($_POST['StockCat'] == 'All') { + echo '<option selected value="All">' . _('All') . '</option>'; } else { - echo '<option value="All">' . _('All'); + echo '<option value="All">' . _('All') . '</option>'; } while ($myrow1 = DB_fetch_array($result)) { if ($myrow1['categoryid'] == $_POST['StockCat']) { - echo '<option selected VALUE="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription']; + echo '<option selected VALUE="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } else { - echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription']; + echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } } echo '</select>'; @@ -641,7 +641,7 @@ } if (isset($_POST['Search'])){ /*ie seach for stock items */ - 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 class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/supplier.png" title="' . _('Tenders') . '" alt="" />' . ' ' . _('Select items required on this tender').'</p>'; @@ -754,15 +754,15 @@ if (isset($SearchResult)) { - echo "<table cellpadding=1 colspan=7>"; + echo '<table cellpadding=1 colspan=7>'; - $tableheader = "<tr> - <th>" . _('Code') . "</th> - <th>" . _('Description') . "</th> - <th>" . _('Units') . "</th> - <th>" . _('Image') . "</th> - <th>" . _('Quantity') . "</th> - </tr>"; + $tableheader = '<tr> + <th>' . _('Code') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Units') . '</th> + <th>' . _('Image') . '</th> + <th>' . _('Quantity') . '</th> + </tr>'; echo $tableheader; $j = 1; @@ -790,13 +790,13 @@ $uom=$myrow['units']; - echo "<td>".$myrow['stockid']."</td> - <td>".$myrow['description']."</td> - <td>".$uom."</td> - <td>".$ImageSource."</td> - <td><input class='number' type='text' size=6 value=0 name='qty".$myrow['stockid']."'></td> - <input type='hidden' size=6 value=".$uom." name='uom".$myrow['stockid']."'> - </tr>"; + echo '<td>'.$myrow['stockid'].'</td> + <td>'.$myrow['description'].'</td> + <td>'.$uom.'</td> + <td>'.$ImageSource.'</td> + <td><input class="number" type="text" size=6 value=0 name="qty"'.$myrow['stockid'].'"></td> + <input type="hidden" size=6 value="'.$uom.'" name="uom"'.$myrow['stockid'].'"> + </tr>'; $PartsDisplayed++; if ($PartsDisplayed == $Maximum_Number_Of_Parts_To_Show){ Modified: trunk/Suppliers.php =================================================================== --- trunk/Suppliers.php 2011-04-10 15:29:34 UTC (rev 5164) +++ trunk/Suppliers.php 2011-04-10 18:13:50 UTC (rev 5165) @@ -342,7 +342,7 @@ } if (ContainsIllegalCharacters($SupplierID)) { $InputError = 1; - prnMsg(_('The supplier code cannot contain any of the following characters') . " - . ' & + \" \\" . ' ' ._('or a space'),'error'); + prnMsg(_('The supplier code cannot contain any of the illegal characters') ,'error'); $Errors[$i]='ID'; $i++; } @@ -405,22 +405,22 @@ $row = DB_fetch_array($resultgeo); $api_key = $row['geocode_key']; $map_host = $row['map_host']; - define("MAPS_HOST", $map_host); - define("KEY", $api_key); + define('MAPS_HOST', $map_host); + define('KEY', $api_key); // check that some sane values are setup already in geocode tables, if not skip the geocoding but add the record anyway. if ($map_host=="") { echo '<div class="warn">' . _('Warning - Geocode Integration is enabled, but no hosts are setup. Go to Geocode Setup') . '</div>'; } else { - $address = $_POST["Address1"] . ", " . $_POST["Address2"] . ", " . $_POST["Address3"] . ", " . $_POST["Address4"]; + $address = $_POST['Address1'] . ', ' . $_POST['Address2'] . ', ' . $_POST['Address3'] . ', ' . $_POST['Address4']; - $base_url = "http://" . MAPS_HOST . "/maps/geo?output=xml" . "&key=" . KEY; - $request_url = $base_url . "&q=" . urlencode($address); + $base_url = 'http://' . MAPS_HOST . '/maps/geo?output=xml' . '&key=' . KEY; + $request_url = $base_url . '&q=' . urlencode($address); - $xml = simplexml_load_string(utf8_encode(file_get_contents($request_url))) or die("url not loading"); + $xml = simplexml_load_string(utf8_encode(file_get_contents($request_url))) or die('url not loading'); // $xml = simplexml_load_file($request_url) or die("url not loading"); $coordinates = $xml->Response->Placemark->Point->coordinates; - $coordinatesSplit = explode(",", $coordinates); + $coordinatesSplit = explode(',', $coordinates); // Format: Longitude, Latitude, Altitude $latitude = $coordinatesSplit[1]; $longitude = $coordinatesSplit[0]; @@ -437,8 +437,8 @@ } else { // failure to geocode $geocode_pending = false; - echo "<p>Address: " . $address . " failed to geocode.\n"; - echo "Received status " . $status . "\n</p>"; + echo '<p>Address: ' . $address . ' failed to geocode'."\n"; + echo 'Received status ' . $status . "\n" . '</p>'; } } } @@ -647,47 +647,48 @@ /*If the page was called without $SupplierID passed to page then assume a new supplier is to be entered show a form with a Supplier Code field other wise the form showing the fields with the existing entries against the supplier will show for editing with only a hidden SupplierID field*/ - 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 "<input type='hidden' name='New' VALUE='Yes'>"; + echo '<input type="hidden" name="New" VALUE="Yes">'; echo '<table class=selection>'; - echo '<tr><td>' . _('Supplier Code') . ":</td><td><input type='text' name='SupplierID' size=11 maxlength=10></td></tr>"; - echo '<tr><td>' . _('Supplier Name') . ":</td><td><input type='text' name='SuppName' size=42 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Address Line 1 (Street)') . ":</td><td><input type='text' name='Address1' size=42 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Address Line 2 (Suburb/City)') . ":</td><td><input type='text' name='Address2' size=42 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Address Line 3 (State/Province)') . ":</td><td><input type='text' name='Address3' size=42 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Address Line 4 (Postal Code)') . ":</td><td><input type='text' name='Address4' size=42 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Telephone') . ":</td><td><input type='text' name='Phone' size=30 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Facsimile') . ":</td><td><input type='text' name='Fax' size=30 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Email Address') . ":</td><td><input type='text' name='Email' size=30 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Supplier Type') . ":</td><td><select name='SupplierType'>"; + echo '<tr><td>' . _('Supplier Code') . ':</td><td><input type="text" name="SupplierID" size=11 maxlength=10></td></tr>'; + echo '<tr><td>' . _('Supplier Name') . ':</td><td><input type="text" name="SuppName" size=42 maxlength=40></td></tr>'; + echo '<tr><td>' . _('Address Line 1 (Street)') . ':</td><td><input type="text" name="Address1" size=42 maxlength=40></td></tr>'; + echo '<tr><td>' . _('Address Line 2 (Suburb/City)') . ':</td><td><input type="text" name="Address2" size=42 maxlength=40></td></tr>'; + echo '<tr><td>' . _('Address Line 3 (State/Province)') . ':</td><td><input type="text" name=2Address3" size=42 maxlength=40></td></tr>'; + echo '<tr><td>' . _('Address Line 4 (Postal Code)') . ':</td><td><input type="text" name="Address4" size=42 maxlength=40></td></tr>'; + echo '<tr><td>' . _('Telephone') . ':</td><td><input type="text" name="Phone" size=30 maxlength=40></td></tr>'; + echo '<tr><td>' . _('Facsimile') . ':</td><td><input type="text" name="Fax" size=30 maxlength=40></td></tr>'; + echo '<tr><td>' . _('Email Address') . ':</td><td><input type="text" name="Email" size=30 maxlength=40></td></tr>'; + echo '<tr><td>' . _('Supplier Type') . ':</td><td><select name="SupplierType">'; $result=DB_query("SELECT typeid, typename FROM suppliertype", $db); while ($myrow = DB_fetch_array($result)) { - echo "<option VALUE='". $myrow['typeid'] . "'>" . $myrow['typename']; + echo '<option VALUE="'. $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } //end while loop - echo "</select></td></tr>"; + echo '</select></td></tr>'; $DateString = Date($_SESSION['DefaultDateFormat']); - echo '<tr><td>' . _('Supplier Since') . ' (' . $_SESSION['DefaultDateFormat'] . "):</td><td><input type='text' class='date' alt='".$_SESSION['DefaultDateFormat']."' name='SupplierSince' VALUE=$DateString size=12 maxlength=10></td></tr>"; - echo '<tr><td>' . _('Bank Particulars') . ":</td><td><input type='text' name='BankPartics' size=13 maxlength=12></td></tr>"; - echo '<tr><td>' . _('Bank reference') . ":</td><td><input type='text' name='BankRef' VALUE=0 size=13 maxlength=12></td></tr>"; - echo '<tr><td>' . _('Bank Account No') . ":</td><td><input type='text' name='BankAct' size=31 maxlength=30></td></tr>"; + echo '<tr><td>' . _('Supplier Since') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td><td><input type="text" class="date2 alt="'. + $_SESSION['DefaultDateFormat'].'" name="SupplierSince2 VALUE="' . $DateString . '" size=12 maxlength=10></td></tr>'; + echo '<tr><td>' . _('Bank Particulars') . ':</td><td><input type="text" name=2BankPartics" size=13 maxlength=12></td></tr>'; + echo '<tr><td>' . _('Bank reference') . ':</td><td><input type="text" name="BankRef" VALUE=0 size=13 maxlength=12></td></tr>'; + echo '<tr><td>' . _('Bank Account No') . ':</td><td><input type="text" name="BankAct" size=31 maxlength=30></td></tr>'; $result=DB_query("SELECT terms, termsindicator FROM paymentterms", $db); - echo '<tr><td>' . _('Payment Terms') . ":</td><td><select name='PaymentTerms'>"; + echo '<tr><td>' . _('Payment Terms') . ':</td><td><select name="PaymentTerms">'; while ($myrow = DB_fetch_array($result)) { - echo "<option VALUE='". $myrow['termsindicator'] . "'>" . $myrow['terms']; + echo '<option VALUE="'. $myrow['termsindicator'] . '">' . $myrow['terms'] . '</option>'; } //end while loop DB_data_seek($result, 0); echo '</select></td></tr>'; $result=DB_query("SELECT id, coyname FROM factorcompanies", $db); - echo '<tr><td>' . _('Factor Company') . ":</td><td><select name='FactorID'>"; + echo '<tr><td>' . _('Factor Company') . ':</td><td><select name="FactorID">'; echo '<option VALUE=0>' . _('None'); while ($myrow = DB_fetch_array($result)) { if (isset($_POST['FactorID']) and $_POST['FactorID'] == $myrow['id']){ @@ -698,7 +699,7 @@ } //end while loop DB_data_seek($result, 0); echo '</select></td></tr>'; - echo '<tr><td>' . _('Tax Reference') . ":</td><td><input type='text' name='TaxRef' size=21 maxlength=20></td></tr>"; + echo '<tr><td>' . _('Tax Reference') . ':</td><td><input type="text" name=2TaxRef" size=21 maxlength=20></td></tr>'; $result=DB_query("SELECT currency, currabrev FROM currencies", $db); if (!isset($_POST['CurrCode'])){ @@ -707,23 +708,23 @@ $_POST['CurrCode'] = $myrow[0]; } - echo '<tr><td>' . _("Supplier Currency") . ":</td><td><select name='CurrCode'>"; + echo '<tr><td>' . _('Supplier Currency') . ':</td><td><select name="CurrCode">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['CurrCode'] == $myrow['currabrev']){ - echo '<option selected VALUE=' . $myrow['currabrev'] . '>' . $myrow['currency']; + echo '<option selected VALUE=' . $myrow['currabrev'] . '>' . $myrow['currency'] . '</option>'; } else { - echo '<option VALUE=' . $myrow['currabrev'] . '>' . $myrow['currency']; + echo '<option VALUE=' . $myrow['currabrev'] . '>' . $myrow['currency'] . '</option>'; } } //end while loop DB_data_seek($result, 0); - echo '</select></td></tr><tr><td>' . _('Remittance Advice') . ":</td><td><select name='Remittance'>"; - echo '<option VALUE=0>' . _('Not Required'); - echo '<option VALUE=1>' . _('Required'); + echo '</select></td></tr><tr><td>' . _('Remittance Advice') . ':</td><td><select name="Remittance">'; + echo '<option VALUE=0>' . _('Not Required') . '</option>'; + echo '<option VALUE=1>' . _('Required') . '</option>'; echo '</select></td></tr>'; - echo '<tr><td>' . _('Tax Group') . ":</td><td><select name='TaxGroup'>"; + echo '<tr><td>' . _('Tax Group') . ':</td><td><select name="TaxGroup">'; DB_data_seek($result, 0); @@ -732,13 +733,13 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['TaxGroup']) and $_POST['TaxGroup'] == $myrow['taxgroupid']){ - echo '<option selected VALUE=' . $myrow['taxgroupid'] . '>' . $myrow['taxgroupdescription']; + echo '<option selected VALUE=' . $myrow['taxgroupid'] . '>' . $myrow['taxgroupdescription'] . '</option>'; } else { - echo '<option VALUE=' . $myrow['taxgroupid'] . '>' . $myrow['taxgroupdescription']; + echo '<option VALUE=' . $myrow['taxgroupid'] . '>' . $myrow['taxgroupdescription'] . '</option>'; } } //end while loop - echo "</select></td></tr></table><p><div class='centre'><input type='Submit' name='submit' VALUE='" . _('Insert New Supplier') . "'>"; + echo '</select></td></tr></table><p><div class="centre"><input type="Submit" name="submit" VALUE="' . _('Insert New Supplier') . '">'; echo '</div></form>'; } else { @@ -796,11 +797,11 @@ $_POST['FactorID'] = $myrow['factorcompanyid']; $_POST['TaxRef'] = $myrow['taxref']; - echo "<input type=hidden name='SupplierID' VALUE='$SupplierID'>"; + echo '<input type=hidden name="SupplierID" VALUE="' . $SupplierID . '">'; } else { // its a new supplier being added - echo "<input type=hidden name='New' VALUE='Yes'>"; + echo '<input type=hidden name="New" VALUE="Yes">'; echo '<tr><td>' . _('Supplier Code') . ':</td><td><input '.(in_array('ID',$Errors) ? 'class="inputerror"' : '').' type="text" name="SupplierID" VALUE="' . $SupplierID . '" size=12 maxlength=10></td></tr>'; } @@ -812,75 +813,75 @@ echo '<tr><td>' . _('Telephone') . ':</td><td><input '.(in_array('Name',$Errors) ? 'class="inputerror"' : '').' type="text" name="Phone" VALUE="' . $_POST['Phone'] . '" size=42 maxlength=40></td></tr>'; echo '<tr><td>' . _('Facsimile') . ':</td><td><input '.(in_array('Name',$Errors) ? 'class="inputerror"' : '').' type="text" name="Fax" VALUE="' . $_POST['Fax'] . '" size=42 maxlength=40></td></tr>'; echo '<tr><td>' . _('Email Address') . ':</td><td><input '.(in_array('Name',$Errors) ? 'class="inputerror"' : '').' type="text" name="Email" VALUE="' . $_POST['Email'] . '" size=42 maxlength=40></td></tr>'; - echo '<tr><td>' . _('Supplier Type') . ":</td><td><select name='SupplierType'>"; + echo '<tr><td>' . _('Supplier Type') . ':</td><td><select name="SupplierType">'; $result=DB_query("SELECT typeid, typename FROM suppliertype", $db); while ($myrow = DB_fetch_array($result)) { if ($_POST['SupplierType']==$myrow['typeid']) { - echo "<option selected value='". $myrow['typeid'] . "'>" . $myrow['typename']; + echo '<option selected value="'. $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } else { - echo "<option value='". $myrow['typeid'] . "'>" . $myrow['typename']; + echo '<option value="'. $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } } //end while loop - echo "</select></td></tr>"; + echo '</select></td></tr>'; echo '<tr><td>' . _('Supplier Since') . ' (' . $_SESSION['DefaultDateFormat'] .'):</td><td><input '.(in_array('SupplierSince',$Errors) ? 'class="inputerror"' : '').' size=12 maxlength=10 type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="SupplierSince" VALUE=' . $_POST['SupplierSince'] . '></td></tr>'; - echo '<tr><td>' . _('Bank Particulars') . ":</td><td><input type='text' name='BankPartics' size=13 maxlength=12 VALUE='" . $_POST['BankPartics'] . "'></td></tr>"; + echo '<tr><td>' . _('Bank Particulars') . ':</td><td><input type="text" name="BankPartics" size=13 maxlength=12 VALUE="' . $_POST['BankPartics'] . '"></td></tr>'; echo '<tr><td>' . _('Bank Reference') . ':</td><td><input '.(in_array('BankRef',$Errors) ? 'class="inputerror"' : '').' type="text" name="BankRef" size=13 maxlength=12 VALUE="' . $_POST['BankRef'] . '"></td></tr>'; - echo '<tr><td>' . _('Bank Account No') . ":</td><td><input type='text' name='BankAct' size=31 maxlength=30 VALUE='" . $_POST['BankAct'] . "'></td></tr>"; + echo '<tr><td>' . _('Bank Account No') . ':</td><td><input type="text" name="BankAct" size=31 maxlength=30 VALUE="' . $_POST['BankAct'] . '"></td></tr>'; $result=DB_query("SELECT terms, termsindicator FROM paymentterms", $db); - echo '<tr><td>' . _('Payment Terms') . ":</td><td><select name='PaymentTerms'>"; + echo '<tr><td>' . _('Payment Terms') . ':</td><td><select name="PaymentTerms">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['PaymentTerms'] == $myrow['termsindicator']){ - echo '<option selected VALUE=' . $myrow['termsindicator'] . '>' . $myrow['terms']; + echo '<option selected VALUE=' . $myrow['termsindicator'] . '>' . $myrow['terms'] . '</option>'; } else { - echo '<option VALUE=' . $myrow['termsindicator'] . '>' . $myrow['terms']; + echo '<option VALUE=' . $myrow['termsindicator'] . '>' . $myrow['terms'] . '</option>'; } } //end while loop DB_data_seek($result, 0); $result=DB_query("SELECT id, coyname FROM factorcompanies", $db); - echo '<tr><td>' . _('Factor Company') . ":</td><td><select name='FactorID'>"; - echo '<option VALUE=0>' . _('None'); + echo '<tr><td>' . _('Factor Company') . ':</td><td><select name="FactorID">'; + echo '<option VALUE=0>' . _('None') . '</option>'; while ($myrow = DB_fetch_array($result)) { if ($_POST['FactorID'] == $myrow['id']){ - echo '<option selected VALUE=' . $myrow['id'] . '>' . $myrow['coyname']; + echo '<option selected VALUE=' . $myrow['id'] . '>' . $myrow['coyname'] . '</option>'; } else { - echo '<option VALUE=' . $myrow['id'] . '>' . $myrow['coyname']; + echo '<option VALUE=' . $myrow['id'] . '>' . $myrow['coyname'] . '</option>'; } } //end while loop DB_data_seek($result, 0); - echo '<tr><td>' . _('Tax Reference') . ":</td><td><input type='text' name='TaxRef' size=21 maxlength=20 VALUE='".$_POST['TaxRef']."'></td></tr>"; + echo '<tr><td>' . _('Tax Reference') . ':</td><td><input type="text" name="TaxRef" size=21 maxlength=20 VALUE="'.$_POST['TaxRef'].'"></td></tr>'; $result=DB_query("SELECT currency, currabrev FROM currencies", $db); - echo '</select></td></tr><tr><td>' . _('Supplier Currency') . ":</td><td><select name='CurrCode'>"; + echo '</select></td></tr><tr><td>' . _('Supplier Currency') . ':</td><td><select name="CurrCode">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['CurrCode'] == $myrow['currabrev']){ - echo '<option selected VALUE=' . $myrow['currabrev'] . '>' . $myrow['currency']; + echo '<option selected VALUE=' . $myrow['currabrev'] . '>' . $myrow['currency'] . '</option>'; } else { - echo '<option VALUE=' . $myrow['currabrev'] . '>' . $myrow['currency']; + echo '<option VALUE=' . $myrow['currabrev'] . '>' . $myrow['currency'] . '</option>'; } } //end while loop DB_data_seek($result, 0); - echo '</select></td></tr><tr><td>' . _('Remittance Advice') . ":</td><td><select name='Remittance'>"; + echo '</select></td></tr><tr><td>' . _('Remittance Advice') . ':</td><td><select name="Remittance">'; if ($_POST['Remittance'] == 0){ - echo '<option selected VALUE=0>' . _('Not Required'); - echo '<option VALUE=1>' . _('Required'); + echo '<option selected VALUE=0>' . _('Not Required') . '</option>'; + echo '<option VALUE=1>' . _('Required') . '</option>'; } else { - echo '<option VALUE=0>' . _('Not Required'); - echo '<option selected VALUE=1>' . _('Required'); + echo '<option VALUE=0>' . _('Not Required') . '</option>'; + echo '<option selected VALUE=1>' . _('Required') . '</option>'; } echo '</select></td></tr>'; - echo '<tr><td>' . _('Tax Group') . ":</td><td><select name='TaxGroup'>"; + echo '<tr><td>' . _('Tax Group') . ':</td><td><select name="TaxGroup">'; DB_data_seek($result, 0); @@ -889,24 +890,23 @@ while ($myrow = DB_fetch_array($result)) { if ($myrow['taxgroupid'] == $_POST['TaxGroup']) { - echo '<option selected VALUE='; + echo '<option selected VALUE="'.$myrow['taxgroupid'] . '">' . $myrow['taxgroupdescription'] . '</option>'; } else { - echo '<option VALUE='; + echo '<option VALUE="' . $myrow['taxgroupid'] . '">' . $myrow['taxgroupdescription'] . '</option>'; } - echo $myrow['taxgroupid'] . '>' . $myrow['taxgroupdescription']; } //end while loop echo '</select></td></tr></table>'; if (isset($_POST['New'])) { - echo "<p><div class='centre'>><input type='Submit' name='submit' VALUE='" . _('Add These New Supplier Details') . "'></form>"; + echo '<p><div class="centre"><input type="Submit" name="submit" VALUE="' . _('Add These New Supplier Details') . '"></form>'; } else { - echo "<br><p><div class='centre'><input type='Submit' name='submit' VALUE='" . _('Update Supplier') . "'></div><br>"; + echo '<br><p><div class="centre"><input type="Submit" name="submit" VALUE="' . _('Update Supplier') . '"></div><br>'; // echo '<p><font color=red><b>' . _('WARNING') . ': ' . _('There is no second warning if you hit the delete button below') . '. ' . _('However checks will be made to ensure there are no outstanding purchase orders or existing accounts payable transactions before the deletion is processed') . '<br></font></b>'; prnMsg(_('WARNING') . ': ' . _('There is no second warning if you hit the delete button below') . '. ' . _('However checks will be made to ensure there are no outstanding purchase orders or existing accounts payable transactions before the deletion is processed'), 'Warn'); - echo "<br><div class=centre><input type='Submit' name='delete' VALUE='" . _('Delete Supplier') . "' onclick=\"return confirm('" . _('Are you sure you wish to delete this supplier?') . "');\"></form>"; - echo "<br><a href='$rootpath/SupplierContacts.php?" . SID . "SupplierID=$SupplierID'>" . _('Review Contact Details') . '</a></div>'; + echo '<br><div class=centre><input type="submit" name="delete" VALUE="' . _('Delete Supplier') . '" onclick=\"return confirm(\'' . _('Are you sure you wish to delete this supplier?') . '\');\"></form>'; + echo '<br><a href="' . $rootpath . '/SupplierContacts.php?SupplierID=' . $SupplierID . '">' . _('Review Contact Details') . '</a></div>'; } echo '</div>'; } // end of main ifs Deleted: trunk/SystemCheck.php =================================================================== --- trunk/SystemCheck.php 2011-04-10 15:29:34 UTC (rev 5164) +++ trunk/SystemCheck.php 2011-04-10 18:13:50 UTC (rev 5165) @@ -1,70 +0,0 @@ -<?php -/* $Id$*/ -//$PageSecurity =10; -include('includes/session.inc'); -$title = _('System Check'); -include('includes/header.inc'); - -/* parse php modules from phpinfo */ -function parsePHPModules() { - ob_start(); - phpinfo(INFO_MODULES); - $s = ob_get_contents(); - ob_end_clean(); - - $s = strip_tags($s,'<h2><th><td>'); - $s = preg_replace('/<th[^>]*>([^<]+)<\/th>/',"<info>\\1</info>",$s); - $s = preg_replace('/<td[^>]*>([^<]+)<\/td>/',"<info>\\1</info>",$s); - $vTmp = preg_split('/(<h2[^>]*>[^<]+<\/h2>)/',$s,-1,PREG_SPLIT_DELIM_CAPTURE); - $vModules = array(); - for ($i=1;$i<count($vTmp);$i++) { - if (preg_match('/<h2[^>]*>([^<]+)<\/h2>/',$vTmp[$i],$vMat)) { - $vName = trim($vMat[1]); - $vTmp2 = explode("\n",$vTmp[$i+1]); - foreach ($vTmp2 AS $vOne) { - $vPat = '<info>([^<]+)<\/info>'; - $vPat3 = "/$vPat\s*$vPat\s*$vPat/"; - $vPat2 = "/$vPat\s*$vPat/"; - if (preg_match($vPat3,$vOne,$vMat)) { // 3cols - $vModules[$vName][trim($vMat[1])] = array(trim($vMat[2]),trim($vMat[3])); - } elseif (preg_match($vPat2,$vOne,$vMat)) { // 2cols - $vModules[$vName][trim($vMat[1])] = trim($vMat[2]); - } - } - } - } - return $vModules; -} - -/** get a module setting */ -function getModuleSetting($pModuleName,$pSetting) { - $vModules = parsePHPModules(); - return $vModules[$pModuleName][$pSetting]; -} -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('System Check') . '" alt="" />' . ' ' . _('System Check') . '</p>'; -echo '<div class="system_check">'; -echo '<h3>PHP Settings</h3>'; -echo '<p>PHP version: ' . phpversion(); -echo '<p>GD Module: ' . getModuleSetting('gd','GD Version') . '</p>'; -echo '<p>MYSQL Module: ' . getModuleSetting('mysql','Client API version') . '</p>'; -echo '<p>MySQL character set: '.mysql_client_encoding(); -echo '<p>Zlib: ' . getModuleSetting('zlib','ZLib Support') . '</p>'; -echo '<p>Simple XML: ' . getModuleSetting('SimpleXML','Revision') . '</p>'; -echo '<h3>Linux System Settings</h3>'; -ob_start(); -echo "<p><b>Memory Free</b></br>"; -passthru('free'); -echo "<p><b>CPU type</b></br>"; -passthru('cat /proc/cpuinfo | grep "model name" '); -echo "<p><b>Disk Space Free</b><br>"; -system('df'); -echo "<p><b>webERP Disk Space Usage</b><br>"; -system('du -sh'); -echo "<p>"; -$fr= ob_get_contents(); -ob_end_clean(); - -echo '<pre>' . $fr . '</pre>'; - -include('includes/footer.inc'); -?> Modified: trunk/WorkOrderEntry.php =================================================================== --- trunk/WorkOrderEntry.php 2011-04-10 15:29:34 UTC (rev 5164) +++ trunk/WorkOrderEntry.php 2011-04-10 18:13:50 UTC (rev 5165) @@ -158,7 +158,7 @@ prnMsg (_('There are no products available meeting the criteria specified'),'info'); if ($debug==1){ - prnMsg(_('The SQL statement used was') . ':<br>' . $SQL,'info'); + prnMsg(_('The SQL statement used was') . ':<br />' . $SQL,'info'); } } if (DB_num_rows($SearchResult)==1){ @@ -253,8 +253,8 @@ if (isset($_POST['submit'])) { //The update button has been clicked echo '<div class=centre><a href="' . $_SERVER['PHP_SELF'] .'">' . _('Enter a new work order') . '</a>'; - echo '<br><a href="' . $rootpath . '/SelectWorkOrder.php">' . _('Select an existing work order') . '</a>'; - echo '<br><a href="'. $rootpath . '/WorkOrderCosting.php&WO=' . $_REQUEST['WO'] . '">' . _('Go to Costing'). '</a></div>'; + echo '<br /><a href="' . $rootpath . '/SelectWorkOrder.php">' . _('Select an existing work order') . '</a>'; + echo '<br /><a href="'. $rootpath . '/WorkOrderCosting.php&WO=' . $_REQUEST['WO'] . '">' . _('Go to Costing'). '</a></div>'; $Input_Error = false; //hope for the best for ($i=1;$i<=$_POST['NumberOfOutputs'];$i++){ @@ -283,11 +283,13 @@ if ($QtyRecd==0){ //can only change factory location if Qty Recd is 0 $sql[] = "UPDATE workorders SET requiredby='" . $SQL_ReqDate . "', + startdate='" . FormatDateForSQL($_POST['StartDate']) . "', loccode='" . $_POST['StockLocation'] . "' WHERE wo='" . $_POST['WO'] . "'"; } else { prnMsg(_('The factory where this work order is made can only be updated if the quantity received on all output items is 0'),'warn'); - $sql[] = "UPDATE workorders SET requiredby='" . $SQL_ReqDate . "' + $sql[] = "UPDATE workorders SET requiredby='" . $SQL_ReqDate . "', + startdate='" . FormatDateForSQL($_POST['StartDate']) . "' WHERE wo='" . $_POST['WO'] . "'"; } @@ -329,7 +331,7 @@ //run the SQL from either of the above possibilites $ErrMsg = _('The work order could not be added/updated'); foreach ($sql as $sql_stmt){ - // echo '<br>' . $sql_stmt; + // echo '<br />' . $sql_stmt; $result = DB_query($sql_stmt,$db,$ErrMsg); } @@ -396,7 +398,7 @@ echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '" name="form">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<br><table class=selection>'; +echo '<br /><table class=selection>'; $sql="SELECT workorders.loccode, requiredby, @@ -470,10 +472,9 @@ $_POST['StartDate'] = Date($_SESSION['DefaultDateFormat']); } -echo '<input type="hidden" name="StartDat... [truncated message content] |
From: <tim...@us...> - 2011-04-10 20:32:45
|
Revision: 5166 http://weberp.svn.sourceforge.net/weberp/?rev=5166&view=rev Author: tim_schofield Date: 2011-04-10 20:32:38 +0000 (Sun, 10 Apr 2011) Log Message: ----------- XHTML updates and quoting changes Modified Paths: -------------- trunk/ShipmentCosting.php trunk/Shipt_Select.php trunk/StockCategories.php trunk/StockCheck.php trunk/StockCostUpdate.php trunk/StockDispatch.php trunk/StockQties_csv.php trunk/StockQuantityByDate.php trunk/StockSerialItemResearch.php trunk/StockSerialItems.php trunk/StockUsage.php trunk/Stocks.php trunk/SuppContractChgs.php trunk/SuppCreditGRNs.php trunk/SuppFixedAssetChgs.php trunk/SuppInvGRNs.php trunk/SupplierAllocations.php Modified: trunk/ShipmentCosting.php =================================================================== --- trunk/ShipmentCosting.php 2011-04-10 18:13:50 UTC (rev 5165) +++ trunk/ShipmentCosting.php 2011-04-10 20:32:38 UTC (rev 5166) @@ -244,7 +244,7 @@ /*The cost adjustment is the price variance / the total quantity in stock - But that's only provided that the total quantity in stock is > the quantity charged on this invoice + But thats only provided that the total quantity in stock is greater than the quantity charged on this invoice */ $WriteOffToVariances =0; @@ -268,19 +268,19 @@ if ($myrow['totqtyinvoiced'] > $TotalQuantityOnHand){ $sql = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES (31, - '" . $_GET['SelectedShipment'] . "', - '" . Date('Y-m-d') . "', - '" . $PeriodNo . "', - '" . $StockGLCodes['purchpricevaract'] . "', - '" . $myrow['itemcode'] . ' ' . _('shipment cost') . ' ' . number_format($ItemShipmentCost,2) . _('shipment quantity > stock held - variance write off') . "', - " . $WriteOffToVariances . ")"; + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (31, + '" . $_GET['SelectedShipment'] . "', + '" . Date('Y-m-d') . "', + '" . $PeriodNo . "', + '" . $StockGLCodes['purchpricevaract'] . "', + '" . $myrow['itemcode'] . ' ' . _('shipment cost') . ' ' . number_format($ItemShipmentCost,2) . _('shipment quantity > stock held - variance write off') . "', + " . $WriteOffToVariances . ")"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL entry for the shipment variance posting for'). ' ' . $myrow['itemcode'] . ' '. _('could not be inserted into the database because'); $result = DB_query($sql,$db, $ErrMsg,'',TRUE); Modified: trunk/Shipt_Select.php =================================================================== --- trunk/Shipt_Select.php 2011-04-10 18:13:50 UTC (rev 5165) +++ trunk/Shipt_Select.php 2011-04-10 20:32:38 UTC (rev 5166) @@ -113,27 +113,27 @@ while ($myrow=DB_fetch_array($resultStkLocs)){ if (isset($_POST['StockLocation'])){ if ($myrow['loccode'] == $_POST['StockLocation']){ - echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ $_POST['StockLocation'] = $_SESSION['UserStockLocation']; - echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } echo '</select>'; echo ' <select name="OpenOrClosed">'; if ($_POST['OpenOrClosed']==1){ - echo '<option selected VALUE=1>'. _('Closed Shipments Only'); - echo '<option VALUE=0>'. _('Open Shipments Only'); + echo '<option selected VALUE=1>'. _('Closed Shipments Only') . '</option>'; + echo '<option VALUE=0>'. _('Open Shipments Only') . '</option>'; } else { $_POST['OpenOrClosed']=0; - echo '<option VALUE=1>'. _('Closed Shipments Only'); - echo '<option selected VALUE=0>'. _('Open Shipments Only'); + echo '<option VALUE=1>'. _('Closed Shipments Only') . '</option>'; + echo '<option selected VALUE=0>'. _('Open Shipments Only') . '</option>'; } echo '</select></td></tr></table>'; @@ -157,9 +157,9 @@ <?php while ($myrow1 = DB_fetch_array($result1)) { if (isset($_POST['StockCat']) and $myrow1['categoryid']==$_POST['StockCat']){ - echo '<option selected VALUE="'. $myrow1['categoryid'] . '">' . $myrow1['categorydescription']; + echo '<option selected VALUE="'. $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } else { - echo '<option VALUE="'. $myrow1['categoryid'] . '">' . $myrow1['categorydescription']; + echo '<option VALUE="'. $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } } ?> @@ -178,7 +178,7 @@ if (isset($StockItemsResult)) { - echo "<table cellpadding=2 colspan=7 class=selection>"; + echo '<table cellpadding=2 colspan=7 class=selection>'; $TableHeader = '<tr> <th>'. _('Code').'</th> <th>'. _('Description').'</th> @@ -203,7 +203,7 @@ } /* Code Description On Hand Orders Ostdg Units Code Description On Hand Orders Ostdg Units */ - printf('<td><input type=submit name="SelectedStockItem" VALUE="%s"</td> + printf('<td><input type=submit name="SelectedStockItem" VALUE="%s" /></td> <td>%s</td> <td class=number>%s</td> <td class=number>%s</td> Modified: trunk/StockCategories.php =================================================================== --- trunk/StockCategories.php 2011-04-10 18:13:50 UTC (rev 5165) +++ trunk/StockCategories.php 2011-04-10 20:32:38 UTC (rev 5166) @@ -385,11 +385,10 @@ while ($myrow = DB_fetch_array($Result)){ if (isset($_POST['StockAct']) and $myrow['accountcode']==$_POST['StockAct']) { - echo '<option selected value='; + echo '<option selected value="' . $myrow['accountcode'] . '">' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } else { - echo '<option value='; + echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } - echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')'; } //end while loop DB_data_seek($PnLAccountsResult,0); DB_data_seek($BSAccountsResult,0); @@ -400,11 +399,10 @@ while ($myrow = DB_fetch_array($BSAccountsResult)) { if (isset($_POST['WIPAct']) and $myrow['accountcode']==$_POST['WIPAct']) { - echo '<option selected value='; + echo '<option selected value="' . $myrow['accountcode'] . '">' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } else { - echo '<option value='; + echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } - echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')'; } //end while loop echo '</select></td></tr>'; @@ -415,11 +413,10 @@ while ($myrow = DB_fetch_array($PnLAccountsResult)) { if (isset($_POST['AdjGLAct']) and $myrow['accountcode']==$_POST['AdjGLAct']) { - echo '<option selected value='; + echo '<option selected value="' . $myrow['accountcode'] . '">' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } else { - echo '<option value='; + echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } - echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')'; } //end while loop DB_data_seek($PnLAccountsResult,0); @@ -430,11 +427,10 @@ while ($myrow = DB_fetch_array($PnLAccountsResult)) { if (isset($_POST['PurchPriceVarAct']) and $myrow['accountcode']==$_POST['PurchPriceVarAct']) { - echo '<option selected value='; + echo '<option selected value="' . $myrow['accountcode'] . '">' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } else { - echo '<option value='; + echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } - echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')'; } //end while loop DB_data_seek($PnLAccountsResult,0); @@ -449,11 +445,10 @@ while ($myrow = DB_fetch_array($PnLAccountsResult)) { if (isset($_POST['MaterialUseageVarAc']) and $myrow['accountcode']==$_POST['MaterialUseageVarAc']) { - echo '<option selected value='; + echo '<option selected value="' . $myrow['accountcode'] . '">' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } else { - echo '<option value='; + echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } - echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')'; } //end while loop DB_free_result($PnLAccountsResult); Modified: trunk/StockCheck.php =================================================================== --- trunk/StockCheck.php 2011-04-10 18:13:50 UTC (rev 5165) +++ trunk/StockCheck.php 2011-04-10 20:32:38 UTC (rev 5166) @@ -195,7 +195,7 @@ if ($debug==1){ echo '<br>' . $SQL; } - echo '</body</html>'; + echo '</body></html>'; exit; } Modified: trunk/StockCostUpdate.php =================================================================== --- trunk/StockCostUpdate.php 2011-04-10 18:13:50 UTC (rev 5165) +++ trunk/StockCostUpdate.php 2011-04-10 20:32:38 UTC (rev 5166) @@ -144,7 +144,7 @@ echo '<input type=hidden name=OldMaterialCost VALUE=' . $myrow['materialcost'] .'>'; echo '<input type=hidden name=OldLabourCost VALUE=' . $myrow['labourcost'] .'>'; -echo '<input type=hidden name=OldOverheadCost VALUE=' . $myrow['overheadcost'] .">"; +echo '<input type=hidden name=OldOverheadCost VALUE=' . $myrow['overheadcost'] .'>'; echo '<input type=hidden name="QOH" VALUE=' . $myrow['totalqoh'] .'>'; echo '<tr><td>' . _('Last Cost') .':</td><td class=number>' . number_format($myrow['lastcost'],2) . '</td></tr>'; Modified: trunk/StockDispatch.php =================================================================== --- trunk/StockDispatch.php 2011-04-10 18:13:50 UTC (rev 5165) +++ trunk/StockDispatch.php 2011-04-10 20:32:38 UTC (rev 5166) @@ -90,9 +90,9 @@ $title = _('Stock Dispatch - Problem Report'); include('includes/header.inc'); prnMsg( _('The Stock Dispatch 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">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br>$sql"; + echo '<br>' . $sql; } include('includes/footer.inc'); exit; @@ -102,7 +102,7 @@ include('includes/header.inc'); echo '<br />'; prnMsg( _('The stock dispatch did not have any items to list'),'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>'; include('includes/footer.inc'); exit; } @@ -227,7 +227,7 @@ $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); $DefaultLocation = $myrow['defaultlocation']; - echo '<br/><form action=' . $_SERVER['PHP_SELF'] . " method='post'><table class=selection>"; + echo '<br/><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $sql = "SELECT loccode, locationname @@ -236,13 +236,13 @@ if (!isset($_POST['FromLocation'])) { $_POST['FromLocation']=$DefaultLocation; } - echo '<table class=selection><tr><td>' . _('Dispatch Percent') . ":</td><td><input type ='text' name='Percent' class=number size='8' value=0>"; + echo '<table class=selection><tr><td>' . _('Dispatch Percent') . ':</td><td><input type ="text" name="Percent" class=number size="8" value=0>'; echo '<tr><td>' . _('From Stock Location') . ':</td><td><select name="FromLocation"> '; while ($myrow=DB_fetch_array($resultStkLocs)){ if ($myrow['loccode'] == $_POST['FromLocation']){ - echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } echo '</select></td></tr>'; @@ -253,9 +253,9 @@ echo '<tr><td>' . _('To Stock Location') . ':</td><td><select name="ToLocation"> '; while ($myrow=DB_fetch_array($resultStkLocs)){ if ($myrow['loccode'] == $_POST['ToLocation']){ - echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } echo '</select></td></tr>'; @@ -280,9 +280,9 @@ $_POST['StockCat']='All'; } if ($_POST['StockCat']=='All'){ - echo '<option selected value="All">' . _('All'); + echo '<option selected value="All">' . _('All') . '</option>'; } else { - echo '<option value="All">' . _('All'); + echo '<option value="All">' . _('All') . '</option>'; } while ($myrow1 = DB_fetch_array($result1)) { if ($myrow1['categoryid']==$_POST['StockCat']){ @@ -294,19 +294,19 @@ echo '</select></td></tr>'; echo '<tr></tr><tr></tr><tr><td>' . _('Report Type') . ':</td>'; - echo "<td><select name='ReportType'>"; - echo "<option selected value='Batch'>" . _('Create Batch'); - echo "<option value='Report'>" . _('Report Only'); + echo '<td><select name="ReportType">'; + echo '<option selected value="Batch">' . _('Create Batch') . '</option>'; + echo '<option value="Report">' . _('Report Only') . '</option>'; echo '</select></td><td> </td></tr>'; echo '<tr><td>' . _('Template') . ':</td>'; - echo "<td><select name='template'>"; - echo "<option selected value='standard'>" . _('Standard'); - echo "<option value='simple'>" . _('Simple'); + echo '<td><select name="template">'; + echo '<option selected value="standard">' . _('Standard') . '</option>'; + echo '<option value="simple">' . _('Simple') . '</option>'; echo '</select></td><td> </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'); @@ -377,4 +377,4 @@ $FontSize=8; $PageNumber++; } // End of PrintHeader() function -?> +?> \ No newline at end of file Modified: trunk/StockQties_csv.php =================================================================== --- trunk/StockQties_csv.php 2011-04-10 18:13:50 UTC (rev 5165) +++ trunk/StockQties_csv.php 2011-04-10 20:32:38 UTC (rev 5166) @@ -7,14 +7,13 @@ $title = _('Produce Stock Quantities CSV'); include ('includes/header.inc'); -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . -'" alt="" /><b>' . $title. '</b></p>'; +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') .'" alt="" /><b>' . $title. '</b></p>'; function stripcomma($str) { //because we're using comma as a delimiter return str_replace(",", "", $str); } -echo '<div class=centre>' . _('Making a comma separated values file of the current stock quantities'); +echo '<div class=centre>' . _('Making a comma separated values file of the current stock quantities') . '</div>'; $ErrMsg = _('The SQL to get the stock quantities failed with the message'); @@ -43,7 +42,7 @@ fclose($fp); -echo "<br /><a href='" . $rootpath . '/' . $_SESSION['reports_dir'] . "/StockQties.csv'>" . _('click here') . '</a> ' . _('to view the file') . '</div>'; +echo '<br /><a href="' . $rootpath . '/' . $_SESSION['reports_dir'] . '/StockQties.csv ">' . _('click here') . '</a> ' . _('to view the file') . '</div>'; include('includes/footer.inc'); Modified: trunk/StockQuantityByDate.php =================================================================== --- trunk/StockQuantityByDate.php 2011-04-10 18:13:50 UTC (rev 5165) +++ trunk/StockQuantityByDate.php 2011-04-10 20:32:38 UTC (rev 5166) @@ -10,8 +10,7 @@ $title = _('Stock On Hand By Date'); include('includes/header.inc'); -echo '<p Class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . -'" alt="" /><b>' . $title. '</b></p>'; +echo '<p Class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') .'" alt="" /><b>' . $title. '</b></p>'; echo "<form action='" . $_SERVER['PHP_SELF'] . "?". SID . "' method=post>"; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/StockSerialItemResearch.php =================================================================== --- trunk/StockSerialItemResearch.php 2011-04-10 18:13:50 UTC (rev 5165) +++ trunk/StockSerialItemResearch.php 2011-04-10 20:32:38 UTC (rev 5166) @@ -7,8 +7,7 @@ $title = _('Serial Item Research'); include('includes/header.inc'); -echo '<p Class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . -'" alt="" /><b>' . $title. '</b></p>'; +echo '<p Class="page_title_text"> <img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') .'" /> <b>' . $title. '</b> </p>'; //validate the submission @@ -31,9 +30,9 @@ <input type=submit name=submit></div><br /> </form>'; -echo "<SCRIPT> -document.getElementById('serialno').focus(); -</SCRIPT>"; +echo '<SCRIPT> +document.getElementById("serialno").focus(); +</SCRIPT>'; if ($SN!='') { Modified: trunk/StockSerialItems.php =================================================================== --- trunk/StockSerialItems.php 2011-04-10 18:13:50 UTC (rev 5165) +++ trunk/StockSerialItems.php 2011-04-10 20:32:38 UTC (rev 5166) @@ -7,8 +7,7 @@ $title = _('Stock Of Controlled Items'); include('includes/header.inc'); -echo '<p Class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . -'" alt="" /><b>' . $title. '</b></p>'; +echo '<p Class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') .'" alt="" /><b>' . $title. '</b></p>'; if (isset($_GET['StockID'])){ $StockID = trim(strtoupper($_GET['StockID'])); @@ -41,7 +40,8 @@ if ($myrow['mbflag']=='K' OR $myrow['mbflag']=='A' OR $myrow['mbflag']=='D'){ - prnMsg(_('This item is either a kitset or assembly or a dummy part and cannot have a stock holding') . '. ' . _('This page cannot be displayed') . '. ' . _('Only serialised or controlled items can be displayed in this page'),'error'); + prnMsg(_('This item is either a kitset or assembly or a dummy part and cannot have a stock holding') . '. ' . + _('This page cannot be displayed') . '. ' . _('Only serialised or controlled items can be displayed in this page'),'error'); include('includes/footer.inc'); exit; } @@ -70,49 +70,49 @@ echo '<table cellpadding=2 class=selection>'; if ($Serialised==1){ - echo '<tr<th colspan=5><font color=navy size=2>' . _('Serialised items in') . ' '; + echo '<tr><th colspan=5><font color=navy size=2>' . _('Serialised items in') . ' '; } else { - echo '<tr<th colspan=11><font color=navy size=2>' . _('Controlled items in') . ' '; + echo '<tr><th colspan=11><font color=navy size=2>' . _('Controlled items in') . ' '; } echo $myrow[0]. '</font></th></tr>'; -echo "<tr><th colspan=11><font color=navy size=2>".$StockID ."-". $Description ."</b> (" . _('In units of') . ' ' . $UOM . ')</font></th></tr>'; +echo '<tr><th colspan=11><font color=navy size=2>'.$StockID .'-'. $Description .'</b> (' . _('In units of') . ' ' . $UOM . ')</font></th></tr>'; if ($Serialised == 1){ - $tableheader = "<tr> - <th>" . _('Serial Number') . "</th> + $tableheader = '<tr> + <th>' . _('Serial Number') . '</th> <th></th> - <th>" . _('Serial Number') . "</th> + <th>' . _('Serial Number') . '</th> <th></th> - <th>" . _('Serial Number') . "</th> - </tr>"; + <th>' . _('Serial Number') . '</th> + </tr>'; } else if ($Serialised == 0 and $Perishable==0){ - $tableheader = "<tr> - <th>" . _('Batch/Bundle Ref') . "</th> - <th>" . _('Quantity On Hand') . "</th> + $tableheader = '<tr> + <th>' . _('Batch/Bundle Ref') . '</th> + <th>' . _('Quantity On Hand') . '</th> <th></th> - <th>" . _('Batch/Bundle Ref') . "</th> - <th>" . _('Quantity On Hand') . "</th> + <th>' . _('Batch/Bundle Ref') . '</th> + <th>' . _('Quantity On Hand') . '</th> <th></th> - <th>" . _('Batch/Bundle Ref') . "</th> - <th>" . _('Quantity On Hand') . "</th> + <th>' . _('Batch/Bundle Ref') . '</th> + <th>' . _('Quantity On Hand') . '</th> - </tr>"; + </tr>'; } else if ($Serialised == 0 and $Perishable==1){ - $tableheader = "<tr> - <th>" . _('Batch/Bundle Ref') . "</th> - <th>" . _('Quantity On Hand') . "</th> - <th>" . _('Expiry Date') . "</th> + $tableheader = '<tr> + <th>' . _('Batch/Bundle Ref') . '</th> + <th>' . _('Quantity On Hand') . '</th> + <th>' . _('Expiry Date') . '</th> <th></th> - <th>" . _('Batch/Bundle Ref') . "</th> - <th>" . _('Quantity On Hand') . "</th> - <th>" . _('Expiry Date') . "</th> + <th>' . _('Batch/Bundle Ref') . '</th> + <th>' . _('Quantity On Hand') . '</th> + <th>' . _('Expiry Date') . '</th> <th></th> - <th>" . _('Batch/Bundle Ref') . "</th> - <th>" . _('Quantity On Hand') . "</th> - <th>" . _('Expiry Date') . "</th> + <th>' . _('Batch/Bundle Ref') . '</th> + <th>' . _('Quantity On Hand') . '</th> + <th>' . _('Expiry Date') . '</th> - </tr>"; + </tr>'; } echo $tableheader; $TotalQuantity =0; @@ -132,16 +132,16 @@ $TotalQuantity += $myrow['quantity']; if ($Serialised == 1){ - echo '<td>'.$myrow['serialno'].'/td>'; + echo '<td>'.$myrow['serialno'].'</td>'; echo '<th></th>'; } else if ($Serialised == 0 and $Perishable==0) { - echo "<td>".$myrow['serialno']."</td> - <td class=number>".number_format($myrow['quantity'],$DecimalPlaces)."</td>"; + echo '<td>'.$myrow['serialno'].'</td> + <td class=number>'.number_format($myrow['quantity'],$DecimalPlaces).'</td>'; echo '<th></th>'; } else if ($Serialised == 0 and $Perishable==1){ - echo "<td>".$myrow['serialno']."</td> - <td class=number>".number_format($myrow['quantity'],$DecimalPlaces)."</td> - <td>".ConvertSQLDate($myrow['expirationdate'])."</td>"; + echo '<td>'.$myrow['serialno'].'</td> + <td class=number>'.number_format($myrow['quantity'],$DecimalPlaces).'</td> + <td>'.ConvertSQLDate($myrow['expirationdate']).'</td>'; echo '<th></th>'; } $j++; Modified: trunk/StockUsage.php =================================================================== --- trunk/StockUsage.php 2011-04-10 18:13:50 UTC (rev 5165) +++ trunk/StockUsage.php 2011-04-10 20:32:38 UTC (rev 5166) @@ -16,11 +16,11 @@ } if (isset($_POST['ShowGraphUsage'])) { - echo "<meta http-equiv='Refresh' content='0; url=" . $rootpath . "/SuppInvGRNs.php?" . SID . "'>"; - echo "<meta http-equiv='Refresh' content='0; url=" . $rootpath . "/StockUsageGraph.php?" . SID . "&StockLocation=" . $_POST['StockLocation'] . "&StockID=" . $StockID . "'>"; + echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/SuppInvGRNs.php">'; + echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/StockUsageGraph.php?StockLocation=' . $_POST['StockLocation'] . '&StockID=' . $StockID . '">'; echo '<p>' . _('You should automatically be forwarded to the usage graph') . '. ' . _('If this does not happen') .' (' . _('if the browser does not support META Refresh') . ') ' . - "<a href='" . $rootpath . "/StockUsageGraph.php?" . SID . '&StockLocation=' . $_POST['StockLocation'] .'&StockID=' . $StockID . '">' . _('click here') . '</a> ' . _('to continue') . '.<br>'; + '<a href="' . $rootpath . '/StockUsageGraph.php?StockLocation="' . $_POST['StockLocation'] .'&StockID=' . $StockID . '">' . _('click here') . '</a> ' . _('to continue') . '.<br />'; exit; } @@ -44,7 +44,7 @@ $Its_A_KitSet_Assembly_Or_Dummy =False; if (($myrow[2]=='K') OR ($myrow[2]=='A') OR ($myrow[2]=='D')) { $Its_A_KitSet_Assembly_Or_Dummy =True; - echo "<font color=navy size=3><b>$StockID - $myrow[0] </b></font>"; + echo '<font color=navy size=3><b>' . $StockID - $myrow[0] . '</b></font>'; echo '<br>' . _('The selected item is a dummy or assembly or kit-set item and cannot have a stock holding') . '. ' . _('Please select a different item'); @@ -53,39 +53,39 @@ echo '<tr><th><font size=3 color=navy>' . _('Item') . ' :<b> ' . $StockID . ' - ' . $myrow[0] . ' </b> (' . _('in units of') . ' :<b> ' . $myrow[1] . ')</b></font></th></tr>'; } -echo "<form action='" . $_SERVER['PHP_SELF'] . '?'. SID ."' method=post><tr><td>"; +echo '<form action="' . $_SERVER['PHP_SELF'] . ' method="post"><tr><td>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo _('Stock Code') . ":<input type=text name='StockID' size=21 maxlength=20 value='$StockID' >"; +echo _('Stock Code') . ':<input type=text name="StockID" size=21 maxlength=20 value="' . $StockID . '" />'; -echo _('From Stock Location') . ":<select name='StockLocation'>"; +echo _('From Stock Location') . ':<select name="StockLocation">'; $sql = "SELECT loccode, locationname FROM locations"; $resultStkLocs = DB_query($sql,$db); while ($myrow=DB_fetch_array($resultStkLocs)){ if (isset($_POST['StockLocation'])){ if ($myrow['loccode'] == $_POST['StockLocation']){ - echo "<option selected Value='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo "<option Value='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ - echo "<option selected Value='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; $_POST['StockLocation']=$myrow['loccode']; } else { - echo "<option Value='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } if (isset($_POST['StockLocation'])){ if ('All'== $_POST['StockLocation']){ - echo "<option selected Value='All'>" . _('All Locations'); + echo '<option selected Value="All">' . _('All Locations') . '</option>'; } else { - echo "<option Value='All'>" . _('All Locations'); + echo '<option Value="All">' . _('All Locations') . '</option>'; } } echo '</select>'; -echo " <input type=submit name='ShowUsage' VALUE='" . _('Show Stock Usage') . "'>"; -echo " <input type=submit name='ShowGraphUsage' VALUE='" . _('Show Graph Of Stock Usage') . "'></td></tr></table><br />"; +echo ' <input type=submit name="ShowUsage" VALUE="' . _('Show Stock Usage') . '">'; +echo ' <input type=submit name="ShowGraphUsage" VALUE="' . _('Show Graph Of Stock Usage') . '"></td></tr></table><br />'; /* $_SESSION['NumberOfPeriodsOfStockUsage'] is defined in config.php as a user definable variable config.php is loaded by header.inc */ @@ -135,7 +135,7 @@ } echo '</div><table cellpadding=2 class=selection>'; - $tableheader = "<tr><th>" . _('Month') . "</th><th>" . _('Usage') . '</th></tr>'; + $tableheader = '<tr><th>' . _('Month') . '</th><th>' . _('Usage') . '</th></tr>'; echo $tableheader; $j = 1; @@ -165,18 +165,18 @@ //end of while loop if ($TotalUsage>0 && $PeriodsCounter>0){ - echo '<tr<th colspan=2>' . _('Average Usage per month is') . ' ' . number_format($TotalUsage/$PeriodsCounter); + echo '<tr><th colspan=2>' . _('Average Usage per month is') . ' ' . number_format($TotalUsage/$PeriodsCounter); echo '</th></tr>'; } echo '</table>'; } /* end if Show Usage is clicked */ echo '<br /><div class="centre">'; -echo "<a href='$rootpath/StockStatus.php?". SID . "&StockID=$StockID'>" . _('Show Stock Status') .'</a>'; -echo "<br><a href='$rootpath/StockMovements.php?". SID . "&StockID=$StockID&StockLocation=" . $_POST['StockLocation'] . "'>" . _('Show Stock Movements') . '</a>'; -echo "<br><a href='$rootpath/SelectSalesOrder.php?". SID . "&SelectedStockItem=$StockID&StockLocation=" . $_POST['StockLocation'] . "'>" . _('Search Outstanding Sales Orders') . '</a>'; -echo "<br><a href='$rootpath/SelectCompletedOrder.php?". SID . "&SelectedStockItem=$StockID'>" . _('Search Completed Sales Orders') . '</a>'; -echo "<br><a href='$rootpath/PO_SelectOSPurchOrder.php?" .SID . "&SelectedStockItem=$StockID'>" . _('Search Outstanding Purchase Orders') . '</a>'; +echo '<a href="' . $rootpath . '/StockStatus.php?StockID=$StockID">' . _('Show Stock Status') .'</a>'; +echo '<br><a href="' . $rootpath . '/StockMovements.php?StockID=' . $StockID . '&StockLocation=' . $_POST['StockLocation'] . '">' . _('Show Stock Movements') . '</a>'; +echo '<br><a href="' . $rootpath . '/SelectSalesOrder.php?SelectedStockItem=$StockID&StockLocation=' . $_POST['StockLocation'] . '">' . _('Search Outstanding Sales Orders') . '</a>'; +echo '<br><a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedStockItem=$StockID">' . _('Search Completed Sales Orders') . '</a>'; +echo '<br><a href="' . $rootpath . '/PO_SelectOSPurchOrder.php?SelectedStockItem=$StockID">' . _('Search Outstanding Purchase Orders') . '</a>'; echo '</form></div>'; include('includes/footer.inc'); Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2011-04-10 18:13:50 UTC (rev 5165) +++ trunk/Stocks.php 2011-04-10 20:32:38 UTC (rev 5166) @@ -51,7 +51,7 @@ } elseif ( $_FILES['ItemPicture']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check prnMsg(_('The file size is over the maximum allowed. The maximum size allowed in KB is') . ' ' . $_SESSION['MaxImageSize'],'warn'); $UploadTheFile ='No'; - } elseif ( $_FILES['ItemPicture']['type'] == "text/plain" ) { //File Type Check + } elseif ( $_FILES['ItemPicture']['type'] == 'text/plain' ) { //File Type Check prnMsg( _('Only graphics files can be uploaded'),'warn'); $UploadTheFile ='No'; } elseif (file_exists($filename)){ @@ -65,7 +65,7 @@ if ($UploadTheFile=='Yes'){ $result = move_uploaded_file($_FILES['ItemPicture']['tmp_name'], $filename); - $message = ($result)?_('File url') ."<a href='". $filename ."'>" . $filename . '</a>' : _('Something is wrong with uploading a file'); + $message = ($result)?_('File url') .'<a href="'. $filename .'">' . $filename . '</a>' : _('Something is wrong with uploading a file'); } /* EOR Add Image upload for New Item - by Ori */ } @@ -107,7 +107,7 @@ } if (ContainsIllegalCharacters($StockID) OR strstr($StockID,' ')) { $InputError = 1; - prnMsg(_('The stock item code cannot contain any of the following characters') . " - ' & + \" \\ " . _('or a space'),'error'); + prnMsg(_('The stock item code cannot contain any of the illegal characters') ,'error'); $Errors[$i] = 'StockID'; $i++; $StockID=''; @@ -425,8 +425,8 @@ $InsResult = DB_query($sql,$db,$ErrMsg,$DbgMsg); if (DB_error_no($db) ==0) { - prnMsg( _('New Item') .' ' . "<a - href='SelectProduct.php?StockID=$StockID'>$StockID</a>" . ' '. _('has been added to the database'),'success'); unset($_POST['LongDescription']); + prnMsg( _('New Item') .' ' . '<a + href="SelectProduct.php?StockID='.$StockID.'">'.$StockID.'</a>' . ' '. _('has been added to the database'),'success'); unset($_POST['LongDescription']); echo '<br>'; unset($_POST['Description']); unset($_POST['EOQ']); @@ -660,7 +660,7 @@ } else { $LongDescription =''; } -echo '<tr><td>' . _('Part Description') . ' (' . _('long') . '):</td><td><textarea ' . (in_array('LongDescription',$Errors) ? 'class="texterror"' : '' ) .' name="LongDescription" cols=40 rows=4>' . stripslashes($LongDescription) . '</textarea></td></tr>'."\n"; +echo '<tr><td>' . _('Part Description') . ' (' . _('long') . '):</td><td><textarea ' . (in_array('LongDescription',$Errors) ? 'class="texterror"' : '' ) .' name="LongDescription" cols=40 rows=4>' . stripslashes($LongDescription) . '</textarea></td></tr>'; // Generate selection drop down from pdf_append directory - by emdx, // developed with examples from http://au2.php.net/manual/en/function.opendir.php @@ -671,7 +671,7 @@ chmod($dir, 0777); } if ($handle = opendir($dir)) { - $mydir = "<select name=".$select_name.">\n"; + $mydir = '<select name="'.$select_name.'">'; $mydir .= '<option value=0>none'; if (isset($_POST['ItemPDF'])) { $curr_val = $_POST['ItemPDF']; @@ -686,8 +686,11 @@ sort($files); foreach ($files as $val) { if (is_file($dir.$val)) { - $mydir .= '<option value='.$val; - $mydir .= ($val == $curr_val) ? ' selected>' : '>'; + if ($val == $curr_val) { + $mydir .='<option value='.$val.' selected>'; + } else { + $mydir .='<option value='.$val.'>'; + } $mydir .= $val."\n"; $teller++; } @@ -699,7 +702,8 @@ if (!isset($_POST['ItemPDF'])) { $_POST['ItemPDF'] = ''; } -echo '<tr><td>' . _('PDF attachment (.pdf)') . ':' . "\n</td><td>" . select_files('companies/' . $_SESSION['DatabaseName'] .'/pdf_append//','' , 'ItemPDF', $_POST['ItemPDF'], '60') . '</td></tr>'. "\n"; +echo '<tr><td>' . _('PDF attachment (.pdf)') . ':</td><td>' . select_files('companies/' . $_SESSION['DatabaseName'] . + "/pdf_append//",'' , 'ItemPDF', $_POST['ItemPDF'], '60') . '</td></tr>'; // Add image upload for New Item - by Ori echo '<tr><td>'. _('Image File (.jpg)') . ':</td><td><input type="file" id="ItemPicture" name="ItemPicture"></td>'; @@ -734,9 +738,9 @@ while ($myrow=DB_fetch_array($result)){ if (!isset($_POST['CategoryID']) or $myrow['categoryid']==$_POST['CategoryID']){ - echo '<option selected value="'. $myrow['categoryid'] . '">' . $myrow['categorydescription']; + echo '<option selected value="'. $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } else { - echo '<option value="'. $myrow['categoryid'] . '">' . $myrow['categorydescription']; + echo '<option value="'. $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } $Category=$myrow['categoryid']; } @@ -882,7 +886,7 @@ echo '</select><i>' . _('Note') . ', ' . _('this has no effect if the item is not Controlled') . '</i></td></tr>'; if ($_POST['Serialised']==1 AND $_POST['MBFlag']=='M'){ - echo '<tr><td>' . _('Next Serial No (>0 for auto numbering)') . ':</td><td><input ' . (in_array('NextSerialNo',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="NextSerialNo" size=15 maxlength=15 value="' . $_POST['NextSerialNo'] . '"><td></tr>'; + echo '<tr><td>' . _('Next Serial No (greater than 0 for auto numbering)') . ':</td><td><input ' . (in_array('NextSerialNo',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="NextSerialNo" size=15 maxlength=15 value="' . $_POST['NextSerialNo'] . '"><td></tr>'; } else { echo '<input type="hidden" name="NextSerialNo" value="0">'; } Modified: trunk/SuppContractChgs.php =================================================================== --- trunk/SuppContractChgs.php 2011-04-10 18:13:50 UTC (rev 5165) +++ trunk/SuppContractChgs.php 2011-04-10 20:32:38 UTC (rev 5166) @@ -20,7 +20,7 @@ if (!isset($_SESSION['SuppTrans'])){ prnMsg(_('Contract charges or credits are entered against supplier invoices or credit notes respectively. To enter supplier transactions the supplier must first be selected from the supplier selection screen, then the link to enter a supplier invoice or credit note must be clicked on'),'info'); - echo "<br><a href='$rootpath/SelectSupplier.php?" . SID ."'>" . _('Select A Supplier') . '</a>'; + echo '<br><a href="' . $rootpath . '/SelectSupplier.php?">' . _('Select A Supplier') . '</a>'; exit; /*It all stops here if there aint no supplier selected and invoice/credit initiated ie $_SESSION['SuppTrans'] started off*/ } @@ -127,11 +127,10 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['ContractSelection']) and $myrow['contractref']==$_POST['ContractSelection']) { - echo '<option selected VALUE="'; + echo '<option selected VALUE="' . $myrow['contractref'] . '">' . $myrow['contractref'] . ' - ' . $myrow['name'] . '</option>'; } else { - echo '<option VALUE="'; + echo '<option VALUE="' . $myrow['contractref'] . '">' . $myrow['contractref'] . ' - ' . $myrow['name'] . '</option>'; } - echo $myrow['contractref'] . '">' . $myrow['contractref'] . ' - ' . $myrow['name'] ; } echo '</select></td></tr>'; Modified: trunk/SuppCreditGRNs.php =================================================================== --- trunk/SuppCreditGRNs.php 2011-04-10 18:13:50 UTC (rev 5165) +++ trunk/SuppCreditGRNs.php 2011-04-10 20:32:38 UTC (rev 5166) @@ -42,21 +42,21 @@ if ($InputError==False){ $_SESSION['SuppTrans']->Add_GRN_To_Trans($_POST['GRNNumber'], - $_POST['PODetailItem'], - $_POST['ItemCode'], - $_POST['ItemDescription'], - $_POST['QtyRecd'], - $_POST['Prev_QuantityInv'], - $_POST['This_QuantityCredited'], - $_POST['OrderPrice'], - $_POST['ChgPrice'], - $Complete, - $_POST['StdCostUnit'], - $_POST['ShiptRef'], - $_POST['JobRef'], - $_POST['GLCode'], - $_POST['PONo'], - $_POST['AssetID']); + $_POST['PODetailItem'], + $_POST['ItemCode'], + $_POST['ItemDescription'], + $_POST['QtyRecd'], + $_POST['Prev_QuantityInv'], + $_POST['This_QuantityCredited'], + $_POST['OrderPrice'], + $_POST['ChgPrice'], + $Complete, + $_POST['StdCostUnit'], + $_POST['ShiptRef'], + $_POST['JobRef'], + $_POST['GLCode'], + $_POST['PONo'], + $_POST['AssetID']); } } @@ -141,7 +141,7 @@ echo '<br /><table cellpadding=2 colspan=7 class=selection>'; -echo '<tr<th colspan=10><font size=3 color=navy>' . _('Show Goods Received Since') . ': </font>'; +echo '<tr><th colspan=10><font size=3 color=navy>' . _('Show Goods Received Since') . ': </font>'; echo '<input type=Text name="Show_Since" maxlength=11 size=12 class=date alt='.$_SESSION['DefaultDateFormat'].' value="' . $_POST['Show_Since'] . '"><font size=3 color=navy> '; echo _('From') . ' ' . $_SESSION['SuppTrans']->SupplierName . '</font></th></tr>'; Modified: trunk/SuppFixedAssetChgs.php =================================================================== --- trunk/SuppFixedAssetChgs.php 2011-04-10 18:13:50 UTC (rev 5165) +++ trunk/SuppFixedAssetChgs.php 2011-04-10 20:32:38 UTC (rev 5166) @@ -19,7 +19,7 @@ if (!isset($_SESSION['SuppTrans'])){ prnMsg(_('Fixed asset additions or credits are entered against supplier invoices or credit notes respectively') . '. ' . _('To enter supplier transactions the supplier must first be selected from the supplier selection screen') . ', ' . _('then the link to enter a supplier invoice or credit note must be clicked on'),'info'); - echo '<br><a href="' . $rootpath . '/SelectSupplier.php?' . SID .'">' . _('Select A Supplier') . '</a>'; + echo '<br><a href="' . $rootpath . '/SelectSupplier.php">' . _('Select A Supplier') . '</a>'; exit; /*It all stops here if there aint no supplier selected and invoice/credit initiated ie $_SESSION['SuppTrans'] started off*/ } @@ -67,8 +67,8 @@ echo '</p></div>'; echo '<table cellpadding=2 class=selection>'; $TableHeader = '<tr><th>' . _('Asset ID') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Amount') . '</th></tr>'; + <th>' . _('Description') . '</th> + <th>' . _('Amount') . '</th></tr>'; echo $TableHeader; $TotalAssetValue = 0; @@ -78,7 +78,7 @@ echo '<tr><td>' . $EnteredAsset->AssetID . '</td> <td>' . $EnteredAsset->Description . '</td> <td class=number>' . number_format($EnteredAsset->Amount,2) . '</td> - <td><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '&Delete=' . $EnteredAsset->Counter . '">' . _('Delete') . '</a></td></tr>'; + <td><a href="' . $_SERVER['PHP_SELF'] . '&Delete=' . $EnteredAsset->Counter . '">' . _('Delete') . '</a></td></tr>'; $TotalAssetValue += $EnteredAsset->Amount; @@ -91,13 +91,13 @@ </table><br />'; if ($_SESSION['SuppTrans']->InvoiceOrCredit == 'Invoice'){ - echo '<div class="centre"><a href="' . $rootpath . '/SupplierInvoice.php?' . SID . '">' . _('Back to Invoice Entry') . '</a></div>'; + echo '<div class="centre"><a href="' . $rootpath . '/SupplierInvoice.php">' . _('Back to Invoice Entry') . '</a></div>'; } else { - echo '<div class="centre"><a href="' . $rootpath . '/SupplierCredit.php?' . SID . '">' . _('Back to Credit Note Entry') . '</a></div>'; + echo '<div class="centre"><a href="' . $rootpath . '/SupplierCredit.php">' . _('Back to Credit Note Entry') . '</a></div>'; } /*Set up a form to allow input of new Shipment charges */ -echo '<br /><form action="' . $_SERVER['PHP_SELF'] . '?' . SID . '" method="post">'; +echo '<br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (!isset($_POST['AssetID'])) { @@ -113,20 +113,19 @@ echo '<tr><td><b>' . _('OR') .' </b>'. _('Select from list') . ':</td><td><select name="AssetSelection">'; $sql = "SELECT assetid, - description - FROM fixedassets - WHERE cost=0 - ORDER BY assetid DESC"; + description + FROM fixedassets + WHERE cost=0 + ORDER BY assetid DESC"; $result = DB_query($sql, $db); while ($myrow = DB_fetch_array($result)) { if (isset($_POST['AssetSelection']) AND $myrow['AssetID']==$_POST['AssetSelection']) { - echo '<option selected VALUE="'; + echo '<option selected VALUE="' . $myrow['assetid'] . '">' . $myrow['assetid'] . ' - ' . $myrow['description'] . '</option>'; } else { - echo '<option VALUE="'; + echo '<option VALUE="' . $myrow['assetid'] . '">' . $myrow['assetid'] . ' - ' . $myrow['description'] . '</option>'; } - echo $myrow['assetid'] . '">' . $myrow['assetid'] . ' - ' . $myrow['description'] . '</option>'; } echo '</select></td></tr>'; Modified: trunk/SuppInvGRNs.php =================================================================== --- trunk/SuppInvGRNs.php 2011-04-10 18:13:50 UTC (rev 5165) +++ trunk/SuppInvGRNs.php 2011-04-10 20:32:38 UTC (rev 5166) @@ -250,23 +250,23 @@ echo "<input type=hidden name='ShiptRef' Value=''>"; echo "<p>Unfortunately, the shipment that this purchase order line item was allocated to has been closed - if you add this item to the transaction then no shipments will not be updated. If you wish to allocate the order line item to a different shipment the order must be modified first."; } else { */ - echo "<input type=hidden name='ShiptRef' Value='" . $GRNTmp->ShiptRef . "'>"; + echo '<input type=hidden name="ShiptRef" Value="' . $GRNTmp->ShiptRef . '">'; // } - echo "<div class='centre'><p><input type=Submit Name='ModifyGRN' Value='" . _('Modify Line') . "'></div>"; + echo '<div class="centre"><p><input type=Submit Name="ModifyGRN" Value="' . _('Modify Line') . '"></div>'; - echo "<input type=hidden name='GRNNumber' VALUE=" . $GRNTmp->GRNNo . '>'; - echo "<input type=hidden name='ItemCode' VALUE='" . $GRNTmp->ItemCode . "'>"; - echo "<input type=hidden name='ItemDescription' VALUE='" . $GRNTmp->ItemDescription . "'>"; - echo "<input type=hidden name='QtyRecd' VALUE=" . $GRNTmp->QtyRecd . ">"; - echo "<input type=hidden name='Prev_QuantityInv' VALUE=" . $GRNTmp->Prev_QuantityInv . '>'; - echo "<input type=hidden name='OrderPrice' VALUE=" . $GRNTmp->OrderPrice . '>'; - echo "<input type=hidden name='StdCostUnit' VALUE=" . $GRNTmp->StdCostUnit . '>'; - echo "<input type=hidden name='JobRef' Value='" . $GRNTmp->JobRef . "'>"; - echo "<input type=hidden name='GLCode' Value='" . $GRNTmp->GLCode . "'>"; - echo "<input type=hidden name='PODetailItem' Value='" . $GRNTmp->PODetailItem . "'>"; - echo "<input type=hidden name='AssetID' Value='" . $GRNTmp->AssetID . "'>"; + echo '<input type=hidden name="GRNNumber" VALUE="' . $GRNTmp->GRNNo . '">'; + echo '<input type=hidden name="ItemCode" VALUE="' . $GRNTmp->ItemCode . '">'; + echo '<input type=hidden name="ItemDescription" VALUE="' . $GRNTmp->ItemDescription . '">'; + echo '<input type=hidden name="QtyRecd" VALUE="' . $GRNTmp->QtyRecd . '">'; + echo '<input type=hidden name="Prev_QuantityInv" VALUE="' . $GRNTmp->Prev_QuantityInv . '">'; + echo '<input type=hidden name="OrderPrice" VALUE="' . $GRNTmp->OrderPrice . '">'; + echo '<input type=hidden name="StdCostUnit" VALUE=' . $GRNTmp->StdCostUnit . '">'; + echo '<input type=hidden name="JobRef" Value="' . $GRNTmp->JobRef . '">'; + echo '<input type=hidden name="GLCode" Value="' . $GRNTmp->GLCode . '">'; + echo '<input type=hidden name="PODetailItem" Value="' . $GRNTmp->PODetailItem . '">'; + echo '<input type=hidden name="AssetID" Value="' . $GRNTmp->AssetID . '">'; } else { if (count( $_SESSION['SuppTransTmp']->GRNs)>0){ /*if there are any outstanding GRNs then */ Modified: trunk/SupplierAllocations.php =================================================================== --- trunk/SupplierAllocations.php 2011-04-10 18:13:50 UTC (rev 5165) +++ trunk/SupplierAllocations.php 2011-04-10 20:32:38 UTC (rev 5166) @@ -90,10 +90,10 @@ recalc diff on exchange and add up total allocations */ if ($TotalAllocated + $_SESSION['Alloc']->TransAmt > 0.005){ - echo '<br>'; + echo '<br />'; prnMsg(_('These allocations cannot be processed because the amount allocated is more than the amount of the') . - ' ' . $_SESSION['Alloc']->TransTypeName . ' ' . _('being allocated') . '<br>' . _('Total allocated') . ' = ' . $TotalAllocated . ' ' . _('and the total amount of the Credit/payment was') . ' ' . -$_SESSION['Alloc']->TransAmt,'error'); - echo '<br>'; + ' ' . $_SESSION['Alloc']->TransTypeName . ' ' . _('being allocated') . '<br />' . _('Total allocated') . ' = ' . $TotalAllocated . ' ' . _('and the total amount of the Credit/payment was') . ' ' . -$_SESSION['Alloc']->TransAmt,'error'); + echo '<br />'; $InputError = 1; } @@ -272,16 +272,16 @@ /*The main logic determines whether the page is called with a Supplier code a specific transaction or with no parameters ie else -If with a supplier code show just that supplier's payments and credits for allocating +If with a supplier code show just that suppliers payments and credits for allocating If with a specific payment or credit show the invoices and credits available for allocating to */ -echo "<form action='" . $_SERVER['PHP_SELF'] . "?" . SID . "' method=post>"; +echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($_POST['SupplierID'])){ $_GET['SupplierID'] = $_POST['SupplierID']; - echo "<input type='hidden' name='SupplierID' VALUE='" . $_POST["SupplierID"] . "'>"; + echo '<input type="hidden" name="SupplierID" VALUE="' . $_POST['SupplierID'] . '">'; } If (isset($_GET['AllocTrans'])){ @@ -329,7 +329,7 @@ if (DB_num_rows($Result) != 1){ echo _('There was a problem retrieving the information relating the transaction selected') . '. ' . _('Allocations are unable to proceed'); if ($debug == 1){ - echo '<br>' . _('The SQL that was used to retrieve the transaction information was') . " :<br>$SQL"; + echo '<br />' . _('The SQL that was used to retrieve the transaction information was') . ' :<br />' . $SQL; } exit; } @@ -433,7 +433,7 @@ if (isset($_POST['AllocTrans'])){ - echo "<input type='hidden' name='AllocTrans' VALUE='" . $_POST["AllocTrans"] . "'>"; + echo '<input type="hidden" name="AllocTrans" VALUE="' . $_POST["AllocTrans"] . '">'; /*Show the transaction being allocated and the potential trans it could be allocated to and those where there is already an existing allocation */ @@ -446,26 +446,26 @@ $_SESSION['Alloc']->TransDate; if ($_SESSION['Alloc']->TransExRate != 1){ - echo '<br>' . _("Amount in supplier currency"). ' <b>' . + echo '<br />' . _('Amount in supplier currency'). ' <b>' . number_format(-$_SESSION['Alloc']->TransAmt,2) . '</b><i> (' . _('converted into local currency at an exchange rate of') . ' ' . $_SESSION['Alloc']->TransExRate . ')</i><p>'; } else { - echo '<br>' . _('Transaction total') . ': <b>' . -$_SESSION['Alloc']->TransAmt . '</b></div>'; + echo '<br />' . _('Transaction total') . ': <b>' . -$_SESSION['Alloc']->TransAmt . '</b></div>'; } /*Now display the potential and existing allocations put into the array above */ echo '<table cellpadding=2 colspan=7 class=selection>'; - $TableHeader = "<tr><th>" . _('Type') . "</th> - <th>" . _('Trans') . '<br>' . _('Number') . "</th> - <th>" . _('Trans') .'<br>' . _('Date') . "</th> - <th>" . _('Supp') . '<br>' . _('Ref') . "</th> - <th>" . _('Total') . '<br>' . _('Amount') . "</th> - <th>" . _('Yet to') . '<br>' . _('Allocate') . "</th> - <th>" . _('This') . '<br>' . _('Allocation') . '</th></tr>'; + $TableHeader = '<tr><th>' . _('Type') . '</th> + <th>' . _('Trans') . '<br />' . _('Number') . '</th> + <th>' . _('Trans') .'<br />' . _('Date') . '</th> + <th>' . _('Supp') . '<br />' . _('Ref') . '</th> + <th>' . _('Total') . '<br />' . _('Amount') . '</th> + <th>' . _('Yet to') . '<br />' . _('Allocate') . '</th> + <th>' . _('This') . '<br />' . _('Allocation') . '</th></tr>'; $k = 0; $Counter = 0; $RowCounter = 0; @@ -496,24 +496,22 @@ $YetToAlloc = ($AllocnItem->TransAmount - $AllocnItem->PrevAlloc); - echo "<td>$AllocnItem->TransType</td> + echo '<td>$AllocnItem->TransType</td> <td>$AllocnItem->TypeNo</td> <td>$AllocnItem->TransDate</td> <td>$AllocnItem->SuppRef</td> - <td class=number>" . number_format($AllocnItem->TransAmount,2) . '</td> - <td class=number>' . number_format($YetToAlloc,2) . "<input type=hidden name='YetToAlloc" . - $Counter . "' VALUE=" . $YetToAlloc . '></td>'; + <td class=number>' . number_format($AllocnItem->TransAmount,2) . '</td> + <td class=number>' . number_format($YetToAlloc,2) . '<input type=hidden name="YetToAlloc"' . + $Counter . '" VALUE="' . $YetToAlloc . '"></td>'; - echo "<td class=number><input type='checkbox' name='All" . $Counter . "'"; - if (ABS($AllocnItem->AllocAmt-$YetToAlloc) < 0.01){ - echo ' VALUE=' . True . '>'; + echo '<td class=number><input type="checkbox" name="All"' . $Counter . '" VALUE="' . True . '">'; } else { - echo '>'; + echo '<td class=number><input type="checkbox" name="All"' . $Counter . '" />'; } - echo "<input type=text class='number' name='Amt" . $Counter ."' maxlength=12 size=13 VALUE=" . - $AllocnItem->AllocAmt . "><input type=hidden name='AllocID" . $Counter . - "' VALUE=" . $AllocnItem->ID . '></td></tr>'; + echo '<input type=text class="number" name="Amt' . $Counter .'" maxlength=12 size=13 VALUE="' . + $AllocnItem->AllocAmt . '"><input type=hidden name="AllocID' . $Counter . + '" VALUE=' . $AllocnItem->ID . '></td></tr>'; $TotalAllocated = $TotalAllocated + $AllocnItem->AllocAmt; @@ -527,17 +525,17 @@ echo '<tr><td colspan=5 class=number><b>' . _('Left to allocate') . '</b></td><td class=number><b>' . number_format(-$_SESSION['Alloc']->TransAmt - $TotalAllocated,2) . '</b></td></tr></table>'; - echo "<div class='centre'><input type=hidden name='TotalNumberOfAllocs' VALUE=$Counter>"; + echo '<div class="centre"><input type=hidden name="TotalNumberOfAllocs" VALUE="' . $Counter . '" />'; - echo "<br /><input type=submit name='RefreshAllocTotal' VALUE='" . _('Recalculate Total To Allocate') . "'>"; - echo "<input type=submit name=UpdateDatabase VALUE='" . _('Process Allocations') . "'></div>"; + echo '<br /><input type=submit name="RefreshAllocTotal" VALUE="' . _('Recalculate Total To Allocate') . '">'; + echo '<input type=submit name=UpdateDatabase VALUE="' . _('Process Allocations') . '"></div>'; } elseif(isset($_GET['SupplierID'])){ /*page called with a supplier code so show the transactions to allocate specific to the supplier selected */ - echo "<input type=hidden name=SupplierID VALUE='" . $_GET['SupplierID'] . "'>"; + echo '<input type=hidden name=SupplierID VALUE="' . $_GET['SupplierID'] . '">'; /*Clear any previous allocation records */ @@ -570,12 +568,12 @@ } echo '<table class=selection>'; - $TableHeader = "<tr><th>" . _('Trans Type') . - "</th><th>" . _('Supplier') . - "</th><th>" . _('Number') . - "</th><th>" . _('Date') . - "</th><th>" . _('Total') . - "</th><th>" . _('To Alloc') . "</th></tr>\n"; + $TableHeader = '<tr><th>' . _('Trans Type') . + '</th><th>' . _('Supplier') . + '</th><th>' . _('Number') . + '</th><th>' . _('Date') . + '</th><th>' . _('Total') . + '</th><th>' . _('To Alloc') . '</th></tr>'. "\n"; echo $TableHeader; @@ -592,13 +590,13 @@ $k = 1; } - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td class=number>%0.2f</td> <td class=number>%0.2f</td> - <td><a href='%sAllocTrans=%s'>" . _('Allocate') .'</td> + <td><a href="%sAllocTrans=%s">' . _('Allocate') .'</td> </tr>', $myrow['typename'], $myrow['suppname'], @@ -606,7 +604,7 @@ ConvertSQLDate($myrow['trandate']), $myrow['total'], $myrow['total']-$myrow['alloc'], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] , $myrow['id']); } @@ -640,13 +638,13 @@ $result = DB_query($sql, $db); echo '<table class=selection>'; - $TableHeader = "<tr><th>" . _('Trans Type') . "</th> - <th>" . _('Supplier') . "</th> - <th>" . _('Number') . "</th> - <th>" . _('Date') . "</th> - <th>" . _('Total') . "</th> - <th>" . _('To Alloc') . "</th> - <th>" . _('More Info') . "</th></tr>\n"; + $TableHeader = '<tr><th>' . _('Trans Type') . '</th> + <th>' . _('Supplier') . '</th> + <th>' . _('Number') . '</th> + <th>' . _('Date') . '</th> + <th>' . _('Total') . '</th> + <th>' . _('To Alloc') . '</th> + <th>' . _('More Info') . '</th></tr>'; echo $TableHeader; @@ -663,13 +661,13 @@ $k = 1; } - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td class=number>%0.2f</td> <td class=number>%0.2f</td> - <td><a href='%sAllocTrans=%s'>" . _('Allocate') . '</td> + <td><a href="%sAllocTrans=%s">' . _('Allocate') . '</td> </tr>', $myrow['typename'], $myrow['suppname'], @@ -677,13 +675,13 @@ ConvertSQLDate($myrow['trandate']), $myrow['total'], $myrow['total']-$myrow['alloc'], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'], $myrow['id']); } //END WHILE LIST LOOP - echo "</table>"; + echo '</table>'; if (DB_num_rows($result) == 0) { prnMsg(_('There are no allocations to be done'),'info'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-04-11 16:21:22
|
Revision: 5169 http://weberp.svn.sourceforge.net/weberp/?rev=5169&view=rev Author: tim_schofield Date: 2011-04-11 16:21:14 +0000 (Mon, 11 Apr 2011) Log Message: ----------- XHTML and quoting changes Modified Paths: -------------- trunk/SalesAnalRepts.php trunk/SalesInquiry.php trunk/SalesPeople.php trunk/SalesTypes.php trunk/SelectCompletedOrder.php trunk/SelectCustomer.php trunk/SelectOrderItems.php trunk/SelectSupplier.php trunk/WorkOrderIssue.php Modified: trunk/SalesAnalRepts.php =================================================================== --- trunk/SalesAnalRepts.php 2011-04-10 20:39:49 UTC (rev 5168) +++ trunk/SalesAnalRepts.php 2011-04-11 16:21:14 UTC (rev 5169) @@ -16,44 +16,44 @@ /*Sales analysis headers group by data options */ if ($GroupByDataX == 'Sales Area') { - echo '<option selected Value="Sales Area">' . _('Sales Area'); + echo '<option selected Value="Sales Area">' . _('Sales Area') . '</option>'; } else { - echo '<option Value="Sales Area">' . _('Sales Area'); + echo '<option Value="Sales Area">' . _('Sales Area') . '</option>'; } if ($GroupByDataX == 'Product Code') { - echo '<option selected Value="Product Code">' . _('Product Code'); + echo '<option selected Value="Product Code">' . _('Product Code') . '</option>'; } else { - echo '<option Value="Product Code">' . _('Product Code'); + echo '<option Value="Product Code">' . _('Product Code') . '</option>'; } if ($GroupByDataX == 'Customer Code') { - echo '<option selected Value="Customer Code">' . _('Customer Code'); + echo '<option selected Value="Customer Code">' . _('Customer Code') . '</option>'; } else { - echo '<option Value="Customer Code">' . _('Customer Code'); + echo '<option Value="Customer Code">' . _('Customer Code') . '</option>'; } if ($GroupByDataX == 'Sales Type') { - echo '<option selected Value="Sales Type">' . _('Sales Type'); + echo '<option selected Value="Sales Type">' . _('Sales Type') . '</option>'; } else { - echo '<option Value="Sales Type">' . _('Sales Type'); + echo '<option Value="Sales Type">' . _('Sales Type') . '</option>'; } if ($GroupByDataX == 'Product Type') { - echo '<option selected Value="Product Type">' . _('Product Type'); + echo '<option selected Value="Product Type">' . _('Product Type') . '</option>'; } else { - echo '<option Value="Product Type">' . _('Product Type'); + echo '<option Value="Product Type">' . _('Product Type') . '</option>'; } if ($GroupByDataX == 'Customer Branch') { - echo '<option selected Value="Customer Branch">' . _('Customer Branch'); + echo '<option selected Value="Customer Branch">' . _('Customer Branch') . '</option>'; } else { - echo '<option Value="Customer Branch">' . _('Customer Branch'); + echo '<option Value="Customer Branch">' . _('Customer Branch') . '</option>'; } if ($GroupByDataX == 'Sales Person') { - echo '<option selected Value="Sales Person">' . _('Sales Person'); + echo '<option selected Value="Sales Person">' . _('Sales Person') . '</option>'; } else { - echo '<option Value="Sales Person">' . _('Sales Person'); + echo '<option Value="Sales Person">' . _('Sales Person') . '</option>'; } if ($GroupByDataX=='Not Used' OR $GroupByDataX == '' OR ! isset($GroupByDataX) OR is_null($GroupByDataX)){ - echo "<option selected VALUE='Not Used'>" . _('Not Used'); + echo '<option selected VALUE="Not Used">' . _('Not Used') . '</option>'; } else { - echo "<option VALUE='Not Used'>" . _('Not Used'); + echo '<option VALUE="Not Used">' . _('Not Used') . '</option>'; } } @@ -116,19 +116,19 @@ } if ($_POST['GroupByData1']!='Not Used' AND $_POST['Lower1'] > $_POST['Upper1']) { $InputError = 1; - prnMsg(_('Group by Level 1 is set but the lower limit is greater than the upper limit') . ' - ' . _('the report will have no output'),'error',_('Lower Limit > Upper Limit')); + prnMsg(_('Group by Level 1 is set but the lower limit is greater than the upper limit') . ' - ' . _('the report will have no output'),'error',_('Lower Limit Greater Than Upper Limit')); } if ($_POST['GroupByData2']!='Not Used' AND $_POST['Lower2'] > $_POST['Upper2']) { $InputError = 1; - prnMsg(_('Group by Level 2 is set but the lower limit is greater than the upper limit') . ' - ' . _('the report will have no output'),'error',_('Lower Limit > Upper Limit')); + prnMsg(_('Group by Level 2 is set but the lower limit is greater than the upper limit') . ' - ' . _('the report will have no output'),'error',_('Lower Limit Greater Than Upper Limit')); } if ($_POST['GroupByData3']!='Not Used' AND $_POST['Lower3'] > $_POST['Upper3']) { $InputError = 1; - prnMsg(_('Group by Level 3 is set but the lower limit is greater than the upper limit') . ' - ' . _('the report will have no output'),'error',_('Lower Limit > Upper Limit')); + prnMsg(_('Group by Level 3 is set but the lower limit is greater than the upper limit') . ' - ' . _('the report will have no output'),'error',_('Lower Limit Greater Than Upper Limit')); } if ($_POST['GroupByData4']!='Not Used' AND $_POST['Lower4'] > $_POST['Upper4']) { $InputError = 1; - prnMsg(_('Group by Level 4 is set but the lower limit is greater than the upper limit') . ' - ' . _('the report will have no output'),'error',_('Lower Limit > Upper Limit')); + prnMsg(_('Group by Level 4 is set but the lower limit is greater than the upper limit') . ' - ' . _('the report will have no output'),'error',_('Lower Limit Greater Than Upper Limit')); } @@ -296,14 +296,14 @@ } - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> - <td><a href=\"%s&SelectedReport=%s\">" . _('Design') . "</a></td> - <td><a href=\"%s/SalesAnalReptCols.php?" . SID . "&ReportID=%s\">" . _('Define Columns') . "</a></td> - <td><a href=\"%s/SalesAnalysis_UserDefined.php?" . SID . "&ReportID=%s&ProducePDF=True\">" . _('Make PDF Report') . "</a></td> - <td><a href=\"%s/SalesAnalysis_UserDefined.php?" . SID . "&ReportID=%s&ProduceCVSFile=True\">" . _('Make CSV File') . "</a></td> - <td><a href=\"%s&SelectedReport=%s&delete=1\" onclick=\"return confirm('" . _('Are you sure you wish to remove this report design?') . "');\">" . _('Delete') . "</td> - </tr>", + <td><a href="%s&SelectedReport=%s\">' . _('Design') . '</a></td> + <td><a href="%s/SalesAnalReptCols.php?ReportID=%s">' . _('Define Columns') . '</a></td> + <td><a href="%s/SalesAnalysis_UserDefined.php?ReportID=%s&ProducePDF=True">' . _('Make PDF Report') . '</a></td> + <td><a href="%s/SalesAnalysis_UserDefined.php?ReportID=%s&ProduceCVSFile=True">' . _('Make CSV File') . '</a></td> + <td><a href="%s&SelectedReport=%s&delete=1" onclick="return confirm("' . _('Are you sure you wish to remove this report design?') . '");">' . _('Delete') . '</td> + </tr>', $myrow[0], $myrow[1], $_SERVER['PHP_SELF'] . '?' . SID, @@ -383,9 +383,9 @@ $_POST['Upper4'] = $myrow['upper4']; $_POST['Lower4'] = $myrow['lower4']; - echo "<input type=hidden name='SelectedReport' VALUE=$SelectedReport>"; - echo "<input type=hidden name='ReportID' VALUE=$ReportID>"; - echo '<table width=98% colspan=4 class=selection><tr><th colspan=8><font size=3 color=BLUE>' . _('Edit The Selected Report') . '</font></th></tr>'; + echo '<input type=hidden name="SelectedReport" value=$SelectedReport>'; + echo '<input type=hidden name="ReportID" value=$ReportID>'; + echo '<table width=98% colspan=4 class=selection><tr><th colspan=8><font size=3 color=blue>' . _('Edit The Selected Report') . '</font></th></tr>'; } else { echo '<table width=98% colspan=4 class=selection><tr><th colspan=8><font size=3 color=BLUE>' . _('Define A New Report') . '</font></th></tr>'; } @@ -393,7 +393,7 @@ if (!isset($_POST['ReportHeading'])) { $_POST['ReportHeading']=''; } - echo '<tr><td class=number>' . _('Report Heading') . ":</td><td colspan=2><input type='TEXT' size=80 maxlength=80 name=ReportHeading value='" . $_POST['ReportHeading'] . "'></td></tr>"; + echo '<tr><td class=number>' . _('Report Heading') . ':</td><td colspan=2><input type="TEXT" size=80 maxlength=80 name=ReportHeading value="' . $_POST['ReportHeading'] . '"></td></tr>'; echo '<tr><td>' . _('Group By 1') . ': <select name=GroupByData1>'; @@ -402,11 +402,11 @@ echo '</select></td><td>' . _('Page Break After') . ': <select name=NewPageAfter1>'; if ($_POST['NewPageAfter1']==0){ - echo "<option selected value=0>" . _('No'); - echo "<option value=1>" . _('Yes'); + echo '<option selected value=0>' . _('No') . '</option>'; + echo '<option value=1>' . _('Yes') . '</option>'; } Else { - echo '<option value=0>' . _('No'); - echo '<option selected value=1>' . _('Yes'); + echo '<option value=0>' . _('No') . '</option>'; + echo '<option selected value=1>' . _('Yes') . '</option>'; } echo '</select></td>'; @@ -418,8 +418,8 @@ if (!isset($_POST['Upper1'])) { $_POST['Upper1'] = ''; } - echo '<td>' . _('From') . ": <input type='TEXT' name='Lower1' size=10 maxlength=10 VALUE='" . $_POST['Lower1'] . "'></td>"; - echo '<td>' . _('To') . ": <input type='TEXT' name='Upper1' size=10 maxlength=10 VALUE='" . $_POST['Upper1'] . "'></td></tr>"; + echo '<td>' . _('From') . ': <input type="text" name="Lower1" size=10 maxlength=10 VALUE="' . $_POST['Lower1'] . '"></td>'; + echo '<td>' . _('To') . ': <input type="text" name="Upper1" size=10 maxlength=10 VALUE="' . $_POST['Upper1'] . '"></td></tr>'; echo '<tr><td>' . _('Group By 2') . ': <select name=GroupByData2>'; @@ -428,11 +428,11 @@ echo '</select></td><td>' . _('Page Break After') . ': <select name=NewPageAfter2>'; if ($_POST['NewPageAfter2']==0){ - echo '<option selected value=0>' . _('No'); - echo '<option value=1>' . _('Yes'); + echo '<option selected value=0>' . _('No') . '</option>'; + echo '<option value=1>' . _('Yes') . '</option>'; } Else { - echo '<option value=0>' . _('No'); - echo '<option selected value=1>' . _('Yes'); + echo '<option value=0>' . _('No') . '</option>'; + echo '<option selected value=1>' . _('Yes') . '</option>'; } if (!isset($_POST['Lower2'])) { @@ -444,8 +444,8 @@ } echo '</select></td>'; - echo '<td>' . _('From') . ": <input type='TEXT' name='Lower2' size=10 maxlength=10 VALUE='" . $_POST['Lower2'] . "'></td>"; - echo '<td>' . _('To') . ": <input type='TEXT' name='Upper2' size=10 maxlength=10 VALUE='" . $_POST['Upper2'] . "'></td></tr>"; + echo '<td>' . _('From') . ': <input type="text" name="Lower2" size=10 maxlength=10 VALUE="' . $_POST['Lower2'] . '"></td>'; + echo '<td>' . _('To') . ': <input type="text" name="Upper2" size=10 maxlength=10 VALUE="' . $_POST['Upper2'] . '"></td></tr>'; echo '<tr><td>' . _('Group By 3') . ': <select name=GroupByData3>'; @@ -454,11 +454,11 @@ echo '</select></td><td>' . _('Page Break After') . ': <select name=NewPageAfter3>'; if ($_POST['NewPageAfter3']==0){ - echo '<option selected value=0>' . _('No'); - echo '<option value=1>' . _('Yes'); + echo '<option selected value=0>' . _('No') . '</option>'; + echo '<option value=1>' . _('Yes') . '</option>'; } else { - echo 'OPTION value=0>' . _('No'); - echo '<option selected value=1>' . _('Yes'); + echo '<option value=0>' . _('No') . '</option>'; + echo '<option selected value=1>' . _('Yes') . '</option>'; } echo '</select></td>'; @@ -471,14 +471,14 @@ $_POST['Upper3'] = ''; } - echo '<td>' . _('From') . ": <input type='TEXT' name='Lower3' size=10 maxlength=10 VALUE='" . $_POST['Lower3'] . "'></td>"; - echo '<td>' . _('To') . ": <input type='TEXT' name='Upper3' size=10 maxlength=10 VALUE='" . $_POST['Upper3'] . "'></td></tr>"; + echo '<td>' . _('From') . ': <input type="text" name="Lower3" size=10 maxlength=10 VALUE="' . $_POST['Lower3'] . '"></td>'; + echo '<td>' . _('To') . ': <input type="text" name="Upper3" size=10 maxlength=10 VALUE="' . $_POST['Upper3'] . '"></td></tr>'; - echo '<tr><td>' . _('Group By 4') .": <select name=GroupByData4>"; + echo '<tr><td>' . _('Group By 4') .': <select name=GroupByData4>'; GrpByDataOptions($_POST['GroupByData4']); - echo "</select></td><td></td>"; + echo '</select></td><td></td>'; if (!isset($_POST['Lower4'])) { $_POST['Lower4'] = ''; @@ -488,12 +488,12 @@ $_POST['Upper4'] = ''; } - echo '<td>' . _('From') .": <input type='TEXT' name='Lower4' size=10 maxlength=10 VALUE='" . $_POST['Lower4'] . "'></td>"; - echo '<td>' . _('To') . ": <input type='TEXT' name='Upper4' size=10 maxlength=10 VALUE='" . $_POST['Upper4'] . "'></td></tr>"; + echo '<td>' . _('From') .': <input type="text" name="Lower4" size=10 maxlength=10 VALUE="' . $_POST['Lower4'] . '"></td>'; + echo '<td>' . _('To') . ': <input type="text" name="Upper4" size=10 maxlength=10 VALUE="' . $_POST['Upper4'] . '"></td></tr>'; echo '</table>'; - echo "<br /><div class='centre'><input type='Submit' name='submit' value='" . _('Enter Information') . "'></div></form>"; + echo '<br /><div class="centre"><input type="Submit" name="submit" value="' . _('Enter Information') . '"></div></form>'; } //end if record deleted no point displaying form to add record Modified: trunk/SalesInquiry.php =================================================================== --- trunk/SalesInquiry.php 2011-04-10 20:39:49 UTC (rev 5168) +++ trunk/SalesInquiry.php 2011-04-11 16:21:14 UTC (rev 5169) @@ -128,13 +128,13 @@ $wheredebtorname = " AND debtorsmaster.name " . $DebtorNameOp . " '" . $DebtorName . "' "; } if (strlen($_POST['OrderNo']) > 0) { - $whereorderno = ' AND salesorderdetails.orderno = ' . " '" . $_POST['OrderNo'] . "' "; + $whereorderno = " AND salesorderdetails.orderno = " . " '" . $_POST['OrderNo'] . "' "; } $wherelinestatus = ' '; # Had to use IF statement instead of comparing 'linestatus' to $_POST['LineStatus'] - #in WHERE clause because the WHERE clause didn't recognize + #in WHERE clause because the WHERE clause did not recognize # that had used the IF statement to create a field caused linestatus if ($_POST['LineStatus'] != 'All') { $wherelinestatus = " AND IF(salesorderdetails.quantity = salesorderdetails.qtyinvoiced || @@ -144,14 +144,6 @@ // The following is from PDFCustomerList.php and shows how to set up WHERE clause // for multiple selections from Areas - decided to just allow selection of one Area at // a time, so used simpler code -// $i=0; -// foreach ($_POST['Areas'] as $Area){ -// if ($i>0){ -// $SQL .= ' OR '; -// } -// $i++; -// $SQL .= "custbranch.area='" . $Area ."'"; -// } $wherearea = ' '; if ($_POST['Area'] != 'All') { $wherearea = " AND custbranch.area = '" . $_POST['Area'] . "'"; @@ -297,10 +289,10 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',salesorderdetails.stkcode, + ",salesorderdetails.stkcode, stockmaster.description, stockmaster.decimalplaces - ORDER BY ' . $orderby; + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'orderno') { $sql = "SELECT salesorderdetails.orderno, salesorders.debtorno, @@ -329,9 +321,9 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',salesorders.debtorno, + ",salesorders.debtorno, debtorsmaster.name - ORDER BY ' . $orderby; + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'debtorno' || $_POST['SummaryType'] == 'name') { if ($_POST['SummaryType'] == 'name') { $orderby = 'name'; @@ -363,8 +355,8 @@ $wherecategory GROUP BY debtorsmaster.debtorno" . ' ' . - ',debtorsmaster.name - ORDER BY ' . $orderby; + ",debtorsmaster.name + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'month') { $sql = "SELECT EXTRACT(YEAR_MONTH from salesorders.orddate) as month, CONCAT(MONTHNAME(salesorders.orddate),' ',YEAR(salesorders.orddate)) as monthname, @@ -392,8 +384,8 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',monthname - ORDER BY ' . $orderby; + ",monthname + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'categoryid') { $sql = "SELECT stockmaster.categoryid, stockcategory.categorydescription, @@ -421,8 +413,8 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',categorydescription - ORDER BY ' . $orderby; + ",categorydescription + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'salesman') { $sql = "SELECT custbranch.salesman, salesman.salesmanname, @@ -450,8 +442,8 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',salesmanname - ORDER BY ' . $orderby; + ",salesmanname + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'area') { $sql = "SELECT custbranch.area, areas.areadescription, @@ -479,8 +471,8 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',areas.areadescription - ORDER BY ' . $orderby; + ",areas.areadescription + ORDER BY " . $orderby; } } else { // Selects by tempstockmoves.trandate not order date @@ -516,8 +508,8 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',stockmaster.description - ORDER BY ' . $orderby; + ",stockmaster.description + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'orderno') { $sql = "SELECT salesorderdetails.orderno, salesorders.debtorno, @@ -551,9 +543,9 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',salesorders.debtorno, + ",salesorders.debtorno, debtorsmaster.name - ORDER BY ' . $orderby; + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'debtorno' || $_POST['SummaryType'] == 'name') { if ($_POST['SummaryType'] == 'name') { $orderby = 'name'; @@ -589,8 +581,8 @@ $wheresalesman $wherecategory GROUP BY debtorsmaster.debtorno" . ' ' . - ',debtorsmaster.name - ORDER BY ' . $orderby; + ",debtorsmaster.name + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'month') { $sql = "SELECT EXTRACT(YEAR_MONTH from salesorders.orddate) as month, CONCAT(MONTHNAME(salesorders.orddate),' ',YEAR(salesorders.orddate)) as monthname, @@ -623,8 +615,8 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',monthname - ORDER BY ' . $orderby; + ",monthname + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'categoryid') { $sql = "SELECT stockmaster.categoryid, stockcategory.categorydescription, @@ -657,8 +649,8 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',categorydescription - ORDER BY ' . $orderby; + ",categorydescription + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'salesman') { $sql = "SELECT custbranch.salesman, salesman.salesmanname, @@ -691,8 +683,8 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',salesmanname - ORDER BY ' . $orderby; + ",salesmanname + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'area') { $sql = "SELECT custbranch.area, areas.areadescription, @@ -725,8 +717,8 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',areas.areadescription - ORDER BY ' . $orderby; + ",areas.areadescription + ORDER BY " . $orderby; } } } // End of if ($_POST['ReportType'] @@ -741,16 +733,16 @@ $totalinvqty = 0; // Create array for summary type to display in header. Access it with $savesummarytype - $summary_array["orderno"] = _('Order Number'); - $summary_array["stkcode"] = _('Part Number'); - $summary_array["extprice"] = _('Extended Price'); - $summary_array["debtorno"] = _('Customer Number'); - $summary_array["name"] = _('Customer Name'); - $summary_array["month"] = _('Month'); - $summary_array["categoryid"] = _('Stock Category'); - $summary_array["salesman"] = _('Salesman'); - $summary_array["area"] = _('Sales Area'); - $summary_array["transno"] = _('Transaction Number'); + $summary_array['orderno'] = _('Order Number'); + $summary_array['stkcode'] = _('Part Number'); + $summary_array['extprice'] = _('Extended Price'); + $summary_array['debtorno'] = _('Customer Number'); + $summary_array['name'] = _('Customer Name'); + $summary_array['month'] = _('Month'); + $summary_array['categoryid'] = _('Stock Category'); + $summary_array['salesman'] = _('Salesman'); + $summary_array['area'] = _('Sales Area'); + $summary_array['transno'] = _('Transaction Number'); // Create array for sort for detail report to display in header $detail_array['salesorderdetails.orderno'] = _('Order Number'); $detail_array['salesorderdetails.stkcode'] = _('Part Number'); @@ -797,7 +789,7 @@ echo '<br/><br/>'; if ($_POST['ReportType'] == 'Detail') { if ($_POST['DateType'] == 'Order') { - printf("%10s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %14s | %12s | %-10s | %-10s | %-10s | %-40s ", + printf('%10s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %14s | %12s | %-10s | %-10s | %-10s | %-40s ', _('Order No'), _('Part Number'), _('Order Date'), @@ -815,7 +807,7 @@ _('Part Description')); } else { // Headings for Invoiced Date - printf("%10s | %14s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %12s | %-10s | %-10s | %-10s | %-40s ", + printf('%10s | %14s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %12s | %-10s | %-10s | %-10s | %-40s ', _('Order No'), _('Trans. No'), _('Part Number'), @@ -837,7 +829,7 @@ while ($myrow = DB_fetch_array($result)) { $linectr++; if ($_POST['DateType'] == 'Order') { - printf("%10s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %14s | %12s | %-10s | %-10s | %-10s | %-40s ", + printf('%10s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %14s | %12s | %-10s | %-10s | %-10s | %-40s ', $myrow['orderno'], $myrow['stkcode'], ConvertSQLDate($myrow['orddate']), @@ -857,7 +849,7 @@ $totalqty += $myrow['quantity']; } else { // Detail for Invoiced Date - printf("%10s | %14s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %12s | %-10s | %-10s | %-10s | %-40s ", + printf('%10s | %14s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %12s | %-10s | %-10s | %-10s | %-40s ', $myrow['orderno'], $myrow['transno'], $myrow['stkcode'], @@ -883,7 +875,7 @@ } //END WHILE LIST LOOP // Print totals if ($_POST['DateType'] == 'Order') { - printf("%10s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %14s | %12s | %-10s | %-40s ", + printf('%10s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %14s | %12s | %-10s | %-40s ', _('Totals'), _('Lines - ') . $linectr, ' ', @@ -899,7 +891,7 @@ ' '); } else { // Print totals for Invoiced Date Type - Don't print invoice quantity - printf("%10s | %14s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %12s | %10s | %-40s ", + printf('%10s | %14s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %12s | %10s | %-40s ', _('Totals'), _('Lines - ') . $linectr, ' ', @@ -968,7 +960,7 @@ $summaryheader = _('Month'); $descriptionheader = _('Month'); } - printf(" %-30s | %-40s | %12s | %14s | %14s | %14s | %-15s", + printf(' %-30s | %-40s | %12s | %14s | %14s | %14s | %-15s', _($summaryheader), _($descriptionheader), _('Quantity'), @@ -995,7 +987,7 @@ // qty is from stockmoves $displayqty = $myrow['qty']; } - printf(" %-30s | %-40s | %12s | %14s | %14s | %14s | %-40s", + printf(' %-30s | %-40s | %12s | %14s | %14s | %14s | %-40s', $myrow[$summarytype], $myrow[$description], number_format($displayqty,2), @@ -1011,7 +1003,7 @@ $totalinvqty += $myrow['qtyinvoiced']; } //END WHILE LIST LOOP // Print totals - printf(" %-30s | %-40s | %12s | %14s | %14s | %14s", + printf(' %-30s | %-40s | %12s | %14s | %14s | %14s', _('Totals'), _('Lines - ') . $linectr, number_format($totalqty,2), @@ -1031,100 +1023,100 @@ // Display form fields. This function is called the first time // the page is called. - echo "<form action=" . $_SERVER['PHP_SELF'] . "?" . SID ." method=post><br/><br/>"; + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method=post><br/><br/>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table>'; echo '<tr><td>' . _('Report Type') . ':</td>'; - echo "<td><select name='ReportType'>"; - echo "<option selected value='Detail'>" . _('Detail'); - echo "<option value='Summary'>" . _('Summary'); + echo '<td><select name="ReportType">'; + echo '<option selected value="Detail">' . _('Detail') . '</option>'; + echo '<option value="Summary">' . _('Summary') . '</option>'; echo '</select></td><td> </td></tr>'; echo '<tr><td>' . _('Order Type') . ':</td>'; - echo "<td><select name='OrderType'>"; - echo "<option selected value='0'>" . _('Sales Order'); - echo "<option value='1'>" . _('Quotation'); + echo '<td><select name="OrderType">'; + echo '<option selected value="0">' . _('Sales Order') . '</option>'; + echo '<option value="1">' . _('Quotation') . '</option>'; echo '</select></td><td> </td></tr>'; echo '<tr><td>' . _('Date Type') . ':</td>'; - echo "<td><select name='DateType'>"; - echo "<option selected value='Order'>" . _('Order Date'); - echo "<option value='Invoice'>" . _('Invoice Date'); + echo '<td><select name="DateType">'; + echo '<option selected value="Order">' . _('Order Date') . '</option>'; + echo '<option value="Invoice">' . _('Invoice Date') . '</option>'; echo '</select></td><td> </td></tr>'; echo '<tr><td>' . _('Invoice Type') . ':</td>'; - echo "<td><select name='InvoiceType'>"; - echo "<option selected value='All'>" . _('All'); - echo "<option value='10'>" . _('Sales Invoice'); - echo "<option value='11'>" . _('Credit Note'); + echo '<td><select name="InvoiceType">'; + echo '<option selected value="All">' . _('All') . '</option>'; + echo '<option value="10">' . _('Sales Invoice') . '</option>'; + echo '<option value="11">' . _('Credit Note') . '</option>'; echo '</select></td><td> </td><td>' . _('Only Applies To Invoice Date Type') . '</td></tr>'; echo '<tr> - <td>' . _('Date Range') . ":</td> - <td><input type='Text' class='date' alt='".$_SESSION['DefaultDateFormat']."' name='FromDate' size=10 maxlength=10 value=" . $_POST['FromDate'] . '></td> - <td>' . _('To') . ":</td> - <td><input type='Text' class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' size=10 maxlength=10 value=" . $_POST['ToDate'] . "></td> - </tr>"; + <td>' . _('Date Range') . ':</td> + <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="FromDate" size=10 maxlength=10 value=' . $_POST['FromDate'] . '></td> + <td>' . _('To') . ':</td> + <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ToDate" size=10 maxlength=10 value=' . $_POST['ToDate'] . '></td> + </tr>'; echo '<tr><td>' . _('Part Number') . ':</td>'; - echo "<td><select name='PartNumberOp'>"; - echo "<option selected value='Equals'>" . _('Equals'); - echo "<option value='LIKE'>" . _('Begins With'); + echo '<td><select name="PartNumberOp">'; + echo '<option selected value="Equals">' . _('Equals') . '</option>'; + echo '<option value="LIKE">' . _('Begins With') . '</option>'; echo '</select></td><td> </td>'; - echo "<td><input type='Text' name='PartNumber' size=20 maxlength=20 value=" - . $_POST['PartNumber'] . "></td></tr>"; + echo '<td><input type="Text" name="PartNumber" size=20 maxlength=20 value=' + . $_POST['PartNumber'] . '></td></tr>'; echo '<tr><td>' . _('Customer Number') . ':</td>'; - echo "<td><select name='DebtorNoOp'>"; - echo "<option selected value='Equals'>" . _('Equals'); - echo "<option value='LIKE'>" . _('Begins With'); + echo '<td><select name="DebtorNoOp">'; + echo '<option selected value="Equals">' . _('Equals') . '</option>'; + echo '<option value="LIKE">' . _('Begins With') . '</option>'; echo '</select></td><td> </td>'; - echo "<td><input type='Text' name='DebtorNo' size=10 maxlength=10 value=" - . $_POST['DebtorNo'] . "></td></tr>"; + echo '<td><input type="text" name="DebtorNo" size=10 maxlength=10 value=' + . $_POST['DebtorNo'] . '></td></tr>'; echo '<tr><td>' . _('Customer Name') . ':</td>'; - echo "<td><select name='DebtorNameOp'>"; - echo "<option selected value='LIKE'>" . _('Begins With'); - echo "<option value='Equals'>" . _('Equals'); + echo '<td><select name="DebtorNameOp">'; + echo '<option selected value="LIKE">' . _('Begins With') . '</option>'; + echo '<option value="Equals">' . _('Equals') . '</option>'; echo '</select></td><td> </td>'; - echo "<td><input type='Text' name='DebtorName' size=30 maxlength=30 value=" - . $_POST['DebtorName'] . "></td></tr>"; + echo '<td><input type="text" name="DebtorName" size=30 maxlength=30 value=' + . $_POST['DebtorName'] . '></td></tr>'; echo '<tr><td>' . _('Order Number') . ':</td>'; - echo '<td>Equals</td><td> </td>'; - echo "<td><input type='Text' name='OrderNo' size=10 maxlength=10 value=" - . $_POST['OrderNo'] . "></td></tr>"; + echo '<td>' . _('Equals') . '</td><td> </td>'; + echo '<td><input type="Text" name="OrderNo" size=10 maxlength=10 value=' + . $_POST['OrderNo'] . '></td></tr>'; echo '<tr><td>' . _('Line Item Status') . ':</td>'; - echo "<td><select name='LineStatus'>"; - echo "<option selected value='All'>" . _('All'); - echo "<option value='Completed'>" . _('Completed'); - echo "<option value='Open'>" . _('Not Completed'); + echo '<td><select name="LineStatus">'; + echo '<option selected value="All">' . _('All') . '</option>'; + echo '<option value="Completed">' . _('Completed') . '</option>'; + echo '<option value="Open">' . _('Not Completed') . '</option>'; echo '</select></td><td> </td></tr>'; - echo '<tr><td>' . _('Stock Categories') . ":</td><td><select name='Category'>"; + echo '<tr><td>' . _('Stock Categories') . ':</td><td><select name="Category">'; $sql="SELECT categoryid, categorydescription FROM stockcategory"; $CategoryResult= DB_query($sql,$db); - echo '<option selected value="All">' . _('All Categories'); + echo '<option selected value="All">' . _('All Categories') . '</option>'; While ($myrow = DB_fetch_array($CategoryResult)){ - echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription']; + echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } echo '</select></td></tr>'; - echo '<tr><td>' . _('For Sales Man') . ":</td><td><select name='Salesman'>"; + echo '<tr><td>' . _('For Sales Man') . ':</td><td><select name="Salesman">'; $sql="SELECT salesmancode, salesmanname FROM salesman"; $SalesmanResult= DB_query($sql,$db); - echo '<option selected value="All">' . _('All Salesmen'); + echo '<option selected value="All">' . _('All Salesmen') . '</option>'; While ($myrow = DB_fetch_array($SalesmanResult)){ - echo '<option value="' . $myrow['salesmancode'] . '">' . $myrow['salesmanname']; + echo '<option value="' . $myrow['salesmancode'] . '">' . $myrow['salesmanname'] . '</option>'; } echo '</select></td></tr>'; // Use name='Areas[]' multiple - if want to create an array for Areas and allow multiple selections - echo '<tr><td>' . _('For Sales Areas') . ":</td><td><select name='Area'>"; + echo '<tr><td>' . _('For Sales Areas') . ':</td><td><select name="Area">'; $sql="SELECT areacode, areadescription FROM areas"; $AreasResult= DB_query($sql,$db); echo '<option selected value="All">' . _('All Areas'); @@ -1135,12 +1127,12 @@ echo '<tr><td> </td></tr>'; echo '<tr><td>' . _('Sort By') . ':</td>'; - echo "<td><select name='SortBy'>"; - echo "<option selected value='salesorderdetails.orderno'>" . _('Order Number'); - echo "<option value='salesorderdetails.stkcode'>" . _('Part Number'); - echo "<option value='debtorsmaster.debtorno,salesorderdetails.orderno'>" . _('Customer Number'); - echo "<option value='debtorsmaster.name,debtorsmaster.debtorno,salesorderdetails.orderno'>" . _('Customer Name'); - echo "<option value='tempstockmoves.transno,salesorderdetails.stkcode'>" . _('Transaction Number'); + echo '<td><select name="SortBy">'; + echo '<option selected value="salesorderdetails.orderno">' . _('Order Number') . '</option>'; + echo '<option value="salesorderdetails.stkcode">' . _('Part Number') . '</option>'; + echo '<option value="debtorsmaster.debtorno,salesorderdetails.orderno">' . _('Customer Number') . '</option>'; + echo '<option value="debtorsmaster.name,debtorsmaster.debtorno,salesorderdetails.orderno">' . _('Customer Name') . '</option>'; + echo '<option value="tempstockmoves.transno,salesorderdetails.stkcode">' . _('Transaction Number') . '</option>'; echo '</select></td><td> </td><td>Transaction Number sort only valid for Invoice Date Type</td></tr>'; echo '<tr><td> </td></tr> @@ -1149,28 +1141,28 @@ echo '<tr><td> </td></tr>'; echo '<tr><td>' . _('Summary Type') . ':</td>'; - echo "<td><select name='SummaryType'>"; - echo "<option selected value='orderno'>" . _('Order Number'); - echo "<option value='transno'>" . _('Transaction Number'); - echo "<option value='stkcode'>" . _('Part Number'); - echo "<option value='extprice'>" . _('Extended Price'); - echo "<option value='debtorno'>" . _('Customer Number'); - echo "<option value='name'>" . _('Customer Name'); - echo "<option value='month'>" . _('Month'); - echo "<option value='categoryid'>" . _('Stock Category'); - echo "<option value='salesman'>" . _('Salesman'); - echo "<option value='area'>" . _('Sales Area'); + echo '<td><select name="SummaryType">'; + echo '<option selected value="orderno">' . _('Order Number') . '</option>'; + echo '<option value="transno">' . _('Transaction Number') . '</option>'; + echo '<option value="stkcode">' . _('Part Number') . '</option>'; + echo '<option value="extprice">' . _('Extended Price') . '</option>'; + echo '<option value="debtorno">' . _('Customer Number') . '</option>'; + echo '<option value="name">' . _('Customer Name') . '</option>'; + echo '<option value="month">' . _('Month') . '</option>'; + echo '<option value="categoryid">' . _('Stock Category') . '</option>'; + echo '<option value="salesman">' . _('Salesman') . '</option>'; + echo '<option value="area">' . _('Sales Area') . '</option>'; echo '</select></td><td> </td><td>Transaction Number summary only valid for Invoice Date Type</td></tr>'; - echo " + echo ' <tr><td> </td></tr> <tr><td> </td></tr> <tr><td> </td></tr> <tr><td> </td> - <td><input type='submit' name='submit' value='" . _('Run Inquiry') . "'></td> + <td><input type="submit" name="submit" value="' . _('Run Inquiry') . '"></td> </tr> </table> - <br/>"; + <br />'; echo '</form>'; } // End of function display() @@ -1178,7 +1170,7 @@ function TempStockmoves(&$db) { // When report based on Invoice Date, use stockmoves as the main file, but credit -// notes, which are type 11 in stockmoves, don't have the order number in the +// notes, which are type 11 in stockmoves, do not have the order number in the // reference field; instead they have "Ex Inv - " and then the transno from the // type 10 stockmoves the credit note was applied to. Use this function to load all // type 10 and 11 stockmoves into a temporary table and then update the Modified: trunk/SalesPeople.php =================================================================== --- trunk/SalesPeople.php 2011-04-10 20:39:49 UTC (rev 5168) +++ trunk/SalesPeople.php 2011-04-11 16:21:14 UTC (rev 5169) @@ -181,13 +181,13 @@ $result = DB_query($sql,$db); echo '<table class=selection>'; - echo "<tr><th>" . _('Code') . "</th> - <th>" . _('Name') . "</th> - <th>" . _('Telephone') . "</th> - <th>" . _('Facsimile') . "</th> - <th>" . _('Comm Rate 1') . "</th> - <th>" . _('Break') . "</th> - <th>" . _('Comm Rate 2') . "</th></tr>"; + echo '<tr><th>' . _('Code') . '</th> + <th>' . _('Name') . '</th> + <th>' . _('Telephone') . '</th> + <th>' . _('Facsimile') . '</th> + <th>' . _('Comm Rate 1') . '</th> + <th>' . _('Break') . '</th> + <th>' . _('Comm Rate 2') . '</th></tr>'; $k=0; while ($myrow=DB_fetch_row($result)) { @@ -199,7 +199,7 @@ $k++; } - printf(" + printf(' <td>%s</td> <td>%s</td> <td>%s</td> @@ -207,9 +207,9 @@ <td class=number>%s</td> <td class=number>%s</td> <td class=number>%s</td> - <td><a href=\"%sSelectedSaleperson=%s\">". _('Edit') . "</a></td> - <td><a href=\"%sSelectedSaleperson=%s&delete=1\">" . _('Delete') . "</a></td> - </tr>", + <td><a href="%sSelectedSaleperson=%s">'. _('Edit') . '</a></td> + <td><a href="%sSelectedSaleperson=%s&delete=1">' . _('Delete') . '</a></td> + </tr>', $myrow[0], $myrow[1], $myrow[2], @@ -227,12 +227,12 @@ } //end of ifs and buts! if (isset($SelectedSaleperson)) { - echo "<div class='centre'><a href='" . $_SERVER['PHP_SELF'] . '?' . SID . "'>" . _('Show All Sales People') . "</a></div>"; + echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Show All Sales People') . '</a></div>'; } 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($SelectedSaleperson)) { @@ -260,15 +260,15 @@ $_POST['CommissionRate2'] = $myrow['commissionrate2']; - echo "<input type=hidden name='SelectedSaleperson' VALUE='" . $SelectedSaleperson . "'>"; - echo "<input type=hidden name='SalesmanCode' VALUE='" . $_POST['SalesmanCode'] . "'>"; + echo '<input type=hidden name="SelectedSaleperson" VALUE="' . $SelectedSaleperson . '">'; + echo '<input type=hidden name="SalesmanCode" VALUE="' . $_POST['SalesmanCode'] . '">'; echo '<table class=selection> <tr><td>' . _('Salesperson code') . ':</td><td>'; echo $_POST['SalesmanCode'] . '</td></tr>'; } else { //end of if $SelectedSaleperson only do the else when a new record is being entered - echo '<table class=selection><tr><td>' . _('Salesperson code') . ":</td> - <td><input type='Text' ". (in_array('SalesmanCode',$Errors) ? 'class="inputerror"' : '' ) ." name='SalesmanCode' size=3 maxlength=3></td></tr>"; + echo '<table class=selection><tr><td>' . _('Salesperson code') . ':</td> + <td><input type="text" '. (in_array('SalesmanCode',$Errors) ? 'class="inputerror"' : '' ) .' name="SalesmanCode" size=3 maxlength=3></td></tr>'; } if (!isset($_POST['SalesmanName'])){ $_POST['SalesmanName']=''; @@ -290,16 +290,16 @@ } - echo '<tr><td>' . _('Salesperson Name') . ":</td><td><input type='text' ". (in_array('SalesmanName',$Errors) ? 'class="inputerror"' : '' ) ." name='SalesmanName' size=30 maxlength=30 VALUE='" . $_POST['SalesmanName'] . "'></td></tr>"; - echo '<tr><td>' . _('Telephone No') . ":</td><td><input type='Text' name='SManTel' size=20 maxlength=20 VALUE='" . $_POST['SManTel'] . "'></td></tr>"; - echo '<tr><td>' . _('Facsimile No') . ":</td><td><input type='Text' name='SManFax' size=20 maxlength=20 VALUE='" . $_POST['SManFax'] . "'></td></tr>"; - echo '<tr><td>' . _('Commission Rate 1') . ":</td><td><input type='Text' class=number name='CommissionRate1' size=5 maxlength=5 VALUE=" . $_POST['CommissionRate1'] . '></td></tr>'; - echo '<tr><td>' . _('Breakpoint') . ":</td><td><input type='Text' class=number name='Breakpoint' size=6 maxlength=6 VALUE=" . $_POST['Breakpoint'] . '></td></tr>'; - echo '<tr><td>' . _('Commission Rate 2') . ":</td><td><input type='Text' class=number name='CommissionRate2' size=5 maxlength=5 VALUE=" . $_POST['CommissionRate2']. '></td></tr>'; + echo '<tr><td>' . _('Salesperson Name') . ':</td><td><input type="text" '. (in_array('SalesmanName',$Errors) ? 'class="inputerror"' : '' ) .' name="SalesmanName" size=30 maxlength=30 VALUE="' . $_POST['SalesmanName'] . '"></td></tr>'; + echo '<tr><td>' . _('Telephone No') . ':</td><td><input type="text" name="SManTel" size=20 maxlength=20 VALUE="' . $_POST['SManTel'] . '"></td></tr>'; + echo '<tr><td>' . _('Facsimile No') . ':</td><td><input type="text" name="SManFax" size=20 maxlength=20 VALUE="' . $_POST['SManFax'] . '"></td></tr>'; + echo '<tr><td>' . _('Commission Rate 1') . ':</td><td><input type="text" class=number name="CommissionRate1" size=5 maxlength=5 VALUE="' . $_POST['CommissionRate1'] . '"></td></tr>'; + echo '<tr><td>' . _('Breakpoint') . ':</td><td><input type="text" class=number name="Breakpoint" size=6 maxlength=6 VALUE="' . $_POST['Breakpoint'] . '"></td></tr>'; + echo '<tr><td>' . _('Commission Rate 2') . ':</td><td><input type="text" class=number name="CommissionRate2" size=5 maxlength=5 VALUE="' . $_POST['CommissionRate2']. '"></td></tr>'; echo '</table>'; - echo "<br /><div class='centre'><input type='Submit' name='submit' value='" . _('Enter Information') . "'></div>"; + echo '<br /><div class="centre"><input type="Submit" name="submit" value="' . _('Enter Information') . '"></div>'; echo '</form>'; Modified: trunk/SalesTypes.php =================================================================== --- trunk/SalesTypes.php 2011-04-10 20:39:49 UTC (rev 5168) +++ trunk/SalesTypes.php 2011-04-11 16:21:14 UTC (rev 5169) @@ -185,10 +185,10 @@ $result = DB_query($sql,$db); echo '<table class=selection>'; - echo "<tr> - <th>" . _('Type Code') . "</th> - <th>" . _('Type Name') . "</th> - </tr>"; + echo '<tr> + <th>' . _('Type Code') . '</th> + <th>' . _('Type Name') . '</th> + </tr>'; $k=0; //row colour counter @@ -201,11 +201,11 @@ $k=1; } - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> - <td><a href='%sSelectedType=%s'>" . _('Edit') . "</td> - <td><a href='%sSelectedType=%s&delete=yes' onclick=\"return confirm('" . _('Are you sure you wish to delete this price list and all the prices it may have set up?') . "');\">" . _('Delete') . "</td> - </tr>", + <td><a href="%sSelectedType=%s">' . _('Edit') . '</td> + <td><a href="%sSelectedType=%s&delete=yes onclick=\'return confirm("' . _('Are you sure you wish to delete this price list and all the prices it may have set up?') . '");\'>' . _('Delete') . '</td> + </tr>', $myrow[0], $myrow[1], $_SERVER['PHP_SELF'] . '?' . SID, $myrow[0], @@ -222,7 +222,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 '<p><table class=selection>'; //Main table @@ -242,11 +242,11 @@ $_POST['TypeAbbrev'] = $myrow['typeabbrev']; $_POST['Sales_Type'] = $myrow['sales_type']; - echo "<input type=hidden name='SelectedType' VALUE=" . $SelectedType . ">"; - echo "<input type=hidden name='TypeAbbrev' VALUE=" . $_POST['TypeAbbrev'] . ">"; - echo "<table class=selection>"; + echo '<input type=hidden name="SelectedType" VALUE="' . $SelectedType . '">'; + echo '<input type=hidden name="TypeAbbrev" VALUE="' . $_POST['TypeAbbrev'] . '">'; + echo '<table class=selection>'; echo '<tr><th colspan=4><font size=2 color=blue><b>' . _('Sales Type/Price List Setup') . '</b></font></th></tr>'; - echo "<tr><td>" . _('Type Code') . ":</td><td>"; + echo '<tr><td>' . _('Type Code') . ':</td><td>'; // We dont allow the user to change an existing type code @@ -256,17 +256,17 @@ // This is a new type so the user may volunteer a type code - echo "<table class=selection>"; + echo '<table class=selection>'; echo '<tr><th colspan=4><font size=2 color=blue><b>' . _('Sales Type/Price List Setup') . '</b></font></th></tr>'; - echo "<tr><td>" . _('Type Code') . ":</td><td><input type='Text' - " . (in_array('SalesType',$Errors) ? 'class="inputerror"' : '' ) ." size=3 maxlength=2 name='TypeAbbrev'></td></tr>"; + echo '<tr><td>' . _('Type Code') . ':</td><td><input type="text" + ' . (in_array('SalesType',$Errors) ? 'class="inputerror"' : '' ) .' size=3 maxlength=2 name="TypeAbbrev"></td></tr>'; } if (!isset($_POST['Sales_Type'])) { $_POST['Sales_Type']=''; } - echo "<tr><td>" . _('Sales Type Name') . ":</td><td><input type='Text' name='Sales_Type' value='" . $_POST['Sales_Type'] . "'></td></tr>"; + echo '<tr><td>' . _('Sales Type Name') . ':</td><td><input type="Text" name="Sales_Type" value="' . $_POST['Sales_Type'] . '"></td></tr>'; echo '</td></tr></table>'; // close main table Modified: trunk/SelectCompletedOrder.php =================================================================== --- trunk/SelectCompletedOrder.php 2011-04-10 20:39:49 UTC (rev 5168) +++ trunk/SelectCompletedOrder.php 2011-04-11 16:21:14 UTC (rev 5169) @@ -13,14 +13,14 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search Sales Orders') . '</p>'; -echo "<form action='" . $_SERVER['PHP_SELF'] . '?' . SID ."' method=post>"; +echo '<form action="' . $_SERVER['PHP_SELF'] . ' method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($_POST['completed'])) { - $completed='=1'; - $ShowChecked='checked="checked"'; + $completed="=1"; + $ShowChecked="checked='checked'"; } else { - $completed='>=0'; + $completed=">=0"; $ShowChecked=''; } @@ -78,13 +78,13 @@ } else { if (isset($SelectedCustomer)) { echo _('For customer') . ': ' . $SelectedCustomer .' ' . _('and') . ' '; - echo "<input type=hidden name='SelectedCustomer' value='".$SelectedCustomer."'>"; + echo '<input type=hidden name="SelectedCustomer" value="'.$SelectedCustomer.'">'; } if (isset($SelectedStockItem)) { $PartString = _('for the part') . ': <b>' . $SelectedStockItem . '</b> ' . _('and') . ' ' . - "<input type=hidden name='SelectedStockItem' value='".$SelectedStockItem."'>"; + '<input type=hidden name="SelectedStockItem" value="'.$SelectedStockItem.'">'; } } @@ -221,7 +221,7 @@ $SelectedStockItem = $myrow[0]; $_POST['SearchOrders']='True'; unset($StockItemsResult); - echo '<br>' . _('For the part') . ': ' . $SelectedStockItem . ' ' . _('and') . " <input type=hidden name='SelectedStockItem' value='$SelectedStockItem'>"; + echo '<br />' . _('For the part') . ': ' . $SelectedStockItem . ' ' . _('and') . " <input type=hidden name='SelectedStockItem' value='$SelectedStockItem'>"; } } } else if (isset($_POST['SearchOrders']) AND Is_Date($_POST['OrdersAfterDate'])==1) { @@ -415,8 +415,8 @@ $SalesOrdersResult = DB_query($SQL,$db); if (DB_error_no($db) !=0) { - echo '<br>' . _('No orders were returned by the SQL because') . ' ' . DB_error_msg($db); - echo "<br>$SQL"; + echo '<br />' . _('No orders were returned by the SQL because') . ' ' . DB_error_msg($db); + echo '<br />'. $SQL; } }//end of which button clicked options @@ -424,20 +424,20 @@ if (!isset($_POST['OrdersAfterDate']) OR $_POST['OrdersAfterDate'] == '' OR ! Is_Date($_POST['OrdersAfterDate'])){ $_POST['OrdersAfterDate'] = Date($_SESSION['DefaultDateFormat'],Mktime(0,0,0,Date('m')-2,Date('d'),Date('Y'))); } -echo "<table class=selection>"; +echo '<table class=selection>'; if (isset($PartString)) { - echo "<tr><td>".$PartString."</td>"; + echo '<tr><td>'.$PartString.'</td>'; } else { - echo "<tr><td></td>"; + echo '<tr><td></td>'; } if (!isset($OrderNumber) or $OrderNumber==''){ - echo '<td>' . _('Order Number') . ':</td><td>' . "<input type='text' name='OrderNumber' maxlength =8 size=9></td><td>" . _('for all orders placed after') . - ": </td><td><input type='text' class='date' alt='".$_SESSION['DefaultDateFormat']."' name='OrdersAfterDate' maxlength =10 size=11 value=" . $_POST['OrdersAfterDate'] . "></td><td>" . - "<input type='submit' name='SearchOrders' value='" . _('Search Orders') . "'></td></tr>"; - echo '<tr><td></td><td>' . _('Customer Ref') . ':</td><td>' . "<input type='text' name='CustomerRef' maxlength =8 size=9></td> - <td></td><td colspan=2><input type='checkbox' ".$ShowChecked." name='completed' />"._('Show Completed orders only') . "</td></tr>"; + echo '<td>' . _('Order Number') . ':</td><td>' . '<input type="text" name="OrderNumber" maxlength =8 size=9></td><td>' . _('for all orders placed after') . + ': </td><td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="OrdersAfterDate" maxlength =10 size=11 value=' . $_POST['OrdersAfterDate'] . '></td><td>' . + '<input type="submit" name="SearchOrders" value="' . _('Search Orders') . '"></td></tr>'; + echo '<tr><td></td><td>' . _('Customer Ref') . ':</td><td>' . '<input type="text" name=2CustomerRef" maxlength =8 size=9></td> + <td></td><td colspan=2><input type="checkbox" '.$ShowChecked.' name="completed" />'._('Show Completed orders only') . '</td></tr>'; } echo '</table>'; @@ -445,17 +445,17 @@ $SQL="SELECT categoryid, categorydescription FROM stockcategory ORDER BY categorydescription"; $result1 = DB_query($SQL,$db); - echo '<br>'; + echo '<br />'; echo '<div class="page_help_text"><font size=1>' . _('To search for sales orders for a specific part use the part selection facilities below') . ' </font></div>'; - echo '<br><table class=selection>'; + echo '<br /><table class=selection>'; echo '<tr><td><font size=1>' . _('Select a stock category') . ':</font>'; echo '<select name="StockCat">'; while ($myrow1 = DB_fetch_array($result1)) { if (isset($_POST['StockCat']) and $myrow1['categoryid'] == $_POST['StockCat']){ - echo "<option selected value='". $myrow1['categoryid'] . "'>" . $myrow1['categorydescription']; + echo '<option selected value="'. $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } else { - echo "<option value='". $myrow1['categoryid'] . "'>" . $myrow1['categorydescription']; + echo '<option value="'. $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } } @@ -477,14 +477,14 @@ If (isset($StockItemsResult)) { - echo '<br><table cellpadding=2 colspan=7 class=selection>'; + echo '<br /><table cellpadding=2 colspan=7 class=selection>'; - $TableHeadings = "<tr><th>" . _('Code') . "</th>" . - "<th>" . _('Description') . "</th>" . - "<th>" . _('On Hand') . '</th>' . - "<th>" . _('Purchase Orders') . '</th>' . - "<th>" . _('Sales Orders') . "</th>" . - "<th>" . _('Units') . '</th></tr>'; + $TableHeadings = '<tr><th>' . _('Code') . '</th>' . + '<th>' . _('Description') . '</th>' . + '<th>' . _('On Hand') . '</th>' . + '<th>' . _('Purchase Orders') . '</th>' . + '<th>' . _('Sales Orders') . '</th>' . + '<th>' . _('Units') . '</th></tr>'; echo $TableHeadings; @@ -501,12 +501,12 @@ $k++; } - printf("<td><font size=1><input type='submit' name='SelectedStockItem' value='%s'</font></td> + printf('<td><font size=1><input type="submit" name="SelectedStockItem" value="%s" /></font></td> <td><font size=1>%s</font></td> <td class=number><font size=1>%s</font></td> <td class=number><font size=1>%s</font></td> <td class=number><font size=1>%s</font></td> - <td><font size=1>%s</font></td></tr>", + <td><font size=1>%s</font></td></tr>', $myrow['stockid'], $myrow['description'], $myrow['qoh'], @@ -527,16 +527,16 @@ /*show a table of the orders returned by the SQL */ - echo '<br><table cellpadding=2 colspan=6 width=90% class=selection>'; + echo '<br /><table cellpadding=2 colspan=6 width=90% class=selection>'; - $tableheader = "<tr><th>" . _('Order') . " #</th> - <th>" . _('Customer') . "</th> - <th>" . _('Branch') . "</th> - <th>" . _('Cust Order') . " #</th> - <th>" . _('Order Date') . "</th> - <th>" . _('Req Del Date') . "</th> - <th>" . _('Delivery To') . "</th> - <th>" . _('Order Total') . "</th></tr>"; + $tableheader = '<tr><th>' . _('Order') . ' #</th> + <th>' . _('Customer') . '</th> + <th>' . _('Branch') . '</th> + <th>' . _('Cust Order') . ' #</th> + <th>' . _('Order Date') . '</th> + <th>' . _('Req Del Date') . '</th> + <th>' . _('Delivery To') . '</th> + <th>' . _('Order Total') . '</th></tr>'; echo $tableheader; @@ -558,7 +558,7 @@ $FormatedOrderDate = ConvertSQLDate($myrow['orddate']); $FormatedOrderValue = number_format($myrow['ordervalue'],2); - printf("<td><a href='%s'>%s</a></td> + printf('<td><a href="%s">%s</a></td> <td>%s</td> <td>%s</td> <td>%s</td> @@ -566,7 +566,7 @@ <td>%s</td> <td>%s</td> <td class=number>%s</td> - </tr>", + </tr>', $ViewPage, $myrow['orderno'], $myrow['name'], @@ -588,4 +588,4 @@ echo '</form>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2011-04-10 20:39:49 UTC (rev 5168) +++ trunk/SelectCustomer.php 2011-04-11 16:21:14 UTC (rev 5169) @@ -54,7 +54,6 @@ echo '<script src="http://maps.google.com/maps?file=api&v=2&key=' . $api_key . '"'; echo ' type="text/javascript"></script>'; echo ' <script type="text/javascript">'; - echo ' //<![CDATA[ '; echo 'function load() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); @@ -69,7 +68,6 @@ marker.openInfoWindowHtml(WINDOW_HTML); } } - //]]> </script>'; echo '<body onload="load()" onunload="GUnload()">'; } @@ -301,9 +299,9 @@ echo '</td>'; echo '</tr></table><br />'; } else { - echo "<table width=90%><tr><th width=33%>" . _('Customer Inquiries') . "</th> - <th width=33%>" . _('Customer Transactions') . "</th> - <th width=33%>" . _('Customer Maintenance') . "</th></tr>"; + echo '<table width=90%><tr><th width=33%>' . _('Customer Inquiries') . '</th> + <th width=33%>' . _('Customer Transactions') . '</th> + <th width=33%>' . _('Customer Maintenance') . '</th></tr>'; echo '<tr><td class="select">'; echo '</td><td class="select">'; echo '</td><td class="select">'; @@ -318,8 +316,8 @@ prnMsg($msg, 'info'); } echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search for Customers').'</p>'; -echo "<table cellpadding=3 colspan=4 class=selection>"; -echo "<tr><td colspan=2>" . _('Enter a partial Name') . ":</td><td>"; +echo '<table cellpadding=3 colspan=4 class=selection>'; +echo '<tr><td colspan=2>' . _('Enter a partial Name') . ':</td><td>'; if (isset($_POST['Keywords'])) { echo '<input type="Text" name="Keywords" value="' . $_POST['Keywords'] . '" size=20 maxlength=25>'; } else { @@ -432,9 +430,9 @@ $_POST['PageOffset'] = $_POST['PageOffset'] - 1; } } - echo "<input type=\"hidden\" name=\"PageOffset\" value=\"" . $_POST['PageOffset'] . "\"/>"; + echo '<input type="hidden" name="PageOffset" value="' . $_POST['PageOffset'] . '" />'; if ($ListPageMax > 1) { - echo "<p><div class=centre> " . $_POST['PageOffset'] . ' ' . _('of') . ' ' . $ListPageMax . ' ' . _('pages') . '. ' . _('Go to Page') . ': '; + echo '<p><div class=centre> ' . $_POST['PageOffset'] . ' ' . _('of') . ' ' . $ListPageMax . ' ' . _('pages') . '. ' . _('Go to Page') . ': '; echo '<select name="PageOffset1">'; $ListPage = 1; while ($ListPage <= $ListPageMax) { @@ -487,13 +485,13 @@ echo '<tr class="OddTableRows">'; $k = 1; } - echo "<td><font size=1><input type=submit name='Select' value='" . $myrow['debtorno'].' '.$myrow['branchcode'] . "'></font></td> - <td><font size=1>" . $myrow['name'] . "</font></td> - <td><font size=1>" . $myrow['brname'] . "</font></td> - <td><font size=1>" . $myrow['contactname'] . "</font></td> - <td><font size=1>" . $myrow['typename'] . "</font></td> - <td><font size=1>" . $myrow['phoneno'] . "</font></td> - <td><font size=1>" . $myrow['faxno'] . "</font></td></tr>"; + echo '<td><font size=1><input type=submit name="Select" value="' . $myrow['debtorno'].' '.$myrow['branchcode'] . '"></font></td> + <td><font size=1>' . $myrow['name'] . '</font></td> + <td><font size=1>' . $myrow['brname'] . '</font></td> + <td><font size=1>' . $myrow['contactname'] . '</font></td> + <td><font size=1>' . $myrow['typename'] . '</font></td> + <td><font size=1>' . $myrow['phoneno'] . '</font></td> + <td><font size=1>' . $myrow['faxno'] . '</font></td></tr>'; $j++; if ($j == 11 AND ($RowIndex + 1 != $_SESSION['DisplayRecordsMax'])) { $j = 1; @@ -538,11 +536,11 @@ } else { echo '<tr><td colspan=2>'; echo '<table width=45% colspan=2 cellpadding=4>'; - echo "<tr><th width=33%>" . _('Customer Mapping') . "</th></tr>"; + echo '<tr><th width=33%>' . _('Customer Mapping') . '</th></tr>'; echo '</td><td valign=TOp>'; /* Mapping */ - echo '<div class="centre"' . _('Mapping is enabled, Map will display below.') . '</div>'; + echo '<div class="centre">' . _('Mapping is enabled, Map will display below.') . '</div>'; echo '<div align="center" id="map" style="width: ' . $map_width . 'px; height: ' . $map_height . 'px"></div><br />'; - echo "</th></tr></table>"; + echo '</th></tr></table>'; } } // Extended Customer Info only if selected in Configuration @@ -569,12 +567,12 @@ $DataResult = DB_query($SQL, $db); $myrow = DB_fetch_array($DataResult); // Select some more data about the customer - $SQL = "select sum(ovamount+ovgst) as total from debtortrans where debtorno = '" . $_SESSION['CustomerID'] . "' and type !=12"; + $SQL = "SELECT sum(ovamount+ovgst) AS total FROM debtortrans WHERE debtorno = '" . $_SESSION['CustomerID'] . "' AND type !=12"; $Total1Result = DB_query($SQL, $db); $row = DB_fetch_array($Total1Result); echo '<tr><td colspan=2>'; echo '<table width=45% colspan=2 cellpadding=4>'; - echo "<tr><th width=33% colspan=3>" . _('Customer Data') . "</th></tr>"; + echo '<tr><th width=33% colspan=3>' . _('Customer Data') . '</th></tr>'; echo '<tr><td valign=top class=select>'; /* Customer Data */ //echo _('Distance to this customer:') . '<b>TBA</b><br />'; if ($myrow['lastpaiddate'] == 0) { @@ -702,12 +700,12 @@ } //END WHILE LIST LOOP echo '</table>'; } else { - if ($_SESSION['CustomerID'] != "") { + if ($_SESSION['CustomerID'] != '') { echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Group Notes') . '" alt=""><a href="AddCustomerTypeNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Group Note') . '</a></div><br />'; } } } } -echo "<script>defaultControl(document.forms[0].CustCode);</script>"; +echo '<script>defaultControl(document.forms[0].CustCode);</script>'; include ('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-04-10 20:39:49 UTC (rev 5168) +++ trunk/Sele... [truncated message content] |
From: <tim...@us...> - 2011-04-12 10:55:04
|
Revision: 5173 http://weberp.svn.sourceforge.net/weberp/?rev=5173&view=rev Author: tim_schofield Date: 2011-04-12 10:54:58 +0000 (Tue, 12 Apr 2011) Log Message: ----------- Change security level of main menu to 0 and improve the way that supplier logins are dealt with Modified Paths: -------------- trunk/CustLoginSetup.php trunk/SuppLoginSetup.php trunk/includes/session.inc Added Paths: ----------- trunk/sql/mysql/updates/80.php Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2011-04-11 16:32:38 UTC (rev 5172) +++ trunk/CustLoginSetup.php 2011-04-12 10:54:58 UTC (rev 5173) @@ -43,32 +43,14 @@ //- Only one entry in securitygroups AND the tokenid of this entry == 1 //First get all available security role ID's' -$query_roles = "SELECT secroleid FROM securityroles"; -$result_roles = DB_query($query_roles, $db); - -//Check for every security role if they have only one entry in securitygroups, if so check if the tokenid == 1, then store in selection box -//Then they can be put in the $SecurityRoles array for the selection box; -$SecurityRoles = array(); -while ($myroles = DB_fetch_array($result_roles)){ - - $sqltoken = "SELECT tokenid FROM securitygroups WHERE secroleid = '" . $myroles['secroleid'] ."'"; - $result = DB_query($sqltoken,$db); - $Number_roles = DB_num_rows($result); - $myrow=DB_fetch_array($result); - - if ($Number_roles == 1 && $myrow['tokenid']==1 ) { - - $sql = "SELECT secroleid, secrolename FROM securityroles WHERE secroleid = '" . $myroles['secroleid'] ."'"; - $Sec_Result = DB_query($sql, $db); - // Now load it into an aray using Key/Value pairs - while( $Sec_row = DB_fetch_row($Sec_Result) ) { - $SecurityRoles[$Sec_row[0]] = $Sec_row[1]; - } - DB_free_result($Sec_Result); - - } - +//First get all available security role ID's' +$sql = "SELECT secroleid, secrolename FROM securityroles WHERE secrolename = 'Customer Log On Only'"; +$Sec_Result = DB_query($sql, $db); +// Now load it into an aray using Key/Value pairs +while( $Sec_row = DB_fetch_row($Sec_Result) ) { + $SecurityRoles[$Sec_row[0]] = $Sec_row[1]; } +DB_free_result($Sec_Result); if (isset($_GET['SelectedUser'])){ $SelectedUser = $_GET['SelectedUser']; Modified: trunk/SuppLoginSetup.php =================================================================== --- trunk/SuppLoginSetup.php 2011-04-11 16:32:38 UTC (rev 5172) +++ trunk/SuppLoginSetup.php 2011-04-12 10:54:58 UTC (rev 5173) @@ -32,32 +32,13 @@ //- Only one entry in securitygroups AND the tokenid of this entry == 1 //First get all available security role ID's' -$query_roles = "SELECT secroleid FROM securityroles"; -$result_roles = DB_query($query_roles, $db); - -//Check for every security role if they have only one entry in securitygroups, if so check if the tokenid == 1, then store in selection box -//Then they can be put in the $SecurityRoles array for the selection box; -$SecurityRoles = array(); -while ($myroles = DB_fetch_array($result_roles)){ - - $sqltoken = "SELECT tokenid FROM securitygroups WHERE secroleid = '" . $myroles['secroleid'] ."'"; - $result = DB_query($sqltoken,$db); - $Number_roles = DB_num_rows($result); - $myrow=DB_fetch_array($result); - - if ($Number_roles == 1 && $myrow['tokenid']==9 ) { - - $sql = "SELECT secroleid, secrolename FROM securityroles WHERE secroleid = '" . $myroles['secroleid'] ."'"; - $Sec_Result = DB_query($sql, $db); - // Now load it into an aray using Key/Value pairs - while( $Sec_row = DB_fetch_row($Sec_Result) ) { - $SecurityRoles[$Sec_row[0]] = $Sec_row[1]; - } - DB_free_result($Sec_Result); - - } - +$sql = "SELECT secroleid, secrolename FROM securityroles WHERE secrolename = 'Supplier Log On Only'"; +$Sec_Result = DB_query($sql, $db); +// Now load it into an aray using Key/Value pairs +while( $Sec_row = DB_fetch_row($Sec_Result) ) { + $SecurityRoles[$Sec_row[0]] = $Sec_row[1]; } +DB_free_result($Sec_Result); if (isset($_GET['SelectedUser'])){ $SelectedUser = $_GET['SelectedUser']; @@ -284,7 +265,7 @@ echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] .'">' . _('Review Existing Users') . '</a></div><br>'; } -echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '>'; +echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedUser)) { Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2011-04-11 16:32:38 UTC (rev 5172) +++ trunk/includes/session.inc 2011-04-12 10:54:58 UTC (rev 5173) @@ -13,7 +13,7 @@ header('Location:' . $rootpath . '/install/index.php'); } include($PathPrefix . 'config.php'); -$DBVersion=79; +$DBVersion=80; if (isset($SessionSavePath)){ session_save_path($SessionSavePath); } @@ -264,15 +264,12 @@ exit; } -/* Nasty kludge to allow Supplier only logins as well as Customer logins */ -if (count($_SESSION['AllowedPageSecurityTokens'])==1 and $_SESSION['AllowedPageSecurityTokens'][0]==9 and $PageSecurity==1){ - $_SESSION['AllowedPageSecurityTokens'][0]=1; +if (in_array(9,$_SESSION['AllowedPageSecurityTokens']) and $PageSecurity==0 and count($_SESSION['AllowedPageSecurityTokens'])==2){ $SupplierLogin=1; } else { $SupplierLogin=0; } - if (!isset($AllowAnyone)){ if ((!in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) { $title = _('Security Permissions Problem'); @@ -292,10 +289,6 @@ exit; } } -/* Nasty kludge to allow Supplier only logins as well as Customer logins - .... hmmmmm some work to do here then! */ -if ($SupplierLogin==1) { - $_SESSION['AllowedPageSecurityTokens'][0]=9; -} if (in_array(15, $_SESSION['AllowedPageSecurityTokens'])) { /*System administrator login */ Added: trunk/sql/mysql/updates/80.php =================================================================== --- trunk/sql/mysql/updates/80.php (rev 0) +++ trunk/sql/mysql/updates/80.php 2011-04-12 10:54:58 UTC (rev 5173) @@ -0,0 +1,15 @@ +<?php + +InsertRecord('securitytokens',array('tokenid'),array('0'),array('tokenid, tokenname'), array('0', 'Main Index Page'), $db); + +$result=DB_query("SELECT * FROM securitygroups WHERE tokenid='0'", $db); + +if (DB_num_rows($result)==0) { + DB_query("INSERT INTO securitygroups (SELECT secroleid, '0' FROM securityroles)" , $db); +} + +UpdateField('pagesecurity', 'security', 0, "script='Index.php'", $db); + +UpdateDBNo(80, $db); + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-04-12 11:05:23
|
Revision: 5174 http://weberp.svn.sourceforge.net/weberp/?rev=5174&view=rev Author: tim_schofield Date: 2011-04-12 11:05:17 +0000 (Tue, 12 Apr 2011) Log Message: ----------- Corrections to login where just one security token is chosen Modified Paths: -------------- trunk/includes/session.inc trunk/index.php Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2011-04-12 10:54:58 UTC (rev 5173) +++ trunk/includes/session.inc 2011-04-12 11:05:17 UTC (rev 5174) @@ -266,7 +266,7 @@ if (in_array(9,$_SESSION['AllowedPageSecurityTokens']) and $PageSecurity==0 and count($_SESSION['AllowedPageSecurityTokens'])==2){ $SupplierLogin=1; -} else { +} else if (in_array(1,$_SESSION['AllowedPageSecurityTokens']) and $PageSecurity==0 and count($_SESSION['AllowedPageSecurityTokens'])==2){ $SupplierLogin=0; } Modified: trunk/index.php =================================================================== --- trunk/index.php 2011-04-12 10:54:58 UTC (rev 5173) +++ trunk/index.php 2011-04-12 11:05:17 UTC (rev 5174) @@ -26,7 +26,7 @@ include('includes/header.inc'); -if (count($_SESSION['AllowedPageSecurityTokens'])==1 and $SupplierLogin==0){ +if (isset($SupplierLogin) and count($_SESSION['AllowedPageSecurityTokens'])==2 and $SupplierLogin==0){ /* if there is only one security access and its 1 (it has to be 1 for this page came up at all)- it must be a customer log on * need to limit the menu to show only the customer accessible stuff this is what the page looks like for customers logging in @@ -56,7 +56,7 @@ <?php include('includes/footer.inc'); exit; -} else if (count($_SESSION['AllowedPageSecurityTokens'])==1 and $SupplierLogin==1){ +} else if (isset($SupplierLogin) and count($_SESSION['AllowedPageSecurityTokens'])==2 and $SupplierLogin==1){ ?> <tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-04-12 16:22:30
|
Revision: 5177 http://weberp.svn.sourceforge.net/weberp/?rev=5177&view=rev Author: tim_schofield Date: 2011-04-12 16:22:21 +0000 (Tue, 12 Apr 2011) Log Message: ----------- XHTML and quoting changes Modified Paths: -------------- trunk/PDFOrderStatus.php trunk/PDFPeriodStockTransListing.php trunk/PDFStockCheckComparison.php trunk/PO_Header.php trunk/PricesBasedOnMarkUp.php trunk/Prices_Customer.php trunk/PrintCustOrder.php trunk/PrintCustTrans.php trunk/RecurringSalesOrders.php trunk/ReorderLevel.php trunk/ReorderLevelLocation.php trunk/SalesAnalReptCols.php trunk/SalesAnalRepts.php trunk/SelectCompletedOrder.php trunk/SelectOrderItems.php trunk/SelectSupplier.php trunk/StockUsage.php trunk/SupplierCredit.php trunk/SupplierTenderCreate.php trunk/SupplierTenders.php trunk/SupplierTypes.php trunk/TaxCategories.php trunk/TaxProvinces.php trunk/Z_UpdateChartDetailsBFwd.php trunk/Z_Upgrade3.10.php trunk/report_runner.php Modified: trunk/PDFOrderStatus.php =================================================================== --- trunk/PDFOrderStatus.php 2011-04-12 11:32:27 UTC (rev 5176) +++ trunk/PDFOrderStatus.php 2011-04-12 16:22:21 UTC (rev 5177) @@ -33,38 +33,39 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' . _('Order Status Report') . '</p>'; - 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 '<table class=selection><tr><td>' . _('Enter the date from which orders are to be listed') . ":</td><td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='FromDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . "'></td></tr>"; - echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ":</td><td>"; - echo "<input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td></tr>"; + echo '<table class=selection><tr><td>' . _('Enter the date from which orders are to be listed') . ':</td><td><input type=text class="date" alt="'. + $_SESSION['DefaultDateFormat'].'" name="FromDate" maxlength=10 size=10 VALUE="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '"></td></tr>'; + echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ':</td><td>'; + echo '<input type=text class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ToDate" maxlength=10 size=10 VALUE="' . Date($_SESSION['DefaultDateFormat']) . '"></td></tr>'; echo '<tr><td>' . _('Inventory Category') . '</td><td>'; $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; $result = DB_query($sql,$db); - echo "<select name='CategoryID'>"; - echo "<option selected VALUE='All'>" . _('Over All Categories'); + echo '<select name="CategoryID">'; + echo '<option selected VALUE="All">' . _('Over All Categories') . '</option>'; while ($myrow=DB_fetch_array($result)){ - echo '<option value=' . $myrow['categoryid'] . '>' . $myrow['categorydescription']; + echo '<option value=' . $myrow['categoryid'] . '>' . $myrow['categorydescription'] . '</option>'; } echo '</select></td></tr>'; echo '<tr><td>' . _('Inventory Location') . ':</td><td><select name="Location">'; - echo '<option selected value="All">' . _('All Locations'); + echo '<option selected value="All">' . _('All Locations') . '</option>'; - $result= DB_query("SELECT loccode, locationname FROM locations",$db); + $result= DB_query('SELECT loccode, locationname FROM locations',$db); while ($myrow=DB_fetch_array($result)){ - echo "<option VALUE='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } echo '</select></td></tr>'; - echo '<tr><td>' . _('Back Order Only') . ":</td><td><select name='BackOrders'>"; - echo "<option selected VALUE='Yes'>" . _('Only Show Back Orders'); - echo "<option VALUE='No'>" . _('Show All Orders'); - echo "</select></td></tr></table><br><div class='centre'><input type=submit name='Go' value='" . _('Create PDF') . "'></div>"; + echo '<tr><td>' . _('Back Order Only') . ':</td><td><select name="BackOrders">' . '</option>'; + echo '<option selected VALUE="Yes">' . _('Only Show Back Orders') . '</option>'; + echo '<option VALUE="No">' . _('Show All Orders') . '</option>'; + echo '</select></td></tr></table><br><div class="centre"><input type=submit name="Go" value="' . _('Create PDF') . '"></div>'; include('includes/footer.inc'); exit; @@ -229,10 +230,10 @@ } if ($_POST['BackOrders']=='Yes'){ - $sql .= ' AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced >0'; + $sql .= " AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced >0"; } -$sql .= ' ORDER BY salesorders.orderno'; +$sql .= " ORDER BY salesorders.orderno"; $Result=DB_query($sql,$db,'','',false,false); //dont trap errors here @@ -337,18 +338,6 @@ $OrderNo=0; } /*end of new page header */ } /* end of while there are delivery differences to print */ -/* UldisN -$pdfcode = $pdf->output(); -$len = strlen($pdfcode); -header('Content-type: application/pdf'); -header('Content-Length: ' . $len); -header('Content-Disposition: inline; filename=OrderStatus.pdf'); -header('Expires: 0'); -header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); -header('Pragma: public'); - -$pdf->stream(); -*/ $pdf->OutputD($_SESSION['DatabaseName'] . '_OrderStatus_' . date('Y-m-d') . '.pdf');//UldisN $pdf->__destruct(); //UldisN ?> \ No newline at end of file Modified: trunk/PDFPeriodStockTransListing.php =================================================================== --- trunk/PDFPeriodStockTransListing.php 2011-04-12 11:32:27 UTC (rev 5176) +++ trunk/PDFPeriodStockTransListing.php 2011-04-12 16:22:21 UTC (rev 5177) @@ -27,21 +27,21 @@ prnMsg($msg,'error'); } - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '>'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class=selection>'; echo '<tr> - <td>' . _('Enter the date from which the transactions are to be listed') . ":</td> - <td><input type=text name='FromDate' maxlength=10 size=10 class=date alt='" . $_SESSION['DefaultDateFormat'] . "' value='" . Date($_SESSION['DefaultDateFormat']) . "'></td> - </tr>"; + <td>' . _('Enter the date from which the transactions are to be listed') . ':</td> + <td><input type=text name="FromDate" maxlength=10 size=10 class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + </tr>'; echo '<tr> - <td>' . _('Enter the date to which the transactions are to be listed') . ":</td> - <td><input type=text name='ToDate' maxlength=10 size=10 class=date alt='" . $_SESSION['DefaultDateFormat'] . "' value='" . Date($_SESSION['DefaultDateFormat']) . "'></td> - </tr>"; + <td>' . _('Enter the date to which the transactions are to be listed') . ':</td> + <td><input type=text name="ToDate" maxlength=10 size=10 class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + </tr>'; echo '<tr><td>' . _('Transaction type') . '</td><td>'; - echo "<select name='TransType'>"; + echo '<select name="TransType">'; echo '<option value=10>' . _('Sales Invoice').'</option>'; echo '<option value=11>' . _('Sales Credit Note').'</option>'; @@ -53,24 +53,24 @@ echo '</select></td></tr>'; - $sql = "SELECT loccode, locationname FROM locations"; + $sql = 'SELECT loccode, locationname FROM locations'; $resultStkLocs = DB_query($sql, $db); - echo '<tr><td>' . _('For Stock Location') . ":</td> - <td><select name='StockLocation'> "; - echo "<option VALUE='All'>" . _('All'); + echo '<tr><td>' . _('For Stock Location') . ':</td> + <td><select name="StockLocation"> '; + echo '<option VALUE="All">' . _('All') . '</option>'; while ($myrow=DB_fetch_array($resultStkLocs)){ if (isset($_POST['StockLocation']) AND $_POST['StockLocation']!='All'){ if ($myrow['loccode'] == $_POST['StockLocation']){ - echo "<option selected VALUE='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option selected VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo "<option VALUE='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ - echo "<option selected VALUE='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option selected VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; $_POST['StockLocation']=$myrow['loccode']; } else { - echo "<option VALUE='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } echo '</select></td></tr>'; @@ -174,18 +174,6 @@ $YPos-=$line_height; -/* UldisN -$pdfcode = $pdf->output(); -$len = strlen($pdfcode); -header('Content-type: application/pdf'); -header('Content-Length: ' . $len); -header('Content-Disposition: inline; filename=ChequeListing.pdf'); -header('Expires: 0'); -header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); -header('Pragma: public'); - -$pdf->stream(); -*/ $ReportFileName = $_SESSION['DatabaseName'] . '_StockTransListing_' . date('Y-m-d').'.pdf'; $pdf->OutputD($ReportFileName);//UldisN $pdf->__destruct(); //UldisN Modified: trunk/PDFStockCheckComparison.php =================================================================== --- trunk/PDFStockCheckComparison.php 2011-04-12 11:32:27 UTC (rev 5176) +++ trunk/PDFStockCheckComparison.php 2011-04-12 16:22:21 UTC (rev 5177) @@ -168,7 +168,7 @@ '" . $SQLAdjustmentDate . "', '" . $PeriodNo . "', '" . $StockGLCodes['stockact'] . "', - '" . $myrow['standardcost'] * $StockQtyDifference . ", '" . $myrow['stockid'] . " x " . $StockQtyDifference . " @ " . $myrow['standardcost'] . " - " . _('Inventory Check') . "')"; + '" . $myrow['standardcost'] * $StockQtyDifference . "', '" . $myrow['stockid'] . " x " . $StockQtyDifference . " @ " . $myrow['standardcost'] . " - " . _('Inventory Check') . "')"; $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg, true); } //END INSERT GL TRANS @@ -222,7 +222,7 @@ if ($Location!=$CheckItemRow['loccode']){ $FontSize=14; - if ($Location!=''){ /*Then it's NOT the first time round */ + if ($Location!=''){ /*Then it is NOT the first time round */ /*draw a line under the Location*/ $pdf->line($Left_Margin, $YPos-2,$Page_Width-$Right_Margin, $YPos-2); $YPos -=$line_height; @@ -236,7 +236,7 @@ if ($Category!=$CheckItemRow['categoryid']){ $FontSize=12; - if ($Category!=''){ /*Then it's NOT the first time round */ + if ($Category!=''){ /*Then it is NOT the first time round */ /*draw a line under the CATEGORY TOTAL*/ $pdf->line($Left_Margin, $YPos-2,$Page_Width-$Right_Margin, $YPos-2); $YPos -=$line_height; @@ -335,10 +335,10 @@ if ($_POST['ReportOrClose']=='ReportAndClose'){ //need to print the report first before this but don't risk re-adjusting all the stock!! - $sql = 'TRUNCATE TABLE stockcheckfreeze'; + $sql = "TRUNCATE TABLE stockcheckfreeze"; $result = DB_query($sql,$db); - $sql = 'TRUNCATE TABLE stockcounts'; + $sql = "TRUNCATE TABLE stockcounts"; $result = DB_query($sql,$db); } @@ -356,11 +356,11 @@ echo '<tr><td>' . _('Choose Option'). ':</font></td><td><select name="ReportOrClose">'; if ($_POST['ReportOrClose']=='ReportAndClose'){ - echo '<option selected VALUE="ReportAndClose">'. _('Report and Close the Inventory Comparison Processing Adjustments As Necessary'); - echo '<option VALUE="ReportOnly">'. _('Report The Inventory Comparison Differences Only - No Adjustments'); + echo '<option selected VALUE="ReportAndClose">'. _('Report and Close the Inventory Comparison Processing Adjustments As Necessary') . '</option>'; + echo '<option VALUE="ReportOnly">'. _('Report The Inventory Comparison Differences Only - No Adjustments') . '</option>'; } else { - echo '<option selected VALUE="ReportOnly">' . _('Report The Inventory Comparison Differences Only - No Adjustments'); - echo '<option VALUE="ReportAndClose">' . _('Report and Close the Inventory Comparison Processing Adjustments As Necessary'); + echo '<option selected VALUE="ReportOnly">' . _('Report The Inventory Comparison Differences Only - No Adjustments') . '</option>'; + echo '<option VALUE="ReportAndClose">' . _('Report and Close the Inventory Comparison Processing Adjustments As Necessary') . '</option>'; } echo '</select></td></tr>'; @@ -369,11 +369,11 @@ echo '<tr><td>'. _('Action for Zero Counts') . ':</td><td><select name="ZeroCounts">'; if ($_POST['ZeroCounts'] =='Adjust'){ - echo '<option selected VALUE="Adjust">'. _('Adjust System stock to Nil'); - echo '<option VALUE="Leave">' . _("Don't Adjust System stock to Nil"); + echo '<option selected VALUE="Adjust">'. _('Adjust System stock to Nil') . '</option>'; + echo '<option VALUE="Leave">' . _('Do not Adjust System stock to Nil') . '</option>'; } else { - echo '<option VALUE="Adjust">'. _('Adjust System stock to Nil'); - echo '<option selected VALUE="Leave">' . _("Don't Adjust System stock to Nil"); + echo '<option VALUE="Adjust">'. _('Adjust System stock to Nil') . '</option>'; + echo '<option selected VALUE="Leave">' . _('Do not Adjust System stock to Nil') . '</option>'; } echo '</table><br><div class="centre"><input type=Submit Name="PrintPDF" Value="' . _('Print PDF'). '"></div>'; Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2011-04-12 11:32:27 UTC (rev 5176) +++ trunk/PO_Header.php 2011-04-12 16:22:21 UTC (rev 5177) @@ -336,7 +336,7 @@ $ErrMsg = _('The searched supplier records requested cannot be retrieved because'); $result_SuppSelect = DB_query($SQL,$db,$ErrMsg); - + $SuppliersReturned=DB_num_rows($result_SuppSelect); if (DB_num_rows($result_SuppSelect)==1){ $myrow=DB_fetch_array($result_SuppSelect); $_POST['Select'] = $myrow['supplierid']; @@ -513,6 +513,7 @@ _('Purchase Order') . '" alt="">' . ' ' . _('Purchase Order: Select Supplier') . ''; echo '<form action="' . $_SERVER['PHP_SELF'] . '?identifier='.$identifier.'" method="post" name="choosesupplier">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<input type="hidden" name="SuppliersReturned" value="' . $SuppliersReturned .'" />'; echo '<table cellpadding=3 colspan=4 class=selection> <tr> Modified: trunk/PricesBasedOnMarkUp.php =================================================================== --- trunk/PricesBasedOnMarkUp.php 2011-04-12 11:32:27 UTC (rev 5176) +++ trunk/PricesBasedOnMarkUp.php 2011-04-12 16:22:21 UTC (rev 5177) @@ -13,7 +13,7 @@ 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 '<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'] . '" />'; $SQL = "SELECT sales_type, typeabbrev FROM salestypes"; @@ -91,7 +91,7 @@ <td><select name="BasePriceList">'; if (!isset($_POST['BasePriceList']) OR $_POST['BasePriceList']=='0'){ - echo '<option selected VALUE=0>' . _('No Price List Selected'); + echo '<option selected VALUE=0>' . _('No Price List Selected') . '</option>'; } while ($PriceLists=DB_fetch_array($PricesResult)){ if (isset($_POST['BasePriceList']) and $_POST['BasePriceList']==$PriceLists['typeabbrev']){ @@ -114,9 +114,9 @@ while ($myrow=DB_fetch_array($result)){ if (isset($_POST['StkCatFrom']) and $myrow['categoryid']==$_POST['StkCatFrom']){ - echo '<option selected value="' . $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' . $myrow['categorydescription']; + echo '<option selected value="' . $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' . $myrow['categorydescription'] . '</option>'; } else { - echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' . $myrow['categorydescription']; + echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' . $myrow['categorydescription'] . '</option>'; } } echo '</select></td></tr>'; @@ -128,9 +128,9 @@ while ($myrow=DB_fetch_array($result)){ if (isset($_POST['StkCatFrom']) and $myrow['categoryid']==$_POST['StkCatTo']){ - echo '<option selected value="'. $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' . $myrow['categorydescription']; + echo '<option selected value="'. $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' . $myrow['categorydescription'] . '</option>'; } else { - echo '<option value="'. $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' . $myrow['categorydescription']; + echo '<option value="'. $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' . $myrow['categorydescription'] . '</option>'; } } echo '</select></td></tr>'; @@ -160,11 +160,11 @@ $_POST['IncreasePercent']=0; } -echo '<tr><td>' . _('Percentage Increase (positive) or decrease (negative)') . "</td> - <td><input type=text name='IncreasePercent' class=number size=4 maxlength=4 VALUE=" . $_POST['IncreasePercent'] . "></td></tr></table>"; +echo '<tr><td>' . _('Percentage Increase (positive) or decrease (negative)') . '</td> + <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 '<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 '</form>'; Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2011-04-12 11:32:27 UTC (rev 5176) +++ trunk/Prices_Customer.php 2011-04-12 16:22:21 UTC (rev 5177) @@ -29,7 +29,7 @@ prnMsg( _('A customer must be selected from the customer selection screen') . ', ' . _('then an item must be selected before this page is called') . '. ' . _('The product selection page should call this page with a valid product code'),'info'); - echo '<hr>'; + echo '<br />'; include('includes/footer.inc'); exit; } @@ -299,17 +299,17 @@ } else { $EndDateDisplay = ConvertSQLDate($myrow['enddate']); } - echo "<tr bgcolor='#CCCCCC'> - <td class=number>".number_format($myrow['price'],2)."</td> - <td>".$Branch."</td> - <td>".$myrow['units']."</td> - <td class=number>".$myrow['conversionfactor']."</td> - <td>".ConvertSQLDate($myrow['startdate'])."</td> - <td>".$EndDateDisplay."</td> - <td><a href='".$_SERVER['PHP_SELF']."?Item=".$Item."&Price=".$myrow['price']."&Branch=".$myrow['branchcode']. - "&StartDate=".$myrow['startdate']."&EndDate=".$myrow['enddate']."&Edit=1'>" . _('Edit') . "</td> - <td><a href='".$_SERVER['PHP_SELF']."?Item=".$Item."&Branch=".$myrow['branchcode']."&StartDate=".$myrow['startdate']. - "&EndDate=".$myrow['enddate']."&delete=yes'>" . _('Delete') . "</td></tr>"; + echo '<tr bgcolor="#CCCCCC"> + <td class=number>'.number_format($myrow['price'],2).'</td> + <td>'.$Branch.'</td> + <td>'.$myrow['units'].'</td> + <td class=number>'.$myrow['conversionfactor'].'</td> + <td>'.ConvertSQLDate($myrow['startdate']).'</td> + <td>'.$EndDateDisplay.'</td> + <td><a href="'.$_SERVER['PHP_SELF'].'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode']. + '&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</td> + <td><a href="'.$_SERVER['PHP_SELF'].'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate']. + '&EndDate='.$myrow['enddate'].'&delete=yes">' . _('Delete') . '</td></tr>'; } //END WHILE LIST LOOP } @@ -395,7 +395,7 @@ $result = DB_query($sql, $db); echo '<table class=selection>'; echo '<tr><td>' . _('Branch') . ':</td>'; -echo '<td><select name="Branch"'; +echo '<td><select name="Branch">'; while ($myrow=DB_fetch_array($result)) { $CustomerCurrency=$myrow['currency']; if ($myrow['branchcode']==$_POST['branch']) { @@ -404,7 +404,7 @@ echo '<option value='.$myrow['branchcode'].'>'.$myrow['brname'].'</option>'; } } -echo '></td></tr>'; +echo '</td></tr>'; echo '<tr><td>' . _('Currency') .':</td><td>' . $CustomerCurrency.'</td></tr>'; echo '<tr><td>' . _('Price Effective From Date') . ':</td> <td><input type="Text" name="StartDate" class=date alt='.$_SESSION['DefaultDateFormat']. Modified: trunk/PrintCustOrder.php =================================================================== --- trunk/PrintCustOrder.php 2011-04-12 11:32:27 UTC (rev 5176) +++ trunk/PrintCustOrder.php 2011-04-12 16:22:21 UTC (rev 5177) @@ -100,7 +100,7 @@ exit; }//packing slip has been printed. } -/* Then there's an order to print and it's not been printed already (or its been flagged for reprinting) +/* Then there's an order to print and it has not been printed already (or its been flagged for reprinting) LETS GO */ Modified: trunk/PrintCustTrans.php =================================================================== --- trunk/PrintCustTrans.php 2011-04-12 11:32:27 UTC (rev 5176) +++ trunk/PrintCustTrans.php 2011-04-12 16:22:21 UTC (rev 5177) @@ -389,31 +389,31 @@ include ('includes/header.inc'); if (!isset($FromTransNo) OR $FromTransNo == '') { /* if FromTransNo is not set then show a form to allow input of either a single invoice number or a range of invoices to be printed. Also get the last invoice number created to show the user where the current range is up to */ - echo "<form action='" . $_SERVER['PHP_SELF'] . '?' . SID . "' 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 '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . _('Print Invoices or Credit Notes (Landscape Mode)') . '</p>'; echo '<tr><td>' . _('Print Invoices or Credit Notes') . '</td><td><select name=InvOrCredit>'; if ($InvOrCredit == 'Invoice' OR !isset($InvOrCredit)) { - echo "<option selected VALUE='Invoice'>" . _('Invoices'); - echo "<option VALUE='Credit'>" . _('Credit Notes'); + echo '<option selected VALUE="Invoice">' . _('Invoices') . '</option>'; + echo '<option VALUE="Credit">' . _('Credit Notes') . '</option>'; } else { - echo "<option selected VALUE='Credit'>" . _('Credit Notes'); - echo "<option VALUE='Invoice'>" . _('Invoices'); + echo '<option selected VALUE="Credit">' . _('Credit Notes') . '</option>'; + echo '<option VALUE="Invoice">' . _('Invoices') . '</option>'; } echo '</select></td></tr>'; echo '<tr><td>' . _('Print EDI Transactions') . '</td><td><select name=PrintEDI>'; if ($InvOrCredit == 'Invoice' OR !isset($InvOrCredit)) { - echo "<option selected VALUE='No'>" . _('Do not Print PDF EDI Transactions'); - echo "<option VALUE='Yes'>" . _('Print PDF EDI Transactions Too'); + echo '<option selected VALUE="No">' . _('Do not Print PDF EDI Transactions') . '</option>'; + echo '<option VALUE="Yes">' . _('Print PDF EDI Transactions Too') . '</option>'; } else { - echo "<option VALUE='No'>" . _('Do not Print PDF EDI Transactions'); - echo "<option selected VALUE='Yes'>" . _('Print PDF EDI Transactions Too'); + echo '<option VALUE="No">' . _('Do not Print PDF EDI Transactions') . '</option>'; + echo '<option selected VALUE="Yes">' . _('Print PDF EDI Transactions Too') . '</option>'; } echo '</select></td></tr>'; echo '<tr><td>' . _('Start invoice/credit note number to print') . '</td><td><input Type=text class=number max=6 size=7 name=FromTransNo></td></tr>'; - echo '<tr><td>' . _('End invoice/credit note number to print') . "</td><td><input Type=text class=number max=6 size=7 name='ToTransNo'></td></tr></table>"; - echo "<br><div class='centre'><input type=Submit Name='Print' Value='" . _('Print') . "'><p>"; - echo "<input type=Submit Name='PrintPDF' Value='" . _('Print PDF') . "'></div>"; + echo '<tr><td>' . _('End invoice/credit note number to print') . '</td><td><input Type=text class=number max=6 size=7 name="ToTransNo"></td></tr></table>'; + echo '<br><div class="centre"><input type=Submit Name="Print" Value="' . _('Print') . '"><p>'; + echo '<input type=Submit Name="PrintPDF" Value="' . _('Print PDF') . '"></div>'; $sql = "SELECT typeno FROM systypes WHERE typeid=10"; $result = DB_query($sql, $db); $myrow = DB_fetch_row($result); @@ -421,7 +421,8 @@ $sql = "SELECT typeno FROM systypes WHERE typeid=11"; $result = DB_query($sql, $db); $myrow = DB_fetch_row($result); - echo '<br /><b>' . _('The last credit note created was number') . ' ' . $myrow[0] . '</b><br />' . _('A sequential range can be printed using the same method as for invoices above') . '. ' . _('A single credit note can be printed by only entering a start transaction number') . '</DIV'; + echo '<br /><b>' . _('The last credit note created was number') . ' ' . $myrow[0] . '</b><br />' . + _('A sequential range can be printed using the same method as for invoices above') . '. ' . _('A single credit note can be printed by only entering a start transaction number') . '</div>'; } else { while ($FromTransNo <= $_POST['ToTransNo']) { /*retrieve the invoice details from the database to print @@ -517,7 +518,10 @@ } $result = DB_query($sql, $db); if (DB_num_rows($result) == 0 OR DB_error_no($db) != 0) { - echo '<div class="page_help_text">' . _('There was a problem retrieving the invoice or credit note details for note number') . ' ' . $FromTransNo . ' ' . _('from the database') . '. ' . _('To print an invoice, the sales order record, the customer transaction record and the branch record for the customer must not have been purged') . '. ' . _('To print a credit note only requires the customer, transaction, salesman and branch records be available').'</div>'; + echo '<div class="page_help_text">' . _('There was a problem retrieving the invoice or credit note details for note number') . + ' ' . $FromTransNo . ' ' . _('from the database') . '. ' . + _('To print an invoice, the sales order record, the customer transaction record and the branch record for the customer must not have been purged') . + '. ' . _('To print a credit note only requires the customer, transaction, salesman and branch records be available').'</div>'; if ($debug == 1) { echo _('The SQL used to get this information that failed was') . "<br>$sql"; } @@ -533,7 +537,7 @@ } $ExchRate = $myrow['rate']; $PageNumber = 1; - echo "<table class='table1'><tr><td VALIGN=TOP WIDTH=10%><img src='" . $_SESSION['LogoFile'] . "'></td><td bgcolor='#BBBBBB'><b>"; + echo '<table class="table1"><tr><td VALIGN=TOP WIDTH=10%><img src="' . $_SESSION['LogoFile'] . '"></td><td bgcolor="#BBBBBB"><b>'; if ($InvOrCredit == 'Invoice') { echo '<font size=4>' . _('TAX INVOICE') . ' '; } else { @@ -541,7 +545,7 @@ } echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br><font size=1>' . _('Tax Authority Ref') . '. ' . $_SESSION['CompanyRecord']['gstno'] . '</td></tr></table>'; /* Now print out the logo and company name and address */ - echo "<table class='table1'><tr><td><font size=4 color='#333333'><b>" . $_SESSION['CompanyRecord']['coyname'] . "</b></font><br>"; + echo '<table class="table1"><tr><td><font size=4 color="#333333"><b>' . $_SESSION['CompanyRecord']['coyname'] . '</b></font><br>'; echo $_SESSION['CompanyRecord']['regoffice1'] . '<br>'; echo $_SESSION['CompanyRecord']['regoffice2'] . '<br>'; echo $_SESSION['CompanyRecord']['regoffice3'] . '<br>'; @@ -553,7 +557,7 @@ echo _('Email') . ': ' . $_SESSION['CompanyRecord']['email'] . '<br>'; echo '</td><td WIDTH=50% class=number>'; /* Now the customer charged to details in a sub table within a cell of the main table*/ - echo "<table class='table1'><tr><td align=left bgcolor='#BBBBBB'><b>" . _('Charge To') . ":</b></td></tr><tr><td bgcolor='#EEEEEE'>"; + echo '<table class="table1"><tr><td align=left bgcolor="#BBBBBB"><b>' . _('Charge To') . ':</b></td></tr><tr><td bgcolor="#EEEEEE">'; echo $myrow['name'] . '<br>' . $myrow['address1'] . '<br>' . $myrow['address2'] . '<br>' . $myrow['address3'] . '<br>' . $myrow['address4'] . '<br>' . $myrow['address5'] . '<br>' . $myrow['address6']; echo '</td></tr></table>'; /*end of the small table showing charge to account details */ @@ -561,36 +565,36 @@ echo '</td></tr></table>'; /*end of the main table showing the company name and charge to details */ if ($InvOrCredit == 'Invoice') { - echo "<table class='table1'> + echo '<table class="table1"> <tr> - <td align=left bgcolor='#BBBBBB'><b>" . _('Charge Branch') . ":</b></td> - <td align=left bgcolor='#BBBBBB'><b>" . _('Delivered To') . ":</b></td> - </tr>"; - echo "<tr> - <td bgcolor='#EEEEEE'>" . $myrow['brname'] . '<br>' . $myrow['braddress1'] . '<br>' . $myrow['braddress2'] . '<br>' . $myrow['braddress3'] . '<br>' . $myrow['braddress4'] . '<br>' . $myrow['braddress5'] . '<br>' . $myrow['braddress6'] . '</td>'; - echo "<td bgcolor='#EEEEEE'>" . $myrow['deliverto'] . '<br>' . $myrow['deladd1'] . '<br>' . $myrow['deladd2'] . '<br>' . $myrow['deladd3'] . '<br>' . $myrow['deladd4'] . '<br>' . $myrow['deladd5'] . '<br>' . $myrow['deladd6'] . '</td>'; + <td align=left bgcolor="#BBBBBB"><b>' . _('Charge Branch') . ':</b></td> + <td align=left bgcolor="#BBBBBB"><b>' . _('Delivered To') . ':</b></td> + </tr>'; + echo '<tr> + <td bgcolor="#EEEEEE">' . $myrow['brname'] . '<br>' . $myrow['braddress1'] . '<br>' . $myrow['braddress2'] . '<br>' . $myrow['braddress3'] . '<br>' . $myrow['braddress4'] . '<br>' . $myrow['braddress5'] . '<br>' . $myrow['braddress6'] . '</td>'; + echo '<td bgcolor="#EEEEEE">' . $myrow['deliverto'] . '<br>' . $myrow['deladd1'] . '<br>' . $myrow['deladd2'] . '<br>' . $myrow['deladd3'] . '<br>' . $myrow['deladd4'] . '<br>' . $myrow['deladd5'] . '<br>' . $myrow['deladd6'] . '</td>'; echo '</tr> </table><hr>'; - echo "<table class='table1'> + echo '<table class="table1"> <tr> - <td align=left bgcolor='#BBBBBB'><b>" . _('Your Order Ref') . "</b></td> - <td align=left bgcolor='#BBBBBB'><b>" . _('Our Order No') . "</b></td> - <td align=left bgcolor='#BBBBBB'><b>" . _('Order Date') . "</b></td> - <td align=left bgcolor='#BBBBBB'><b>" . _('Invoice Date') . "</b></td> - <td align=left bgcolor='#BBBBBB'><b>" . _('Sales Person') . "</font></b></td> - <td align=left bgcolor='#BBBBBB'><b>" . _('Shipper') . "</b></td> - <td align=left bgcolor='#BBBBBB'><b>" . _('Consignment Ref') . "</b></td> - </tr>"; - echo "<tr> - <td bgcolor='#EEEEEE'>" . $myrow['customerref'] . "</td> - <td bgcolor='#EEEEEE'>" . $myrow['orderno'] . "</td> - <td bgcolor='#EEEEEE'>" . ConvertSQLDate($myrow['orddate']) . "</td> - <td bgcolor='#EEEEEE'>" . ConvertSQLDate($myrow['trandate']) . "</td> - <td bgcolor='#EEEEEE'>" . $myrow['salesmanname'] . "</td> - <td bgcolor='#EEEEEE'>" . $myrow['shippername'] . "</td> - <td bgcolor='#EEEEEE'>" . $myrow['consignment'] . "</td> + <td align=left bgcolor="#BBBBBB"><b>' . _('Your Order Ref') . '</b></td> + <td align=left bgcolor="#BBBBBB"><b>' . _('Our Order No') . '</b></td> + <td align=left bgcolor="#BBBBBB"><b>' . _('Order Date') . '</b></td> + <td align=left bgcolor="#BBBBBB"><b>' . _('Invoice Date') . '</b></td> + <td align=left bgcolor="#BBBBBB"><b>' . _('Sales Person') . '</font></b></td> + <td align=left bgcolor="#BBBBBB"><b>' . _('Shipper') . '</b></td> + <td align=left bgcolor="#BBBBBB"><b>' . _('Consignment Ref') . '</b></td> + </tr>'; + echo '<tr> + <td bgcolor="#EEEEEE">' . $myrow['customerref'] . '</td> + <td bgcolor="#EEEEEE">' . $myrow['orderno'] . '</td> + <td bgcolor="#EEEEEE">' . ConvertSQLDate($myrow['orddate']) . '</td> + <td bgcolor="#EEEEEE">' . ConvertSQLDate($myrow['trandate']) . '</td> + <td bgcolor="#EEEEEE">' . $myrow['salesmanname'] . '</td> + <td bgcolor="#EEEEEE">' . $myrow['shippername'] . '</td> + <td bgcolor="#EEEEEE">' . $myrow['consignment'] . '</td> </tr> - </table>"; + </table>'; $sql = "SELECT stockmoves.stockid, stockmaster.description, -stockmoves.qty as quantity, @@ -606,19 +610,19 @@ AND stockmoves.transno='" . $FromTransNo . "' AND stockmoves.show_on_inv_crds=1"; } else { /* then its a credit note */ - echo "<table WIDTH=50%><tr> - <td align=left bgcolor='#BBBBBB'><b>" . _('Branch') . ":</b></td> - </tr>"; - echo "<tr> - <td bgcolor='#EEEEEE'>" . $myrow['brname'] . '<br>' . $myrow['braddress1'] . '<br>' . $myrow['braddress2'] . '<br>' . $myrow['braddress3'] . '<br>' . $myrow['braddress4'] . '<br>' . $myrow['braddress5'] . '<br>' . $myrow['braddress6'] . '</td> + echo '<table width=50%><tr> + <td align=left bgcolor="#BBBBBB"><b>' . _('Branch') . ':</b></td> + </tr>'; + echo '<tr> + <td bgcolor="#EEEEEE">' . $myrow['brname'] . '<br>' . $myrow['braddress1'] . '<br>' . $myrow['braddress2'] . '<br>' . $myrow['braddress3'] . '<br>' . $myrow['braddress4'] . '<br>' . $myrow['braddress5'] . '<br>' . $myrow['braddress6'] . '</td> </tr></table>'; - echo "<hr><table class='table1'><tr> - <td align=left bgcolor='#BBBBBB'><b>" . _('Date') . "</b></td> - <td align=left bgcolor='#BBBBBB'><b>" . _('Sales Person') . "</font></b></td> - </tr>"; - echo "<tr> - <td bgcolor='#EEEEEE'>" . ConvertSQLDate($myrow['trandate']) . "</td> - <td bgcolor='#EEEEEE'>" . $myrow['salesmanname'] . '</td> + echo '<hr><table class="table1"><tr> + <td align=left bgcolor="#BBBBBB"><b>' . _('Date') . '</b></td> + <td align=left bgcolor="#BBBBBB"><b>' . _('Sales Person') . '</font></b></td> + </tr>'; + echo '<tr> + <td bgcolor="#EEEEEE">' . ConvertSQLDate($myrow['trandate']) . '</td> + <td bgcolor="#EEEEEE">' . $myrow['salesmanname'] . '</td> </tr></table>'; $sql = "SELECT stockmoves.stockid, stockmaster.description, @@ -639,19 +643,19 @@ if (DB_error_no($db) != 0) { echo '<div class="page_help_text">' . _('There was a problem retrieving the invoice or credit note stock movement details for invoice number') . ' ' . $FromTransNo . ' ' . _('from the database').'</div>'; if ($debug == 1) { - echo '<br>' . _('The SQL used to get this information that failed was') . "<br>$sql"; + echo '<br>' . _('The SQL used to get this information that failed was') . '<br>'.$sql; } exit; } if (DB_num_rows($result) > 0) { - echo "<table class='table1'> - <tr><th>" . _('Item Code') . "</th> - <th>" . _('Item Description') . "</th> - <th>" . _('Quantity') . "</th> - <th>" . _('Unit') . "</th> - <th>" . _('Price') . "</th> - <th>" . _('Discount') . "</th> - <th>" . _('Net') . '</th></tr>'; + echo '<table class="table1"> + <tr><th>' . _('Item Code') . '</th> + <th>' . _('Item Description') . '</th> + <th>' . _('Quantity') . '</th> + <th>' . _('Unit') . '</th> + <th>' . _('Price') . '</th> + <th>' . _('Discount') . '</th> + <th>' . _('Net') . '</th></tr>'; $LineCounter = 17; $k = 0; //row colour counter while ($myrow2 = DB_fetch_array($result)) { @@ -687,16 +691,16 @@ if ($LineCounter == ($_SESSION['PageLength'] - 2)) { /* head up a new invoice/credit note page */ $PageNumber++; - echo "</table><table class='table1'><tr><td VALIGN=TOp><img src='" . $_SESSION['LogoFile'] . "'></td><td bgcolor='#BBBBBB'><b>"; + echo '</table><table class="table1"><tr><td VALIGN=TOp><img src="' . $_SESSION['LogoFile'] . '"></td><td bgcolor="#BBBBBB"><b>'; if ($InvOrCredit == 'Invoice') { echo '<font size=4>' . _('TAX INVOICE') . ' '; } else { - echo '<font color=RED size=4>' . _('TAX CREDIT NOTE') . ' '; + echo '<font color=red size=4>' . _('TAX CREDIT NOTE') . ' '; } echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br /><font size=1>' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno'] . '</td></tr></table>'; /*Now print out company name and address */ - echo "<table class='table1'><tr> - <td><font size=4 color='#333333'><b>" . $_SESSION['CompanyRecord']['coyname'] . '</b></font><br>'; + echo '<table class="table1"><tr> + <td><font size=4 color="#333333"><b>' . $_SESSION['CompanyRecord']['coyname'] . '</b></font><br>'; echo $_SESSION['CompanyRecord']['regoffice1'] . '<br>'; echo $_SESSION['CompanyRecord']['regoffice2'] . '<br>'; echo $_SESSION['CompanyRecord']['regoffice3'] . '<br>'; @@ -706,15 +710,15 @@ echo _('Telephone') . ': ' . $_SESSION['CompanyRecord']['telephone'] . '<br>'; echo _('Facsimile') . ': ' . $_SESSION['CompanyRecord']['fax'] . '<br>'; echo _('Email') . ': ' . $_SESSION['CompanyRecord']['email'] . '<br>'; - echo '</td><td class=number>' . _('Page') . ": $PageNumber</td></tr></table>"; - echo "<table class='table1'><tr> - <th>" . _('Item Code') . "</th> - <th>" . _('Item Description') . "</th> - <th>" . _('Quantity') . "</th> - <th>" . _('Unit') . "</th> - <th>" . _('Price') . "</th> - <th>" . _('Discount') . "</th> - <th>" . _('Net') . "</th></tr>"; + echo '</td><td class=number>' . _('Page') . ': '.$PageNumber.'</td></tr></table>'; + echo '<table class="table1"><tr> + <th>' . _('Item Code') . '</th> + <th>' . _('Item Description') . '</th> + <th>' . _('Quantity') . '</th> + <th>' . _('Unit') . '</th> + <th>' . _('Price') . '</th> + <th>' . _('Discount') . '</th> + <th>' . _('Net') . '</th></tr>'; $LineCounter = 10; } //end if need a new page headed up @@ -726,7 +730,7 @@ if ($LineCounter >= ($_SESSION['PageLength'] - 8 - $LinesRequiredForText)) { /* head up a new invoice/credit note page */ $PageNumber++; - echo "<table class='table1'><tr><td VALIGN=TOp><img src='" . $_SESSION['LogoFile'] . "'></td><td bgcolor='#BBBBBB'><b>"; + echo '<table class="table1"><tr><td VALIGN=TOp><img src="' . $_SESSION['LogoFile'] . '"></td><td bgcolor="#BBBBBB"><b>'; if ($InvOrCredit == 'Invoice') { echo '<font size=4>' . _('TAX INVOICE') . ' '; } else { @@ -734,7 +738,7 @@ } echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br><font size=1>' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno'] . '</td></tr><table>'; /* Print out the logo and company name and address */ - echo "<table class='table1'><tr><td><font size=4 color='#333333'><b>" . $_SESSION['CompanyRecord']['coyname'] . "</b></font><br>"; + echo '<table class="table1"><tr><td><font size=4 color="#333333"><b>' . $_SESSION['CompanyRecord']['coyname'] . '</b></font><br>'; echo $_SESSION['CompanyRecord']['regoffice1'] . '<br>'; echo $_SESSION['CompanyRecord']['regoffice2'] . '<br>'; echo $_SESSION['CompanyRecord']['regoffice3'] . '<br>'; @@ -744,15 +748,15 @@ echo _('Telephone') . ': ' . $_SESSION['CompanyRecord']['telephone'] . '<br>'; echo _('Facsimile') . ': ' . $_SESSION['CompanyRecord']['fax'] . '<br>'; echo _('Email') . ': ' . $_SESSION['CompanyRecord']['email'] . '<br>'; - echo '</td><td class=number>' . _('Page') . ": $PageNumber</td></tr></table>"; - echo "<table class='table1'><tr> - <th>" . _('Item Code') . "</th> - <th>" . _('Item Description') . "</th> - <th>" . _('Quantity') . "</th> - <th>" . _('Unit') . "</th> - <th>" . _('Price') . "</th> - <th>" . _('Discount') . "</th> - <th>" . _('Net') . '</th></tr>'; + echo '</td><td class=number>' . _('Page') . ': '.$PageNumber.'</td></tr></table>'; + echo '<table class="table1"><tr> + <th>' . _('Item Code') . '</th> + <th>' . _('Item Description') . '</th> + <th>' . _('Quantity') . '</th> + <th>' . _('Unit') . '</th> + <th>' . _('Price') . '</th> + <th>' . _('Discount') . '</th> + <th>' . _('Net') . '</th></tr>'; $LineCounter = 10; } /* Space out the footer to the bottom of the page */ @@ -776,18 +780,18 @@ } /*Print out the invoice text entered */ echo '<table class=table1><tr> - <td class=number>' . _('Sub Total') . "</td> - <td class=number bgcolor='#EEEEEE' WIDTH=15%>$DisplaySubTot</td></tr>"; - echo '<tr><td class=number>' . _('Freight') . "</td> - <td class=number bgcolor='#EEEEEE'>$DisplayFreight</td></tr>"; - echo '<tr><td class=number>' . _('Tax') . "</td> - <td class=number bgcolor='#EEEEEE'>$DisplayTax</td></tr>"; + <td class=number>' . _('Sub Total') . '</td> + <td class=number bgcolor="#EEEEEE" width=15%>'.$DisplaySubTot.'</td></tr>'; + echo '<tr><td class=number>' . _('Freight') . '</td> + <td class=number bgcolor="#EEEEEE">'.$DisplayFreight.'</td></tr>'; + echo '<tr><td class=number>' . _('Tax') . '</td> + <td class=number bgcolor="#EEEEEE">'.$DisplayTax.'</td></tr>'; if ($InvOrCredit == 'Invoice') { - echo '<tr><td class=number><b>' . _('TOTAL INVOICE') . "</b></td> - <td class=number bgcolor='#EEEEEE'><U><b>$DisplayTotal</b></U></td></tr>"; + echo '<tr><td class=number><b>' . _('TOTAL INVOICE') . '</b></td> + <td class=number bgcolor="#EEEEEE"><U><b>'.$DisplayTotal.'</b></U></td></tr>'; } else { - echo '<tr><td class=number><font color=RED><b>' . _('TOTAL CREDIT') . "</b></font></td> - <td class=number bgcolor='#EEEEEE'><font color=RED><U><b>$DisplayTotal</b></U></font></td></tr>"; + echo '<tr><td class=number><font color=RED><b>' . _('TOTAL CREDIT') . '</b></font></td> + <td class=number bgcolor="#EEEEEE"><font color=RED><U><b>'.$DisplayTotal.'</b></U></font></td></tr>'; } echo '</table>'; } /* end of check to see that there was an invoice record to print */ Modified: trunk/RecurringSalesOrders.php =================================================================== --- trunk/RecurringSalesOrders.php 2011-04-12 11:32:27 UTC (rev 5176) +++ trunk/RecurringSalesOrders.php 2011-04-12 16:22:21 UTC (rev 5177) @@ -171,7 +171,7 @@ prnMsg(_('Successfully deleted recurring sales order template number') . ' ' . $_POST['ExistingRecurrOrderNo'],'success'); - echo "<p><a href='$rootpath/SelectRecurringSalesOrder.php?" . SID . "'>". _('Select A Recurring Sales Order Template') .'</a>'; + echo '<p><a href="'.$rootpath.'/SelectRecurringSalesOrder.php">'. _('Select A Recurring Sales Order Template') .'</a>'; unset($_SESSION['Items'.$identifier]->LineItems); unset($_SESSION['Items'.$identifier]); @@ -294,9 +294,9 @@ prnmsg(_('The recurring order template has been updated'),'success'); } - echo "<p><a href='$rootpath/SelectOrderItems.php?" . SID . "&NewOrder=Yes'>". _('Enter New Sales Order') .'</a>'; + echo '<p><a href="'.$rootpath.'/SelectOrderItems.php?NewOrder=Yes">'. _('Enter New Sales Order') .'</a>'; - echo "<p><a href='$rootpath/SelectRecurringSalesOrder.php?" . SID . "'>". _('Select A Recurring Sales Order Template') .'</a>'; + echo '<p><a href="'.$rootpath.'/SelectRecurringSalesOrder.php">'. _('Select A Recurring Sales Order Template') .'</a>'; unset($_SESSION['Items'.$identifier]->LineItems); unset($_SESSION['Items'.$identifier]); @@ -308,21 +308,21 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Search') . '" alt="" /><b>'.' '. _('Recurring Order for Customer') .' : ' . $_SESSION['Items'.$identifier]->CustomerName .'</b></p>'; -echo "<form action='" . $_SERVER['PHP_SELF'] . '?' . SID .'identifier='.$identifier. "' method=post>"; +echo '<form action="' . $_SERVER['PHP_SELF'] . '?identifier='.$identifier. '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo "<table cellpadding=2 colspan=7 class=selection>"; -echo "<tr><th colspan=7><font size=2 color=navy><b>"._('Order Line Details')."</b></font></th></tr>"; -echo "<tr> - <th>". _('Item Code') ."</th> - <th>". _('Item Description') ."</th> - <th>". _('Quantity') ."</th> - <th>". _('Unit') ."</th> - <th>". _('Price') ."</th> - <th>". _('Discount') ." %</th> - <th>". _('Total') ."</th> -</tr>"; +echo '<table cellpadding=2 colspan=7 class=selection>'; +echo '<tr><th colspan=7><font size=2 color=navy><b>'._('Order Line Details').'</b></font></th></tr>'; +echo '<tr> + <th>'. _('Item Code') .'</th> + <th>'. _('Item Description') .'</th> + <th>'. _('Quantity') .'</th> + <th>'. _('Unit') .'</th> + <th>'. _('Price') .'</th> + <th>'. _('Discount') .' %</th> + <th>'. _('Total') .'</th> +</tr>'; $_SESSION['Items'.$identifier]->total = 0; $_SESSION['Items'.$identifier]->totalVolume = 0; @@ -346,14 +346,14 @@ $k=1; } - echo "<td>$StockItem->StockID</td> + echo '<td>$StockItem->StockID</td> <td>$StockItem->ItemDescription</td> <td class=number>$DisplayQuantity</td> <td>$StockItem->Units</td> - <td class=numbert>$DisplayPrice</td> + <td class=number>$DisplayPrice</td> <td class=number>$DisplayDiscount</td> <td class=number>$DisplayLineTotal</td> - </tr>"; + </tr>'; $_SESSION['Items'.$identifier]->total = $_SESSION['Items'.$identifier]->total + $LineTotal; $_SESSION['Items'.$identifier]->totalVolume = $_SESSION['Items'.$identifier]->totalVolume + ($StockItem->Quantity * $StockItem->Volume); @@ -361,29 +361,29 @@ } $DisplayTotal = number_format($_SESSION['Items'.$identifier]->total,2); -echo "<tr> - <td colspan=6 class=number><b>". _('TOTAL Excl Tax/Freight') ."</b></td> +echo '<tr> + <td colspan=6 class=number><b>'. _('TOTAL Excl Tax/Freight') .'</b></td> <td class=number>$DisplayTotal</td> -</tr></table>"; +</tr></table>'; echo '<br><table class=selection>'; -echo "<tr><th colspan=7><font size=2 color=navy><b>"._('Order Header Details')."</b></font></th></tr>"; +echo '<tr><th colspan=7><font size=2 color=navy><b>'._('Order Header Details').'</b></font></th></tr>'; echo '<tr> - <td>'. _('Deliver To') .":</td> - <td>" . $_SESSION['Items'.$identifier]->DeliverTo . "</td></tr>"; + <td>'. _('Deliver To') .':</td> + <td>' . $_SESSION['Items'.$identifier]->DeliverTo . '</td></tr>'; echo '<tr> - <td>'. _('Deliver from the warehouse at') .":</td> - <td>" . $_SESSION['Items'.$identifier]->Location . '</td></tr>'; + <td>'. _('Deliver from the warehouse at') .':</td> + <td>' . $_SESSION['Items'.$identifier]->Location . '</td></tr>'; echo '<tr> - <td>'. _('Street') .":</td> - <td>" . $_SESSION['Items'.$identifier]->DelAdd1 . "</td></tr>"; + <td>'. _('Street') .':</td> + <td>' . $_SESSION['Items'.$identifier]->DelAdd1 . '</td></tr>'; -echo "<tr> - <td>". _('Suburb') .":</td> - <td>" . $_SESSION['Items'.$identifier]->DelAdd2 . "</td></tr>"; +echo '<tr> + <td>'. _('Suburb') .':</td> + <td>' . $_SESSION['Items'.$identifier]->DelAdd2 . '</td></tr>'; echo '<tr> <td>'. _('City') . '/' . _('Region') .':</td> @@ -414,7 +414,7 @@ if ($NewRecurringOrder=='Yes'){ echo '<tr> <td>'. _('Start Date') .':</td> - <td><input type=TEXT class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="StartDate" size=11 maxlength=10 value="' . $_POST['StartDate'] .'"</td></tr>'; + <td><input type=TEXT class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="StartDate" size=11 maxlength=10 value="' . $_POST['StartDate'] .'" /></td></tr>'; } else { echo '<tr> <td>'. _('Last Recurrence') . ':</td> @@ -428,46 +428,46 @@ echo '<tr> <td>'. _('Finish Date') .':</td> - <td><input type=TEXT class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="StopDate" size=11 maxlength=10 value="' . $_POST['StopDate'] .'"</td></tr>'; + <td><input type=TEXT class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="StopDate" size=11 maxlength=10 value="' . $_POST['StopDate'] .'" /></td></tr>'; echo '<tr> <td>'. _('Frequency of Recurrence') .':</td> <td><select name="Frequency">'; if (isset($_POST['Frequency']) and $_POST['Frequency']==52){ - echo '<option selected value=52>' . _('Weekly'); + echo '<option selected value=52>' . _('Weekly') . '</option>'; } else { - echo '<option value=52>' . _('Weekly'); + echo '<option value=52>' . _('Weekly') . '</option>'; } if (isset($_POST['Frequency']) and $_POST['Frequency']==26){ - echo '<option selected value=26>' . _('Fortnightly'); + echo '<option selected value=26>' . _('Fortnightly') . '</option>'; } else { - echo '<option value=26>' . _('Fortnightly'); + echo '<option value=26>' . _('Fortnightly') . '</option>'; } if (isset($_POST['Frequency']) and $_POST['Frequency']==12){ - echo '<option selected value=12>' . _('Monthly'); + echo '<option selected value=12>' . _('Monthly') . '</option>'; } else { - echo '<option value=12>' . _('Monthly'); + echo '<option value=12>' . _('Monthly') . '</option>'; } if (isset($_POST['Frequency']) and $_POST['Frequency']==6){ - echo '<option selected value=6>' . _('Bi-monthly'); + echo '<option selected value=6>' . _('Bi-monthly') . '</option>'; } else { - echo '<option value=6>' . _('Bi-monthly'); + echo '<option value=6>' . _('Bi-monthly') . '</option>'; } if (isset($_POST['Frequency']) and $_POST['Frequency']==4){ - echo '<option selected value=4>' . _('Quarterly'); + echo '<option selected value=4>' . _('Quarterly') . '</option>'; } else { - echo '<option value=4>' . _('Quarterly'); + echo '<option value=4>' . _('Quarterly') . '</option>'; } if (isset($_POST['Frequency']) and $_POST['Frequency']==2){ - echo '<option selected value=2>' . _('Bi-Annually'); + echo '<option selected value=2>' . _('Bi-Annually') . '</option>'; } else { - echo '<option value=2>' . _('Bi-Annually'); + echo '<option value=2>' . _('Bi-Annually') . '</option>'; } if (isset($_POST['Frequency']) and $_POST['Frequency']==1){ - echo '<option selected value=1>' . _('Annually'); + echo '<option selected value=1>' . _('Annually') . '</option>'; } else { - echo '<option value=1>' . _('Annually'); + echo '<option value=1>' . _('Annually') . '</option>'; } echo '</select></td></tr>'; @@ -477,11 +477,11 @@ echo '<tr><td>' . _('Invoice Automatically') . ':</td> <td><select name="AutoInvoice">'; if ($_POST['AutoInvoice']==0){ - echo '<option selected value=0>' . _('No'); - echo '<option value=1>' . _('Yes'); + echo '<option selected value=0>' . _('No') . '</option>'; + echo '<option value=1>' . _('Yes') . '</option>'; } else { - echo '<option value=0>' . _('No'); - echo '<option selected value=1>' . _('Yes'); + echo '<option value=0>' . _('No') . '</option>'; + echo '<option selected value=1>' . _('Yes') . '</option>'; } echo '</select></td></tr>'; } else { @@ -493,12 +493,12 @@ echo '<br><div class="centre">'; if ($NewRecurringOrder=='Yes'){ echo '<input type=hidden name="NewRecurringOrder" value="Yes">'; - echo "<input type=submit name='Process' value='" . _('Create Recurring Order') . "'>"; + echo '<input type=submit name="Process" value="' . _('Create Recurring Order') . '">'; } else { echo '<input type=hidden name="NewRecurringOrder" value="No">'; echo '<input type=hidden name="ExistingRecurrOrderNo" value=' . $_POST['ExistingRecurrOrderNo'] . '>'; - echo "<input type=submit name='Process' value='" . _('Update Recurring Order Details') . "'>"; + echo '<input type=submit name="Process" value="' . _('Update Recurring Order Details') . '">'; echo '<br><br><input type=submit name="DeleteRecurringOrder" value="' . _('Delete Recurring Order') . ' ' . $_POST['ExistingRecurrOrderNo'] . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this recurring order template?') . '\');">'; } Modified: trunk/ReorderLevel.php =================================================================== --- trunk/ReorderLevel.php 2011-04-12 11:32:27 UTC (rev 5176) +++ trunk/ReorderLevel.php 2011-04-12 16:22:21 UTC (rev 5177) @@ -2,13 +2,11 @@ /* $Id$*/ -/* $Revision: 1.6 $ */ - // ReorderLevel.php - Report of parts with quantity below reorder level // Shows if there are other locations that have quantities for the parts that are short -//$PageSecurity = 2; + include('includes/session.inc'); -If (isset($_POST['PrintPDF'])) { +if (isset($_POST['PrintPDF'])) { include('includes/PDFStarter.php'); $pdf->addInfo('Title',_('Reorder Level Report')); @@ -59,9 +57,9 @@ $title = _('Reorder Level') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The Reorder Level 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; @@ -148,20 +146,10 @@ $title = _('Print Reorder Level Report'); include('includes/header.inc'); prnMsg(_('There were no items with demand greater than supply'),'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; } else { -/* - header('Content-type: application/pdf'); - header("Content-Length: " . $len); - header('Content-Disposition: inline; filename=ReorderLevel.pdf'); - header('Expires: 0'); - header('Cache-Control: private, post-check=0, pre-check=0'); - header('Pragma: public'); - - $pdf->Output('ReOrderLevel.pdf', 'I'); -*/ $pdf->OutputI($_SESSION['DatabaseName'] . '_ReOrderLevel_' . date('Y-m-d') . '.pdf');//UldisN $pdf->__destruct(); //UldisN } @@ -173,7 +161,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . _('Inventory Reorder Level Report') . '</p>'; echo '<div class="page_help_text">' . _('Use this report to display the reorder levels for 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'] . '" />'; $sql = "SELECT loccode, locationname @@ -184,15 +172,15 @@ $_POST['StockLocation']='All'; } if ($_POST['StockLocation']=='All'){ - echo '<option selected value="All">' . _('All'); + echo '<option selected value="All">' . _('All') . '</option>'; } else { - echo '<option value="All">' . _('All'); + echo '<option value="All">' . _('All') . '</option>'; } while ($myrow=DB_fetch_array($resultStkLocs)){ if ($myrow['loccode'] == $_POST['StockLocation']){ - echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } echo '</select></td></tr>'; @@ -214,19 +202,19 @@ $_POST['StockCat']='All'; } if ($_POST['StockCat']=='All'){ - echo '<option selected value="All">' . _('All'); + echo '<option selected value="All">' . _('All') . '</option>'; } else { - echo '<option value="All">' . _('All'); + echo '<option value="All">' . _('All') . '</option>'; } while ($myrow1 = DB_fetch_array($result1)) { if ($myrow1['categoryid']==$_POST['StockCat']){ - echo '<option selected value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription']; + echo '<option selected value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } else { - echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription']; + echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } } echo '</select></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/ReorderLevelLocation.php =================================================================== --- trunk/ReorderLevelLocation.php 2011-04-12 11:32:27 UTC (rev 5176) +++ trunk/ReorderLevelLocation.php 2011-04-12 16:22:21 UTC (rev 5177) @@ -50,7 +50,7 @@ echo'<p class="page_title_text" align="center"><strong>' . _('Location : ') . '' . $Location['0'] . ' </strong></p>'; echo'<p class="page_title_text" align="center"><strong>' . _('Number Of Days Sales : ') . '' . $_POST['NumberOfDays'] . '' . _(' Days ') . ' </strong></p>'; - echo "<table>"; + echo '<table>'; echo '<tr><th>' . _('Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Total Invoiced').'<br>'._('At All Locations') . '</th> @@ -110,15 +110,15 @@ $InvoiceAll=DB_fetch_array($ResultInv); - if($InvoiceAll['0']==""){ - $QtyInvoiceAll="0"; + if($InvoiceAll['0']==''){ + $QtyInvoiceAll='0'; }else{ $QtyInvoiceAll=$InvoiceAll['0']; } //get qty invoice - if($myrow['qtyinvoice']==""){ - $QtyInvoice="0"; + if($myrow['qtyinvoice']==''){ + $QtyInvoice='0'; }else{ $QtyInvoice=$myrow['qtyinvoice']; } @@ -153,7 +153,7 @@ } //end of looping echo'<tr> - <td style="text-align:center" colspan=7><input type=submit name=submit value=' . _("Update") . '></td> + <td style="text-align:center" colspan=7><input type=submit name=submit value=' . _('Update') . '></td> </tr></form>'; @@ -162,7 +162,7 @@ echo '<div class="page_help_text">' . _('Use this report to display the reorder levels for Inventory items in different categories.') . '</div><br>'; - echo '</br></br><form action=' . $_SERVER['PHP_SELF'] . " method='post'><table>"; + echo '</br></br><form action="' . $_SERVER['... [truncated message content] |
From: <tim...@us...> - 2011-04-12 18:48:57
|
Revision: 5179 http://weberp.svn.sourceforge.net/weberp/?rev=5179&view=rev Author: tim_schofield Date: 2011-04-12 18:48:50 +0000 (Tue, 12 Apr 2011) Log Message: ----------- XHTML and quoting changes Modified Paths: -------------- trunk/PDFChequeListing.php trunk/PDFLowGP.php trunk/PcAssignCashToTab.php trunk/PcAuthorizeExpenses.php trunk/PcClaimExpensesFromTab.php trunk/PcExpensesTypeTab.php trunk/PcReportTab.php trunk/PcTypeTabs.php Modified: trunk/PDFChequeListing.php =================================================================== --- trunk/PDFChequeListing.php 2011-04-12 16:24:17 UTC (rev 5178) +++ trunk/PDFChequeListing.php 2011-04-12 18:48:50 UTC (rev 5179) @@ -33,23 +33,23 @@ prnMsg($msg,'error'); } - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '>'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class=selection> <tr> - <td>' . _('Enter the date from which cheques are to be listed') . ":</td> - <td><input type=text name='FromDate' maxlength=10 size=10 class=date alt='".$_SESSION['DefaultDateFormat']."' VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td> - </tr>"; - echo '<tr><td>' . _('Enter the date to which cheques are to be listed') . ":</td> - <td><input type=text name='ToDate' maxlength=10 size=10 class=date alt='".$_SESSION['DefaultDateFormat']."' VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td> - </tr>"; + <td>' . _('Enter the date from which cheques are to be listed') . ':</td> + <td><input type=text name="FromDate" maxlength=10 size=10 class=date alt="'.$_SESSION['DefaultDateFormat'].'" VALUE="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + </tr>'; + echo '<tr><td>' . _('Enter the date to which cheques are to be listed') . ':</td> + <td><input type=text name="ToDate" maxlength=10 size=10 class=date alt="'.$_SESSION['DefaultDateFormat'].'" VALUE="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + </tr>'; echo '<tr><td>' . _('Bank Account') . '</td><td>'; $sql = "SELECT bankaccountname, accountcode FROM bankaccounts"; $result = DB_query($sql,$db); - echo "<select name='BankAccount'>"; + echo '<select name="BankAccount">'; while ($myrow=DB_fetch_array($result)){ echo '<option VALUE=' . $myrow['accountcode'] . '>' . $myrow['bankaccountname']; @@ -58,10 +58,10 @@ echo '</select></td></tr>'; - echo '<tr><td>' . _('Email the report off') . ":</td><td><select name='Email'>"; - echo "<option selected VALUE='No'>" . _('No'); - echo "<option VALUE='Yes'>" . _('Yes'); - echo "</select></td></tr></table><br><div class='centre'><input type=submit name='Go' VALUE='" . _('Create PDF') . "'></div>"; + echo '<tr><td>' . _('Email the report off') . ':</td><td><select name="Email">'; + echo '<option selected VALUE="No">' . _('No') . '</option>'; + echo '<option VALUE="Yes">' . _('Yes') . '</option>'; + echo '</select></td></tr></table><br><div class="centre"><input type=submit name="Go" VALUE="' . _('Create PDF') . '"></div>'; include('includes/footer.inc'); @@ -175,18 +175,6 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,number_format($TotalCheques,2), 'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+65,$YPos,300,$FontSize,_('TOTAL') . ' ' . $Currency . ' ' . _('CHEQUES'), 'left'); -/* UldisN -$pdfcode = $pdf->output(); -$len = strlen($pdfcode); -header('Content-type: application/pdf'); -header('Content-Length: ' . $len); -header('Content-Disposition: inline; filename=ChequeListing.pdf'); -header('Expires: 0'); -header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); -header('Pragma: public'); - -$pdf->stream(); -*/ $ReportFileName = $_SESSION['DatabaseName'] . '_ChequeListing_' . date('Y-m-d').'.pdf'; $pdf->OutputD($ReportFileName);//UldisN $pdf->__destruct(); //UldisN Modified: trunk/PDFLowGP.php =================================================================== --- trunk/PDFLowGP.php 2011-04-12 16:24:17 UTC (rev 5178) +++ trunk/PDFLowGP.php 2011-04-12 18:48:50 UTC (rev 5179) @@ -60,9 +60,9 @@ include('includes/header.inc'); prnMsg(_('The low GP items 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; @@ -72,9 +72,9 @@ include('includes/header.inc'); prnMsg(_('No low GP items 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; @@ -112,28 +112,6 @@ $FontSize =10; $YPos -= (2*$line_height); -/* UldisN - $pdfcode = $pdf->output(); - $len = strlen($pdfcode); - - if ($len<=20){ - $title = _('Print Low GP Items Error'); - include('includes/header.inc'); - prnMsg (_('There were no items below print out for the location specified'),'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=LowGPSales.pdf'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - - $pdf->Output('PDFLowGP.pdf', 'I'); - } -*/ $pdf->OutputD($_SESSION['DatabaseName'] . '_LowGPSales_' . date('Y-m-d') . '.pdf');//UldisN $pdf->__destruct(); //UldisN @@ -150,22 +128,22 @@ $_POST['FromDate']=Date($_SESSION['DefaultDateFormat']); $_POST['ToDate']=Date($_SESSION['DefaultDateFormat']); $_POST['GPMin']=0; - 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>' . _('Sales Made From') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . "):</td> - <td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='FromDate' size=10 maxlength=10 VALUE='" . $_POST['FromDate'] . "'></td> - </tr>"; + echo '<tr><td>' . _('Sales Made From') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . '):</td> + <td><input type=text class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="FromDate" size=10 maxlength=10 VALUE="' . $_POST['FromDate'] . '"></td> + </tr>'; - echo '<tr><td>' . _('Sales Made To') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . "):</td> - <td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' size=10 maxlength=10 VALUE='" . $_POST['ToDate'] . "'></td> - </tr>"; + echo '<tr><td>' . _('Sales Made To') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . '):</td> + <td><input type=text class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ToDate" size=10 maxlength=10 VALUE="' . $_POST['ToDate'] . '"></td> + </tr>'; - echo '<tr><td>' . _('Show sales with GP') . '%' . _('below') . ":</td> - <td><input type=text class='number' name='GPMin' maxlength=3 size=3 value=" . $_POST['GPMin'] . "></td> - </tr>"; + echo '<tr><td>' . _('Show sales with GP') . '%' . _('below') . ':</td> + <td><input type=text class="number" name="GPMin" maxlength=3 size=3 value=' . $_POST['GPMin'] . '></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/PcAssignCashToTab.php =================================================================== --- trunk/PcAssignCashToTab.php 2011-04-12 16:24:17 UTC (rev 5178) +++ trunk/PcAssignCashToTab.php 2011-04-12 18:48:50 UTC (rev 5179) @@ -94,7 +94,7 @@ '" . $_POST['Notes'] . "', '" . $_POST['Receipt'] . "' )"; - $msg = _('Assignment of cash to PC Tab ') . ' ' . $_POST["SelectedTabs"] . ' ' . _('has been created'); + $msg = _('Assignment of cash to PC Tab ') . ' ' . $_POST['SelectedTabs'] . ' ' . _('has been created'); } if ( $InputError !=1) { @@ -128,11 +128,11 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $title. '</p>'; - 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 - echo '<tr><td>' . _('Petty Cash Tab To Assign Cash') . ":</td><td><select name='SelectedTabs'>"; + echo '<tr><td>' . _('Petty Cash Tab To Assign Cash') . ':</td><td><select name="SelectedTabs">'; DB_free_result($result); $SQL = "SELECT tabcode @@ -144,11 +144,10 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectTabs']) and $myrow['tabcode']==$_POST['SelectTabs']) { - echo "<option selected value='"; + echo '<option selected value="' . $myrow['tabcode'] . '">' . $myrow['tabcode'] . '</option>'; } else { - echo "<option value='"; + echo '<option value="' . $myrow['tabcode'] . '">' . $myrow['tabcode'] . '</option>'; } - echo $myrow['tabcode'] . "'>" . $myrow['tabcode']; } echo '</select></td></tr>'; @@ -175,20 +174,6 @@ unset($_POST['Receipt']); } -/* $sql = "SELECT pcashdetails.date, - pcashdetails.codeexpense, - pcexpenses.description - pcashdetails.amount, - pcashdetails.authorized, - pcashdetails.posted, - pcashdetails.notes, - pcashdetails.receipt - FROM pcashdetails, pcexpenses - WHERE pcashdetails.tabcode='$SelectedTabs' - AND pcashdetails.codeexpense = pcexpenses.codeexpense - AND pcashdetails.date >=DATE_SUB(CURDATE(), INTERVAL ".$Days." DAY) - ORDER BY pcashdetails.counterindex Asc"; -*/ if(!isset ($Days)){ $Days=30; } @@ -201,21 +186,21 @@ $result = DB_query($sql,$db); echo '<table class=selection>'; - 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 "<tr><th colspan=8>" . _('Detail Of PC Tab Movements For Last ') .': '; - echo "<input type=hidden name='SelectedTabs' value=" . $SelectedTabs . ">"; - echo "<input type=text class=number name='Days' value=" . $Days . " maxlength =3 size=4> Days "; + echo '<tr><th colspan=8>' . _('Detail Of PC Tab Movements For Last ') .': '; + echo '<input type=hidden name="SelectedTabs" value="' . $SelectedTabs . '">'; + echo '<input type=text class=number name="Days" value="' . $Days . '" maxlength =3 size=4> Days '; echo '<input type=submit name="Go" value="' . _('Go') . '">'; echo '</th></tr></form>'; - echo "<tr> - <th>" . _('Date') . "</th> - <th>" . _('Expense Code') . "</th> - <th>" . _('Amount') . "</th> - <th>" . _('Authorised') . "</th> - <th>" . _('Notes') . "</th> - <th>" . _('Receipt') . "</th> - </tr>"; + echo '<tr> + <th>' . _('Date') . '</th> + <th>' . _('Expense Code') . '</th> + <th>' . _('Amount') . '</th> + <th>' . _('Authorised') . '</th> + <th>' . _('Notes') . '</th> + <th>' . _('Receipt') . '</th> + </tr>'; $k=0; //row colour counter @@ -239,29 +224,29 @@ $Description['0']='ASSIGNCASH'; } - if (($myrow['authorized'] == "0000-00-00") and ($Description['0'] == 'ASSIGNCASH')){ + if (($myrow['authorized'] == '0000-00-00') and ($Description['0'] == 'ASSIGNCASH')){ // only cash assignations NOT authorized can be modified or deleted - echo "<td>".ConvertSQLDate($myrow['date'])."</td> - <td>".$Description['0']."</td> - <td class=number>".number_format($myrow['amount'],2)."</td> - <td>".ConvertSQLDate($myrow['authorized'])."</td> - <td>".$myrow['notes']."</td> - <td>".$myrow['receipt']."</td> - <td><a href='".$_SERVER['PHP_SELF'] . '?' . SID ."SelectedIndex=".$myrow['counterindex']."&SelectedTabs=" . - $SelectedTabs . "&Days=" . $Days . "&edit=yes'>" . _('Edit') . "</td> - <td><a href='".$_SERVER['PHP_SELF'] . '?' . SID ."SelectedIndex=".$myrow['counterindex']."&SelectedTabs=" . - $SelectedTabs . "&Days=" . $Days . "&delete=yes' onclick=\"return confirm('" . - _('Are you sure you wish to delete this code and the expense it may have set up?') . "');\">" . - _('Delete') . "</td> - </tr>"; + echo '<td>'.ConvertSQLDate($myrow['date']).'</td> + <td>'.$Description['0'].'</td> + <td class=number>'.number_format($myrow['amount'],2).'</td> + <td>'.ConvertSQLDate($myrow['authorized']).'</td> + <td>'.$myrow['notes'].'</td> + <td>'.$myrow['receipt'].'</td> + <td><a href="'.$_SERVER['PHP_SELF'] . '?SelectedIndex='.$myrow['counterindex'].'&SelectedTabs=' . + $SelectedTabs . '&Days=' . $Days . '&edit=yes">' . _('Edit') . '</td> + <td><a href="'.$_SERVER['PHP_SELF'] . '?SelectedIndex='.$myrow['counterindex'].'&SelectedTabs=' . + $SelectedTabs . '&Days=' . $Days . '&delete=yes" onclick=\'return confirm("' . + _('Are you sure you wish to delete this code and the expense it may have set up?') . '");\'>' . + _('Delete') . '</td> + </tr>'; }else{ - echo "<td>".ConvertSQLDate($myrow['date'])."</td> - <td>".$Description['0']."</td> - <td class=number>".number_format($myrow['amount'],2)."</td> - <td>".ConvertSQLDate($myrow['authorized'])."</td> - <td>".$myrow['notes']."</td> - <td>".$myrow['receipt']."</td> - </tr>"; + echo '<td>'.ConvertSQLDate($myrow['date']).'</td> + <td>'.$Description['0'].'</td> + <td class=number>'.number_format($myrow['amount'],2).'</td> + <td>'.ConvertSQLDate($myrow['authorized']).'</td> + <td>'.$myrow['notes'].'</td> + <td>'.$myrow['receipt'].'</td> + </tr>'; } } //END WHILE LIST LOOP @@ -290,13 +275,13 @@ $Amount['0']=0; } - 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 if (isset($_GET['SelectedIndex'])) { - echo "<tr><th colspan=2><font color=blue size=3>"._('Update Cash Assignment')."</font></th></tr>"; + echo '<tr><th colspan=2><font color=blue size=3>'._('Update Cash Assignment').'</font></th></tr>'; } else { - echo "<tr><th colspan=2><font color=blue size=3>"._('New Cash Assignment')."</font></th></tr>"; + echo '<tr><th colspan=2><font color=blue size=3>'._('New Cash Assignment').'</font></th></tr>'; } if ( isset($_GET['edit'])) { @@ -312,18 +297,18 @@ $_POST['Notes'] = $myrow['notes']; $_POST['Receipt'] = $myrow['receipt']; - echo "<input type=hidden name='SelectedTabs' value=" . $SelectedTabs . ">"; - echo "<input type=hidden name='SelectedIndex' value=" . $SelectedIndex. ">"; - echo "<input type=hidden name='CurrentAmount' value=" . $Amount[0]. ">"; - echo "<input type=hidden name='Days' value=" .$Days. ">"; + echo '<input type=hidden name="SelectedTabs" value="' . $SelectedTabs . '">'; + echo '<input type=hidden name="SelectedIndex" value="' . $SelectedIndex. '">'; + echo '<input type=hidden name="CurrentAmount" value="' . $Amount[0]. '">'; + echo '<input type=hidden name="Days" value="' .$Days. '">'; } /* Ricard: needs revision of this date initialization */ if (!isset($_POST['Date'])) { - $_POST['Date']=Date("d/m/Y"); + $_POST['Date']=Date('d/m/Y'); } - echo '<tr><td>' . _('Cash Assignation Date') . ":</td>"; + echo '<tr><td>' . _('Cash Assignation Date') . ':</td>'; echo '<td><input type=text class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="Date" size=10 maxlength=10 value=' . $_POST['Date'] . '></td></tr>'; @@ -332,23 +317,23 @@ $_POST['Amount']=0; } - echo "<tr><td>" . _('Amount') . ":</td><td><input type='Text' class='number' name='Amount' size='12' maxlength='11' value='" . $_POST['Amount'] . "'></td></tr>"; + echo '<tr><td>' . _('Amount') . ':</td><td><input type="Text" class="number" name="Amount" size="12" maxlength="11" value="' . $_POST['Amount'] . '"></td></tr>'; if (!isset($_POST['Notes'])) { $_POST['Notes']=''; } - echo "<tr><td>" . _('Notes') . ":</td><td><input type='Text' name='Notes' size=50 maxlength=49 value='" . $_POST['Notes'] . "'></td></tr>"; + echo '<tr><td>' . _('Notes') . ':</td><td><input type="Text" name="Notes" size=50 maxlength=49 value="' . $_POST['Notes'] . '"></td></tr>'; if (!isset($_POST['Receipt'])) { $_POST['Receipt']=''; } - echo "<tr><td>" . _('Receipt') . ":</td><td><input type='Text' name='Receipt' size=50 maxlength=49 value='" . $_POST['Receipt'] . "'></td></tr>"; + echo '<tr><td>' . _('Receipt') . ':</td><td><input type="Text" name="Receipt" size=50 maxlength=49 value="' . $_POST['Receipt'] . '"></td></tr>'; - echo "<input type=hidden name='CurrentAmount' value=" . $Amount['0']. ">"; - echo "<input type=hidden name='SelectedTabs' value=" . $SelectedTabs . ">"; - echo "<input type=hidden name='Days' value=" .$Days. ">"; + echo '<input type=hidden name="CurrentAmount" value="' . $Amount['0']. '">'; + echo '<input type=hidden name="SelectedTabs" value="' . $SelectedTabs . '">'; + echo '<input type=hidden name="Days" value="' .$Days. '">'; echo '</td></tr></table>'; // close main table Modified: trunk/PcAuthorizeExpenses.php =================================================================== --- trunk/PcAuthorizeExpenses.php 2011-04-12 16:24:17 UTC (rev 5178) +++ trunk/PcAuthorizeExpenses.php 2011-04-12 18:48:50 UTC (rev 5179) @@ -41,16 +41,16 @@ } if (isset($_POST['submit']) or isset($_POST['update']) OR isset($SelectedTabs) OR isset ($_POST['GO'])) { - 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 ($Days)){ $Days=30; } - echo "<input type=hidden name='SelectedTabs' VALUE=" . $SelectedTabs . ">"; + echo '<input type=hidden name="SelectedTabs" VALUE="' . $SelectedTabs . '">'; echo '<br><table class=selection>'; - echo "<tr><th colspan=7>" . _('Detail Of Movement For Last ') .': '; - echo "<input type=text class=number name='Days' VALUE=" . $Days . " MAXLENGTH =3 size=4> Days "; + echo '<tr><th colspan=7>' . _('Detail Of Movement For Last ') .': '; + echo '<input type=text class=number name="Days" VALUE="' . $Days . '" MAXLENGTH =3 size=4> Days '; echo '<input type=submit name="Go" value="' . _('Go') . '"></tr></th>'; echo '</form>'; @@ -77,15 +77,15 @@ $result = DB_query($sql,$db); - echo "<tr> - <th>" . _('Date') . "</th> - <th>" . _('Expense Code') . "</th> - <th>" . _('Amount') . "</th> - <th>" . _('Posted') . "</th> - <th>" . _('Notes') . "</th> - <th>" . _('Receipt') . "</th> - <th>" . _('Authorized') . "</th> - </tr>"; + echo '<tr> + <th>' . _('Date') . '</th> + <th>' . _('Expense Code') . '</th> + <th>' . _('Amount') . '</th> + <th>' . _('Posted') . '</th> + <th>' . _('Notes') . '</th> + <th>' . _('Receipt') . '</th> + <th>' . _('Authorized') . '</th> + </tr>'; $k=0; //row colour counter echo'<form action="PcAuthorizeExpenses.php" method="POST" name="'._('update').'">'; @@ -248,9 +248,9 @@ } } - echo "<input type=hidden name='SelectedIndex' VALUE=" . $myrow['counterindex']. ">"; - echo "<input type=hidden name='SelectedTabs' VALUE=" . $SelectedTabs . ">"; - echo "<input type=hidden name='Days' VALUE=" .$Days. ">"; + echo '<input type=hidden name="SelectedIndex" VALUE="' . $myrow['counterindex']. '">'; + echo '<input type=hidden name="SelectedTabs" VALUE="' . $SelectedTabs . '">'; + echo '<input type=hidden name="Days" VALUE="' .$Days. '">'; echo' </tr> '; @@ -259,16 +259,16 @@ // Do the postings include ('includes/GLPostings.inc'); - echo'<tr><td style="text-align:right" colspan=4><input type=submit name=submit value=' . _("Update") . '></td></tr></form>'; + echo'<tr><td style="text-align:right" colspan=4><input type=submit name=submit value=' . _('Update') . '></td></tr></form>'; } else { /*The option to submit was not hit so display form */ -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 -echo '<tr><td>' . _('Authorize expenses to Petty Cash Tab') . ":</td><td><select name='SelectedTabs'>"; +echo '<tr><td>' . _('Authorize expenses to Petty Cash Tab') . ':</td><td><select name="SelectedTabs">'; DB_free_result($result); $SQL = "SELECT tabcode @@ -279,11 +279,10 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectTabs']) and $myrow['tabcode']==$_POST['SelectTabs']) { - echo "<option selected VALUE='"; + echo '<option selected VALUE="' . $myrow['tabcode'] . '">' . $myrow['tabcode'] . '</option>'; } else { - echo "<option VALUE='"; + echo '<option VALUE="' . $myrow['tabcode'] . '">' . $myrow['tabcode'] . '</option>'; } - echo $myrow['tabcode'] . "'>" . $myrow['tabcode']; } //end while loop get type of tab Modified: trunk/PcClaimExpensesFromTab.php =================================================================== --- trunk/PcClaimExpensesFromTab.php 2011-04-12 16:24:17 UTC (rev 5178) +++ trunk/PcClaimExpensesFromTab.php 2011-04-12 18:48:50 UTC (rev 5179) @@ -85,7 +85,7 @@ '" . $_POST['Receipt'] . "' )"; - $msg = _('The Expense Claim on Tab') . ' ' . $_POST["SelectedTabs"] . ' ' . _('has been created'); + $msg = _('The Expense Claim on Tab') . ' ' . $_POST['SelectedTabs'] . ' ' . _('has been created'); } if ( $InputError !=1) { @@ -114,18 +114,19 @@ if (!isset($SelectedTabs)){ - /* It could still be the first time the page has been run and a record has been selected for modification - SelectedTabs will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters + /* It could still be the first time the page has been run and a record has been selected for modification - SelectedTabs + * will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters then none of the above are true and the list of sales types will be displayed with links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Payment Entry') . '" alt="" />' . ' ' . $title . '</p>'; - 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 - echo '<tr><td>' . _('Petty Cash Tabs for User ') . $_SESSION['UserID'] . ":</td><td><select name='SelectedTabs'>"; + echo '<tr><td>' . _('Petty Cash Tabs for User ') . $_SESSION['UserID'] . ':</td><td><select name="SelectedTabs">'; DB_free_result($result); $SQL = "SELECT tabcode @@ -136,11 +137,10 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectTabs']) and $myrow['tabcode']==$_POST['SelectTabs']) { - echo "<option selected VALUE='"; + echo '<option selected VALUE="'.$myrow['tabcode'] . '">' . $myrow['tabcode'] . '</option>'; } else { - echo "<option VALUE='"; + echo '<option VALUE="'.$myrow['tabcode'] . '">' . $myrow['tabcode'] . '</option>'; } - echo $myrow['tabcode'] . "'>" . $myrow['tabcode']; } //end while loop @@ -159,15 +159,15 @@ echo '<p><div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '">' . _('Petty Cash Tab ') . '' .$SelectedTabs. '<a/></div><p>'; /* RICARD */ if (! isset($_GET['edit']) OR isset ($_POST['GO'])){ - 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 "<div class='centre'><p>" . _('Detail Of Movements For Last ') .': '; + echo '<div class="centre"><p>' . _('Detail Of Movements For Last ') .': '; if(!isset ($Days)){ $Days=30; } - echo "<input type=hidden name='SelectedTabs' VALUE=" . $SelectedTabs . ">"; - echo "<input type=text class=number name='Days' VALUE=" . $Days . " MAXLENGTH =3 size=4> Days "; + echo '<input type=hidden name="SelectedTabs" VALUE="' . $SelectedTabs . '">'; + echo '<input type=text class=number name="Days" VALUE="' . $Days . '" MAXLENGTH =3 size=4> Days '; echo '<input type=submit name="Go" value="' . _('Go') . '">'; echo '<p></div></form>'; @@ -187,14 +187,14 @@ $result = DB_query($sql,$db); echo '<br><table BORDER=1>'; - echo "<tr> - <th>" . _('Date Of Expense') . "</th> - <th>" . _('Expense Description') . "</th> - <th>" . _('Amount') . "</th> - <th>" . _('Authorized') . "</th> - <th>" . _('Notes') . "</th> - <th>" . _('Receipt') . "</th> - </tr>"; + echo '<tr> + <th>' . _('Date Of Expense') . '</th> + <th>' . _('Expense Description') . '</th> + <th>' . _('Amount') . '</th> + <th>' . _('Authorized') . '</th> + <th>' . _('Notes') . '</th> + <th>' . _('Receipt') . '</th> + </tr>'; $k=0; //row colour counter @@ -220,15 +220,15 @@ if (($myrow['5'] == "0000-00-00") and ($Description['0'] != 'ASSIGNCASH')){ // only movements NOT authorized can be modified or deleted - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td class=number>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> - <td><a href='%sSelectedIndex=%s&SelectedTabs=$SelectedTabs&Days=$Days&edit=yes'>" . _('Edit') . "</td> - <td><a href='%sSelectedIndex=%s&SelectedTabs=$SelectedTabs&Days=$Days&delete=yes' onclick=\"return confirm('" . _('Are you sure you wish to delete this code and the expense it may have set up?') . "');\">" . _('Delete') . "</td> - </tr>", + <td><a href="%sSelectedIndex=%s&SelectedTabs='.$SelectedTabs.'&Days='.$Days.'&edit=yes">' . _('Edit') . '</td> + <td><a href="%sSelectedIndex=%s&SelectedTabs='.$SelectedTabs.'&Days='.$Days.'&delete=yes" onclick="return confirm("' . _('Are you sure you wish to delete this code and the expense it may have set up?') . '");\'>' . _('Delete') . '</td> + </tr>', ConvertSQLDate($myrow['2']), $Description['0'], number_format($myrow['4'],2), @@ -268,8 +268,8 @@ $Amount['0']=0; } - echo "<tr><td colspan=4 style=text-align:right >" . _('Current balance') . ":</td> - <td colspan=2>".number_format($Amount['0'],2)."</td></tr>"; + echo '<tr><td colspan=4 style=text-align:right >' . _('Current balance') . ':</td> + <td colspan=2>'.number_format($Amount['0'],2).'</td></tr>'; echo '</table>'; @@ -277,7 +277,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 '<p><table border=1>'; //Main table echo '<td><table>'; // First column @@ -297,9 +297,9 @@ $_POST['Notes'] = $myrow['notes']; $_POST['Receipt'] = $myrow['receipt']; - echo "<input type=hidden name='SelectedTabs' VALUE=" . $SelectedTabs . ">"; - echo "<input type=hidden name='SelectedIndex' VALUE=" . $SelectedIndex. ">"; - echo "<input type=hidden name='Days' VALUE=" .$Days. ">"; + echo '<input type=hidden name="SelectedTabs" VALUE=' . $SelectedTabs . '>'; + echo '<input type=hidden name="SelectedIndex" VALUE=' . $SelectedIndex. '>'; + echo '<input type=hidden name="Days" VALUE=' .$Days. '>'; }//end of Get Edit @@ -307,9 +307,9 @@ $_POST['Date']=Date("d/m/Y"); } - echo '<tr><td>' . _('Date Of Expense') . ":</td>"; + echo '<tr><td>' . _('Date Of Expense') . ':</td>'; echo '<td><input type=text class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="Date" size=10 maxlength=10 value=' . $_POST['Date']. '></td></tr>'; - echo '<tr><td>' . _('Code Of Expense') . ":</td><td><select name='SelectedExpense'>"; + echo '<tr><td>' . _('Code Of Expense') . ':</td><td><select name="SelectedExpense">'; DB_free_result($result); @@ -325,11 +325,10 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectedExpense']) and $myrow['codeexpense']==$_POST['SelectedExpense']) { - echo "<option selected VALUE='"; + echo '<option selected VALUE="' . $myrow['codeexpense'] . '">' . $myrow['codeexpense'] . ' - ' . $myrow['description'] . '</option>'; } else { - echo "<option VALUE='"; + echo '<option VALUE="' . $myrow['codeexpense'] . '">' . $myrow['codeexpense'] . ' - ' . $myrow['description'] . '</option>'; } - echo $myrow['codeexpense'] . "'>" . $myrow['codeexpense'] . ' - ' . $myrow['description']; } //end while loop @@ -339,21 +338,21 @@ $_POST['Amount']=0; } - echo "<tr><td>" . _('Amount') . ":</td><td><input type='Text' class='number' name='amount' size='12' maxlength='11' value='" . $_POST['Amount'] . "'></td></tr>"; + echo '<tr><td>' . _('Amount') . ':</td><td><input type="Text" class="number" name="amount" size="12" maxlength="11" value="' . $_POST['Amount'] . '"></td></tr>'; if (!isset($_POST['Notes'])) { $_POST['Notes']=''; } - echo "<tr><td>" . _('Notes') . ":</td><td><input type='Text' name='Notes' size=50 maxlength=49 value='" . $_POST['Notes'] . "'></td></tr>"; + echo '<tr><td>' . _('Notes') . ':</td><td><input type="Text" name="Notes" size=50 maxlength=49 value="' . $_POST['Notes'] . '"></td></tr>'; if (!isset($_POST['Receipt'])) { $_POST['Receipt']=''; } - echo "<tr><td>" . _('Receipt') . ":</td><td><input type='Text' name='Receipt' size=50 maxlength=49 value='" . $_POST['Receipt'] . "'></td></tr>"; - echo "<input type=hidden name='SelectedTabs' VALUE=" . $SelectedTabs . ">"; - echo "<input type=hidden name='Days' VALUE=" .$Days. ">"; + echo '<tr><td>' . _('Receipt') . ':</td><td><input type="Text" name="Receipt" size=50 maxlength=49 value="' . $_POST['Receipt'] . '"></td></tr>'; + echo '<input type=hidden name="SelectedTabs" VALUE="' . $SelectedTabs . '">'; + echo '<input type=hidden name="Days" VALUE="' .$Days. '">'; echo '</table>'; // close table in first column echo '</td></tr></table>'; // close main table echo '<p><div class="centre"><input type=submit name=submit VALUE="' . _('Accept') . '"><input type=submit name=Cancel VALUE="' . _('Cancel') . '"></div>'; Modified: trunk/PcExpensesTypeTab.php =================================================================== --- trunk/PcExpensesTypeTab.php 2011-04-12 16:24:17 UTC (rev 5178) +++ trunk/PcExpensesTypeTab.php 2011-04-12 18:48:50 UTC (rev 5179) @@ -110,11 +110,10 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectedTabs']) and $myrow['typetabcode']==$_POST['SelectedTabs']) { - echo '<option selected value="'; + echo '<option selected value="' . $myrow['typetabcode'] . '">' . $myrow['typetabcode'] . ' - ' . $myrow['typetabdescription'] . '</option>'; } else { - echo '<option value="'; + echo '<option value="' . $myrow['typetabcode'] . '">' . $myrow['typetabcode'] . ' - ' . $myrow['typetabdescription'] . '</option>'; } - echo $myrow['typetabcode'] . '">' . $myrow['typetabcode'] . ' - ' . $myrow['typetabdescription'] . '</option>'; } //end while loop @@ -178,7 +177,7 @@ if (!isset($_GET['delete'])) { - echo '<form method="post" action=' . $_SERVER['PHP_SELF'] . '?>'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br /><table class=selection>'; //Main table @@ -194,11 +193,10 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectedExpense']) and $myrow['codeexpense']==$_POST['SelectedExpense']) { - echo '<option selected value="'; + echo '<option selected value="' . $myrow['codeexpense'] . '">' . $myrow['codeexpense'] . ' - ' . $myrow['description'] . '</option>'; } else { - echo '<option value="'; + echo '<option value="' . $myrow['codeexpense'] . '">' . $myrow['codeexpense'] . ' - ' . $myrow['description'] . '</option>'; } - echo $myrow['codeexpense'] . '">' . $myrow['codeexpense'] . ' - ' . $myrow['description'] . '</option>'; } //end while loop Modified: trunk/PcReportTab.php =================================================================== --- trunk/PcReportTab.php 2011-04-12 16:24:17 UTC (rev 5178) +++ trunk/PcReportTab.php 2011-04-12 18:48:50 UTC (rev 5179) @@ -35,7 +35,7 @@ /*Show a form to allow input of criteria for Tabs to show */ echo '<table class=selection>'; - echo '<tr><td>' . _('Code Of Petty Cash Tab') . ":</td><td><select name='SelectedTabs'>"; + echo '<tr><td>' . _('Code Of Petty Cash Tab') . ':</td><td><select name="SelectedTabs">'; if ($_SESSION['AccessLevel'] >= 15){ // superuser can supervise the supervisors $SQL = "SELECT tabcode @@ -51,11 +51,10 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectTabs']) and $myrow['tabcode']==$_POST['SelectTabs']) { - echo "<option selected VALUE='"; + echo '<option selected VALUE="' .$myrow['tabcode'] . '">' . $myrow['tabcode'] . '</option>'; } else { - echo "<option VALUE='"; + echo '<option VALUE="' . $myrow['tabcode'] . '">' . $myrow['tabcode'] . '</option>'; } - echo $myrow['tabcode'] . "'>" . $myrow['tabcode']; } //end while loop get type of tab @@ -70,7 +69,7 @@ echo '<input tabindex="3" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="TEXT" name="ToDate" maxlength="10" size="11" VALUE="' . $_POST['ToDate'] . '">'; echo '</td></tr></table><br>'; echo '<div class="centre"><input type=submit Name="ShowTB" Value="' . _('Show HTML') .'">'; - echo "<input type=submit Name='PrintPDF' Value='"._('PrintPDF')."'></div>"; + echo '<input type=submit Name="PrintPDF" Value="'._('PrintPDF').'"></div>'; } else if (isset($_POST['PrintPDF'])) { @@ -272,7 +271,7 @@ $Tabs=DB_fetch_array($TabResult); - echo "<br><table class=selection>"; + echo '<br><table class=selection>'; echo '<tr><td>' . _('Tab Code') . '</td> <td>:</td> @@ -341,14 +340,14 @@ _('The SQL that failed was:')); echo '<br><table class=selection>'; - echo "<tr> - <th>" . _('Date Of Expense') . "</th> - <th>" . _('Expense Description') . "</th> - <th>" . _('Amount') . "</th> - <th>" . _('Notes') . "</th> - <th>" . _('Receipt') . "</th> - <th>" . _('Date Authorized') . "</th> - </tr>"; + echo '<tr> + <th>' . _('Date Of Expense') . '</th> + <th>' . _('Expense Description') . '</th> + <th>' . _('Amount') . '</th> + <th>' . _('Notes') . '</th> + <th>' . _('Receipt') . '</th> + <th>' . _('Date Authorized') . '</th> + </tr>'; $j = 1; $k=0; //row colour counter @@ -374,13 +373,13 @@ $Description['0']='ASSIGNCASH'; } if ($myrow['5'] != '0000-00-00'){ - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td class=number>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> - </tr>", + </tr>', ConvertSQLDate($myrow['2']), $Description['0'], number_format($myrow['4'],2), @@ -388,13 +387,13 @@ $myrow['8'], ConvertSQLDate($myrow['5'])); }else{ - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td class=number>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> - </tr>", + </tr>', ConvertSQLDate($myrow['2']), $Description['0'], number_format($myrow['4'],2), Modified: trunk/PcTypeTabs.php =================================================================== --- trunk/PcTypeTabs.php 2011-04-12 16:24:17 UTC (rev 5178) +++ trunk/PcTypeTabs.php 2011-04-12 18:48:50 UTC (rev 5179) @@ -45,7 +45,7 @@ $i++; }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'); + prnMsg(_('The petty cash tab type code cannot contain any of the illegal characters'),'error'); }elseif (strlen($_POST['TypeTabDescription']) >50) { $InputError = 1; echo prnMsg(_('The tab code must be Fifty characters or less long'),'error'); @@ -123,7 +123,7 @@ 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'] . '>'; + 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>'; @@ -169,11 +169,11 @@ $k=1; } - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> - <td><a href='%sSelectedTab=%s'>" . _('Edit') . "</td> - <td><a href='%sSelectedTab=%s&delete=yes' onclick=\"return confirm('" . _('Are you sure you wish to delete this code and all the description it may have set up?') . "');\">" . _('Delete') . "</td> - </tr>", + <td><a href="%sSelectedTab=%s">' . _('Edit') . '</td> + <td><a href="%sSelectedTab=%s&delete=yes" onclick=\'return confirm("' . _('Are you sure you wish to delete this code and all the description it may have set up?') . '");\'>' . _('Delete') . '</td> + </tr>', $myrow['0'], $myrow['1'], $_SERVER['PHP_SELF']. '?', $myrow['0'], @@ -190,7 +190,7 @@ } if (! isset($_GET['delete'])) { - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '>'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p><table class=selection>'; //Main table @@ -208,9 +208,9 @@ $_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 "<table> <tr><td>" . _('Code Of Type Of Tab') . ":</td><td>"; + echo '<input type=hidden name="SelectedTab" VALUE="' . $SelectedTab . '">'; + 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 @@ -220,15 +220,15 @@ // 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>"; + 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>'; } 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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-04-12 19:47:39
|
Revision: 5184 http://weberp.svn.sourceforge.net/weberp/?rev=5184&view=rev Author: tim_schofield Date: 2011-04-12 19:47:33 +0000 (Tue, 12 Apr 2011) Log Message: ----------- Bug fixes in purchase ordering Modified Paths: -------------- trunk/PO_Header.php trunk/SupplierTypes.php Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2011-04-12 19:45:11 UTC (rev 5183) +++ trunk/PO_Header.php 2011-04-12 19:47:33 UTC (rev 5184) @@ -234,7 +234,7 @@ $_POST['RePrint'] = 0; } - echo '<meta http-equiv="Refresh" content="0; url="' . $rootpath . '/PO_Items.php?' . SID . 'identifier='.$identifier. '">'; + echo "<meta http-equiv='Refresh' content='0; url=" . $rootpath . '/PO_Items.php?' . SID . 'identifier='.$identifier. "'>"; echo '<p>'; prnMsg(_('You should automatically be forwarded to the entry of the purchase order line items page') . '. ' . _('If this does not happen') . ' (' . _('if the browser does not support META Refresh') . ') ' . @@ -513,7 +513,9 @@ _('Purchase Order') . '" alt="">' . ' ' . _('Purchase Order: Select Supplier') . ''; echo '<form action="' . $_SERVER['PHP_SELF'] . '?identifier='.$identifier.'" method="post" name="choosesupplier">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<input type="hidden" name="SuppliersReturned" value="' . $SuppliersReturned .'" />'; + if (isset($SuppliersReturned )) { + echo '<input type="hidden" name="SuppliersReturned" value="' . $SuppliersReturned .'" />'; + } echo '<table cellpadding=3 colspan=4 class=selection> <tr> @@ -667,7 +669,7 @@ $Qty, $Qty*$PurchItemRow['price']); - echo '<meta http-equiv="Refresh" content=0; url="' . $rootpath . '/PO_Items.php?' . SID . 'identifier='.$identifier. '">'; + echo '<meta http-equiv="Refresh" content=0; url="' . $rootpath . '/PO_Items.php?identifier='.$identifier. '">'; } /*Set up form for entry of order header stuff */ @@ -834,7 +836,6 @@ echo '<table width=80%> <tr> <th><font color=blue size=4><b>' . _('Warehouse Info') . '</b></font></th> - <th><font color=blue size=4><b>' . _('Delivery To') . '</b></font></th> <th><font color=blue size=4><b>' . _('Supplier Info') . '</b></font></th> </tr> <tr><td valign=top>'; @@ -849,7 +850,7 @@ $LocnResult = DB_query($sql,$db); while ($LocnRow=DB_fetch_array($LocnResult)){ - if (isset($_POST['StkLocation']) and ($_POST['StkLocation'] == $LocnRow['loccode'] OR + if (($_POST['StkLocation'] == $LocnRow['loccode'] OR ($_POST['StkLocation']=='' AND $LocnRow['loccode']==$_SESSION['UserStockLocation']))){ echo '<option selected value="' . $LocnRow['loccode'] . '">' . $LocnRow['locationname'] . '</option>'; } else { @@ -978,7 +979,7 @@ while ($ShipperRow=DB_fetch_array($ShipperResult)){ if (isset($_POST['DeliveryBy']) and ($_POST['DeliveryBy'] == $ShipperRow['shipper_id'])) { - echo '<option selected value="' . $ShipperRow['shipper_id'] . "'>" . $ShipperRow['shippername'] . '</option>'; + echo '<option selected value="' . $ShipperRow['shipper_id'] . '">' . $ShipperRow['shippername'] . '</option>'; } else { echo '<option value="' . $ShipperRow['shipper_id'] . '">' . $ShipperRow['shippername'] . '</option>'; } @@ -1002,7 +1003,7 @@ } echo '</select> '; - echo '<input type="submit" name="SearchSuppliers" value=' . _('Select Now') . '"></td></tr>'; + echo '<input type="submit" name="SearchSuppliers" value="' . _('Select Now') . '"></td></tr>'; echo '</td></tr><tr><td>' . _('Supplier Contact') . ':</td><td> <select name=SupplierContact>'; Modified: trunk/SupplierTypes.php =================================================================== --- trunk/SupplierTypes.php 2011-04-12 19:45:11 UTC (rev 5183) +++ trunk/SupplierTypes.php 2011-04-12 19:47:33 UTC (rev 5184) @@ -195,8 +195,8 @@ </tr>', $myrow[0], $myrow[1], - $_SERVER['PHP_SELF'] , $myrow[0], - $_SERVER['PHP_SELF'] , $myrow[0]); + $_SERVER['PHP_SELF'] .'?' , $myrow[0], + $_SERVER['PHP_SELF'] .'?' , $myrow[0]); } //END WHILE LIST LOOP echo '</table>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-04-12 20:45:30
|
Revision: 5185 http://weberp.svn.sourceforge.net/weberp/?rev=5185&view=rev Author: tim_schofield Date: 2011-04-12 20:45:24 +0000 (Tue, 12 Apr 2011) Log Message: ----------- fix bugs in controlled item sales Modified Paths: -------------- trunk/ConfirmDispatchControlled_Invoice.php trunk/includes/Add_SerialItemsOut.php trunk/includes/OutputSerialItems.php Modified: trunk/ConfirmDispatchControlled_Invoice.php =================================================================== --- trunk/ConfirmDispatchControlled_Invoice.php 2011-04-12 19:47:33 UTC (rev 5184) +++ trunk/ConfirmDispatchControlled_Invoice.php 2011-04-12 20:45:24 UTC (rev 5185) @@ -74,4 +74,4 @@ include('includes/footer.inc'); exit; -?> +?> \ No newline at end of file Modified: trunk/includes/Add_SerialItemsOut.php =================================================================== --- trunk/includes/Add_SerialItemsOut.php 2011-04-12 19:47:33 UTC (rev 5184) +++ trunk/includes/Add_SerialItemsOut.php 2011-04-12 20:45:24 UTC (rev 5185) @@ -40,7 +40,6 @@ // } // } - } /*end if the user hit the enter button */ if (isset($_GET['Delete'])){ Modified: trunk/includes/OutputSerialItems.php =================================================================== --- trunk/includes/OutputSerialItems.php 2011-04-12 19:47:33 UTC (rev 5184) +++ trunk/includes/OutputSerialItems.php 2011-04-12 20:45:24 UTC (rev 5185) @@ -95,7 +95,7 @@ echo '<td class=number>' . $Bundle->ExpiryDate . '</td>'; } echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . 'Delete=' . $Bundle->BundleRef . '&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'">'. _('Delete'). '</a></td></tr>'; - $LineItem->SerialItems[]=$Bundle; +// $LineItem->SerialItems[]=$Bundle; $TotalQuantity += $Bundle->BundleQty; } @@ -119,7 +119,7 @@ echo $tableheader; -echo '<form action="' . $_SERVER['PHP_SELF'] . '?=' . SID . '" name="Ga6uF5Wa" method="post"> +echo '<form action="' . $_SERVER['PHP_SELF'] . '" name="Ga6uF5Wa" method="post"> <input type=hidden name=LineNo value="' . $LineNo . '"> <input type=hidden name=StockID value="' . $StockID . '"> <input type=hidden name=EntryType value="KEYED">'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-04-12 21:12:21
|
Revision: 5189 http://weberp.svn.sourceforge.net/weberp/?rev=5189&view=rev Author: tim_schofield Date: 2011-04-12 21:12:15 +0000 (Tue, 12 Apr 2011) Log Message: ----------- Change layout of Inventory Valuation report Modified Paths: -------------- trunk/InventoryValuation.php trunk/includes/PDFInventoryValnPageHeader.inc Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2011-04-12 20:58:17 UTC (rev 5188) +++ trunk/InventoryValuation.php 2011-04-12 21:12:15 UTC (rev 5189) @@ -141,8 +141,8 @@ $DisplayQtyOnHand = number_format($InventoryValn['qtyonhand'],0); $DisplayItemTotal = number_format($InventoryValn['itemtotal'],2); - $LeftOvers = $pdf->addTextWrap(380,$YPos,60,$FontSize,$DisplayQtyOnHand,'right'); - $LeftOvers = $pdf->addTextWrap(440,$YPos,60,$FontSize,$DisplayUnitCost, 'right'); + $LeftOvers = $pdf->addTextWrap(360,$YPos,60,$FontSize,$DisplayQtyOnHand,'right'); + $LeftOvers = $pdf->addTextWrap(420,$YPos,80,$FontSize,$DisplayUnitCost, 'left'); $LeftOvers = $pdf->addTextWrap(500,$YPos,60,$FontSize,$DisplayItemTotal, 'right'); $LeftOvers = $pdf->addTextWrap(400,$YPos,60,$FontSize,$InventoryValn['units'],'right'); @@ -166,7 +166,7 @@ $DisplayCatTotVal = number_format($CatTot_Val,2); $LeftOvers = $pdf->addTextWrap(500,$YPos,60,$FontSize,$DisplayCatTotVal, 'right'); $DisplayCatTotQty = number_format($CatTot_Qty,0); - $LeftOvers = $pdf->addTextWrap(380,$YPos,60,$FontSize,$DisplayCatTotQty, 'right'); + $LeftOvers = $pdf->addTextWrap(360,$YPos,60,$FontSize,$DisplayCatTotQty, 'right'); If ($_POST['DetailedReport']=='Yes'){ /*draw a line under the CATEGORY TOTAL*/ Modified: trunk/includes/PDFInventoryValnPageHeader.inc =================================================================== --- trunk/includes/PDFInventoryValnPageHeader.inc 2011-04-12 20:58:17 UTC (rev 5188) +++ trunk/includes/PDFInventoryValnPageHeader.inc 2011-04-12 21:12:15 UTC (rev 5189) @@ -28,14 +28,14 @@ $Xpos = $Left_Margin+1; if ($_POST['DetailedReport']=='Yes'){ - - $LeftOvers = $pdf->addTextWrap($Xpos,$YPos,300-$Left_Margin,$FontSize,_('Category') . '/' . _('Item'), 'centre'); - $LeftOvers = $pdf->addTextWrap(390,$YPos,60,$FontSize,_('Quantity'), 'centre'); - $LeftOvers = $pdf->addTextWrap(450,$YPos,60,$FontSize,_('Unit Cost'), 'centre'); - $LeftOvers = $pdf->addTextWrap(510,$YPos,60,$FontSize,_('Item Value'), 'centre'); + + $LeftOvers = $pdf->addTextWrap($Xpos,$YPos,300-$Left_Margin,$FontSize,_('Category') . '/' . _('Item'), 'left'); + $LeftOvers = $pdf->addTextWrap(360,$YPos,60,$FontSize,_('Quantity'), 'right'); + $LeftOvers = $pdf->addTextWrap(420,$YPos,60,$FontSize,_('Units'), 'right'); + $LeftOvers = $pdf->addTextWrap(500,$YPos,60,$FontSize,_('Item Value'), 'right'); } else { - $LeftOvers = $pdf->addTextWrap($Xpos,$YPos,320-$Left_Margin,$FontSize,_('Category'), 'centre'); - $LeftOvers = $pdf->addTextWrap(510,$YPos,60,$FontSize,_('Value'), 'centre'); + $LeftOvers = $pdf->addTextWrap($Xpos,$YPos,320-$Left_Margin,$FontSize,_('Category'), 'right'); + $LeftOvers = $pdf->addTextWrap(510,$YPos,60,$FontSize,_('Value'), 'right'); } $FontSize=8; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <tim...@us...> - 2011-04-18 07:37:06
|
Revision: 5199 http://weberp.svn.sourceforge.net/weberp/?rev=5199&view=rev Author: tim_schofield Date: 2011-04-18 07:36:59 +0000 (Mon, 18 Apr 2011) Log Message: ----------- XHTML and quoting changes Modified Paths: -------------- trunk/DebtorsAtPeriodEnd.php trunk/DeliveryDetails.php trunk/DiscountCategories.php trunk/DiscountMatrix.php trunk/EDIMessageFormat.php trunk/EmailCustTrans.php trunk/ExchangeRateTrend.php trunk/FixedAssetCategories.php trunk/GLAccountInquiry.php trunk/GLBalanceSheet.php trunk/GLBudgets.php trunk/GLTags.php trunk/GLTrialBalance.php trunk/GoodsReceived.php trunk/geo_displaymap_customers.php trunk/geo_displaymap_suppliers.php Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2011-04-18 07:26:11 UTC (rev 5198) +++ trunk/DebtorsAtPeriodEnd.php 2011-04-18 07:36:59 UTC (rev 5199) @@ -142,7 +142,7 @@ /*if $FromCriteria is not set then show a form to allow input */ - 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 Customer Code') .":</font></td><td><input tabindex=1 Type=text maxlength=6 size=7 name=FromCriteria value='1'></td></tr>"; Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-04-18 07:26:11 UTC (rev 5198) +++ trunk/DeliveryDetails.php 2011-04-18 07:36:59 UTC (rev 5199) @@ -1013,18 +1013,17 @@ echo '<tr><td>' . _('Packlist Type') . ':</td><td><select name="DeliverBlind">'; for ($p = 1; $p <= 2; $p++) { - echo '<option value=' . $p; if ($p == $_SESSION['Items'.$identifier]->DeliverBlind) { - echo ' selected>'; + echo '<option value=' . $p . ' selected>'; } else { - echo '>'; + echo '<option value=' . $p . '>'; } switch ($p) { case 2: - echo _('Hide Company Details/Logo'); + echo _('Hide Company Details/Logo').'</option>'; break; default: - echo _('Show Company Details/Logo'); + echo _('Show Company Details/Logo').'</option>'; break; } } Modified: trunk/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2011-04-18 07:26:11 UTC (rev 5198) +++ trunk/DiscountCategories.php 2011-04-18 07:36:59 UTC (rev 5199) @@ -67,7 +67,7 @@ } if (isset($_POST['selectchoice'])) { - echo "<form name='update' method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + echo '<form name="update" method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $sql = "SELECT DISTINCT discountcategory FROM stockmaster WHERE discountcategory <>''"; @@ -79,9 +79,9 @@ while ($myrow = DB_fetch_array($result)){ if ($myrow['discountcategory']==$_POST['DiscCat']){ - echo "<option selected value='" . $myrow['discountcategory'] . "'>" . $myrow['discountcategory']; + echo '<option selected value="' . $myrow['discountcategory'] . '">' . $myrow['discountcategory']. '</option>'; } else { - echo "<option value='" . $myrow['discountcategory'] . "'>" . $myrow['discountcategory']; + echo '<option value="' . $myrow['discountcategory'] . '">' . $myrow['discountcategory']. '</option>'; } echo '</option>'; } @@ -90,7 +90,7 @@ echo '<td><input type="submit" name="select" value="'._('Select').'"></td></tr></table><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 '<input type="hidden" name="chooseoption" value="'.$_POST['chooseoption'].'">'; echo '<input type="hidden" name="selectchoice" value="'.$_POST['selectchoice'].'">'; @@ -99,11 +99,11 @@ echo '<table class=selection><tr><td>'. _('Discount Category Code') .':</td><td>'; if (isset($_POST['DiscCat'])) { - echo "<input type='text' name='DiscountCategory' maxlength=2 size=2 value='" . $_POST['DiscCat'] . - "'></td><td>"._('OR')."</td><td></td><td>"._('OR')."</td></tr>"; + echo '<input type="text" name="DiscountCategory" maxlength=2 size=2 value="' . $_POST['DiscCat'] . + '"></td><td>'._('OR').'</td><td></td><td>'._('OR').'</td></tr>'; } else { - echo "<input type='text' name='DiscountCategory' maxlength=2 size=2></td><td>". - _('OR')."</td><td></td><td>"._('OR')."</td></tr>"; + echo '<input type="text" name="DiscountCategory" maxlength=2 size=2></td><td>'. + _('OR').'</td><td></td><td>'._('OR').'</td></tr>'; } if (!isset($_POST['StockID'])) { @@ -115,15 +115,15 @@ if (!isset($_POST['PartDesc'])) { $_POST['PartDesc']=''; } - echo '<tr><td>'. _('Enter Stock Code') .":</td><td><input type='text' name='StockID' size=20 maxlength=20 - value='".$_POST['StockID']."'></td> - <td>"._('Partial code').":</td><td><input type='text' name='PartID' size=10 maxlength=10 value='".$_POST['PartID']."'></td> - <td>"._('Partial description').":</td><td><input type='text' name='PartDesc' size=10 value='".$_POST['PartDesc']."' maxlength=10></td> - <td><input type='Submit' name='search' value='". _('Search') ."'></td></tr>"; + echo '<tr><td>'. _('Enter Stock Code') .':</td><td><input type="text" name="StockID" size=20 maxlength=20 + value="'.$_POST['StockID'].'"></td> + <td>'._('Partial code').':</td><td><input type="text" name="PartID" size=10 maxlength=10 value="'.$_POST['PartID'].'"></td> + <td>'._('Partial description').':</td><td><input type="text" name="PartDesc" size=10 value="'.$_POST['PartDesc'].'" maxlength=10></td> + <td><input type="Submit" name="search" value="'. _('Search') .'"></td></tr>'; echo '</table>'; - echo "<br><div class='centre'><input type='Submit' name='submit' value='". _('Update Item') ."'></div>"; + echo '<br><div class="centre"><input type="Submit" name="submit" value="'. _('Update Item') .'"></div>'; if (isset($_POST['search'])) { if ($_POST['PartID']!='' and $_POST['PartDesc']=='') @@ -154,7 +154,7 @@ echo '<option value="'.$myrow['categoryid'].'">'.$myrow['categorydescription'].'</option>'; } echo '</select></td></tr></table>'; - echo "<br><div class='centre'><input type='Submit' name='submitcategory' value='". _('Update Items') ."'></div>"; + echo '<br><div class="centre"><input type="Submit" name="submitcategory" value="'. _('Update Items') .'"></div>'; } echo '</form>'; @@ -183,9 +183,9 @@ $result = DB_query($sql,$db); echo '<br><table class=selection>'; - echo "<tr> - <th>". _('Discount Category') ."</th> - <th>". _('Item') .'</th></tr>'; + echo '<tr> + <th>'. _('Discount Category') .'</th> + <th>'. _('Item') .'</th></tr>'; $k=0; //row colour counter @@ -199,9 +199,9 @@ } $DeleteURL = $_SERVER['PHP_SELF'] . '?' . SID . '&Delete=yes&StockID=' . $myrow['stockid'] . '&DiscountCategory=' . $myrow['discountcategory']; - printf("<td>%s</td> + printf('<td>%s</td> <td>%s - %s</td> - <td><a href='%s'>". _('Delete') .'</td> + <td><a href="%s">'. _('Delete') .'</td> </tr>', $myrow['discountcategory'], $myrow['stockid'], @@ -220,7 +220,7 @@ } if (!isset($_POST['selectchoice'])) { - echo "<form method='post' name='choose' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + echo '<form method="post" name="choose" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class=selection>'; echo '<tr><td>'._('Update discount category for').'</td>'; @@ -232,4 +232,4 @@ } include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/DiscountMatrix.php =================================================================== --- trunk/DiscountMatrix.php 2011-04-18 07:26:11 UTC (rev 5198) +++ trunk/DiscountMatrix.php 2011-04-18 07:36:59 UTC (rev 5199) @@ -83,7 +83,7 @@ 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'] . '" />'; @@ -97,13 +97,13 @@ echo '<tr><td>' . _('Customer Price List') . ' (' . _('Sales Type') . '):</td><td>'; -echo "<select tabindex=1 name='SalesType'>"; +echo '<select tabindex=1 name="SalesType">'; while ($myrow = DB_fetch_array($result)){ if (isset($_POST['SalesType']) and $myrow['typeabbrev']==$_POST['SalesType']){ - echo "<option selected value='" . $myrow['typeabbrev'] . "'>" . $myrow['sales_type']; + echo '<option selected value="' . $myrow['typeabbrev'] . '">' . $myrow['sales_type']. '</option>'; } else { - echo "<option value='" . $myrow['typeabbrev'] . "'>" . $myrow['sales_type']; + echo '<option value="' . $myrow['typeabbrev'] . '">' . $myrow['sales_type']. '</option>'; } } @@ -118,9 +118,9 @@ while ($myrow = DB_fetch_array($result)){ if ($myrow['discountcategory']==$_POST['DiscCat']){ - echo "<option selected value='" . $myrow['discountcategory'] . "'>" . $myrow['discountcategory']; + echo '<option selected value="' . $myrow['discountcategory'] . '">' . $myrow['discountcategory']. '</option>'; } else { - echo "<option value='" . $myrow['discountcategory'] . "'>" . $myrow['discountcategory']; + echo '<option value="' . $myrow['discountcategory'] . '">' . $myrow['discountcategory'] . '</option>'; } echo '</option>'; } @@ -129,16 +129,16 @@ echo '<input type="hidden" name="DiscountCategory" value="">'; } -echo '<tr><td>' . _('Quantity Break') . ":</td><td><input class='number' tabindex=3 " - . (in_array('QuantityBreak',$Errors) ? "class='inputerror'" : "") - ." type='text' name='QuantityBreak' size=10 maxlength=10></td></tr>"; +echo '<tr><td>' . _('Quantity Break') . ':</td><td><input class="number" tabindex=3 ' + . (in_array('QuantityBreak',$Errors) ? 'class="inputerror"' : '') + .' type="text" name="QuantityBreak" size=10 maxlength=10></td></tr>'; -echo '<tr><td>' . _('Discount Rate') . " (%):</td><td><input class='number' tabindex=4 " - . (in_array('DiscountRate',$Errors) ? "class='inputerror'" : "") . - "type='text' name='DiscountRate' size=11 maxlength=14></td></tr>"; +echo '<tr><td>' . _('Discount Rate') . ' (%):</td><td><input class="number" tabindex=4 ' + . (in_array('DiscountRate',$Errors) ? 'class="inputerror"' : '') . + 'type="text" name="DiscountRate" size=11 maxlength=14></td></tr>'; echo '</table><br>'; -echo "<div class='centre'><input tabindex=5 type='submit' name='submit' value='" . _('Enter Information') . "'></div><br>"; +echo '<div class="centre"><input tabindex=5 type="submit" name="submit" value="' . _('Enter Information') . '"></div><br>'; $sql = "SELECT sales_type, salestype, @@ -154,10 +154,10 @@ $result = DB_query($sql,$db); echo '<table class=selection>'; -echo "<tr><th>" . _('Sales Type') . "</th> - <th>" . _('Discount Category') . "</th> - <th>" . _('Quantity Break') . "</th> - <th>" . _('Discount Rate') . ' %' . "</th></tr>"; +echo '<tr><th>' . _('Sales Type') . '</th> + <th>' . _('Discount Category') . '</th> + <th>' . _('Quantity Break') . '</th> + <th>' . _('Discount Rate') . ' %' . '</th></tr>'; $k=0; //row colour counter @@ -171,11 +171,11 @@ } $DeleteURL = $_SERVER['PHP_SELF'] . '?' . SID . '&Delete=yes&SalesType=' . $myrow['salestype'] . '&DiscountCategory=' . $myrow['discountcategory'] . '&QuantityBreak=' . $myrow['quantitybreak']; - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> - <td class='number'>%s</td> - <td class='number'>%s</td> - <td><a href='%s'>" . _('Delete') . '</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td><a href="%s">' . _('Delete') . '</td> </tr>', $myrow['sales_type'], $myrow['discountcategory'], Modified: trunk/EDIMessageFormat.php =================================================================== --- trunk/EDIMessageFormat.php 2011-04-18 07:26:11 UTC (rev 5198) +++ trunk/EDIMessageFormat.php 2011-04-18 07:36:59 UTC (rev 5199) @@ -97,7 +97,7 @@ prnMsg($msg,'success'); } -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 border=0 width=100%> @@ -124,12 +124,12 @@ $result = DB_query($sql,$db); echo '<table class=selection>'; - echo '<tr><th colspan=5><font size=3>' . _('Definition of') . ' ' . $MessageType . ' ' . _('for') . ' ' . $PartnerCode."</font></th></tr>"; - $TableHeader = "<tr> - <th>" . _('Section') . "</th> - <th>" . _('Sequence') . "</th> - <th>" . _('Format String') . "</th> - </tr>"; + echo '<tr><th colspan=5><font size=3>' . _('Definition of') . ' ' . $MessageType . ' ' . _('for') . ' ' . $PartnerCode.'</font></th></tr>'; + $TableHeader = '<tr> + <th>' . _('Section') . '</th> + <th>' . _('Sequence') . '</th> + <th>' . _('Format String') . '</th> + </tr>'; echo $TableHeader; $k=0; //row colour counter @@ -144,12 +144,12 @@ } - printf("<td>%s</td> + printf('<td>%s</td> <td class=number>%s</td> <td>%s</td> - <td><a href=\"%s&SelectedMessageLine=%s\">" . _('Edit') . "</a></td> - <td><a href=\"%s&delete=%s\">" . _('Delete') . "</a></td> - </tr>", + <td><a href="%s&SelectedMessageLine=%s">' . _('Edit') . '</a></td> + <td><a href="%s&delete=%s">' . _('Delete') . '</a></td> + </tr>', $myrow[1], $myrow[2], $myrow[3], @@ -161,8 +161,8 @@ } //END WHILE LIST LOOP echo '</table><p>'; if (DB_num_rows($result)==0){ - echo "<div class='centre'><input tabindex=1 type=submit name='NewEDIInvMsg' value='" . - _('Create New EDI Invoice Message From Default Template') . "'></div><br>"; + echo '<div class="centre"><input tabindex=1 type=submit name="NewEDIInvMsg" value="' . + _('Create New EDI Invoice Message From Default Template') . '"></div><br>'; } } //end of ifs SelectedLine is not set @@ -188,14 +188,14 @@ $_POST['SequenceNo'] = $myrow['sequenceno']; $_POST['LineText'] = $myrow['linetext']; - echo "<div class='centre'><a href='" . $_SERVER['PHP_SELF'] . '?' . SID . 'MessageType=INVOIC&PartnerCode=' . $myrow['partnercode'] . "'>" . _('Review Message Lines') . '</a></div>'; + echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '?MessageType=INVOIC&PartnerCode=' . $myrow['partnercode'] . '">' . _('Review Message Lines') . '</a></div>'; - echo "<input type=hidden name='SelectedMessageLine' VALUE='" . $SelectedMessageLine . "'>"; - echo "<input type=hidden name='MessageType' VALUE='" . $myrow['messagetype'] . "'>"; - echo "<input type=hidden name='PartnerCode' VALUE='" . $myrow['partnercode'] . "'>"; + echo '<input type=hidden name="SelectedMessageLine" VALUE="' . $SelectedMessageLine . '">'; + echo '<input type=hidden name="MessageType" VALUE="' . $myrow['messagetype'] . '">'; + echo '<input type=hidden name="PartnerCode" VALUE="' . $myrow['partnercode'] . '">'; } else { //end of if $SelectedMessageLine only do the else when a new record is being entered - echo "<input type=hidden name='MessageType' VALUE='" . $MessageType . "'>"; - echo "<input type=hidden name='PartnerCode' VALUE='" . $PartnerCode . "'>"; + echo '<input type=hidden name="MessageType" VALUE="' . $MessageType . '">'; + echo '<input type=hidden name="PartnerCode" VALUE="' . $PartnerCode . '">'; } echo '<table class=selection>'; @@ -209,20 +209,20 @@ echo '<select tabindex=2 name="Section">'; if ($_POST['Section']=='Heading') { - echo "<option selected VALUE='Heading'>" . _('Heading') . '</option>'; + echo '<option selected VALUE="Heading">' . _('Heading') . '</option>'; } else { - echo "<option value='Heading'>" . _('Heading') . '</option>'; + echo '<option value="Heading">' . _('Heading') . '</option>'; } if (isset($_POST['Section']) and $_POST['Section']=='Detail') { - echo "<option selected VALUE='Detail'>" . _('Detail') . '</option>'; + echo '<option selected VALUE="Detail">' . _('Detail') . '</option>'; } else { - echo "<option value='Detail'>" . _('Detail') . '</option>'; + echo '<option value="Detail">' . _('Detail') . '</option>'; } if (isset($_POST['Section']) and $_POST['Section']=='Summary') { - echo "<option selected VALUE='Summary'>" . _('Summary') . '</option>'; + echo '<option selected VALUE="Summary">' . _('Summary') . '</option>'; } else { - echo "<option value='Summary'>" . _('Summary') . '</option>'; + echo '<option value="Summary">' . _('Summary') . '</option>'; } echo '</select>'; @@ -234,20 +234,20 @@ echo '</td></tr>'; echo '<tr><td>Sequence Number:</td>'; -echo "<td><input tabindex=3 type=text name=SequenceNo size=3 maxlength=3 value=".$_POST['SequenceNo'].">"; -echo "</td></tr>"; -echo "<tr><td>" . _('Line Text') . ':' ."</td>"; -echo "<td>"; -echo "<input tabindex=4 type='Text' name='LineText' size=50 maxlength=50 VALUE=".$_POST['LineText'] .">"; -echo "</td></tr>"; -echo "</table><br>"; +echo '<td><input tabindex=3 type=text name=SequenceNo size=3 maxlength=3 value='.$_POST['SequenceNo'].'>'; +echo '</td></tr>'; +echo '<tr><td>' . _('Line Text') . ':' .'</td>'; +echo '<td>'; +echo '<input tabindex=4 type="Text" name="LineText" size=50 maxlength=50 VALUE='.$_POST['LineText'] .'>'; +echo '</td></tr>'; +echo '</table><br>'; if (isset($_GET['SelectedMessageLine'])) { - echo "<div class='centre'><input tabindex=5 type='submit' name='update' value='". _('Update Information'). "'></div>"; + echo '<div class="centre"><input tabindex=5 type="submit" name="update" value="'. _('Update Information'). '"></div>'; } else { - echo "<div class='centre'><input tabindex=5 type='submit' name='submit' value='". _('Enter Information'). "'></div>"; + echo '<div class="centre"><input tabindex=5 type="submit" name="submit" value="'. _('Enter Information'). '"></div>'; } -echo "</form>"; +echo '</form>'; include('includes/footer.inc'); ?> Modified: trunk/EmailCustTrans.php =================================================================== --- trunk/EmailCustTrans.php 2011-04-18 07:26:11 UTC (rev 5198) +++ trunk/EmailCustTrans.php 2011-04-18 07:36:59 UTC (rev 5199) @@ -37,13 +37,13 @@ include ('includes/header.inc'); -echo "<form action='" . $_SERVER['PHP_SELF'] . '?' . SID . "' method=post>"; +echo '<form action="' . $_SERVER['PHP_SELF'] . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo "<input type=hidden name='TransNo' VALUE=" . $_GET['FromTransNo'] . ">"; -echo "<input type=hidden name='InvOrCredit' VALUE=" . $_GET['InvOrCredit'] . '>'; +echo '<input type=hidden name="TransNo" VALUE="' . $_GET['FromTransNo'] . '">'; +echo '<input type=hidden name="InvOrCredit" VALUE="' . $_GET['InvOrCredit'] . '>'; -echo '<p><table>'; +echo '<br /><table>'; $SQL = "SELECT email FROM custbranch INNER JOIN debtortrans @@ -62,11 +62,11 @@ $EmailAddress =''; } -echo '<tr><td>' . _('Email') . ' ' . $_GET['InvOrCredit'] . ' ' . _('number') . ' ' . $_GET['FromTransNo'] . ' ' . _('to') . ":</td> - <td><input type=TEXT name='EmailAddr' maxlength=60 size=60 VALUE='" . $EmailAddress . "'</td> - </table>"; +echo '<tr><td>' . _('Email') . ' ' . $_GET['InvOrCredit'] . ' ' . _('number') . ' ' . $_GET['FromTransNo'] . ' ' . _('to') . ':</td> + <td><input type=TEXT name="EmailAddr" maxlength=60 size=60 VALUE="' . $EmailAddress . '"></td> + </table>'; -echo "<br><div class='centre'><input type=submit name='DoIt' VALUE='" . _('OK') . "'>"; +echo '<br><div class="centre"><input type=submit name="DoIt" VALUE="' . _('OK') . '">'; echo '</div></form>'; include ('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/ExchangeRateTrend.php =================================================================== --- trunk/ExchangeRateTrend.php 2011-04-18 07:26:11 UTC (rev 5198) +++ trunk/ExchangeRateTrend.php 2011-04-18 07:36:59 UTC (rev 5199) @@ -23,7 +23,7 @@ // SHOW OUR MAIN INPUT FORM // ************************ - echo "<form method='post' name=update action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + echo '<form method="post" name=update action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('View Currency Trend') . '" alt="" />' . ' ' . _('View Currency Trend') . '</p>'; @@ -40,9 +40,9 @@ while ($myrow=DB_fetch_array($result)) { if ($myrow['currabrev']!=$_SESSION['CompanyRecord']['currencydefault']){ if ( $CurrencyToShow==$myrow['currabrev'] ) { - echo '<option selected value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'; + echo '<option selected value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>'; } else { - echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'; + echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>'; } } } @@ -71,4 +71,4 @@ include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/FixedAssetCategories.php =================================================================== --- trunk/FixedAssetCategories.php 2011-04-18 07:26:11 UTC (rev 5198) +++ trunk/FixedAssetCategories.php 2011-04-18 07:36:59 UTC (rev 5199) @@ -154,7 +154,7 @@ FROM fixedassetcategories"; $result = DB_query($sql,$db); - echo "<br /><table class=selection>\n"; + echo '<br /><table class=selection>'; echo '<tr><th>' . _('Cat Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Cost GL') . '</th> @@ -172,15 +172,15 @@ echo '<tr class="OddTableRows">'; $k=1; } - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> - <td class=\"number\">%s</td> - <td class=\"number\">%s</td> - <td class=\"number\">%s</td> - <td class=\"number\">%s</td> - <td><a href=\"%sSelectedCategory=%s\">" . _('Edit') . "</td> - <td><a href=\"%sSelectedCategory=%s&delete=yes\" onclick=\"return confirm('" . _('Are you sure you wish to delete this fixed asset category? Additional checks will be performed before actual deletion to ensure data integrity is not compromised.') . "');\">" . _('Delete') . "</td> - </tr>", + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td><a href="%sSelectedCategory=%s">' . _('Edit') . '</td> + <td><a href="%sSelectedCategory=%s&delete=yes" onclick="return confirm("' . _('Are you sure you wish to delete this fixed asset category? Additional checks will be performed before actual deletion to ensure data integrity is not compromised.') . '");">' . _('Delete') . '</td> + </tr>', $myrow['categoryid'], $myrow['categorydescription'], $myrow['costact'], @@ -199,7 +199,7 @@ //end of ifs and buts! if (isset($SelectedCategory)) { - echo "<br /><div class='centre'><a href='" . $_SERVER['PHP_SELF'] . '?' . SID . ">" ._('Show All Fixed Asset Categories') . "</a></div>"; + echo '<br /><div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '">' ._('Show All Fixed Asset Categories') . '</a></div>'; } echo '<form name="CategoryForm" method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; @@ -273,11 +273,10 @@ while ($myrow = DB_fetch_array($BSAccountsResult)){ if (isset($_POST['CostAct']) and $myrow['accountcode']==$_POST['CostAct']) { - echo '<option selected value='; + echo '<option selected value='.$myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; } else { - echo '<option value='; + echo '<option value='.$myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; } - echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')'; } //end while loop echo '</select></td></tr>'; @@ -286,11 +285,10 @@ while ($myrow = DB_fetch_array($PnLAccountsResult)) { if (isset($_POST['DepnAct']) and $myrow['accountcode']==$_POST['DepnAct']) { - echo '<option selected value='; + echo '<option selected value='.$myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; } else { - echo '<option value='; + echo '<option value='.$myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; } - echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; } //end while loop echo '</select></td></tr>'; @@ -298,11 +296,10 @@ echo '<tr><td>' . _('Profit or Loss on Disposal GL Code:') . '</td><td><select name="DisposalAct">'; while ($myrow = DB_fetch_array($PnLAccountsResult)) { if (isset($_POST['DisposalAct']) and $myrow['accountcode']==$_POST['DisposalAct']) { - echo '<option selected value='; + echo '<option selected value='.$myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } else { - echo '<option value='; + echo '<option value='.$myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } - echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } //end while loop echo '</select></td></tr>'; @@ -313,11 +310,10 @@ while ($myrow = DB_fetch_array($BSAccountsResult)) { if (isset($_POST['AccumDepnAct']) and $myrow['accountcode']==$_POST['AccumDepnAct']) { - echo '<option selected value='; + echo '<option selected value='.$myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } else { - echo '<option value='; + echo '<option value='.$myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } - echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } //end while loop Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2011-04-18 07:26:11 UTC (rev 5198) +++ trunk/GLAccountInquiry.php 2011-04-18 07:36:59 UTC (rev 5199) @@ -25,14 +25,14 @@ echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple periods') . '</div><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'] . '" />'; /*Dates in SQL format for the last day of last month*/ $DefaultPeriodDate = Date ('Y-m-d', Mktime(0,0,0,Date('m'),0,Date('Y'))); /*Show a form to allow input of criteria for TB to show */ -echo '<table class=selection><tr><td>'._('Account').":</td><td><select Name='Account'>"; +echo '<table class=selection><tr><td>'._('Account').':</td><td><select Name="Account">'; $sql = "SELECT accountcode, accountname FROM chartmaster ORDER BY accountcode"; $Account = DB_query($sql,$db); while ($myrow=DB_fetch_array($Account,$db)){ @@ -55,7 +55,7 @@ $result=DB_query($SQL,$db); echo '<option value=0>0 - '._('All tags'); while ($myrow=DB_fetch_array($result)){ - if (isset($_POST['tag']) and $_POST['tag']==$myrow["tagref"]){ + if (isset($_POST['tag']) and $_POST['tag']==$myrow['tagref']){ echo '<option selected value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription']; } else { echo '<option value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription']; @@ -75,8 +75,8 @@ echo '<option value=' . $myrow['periodno'] . '>' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])); } } -echo "</select></td></tr><table>"; -echo "<p><div class='centre'><input type=submit name='Show' value='"._('Show Account Transactions')."'></div></form>"; +echo '</select></td></tr><table>'; +echo '<p><div class="centre"><input type=submit name="Show" value="'._('Show Account Transactions').'"></div></form>'; /* End of the Form rest of script is what happens if the show button is hit*/ @@ -148,16 +148,16 @@ echo '<br><table class=selection>'; echo '<tr><th colspan=8><b>' ._('Transactions for account').' '.$SelectedAccount. ' - '. $SelectedAccountName.'</b></th></tr>'; - $TableHeader = "<tr> - <th>" . _('Type') . "</th> - <th>" . _('Number') . "</th> - <th>" . _('Date') . "</th> - <th>" . _('Debit') . "</th> - <th>" . _('Credit') . "</th> - <th>" . _('Narrative') . "</th> - <th>" . _('Balance') . "</th> - <th>" . _('Tag') . "</th> - </tr>"; + $TableHeader = '<tr> + <th>' . _('Type') . '</th> + <th>' . _('Number') . '</th> + <th>' . _('Date') . '</th> + <th>' . _('Debit') . '</th> + <th>' . _('Credit') . '</th> + <th>' . _('Narrative') . '</th> + <th>' . _('Balance') . '</th> + <th>' . _('Tag') . '</th> + </tr>'; echo $TableHeader; @@ -179,15 +179,15 @@ $RunningTotal =$ChartDetailRow['bfwd']; if ($RunningTotal < 0 ){ //its a credit balance b/fwd - echo "<tr bgcolor='#FDFEEF'> - <td colspan=3><b>" . _('Brought Forward Balance') . '</b><td> + echo '<tr bgcolor="#FDFEEF"> + <td colspan=3><b>' . _('Brought Forward Balance') . '</b><td> </td></td> <td class=number><b>' . number_format(-$RunningTotal,2) . '</b></td> <td></td> </tr>'; } else { //its a debit balance b/fwd - echo "<tr bgcolor='#FDFEEF'> - <td colspan=3><b>" . _('Brought Forward Balance') . '</b></td> + echo '<tr bgcolor="#FDFEEF"> + <td colspan=3><b>' . _('Brought Forward Balance') . '</b></td> <td class=number><b>' . number_format($RunningTotal,2) . '</b></td> <td colspan=2></td> </tr>'; @@ -215,8 +215,8 @@ $ChartDetailsResult = DB_query($sql,$db,$ErrMsg); $ChartDetailRow = DB_fetch_array($ChartDetailsResult); - echo "<tr bgcolor='#FDFEEF'> - <td colspan=3><b>" . _('Total for period') . ' ' . $PeriodNo . '</b></td>'; + echo '<tr bgcolor="#FDFEEF"> + <td colspan=3><b>' . _('Total for period') . ' ' . $PeriodNo . '</b></td>'; if ($PeriodTotal < 0 ){ //its a credit balance b/fwd if ($PandLAccount==True) { $RunningTotal = 0; @@ -271,15 +271,15 @@ if ($tagrow['tagdescription']=='') { $tagrow['tagdescription']=_('None'); } - printf("<td>%s</td> - <td class=number><a href='%s'>%s</a></td> + printf('<td>%s</td> + <td class=number><a href="%s">%s</a></td> <td>%s</td> <td class=number>%s</td> <td class=number>%s</td> <td>%s</td> <td class=number><b>%s</b></td> <td>%s</td> - </tr>", + </tr>', $myrow['typename'], $URL_to_TransDetail, $myrow['typeno'], @@ -292,7 +292,7 @@ } - echo "<tr bgcolor='#FDFEEF'><td colspan=3><b>"; + echo '<tr bgcolor="#FDFEEF"><td colspan=3><b>'; if ($PandLAccount==True){ echo _('Total Period Movement'); } else { /*its a balance sheet account*/ Modified: trunk/GLBalanceSheet.php =================================================================== --- trunk/GLBalanceSheet.php 2011-04-18 07:26:11 UTC (rev 5198) +++ trunk/GLBalanceSheet.php 2011-04-18 07:36:59 UTC (rev 5199) @@ -24,9 +24,9 @@ . _('The balance sheet has three parts: assets, liabilities and ownership equity. The main categories of assets are listed first and are followed by the liabilities. The difference between the assets and the liabilities is known as equity or the net assets or the net worth or capital of the company and according to the accounting equation, net worth must equal assets minus liabilities.') . '<br>' . _('webERP is an "accrual" based system (not a "cash based" system). Accrual systems include items when they are invoiced to the customer, and when expenses are owed based on the supplier invoice date.') . '</div>'; - 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"><tr><td>'._('Select the balance date').":</td><td><select Name='BalancePeriodEnd'>"; + echo '<p><table class="selection"><tr><td>'._('Select the balance date').':</td><td><select Name="BalancePeriodEnd">'; $periodno=GetPeriod(Date($_SESSION['DefaultDateFormat']), $db); $sql = "SELECT lastdate_in_period FROM periods WHERE periodno='".$periodno . "'"; @@ -47,15 +47,15 @@ echo '</select></td></tr>'; - echo '<tr><td>'._('Detail Or Summary').":</td><td><select Name='Detail'>"; - echo "<option selected VALUE='Summary'>"._('Summary'); - echo "<option selected VALUE='Detailed'>"._('All Accounts'); + echo '<tr><td>'._('Detail Or Summary').':</td><td><select Name="Detail">'; + echo '<option selected VALUE="Summary">'._('Summary') . '</option>'; + echo '<option selected VALUE="Detailed">'._('All Accounts') . '</option>'; echo '</select></td></tr>'; echo '</table>'; - echo "<br><div class='centre'><input type=submit Name='ShowBalanceSheet' Value='"._('Show on Screen (HTML)')."'</div>"; - echo "<br><div class='centre'><input type=submit Name='PrintPDF' Value='"._('Produce PDF Report')."'></div>"; + echo '<br><div class="centre"><input type=submit Name="ShowBalanceSheet" Value="'._('Show on Screen (HTML)').'"></div>'; + echo '<br><div class="centre"><input type=submit Name="PrintPDF" Value="'._('Produce PDF Report').'"></div>'; /*Now do the posting while the user is thinking about the period to select */ include ('includes/GLPostings.inc'); @@ -301,9 +301,9 @@ exit; } else { include('includes/header.inc'); - 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 "<input type=hidden name='BalancePeriodEnd' VALUE=" . $_POST['BalancePeriodEnd'] . '>'; + echo '<input type=hidden name="BalancePeriodEnd" VALUE="' . $_POST['BalancePeriodEnd'] . '">'; $RetainedEarningsAct = $_SESSION['CompanyRecord']['retainedearnings']; @@ -354,17 +354,17 @@ _('Balance Sheet as at') . ' ' . $BalanceDate .'</b></font></div></th></tr>'; if ($_POST['Detail']=='Detailed'){ - $TableHeader = "<tr> - <th>"._('Account')."</td> - <th>"._('Account Name')."</td> + $TableHeader = '<tr> + <th>'._('Account').'</td> + <th>'._('Account Name').'</td> <th colspan=2>$BalanceDate</th> - <th colspan=2>"._('Last Year').'</th> + <th colspan=2>'._('Last Year').'</th> </tr>'; } else { /*summary */ - $TableHeader = "<tr> + $TableHeader = '<tr> <th colspan=2></th> <th colspan=2>$BalanceDate</th> - <th colspan=2>"._('Last Year').'</th> + <th colspan=2>'._('Last Year').'</th> </tr>'; } @@ -533,7 +533,7 @@ $k++; } - $ActEnquiryURL = "<a href='$rootpath/GLAccountInquiry.php?" . SID . "Period=" . $_POST['BalancePeriodEnd'] . '&Account=' . $myrow['accountcode'] . "'>" . $myrow['accountcode'] . '<a>'; + $ActEnquiryURL = '<a href="' . $rootpath . '/GLAccountInquiry.php?Period=' . $_POST['BalancePeriodEnd'] . '&Account=' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . '</a>'; $PrintString = '<td>%s</td> <td>%s</td> @@ -658,7 +658,7 @@ </tr>'; echo '</table>'; - echo "<br><div class='centre'><input type=submit Name='SelectADifferentPeriod' Value='"._('Select A Different Balance Date')."'></div>"; + echo '<br><div class="centre"><input type=submit Name="SelectADifferentPeriod" Value="'._('Select A Different Balance Date').'"></div>'; } echo '</form>'; Modified: trunk/GLBudgets.php =================================================================== --- trunk/GLBudgets.php 2011-04-18 07:26:11 UTC (rev 5198) +++ trunk/GLBudgets.php 2011-04-18 07:36:59 UTC (rev 5199) @@ -26,7 +26,7 @@ prnMsg(_('Budget updated successfully'), 'success'); } -//If an account hasn't been selected then select one here. +//If an account has not been selected then select one here. echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p>'; echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post" name="selectaccount">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/GLTags.php =================================================================== --- trunk/GLTags.php 2011-04-18 07:26:11 UTC (rev 5198) +++ trunk/GLTags.php 2011-04-18 07:36:59 UTC (rev 5199) @@ -31,7 +31,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Print') . '" alt="" />' . ' ' . $title . '</p>'; -echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . ' name="form">'; +echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . ' name="form">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br><table><tr>'; Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2011-04-18 07:26:11 UTC (rev 5198) +++ trunk/GLTrialBalance.php 2011-04-18 07:36:59 UTC (rev 5199) @@ -53,22 +53,22 @@ while ($myrow=DB_fetch_array($Periods,$db)){ if(isset($_POST['FromPeriod']) AND $_POST['FromPeriod']!=''){ if( $_POST['FromPeriod']== $myrow['periodno']){ - echo '<option selected VALUE="' . $myrow['periodno'] . '">' .MonthAndYearFromSQLDate($myrow['lastdate_in_period']); + echo '<option selected VALUE="' . $myrow['periodno'] . '">' .MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } else { - echo '<option VALUE="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']); + echo '<option VALUE="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } else { if($myrow['lastdate_in_period']==$DefaultFromDate){ - echo '<option selected VALUE="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']); + echo '<option selected VALUE="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } else { - echo '<option VALUE="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']); + echo '<option VALUE="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } } echo '</select></td></tr>'; if (!isset($_POST['ToPeriod']) OR $_POST['ToPeriod']==''){ - $lastDate = date("Y-m-d",mktime(0,0,0,Date('m')+1,0,Date('Y'))); + $lastDate = date('Y-m-d',mktime(0,0,0,Date('m')+1,0,Date('Y'))); $sql = "SELECT periodno FROM periods WHERE lastdate_in_period = '" . $lastDate . "'"; @@ -87,15 +87,15 @@ while ($myrow=DB_fetch_array($Periods,$db)){ if($myrow['periodno']==$DefaultToPeriod){ - echo '<option selected value="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']); + echo '<option selected value="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } else { - echo '<option value ="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']); + echo '<option value ="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } echo '</select></td></tr></table><br>'; echo '<div class="centre"><input type=submit Name="ShowTB" Value="' . _('Show Trial Balance') .'">'; - echo "<input type=submit Name='PrintPDF' Value='"._('PrintPDF')."'></div>"; + echo '<input type=submit Name="PrintPDF" Value="'._('PrintPDF').'"></div>'; /*Now do the posting while the user is thinking about the period to select */ @@ -429,7 +429,7 @@ _('The SQL that failed was:')); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . - _('Trial Balance') . '" alt="" />' . ' ' . _('Trial Balance Report') . '</p'; + _('Trial Balance') . '" alt="" />' . ' ' . _('Trial Balance Report') . '</p>'; /*show a table of the accounts info returned by the SQL Account Code , Account Name , Month Actual, Month Budget, Period Actual, Period Budget */ Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2011-04-18 07:26:11 UTC (rev 5198) +++ trunk/GoodsReceived.php 2011-04-18 07:36:59 UTC (rev 5199) @@ -184,7 +184,7 @@ } echo '</tr>'; }//foreach(LineItem) - echo "<script>defaultControl(document.forms[0].RecvQty_$LnItm->LineNo);</script>"; + echo '<script>defaultControl(document.forms[0].RecvQty_'.$LnItm->LineNo.');</script>'; $DisplayTotal = number_format($_SESSION['PO']->Total,2); if ($_SESSION['ShowValueOnGRN']==1) { echo '<tr><td colspan=7 class=number><b>' . _('Total value of goods received'). '</b></td> @@ -267,7 +267,7 @@ exit; } -/*Now need to check that the order details are the same as they were when they were read into the Items array. If they've changed then someone else must have altered them */ +/*Now need to check that the order details are the same as they were when they were read into the Items array. If they have changed then someone else must have altered them */ // Otherwise if you try to fullfill item quantities separately will give error. $SQL = "SELECT itemcode, glcode, @@ -327,9 +327,9 @@ <td>' . $myrow['quantityrecd'] . '</td></tr>'; echo '</table>'; } - echo "<div class='centre'><a href='$rootpath/PO_SelectOSPurchOrder.php?" . SID . "'>". + echo '<div class="centre"><a href="'.$rootpath.'/PO_SelectOSPurchOrder.php">'. _('Select a different purchase order for receiving goods against').'</a></div>'; - echo "<div class='centre'><a href='$rootpath/GoodsReceived.php?" . SID . '&PONumber=' . + echo '<div class="centre"><a href="'.$rootpath.'/GoodsReceived.php?PONumber=' . $_SESSION['PO']->OrderNumber . '">'. _('Re-read the updated purchase order for receiving goods against'). '</a></div>'; unset($_SESSION['PO']->LineItems); unset($_SESSION['PO']); @@ -357,7 +357,7 @@ $LocalCurrencyPrice = ($OrderLine->Price / $_SESSION['PO']->ExRate); - if ($OrderLine->StockID!='') { /*Its a stock item line */ + if ($OrderLine->StockID!='') { //Its a stock item line /*Need to get the current standard cost as it is now so we can process GL jorunals later*/ $SQL = "SELECT materialcost + labourcost + overheadcost as stdcost FROM stockmaster @@ -384,7 +384,7 @@ $_SESSION['PO']->LineItems[$OrderLine->LineNo]->StandardCost = $LocalCurrencyPrice; } - if ($OrderLine->StockID=='') { /*Its a NOMINAL item line */ + if ($OrderLine->StockID=='') { //Its a NOMINAL item line $CurrentStandardCost = $_SESSION['PO']->LineItems[$OrderLine->LineNo]->StandardCost; } Modified: trunk/geo_displaymap_customers.php =================================================================== --- trunk/geo_displaymap_customers.php 2011-04-18 07:26:11 UTC (rev 5198) +++ trunk/geo_displaymap_customers.php 2011-04-18 07:36:59 UTC (rev 5199) @@ -23,7 +23,7 @@ echo '<script src="http://' . $map_host . '/maps?file=api&v=2&key=' . $api_key . '"'; echo ' type="text/javascript"></script>'; echo ' <script type="text/javascript">'; -echo ' //<![CDATA[ '; ?> +echo " //<![CDATA[ "; ?> var iconBlue = new GIcon(); iconBlue.image = 'http://labs.google.com/ridefinder/images/mm_20_blue.png'; Modified: trunk/geo_displaymap_suppliers.php =================================================================== --- trunk/geo_displaymap_suppliers.php 2011-04-18 07:26:11 UTC (rev 5198) +++ trunk/geo_displaymap_suppliers.php 2011-04-18 07:36:59 UTC (rev 5199) @@ -23,7 +23,7 @@ echo '<script src="http://' . $map_host . '/maps?file=api&v=2&key=' . $api_key . '"'; echo ' type="text/javascript"></script>'; echo ' <script type="text/javascript">'; -echo ' //<![CDATA[ '; ?> +echo " //<![CDATA[ "; ?> var iconBlue = new GIcon(); iconBlue.image = 'http://labs.google.com/ridefinder/images/mm_20_blue.png'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-04-18 07:38:17
|
Revision: 5200 http://weberp.svn.sourceforge.net/weberp/?rev=5200&view=rev Author: tim_schofield Date: 2011-04-18 07:38:09 +0000 (Mon, 18 Apr 2011) Log Message: ----------- XHTML and quoting changes Modified Paths: -------------- trunk/CustEDISetup.php trunk/CustLoginSetup.php trunk/CustWhereAlloc.php trunk/CustomerBranches.php trunk/CustomerReceipt.php trunk/CustomerTypes.php trunk/Customers.php Modified: trunk/CustEDISetup.php =================================================================== --- trunk/CustEDISetup.php 2011-04-18 07:36:59 UTC (rev 5199) +++ trunk/CustEDISetup.php 2011-04-18 07:38:09 UTC (rev 5200) @@ -27,13 +27,9 @@ //first off validate inputs sensible - if (strstr($_POST['EDIReference'],"'") - OR strstr($_POST['EDIReference'],'+') - OR strstr($_POST['EDIReference'],"\"") - OR strstr($_POST['EDIReference'],'&') - OR strstr($_POST['EDIReference'],' ')) { + if (ContainsIllegalCharacters($_POST['EDIReference'])) { $InputError = 1; - prnMsg(_('The customers EDI reference code cannot contain any of the following characters') .' - \' & + \" ' . _('or a space'),'warn'); + prnMsg(_('The customers EDI reference code cannot contain any of the illegal characters') ,'warn'); } if (strlen($_POST['EDIReference'])<4 AND ($_POST['EDIInvoices']==1 OR $_POST['EDIOrders']==1)){ $InputError = 1; Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2011-04-18 07:36:59 UTC (rev 5199) +++ trunk/CustLoginSetup.php 2011-04-18 07:38:09 UTC (rev 5200) @@ -72,7 +72,7 @@ prnMsg(_('The user ID entered must be at least 4 characters long'),'error'); } elseif (ContainsIllegalCharacters($_POST['UserID'])) { $InputError = 1; - prnMsg(_('User names cannot contain any of the following characters') . " - ' & + \" \\ " . _('or a space'),'error'); + prnMsg(_('User names cannot contain any of the illegal characters') ,'error'); } elseif (strlen($_POST['Password'])<5){ if (!$SelectedUser){ $InputError = 1; @@ -252,18 +252,18 @@ $result = DB_query($sql,$db); echo '<table class=selection>'; - echo "<tr><th>" . _('User Login') . "</th> - <th>" . _('Full Name') . "</th> - <th>" . _('Telephone') . "</th> - <th>" . _('Email') . "</th> - <th>" . _('Customer Code') . "</th> - <th>" . _('Branch Code') . "</th> - <th>" . _('Last Visit') . "</th> - <th>" . _('Security Role') ."</th> - <th>" . _('Report Size') ."</th> - <th>" . _('Theme') ."</th> - <th>" . _('Language') ."</th> - </tr>"; + echo '<tr><th>' . _('User Login') . '</th> + <th>' . _('Full Name') . '</th> + <th>' . _('Telephone') . '</th> + <th>' . _('Email') . '</th> + <th>' . _('Customer Code') . '</th> + <th>' . _('Branch Code') . '</th> + <th>' . _('Last Visit') . '</th> + <th>' . _('Security Role') .'</th> + <th>' . _('Report Size') .'</th> + <th>' . _('Theme') .'</th> + <th>' . _('Language') .'</th> + </tr>'; $k=0; //row colour counter @@ -280,7 +280,7 @@ /*The SecurityHeadings array is defined in config.php */ - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> @@ -291,9 +291,9 @@ <td>%s</td> <td>%s</td> <td>%s</td> - <td><a href=\"%s&SelectedUser=%s\">" . _('Edit') . "</a></td> - <td><a href=\"%s&SelectedUser=%s&delete=1\">" . _('Delete') . "</a></td> - </tr>", + <td><a href="%s&SelectedUser=%s">' . _('Edit') . '</a></td> + <td><a href="%s&SelectedUser=%s&delete=1">' . _('Delete') . '</a></td> + </tr>', $myrow[0], $myrow[1], $myrow[2], @@ -316,10 +316,10 @@ if (isset($SelectedUser)) { - echo "<div class='centre'><a href='" . $_SERVER['PHP_SELF'] ."?" . SID . "'>" . _('Review Existing Users') . '</a></div><br>'; + echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] .'">' . _('Review Existing Users') . '</a></div><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'] . '" />'; if (isset($SelectedUser)) { @@ -359,16 +359,16 @@ $_POST['UserLanguage'] = $myrow['language']; $_POST['Blocked'] = $myrow['blocked']; - echo "<input type='hidden' name='SelectedUser' value='" . $SelectedUser . "'>"; - echo "<input type='hidden' name='UserID' value='" . $_POST['UserID'] . "'>"; - echo "<input type='hidden' name='ModulesAllowed' value='" . $_POST['ModulesAllowed'] . "'>"; + echo '<input type="hidden" name="SelectedUser" value="' . $SelectedUser . '">'; + echo '<input type="hidden" name="UserID" value="' . $_POST['UserID'] . '">'; + echo '<input type="hidden" name="ModulesAllowed" value="' . $_POST['ModulesAllowed'] . '">'; echo '<table class=selection> <tr><td>' . _('User code') . ':</td><td>'; echo $_POST['UserID'] . '</td></tr>'; } else { //end of if $SelectedUser only do the else when a new record is being entered - echo '<table class=selection><tr><td>' . _('User Login') . ":</td><td><input type='text' name='UserID' size=22 maxlength=20 ></td></tr>"; + echo '<table class=selection><tr><td>' . _('User Login') . ':</td><td><input type="text" name="UserID" size=22 maxlength=20 ></td></tr>'; /*set the default modules to show to all this had trapped a few people previously*/ @@ -397,28 +397,28 @@ if (!isset($_POST['Email'])) { $_POST['Email']=''; } -echo '<tr><td>' . _('Password') . ":</td> - <td><input type='password' name='Password' size=22 maxlength=20 value='" . $_POST['Password'] . "'></tr>"; -echo '<tr><td>' . _('Full Name') . ":</td> - <td><input type='text' name='RealName' value='" . $_POST['RealName'] . "' size=36 maxlength=35></td></tr>"; -echo '<tr><td>' . _('Telephone No') . ":</td> - <td><input type='text' name='Phone' value='" . $_POST['Phone'] . "' size=32 maxlength=30></td></tr>"; -echo '<tr><td>' . _('Email Address') .":</td> - <td><input type='text' name='Email' value='" . $_POST['Email'] ."' size=32 maxlength=55></td></tr>"; -echo '<tr><td>' . _('Security Role') . ":</td><td><select name='Access'>"; +echo '<tr><td>' . _('Password') . ':</td> + <td><input type="password" name="Password" size=22 maxlength=20 value="' . $_POST['Password'] . '"></tr>'; +echo '<tr><td>' . _('Full Name') . ':</td> + <td><input type="text" name="RealName" value="' . $_POST['RealName'] . '" size=36 maxlength=35></td></tr>'; +echo '<tr><td>' . _('Telephone No') . ':</td> + <td><input type="text" name="Phone" value="' . $_POST['Phone'] . '" size=32 maxlength=30></td></tr>'; +echo '<tr><td>' . _('Email Address') .':</td> + <td><input type="text" name="Email" value="' . $_POST['Email'] .'" size=32 maxlength=55></td></tr>'; +echo '<tr><td>' . _('Security Role') . ':</td><td><select name="Access">'; foreach ($SecurityRoles as $SecKey => $SecVal) { if (isset($_POST['Access']) and $SecKey == $_POST['Access']){ - echo "<option selected value=" . $SecKey . ">" . $SecVal; + echo '<option selected value="' . $SecKey . '">' . $SecVal . '</option>'; } else { - echo "<option value=" . $SecKey . ">" . $SecVal; + echo '<option value="' . $SecKey . '">' . $SecVal . '</option>'; } } echo '</select></td></tr>'; echo '<input type="hidden" name="ID" value="'.$_SESSION['UserID'].'">'; -echo '<tr><td>' . _('Default Location') . ":</td> - <td><select name='DefaultLocation'>"; +echo '<tr><td>' . _('Default Location') . ':</td> + <td><select name="DefaultLocation">'; $sql = "SELECT loccode, locationname FROM locations"; $result = DB_query($sql,$db); @@ -427,10 +427,10 @@ if (isset($_POST['DefaultLocation']) and $myrow['loccode'] == $_POST['DefaultLocation']){ - echo "<option selected value='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option selected value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo "<option Value='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } @@ -442,8 +442,8 @@ echo '<tr><td>'._('Customer Code').':</td> <td>' . $_POST['Cust'] . '</td></tr>'; -echo '<tr><td>' . _('Branch Code') . ":</td> - <td><select name='BranchCode'>"; +echo '<tr><td>' . _('Branch Code') . ':</td> + <td><select name="BranchCode">'; $sql = "SELECT branchcode FROM custbranch WHERE debtorno = '" . $_POST['Cust'] . "'"; $result = DB_query($sql,$db); @@ -457,78 +457,78 @@ if (isset($_POST['BranchCode']) and $myrow['branchcode'] == $_POST['BranchCode']){ - echo "<option selected value='" . $myrow['branchcode'] . "'>" . $myrow['branchcode']; + echo '<option selected value="' . $myrow['branchcode'] . '">' . $myrow['branchcode'] . '</option>'; } else { - echo "<option Value='" . $myrow['branchcode'] . "'>" . $myrow['branchcode']; + echo '<option Value="' . $myrow['branchcode'] . '">' . $myrow['branchcode'] . '</option>'; } } -echo '<tr><td>' . _('Reports Page Size') .":</td> - <td><select name='PageSize'>"; +echo '<tr><td>' . _('Reports Page Size') .':</td> + <td><select name="PageSize">'; if(isset($_POST['PageSize']) and $_POST['PageSize']=='A4'){ - echo "<option selected value='A4'>" . _('A4'); + echo '<option selected value="A4">' . _('A4') . '</option>'; } else { - echo "<option value='A4'>A4"; + echo '<option value="A4">A4' . '</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='A3'){ - echo "<option selected Value='A3'>" . _('A3'); + echo '<option selected Value="A3>' . _('A3') . '</option>'; } else { - echo "<option value='A3'>A3"; + echo '<option value="A3">A3' . '</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='A3_landscape'){ - echo "<option selected Value='A3_landscape'>" . _('A3') . ' ' . _('landscape'); + echo '<option selected Value="A3_landscape">' . _('A3') . ' ' . _('landscape') . '</option>'; } else { - echo "<option value='A3_landscape'>" . _('A3') . ' ' . _('landscape'); + echo '<option value="A3_landscape">' . _('A3') . ' ' . _('landscape') . '</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='letter'){ - echo "<option selected Value='letter'>" . _('Letter'); + echo '<option selected Value="letter">' . _('Letter') . '</option>'; } else { - echo "<option value='letter'>" . _('Letter'); + echo '<option value="letter">' . _('Letter') . '</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='letter_landscape'){ - echo "<option selected Value='letter_landscape'>" . _('Letter') . ' ' . _('landscape'); + echo '<option selected Value="letter_landscape">' . _('Letter') . ' ' . _('landscape') . '</option>'; } else { - echo "<option value='letter_landscape'>" . _('Letter') . ' ' . _('landscape'); + echo '<option value="letter_landscape">' . _('Letter') . ' ' . _('landscape') . '</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='legal'){ - echo "<option selected value='legal'>" . _('Legal'); + echo '<option selected value="legal">' . _('Legal') . '</option>'; } else { - echo "<option Value='legal'>" . _('Legal'); + echo '<option Value="legal">' . _('Legal') . '</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='legal_landscape'){ - echo "<option selected value='legal_landscape'>" . _('Legal') . ' ' . _('landscape'); + echo '<option selected value="legal_landscape">' . _('Legal') . ' ' . _('landscape') . '</option>'; } else { - echo "<option value='legal_landscape'>" . _('Legal') . ' ' . _('landscape'); + echo '<option value="legal_landscape">' . _('Legal') . ' ' . _('landscape') . '</option>'; } echo '</select></td></tr>'; echo '<tr> - <td>' . _('Theme') . ":</td> - <td><select name='Theme'>"; + <td>' . _('Theme') . ':</td> + <td><select name="Theme">'; $ThemeDirectory = dir('css/'); while (false != ($ThemeName = $ThemeDirectory->read())){ - if (is_dir("css/$ThemeName") AND $ThemeName != '.' AND $ThemeName != '..' AND $ThemeName != 'CVS'){ + if (is_dir('css/'.$ThemeName) AND $ThemeName != '.' AND $ThemeName != '..' AND $ThemeName != 'CVS'){ if (isset($_POST['Theme']) and $_POST['Theme'] == $ThemeName){ - echo "<option selected value='$ThemeName'>$ThemeName"; + echo '<option selected value="'.$ThemeName.'">'.$ThemeName . '</option>'; } else if (!isset($_POST['Theme']) and ($_SESSION['DefaultTheme']==$ThemeName)) { - echo "<option selected value='$ThemeName'>$ThemeName"; + echo '<option selected value="'.$ThemeName.'">'.$ThemeName . '</option>'; } else { - echo "<option value='$ThemeName'>$ThemeName"; + echo '<option value="'.$ThemeName.'">'.$ThemeName . '</option>'; } } } @@ -537,8 +537,8 @@ echo '<tr> - <td>' . _('Language') . ":</td> - <td><select name='UserLanguage'>"; + <td>' . _('Language') . ':</td> + <td><select name="UserLanguage">'; $LangDirHandle = dir('locale/'); @@ -548,11 +548,11 @@ if (is_dir('locale/' . $LanguageEntry) AND $LanguageEntry != '..' AND $LanguageEntry != 'CVS' AND $LanguageEntry!='.'){ if (isset($_POST['UserLanguage']) and $_POST['UserLanguage'] == $LanguageEntry){ - echo "<option selected value='$LanguageEntry'>$LanguageEntry"; + echo '<option selected value="'.$LanguageEntry.'">$LanguageEntry' . '</option>'; } elseif (!isset($_POST['UserLanguage']) and $LanguageEntry == $DefaultLanguage) { - echo "<option selected value='$LanguageEntry'>$LanguageEntry"; + echo '<option selected value="'.$LanguageEntry.'">$LanguageEntry' . '</option>'; } else { - echo "<option value='$LanguageEntry'>$LanguageEntry"; + echo '<option value="'.$LanguageEntry.'">$LanguageEntry' . '</option>'; } } } @@ -566,31 +566,31 @@ $i=0; foreach($ModuleList as $ModuleName){ - echo '<tr><td>' . _('Display') . ' ' . $ModuleName . ' ' . _('options') . ": </td><td><select name='Module_" . $i . "'>"; + echo '<tr><td>' . _('Display') . ' ' . $ModuleName . ' ' . _('options') . ': </td><td><select name="Module_' . $i . '">'; if ($ModulesAllowed[$i]==0){ - echo '<option selected value=0>' . _('No'); - echo '<option value=1>' . _('Yes'); + echo '<option selected value=0>' . _('No') . '</option>'; + echo '<option value=1>' . _('Yes') . '</option>'; } else { - echo '<option selected value=1>' . _('Yes'); - echo '<option value=0>' . _('No'); + echo '<option selected value=1>' . _('Yes') . '</option>'; + echo '<option value=0>' . _('No') . '</option>'; } echo '</select></td></tr>'; $i++; } -echo '<tr><td>' . _('Account Status') . ":</td><td><select name='Blocked'>"; +echo '<tr><td>' . _('Account Status') . ':</td><td><select name="Blocked">'; if ($_POST['Blocked']==0){ - echo '<option selected value=0>' . _('Open'); - echo '<option value=1>' . _('Blocked'); + echo '<option selected value=0>' . _('Open') . '</option>'; + echo '<option value=1>' . _('Blocked') . '</option>'; } else { - echo '<option selected value=1>' . _('Blocked'); - echo '<option value=0>' . _('Open'); + echo '<option selected value=1>' . _('Blocked') . '</option>'; + echo '<option value=0>' . _('Open') . '</option>'; } echo '</select></td></tr>'; -echo "</table><br> - <div class='centre'><input type='submit' name='submit' value='" . _('Enter Information') . "'></div></form>"; +echo '</table><br> + <div class="centre"><input type="submit" name="submit" value="' . _('Enter Information') . '"></div></form>'; if (isset($_GET['SelectedUser'])) { echo '<script type="text/javascript">defaultControl(document.forms[0].Password);</script>'; @@ -600,4 +600,4 @@ include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/CustWhereAlloc.php =================================================================== --- trunk/CustWhereAlloc.php 2011-04-18 07:36:59 UTC (rev 5199) +++ trunk/CustWhereAlloc.php 2011-04-18 07:38:09 UTC (rev 5200) @@ -7,7 +7,7 @@ $title = _('Customer How Paid Inquiry'); include('includes/header.inc'); -echo "<form action='" . $_SERVER['PHP_SELF'] . "' method=post>"; +echo '<form action="' . $_SERVER['PHP_SELF'] . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . @@ -15,29 +15,29 @@ echo '<table class=selection cellpadding=2><tr>'; -echo '<td>' . _('Type') . ":</td><td><select tabindex=1 name='TransType'> "; +echo '<td>' . _('Type') . ':</td><td><select tabindex=1 name="TransType"> '; $sql = "SELECT typeid, typename FROM systypes WHERE typeid = 10 OR typeid=12"; $resultTypes = DB_query($sql,$db); while ($myrow=DB_fetch_array($resultTypes)){ if (isset($_POST['TransType'])){ if ($myrow['typeid'] == $_POST['TransType']){ - echo "<option selected Value='" . $myrow['typeid'] . "'>" . $myrow['typename']; + echo '<option selected Value="' . $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } else { - echo "<option Value='" . $myrow['typeid'] . "'>" . $myrow['typename']; + echo '<option Value="' . $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } } else { - echo "<option Value='" . $myrow['typeid'] . "'>" . $myrow['typename']; + echo '<option Value="' . $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } } echo '</select></td>'; if (!isset($_POST['TransNo'])) {$_POST['TransNo']='';} -echo '<td>'._('Transaction Number').":</td> - <td><input tabindex=2 type=text name='TransNo' maxlength=10 size=10 value=". $_POST['TransNo'] . '></td>'; +echo '<td>'._('Transaction Number') . ':</td> + <td><input tabindex=2 type=text name="TransNo" maxlength=10 size=10 value="'. $_POST['TransNo'] . '"></td>'; -echo "</tr></table><br> - <div class='centre'><input tabindex=3 type=submit name='ShowResults' value="._('Show How Allocated').'></div>'; +echo '</tr></table><br> + <div class="centre"><input tabindex=3 type=submit name="ShowResults" value="'._('Show How Allocated').'"></div>'; if (isset($_POST['ShowResults']) AND $_POST['TransNo']==''){ echo '<br>'; @@ -84,12 +84,12 @@ echo '<tr><th colspan=6><div class="centre"><font size=3 color=blue><b>'._('Allocations made against invoice number') . ' ' . $_POST['TransNo'] . '<br>'._('Transaction Total').': '. number_format($myrow['totamt'],2) . '</font></b></div></th></tr>'; - $tableheader = "<tr><th>"._('Type')."</th> - <th>"._('Number')."</th> - <th>"._('Reference')."</th> - <th>"._('Ex Rate')."</th> - <th>"._('Amount')."</th> - <th>"._('Alloc').'</th> + $tableheader = '<tr><th>'._('Type').'</th> + <th>'._('Number').'</th> + <th>'._('Reference').'</th> + <th>'._('Ex Rate').'</th> + <th>'._('Amount').'</th> + <th>'._('Alloc').'</th> </tr>'; echo $tableheader; @@ -112,13 +112,13 @@ } else { $TransType = _('Receipt'); } - echo "<td>".$TransType."</td> - <td>".$myrow['transno']."</td> - <td>".$myrow['reference']."</td> - <td>".$myrow['rate']."</td> - <td class=number>".number_format($myrow['totalamt'],2)."</td> - <td class=number>".number_format($myrow['amt'],2)."</td> - </tr>"; + echo '<td>'.$TransType.'</td> + <td>'.$myrow['transno'].'</td> + <td>'.$myrow['reference'].'</td> + <td>'.$myrow['rate'].'</td> + <td class=number>'.number_format($myrow['totalamt'],2).'</td> + <td class=number>'.number_format($myrow['amt'],2).'</td> + </tr>'; $RowCounter++; If ($RowCounter == 12){ Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-04-18 07:36:59 UTC (rev 5199) +++ trunk/CustomerBranches.php 2011-04-18 07:38:09 UTC (rev 5200) @@ -54,7 +54,7 @@ if (ContainsIllegalCharacters($_POST['BranchCode']) OR strstr($_POST['BranchCode'],' ')) { $InputError = 1; - prnMsg(_('The Branch code cannot contain a space or any of the following characters')." + ' \ & or \"",'error'); + prnMsg(_('The Branch code cannot contain a space or any of the illegal characters'),'error'); $Errors[$i] = 'BranchCode'; $i++; } @@ -107,8 +107,8 @@ define("KEY", $api_key); if ($map_host=="") { // check that some sane values are setup already in geocode tables, if not skip the geocoding but add the record anyway. - echo '<div class="warn">' . _('Warning - Geocode Integration is enabled, but no hosts are setup. Go to Geocode Setup') . '</div>'; - } else { + echo '<div class="warn">' . _('Warning - Geocode Integration is enabled, but no hosts are setup. Go to Geocode Setup') . '</div>'; + } else { $address = $_POST["BrAddress1"] . ", " . $_POST["BrAddress2"] . ", " . $_POST["BrAddress3"] . ", " . $_POST["BrAddress4"]; @@ -117,27 +117,27 @@ $xml = simplexml_load_string(utf8_encode(file_get_contents($request_url))) or die("url not loading"); // $xml = simplexml_load_file($request_url) or die("url not loading"); - $coordinates = $xml->Response->Placemark->Point->coordinates; - $coordinatesSplit = explode(",", $coordinates); - // Format: Longitude, Latitude, Altitude - $latitude = $coordinatesSplit[1]; - $longitude = $coordinatesSplit[0]; + $coordinates = $xml->Response->Placemark->Point->coordinates; + $coordinatesSplit = explode(",", $coordinates); + // Format: Longitude, Latitude, Altitude + $latitude = $coordinatesSplit[1]; + $longitude = $coordinatesSplit[0]; - $status = $xml->Response->Status->code; - if (strcmp($status, "200") == 0) { - // Successful geocode - $geocode_pending = false; - $coordinates = $xml->Response->Placemark->Point->coordinates; - $coordinatesSplit = explode(",", $coordinates); - // Format: Longitude, Latitude, Altitude - $latitude = $coordinatesSplit[1]; - $longitude = $coordinatesSplit[0]; - } else { - // failure to geocode - $geocode_pending = false; - echo '<div class="page_help_text"><b>Geocode Notice:</b> Address: ' . $address . ' failed to geocode. '; - echo 'Received status ' . $status . '</div>'; - } + $status = $xml->Response->Status->code; + if (strcmp($status, "200") == 0) { + // Successful geocode + $geocode_pending = false; + $coordinates = $xml->Response->Placemark->Point->coordinates; + $coordinatesSplit = explode(",", $coordinates); + // Format: Longitude, Latitude, Altitude + $latitude = $coordinatesSplit[1]; + $longitude = $coordinatesSplit[0]; + } else { + // failure to geocode + $geocode_pending = false; + echo '<div class="page_help_text"><b>Geocode Notice:</b> Address: ' . $address . ' failed to geocode. '; + echo 'Received status ' . $status . '</div>'; + } } } if (isset($SelectedBranch) AND $InputError !=1) { @@ -180,7 +180,7 @@ /*Selected branch is null cos no item selected on first time round so must be adding a record must be submitting new entries in the new Customer Branches form */ $SelectedBranch=$_POST['BranchCode']; - $sql = "INSERT INTO custbranch (branchcode, + $sql = "INSERT INTO custbranch (branchcode, debtorno, brname, braddress1, @@ -289,7 +289,7 @@ unset($_POST['CustBranchCode']); unset($_POST['DeliverBlind']); unset($SelectedBranch); - } + } } else if (isset($_GET['delete'])) { //the link to delete a selected record was clicked instead of the submit button @@ -330,12 +330,12 @@ if ($myrow[0]>0) { prnMsg(_('Cannot delete this branch because users exist that refer to it') . '. ' . _('Purge old users first'),'warn'); - echo '<br>'._('There are').' ' . $myrow[0] . ' '._('users referring to this Branch/customer'); + echo '<br>'._('There are').' ' . $myrow[0] . ' '._('users referring to this Branch/customer'); } else { $sql="DELETE FROM custbranch WHERE branchcode='" . $SelectedBranch . "' AND debtorno='" . $DebtorNo . "'"; $ErrMsg = _('The branch record could not be deleted') . ' - ' . _('the SQL server returned the following message'); - $result = DB_query($sql,$db,$ErrMsg); + $result = DB_query($sql,$db,$ErrMsg); if (DB_error_no($db)==0){ prnMsg(_('Branch Deleted'),'success'); } @@ -380,16 +380,16 @@ echo '<p Class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Branches defined for'). ' '. $DebtorNo . ' - ' . $myrow[0] . '</p>'; echo '<table class=selection>'; - echo "<tr><th>"._('Code')."</th> - <th>"._('Name')."</th> - <th>"._('Branch Contact')."</th> - <th>"._('Salesman')."</th> - <th>"._('Area')."</th> - <th>"._('Phone No')."</th> - <th>"._('Fax No')."</th> - <th>"._('Email')."</th> - <th>"._('Tax Group')."</th> - <th>"._('Enabled?')."</th></tr>"; + echo '<tr><th>'._('Code').'</th> + <th>'._('Name').'</th> + <th>'._('Branch Contact').'</th> + <th>'._('Salesman').'</th> + <th>'._('Area').'</th> + <th>'._('Phone No').'</th> + <th>'._('Fax No').'</th> + <th>'._('Email').'</th> + <th>'._('Tax Group').'</th> + <th>'._('Enabled?').'</th></tr>'; $k=0; do { if ($k==1){ @@ -401,19 +401,19 @@ } - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> - <td><a href='Mailto:%s'>%s</a></td> + <td><a href="Mailto:%s">%s</a></td> <td>%s</td> <td>%s</td> - <td><a href='%s?DebtorNo=%s&SelectedBranch=%s'>%s</td> - <td><a href='%s?DebtorNo=%s&SelectedBranch=%s&delete=yes' onclick=\"return confirm('" . - _('Are you sure you wish to delete this branch?') . "');\">%s</td></tr>", + <td><a href="%s?DebtorNo=%s&SelectedBranch=%s">%s</td> + <td><a href="%s?DebtorNo=%s&SelectedBranch=%s&delete=yes" onclick=\'return confirm("' . + _('Are you sure you wish to delete this branch?') . '");\'>%s</td></tr>', $myrow[10], $myrow[2], $myrow[5], @@ -469,7 +469,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($SelectedBranch)) { @@ -539,17 +539,17 @@ $_POST['DeliverBlind'] = $myrow['deliverblind']; } - echo "<input type=hidden name='SelectedBranch' VALUE='" . $SelectedBranch . "'>"; - echo "<input type=hidden name='BranchCode' VALUE='" . $_POST['BranchCode'] . "'>"; + echo '<input type=hidden name="SelectedBranch" VALUE="' . $SelectedBranch . '">'; + echo '<input type=hidden name="BranchCode" VALUE="' . $_POST['BranchCode'] . '">'; echo '<p Class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . _('Change Details for Branch'). ' '. $SelectedBranch . '</p>'; if (isset($SelectedBranch)) { - echo '<div class="centre"><a href=' . $_SERVER['PHP_SELF'] . '?' . SID . 'DebtorNo=' . $DebtorNo. '>' . _('Show all branches defined for'). ' '. $DebtorNo . '</a></div>'; + echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '?DebtorNo=' . $DebtorNo. '">' . _('Show all branches defined for'). ' '. $DebtorNo . '</a></div>'; } - echo "<br><table class=selection>"; - echo "<tr><th colspan=2><div class='centre'><b>"._('Change Branch')."</b></th></tr>"; - echo "<tr><td>"._('Branch Code').':</td><td>'; + echo '<br><table class=selection>'; + echo '<tr><th colspan=2><div class="centre"><b>'._('Change Branch').'</b></th></tr>'; + echo '<tr><td>'._('Branch Code').':</td><td>'; echo $_POST['BranchCode'] . '</td></tr>'; } else { //end of if $SelectedBranch only do the else when a new record is being entered @@ -571,12 +571,12 @@ $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); $_POST['BranchCode'] = $_GET['BranchCode']; - $_POST['BrName'] = $myrow['name']; + $_POST['BrName'] = $myrow['name']; $_POST['BrAddress1'] = $myrow['addrsss1']; - $_POST['BrAddress2'] = $myrow['addrsss2']; + $_POST['BrAddress2'] = $myrow['addrsss2']; $_POST['BrAddress3'] = $myrow['addrsss3']; $_POST['BrAddress4'] = $myrow['addrsss4']; - $_POST['BrAddress5'] = $myrow['addrsss5']; + $_POST['BrAddress5'] = $myrow['addrsss5']; $_POST['BrAddress6'] = $myrow['addrsss6']; } if (!isset($_POST['BranchCode'])) { @@ -585,7 +585,7 @@ echo '<p Class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . _('Add a Branch').'</p>'; echo '<table class=selection><tr><td>'._('Branch Code'). ':</td> <td><input ' .(in_array('BranchCode',$Errors) ? 'class="inputerror"' : '' ) . - " tabindex=1 type='Text' name='BranchCode' size=12 maxlength=10 value=" . $_POST['BranchCode'] . '></td></tr>'; + ' tabindex=1 type="Text" name="BranchCode" size=12 maxlength=10 value="' . $_POST['BranchCode'] . '"></td></tr>'; $_POST['DeliverBlind'] = $_SESSION['DefaultBlindPackNote']; } @@ -644,12 +644,10 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['Salesman']) and $myrow['salesmancode']==$_POST['Salesman']) { - echo '<option selected VALUE='; + echo '<option selected VALUE="'.$myrow['salesmancode'] . '">' . $myrow['salesmanname'] . '</option>'; } else { - echo '<option VALUE='; + echo '<option VALUE="'.$myrow['salesmancode'] . '">' . $myrow['salesmanname'] . '</option>'; } - echo $myrow['salesmancode'] . '>' . $myrow['salesmanname']; - } //end while loop echo '</select></td></tr>'; @@ -661,7 +659,7 @@ if (DB_num_rows($result)==0){ echo '</table>'; prnMsg(_('There are no areas defined as yet') . ' - ' . _('customer branches must be allocated to an area') . '. ' . _('Please use the link below to define at least one sales area'),'error'); - echo "<br><a href='$rootpath/Areas.php?" . SID . "'>"._('Define Sales Areas').'</a>'; + echo '<br><a href="'.$rootpath.'/Areas.php?">'._('Define Sales Areas').'</a>'; include('includes/footer.inc'); exit; } @@ -670,12 +668,10 @@ echo '<td><select tabindex=14 name="Area">'; while ($myrow = DB_fetch_array($result)) { if (isset($_POST['Area']) and $myrow['areacode']==$_POST['Area']) { - echo '<option selected VALUE='; + echo '<option selected VALUE="'.$myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; } else { - echo '<option VALUE='; + echo '<option VALUE="'.$myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; } - echo $myrow['areacode'] . '>' . $myrow['areadescription']; - } //end while loop @@ -688,7 +684,7 @@ if (DB_num_rows($result)==0){ echo '</table>'; prnMsg(_('There are no stock locations defined as yet') . ' - ' . _('customer branches must refer to a default location where stock is normally drawn from') . '. ' . _('Please use the link below to define at least one stock location'),'error'); - echo "<br><a href='$rootpath/Locations.php?" . SID . "'>"._('Define Stock Locations').'</a>'; + echo '<br><a href="'.$rootpath.'/Locations.php?">'._('Define Stock Locations').'</a>'; include('includes/footer.inc'); exit; } @@ -698,12 +694,10 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['DefaultLocation']) and $myrow['loccode']==$_POST['DefaultLocation']) { - echo '<option selected VALUE='; + echo '<option selected VALUE="'.$myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option VALUE='; + echo '<option VALUE="'.$myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } - echo $myrow['loccode'] . '>' . $myrow['locationname']; - } //end while loop echo '</select></td></tr>'; @@ -741,7 +735,7 @@ if (!isset($_POST['Email'])) {$_POST['Email']='';} echo '<tr><td>'.(($_POST['Email']) ? '<a href="Mailto:'.$_POST['Email'].'">'._('Email').':</a>' : _('Email').':').'</td>'; - //only display email link if there is an email address + //only display email link if there is an email address echo '<td><input tabindex=18 type="Text" name="Email" size=56 maxlength=55 value="'. $_POST['Email'].'"></td></tr>'; echo '<tr><td>'._('Tax Group').':</td>'; @@ -754,34 +748,34 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['TaxGroup']) and $myrow['taxgroupid']==$_POST['TaxGroup']) { - echo '<option selected VALUE='; + echo '<option selected VALUE="'. $myrow['taxgroupid'] . '">' . $myrow['taxgroupdescription'] . '</option>'; } else { - echo '<option VALUE='; + echo '<option VALUE="'. $myrow['taxgroupid'] . '">' . $myrow['taxgroupdescription'] . '</option>'; } - echo $myrow['taxgroupid'] . '>' . $myrow['taxgroupdescription']; + ; } //end while loop echo '</select></td></tr>'; - echo '<tr><td>'._('Transactions on this branch').":</td><td><select tabindex=20 name='DisableTrans'>"; + echo '<tr><td>'._('Transactions on this branch').':</td><td><select tabindex=20 name="DisableTrans">'; if ($_POST['DisableTrans']==0){ - echo '<option selected VALUE=0>' . _('Enabled'); - echo '<option VALUE=1>' . _('Disabled'); + echo '<option selected VALUE=0>' . _('Enabled') . '</option>'; + echo '<option VALUE=1>' . _('Disabled') . '</option>'; } else { - echo '<option selected VALUE=1>' . _('Disabled'); - echo '<option VALUE=0>' . _('Enabled'); + echo '<option selected VALUE=1>' . _('Disabled') . '</option>'; + echo '<option VALUE=0>' . _('Enabled') . '</option>'; } echo ' </select></td></tr>'; - echo '<tr><td>'._('Default freight/shipper method').":</td><td><select tabindex=21 name='DefaultShipVia'>"; + echo '<tr><td>'._('Default freight/shipper method').':</td><td><select tabindex=21 name="DefaultShipVia">'; $SQL = "SELECT shipper_id, shippername FROM shippers"; $ShipperResults = DB_query($SQL,$db); while ($myrow=DB_fetch_array($ShipperResults)){ if (isset($_POST['DefaultShipVia'])and $myrow['shipper_id']==$_POST['DefaultShipVia']){ - echo '<option selected VALUE=' . $myrow['shipper_id'] . '>' . $myrow['shippername']; + echo '<option selected VALUE=' . $myrow['shipper_id'] . '>' . $myrow['shippername'] . '</option>'; }else { - echo '<option VALUE=' . $myrow['shipper_id'] . '>' . $myrow['shippername']; + echo '<option VALUE=' . $myrow['shipper_id'] . '>' . $myrow['shippername'] . '</option>'; } } @@ -790,22 +784,21 @@ /* This field is a default value that will be used to set the value on the sales order which will control whether or not to display the company logo and address on the packlist */ - echo '<tr><td>' . _('Default Packlist') . ":</td><td><select tabindex=22 name='DeliverBlind'>"; - for ($p = 1; $p <= 2; $p++) { - echo '<option VALUE=' . $p; - if ($p == $_POST['DeliverBlind']) { - echo ' selected>'; - } else { - echo '>'; - } - switch ($p) { - case 1: - echo _('Show company details and logo'); break; - case 2: - echo _('Hide company details and logo'); break; - } - } - echo '</select></td></tr>'; + echo '<tr><td>' . _('Default Packlist') . ':</td><td><select tabindex=22 name="DeliverBlind">'; + for ($p = 1; $p <= 2; $p++) { + if ($p == $_POST['DeliverBlind']) { + echo '<option VALUE=' . $p . ' selected>'; + } else { + echo '<option VALUE=' . $p . '>'; + } + switch ($p) { + case 1: + echo _('Show company details and logo') . '</option>'; break; + case 2: + echo _('Hide company details and logo') . '</option>'; break; + } + } + echo '</select></td></tr>'; echo '<tr><td>'._('Postal Address 1 (Street)').':</td>'; if (!isset($_POST['BrPostAddr1'])) {$_POST['BrPostAddr1']='';} @@ -829,4 +822,4 @@ } //end if record deleted no point displaying form to add record include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-04-18 07:36:59 UTC (rev 5199) +++ trunk/CustomerReceipt.php 2011-04-18 07:38:09 UTC (rev 5200) @@ -232,8 +232,8 @@ echo '<table class=selection><tr><th>'._('Batch Number').'</th> <th>'._('Date Banked').'</th> - <th>'._('Customer Name').'</th - <th>'._('GL Code').'</th + <th>'._('Customer Name').'</th> + <th>'._('GL Code').'</th> <th>'._('Amount of Receipt').'</th></tr>'; foreach ($_SESSION['ReceiptBatch']->Items as $ReceiptItem) { @@ -1051,8 +1051,9 @@ $k=1; } - printf("<td><font size=1><input tabindex=".number_format(12+$j)." type=submit name='Select' value='%s'</font></td> - <td>%s</td></tr>", + printf('<td><font size=1> + <input tabindex='.number_format(12+$j).' type=submit name="Select" value="%s"></font></td> + <td>%s</td></tr>', $myrow['debtorno'], $myrow['name']); Modified: trunk/CustomerTypes.php =================================================================== --- trunk/CustomerTypes.php 2011-04-18 07:36:59 UTC (rev 5199) +++ trunk/CustomerTypes.php 2011-04-18 07:38:09 UTC (rev 5200) @@ -183,10 +183,10 @@ $result = DB_query($sql,$db); echo '<br><table class=selection>'; - echo "<tr> - <th>" . _('Type ID') . "</th> - <th>" . _('Type Name') . "</th> - </tr>"; + echo '<tr> + <th>' . _('Type ID') . '</th> + <th>' . _('Type Name') . '</th> + </tr>'; $k=0; //row colour counter @@ -199,12 +199,12 @@ $k=1; } - printf(" + printf(' <td>%s</td> <td>%s</td> - <td><a href='%sSelectedType=%s'>" . _('Edit') . "</td> - <td><a href='%sSelectedType=%s&delete=yes' onclick=\"return confirm('" . _('Are you sure you wish to delete this Customer Type?') . "');\">" . _('Delete') . "</td> - </tr>", + <td><a href="%sSelectedType=%s">' . _('Edit') . '</td> + <td><a href="%sSelectedType=%s&delete=yes" onclick=\'return confirm("' . _('Are you sure you wish to delete this Customer Type?') . '");\'>' . _('Delete') . '</td> + </tr>', $myrow[0], $myrow[1], $_SERVER['PHP_SELF'] . '?' . SID, $myrow[0], @@ -217,11 +217,11 @@ //end of ifs and buts! if (isset($SelectedType)) { - echo '<div class="centre"><p><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '">' . _('Show All Types Defined') . '</a></div><p>'; + echo '<div class="centre"><p><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Show All Types 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 @@ -241,9 +241,9 @@ $_POST['typeid'] = $myrow['typeid']; $_POST['typename'] = $myrow['typename']; - echo "<input type=hidden name='SelectedType' VALUE=" . $SelectedType . ">"; - echo "<input type=hidden name='typeid' VALUE=" . $_POST['typeid'] . ">"; - echo "<table class=selection> <tr><td>"; + echo '<input type=hidden name="SelectedType" VALUE="' . $SelectedType . '">'; + echo '<input type=hidden name="typeid" VALUE=' . $_POST['typeid'] . '">'; + echo '<table class=selection> <tr><td>'; // We dont allow the user to change an existing type code @@ -253,14 +253,14 @@ // This is a new type so the user may volunteer a type code - echo "<table class=selection>"; + echo '<table class=selection>'; } if (!isset($_POST['typename'])) { $_POST['typename']=''; } - echo "<tr><td>" . _('Type Name') . ":</td><td><input type='Text' name='typename' value='" . $_POST['typename'] . "'></td></tr>"; + echo '<tr><td>' . _('Type Name') . ':</td><td><input type="Text" name="typename" value="' . $_POST['typename'] . '"></td></tr>'; echo '</td></tr></table>'; // close main table @@ -272,4 +272,4 @@ include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-04-18 07:36:59 UTC (rev 5199) +++ trunk/Customers.php 2011-04-18 07:38:09 UTC (rev 5200) @@ -50,7 +50,7 @@ $i++; } elseif ($_SESSION['AutoDebtorNo']==0 AND (ContainsIllegalCharacters($_POST['DebtorNo']) OR strpos($_POST['DebtorNo'], ' '))) { $InputError = 1; - prnMsg( _('The customer code cannot contain any of the following characters') . " . - ' & + \" " . _('or a space'),'error'); + prnMsg( _('The customer code cannot contain any of the illefal characters') ,'error'); $Errors[$i] = 'DebtorNo'; $i++; } elseif (strlen($_POST['Address1']) >40) { @@ -285,7 +285,7 @@ echo '<div class="centre">' . _('You should automatically be forwarded to the entry of a new Customer Branch page') . '. ' . _('If this does not happen') .' (' . _('if the browser does not support META Refresh') . ') ' . - "<a href='" . $rootpath . "/CustomerBranches.php?" . SID . "&DebtorNo=" . $_POST['DebtorNo'] . '.</div>'; + '<a href="' . $rootpath . '/CustomerBranches.php?DebtorNo=' . $_POST['DebtorNo'] . '"></a></div>'; include('includes/footer.inc'); exit; @@ -443,10 +443,10 @@ exit; } - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '>'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo "<input type='Hidden' name='New' value='Yes'>"; + echo '<input type="Hidden" name="New" value="Yes">'; $DataError =0; @@ -455,7 +455,7 @@ /* if $AutoDebtorNo in config.php has not been set or if it has been set to a number less than one, then provide an input box for the DebtorNo to manually assigned */ if ($_SESSION['AutoDebtorNo']==0) { - echo '<tr><td>' . _('Customer Code') . ":</td><td><input tabindex=1 type='Text' name='DebtorNo' size=11 maxlength=10></td></tr>"; + echo '<tr><td>' . _('Customer Code') . ':</td><td><input tabindex=1 type="Text" name="DebtorNo" size=11 maxlength=10></td></tr>'; } echo '<tr><td>' . _('Customer Name') . ':</td> @@ -526,8 +526,8 @@ <td><input tabindex=13 type="textbox" class ="number" name="PymtDiscount" value=0 size=5 maxlength=4></td></tr>'; echo '<tr><td>' . _('Credit Limit') . ':</td> <td><input tabindex=14 type="text" class="number" name="CreditLimit" value=' . $_SESSION['DefaultCreditLimit'] . ' size=16 maxlength=14></td></tr>'; - echo '<tr><td>' . _('Tax Reference') . ":</td> - <td><input tabindex=15 type='Text' name='TaxRef' size=22 maxlength=20></td></tr>"; + echo '<tr><td>' . _('Tax Reference') . ':</td> + <td><input tabindex=15 type="Text" name="TaxRef" size=22 maxlength=20></td></tr>'; $result=DB_query("SELECT terms, termsindicator FROM paymentterms",$db); if (DB_num_rows($result)==0){ @@ -594,7 +594,8 @@ echo'</table></td></tr></table>'; if ($DataError ==0){ - echo "<br /><div class='centre'><input tabindex=20 type='Submit' name='submit' value='" . _('Add New Customer') . "'> <input tabindex=21 type=submit action=RESET VALUE='" . _('Reset') . "'></div>"; + echo '<br /><div class="centre"><input tabindex=20 type="Submit" name="submit" value="' . _('Add New Customer') . + '"> <input tabindex=21 type=submit action=RESET VALUE="' . _('Reset') . '"></div>'; } echo '</form>'; @@ -602,7 +603,7 @@ //DebtorNo exists - either passed when calling the form or from the form itself - 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 '<table class=selection cellspacing=4><tr><td valign=top><table class=selection>'; @@ -643,8 +644,8 @@ /* if $AutoDebtorNo in config.php has not been set or if it has been set to a number less than one, then display the DebtorNo */ if ($_SESSION['AutoDebtorNo']== 0 ) { - echo '<tr><td>' . _('Customer Code') . ":</td> - <td>" . $DebtorNo. "</td></tr>"; + echo '<tr><td>' . _('Customer Code') . ':</td> + <td>' . $DebtorNo. '</td></tr>'; } $_POST['CustName'] = $myrow['name']; $_POST['Address1'] = $myrow['address1']; @@ -725,13 +726,13 @@ echo '<tr><td>' . _('Sales Type') . ":</td><td>".$myrow['sales_type']."</td></tr>"; } else { $result=DB_query("SELECT typeabbrev, sales_type FROM salestypes",$db); - echo '<tr><td>' . _('Sales Type') . '/' . _('Price List') . ":</td> - <td><select name='SalesType'>"; + echo '<tr><td>' . _('Sales Type') . '/' . _('Price List') . ':</td> + <td><select name="SalesType">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['SalesType']==$myrow['typeabbrev']){ - echo "<option selected value='". $myrow['typeabbrev'] . "'>" . $myrow['sales_type']; + echo '<option selected value="'. $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; } else { - echo "<option value='". $myrow['typeabbrev'] . "'>" . $myrow['sales_type']; + echo '<option value="'. $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; } } //end while loop DB_data_seek($result,0); @@ -744,13 +745,13 @@ echo '<tr><td>' . _('Customer Type') . ":</td><td>".$myrow['typename']."</td></tr>"; } else { $result=DB_query("SELECT typeid, typename FROM debtortype ORDER BY typename",$db); - echo '<tr><td>' . _('Customer Type') . ":</td> - <td><select name='typeid'>"; + echo '<tr><td>' . _('Customer Type') . ':</td> + <td><select name="typeid">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['typeid']==$myrow['typeid']){ - echo "<option selected VALUE='". $myrow['typeid'] . "'>" . $myrow['typename']; + echo '<option selected VALUE="'. $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } else { - echo "<option VALUE='". $myrow['typeid'] . "'>" . $myrow['typename']; + echo '<option VALUE="'. $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } } //end while loop DB_data_seek($result,0); @@ -783,16 +784,16 @@ if (isset($_GET['Modify'])) { $result=DB_query("SELECT terms FROM paymentterms WHERE termsindicator='".$_POST['PaymentTerms']."'",$db); $myrow=DB_fetch_array($result); - echo '<tr><td>' . _('Payment Terms') . ":</td><td>".$myrow['terms']."</td></tr>"; + echo '<tr><td>' . _('Payment Terms') . ':</td><td>'.$myrow['terms'].'</td></tr>'; } else { $result=DB_query("SELECT terms, termsindicator FROM paymentterms",$db); - echo '<tr><td>' . _('Payment Terms') . ":</td> - <td><select name='PaymentTerms'>"; + echo '<tr><td>' . _('Payment Terms') . ':</td> + <td><select name="PaymentTerms">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['PaymentTerms']==$myrow['termsindicator']){ - echo "<option selected VALUE=". $myrow['termsindicator'] . '>' . $myrow['terms']; + echo '<option selected VALUE="'. $myrow['termsindicator'] . '">' . $myrow['terms'] . '</option>'; } else { - echo '<option VALUE='. $myrow['termsindicator'] . '>' . $myrow['terms']; + echo '<option VALUE='. $myrow['termsindicator'] . '">' . $myrow['terms'] . '</option>'; } } //end while loop DB_data_seek($result,0); @@ -805,13 +806,13 @@ echo '<tr><td>' . _('Credit Status') . ":</td><td>".$myrow['reasondescription']."</td></tr>"; } else { $result=DB_query("SELECT reasoncode, reasondescription FROM holdreasons",$db); - echo '<tr><td>' . _('Credit Status') . ":</td> - <td><select name='HoldReason'>"; + echo '<tr><td>' . _('Credit Status') . ':</td> + <td><select name="HoldReason">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['HoldReason']==$myrow['reasoncode']){ - echo '<option selected VALUE='. $myrow['reasoncode'] . '>' . $myrow['reasondescription']; + echo '<option selected VALUE='. $myrow['reasoncode'] . '">' . $myrow['reasondescription'] . '</option>'; } else { - echo '<option VALUE='. $myrow['reasoncode'] . '>' . $myrow['reasondescription']; + echo '<option VALUE='. $myrow['reasoncode'] . '">' . $myrow['reasondescription'] . '</option>'; } } //end while loop DB_data_seek($result,0); @@ -824,13 +825,13 @@ echo '<tr><td>' . _('Credit Status') . ":</td><td>".$myrow['currency']."</td></tr>"; } else { $result=DB_query("SELECT currency, currabrev FROM currencies",$db); - echo '<tr><td>' . _('Customers Currency') . ":</td> - <td><select name='CurrCode'>"; + echo '<tr><td>' . _('Customers Currency') . ':</td> + <td><select name="CurrCode">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['CurrCode']==$myrow['currabrev']){ - echo '<option selected value='. $myrow['currabrev'] . '>' . $myrow['currency']; + echo '<option selected value='. $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; } else { - echo '<option value='. $myrow['currabrev'] . '>' . $myrow['currency']; + echo '<option value='. $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; } } //end while loop DB_data_seek($result,0); @@ -839,38 +840,38 @@ /*added lines 8/23/2007 by Morris Kelly to get po line parameter Y/N*/ if (isset($_GET['Modify'])) { if ($_POST['CustomerPOLine']==0){ - echo '<tr><td>' . _('Credit Status') . ":</td><td>"._('No')."</td></tr>"; + echo '<tr><td>' . _('Credit Status') . ':</td><td>'._('No').'</td></tr>'; } else { - echo '<tr><td>' . _('Credit Status') . ":</td><td>"._('Yes')."</td></tr>"; + echo '<tr><td>' . _('Credit Status') . ':</td><td>'._('Yes').'</td></tr>'; } } else { - echo '<tr><td>' . _('Require Customer PO Line on SO') . ":</td> - <td><select name='CustomerPOLine'>"; + echo '<tr><td>' . _('Require Customer PO Line on SO') . ':</td> + <td><select name="CustomerPOLine">'; if ($_POST['CustomerPOLine']==0){ - echo '<option selected value=0>' . _('No'); - echo '<option value=1>' . _('Yes'); + echo '<option selected value=0>' . _('No') . '</option>'; + echo '<option value=1>' . _('Yes') . '</option>'; } else { - echo '<option value=0>' . _('No'); - echo '<option selected value=1>' . _('Yes'); + echo '<option value=0>' . _('No') . '</option>'; + echo '<option selected value=1>' . _('Yes') . '</option>'; } echo '</select></td></tr>'; } if (isset($_GET['Modify'])) { if ($_POST['CustomerPOLine']==0){ - echo '<tr><td>' . _('Invoice Addressing') . ":</td><td>"._('Address to HO')."</td></tr>"; + echo '<tr><td>' . _('Invoice Addressing') . ':</td><td>'._('Address to HO').'</td></tr>'; } else { - echo '<tr><td>' . _('Invoice Addressing') . ":</td><td>"._('Address to Branch')."</td></tr>"; + echo '<tr><td>' . _('Invoice Addressing') . ':</td><td>'._('Address to Branch').'</td></tr>'; } } else { - echo '<tr><td>' . _('Invoice Addressing') . ":</td> - <td><select name='AddrInvBranch'>"; + echo '<tr><td>' . _('Invoice Addressing') . ':</td> + <td><select name="AddrInvBranch">'; if ($_POST['InvAddrBranch']==0){ - echo '<option selected VALUE=0>' . _('Address to HO'); - echo '<option VALUE=1>' . _('Address to Branch'); + echo '<option selected VALUE=0>' . _('Address to HO') . '</option>'; + echo '<option VALUE=1>' . _('Address to Branch') . '</option>'; } else { - echo '<option VALUE=0>' . _('Address to HO'); - echo '<option selected VALUE=1>' . _('Address to Branch'); + echo '<option VALUE=0>' . _('Address to HO') . '</option>'; + echo '<option selected VALUE=1>' . _('Address to Branch') . '</option>'; } } @@ -941,7 +942,7 @@ }//END WHILE LIST LOOP echo '</table>'; // echo "<input type='Submit' name='addcontact' VALUE='" . _('ADD Contact') . "'>"; - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?'.SID.'&DebtorNo="'.$DebtorNo.'"&ID='.$ID.'&Edit'.$Edit.'>'; + echo '<form method="post" action=' . $_SERVER['PHP_SELF'] . '?DebtorNo="'.$DebtorNo.'"&ID='.$ID.'&Edit'.$Edit.'>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($Edit) and $Edit!='') { $SQLcustcontacts="SELECT * from custcontacts @@ -954,15 +955,15 @@ $_POST['phoneno']=$myrowcc['phoneno']; $_POST['notes']=$myrowcc['notes']; echo '<table class=selection>'; - echo "<tr> - <td>" . _('Name') . "</td><td><input type=text name='custname' value='".$_POST['custname']."'></td></tr><tr> - <td>" . _('Role') . "</td><td><input type=text name='role' value='".$_POST['role']."'></td></tr><tr> - <td>" . _('Phone no') . "</td><td><input type='text' name='phoneno' value='".$_POST['phoneno']."'></td></tr><tr> - <td>" . _('Notes') . "</td><td><textarea name='notes'>".$_POST['notes']."</textarea></td></tr> + echo '<tr> + <td>' . _('Name') . '</td><td><input type=text name="custname" value="'.$_POST['custname'].'"></td></tr><tr> + <td>' . _('Role') . '</td><td><input type=text name="role" value="'.$_POST['role'].'"></td></tr><tr> + <td>' . _('Phone no') . '</td><td><input type="text" name="phoneno" value="'.$_POST['phoneno'].'"></td></tr><tr> + <td>' . _('Notes') . '</td><td><textarea name="notes">'.$_POST['notes'].'</textarea></td></tr> <tr><td colspan=2><input type=submit name=update value=update></td></tr></table> - "; + '; - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?'.SID.'&DebtorNo="'.$DebtorNo.'"&ID"'.$ID.'">'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?DebtorNo='.$DebtorNo.'&ID'.$ID.'">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-04-18 07:39:02
|
Revision: 5201 http://weberp.svn.sourceforge.net/weberp/?rev=5201&view=rev Author: tim_schofield Date: 2011-04-18 07:38:56 +0000 (Mon, 18 Apr 2011) Log Message: ----------- New script to create new security tokens and edit existing ones Modified Paths: -------------- trunk/includes/session.inc trunk/index.php Added Paths: ----------- trunk/SecurityTokens.php trunk/sql/mysql/updates/81.php Added: trunk/SecurityTokens.php =================================================================== --- trunk/SecurityTokens.php (rev 0) +++ trunk/SecurityTokens.php 2011-04-18 07:38:56 UTC (rev 5201) @@ -0,0 +1,86 @@ +<?php + +/* $Id$*/ +//$PageSecurity = 10; +include('includes/session.inc'); +$title = _('Maintain Security Tokens'); + +include('includes/header.inc'); + +if (isset($_GET['SelectedToken'])) { + $sql="SELECT tokenid, tokenname FROM securitytokens where tokenid='".$_GET['SelectedToken']."'"; + $result= DB_query($sql,$db); + $myrow = DB_fetch_array($result,$db); + $ref=$myrow[0]; + $description=$myrow[1]; +} else if (!isset($_POST['TokenID'])){ + $description=''; + $_POST['TokenID']=''; + $_GET['SelectedToken']=''; +} else { + $description=$_POST['Description']; +} + +if (isset($_POST['submit'])) { + $TestSQL="SELECT tokenid FROM securitytokens WHERE tokenid='".$_POST['TokenID']."'"; + $TestResult=DB_query($TestSQL, $db); + if (DB_num_rows($TestResult)==0) { + $sql = "INSERT INTO securitytokens values('".$_POST['TokenID']."', '".$_POST['Description']."')"; + $result= DB_query($sql,$db); + unset($description); + unset($_POST['TokenID']); + } else { + prnMsg( _('This token ID has already been used. Please use a new one') , 'warn'); + } +} + +if (isset($_POST['update'])) { + $sql = "UPDATE securitytokens SET tokenname='".$_POST['Description']. + "' WHERE tokenid='".$_POST['TokenID']."'"; + $result= DB_query($sql,$db); + unset($description); + unset($_POST['TokenID']); +} +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . + _('Print') . '" alt="" />' . ' ' . $title . '</p>'; + +echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '" name="form">'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<br><table><tr>'; + + + +if (isset($_GET['Action']) and $_GET['Action']=='edit') { + echo '<td>'. _('Description') . '</td> + <td><input type="text" size=30 maxlength=30 name="Description" value="'.$description.'"></td><td> + <input type="hidden" name="TokenID" value="'.$_GET['SelectedToken'].'">'; + echo '<input type=Submit name=update value=' . _('Update') . '>'; +} else { + echo '<td>'._('Token ID') . '<td><input type="text" name="TokenID" value="'.$_POST['TokenID'].'"></td></tr> + <tr><td>'. _('Description') . '</td><td><input type="text" size=30 maxlength=30 name="Description" value="'.$description.'"></td><td>'; + echo '<input type=Submit name=submit value=' . _('Insert') . '>'; +} + +echo '</td></tr></table><p></p>'; + +echo '</form>'; + +echo '<table class=selection>'; +echo '<tr><th>'. _('Token ID') .'</th>'; +echo '<th>'. _('Description'). '</th>'; + +$sql="SELECT tokenid, tokenname FROM securitytokens ORDER BY tokenid"; +$result= DB_query($sql,$db); + +while ($myrow = DB_fetch_array($result,$db)){ + echo '<tr><td>'.$myrow[0].'</td><td>'.$myrow[1].'</td><td><a href="' . + $_SERVER['PHP_SELF'] . '?SelectedToken=' . $myrow[0] . '&Action=edit">' . _('Edit') . '</a></td></tr>'; +} + +echo '</table><p></p>'; + +echo "<script>defaultControl(document.form.description);</script>"; + +include('includes/footer.inc'); + +?> \ No newline at end of file Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2011-04-18 07:38:09 UTC (rev 5200) +++ trunk/includes/session.inc 2011-04-18 07:38:56 UTC (rev 5201) @@ -13,7 +13,7 @@ header('Location:' . $rootpath . '/install/index.php'); } include($PathPrefix . 'config.php'); -$DBVersion=80; +$DBVersion=81; if (isset($SessionSavePath)){ session_save_path($SessionSavePath); } Modified: trunk/index.php =================================================================== --- trunk/index.php 2011-04-18 07:38:09 UTC (rev 5200) +++ trunk/index.php 2011-04-18 07:38:56 UTC (rev 5201) @@ -980,6 +980,11 @@ </tr> <tr> <td class="menu_group_item"> + <?php echo '<p>• <a href="' . $rootpath . '/SecurityTokens.php?">' . _('Maintain Security Tokens') . '</a></p>'; ?> + </td> + </tr> + <tr> + <td class="menu_group_item"> <?php echo '<p>• <a href="' . $rootpath . '/WWW_Access.php?">' . _('Role Permissions') . '</a></p>'; ?> </td> </tr> Added: trunk/sql/mysql/updates/81.php =================================================================== --- trunk/sql/mysql/updates/81.php (rev 0) +++ trunk/sql/mysql/updates/81.php 2011-04-18 07:38:56 UTC (rev 5201) @@ -0,0 +1,10 @@ +<?php + +/* Include the new script for printing quotations in Portrait + */ + +InsertRecord('pagesecurity', array('script', 'security'), array('SecurityTokens.php',15), array('script', 'security'), array('SecurityTokens.php',15), $db); + +UpdateDBNo(81, $db); + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-04-18 07:39:48
|
Revision: 5202 http://weberp.svn.sourceforge.net/weberp/?rev=5202&view=rev Author: tim_schofield Date: 2011-04-18 07:39:42 +0000 (Mon, 18 Apr 2011) Log Message: ----------- Corrections to links quoting Modified Paths: -------------- trunk/FixedAssetItems.php trunk/GLTags.php trunk/PDFChequeListing.php trunk/PaymentMethods.php Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2011-04-18 07:38:56 UTC (rev 5201) +++ trunk/FixedAssetItems.php 2011-04-18 07:39:42 UTC (rev 5202) @@ -395,8 +395,8 @@ } /* end if delete asset */ $result = DB_Txn_Commit($db); -echo '<form name="AssetForm" enctype="multipart/form-data" method="post" action="' . $_SERVER['PHP_SELF'] . '?' .SID . - '"><table class=selection>'; +echo '<form name="AssetForm" enctype="multipart/form-data" method="post" action="' . $_SERVER['PHP_SELF'] . '">'; +echo '<table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (!isset($AssetID) or $AssetID=='') { Modified: trunk/GLTags.php =================================================================== --- trunk/GLTags.php 2011-04-18 07:38:56 UTC (rev 5201) +++ trunk/GLTags.php 2011-04-18 07:39:42 UTC (rev 5202) @@ -31,7 +31,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Print') . '" alt="" />' . ' ' . $title . '</p>'; -echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . ' name="form">'; +echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '" name="form">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br><table><tr>'; Modified: trunk/PDFChequeListing.php =================================================================== --- trunk/PDFChequeListing.php 2011-04-18 07:38:56 UTC (rev 5201) +++ trunk/PDFChequeListing.php 2011-04-18 07:39:42 UTC (rev 5202) @@ -33,7 +33,7 @@ prnMsg($msg,'error'); } - echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '>'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class=selection> <tr> Modified: trunk/PaymentMethods.php =================================================================== --- trunk/PaymentMethods.php 2011-04-18 07:38:56 UTC (rev 5201) +++ trunk/PaymentMethods.php 2011-04-18 07:39:42 UTC (rev 5202) @@ -226,7 +226,7 @@ if (! isset($_GET['delete'])) { - echo '<form method="post action="' . $_SERVER['PHP_SELF'] . '">'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedPaymentID)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-04-18 07:40:30
|
Revision: 5203 http://weberp.svn.sourceforge.net/weberp/?rev=5203&view=rev Author: tim_schofield Date: 2011-04-18 07:40:23 +0000 (Mon, 18 Apr 2011) Log Message: ----------- Sql errors corrected Modified Paths: -------------- trunk/PDFBankingSummary.php trunk/PDFOrderStatus.php trunk/PDFPeriodStockTransListing.php Modified: trunk/PDFBankingSummary.php =================================================================== --- trunk/PDFBankingSummary.php 2011-04-18 07:39:42 UTC (rev 5202) +++ trunk/PDFBankingSummary.php 2011-04-18 07:40:23 UTC (rev 5203) @@ -16,12 +16,12 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . $title . '" alt="" />' . ' ' . $title . '</p>'; - $sql='SELECT DISTINCT + $sql="SELECT DISTINCT transno, transdate FROM banktrans WHERE type=12 - ORDER BY transno DESC'; + ORDER BY transno DESC"; $result=DB_query($sql, $db); echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '"><table class=selection>'; @@ -75,8 +75,8 @@ $BankActName = $myrow['bankaccountname']; $BankActNumber = $myrow['bankaccountnumber']; $BankingReference = $myrow['ref']; - - + + $SQL = "SELECT debtorsmaster.name, ovamount, invtext, @@ -85,7 +85,7 @@ ON debtorsmaster.debtorno=debtortrans.debtorno WHERE debtortrans.transno='" . $_POST['BatchNo'] . "' AND debtortrans.type=12"; - + $CustRecs=DB_query($SQL,$db,'','',false,false); if (DB_error_no($db)!=0){ $title = _('Create PDF Print-out For A Batch Of Receipts'); @@ -104,7 +104,7 @@ AND gltrans.type=12 and gltrans.amount <0 AND gltrans.account !='" . $myrow['bankact'] . "' AND gltrans.account !='" . $_SESSION['CompanyRecord']['debtorsact'] . "'"; - + $GLRecs=DB_query($SQL,$db,'','',false,false); if (DB_error_no($db)!=0){ $title = _('Create PDF Print-out For A Batch Of Receipts'); @@ -116,57 +116,57 @@ include('includes/footer.inc'); exit; } - - + + include('includes/PDFStarter.php'); - + /*PDFStarter.php has all the variables for page size and width set up depending on the users default preferences for paper size */ - + $pdf->addInfo('Title',_('Banking Summary')); $pdf->addInfo('Subject',_('Banking Summary Number') . ' ' . $_POST['BatchNo']); $line_height=12; $PageNumber = 0; $TotalBanked = 0; - + include ('includes/PDFBankingSummaryPageHeader.inc'); - + while ($myrow=DB_fetch_array($CustRecs)){ - + $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,number_format(-$myrow['ovamount'],2), 'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+65,$YPos,150,$FontSize,$myrow['name'], 'left'); $LeftOvers = $pdf->addTextWrap($Left_Margin+215,$YPos,100,$FontSize,$myrow['invtext'], 'left'); $LeftOvers = $pdf->addTextWrap($Left_Margin+315,$YPos,100,$FontSize,$myrow['reference'], 'left'); - + $YPos -= ($line_height); $TotalBanked -= $myrow['ovamount']; - + if ($YPos - (2 *$line_height) < $Bottom_Margin){ /*Then set up a new page */ include ('includes/PDFBankingSummaryPageHeader.inc'); } /*end of new page header */ } /* end of while there are customer receipts in the batch to print */ - + /* Right now print out the GL receipt entries in the batch */ while ($myrow=DB_fetch_array($GLRecs)){ - + $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,number_format((-$myrow['amount']*$ExRate*$FunctionalExRate),2), 'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+65,$YPos,300,$FontSize,$myrow['narrative'], 'left'); $YPos -= ($line_height); $TotalBanked += (-$myrow['amount']*$ExRate); - + if ($YPos - (2 *$line_height) < $Bottom_Margin){ /*Then set up a new page */ include ('includes/PDFBankingSummaryPageHeader.inc'); } /*end of new page header */ } /* end of while there are GL receipts in the batch to print */ - - + + $YPos-=$line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,number_format($TotalBanked,2), 'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+65,$YPos,300,$FontSize,_('TOTAL') . ' ' . $Currency . ' ' . _('BANKED'), 'left'); - + $pdf->OutputD($_SESSION['DatabaseName'] . '_BankingSummary_' . date('Y-m-d').'.pdf');//UldisN - $pdf->__destruct(); + $pdf->__destruct(); } ?> \ No newline at end of file Modified: trunk/PDFOrderStatus.php =================================================================== --- trunk/PDFOrderStatus.php 2011-04-18 07:39:42 UTC (rev 5202) +++ trunk/PDFOrderStatus.php 2011-04-18 07:40:23 UTC (rev 5203) @@ -56,7 +56,7 @@ echo '<tr><td>' . _('Inventory Location') . ':</td><td><select name="Location">'; echo '<option selected value="All">' . _('All Locations') . '</option>'; - $result= DB_query('SELECT loccode, locationname FROM locations',$db); + $result= DB_query("SELECT loccode, locationname FROM locations",$db); while ($myrow=DB_fetch_array($result)){ echo '<option VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } Modified: trunk/PDFPeriodStockTransListing.php =================================================================== --- trunk/PDFPeriodStockTransListing.php 2011-04-18 07:39:42 UTC (rev 5202) +++ trunk/PDFPeriodStockTransListing.php 2011-04-18 07:40:23 UTC (rev 5203) @@ -53,7 +53,7 @@ echo '</select></td></tr>'; - $sql = 'SELECT loccode, locationname FROM locations'; + $sql = "SELECT loccode, locationname FROM locations"; $resultStkLocs = DB_query($sql, $db); echo '<tr><td>' . _('For Stock Location') . ':</td> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-04-18 13:25:30
|
Revision: 5204 http://weberp.svn.sourceforge.net/weberp/?rev=5204&view=rev Author: tim_schofield Date: 2011-04-18 13:25:24 +0000 (Mon, 18 Apr 2011) Log Message: ----------- Provide for filtering of accounts by account group in Payments screen Modified Paths: -------------- trunk/Payments.php trunk/WWW_Access.php Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2011-04-18 07:40:23 UTC (rev 5203) +++ trunk/Payments.php 2011-04-18 13:25:24 UTC (rev 5204) @@ -897,14 +897,46 @@ <td><input type=Text class="number" Name="GLManualCode" Maxlength=12 size=12 onChange="inArray(this, GLCode.options,'. "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')"></td></tr>'; } - echo '<tr><td>' . _('Select GL Account') . ':</td> - <td><select name="GLCode" onChange="return assignComboToInput(this,'.'GLManualCode'.')">'; - $SQL = "SELECT accountcode, + echo '<tr><td>' . _('Select GL Group') . ':</td> + <td><select name="GLGroup" onChange="return ReloadForm(UpdateCodes)">'; + + $SQL = "SELECT groupname + FROM accountgroups + ORDER BY sequenceintb"; + + $result=DB_query($SQL,$db); + if (DB_num_rows($result)==0){ + echo '</select></td></tr>'; + prnMsg(_('No General ledger account groups have been set up yet') . ' - ' . _('payments cannot be analysed against GL accounts until the GL accounts are set up'),'error'); + } else { + echo '<option value=""></option>'; + while ($myrow=DB_fetch_array($result)){ + if (isset($_POST['GLGroup']) and ($_POST['GLGroup']==$myrow['groupname'])){ + echo '<option selected value="' . $myrow['groupname'] . '">' . $myrow['groupname'] . '</option>'; + } else { + echo '<option value="' . $myrow['groupname'] . '">' . $myrow['groupname'] . '</option>'; + } + } + echo '</select><input type="submit" name="UpdateCodes" value="Select" /></td></tr>'; + } + + if (isset($_POST['GLGroup']) and $_POST['GLGroup']!='') { + $SQL = "SELECT accountcode, accountname FROM chartmaster + WHERE group_='".$_POST['GLGroup']."' ORDER BY accountcode"; + } else { + $SQL = "SELECT accountcode, + accountname + FROM chartmaster + ORDER BY accountcode"; + } + echo '<tr><td>' . _('Select GL Account') . ':</td> + <td><select name="GLCode" onChange="return assignComboToInput(this,'.'GLManualCode'.')">'; + $result=DB_query($SQL,$db); if (DB_num_rows($result)==0){ echo '</select></td></tr>'; Modified: trunk/WWW_Access.php =================================================================== --- trunk/WWW_Access.php 2011-04-18 07:40:23 UTC (rev 5203) +++ trunk/WWW_Access.php 2011-04-18 13:25:24 UTC (rev 5204) @@ -108,7 +108,7 @@ $result = DB_query($sql,$db); echo '<table class=selection>'; - echo "<tr><th>" . _('Role') . "</th></tr>"; + echo '<tr><th>' . _('Role') . '</th></tr>'; $k=0; //row colour counter @@ -123,14 +123,14 @@ /*The SecurityHeadings array is defined in config.php */ - printf("<td>%s</td> - <td><a href=\"%s&SelectedRole=%s\">" . _('Edit') . "</a></td> - <td><a href=\"%s&SelectedRole=%s&delete=1&SecRoleName=%s\">" . _('Delete') . "</a></td> - </tr>", + printf('<td>%s</td> + <td><a href="%s?SelectedRole=%s">' . _('Edit') . '</a></td> + <td><a href="%s?SelectedRole=%s&delete=1&SecRoleName=%s">' . _('Delete') . '</a></td> + </tr>', $myrow['secrolename'], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] , $myrow['secroleid'], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] , $myrow['secroleid'], urlencode($myrow['secrolename'])); @@ -140,7 +140,7 @@ if (isset($SelectedRole)) { - echo "<br /><div class='centre'><a href='" . $_SERVER['PHP_SELF'] ."?" . SID . "'>" . _('Review Existing Roles') . '</a></div>'; + echo '<br /><div class="centre"><a href="' . $_SERVER['PHP_SELF'] .'">' . _('Review Existing Roles') . '</a></div>'; } if (isset($SelectedRole)) { @@ -160,19 +160,19 @@ } } 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'] . '" />'; if( isset($_POST['SelectedRole'])) { - echo "<input type=hidden name='SelectedRole' VALUE='" . $_POST['SelectedRole'] . "'>"; + echo '<input type=hidden name="SelectedRole" VALUE="' . $_POST['SelectedRole'] . '">'; } echo '<table class=selection>'; if (!isset($_POST['SecRoleName'])) { $_POST['SecRoleName']=''; } -echo '<tr><td>' . _('Role') . ":</td> - <td><input type='text' name='SecRoleName' size=40 maxlength=40 VALUE='" . $_POST['SecRoleName'] . "'></tr>"; -echo "</table><br /> - <div class='centre'><input type='Submit' name='submit' value='" . _('Enter Role') . "'></div></form>"; +echo '<tr><td>' . _('Role') . ':</td> + <td><input type="text" name="SecRoleName" size=40 maxlength=40 VALUE="' . $_POST['SecRoleName'] . '"></tr>'; +echo '</table><br /> + <div class="centre"><input type="Submit" name="submit" value="' . _('Enter Role') . '"></div></form>'; if (isset($SelectedRole)) { $sql = "SELECT tokenid, tokenname @@ -194,8 +194,8 @@ echo '<br /><table class=selection><tr>'; if (DB_num_rows($Result)>0 ) { - echo "<th colspan=3><div class='centre'>"._('Assigned Security Tokens')."</div></th>"; - echo "<th colspan=3><div class='centre'>"._('Available Security Tokens')."</div></th>"; + echo '<th colspan=3><div class="centre">'._('Assigned Security Tokens').'</div></th>'; + echo '<th colspan=3><div class="centre">'._('Available Security Tokens').'</div></th>'; } echo '</tr>'; @@ -211,8 +211,8 @@ } if (in_array($AvailRow['tokenid'],$TokensUsed)){ - printf("<td>%s</td><td>%s</td> - <td><a href=\"%s&SelectedRole=%s&remove=1&PageToken=%s\">" . _('Remove') . "</a></td><td> </td><td> </td><td> </td>", + printf('<td>%s</td><td>%s</td> + <td><a href="%s?SelectedRole=%s&remove=1&PageToken=%s">' . _('Remove') . '</a></td><td> </td><td> </td><td> </td>', $AvailRow['tokenid'], $AvailRow['tokenname'], $_SERVER['PHP_SELF'] . "?" . SID, @@ -220,15 +220,15 @@ $AvailRow['tokenid'] ); } else { - printf("<td> </td> + printf('<td> </td> <td> </td> <td> </td> <td>%s</td> <td>%s</td> - <td><a href=\"%s&SelectedRole=%s&add=1&PageToken=%s\">" . _('Add') . "</a></td>", + <td><a href="%s?SelectedRole=%s&add=1&PageToken=%s">' . _('Add') . '</a></td>', $AvailRow['tokenid'], $AvailRow['tokenname'], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] , $SelectedRole, $AvailRow['tokenid'] ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-04-22 07:37:16
|
Revision: 5207 http://weberp.svn.sourceforge.net/weberp/?rev=5207&view=rev Author: tim_schofield Date: 2011-04-22 07:37:08 +0000 (Fri, 22 Apr 2011) Log Message: ----------- XHTML and quoting changes Modified Paths: -------------- trunk/PO_Header.php trunk/SpecialOrder.php trunk/StockCostUpdate.php trunk/StockLocMovements.php trunk/StockLocStatus.php trunk/StockMovements.php trunk/StockQuantityByDate.php trunk/StockTransferControlled.php trunk/StockUsage.php trunk/SuppTransGLAnalysis.php trunk/SupplierContacts.php trunk/SupplierInquiry.php trunk/SupplierTypes.php trunk/TaxGroups.php trunk/WorkOrderCosting.php trunk/Z_CheckDebtorsControl.php trunk/css/silverwolf/login.css trunk/includes/Login.php trunk/index.php Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2011-04-22 07:34:50 UTC (rev 5206) +++ trunk/PO_Header.php 2011-04-22 07:37:08 UTC (rev 5207) @@ -340,6 +340,9 @@ if (DB_num_rows($result_SuppSelect)==1){ $myrow=DB_fetch_array($result_SuppSelect); $_POST['Select'] = $myrow['supplierid']; + if (isset($SuppliersReturned )) { + echo '<input type="hidden" name="SuppliersReturned" value="' . $SuppliersReturned .'" />'; + } } elseif (DB_num_rows($result_SuppSelect)==0){ prnMsg( _('No supplier records contain the selected text') . ' - ' . _('please alter your search criteria and try again'),'info'); Modified: trunk/SpecialOrder.php =================================================================== --- trunk/SpecialOrder.php 2011-04-22 07:34:50 UTC (rev 5206) +++ trunk/SpecialOrder.php 2011-04-22 07:37:08 UTC (rev 5207) @@ -13,7 +13,7 @@ include('includes/header.inc'); -echo "<form action='" . $_SERVER['PHP_SELF'] . "?" . SID . "' method=post>"; +echo '<form action="' . $_SERVER['PHP_SELF'] . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -24,13 +24,14 @@ if (!isset($_SESSION['SupplierID'])){ echo '<br><br>'; prnMsg(_('To set up a special') . ', ' . _('the supplier must first be selected from the Select Supplier page'),'info'); - echo "<br><a href='$rootpath/SelectSupplier.php?" . SID . "'>" . _('Select the supplier now') . "</a>"; + echo '<br><a href="'.$rootpath.'/SelectSupplier.php">' . _('Select the supplier now') . '</a>'; include('includes/footer.inc'); exit; } if (!isset($_SESSION['CustomerID']) OR $_SESSION['CustomerID']==""){ - echo "<br><br>" . _('To set up a special') . ', ' . _('the customer must first be selected from the Select Customer page') . "<br><a href='$rootpath/SelectCustomer.php?" . SID . "'>" . _('Select the customer now') . "</a>"; + echo '<br><br>' . _('To set up a special') . ', ' . _('the customer must first be selected from the Select Customer page') . + '<br><a href="'.$rootpath.'/SelectCustomer.php">' . _('Select the customer now') . '</a>'; include('includes/footer.inc'); exit; } @@ -110,7 +111,7 @@ } echo '<div class="centre">'; if (!isset($_SESSION['SPL']->BranchCode)){ - echo "<br><font size=4 color=BLUE>" . _('Purchase from') . " " . $_SESSION['SPL']->SupplierName . " " . _('in') . " " . $_SESSION['SPL']->SuppCurrCode . " " . _('for') . " " . $_SESSION['SPL']->CustomerName . " (" . $_SESSION['SPL']->CustCurrCode . ")"; + echo '<br><font size=4 color=BLUE>' . _('Purchase from') . ' ' . $_SESSION['SPL']->SupplierName . ' ' . _('in') . ' ' . $_SESSION['SPL']->SuppCurrCode . ' ' . _('for') . ' ' . $_SESSION['SPL']->CustomerName . ' (' . $_SESSION['SPL']->CustCurrCode . ')'; } else { echo '<br><font size=4 color=BLUE>' . _('Purchase from') . ' ' . $_SESSION['SPL']->SupplierName . ' ' . _('in') . ' ' . $_SESSION['SPL']->SuppCurrCode . ' ' . _('for') . ' ' . $_SESSION['SPL']->CustomerName . ' (' . $_SESSION['SPL']->CustCurrCode . ') - ' . _('delivered to') . ' ' . $_SESSION['SPL']->BranchName . ' ' . _('branch'); } @@ -131,8 +132,8 @@ echo '</div><br><table cellpadding=3 colspan=2 BORDER=1>'; - $tableheader = "<tr><th>" ._('Code') . "</th> - <th>" . _('Branch Name') . "</th></tr>"; + $tableheader = '<tr><th>' ._('Code') . '</th> + <th>' . _('Branch Name') . '</th></tr>'; echo $tableheader; $j = 1; @@ -148,7 +149,7 @@ $k++; } - printf("<td><input type=submit name='SelectBranch' VALUE='%s'</td><td>%s</td></tr>", $myrow['branchcode'], $myrow['brname']); + printf('<td><input type=submit name="SelectBranch" VALUE="%s" /></td><td>%s</td></tr>', $myrow['branchcode'], $myrow['brname']); //end of page full new headings if } @@ -398,7 +399,7 @@ } /* end of the loop round the detail line items on the order */ echo '<br><br>' . _('Purchase Order') . ' ' . $_SESSION['SPL']->PurchOrderNo . ' ' . _('on') . ' ' . $_SESSION['SPL']->SupplierName . ' ' . _('has been created'); - echo "<br><a href='$rootpath/PO_PDFPurchOrder.php?" . SID . '&OrderNo=' . $_SESSION['SPL']->PurchOrderNo . "'>" . _('Print Purchase Order') . '</a>'; + echo '<br><a href="'.$rootpath.'/PO_PDFPurchOrder.php?OrderNo=' . $_SESSION['SPL']->PurchOrderNo . '">' . _('Print Purchase Order') . '</a>'; /*Now insert the sales order too */ @@ -491,15 +492,15 @@ if (count($_SESSION['AllowedPageSecurityTokens'])>1){ /* Only allow print of packing slip for internal staff - customer logon's cannot go here */ - echo "<p><a href='$rootpath/PrintCustOrder.php?" . SID . "&TransNo=" . $SalesOrderNo . "'>" . _('Print packing slip') . ' (' . _('Preprinted stationery') . ')</a>'; - echo "<p><a href='$rootpath/PrintCustOrder_generic.php?" . SID . '&TransNo=' . $SalesOrderNo . "'>" . _('Print packing slip') . ' (' . _('Laser') . ')</a>'; + echo '<p><a href="'.$rootpath.'/PrintCustOrder.php?TransNo=' . $SalesOrderNo . '">' . _('Print packing slip') . ' (' . _('Preprinted stationery') . ')</a>'; + echo '<p><a href="'.$rootpath.'/PrintCustOrder_generic.php?TransNo=' . $SalesOrderNo . '">' . _('Print packing slip') . ' (' . _('Laser') . ')</a>'; } $Result = DB_Txn_Commit($db); unset($_SESSION['SPL']); /*Clear the PO data to allow a newy to be input*/ - echo "<br><br><a href='$rootpath/SpecialOrder.php?" . SID . "'>" . _('Enter A New Special Order') . "</a>"; + echo '<br><br><a href="'.$rootpath.'/SpecialOrder.php">' . _('Enter A New Special Order') . '</a>'; exit; } /*end if there were no input errors trapped */ } /* end of the code to do transfer the SPL object to the database - user hit the place Order*/ @@ -507,7 +508,7 @@ /*Show the header information for modification */ -echo "<table><tr><td>" . _('Receive Purchase Into and Sell From') . ": <select name='StkLocation'>"; +echo '<table><tr><td>' . _('Receive Purchase Into and Sell From') . ': <select name="StkLocation">'; $sql = "SELECT loccode, locationname FROM locations"; $LocnResult = DB_query($sql,$db); @@ -517,45 +518,45 @@ while ($LocnRow=DB_fetch_array($LocnResult)){ if ($_SESSION['SPL']->StkLocation == $LocnRow['loccode']){ - echo "<option selected Value='" . $LocnRow['loccode'] . "'>" . $LocnRow['locationname']; + echo '<option selected Value="' . $LocnRow['loccode'] . '">' . $LocnRow['locationname'] . '</option>'; } else { - echo "<option Value='" . $LocnRow['loccode'] . "'>" . $LocnRow['locationname']; + echo '<option Value="' . $LocnRow['loccode'] . '">' . $LocnRow['locationname'] . '</option>'; } } -echo "</select></td>"; +echo '</select></td>'; -echo "<td>" . _('Initiated By') . ": <input type=TEXT name='Initiator' size=11 maxlength=10 VALUE=" . $_SESSION['SPL']->Initiator . "></td>"; -echo "<td>" . _('Special Ref') . ": <input type=TEXT name='QuotationRef' size=16 maxlength=15 VALUE=" . $_SESSION['SPL']->QuotationRef . "></td>"; -echo "<td>" . _('Customer Ref') . ": <input type=TEXT name='CustRef' size=11 maxlength=10 VALUE=" . $_SESSION['SPL']->CustRef . "></td></tr>"; +echo '<td>' . _('Initiated By') . ': <input type=TEXT name="Initiator" size=11 maxlength=10 VALUE="' . $_SESSION['SPL']->Initiator . '"></td>'; +echo '<td>' . _('Special Ref') . ': <input type=TEXT name="QuotationRef" size=16 maxlength=15 VALUE="' . $_SESSION['SPL']->QuotationRef . '"></td>'; +echo '<td>' . _('Customer Ref') . ': <input type=TEXT name="CustRef" size=11 maxlength=10 VALUE="' . $_SESSION['SPL']->CustRef . '"></td></tr>'; -echo "<tr><td VALIGN=TOP colspan=2>" . _('Comments') . ":"; -echo "<textarea name='Comments' cols=70 rows=2>" . $_SESSION['SPL']->Comments . "</textarea></td></tr></table>"; +echo '<tr><td VALIGN=TOP colspan=2>' . _('Comments') . ':'; +echo '<textarea name="Comments" cols=70 rows=2>' . $_SESSION['SPL']->Comments . '</textarea></td></tr></table>'; -echo "<hr>"; /* Rule off the header */ +echo '<hr>'; /* Rule off the header */ /*Now show the order so far */ if (count($_SESSION['SPL']->LineItems)>0){ - echo "<div class='centre'>><b>" . _('Special Order Summary') . "</b></div>"; - echo "<table cellpadding=2 colspan=7 border=1>"; + echo '<div class="centre"><b>' . _('Special Order Summary') . '</b></div>'; + echo '<table cellpadding=2 colspan=7 border=1>'; - $sql = 'select currencydefault from companies'; + $sql = "SELECT currencydefault FROM companies"; $result = DB_query($sql, $db); $myrow = DB_fetch_row($result); $DefaultCurrency = $myrow[0]; - echo "<tr> - <th>" . _('Item Description') . "</th> - <th>" . _('Delivery') . "</th> - <th>" . _('Quantity') . "</th> - <th>" . _('Purchase Cost') . '<br>' . $_SESSION['SPL']->SuppCurrCode . "</th> - <th>" . _('Sell Price') . '<br>' . $_SESSION['SPL']->CustCurrCode . "</th> - <th>" . _('Total Cost') . '<br>' . $_SESSION['SPL']->SuppCurrCode . "</th> - <th>" . _('Total Price') . '<br>' . $_SESSION['SPL']->CustCurrCode . "</th> - <th>" . _('Total Cost') . '<br>' . $DefaultCurrency . "</th> - <th>" . _('Total Price') . '<br>' . $DefaultCurrency . "</th> - </tr>"; + echo '<tr> + <th>' . _('Item Description') . '</th> + <th>' . _('Delivery') . '</th> + <th>' . _('Quantity') . '</th> + <th>' . _('Purchase Cost') . '<br>' . $_SESSION['SPL']->SuppCurrCode . '</th> + <th>' . _('Sell Price') . '<br>' . $_SESSION['SPL']->CustCurrCode . '</th> + <th>' . _('Total Cost') . '<br>' . $_SESSION['SPL']->SuppCurrCode . '</th> + <th>' . _('Total Price') . '<br>' . $_SESSION['SPL']->CustCurrCode . '</th> + <th>' . _('Total Cost') . '<br>' . $DefaultCurrency . '</th> + <th>' . _('Total Price') . '<br>' . $DefaultCurrency . '</th> + </tr>'; $_SESSION['SPL']->total = 0; $k = 0; //row colour counter @@ -579,35 +580,35 @@ $k=1; } echo '<td>' . $SPLLine->ItemDescription . '</td> - <td>' . $SPLLine->ReqDelDate . "</td> - <td class=number>$DisplayQuantity</td> - <td class=number>$DisplayCost</td> - <td class=number>$DisplayPrice</td> - <td class=number>$DisplayLineCostTotal</td> - <td class=number>$DisplayLineTotal</td> - <td class=number>$DisplayLineCostTotalCurr</td> - <td class=number>$DisplayLineTotalCurr</td> - <td><a href='" . $_SERVER['PHP_SELF'] . "?" . SID .'&Delete=' . $SPLLine->LineNo . "'>" . _('Delete') . '</a></td></tr>'; + <td>' . $SPLLine->ReqDelDate . '</td> + <td class=number>'.$DisplayQuantity.'</td> + <td class=number>'.$DisplayCost.'</td> + <td class=number>'.$DisplayPrice.'</td> + <td class=number>'.$DisplayLineCostTotal.'</td> + <td class=number>'.$DisplayLineTotal.'</td> + <td class=number>'.$DisplayLineCostTotalCurr.'</td> + <td class=number>'.$DisplayLineTotalCurr.'</td> + <td><a href="' . $_SERVER['PHP_SELF'] . '?Delete=' . $SPLLine->LineNo . '">' . _('Delete') . '</a></td></tr>'; $_SESSION['SPL']->total = $_SESSION['SPL']->total + $DisplayLineTotalCurr; } $DisplayTotal = number_format($_SESSION['SPL']->total,2); echo '<tr> - <td colspan=8 class=number>' . _('TOTAL Excl Tax') . "</td> - <td class=number><b>$DisplayTotal</b></td> - </tr></table>"; + <td colspan=8 class=number>' . _('TOTAL Excl Tax') . '</td> + <td class=number><b>'.$DisplayTotal.'</b></td> + </tr></table>'; } /*Set up the form to enter new special items into */ -echo "<table>"; +echo '<table>'; -echo "<input type='hidden' name='LineNo' value=" . ($_SESSION['SPL']->LinesOnOrder + 1) .">"; +echo '<input type="hidden" name="LineNo" value="' . ($_SESSION['SPL']->LinesOnOrder + 1) .'">'; if (!isset($_POST['ItemDescription'])) {$_POST['ItemDescription']='';} -echo '<tr><td>' . _('Ordered item Description') . ":</td><td><input type=TEXT name='ItemDescription' size=40 maxlength=40 VALUE='" . $_POST['ItemDescription'] . "'></td></tr>"; +echo '<tr><td>' . _('Ordered item Description') . ':</td><td><input type=TEXT name="ItemDescription" size=40 maxlength=40 VALUE="' . $_POST['ItemDescription'] . '"></td></tr>'; echo '<tr><td>' . _('Category') . ':</td><td><select name=StkCat>'; @@ -619,9 +620,9 @@ while ($myrow=DB_fetch_array($result)){ if (isset($_POST['StkCat']) and $myrow['categoryid']==$_POST['StkCat']){ - echo "<option selected VALUE='". $myrow['categoryid'] . "'>" . $myrow['categorydescription']; + echo '<option selected VALUE="'. $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } else { - echo "<option VALUE='". $myrow['categoryid'] . "'>" . $myrow['categorydescription']; + echo '<option VALUE="'. $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } } echo '</select></td></tr>'; @@ -630,30 +631,30 @@ /*default the order quantity to 1 unit */ $_POST['Qty'] = 1; -echo '<tr><td>' . _('Order Quantity') . ":</td> - <td><input type='Text' class='number' size=7 maxlength=6 name='Qty' value=" . $_POST['Qty'] . "></td></tr>"; +echo '<tr><td>' . _('Order Quantity') . ':</td> + <td><input type="Text" class="number" size=7 maxlength=6 name="Qty" value="' . $_POST['Qty'] . '"></td></tr>'; if (!isset($_POST['Cost'])) {$_POST['Cost']='';} -echo '<tr><td>' . _('Unit Cost') . ":</td> - <td><input type='Text' class='number' size=15 maxlength=14 name='Cost' value=" . $_POST['Cost'] . "></td></tr>"; +echo '<tr><td>' . _('Unit Cost') . ':</td> + <td><input type="Text" class="number" size=15 maxlength=14 name="Cost" value="' . $_POST['Cost'] . '"></td></tr>'; if (!isset($_POST['Price'])) { $_POST['Price']='';} -echo '<tr><td>' . _('Unit Price') . ":</td> - <td><input type='Text' class='number' size=15 maxlength=14 name='Price' value=" . $_POST['Price'] . "></td></tr>"; +echo '<tr><td>' . _('Unit Price') . ':</td> + <td><input type="Text" class="number" size=15 maxlength=14 name="Price" value="' . $_POST['Price'] . '"></td></tr>'; /*Default the required delivery date to tomorrow as a starting point */ $_POST['ReqDelDate'] = Date($_SESSION['DefaultDateFormat'],Mktime(0,0,0,Date('m'),Date('d')+1,Date('y'))); -echo '<tr><td>' . _('Required Delivery Date') . ":</td> - <td><input type='Text' class='date' alt='".$_SESSION['DefaultDateFormat']."' size=12 maxlength=11 name='ReqDelDate' value=" . $_POST['ReqDelDate'] . "></td></tr>"; +echo '<tr><td>' . _('Required Delivery Date') . ':</td> + <td><input type="Text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size=12 maxlength=11 name="ReqDelDate" value="' . $_POST['ReqDelDate'] . '"></td></tr>'; echo '</table>'; /* end of main table */ -echo "<div class='centre'><input type=submit Name='EnterLine' VALUE='" . _('Add Item to Order') . "'>"; +echo '<div class="centre"><input type=submit Name="EnterLine" VALUE="' . _('Add Item to Order') . '">'; -echo "<br><br><input type=submit Name='Cancel' VALUE='" . _('Start Again') . "'>"; -echo "<br><br><input type=submit Name='Commit' VALUE='" . _('Process This Order') . "'>"; +echo '<br><br><input type=submit Name="Cancel" VALUE="' . _('Start Again') . '">'; +echo '<br><br><input type=submit Name="Commit" VALUE="' . _('Process This Order') . '">'; echo '</div></form>'; include('includes/footer.inc'); Modified: trunk/StockCostUpdate.php =================================================================== --- trunk/StockCostUpdate.php 2011-04-22 07:34:50 UTC (rev 5206) +++ trunk/StockCostUpdate.php 2011-04-22 07:37:08 UTC (rev 5207) @@ -166,11 +166,11 @@ echo '</table><br /><div class="centre"><input type="submit" name="UpdateData" VALUE="' . _('Update') . '"><br /><br />'; } if ($myrow['mbflag']!='D'){ - echo '<div class="centre"><a href="' . $rootpath . '/StockStatus.php?' . SID . '&StockID=' . $StockID . '>' . _('Show Stock Status') . '</a>'; - echo '<br><a href="' . $rootpath . '/StockMovements.php?' . SID . '&StockID=' . $StockID . '">' . _('Show Stock Movements') . '</a>'; - echo '<br><a href="' . $rootpath . '/StockUsage.php?' . SID . '&StockID=' . $StockID . '">' . _('Show Stock Usage') .'</a>'; - echo '<br><a href="' . $rootpath . '/SelectSalesOrder.php?' . SID . '&SelectedStockItem=' . $StockID . '">' . _('Search Outstanding Sales Orders') . '</a>'; - echo '<br><a href="' . $rootpath . '/SelectCompletedOrder.php?' . SID . '&SelectedStockItem=' . $StockID . '">' . _('Search Completed Sales Orders') . '</a></div>'; + echo '<div class="centre"><a href="' . $rootpath . '/StockStatus.php?StockID=' . $StockID . '">' . _('Show Stock Status') . '</a>'; + echo '<br><a href="' . $rootpath . '/StockMovements.php?StockID=' . $StockID . '">' . _('Show Stock Movements') . '</a>'; + echo '<br><a href="' . $rootpath . '/StockUsage.php?StockID=' . $StockID . '">' . _('Show Stock Usage') .'</a>'; + echo '<br><a href="' . $rootpath . '/SelectSalesOrder.php?SelectedStockItem=' . $StockID . '">' . _('Search Outstanding Sales Orders') . '</a>'; + echo '<br><a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedStockItem=' . $StockID . '">' . _('Search Completed Sales Orders') . '</a></div>'; } echo '</form></div>'; include('includes/footer.inc'); Modified: trunk/StockLocMovements.php =================================================================== --- trunk/StockLocMovements.php 2011-04-22 07:34:50 UTC (rev 5206) +++ trunk/StockLocMovements.php 2011-04-22 07:37:08 UTC (rev 5207) @@ -23,15 +23,15 @@ while ($myrow=DB_fetch_array($resultStkLocs)){ if (isset($_POST['StockLocation']) AND $_POST['StockLocation']!='All'){ if ($myrow['loccode'] == $_POST['StockLocation']){ - echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ - echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; $_POST['StockLocation']=$myrow['loccode']; } else { - echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } @@ -108,7 +108,7 @@ $DisplayTranDate = ConvertSQLDate($myrow['trandate']); - printf("<td><a target='_blank' href='StockStatus.php?" . SID . "&StockID=%s'>%s</td> + printf('<td><a target="_blank" href="StockStatus.php?StockID=%s">%s</td> <td>%s</td> <td>%s</td> <td>%s</td> @@ -118,7 +118,7 @@ <td class=number>%s</td> <td class=number>%s</td> <td class=number>%s</td> - </tr>", + </tr>', strtoupper($myrow['stockid']), strtoupper($myrow['stockid']), $myrow['typename'], Modified: trunk/StockLocStatus.php =================================================================== --- trunk/StockLocStatus.php 2011-04-22 07:34:50 UTC (rev 5206) +++ trunk/StockLocStatus.php 2011-04-22 07:37:08 UTC (rev 5207) @@ -49,7 +49,7 @@ if (DB_num_rows($result1)==0){ echo '</table><p>'; prnMsg(_('There are no stock categories currently defined please use the link below to set them up'),'warn'); - echo '<br><a href="' . $rootpath . '/StockCategories.php?' . SID .'">' . _('Define Stock Categories') . '</a>'; + echo '<br><a href="' . $rootpath . '/StockCategories.php">' . _('Define Stock Categories') . '</a>'; include ('includes/footer.inc'); exit; } @@ -251,13 +251,13 @@ echo '<tr class="EvenTableRows">'; $k=1; } - printf("<td><a target='_blank' href='StockStatus.php?StockID=%s'>%s</a></td> + printf('<td><a target="_blank" href="StockStatus.php?StockID=%s">%s</a></td> <td>%s</td> <td class=number>%s</td> <td class=number>%s</td> <td class=number>%s</td> - <td class=number><a target='_blank' href='SelectProduct.php?StockID=%s'>%s</a></td> - <td class=number>%s</td></tr>", + <td class=number><a target="_blank" href="SelectProduct.php?StockID=%s">%s</a></td> + <td class=number>%s</td></tr>', strtoupper($myrow['stockid']), strtoupper($myrow['stockid']), $myrow['description'], @@ -269,9 +269,9 @@ number_format($QOO,$myrow['decimalplaces'])); if ($myrow['serialised'] ==1){ /*The line is a serialised item*/ - echo '<td><a target="_blank" href="' . $rootpath . '/StockSerialItems.php?' . SID . '&Serialised=Yes&Location=' . $myrow['loccode'] . '&StockID=' . $StockID . '">' . _('Serial Numbers') . '</a></td></tr>'; + echo '<td><a target="_blank" href="' . $rootpath . '/StockSerialItems.php?Serialised=Yes&Location=' . $myrow['loccode'] . '&StockID=' . $StockID . '">' . _('Serial Numbers') . '</a></td></tr>'; } elseif ($myrow['controlled']==1){ - echo '<td><a target="_blank" href="' . $rootpath . '/StockSerialItems.php?' . SID . '&Location=' . $myrow['loccode'] . '&StockID=' . $StockID . '">' . _('Batches') . '</a></td></tr>'; + echo '<td><a target="_blank" href="' . $rootpath . '/StockSerialItems.php?Location=' . $myrow['loccode'] . '&StockID=' . $StockID . '">' . _('Batches') . '</a></td></tr>'; } } else if ($_POST['BelowReorderQuantity']!='NotZero') { if ($k==1){ @@ -281,13 +281,13 @@ echo '<tr class="EvenTableRows">'; $k=1; } - printf("<td><a target='_blank' href='StockStatus.php?StockID=%s'>%s</a></td> + printf('<td><a target="_blank" href="StockStatus.php?StockID=%s">%s</a></td> <td>%s</td> <td class=number>%s</td> <td class=number>%s</td> <td class=number>%s</td> - <td class=number><a target='_blank' href='SelectProduct.php?StockID=%s'>%s</a></td> - <td class=number>%s</td>", + <td class=number><a target="_blank" href="SelectProduct.php?StockID=%s">%s</a></td> + <td class=number>%s</td>', strtoupper($myrow['stockid']), strtoupper($myrow['stockid']), $myrow['description'], Modified: trunk/StockMovements.php =================================================================== --- trunk/StockMovements.php 2011-04-22 07:34:50 UTC (rev 5206) +++ trunk/StockMovements.php 2011-04-22 07:37:08 UTC (rev 5207) @@ -25,19 +25,19 @@ $myrow = DB_fetch_row($result); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" /><b>' . ' ' . $StockID . ' - ' . $myrow['0'] . ' : ' . _('in units of') . ' : ' . $myrow[1] . '</b></p>'; -echo "<form action='". $_SERVER['PHP_SELF'] . "?" . SID . "' method=post>"; +echo '<form action="'. $_SERVER['PHP_SELF'] . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (!isset($_POST['BeforeDate']) OR !Is_Date($_POST['BeforeDate'])){ $_POST['BeforeDate'] = Date($_SESSION['DefaultDateFormat']); } if (!isset($_POST['AfterDate']) OR !Is_Date($_POST['AfterDate'])){ - $_POST['AfterDate'] = Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date("m")-3,Date("d"),Date("y"))); + $_POST['AfterDate'] = Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-3,Date('d'),Date('y'))); } echo '<br /><table cellpadding=2 class=selection>'; -echo '<tr><th colspan=10>' . _('Stock Code') . ":<input type=TEXT name='StockID' size=21 VALUE='$StockID' maxlength=20>"; +echo '<tr><th colspan=10>' . _('Stock Code') . ':<input type="text" name="StockID" size=21 VALUE="'.$StockID.'" maxlength=20>'; -echo ' ' . _('From Stock Location') . ":<select name='StockLocation'> "; +echo ' ' . _('From Stock Location') . ':<select name="StockLocation"> '; $sql = "SELECT loccode, locationname FROM locations"; $resultStkLocs = DB_query($sql,$db); @@ -45,22 +45,22 @@ while ($myrow=DB_fetch_array($resultStkLocs)){ if (isset($_POST['StockLocation']) AND $_POST['StockLocation']!='All'){ if ($myrow['loccode'] == $_POST['StockLocation']){ - echo "<option selected VALUE='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option selected VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo "<option VALUE='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ - echo "<option selected VALUE='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option selected VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; $_POST['StockLocation']=$myrow['loccode']; } else { - echo "<option VALUE='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } echo '</select></th></tr>'; echo '<tr><th colspan=10>' . _('Show Movements before') . ': <input type=text name="BeforeDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="12" VALUE="' . $_POST['BeforeDate'] . '">'; echo ' ' . _('But after') . ': <input type=TEXT name="AfterDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="12" VALUE="' . $_POST['AfterDate'] . '">'; -echo " <input type=submit name='ShowMoves' VALUE='" . _('Show Stock Movements') . "'></th></tr>"; +echo ' <input type=submit name="ShowMoves" VALUE="' . _('Show Stock Movements') . '"></th></tr>'; $SQLBeforeDate = FormatDateForSQL($_POST['BeforeDate']); $SQLAfterDate = FormatDateForSQL($_POST['AfterDate']); @@ -93,13 +93,13 @@ $MovtsResult = DB_query($sql, $db, $ErrMsg, $DbgMsg); -$tableheader = "<tr> - <th>" . _('Type') . "</th><th>" . _('Number') . "</th> - <th>" . _('Date') . "</th><th>" . _('Customer') . "</th> - <th>" . _('Branch') . "</th><th>" . _('Quantity') . "</th> - <th>" . _('Reference') . "</th><th>" . _('Price') . "</th> - <th>" . _('Discount') . "</th><th>" . _('New Qty') . "</th> - </tr>"; +$tableheader = '<tr> + <th>' . _('Type') . '</th><th>' . _('Number') . '</th> + <th>' . _('Date') . '</th><th>' . _('Customer') . '</th> + <th>' . _('Branch') . '</th><th>' . _('Quantity') . '</th> + <th>' . _('Reference') . '</th><th>' . _('Price') . '</th> + <th>' . _('Discount') . '</th><th>' . _('New Qty') . '</th> + </tr>'; echo $tableheader; @@ -120,7 +120,7 @@ if ($myrow['type']==10){ /*its a sales invoice allow link to show invoice it was sold on*/ - printf("<td><a TARGET='_blank' href='%s/PrintCustTrans.php?%s&FromTransNo=%s&InvOrCredit=Invoice'>%s</td> + printf('<td><a TARGET="_blank" href="%s/PrintCustTrans.php?%s&FromTransNo=%s&InvOrCredit=Invoice">%s</td> <td>%s</td> <td>%s</td> <td>%s</td> @@ -130,7 +130,7 @@ <td class=number>%s</td> <td class=number>%s%%</td> <td class=number>%s</td> - </tr>", + </tr>', $rootpath, SID, $myrow['transno'], @@ -148,7 +148,7 @@ } elseif ($myrow['type']==11){ - printf("<td><a TARGET='_blank' href='%s/PrintCustTrans.php?%s&FromTransNo=%s&InvOrCredit=Credit'>%s</td> + printf('<td><a TARGET="_blank" href="%s/PrintCustTrans.php?%s&FromTransNo=%s&InvOrCredit=Credit">%s</td> <td>%s</td> <td>%s</td> <td>%s</td> @@ -158,7 +158,7 @@ <td class=number>%s</td> <td class=number>%s%%</td> <td class=number>%s</td> - </tr>", + </tr>', $rootpath, SID, $myrow['transno'], @@ -174,7 +174,7 @@ number_format($myrow['newqoh'],$myrow['decimalplaces'])); } else { - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> @@ -184,7 +184,7 @@ <td class=number>%s</td> <td class=number>%s%%</td> <td class=number>%s</td> - </tr>", + </tr>', $myrow['typename'], $myrow['transno'], $DisplayTranDate, @@ -201,10 +201,10 @@ //end of while loop echo '</table>'; -echo "<div class=centre><br /><a href='$rootpath/StockStatus.php?" . SID . "&StockID=$StockID'>" . _('Show Stock Status') . '</a>'; -echo "<br><a href='$rootpath/StockUsage.php?" . SID . "&StockID=$StockID&StockLocation=" . $_POST['StockLocation'] . "'>" . _('Show Stock Usage') . '</a>'; -echo "<br><a href='$rootpath/SelectSalesOrder.php?" . SID . "&SelectedStockItem=$StockID&StockLocation=" . $_POST['StockLocation'] . "'>" . _('Search Outstanding Sales Orders') . '</a>'; -echo "<br><a href='$rootpath/SelectCompletedOrder.php?" . SID . "&SelectedStockItem=$StockID'>" . _('Search Completed Sales Orders') . '</a>'; +echo '<div class=centre><br /><a href="$rootpath/StockStatus.php?StockID=$StockID">' . _('Show Stock Status') . '</a>'; +echo '<br><a href="'.$rootpath.'/StockUsage.php?StockID=$StockID&StockLocation=' . $_POST['StockLocation'] . '">' . _('Show Stock Usage') . '</a>'; +echo '<br><a href="'.$rootpath.'/SelectSalesOrder.php?SelectedStockItem=$StockID&StockLocation=' . $_POST['StockLocation'] . '">' . _('Search Outstanding Sales Orders') . '</a>'; +echo '<br><a href="'.$rootpath.'/SelectCompletedOrder.php?SelectedStockItem=$StockID">' . _('Search Completed Sales Orders') . '</a>'; echo '</form></div>'; Modified: trunk/StockQuantityByDate.php =================================================================== --- trunk/StockQuantityByDate.php 2011-04-22 07:34:50 UTC (rev 5206) +++ trunk/StockQuantityByDate.php 2011-04-22 07:37:08 UTC (rev 5207) @@ -12,26 +12,26 @@ echo '<p Class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') .'" alt="" /><b>' . $title. '</b></p>'; -echo "<form action='" . $_SERVER['PHP_SELF'] . "?". SID . "' method=post>"; +echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $sql = "SELECT categoryid, categorydescription FROM stockcategory"; $resultStkLocs = DB_query($sql, $db); echo '<table class=selection><tr>'; -echo '<td>' . _('For Stock Category') . ":</td> - <td><select name='StockCategory'> "; +echo '<td>' . _('For Stock Category') . ':</td> + <td><select name="StockCategory"> '; echo '<option value="All">' . _('All') . '</option>'; while ($myrow=DB_fetch_array($resultStkLocs)){ if (isset($_POST['StockCategory']) AND $_POST['StockCategory']!='All'){ if ($myrow['categoryid'] == $_POST['StockCategory']){ - echo "<option selected VALUE='" . $myrow['categoryid'] . "'>" . $myrow['categorydescription'] . '</option>'; + echo '<option selected VALUE="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } else { - echo "<option VALUE='" . $myrow['categoryid'] . "'>" . $myrow['categorydescription'] . '</option>'; + echo '<option VALUE="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } }else { - echo "<option VALUE='" . $myrow['categoryid'] . "'>" . $myrow['categorydescription'] . '</option>'; + echo '<option VALUE="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } } echo '</select></td>'; @@ -39,21 +39,21 @@ $sql = "SELECT loccode, locationname FROM locations"; $resultStkLocs = DB_query($sql, $db); -echo '<td>' . _('For Stock Location') . ":</td> - <td><select name='StockLocation'> "; +echo '<td>' . _('For Stock Location') . ':</td> + <td><select name="StockLocation"> '; while ($myrow=DB_fetch_array($resultStkLocs)){ if (isset($_POST['StockLocation']) AND $_POST['StockLocation']!='All'){ if ($myrow['loccode'] == $_POST['StockLocation']){ - echo "<option selected VALUE='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option selected VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname']; } else { - echo "<option VALUE='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname']; } } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ - echo "<option selected VALUE='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option selected VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname']; $_POST['StockLocation']=$myrow['loccode']; } else { - echo "<option VALUE='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname']; } } echo '</select></td>'; @@ -62,9 +62,9 @@ $_POST['OnHandDate'] = Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date("m"),0,Date("y"))); } -echo '<td>' . _("On-Hand On Date") . ":</td> - <td><input type=TEXT class='date' alt='".$_SESSION['DefaultDateFormat']."' name='OnHandDate' size=12 maxlength=12 VALUE='" . $_POST['OnHandDate'] . "'></td></tr>"; -echo "<tr><td colspan=6><div class='centre'><input type=submit name='ShowStatus' VALUE='" . _('Show Stock Status') ."'></div></td></tr></table>"; +echo '<td>' . _('On-Hand On Date') . ':</td> + <td><input type=TEXT class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="OnHandDate" size=12 maxlength=12 VALUE="' . $_POST['OnHandDate'] . '"></td></tr>'; +echo '<tr><td colspan=6><div class="centre"><input type=submit name="ShowStatus" VALUE="' . _('Show Stock Status') .'"></div></td></tr></table>'; echo '</form>'; $TotalQuantity = 0; @@ -94,10 +94,10 @@ echo '<br /><table cellpadding=5 cellspacing=1 class=selection>'; - $tableheader = "<tr> - <th>" . _('Item Code') . "</th> - <th>" . _('Description') . "</th> - <th>" . _('Quantity On Hand') . "</th></tr>"; + $tableheader = '<tr> + <th>' . _('Item Code') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Quantity On Hand') . '</th></tr>'; echo $tableheader; while ($myrows=DB_fetch_array($StockResult)) { @@ -130,18 +130,18 @@ } if($NumRows == 0){ - printf("<td><a TARGET='_blank' href='StockStatus.php?%s'>%s</td> + printf('<td><a TARGET="_blank" href="StockStatus.php?%s">%s</td> <td>%s</td> - <td class=number>%s</td>", - SID . '&StockID=' . strtoupper($myrows['stockid']), + <td class=number>%s</td>', + 'StockID=' . strtoupper($myrows['stockid']), strtoupper($myrows['stockid']), $myrows['description'], 0); } else { - printf("<td><a TARGET='_blank' href='StockStatus.php?%s'>%s</td> + printf('<td><a TARGET="_blank" href="StockStatus.php?%s">%s</td> <td>%s</td> - <td class=number>%s</td>", - SID . '&StockID=' . strtoupper($myrows['stockid']), + <td class=number>%s</td>', + 'StockID=' . strtoupper($myrows['stockid']), strtoupper($myrows['stockid']), $myrows['description'], number_format($LocQtyRow['newqoh'],$myrows['decimalplaces'])); Modified: trunk/StockTransferControlled.php =================================================================== --- trunk/StockTransferControlled.php 2011-04-22 07:34:50 UTC (rev 5206) +++ trunk/StockTransferControlled.php 2011-04-22 07:37:08 UTC (rev 5207) @@ -18,7 +18,7 @@ if (!isset($_SESSION['Transfer'])) { /* This page can only be called when a stock Transfer is pending */ - echo '<div class="centre"><a href="' . $rootpath . '/StockTransfers.php?' . SID . '&NewTransfer=Yes">'._('Enter A Stock Transfer').'</a><br>'; + echo '<div class="centre"><a href="' . $rootpath . '/StockTransfers.php?NewTransfer=Yes">'._('Enter A Stock Transfer').'</a><br>'; prnMsg( _('This page can only be opened if a Stock Transfer for a Controlled Item has been initiated').'<br>','error'); echo '</div>'; include('includes/footer.inc'); @@ -44,9 +44,9 @@ //Make sure this item is really controlled if ($LineItem->Controlled != 1 ){ if (isset($TransferItem)){ - echo '<div class="centre"><a href="' . $rootpath . '/StockLocTransferReceive.php?' . SID . '>'._('Receive A Stock Transfer').'</a></div>'; + echo '<div class="centre"><a href="' . $rootpath . '/StockLocTransferReceive.php">'._('Receive A Stock Transfer').'</a></div>'; } else { - echo '<div class="centre"><a href="' . $rootpath . '/StockTransfers.php?' . SID . '&NewTransfer=Yes">'._('Enter A Stock Transfer').'</a></div>'; + echo '<div class="centre"><a href="' . $rootpath . '/StockTransfers.php?NewTransfer=Yes">'._('Enter A Stock Transfer').'</a></div>'; } prnMsg('<br>'. _('Notice') . ' - ' . _('The transferred item must be defined as controlled to require input of the batch numbers or serial numbers being transferred'),'error'); include('includes/footer.inc'); Modified: trunk/StockUsage.php =================================================================== --- trunk/StockUsage.php 2011-04-22 07:34:50 UTC (rev 5206) +++ trunk/StockUsage.php 2011-04-22 07:37:08 UTC (rev 5207) @@ -20,7 +20,7 @@ echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/StockUsageGraph.php?StockLocation=' . $_POST['StockLocation'] . '&StockID=' . $StockID . '">'; echo '<p>' . _('You should automatically be forwarded to the usage graph') . '. ' . _('If this does not happen') .' (' . _('if the browser does not support META Refresh') . ') ' . - '<a href="' . $rootpath . '/StockUsageGraph.php?StockLocation="' . $_POST['StockLocation'] .'&StockID=' . $StockID . '">' . _('click here') . '</a> ' . _('to continue') . '.<br />'; + '<a href="' . $rootpath . '/StockUsageGraph.php?StockLocation=' . $_POST['StockLocation'] .'&StockID=' . $StockID . '">' . _('click here') . '</a> ' . _('to continue') . '.<br />'; exit; } Modified: trunk/SuppTransGLAnalysis.php =================================================================== --- trunk/SuppTransGLAnalysis.php 2011-04-22 07:34:50 UTC (rev 5206) +++ trunk/SuppTransGLAnalysis.php 2011-04-22 07:37:08 UTC (rev 5207) @@ -17,7 +17,7 @@ if (!isset($_SESSION['SuppTrans'])){ prnMsg(_('To enter a supplier invoice or credit note the supplier must first be selected from the supplier selection screen') . ', ' . _('then the link to enter a supplier invoice or supplier credit note must be clicked on'),'info'); - echo "<br><a href='$rootpath/SelectSupplier.php?" . SID ."'>" . _('Select A Supplier') . '</a>'; + echo '<br /><a href="' . $rootpath . '/SelectSupplier.php?">' . _('Select A Supplier') . '</a>'; include('includes/footer.inc'); exit; /*It all stops here if there aint no supplier selected and transaction initiated ie $_SESSION['SuppTrans'] started off*/ @@ -107,8 +107,8 @@ <td>' . $EnteredGLCode->GLCode . '</td> <td>' . $EnteredGLCode->GLActName . '</td> <td class=number>' . number_format($EnteredGLCode->Amount,2) . '</td> - <td>' . $EnteredGLCode->Narrative . "</td> - <td><a href='" . $_SERVER['PHP_SELF'] . "?" . SID . "Delete=" . $EnteredGLCode->Counter . "'>" . _('Delete') . '</a></td> + <td>' . $EnteredGLCode->Narrative . '</td> + <td><a href="' . $_SERVER['PHP_SELF'] . '?Delete=' . $EnteredGLCode->Counter . '">' . _('Delete') . '</a></td> </tr>'; $TotalGLValue += $EnteredGLCode->Amount; @@ -128,9 +128,9 @@ if ($_SESSION['SuppTrans']->InvoiceOrCredit == 'Invoice'){ - echo '<br /><a href="' . $rootpath . '/SupplierInvoice.php?' . SID . '">' . _('Back to Invoice Entry') . '</a>'; + echo '<br /><a href="' . $rootpath . '/SupplierInvoice.php">' . _('Back to Invoice Entry') . '</a>'; } else { - echo '<br /><a href="' . $rootpath . '/SupplierCredit.php?' . SID . '">' . _('Back to Credit Note Entry') . '</a>'; + echo '<br /><a href="' . $rootpath . '/SupplierCredit.php">' . _('Back to Credit Note Entry') . '</a>'; } /*Set up a form to allow input of new GL entries */ Modified: trunk/SupplierContacts.php =================================================================== --- trunk/SupplierContacts.php 2011-04-22 07:34:50 UTC (rev 5206) +++ trunk/SupplierContacts.php 2011-04-22 07:37:08 UTC (rev 5207) @@ -15,13 +15,13 @@ $SupplierID = $_POST['SupplierID']; } -echo "<a href='" . $rootpath . '/SelectSupplier.php?' . SID . "'>" . _('Back to Suppliers') . '</a><br>'; +echo '<a href="' . $rootpath . '/SelectSupplier.php">' . _('Back to Suppliers') . '</a><br>'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Supplier Allocations') . '" alt="" />' . ' ' . $title . '</p>'; if (!isset($SupplierID)) { - echo '<p><p>'; + echo '<br />'; prnMsg(_('This page must be called with the supplier code of the supplier for whom you wish to edit the contacts') . '<br>' . _('When the page is called from within the system this will always be the case') . '<br>' . _('Select a supplier first, then select the link to add/edit/delete contacts'),'info'); include('includes/footer.inc'); @@ -134,34 +134,34 @@ AND suppliercontacts.supplierid = '".$SupplierID."'"; $result = DB_query($sql, $db); - + if (DB_num_rows($result)>0){ echo '<table class=selection><tr><th colspan=7><font size=3 color=navy>' . _('Contacts Defined for') . ' - ' . $myrow['suppname'] . '</font></th></tr>'; - + echo '<tr><th>' . _('Name') . '</th> <th>' . _('Position') . '</th> <th>' . _('Phone No') . '</th> <th>' . _('Fax No') . '</th> <th>' . _('Email') . '</th></tr>'; - + while ($myrow = DB_fetch_array($result)) { - printf("<tr><td>%s</td> + printf('<tr><td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> - <td><a href='mailto:%s'>%s</td> - <td><a href='%s&SupplierID=%s&SelectedContact=%s'>" . _('Edit') . "</td> - <td><a href='%s&SupplierID=%s&SelectedContact=%s&delete=yes' onclick=\"return confirm('" . _('Are you sure you wish to delete this contact?') . "');\">" . _('Delete') . '</td></tr>', + <td><a href="mailto:%s">%s</td> + <td><a href="%s?SupplierID=%s&SelectedContact=%s">' . _('Edit') . '</td> + <td><a href="%s?SupplierID=%s&SelectedContact=%s&delete=yes" onclick=\'return confirm("' . _('Are you sure you wish to delete this contact?') . '");\'>' . _('Delete') . '</td></tr>', $myrow['suppname'], $myrow['position'], $myrow['tel'], $myrow['fax'], $myrow['email'], $myrow['email'], - $_SERVER['PHP_SELF'] . '?' . SID, + $_SERVER['PHP_SELF'], $SupplierID, $myrow['contact'], - $_SERVER['PHP_SELF']. '?' . SID, + $_SERVER['PHP_SELF'], $SupplierID, $myrow['contact']); } @@ -176,13 +176,13 @@ echo '</table><br />'; if (isset($SelectedContact)) { - echo "<div class='centre'><a href='" . $_SERVER['PHP_SELF'] . "?" . SID . "SupplierID=$SupplierID" . "'>" . + echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '?SupplierID=$SupplierID">' . _('Show all the supplier contacts for') . ' ' . $SupplierID . '</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'] . '" />'; if (isset($SelectedContact)) { @@ -207,16 +207,16 @@ $_POST['Fax'] = $myrow['fax']; $_POST['Email'] = $myrow['email']; $_POST['Mobile'] = $myrow['mobile']; - echo "<input type=hidden name='SelectedContact' value='" . $_POST['Contact'] . "'>"; - echo "<input type=hidden name='Contact' value='" . $_POST['Contact'] . "'>"; + echo '<input type=hidden name="SelectedContact" value="' . $_POST['Contact'] . '">'; + echo '<input type=hidden name="Contact" value="' . $_POST['Contact'] . '">'; echo '<table><tr><td>' . _('Contact') . ':</td><td>' . $_POST['Contact'] . '</td></tr>'; } else { //end of if $SelectedContact only do the else when a new record is being entered if (!isset($_POST['Contact'])) { $_POST['Contact']=''; } - echo '<table class=selection><tr><td>' . _('Contact Name') . ":</td> - <td><input type='Text' name='Contact' size=41 maxlength=40 VALUE='" . $_POST['Contact'] . "'></td></tr>"; + echo '<table class=selection><tr><td>' . _('Contact Name') . ':</td> + <td><input type="Text" name="Contact" size=41 maxlength=40 VALUE="' . $_POST['Contact'] . '"></td></tr>'; } if (!isset($_POST['Position'])) { $_POST['Position']=''; @@ -234,20 +234,20 @@ $_POST['Email'] = ''; } - echo "<input type=hidden name='SupplierID' VALUE='" . $SupplierID . "'> - <tr><td>" . _('Position') . ":</td> - <td><input type=text name='Position' size=31 maxlength=30 VALUE='" . $_POST['Position'] . "'></td></tr> - <tr><td>" . _('Telephone No') . ":</td> - <td><input type=text name='Tel' size=31 maxlength=30 VALUE='" . $_POST['Tel'] . "'></td></tr> - <tr><td>" . _('Facsimile No') . ":</td> - <td><input type=text name='Fax' size=31 maxlength=30 VALUE='" . $_POST['Fax'] . "'></td></tr> - <tr><td>" . _('Mobile No') . ":</td> - <td><input type=text name='Mobile' size=31 maxlength=30 VALUE='" . $_POST['Mobile'] . "'></td></tr> - <tr><td><a href='Mailto:" . $_POST['Email'] . "'>" . _('Email') . ":</a></td> - <td><input type=text name='Email' size=51 maxlength=50 VALUE='" . $_POST['Email'] . "'></td></tr> - </table><br />"; + echo '<input type=hidden name="SupplierID" VALUE="' . $SupplierID . '"> + <tr><td>' . _('Position') . ':</td> + <td><input type=text name="Position" size=31 maxlength=30 VALUE="' . $_POST['Position'] . '"></td></tr> + <tr><td>' . _('Telephone No') . ':</td> + <td><input type=text name="Tel" size=31 maxlength=30 VALUE="' . $_POST['Tel'] . '"></td></tr> + <tr><td>' . _('Facsimile No') . ':</td> + <td><input type=text name="Fax" size=31 maxlength=30 VALUE="' . $_POST['Fax'] . '"></td></tr> + <tr><td>' . _('Mobile No') . ':</td> + <td><input type=text name="Mobile" size=31 maxlength=30 VALUE="' . $_POST['Mobile'] . '"></td></tr> + <tr><td><a href="Mailto:' . $_POST['Email'] . '">' . _('Email') . ':</a></td> + <td><input type=text name="Email" size=51 maxlength=50 VALUE="' . $_POST['Email'] . '"></td></tr> + </table><br />'; - echo "<div class='centre'><input type='Submit' name='submit' VALUE='" . _('Enter Information') . "'>"; + echo '<div class="centre"><input type="Submit" name="submit" VALUE="' . _('Enter Information') . '">'; echo '</div></form>'; } //end if record deleted no point displaying form to add record Modified: trunk/SupplierInquiry.php =================================================================== --- trunk/SupplierInquiry.php 2011-04-22 07:34:50 UTC (rev 5206) +++ trunk/SupplierInquiry.php 2011-04-22 07:37:08 UTC (rev 5207) @@ -17,7 +17,7 @@ if(!isset($_GET['SupplierID']) AND !isset($_SESSION['SupplierID'])){ echo '<br>' . _('To display the enquiry a Supplier must first be selected from the Supplier selection screen') . - "<br><div class='centre'>><a href='". $rootpath . "/SelectSupplier.php'>" . _('Select a Supplier to Inquire On') . '</a></div>'; + '<br><div class="centre"><a href="'. $rootpath . '/SelectSupplier.php">' . _('Select a Supplier to Inquire On') . '</a></div>'; exit; } else { if (isset($_GET['SupplierID'])){ @@ -133,12 +133,12 @@ } -echo "<table width=90% class=selection><tr><th>" . _('Total Balance') . - "</th><th>" . _('Current') . - "</th><th>" . _('Now Due') . - "</th><th>" . $_SESSION['PastDueDays1'] . '-' . $_SESSION['PastDueDays2'] . +echo '<table width=90% class=selection><tr><th>' . _('Total Balance') . + '</th><th>' . _('Current') . + '</th><th>' . _('Now Due') . + '</th><th>' . $_SESSION['PastDueDays1'] . '-' . $_SESSION['PastDueDays2'] . ' ' . _('Days Overdue') . - "</th><th>" . _('Over') . ' ' . $_SESSION['PastDueDays2'] . ' ' . _('Days Overdue') . '</th></tr>'; + '</th><th>' . _('Over') . ' ' . $_SESSION['PastDueDays2'] . ' ' . _('Days Overdue') . '</th></tr>'; echo '<tr><td class=number>' . number_format($SupplierRecord['balance'],2) . '</td><td class=number>' . number_format(($SupplierRecord['balance'] - $SupplierRecord['due']),2) . @@ -146,10 +146,10 @@ '</td><td class=number>' . number_format(($SupplierRecord['overdue1']-$SupplierRecord['overdue2']) ,2) . '</td><td class=number>' . number_format($SupplierRecord['overdue2'],2) . '</td></tr></table>'; -echo "<br><div class='centre'><form action='" . $_SERVER['PHP_SELF'] . "?" . SID . "' method=post>"; +echo '<br><div class="centre"><form action="' . $_SERVER['PHP_SELF'] . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo _('Show all transactions after') . ': ' ."<input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='TransAfterDate' VALUE='" . - $_POST['TransAfterDate'] . "' maxlength =10 size=10> <input type=submit name='Refresh Inquiry' VALUE='" . _('Refresh Inquiry') . "'></form><br>"; +echo _('Show all transactions after') . ': ' .'<input type=text class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="TransAfterDate" VALUE="' . + $_POST['TransAfterDate'] . '" maxlength =10 size=10> <input type=submit name="Refresh Inquiry" VALUE="' . _('Refresh Inquiry') . '"></form><br>'; echo '</div>'; $DateAfterCriteria = FormatDateForSQL($_POST['TransAfterDate']); @@ -189,16 +189,16 @@ echo '<table width="90%" cellpadding="2" colspan="7" class=selection>'; -$TableHeader = "<tr BGCOLOR =#800000><th>" . _('Trans') . ' #' . - "</th><th>" . _('Type') . - "</th><th>" . _('Supplier Ref') . - "</th><th>" . _('Date') . - "</th><th>" . _('Total') . - "</th><th>" . _('Allocated') . - "</th><th>" . _('Balance') . - "</th><th>" . _('Comments') . - "</th><th>" . _('More Info') . - "</th><th>" . _('More Info') . '</td></tr>'; +$TableHeader = '<tr BGCOLOR =#800000><th>' . _('Trans') . ' #' . + '</th><th>' . _('Type') . + '</th><th>' . _('Supplier Ref') . + '</th><th>' . _('Date') . + '</th><th>' . _('Total') . + '</th><th>' . _('Allocated') . + '</th><th>' . _('Balance') . + '</th><th>' . _('Comments') . + '</th><th>' . _('More Info') . + '</th><th>' . _('More Info') . '</td></tr>'; echo $TableHeader; @@ -232,25 +232,25 @@ /*The trans is settled so don't show option to hold */ - echo "<td>".$myrow['transno']."</td>"; - echo "<td>".$myrow['typename']."</td>"; - echo "<td>".$myrow['suppreference']."</td>"; - echo "<td>".ConvertSQLDate($myrow['trandate'])."</td>"; - echo "<td class=number>".number_format($myrow['totalamount'],2)."</td>"; - echo "<td class=number>".number_format($myrow['allocated'],2)."</td>"; - echo "<td class=number>".number_format($myrow['totalamount']-$myrow['allocated'],2)."</td>"; - echo "<td align=left>".$myrow['transtext']."</td>"; - echo "<td><a target='_blank' href='".$rootpath."/GLTransInquiry.php?".SID."&TypeID=".$myrow['type']."&TransNo=".$myrow['transno']."'>" . _('View GL Postings') . "</a></td>"; - echo "<td><a href='".$rootpath."/PaymentAllocations.php?".SID."SuppID=".$myrow['supplierno']."&InvID=".$myrow['suppreference']."'>" . _('View Payments') . "</a></td></tr>"; + echo '<td>'.$myrow['transno'].'</td>'; + echo '<td>'.$myrow['typename'].'</td>'; + echo '<td>'.$myrow['suppreference'].'</td>'; + echo '<td>'.ConvertSQLDate($myrow['trandate']).'</td>'; + echo '<td class=number>'.number_format($myrow['totalamount'],2).'</td>'; + echo '<td class=number>'.number_format($myrow['allocated'],2).'</td>'; + echo '<td class=number>'.number_format($myrow['totalamount']-$myrow['allocated'],2).'</td>'; + echo '<td align=left>'.$myrow['transtext'].'</td>'; + echo '<td><a target="_blank" href="'.$rootpath.'/GLTransInquiry.php?TypeID='.$myrow['type'].'&TransNo='.$myrow['transno'].'">' . _('View GL Postings') . '</a></td>'; + echo '<td><a href="'.$rootpath.'/PaymentAllocations.php?SuppID='.$myrow['supplierno'].'&InvID='.$myrow['suppreference'].'">' . _('View Payments') . '</a></td></tr>'; } else { - echo "<td>".$myrow['transno']."</td>"; - echo "<td>".$myrow['typename']."</td>"; - echo "<td>".$myrow['suppreference']."</td>"; - echo "<td>".ConvertSQLDate($myrow['trandate'])."</td>"; - echo "<td class=number>".number_format($myrow['totalamount'],2)."</td>"; - echo "<td class=number>".number_format($myrow['allocated'],2)."</td>"; - echo "<td class=number>".number_format($myrow['totalamount'] - $myrow['allocated'],2)."</td>"; - echo "<td align=left>".$myrow['transtext']."</td>"; + echo '<td>'.$myrow['transno'].'</td>'; + echo '<td>'.$myrow['typename'].'</td>'; + echo '<td>'.$myrow['suppreference'].'</td>'; + echo '<td>'.ConvertSQLDate($myrow['trandate']).'</td>'; + echo '<td class=number>'.number_format($myrow['totalamount'],2).'</td>'; + echo '<td class=number>'.number_format($myrow['allocated'],2).'</td>'; + echo '<td class=number>'.number_format($myrow['totalamount'] - $myrow['allocated'],2).'</td>'; + echo '<td align=left>'.$myrow['transtext'].'</td>'; $authsql="SELECT offhold FROM purchorderauth WHERE userid='".$_SESSION['UserID'] . @@ -258,17 +258,15 @@ $authresult=DB_query($authsql, $db); $authrow=DB_fetch_array($authresult); if ($authrow[0]==0) { - echo "<td><a href='".$_SERVER['PHP_SELF']."?".SID."&HoldType=".$myrow['type']."&HoldTrans=".$myrow['transno']. - "&HoldStatus=".$HoldValue."&FromDate=".$_POST['TransAfterDate']."'>".$HoldValue."</a></td>"; + echo '<td><a href="'.$_SERVER['PHP_SELF'].'?HoldType='.$myrow['type'].'&HoldTrans='.$myrow['transno'].'&HoldStatus='.$HoldValue.'&FromDate='.$_POST['TransAfterDate'].'">'.$HoldValue.'</a></td>'; } else { if ($HoldValue==_('Release')) { - echo "<td>".$HoldValue."</a></td>"; + echo '<td>'.$HoldValue.'</a></td>'; } else { - echo "<td><a href='".$_SERVER['PHP_SELF']."?".SID."&HoldType=".$myrow['type']."&HoldTrans=".$myrow['transno']. - "&HoldStatus=".$HoldValue."&FromDate=".$_POST['TransAfterDate']."'>".$HoldValue."</a></td>"; + echo '<td><a href="'.$_SERVER['PHP_SELF'].'?HoldType='.$myrow['type'].'&HoldTrans='.$myrow['transno'].'&HoldStatus='.$HoldValue.'&FromDate='.$_POST['TransAfterDate'].'">'.$HoldValue.'</a></td>'; } } - echo "<td><a target='_blank' href='".$rootpath."/GLTransInquiry.php?TypeID=".$myrow['type']."&TransNo=".$myrow['transno']."'>" ._('View GL Postings') . "</a></td></tr>"; + echo '<td><a target="_blank" href="'.$rootpath.'/GLTransInquiry.php?TypeID='.$myrow['type'].'&TransNo='.$myrow['transno'].'">' ._('View GL Postings') . '</a></td></tr>'; } } else { @@ -276,7 +274,7 @@ /*The trans is settled so don't show option to hold */ - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> @@ -284,7 +282,7 @@ <td class=number>%s</td> <td class=number>%s</td> <td align=left>%s</td> - </td></tr>", + </td></tr>', $myrow['transno'], $myrow['typename'], $myrow['suppreference'], @@ -296,7 +294,7 @@ } else { - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> @@ -304,8 +302,8 @@ <td class=number>%s</td> <td class=number>%s</td> <td align=left>%s</td> - <td><a href='%s?%s&HoldType=%s&HoldTrans=%s&HoldStatus=%s&FromDate=%s'>%s</a></td> - <td><a href='%s/PaymentAllocations.php?%sSuppID=%s&InvID=%s'>" . _('View Payments') . "</a></tr>", + <td><a href="%s?%s&HoldType=%s&HoldTrans=%s&HoldStatus=%s&FromDate=%s">%s</a></td> + <td><a href="%s/PaymentAllocations.php?%sSuppID=%s&InvID=%s">' . _('View Payments') . '</a></tr>', $myrow['transno'], $myrow['typename'], $myrow['suppreference'], @@ -321,11 +319,10 @@ $HoldValue, $_POST['TransAfterDate'], $HoldValue, - $rootpath, - SID, - $myrow['supplierno'], - $myrow['suppreference']); - + $rootpath, + SID, + $myrow['supplierno'], + $myrow['suppreference']); } } @@ -333,7 +330,7 @@ if ($_SESSION['CompanyRecord']['gllink_creditors'] == True){ - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> @@ -341,9 +338,9 @@ <td class=number>%s</td> <td class=number>%s</td> <td align=left>%s</td> - <td><a href='%s/SupplierAllocations.php?%sAllocTrans=%s'>" . - _('View Allocations') . "</a></td> - <td><a TARGET='_blank' href='%s/GLTransInquiry.php?%sTypeID=%s&TransNo=%s'>" . + <td><a href="%s/SupplierAllocations.php?%sAllocTrans=%s">' . + _('View Allocations') . '</a></td> + <td><a TARGET="_blank" href="%s/GLTransInquiry.php?%sTypeID=%s&TransNo=%s">' . _('View GL Postings') . '</a></td> </tr>', $myrow['transno'], @@ -364,7 +361,7 @@ } else { /*Not linked to GL */ - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> @@ -372,7 +369,7 @@ <td class=number>%s</td> <td class=number>%s</td> <td align=left>%s</td> - <td><a href='%s/SupplierAllocations.php?%sAllocTrans=%s'>" . _('View Allocations') . '</a></td> + <td><a href="%s/SupplierAllocations.php?%sAllocTrans=%s">' . _('View Allocations') . '</a></td> </tr>', $myrow['transno'], $myrow['typename'], Modified: trunk/SupplierTypes.php =================================================================== --- trunk/SupplierTypes.php 2011-04-22 07:34:50 UTC (rev 5206) +++ trunk/SupplierTypes.php 2011-04-22 07:37:08 UTC (rev 5207) @@ -190,8 +190,8 @@ <td>%s</td> <td>%s</td> <td><a href="%sSelectedType=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedType=%s&delete=yes" onclick=\'return confirm("' . - _('Are you sure you wish to delete this Supplier Type?') . '");\'>' . _('Delete') . '</td> + <td><a href="%sSelectedType=%s&delete=yes" onclick=\'return confirm( + "' . _('Are you sure you wish to delete this Supplier Type?') . '");\'>' . _('Delete') . '</td> </tr>', $myrow[0], $myrow[1], Modified: trunk/TaxGroups.php =================================================================== --- trunk/TaxGroups.php 2011-04-22 07:34:50 UTC (rev 5206) +++ trunk/TaxGroups.php 2011-04-22 07:37:08 UTC (rev 5207) @@ -161,8 +161,8 @@ echo '</div>'; } else { echo '<table class=selection>'; - echo "<tr><th>" . _('Group No') . "</th> - <th>" . _('Tax Group') . "</th></tr>"; + echo '<tr><th>' . _('Group No') . '</th> + <th>' . _('Tax Group') . '</th></tr>'; $k=0; //row colour counter while ($myrow = DB_fetch_array($result)) { @@ -174,16 +174,16 @@ $k=1; } - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> - <td><a href=\"%s&SelectedGroup=%s\">" . _('Edit') . "</a></td> - <td><a href=\"%s&SelectedGroup=%s&Delete=1&GroupID=%s\">" . _('Delete') . "</a></td> - </tr>", + <td><a href="%s?SelectedGroup=%s">' . _('Edit') . '</a></td> + <td><a href="%s?SelectedGroup=%s&Delete=1&GroupID=%s">' . _('Delete') . '</a></td> + </tr>', $myrow['taxgroupid'], $myrow['taxgroupdescription'], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'], $myrow['taxgroupid'], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'], $myrow['taxgroupid'], urlencode($myrow['taxgroupdescription'])); @@ -194,7 +194,7 @@ if (isset($SelectedGroup)) { - echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] ."?" . SID . '">' . _('Review Existing Groups') . '</a></div>'; + echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] .'">' . _('Review Existing Groups') . '</a></div>'; } if (isset($SelectedGroup)) { @@ -346,34 +346,34 @@ $TaxOnTax = _('No'); } - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> - <td><a href=\"%s&SelectedGroup=%s&remove=1&TaxAuthority=%s\">" . _('Remove') . "</a></td> + <td><a href="%s?SelectedGroup=%s&remove=1&TaxAuthority=%s">' . _('Remove') . '</a></td> <td> </td> - <td> </td>", + <td> </td... [truncated message content] |
From: <tim...@us...> - 2011-04-23 07:38:18
|
Revision: 5211 http://weberp.svn.sourceforge.net/weberp/?rev=5211&view=rev Author: tim_schofield Date: 2011-04-23 07:38:12 +0000 (Sat, 23 Apr 2011) Log Message: ----------- XHTML and quoting changes Modified Paths: -------------- trunk/PO_Header.php trunk/includes/Login.php trunk/includes/footer.inc Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2011-04-22 07:52:58 UTC (rev 5210) +++ trunk/PO_Header.php 2011-04-23 07:38:12 UTC (rev 5211) @@ -342,6 +342,7 @@ $_POST['Select'] = $myrow['supplierid']; if (isset($SuppliersReturned )) { echo '<input type="hidden" name="SuppliersReturned" value="' . $SuppliersReturned .'" />'; + echo '<input type="hidden" name="SupplierCode" value="' . $_POST['Select'] .'" />'; } } elseif (DB_num_rows($result_SuppSelect)==0){ prnMsg( _('No supplier records contain the selected text') . ' - ' . Modified: trunk/includes/Login.php =================================================================== --- trunk/includes/Login.php 2011-04-22 07:52:58 UTC (rev 5210) +++ trunk/includes/Login.php 2011-04-23 07:38:12 UTC (rev 5211) @@ -40,9 +40,9 @@ while (false != ($CompanyEntry = $DirHandle->read())){ if (is_dir('companies/' . $CompanyEntry) AND $CompanyEntry != '..' AND $CompanyEntry != '' AND $CompanyEntry!='.svn' AND $CompanyEntry!='.'){ if ($CompanyEntry==$DefaultCompany) { - echo '<option selected value="'.$CompanyEntry.'">'.$CompanyEntry.'</option>'; + echo '<option selected="selected" label="'.$CompanyEntry.'" value="'.$CompanyEntry.'">'.$CompanyEntry.'</option>'; } else { - echo '<option value="'.$CompanyEntry.'">'.$CompanyEntry.'</option>'; + echo '<option label="'.$CompanyEntry.'" value="'.$CompanyEntry.'">'.$CompanyEntry.'</option>'; } } } Modified: trunk/includes/footer.inc =================================================================== --- trunk/includes/footer.inc 2011-04-22 07:52:58 UTC (rev 5210) +++ trunk/includes/footer.inc 2011-04-23 07:38:12 UTC (rev 5211) @@ -20,7 +20,7 @@ echo '<tr>'; echo '<td class="footer">'; - echo '<a href="http://www.web-erp.org" rel="external"><img src="'. $rootpath . '/' . $_SESSION['LogoFile'] . '" width="120" alt="webERP" title="webERP ' . _('Copyright') . ' © webrp.org - ' . date('Y') . '" /></a>'; + echo '<img src="'. $rootpath . '/' . $_SESSION['LogoFile'] . '" width="120" alt="webERP" title="webERP ' . _('Copyright') . ' © webrp.org - ' . date('Y') . '" />'; echo '<br />'; echo '</td></tr>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-04-23 08:22:20
|
Revision: 5214 http://weberp.svn.sourceforge.net/weberp/?rev=5214&view=rev Author: tim_schofield Date: 2011-04-23 08:22:14 +0000 (Sat, 23 Apr 2011) Log Message: ----------- XHTML and quoting changes Modified Paths: -------------- trunk/PO_Header.php trunk/Payments.php trunk/SpecialOrder.php trunk/StockCostUpdate.php trunk/StockLocMovements.php trunk/StockLocStatus.php trunk/StockMovements.php trunk/StockQuantityByDate.php trunk/StockTransferControlled.php trunk/StockUsage.php trunk/SuppTransGLAnalysis.php trunk/SupplierContacts.php trunk/SupplierInquiry.php trunk/SupplierTypes.php trunk/TaxGroups.php trunk/WWW_Access.php trunk/WorkOrderCosting.php trunk/WorkOrderEntry.php trunk/Z_CheckDebtorsControl.php trunk/css/silverwolf/login.css trunk/includes/Login.php trunk/index.php This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-04-23 18:42:42
|
Revision: 5216 http://weberp.svn.sourceforge.net/weberp/?rev=5216&view=rev Author: tim_schofield Date: 2011-04-23 18:42:35 +0000 (Sat, 23 Apr 2011) Log Message: ----------- XHTML and quoting changes Modified Paths: -------------- trunk/AccountSections.php trunk/AgedDebtors.php trunk/AuditTrail.php trunk/BOMIndented.php trunk/BOMListing.php trunk/BOMs.php trunk/BankAccounts.php trunk/COGSGLPostings.php trunk/ConfirmDispatch_Invoice.php trunk/ContractBOM.php trunk/ContractOtherReqts.php trunk/Credit_Invoice.php trunk/Currencies.php trunk/api/api_branches.php trunk/api/api_customers.php trunk/api/api_stock.php trunk/api/api_suppliers.php trunk/config.distrib.php Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2011-04-23 09:57:28 UTC (rev 5215) +++ trunk/AccountSections.php 2011-04-23 18:42:35 UTC (rev 5216) @@ -176,11 +176,11 @@ $result = DB_query($sql,$db,$ErrMsg); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo "<table name='SectionList' class='selection'> + echo '<table name="SectionList" class="selection"> <tr> - <th>" . _('Section Number') . "</th> - <th>" . _('Section Description') . "</th> - </tr>"; + <th>' . _('Section Number') . '</th> + <th>' . _('Section Description') . '</th> + </tr>'; $k=0; //row colour counter while ($myrow = DB_fetch_row($result)) { @@ -212,7 +212,7 @@ if (! isset($_GET['delete'])) { - echo "<form method='post' name='AccountSections' action='" . $_SERVER['PHP_SELF'] . '?' . SID . "'>"; + echo '<form method="post" name="AccountSections" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($_GET['SelectedSectionID'])) { @@ -233,10 +233,10 @@ $_POST['SectionID'] = $myrow['sectionid']; $_POST['SectionName'] = $myrow['sectionname']; - echo "<input type=hidden name='SelectedSectionID' value='" . $_POST['SectionID'] . "'>"; - echo "<table class=selection> - <td>" . _('Section Number') . ':' . "</td> - <td>" . $_POST['SectionID'] . "</td>"; + echo '<input type=hidden name="SelectedSectionID" value="' . $_POST['SectionID'] . '">'; + echo '<table class=selection> + <td>' . _('Section Number') . ':' . '</td> + <td>' . $_POST['SectionID'] . '</td>'; } } else { Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2011-04-23 09:57:28 UTC (rev 5215) +++ trunk/AgedDebtors.php 2011-04-23 18:42:35 UTC (rev 5216) @@ -267,9 +267,9 @@ $title = _('Aged Customer Account Analysis') . ' - ' . _('Problem Report') . '.... '; include('includes/header.inc'); echo '<p>' . _('The customer details could not be retrieved by the SQL because') . ' ' . DB_error_msg($db); - 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; @@ -365,7 +365,7 @@ $title = _('Aged Customer Account Analysis') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); echo '<br><br>' . _('The details of outstanding transactions for customer') . ' - ' . $AgedAnalysis['debtorno'] . ' ' . _('could not be retrieved because') . ' - ' . DB_error_msg($db); - echo "<br><a href='$rootpath/index.php'>" . _('Back to the menu') . '</a>'; + echo '<br><a href="'.$rootpath.'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br>' . _('The SQL that failed was') . '<p>' . $sql; } @@ -439,7 +439,7 @@ if ($debug==1){ prnMsg($SQL,'info'); } - echo "<br><a href='$rootpath/index.php'>" . _('Back to the menu') . '</a>'; + echo '<br><a href="'.$rootpath.'/index.php">' . _('Back to the menu') . '</a>'; include('includes/footer.inc'); exit; } @@ -471,31 +471,31 @@ /*if $FromCriteria is not set then show a form to allow input */ - echo '<form action=' . $_SERVER['PHP_SELF'] . " method='post'><table>"; + echo '<form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<tr><td>' . _('From Customer Code') . ':' . "</font></td><td><input tabindex='1' Type=text maxlength=6 size=7 name=FromCriteria value='0'></td></tr>"; - echo '<tr><td>' . _('To Customer Code') . ':' . "</td><td><input tabindex='2' Type=text maxlength=6 size=7 name=ToCriteria value='zzzzzz'></td></tr>"; + echo '<tr><td>' . _('From Customer Code') . ':' . '</font></td><td><input tabindex="1" Type=text maxlength=6 size=7 name=FromCriteria value="0"></td></tr>'; + echo '<tr><td>' . _('To Customer Code') . ':' . '</td><td><input tabindex="2" Type=text maxlength=6 size=7 name=ToCriteria value="zzzzzz"></td></tr>'; - echo '<tr><td>' . _('All balances or overdues only') . ':' . "</td><td><select tabindex='3' name='All_Or_Overdues'>"; - echo "<option selected Value='All'>" . _('All customers with balances'); - echo "<option Value='OverduesOnly'>" . _('Overdue accounts only'); - echo "<option Value='HeldOnly'>" . _('Held accounts only'); + echo '<tr><td>' . _('All balances or overdues only') . ':' . '</td><td><select tabindex="3" name="All_Or_Overdues">'; + echo '<option selected Value="All">' . _('All customers with balances') . '</option>'; + echo '<option Value="OverduesOnly">' . _('Overdue accounts only') . '</option>'; + echo '<option Value="HeldOnly">' . _('Held accounts only') . '</option>'; echo '</select></td></tr>'; - echo '<tr><td>' . _('Only Show Customers Of') . ':' . "</td><td><select tabindex='4' name='Salesman'>"; + echo '<tr><td>' . _('Only Show Customers Of') . ':' . '</td><td><select tabindex="4" name="Salesman">'; $sql = "SELECT salesmancode, salesmanname FROM salesman"; $result=DB_query($sql,$db); - echo "<option value=''></option>"; + echo '<option value=""></option>'; while ($myrow=DB_fetch_array($result)){ - echo "<option value='" . $myrow['salesmancode'] . "'>" . $myrow['salesmanname']; + echo '<option value="' . $myrow['salesmancode'] . '">' . $myrow['salesmanname'] . '</option>'; } echo '</select></td></tr>'; - echo '<tr><td>' . _('Only show customers trading in') . ':' . "</td><td><select tabindex='5' name='Currency'>"; + echo '<tr><td>' . _('Only show customers trading in') . ':' . '</td><td><select tabindex="5" name="Currency">'; $sql = "SELECT currency, currabrev FROM currencies"; @@ -504,17 +504,17 @@ while ($myrow=DB_fetch_array($result)){ if ($myrow['currabrev'] == $_SESSION['CompanyRecord']['currencydefault']){ - echo "<option selected value='" . $myrow['currabrev'] . "'>" . $myrow['currency']; + echo '<option selected value="' . $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; } else { - echo "<option value='" . $myrow['currabrev'] . "'>" . $myrow['currency']; + echo '<option value="' . $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; } } echo '</select></td></tr>'; - echo '<tr><td>' . _('Summary or detailed report') . ':' . "</td> - <td><select tabindex='6' name='DetailedReport'>"; - echo "<option selected value='No'>" . _('Summary Report'); - echo "<option value='Yes'>" . _('Detailed Report'); + echo '<tr><td>' . _('Summary or detailed report') . ':' . '</td> + <td><select tabindex="6" name="DetailedReport">'; + echo '<option selected value="No">' . _('Summary Report'); + echo '<option value="Yes">' . _('Detailed Report'); echo '</select></td></tr>'; echo '</table><br><div class="centre"><input tabindex="7" type=submit name="PrintPDF" value="' . _('Print PDF') , '"></div>'; @@ -523,4 +523,4 @@ } /*end of else not PrintPDF */ -?> +?> \ No newline at end of file Modified: trunk/AuditTrail.php =================================================================== --- trunk/AuditTrail.php 2011-04-23 09:57:28 UTC (rev 5215) +++ trunk/AuditTrail.php 2011-04-23 18:42:35 UTC (rev 5216) @@ -30,42 +30,42 @@ // Get list of users $userresult = DB_query("SELECT userid FROM www_users",$db); -echo '<form action=' . $_SERVER['PHP_SELF'] . '?' . SID . ' method=post>'; +echo '<form action="' . $_SERVER['PHP_SELF'] . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class=selection>'; echo '<tr><td>'. _('From Date') . ' ' . $_SESSION['DefaultDateFormat'] .'</td> - <td><input tabindex="1" type=text class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="FromDate" size="11" maxlength="10" value=' .$_POST['FromDate'].'></td></tr>'; + <td><input tabindex="1" type=text class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="FromDate" size="11" maxlength="10" value="' .$_POST['FromDate'].'"></td></tr>'; echo '<tr><td>'. _('To Date') . ' ' . $_SESSION['DefaultDateFormat'] .'</td> - <td><input tabindex="2" type=text class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="ToDate" size="11" maxlength="10" value=' . $_POST['ToDate'] . '></td></tr>'; + <td><input tabindex="2" type=text class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="ToDate" size="11" maxlength="10" value="' . $_POST['ToDate'] . '"></td></tr>'; // Show user selections echo '<tr><td>'. _('User ID'). '</td> <td><select tabindex="3" name="SelectedUser">'; -echo '<option value=ALL>ALL'; +echo '<option value=ALL>ALL</option>'; while ($users = DB_fetch_row($userresult)) { if (isset($_POST['SelectedUser']) and $users[0]==$_POST['SelectedUser']) { - echo '<option selected value=' . $users[0] . '>' . $users[0]; + echo '<option selected value=' . $users[0] . '>' . $users[0] . '</option>'; } else { - echo '<option value=' . $users[0] . '>' . $users[0]; + echo '<option value=' . $users[0] . '>' . $users[0] . '</option>'; } } echo '</select></td></tr>'; // Show table selections echo '<tr><td>'. _('Table '). '</td><td><select tabindex="4" name="SelectedTable">'; -echo '<option value=ALL>ALL'; +echo '<option value=ALL>ALL</option>'; while ($tables = DB_fetch_row($tableresult)) { if (isset($_POST['SelectedTable']) and $tables[0]==$_POST['SelectedTable']) { - echo '<option selected value=' . $tables[0] . '>' . $tables[0]; + echo '<option selected value=' . $tables[0] . '>' . $tables[0] . '</option>'; } else { - echo '<option value=' . $tables[0] . '>' . $tables[0]; + echo '<option value=' . $tables[0] . '>' . $tables[0] . '</option>'; } } echo '</select></td></tr>'; echo '</table><br />'; -echo "<div class=centre><input tabindex='5' type=submit name=View value='" . _('View') . "'></div>"; +echo '<div class=centre><input tabindex="5" type=submit name=View value="' . _('View') . '"></div>'; echo '</form>'; // View the audit trail @@ -176,7 +176,7 @@ for ($i=1; $i<sizeof($_SESSION['SQLString']['fields']); $i++) { if (isset($_SESSION['SQLString']['values'][$i]) and (trim(str_replace("'","",$_SESSION['SQLString']['values'][$i])) != "") & (trim($_SESSION['SQLString']['fields'][$i]) != 'password') & - (trim($_SESSION['SQLString']['fields'][$i]) != "www_users.password")) { + (trim($_SESSION['SQLString']['fields'][$i]) != 'www_users.password')) { echo '<tr bgcolor='.$RowColour.'>'; echo '<td></td> <td></td> @@ -195,4 +195,4 @@ } include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2011-04-23 09:57:28 UTC (rev 5215) +++ trunk/BOMIndented.php 2011-04-23 18:42:35 UTC (rev 5216) @@ -151,9 +151,9 @@ $title = _('Indented BOM Listing') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The Indented BOM Listing 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; @@ -237,7 +237,7 @@ $title = _('Print Indented BOM Listing Error'); include('includes/header.inc'); prnMsg(_('There were no items for the selected assembly'),'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; } else { @@ -253,21 +253,21 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - 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>' . _('Part') . ":</td>"; - echo "<td><input type ='text' name='Part' size='20'>"; + echo '<tr><td>' . _('Part') . ':</td>'; + echo '<td><input type ="text" name="Part" size="20">'; - echo '<tr><td>' . _('Levels') . ":</td><td><select name='Levels'>"; - echo "<option selected value='All'>" . _('All Levels'); - echo "<option value='One'>" . _('One Level'); + echo '<tr><td>' . _('Levels') . ':</td><td><select name="Levels">'; + echo '<option selected value="All">' . _('All Levels') . '</option>'; + echo '<option value="One">' . _('One Level') . '</option>'; echo '</select></td></tr>'; - 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') . '</option>'; + echo '<option value="no">' . _('Plain Print') . '</option>'; 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/BOMListing.php =================================================================== --- trunk/BOMListing.php 2011-04-23 09:57:28 UTC (rev 5215) +++ trunk/BOMListing.php 2011-04-23 18:42:35 UTC (rev 5216) @@ -48,9 +48,9 @@ $title = _('Bill of Materials Listing') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg(_('The Bill of Material listing could not be retrieved by the SQL because'),'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; @@ -105,20 +105,7 @@ $YPos -=$line_height; $pdf->line($Page_Width-$Right_Margin, $YPos,$Left_Margin, $YPos); - /* - $buf = $pdf->output(); - $len = strlen($buf); - - header('Content-type: application/pdf'); - header('Content-Length: '.$len); - header('Content-Disposition: inline; filename=BOMListing.pdf'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - - $pdf->stream(); - */ - $pdf->OutputD($_SESSION['DatabaseName'] . '_BOMListing_' . date('Y-m-d').'.pdf');//UldisN + $pdf->OutputD($_SESSION['DatabaseName'] . '_BOMListing_' . date('Y-m-d').'.pdf');//UldisN $pdf->__destruct(); //UldisN } else { /*The option to print PDF was not hit */ @@ -131,19 +118,19 @@ /*if $FromCriteria is not set then show a form to allow input */ - 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 Inventory Part Code') . ':' . "</font></td><td><input tabindex='1' type=text name=FromCriteria size=20 maxlength=20 VALUE='1'></td></tr>"; + echo '<tr><td>' . _('From Inventory Part Code') . ':' . '</font></td><td><input tabindex="1" type=text name=FromCriteria size=20 maxlength=20 VALUE="1"></td></tr>'; - echo '<tr><td>' . _('To Inventory Part Code') . ':' . "</td><td><input tabindex='2' type=text name=ToCriteria size=20 maxlength=20 VALUE='zzzzzzz'></td></tr>"; + echo '<tr><td>' . _('To Inventory Part Code') . ':' . '</td><td><input tabindex="2" type=text name=ToCriteria size=20 maxlength=20 VALUE="zzzzzzz"></td></tr>'; - echo "</table><br><div class='centre'><input tabindex='3' type=Submit Name='PrintPDF' Value='" . _('Print PDF') . "'></div>"; - echo "<script>defaultControl(document.forms[0].FromCriteria);</script>"; + echo '</table><br><div class="centre"><input tabindex="3" type=Submit Name="PrintPDF" Value="' . _('Print PDF') . '"></div>'; + echo '<script>defaultControl(document.forms[0].FromCriteria);</script>'; } include('includes/footer.inc');; } /*end of else not PrintPDF */ -?> +?> \ No newline at end of file Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2011-04-23 09:57:28 UTC (rev 5215) +++ trunk/BOMs.php 2011-04-23 18:42:35 UTC (rev 5216) @@ -137,7 +137,7 @@ } else { $QuantityOnHand = number_format($myrow[10],$myrow[11]); } - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> @@ -147,10 +147,10 @@ <td>%s</td> <td>%s</td> <td class=number>%s</td> - <td><a href=\"%s&Select=%s&SelectedComponent=%s\">" . _('Edit') . "</a></td> - <td>".$DrillText."</a></td> - <td><a href=\"%s&Select=%s&SelectedComponent=%s&delete=1&ReSelect=%s\">" . _('Delete') . "</a></td> - </tr>", + <td><a href="%s&Select=%s&SelectedComponent=%s">' . _('Edit') . '</a></td> + <td>'.$DrillText.'</a></td> + <td><a href="%s&Select=%s&SelectedComponent=%s&delete=1&ReSelect=%s">' . _('Delete') . '</a></td> + </tr>', $Level1, $myrow[0], $myrow[1], @@ -496,14 +496,14 @@ echo (($reqnl)?'<br>':'').'<tr><td><div class="centre">'._('Phantom').' : '; $ix = 0; while ($myrow = DB_fetch_array($result)){ - echo (($ix)?', ':'').'<a href="'.$_SERVER['PHP_SELF'] . '?' . SID . 'Select='.$myrow['parent'].'">'. + echo (($ix)?', ':'').'<a href="'.$_SERVER['PHP_SELF'] . '?Select='.$myrow['parent'].'">'. $myrow['description'].' ('.$myrow['parent'].')</a>'; $ix++; } //end while loop echo '</div></td></tr>'; } - echo "</table><br><table class=selection>"; - echo "<tr><th colspan=13><div class='centre'><font color=blue size=3><b>".$SelectedParent ." - " . $myrow[0] . ' ('. $MBdesc. ') </font></b></th></tr>'; + echo '</table><br><table class=selection>'; + echo '<tr><th colspan=13><div class="centre"><font color=blue size=3><b>'.$SelectedParent .' - ' . $myrow[0] . ' ('. $MBdesc. ') </font></b></th></tr>'; // *** POPAD&T $BOMTree = array(); @@ -547,7 +547,7 @@ } } // *** end POPAD&T - echo "</table><br>"; + echo '</table><br>'; if (! isset($_GET['delete'])) { @@ -578,21 +578,21 @@ $_POST['AutoIssue'] = $myrow['autoissue']; prnMsg(_('Edit the details of the selected component in the fields below') . '. <br>' . _('Click on the Enter Information button to update the component details'),'info'); - echo "<br><input type=hidden name='SelectedParent' VALUE='$SelectedParent'>"; - echo "<input type=hidden name='SelectedComponent' VALUE='$SelectedComponent'>"; + echo '<br><input type=hidden name="SelectedParent" VALUE="'.$SelectedParent.'">'; + echo '<input type=hidden name="SelectedComponent" VALUE="'.$SelectedComponent.'">'; echo '<table class=selection>'; - echo "<tr><th colspan=13><div class='centre'><font color=blue size=3><b>". ('Edit Component Details') .'</font></b></th></tr>'; + echo '<tr><th colspan=13><div class="centre"><font color=blue size=3><b>'. ('Edit Component Details') .'</font></b></th></tr>'; echo '<tr><td>' . _('Component') . ':</td><td><b>' . $SelectedComponent . '</b></td></tr>'; } else { //end of if $SelectedComponent - echo "<input type=hidden name='SelectedParent' VALUE='$SelectedParent'>"; + echo '<input type=hidden name="SelectedParent" VALUE="'.$SelectedParent.'">'; /* echo "Enter the details of a new component in the fields below. <br>Click on 'Enter Information' to add the new component, once all fields are completed."; */ echo '<table class=selection>'; - echo "<tr><th colspan=13><div class='centre'><font color=blue size=3><b>". ('New Component Details') .'</font></b></th></tr>'; + echo '<tr><th colspan=13><div class="centre"><font color=blue size=3><b>'. ('New Component Details') .'</font></b></th></tr>'; echo '<tr><td>' . _('Component code') . ':</td><td>'; - echo "<select " . (in_array('ComponentCode',$Errors) ? 'class="selecterror"' : '' ) ." tabindex='1' name='Component'>"; + echo '<select ' . (in_array('ComponentCode',$Errors) ? 'class="selecterror"' : '' ) .' tabindex="1" name="Component">'; if ($ParentMBflag=='A'){ /*Its an assembly */ @@ -627,13 +627,13 @@ while ($myrow = DB_fetch_array($result)) { - echo "<option VALUE=".$myrow['stockid'].'>' . str_pad($myrow['stockid'],21, '_', STR_PAD_RIGHT) . $myrow['description']; + echo '<option VALUE="'.$myrow['stockid'].'">' . str_pad($myrow['stockid'],21, '_', STR_PAD_RIGHT) . $myrow['description'] . '</option>'; } //end while loop echo '</select></td></tr>'; } - echo "<tr><td>" . _('Location') . ": </td><td><select tabindex='2' name='LocCode'>"; + echo '<tr><td>' . _('Location') . ': </td><td><select tabindex="2" name="LocCode">'; DB_free_result($result); $sql = "SELECT locationname, loccode FROM locations"; @@ -641,50 +641,49 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['LocCode']) and $myrow['loccode']==$_POST['LocCode']) { - echo "<option selected VALUE='"; + echo '<option selected VALUE="'.$myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo "<option VALUE='"; + echo '<option VALUE="'.$myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } - echo $myrow['loccode'] . "'>" . $myrow['locationname']; } //end while loop DB_free_result($result); - echo "</select></td></tr><tr><td>" . _('Work Centre Added') . ": </td><td>"; - echo "<select tabindex='3' name='WorkCentreAdded'>"; + echo '</select></td></tr><tr><td>' . _('Work Centre Added') . ': </td><td>'; + echo '<select tabindex="3" name="WorkCentreAdded">'; $sql = "SELECT code, description FROM workcentres"; $result = DB_query($sql,$db); if (DB_num_rows($result)==0){ prnMsg( _('There are no work centres set up yet') . '. ' . _('Please use the link below to set up work centres'),'warn'); - echo "<br><a href='$rootpath/WorkCentres.php?" . SID . "'>" . _('Work Centre Maintenance') . '</a>'; + echo '<br /><a href="'.$rootpath.'/WorkCentres.php">' . _('Work Centre Maintenance') . '</a>'; include('includes/footer.inc'); exit; } while ($myrow = DB_fetch_array($result)) { if (isset($_POST['WorkCentreAdded']) and $myrow['code']==$_POST['WorkCentreAdded']) { - echo "<option selected VALUE='"; + echo '<option selected VALUE="'.$myrow['code'] . '">' . $myrow['description'] . '</option>'; } else { - echo "<option VALUE='"; + echo '<option VALUE="'.$myrow['code'] . '">' . $myrow['description'] . '</option>'; } - echo $myrow['code'] . "'>" . $myrow['description']; } //end while loop DB_free_result($result); - echo "</select></td></tr><tr><td>" . _('Quantity') . ": </td><td> - <input " . (in_array('Quantity',$Errors) ? 'class="inputerror"' : '' ) ." - tabindex='4' type='Text' class=number name='Quantity' class=number size=10 maxlength=8 value="; + echo '</select></td></tr><tr><td>' . _('Quantity') . ': </td><td>'; + ; if (isset($_POST['Quantity'])){ - echo $_POST['Quantity']; + echo '<input ' . (in_array('Quantity',$Errors) ? 'class="inputerror"' : '' ) .' + tabindex="4" type="Text" class=number name="Quantity" class=number size=10 maxlength=8 value="'.$_POST['Quantity'] . '" />'; } else { - echo 1; + echo '<input ' . (in_array('Quantity',$Errors) ? 'class="inputerror"' : '' ) .' + tabindex="4" type="Text" class=number name="Quantity" class=number size=10 maxlength=8 value="1" />'; } - echo "></td></tr>"; + echo '</td></tr>'; if (!isset($_POST['EffectiveTo']) OR $_POST['EffectiveTo']=='') { $_POST['EffectiveTo'] = Date($_SESSION['DefaultDateFormat'],Mktime(0,0,0,Date('m'),Date('d'),(Date('y')+20))); @@ -693,12 +692,12 @@ $_POST['EffectiveAfter'] = Date($_SESSION['DefaultDateFormat'],Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))); } - echo "<tr><td>" . _('Effective After') . " (" . $_SESSION['DefaultDateFormat'] . "):</td> - <td><input " . (in_array('EffectiveAfter',$Errors) ? 'class="inputerror"' : '' ) . - " tabindex='5' type='Text' name='EffectiveAfter' class=date alt='".$_SESSION['DefaultDateFormat']."' size=11 maxlength=10 VALUE=" . $_POST['EffectiveAfter'] ."> - </td></tr><tr><td>" . _('Effective To') . " (" . $_SESSION['DefaultDateFormat'] . "):</td><td> - <input " . (in_array('EffectiveTo',$Errors) ? 'class="inputerror"' : '' ) . - " tabindex='6' type='Text' name='EffectiveTo' class=date alt='".$_SESSION['DefaultDateFormat']."' size=11 maxlength=10 VALUE=" . $_POST['EffectiveTo'] ."></td></tr>"; + echo '<tr><td>' . _('Effective After') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td> + <td><input ' . (in_array('EffectiveAfter',$Errors) ? 'class="inputerror"' : '' ) . + ' tabindex="5" type="Text" name="EffectiveAfter" class=date alt="'.$_SESSION['DefaultDateFormat'].'" size=11 maxlength=10 VALUE=' . $_POST['EffectiveAfter'] .'> + </td></tr><tr><td>' . _('Effective To') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td><td> + <input ' . (in_array('EffectiveTo',$Errors) ? 'class="inputerror"' : '' ) . + ' tabindex="6" type="Text" name="EffectiveTo" class=date alt="'.$_SESSION['DefaultDateFormat'].'" size=11 maxlength=10 VALUE="' . $_POST['EffectiveTo'] .'"></td></tr>'; if ($ParentMBflag=='M' OR $ParentMBflag=='G'){ echo '<tr><td>' . _('Auto Issue this Component to Work Orders') . ':</td> @@ -709,11 +708,11 @@ $_POST['AutoIssue'] = $_SESSION['AutoIssue']; } if ($_POST['AutoIssue']==0) { - echo '<option selected VALUE=0>' . _('No'); - echo '<option VALUE=1>' . _('Yes'); + echo '<option selected VALUE=0>' . _('No') . '</option>'; + echo '<option VALUE=1>' . _('Yes') . '</option>'; } else { - echo '<option selected VALUE=1>' . _('Yes'); - echo '<option VALUE=0>' . _('No'); + echo '<option selected VALUE=1>' . _('Yes') . '</option>'; + echo '<option VALUE=0>' . _('No') . '</option>'; } @@ -722,7 +721,7 @@ echo '<input type=hidden name="AutoIssue" VALUE=0>'; } - echo "</table><br><div class='centre'><input tabindex='8' type='Submit' name='Submit' value='" . _('Enter Information') . "'></form></div>"; + echo '</table><br><div class="centre"><input tabindex="8" type="Submit" name="Submit" value="' . _('Enter Information') . '"></form></div>'; } //end if record deleted no point displaying form to add record @@ -791,16 +790,16 @@ if (!isset($SelectedParent)) { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title; - echo "<form action=" . $_SERVER['PHP_SELF'] . "?" . SID ." method=post>" . - '<div class="page_help_text">'. _('Select a manufactured part') . " (" . _('or Assembly or Kit part') . ") " . - _('to maintain the bill of material for using the options below') . "." . "<br><font size=1>" . - _('Parts must be defined in the stock item entry') . "/" . _('modification screen as manufactured') . - ", " . _('kits or assemblies to be available for construction of a bill of material') .'</div>'. - "</font><br><table class=selection cellpadding=3 colspan=4><tr><td><font size=1>" . _('Enter text extracts in the') . - " <b>" . _('description') . "</b>:</font></td><td><input tabindex='1' type='Text' name='Keywords' size=20 maxlength=25></td> - <td><font size=3><b>" . _('OR') . "</b></font></td><td><font size=1>" . _('Enter extract of the') . - " <b>" . _('Stock Code') . "</b>:</font></td><td><input tabindex='2' type='Text' name='StockCode' size=15 maxlength=18></td> - </tr></table><br><div class='centre'><input tabindex='3' type=submit name='Search' VALUE=" . _('Search Now') . "></div>"; + echo '<form action=' . $_SERVER['PHP_SELF'] . '" method=post>' . + '<div class="page_help_text">'. _('Select a manufactured part') . ' (' . _('or Assembly or Kit part') . ') ' . + _('to maintain the bill of material for using the options below') . '.' . '<br><font size=1>' . + _('Parts must be defined in the stock item entry') . '/' . _('modification screen as manufactured') . + ', ' . _('kits or assemblies to be available for construction of a bill of material') .'</div>'. + '</font><br><table class=selection cellpadding=3 colspan=4><tr><td><font size=1>' . _('Enter text extracts in the') . + ' <b>' . _('description') . '</b>:</font></td><td><input tabindex="1" type="Text" name="Keywords" size=20 maxlength=25></td> + <td><font size=3><b>' . _('OR') . '</b></font></td><td><font size=1>' . _('Enter extract of the') . + ' <b>' . _('Stock Code') . '</b>:</font></td><td><input tabindex="2" type="Text" name="StockCode" size=15 maxlength=18></td> + </tr></table><br><div class="centre"><input tabindex="3" type=submit name="Search" value="' . _('Search Now') . '"></div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($_POST['Search']) and isset($result) AND !isset($SelectedParent)) { @@ -830,10 +829,10 @@ $StockOnHand = number_format($myrow['totalonhand'],2); } $tab = $j+3; - printf("<td><input tabindex='".$tab."' type=submit name='Select' VALUE='%s'</td> + printf('<td><input tabindex="'.$tab.'" type=submit name="Select" VALUE="%s" /></td> <td>%s</td> <td class=number>%s</td> - <td>%s</td></tr>", + <td>%s</td></tr>', $myrow['stockid'], $myrow['description'], $StockOnHand, @@ -856,7 +855,7 @@ echo "<script>defaultControl(document.form.JournalProcessDate);</script>"; } -echo "</form>"; +echo '</form>'; } //end StockID already selected Modified: trunk/BankAccounts.php =================================================================== --- trunk/BankAccounts.php 2011-04-23 09:57:28 UTC (rev 5215) +++ trunk/BankAccounts.php 2011-04-23 18:42:35 UTC (rev 5216) @@ -193,14 +193,14 @@ echo '<table class="selection">'; - echo "<tr><th>" . _('GL Account Code') . "</th> - <th>" . _('Bank Account Name') . "</th> - <th>" . _('Bank Account Code') . "</th> - <th>" . _('Bank Account Number') . "</th> - <th>" . _('Bank Address') . "</th> - <th>" . _('Currency') . "</th> - <th>" . _('Default for Invoices') . "</th> - </tr>"; + echo '<tr><th>' . _('GL Account Code') . '</th> + <th>' . _('Bank Account Name') . '</th> + <th>' . _('Bank Account Code') . '</th> + <th>' . _('Bank Account Number') . '</th> + <th>' . _('Bank Address') . '</th> + <th>' . _('Currency') . '</th> + <th>' . _('Default for Invoices') . '</th> + </tr>'; $k=0; //row colour counter while ($myrow = DB_fetch_row($result)) { @@ -216,16 +216,16 @@ } else { $defacc=_('Yes'); } - printf("<td>%s<br><font size=2>%s</font></td> + printf('<td>%s<br><font size=2>%s</font></td> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> - <td><a href=\"%s?SelectedBankAccount=%s\">" . _('Edit') . "</td> - <td><a href=\"%s?SelectedBankAccount=%s&delete=1\">" . _('Delete') . "</td> - </tr>", + <td><a href="%s?SelectedBankAccount=%s">' . _('Edit') . '</td> + <td><a href="%s?SelectedBankAccount=%s&delete=1">' . _('Delete') . '</td> + </tr>', $myrow[0], $myrow[2], $myrow[3], @@ -247,12 +247,12 @@ } if (isset($SelectedBankAccount)) { - echo '<p>'; + echo '<br />'; echo '<div class="centre"><p><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '">' . _('Show All Bank Accounts Defined') . '</a></div>'; - echo '<p>'; + echo '<br />'; } -echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . ">"; +echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedBankAccount) AND !isset($_GET['delete'])) { @@ -285,7 +285,7 @@ echo $_POST['AccountCode'] . '</td></tr>'; } else { //end of if $Selectedbank account only do the else when a new record is being entered echo '<table class=selection><tr><td>' . _('Bank Account GL Code') . - ":</td><td><Select tabindex='1' " . (in_array('AccountCode',$Errors) ? 'class="selecterror"' : '' ) ." name='AccountCode'>"; + ':</td><td><Select tabindex="1" ' . (in_array('AccountCode',$Errors) ? 'class="selecterror"' : '' ) .' name="AccountCode">'; $sql = "SELECT accountcode, accountname @@ -298,11 +298,10 @@ $result = DB_query($sql,$db); while ($myrow = DB_fetch_array($result)) { if (isset($_POST['AccountCode']) and $myrow['accountcode']==$_POST['AccountCode']) { - echo '<option selected VALUE='; + echo '<option selected VALUE="'.$myrow['accountcode'] . '">' . $myrow['accountname'] . '</option>'; } else { - echo '<option VALUE='; + echo '<option VALUE="'.$myrow['accountcode'] . '">' . $myrow['accountname'] . '</option>'; } - echo $myrow['accountcode'] . '>' . $myrow['accountname']; } //end while loop @@ -339,11 +338,10 @@ $result = DB_query("SELECT currabrev, currency FROM currencies",$db); while ($myrow = DB_fetch_array($result)) { if ($myrow['currabrev']==$_POST['CurrCode']) { - echo '<option selected VALUE='; + echo '<option selected VALUE="'.$myrow['currabrev'] . '">' . $myrow['currabrev'] . '</option>'; } else { - echo '<option VALUE='; + echo '<option VALUE="'.$myrow['currabrev'] . '">' . $myrow['currabrev'] . '</option>'; } - echo $myrow['currabrev'] . '>' . $myrow['currabrev']; } //end while loop echo '</select></td>'; @@ -374,4 +372,4 @@ echo '</form>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/COGSGLPostings.php =================================================================== --- trunk/COGSGLPostings.php 2011-04-23 09:57:28 UTC (rev 5215) +++ trunk/COGSGLPostings.php 2011-04-23 18:42:35 UTC (rev 5216) @@ -275,11 +275,10 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['Area']) and $myrow['areacode']==$_POST['Area']) { - echo '<option selected VALUE="'; + echo '<option selected VALUE="'.$myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; } else { - echo '<option VALUE="'; + echo '<option VALUE="'.$myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; } - echo $myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; } //end while loop DB_free_result($result); @@ -294,11 +293,10 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['StkCat']) and $myrow["categoryid"]==$_POST['StkCat']) { - echo '<option selected VALUE="'; + echo '<option selected VALUE="'.$myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } else { - echo '<option VALUE="'; + echo '<option VALUE="'.$myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } - echo $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } //end while loop @@ -314,11 +312,10 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SalesType']) and $myrow['typeabbrev']==$_POST['SalesType']) { - echo '<option selected VALUE="'; + echo '<option selected VALUE="'.$myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; } else { - echo '<option VALUE="'; + echo '<option VALUE="'.$myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; } - echo $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; } //end while loop @@ -340,11 +337,10 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['GLCode']) and $myrow['accountcode']==$_POST['GLCode']) { - echo '<option selected VALUE="'; + echo '<option selected VALUE="'.$myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; } else { - echo '<option VALUE="'; + echo '<option VALUE="'.$myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; } - echo $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; } //end while loop Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-04-23 09:57:28 UTC (rev 5215) +++ trunk/ConfirmDispatch_Invoice.php 2011-04-23 18:42:35 UTC (rev 5216) @@ -390,7 +390,7 @@ if (!isset($_POST['ProcessInvoice'])) { echo '<td><a href="' . $rootpath . '/ConfirmDispatchControlled_Invoice.php?' . SID . '&LineNo='. $LnItm->LineNumber.'">'; if ($LnItm->Serialised==1){ - echo _("Enter Serial Numbers"); + echo _('Enter Serial Numbers'); } else { /*Just batch/roll/lot control */ echo _('Enter Batch/Roll/Lot #'); } @@ -404,7 +404,7 @@ } }//end foreach ($line) -/*Don't re-calculate freight if some of the order has already been delivered - +/*Do not re-calculate freight if some of the order has already been delivered - depending on the business logic required this condition may not be required. It seems unfair to charge the customer twice for freight if the order was not fully delivered the first time ?? */ @@ -1657,7 +1657,7 @@ <input type=submit tabindex='.$j.' name=Update Value=' . _('Update'). '><br>'; $j++; - echo '<br><input type=submit tabindex='.$j.' name="ProcessInvoice" Value="'._('Process Invoice').'"</div>'; + echo '<br><input type=submit tabindex='.$j.' name="ProcessInvoice" Value="'._('Process Invoice').'" /></div>'; echo '<input type=hidden name="ShipVia" VALUE="' . $_SESSION['Items']->ShipVia . '">'; } @@ -1665,4 +1665,4 @@ echo '</form>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php 2011-04-23 09:57:28 UTC (rev 5215) +++ trunk/ContractBOM.php 2011-04-23 18:42:35 UTC (rev 5216) @@ -11,7 +11,7 @@ $identifier=$_GET['identifier']; -/* If a contract header doesn't exist, then go to +/* If a contract header does n0t exist, then go to * Contracts.php to create one */ Modified: trunk/ContractOtherReqts.php =================================================================== --- trunk/ContractOtherReqts.php 2011-04-23 09:57:28 UTC (rev 5215) +++ trunk/ContractOtherReqts.php 2011-04-23 18:42:35 UTC (rev 5216) @@ -11,7 +11,7 @@ $identifier=$_GET['identifier']; -/* If a contract header doesn't exist, then go to +/* If a contract header does not exist, then go to * Contracts.php to create one */ Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2011-04-23 09:57:28 UTC (rev 5215) +++ trunk/Credit_Invoice.php 2011-04-23 18:42:35 UTC (rev 5216) @@ -382,10 +382,10 @@ echo '</td>'; echo '<td class=number>' . $DisplayTaxAmount . '</td> - <td class=number>' . $DisplayGrossLineTotal . "</td> - <td><a href='". $_SERVER['PHP_SELF'] . "?" . SID . "&Delete=" . $LnItm->LineNumber . "'>" . _('Delete') . '</a></td></tr>'; + <td class=number>' . $DisplayGrossLineTotal . '</td> + <td><a href="'. $_SERVER['PHP_SELF'] . '?Delete=' . $LnItm->LineNumber . '">' . _('Delete') . '</a></td></tr>'; - echo '<tr'.$RowStarter . "><td colspan=12><TEXTAREA tabindex=".$j." name='Narrative_" . $LnItm->LineNumber . "' cols=100% rows=1>" . $LnItm->Narrative . "</TEXTAREa><br><hr></td></tr>"; + echo '<tr'.$RowStarter . '><td colspan=12><textarea tabindex="'.$j.'" name="Narrative_' . $LnItm->LineNumber . '" cols=100% rows=1>' . $LnItm->Narrative . '</textarea><br><hr></td></tr>'; $j++; } } /*end foreach loop displaying the invoice lines to credit */ @@ -399,8 +399,8 @@ <td colspan=3 class=number>' . _('Freight cost charged on invoice') . '</td> <td class=number>' . number_format($_SESSION['Old_FreightCost'],2) . '</td> <td></td> - <td colspan=2 class=number>' . _('Credit Freight Cost') . "</td> - <td><input tabindex=".$j." type=text class=number size=6 maxlength=6 name='ChargeFreightCost' value=" . $_SESSION['CreditItems']->FreightCost . "></td>"; + <td colspan=2 class=number>' . _('Credit Freight Cost') . '</td> + <td><input tabindex="'.$j.'" type=text class=number size=6 maxlength=6 name="ChargeFreightCost" value="' . $_SESSION['CreditItems']->FreightCost . '"></td>'; echo '<td>'; echo '</td><td>'; @@ -816,7 +816,7 @@ true); } } /* end of assembly explosion and updates */ - /*Update the cart with the recalculated standard cost from the explosion of the assembly's components*/ + /*Update the cart with the recalculated standard cost from the explosion of the assemblys components*/ $_SESSION['CreditItems']->LineItems[$OrderLine->LineNumber]->StandardCost = $StandardCost; $OrderLine->StandardCost = $StandardCost; } @@ -985,7 +985,7 @@ '" . $OrderLine->QtyDispatched . "', '" . $OrderLine->DiscountPercent . "', '" . $OrderLine->StandardCost . "', - '" . ($QtyOnHandPrior +$OrderLine->QtyDispatched) . "'', + '" . ($QtyOnHandPrior +$OrderLine->QtyDispatched) . "', '" . $OrderLine->Narrative . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement records could not be inserted because'); @@ -1447,9 +1447,9 @@ echo '<div class="centre">'._('Credit Note number') . ' ' . $CreditNo . ' ' . _('has been processed'); if ($_SESSION['InvoicePortraitFormat']==0){ - echo "<br/><a href='". $rootpath . "/PrintCustTrans.php?" . SID . "&FromTransNo=" . $CreditNo . "&InvOrCredit=Credit&PrintPDF=True'>" . _('Print this credit note') . '</a>'; + echo '<br/><a href="'. $rootpath . '/PrintCustTrans.php?FromTransNo=' . $CreditNo . '&InvOrCredit=Credit&PrintPDF=True">' . _('Print this credit note') . '</a>'; } else { - echo "<br/><a href='". $rootpath . "/PrintCustTransPortrait.php?" . SID . "&FromTransNo=" . $CreditNo . "&InvOrCredit=Credit&PrintPDF=True'>" . _('Print this credit note') . '</a>'; + echo '<br/><a href="'. $rootpath . '/PrintCustTransPortrait.php?FromTransNo=' . $CreditNo . '&InvOrCredit=Credit&PrintPDF=True">' . _('Print this credit note') . '</a>'; } echo '</div>'; /*end of process credit note */ @@ -1457,9 +1457,9 @@ } else { /*Process Credit NOT set so allow inputs to set up the credit note */ - echo "<br><table class=selection>"; + echo '<br><table class=selection>'; - echo '<tr><td>' . _('Credit Note Type') . "</td><td><select tabindex=".$j." name=CreditType>"; + echo '<tr><td>' . _('Credit Note Type') . '</td><td><select tabindex="'.$j.'" name=CreditType>'; if (!isset($_POST['CreditType']) OR $_POST['CreditType']=="Return"){ echo '<option selected value="Return">' . _('Goods returned to store') . '</option>'; Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2011-04-23 09:57:28 UTC (rev 5215) +++ trunk/Currencies.php 2011-04-23 18:42:35 UTC (rev 5216) @@ -216,17 +216,17 @@ } if ($myrow[1]!=$FunctionalCurrency){ - printf("<td><img src=\"%s\"></td> + printf('<td><img src=\'%s\'></td> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td class=number>%s</td> <td class=number>%s</td> - <td><a href=\"%s&SelectedCurrency=%s\">%s</a></td> - <td><a href=\"%s&SelectedCurrency=%s&delete=1\">%s</a></td> - <td><a href=\"%s/ExchangeRateTrend.php?%s\">" . _('Graph') . "</a></td> - </tr>", + <td><a href="%s&SelectedCurrency=%s">%s</a></td> + <td><a href="%s&SelectedCurrency=%s&delete=1">%s</a></td> + <td><a href="%s/ExchangeRateTrend.php?%s">' . _('Graph') . '</a></td> + </tr>', $ImageFile, $myrow[1], $myrow[0], @@ -243,14 +243,14 @@ $rootpath, SID . '&CurrencyToShow=' . $myrow[1]); } else { - printf("<td><img src=\"%s\"></td> + printf('<td><img src="%s"></td> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td class=number>%s</td> <td colspan=4>%s</td> - </tr>", + </tr>', $ImageFile, $myrow[1], $myrow[0], @@ -273,7 +273,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($SelectedCurrency) AND $SelectedCurrency!='') { @@ -343,4 +343,4 @@ } //end if record deleted no point displaying form to add record include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/api/api_branches.php =================================================================== --- trunk/api/api_branches.php 2011-04-23 09:57:28 UTC (rev 5215) +++ trunk/api/api_branches.php 2011-04-23 18:42:35 UTC (rev 5216) @@ -14,7 +14,7 @@ return $Errors; } -/* Verify that the branch number is valid, and doesn't already +/* Verify that the branch number is valid, and does not already exist.*/ function VerifyBranchNo($DebtorNumber, $BranchNumber, $i, $Errors, $db) { if ((strlen($BranchNumber)<1) or (strlen($BranchNumber)>10)) { @@ -510,7 +510,7 @@ return $Errors; } /* This function takes a debtorno and branch code and returns an associative array containing - the database record for that branch. If the debtor/branch code doesn't exist + the database record for that branch. If the debtor/branch code does not exist then it returns an $Errors array. */ function GetCustomerBranch($DebtorNumber, $BranchCode, $user, $password) { Modified: trunk/api/api_customers.php =================================================================== --- trunk/api/api_customers.php 2011-04-23 09:57:28 UTC (rev 5215) +++ trunk/api/api_customers.php 2011-04-23 18:42:35 UTC (rev 5216) @@ -1,7 +1,7 @@ <?php /* $Id: api_customers.php 4521 2011-03-29 09:04:20Z daintree $*/ -/* Verify that the debtor number is valid, and doesn't already +/* Verify that the debtor number is valid, and does not already exist.*/ function VerifyDebtorNo($DebtorNumber, $i, $Errors, $db) { if ((strlen($DebtorNumber)<1) or (strlen($DebtorNumber)>10)) { @@ -246,7 +246,7 @@ names of the fields in the debtorsmaster table, and the values are the values to insert. The only mandatory fields are the debtorno, name, currency code, sales type, payment terms, and reason code - fields. If the other fields aren't set, then the database defaults + fields. If the other fields are not set, then the database defaults are used. The function returns an array called $Errors. The database is only updated if the $Errors is empty, else the function returns an array of one to many error codes. @@ -498,7 +498,7 @@ } /* This function takes a debtorno and returns an associative array containing - the database record for that debtor. If the debtor number doesn't exist + the database record for that debtor. If the debtor number does not exist then it returns an $Errors array. */ function GetCustomer($DebtorNumber, $user, $password) { Modified: trunk/api/api_stock.php =================================================================== --- trunk/api/api_stock.php 2011-04-23 09:57:28 UTC (rev 5215) +++ trunk/api/api_stock.php 2011-04-23 18:42:35 UTC (rev 5216) @@ -268,7 +268,7 @@ names of the fields in the stockmaster table, and the values are the values to insert. The only mandatory fields are the stockid, description, long description, category, and tax category - fields. If the other fields aren't set, then the database defaults + fields. If the other fields are not set, then the database defaults are used. The function returns an array called $Errors. The database is only updated if the $Errors is empty, else the function returns an array of one to many error codes. @@ -386,7 +386,7 @@ names of the fields in the stockmaster table, and the values are the values to update. The only mandatory fields are the stockid, description, long description, category, and tax category - fields. If the other fields aren't set, then the database defaults + fields. If the other fields are not set, then the database defaults are used. The function returns an array called $Errors. The database is only updated if the $Errors is empty, else the function returns an array of one to many error codes. @@ -495,7 +495,7 @@ } /* This function takes a stock code and returns an associative array containing - the database record for that item. If the stock item number doesn't exist + the database record for that item. If the stock item number does not exist then it returns an $Errors array. */ function GetStockItem($StockID, $user, $password) { Modified: trunk/api/api_suppliers.php =================================================================== --- trunk/api/api_suppliers.php 2011-04-23 09:57:28 UTC (rev 5215) +++ trunk/api/api_suppliers.php 2011-04-23 18:42:35 UTC (rev 5216) @@ -1,7 +1,7 @@ <?php /* $Id: api_suppliers.php 4521 2011-03-29 09:04:20Z daintree $*/ -/* Verify that the supplier number is valid, and doesn't already +/* Verify that the supplier number is valid, and does not already exist.*/ function VerifySupplierNo($SupplierNumber, $i, $Errors, $db) { if ((strlen($SupplierNumber)<1) or (strlen($SupplierNumber)>10)) { @@ -306,7 +306,7 @@ } /* This function takes a supplier id and returns an associative array containing - the database record for that supplier. If the supplier id doesn't exist + the database record for that supplier. If the supplier id does not exist then it returns an $Errors array. */ function GetSupplier($SupplierID, $user, $password) { Modified: trunk/config.distrib.php =================================================================== --- trunk/config.distrib.php 2011-04-23 09:57:28 UTC (rev 5215) +++ trunk/config.distrib.php 2011-04-23 18:42:35 UTC (rev 5216) @@ -71,7 +71,7 @@ /*The $rootpath is used in most scripts to tell the script the installation details of the files. -NOTE: In some windows installation this command doesn't work and the administrator must set this to the path of the installation manually: +NOTE: In some windows installation this command does not work and the administrator must set this to the path of the installation manually: eg. if the files are under the webserver root directory then rootpath =''; if they are under weberp then weberp is the rootpath - notice no additional slashes are necessary. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-04-24 08:20:34
|
Revision: 5220 http://weberp.svn.sourceforge.net/weberp/?rev=5220&view=rev Author: tim_schofield Date: 2011-04-24 08:20:27 +0000 (Sun, 24 Apr 2011) Log Message: ----------- XHTML and quoting changes Modified Paths: -------------- trunk/AccountSections.php trunk/AuditTrail.php trunk/BOMs.php trunk/PDFLowGP.php trunk/PO_AuthorisationLevels.php trunk/PO_AuthoriseMyOrders.php trunk/PO_Header.php trunk/PO_SelectPurchOrder.php trunk/Payments.php trunk/PcAssignCashToTab.php trunk/PcClaimExpensesFromTab.php trunk/PcTabs.php trunk/Prices.php trunk/Prices_Customer.php trunk/SalesCategories.php trunk/SalesTypes.php trunk/SecurityTokens.php trunk/SelectProduct.php trunk/SelectRecurringSalesOrder.php trunk/SelectSalesOrder.php Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2011-04-24 05:30:33 UTC (rev 5219) +++ trunk/AccountSections.php 2011-04-24 08:20:27 UTC (rev 5220) @@ -70,9 +70,9 @@ $i++; } } - if (strpos($_POST['SectionName'],'&')>0 OR strpos($_POST['SectionName'],"'")>0) { + if (ContainsIllegalCharacters($_POST['SectionName'])) { $InputError = 1; - prnMsg( _('The account section name cannot contain the character') . " '&' " . _('or the character') ." '",'error'); + prnMsg( _('The account section name cannot contain illegal characters') ,'error'); $Errors[$i] = 'SectionName'; $i++; } @@ -250,14 +250,14 @@ if (!isset($_POST['SectionName'])) { $_POST['SectionName']=''; } - echo "<table class='selection'> + echo '<table class="selection"> <tr> - <td>" . _('Section Number') . ':' . '</td> - <td><input tabindex="1" ' . (in_array('SectionID',$Errors) ? 'class="inputerror"' : '' ) ." type='text' name='SectionID' class='number' size='4' maxlength='4' value='" . $_POST['SectionID'] . "' /></td></tr>"; + <td>' . _('Section Number') . ':' . '</td> + <td><input tabindex="1" ' . (in_array('SectionID',$Errors) ? 'class="inputerror"' : '' ) . ' type="text" name="SectionID" class="number" size="4" maxlength="4" value="' . $_POST['SectionID'] . '" /></td></tr>'; } - echo "<tr><td>" . _('Section Description') . ':' . '</td> - <td><input tabindex="2" ' . (in_array('SectionName',$Errors) ? 'class="inputerror"' : '' ) ." type='text' name='SectionName' size='30' maxlength='30' value='" . $_POST['SectionName'] . "' /></td> - </tr>"; + echo '<tr><td>' . _('Section Description') . ':' . '</td> + <td><input tabindex="2" ' . (in_array('SectionName',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="SectionName" size="30" maxlength="30" value="' . $_POST['SectionName'] . '" /></td> + </tr>'; echo '<tr><td colspan="2"><div class="centre"><input tabindex="3" type="submit" name="submit" value="' . _('Enter Information') . '" /></div></td></tr>'; echo '</table><br />'; @@ -273,4 +273,4 @@ } //end if record deleted no point displaying form to add record include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/AuditTrail.php =================================================================== --- trunk/AuditTrail.php 2011-04-24 05:30:33 UTC (rev 5219) +++ trunk/AuditTrail.php 2011-04-24 08:20:27 UTC (rev 5220) @@ -102,7 +102,8 @@ $SQLString = str_replace('SET','',$SQLString); $SQLString = str_replace('WHERE',',',$SQLString); $SQLString = str_replace('AND',',',$SQLString); - $FieldArray = preg_split("/[[:space:]]*([[:alnum:].]+[[:space:]]*=[[:space:]]*(?:'[^']*'|[[:digit:].]+))[[:space:]]*,/", $SQLString, 0, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY); for ($i=0; $i<sizeof($FieldArray); $i++) { + $FieldArray = preg_split("/[[:space:]]*([[:alnum:].]+[[:space:]]*=[[:space:]]*(?:'[^']*'|[[:digit:].]+))[[:space:]]*,/", $SQLString, 0, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY); + for ($i=0; $i<sizeof($FieldArray); $i++) { $Assigment = explode('=', $FieldArray[$i]); $_SESSION['SQLString']['fields'][$i] = $Assigment[0]; if (sizeof($Assigment)>1) { @@ -153,7 +154,7 @@ $RowColour = '#a8ff90'; } if (Query_Type($myrow[2]) == 'UPDATE') { - UpdateQueryInfo(str_replace('UPDATE','',$myrow[2])); + UpdateQueryInfo(str_replace("UPDATE",'',$myrow[2])); $RowColour = '#feff90'; } if (Query_Type($myrow[2]) == 'DELETE') { @@ -177,7 +178,7 @@ if (isset($_SESSION['SQLString']['values'][$i]) and (trim(str_replace("'","",$_SESSION['SQLString']['values'][$i])) != "") & (trim($_SESSION['SQLString']['fields'][$i]) != 'password') & (trim($_SESSION['SQLString']['fields'][$i]) != 'www_users.password')) { - echo '<tr bgcolor='.$RowColour.'>'; + echo '<tr bgcolor="'.$RowColour.'">'; echo '<td></td> <td></td> <td></td> @@ -187,7 +188,7 @@ echo '</tr>'; } } - echo '<tr bgcolor=black><td></td><td></td><td></td><td></td><td></td><td></td></tr>'; + echo '<tr bgcolor=black> <td colspan="6"></td> </tr>'; } unset($_SESSION['SQLString']); } Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2011-04-24 05:30:33 UTC (rev 5219) +++ trunk/BOMs.php 2011-04-24 08:20:27 UTC (rev 5220) @@ -790,7 +790,7 @@ if (!isset($SelectedParent)) { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title; - echo '<form action=' . $_SERVER['PHP_SELF'] . '" method=post>' . + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method=post>' . '<div class="page_help_text">'. _('Select a manufactured part') . ' (' . _('or Assembly or Kit part') . ') ' . _('to maintain the bill of material for using the options below') . '.' . '<br><font size=1>' . _('Parts must be defined in the stock item entry') . '/' . _('modification screen as manufactured') . Modified: trunk/PDFLowGP.php =================================================================== --- trunk/PDFLowGP.php 2011-04-24 05:30:33 UTC (rev 5219) +++ trunk/PDFLowGP.php 2011-04-24 08:20:27 UTC (rev 5220) @@ -72,7 +72,7 @@ include('includes/header.inc'); prnMsg(_('No low GP items 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; } Modified: trunk/PO_AuthorisationLevels.php =================================================================== --- trunk/PO_AuthorisationLevels.php 2011-04-24 05:30:33 UTC (rev 5219) +++ trunk/PO_AuthorisationLevels.php 2011-04-24 08:20:27 UTC (rev 5220) @@ -142,10 +142,8 @@ echo '<td>'.$CanCreate.'</td>'; echo '<td>'.$OffHold.'</td>'; echo '<td class="number">'.number_format($myrow['authlevel'],2).'</td>'; - echo '<td><a href="'.$rootpath.'/PO_AuthorisationLevels.php?Edit=Yes&UserID=' . $myrow['userid'] . - '&Currency='.$myrow['currabrev'].'">'._('Edit').'</td>'; - echo '<td><a href="'.$rootpath.'/PO_AuthorisationLevels.php?Delete=Yes&UserID=' . $myrow['userid'] . - '&Currency='.$myrow['currabrev'].'">'._('Delete').'</td></tr>'; + echo '<td><a href="'.$rootpath.'/PO_AuthorisationLevels.php?Edit=Yes&UserID=' . $myrow['userid'] . '&Currency='.$myrow['currabrev'].'">'._('Edit').'</td>'; + echo '<td><a href="'.$rootpath.'/PO_AuthorisationLevels.php?Delete=Yes&UserID=' . $myrow['userid'] . '&Currency='.$myrow['currabrev'].'">'._('Delete').'</td></tr>'; } echo '</table><br><br>'; Modified: trunk/PO_AuthoriseMyOrders.php =================================================================== --- trunk/PO_AuthoriseMyOrders.php 2011-04-24 05:30:33 UTC (rev 5219) +++ trunk/PO_AuthoriseMyOrders.php 2011-04-24 08:20:27 UTC (rev 5220) @@ -20,8 +20,7 @@ if (substr($key,0,6)=='status') { $orderno=substr($key,6); $status=$_POST['status'.$orderno]; - $comment=date($_SESSION['DefaultDateFormat']).' - '._('Authorised by').' '.'<a href="mailto:'. - $emailrow['email'].'">'.$_SESSION['UserID'].'</a><br>'.$_POST['comment']; + $comment=date($_SESSION['DefaultDateFormat']).' - '._('Authorised by').' '.'<a href="mailto:'. $emailrow['email'].'">'.$_SESSION['UserID'].'</a><br>'.$_POST['comment']; $sql="UPDATE purchorders SET status='".$status."', stat_comment='".$comment."', Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2011-04-24 05:30:33 UTC (rev 5219) +++ trunk/PO_Header.php 2011-04-24 08:20:27 UTC (rev 5220) @@ -780,8 +780,7 @@ echo '<td style="width:50%" valign="top"><table class="selection" width="100%">'; if($_SESSION['ExistingOrder'] != 0 and $_SESSION['PO'.$identifier]->Status == PurchOrder::STATUS_PRINTED){ - echo '<tr><td><a href="' .$rootpath . '/GoodsReceived.php?&PONumber=' . - $_SESSION['PO'.$identifier]->OrderNo . '&identifier='.$identifier.'">'._('Receive this order').'</a></td></tr>'; + echo '<tr><td><a href="' .$rootpath . '/GoodsReceived.php?&PONumber=' . $_SESSION['PO'.$identifier]->OrderNo . '&identifier='.$identifier.'">'._('Receive this order').'</a></td></tr>'; } switch ($_SESSION['PO'.$identifier]->Status) { Modified: trunk/PO_SelectPurchOrder.php =================================================================== --- trunk/PO_SelectPurchOrder.php 2011-04-24 05:30:33 UTC (rev 5219) +++ trunk/PO_SelectPurchOrder.php 2011-04-24 08:20:27 UTC (rev 5220) @@ -20,7 +20,7 @@ } elseif (isset($_POST['SelectedSupplier'])) { $SelectedSupplier = $_POST['SelectedSupplier']; } -echo '<form action="' . $_SERVER['PHP_SELF'] . '?' . SID . '" method=post>'; +echo '<form action="' . $_SERVER['PHP_SELF'] . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($_POST['ResetPart'])) { unset($SelectedStockItem); @@ -379,15 +379,15 @@ $FormatedOrderValue = number_format($myrow['ordervalue'], 2); /* View Supplier Currency Requisition Order Date Initiator Order Total ModifyPage, $myrow["orderno"], $myrow["suppname"], $myrow["currcode"], $myrow["requisitionno"] $FormatedOrderDate, $myrow["initiator"] $FormatedOrderValue Order Status*/ - echo "<td><a href='" . $ViewPurchOrder . "'>" . $myrow['orderno'] . "</a></td> - <td>" . $myrow['suppname'] . "</td> - <td>" . $myrow['currcode'] . "</td> - <td>" . $myrow['requisitionno'] . "</td> - <td>" . $FormatedOrderDate . "</td> - <td>" . $myrow['initiator'] . "</td> - <td class=number>" . $FormatedOrderValue . "</td> - <td>" . _($myrow['status']) . "</td> - </tr>"; + echo '<td><a href="' . $ViewPurchOrder . '">' . $myrow['orderno'] . '</a></td> + <td>' . $myrow['suppname'] . '</td> + <td>' . $myrow['currcode'] . '</td> + <td>' . $myrow['requisitionno'] . '</td> + <td>' . $FormatedOrderDate . '</td> + <td>' . $myrow['initiator'] . '</td> + <td class=number>' . $FormatedOrderValue . '</td> + <td>' . _($myrow['status']) . '</td> + </tr>'; //$myrow['status'] is a string which has gettext translations from PO_Header.php script $j++; Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2011-04-24 05:30:33 UTC (rev 5219) +++ trunk/Payments.php 2011-04-24 08:20:27 UTC (rev 5220) @@ -702,7 +702,7 @@ } -echo '<form action=' . $_SERVER['PHP_SELF'] . '?' . SID . ' method=post>'; +echo '<form action="' . $_SERVER['PHP_SELF'] . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/PcAssignCashToTab.php =================================================================== --- trunk/PcAssignCashToTab.php 2011-04-24 05:30:33 UTC (rev 5219) +++ trunk/PcAssignCashToTab.php 2011-04-24 08:20:27 UTC (rev 5220) @@ -232,12 +232,8 @@ <td>'.ConvertSQLDate($myrow['authorized']).'</td> <td>'.$myrow['notes'].'</td> <td>'.$myrow['receipt'].'</td> - <td><a href="'.$_SERVER['PHP_SELF'] . '?SelectedIndex='.$myrow['counterindex'].'&SelectedTabs=' . - $SelectedTabs . '&Days=' . $Days . '&edit=yes">' . _('Edit') . '</td> - <td><a href="'.$_SERVER['PHP_SELF'] . '?SelectedIndex='.$myrow['counterindex'].'&SelectedTabs=' . - $SelectedTabs . '&Days=' . $Days . '&delete=yes" onclick=\'return confirm("' . - _('Are you sure you wish to delete this code and the expense it may have set up?') . '");\'>' . - _('Delete') . '</td> + <td><a href="'.$_SERVER['PHP_SELF'] . '?SelectedIndex='.$myrow['counterindex'].'&SelectedTabs=' . $SelectedTabs . '&Days=' . $Days . '&edit=yes">' . _('Edit') . '</td> + <td><a href="'.$_SERVER['PHP_SELF'] . '?SelectedIndex='.$myrow['counterindex'].'&SelectedTabs=' . $SelectedTabs . '&Days=' . $Days . '&delete=yes" onclick=\'return confirm("' . _('Are you sure you wish to delete this code and the expense it may have set up?') . '");\'>' . _('Delete') . '</td> </tr>'; }else{ echo '<td>'.ConvertSQLDate($myrow['date']).'</td> Modified: trunk/PcClaimExpensesFromTab.php =================================================================== --- trunk/PcClaimExpensesFromTab.php 2011-04-24 05:30:33 UTC (rev 5219) +++ trunk/PcClaimExpensesFromTab.php 2011-04-24 08:20:27 UTC (rev 5220) @@ -227,7 +227,7 @@ <td>%s</td> <td>%s</td> <td><a href="%sSelectedIndex=%s&SelectedTabs='.$SelectedTabs.'&Days='.$Days.'&edit=yes">' . _('Edit') . '</td> - <td><a href="%sSelectedIndex=%s&SelectedTabs='.$SelectedTabs.'&Days='.$Days.'&delete=yes" onclick="return confirm("' . _('Are you sure you wish to delete this code and the expense it may have set up?') . '");\'>' . _('Delete') . '</td> + <td><a href="%sSelectedIndex=%s&SelectedTabs='.$SelectedTabs.'&Days='.$Days.'&delete=yes" onclick="return confirm("' . _('Are you sure you wish to delete this code and the expense it may have set up?') . '");">' . _('Delete') . '</td> </tr>', ConvertSQLDate($myrow['2']), $Description['0'], Modified: trunk/PcTabs.php =================================================================== --- trunk/PcTabs.php 2011-04-24 05:30:33 UTC (rev 5219) +++ trunk/PcTabs.php 2011-04-24 08:20:27 UTC (rev 5220) @@ -189,7 +189,7 @@ <td>%s</td> <td>%s</td> <td><a href="%sSelectedTab=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedTab=%s&delete=yes" onclick="return confirm("' . _('Are you sure you wish to delete this code and all the description it may have set up?') . '");>' . _('Delete') . '</td> + <td><a href="%sSelectedTab=%s&delete=yes" onclick="return confirm("' . _('Are you sure you wish to delete this code and all the description it may have set up?') . '");">' . _('Delete') . '</td> </tr>', $myrow['tabcode'], $myrow['usercode'], Modified: trunk/Prices.php =================================================================== --- trunk/Prices.php 2011-04-24 05:30:33 UTC (rev 5219) +++ trunk/Prices.php 2011-04-24 08:20:27 UTC (rev 5220) @@ -32,7 +32,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . '</img>' . $title.'</p>'; -echo "<div class=centre><a href='" . $rootpath . '/SelectProduct.php?' . SID . "'>" . _('Back to Items') . '</a></div><br>'; +echo '<div class="centre"><a href="' . $rootpath . '/SelectProduct.php">' . _('Back to Items') . '</a></div><br>'; $result = DB_query("SELECT stockmaster.description, @@ -240,29 +240,26 @@ if (in_array(12,$_SESSION['AllowedPageSecurityTokens'])) { echo '<input type=hidden name="Units" value="' . $myrow['units'] . '">'; - echo "<td>".$myrow['currency']."</td> - <td>".$myrow['sales_type']."</td> - <td>".$myrow['units']."</td> - <td class=number>".$myrow['conversionfactor']."</td> - <td class=number>".$myrow['decimalplaces']."</td> - <td class=number>".number_format($myrow['price'],2)."</td> - <td>".ConvertSQLDate($myrow['startdate'])."</td> - <td>".$EndDateDisplay."</td> - <td><a href='".$_SERVER['PHP_SELF']."?".SID."&Item=".$myrow['stockid']."&TypeAbbrev=".$myrow['typeabbrev']." - &CurrAbrev=".$myrow['currabrev']."&StartDate=".$myrow['startdate']."&EndDate=".$myrow['enddate']."&Edit=1'>" . _('Edit') . "</td> - <td><a href='".$_SERVER['PHP_SELF']."?".SID."&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>'; + echo '<td>'.$myrow['currency'].'</td> + <td>'.$myrow['sales_type'].'</td> + <td>'.$myrow['units'].'</td> + <td class=number>'.$myrow['conversionfactor'].'</td> + <td class=number>'.$myrow['decimalplaces'].'</td> + <td class=number>'.number_format($myrow['price'],2).'</td> + <td>'.ConvertSQLDate($myrow['startdate']).'</td> + <td>'.$EndDateDisplay.'</td> + <td><a href="'.$_SERVER['PHP_SELF'].'?'.SID.'&Item='.$myrow['stockid'].'&TypeAbbrev='.$myrow['typeabbrev'].'&CurrAbrev='.$myrow['currabrev'].'&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</td> + <td><a href="'.$_SERVER['PHP_SELF'].'?'.SID.'&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>'; } else { - echo "<td>".$myrow['currency']."</td> - <td>".$myrow['sales_type']."</td> - <td>".$myrow['units']."</td> - <td class=number>".$myrow['conversionfactor']."</td> - <td class=number>".$myrow['decimalplaces']."</td> - <td class=number>".number_format($myrow['price'],2)."</td> - <td>".ConvertSQLDate($myrow['startdate'])."</td> - <td>".$EndDateDisplay."</td> - </tr>"; + echo '<td>'.$myrow['currency'].'</td> + <td>'.$myrow['sales_type'].'</td> + <td>'.$myrow['units'].'</td> + <td class=number>'.$myrow['conversionfactor'].'</td> + <td class=number>'.$myrow['decimalplaces'].'</td> + <td class=number>'.number_format($myrow['price'],2).'</td> + <td>'.ConvertSQLDate($myrow['startdate']).'</td> + <td>'.$EndDateDisplay.'</td> + </tr>'; } } Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2011-04-24 05:30:33 UTC (rev 5219) +++ trunk/Prices_Customer.php 2011-04-24 08:20:27 UTC (rev 5220) @@ -306,10 +306,8 @@ <td class=number>'.$myrow['conversionfactor'].'</td> <td>'.ConvertSQLDate($myrow['startdate']).'</td> <td>'.$EndDateDisplay.'</td> - <td><a href="'.$_SERVER['PHP_SELF'].'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode']. - '&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</td> - <td><a href="'.$_SERVER['PHP_SELF'].'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate']. - '&EndDate='.$myrow['enddate'].'&delete=yes">' . _('Delete') . '</td></tr>'; + <td><a href="'.$_SERVER['PHP_SELF'].'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</td> + <td><a href="'.$_SERVER['PHP_SELF'].'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&delete=yes">' . _('Delete') . '</td></tr>'; } //END WHILE LIST LOOP } Modified: trunk/SalesCategories.php =================================================================== --- trunk/SalesCategories.php 2011-04-24 05:30:33 UTC (rev 5219) +++ trunk/SalesCategories.php 2011-04-24 08:20:27 UTC (rev 5220) @@ -169,8 +169,7 @@ // ---------------------------------------------------------------------------------------- // Calculate Path for navigation -$CategoryPath = '<a href="'.$_SERVER['PHP_SELF'] . '?' . SID . - '&ParentCategory=NULL">' . _('Main') . '</a>' . " \\ "; +$CategoryPath = '<a href="'.$_SERVER['PHP_SELF'] . '?ParentCategory=NULL">' . _('Main') . '</a>' . " \\ "; $TempPath = ''; if (isset($ParentCategory)) { $TmpParentID = $ParentCategory; @@ -186,8 +185,7 @@ if (DB_num_rows($result) > 0) { $row = DB_fetch_array($result); $LastParentName = $row['salescatname']; - $TempPath = '<a href="'.$_SERVER['PHP_SELF'] . '?' . SID . - '&ParentCategory='.$TmpParentID.'">'.$LastParentName . + $TempPath = '<a href="'.$_SERVER['PHP_SELF'] . '?ParentCategory='.$TmpParentID.'">'.$LastParentName . '</a>'." \\ ".$TempPath; $TmpParentID = $row['parentcatid']; // Set For Next Round } else { @@ -439,14 +437,13 @@ echo '<td>' . $myrow['stockid'] . '</td>'; echo '<td>' . $myrow['description'] . '</td>'; - echo '<td><a href="'.$_SERVER['PHP_SELF'] . '?' . SID . - '&ParentCategory='.$ParentCategory.'&DelStockID='.$myrow['stockid'].'">'. + echo '<td><a href="'.$_SERVER['PHP_SELF'] . 'ParentCategory='.$ParentCategory.'&DelStockID='.$myrow['stockid'].'">'. _('Remove'). '</a></td></tr>'; } echo '</table>'; } else { - prnMsg(_("No Inventory items in this category.")); + prnMsg(_('No Inventory items in this category.')); } DB_free_result($result); } Modified: trunk/SalesTypes.php =================================================================== --- trunk/SalesTypes.php 2011-04-24 05:30:33 UTC (rev 5219) +++ trunk/SalesTypes.php 2011-04-24 08:20:27 UTC (rev 5220) @@ -204,7 +204,7 @@ printf('<td>%s</td> <td>%s</td> <td><a href="%sSelectedType=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedType=%s&delete=yes onclick=\'return confirm("' . _('Are you sure you wish to delete this price list and all the prices it may have set up?') . '");\'>' . _('Delete') . '</td> + <td><a href="%sSelectedType=%s&delete=yes" onclick=\'return confirm("' . _('Are you sure you wish to delete this price list and all the prices it may have set up?') . '");\'>' . _('Delete') . '</td> </tr>', $myrow[0], $myrow[1], Modified: trunk/SecurityTokens.php =================================================================== --- trunk/SecurityTokens.php 2011-04-24 05:30:33 UTC (rev 5219) +++ trunk/SecurityTokens.php 2011-04-24 08:20:27 UTC (rev 5220) @@ -73,8 +73,8 @@ $result= DB_query($sql,$db); while ($myrow = DB_fetch_array($result,$db)){ - echo '<tr><td>'.$myrow[0].'</td><td>'.$myrow[1].'</td><td><a href="' . - $_SERVER['PHP_SELF'] . '?SelectedToken=' . $myrow[0] . '&Action=edit">' . _('Edit') . '</a></td></tr>'; + echo '<tr><td>'.$myrow[0].'</td><td>'.$myrow[1].'</td><td> + <a href="' . $_SERVER['PHP_SELF'] . '?SelectedToken=' . $myrow[0] . '&Action=edit">' . _('Edit') . '</a></td></tr>'; } echo '</table><p></p>'; Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2011-04-24 05:30:33 UTC (rev 5219) +++ trunk/SelectProduct.php 2011-04-24 08:20:27 UTC (rev 5220) @@ -210,7 +210,7 @@ AND stkcatpropid ='" . $PropertyRow['stkcatpropid']."'", $db); $PropValRow = DB_fetch_row($PropValResult); $PropertyValue = $PropValRow[0]; - echo '<form name="CatPropForm" enctype="multipart/form-data" method="post" action="' . $_SERVER['PHP_SELF'] . '?' .SID .'">'; + echo '<form name="CatPropForm" enctype="multipart/form-data" method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><th align="right">' . $PropertyRow['label'] . ':</th>'; switch ($PropertyRow['controltype']) { @@ -380,8 +380,8 @@ } else { echo '<td class="select">' . _('No') . '</td>'; } - echo '<td class="select"><a href="' . $rootpath . '/PO_Header.php?&NewOrder=Yes' . '&SelectedSupplier=' . - $SuppRow['supplierid'] . '&StockID=' . $StockID . '&Quantity='.$SuppRow['minorderqty'].'">' . _('Order') . ' </a></td>'; + echo '<td class="select">'; + echo '<a href="' . $rootpath . '/PO_Header.php?&NewOrder=Yes' . '&SelectedSupplier=' . $SuppRow['supplierid'] . '&StockID=' . $StockID . '&Quantity='.$SuppRow['minorderqty'].'">' . _('Order') . ' </a></td>'; echo '</tr>'; } echo '</table></td>'; @@ -450,8 +450,7 @@ } else { $EOQ = $myrow['eoq']; } - echo '<a href="' . $rootpath . '/PO_Header.php?&NewOrder=Yes' . '&SelectedSupplier=' . $SuppRow['supplierid'] . - '&StockID=' . $StockID . '&Quantity=' . $EOQ . '">' . _('Purchase this Item from') . ' ' . $SuppRow['suppname'] . ' (' . _('default') . ')</a><br />'; + echo '<a href="' . $rootpath . '/PO_Header.php?&NewOrder=Yes' . '&SelectedSupplier=' . $SuppRow['supplierid'] . '&StockID=' . $StockID . '&Quantity=' . $EOQ . '">' . _('Purchase this Item from') . ' ' . $SuppRow['suppname'] . ' (' . _('default') . ')</a><br />'; /**/ } /* end of while */ } /* end of $myrow['mbflag'] == 'B' */ Modified: trunk/SelectRecurringSalesOrder.php =================================================================== --- trunk/SelectRecurringSalesOrder.php 2011-04-24 05:30:33 UTC (rev 5219) +++ trunk/SelectRecurringSalesOrder.php 2011-04-24 08:20:27 UTC (rev 5220) @@ -1,12 +1,11 @@ <?php /* $Id$*/ -//$PageSecurity = 2; include('includes/session.inc'); $title = _('Search Recurring Sales Orders'); include('includes/header.inc'); -echo '<form action=' . $_SERVER['PHP_SELF'] .'?' .SID . ' method=post>'; +echo '<form action="' . $_SERVER['PHP_SELF'] .'" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Inventory Items') . '" alt="" />' . ' ' . $title . '</p>'; @@ -21,20 +20,20 @@ while ($myrow=DB_fetch_array($resultStkLocs)){ if (isset($_POST['StockLocation'])){ if ($myrow['loccode'] == $_POST['StockLocation']){ - echo "<option selected Value='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo "<option Value='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ - echo "<option selected Value='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo "<option Value='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } echo '</select></td></tr></table>'; -echo "<br /><div class=centre><input type=submit name='SearchRecurringOrders' VALUE='" . _('Search Recurring Orders') . "'></div>"; +echo '<br /><div class=centre><input type=submit name="SearchRecurringOrders" VALUE="' . _('Search Recurring Orders') . '"></div>'; if (isset($_POST['SearchRecurringOrders'])){ @@ -74,16 +73,16 @@ echo '<br /><table cellpadding=2 colspan=7 width=90% class=selection>'; - $tableheader = "<tr> - <th>" . _('Modify') . "</th> - <th>" . _('Customer') . "</th> - <th>" . _('Branch') . "</th> - <th>" . _('Cust Order') . " #</th> - <th>" . _('Last Recurrence') . "</th> - <th>" . _('End Date') . "</th> - <th>" . _('Times p.a.') . "</th> - <th>" . _('Order Total') . "</th> - </tr>"; + $tableheader = '<tr> + <th>' . _('Modify') . '</th> + <th>' . _('Customer') . '</th> + <th>' . _('Branch') . '</th> + <th>' . _('Cust Order') . ' #</th> + <th>' . _('Last Recurrence') . '</th> + <th>' . _('End Date') . '</th> + <th>' . _('Times p.a.') . '</th> + <th>' . _('Order Total') . '</th> + </tr>'; echo $tableheader; @@ -100,12 +99,12 @@ $k++; } - $ModifyPage = $rootpath . "/RecurringSalesOrders.php?" . SID . '&ModifyRecurringSalesOrder=' . $myrow['recurrorderno']; + $ModifyPage = $rootpath . '/RecurringSalesOrders.php?ModifyRecurringSalesOrder=' . $myrow['recurrorderno']; $FormatedLastRecurrence = ConvertSQLDate($myrow['lastrecurrence']); $FormatedStopDate = ConvertSQLDate($myrow['stopdate']); $FormatedOrderValue = number_format($myrow['ordervalue'],2); - printf("<td><a href='%s'>%s</a></td> + printf('<td><a href="%s">%s</a></td> <td>%s</td> <td>%s</td> <td>%s</td> @@ -113,7 +112,7 @@ <td>%s</td> <td>%s</td> <td class=number>%s</td> - </tr>", + </tr>', $ModifyPage, $myrow['recurrorderno'], $myrow['name'], Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2011-04-24 05:30:33 UTC (rev 5219) +++ trunk/SelectSalesOrder.php 2011-04-24 08:20:27 UTC (rev 5220) @@ -312,7 +312,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Sales') . '" alt="" />' . ' ' . _('Outstanding Sales Orders') . '</p> '; -echo '<form action=' . $_SERVER['PHP_SELF'] .'?' .SID . ' method=post>'; +echo '<form action="' . $_SERVER['PHP_SELF'] .'" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-04-24 09:39:54
|
Revision: 5224 http://weberp.svn.sourceforge.net/weberp/?rev=5224&view=rev Author: tim_schofield Date: 2011-04-24 09:39:47 +0000 (Sun, 24 Apr 2011) Log Message: ----------- XHTML and quoting changes Modified Paths: -------------- trunk/GLJournal.php trunk/GLTags.php trunk/GoodsReceived.php trunk/MRPDemands.php trunk/OffersReceived.php trunk/SupplierAllocations.php Modified: trunk/GLJournal.php =================================================================== --- trunk/GLJournal.php 2011-04-24 08:43:19 UTC (rev 5223) +++ trunk/GLJournal.php 2011-04-24 09:39:47 UTC (rev 5224) @@ -320,7 +320,7 @@ $_POST['Debit'] = ''; } -echo '</tr><tr><th>' . _('Debit') . "</th>".'<td><input type="text" class="number" Name = "Debit" ' . +echo '</tr><tr><th>' . _('Debit') . '</th><td><input type="text" class="number" Name = "Debit" ' . 'onChange="eitherOr(this, '.'Credit'.')"'. ' Maxlength="12" size="10" value="' . $_POST['Debit'] . '" /></td>'; echo '</tr><tr><th>' . _('Credit') . '</th><td><input type="text" class="number" Name = "Credit" ' . @@ -332,18 +332,18 @@ echo '<td><input type="text" name="GLNarrative" maxlength="100" size="100" value="' . $_POST['GLNarrative'] . '" /></td>'; echo '</tr></table><br />'; /*Close the main table */ -echo "<div class='centre'><input type='submit' name='Process' value='" . _('Accept') . "' /></div><br /><br />"; +echo '<div class="centre"><input type="submit" name="Process" value="' . _('Accept') . '" /></div><br /><br />'; -echo "<table class='selection' width='85%'>"; +echo '<table class="selection" width='85%'>'; echo '<tr><th colspan="6"><div class="centre"><font size="3" color="blue"><b>' . _('Journal Summary') . '</b></font></div></th></tr>'; -echo "<tr> - <th>"._('GL Tag')."</th> - <th>"._('GL Account')."</th> - <th>"._('Debit')."</th> - <th>"._('Credit')."</th> - <th>"._('Narrative').'</th></tr>'; +echo '<tr> + <th>'._('GL Tag').'</th> + <th>'._('GL Account').'</th> + <th>'._('Debit').'</th> + <th>'._('Credit').'</th> + <th>'._('Narrative').'</th></tr>'; $debittotal=0; $credittotal=0; @@ -367,20 +367,20 @@ } else { $tagdescription=$myrow[0]; } - echo "<td>" . $JournalItem->tag . ' - ' . $tagdescription . "</td>"; - echo "<td>" . $JournalItem->GLCode . ' - ' . $JournalItem->GLActName . "</td>"; + echo '<td>' . $JournalItem->tag . ' - ' . $tagdescription . '</td>'; + echo '<td>' . $JournalItem->GLCode . ' - ' . $JournalItem->GLActName . '</td>'; if($JournalItem->Amount>0) { - echo "<td class='number'>" . number_format($JournalItem->Amount,2) . '</td><td></td>'; + echo '<td class="number">' . number_format($JournalItem->Amount,2) . '</td><td></td>'; $debittotal=$debittotal+$JournalItem->Amount; } elseif($JournalItem->Amount<0) { $credit=(-1 * $JournalItem->Amount); - echo "<td></td> - <td class='number'>" . number_format($credit,2) . '</td>'; + echo '<td></td> + <td class="number">' . number_format($credit,2) . '</td>'; $credittotal=$credittotal+$credit; } - echo '<td>' . $JournalItem->Narrative . "</td> - <td><a href='" . $_SERVER['PHP_SELF'] . '?Delete=' . $JournalItem->ID . "'>"._('Delete').'</a></td> + echo '<td>' . $JournalItem->Narrative . '</td> + <td><a href="' . $_SERVER['PHP_SELF'] . '?Delete=' . $JournalItem->ID . '">'._('Delete').'</a></td> </tr>'; } @@ -400,16 +400,16 @@ echo '</table>'; if (ABS($_SESSION['JournalDetail']->JournalTotal)<0.001 AND $_SESSION['JournalDetail']->GLItemCounter > 0){ - echo "<br /><br /><div class='centre'><input type='submit' name='CommitBatch' value='"._('Accept and Process Journal')."' /></div>"; + echo '<br /><br /><div class="centre"><input type="submit" name="CommitBatch" value="'._('Accept and Process Journal').'" /></div>'; } elseif(count($_SESSION['JournalDetail']->GLEntries)>0) { echo '<br /><br />'; prnMsg(_('The journal must balance ie debits equal to credits before it can be processed'),'warn'); } if (!isset($_GET['NewJournal']) or $_GET['NewJournal']=='') { - echo "<script>defaultControl(document.form.GLManualCode);</script>"; + echo '<script>defaultControl(document.form.GLManualCode);</script>'; } else { - echo "<script>defaultControl(document.form.JournalProcessDate);</script>"; + echo '<script>defaultControl(document.form.JournalProcessDate);</script>'; } echo '</form>'; Modified: trunk/GLTags.php =================================================================== --- trunk/GLTags.php 2011-04-24 08:43:19 UTC (rev 5223) +++ trunk/GLTags.php 2011-04-24 09:39:47 UTC (rev 5224) @@ -58,8 +58,8 @@ $result= DB_query($sql,$db); while ($myrow = DB_fetch_array($result,$db)){ - echo '<tr><td>'.$myrow[0].'</td><td>'.$myrow[1].'</td><td><a href="' . - $_SERVER['PHP_SELF'] . '?' . SID . '&SelectedTag=' . $myrow[0] . '&Action=edit">' . _('Edit') . '</a></td></tr>'; + echo '<tr><td>'.$myrow[0].'</td><td>'.$myrow[1].'</td><td> + <a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '&SelectedTag=' . $myrow[0] . '&Action=edit">' . _('Edit') . '</a></td></tr>'; } echo '</table><p></p>'; Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2011-04-24 08:43:19 UTC (rev 5223) +++ trunk/GoodsReceived.php 2011-04-24 09:39:47 UTC (rev 5224) @@ -329,8 +329,7 @@ } echo '<div class="centre"><a href="'.$rootpath.'/PO_SelectOSPurchOrder.php">'. _('Select a different purchase order for receiving goods against').'</a></div>'; - echo '<div class="centre"><a href="'.$rootpath.'/GoodsReceived.php?PONumber=' . - $_SESSION['PO']->OrderNumber . '">'. _('Re-read the updated purchase order for receiving goods against'). '</a></div>'; + echo '<div class="centre"><a href="'.$rootpath.'/GoodsReceived.php?PONumber=' . $_SESSION['PO']->OrderNumber . '">'. _('Re-read the updated purchase order for receiving goods against'). '</a></div>'; unset($_SESSION['PO']->LineItems); unset($_SESSION['PO']); unset($_POST['ProcessGoodsReceived']); Modified: trunk/MRPDemands.php =================================================================== --- trunk/MRPDemands.php 2011-04-24 08:43:19 UTC (rev 5223) +++ trunk/MRPDemands.php 2011-04-24 09:39:47 UTC (rev 5224) @@ -259,7 +259,7 @@ // Lists some in hit List Selection submit button, and uses part number if it is entered or // demandtype - echo '<form action=' . $_SERVER['PHP_SELF'] . ' method=post>'; + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $where = " "; if ($demandtype) { Modified: trunk/OffersReceived.php =================================================================== --- trunk/OffersReceived.php 2011-04-24 08:43:19 UTC (rev 5223) +++ trunk/OffersReceived.php 2011-04-24 09:39:47 UTC (rev 5224) @@ -225,8 +225,7 @@ $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>'); $result = $mail->send(array($Email), 'smtp'); prnMsg(_('The accepted offers from').' '.$SupplierName.' '._('have been converted to purchase orders and an email sent to') - .' '.$Email."\n"._('Please review the order contents').' '.'<a href="'.$rootpath . - '/PO_Header.php?&ModifyOrderNumber=' . $OrderNo.'">'._('here').'</a>"', 'success'); + .' '.$Email."\n"._('Please review the order contents').' '.'<a href="'.$rootpath . '/PO_Header.php?&ModifyOrderNumber=' . $OrderNo.'">'._('here').'</a>', 'success'); } if (sizeOf($rejects)>0){ $MailText=_('This email has been automatically generated by the webERP installation at').' '. Modified: trunk/SupplierAllocations.php =================================================================== --- trunk/SupplierAllocations.php 2011-04-24 08:43:19 UTC (rev 5223) +++ trunk/SupplierAllocations.php 2011-04-24 09:39:47 UTC (rev 5224) @@ -501,7 +501,7 @@ <td>'.$AllocnItem->TransDate.'</td> <td>'.$AllocnItem->SuppRef.'</td> <td class=number>' . number_format($AllocnItem->TransAmount,2) . '</td> - <td class=number>' . number_format($YetToAlloc,2) . '<input type=hidden name="YetToAlloc"' . + <td class=number>' . number_format($YetToAlloc,2) . '<input type=hidden name="YetToAlloc' . $Counter . '" VALUE="' . $YetToAlloc . '"></td>'; if (ABS($AllocnItem->AllocAmt-$YetToAlloc) < 0.01){ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-04-24 18:24:52
|
Revision: 5230 http://weberp.svn.sourceforge.net/weberp/?rev=5230&view=rev Author: tim_schofield Date: 2011-04-24 18:24:45 +0000 (Sun, 24 Apr 2011) Log Message: ----------- XHTML and quoting changes Modified Paths: -------------- trunk/COGSGLPostings.php trunk/ContractBOM.php trunk/CreditStatus.php trunk/CustomerBranches.php trunk/CustomerInquiry.php trunk/CustomerReceipt.php trunk/DailyBankTransactions.php trunk/FreightCosts.php trunk/StockQties_csv.php Modified: trunk/COGSGLPostings.php =================================================================== --- trunk/COGSGLPostings.php 2011-04-24 13:43:43 UTC (rev 5229) +++ trunk/COGSGLPostings.php 2011-04-24 18:24:45 UTC (rev 5230) @@ -106,12 +106,12 @@ $k=1; } - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> - <td><a href=\"%sSelectedCOGSPostingID=%s\">" . _('Edit') . "</td> - <td><a href=\"%sSelectedCOGSPostingID=%s&delete=yes\">". _('Delete') . "</td></tr>", + <td><a href="%sSelectedCOGSPostingID=%s">' . _('Edit') . '</td> + <td><a href="%sSelectedCOGSPostingID=%s&delete=yes">'. _('Delete') . '</td></tr>', $myrow[1], $myrow[2], $myrow[3], @@ -209,13 +209,13 @@ $k++; } - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> - <td><a href=\"%sSelectedCOGSPostingID=%s\">" . _('Edit') . "</td> - <td><a href=\"%sSelectedCOGSPostingID=%s&delete=yes\">" . _('Delete') . "</td> - </tr>", + <td><a href="%sSelectedCOGSPostingID=%s">' . _('Edit') . '</td> + <td><a href="%sSelectedCOGSPostingID=%s&delete=yes">' . _('Delete') . '</td> + </tr>', $myrow[1], $myrow[2], $myrow[3], Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php 2011-04-24 13:43:43 UTC (rev 5229) +++ trunk/ContractBOM.php 2011-04-24 18:24:45 UTC (rev 5230) @@ -212,7 +212,7 @@ } else { prnMsg (_('The item code') . ' ' . $ItemCode . ' ' . _('does not exist in the database and therefore cannot be added to the contract BOM'),'error'); if ($debug==1){ - echo "<br />".$sql; + echo '<br />'.$sql; } include('includes/footer.inc'); exit; @@ -294,9 +294,9 @@ _('Print') . '" alt="" />' . ' ' . _('Search For Stock Items') . '</p>'; echo '<table class="selection"><tr>'; - echo ":</tr><tr><td><select name='StockCat'>"; + echo ':</tr><tr><td><select name="StockCat">'; - echo "<option selected='True' value='All'>" . _('All').'</option>'; + echo '<option selected="true" value="All">' . _('All').'</option>'; while ($myrow1 = DB_fetch_array($result1)) { if (isset($_POST['StockCat']) and $_POST['StockCat']==$myrow1['categoryid']){ echo '<option selected value="'. $myrow1['categoryid'] . '">' . $myrow1['categorydescription'].'</option>'; @@ -325,8 +325,7 @@ <td><input type="text" name="StockCode" size="15" maxlength="18" value="' . $_POST['StockCode'] . '" /></td> </tr> <tr><td></td> - <td><font size="3"><b>' . _('OR') . ' </b></font><font size="2"><a target="_blank" href="'.$rootpath.'/Stocks.php?' . SID . - '">' . _('Create a New Stock Item') . '</a></font></td></tr> + <td><font size="3"><b>' . _('OR') . ' </b></font><font size="2"><a target="_blank" href="'.$rootpath.'/Stocks.php?">' . _('Create a New Stock Item') . '</a></font></td></tr> </table><br /> <div class="centre"><input type="submit" name="Search" value="' . _('Search Now') . '" /> </div><br />'; Modified: trunk/CreditStatus.php =================================================================== --- trunk/CreditStatus.php 2011-04-24 13:43:43 UTC (rev 5229) +++ trunk/CreditStatus.php 2011-04-24 18:24:45 UTC (rev 5230) @@ -169,11 +169,11 @@ $k=1; } - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td>%s</td> - <td><a href=\"%s?SelectedReason=%s\">" . _('Edit') . "</a></td> - <td><a href=\"%s?SelectedReason=%s&delete=1\">". _('Delete') .'</a></td> + <td><a href="%s?SelectedReason=%s">' . _('Edit') . '</a></td> + <td><a href="%s?SelectedReason=%s&delete=1">'. _('Delete') .'</a></td> </tr>', $myrow[0], $myrow[1], @@ -213,9 +213,9 @@ $_POST['ReasonDescription'] = $myrow['reasondescription']; $_POST['DisallowInvoices'] = $myrow['dissallowinvoices']; - echo "<input type=hidden name='SelectedReason' VALUE='" . $SelectedReason . "'>"; - echo "<input type=hidden name='ReasonCode' VALUE='" . $_POST['ReasonCode'] . "'>"; - echo "<table class=selection><tr><td>". _('Status Code') .':</td><td>'; + echo '<input type=hidden name="SelectedReason" VALUE="' . $SelectedReason . '">'; + echo '<input type=hidden name="ReasonCode" VALUE="' . $_POST['ReasonCode'] . '">'; + echo '<table class=selection><tr><td>'. _('Status Code') .':</td><td>'; echo $_POST['ReasonCode'] . '</td></tr>'; } else { //end of if $SelectedReason only do the else when a new record is being entered @@ -224,10 +224,10 @@ } echo '<br><table class=selection> <tr> - <td>'. _('Status Code') .":</td> - <td><input " . (in_array('ReasonCode',$Errors) ? 'class="inputerror"' : '' ) . - " tabindex=1 type='Text' name='ReasonCode' VALUE='". $_POST['ReasonCode'] ."' size=3 maxlength=2></td> - </tr>"; + <td>'. _('Status Code') .':</td> + <td><input ' . (in_array('ReasonCode',$Errors) ? 'class="inputerror"' : '' ) . + ' tabindex=1 type="text" name="ReasonCode" VALUE="'. $_POST['ReasonCode'] .'" size=3 maxlength=2></td> + </tr>'; } if (!isset($_POST['ReasonDescription'])) { @@ -247,4 +247,4 @@ echo '</table><br><div class="centre"><input tabindex=4 type="submit" name="submit" value="' . _('Enter Information') . '"></div></form>'; } //end if record deleted no point displaying form to add record include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-04-24 13:43:43 UTC (rev 5229) +++ trunk/CustomerBranches.php 2011-04-24 18:24:45 UTC (rev 5230) @@ -412,8 +412,7 @@ <td>%s</td> <td>%s</td> <td><a href="%s?DebtorNo=%s&SelectedBranch=%s">%s</td> - <td><a href="%s?DebtorNo=%s&SelectedBranch=%s&delete=yes" onclick=\'return confirm("' . - _('Are you sure you wish to delete this branch?') . '");\'>%s</td></tr>', + <td><a href="%s?DebtorNo=%s&SelectedBranch=%s&delete=yes" onclick=\'return confirm("' . _('Are you sure you wish to delete this branch?') . '");\'>%s</td></tr>', $myrow[10], $myrow[2], $myrow[5], @@ -597,7 +596,7 @@ if (DB_num_rows($result)==0){ echo '</table>'; prnMsg(_('There are no sales people defined as yet') . ' - ' . _('customer branches must be allocated to a sales person') . '. ' . _('Please use the link below to define at least one sales person'),'error'); - echo '<p align="center"><a href="' . $rootpath . '/SalesPeople.php?"' . SID . '">'._('Define Sales People') . '</a>'; + echo '<p align="center"><a href="' . $rootpath . '/SalesPeople.php?">'._('Define Sales People') . '</a>'; include('includes/footer.inc'); exit; } Modified: trunk/CustomerInquiry.php =================================================================== --- trunk/CustomerInquiry.php 2011-04-24 13:43:43 UTC (rev 5229) +++ trunk/CustomerInquiry.php 2011-04-24 18:24:45 UTC (rev 5230) @@ -130,13 +130,13 @@ echo '<br><font color=RED size=4><b>' . _('ACCOUNT ON HOLD') . '</font></b><br>'; } -echo "<table class=selection width=70%> +echo '<table class=selection width=70%> <tr> - <th width=20%>" . _('Total Balance') . "</th> - <th width=20%>" . _('Current') . "</th> - <th width=20%>" . _('Now Due') . "</th> - <th width=20%>" . $_SESSION['PastDueDays1'] . "-" . $_SESSION['PastDueDays2'] . ' ' . _('Days Overdue') . "</th> - <th width=20%>" . _('Over') . ' ' . $_SESSION['PastDueDays2'] . ' ' . _('Days Overdue') . '</th></tr>'; + <th width=20%>' . _('Total Balance') . '</th> + <th width=20%>' . _('Current') . '</th> + <th width=20%>' . _('Now Due') . '</th> + <th width=20%>' . $_SESSION['PastDueDays1'] . '-' . $_SESSION['PastDueDays2'] . ' ' . _('Days Overdue') . '</th> + <th width=20%>' . _('Over') . ' ' . $_SESSION['PastDueDays2'] . ' ' . _('Days Overdue') . '</th></tr>'; echo '<tr><td class=number>' . number_format($CustomerRecord['balance'],2) . '</td> <td class=number>' . number_format(($CustomerRecord['balance'] - $CustomerRecord['due']),2) . '</td> @@ -146,10 +146,10 @@ </tr> </table>'; -echo "<br><div class='centre'><form action='" . $_SERVER['PHP_SELF'] . "' method=post>"; +echo '<br><div class="centre"><form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo _('Show all transactions after') . ": <input tabindex=1 type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' id='datepicker' name='TransAfterDate' Value='" . $_POST['TransAfterDate'] . "' MAXLENGTH =10 size=12>" . - " <input tabindex=2 type=submit name='Refresh Inquiry' value='" . _('Refresh Inquiry') . "'></div></form><br>"; +echo _('Show all transactions after') . ': <input tabindex=1 type=text class="date" alt="'.$_SESSION['DefaultDateFormat'].'" id="datepicker" name="TransAfterDate" Value="' . $_POST['TransAfterDate'] . '" MAXLENGTH =10 size=12>' . + ' <input tabindex=2 type=submit name="Refresh Inquiry" value="' . _('Refresh Inquiry') . '"></div></form><br>'; $DateAfterCriteria = FormatDateForSQL($_POST['TransAfterDate']); @@ -351,8 +351,8 @@ if ($_SESSION['CompanyRecord']['gllink_debtors']== 1 AND in_array(8,$_SESSION['AllowedPageSecurityTokens'])){ printf($BaseFormatString . $PreviewCreditFormatString . - "<td><a href='%s/CustomerAllocations.php?AllocTrans=%s'>" . _('Allocation') . "<IMG SRC='" .$rootpath."/css/".$theme."/images/allocation.png' title='" . _('Click to allocate funds') . "'></a></td> - <td><a href='%s/GLTransInquiry.php?%sTypeID=%s&TransNo=%s'>" . _('View GL Entries') . ' <a><IMG SRC="' .$rootpath.'/css/'.$theme.'/images/gl.png" title="' . _('View the GL Entries') . '"></a></td></tr>', + '<td><a href="%s/CustomerAllocations.php?AllocTrans=%s">' . _('Allocation') . '<img src="' .$rootpath.'/css/'.$theme.'/images/allocation.png" title="' . _('Click to allocate funds') . '"></a></td> + <td><a href="%s/GLTransInquiry.php?%sTypeID=%s&TransNo=%s">' . _('View GL Entries') . ' <a><img src="' .$rootpath.'/css/'.$theme.'/images/gl.png" title="' . _('View the GL Entries') . '"></a></td></tr>', //$BaseFormatString parameters $myrow['typename'], $myrow['transno'], @@ -385,8 +385,8 @@ } else { printf($BaseFormatString . $PreviewCreditFormatString . - "<td><a href='%s/CustomerAllocations.php?AllocTrans=%s'>" . _('Allocation') . "<IMG SRC='%s/allocation.png' title='" . _('Click to allocate funds') . "'></a></td> - </tr>", + '<td><a href="%s/CustomerAllocations.php?AllocTrans=%s">' . _('Allocation') . '<img src="%s/allocation.png" title="' . _('Click to allocate funds') . '"></a></td> + </tr>', $myrow['typename'], $myrow['transno'], ConvertSQLDate($myrow['trandate']), @@ -418,9 +418,9 @@ //If security token 8 in the allowed page security tokens then assumed ok for GL trans inquiries if ($_SESSION['CompanyRecord']['gllink_debtors']== 1 AND in_array(8,$_SESSION['AllowedPageSecurityTokens'])){ printf($BaseFormatString . - "<td><a href='%s/CustomerAllocations.php?AllocTrans=%s'>" . _('Allocation') . "<IMG SRC='" .$rootpath."/css/".$theme."/images/allocation.png' title='" . _('Click to allocate funds') . "'></a></td> - <td><a href='%s/GLTransInquiry.php?%s&TypeID=%s&TransNo=%s'>" . _('View GL Entries') . " <IMG SRC='" .$rootpath."/css/".$theme."/images/gl.png' title='" . _('View the GL Entries') . "'></a></td> - </tr>", + '<td><a href="%s/CustomerAllocations.php?AllocTrans=%s">' . _('Allocation') . '<img src="' .$rootpath.'/css/'.$theme.'/images/allocation.png" title="' . _('Click to allocate funds') . '"></a></td> + <td><a href="%s/GLTransInquiry.php?%s&TypeID=%s&TransNo=%s">' . _('View GL Entries') . ' <img src="' .$rootpath.'/css/'.$theme.'/images/gl.png" title="' . _('View the GL Entries') . '"></a></td> + </tr>', $myrow['typename'], $myrow['transno'], ConvertSQLDate($myrow['trandate']), @@ -439,8 +439,8 @@ $myrow['transno']); } else { //no permission for GLTrans Inquiries printf($BaseFormatString . - "<td><a href='%s/CustomerAllocations.php?AllocTrans=%s'>" . _('Allocation') . "<IMG SRC='" .$rootpath."/css/".$theme."/images/allocation.png' title='" . _('Click to allocate funds') . "'></a></td> - </tr>", + '<td><a href="%s/CustomerAllocations.php?AllocTrans=%s">' . _('Allocation') . '<img src="' .$rootpath.'/css/'.$theme.'/images/allocation.png" title="' . _('Click to allocate funds') . '"></a></td> + </tr>', $myrow['typename'], $myrow['transno'], ConvertSQLDate($myrow['trandate']), @@ -526,4 +526,4 @@ echo '</table>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-04-24 13:43:43 UTC (rev 5229) +++ trunk/CustomerReceipt.php 2011-04-24 18:24:45 UTC (rev 5230) @@ -700,7 +700,7 @@ /*set up the form whatever */ -echo '<form action=' . $_SERVER['PHP_SELF'] . '?Type='.$_GET['Type'] . ' method=post name=form1>'; +echo '<form action="' . $_SERVER['PHP_SELF'] . '?Type='.$_GET['Type'] . '" method="post" name="form1">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /*show the batch header details and the entries in the batch so far */ Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2011-04-24 13:43:43 UTC (rev 5229) +++ trunk/DailyBankTransactions.php 2011-04-24 18:24:45 UTC (rev 5230) @@ -9,7 +9,7 @@ _('Search') . '" alt="" />' . ' ' . $title.'</p>'; if (!isset($_POST['Show'])) { - echo '<form action=' . $_SERVER['PHP_SELF'] . '?' . SID . ' method=post>'; + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class=selection>'; @@ -64,8 +64,8 @@ FROM bankaccounts WHERE bankaccounts.accountcode='" . $_POST['BankAccount'] . "'"; $BankResult = DB_query($SQL,$db,_('Could not retrieve the bank account details')); - - + + $sql="SELECT banktrans.currcode, banktrans.amount, banktrans.functionalexrate, @@ -103,15 +103,15 @@ <th>'._('Amount in').' '.$_SESSION['CompanyRecord']['currencydefault'].'</th> <th>'._('Running Total').' '.$_SESSION['CompanyRecord']['currencydefault'].'</th> </tr>'; - + $AccountCurrTotal=0; $LocalCurrTotal =0; - + while ($myrow = DB_fetch_array($result)){ - + $AccountCurrTotal += $myrow['amount']; $LocalCurrTotal += $myrow['amount']/$myrow['functionalexrate']/$myrow['exrate']; - + echo '<tr> <td>'. ConvertSQLDate($myrow['transdate']) . '</td> <td>'.$myrow['typename'].'</td> @@ -125,12 +125,12 @@ } echo '</table>'; } //end if no bank trans in the range to show - - echo '<form action=' . $_SERVER['PHP_SELF'] . '?' . SID . ' method=post>'; + + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br><div class="centre"><input type="submit" name="Return" value="' . _('Select Another Date'). '"></div>'; echo '</form>'; } include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/FreightCosts.php =================================================================== --- trunk/FreightCosts.php 2011-04-24 13:43:43 UTC (rev 5229) +++ trunk/FreightCosts.php 2011-04-24 18:24:45 UTC (rev 5230) @@ -8,10 +8,6 @@ $title = _('Freight Costs Set Up'); include('includes/header.inc'); -?> - -<?php - if (isset($_GET['LocationFrom'])){ $LocationFrom = $_GET['LocationFrom']; } elseif (isset($_POST['LocationFrom'])){ @@ -33,32 +29,32 @@ if (!isset($LocationFrom) OR !isset($ShipperID)) { - 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'] . '" />'; $sql = "SELECT shippername, shipper_id FROM shippers"; $ShipperResults = DB_query($sql,$db); echo '<table class=selection> <tr> - <td>' . _('Select A Freight Company to set up costs for') . "</td> - <td><select name='ShipperID'>"; + <td>' . _('Select A Freight Company to set up costs for') . '</td> + <td><select name="ShipperID">'; while ($myrow = DB_fetch_array($ShipperResults)){ echo '<option VALUE=' . $myrow['shipper_id'] . '>' . $myrow['shippername']; } echo '</select></td></tr> <tr> - <td>' . _('Select the warehouse') . ' (' . _('ship from location') . ")</td> - <td><select name='LocationFrom'>"; + <td>' . _('Select the warehouse') . ' (' . _('ship from location') . ')</td> + <td><select name="LocationFrom">'; $sql = "SELECT loccode, locationname FROM locations"; $LocationResults = DB_query($sql,$db); while ($myrow = DB_fetch_array($LocationResults)){ - echo '<option VALUE=' . $myrow['loccode'] . '>' . $myrow['locationname']; + echo '<option VALUE=' . $myrow['loccode'] . '>' . $myrow['locationname'] . '</option>'; } - echo "</select></td></tr></table><br><div class='centre'><input type=submit value='" . _('Accept') . "' name='Accept'></div></form>"; + echo '</select></td></tr></table><br><div class="centre"><input type="submit" value="' . _('Accept') . '" name="Accept"></div></form>'; } else { @@ -202,15 +198,15 @@ $result = DB_query($sql,$db); echo '<br><table class=selection>'; - $TableHeader = "<tr> - <th>" . _('Destination') . "</th> - <th>" . _('Cubic Rate') . "</th> - <th>" . _('KG Rate') . "</th> - <th>" . _('MAX KGs') . "</th> - <th>" . _('MAX Volume') . "</th> - <th>" . _('Fixed Price') . "</th> - <th>" . _('Minimum Charge') . "</th> - </tr>"; + $TableHeader = '<tr> + <th>' . _('Destination') . '</th> + <th>' . _('Cubic Rate') . '</th> + <th>' . _('KG Rate') . '</th> + <th>' . _('MAX KGs') . '</th> + <th>' . _('MAX Volume') . '</th> + <th>' . _('Fixed Price') . '</th> + <th>' . _('Minimum Charge') . '</th> + </tr>'; echo $TableHeader; @@ -233,15 +229,15 @@ } - printf("<td>%s</td> + printf('<td>%s</td> <td class=number>%s</td> <td class=number>%s</td> <td class=number>%s</td> <td class=number>%s</td> <td class=number>%s</td> <td class=number>%s</td> - <td><a href=\"%s&SelectedFreightCost=%s&LocationFrom=%s&ShipperID=%s\">" . _('Edit') . "</td> - <td><a href=\"%s&SelectedFreightCost=%s&LocationFrom=%s&ShipperID=%s&delete=yes\">" . _('Delete') . "</td></tr>", + <td><a href="%s&SelectedFreightCost=%s&LocationFrom=%s&ShipperID=%s">' . _('Edit') . '</td> + <td><a href="%s&SelectedFreightCost=%s&LocationFrom=%s&ShipperID=%s&delete=yes">' . _('Delete') . '</td></tr>', $myrow[1], $myrow[2], $myrow[3], @@ -267,12 +263,12 @@ //end of ifs and buts! if (isset($SelectedFreightCost)) { - echo "<div class='centre'><a href='" . $_SERVER['PHP_SELF'] . "?" . SID . '&LocationFrom=' . $LocationFrom . '&ShipperID=' . $ShipperID . "'>" . _('Show all freight costs for') . ' ' . $ShipperName . ' ' . _('from') . ' ' . $LocationName . '</a></div>'; + echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '?LocationFrom=' . $LocationFrom . '&ShipperID=' . $ShipperID . '">' . _('Show all freight costs for') . ' ' . $ShipperName . ' ' . _('from') . ' ' . $LocationName . '</a></div>'; } if (isset($LocationFrom) AND isset($ShipperID)) { - 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($SelectedFreightCost)) { @@ -303,15 +299,15 @@ $_POST['FixedPrice'] = $myrow['fixedprice']; $_POST['MinimumChg'] = $myrow['minimumchg']; - echo "<input type=hidden name='SelectedFreightCost' VALUE=$SelectedFreightCost>"; + echo '<input type=hidden name="SelectedFreightCost" VALUE="'.$SelectedFreightCost.'">'; } else { $_POST['FixedPrice'] = 0; $_POST['MinimumChg'] = 0; } - echo "<input type=hidden name='LocationFrom' value='$LocationFrom'>"; - echo "<input type=hidden name='ShipperID' value=$ShipperID>"; + echo '<input type=hidden name="LocationFrom" value="'.$LocationFrom.'">'; + echo '<input type=hidden name="ShipperID" value="'.$ShipperID.'">'; if (!isset($_POST['Destination'])) {$_POST['Destination']='';} if (!isset($_POST['CubRate'])) {$_POST['CubRate']='';} @@ -322,24 +318,24 @@ echo '<br><table class=selection>'; echo '<tr><th colspan=2><font size=4 color=blue>' . _('For Deliveries From') . ' ' . $LocationName . ' ' . _('using') . ' ' . $ShipperName . '</font></th></tr>'; - echo'<tr><td>' . _('Destination') . ":</td> - <td><input type='text' maxlength=20 size=20 name='Destination' VALUE='" . $_POST['Destination'] . "'></td></tr>"; - echo '<tr><td>' . _('Rate per Cubic Metre') . ":</td> - <td><input type='Text' name='CubRate' class=number size=6 maxlength=5 value=" . $_POST['CubRate'] . "></td></tr>"; - echo '<tr><td>' . _('Rate Per KG') . ":</td> - <td><input type='Text' name='KGRate' class=number size=6 maxlength=5 value=" . $_POST['KGRate'] . "></td></tr>"; - echo '<tr><td>' . _('Maximum Weight Per Package (KGs)') . ":</a></td> - <td><input type='Text' name='MAXKGs' class=number size=8 maxlength=7 value=" . $_POST['MAXKGs'] . "></td></tr>"; - echo '<tr><td>' . _('Maximum Volume Per Package (cubic metres)') . ":</a></td> - <td><input type='Text' name='MAXCub' class=number size=8 maxlength=7 value=" . $_POST['MAXCub'] . "></td></tr>"; - echo '<tr><td>' . _('Fixed Price (zero if rate per KG or Cubic)') . ":</a></td> - <td><input type='Text' name='FixedPrice' class=number size=6 maxlength=5 value=" . $_POST['FixedPrice'] . "></td></tr>"; - echo '<tr><td>' . _('Minimum Charge (0 is N/A)') . ":</a></td> - <td><input type='Text' name='MinimumChg' class=number size=6 maxlength=5 value=" . $_POST['MinimumChg'] . "></td></tr>"; + echo'<tr><td>' . _('Destination') . ':</td> + <td><input type="text" maxlength=20 size=20 name="Destination" VALUE="' . $_POST['Destination'] . '"></td></tr>'; + echo '<tr><td>' . _('Rate per Cubic Metre') . ':</td> + <td><input type="Text" name="CubRate" class="number" size="6" maxlength="5" value="' . $_POST['CubRate'] . '"></td></tr>'; + echo '<tr><td>' . _('Rate Per KG') . ':</td> + <td><input type="Text" name="KGRate" class="number" size="6" maxlength="5" value="' . $_POST['KGRate'] . '"></td></tr>'; + echo '<tr><td>' . _('Maximum Weight Per Package (KGs)') . ':</a></td> + <td><input type="Text" name="MAXKGs" class="number" size="8" maxlength="7" value="' . $_POST['MAXKGs'] . '"></td></tr>'; + echo '<tr><td>' . _('Maximum Volume Per Package (cubic metres)') . ':</a></td> + <td><input type="Text" name="MAXCub" class="number" size="8" maxlength="7" value="' . $_POST['MAXCub'] . '"></td></tr>'; + echo '<tr><td>' . _('Fixed Price (zero if rate per KG or Cubic)') . ':</a></td> + <td><input type="Text" name="FixedPrice" class="number" size="6" maxlength="5" value="' . $_POST['FixedPrice'] . '"></td></tr>'; + echo '<tr><td>' . _('Minimum Charge (0 is N/A)') . ':</a></td> + <td><input type="Text" name="MinimumChg" class="number" size="6" maxlength="5" value="' . $_POST['MinimumChg'] . '"></td></tr>'; echo '</table><br>'; - 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/StockQties_csv.php =================================================================== --- trunk/StockQties_csv.php 2011-04-24 13:43:43 UTC (rev 5229) +++ trunk/StockQties_csv.php 2011-04-24 18:24:45 UTC (rev 5230) @@ -42,7 +42,7 @@ fclose($fp); -echo '<br /><a href="' . $rootpath . '/' . $_SESSION['reports_dir'] . '/StockQties.csv ">' . _('click here') . '</a> ' . _('to view the file') . '</div>'; +echo '<br /><div class="centre"><a href="' . $rootpath . '/' . $_SESSION['reports_dir'] . '/StockQties.csv ">' . _('click here') . '</a> ' . _('to view the file') . '</div>'; include('includes/footer.inc'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |