ich hätte noch ne frage mein code sieht so aus profilefield wird auch ausgelesen aber ich möchte noch zusätlich das die team gruppen auch aufgelistet werden members_list
ich habe unter groups bzw team 5 mannschaften erstellt zb.
1.Mannnschaft 2.mannschaft 3.mannschaft
mein code
<?php
# Copyright by: David Schwarz
# Support: www.baduncles.game-host.org
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);
$design->header();
$limit = 20; // Limit
function profildaten ($uid, $value)
{
$res = db_query('SELECT a.val
FROM prefix_userfields as a
LEFT JOIN prefix_profilefields as b ON a.fid = b.id
WHERE a.uid = ' . $uid . ' AND b.show = "' . $value . '"');
$show = (db_num_rows($res) ? db_result($res) : '');
return ($show);
}
$page = ($menu->getA(1) == 'p' ? $menu->getE(1) : 1 );
$MPL = db_make_sites ($page , "" , $limit , '?user' , 'user' );
$anfang = ($page - 1) * $limit;
$tpl = new tpl ( 'user/memb_list.htm' );
$tpl->set_out ( 'SITELINK', $MPL, 0);
$class = '';
$erg92 = db_query("SELECT id,name FROM prefix_grundrechte WHERE id = -9");
while ($row = db_fetch_object($erg92))
{ $pic = 'include/images/rangs/'.$row->name.'.gif';
$picr = (file_exists($pic)?'<img src="'.$pic.'">':$row->name);
$ar92 = array('GRUPP9' => $picr,);
$tpl->set_ar_out($ar92,1);
}
$erg9 = db_query("SELECT posts,prefix_user.id,regist,prefix_user.icq,prefix_user.geschlecht,prefix_user.gebdatum,prefix_user.name FROM prefix_user WHERE prefix_user.recht = -9 ORDER by regist,prefix_user.posts DESC LIMIT ".$anfang.",".$limit);
while ($row = db_fetch_object($erg9))
{ $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=12" border="0"></a>';
}
$ga = '';
$age1=explode("-",$row->gebdatum);
$age = date("Y",time())-$age1[0];
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.=' - '.$age.'';
}else
{$ga.='';
}
}elseif ($row->geschlecht == 2)
{if ($row->gebdatum != 0000-00-00 )
{$ga.=' - '.$age.'';
}else
{$ga.='';
}
}if ($class == 'Cmite')
{ $class = 'Cnorm';
} else
{ $class = 'Cmite';
}
$ar9 = array('NAME9' => $row->name,
'NACHNAME9' => profildaten($row->id, 'nachname'),
'VORNAME9' => profildaten($row->id, 'vorname'),
'TEAM9' => profildaten($row->id, 'team'),
'GA9' => $ga,
'CLASS9' => $class,
'POSTS9' => $row->posts,
'UID9' => $row->id,
'DATE9' => date('d.m.Y',$row->regist),
);
$tpl->set_ar_out($ar9,2);
}
$erg82 = db_query("SELECT id,name FROM prefix_grundrechte WHERE id = -8");
while ($row = db_fetch_object($erg82))
{ $pic = 'include/images/rangs/'.$row->name.'.gif';
$picr = (file_exists($pic)?'<img src="'.$pic.'">':$row->name);
$ar82 = array('GRUPP8' => $picr,);
$tpl->set_ar_out($ar82,3);
}
$erg8 = db_query("SELECT posts,prefix_user.id,regist,prefix_user.icq,prefix_user.geschlecht,prefix_user.gebdatum,prefix_user.name FROM prefix_user WHERE prefix_user.recht = -8 ORDER by regist,prefix_user.posts DESC LIMIT ".$anfang.",".$limit);
while ($row = db_fetch_object($erg8))
{ $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=12" border="0"></a>';
}
$ga = '';
$age1=explode("-",$row->gebdatum);
$age = date("Y",time())-$age1[0];
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.=' - '.$age.'';
}else
{$ga.='';
}
}elseif ($row->geschlecht == 2)
{if ($row->gebdatum != 0000-00-00 )
{$ga.=' - '.$age.'';
}else
{$ga.='';
}
}if ($class == 'Cmite')
{ $class = 'Cnorm';
} else
{ $class = 'Cmite';
}
$ar8 = array('NAME8' => $row->name,
'NACHNAME8' => profildaten($row->id, 'nachname'),
'VORNAME8' => profildaten($row->id, 'vorname'),
'TEAM8' => profildaten($row->id, 'team'),
'GA8' => $ga,
'CLASS8' => $class,
'POSTS8' => $row->posts,
'UID8' => $row->id,
'DATE8' => date('d.m.Y',$row->regist),
);
$tpl->set_ar_out($ar8,4);
}
$erg72 = db_query("SELECT id,name FROM prefix_grundrechte WHERE id = -7");
while ($row = db_fetch_object($erg72))
{ $pic = 'include/images/rangs/'.$row->name.'.gif';
$picr = (file_exists($pic)?'<img src="'.$pic.'">':$row->name);
$ar72 = array('GRUPP7' => $picr,);
$tpl->set_ar_out($ar72,5);
}
$erg7 = db_query("SELECT posts,prefix_user.id,regist,prefix_user.icq,prefix_user.geschlecht,prefix_user.gebdatum,prefix_user.name FROM prefix_user WHERE prefix_user.recht = -7 ORDER by regist,prefix_user.posts DESC LIMIT ".$anfang.",".$limit);
while ($row = db_fetch_object($erg7))
{ $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=12" border="0"></a>';
}
$ga = '';
$age1=explode("-",$row->gebdatum);
$age = date("Y",time())-$age1[0];
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.=' - '.$age.'';
}else
{$ga.='';
}
}elseif ($row->geschlecht == 2)
{if ($row->gebdatum != 0000-00-00 )
{$ga.=' - '.$age.'';
}else
{$ga.='';
}
}if ($class == 'Cmite')
{ $class = 'Cnorm';
} else
{ $class = 'Cmite';
}
$ar7 = array('NAME7' => $row->name,
'NACHNAME7' => profildaten($row->id, 'nachname'),
'VORNAME7' => profildaten($row->id, 'vorname'),
'TEAM7' => profildaten($row->id, 'team'),
'GA7' => $ga,
'CLASS7' => $class,
'POSTS7' => $row->posts,
'UID7' => $row->id,
'DATE7' => date('d.m.Y',$row->regist),
);
$tpl->set_ar_out($ar7,6);
}
$erg62 = db_query("SELECT id,name FROM prefix_grundrechte WHERE id = -6");
while ($row = db_fetch_object($erg62))
{ $pic = 'include/images/rangs/'.$row->name.'.gif';
$picr = (file_exists($pic)?'<img src="'.$pic.'">':$row->name);
$ar62 = array('GRUPP6' => $picr,);
$tpl->set_ar_out($ar62,7);
}
$erg6 = db_query("SELECT posts,prefix_user.id,regist,prefix_user.icq,prefix_user.geschlecht,prefix_user.gebdatum,prefix_user.name FROM prefix_user WHERE prefix_user.recht = -6 ORDER by recht,prefix_user.posts DESC LIMIT ".$anfang.",".$limit);
while ($row = db_fetch_object($erg6))
{ $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=12" border="0"></a>';
}
$ga = '';
$age1=explode("-",$row->gebdatum);
$age = date("Y",time())-$age1[0];
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.=' - '.$age.'';
}else
{$ga.='';
}
}elseif ($row->geschlecht == 2)
{if ($row->gebdatum != 0000-00-00 )
{$ga.=' - '.$age.'';
}else
{$ga.='';
}
}if ($class == 'Cmite')
{ $class = 'Cnorm';
} else
{ $class = 'Cmite';
}
$ar6 = array('NAME6' => $row->name,
'NACHNAME6' => profildaten($row->id, 'nachname'),
'VORNAME6' => profildaten($row->id, 'vorname'),
'TEAM6' => profildaten($row->id, 'team'),
'GA6' => $ga,
'CLASS6' => $class,
'POSTS6' => $row->posts,
'UID6' => $row->id,
'DATE6' => date('d.m.Y',$row->regist),
);
$tpl->set_ar_out($ar6,8);
}
$erg52 = db_query("SELECT id,name FROM prefix_grundrechte WHERE id = -5");
while ($row = db_fetch_object($erg52))
{ $pic = 'include/images/rangs/'.$row->name.'.gif';
$picr = (file_exists($pic)?'<img src="'.$pic.'">':$row->name);
$ar52 = array('GRUPP5' => $picr,);
$tpl->set_ar_out($ar52,9);
}
$erg5 = db_query("SELECT posts,prefix_user.id,regist,prefix_user.icq,prefix_user.geschlecht,prefix_user.gebdatum,prefix_user.name FROM prefix_user WHERE prefix_user.recht = -5 ORDER by recht,prefix_user.posts DESC LIMIT ".$anfang.",".$limit);
while ($row = db_fetch_object($erg5))
{ $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=12" border="0"></a>';
}
$ga = '';
$age1=explode("-",$row->gebdatum);
$age = date("Y",time())-$age1[0];
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.=' - '.$age.'';
}else
{$ga.='';
}
}elseif ($row->geschlecht == 2)
{if ($row->gebdatum != 0000-00-00 )
{$ga.=' - '.$age.'';
}else
{$ga.='';
}
}if ($class == 'Cmite')
{ $class = 'Cnorm';
} else
{ $class = 'Cmite';
}
$ar5 = array('NAME5' => $row->name,
'NACHNAME5' => profildaten($row->id, 'nachname'),
'VORNAME5' => profildaten($row->id, 'vorname'),
'TEAM5' => profildaten($row->id, 'team'),
'GA5' => $ga,
'CLASS5' => $class,
'POSTS5' => $row->posts,
'UID5' => $row->id,
'DATE5' => date('d.m.Y',$row->regist),
);
$tpl->set_ar_out($ar5,10);
}
$erg42 = db_query("SELECT id,name FROM prefix_grundrechte WHERE id = -4");
while ($row = db_fetch_object($erg42))
{ $pic = 'include/images/rangs/'.$row->name.'.gif';
$picr = (file_exists($pic)?'<img src="'.$pic.'">':$row->name);
$ar42 = array('GRUPP4' => $picr,);
$tpl->set_ar_out($ar42,11);
}
$erg4 = db_query("SELECT posts,prefix_user.id,regist,prefix_user.icq,prefix_user.geschlecht,prefix_user.gebdatum,prefix_user.name FROM prefix_user WHERE prefix_user.recht = -4 ORDER by recht,prefix_user.posts DESC LIMIT ".$anfang.",".$limit);
while ($row = db_fetch_object($erg4))
{ $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=12" border="0"></a>';
}
$ga = '';
$age1=explode("-",$row->gebdatum);
$age = date("Y",time())-$age1[0];
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.=' - '.$age.'';
}else
{$ga.='';
}
}elseif ($row->geschlecht == 2)
{if ($row->gebdatum != 0000-00-00 )
{$ga.=' - '.$age.'';
}else
{$ga.='';
}
}if ($class == 'Cmite')
{ $class = 'Cnorm';
} else
{ $class = 'Cmite';
}
$ar4 = array('NAME4' => $row->name,
'NACHNAME4' => profildaten($row->id, 'nachname'),
'VORNAME4' => profildaten($row->id, 'vorname'),
'TEAM4' => profildaten($row->id, 'team'),
'GA4' => $ga,
'CLASS4' => $class,
'POSTS4' => $row->posts,
'UID4' => $row->id,
'DATE4' => date('d.m.Y',$row->regist),
);
$tpl->set_ar_out($ar4,12);
}
$erg32 = db_query("SELECT id,name FROM prefix_grundrechte WHERE id = -3");
while ($row = db_fetch_object($erg32))
{ $pic = 'include/images/rangs/'.$row->name.'.gif';
$picr = (file_exists($pic)?'<img src="'.$pic.'">':$row->name);
$ar32 = array('GRUPP3' => $picr,);
$tpl->set_ar_out($ar32,13);
}
$erg3 = db_query("SELECT posts,prefix_user.id,regist,prefix_user.icq,prefix_user.geschlecht,prefix_user.gebdatum,prefix_user.name FROM prefix_user WHERE prefix_user.recht = -3 ORDER by recht,prefix_user.posts DESC LIMIT ".$anfang.",".$limit);
while ($row = db_fetch_object($erg3))
{ $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=12" border="0"></a>';
}
$ga = '';
$age1=explode("-",$row->gebdatum);
$age = date("Y",time())-$age1[0];
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.=' - '.$age.'';
}else
{$ga.='';
}
}elseif ($row->geschlecht == 2)
{if ($row->gebdatum != 0000-00-00 )
{$ga.=' - '.$age.'';
}else
{$ga.='';
}
}if ($class == 'Cmite')
{ $class = 'Cnorm';
} else
{ $class = 'Cmite';
}
$ar3 = array('NAME3' => $row->name,
'NACHNAME3' => profildaten($row->id, 'nachname'),
'VORNAME3' => profildaten($row->id, 'vorname'),
'TEAM3' => profildaten($row->id, 'team'),
'GA3' => $ga,
'CLASS3' => $class,
'POSTS3' => $row->posts,
'UID3' => $row->id,
'DATE3' => date('d.m.Y',$row->regist),
);
$tpl->set_ar_out($ar3,14);
}
$erg22 = db_query("SELECT id,name FROM prefix_grundrechte WHERE id = -2");
while ($row = db_fetch_object($erg22))
{ $pic = 'include/images/rangs/'.$row->name.'.gif';
$picr = (file_exists($pic)?'<img src="'.$pic.'">':$row->name);
$ar22 = array('GRUPP2' => $picr,);
$tpl->set_ar_out($ar22,15);
}
$erg2 = db_query("SELECT posts,prefix_user.id,regist,prefix_user.icq,prefix_user.geschlecht,prefix_user.gebdatum,prefix_user.name FROM prefix_user WHERE prefix_user.recht = -2 ORDER by recht,prefix_user.posts DESC LIMIT ".$anfang.",".$limit);
while ($row = db_fetch_object($erg2))
{ $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=12" border="0"></a>';
}
$ga = '';
$age1=explode("-",$row->gebdatum);
$age = date("Y",time())-$age1[0];
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.=' - '.$age.'';
}else
{$ga.='';
}
}elseif ($row->geschlecht == 2)
{if ($row->gebdatum != 0000-00-00 )
{$ga.=' - '.$age.'';
}else
{$ga.='';
}
}if ($class == 'Cmite')
{ $class = 'Cnorm';
} else
{ $class = 'Cmite';
}
$ar2 = array('NAME2' => $row->name,
'NACHNAME2' => profildaten($row->id, 'nachname'),
'VORNAME2' => profildaten($row->id, 'vorname'),
'TEAM2' => profildaten($row->id, 'team'),
'GA2' => $ga,
'CLASS2' => $class,
'POSTS2' => $row->posts,
'UID2' => $row->id,
'DATE2' => date('d.m.Y',$row->regist),
);
$tpl->set_ar_out($ar2,16);
}
$tpl->out(17);
$design->footer();
?>
du kannst mir helfen lord profilfiel habe ich angepastt jetzt nur noch groups