include ("funcs.inc.php");
connect();
$dateiname=gimmefilename();
$dateiname=str_replace("sounds/","",$dateiname);
$dateiname=str_replace(".htm","",$dateiname);
$t=explode("-",$dateiname);
if (sizeof($t) == 1 ) {
// Beispiel: sonstiges
$kat = $t[0];
$seite = 1;
}
if (sizeof($t) == 2 ) {
// Beispiel: sonstiges-2
$kat = $t[0];
$seite = $t[1];
}
if (sizeof($t) == 3 ) {
// Beispiel: sonstiges-2-aufsName
$kat = $t[0];
$seite = $t[1];
$sort = $t[2];
}
if (!isset($sort)) $sort = $_POST["sort"]; // von dem Formular (höhere prio)
switch($sort) {
case "aufsDatum": $sortsql = "id"; break;
case "aufsViews": $sortsql = "views"; break;
case "aufsName": $sortsql = "titel"; break;
case "absDatum": $sortsql = "id DESC"; break;
case "absViews": $sortsql = "views DESC"; break;
case "absName": $sortsql = "titel DESC"; break;
case "absNote": $sortsql = "(note/votes) DESC"; break;
default: $sortsql = "(note/votes)"; break;
}
$proseite = 10;
$start=($seite-1)*$proseite;
if ($kat=='alle') {
$titel="Alle Fun Sounds - Humor & Spass Page!";
$htitel="Alle Fun-Sounds";
$alle = true;
// Anzahl der Einträge herausfinden
$sql = "SELECT count(kat) FROM sounds WHERE aktiv=\"1\"";
$anz=gimmeone($sql);
$sql = "SELECT titel,views,note,votes FROM sounds WHERE aktiv=\"1\" ORDER BY $sortsql LIMIT $start,$proseite";
} else if ($kat=='top10') {
$sql = "SELECT titel,views,note,votes FROM sounds WHERE aktiv=\"1\" ORDER BY (note/votes), zeit DESC LIMIT 0,10";
$titel="Top10 Fun Sounds - Humor & Spass Page!";
$htitel="Top10 Fun-Sounds";
$kat = '';
$anz = 10;
$top10 = true;
} else {
// Kategoriedaten laden
$sql = "SELECT * FROM soundkat WHERE kat_short='$kat'";
$res = mysql_query($sql) or die(mysql_error());
$katinfo = mysql_fetch_array($res);
$katid=$katinfo[0];
$katname=$katinfo[2];
// Anzahl der Einträge herausfinden
$sql = "SELECT count(kat) FROM sounds WHERE kat=\"$katid\" AND aktiv=\"1\"";
$anz=gimmeone($sql);
if (!$katid)
{
die ("Kat nicht vorhanden");
}
$titel="$katname Fun Sounds - Humor & Spass Page!";
$htitel="$katname Fun-Sounds";
$sql = "SELECT titel,views,note,votes FROM sounds WHERE kat=\"$katid\" AND aktiv=\"1\" ORDER BY $sortsql LIMIT $start,$proseite";
}
$num = $anz;
$anz=bcdiv($anz,$proseite)+1;
$vorher=$seite-1;
$nachher=$seite+1;
if ($anz<=$seite)
{
$wd=" DISABLED=\"true\"";
}
if ($seite==1)
{
$vd=" DISABLED=\"true\"";
}
include ("header.inc.php");
if ($num>0) { // wenns sounds gibt... ?>
Klicke einfach auf einen Sound, um ihn anzuhören.
| Platz | "; ?>Titel | Views | Bewertung | |
| ".(++$i).". | " : "").'![]() | '.$titel.' | '.$views.' | '.($votes<>0?colorize($note,$noten_text[$note-1])." (".komma($note).")":"noch keine").' |