|
1
|
|
|
<?php |
|
2
|
|
|
// |
|
3
|
|
|
// SourceForge: Breaking Down the Barriers to Open Source Development |
|
4
|
|
|
// Copyright 1999-2000 (c) The SourceForge Crew |
|
5
|
|
|
// http://sourceforge.net |
|
6
|
|
|
// |
|
7
|
|
|
// |
|
8
|
|
|
require_once('pre.php'); |
|
9
|
|
|
require('./site_stats_utils.php'); |
|
10
|
|
|
|
|
11
|
|
|
|
|
12
|
|
|
$HTML->header(array('title'=> $Language->getText('stats_graph','stats',$GLOBALS['sys_name']))); |
|
13
|
|
|
|
|
14
|
|
|
// require you to be a member of the super-admin group |
|
15
|
|
|
session_require(array('group'=>'1','admin_flags'=>'A')); |
|
16
|
|
|
|
|
17
|
|
|
|
|
18
|
|
|
// |
|
19
|
|
|
// BEGIN PAGE CONTENT CODE |
|
20
|
|
|
// |
|
21
|
|
|
|
|
22
|
|
|
echo "\n\n"; |
|
23
|
|
|
|
|
24
|
|
|
print '<DIV ALIGN="CENTER">' . "\n"; |
|
25
|
|
|
print '<span class="normal"><b>'.$Language->getText('stats_projects','comparisons').'</b></span><BR>' . "\n"; |
|
26
|
|
|
print '</DIV>'."\n"; |
|
27
|
|
|
|
|
28
|
|
|
print ' |
|
29
|
|
|
|
|
30
|
|
|
<HR> |
|
31
|
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
32
|
|
|
<tr> |
|
33
|
|
|
<td align="center"><a href="index.php">'.$Language->getText('stats_graph','overview').'</a></td> |
|
34
|
|
|
<td align="center"><B>'.$Language->getText('stats_graph','project_stats').'</B></td> |
|
35
|
|
|
<td align="center"><a href="graphs.php">'.$Language->getText('stats_graph','site_graphs').'</a></td> |
|
36
|
|
|
</tr> |
|
37
|
|
|
</table> |
|
38
|
|
|
|
|
39
|
|
|
<HR> |
|
40
|
|
|
'; |
|
41
|
|
|
|
|
42
|
|
|
if ( isset( $span ) ) { |
|
43
|
|
|
|
|
44
|
|
|
if ( !isset($orderby) ) { |
|
45
|
|
|
$orderby = "downloads"; |
|
46
|
|
|
} |
|
47
|
|
|
|
|
48
|
|
|
if ( isset( $trovecatid ) && $trovecatid > 0 ) { |
|
49
|
|
|
$project_list = stats_generate_trove_grouplist( $trovecatid ); |
|
50
|
|
|
} |
|
51
|
|
|
|
|
52
|
|
|
if ( $span < 1 ) { |
|
53
|
|
|
$span = 21; |
|
54
|
|
|
} |
|
55
|
|
|
|
|
56
|
|
|
if ( !isset($offset) ) { |
|
57
|
|
|
$offset = 0; |
|
58
|
|
|
} |
|
59
|
|
|
|
|
60
|
|
|
if ( $projects != "" ) { |
|
61
|
|
|
$project_list = explode(" ", $projects ); |
|
62
|
|
|
$trovecatid = -1; |
|
63
|
|
|
} |
|
64
|
|
|
|
|
65
|
|
|
if ( $trovecatid == 0 ) { |
|
66
|
|
|
$project_list = 0; |
|
67
|
|
|
} |
|
68
|
|
|
|
|
69
|
|
|
// Print the form, passing it the params, so it can save state. |
|
70
|
|
|
stats_site_projects_form( $span, $orderby, $offset, $projects, $trovecatid ); |
|
71
|
|
|
|
|
72
|
|
|
print '<DIV ALIGN="CENTER">' . "\n"; |
|
73
|
|
|
print '<BR><BR>' . "\n"; |
|
74
|
|
|
stats_site_projects( $span, $orderby, $offset, $project_list, $trovecatid ); |
|
|
|
|
|
|
75
|
|
|
print '<BR><BR>' . "\n"; |
|
76
|
|
|
print '</DIV>' . "\n"; |
|
77
|
|
|
|
|
78
|
|
|
} else { |
|
79
|
|
|
|
|
80
|
|
|
// Print the form, passing it the params, so it can save state. |
|
81
|
|
|
stats_site_projects_form( $span, $orderby, $offset, $projects, $trovecatid ); |
|
82
|
|
|
|
|
83
|
|
|
} |
|
84
|
|
|
|
|
85
|
|
|
// |
|
86
|
|
|
// END PAGE CONTENT CODE |
|
87
|
|
|
// |
|
88
|
|
|
|
|
89
|
|
|
$HTML->footer( array() ); |
|
90
|
|
|
?> |
|
91
|
|
|
|
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.