Lipputilanne

Tulostettu: ".date("d.m.Y : H.i.s")."

\n"; $cKanta = new Kanta; $kanta = $cKanta->AvaaKanta($G_KANTA, $G_TUNNUS, $G_SALASANA, $G_KONE, $G_PORTTI); if($kanta) { $sKysely = "SELECT * from naytos order by numero;"; $kursori = $cKanta->Kysele($sKysely); if($kursori) { $lkm = $cKanta->Riveja($kursori); echo "

\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; for($i=2;$i<$lkm;$i++) { $naytos = $i+1; $sKysely2 = "select sum(lkm) from myyntivaraus where naytos=".$naytos; $sKysely2 .= ";"; $rivi = $cKanta->HaeRivi($i, $kursori); echo "\n"; echo "\n"; echo "\n"; echo "\n"; $lippuja = $rivi[2]; echo "\n"; $kursori2 = $cKanta->Kysele($sKysely2); if($kursori2) { $rivi = $cKanta->HaeRivi(0, $kursori2); $varattu = $rivi[0]; echo "\n"; $jaljella = $lippuja-$varattu; echo "\n"; } echo "\n"; } echo "
NäytösTeatteriKelloLippujaVarattuJäljellä
\n"; echo $rivi[0]."".$rivi[1]."".$rivi[3]."".$rivi[2]."".$rivi[0]."".$jaljella."
\n"; echo "
\n"; } $cKanta->SuljeKanta(); echo "

[Takaisin]\n"; } ?>