- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
<table border="1" class="new" bgcolor ="#F5F5F5">
<tr>
<td><b>День</b></td>
<td><b>До обеда</b></td>
<td><b>После обеда</b></td>
<?php
while ($row = mysql_fetch_assoc($query)){
$date = $row['date'];
$Id_date = convert($date);
$date = substr ($date,8);
//Проверка на повторность дня (один день-два события!)
if ($count == $date){
$time = $row['time'];
if ($time == 'До обеда'){
echo '<td>';
$judge = $row['judge'];
$query1 = mysql_query ("SELECT `desc` FROM `judge` WHERE `id` = $judge",$db);
$row1 = mysql_fetch_assoc ($query1);
$judge1 = $row1['desc'];
//"Совещание" красным
if ($judge1 == 'Совещание'){
echo "<td class='new_color'>$judge1</td>";
}
else{
echo "<td>$judge1</td>";}
echo "</td>";
}
elseif ($time == 'После обеда'){
$judge = $row['judge'];
$query1 = mysql_query ("SELECT `desc` FROM `judge` WHERE `id` = $judge",$db);
$row1 = mysql_fetch_assoc ($query1);
$judge1 = $row1['desc'];
if ($judge1 == 'Совещание'){
echo "<td class='new_color'>$judge1</td>";
}
else{
echo "<td>$judge1</td>";}
echo "</td>";
echo "</tr>";
}
}
// Блок для выполнения при отрицательной проверки на повторность дня
else {
$res1 = rus_days($Id_date);
echo "<tr>";
echo "<td>$date $res1</td>";
$time = $row['time'];
if ($time == 'До обеда'){
$judge = $row['judge'];
$query1 = mysql_query ("SELECT `desc` FROM `judge` WHERE `id` = $judge",$db);
$row1 = mysql_fetch_assoc ($query1);
$judge1 = $row1['desc'];
if ($judge1 == 'Совещание'){
echo "<td class='new_color'>$judge1</td>";
}
else{
echo "<td>$judge1</td>";}
}
elseif ($time == 'После обеда'){
echo "<td>";
$judge = $row['judge'];
$query1 = mysql_query ("SELECT `desc` FROM `judge` WHERE `id` = $judge",$db);
$row1 = mysql_fetch_assoc ($query1);
$judge1 = $row1['desc'];
if ($judge1 == 'Совещание'){
echo "<td class='new_color'>$judge1</td>";
}
else{
echo "<td>$judge1</td>";}
echo "</td>";
echo "</tr>";
}
Формирование таблицы. Данные тянутся из БД.
mrbig66 24.08.2010 08:33 # +6
smitty 24.08.2010 11:33 # 0
Lure Of Chaos 24.08.2010 11:41 # +2
smitty 24.08.2010 11:43 # −1
mrbig66 24.08.2010 20:36 # 0
Анонимус 24.08.2010 20:56 # +5
smitty 25.08.2010 08:28 # 0
Uchkuma 25.08.2010 16:35 # +2