Main Page | Directories | File List | File Members

stats/general.php File Reference

Go to the source code of this file.

Functions

 stats_get_generic ($sql)
 stats_getprojects_active ($type_id="")
 stats_getprojects_bytype_active ($type_id)
 stats_getprojects_pending ()
 stats_getprojects_total ()
 stats_getprojects ($type_id="", $is_public="", $period="")
 stats_getusers ($period="")
 stats_getitems ($tracker, $only_open="", $period="")
 stats_getthemeusers ($theme="")


Function Documentation

stats_get_generic sql  ) 
 

Definition at line 24 of file stats/general.php.

References db_fetch_array(), db_numrows(), and db_query().

Referenced by stats_getitems(), stats_getprojects(), stats_getprojects_pending(), stats_getthemeusers(), and stats_getusers().

00025 {
00026   $res_count = db_query($sql);
00027   if (db_numrows($res_count) > 0) 
00028     {
00029       $row_count = db_fetch_array($res_count);
00030       return $row_count['count'];
00031     } 
00032   else 
00033     {
00034       return _("Error");
00035     }
00036 }

stats_getitems tracker,
only_open = "",
period = ""
 

Definition at line 78 of file stats/general.php.

References stats_get_generic().

00079 {
00080   if ($only_open)
00081     { $only_open = " AND status_id='$only_open'"; }
00082   else
00083     { unset($only_open); }
00084 
00085   if ($period)
00086     { $period = " AND $period"; }
00087   
00088  
00089   return stats_get_generic("SELECT count(*) AS count FROM $tracker WHERE group_id<>'100' $only_open $period");
00090 }

stats_getprojects type_id = "",
is_public = "",
period = ""
 

Definition at line 58 of file stats/general.php.

References stats_get_generic(), and type_id.

Referenced by stats_getprojects_active(), and stats_getprojects_total().

00059 {
00060   if ($type_id)
00061     { $type_id = " AND type='$type_id'"; }
00062   if ($is_public != "")
00063     { $is_public = " AND is_public='$is_public'"; }
00064   if ($period)
00065     { $period = " AND $period"; }
00066 
00067   return stats_get_generic("SELECT count(*) AS count FROM groups WHERE status='A' $type_id $is_public $period");
00068 }

stats_getprojects_active type_id = ""  ) 
 

Definition at line 38 of file stats/general.php.

References stats_getprojects(), and type_id.

Referenced by show_sitestats(), and stats_getprojects_bytype_active().

00039 {
00040   return stats_getprojects($type_id);
00041 }

stats_getprojects_bytype_active type_id  ) 
 

Definition at line 43 of file stats/general.php.

References stats_getprojects_active(), and type_id.

Referenced by show_sitestats().

00044 {
00045   return stats_getprojects_active($type_id);
00046 }

stats_getprojects_pending  ) 
 

Definition at line 48 of file stats/general.php.

References stats_get_generic().

Referenced by show_sitestats().

00049 {
00050   return stats_get_generic("SELECT count(*) AS count FROM groups WHERE status='P'");
00051 }

stats_getprojects_total  ) 
 

Definition at line 53 of file stats/general.php.

References stats_getprojects().

00054 {
00055   return stats_getprojects();
00056 }

stats_getthemeusers theme = ""  ) 
 

Definition at line 92 of file stats/general.php.

References stats_get_generic().

00093 {
00094   return stats_get_generic("SELECT count(*) AS count FROM user WHERE status='A' AND theme='$theme'");
00095 }

stats_getusers period = ""  ) 
 

Definition at line 70 of file stats/general.php.

References stats_get_generic().

Referenced by show_sitestats().

00071 {
00072   if ($period)
00073     { $period = " AND $period"; }
00074 
00075   return stats_get_generic("SELECT count(*) AS count FROM user WHERE status='A' $period");
00076 }


Generated on Sun Feb 26 13:23:05 2006 for Savane PHP Frontend Developer Reference by  doxygen 1.4.4