Neuen Engel eintragen »

\n"; if (!isset ($_GET["OrderBy"])) $_GET["OrderBy"] = "Nick"; $SQL = "SELECT * FROM `User` ORDER BY `" . $_GET["OrderBy"] . "` ASC"; $Erg = sql_query($SQL); // anzahl zeilen $Zeilen = mysql_num_rows($Erg); $html .= "Anzahl Engel: $Zeilen

\n"; $html .= ' '; $Gekommen = 0; $Active = 0; $Tshirt = 0; for ($n = 0; $n < $Zeilen; $n++) { $title = ""; $user_groups = sql_select("SELECT * FROM `UserGroups` JOIN `Groups` ON (`Groups`.`UID` = `UserGroups`.`group_id`) WHERE `UserGroups`.`uid`=" . sql_escape(mysql_result($Erg, $n, "UID")) . " ORDER BY `Groups`.`Name`"); $groups = array (); foreach ($user_groups as $user_group) { $groups[] = $user_group['Name']; } $title .= 'Groups: ' . join(", ", $groups) . "
"; if (strlen(mysql_result($Erg, $n, "Telefon")) > 0) $title .= "Tel: " . mysql_result($Erg, $n, "Telefon") . "
"; if (strlen(mysql_result($Erg, $n, "Handy")) > 0) $title .= "Handy: " . mysql_result($Erg, $n, "Handy") . "
"; if (strlen(mysql_result($Erg, $n, "DECT")) > 0) $title .= "DECT: " . mysql_result($Erg, $n, "DECT") . "
"; if (strlen(mysql_result($Erg, $n, "Hometown")) > 0) $title .= "Hometown: " . mysql_result($Erg, $n, "Hometown") . "
"; if (strlen(mysql_result($Erg, $n, "lastLogIn")) > 0) $title .= "Last login: " . date("Y-m-d H:i", mysql_result($Erg, $n, "lastLogIn")) . "
"; if (strlen(mysql_result($Erg, $n, "Art")) > 0) $title .= "Type: " . mysql_result($Erg, $n, "Art") . "
"; if (strlen(mysql_result($Erg, $n, "ICQ")) > 0) $title .= "ICQ: " . mysql_result($Erg, $n, "ICQ") . "
"; if (strlen(mysql_result($Erg, $n, "jabber")) > 0) $title .= "jabber: " . mysql_result($Erg, $n, "jabber") . "
"; $html .= "\n"; $html .= "\t\n"; $html .= "\t\n"; $html .= "\t\n"; $html .= "\t\n"; $html .= "\t\n"; $Gekommen += mysql_result($Erg, $n, "Gekommen"); $html .= "\t\n"; $Active += mysql_result($Erg, $n, "Aktiv"); $html .= "\t\n"; $Tshirt += mysql_result($Erg, $n, "Tshirt"); $html .= "\t\n"; $html .= ""; $html .= "\t\n"; $html .= "\n"; } $html .= "" . "" . "\n"; $html .= "\t
Nick Vorname Name Alter E-Mail Größe Gekommen Aktiv T-Shirt Registrier Änd.
" . mysql_result($Erg, $n, "Nick") . "" . mysql_result($Erg, $n, "Vorname") . " " . mysql_result($Erg, $n, "Name") . "" . mysql_result($Erg, $n, "Alter") . ""; if (strlen(mysql_result($Erg, $n, "email")) > 0) $html .= "" . mysql_result($Erg, $n, "email") . ""; $html .= ''; $html .= "" . mysql_result($Erg, $n, "Size") . "" . mysql_result($Erg, $n, "Gekommen") . "" . mysql_result($Erg, $n, "Aktiv") . "" . mysql_result($Erg, $n, "Tshirt") . "" . mysql_result($Erg, $n, "CreateDate") . "" . 'Edit' . "
$Gekommen$Active$Tshirt
\n"; // Ende Userliste $html .= "

Statistics

"; $html .= funktion_db_element_list_2row("Hometown", "SELECT COUNT(`Hometown`), `Hometown` FROM `User` GROUP BY `Hometown`"); $html .= "
\n"; $html .= funktion_db_element_list_2row("Engeltypen", "SELECT COUNT(`Art`), `Art` FROM `User` GROUP BY `Art`"); $html .= "
\n"; $html .= funktion_db_element_list_2row("Used Groups", "SELECT Groups.Name AS 'GroupName', COUNT(Groups.Name) AS Count FROM `UserGroups` " . "LEFT JOIN `Groups` ON Groups.UID = UserGroups.group_id " . "WHERE (UserGroups.group_id!='NULL') " . "GROUP BY `GroupName` " . ""); return $html; } ?>