<?php

ob_start("ob_gzhandler");

require "include/bittorrent.php";
dbconn(false);
stdhead("Cinema");
?>

<?
$res = mysql_query("SELECT count(indexrelases.id) FROM indexrelases") or die(mysql_error());
$arr = mysql_fetch_array($res);
$count = $arr[0];
$perpage = 4;
list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, $_SERVER["PHP_SELF"] ."?" . "&" );
$res = mysql_query("SELECT id,cat,poster,name,zanr,reziser,vroliah,opisalovo,kacestvo,
video,audio,time,url,imd,lang, date from indexrelases ORDER BY added DESC $limit") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) > 0) {
begin_frame("..::Demnächst im Kino::..");
echo $pagertop;
while ($arr = mysql_fetch_assoc($res)) {
print("<table width=100% ><tr>
<td align=center>
<table width=100% border=0 cellspacing=0 cellpadding=0 style=margin-bottom:10px; >
<tr bgcolor=#FFFFFF class=bottom>
<th><div align=left>  <font color=000000 size=1> " . ( $arr[name] )."</i></font> </div></th>
</tr><td><ul>
<TABLE cellSpacing=0 cellPadding=3 border=0 ><TBODY><TR vAlign=top><TD width=160>
<IMG src=$arr[poster] width=150 border=0></TD><TD><DIV align=left>
<font size=1><B>Genre: </B>" . ( $arr[zanr] )."<BR><B>Regisseur:</B> " . ( $arr[reziser] )." </DIV>
<DIV align=left><HR align=left width=\85%\ color=#5ADE18 SIZE=1></DIV><DIV align=left>
<B>Beschreibung:</B><BR> " . ( $arr[opisalovo] )." </DIV><DIV align=left><HR align=left width=\85%\
color=#5ADE18 SIZE=1></DIV><DIV align=left><B></B> " . ( $arr[kacestvo] ) ." <BR>
<B></B> " . ( $arr[video] ) ."<BR><B></B> " . ( $arr[audio] ) ."<BR>
<B></B> " . ( $arr[time] ) ." <BR><B></B> " . ( $arr[lang] ) ." </DIV>\n");
if ($arr["imd"])
print("<DIV align=right> [<A href=$arr[imd]>IMDB</A>] [<A href=$arr[url] target=_blank>Zum Trailer</A>]
</TD></TR></TBODY></TABLE></td></tr></table></td></table>\n");
else
print("<DIV align=right> [<A href=$arr[url] target=_blank>Zum Trailer</A>]
</TD></TR></TBODY></TABLE></td></tr></table></td></table>\n");
if (get_user_class() >= UC_MODERATOR)
{
print(" <font class=middle>[<a class=altlink href=indexdelete.php?action=edit&id=" . $arr['id'] . "&returnto=" . urlencode($_SERVER['PHP_SELF']) . "><b>Editieren</b></a>]");
print("[<a class=altlink href=indexdelete.php?action=delete&id=" . $arr['id'] . "&returnto=" . urlencode($_SERVER['PHP_SELF']) . "><b>löschen</b></a>]");
}
}
print("</table>\n");
} else
print("-- Nix da! --\n");
?>