-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
81 lines (66 loc) · 1.99 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
//
/*
Docmentation Manager
by Quentin Cregan, SourceForge 06/2000
*/
require('doc_utils.php');
require('pre.php');
if ($group_id) {
if (!($language_id)) {
if (!($language_id = user_get_language())) {
// default to English
$language_id = 1;
}
}
$usermem = user_ismember($group_id);
docman_header('Project Documentation','Project Documentation');
//get a list of group numbers that this project owns
$query = "select * "
."from doc_groups "
."where group_id = $group_id "
."order by groupname";
$result = db_query($query);
//otherwise, throw up an error
if (db_numrows($result) < 1) {
print "This project has no categorized data.<p>";
} else {
doc_droplist_count($group_id, $language_id);
print "<hr>";
// get the groupings and display them with their members.
while ($row = db_fetch_array($result)) {
$query = "select description, docid, title, doc_group, type, filename "
."from doc_data "
."where doc_group = '".$row['doc_group']."' "
."and stateid ='1' "
."and language_id = ".$language_id."";
//state 1 == 'active'
if ($usermem == true) {
$query .= " or stateid = '5' "
." and doc_group = '".$row['doc_group']."' ";
} //state 5 == 'private'
$query .= " order by title";
$subresult = db_query($query);
if (!(db_numrows($subresult) < 1)) {
print "<p><b>".$row['groupname']."</b>\n<ul>\n";
while ($subrow = db_fetch_array($subresult)) {
print "<li><a href=\"display_doc.php?docid=".$subrow['docid']."&group_id=".$group_id."\">".$subrow['title']."</a>".
"<BR><i>Description:</i> ".$subrow['description'].
"<BR><i>Type:</i> ".$subrow['type'];
if ($subrow['filename'])
print "<BR><i>Filename:</i> ".$subrow['filename'];
}
print "</ul>\n\n";
}
}
}
docman_footer($params);
} else {
exit_no_group();
}
?>