5 * SourceForge: Breaking Down the Barriers to Open Source Development
6 * Copyright 1999-2001 (c) VA Linux Systems
7 * http://sourceforge.net
12 require_once('www/include/vote_function.php');
13 require_once('common/include/vars.php');
14 require_once('www/news/news_utils.php');
15 require_once('www/include/trove.php');
16 require_once('www/include/project_summary.php');
18 //make sure this project is NOT a foundry
19 if (!$project->isProject()) {
20 header ("Location: /foundry/". $project->getUnixName() ."/");
24 $title = 'Project Info - '. $project->getPublicName();
26 site_project_header(array('title'=>$title,'group'=>$group_id,'toptab'=>'home','pagename'=>'projects','sectionvals'=>array(group_getname($group_id))));
29 // ########################################### end top area
34 <TABLE WIDTH="100%" BORDER="0">
35 <TR><TD WIDTH="99%" VALIGN="top">
38 // ########################################## top area, not in box
39 $res_admin = db_query("
40 SELECT users.user_id AS user_id,users.user_name AS user_name
42 WHERE user_group.user_id=users.user_id
43 AND user_group.group_id=$group_id
44 AND user_group.admin_flags = 'A'
48 if ($project->getStatus() == 'H') {
49 print "<P>NOTE: This project entry is maintained by the ".$GLOBALS['sys_name']." staff. We are not "
50 . "the official site "
51 . "for this product. Additional copyright information may be found on this project's homepage.\n";
54 if ($project->getDescription()) {
55 print "<P>" . $project->getDescription();
57 print "<P>This project has not yet submitted a description.";
61 print '<BR> <BR>';
62 trove_getcatlisting($group_id,0,1);
64 // Get the activity percentile
65 $actv = db_query("SELECT percentile FROM project_weekly_metric WHERE group_id='$group_id'");
66 $actv_res = db_result($actv,0,"percentile");
71 print("Registered: " . date($sys_datefmt, $project->getStartDate()));
72 print '<br>Activity Percentile: ' . $actv_res . '%';
73 print '<br>View project activity <a href="/project/stats/?group_id='.$group_id.'">statistics</a>';
75 $jobs_res = db_query("SELECT name ".
76 "FROM people_job,people_job_category ".
77 "WHERE people_job.category_id=people_job_category.category_id ".
78 "AND people_job.status_id=1 ".
79 "AND group_id='$group_id' ".
82 $num=db_numrows($jobs_res);
84 print '<br><br>HELP WANTED: This project is looking for ';
86 print '<a href="/people/?group_id='.$group_id.'">'.
87 db_result($jobs_res,0,"name").'(s)</a>';
89 print 'People to fill '.
90 '<a href="/people/?group_id='.$group_id.'">several '.
91 'different positions</a>';
97 print '</TD><TD NoWrap VALIGN="top">';
99 // ########################### Developers on this project
101 echo $HTML->box1_top($Language->getText('group','developer_info'));
103 if (db_numrows($res_admin) > 0) {
106 <SPAN CLASS="develtitle"><?php echo $Language->getText('group','project_admins'); ?>:</SPAN><BR>
108 while ($row_admin = db_fetch_array($res_admin)) {
109 print "<A href=\"/users/$row_admin[user_name]/\">$row_admin[user_name]</A><BR>";
112 <HR WIDTH="100%" SIZE="1" NoShade>
118 <SPAN CLASS="develtitle"><?php echo $Language->getText('group','developers'); ?>:</SPAN><BR>
120 //count of developers on this project
121 $res_count = db_query("SELECT user_id FROM user_group WHERE group_id=$group_id");
122 print db_numrows($res_count);
126 <A HREF="/project/memberlist.php?group_id=<?php print $group_id; ?>">[View Members]</A>
129 echo $HTML->box1_bottom();
137 // ############################# File Releases
139 echo $HTML->box1_top($Language->getText('frs','latest_file_releases'));
140 $unix_group_name = $project->getUnixName();
143 <TABLE cellspacing="1" cellpadding="5" width="100%" border="0">
144 <TR bgcolor="'.$HTML->COLOR_LTBACK1.'">
146 '.$Language->getText('frs','file_package').'
149 '.$Language->getText('frs','file_version').'
152 '.$Language->getText('frs','file_rel_date').'
155 '.$Language->getText('frs','file_notes').' / '.$Language->getText('frs','file_monitor').'
158 '.$Language->getText('frs','file_download').'
162 $sql="SELECT frs_package.package_id,frs_package.name AS package_name,frs_release.name AS release_name,frs_release.release_id AS release_id,frs_release.release_date AS release_date ".
163 "FROM frs_package,frs_release ".
164 "WHERE frs_package.package_id=frs_release.package_id ".
165 "AND frs_package.group_id='$group_id' ".
166 "AND frs_release.status_id=1 ".
167 "ORDER BY frs_package.package_id,frs_release.release_date DESC";
169 $res_files = db_query($sql);
170 $rows_files=db_numrows($res_files);
171 if (!$res_files || $rows_files < 1) {
174 echo '<TR BGCOLOR="'.$HTML->COLOR_LTBACK1.'"><TD COLSPAN="4"><B>This Project Has Not Released Any Files</B></TD></TR>';
178 This query actually contains ALL releases of all packages
179 We will test each row and make sure the package has changed before printing the row
181 for ($f=0; $f<$rows_files; $f++) {
182 if (db_result($res_files,$f,'package_id')==db_result($res_files,($f-1),'package_id')) {
183 //same package as last iteration - don't show this release
185 $rel_date = getdate(db_result($res_files,$f,'release_date'));
187 <TR BGCOLOR="'.$HTML->COLOR_LTBACK1.'" ALIGN="center">
189 <B>' . db_result($res_files,$f,'package_name'). '</B></TD>';
190 // Releases to display
191 print '<TD>'.db_result($res_files,$f,'release_name') .'
193 <td>' . $rel_date["month"] . ' ' . $rel_date["mday"] . ', ' . $rel_date["year"] . '</td>
194 <TD><A href="/project/shownotes.php?group_id=' . $group_id . '&release_id=' . db_result($res_files,$f,'release_id') . '">';
195 echo html_image("images/ic/manual16c.png",'15','15',array('alt'=>'Release Notes'));
196 echo '</A> - <A HREF="/project/filemodule_monitor.php?filemodule_id=' . db_result($res_files,$f,'package_id') . '">';
197 echo html_image("images/ic/mail16d.png",'15','15',array('alt'=>'Monitor This Package'));
200 <TD><A HREF="/project/showfiles.php?group_id=' . $group_id . '&release_id=' . db_result($res_files,$f,'release_id') . '">'.$Language->getText('frs','file_download').'</A></TD></TR>';
207 <a href="/project/showfiles.php?group_id=<?php print $group_id; ?>">[View ALL Project Files]</A>
210 echo $HTML->box1_bottom();
214 <TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0">
215 <TR><TD VALIGN="top">
219 // ############################## PUBLIC AREAS
220 echo $HTML->box1_top($Language->getText('group','public_area'));
222 // ################# Homepage Link
224 print "<A href=\"http://" . $project->getHomePage() . "\">";
225 print html_image("images/ic/home16b.png",'20','20',array('alt'=>$Language->getText('group','short_homepage')));
226 print ' '.$Language->getText('group','long_homepage').'</A>';
228 // ################## ArtifactTypes
230 print '<HR SIZE="1" NoShade><A href="/tracker/?group_id='.$group_id.'">';
231 print html_image("images/ic/taskman16b.png",'20','20',array('alt'=>$Language->getText('group','short_tracker')));
232 print ' Tracker</A>';
234 $result=db_query("SELECT agl.*,aca.count,aca.open_count
235 FROM artifact_group_list agl
236 LEFT JOIN artifact_counts_agg aca USING (group_artifact_id)
237 WHERE agl.group_id='$group_id'
239 ORDER BY group_artifact_id ASC");
241 $rows = db_numrows($result);
243 if (!$result || $rows < 1) {
244 echo '<BR><I>There are no public trackers available</I>';
246 for ($j = 0; $j < $rows; $j++) {
248 - <A HREF="/tracker/?atid='. db_result($result, $j, 'group_artifact_id') .
249 '&group_id='.$group_id.'&func=browse">'. db_result($result, $j, 'name') .'</A>
250 ( <B>'. db_result($result, $j, 'open_count') .' open / '. db_result($result, $j, 'count') .' total</B> )<BR>'.
251 db_result($result, $j, 'description');
255 // ################## forums
257 if ($project->usesForum()) {
258 print '<HR SIZE="1" NoShade><A href="/forum/?group_id='.$group_id.'">';
259 print html_image("images/ic/notes16.png",'20','20',array('alt'=>$Language->getText('group','short_forum')));
260 print ' '.$Language->getText('group','long_forum').'</A>';
261 print " ( <B>". project_get_public_forum_message_count($group_id) ."</B> messages in ";
263 print "<B>". project_get_public_forum_count($group_id) ."</B> forums )\n";
266 // ##################### Doc Manager
268 if ($project->usesDocman()) {
270 <HR SIZE="1" NoShade>
271 <A href="/docman/?group_id='.$group_id.'">';
272 print html_image("images/ic/docman16b.png",'20','20',array('alt'=>$Language->getText('group','short_docman')));
273 print ' '.$Language->getText('group','long_docman').'</A>';
276 // ##################### Mailing lists
278 if ($project->usesMail()) {
279 print '<HR SIZE="1" NoShade><A href="/mail/?group_id='.$group_id.'">';
280 print html_image("images/ic/mail16b.png",'20','20',array('alt'=>$Language->getText('group','short_mail')));
281 print ' '.$Language->getText('group','long_mail').'</A>';
282 print " ( <B>". project_get_mail_list_count($group_id) ."</B> public mailing lists )";
285 // ##################### Task Manager
287 if ($project->usesPm()) {
288 print '<HR SIZE="1" NoShade><A href="/pm/?group_id='.$group_id.'">';
289 print html_image("images/ic/taskman16b.png",'20','20',array('alt'=>$Language->getText('group','short_pm')));
290 print ' '.$Language->getText('group','long_pm').'</A>';
291 $sql="SELECT * FROM project_group_list WHERE group_id='$group_id' AND is_public=1";
292 $result = db_query ($sql);
293 $rows = db_numrows($result);
294 if (!$result || $rows < 1) {
295 echo '<BR><I>There are no public subprojects available</I>';
297 for ($j = 0; $j < $rows; $j++) {
299 <BR> - <A HREF="/pm/task.php?group_project_id='.db_result($result, $j, 'group_project_id').
300 '&group_id='.$group_id.'&func=browse">'.db_result($result, $j, 'project_name').'</A>';
306 // ######################### Surveys
308 if ($project->usesSurvey()) {
309 print '<HR SIZE="1" NoShade><A href="/survey/?group_id='.$group_id.'">';
310 print html_image("images/ic/survey16b.png",'20','20',array('alt'=>$Language->getText('group','short_survey')));
311 print " ".$Language->getText('group','long_survey')."</A>";
312 echo ' ( <B>'. project_get_survey_count($group_id) .'</B> surveys )';
315 // ######################### CVS
317 if ($project->usesCVS()) {
318 print '<HR SIZE="1" NoShade><A href="/cvs/?group_id='.$group_id.'">';
319 print html_image("images/ic/cvs16b.png",'20','20',array('alt'=>$Language->getText('group','short_cvs')));
320 print " ".$Language->getText('group','long_cvs')."</A>";
323 SELECT cvs_commits AS commits,cvs_adds AS adds
324 FROM stats_project_all
325 WHERE group_id='$group_id'
326 ", -1, 0, SYS_DB_STATS);
327 $cvs_commit_num = db_result($result,0,0);
328 $cvs_add_num = db_result($result,0,1);
329 if (!$cvs_commit_num) {
335 echo ' ( <B>' . number_format($cvs_commit_num, 0) . '</B> commits, <B>' . number_format($cvs_add_num, 0) . '</B> adds )';
336 if ($cvs_commit_num || $cvs_add_num) {
338 <a href="'.account_group_cvsweb_url($project->getUnixName()).'">
344 // ######################## AnonFTP
346 if ($project->isActive()) {
347 print '<HR SIZE="1" NoShade>';
348 print "<A href=\"ftp://" . $project->getUnixName() . "." . $GLOBALS['sys_default_domain'] . "/pub/". $project->getUnixName() ."/\">";
349 print html_image("images/ic/ftp16b.png",'20','20',array('alt'=>$Language->getText('group','long_ftp')));
350 print $Language->getText('group','long_ftp')."</A>";
353 $HTML->box1_bottom();
355 if ($project->usesNews()) {
360 <TD WIDTH="15"> </TD>
364 // ############################# Latest News
366 echo $HTML->box1_top($Language->getText('group','long_news'));
368 echo news_show_latest($group_id,10,false);
370 echo $HTML->box1_bottom();
380 site_project_footer(array());