2 /****************************************************************/
3 /* Code to view all kinds of interesting statistics about appdb */
4 /****************************************************************/
7 require(BASE
."include/incl.php");
8 require_once(BASE
."include/user.php");
10 apidb_header("Appdb Statistics");
12 echo "<div class='default_container'>\n";
14 echo html_frame_start("","60%","");
15 echo "<table width='100%' border=1 cellpadding=3 cellspacing=0>\n\n";
17 /* Display the number of users */
18 echo "<tr class=color4>\n";
19 echo " <td>Users:</td>\n";
20 echo " <td>".User
::objectGetEntriesCount()."</td>\n";
23 /* Display the active users in the last 30 days */
24 echo "<tr class=color4>\n";
25 echo " <td>Users active within the last 30 days:</td>\n";
26 echo " <td>".User
::active_users_within_days(30)."</td>\n";
29 /* Display the active users in the last 60 days */
30 echo "<tr class=color4>\n";
31 echo " <td>Users active within the last 60 days:</td>\n";
32 echo " <td>".User
::active_users_within_days(60)."</td>\n";
35 /* Display the active users in the last 90 days */
36 echo "<tr class=color4>\n";
37 echo " <td>Users active within the last 90 days:</td>\n";
38 echo " <td>".User
::active_users_within_days(90)."</td>\n";
41 /* Display the inactive users */
42 echo "<tr class=color4>\n";
43 echo " <td>Inactive users (not logged in since six months):</td>\n";
44 echo " <td>".(User
::objectGetEntriesCount()-
45 User
::active_users_within_days(183))."</td>\n";
48 /* Display the users who were warned and pending deletion */
49 echo "<tr class=color4>\n";
50 echo " <td>Inactive users pending deletion:</td>\n";
51 echo " <td>".User
::get_inactive_users_pending_deletion()."</td>\n";
54 /* Display the number of comments */
55 echo "<tr class=color4>\n";
56 echo " <td>Comments:</td>\n";
57 echo " <td>".getNumberOfComments()."</td>\n";
60 /* Display the number of application familes */
61 echo "<tr class=color4>\n";
62 echo " <td>Application families:</td>\n";
63 echo " <td>".application
::objectGetEntriesCount('accepted')."</td>\n";
66 /* Display the number of versions */
67 echo "<tr class=color4>\n";
68 echo " <td>Versions:</td>\n";
69 echo " <td>".version
::objectGetEntriesCount('accepted')."</td>\n";
72 /* Display the number of application maintainers */
73 echo "<tr class=color4>\n";
74 echo " <td>Application maintainers:</td>\n";
75 echo " <td>".Maintainer
::getNumberOfMaintainers()."</td>\n";
78 /* Display the number of test reports */
79 echo "<tr class=color4>\n";
80 echo " <td>Test reports:</td>\n";
81 echo " <td>".testData
::objectGetEntriescount('accepted')."</td>\n";
84 /* Display the number of images */
85 echo "<tr class=color4>\n";
86 echo " <td>Screenshots:</td>\n";
87 echo " <td>".screenshot
::objectGetEntriesCount('accepted')."</td>\n";
94 echo html_frame_end(" ");