Skip to content

Commit

Permalink
FixedAssetLocations.php: Move closing condition brace to cover entire…
Browse files Browse the repository at this point in the history
… table output to avoid a stray closing table tag output if the condition is not met. Also, replace some style attributes with equivalent CSS.
  • Loading branch information
TurboPT authored and timschofield committed Feb 27, 2018
1 parent 5fc33c8 commit 4167599
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
24 changes: 12 additions & 12 deletions FixedAssetLocations.php
Expand Up @@ -99,26 +99,27 @@
<th class="ascending">' . _('Location Description') . '</th>
<th class="ascending">' . _('Parent Location') . '</th>
</tr>';
}
while ($myrow=DB_fetch_array($result)) {

while ($myrow=DB_fetch_array($result)) {
echo '<tr>
<td>' . $myrow['locationid'] . '</td>
<td>' . $myrow['locationdescription'] . '</td>';
$ParentSql="SELECT locationdescription FROM fixedassetlocations WHERE locationid='".$myrow['parentlocationid']."'";
$ParentResult=DB_query($ParentSql);
$ParentRow=DB_fetch_array($ParentResult);
echo '<td>' . $ParentRow['locationdescription'] . '</td>
<td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedLocation='.$myrow['locationid'].'">' . _('Edit') . '</a></td></tr>';
<td><a href="', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), '?SelectedLocation=', urlencode($myrow['locationid']), '">', _('Edit'), '</a></td></tr>';
}

echo '</table>';
}

echo '</table>
<br />';
echo '<form id="LocationForm" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">
echo '<br /><form id="LocationForm" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">
<div>
<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />
<table class="selection">
<tr>
<th style="text-align:left">' . _('Location ID') . '</th>';
<th class="text">' . _('Location ID') . '</th>';
if (isset($_GET['SelectedLocation'])) {
echo '<input type="hidden" name="LocationID" value="'.$LocationID.'" />';
echo '<td>' . $LocationID . '</td>';
Expand All @@ -128,11 +129,11 @@
}

echo '<tr>
<th style="text-align:left">' . _('Location Description') . '</th>
<th class="text">' . _('Location Description') . '</th>
<td><input type="text" name="LocationDescription" required="required" title="' . _('Enter the fixed asset location description. Up to 20 characters') . '" size="20" value="'.$LocationDescription.'" /></td>
</tr>
<tr>
<th style="text-align:left">' . _('Parent Location') . '</th>
<th class="text">' . _('Parent Location') . '</th>
<td><select name="ParentLocationID">';

$sql="SELECT locationid, locationdescription FROM fixedassetlocations";
Expand All @@ -153,9 +154,8 @@

echo '<div class="centre">';
if (isset($_GET['SelectedLocation'])) {
echo '<input type="submit" name="update" value="' . _('Update Information') . '" />';
echo '<br />
<br />
echo '<input type="submit" name="update" value="' . _('Update Information') . '" />
<br /><br />
<input type="submit" name="delete" value="' . _('Delete This Location') . '" />';
} else {
echo '<input type="submit" name="submit" value="' . _('Enter Information') . '" />';
Expand Down
1 change: 1 addition & 0 deletions doc/Change.log
@@ -1,5 +1,6 @@
webERP Change Log

17/2/18 PaulT: FixedAssetLocations.php: Move closing condition brace to cover entire table output to avoid a stray closing table tag output if the condition is not met. Also, replace some style attributes with equivalent CSS.
17/2/18 PaulT: MaintenanceUserSchedule.php: Fix closing tag mismatch.
17/2/18 PaulT: GLJournalInquiry.php: Add missing = to value attribute.
17/02/18 Exson: Fixed the DB_escape_string bug for Array in session.inc and destroy cookie while users log out in Logout.php
Expand Down

0 comments on commit 4167599

Please sign in to comment.