Fork me on GitHub




(1) 2 »


Afficher tous les membres d'un groupe
Supporter Xoops
Inscrit: 16/02/2003 21:55
De Paris
Messages: 346
Salut à tous,
petite requête car je n'arrive pas à retrouver le topic qui traite de ceci:

j'aimerais perosnnaliser le formulaire de recherche xoops de l'admin pour afficher les users d'un groupe spécifique (donc surment finduser)

je suis tombé sur ça
mais les liens ne fonctionnent plus.

Quelqu'un sait il?

Posté le : 16/08/2007 19:12

Webmaster Forever sous Xoops
www.sciencespoaix.com ==> site étudiant de Sciences Po Aix
www.intellimique.com ==> Intelligence Economique, Veille, Sécurité
Partager Twitter Partagez cette article sur GG+
Re: Afficher tous les membres d'un groupe
Xoops accro
Inscrit: 04/02/2003 01:54
De Le Mans
Messages: 12273
Un peu de patience, nos amis allemands sont en train de mettre à jour leur site, la réouverture ne devrait pas tarder.

Posté le : 16/08/2007 19:47
Partager Twitter Partagez cette article sur GG+
Re: Afficher tous les membres d'un groupe
Supporter Xoops
Inscrit: 16/02/2003 21:55
De Paris
Messages: 346
peut etre mais je comprends rien à l'allemand moi...

Bon ça marche pas...

J'ai bien suivi ce qui est marqué sur le post mais quand je demande d'afficher un groupe, il n'y a rien dans la liste.

voilà le fichier:

<?php
// $Id: main.php 2 2005-11-02 18:23:29Z skalpa $
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                       <http://www.xoops.org/>   ... nbsp;   //
//  ------------------------------------------------------------------------ //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //
// Author: Kazumi Ono (AKA onokazu)                                          //
// URL: http://www.myweb.ne.jp/http://www.xoops.org/http://jp.xoops.org/ //
// Project: The XOOPS Project                                                //
// ------------------------------------------------------------------------- //

if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
    exit(
"Access Denied");
}
$op "form";

if ( isset(
$_POST['op']) && $_POST['op'] == "submit" ) {
    
$op "submit";
}

xoops_cp_header();
//OpenTable();

if ( $op == "form" ) {
    
$member_handler =& xoops_gethandler('member');
    
$acttotal $member_handler->getUserCount(new Criteria('level'0'>'));
    
$inacttotal $member_handler->getUserCount(new Criteria('level'0));
    include_once 
XOOPS_ROOT_PATH."/class/xoopsformloader.php";
    
$uname_text = new XoopsFormText("""user_uname"3060);
    
$uname_match = new XoopsFormSelectMatchOption("""user_uname_match");
    
$uname_tray = new XoopsFormElementTray(_AM_UNAME"&nbsp;");
    
$uname_tray->addElement($uname_match);
    
$uname_tray->addElement($uname_text);
    
$name_text = new XoopsFormText("""user_name"3060);
    
$name_match = new XoopsFormSelectMatchOption("""user_name_match");
    
$name_tray = new XoopsFormElementTray(_AM_REALNAME"&nbsp;");
    
$name_tray->addElement($name_match);
    
$name_tray->addElement($name_text);
    
$email_text = new XoopsFormText("""user_email"3060);
    
$email_match = new XoopsFormSelectMatchOption("""user_email_match");
    
$email_tray = new XoopsFormElementTray(_AM_EMAIL"&nbsp;");
    
$email_tray->addElement($email_match);
    
$email_tray->addElement($email_text);
    
$url_text = new XoopsFormText(_AM_URLC"user_url"30100);
    
//$theme_select = new XoopsFormSelectTheme(_AM_THEME, "user_theme");
    //$timezone_select = new XoopsFormSelectTimezone(_AM_TIMEZONE, "user_timezone_offset");
//modify begin dhcst
        
$group_text = new XoopsFormSelect("""user_group",0);
        
$member_handler =& xoops_gethandler('member');
    
$group =& $member_handler->getGroupList();
        
$group[0]=_ALL;
        
$group_text->addOptionArray($group);
        
$group_tray=new XoopsFormElementTray(_MD_AM_ADGS"&nbsp;");
        
$group_tray->addElement($group_text);
        
//modify end dhcst    
$icq_text = new XoopsFormText("""user_icq"30100);
    
$icq_match = new XoopsFormSelectMatchOption("""user_icq_match");
    
$icq_tray = new XoopsFormElementTray(_AM_ICQ"&nbsp;");
    
$icq_tray->addElement($icq_match);
    
$icq_tray->addElement($icq_text);
    
$aim_text = new XoopsFormText("""user_aim"30100);
    
$aim_match = new XoopsFormSelectMatchOption("""user_aim_match");
    
$aim_tray = new XoopsFormElementTray(_AM_AIM"&nbsp;");
    
$aim_tray->addElement($aim_match);
    
$aim_tray->addElement($aim_text);
    
$yim_text = new XoopsFormText("""user_yim"30100);
    
$yim_match = new XoopsFormSelectMatchOption("""user_yim_match");
    
$yim_tray = new XoopsFormElementTray(_AM_YIM"&nbsp;");
    
$yim_tray->addElement($yim_match);
    
$yim_tray->addElement($yim_text);
    
$msnm_text = new XoopsFormText("""user_msnm"30100);
    
$msnm_match = new XoopsFormSelectMatchOption("""user_msnm_match");
    
$msnm_tray = new XoopsFormElementTray(_AM_MSNM"&nbsp;");
    
$msnm_tray->addElement($msnm_match);
    
$msnm_tray->addElement($msnm_text);
    
$location_text = new XoopsFormText(_AM_LOCATION"user_from"30100);
    
$occupation_text = new XoopsFormText(_AM_OCCUPATION"user_occ"30100);
    
$interest_text = new XoopsFormText(_AM_INTEREST"user_intrest"30100);

    
//$bio_text = new XoopsFormText(_AM_EXTRAINFO, "user_bio", 30, 100);
    
$lastlog_more = new XoopsFormText(_AM_LASTLOGMORE"user_lastlog_more"105);
    
$lastlog_less = new XoopsFormText(_AM_LASTLOGLESS"user_lastlog_less"105);
    
$reg_more = new XoopsFormText(_AM_REGMORE"user_reg_more"105);
    
$reg_less = new XoopsFormText(_AM_REGLESS"user_reg_less"105);
    
$posts_more = new XoopsFormText(_AM_POSTSMORE"user_posts_more"105);
    
$posts_less = new XoopsFormText(_AM_POSTSLESS"user_posts_less"105);
    
$mailok_radio = new XoopsFormRadio(_AM_SHOWMAILOK"user_mailok""both");
    
$mailok_radio->addOptionArray(array("mailok"=>_AM_MAILOK"mailng"=>_AM_MAILNG"both"=>_AM_BOTH));
    
$type_radio = new XoopsFormRadio(_AM_SHOWTYPE"user_type""actv");
    
$type_radio->addOptionArray(array("actv"=>_AM_ACTIVE"inactv"=>_AM_INACTIVE"both"=>_AM_BOTH));
    
$sort_select = new XoopsFormSelect(_AM_SORT"user_sort");
    
$sort_select->addOptionArray(array("uname"=>_AM_UNAME,"email"=>_AM_EMAIL,"last_login"=>_AM_LASTLOGIN,"user_regdate"=>_AM_REGDATE,"posts"=>_AM_POSTS));
    
$order_select = new XoopsFormSelect(_AM_ORDER"user_order");
    
$order_select->addOptionArray(array("ASC"=>_AM_ASC,"DESC"=>_AM_DESC));
    
$limit_text = new XoopsFormText(_AM_LIMIT"limit"62);
    
$fct_hidden = new XoopsFormHidden("fct""findusers");
    
$op_hidden = new XoopsFormHidden("op""submit");
    
$submit_button = new XoopsFormButton("""user_submit"_SUBMIT"submit");

    
$form = new XoopsThemeForm(_AM_FINDUS"uesr_findform""admin.php"'post'true);
    
$form->addElement($uname_tray);
    
$form->addElement($name_tray);
    
$form->addElement($email_tray);
    
//$form->addElement($theme_select);
    //$form->addElement($timezone_select);
    
$form->addElement($icq_tray);
    
$form->addElement($aim_tray);
    
$form->addElement($yim_tray);
    
$form->addElement($msnm_tray);
//modify begin dhcst
        
$form->addElement($group_tray);
        
//modify end dhcst
    
$form->addElement($url_text);
    
$form->addElement($location_text);
    
$form->addElement($occupation_text);
    
$form->addElement($interest_text);
    
//$form->addElement($bio_text);
    
$form->addElement($lastlog_more);
    
$form->addElement($lastlog_less);
    
$form->addElement($reg_more);
    
$form->addElement($reg_less);
    
$form->addElement($posts_more);
    
$form->addElement($posts_less);
    
$form->addElement($mailok_radio);
    
$form->addElement($type_radio);
    
$form->addElement($sort_select);
    
$form->addElement($order_select);
    
$form->addElement($fct_hidden);
    
$form->addElement($limit_text);
    
$form->addElement($op_hidden);
    
// if this is to find users for a specific group
    
if ( !empty($_GET['group']) && intval($_GET['group']) > ) {
        
$group_hidden = new XoopsFormHidden("group"intval($_GET['group']));
        
$form->addElement($group_hidden);
    }
    
$form->addElement($submit_button);
    echo 
"<h4 style='text-align:left;'>"._AM_FINDUS."</h4>(".sprintf(_AM_ACTUS"<span style='color:#ff0000;'>$acttotal</span>")." ".sprintf(_AM_INACTUS"<span style='color:#ff0000;'>$inacttotal</span>").")";
    
$form->display();
}

elseif (
$op == "submit" $GLOBALS['xoopsSecurity']->check()) {
    
$myts =& MyTextSanitizer::getInstance();
    
$criteria = new CriteriaCompo();
    if ( !empty(
$_POST['user_uname']) ) {
        
$match = (!empty($_POST['user_uname_match'])) ? intval($_POST['user_uname_match']) : XOOPS_MATCH_START;
        switch (
$match) {
        case 
XOOPS_MATCH_START:
            
$criteria->add(new Criteria('uname'$myts->addSlashes(trim($_POST['user_uname'])).'%''LIKE'));
            break;
        case 
XOOPS_MATCH_END:
            
$criteria->add(new Criteria('uname''%'.$myts->addSlashes(trim($_POST['user_uname'])), 'LIKE'));
            break;
        case 
XOOPS_MATCH_EQUAL:
            
$criteria->add(new Criteria('uname'$myts->addSlashes(trim($_POST['user_uname']))));
            break;
        case 
XOOPS_MATCH_CONTAIN:
            
$criteria->add(new Criteria('uname''%'.$myts->addSlashes(trim($_POST['user_uname'])).'%''LIKE'));
            break;
        }
    }
    if ( !empty(
$_POST['user_name']) ) {
        
$match = (!empty($_POST['user_name_match'])) ? intval($_POST['user_name_match']) : XOOPS_MATCH_START;
        switch (
$match) {
        case 
XOOPS_MATCH_START:
            
$criteria->add(new Criteria('name'$myts->addSlashes(trim($_POST['user_name'])).'%''LIKE'));
            break;
        case 
XOOPS_MATCH_END:
            
$criteria->add(new Criteria('name''%'.$myts->addSlashes(trim($_POST['user_name'])), 'LIKE'));
            break;
        case 
XOOPS_MATCH_EQUAL:
            
$criteria->add(new Criteria('name'$myts->addSlashes(trim($_POST['user_name']))));
            break;
        case 
XOOPS_MATCH_CONTAIN:
            
$criteria->add(new Criteria('name''%'.$myts->addSlashes(trim($_POST['user_name'])).'%''LIKE'));
            break;
        }
    }
    if ( !empty(
$_POST['user_email']) ) {
        
$match = (!empty($_POST['user_email_match'])) ? intval($_POST['user_email_match']) : XOOPS_MATCH_START;
        switch (
$match) {
        case 
XOOPS_MATCH_START:
            
$criteria->add(new Criteria('email'$myts->addSlashes(trim($_POST['user_email'])).'%''LIKE'));
            break;
        case 
XOOPS_MATCH_END:
            
$criteria->add(new Criteria('email''%'.$myts->addSlashes(trim($_POST['user_email'])), 'LIKE'));
            break;
        case 
XOOPS_MATCH_EQUAL:
            
$criteria->add(new Criteria('email'$myts->addSlashes(trim($_POST['user_email']))));
            break;
        case 
XOOPS_MATCH_CONTAIN:
            
$criteria->add(new Criteria('email''%'.$myts->addSlashes(trim($_POST['user_email'])).'%''LIKE'));
            break;
        }
    }
    if ( !empty(
$_POST['user_url']) ) {
        
$url formatURL(trim($_POST['user_url']));
        
$criteria->add(new Criteria('url'$url.'%''LIKE'));
    }
    if ( !empty(
$_POST['user_icq']) ) {
        
$match = (!empty($_POST['user_icq_match'])) ? intval($_POST['user_icq_match']) : XOOPS_MATCH_START;
        switch (
$match) {
        case 
XOOPS_MATCH_START:
            
$criteria->add(new Criteria('user_icq'$myts->addSlashes(trim($_POST['user_icq'])).'%''LIKE'));
            break;
        case 
XOOPS_MATCH_END:
            
$criteria->add(new Criteria('user_icq''%'.$myts->addSlashes(trim($_POST['user_icq'])), 'LIKE'));
            break;
        case 
XOOPS_MATCH_EQUAL:
            
$criteria->add(new Criteria('user_icq''%'.$myts->addSlashes(trim($_POST['user_icq']))));
            break;
        case 
XOOPS_MATCH_CONTAIN:
            
$criteria->add(new Criteria('user_icq''%'.$myts->addSlashes(trim($_POST['user_icq'])).'%''LIKE'));
            break;
        }
    }
    if ( !empty(
$_POST['user_aim']) ) {
        
$match = (!empty($_POST['user_aim_match'])) ? intval($_POST['user_aim_match']) : XOOPS_MATCH_START;
        switch (
$match) {
        case 
XOOPS_MATCH_START:
            
$criteria->add(new Criteria('user_aim'$myts->addSlashes(trim($_POST['user_aim'])).'%''LIKE'));
            break;
        case 
XOOPS_MATCH_END:
            
$criteria->add(new Criteria('user_aim''%'.$myts->addSlashes(trim($_POST['user_aim'])), 'LIKE'));
            break;
        case 
XOOPS_MATCH_EQUAL:
            
$criteria->add(new Criteria('user_aim'$myts->addSlashes(trim($_POST['user_aim']))));
            break;
        case 
XOOPS_MATCH_CONTAIN:
            
$criteria->add(new Criteria('user_aim''%'.$myts->addSlashes(trim($_POST['user_aim'])).'%''LIKE'));
            break;
        }
    }
    if ( !empty(
$_POST['user_yim']) ) {
        
$match = (!empty($_POST['user_yim_match'])) ? intval($_POST['user_yim_match']) : XOOPS_MATCH_START;
        switch (
$match) {
        case 
XOOPS_MATCH_START:
            
$criteria->add(new Criteria('user_yim'$myts->addSlashes(trim($_POST['user_yim'])).'%''LIKE'));
            break;
        case 
XOOPS_MATCH_END:
            
$criteria->add(new Criteria('user_yim''%'.$myts->addSlashes(trim($_POST['user_yim'])), 'LIKE'));
            break;
        case 
XOOPS_MATCH_EQUAL:
            
$criteria->add(new Criteria('user_yim'$myts->addSlashes(trim($_POST['user_yim']))));
            break;
        case 
XOOPS_MATCH_CONTAIN:
            
$criteria->add(new Criteria('user_yim''%'.$myts->addSlashes(trim($_POST['user_yim'])).'%''LIKE'));
            break;
        }
    }
    if ( !empty(
$_POST['user_msnm']) ) {
        
$match = (!empty($_POST['user_msnm_match'])) ? intval($_POST['user_msnm_match']) : XOOPS_MATCH_START;
        switch (
$match) {
        case 
XOOPS_MATCH_START:
            
$criteria->add(new Criteria('user_msnm'$myts->addSlashes(trim($_POST['user_msnm'])).'%''LIKE'));
            break;
        case 
XOOPS_MATCH_END:
            
$criteria->add(new Criteria('user_msnm''%'.$myts->addSlashes(trim($_POST['user_msnm'])), 'LIKE'));
            break;
        case 
XOOPS_MATCH_EQUAL:
            
$criteria->add(new Criteria('user_msnm''%'.$myts->addSlashes(trim($_POST['user_msnm']))));
            break;
        case 
XOOPS_MATCH_CONTAIN:
            
$criteria->add(new Criteria('user_msnm''%'.$myts->addSlashes(trim($_POST['user_msnm'])).'%''LIKE'));
            break;
        }
    }
    if ( !empty(
$_POST['user_from']) ) {
        
$criteria->add(new Criteria('user_from''%'.$myts->addSlashes(trim($_POST['user_from'])).'%''LIKE'));
    }
    if ( !empty(
$_POST['user_intrest']) ) {
        
$criteria->add(new Criteria('user_intrest''%'.$myts->addSlashes(trim($_POST['user_intrest'])).'%''LIKE'));
    }
    if ( !empty(
$_POST['user_occ']) ) {
        
$criteria->add(new Criteria('user_occ''%'.$myts->addSlashes(trim($_POST['user_occ'])).'%''LIKE'));
    }

    if ( !empty(
$_POST['user_lastlog_more']) && is_numeric($_POST['user_lastlog_more']) ) {
        
$f_user_lastlog_more intval(trim($_POST['user_lastlog_more']));
        
$time time() - (60 60 24 $f_user_lastlog_more);
        if ( 
$time ) {
            
$criteria->add(new Criteria('last_login'$time'<'));
        }
    }
    if ( !empty(
$_POST['user_lastlog_less']) && is_numeric($_POST['user_lastlog_less']) ) {
        
$f_user_lastlog_less intval(trim($_POST['user_lastlog_less']));
        
$time time() - (60 60 24 $f_user_lastlog_less);
        if ( 
$time ) {
            
$criteria->add(new Criteria('last_login'$time'>'));
        }
    }
    if ( !empty(
$_POST['user_reg_more']) && is_numeric($_POST['user_reg_more']) ) {
        
$f_user_reg_more intval(trim($_POST['user_reg_more']));
        
$time time() - (60 60 24 $f_user_reg_more);
        if ( 
$time ) {
            
$criteria->add(new Criteria('user_regdate'$time'<'));
        }
    }
    if ( !empty(
$_POST['user_reg_less']) && is_numeric($_POST['user_reg_less']) ) {
        
$f_user_reg_less intval($_POST['user_reg_less']);
        
$time time() - (60 60 24 $f_user_reg_less);
        if ( 
$time ) {
            
$criteria->add(new Criteria('user_regdate'$time'>'));
        }
    }
    if ( !empty(
$_POST['user_posts_more']) && is_numeric($_POST['user_posts_more']) ) {
        
$criteria->add(new Criteria('posts'intval($_POST['user_posts_more']), '>'));
    }
    if ( !empty(
$_POST['user_posts_less']) && is_numeric($_POST['user_posts_less']) ) {
        
$criteria->add(new Criteria('posts'intval($_POST['user_posts_less']), '<'));
    }
    if ( isset(
$_POST['user_mailok']) ) {
        if ( 
$_POST['user_mailok'] == "mailng" ) {
            
$criteria->add(new Criteria('user_mailok'0));
        } elseif ( 
$_POST['user_mailok'] == "mailok" ) {
            
$criteria->add(new Criteria('user_mailok'1));
        } else {
            
$criteria->add(new Criteria('user_mailok'0'>='));
        }
    }
    if ( isset(
$_POST['user_type']) ) {
        if ( 
$_POST['user_type'] == "inactv" ) {
            
$criteria->add(new Criteria('level'0'='));
        } elseif ( 
$_POST['user_type'] == "actv" ) {
            
$criteria->add(new Criteria('level'0'>'));
        } else {
            
$criteria->add(new Criteria('level'0'>='));
        }
    }

    
$validsort = array("uname""email""last_login""user_regdate""posts");
    
$sort = (!in_array($_POST['user_sort'], $validsort)) ? "uname" $_POST['user_sort'];
    
$order "ASC";
    if ( isset(
$_POST['user_order']) && $_POST['user_order'] == "DESC") {
        
$order "DESC";
    }
    
$limit = (!empty($_POST['limit'])) ? intval($_POST['limit']) : 50;
    if ( 
$limit == || $limit 50 ) {
        
$limit 50;
    }
    
$start = (!empty($_POST['start'])) ? intval($_POST['start']) : 0;
    
$member_handler =& xoops_gethandler('member');
    
$total $member_handler->getUserCount($criteria);
    echo 
"<a href='admin.php?fct=findusers&amp;op=form'>"_AM_FINDUS ."</a>&nbsp;<span style='font-weight:bold;'>&raquo;&raquo;</span>&nbsp;"_AM_RESULTS."<br /><br />";
    if ( 
$total == ) {
        echo 
"<h4>"._AM_NOFOUND,"</h4>";
    } elseif ( 
$start $total ) {
        echo 
sprintf(_AM_USERSFOUND$total)."<br />";
        echo 
"<form action='admin.php' method='post' name='memberslist' id='memberslist'><input type='hidden' name='op' value='delete_many' />
        <table width='100%' border='0' cellspacing='1' cellpadding='4' class='outer'><tr><th align='center'><input type='checkbox' name='memberslist_checkall' id='memberslist_checkall' onclick='xoopsCheckAll("
memberslist", "memberslist_checkall");' /></th><th align='center'>"._AM_AVATAR."</th><th align='center'>"._AM_UNAME."</th><th align='center'>"._AM_REALNAME."</th><th align='center'>"._AM_EMAIL."</th><th align='center'>"._AM_PM."</th><th align='center'>"._AM_URL."</th><th align='center'>"._AM_REGDATE."</th><th align='center'>"._AM_LASTLOGIN."</th><th align='center'>"._AM_POSTS."</th><th align='center'>&nbsp;</th></tr>";
        
$criteria->setSort($sort);
        
$criteria->setOrder($order);
        
$criteria->setLimit($limit);
        
$criteria->setStart($start);
        
$foundusers =& $member_handler->getUsers($criteriatrue);
        
$ucount 0;
        foreach (
array_keys($foundusers) as $j) {
            if (
$ucount == 0) {
                
$class 'even';
            } else {
                
$class 'odd';
            }
            
$ucount++;
            
$fuser_avatar $foundusers[$j]->getVar("user_avatar") ? "<img src='".XOOPS_UPLOAD_URL."/".$foundusers[$j]->getVar("user_avatar")."' alt='' />" "&nbsp;";
            
$fuser_name $foundusers[$j]->getVar("name") ? $foundusers[$j]->getVar("name") : "&nbsp;";
            echo 
"<tr class='$class'><td align='center'><input type='checkbox' name='memberslist_id[]' id='memberslist_id[]' value='".$foundusers[$j]->getVar("uid")."' /><input type='hidden' name='memberslist_uname[".$foundusers[$j]->getVar("uid")."]' id='memberslist_uname[]' value='".$foundusers[$j]->getVar("uname")."' /></td>";
            echo 
"<td>$fuser_avatar</td><td><a href='".XOOPS_URL."/userinfo.php?uid=".$foundusers[$j]->getVar("uid")."'>".$foundusers[$j]->getVar("uname")."</a></td><td>".$fuser_name."</td><td align='center'><a href='mailto:".$foundusers[$j]->getVar("email")."'><img src='".XOOPS_URL."/images/icons/email.gif' border='0' alt='";
            
printf(_SENDEMAILTO,$foundusers[$j]->getVar("uname""E"));
            echo 
"' /></a></td><td align='center'><a href='javascript:openWithSelfMain("".XOOPS_URL."/pmlite.php?send2=1&amp;to_userid=".$foundusers[$j]->getVar("uid")."","pmlite",450,370);'><img src='".XOOPS_URL."/images/icons/pm.gif' border='0' alt='";
            
printf(_SENDPMTO,$foundusers[$j]->getVar("uname""E"));
            echo 
"' /></a></td><td align='center'>";
            if ( 
$foundusers[$j]->getVar("url","E") != "" ) {
                echo 
"<a href='".$foundusers[$j]->getVar("url","E")."' target='_blank'><img src='".XOOPS_URL."/images/icons/www.gif' border='0' alt='"._VISITWEBSITE."' /></a>";
            } else {
                echo 
"&nbsp;";
            }
            echo 
"</td><td align='center'>".formatTimeStamp($foundusers[$j]->getVar("user_regdate"),"s")."</td><td align='center'>";
            if ( 
$foundusers[$j]->getVar("last_login") != ) {
                echo 
formatTimeStamp($foundusers[$j]->getVar("last_login"),"m");
            } else {
                echo 
"&nbsp;";
            }
            echo 
"</td><td align='center'>".$foundusers[$j]->getVar("posts")."</td>";
            echo 
"<td align='center'><a href='".XOOPS_URL."/modules/system/admin.php?fct=users&amp;uid=".$foundusers[$j]->getVar("uid")."&amp;op=modifyUser'>"._EDIT."</a></td></tr>n";
        }
        echo 
"<tr class='foot'><td><select name='fct'><option value='users'>"._DELETE."</option><option value='mailusers'>"._AM_SENDMAIL."</option>";
        
$group = !empty($_POST['group']) ? intval($_POST['group']) : 0;
        if ( 
$group ) {
            
$member_handler =& xoops_gethandler('member');
            
$add2group =& $member_handler->getGroup($group);
            echo 
"<option value='groups' selected='selected'>".sprintf(_AM_ADD2GROUP$add2group->getVar('name'))."</option>";
        }
        echo 
"</select>&nbsp;";
        if ( 
$group ) {
            echo 
"<input type='hidden' name='groupid' value='".$group."' />";
        }
        echo 
"</td><td colspan='10'>".$GLOBALS['xoopsSecurity']->getTokenHTML()."<input type='submit' value='"._SUBMIT."' /></td></tr></table></form>n";
        
$totalpages ceil($total $limit);
        if ( 
$totalpages ) {
            
$hiddenform "<form name='findnext' action='admin.php' method='post'>";
            foreach ( 
$_POST as $k => $v ) {
                if (
$k == 'XOOPS_TOKEN_REQUEST') {
                    
// regenerate token value
                    
$hiddenform .= $GLOBALS['xoopsSecurity']->getTokenHTML()."n";
                } else {
                    
$hiddenform .= "<input type='hidden' name='".$myts->htmlSpecialChars($k)."' value='".$myts->htmlSpecialChars($myts->stripSlashesGPC($v))."' />n";
                }
            }
            if (!isset(
$_POST['limit'])) {
                
$hiddenform .= "<input type='hidden' name='limit' value='".$limit."' />n";
            }
            if (!isset(
$_POST['start'])) {
                
$hiddenform .= "<input type='hidden' name='start' value='".$start."' />n";
            }
            
$prev $start $limit;
            if ( 
$start $limit >= ) {
                
$hiddenform .= "<a href='#0' onclick='javascript:document.findnext.start.value=".$prev.";document.findnext.submit();'>"._AM_PREVIOUS."</a>&nbsp;n";
            }
            
$counter 1;
            
$currentpage = ($start+$limit) / $limit;
            while ( 
$counter <= $totalpages ) {
                if ( 
$counter == $currentpage ) {
                    
$hiddenform .= "<b>".$counter."</b> ";
                } elseif ( (
$counter $currentpage-&& $counter $currentpage+4) || $counter == || $counter == $totalpages ) {
                    if ( 
$counter == $totalpages && $currentpage $totalpages-) {
                        
$hiddenform .= "... ";
                    }
                    
$hiddenform .= "<a href='#".$counter."' onclick='javascript:document.findnext.start.value=".($counter-1)*$limit.";document.findnext.submit();'>".$counter."</a> ";
                    if ( 
$counter == && $currentpage ) {
                        
$hiddenform .= "... ";
                    }
                }
                
$counter++;
            }
            
$next $start+$limit;
            if ( 
$total $next ) {
                
$hiddenform .= "&nbsp;<a href='#".$total."' onclick='javascript:document.findnext.start.value=".$next.";document.findnext.submit();'>"._AM_NEXT."</a>n";
            }
            
$hiddenform .= "</form>";
            echo 
"<div style='text-align:center'>".$hiddenform."<br />";
            
printf(_AM_USERSFOUND$total);
            echo 
"</div>";
        }
    }
}
else {
    
redirect_header('admin.php?fct=findusers'3implode('<br />'$GLOBALS['xoopsSecurity']->getErrors()));
}
//CloseTable();
xoops_cp_footer();
?>

Posté le : 16/08/2007 22:24

Webmaster Forever sous Xoops
www.sciencespoaix.com ==> site étudiant de Sciences Po Aix
www.intellimique.com ==> Intelligence Economique, Veille, Sécurité
Partager Twitter Partagez cette article sur GG+
Re: Afficher tous les membres d'un groupe
Xoops accro
Inscrit: 04/02/2003 01:54
De Le Mans
Messages: 12273
moi non plus , mais si tu fais copier/coller dans un traducteur en ligne, çà donne une idée

En tout cas le site est réouvert et tu peux télécharger les fichiers .

Posté le : 16/08/2007 22:50
Partager Twitter Partagez cette article sur GG+
Re: Afficher tous les membres d'un groupe
Supporter Xoops
Inscrit: 16/02/2003 21:55
De Paris
Messages: 346
petit up j'ai modifié mon post précédent mon cher Chrisitian.
Oui je sais cétait de la mauvaise fois...

Posté le : 16/08/2007 22:58

Webmaster Forever sous Xoops
www.sciencespoaix.com ==> site étudiant de Sciences Po Aix
www.intellimique.com ==> Intelligence Economique, Veille, Sécurité
Partager Twitter Partagez cette article sur GG+
Re: Afficher tous les membres d'un groupe
Supporter Xoops
Inscrit: 16/02/2003 21:55
De Paris
Messages: 346
Comme je l'ai marqué plus haut, ce hack ne marche pas.
Et si je remplace direct le fichier main par celui de l'archive j'ai une erreur 500.
Xoops 2.016

Voici ce que me dit le debug mode:

Sur la page formulaire:
NoticeOnly variables should be assigned by reference in file /modules/system/admin/findusers/main.php line 70

Cela correspond à l'endroite où le hack a été déclaré.


Sur la page de résulat:
NoticeOnly variables should be assigned by reference in file /modules/system/admin/findusers/main.php line 374

SELECT 
FROM x2_config WHERE (conf_modid '0' AND conf_catid '1'ORDER BY conf_order ASC
SELECT sess_data FROM x2_session WHERE sess_id 
'25f14963926c7a87e333510218320025'
SELECT FROM x2_users WHERE uid=1
SELECT 
FROM x2_modules WHERE dirname 'system'
DELETE FROM x2_protector_access WHERE expire UNIX_TIMESTAMP()
SELECT COUNT(*) FROM x2_protector_access WHERE ip='86.194.195.163' AND request_uri='/spx/modules/system/admin.php'
SELECT COUNT(*) FROM x2_protector_access WHERE ip='86.194.195.163'
INSERT INTO x2_protector_access SET ip='86.194.195.163',request_uri='/spx/modules/system/admin.php',expire=UNIX_TIMESTAMP()+'60'
SELECT FROM x2_group_permission WHERE (gperm_name 'module_admin' AND gperm_modid '1' AND (gperm_groupid '1' OR gperm_groupid '2' OR gperm_groupid '4' OR gperm_groupid '5'))
SELECT COUNT(*) FROM x2_users WHERE (user_mailok >= '0' AND level '0')
SELECT FROM x2_users WHERE (user_mailok >= '0' AND level '0'ORDER BY uname ASC LIMIT 0, -1
Error number
1064
Error message
You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 1

Posté le : 17/08/2007 18:46

Webmaster Forever sous Xoops
www.sciencespoaix.com ==> site étudiant de Sciences Po Aix
www.intellimique.com ==> Intelligence Economique, Veille, Sécurité
Partager Twitter Partagez cette article sur GG+
Re: Afficher tous les membres d'un groupe
Supporter Xoops
Inscrit: 16/02/2003 21:55
De Paris
Messages: 346
Up up please!

Posté le : 17/08/2007 21:56

Webmaster Forever sous Xoops
www.sciencespoaix.com ==> site étudiant de Sciences Po Aix
www.intellimique.com ==> Intelligence Economique, Veille, Sécurité
Partager Twitter Partagez cette article sur GG+
Re: Afficher tous les membres d'un groupe
Supporter Xoops
Inscrit: 16/02/2003 21:55
De Paris
Messages: 346
Bonsoir,

Personne ne sait ou personne ne veut me répondre?

Posté le : 18/08/2007 20:54

Webmaster Forever sous Xoops
www.sciencespoaix.com ==> site étudiant de Sciences Po Aix
www.intellimique.com ==> Intelligence Economique, Veille, Sécurité
Partager Twitter Partagez cette article sur GG+
Re: Afficher tous les membres d'un groupe
Aspirant
Inscrit: 13/06/2003 14:28
De Metz
Messages: 69
À vrai dire, ton post ne donne pas très envie
- C'est quoi le kilomètre de code que tu as posté ?
- Quel rapport avec l'allemand (que je parle) et le site qui est indiqué ?

Moi je veux bien t'aider, mais il faut faire le point un petit mieux que cela. Autrement que "ça", "ici" et des liens vers des posts qui font 3 pages...

Fais le point un petit peu mieux que cela... et tu auras des réponses, peut-être même par des gens plus compétents que moi.

Posté le : 18/08/2007 21:45
Partager Twitter Partagez cette article sur GG+
Re: Afficher tous les membres d'un groupe
Supporter Xoops
Inscrit: 16/02/2003 21:55
De Paris
Messages: 346
Comme je l'ai marqu' plus haut, j'ai essayé d'installer le hack qui est présent sur ce forum : lien

Ce hack devrait normalement pouvoir afficher tous les users d'un groupe.
Seulement, il semblerait que ce hack ne marchait que sous xoops 2.013 ou avant.

Quand je modifie le fichier main.php de finduser en rajoutant les lignes nécessaires qui se trouvent dans le fichier zip, ça ne marche pas.
La page de code plus haut étant le fichier main.php de xoops 2.016 de finduser modifié.

Aucun utilisateur ne s'affiche.
Quand je mets le mode debug, ça me donne ça:
Sur la page formulaire:
NoticeOnly variables should be assigned by reference in file /modules/system/admin/findusers/main.php line 70

Cela correspond à l'endroite où le hack a été déclaré.


Sur la page de résulat:
NoticeOnly variables should be assigned by reference in file /modules/system/admin/findusers/main.php line 374

SELECT 
FROM x2_config WHERE (conf_modid '0' AND conf_catid '1'ORDER BY conf_order ASC
SELECT sess_data FROM x2_session WHERE sess_id 
'25f14963926c7a87e333510218320025'
SELECT FROM x2_users WHERE uid=1
SELECT 
FROM x2_modules WHERE dirname 'system'
DELETE FROM x2_protector_access WHERE expire UNIX_TIMESTAMP()
SELECT COUNT(*) FROM x2_protector_access WHERE ip='86.194.195.163' AND request_uri='/spx/modules/system/admin.php'
SELECT COUNT(*) FROM x2_protector_access WHERE ip='86.194.195.163'
INSERT INTO x2_protector_access SET ip='86.194.195.163',request_uri='/spx/modules/system/admin.php',expire=UNIX_TIMESTAMP()+'60'
SELECT FROM x2_group_permission WHERE (gperm_name 'module_admin' AND gperm_modid '1' AND (gperm_groupid '1' OR gperm_groupid '2' OR gperm_groupid '4' OR gperm_groupid '5'))
SELECT COUNT(*) FROM x2_users WHERE (user_mailok >= '0' AND level '0')
SELECT FROM x2_users WHERE (user_mailok >= '0' AND level '0'ORDER BY uname ASC LIMIT 0, -1
Error number
1064
Error message
You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 1


Quand je remplace le fichier main.php original par celui du zip, j'ai une erreur 500.

Voilà, c'est clair maintenant?

Posté le : 18/08/2007 23:19

Webmaster Forever sous Xoops
www.sciencespoaix.com ==> site étudiant de Sciences Po Aix
www.intellimique.com ==> Intelligence Economique, Veille, Sécurité
Partager Twitter Partagez cette article sur GG+

 Haut   Précédent   Suivant
(1) 2 »



Vous pouvez voir les sujets.
Vous ne pouvez pas débuter de nouveaux sujets.
Vous ne pouvez pas répondre aux contributions.
Vous ne pouvez pas éditer vos contributions.
Vous ne pouvez pas effacez vos contributions.
Vous ne pouvez pas ajouter de nouveaux sondages.
Vous ne pouvez pas voter en sondage.
Vous ne pouvez pas attacher des fichiers à vos contributions.
Vous ne pouvez pas poster sans approbation.

Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

59 Personne(s) en ligne (49 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 59 | Plus ...