79 lines
4.1 KiB
PHP
79 lines
4.1 KiB
PHP
<?
|
|
require('funkcje.php');
|
|
session_start();
|
|
lacz_baza();
|
|
echo '<html><head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">';
|
|
echo '<META HTTP-EQUIV="Content-Language" CONTENT="pl"><LINK REL="Stylesheet" HREF="style.css" TYPE="text/css">';
|
|
$data1=date("Y-m-d");
|
|
$data2=date("Y-m-d",strtotime("+20 days",time()));
|
|
$pobierz_userow=mysql_query("select a.id_ham,a.data_ham,a.nrseryjny,a.typ,c.akcja,d.bank,a.nrzlecenia,a.ulica,a.miasto,a.opcja,a.uwagi,a.godzina,b.nazwisko,b.imie,c.akcja,d.bank from harmonogram a,uzytkownicy b,akcja c,bank d where a.id=b.id and a.id_akc=c.id_akc and a.id_ban=d.id_ban and a.usun='0' and a.id='".$_SESSION['id']."' and data_ham >= '".$data1."' and data_ham <= '".$data2."' order by data_ham asc");
|
|
if(mysql_num_rows($pobierz_userow)==0)
|
|
uwaga('<center><br><b>W bazie nie ma wprowadzonych akcji!!!</b></center><p>');
|
|
else
|
|
{
|
|
$color=$color1;
|
|
echo '';
|
|
echo '<table width="311" border="0">
|
|
<tr>
|
|
<td width="305" height="183"><img src="images/malcomm.jpg" /> <br />
|
|
ul. Cieślewskich 25A<br />
|
|
03-017 Warszawa <br />
|
|
<p>tel. 022 - 762 05 16 (wewn. 104)<br />
|
|
fax 022 - 762 05 17<br />
|
|
<a href="http://www.malcomm.pl/">www.malcomm.pl</a><br />
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
</table>';
|
|
|
|
echo '<br><br>';
|
|
echo '<center><b>Zaplanowane akcje od '.$data1.' do '.$data2.'</b><br></center><br>';
|
|
echo '<center><table width=95%><tr style="background:#E5E5E5" width=95% align=center><td><b>Data</b></td><td><b>Akcja</b></td><td><b>Bank</b></td><td><b>Nr zlecenia</b></td><td><b>Godzina</b></td><td><b>Nr Seryjny</b></td><td><b>Typ</b></td><td><b>Ulica</b></td><td><b>Miasto</b></td></tr>';
|
|
while($u=mysql_fetch_array($pobierz_userow))
|
|
{
|
|
|
|
$color=zmien_color($color);
|
|
if($u['opcja']=='0')
|
|
$color='#FCA1A1';
|
|
if($u['opcja']=='0')
|
|
$opcja='<a class=link href=?co=harmonogram&akcja=wykonano&id_ham='.$u['id_ham'].'>NIE</a>';
|
|
else if($u['opcja']=='1')
|
|
$opcja='<a class=link href=?co=harmonogram&akcja=niewykonano&id_ham='.$u['id_ham'].'>TAK</a>';
|
|
$opcje1='<a class=link href=?co=harmonogram&akcja=generuj_raport&id_ham='.$u['id_ham'].' target="_blank">Generuj raport</a>';
|
|
if($u['godzina']!='00:00:00')
|
|
{
|
|
$godzina = date('H:i',strtotime($u['godzina']));
|
|
}
|
|
else
|
|
{
|
|
$godzina = '---';
|
|
}
|
|
if($u['typ']!='')
|
|
{
|
|
$typ = $u['typ'];
|
|
}
|
|
else
|
|
{
|
|
$typ = '---';
|
|
}
|
|
if($u['nrseryjny']!='')
|
|
{
|
|
$nrseryjny = $u['nrseryjny'];
|
|
}
|
|
else
|
|
{
|
|
$nrseryjny = '---';
|
|
}
|
|
if($u['nrzlecenia']!='')
|
|
{
|
|
$nrzlecenia = $u['nrzlecenia'];
|
|
}
|
|
else
|
|
{
|
|
$nrzlecenia = '---';
|
|
} echo '<tr style="background-color:'.$color.'"><td style="padding-left:2px; padding-right:2px"><center>'.$u['data_ham'].'</center></td><td><center>'.$u['akcja'].'</center></td><td><center>'.$u['bank'].'</center></td><td><center>'.$nrzlecenia.'</center></td><td><center>'.$godzina.'</center></td><td><center>'.$nrseryjny.'</center></td><td><center>'.$typ.'</center></td><td><center>'.$u['ulica'].'</center></td><td><center>'.$u['miasto'].'</center></td></tr>' ;
|
|
}
|
|
echo '<body onLoad="javascript: window.print()">';
|
|
echo '</table></center>';
|
|
}
|
|
?>
|