" . $a["username"] . ""; else $latestuser = $a['username']; $registered = number_format(get_row_count("users")); $unverified = number_format(get_row_count("users", "WHERE status='pending'")); $torrents = number_format(get_row_count("torrents")); //$dead = number_format(get_row_count("torrents", "WHERE visible='no'")); $seeders = get_row_count("peers", "WHERE seeder='yes'"); $leechers = get_row_count("peers", "WHERE seeder='no'"); $result = mysql_query("SELECT SUM(downloaded) AS totaldl, SUM(uploaded) AS totalul FROM users") or sqlerr(__FILE__, __LINE__); $row = mysql_fetch_assoc($result); $totaldownloaded = mksize($row["totaldl"]); $totaluploaded = mksize($row["totalul"]); $seeders = $seeders; $leechers = $leechers; $peers = number_format($leechers + $seeders); if ($seeders == "0") { $ratio = "0"; } elseif ($leechers == "0") { $ratio = "0"; } else { $ratio = round($seeders / $leechers * 100); } $seeders = number_format($seeders); $leechers = number_format($leechers); #$peers = number_format($leechers + $seeders); $USERS = number_format(get_row_count("users", "WHERE class='0'")); $poweruser = number_format(get_row_count("users", "WHERE class='16'")); $Moderator = number_format(get_row_count("users", "WHERE class = '64'")); $ADMINISTRATOR = number_format(get_row_count("users", "WHERE class = '80'")); $sysop = number_format(get_row_count("users", "WHERE class = '96'")); $warnedu = number_format(get_row_count("users", "WHERE warned='yes'")); $disabled = number_format(get_row_count("users", "WHERE enabled='no'")); $VIP = number_format(get_row_count("users", "WHERE class='32'")); stdhead(); //echo "Welcome to our newest member, $latestuser!\n"; $news_title = "Recent news"; print("Poll"); $poll_title = "" .SITEPOLL. ""; if (get_user_class() >= UC_MODERATOR) { $poll_title.=""; $poll_title.=" - [" .SITEPOLL_NEW. "]\n"; if($pollok) { $poll_title.=" - [" .SITEPOLL_EDIT. "]\n"; $poll_title.=" - [" .SITEPOLL_DEL. "]"; } $poll_title.=""; } //print("\n"); if($pollok) { //print("
"); //print("

Recent news"); if (get_user_class() >= UC_ADMINISTRATOR) $news_title.=" - [" .SITENEWS. "]"; //print("

\n"); $res = mysql_query("SELECT * FROM news WHERE ADDDATE(added, INTERVAL 45 DAY) > NOW() ORDER BY added DESC LIMIT 10") or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($res) > 0) { //print("
\n
    "); begin_frame($news_title,false,5); print("
      "); while($array = mysql_fetch_array($res)) { print("
    • " . gmdate("Y-m-d",strtotime($array['added'])) . " - " . $array['body']); if (get_user_class() >= UC_ADMINISTRATOR) { print(" [E]"); print(" [D]"); } print("
    • "); } print("
    "); end_frame(); //print("
\n"); } if ($CURUSER) { ?> "; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
BoldItalicUnderlineUrlImg
"; } ?>

Actualiser  Historique  Smilies

Message:

\n"); begin_frame($poll_title,false,5); print("
"); print("

$question

\n"); $voted = $arr2; if ($voted) { // display results if ($arr["selection"]) $uservote = $arr["selection"]; else $uservote = -1; // we reserve 255 for blank vote. $res = mysql_query("SELECT selection FROM pollanswers WHERE pollid=$pollid AND selection < 20") or sqlerr(); $tvotes = mysql_num_rows($res); $vs = array(); // array of $os = array(); // Count votes while ($arr2 = mysql_fetch_row($res)) $vs[$arr2[0]] += 1; reset($o); for ($i = 0; $i < count($o); ++$i) if ($o[$i]) $os[$i] = array($vs[$i], $o[$i]); function srt($a,$b) { if ($a[0] > $b[0]) return -1; if ($a[0] < $b[0]) return 1; return 0; } // now os is an array like this: array(array(123, "Option 1"), array(45, "Option 2")) if ($arr["sort"] == "yes") usort($os, srt); print("\n"); $i = 0; while ($a = $os[$i]) { if ($i == $uservote) $a[1] .= " *"; if ($tvotes == 0) $p = 0; else $p = round($a[0] / $tvotes * 100); $nn = $a[0]; if ($i % 2) $c = ""; else $c = ""; print("\n"); ++$i; } print("
" . $a[1] . "  " . "\"\"\"\"\"\" $p% ($nn)
\n"); $tvotes = number_format($tvotes); print("

" .SITE_VOTES. " : $tvotes

\n"); } else { print("
\n"); $i = 0; while ($a = $o[$i]) { print("$a
\n"); ++$i; } print("
"); print("" .VOTE_BLANK. "
\n"); print("

"); } ?>
" .PRE_POLLS. "

\n"); end_frame(); ?>
Users Power Users VIP's Moderateur Adminstrateur Sysop Membres bloqués Membres avertis = UC_MODERATOR) { begin_frame("" .SERVER_LOAD. "",true,5);?>
"); ?>
=$dt")); $res = mysql_query("SELECT id, username, class, warned, donor FROM users WHERE last_access >=$dt ORDER BY class DESC") or print(mysql_error()); while ($arr = mysql_fetch_assoc($res)) { if ($activeusers) $activeusers .= ",\n"; switch ($arr["class"]) { case UC_SYSOP: $arr["username"] = "" . $arr["username"] . ""; break; case UC_ADMINISTRATOR: $arr["username"] = "" . $arr["username"] . ""; break; case UC_MODERATOR: $arr["username"] = "" . $arr["username"] . ""; break; case UC_UPLOADER: $arr["username"] = "" . $arr["username"] . ""; break; case UC_VIP: $arr["username"] = "" . $arr["username"] . ""; break; case UC_POWER_USER: $arr["username"] = "" . $arr["username"] . ""; break; case UC_USER: $arr["username"] = "" . $arr["username"] . ""; break; } if ($arr["donor"] == "yes") $star = "\"Donated\"/"; else $star = ""; if ($arr["warned"] == "yes") $warn = "\"Warned\"/"; else $warn = ""; $donator = $arr["donated"] > 0; if ($donator) $activeusers .= ""; $activeusers .= "" . $arr["username"] . $star . $warn . ""; if ($donator) $activeusers .= ""; } if (!$activeusers) $activeusers = "There have been no active users in the last 15 minutes."; ?> "; echo $activeusers; echo ""; end_table(); ?>
| | | | | User " .WELCOME_NEW. " $latestuser!
\n"; end_frame (); // ------------------------------- ?> Today's Birthdays
"); #echo ""; $currentdate = date("Y-m-d", time()); list($year1, $month1, $day1) = split('-', $currentdate); $res2 = mysql_query("SELECT birthday, id, username FROM users WHERE birthday != '0000-00-00'") or sqlerr(); while ($arr2 = mysql_fetch_assoc($res2)) { $birthday = date($arr2["birthday"]); $username = $arr2["username"]; $id = $arr2["id"]; list($year2, $month2, $day2) = split('-', $birthday); if($month1 < $month2){ $age = $year1 - $year2 - 1; } if($month1 == $month2){ if($day1 < $day2){ $age = $year1 - $year2 - 1; }else{ $age = $year1 - $year2; } } if($month1 > $month2){ $age = $year1 - $year2; } if (($month1 == $month2) && ($day1 == $day2)) { if ($b > 0) print(", "); #echo ""; print("$username"); print("($age)"); $b = $b + 1; } } if ($b == 0) print("Aucun"); #print("
"); ///////////////// BIRTHDAY MOD ///////////////////// #end_table(); end_frame (); ?>