45 $xoTheme->addStylesheet( XOOPS_URL .
'/modules/system/css/admin.css');
48 $xoTheme->addScript(
'browse.php?Frameworks/jquery/jquery.js');
49 $xoTheme->addScript(
'browse.php?Frameworks/jquery/plugins/jquery.ui.js');
51 $xoTheme->addScript(
'modules/system/js/admin.js');
55 include_once
$GLOBALS[
'xoops']->path(
'/include/comment_constants.php');
91 case 'comments_form_purge':
109 $groupe_select->setExtra(
"style=\"width:170px;\" ");
110 $form_purge->addElement($groupe_select);
116 $form_purge->addElement(
$status,
true);
122 $form_purge->addElement($modules,
true);
125 $xoopsTpl->assign(
'form', $form_purge->render());
128 case 'comments_purge':
131 if (isset(
$_POST[
'comments_after']) && isset(
$_POST[
'comments_before'])) {
132 if (
$_POST[
'comments_after'] !=
$_POST[
'comments_before']) {
150 if ( $comments_status > 0 ) {
155 if ( $comments_userid !=
'' ) {
156 foreach (
$_REQUEST[
'comments_userid'] as $del)
163 if ( $comments_groupe !=
'' ) {
164 foreach (
$_POST[
'comments_groupe'] as $del => $u_name)
168 $mcount = count($members);
169 if ($mcount > 4000) {
172 for (
$i = 0;
$i < $mcount;
$i++)
179 if(isset(
$_POST[
'commentslist_id'])) {
180 $commentslist_count = (!empty(
$_POST[
'commentslist_id']) && is_array(
$_POST[
'commentslist_id'])) ? count(
$_POST[
'commentslist_id']) : 0;
181 if ($commentslist_count > 0) {
182 for (
$i=0;
$i < $commentslist_count;
$i++ )
189 if ( $verif ==
true ){
208 $comments_module =
'';
209 $comments_status =
'';
213 if ( $comments_module > 0 ) {
215 $comments_module =
$_REQUEST[
'comments_module'];
218 if ( $comments_status > 0 ) {
220 $comments_status =
$_REQUEST[
'comments_status'];
226 $comments_count = $comments_Handler->getCount(
$criteria);
228 $xoopsTpl->assign(
'comments_count', $comments_count );
230 if ($comments_count > 0) {
239 $comments_arr = $comments_Handler->getObjects(
$criteria,
true);
242 $form =
'<form action="admin.php?fct=comments" method="post">
243 <select name="comments_module">';
250 $sel =
' selected="selected"';
252 $form .=
'<option value="'.$k.
'"'.
$sel.
'>'.$v.
'</option>';
254 $form .=
'</select> <select name="comments_status">';
259 $sel =
' selected="selected"';
261 $form .=
'<option value="'.$k.
'"'.
$sel.
'>'.$v.
'</option>';
265 $form .=
'</select> <select name="comments_limit">';
269 $sel =
' selected="selected"';
271 $form .=
'<option value="'.$k.
'"'.
$sel.
'>'.$k.
'</option>';
273 $form .=
'</select> <input type="hidden" name="fct" value="comments" /><input type="submit" value="'._GO.
'" name="selsubmit" /></form>';
276 $xoopsTpl->assign(
'php_selft',
$_SERVER[
'PHP_SELF'].
'?fct=comments&op=comments_purge');
278 if ($comments_count > 0) {
279 foreach (array_keys($comments_arr) as
$i)
281 $com_id = $comments_arr[
$i]->getVar(
'com_id');
284 if ($comments_arr[$i]->getVar(
'com_uid') > 0) {
287 $comments_poster_uname =
'<a href="'.XOOPS_URL.
'/userinfo.php?uid='.$comments_arr[
$i]->getVar(
'com_uid').
'">'.
$poster->getVar(
'uname').
'</a>';
289 } elseif($comments_arr[$i]->getVar(
'com_uid') == 0 && $comments_arr[$i]->getVar(
'com_user') !=
'') {
290 if($comments_arr[$i]->getVar(
'com_url') !=
'') {
291 $comments_poster_uname =
'<div class="pad2 marg2"><a href="' . $comments_arr[
$i]->getVar(
'com_url') .
'">' . $comments_arr[
$i]->getVar(
'com_user') .
'</a> ( <a href="mailto:' . $comments_arr[
$i]->getVar(
'com_email') .
'">' . $comments_arr[
$i]->getVar(
'com_email') .
'</a> ) ' .
'</div>';
293 $comments_poster_uname =
'<div class="pad2 marg2">' . $comments_arr[
$i]->getVar(
'com_user') .
' ( <a href="mailto:' . $comments_arr[
$i]->getVar(
'com_email') .
'">' . $comments_arr[
$i]->getVar(
'com_email') .
'</a> ) ' .
'</div>';
297 $comments_icon = ($comments_arr[
$i]->getVar(
'com_icon') ==
'') ?
'/images/icons/no_posticon.gif' :
'/images/subject/' . htmlspecialchars( $comments_arr[$i]->getVar(
'com_icon'), ENT_QUOTES );
298 $comments_icon =
'<img src="' . XOOPS_URL . $comments_icon .
'" alt="" />';
301 $comments[
'comments_poster'] = $comments_poster_uname;
302 $comments[
'comments_icon'] = $comments_icon;
303 $comments[
'comments_title'] =
'<a href="admin.php?fct=comments&op=comments_jump&com_id='.$comments_arr[
$i]->getVar(
"com_id").
'">'.$comments_arr[
$i]->getVar(
"com_title");
304 $comments[
'comments_ip'] = $comments_arr[
$i]->getVar(
'com_ip');
305 $comments[
'comments_date'] = formatTimeStamp($comments_arr[$i]->getVar(
'com_created'));
306 $comments[
'comments_text'] =
$myts->undoHtmlSpecialChars($comments_arr[$i]->getVar(
'com_text'));
317 if ( $comments_count > $comments_limit ) {
318 include_once XOOPS_ROOT_PATH.
'/class/pagenav.php';
319 $nav =
new XoopsPageNav($comments_count, $comments_limit, $comments_start,
'comments_start',
'fct=comments&comments_module='.$comments_module.
'&comments_status='.$comments_status);