6 * SourceForge: Breaking Down the Barriers to Open Source Development
7 * Copyright 1999-2001 (c) VA Linux Systems
8 * http://sourceforge.net
13 require_once('www/news/news_utils.php');
14 require_once('www/include/trove.php');
15 require_once('www/include/project_summary.php');
17 $title = _('Project Info');
19 site_project_header(array('title'=>$title,'group'=>$group_id,'toptab'=>'home'));
22 // ########################################### end top area
27 <table width="100%" border="0">
29 <td width="80%" valign="top">
32 // ########################################## top area, not in box
34 $res_admin = db_query("SELECT users.user_id,users.user_name,users.realname,user_group.admin_flags
36 WHERE user_group.user_id=users.user_id
37 AND user_group.group_id='$group_id'
39 ORDER BY admin_flags DESC,realname");
41 if ($project->getStatus() == 'H') {
42 print "<p>".sprintf(_('NOTE: This project entry is maintained by the %1$s staff. We are not the official site for this product. Additional copyright information may be found on this project\'s homepage.'), $GLOBALS['sys_name'])."</p>\n";
45 $hook_params = array () ;
46 $hook_params['group_id'] = $group_id ;
47 plugin_hook ("project_before_description",$hook_params) ;
49 if ($project->getDescription()) {
50 print "<p>" . nl2br($project->getDescription()) . '</p>';
52 print "<p>" . _('This project has not yet submitted a description.') . '</p>';
55 if($GLOBALS['sys_use_trove']) {
57 print stripslashes(trove_getcatlisting($group_id,0,1));
61 print(_('Registered: ') . date(_('Y-m-d H:i'), $project->getStartDate()));
63 // Get the activity percentile
64 // CB hide stats if desired
65 if ($project->usesStats()) {
66 $actv = db_query("SELECT percentile FROM project_weekly_metric WHERE group_id='$group_id'");
67 $actv_res = db_result($actv,0,"percentile");
71 print '<br />'._('Activity Percentile: '). substr($actv_res, 0, 5). '%';
72 print '<br />'.sprintf(_('View project <a href="%1$s" >Statistics</a> or <a href="%2$s">Activity</a>'), util_make_url ('/project/stats/?group_id='.$group_id),util_make_url ('/project/report/?group_id='.$group_id));
73 print '<br />'.sprintf(_('View list of <a href="%1$s">RSS feeds</a> available for this project.</a>'), util_make_url ('/export/rss_project.php?group_id='.$group_id)). ' ' . html_image('ic/rss.png',16,16,array('border'=>'0'));
76 if($GLOBALS['sys_use_people']) {
77 $jobs_res = db_query("SELECT name
78 FROM people_job,people_job_category
79 WHERE people_job.category_id=people_job_category.category_id
80 AND people_job.status_id=1
81 AND group_id='$group_id'
84 $num=db_numrows($jobs_res);
88 ngettext('HELP WANTED: This project is looking for a <a href="%1$s">"%2$s"</a>.',
89 'HELP WANTED: This project is looking for people to fill <a href="%1$s">several different positions</a>.',
91 util_make_url ('/people/?group_id='.$group_id),
92 db_result($jobs_res,0,"name"));
96 $hook_params = array () ;
97 $hook_params['group_id'] = $group_id ;
98 plugin_hook ("project_after_description",$hook_params) ;
102 <td nowrap="nowrap" valign="top" width="20%">
106 // ########################### Developers on this project
108 echo $HTML->boxTop(_('Developer Info'));
110 if (db_numrows($res_admin) > 0) {
113 <span class="develtitle"><?php echo _('Project Admins'); ?>:</span><br />
115 $started_developers = false;
116 while ($row_admin = db_fetch_array($res_admin)) {
117 if (trim($row_admin['admin_flags']) != 'A' && !$started_developers) {
118 $started_developers=true;
119 echo '<span class="develtitle">'. _('Developers').':</span><br />';
121 echo util_make_link ('/users/'.$row_admin['user_name'].'/',$row_admin['realname']).'<br />';
124 <hr width="100%" size="1" />
131 <p><?php echo util_make_link ('/project/memberlist.php?group_id='.$group_id,'['._('View Members').']'); ?></p>
132 <p><?php echo util_make_link ('/project/request.php?group_id='.$group_id,'['._('Request to join').']'); ?></p>
135 echo $HTML->boxBottom();
146 // ############################# File Releases
148 // CB hide FRS if desired
149 if ($project->usesFRS()) {
150 echo $HTML->boxTop(_('Latest File Releases'));
151 $unix_group_name = $project->getUnixName();
154 <table cellspacing="1" cellpadding="5" width="100%" border="0">
156 <td style="text-align:left">
159 <td style="text-align:center">
162 <td style="text-align:center">
165 <td style="text-align:center">
166 '._('Notes').' / '._('Monitor').'
168 <td style="text-align:center">
174 // Members of projects can see all packages
175 // Non-members can only see public packages
177 if (session_loggedin()) {
178 if (user_ismember($group_id) || user_ismember(1,'A')) {
181 $pub_sql=' AND frs_package.is_public=1 ';
184 $pub_sql=' AND frs_package.is_public=1 ';
187 $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
188 FROM frs_package,frs_release
189 WHERE frs_package.package_id=frs_release.package_id
190 AND frs_package.group_id='$group_id'
191 AND frs_release.status_id=1
193 ORDER BY frs_package.package_id,frs_release.release_date DESC";
195 $res_files = db_query($sql);
196 $rows_files=db_numrows($res_files);
197 if (!$res_files || $rows_files < 1) {
200 echo '<tr><td colspan="5"><strong>'._('This Project Has Not Released Any Files').'</strong></td></tr>';
204 This query actually contains ALL releases of all packages
205 We will test each row and make sure the package has changed before printing the row
207 for ($f=0; $f<$rows_files; $f++) {
208 if (db_result($res_files,$f,'package_id')==db_result($res_files,($f-1),'package_id')) {
209 //same package as last iteration - don't show this release
211 $rel_date = getdate(db_result($res_files,$f,'release_date'));
213 <tr style="text-align:center">
214 <td style="text-align:left">
215 <strong>' . db_result($res_files,$f,'package_name'). '</strong></td>';
216 // Releases to display
217 print '<td>'.db_result($res_files,$f,'release_name') .'
219 <td>' . $rel_date["month"] . ' ' . $rel_date["mday"] . ', ' . $rel_date["year"] . '</td>
220 <td><a href="'.util_make_url ('/frs/shownotes.php?group_id=' . $group_id . '&release_id=' . db_result($res_files,$f,'release_id')) . '">';
221 echo html_image('ic/manual16c.png','15','15',array('alt'=>_('Release Notes')));
222 echo '</a> - <a href="'.util_make_url ('/frs/monitor.php?filemodule_id=' . db_result($res_files,$f,'package_id') . '&group_id='.$group_id.'&start=1').'">';
223 echo html_image('ic/mail16d.png','15','15',array('alt'=>_('Monitor this package')));
226 <td>'.util_make_link ('/frs/?group_id=' . $group_id . '&release_id=' . db_result($res_files,$f,'release_id'),_('Download')).'</td></tr>';
232 <div style="text-align:center">
233 <?php echo util_make_link ('/frs/?group_id='.$group_id,'['._('View All Project Files').']'); ?>
236 echo $HTML->boxBottom();
241 <table width="100%" border="0" cellpadding="0" cellspacing="0">
243 <td valign="top" width="50%">
247 // ############################## PUBLIC AREAS
248 echo $HTML->boxTop(_('Public Areas'));
250 // ################# Homepage Link
252 print '<a href="http://' . $project->getHomePage() . '">';
253 print html_image('ic/home16b.png','20','20',array('alt'=>_('Home Page')));
254 print ' '._('Project Home Page').'</a>';
256 // ################## ArtifactTypes
258 // CB hide tracker if desired
259 if ($project->usesTracker()) {
260 print '<hr size="1" /><a href="'.util_make_url ('/tracker/?group_id='.$group_id).'">';
261 print html_image('ic/tracker20g.png','20','20',array('alt'=>_('Tracker')));
262 print _('Tracker').'</a>';
264 $result=db_query("SELECT agl.*,aca.count,aca.open_count
265 FROM artifact_group_list agl
266 LEFT JOIN artifact_counts_agg aca USING (group_artifact_id)
267 WHERE agl.group_id='$group_id'
269 ORDER BY group_artifact_id ASC");
271 $rows = db_numrows($result);
273 if (!$result || $rows < 1) {
274 echo '<br /><em>'._('There are no public trackers available').'</em>';
276 for ($j = 0; $j < $rows; $j++) {
278 - '.util_make_link ('/tracker/?atid='. db_result($result, $j, 'group_artifact_id') . '&group_id='.$group_id.'&func=browse',db_result($result, $j, 'name'))
279 .sprintf(ngettext(' (<strong>%1$s</strong> open / <strong>%2$s</strong> total)', ' (<strong>%1$s</strong> open / <strong>%2$s</strong> total)', (int) db_result($result, $j, 'open_count')), (int) db_result($result, $j, 'open_count'), (int) db_result($result, $j, 'count')) .'<br />'.
280 db_result($result, $j, 'description');
285 // ################## forums
287 if ($project->usesForum()) {
288 print '<hr size="1" /><a href="'.util_make_url ('/forum/?group_id='.$group_id).'">';
289 print html_image('ic/forum20g.png','20','20',array('alt'=>_('Forums')));
290 print ' '._('Public Forums').'</a> ( ';
291 $messages_count = project_get_public_forum_message_count($group_id);
292 $forums_count = project_get_public_forum_count($group_id);
293 printf(ngettext("<strong>%d</strong> message","<strong>%d</strong> messages",$messages_count),$messages_count);
295 printf(ngettext("<strong>%d</strong> forum","<strong>%d</strong> forums",$forums_count),$forums_count);
299 // ##################### Doc Manager
301 if ($project->usesDocman()) {
304 <a href="'.util_make_url ('/docman/?group_id='.$group_id).'">';
305 print html_image('ic/docman16b.png','20','20',array('alt'=>_('Docs')));
306 print ' '._('DocManager: Project Documentation').'</a>';
309 // ##################### Mailing lists
311 if ($project->usesMail()) {
312 print '<hr size="1" /><a href="'.util_make_url ('/mail/?group_id='.$group_id).'">';
313 print html_image('ic/mail16b.png','20','20',array('alt'=>_('Lists')));
314 print ' '._('Mailing Lists').'</a>';
315 $n = project_get_mail_list_count($group_id);
316 printf(ngettext('(<strong>%1$s</strong> public mailing list)', '(<strong>%1$s</strong> public mailing lists)', $n), $n);
319 // ##################### Task Manager
321 if ($project->usesPm()) {
322 print '<hr size="1" /><a href="'.util_make_url ('/pm/?group_id='.$group_id).'">';
323 print html_image('ic/taskman20g.png','20','20',array('alt'=>_('Tasks')));
324 print ' '._('Task Manager').'</a>';
325 $sql="SELECT * FROM project_group_list WHERE group_id='$group_id' AND is_public=1";
326 $result = db_query ($sql);
327 $rows = db_numrows($result);
328 if (!$result || $rows < 1) {
329 echo '<br /><em>'._('There are no public subprojects available').'</em>';
331 for ($j = 0; $j < $rows; $j++) {
333 <br /> - '.util_make_link ('/pm/task.php?group_project_id='.db_result($result, $j, 'group_project_id').'&group_id='.$group_id.'&func=browse',db_result($result, $j, 'project_name'));
339 // ######################### Surveys
341 if ($project->usesSurvey()) {
342 print '<hr size="1" /><a href="'.util_make_url ('/survey/?group_id='.$group_id).'">';
343 print html_image('ic/survey16b.png','20','20',array('alt'=>_('Surveys')));
344 print " "._('Surveys')."</a>";
345 echo ' ( <strong>'. project_get_survey_count($group_id) .'</strong> '._('surveys').' )';
348 // ######################### SCM
350 if ($project->usesSCM()) {
351 print '<hr size="1" /><a href="'.util_make_url ('/scm/?group_id='.$group_id).'">';
352 print html_image('ic/cvs16b.png','20','20',array('alt'=>_('SCM')));
353 print " "._('SCM Repository')."</a>";
357 SELECT sum(commits) AS commits,sum(adds) AS adds
359 WHERE group_id='$group_id'
360 ", -1, 0, SYS_DB_STATS);
361 $cvs_commit_num = db_result($result,0,0);
362 $cvs_add_num = db_result($result,0,1);
363 if (!$cvs_commit_num) {
370 $hook_params = array () ;
371 $hook_params['group_id'] = $group_id ;
372 plugin_hook ("scm_stats", $hook_params) ;
375 // ######################### Plugins
377 $hook_params = array ();
378 $hook_params['group_id'] = $group_id;
379 plugin_hook ("project_public_area", $hook_params);
381 // ######################## AnonFTP
383 // CB hide FTP if desired
384 if ($project->usesFTP()) {
385 if ($project->isActive()) {
386 print '<hr size="1" />';
387 print '<a href="ftp://' . $project->getUnixName() . '.' . $GLOBALS['sys_default_domain'] . '/pub/'. $project->getUnixName() .'/">';
388 print html_image('ic/ftp16b.png','20','20',array('alt'=>_('Anonymous FTP Space')));
389 print _('Anonymous FTP Space')."</a>";
394 plugin_hook("cal_link_group",$group_id);
395 echo $HTML->boxBottom();
397 if ($project->usesNews()) {
402 <td width="15"> </td>
403 <td valign="top" width="50%">
406 // ############################# Latest News
408 echo $HTML->boxTop(_('Latest News'));
410 echo news_show_latest($group_id,10,false);
412 echo $HTML->boxBottom();
416 // Linked projects (hierarchy)
419 plugin_hook('project_home_link',$group_id);
428 site_project_footer(array());
432 // c-file-style: "bsd"