131
FROM status, zav
WHERE flag!=5 and deletz!=1 and idzav=nomzav ");
while($sod_mas1=mysql_fetch_row($sod1))
{
$kolvo=$sod_mas1[0];
}
if ($kolvo>0)
{
echo "<table border='0' align='center' width='300'><tr><td class='table1'> Всего
незакрытых заявок <b>$kolvo</b></td></tr> </table>\n";
}
else
{
echo "<table border='0' align='center' width='300'><tr><td class='table1'>
Незакрытых заявок нет </td></tr> </table>\n";
}
?>
</td>
</tr>
<tr class="line"> <td colspan="2"> </td> </tr> </table>
<?php
require "../dbconnect.php";
$res1=mysql_query("SELECT idzav, `namezav`, priorzav, desczav, activzav,
katzav, filezav, commzav, nameuser, nameo
FROM `zav`, user, otdel, status where deletz!=1 and idu=iduzav and iduserotd=ido
and flag!=5 and nomzav=idzav ");
$a=1;
while($res_id=mysql_fetch_row($res1))
{
$res=mysql_query("SELECT flag,openz, rasp, idrasp, proz, idproz, test,
idtest, clos, idclos from status where nomzav='$res_id[0]'");