mirror of
https://github.com/e107inc/e107.git
synced 2025-08-11 17:14:42 +02:00
comments manager link added - work in progress.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| <20>Steve Dunstan 2001-2002
|
||||
| <20>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 "<script type='text/javascript'>window.history.go(-1);</script>\n";
|
||||
else
|
||||
{
|
||||
$cm= new comment_manager;
|
||||
$cm->commentList();
|
||||
}
|
||||
// echo "<script type='text/javascript'>window.history.go(-1);</script>\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 = "<form method='post' action='".e_SELF."?".e_QUERY."'>
|
||||
<fieldset id='core-comment-list'>
|
||||
<legend class='e-hideme'>".CUSLAN_5."</legend>
|
||||
<table cellpadding='0' cellspacing='0' class='adminlist'>".
|
||||
$frm->colGroup($this->fields,$this->fieldpref).
|
||||
$frm->thead($this->fields,$this->fieldpref).
|
||||
|
||||
"<tbody>";
|
||||
|
||||
while($row = $sql-> db_Fetch())
|
||||
{
|
||||
$text .= "<tr>
|
||||
<td>{$row['comment_id']}</td>";
|
||||
|
||||
$text .= (in_array("comment_item_id",$this->fieldpref)) ? "<td>".($row['comment_item_id'])."</td>" : "";
|
||||
$text .= (in_array("comment_subject",$this->fieldpref)) ? "<td>".($row['comment_subject'])."</td>" : "";
|
||||
$text .= (in_array("comment_author",$this->fieldpref)) ? "<td>".($row['comment_author_name'])."</td>" : "";
|
||||
$text .= (in_array("comment_comment",$this->fieldpref)) ? "<td>".($row['comment_comment'])."</td>" : "";
|
||||
$text .= (in_array("comment_datestamp",$this->fieldpref)) ? "<td>".strftime($pref['shortdate'],$row['comment_datestamp'])."</td>" : "";
|
||||
$text .= (in_array("comment_ip",$this->fieldpref)) ? "<td>".($row['comment_ip'])."</td>" : "";
|
||||
$text .= (in_array("comment_type",$this->fieldpref)) ? "<td class='center'>".($row['comment_type'])."</td>" : "";
|
||||
$text .= (in_array("comment_lock",$this->fieldpref)) ? "<td class='center'>".($row['comment_lock'] ? ADMIN_TRUE_ICON : " ")."</td>" : "";
|
||||
|
||||
}
|
||||
|
||||
|
||||
$text .= "
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
</form>
|
||||
";
|
||||
|
||||
|
||||
e107::getRender()->tablerender($caption,$text);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user