diff --git a/e107_admin/ad_links.php b/e107_admin/ad_links.php index 673b94607..eb88e59c8 100644 --- a/e107_admin/ad_links.php +++ b/e107_admin/ad_links.php @@ -9,9 +9,9 @@ * Admin Navigation * * $Source: /cvs_backup/e107_0.8/e107_admin/ad_links.php,v $ - * $Revision: 1.16 $ - * $Date: 2009-08-15 01:00:38 $ - * $Author: bugrain $ + * $Revision: 1.17 $ + * $Date: 2009-08-30 08:23:47 $ + * $Author: e107coders $ */ if (!defined('e107_INIT')) { exit; } @@ -136,6 +136,9 @@ if (!defined('E_16_BANNER')) { if (!defined('E_16_CACHE')) { define('E_16_CACHE', ""); } +if (!defined('E_16_COMMENT')) { + define('E_16_COMMENT', ""); +} if (!defined('E_16_CREDITS')) { define('E_16_CREDITS', ""); } @@ -433,6 +436,7 @@ $e_icon_array = array( 'banlist' => E_32_BANLIST, 'banner' => E_32_BANNER, 'cache' => E_32_CACHE, + 'comment' => E_32_COMMENT, 'credits' => E_32_CREDITS, 'cron' => E_32_CRON, 'custom' => E_32_CUST, @@ -590,7 +594,8 @@ $array_functions = array( 34 => array(e_ADMIN.'docs.php', ADLAN_12, ADLAN_13, '', 20, E_16_DOCS, E_32_DOCS), 35 => array('#TODO', 'System Info', 'System Information', '', 20, '', ''), 36 => array(e_ADMIN.'credits.php', LAN_CREDITS, LAN_CREDITS, '', 20, '', ''), - 37 => array(e_ADMIN.'custom_field.php', ADLAN_161, ADLAN_162, 'U', 4, E_16_CUSTOMFIELD, E_32_CUSTOMFIELD) + 37 => array(e_ADMIN.'custom_field.php', ADLAN_161, ADLAN_162, 'U', 4, E_16_CUSTOMFIELD, E_32_CUSTOMFIELD), + 38 => array(e_ADMIN.'comment.php', LAN_COMMENTMAN, LAN_COMMENTMAN, 'B', 5, E_16_COMMENT, E_32_COMMENT) ); //FIXME array structure suitable for e_admin_menu - see shortcodes/admin_navigation.php diff --git a/e107_admin/comment.php b/e107_admin/comment.php index ddf11ec21..b986a7827 100644 --- a/e107_admin/comment.php +++ b/e107_admin/comment.php @@ -3,7 +3,7 @@ + ----------------------------------------------------------------------------+ | e107 website system | -| ©Steve Dunstan 2001-2002 +| �Steve Dunstan 2001-2002 | http://e107.org | jalist@e107.org | @@ -11,9 +11,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/comment.php,v $ -| $Revision: 1.2 $ -| $Date: 2009-05-08 21:50:19 $ -| $Author: e107steved $ +| $Revision: 1.3 $ +| $Date: 2009-08-30 08:23:49 $ +| $Author: e107coders $ +----------------------------------------------------------------------------+ */ require_once("../class2.php"); @@ -22,7 +22,11 @@ if (!getperms("B")) header("location:".e_BASE."index.php"); exit; } - +require_once(e_ADMIN."auth.php"); + + + + if (e_QUERY) { $temp = explode("-", e_QUERY); @@ -60,5 +64,107 @@ if (e_QUERY) } } } -echo "\n"; +else +{ + $cm= new comment_manager; + $cm->commentList(); +} +// echo "\n"; + +require_once(e_ADMIN."footer.php"); + + +class comment_manager +{ + + var $fields; + var $fieldpref; + + + function comment_manager() + { + $this->fieldpref = (varset($user_pref['admin_cpage_columns'])) ? $user_pref['admin_cpage_columns'] : array("comment_id","comment_pid","comment_item_id","comment_subject","comment_comment","comment_author","comment_datestamp"); + + $this->fields = array( + 'comment_id' => array('title'=> ID, 'width'=>'5%', 'forced'=> TRUE), + 'comment_item_id' => array('title'=> "item id", 'type' => 'text', 'width' => 'auto'), + 'comment_subject' => array('title'=> "subject", 'type' => 'text', 'width' => 'auto', 'thclass' => 'left first'), // Display name + 'comment_author' => array('title'=> "author", 'type' => 'text', 'width' => 'auto'), // User name + 'comment_comment' => array('title'=> "comment", 'type' => 'text', 'width' => 'auto'), // Display name + 'comment_datestamp' => array('title'=> "date", 'type' => 'text', 'width' => 'auto'), // User name + 'comment_blocked' => array('title'=> "blocked", 'type' => 'text', 'width' => 'auto'), // Photo + 'comment_ip' => array('title'=> "IP", 'type' => 'text', 'width' => '10%', 'thclass' => 'center' ), // Real name (no real vetting) + 'comment_type' => array('title'=> "Type", 'type' => 'text', 'width' => '10%', 'thclass' => 'center' ), // No real vetting + 'comment_lock' => array('title'=> "Lock", 'type' => 'text', 'width' => 'auto'), + + // 'page_ip_restrict' => array('title'=> LAN_USER_07, 'type' => 'text', 'width' => 'auto'), // Avatar + + 'options' => array('title'=> LAN_OPTIONS, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last') + ); + + + + } + + + + function commentList() + { + global $pref; + $sql = e107::getDb(); + require_once(e_HANDLER."form_handler.php"); + $frm = new e_form(true); + + $sql -> db_Select("comments", "*"); + + $text = "
+
+ ".CUSLAN_5." + ". + $frm->colGroup($this->fields,$this->fieldpref). + $frm->thead($this->fields,$this->fieldpref). + + ""; + + while($row = $sql-> db_Fetch()) + { + $text .= " + "; + + $text .= (in_array("comment_item_id",$this->fieldpref)) ? "" : ""; + $text .= (in_array("comment_subject",$this->fieldpref)) ? "" : ""; + $text .= (in_array("comment_author",$this->fieldpref)) ? "" : ""; + $text .= (in_array("comment_comment",$this->fieldpref)) ? "" : ""; + $text .= (in_array("comment_datestamp",$this->fieldpref)) ? "" : ""; + $text .= (in_array("comment_ip",$this->fieldpref)) ? "" : ""; + $text .= (in_array("comment_type",$this->fieldpref)) ? "" : ""; + $text .= (in_array("comment_lock",$this->fieldpref)) ? "" : ""; + + } + + + $text .= " + +
{$row['comment_id']}".($row['comment_item_id'])."".($row['comment_subject'])."".($row['comment_author_name'])."".($row['comment_comment'])."".strftime($pref['shortdate'],$row['comment_datestamp'])."".($row['comment_ip'])."".($row['comment_type'])."".($row['comment_lock'] ? ADMIN_TRUE_ICON : " ")."
+
+
+ "; + + + e107::getRender()->tablerender($caption,$text); + } + + + + + + + + + + + + + +} ?> \ No newline at end of file diff --git a/e107_images/admin_images/comments_16.png b/e107_images/admin_images/comments_16.png index c1f396596..c310fe2a9 100644 Binary files a/e107_images/admin_images/comments_16.png and b/e107_images/admin_images/comments_16.png differ diff --git a/e107_images/admin_images/comments_32.png b/e107_images/admin_images/comments_32.png index 89ef01bad..49fbaf32a 100644 Binary files a/e107_images/admin_images/comments_32.png and b/e107_images/admin_images/comments_32.png differ diff --git a/e107_languages/English/admin/lan_admin.php b/e107_languages/English/admin/lan_admin.php index 9c2f2260e..b49b89d5b 100644 --- a/e107_languages/English/admin/lan_admin.php +++ b/e107_languages/English/admin/lan_admin.php @@ -1,7 +1,7 @@