/
index.php
59 lines (48 loc) · 1.5 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
// $Id: index.php,v 1.4 2004/01/13 13:15:25 helix Exp $
require('pre.php');
require('../pm/pm_utils.php');
if ($group_id) {
pm_header(array('title'=>'Projects for '.group_getname($group_id)));
if (user_isloggedin() && user_ismember($group_id)) {
$public_flag='0,1';
} else {
$public_flag='1';
}
$sql="SELECT * FROM project_group_list WHERE group_id='$group_id' AND is_public IN ($public_flag)";
$result = db_query ($sql);
$rows = db_numrows($result);
if (!$result || $rows < 1) {
echo "<H1>No Subprojects Found</H1>";
echo "<P>
<B>No subprojects have been set up, or you cannot view them.<P><FONT COLOR=RED>The Admin for this project ".
"will have to set up projects using the admin page</FONT></B>";
pm_footer(array());
exit;
}
echo '
<H2>Subprojects and Tasks</H2>
<P>
Choose a Subproject and you can browse/edit/add tasks to it.
<P>';
/*
Put the result set (list of forums for this group) into a column with folders
*/
for ($j = 0; $j < $rows; $j++) {
echo '
<A HREF="/pm/task.php?group_project_id='.db_result($result, $j, 'group_project_id').
'&group_id='.$group_id.'&func=browse">' .
html_image("images/ic/index.png","15","13",array("BORDER"=>"0")) . ' '.
db_result($result, $j, 'project_name').'</A><BR>'.
db_result($result, $j, 'description').'<P>';
}
pm_footer(array());
} else {
exit_no_group();
}
?>