<?
if (!$empty){ ?>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<div><span style="margin-left:50%;"><? echo $records[$showid]['name']?></span></div>
<? if (isset($do)){?><p><? echo $records[$lastitem]['name']?></p><? }?>
<div class="left" id="left">
<? if (!$thisbadvote){?>
<form name="form1" method="post" action="<?=$PHP_SELF?>">
<input type="radio" name="rate" value="10" onClick="this.form.submit()">10
<input type="radio" name="rate" value="9" onClick="this.form.submit()">9
<input type="radio" name="rate" value="8" onClick="this.form.submit()">8
<input type="radio" name="rate" value="7" onClick="this.form.submit()">7
<input type="radio" name="rate" value="6" onClick="this.form.submit()">6
<input type="radio" name="rate" value="5" onClick="this.form.submit()">5
<input type="radio" name="rate" value="4" onClick="this.form.submit()">4
<input type="radio" name="rate" value="3" onClick="this.form.submit()">3
<input name="rate" type="radio" onClick="this.form.submit()" value="2">2
<input name="rate" type="radio" onClick="this.form.submit()" value="1">1
<input name="id" type="hidden" id="id" value="<? echo $records[$showid]['id'];?>">
<input name="lastitem" type="hidden" id="lastitem" value="<? echo $showid;?>">
<input name="do" type="hidden" id="do" value="vote">
<input name="category" type="hidden" id="category" value="<? echo $category;?>">
</form>
<? }else echo "<div class='err'>Du hast heute bereits gevotet!</div><br>";?>
<br /><br />
<? if ($numrows==1) echo "$numrows Bilder "; else echo "$numrows Bilder";?><br>
in dieser Kategorie<br><br>
</div>
<? if ($addpic){?>
<? }?>
<?
$imgsize=GetImageSize($records[$showid]['path']);
if ($imgsize[0]>$maxpicwidth){
$width=$maxpicwidth;
$height=$maxpicwidth*($imgsize[1]/$imgsize[0]);
}else{
$width=$imgsize[0];
$height=$imgsize[1];
}
?>
<div class="bild">
<img src='<?=$records[$showid]['path']?>' width="<? echo $width;?>" height="<? echo $height;?>">
<div align="right"> <form name="form3" method="post" action="<?=$PHP_SELF?>">
<input type="image" src="images/naechst.png" class="button" name="next" id="next" value="nächstes">
<input name="do" type="hidden" id="do" value="vote">
<input name="lastitem" type="hidden" id="lastitem" value="<? echo $showid;?>">
<input name="category" type="hidden" id="category" value="<? echo $category;?>">
<input name="action" type="hidden" id="action" value="skip">
<input name="id" type="hidden" id="id" value="<? echo $records[$showid]['id'];?>">
</form>
</div>
<? if ($showcomments){ // if comment feature is turned on
$sql="SELECT name, comment FROM $dbtable_comments WHERE item=".$records[$showid]['id']." ORDER BY time DESC";
if ($res=mysql_query($sql, $db)){
$rows=mysql_num_rows($res);
if ($showall=="yes") $numcomments = $rows;
if ($rows > 0){
?>
<br>
<? if($numcomments<$rows){?>
<a href="<? echo "$PHP_SELF?category=$category&showall=yes&forceid=".$records[$showid]['id']; if ($lastitem) echo "&lastitem=$lastitem&do=vote";?>"><font color="<?=$td_caption_txt?>">show all</font></a> </form>
<? }?>
<div class="votingsmalltxt" style="height: 60px; overflow: auto; scrollbar-track-color: $td_odd; scrollbar-base-color: $td_odd">
<?
$i=1;
while ($row=mysql_fetch_array($res)){
if ($i>$numcomments) break;
echo "<b><i>".$row['name'].":</i></b> ".$row['comment']."<br>";
$i++;
}
?>
</div>
<?
}
mysql_free_result($res);
}
}
?>
</div>
<? if (isset($do)){?>
<strong>
<?
if (isset($lastitem)){
$imgsize=GetImageSize($records[$lastitem]['path']);
?><img src='<?=$records[$lastitem]['path']?>' width="100" height="<? echo 100*($imgsize[1]/$imgsize[0]); ?>"><br />
Durchschnitt: <span class="rating"><? echo round($records[$lastitem]['avg'], 1);?></span>
<? if (isset($rate) && !$badvote) echo "<br> Deine Stimme: $rate";?>
<br>
Stimmen: <? echo $records[$lastitem]['votes'];?>
<? }?>
<br>
<? if (!$errormsg=="") echo "<br><span class='err'>$errormsg</span>";?>
</strong>
<? }?>
<? }else{ // if empty?>
<font color="<? echo $td_caption_txt;?>">Voting</font>
<? if (isset($do)){?>
<? }?>
<br>
<ul>
<?
if (!isset($category)) $category=0;
for ($i=0; $i<$numcat; $i++){
if ($i==$category)
echo "<li><a href='$PHP_SELF/$cat[$i]'>$cat[$i]</a></li>";
else
echo "<li><a href='$PHP_SELF/$cat[$i]'>$cat[$i]</a></li>";
}
?>
</ul>
<? if ($numrows==1) echo "$numrows Eintrag"; else echo "$numrows Einträge";?>
<br>
in dieser Kategorie<br>
<br>
<br>
<? if ($addpic){?>
<form name="form4" method="post" action="<?=$PHP_SELF?>">
<input class="button" name="addpic" type="submit" id="addpic" value="Bild hinzufügen">
<input name="do" type="hidden" id="do" value="add">
</form>
<? }?>
<form name="form5" method="post" action="<?=$PHP_SELF?>">
<input class="button" name="submit" type="submit" id="submit" value="Admin Panel">
<input name="do" type="hidden" id="do" value="admin">
<input name="action" type="hidden" id="action" value="show">
</form></td>
<? if (isset($do)){?>
<? }?>
<? }?>