<li ><a href="zajavka.php"><span>Отчеты</span></a></li>
<li ><a href="history.php"><span>МТС</span></a></li>
<li ><a href="dannie.php"><span>Мои данные</span></a></li>
<li><a href="loginman.php"><span>Выход</span></a></li>
</td>
</tr>
</table>
<table width="900" align="center" cellspacing="0" cellpadding="0" border="0"
bgcolor="#ffffff" class="rc10">
<tr>
<td>
<br><?php
$ttt=date("d-m-Y", time());
echo "<div> Заявки на $ttt</div> ";?>
<center>
<p class="date1"> Красным цветом выделены просроченные заявки </p>
<?php
require "dbconnect.php";
echo "<table border='0' cellpadding='50' bgcolor='#ffffff'>\n";
echo " <tr class='table'><th><center>Номер</th><th><center> Дата и
время </th>
<th><center> Принял </th>
<th><center> Объект </th>
<th><center> Инцидент </th>
<th><center> Подал </th>
<th><center> Прим. </th>
<th><center> Закрыть! </th>
</tr>\n";
$res_id=mysql_query("SELECT `idz`, `datez`, krnamedzap, famzap, namek, nameinz,
krnamedzdng, famzdng, prim from zajavka, szap, inz, kust , szdng, dzap, dzdng where
idpod=idszdng and `idprin`=idszap and `idkz`=idk and `idiz`=idinz and iddzap=idzap and
iddzdng=idzdng and otm=0");
$a=1;
while($prise_mas=mysql_fetch_row($res_id))
{
$a=$a+1;
$chet=$a%2;
$ttt=date("Y-m-d", time());
$rest = substr("$ttt", 8,2);
$rest1 = substr("$prise_mas[1]", 8,2);
if ($rest1==$rest)
{
if ($chet==0)
{
$tab=table1;
}
else {