summaryrefslogtreecommitdiff
path: root/www-ssl
diff options
context:
space:
mode:
authorAngelo Cuccato <cuccato@web.de>2010-11-08 23:38:31 +0100
committerAngelo Cuccato <cuccato@web.de>2010-11-08 23:38:31 +0100
commit0059fd16dd903abc5417e3f4c8c6a9c1fdb3ab26 (patch)
tree9a0665d2ca5db41678f2624f8ea108a1141bd2ce /www-ssl
parent4cd60813539039dbedff97f4359a5094b0286dd8 (diff)
add Statistics
Diffstat (limited to 'www-ssl')
-rwxr-xr-xwww-ssl/admin/debug.php37
-rwxr-xr-xwww-ssl/admin/user.php9
2 files changed, 24 insertions, 22 deletions
diff --git a/www-ssl/admin/debug.php b/www-ssl/admin/debug.php
index afc394eb..af42dd20 100755
--- a/www-ssl/admin/debug.php
+++ b/www-ssl/admin/debug.php
@@ -30,33 +30,26 @@ funktion_db_list("FAQ");
echo "Deaktiviert";
*/
+echo "<br>\n";
+funktion_db_element_list_2row( "Tshirt-Size aller engel",
+ "SELECT `Size`, COUNT(`Size`) FROM `User` GROUP BY `Size`");
-echo "<h1>Tshirt-Size aller engel</h1>";
-$SQL="SELECT `Size`, COUNT(`Size`) FROM `User` GROUP BY `Size`";
-$Erg = mysql_query($SQL, $con);
-echo mysql_error($con);
-$rowcount = mysql_num_rows($Erg);
+echo "<br>\n";
+funktion_db_element_list_2row( "Tshirt ausgegeben",
+ "SELECT `Size`, COUNT(`Size`) FROM `User` WHERE `Tshirt`='1' GROUP BY `Size`");
-for ($i=0; $i<$rowcount; $i++)
- echo mysql_result($Erg, $i, 1). "x '". mysql_result($Erg, $i, 0). "'<br>\n";
+echo "<br>\n";
+funktion_db_element_list_2row( "Tshirt nicht ausgegeben (Gekommen=1)",
+ "SELECT COUNT(`Size`), `Size` FROM `User` WHERE `Gekommen`='1' and `Tshirt`='0' GROUP BY `Size`");
-echo "<h1>Tshirt ausgegeben</h1>";
-$SQL="SELECT `Size`, COUNT(`Size`) FROM `User` WHERE `Tshirt`='1' GROUP BY `Size`";
-$Erg = mysql_query($SQL, $con);
-echo mysql_error($con);
-$rowcount = mysql_num_rows($Erg);
+echo "<br>\n";
+funktion_db_element_list_2row( "Hometown",
+ "SELECT COUNT(`Hometown`), `Hometown` FROM `User` GROUP BY `Hometown`");
-for ($i=0; $i<$rowcount; $i++)
- echo mysql_result($Erg, $i, 1). "x '". mysql_result($Erg, $i, 0). "'<br>\n";
+echo "<br>\n";
+funktion_db_element_list_2row( "Engeltypen",
+ "SELECT COUNT(`Art`), `Art` FROM `User` GROUP BY `Art`");
-echo "<h1>Tshirt nicht ausgegeben (Gekommen=1)</h1>";
-$SQL="SELECT `Size`, COUNT(`Size`) FROM `User` WHERE `Gekommen`='1' and `Tshirt`='0' GROUP BY `Size`";
-$Erg = mysql_query($SQL, $con);
-echo mysql_error($con);
-$rowcount = mysql_num_rows($Erg);
-
-for ($i=0; $i<$rowcount; $i++)
- echo mysql_result($Erg, $i, 1). "x '". mysql_result($Erg, $i, 0). "'<br>\n";
include ("../../includes/footer.php");
?>
diff --git a/www-ssl/admin/user.php b/www-ssl/admin/user.php
index 1b99ec4b..a792f864 100755
--- a/www-ssl/admin/user.php
+++ b/www-ssl/admin/user.php
@@ -101,6 +101,15 @@ if (!IsSet($_GET["enterUID"]))
"<td>$Gekommen</td><td>$Active</td><td>$Tshirt</td><td></td></tr>\n";
echo "\t</table>\n";
// Ende Userliste
+
+ echo "<h1>Statistics</h1>";
+ funktion_db_element_list_2row( "Hometown",
+ "SELECT COUNT(`Hometown`), `Hometown` FROM `User` GROUP BY `Hometown`");
+
+ echo "<br>\n";
+
+ funktion_db_element_list_2row( "Engeltypen",
+ "SELECT COUNT(`Art`), `Art` FROM `User` GROUP BY `Art`");
}
else
{