Skip to content

Commit

Permalink
PaulT: Replace old method of table row alternating color handing with…
Browse files Browse the repository at this point in the history
… improved CSS. Also, this change removes some empty/unused properties from a few css file and removes old URL 'SID' references in files already modified for this commit. Due to SVN issues with TestPlanResults.php, this one file will be committed later.
  • Loading branch information
TurboPT authored and timschofield committed Feb 27, 2018
1 parent d502bb7 commit a35e497
Show file tree
Hide file tree
Showing 207 changed files with 10,365 additions and 11,190 deletions.
12 changes: 2 additions & 10 deletions AccountGroups.php
Expand Up @@ -290,17 +290,8 @@ function CheckForRecursiveGroup($ParentGroupName, $GroupName, $db) {
<th class="noprint" colspan="2">&nbsp;</th>
</tr>';

$k=0; //row colour counter
while($myrow = DB_fetch_array($result)) {

if($k==1) {
echo '<tr class="EvenTableRows">';
$k=0;
} else {
echo '<tr class="OddTableRows">';
$k++;
}

switch ($myrow['pandl']) {
case -1:
$PandLText=_('Yes');
Expand All @@ -313,7 +304,8 @@ function CheckForRecursiveGroup($ParentGroupName, $GroupName, $db) {
break;
} //end of switch statement

echo '<td>' . htmlspecialchars($myrow['groupname'], ENT_QUOTES,'UTF-8') . '</td>
echo '<tr class="striped_row">
<td>' . htmlspecialchars($myrow['groupname'], ENT_QUOTES,'UTF-8') . '</td>
<td>' . $myrow['sectionname'] . '</td>
<td class="number">' . $myrow['sequenceintb'] . '</td>
<td>' . $PandLText . '</td>
Expand Down
12 changes: 2 additions & 10 deletions AccountSections.php
Expand Up @@ -180,18 +180,10 @@
<th class="noprint" colspan="2">&nbsp;</th>
</tr>';

$k=0; //row colour counter
while ($myrow = DB_fetch_array($result)) {

if($k==1) {
echo '<tr class="EvenTableRows">';
$k=0;
} else {
echo '<tr class="OddTableRows">';
$k++;
}

echo '<td class="number">', $myrow['sectionid'], '</td>
echo '<tr class="striped_row">
<td class="number">', $myrow['sectionid'], '</td>
<td class="text">', $myrow['sectionname'], '</td>
<td class="noprint"><a href="', htmlspecialchars($_SERVER['PHP_SELF'].'?SelectedSectionID='.urlencode($myrow['sectionid']), ENT_QUOTES, 'UTF-8'), '">', _('Edit'), '</a></td>
<td class="noprint">';
Expand Down
15 changes: 4 additions & 11 deletions AddCustomerContacts.php
Expand Up @@ -139,24 +139,17 @@
<th class="noprint" colspan="2">&nbsp;</th>
</tr>';

$k=0; //row colour counter

while ($myrow = DB_fetch_array($result)) {
if ($k==1){
echo '<tr class="OddTableRows">';
$k=0;
} else {
echo '<tr class="EvenTableRows">';
$k=1;
}
printf('<td class="text">%s</td>
printf('<tr class="striped_row">
<td class="text">%s</td>
<td class="text">%s</td>
<td class="text">%s</td>
<td class="text"><a href="mailto:%s">%s</a></td>
<td class="text">%s</td>
<td class="text">%s</td>
<td class="noprint"><a href="%sId=%s&amp;DebtorNo=%s">' . _('Edit') . '</a></td>
<td class="noprint"><a href="%sId=%s&amp;DebtorNo=%s&amp;delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this contact?') . '\');">' . _('Delete'). '</a></td></tr>',
<td class="noprint"><a href="%sId=%s&amp;DebtorNo=%s&amp;delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this contact?') . '\');">' . _('Delete'). '</a></td>
</tr>',
$myrow['contactname'],
$myrow['role'],
$myrow['phoneno'],
Expand Down
15 changes: 4 additions & 11 deletions AddCustomerNotes.php
Expand Up @@ -120,22 +120,15 @@
<th>' . _('Priority') . '</th>
</tr>';

$k=0; //row colour counter

while ($myrow = DB_fetch_array($result)) {
if ($k==1){
echo '<tr class="OddTableRows">';
$k=0;
} else {
echo '<tr class="EvenTableRows">';
$k=1;
}
printf('<td>%s</td>
printf('<tr class="striped_row">
<td>%s</td>
<td>%s</td>
<td><a href="%s">%s</a></td>
<td>%s</td>
<td><a href="%sId=%s&DebtorNo=%s">' . _('Edit').' </td>
<td><a href="%sId=%s&DebtorNo=%s&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this customer note?') . '\');">' . _('Delete'). '</td></tr>',
<td><a href="%sId=%s&DebtorNo=%s&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this customer note?') . '\');">' . _('Delete'). '</td>
</tr>',
ConvertSQLDate($myrow['date']),
$myrow['note'],
$myrow['href'],
Expand Down
15 changes: 4 additions & 11 deletions AddCustomerTypeNotes.php
Expand Up @@ -114,22 +114,15 @@
<th>' . _('Priority') . '</th>
</tr>';

$k=0; //row colour counter

while ($myrow = DB_fetch_array($result)) {
if ($k==1){
echo '<tr class="OddTableRows">';
$k=0;
} else {
echo '<tr class="EvenTableRows">';
$k=1;
}
printf('<td>%s</td>
printf('<tr class="striped_row">
<td>%s</td>
<td>%s</td>
<td>%s</td>
<td>%s</td>
<td><a href="%sId=%s&amp;DebtorType=%s">' . _('Edit') . '</a></td>
<td><a href="%sId=%s&amp;DebtorType=%s&amp;delete=1">' . _('Delete') . '</a></td></tr>',
<td><a href="%sId=%s&amp;DebtorType=%s&amp;delete=1">' . _('Delete') . '</a></td>
</tr>',
$myrow['date'],
$myrow['note'],
$myrow['href'],
Expand Down
29 changes: 8 additions & 21 deletions AgedControlledInventory.php
Expand Up @@ -43,7 +43,6 @@

$TotalQty=0;
$TotalVal=0;
$k=0; //row colour counter

echo '<table>
<tr>
Expand All @@ -58,14 +57,6 @@

while ($LocQtyRow=DB_fetch_array($LocStockResult)) {

if ($k==1){
echo '<tr class="OddTableRows">';
$k=0;
} else {
echo '<tr class="EvenTableRows">';
$k=1;
}

$DaysOld=floor(($Today - strtotime($LocQtyRow['createdate']))/(60*60*24));
$TotalQty +=$LocQtyRow['quantity'];
$DispVal = '-----------';
Expand All @@ -75,7 +66,8 @@
$TotalVal +=($LocQtyRow['quantity'] *$LocQtyRow['cost']);
}

printf('<td>%s</td>
printf('<tr class="striped_row">
<td>%s</td>
<td>%s</td>
<td>%s</td>
<td class="number">%s</td>
Expand All @@ -93,20 +85,15 @@
);
} //while

if ($k==1){
echo '<tfoot><tr class="OddTableRows">';
$k=0;
} else {
echo '<tfoot><tr class="EvenTableRows">';
$k=1;
}

echo '<td colspan="3"><b>' . _('Total') . '</b></td>
echo '<tfoot>
<tr class="striped_row">
<td colspan="3"><b>' . _('Total') . '</b></td>
<td class="number"><b>' . locale_number_format($TotalQty,2) . '</b></td>
<td class="number"><b>' . locale_number_format($TotalVal,2) . '</b></td>
<td colspan="2"></td>
</tr></tfoot>';
echo '</table>';
</tr>
</tfoot>
</table>';

include('includes/footer.php');
?>
11 changes: 2 additions & 9 deletions AnalysisHorizontalIncome.php
Expand Up @@ -217,7 +217,6 @@ function RelativeChange($selected_period, $previous_period) {
$ParentGroups=array();
$ParentGroups[$Level]='';

$k=0;// Row colour counter.
$DrawTotalLine = '<tr>
<td colspan="2">&nbsp;</td>
<td><hr /></td>
Expand Down Expand Up @@ -374,14 +373,8 @@ function RelativeChange($selected_period, $previous_period) {

if($_POST['Detail']=='Detailed') {
if(isset($_POST['ShowZeroBalances']) OR (!isset($_POST['ShowZeroBalances']) AND ($AccountTotal <> 0 OR $AccountTotalLY <> 0))) {
if($k==1) {
echo '<tr class="EvenTableRows">';
$k=0;
} else {
echo '<tr class="OddTableRows">';
$k=1;
}
echo '<td class="text"><a href="', $RootPath, '/GLAccountInquiry.php?Period=', $_POST['ToPeriod'], '&amp;Account=', $myrow['accountcode'], '&amp;Show=Yes">', $myrow['accountcode'], '</a></td>';
echo '<tr class="striped_row">
<td class="text"><a href="', $RootPath, '/GLAccountInquiry.php?Period=', $_POST['ToPeriod'], '&amp;Account=', $myrow['accountcode'], '&amp;Show=Yes">', $myrow['accountcode'], '</a></td>';
// --->
if($Section ==1) {
echo ' <td class="text">', htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8',false), '</td>
Expand Down
11 changes: 2 additions & 9 deletions AnalysisHorizontalPosition.php
Expand Up @@ -179,7 +179,6 @@ function RelativeChange($selected_period, $previous_period) {
$GroupTotal = array(0);
$GroupTotalLY = array(0);

$k=0;// Row colour counter.
$DrawTotalLine = '<tr>
<td colspan="2">&nbsp;</td>
<td><hr /></td>
Expand Down Expand Up @@ -280,14 +279,8 @@ function RelativeChange($selected_period, $previous_period) {

if($_POST['Detail']=='Detailed') {
if(isset($_POST['ShowZeroBalances']) OR (!isset($_POST['ShowZeroBalances']) AND (round($AccountBalance,$_SESSION['CompanyRecord']['decimalplaces']) <> 0 OR round($AccountBalanceLY,$_SESSION['CompanyRecord']['decimalplaces']) <> 0))) {
if($k==1) {
echo '<tr class="OddTableRows">';
$k=0;
} else {
echo '<tr class="EvenTableRows">';
$k=1;
}
echo '<td class="text"><a href="', $RootPath, '/GLAccountInquiry.php?Period=', $_POST['BalancePeriodEnd'], '&amp;Account=', $myrow['accountcode'], '">', $myrow['accountcode'], '</a></td>
echo '<tr class="striped_row">
<td class="text"><a href="', $RootPath, '/GLAccountInquiry.php?Period=', $_POST['BalancePeriodEnd'], '&amp;Account=', $myrow['accountcode'], '">', $myrow['accountcode'], '</a></td>
<td class="text">', htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8',false), '</td>
<td class="number">', locale_number_format($AccountBalance,$_SESSION['CompanyRecord']['decimalplaces']), '</td>
<td class="number">', locale_number_format($AccountBalanceLY,$_SESSION['CompanyRecord']['decimalplaces']), '</td>
Expand Down
12 changes: 2 additions & 10 deletions Areas.php
Expand Up @@ -149,17 +149,9 @@
<th>' . _('Area Name') . '</th>
</tr>';

$k=0; //row colour counter

while ($myrow = DB_fetch_array($result)) {
if ($k==1){
echo '<tr class="EvenTableRows">';
$k=0;
} else {
echo '<tr class="OddTableRows">';
$k++;
}
echo '<td>' . $myrow['areacode'] . '</td>
echo '<tr class="striped_row">
<td>' . $myrow['areacode'] . '</td>
<td>' . $myrow['areadescription'] . '</td>
<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedArea=' . $myrow['areacode'] . '">' . _('Edit') . '</a></td>
<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedArea=' . $myrow['areacode'] . '&amp;delete=yes">' . _('Delete') . '</a></td>
Expand Down
23 changes: 5 additions & 18 deletions AutomaticTranslationDescriptions.php
Expand Up @@ -34,7 +34,7 @@
$result = DB_query($SQL);

if(DB_num_rows($result) != 0) {
echo '<p class="page_title_text" align="center"><strong>' . _('Description Automatic Translation for empty translations') . '</strong></p>';
echo '<p class="page_title_text"><strong>' . _('Description Automatic Translation for empty translations') . '</strong></p>';
echo '<div>';
echo '<table class="selection">';
$TableHeader = '<tr>
Expand All @@ -45,7 +45,6 @@
<th>' . _('Translated') . '</th>
</tr>';
echo $TableHeader;
$k = 0; //row colour counter
$i = 0;
while ($myrow = DB_fetch_array($result)) {

Expand All @@ -59,15 +58,9 @@
"WHERE stockid='" . $myrow['stockid'] . "' AND (language_id='" . $myrow['language_id'] . "')";
$update = DB_query($sql, $ErrMsg, $DbgMsg, true);

if ($k==1){
echo '<tr class="EvenTableRows">';
$k=0;
} else {
echo '<tr class="OddTableRows">';
$k++;
}
$i++;
printf('<td class="number">%s</td>
printf('<tr class="striped_row">
<td class="number">%s</td>
<td>%s</td>
<td>%s</td>
<td>%s</td>
Expand All @@ -90,15 +83,9 @@
"WHERE stockid='" . $myrow['stockid'] . "' AND (language_id='" . $myrow['language_id'] . "')";
$update = DB_query($sql, $ErrMsg, $DbgMsg, true);

if ($k==1){
echo '<tr class="EvenTableRows">';
$k=0;
} else {
echo '<tr class="OddTableRows">';
$k++;
}
$i++;
printf('<td class="number">%s</td>
printf('<tr class="striped_row">
<td class="number">%s</td>
<td>%s</td>
<td>%s</td>
<td>%s</td>
Expand Down
24 changes: 5 additions & 19 deletions BOMInquiry.php
Expand Up @@ -114,22 +114,16 @@
echo $TableHeader;

$j = 1;
$k = 0; //row colour counter

while ($myrow=DB_fetch_array($result)) {
if ($k==1){
echo '<tr class="EvenTableRows">';
$k=0;
} else {
echo '<tr class="OddTableRows">';
$k++;
}
if ($myrow['mbflag']=='A' OR $myrow['mbflag']=='K'){
$StockOnHand = 'N/A';
} else {
$StockOnHand = locale_number_format($myrow['totalonhand'],2);
}
$tabindex=$j+4;
printf('<td><input tabindex="' .$tabindex . '" type="submit" name="StockID" value="%s" /></td>
printf('<tr class="striped_row">
<td><input tabindex="' .$tabindex . '" type="submit" name="StockID" value="%s" /></td>
<td>%s</td>
<td class="number">%s</td>
<td>%s</td>
Expand Down Expand Up @@ -203,24 +197,16 @@
echo $TableHeader;

$j = 1;
$k=0; //row colour counter

$TotalCost = 0;

while ($myrow=DB_fetch_array($BOMResult)) {

if ($k==1){
echo '<tr class="EvenTableRows">';
$k=0;
} else {
echo '<tr class="OddTableRows">';
$k++;
}

$ComponentLink = '<a href="' . $RootPath . '/SelectProduct.php?StockID=' . $myrow['component'] . '">' . $myrow['component'] . '</a>';

/* Component Code Description Quantity Std Cost Total Cost */
printf('<td>%s</td>
printf('<tr class="striped_row">
<td>%s</td>
<td>%s</td>
<td class="number">%s</td>
<td class="number">%s</td>
Expand Down

0 comments on commit a35e497

Please sign in to comment.