![]() |
|---|
| [ Index ] |
Source Code Reference for V1.00 |
[Summary view] [Print] [Text view]
1 <?php /* $Id: vw_forums.php 40 2008-02-11 12:11:44Z pedroix $ $URL: https://web2project.svn.sourceforge.net/svnroot/web2project/trunk/modules/projects/vw_forums.php $ */ 2 if (!defined('W2P_BASE_DIR')) { 3 die('You should not access this file directly.'); 4 } 5 6 global $AppUI, $project_id; 7 // Forums mini-table in project view action 8 $q = new DBQuery; 9 $q->addTable('forums'); 10 $q->addQuery('forum_id, forum_project, forum_description, forum_owner, forum_name, forum_message_count, 11 DATE_FORMAT(forum_last_date, "%d-%b-%Y %H:%i" ) forum_last_date, 12 project_name, project_color_identifier, project_id'); 13 $q->addJoin('projects', 'p', 'project_id = forum_project', 'inner'); 14 $q->addWhere('forum_project = ' . (int)$project_id); 15 $q->addOrder('forum_project, forum_name'); 16 $rc = $q->exec(ADODB_FETCH_ASSOC); 17 ?> 18 19 <table width="100%" border="0" cellpadding="2" cellspacing="1" class="tbl"> 20 <tr> 21 <th nowrap="nowrap"> </th> 22 <th nowrap="nowrap" width="100%"><?php echo $AppUI->_('Forum Name'); ?></th> 23 <th nowrap="nowrap"><?php echo $AppUI->_('Messages'); ?></th> 24 <th nowrap="nowrap"><?php echo $AppUI->_('Last Post'); ?></th> 25 </tr> 26 <?php 27 while ($row = $q->fetchRow()) { ?> 28 <tr> 29 <td nowrap="nowrap" align="center"> 30 <?php 31 if ($row["forum_owner"] == $AppUI->user_id) { ?> 32 <a href="./index.php?m=forums&a=addedit&forum_id=<?php echo $row['forum_id']; ?>"><img src="<?php echo w2PfindImage('icons/pencil.gif'); ?>" alt="expand forum" border="0" width=12 height=12></a> 33 <?php } ?> 34 </td> 35 <td nowrap="nowrap"><a href="./index.php?m=forums&a=viewer&forum_id=<?php echo $row["forum_id"]; ?>"><?php echo $row['forum_name']; ?></a></td> 36 <td nowrap="nowrap"><?php echo $row['forum_message_count']; ?></td> 37 <td nowrap="nowrap"> 38 <?php echo (intval($row['forum_last_date']) > 0) ? $row['forum_last_date'] : 'n/a'; ?> 39 </td> 40 </tr> 41 <tr> 42 <td></td> 43 <td colspan="3"><?php echo $row['forum_description']; ?></td> 44 </tr> 45 <?php } 46 $q->clear(); 47 ?> 48 </table>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Fri Jan 9 03:00:02 2009 | Cross-referenced by PHPXref 0.7 |