The output I am receiving is not highlighting all of the contents just part.
in the below code @line 21 if a certain variable is met I want the cell highlighted. The problem is in the output it is highlighting but only on one cell and not covering the other cells that need to be highlighted. For example, the customer books a room for 3 days. The first day is not highlighting just the 2nd and 3rd. If they book a room for only one day then it does not highlight at all. -
-
for ($i = 1; $i <= $days; $i++)
-
{
-
$year = date("Y",$tag + 86400 * $i - 86400);
-
$month = date("n",$tag + 86400 * $i - 86400);
-
$day = date("d",$tag + 86400 * $i - 86400);
-
-
$belegt = belegt($zdaten[$ii][1],date("Y.m.d",$tag+ 86400 * $i - 86400));
-
if ($belegt=="" )
-
{
-
if ($tag+ 86400 * ($i-1) < strtotime(date("Y-m-d 12:00:00"),time()))
-
{
-
echo '<td align="center" bgcolor="white"> n/a';
-
}else{
-
//available for booking
-
echo '<td align="center">
-
<a href="kalender.php?andatum=', $tag + 86400 * $i - 86400, '&zimmer=',$zdaten[$ii][1],'&year=',$year,'&month=',$month,'&day=',$day,'" id="l1">
-
<font color="#008000">'.$t_myres['free'].'</font></a>';
-
}
-
/* ###### CHANGE CELL COLOR IF CONFIRMATION NECESSARY ###### */
-
}elseif ($knr=$resdaten[1][9]=="")
-
{
-
//booked and still needs to be confirmed
-
echo '<td align="center" bgcolor="yellow">';
-
$resdaten = sucheresnr($belegt);
-
$knr=$resdaten[1][1];
-
$daten = suche('knr', $knr);
-
$nname=$daten[1][3];
-
echo '
-
<a href="details.php?resnr=', $belegt, '&schreiben=readonly" id="l5">',
-
$nname,
-
'</a>';
-
}
-
else{
-
//booked and confirmed
-
echo '<td align="center">';
-
$resdaten = sucheresnr($belegt);
-
$knr=$resdaten[1][1];
-
$daten = suche('knr', $knr);
-
$nname=$daten[1][3];
-
echo '
-
<a href="details.php?resnr=', $belegt, '&schreiben=readonly" id="l5">',
-
$nname,
-
'</a>';
-
}
-
echo '</td>';
-
}
-
echo '<td align="right" style="white-space:nowrap">';
-
echo "<a href=\"javascript:zimmer_link('";
-
echo $zimmer;
-
echo "')\" id='l4'>$zimmer</a></td></tr>";
-
}
-
echo '<tr>';
-
echo '<td width ="', 100/($days+2),'%">';
-
echo '</td>';
-
2 2152
The only cause I can think of is that you miscalculate the start day by 'fiddling' with an index or having a start day as 0 reserveation days or alike problem. As far as I can see the code (except for the date calculations, I cannot follow that and that is why I suspect it) is fine from a html point.
Ronald :cool:
The only cause I can think of is that you miscalculate the start day by 'fiddling' with an index or having a start day as 0 reserveation days or alike problem. As far as I can see the code (except for the date calculations, I cannot follow that and that is why I suspect it) is fine from a html point.
Ronald :cool:
Thank you,
I didn't see an error in the code and from the many tutorials that I have read all appears correct except the output. I will try to narrow down the question when I find more of the error. I will research the start day to see if I can find it.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Gerg |
last post by:
The datagrid has a tablestyle applied to it, and there
are DataGridTextBoxColumn and each DataGridTextBoxColumn
has an array of DataGridTextBox objects.
Private Sub highlight(ByVal str As...
|
by: J Krugman |
last post by:
I have set up an HTML table with clickable cells (the cells contain
only text). They work fine, but I would like to give the user some
visual feedback to indicate that a cell has been clicked. ...
|
by: VK |
last post by:
Hi, I'm playing around with tables (TOM vs. DOM etc.)
I cannot figure out an effective highlight mechanics for the cells:
1) No problems with:
<td ...onMouseOver/Out background change>
some...
|
by: mitch |
last post by:
Suppose you have an HTML table with 2 rows
1 2 3 4
5 6 7 8
and you click the cell with the 2 and drag to the cell with the 7.
You will see the items 2 3 4 5 6 7 highlighted. This is sort of...
|
by: Geraldine Hobley |
last post by:
Hello
I have a datagrid, called MyDataGrid and I wish to put the focus on a particular cell in order that the user to highlight the fact that the user needs to enter a value in this cell, e.g. I put...
|
by: toffee |
last post by:
Hi all,
I have a table with 12 cols and 10 rows. When a user clicks on a table cell;
the page is refreshed and displays some data below the table dependant on
whichever cell was selected.
I...
|
by: dsbsnag |
last post by:
I am using Access 2003 on Windows XP
I'm a school teacher and need help achieving the following:
I have three spreadsheets with various information in them. But, they have a common cell named...
|
by: Dave |
last post by:
Is there a way to selectively highlight text in an OverLib popup? I'd
like to be able to make some text stand out from the rest of the text
that is displayed.
I tried using a one-cell table with...
|
by: dixonjm |
last post by:
Hi,
I am adding a table dynamically using c# as below:-
productCell = new TableCell();
KSSCheckBox checkBox = new KSSCheckBox();
checkBox.ID = string.Format("CheckBox|{0}|{1}", x,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |