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() ."/");
25 $imgproj=$HTML->imgproj;
27 $title = 'Project Info - '. $project->getPublicName();
29 site_project_header(array('title'=>$title,'group'=>$group_id,'toptab'=>'home','pagename'=>'projects','sectionvals'=>array(group_getname($group_id))));
32 // ########################################### end top area
37 <TABLE WIDTH="100%" BORDER="0">
38 <TR><TD WIDTH="99%" VALIGN="top">
41 // ########################################## top area, not in box
42 $res_admin = db_query("
43 SELECT users.user_id AS user_id,users.user_name AS user_name
45 WHERE user_group.user_id=users.user_id
46 AND user_group.group_id=$group_id
47 AND user_group.admin_flags = 'A'
51 if ($project->getStatus() == 'H') {
52 print "<P>NOTE: This project entry is maintained by the ".$GLOBALS['sys_name']." staff. We are not "
53 . "the official site "
54 . "for this product. Additional copyright information may be found on this project's homepage.\n";
57 if ($project->getDescription()) {
58 print "<P>" . $project->getDescription();
60 print "<P>" . $Language->getText('group', 'nodescription');
64 print '<BR> <BR>';
65 print trove_getcatlisting($group_id,0,1);
67 // Get the activity percentile
68 $actv = db_query("SELECT percentile FROM project_weekly_metric WHERE group_id='$group_id'");
69 $actv_res = db_result($actv,0,"percentile");
74 print($Language->getText('group', 'registered') . date($sys_datefmt, $project->getStartDate()));
75 print '<br>'.$Language->getText('group', 'activity'). $actv_res . '%';
76 print '<br>'.$Language->getText('group', 'activitystat', $group_id);
78 $jobs_res = db_query("SELECT name ".
79 "FROM people_job,people_job_category ".
80 "WHERE people_job.category_id=people_job_category.category_id ".
81 "AND people_job.status_id=1 ".
82 "AND group_id='$group_id' ".
85 $num=db_numrows($jobs_res);
87 print '<br><br>HELP WANTED: This project is looking for ';
89 print '<a href="/people/?group_id='.$group_id.'">'.
90 db_result($jobs_res,0,"name").'(s)</a>';
92 print 'People to fill '.
93 '<a href="/people/?group_id='.$group_id.'">several '.
94 'different positions</a>';
100 print '</TD><TD NoWrap VALIGN="top">';
102 // ########################### Developers on this project
104 echo $HTML->box1_top($Language->getText('group','developer_info'));
106 if (db_numrows($res_admin) > 0) {
109 <SPAN CLASS="develtitle"><?php echo $Language->getText('group','project_admins'); ?>:</SPAN><BR>
111 while ($row_admin = db_fetch_array($res_admin)) {
112 print "<A href=\"/users/$row_admin[user_name]/\">$row_admin[user_name]</A><BR>";
115 <HR WIDTH="100%" SIZE="1" NoShade>
121 <SPAN CLASS="develtitle"><?php echo $Language->getText('group','developers'); ?>:</SPAN><BR>
123 //count of developers on this project
124 $res_count = db_query("SELECT user_id FROM user_group WHERE group_id=$group_id");
125 print db_numrows($res_count);
129 <A HREF="/project/memberlist.php?group_id=<?php print $group_id; ?>">[View Members]</A>
132 echo $HTML->box1_bottom();
140 // ############################# File Releases
142 echo $HTML->box1_top($Language->getText('frs','latest_file_releases'));
143 $unix_group_name = $project->getUnixName();
146 <TABLE cellspacing="1" cellpadding="5" width="100%" border="0">
147 <TR bgcolor="'.$HTML->COLOR_LTBACK1.'">
149 '.$Language->getText('frs','file_package').'
152 '.$Language->getText('frs','file_version').'
155 '.$Language->getText('frs','file_rel_date').'
158 '.$Language->getText('frs','file_notes').' / '.$Language->getText('frs','file_monitor').'
161 '.$Language->getText('frs','file_download').'
165 $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 ".
166 "FROM frs_package,frs_release ".
167 "WHERE frs_package.package_id=frs_release.package_id ".
168 "AND frs_package.group_id='$group_id' ".
169 "AND frs_release.status_id=1 ".
170 "ORDER BY frs_package.package_id,frs_release.release_date DESC";
172 $res_files = db_query($sql);
173 $rows_files=db_numrows($res_files);
174 if (!$res_files || $rows_files < 1) {
177 echo '<TR BGCOLOR="'.$HTML->COLOR_LTBACK1.'"><TD COLSPAN="4"><B>'.$Language->getText('group', 'norelease').'</B></TD></TR>';
181 This query actually contains ALL releases of all packages
182 We will test each row and make sure the package has changed before printing the row
184 for ($f=0; $f<$rows_files; $f++) {
185 if (db_result($res_files,$f,'package_id')==db_result($res_files,($f-1),'package_id')) {
186 //same package as last iteration - don't show this release
188 $rel_date = getdate(db_result($res_files,$f,'release_date'));
190 <TR BGCOLOR="'.$HTML->COLOR_LTBACK1.'" ALIGN="center">
192 <B>' . db_result($res_files,$f,'package_name'). '</B></TD>';
193 // Releases to display
194 print '<TD>'.db_result($res_files,$f,'release_name') .'
196 <td>' . $rel_date["month"] . ' ' . $rel_date["mday"] . ', ' . $rel_date["year"] . '</td>
197 <TD><A href="/project/shownotes.php?group_id=' . $group_id . '&release_id=' . db_result($res_files,$f,'release_id') . '">';
198 echo html_image($imgproj . "manual16c.png",'15','15',array('alt'=>'Release Notes'));
199 echo '</A> - <A HREF="/project/filemodule_monitor.php?filemodule_id=' . db_result($res_files,$f,'package_id') . '">';
200 echo html_image($imgproj . "mail16d.png",'15','15',array('alt'=>'Monitor This Package'));
203 <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>';
210 <a href="/project/showfiles.php?group_id=<?php print $group_id; ?>">[View ALL Project Files]</A>
213 echo $HTML->box1_bottom();
217 <TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0">
218 <TR><TD VALIGN="top">
222 // ############################## PUBLIC AREAS
223 echo $HTML->box1_top($Language->getText('group','public_area'));
225 // ################# Homepage Link
227 print "<A href=\"http://" . $project->getHomePage() . "\">";
228 print html_image($imgproj . "home16b.png",'20','20',array('alt'=>$Language->getText('group','short_homepage')));
229 print ' '.$Language->getText('group','long_homepage').'</A>';
231 // ################## ArtifactTypes
233 print '<HR SIZE="1" NoShade><A href="/tracker/?group_id='.$group_id.'">';
234 print html_image($imgproj . "taskman16b.png",'20','20',array('alt'=>$Language->getText('group','short_tracker')));
235 print $Language->getText('group', 'short_tracker').'</A>';
237 $result=db_query("SELECT agl.*,aca.count,aca.open_count
238 FROM artifact_group_list agl
239 LEFT JOIN artifact_counts_agg aca USING (group_artifact_id)
240 WHERE agl.group_id='$group_id'
242 ORDER BY group_artifact_id ASC");
244 $rows = db_numrows($result);
246 if (!$result || $rows < 1) {
247 echo '<BR><I>There are no public trackers available</I>';
249 for ($j = 0; $j < $rows; $j++) {
251 - <A HREF="/tracker/?atid='. db_result($result, $j, 'group_artifact_id') .
252 '&group_id='.$group_id.'&func=browse">'. db_result($result, $j, 'name') .'</A>
253 ( <B>'. db_result($result, $j, 'open_count') .' open / '. db_result($result, $j, 'count') .' total</B> )<BR>'.
254 db_result($result, $j, 'description');
258 // ################## forums
260 if ($project->usesForum()) {
261 print '<HR SIZE="1" NoShade><A href="/forum/?group_id='.$group_id.'">';
262 print html_image($imgproj . "notes16.png",'20','20',array('alt'=>$Language->getText('group','short_forum')));
263 print ' '.$Language->getText('group','long_forum').'</A>';
264 print " ( <B>". project_get_public_forum_message_count($group_id) ."</B> messages in ";
266 print "<B>". project_get_public_forum_count($group_id) ."</B> forums )\n";
269 // ##################### Doc Manager
271 if ($project->usesDocman()) {
273 <HR SIZE="1" NoShade>
274 <A href="/docman/?group_id='.$group_id.'">';
275 print html_image($imgproj . "docman16b.png",'20','20',array('alt'=>$Language->getText('group','short_docman')));
276 print ' '.$Language->getText('group','long_docman').'</A>';
279 // ##################### Mailing lists
281 if ($project->usesMail()) {
282 print '<HR SIZE="1" NoShade><A href="/mail/?group_id='.$group_id.'">';
283 print html_image($imgproj . "mail16b.png",'20','20',array('alt'=>$Language->getText('group','short_mail')));
284 print ' '.$Language->getText('group','long_mail').'</A>';
285 print " ( <B>". project_get_mail_list_count($group_id) ."</B> public mailing lists )";
288 // ##################### Task Manager
290 if ($project->usesPm()) {
291 print '<HR SIZE="1" NoShade><A href="/pm/?group_id='.$group_id.'">';
292 print html_image($imgproj . "taskman16b.png",'20','20',array('alt'=>$Language->getText('group','short_pm')));
293 print ' '.$Language->getText('group','long_pm').'</A>';
294 $sql="SELECT * FROM project_group_list WHERE group_id='$group_id' AND is_public=1";
295 $result = db_query ($sql);
296 $rows = db_numrows($result);
297 if (!$result || $rows < 1) {
298 echo '<BR><I>There are no public subprojects available</I>';
300 for ($j = 0; $j < $rows; $j++) {
302 <BR> - <A HREF="/pm/task.php?group_project_id='.db_result($result, $j, 'group_project_id').
303 '&group_id='.$group_id.'&func=browse">'.db_result($result, $j, 'project_name').'</A>';
309 // ######################### Surveys
311 if ($project->usesSurvey()) {
312 print '<HR SIZE="1" NoShade><A href="/survey/?group_id='.$group_id.'">';
313 print html_image($imgproj . "survey16b.png",'20','20',array('alt'=>$Language->getText('group','short_survey')));
314 print " ".$Language->getText('group','long_survey')."</A>";
315 echo ' ( <B>'. project_get_survey_count($group_id) .'</B> surveys )';
318 // ######################### CVS
320 if ($project->usesCVS()) {
321 print '<HR SIZE="1" NoShade><A href="/cvs/?group_id='.$group_id.'">';
322 print html_image($imgproj . "cvs16b.png",'20','20',array('alt'=>$Language->getText('group','short_cvs')));
323 print " ".$Language->getText('group','long_cvs')."</A>";
326 SELECT cvs_commits AS commits,cvs_adds AS adds
327 FROM stats_project_all
328 WHERE group_id='$group_id'
329 ", -1, 0, SYS_DB_STATS);
330 $cvs_commit_num = db_result($result,0,0);
331 $cvs_add_num = db_result($result,0,1);
332 if (!$cvs_commit_num) {
338 echo ' ( <B>' . number_format($cvs_commit_num, 0) . '</B> commits, <B>' . number_format($cvs_add_num, 0) . '</B> adds )';
339 if ($cvs_commit_num || $cvs_add_num) {
341 <a href="'.account_group_cvsweb_url($project->getUnixName()).'">
347 // ######################## AnonFTP
349 if ($project->isActive()) {
350 print '<HR SIZE="1" NoShade>';
351 print "<A href=\"ftp://" . $project->getUnixName() . "." . $GLOBALS['sys_default_domain'] . "/pub/". $project->getUnixName() ."/\">";
352 print html_image($imgproj . "ftp16b.png",'20','20',array('alt'=>$Language->getText('group','long_ftp')));
353 print $Language->getText('group','long_ftp')."</A>";
356 $HTML->box1_bottom();
358 if ($project->usesNews()) {
363 <TD WIDTH="15"> </TD>
367 // ############################# Latest News
369 echo $HTML->box1_top($Language->getText('group','long_news'));
371 echo news_show_latest($group_id,10,false);
373 echo $HTML->box1_bottom();
383 site_project_footer(array());