<?php
# Copyright by: Manuel Staechele
# Support: www.ilch.de
defined ('main') or die ( 'no direct access' );
$title = $allgAr['title'].' :: User :: '.$lang['listofmembers'];
$hmenu = $extented_forum_menu.'User <b> » </b> '.$lang['listofmembers'].$extented_forum_menu_sufix;
$design = new design ( $title , $hmenu, 1 );
$design->header();
$anz = @db_result(db_query("SELECT count(ID) FROM prefix_user"),0);
$adm = @db_result(db_query("SELECT count(ID) FROM prefix_user where recht < -1"),0);
$limit = '40'; // Limit
$page = ($menu->getA(1) == 'p' ? $menu->getE(1) : 1 );
$page1 = floor($adm / $limit) + $limit;
$adm = $anz - $adm + $limit;
$MPL = db_make_sites ($page , '' , $limit , '?memblist' , 'user', $adm );
$anfang = ($page - 1 ) * $limit;
$anfang = $anfang - $limit;
if ($menu->getA(1) == 'p' and $menu->getE(1) >= '2' ){
$where = "where id = -1 ";
}else{
$where = "where id < -1";
}
$erg1 = db_query("SELECT * FROM prefix_grundrechte $where order by id ASC");
while ($row1 = db_fetch_object($erg1)){
$tpl = new tpl ( 'user/memblist.htm' );
$tpl->set_out('','' ,0);
if ($menu->getA(1) == 'p' and $menu->getE(1) >= '2' ){
$anzr = @db_result(db_query("SELECT count(ID) FROM prefix_user where recht = -1"),0);
}else{
$anzr = @db_result(db_query("SELECT count(ID) FROM prefix_user where recht = $row1->id"),0);
}
if ($anzr != 0){
$tpl->set_out('GRUPPE', '<img src="include/images/gruppenbilder/'.$row1->name.'.jpg" border="0" />' ,1);
}
$filtername = isset($_GET['filtername']) ? "WHERE name LIKE '%".escape($_GET['filtername'],'string')."%'" : "";
if ($menu->getA(1) == 'p' and $menu->getE(1) >= '2' ){
$where = "where recht = -1 LIMIT $anfang , $limit";
}else{
$where = "where recht = $row1->id ";
}
$erg = db_query("SELECT * FROM prefix_user $filtername $where ");
while ($row = db_fetch_object($erg)) {
$icq1 = str_replace("-","",$row->icq);
$icq2 = str_replace(" ","",$icq1);
if (is_numeric($icq2) ){
$icq= '<a href="http://www.icq.com/whitepages/cmd.php?uin='.$icq2.'&action=add"><img src="http://web.icq.com/whitepages/online?icq='.$icq2.'&img=5" border="0"></a>';
}else{
$icq = '';
}
$ga = '';
$t1 = 0;
$t2 = 0;
$t3 = 0;
$age1=explode("-",$row->gebdatum);
$age2 = date("Y",time())-$age1[0];
$a=explode("-",$row->gebdatum);
$tag = $a[2];
$mon = $a[1];
$jah = $a[0];
if ($mon > date("m")){$t1 = 2;}
if ($mon == date("m")){$t1 = 1;}
if ($tag > date("d")){$t2 = 1;}
$t3 = ($t1 + $t2);
if ($t3 > 1){
$age = ($age2 -1);
}else{
$age = $age2;
}
if ($row->geschlecht == 0){
if ($row->gebdatum != 0000-00-00 ){
$ga.= $age;
}else{
$ga.= '';
}
}
elseif ($row->geschlecht == 1){
if ($row->gebdatum != 0000-00-00 ){
$ga.='<img width="18" height="18" src="/include/images/userdetails/mann.png" border="0"> - '.$age.'';
}else{
$ga.='<img width="18" height="18" src="/include/images/userdetails/mann.png" border="0">';
}
}
elseif ($row->geschlecht == 2){
if ($row->gebdatum != 0000-00-00 ){
$ga.='<img width="18" height="18" src="/include/images/userdetails/frau.png" border="0"> - '.$age.'';
}else{
$ga.='<img width="18" height="18" src="/include/images/userdetails/frau.png" border="0">';
}
}
if ($row->staat){
$flagg = '<img src="include/images/flags/'.$row->staat.'" alt="" border="0"> ';
}else{
$flagg = '';
}
$anzna = round((time()-$row->llogin)/60);
if ($anzna < 2) {
$aktiv = '<img src="include/images/icons/sonline.gif" alt="" border="0"> ';
}elseif ($anzna < 10) {
$aktiv = '<img src="include/images/icons/na.gif" alt="" border="0"> ';
} else {
$aktiv = '<img src="include/images/icons/soffline.gif" alt="" border="0"> ';
}
if (file_exists($row->avatar)) { $avatar = '<img src="'.$row->avatar.'" alt="User Pic" border="0" />'; }else { $avatar = '<img src="include/images/avatars/noavatar.jpg"';}
$ar = array ( 'NAME' => $row->name,
'RANG' => userrang($row->posts,$row->id),
'AKTIV' => $aktiv,
'AVATAR' => $avatar,
'FLAGG' => $flagg,
'ICQ' => $icq,
'LLOGIN' => date('d.m.Y',$row->llogin),
'GA' => $ga,
'POSTS' => $row->posts,
'UID' => $row->id,
'DATE' => date('d.m.Y',$row->regist)
);
$tpl->set_ar_out($ar,2);
}}
$tpl->set_out('filtername',escape(isset($_GET['filtername'])?$_GET['filtername']:'','string'),3);
$tpl->set_out('anz', $anz ,4);
$tpl->set_out('MPL', $MPL ,5);
$design->footer();
?>
<table widtd="100%" border="0" cellpadding="3" cellspacing="1" class="border">
{EXPLODE}
<tr>
<td height="30%" width="40%" colspan="4" class="Chead"><font style="font-size: 15px"><font color="#FFF68F"><b><u><center>{GRUPPE}</center></b></u></font></td>
</tr>
{EXPLODE}
<tr>
<td width="150" rowspan="3" class="Cdark"><center>{AVATAR}</center></td>
<td width="165" class="Cmite"><a href="index.php?user-details-{UID}"><center><b><u><font color="#3CF">Name</font></u></b><br><font color="#eeeeee">{NAME}</font></center></a></td></td>
<td width="172" class="Cmite"><center><b><u><font color="#3CF">Woher</font></u></b><br>{FLAGG}<center></td>
<td width="290" class="Cmite"><center><smalfont><b><u><font color="#3CF">Angemeldet seit dem</font></u></b><br><font color="#eeeeee"> {DATE}</font></smalfont></center></td>
</tr>
<tr>
<td width="165" class="Cmite"><font style="font-size: 11px"><center><b><u>Rang</b></u><br><font color="#dc143c">{RANG}</center></font></td>
<td width="172" class="Cmite"><center>{GA}</center></td>
<td width="290" class="Cmite"><center><b><u><font color="#3CF">Status</font></b></u> <br>{AKTIV}</center></td>
</tr>
<tr>
<td width="165" class="Cmite"><center><b><u><font color="#3CF">Letzter Login</font></b></u> <br><font color="#CD0000">{LLOGIN}</font></center></td>
<td width="172" class="Cmite"><center><b><u><font color="#3CF">ICQ</font></b></u> <b><u><font color="#3CF">PM</font></b></u> <br>{ICQ} <a href="?forum-privmsg-new=0&empfid={UID}">PM</a></center></td>
<td width="290" class="Cmite"><center><b><u><font color="#3CF">Posts</font></b></u><br>{POSTS}</center></td>
</tr>
<tr><td colspan="4" class="Chead"></td></tr>
{EXPLODE}
</table>
<br />
<form metdod="get" action="index.php"><input type="hidden" name="memblist" value="" /><input type="text" name="user" size="15" value="{filtername}" /> <input type="submit" value="{_lang_filter}" /></form>
{EXPLODE}Registrierte User: {anz} {EXPLODE}{MPL}