home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 October
/
Chip_2001-10_cd1.bin
/
internet
/
flashland
/
sutaz
/
sutaz.php
< prev
Wrap
PHP Script
|
2001-08-20
|
4KB
|
115 lines
<?php
if (date('j') > SUTAZ_DEN) $rrrrmm = date('Ym', mktime(0, 0, 0, date('m')+1, 1, date('Y')));
else $rrrrmm = date('Ym');
//echo("user=$flashlanduser<BR>login=$flashlandlogin<BR>mail=$flashlandmail<BR><BR>hlasoval=$hlasoval<BR>degree=".$user['degree']."<BR>cas=$rrrrmm<BR>akoon=$cok<BR>");
$hlasoval = 0;
?>
<BR>
<div align="center">
<table border="0" width="480" cellspacing="0" cellpadding="0">
<tr>
<td width="20%"><img border="0" src="sutaz/pohar.jpg" width="50" height="55"></td>
<td width="60%"><p align="center" class="ttn">S·¥a₧ o najlepÜiu FLASHovinu.</p></td>
<td width="20%"><p align="right"><img border="0" src="sutaz/pohar.jpg" width="50" height="55"></td>
</tr>
</table>
<form action="./index.php" METHOD="POST">
<table border="1" width="480" bgcolor="#BFDFFF" cellpadding="3" cellspacing="0">
<TR>
<TD bgcolor="#3366CC"><p><font color="#FFFFFF">
Hlasovanie o najlepÜiu FLASHovinu - <?echo substr($rrrrmm, 4, 2).'/'.substr($rrrrmm, 0, 4) ?></font></p>
</td>
</tr>
<tr>
<td>
<table class="tt" cellpadding="4" width="100%">
<tr><td colspan="<?echo $hlasoval ? 2 : 3 ?>">
<BR>Pre tento mesiac boli nominovanΘ nasleduj·ce strßnky. Hlasova¥ sa dß a₧ po zaregistrovanφ.<BR><BR>
</td>
</tr>
<?php
$DBLink->query("select sum(hlasov) as pochla from sutaz where obdobie=$rrrrmm;");
list($pochla)=$DBLink->next_record();
if ($hlasoval=="1")
{ $DBLink->query("select * from sutaz where obdobie=$rrrrmm order by hlasov desc;");}
else { $DBLink->query("select * from sutaz where obdobie=$rrrrmm order by url desc;");}
while ($row = $DBLink->next_record()) {
if ($pochla != 0) $perc = sprintf('%.2f', $row['hlasov']/$pochla*100);
else $perc = 0;
if (substr($row['url'], 0, 7) != 'http://') $row['url'] = 'http://'.$row['url'];
echo('<tr><td width="100%">
<table border="0" width="100%" cellspacing="0" cellpadding="4">
<tr>
<td width="100%" colspan="3"><B>'.$row['nazov'].'</B></td>
</tr>
<tr>
<td width="120"><a href="'.$row['url'].'" WIDTH="120" target="_blank"><IMG SRC="sutaz/scr/'.$rrrrmm.'/'.$row['scrshot'].'" WIDTH=120 HEIGHT=80 BORDER=0></a></td>
<td width="70%"><p align="justify"><small>'.$row['popis'].'</small></p></td>');
if ($hlasoval=="0"){
echo('<td width="100"><SELECT NAME="s['.$row['id'].']">');
for ($i=0; $i<4; $i++) {
$bod = $i*($user['degree']+1);
echo("<OPTION value=\"$bod\">$bod</OPTION>");
}
echo('</SELECT> b.</td></tr>');
}
echo('<tr>
<td width="100%" colspan="3">URL: <a href="'.$row['url'].'" target="_blank">'.$row['url'].'</a> ');
if ($row['mail']!='') echo('Autor: <A HREF=mailto:'.$row['mail'].'>'.ucfirst($row['autor']).'</A><BR>');
else echo('Autor: <b>'.ucfirst($row['autor']).'</b>');
echo('</td></tr>');
if ($hlasoval=="1") {
echo('<tr><td width="100%" colspan="3">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="190">');
echo('<I>Hlasov: '.$row['hlasov']." ($perc%)</I>\n");
echo('</td><td width="250" height="8" bordercolor="#000000" style="border-style: solid; border-width: 1">
<img src="sutaz/nic.gif" border="0" height="14" width="'.$perc.'%" >');
echo('</td>
</tr>
</table>
</td>
</tr>'); };
echo('</table></tr></td>');
}
?>
</td></tr>
</table>
</td>
</tr>
<tr><td align="center">
<?php
if ($hlasoval=="0") {
echo('<input type="submit" value="Hlasuj!" name="hlasuj"><BR>');
echo('<INPUT TYPE="hidden" name="rrrrmm" value="'.$rrrrmm.'">');
}
else echo('Hlasova¥ je mo₧ne iba on-line.');
?>
</td>
</tr>
</table>
</div>
</form>
<center>
<a class="lel" href="index.php?intro=sutaz/prehlad.php">V²sledky predchßdzaj·cich mesiacov.</a>
<BR><BR>
<a href="index.php">spΣ¥</a>
</center>