würde gerne das so schreiben das .jpg .png und .gif benutzbar sind also vom script geladen werden
{ $pic = 'include/images/rangs/'.$row->name.'.gif';
betroffene Homepage: recordsextended.de
Zuletzt modifiziert von BL4CKB0RNE am 04.02.2014 - 18:17:32
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
{ $pic = 'include/images/rangs/'.$row->name.'.gif';
{ $pic = 'include/images/rangs/'.$row->name.'.gif'; { $pic = 'include/images/rangs/'.$row->name.'.jpg'; { $pic = 'include/images/rangs/'.$row->name.'.png';
function get_membListPic ($name) { if (file_exists('include/images/rangs/'.$name.'.gif')) { return ('include/images/rangs/'.$name.'.gif'); } elseif (file_exists('include/images/rangs/'.$name.'.jpg')) { return ('include/images/rangs/'.$name.'.jpg'); } elseif (file_exists('include/images/rangs/'.$name.'.jpeg')) { return ('include/images/rangs/'.$name.'.jpeg'); } elseif (file_exists('include/images/rangs/'.$name.'.png')) { return ('include/images/rangs/'.$name.'.png'); } return (''); }
{ $pic = get_membListPic($row->name);
$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, staat, email, llogin, prefix_user.id, regist, prefix_user.name, prefix_user.geschlecht, prefix_user.avatar, prefix_user.gebdatum, prefix_grundrechte.name as recht_name FROM prefix_user LEFT JOIN prefix_grundrechte ON prefix_user.recht = prefix_grundrechte.id $sql_search WHERE prefix_user.recht = -6 ORDER by recht,regist,prefix_user.posts DESC LIMIT ".$anfang.",".$limit); while ($row = db_fetch_object($erg6)) { if ($row->geschlecht == 1) { $geschlecht = 'maennlich.jpg'; }elseif ($row->geschlecht == 2) { $geschlecht = 'weiblich.jpg'; }else{ $geschlecht = 'wurstegal.jpg'; } if ( file_exists($row->avatar)) { $avatar = '<img src="'.$row->avatar.'" width="80px" height="80px" border="0">'; }else{ $avatar = '<img src="include/images/avatars/'.$geschlecht.'" width="80px" height="80px" border="0">'; } $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, 'RANG6' => userrang($row->posts,$row->id), 'CLASS6' => $class, 'POSTS6' => $row->posts, 'UID6' => $row->id, 'DATE6' => date('d.m.Y',$row->regist), 'GA6' => $ga, 'GRUPE6' => $row->recht_name, 'AVATAR6' => $avatar, 'STAAT6' => $row->staat, 'EMAIL6' => $row->email, 'LLOGIN6' => date('d.m.Y <b\r> H:i',$row->llogin).' Uhr', ); $tpl->set_ar_out($ar6,8); }
function get_membListPic ($name) { if (file_exists('include/images/rangs/'.$name.'.gif')) { return ('include/images/rangs/'.$name.'.gif'); } elseif (file_exists('include/images/rangs/'.$name.'.jpg')) { return ('include/images/rangs/'.$name.'.jpg'); } elseif (file_exists('include/images/rangs/'.$name.'.jpeg')) { return ('include/images/rangs/'.$name.'.jpeg'); } elseif (file_exists('include/images/rangs/'.$name.'.png')) { return ('include/images/rangs/'.$name.'.png'); } return (''); }
function get_membListPic ($name) { if (file_exists('include/images/rangs/'.$name.'.gif')) { return ('include/images/rangs/'.$name.'.gif'); } elseif (file_exists('include/images/rangs/'.$name.'.jpg')) { return ('include/images/rangs/'.$name.'.jpg'); } elseif (file_exists('include/images/rangs/'.$name.'.jpeg')) { return ('include/images/rangs/'.$name.'.jpeg'); } elseif (file_exists('include/images/rangs/'.$name.'.png')) { return ('include/images/rangs/'.$name.'.png'); } else { return ($name); } } $erg62 = db_query("SELECT id,name FROM prefix_grundrechte WHERE id = -6"); while ($row = db_fetch_object($erg62)){ $ar62 = array('GRUPP6' => get_membListPic($row->name),); $tpl->set_ar_out($ar62,7); }
<?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 = 100; // Limit $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, staat, email, llogin, prefix_user.id, regist, prefix_user.name, prefix_user.geschlecht, prefix_user.avatar, prefix_user.gebdatum, prefix_grundrechte.name as recht_name FROM prefix_user LEFT JOIN prefix_grundrechte ON prefix_user.recht = prefix_grundrechte.id $sql_search WHERE prefix_user.recht = -9 ORDER by recht,regist,prefix_user.posts DESC LIMIT ".$anfang.",".$limit); while ($row = db_fetch_object($erg9)) { if ($row->geschlecht == 1) { $geschlecht = 'maennlich.jpg'; }elseif ($row->geschlecht == 2) { $geschlecht = 'weiblich.jpg'; }else{ $geschlecht = 'wurstegal.jpg'; } if ( file_exists($row->avatar)) { $avatar = '<img src="'.$row->avatar.'" width="80px" height="80px" border="0">'; }else{ $avatar = '<img src="include/images/avatars/'.$geschlecht.'" width="80px" height="80px" border="0">'; } $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, 'RANG9' => userrang($row->posts,$row->id), 'CLASS9' => $class, 'POSTS9' => $row->posts, 'UID9' => $row->id, 'DATE9' => date('d.m.Y',$row->regist), 'GA9' => $ga, 'GRUPE9' => $row->recht_name, 'AVATAR9' => $avatar, 'STAAT9' => $row->staat, 'EMAIL9' => $row->email, 'LLOGIN9' => date('d.m.Y <b\r> H:i',$row->llogin).' Uhr', ); $tpl->set_ar_out($ar9,2); } $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, staat, email, llogin, prefix_user.id, regist, prefix_user.name, prefix_user.geschlecht, prefix_user.avatar, prefix_user.gebdatum, prefix_grundrechte.name as recht_name FROM prefix_user LEFT JOIN prefix_grundrechte ON prefix_user.recht = prefix_grundrechte.id $sql_search WHERE prefix_user.recht = -6 ORDER by recht,regist,prefix_user.posts DESC LIMIT ".$anfang.",".$limit); while ($row = db_fetch_object($erg6)) { if ($row->geschlecht == 1) { $geschlecht = 'maennlich.jpg'; }elseif ($row->geschlecht == 2) { $geschlecht = 'weiblich.jpg'; }else{ $geschlecht = 'wurstegal.jpg'; } if ( file_exists($row->avatar)) { $avatar = '<img src="'.$row->avatar.'" width="80px" height="80px" border="0">'; }else{ $avatar = '<img src="include/images/avatars/'.$geschlecht.'" width="80px" height="80px" border="0">'; } $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, 'RANG6' => userrang($row->posts,$row->id), 'CLASS6' => $class, 'POSTS6' => $row->posts, 'UID6' => $row->id, 'DATE6' => date('d.m.Y',$row->regist), 'GA6' => $ga, 'GRUPE6' => $row->recht_name, 'AVATAR6' => $avatar, 'STAAT6' => $row->staat, 'EMAIL6' => $row->email, 'LLOGIN6' => date('d.m.Y <b\r> H:i',$row->llogin).' Uhr', ); $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, staat, email, llogin, prefix_user.id, regist, prefix_user.name, prefix_user.geschlecht, prefix_user.avatar, prefix_user.gebdatum, prefix_grundrechte.name as recht_name FROM prefix_user LEFT JOIN prefix_grundrechte ON prefix_user.recht = prefix_grundrechte.id $sql_search WHERE prefix_user.recht = -5 ORDER by recht,regist,prefix_user.posts DESC LIMIT ".$anfang.",".$limit); while ($row = db_fetch_object($erg5)) { if ($row->geschlecht == 1) { $geschlecht = 'maennlich.jpg'; }elseif ($row->geschlecht == 2) { $geschlecht = 'weiblich.jpg'; }else{ $geschlecht = 'wurstegal.jpg'; } if ( file_exists($row->avatar)) { $avatar = '<img src="'.$row->avatar.'" width="80px" height="80px" border="0">'; }else{ $avatar = '<img src="include/images/avatars/'.$geschlecht.'" width="80px" height="80px" border="0">'; } $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, 'RANG5' => userrang($row->posts,$row->id), 'CLASS5' => $class, 'POSTS5' => $row->posts, 'UID5' => $row->id, 'DATE5' => date('d.m.Y',$row->regist), 'GA5' => $ga, 'GRUPE5' => $row->recht_name, 'AVATAR5' => $avatar, 'STAAT5' => $row->staat, 'EMAIL5' => $row->email, 'LLOGIN5' => date('d.m.Y <b\r> H:i',$row->llogin).' Uhr', ); $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, staat, email, llogin, prefix_user.id, regist, prefix_user.name, prefix_user.geschlecht, prefix_user.avatar, prefix_user.gebdatum, prefix_grundrechte.name as recht_name FROM prefix_user LEFT JOIN prefix_grundrechte ON prefix_user.recht = prefix_grundrechte.id $sql_search WHERE prefix_user.recht = -4 ORDER by recht,regist,prefix_user.posts DESC LIMIT ".$anfang.",".$limit); while ($row = db_fetch_object($erg4)) { if ($row->geschlecht == 1) { $geschlecht = 'maennlich.jpg'; }elseif ($row->geschlecht == 2) { $geschlecht = 'weiblich.jpg'; }else{ $geschlecht = 'wurstegal.jpg'; } if ( file_exists($row->avatar)) { $avatar = '<img src="'.$row->avatar.'" width="80px" height="80px" border="0">'; }else{ $avatar = '<img src="include/images/avatars/'.$geschlecht.'" width="80px" height="80px" border="0">'; } $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, 'RANG4' => userrang($row->posts,$row->id), 'CLASS4' => $class, 'POSTS4' => $row->posts, 'UID4' => $row->id, 'DATE4' => date('d.m.Y',$row->regist), 'GA4' => $ga, 'GRUPE4' => $row->recht_name, 'AVATAR4' => $avatar, 'STAAT4' => $row->staat, 'EMAIL4' => $row->email, 'LLOGIN4' => date('d.m.Y <b\r> H:i',$row->llogin).' Uhr', ); $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, staat, email, llogin, prefix_user.id, regist, prefix_user.name, prefix_user.geschlecht, prefix_user.avatar, prefix_user.gebdatum, prefix_grundrechte.name as recht_name FROM prefix_user LEFT JOIN prefix_grundrechte ON prefix_user.recht = prefix_grundrechte.id $sql_search WHERE prefix_user.recht = -3 ORDER by recht,regist,prefix_user.posts DESC LIMIT ".$anfang.",".$limit); while ($row = db_fetch_object($erg3)) { if ($row->geschlecht == 1) { $geschlecht = 'maennlich.jpg'; }elseif ($row->geschlecht == 2) { $geschlecht = 'weiblich.jpg'; }else{ $geschlecht = 'wurstegal.jpg'; } if ( file_exists($row->avatar)) { $avatar = '<img src="'.$row->avatar.'" width="80px" height="80px" border="0">'; }else{ $avatar = '<img src="include/images/avatars/'.$geschlecht.'" width="80px" height="80px" border="0">'; } $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, 'RANG3' => userrang($row->posts,$row->id), 'CLASS3' => $class, 'POSTS3' => $row->posts, 'UID3' => $row->id, 'DATE3' => date('d.m.Y',$row->regist), 'GA3' => $ga, 'GRUPE3' => $row->recht_name, 'AVATAR3' => $avatar, 'STAAT3' => $row->staat, 'EMAIL3' => $row->email, 'LLOGIN3' => date('d.m.Y <b\r> H:i',$row->llogin).' Uhr', ); $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, staat, email, llogin, prefix_user.id, regist, prefix_user.name, prefix_user.geschlecht, prefix_user.avatar, prefix_user.gebdatum, prefix_grundrechte.name as recht_name FROM prefix_user LEFT JOIN prefix_grundrechte ON prefix_user.recht = prefix_grundrechte.id $sql_search WHERE prefix_user.recht = -2 ORDER by recht,regist,prefix_user.posts DESC LIMIT ".$anfang.",".$limit); while ($row = db_fetch_object($erg2)) { if ($row->geschlecht == 1) { $geschlecht = 'maennlich.jpg'; }elseif ($row->geschlecht == 2) { $geschlecht = 'weiblich.jpg'; }else{ $geschlecht = 'wurstegal.jpg'; } if ( file_exists($row->avatar)) { $avatar = '<img src="'.$row->avatar.'" width="80px" height="80px" border="0">'; }else{ $avatar = '<img src="include/images/avatars/'.$geschlecht.'" width="80px" height="80px" border="0">'; } $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, 'RANG2' => userrang($row->posts,$row->id), 'CLASS2' => $class, 'POSTS2' => $row->posts, 'UID2' => $row->id, 'DATE2' => date('d.m.Y',$row->regist), 'GA2' => $ga, 'GRUPE2' => $row->recht_name, 'AVATAR2' => $avatar, 'STAAT2' => $row->staat, 'EMAIL2' => $row->email, 'LLOGIN2' => date('d.m.Y <b\r> H:i',$row->llogin).' Uhr', ); $tpl->set_ar_out($ar2,16); } $tpl->out(17); $design->footer(); ?>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="border"> {EXPLODE} <tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="Cmember">{GRUPP9}</td> </tr> </table></td></tr> <tr><td><table width="100%" border="0" cellpadding="3" cellspacing="1" class="border"> <tr class="Chead" > <th height="100" width="80px">{_lang_avatar}</th> <th align="center" height="30" width="30%">{_lang_name}</th> <th align="center" width="20%">{_lang_clan}</th> <th align="center" width="20%">{_lang_group}</th> <th align="center" width="5%">{_lang_contact}</th> <th align="center" width="30%">{_lang_lasttimeonline}</th> <th align="center" width="15%">{_lang_regtime}</th> <th align="center" width="15%">{_lang_posts}</th> <th align="center" width="5%">{_lang_land}</th> </tr> {EXPLODE} <tr class="{CLASS9}"> <td><a href="index.php?user-details-{UID9}">{AVATAR9}</a></td> <td><a href="index.php?user-details-{UID9}">{NAME9}</a> {GA9}</td> <td align="center"><font style="font-size: 10px">{RANG9}</font></td> <td align="center">{GRUPE9}</td> <td align="center" width="20%"><a href="index.php?forum-privmsg-new=0&empfid={UID9}"><img src="include/images/icons/email_small.png" border="0"></a></td> <td align="center">{LLOGIN9}</td> <td align="center">{DATE9}</td> <td align="center">{POSTS9}</td> <th align="center"><img src="include/images/flags/{STAAT9}" alt="" border="0"></th> </tr>{EXPLODE} </table></td></tr> <tr><td><br><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="Cmember">{GRUPP8}</td> </tr> </table></td></tr> <tr><td><table width="100%" border="0" cellpadding="3" cellspacing="1" class="border"> <tr class="Chead" > <th height="100" width="80px">{_lang_avatar}</th> <th align="center" height="30" width="30%">{_lang_name}</th> <th align="center" width="20%">{_lang_clan}</th> <th align="center" width="20%">{_lang_group}</th> <th align="center" width="5%">{_lang_contact}</th> <th align="center" width="30%">{_lang_lasttimeonline}</th> <th align="center" width="15%">{_lang_regtime}</th> <th align="center" width="15%">{_lang_posts}</th> <th align="center" width="5%">{_lang_land}</th> </tr> {EXPLODE} <tr class="{CLASS8}"> <td><a href="index.php?user-details-{UID8}">{AVATAR8}</a></td> <td><a href="index.php?user-details-{UID8}">{NAME8}</a> {GA8}</td> <td align="center"><font style="font-size: 10px">{RANG8}</font></td> <td align="center">{GRUPE8}</td> <td align="center" width="20%"><a href="index.php?forum-privmsg-new=0&empfid={UID8}"><img src="include/images/icons/email_small.png" border="0"></a></td> <td align="center">{LLOGIN8}</td> <td align="center">{DATE8}</td> <td align="center">{POSTS8}</td> <th align="center"><img src="include/images/flags/{STAAT8}" alt="" border="0"></th> </tr>{EXPLODE} </table></td></tr> <tr><td><br><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="Cmember">{GRUPP7}</td> </tr> </table></td></tr> <tr><td><table width="100%" border="0" cellpadding="3" cellspacing="1" class="border"> <tr class="Chead" > <th height="100" width="80px">{_lang_avatar}</th> <th align="center" height="30" width="30%">{_lang_name}</th> <th align="center" width="20%">{_lang_clan}</th> <th align="center" width="20%">{_lang_group}</th> <th align="center" width="5%">{_lang_Ccntact}</th> <th align="center" width="30%">{_lang_lasttimeonline}</th> <th align="center" width="15%">{_lang_regtime}</th> <th align="center" width="15%">{_lang_posts}</th> <th align="center" width="5%">{_lang_land}</th> </tr> {EXPLODE} <tr class="{CLASS7}"> <td><a href="index.php?user-details-{UID7}">{AVATAR7}</a></td> <td><a href="index.php?user-details-{UID7}">{NAME7}</a> {GA7}</td> <td align="center"><font style="font-size: 10px">{RANG7}</font></td> <td align="center">{GRUPE7}</td> <td align="center" width="20%"><a href="index.php?forum-privmsg-new=0&empfid={UID7}"><img src="include/images/icons/email_small.png" border="0"></a></td> <td align="center">{LLOGIN7}</td> <td align="center">{DATE7}</td> <td align="center">{POSTS7}</td> <th align="center"><img src="include/images/flags/{STAAT7}" alt="" border="0"></th> </tr>{EXPLODE} </table></td></tr> <tr><td><br><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="Cmember">{GRUPP6}</td> </tr> </table></td></tr> <tr><td><table width="100%" border="0" cellpadding="3" cellspacing="1" class="border"> <tr class="Chead" > <th height="100" width="80px">{_lang_avatar}</th> <th align="center" height="30" width="30%">{_lang_name}</th> <th align="center" width="20%">{_lang_clan}</th> <th align="center" width="20%">{_lang_group}</th> <th align="center" width="5%">{_lang_contact}</th> <th align="center" width="30%">{_lang_lasttimeonline}</th> <th align="center" width="15%">{_lang_regtime}</th> <th align="center" width="15%">{_lang_posts}</th> <th align="center" width="5%">{_lang_land}</th> </tr> {EXPLODE} <tr class="{CLASS6}"> <td><a href="index.php?user-details-{UID6}">{AVATAR6}</a></td> <td><a href="index.php?user-details-{UID6}">{NAME6}</a> {GA6}</td> <td align="center"><font style="font-size: 10px">{RANG6}</font></td> <td align="center">{GRUPE6}</td> <td align="center" width="20%"><a href="index.php?forum-privmsg-new=0&empfid={UID6}"><img src="include/images/icons/email_small.png" border="0"></a></td> <td align="center">{LLOGIN6}</td> <td align="center">{DATE6}</td> <td align="center">{POSTS6}</td> <th align="center"><img src="include/images/flags/{STAAT6}" alt="" border="0"></th> </tr>{EXPLODE} </table></td></tr> <tr><td><br><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="Cmember">{GRUPP5}</td> </tr> </table></td></tr> <tr><td><table width="100%" border="0" cellpadding="3" cellspacing="1" class="border"> <tr class="Chead" > <th height="100" width="80px">{_lang_avatar}</th> <th align="center" height="30" width="30%">{_lang_name}</th> <th align="center" width="20%">{_lang_clan}</th> <th align="center" width="20%">{_lang_group}</th> <th align="center" width="5%">{_lang_contact}</th> <th align="center" width="30%">{_lang_lasttimeonline}</th> <th align="center" width="15%">{_lang_regtime}</th> <th align="center" width="15%">{_lang_posts}</th> <th align="center" width="5%">{_lang_land}</th> </tr> {EXPLODE} <tr class="{CLASS5}"> <td><a href="index.php?user-details-{UID5}">{AVATAR5}</a></td> <td><a href="index.php?user-details-{UID5}">{NAME5}</a> {GA5}</td> <td align="center"><font style="font-size: 10px">{RANG5}</font></td> <td align="center">{GRUPE5}</td> <td align="center" width="20%"><a href="index.php?forum-privmsg-new=0&empfid={UID5}"><img src="include/images/icons/email_small.png" border="0"></a></td> <td align="center">{LLOGIN5}</td> <td align="center">{DATE5}</td> <td align="center">{POSTS5}</td> <th align="center"><img src="include/images/flags/{STAAT5}" alt="" border="0"></th> </tr>{EXPLODE} </table></td></tr> <tr><td><br><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="Cmember">{GRUPP4}</td> </tr> </table></td></tr> <tr><td><table width="100%" border="0" cellpadding="3" cellspacing="1" class="border"> <tr class="Chead" > <th height="100" width="80px">{_lang_avatar}</th> <th align="center" height="30" width="30%">{_lang_name}</th> <th align="center" width="20%">{_lang_clan}</th> <th align="center" width="20%">{_lang_group}</th> <th align="center" width="5%">{_lang_contact}</th> <th align="center" width="30%">{_lang_lasttimeonline}</th> <th align="center" width="15%">{_lang_regtime}</th> <th align="center" width="15%">{_lang_posts}</th> <th align="center" width="5%">{_lang_land}</th> </tr> {EXPLODE} <tr class="{CLASS4}"> <td><a href="index.php?user-details-{UID4}">{AVATAR4}</a></td> <td><a href="index.php?user-details-{UID4}">{NAME4}</a> {GA4}</td> <td align="center"><font style="font-size: 10px">{RANG4}</font></td> <td align="center">{GRUPE4}</td> <td align="center" width="20%"><a href="index.php?forum-privmsg-new=0&empfid={UID4}"><img src="include/images/icons/email_small.png" border="0"></a></td> <td align="center">{LLOGIN4}</td> <td align="center">{DATE4}</td> <td align="center">{POSTS4}</td> <th align="center"><img src="include/images/flags/{STAAT4}" alt="" border="0"></th> </tr>{EXPLODE} </table></td></tr> <tr><td><br><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="Cmember">{GRUPP3}</td> </tr> </table></td></tr> <tr><td><table width="100%" border="0" cellpadding="3" cellspacing="1" class="border"> <tr class="Chead" > <th height="100" width="80px">{_lang_avatar}</th> <th align="center" height="30" width="30%">{_lang_name}</th> <th align="center" width="20%">{_lang_clan}</th> <th align="center" width="20%">{_lang_group}</th> <th align="center" width="5%">{_lang_contact}</th> <th align="center" width="30%">{_lang_lasttimeonline}</th> <th align="center" width="15%">{_lang_regtime}</th> <th align="center" width="15%">{_lang_posts}</th> <th align="center" width="5%">{_lang_land}</th> </tr> {EXPLODE} <tr class="{CLASS3}"> <td><a href="index.php?user-details-{UID3}">{AVATAR3}</a></td> <td><a href="index.php?user-details-{UID3}">{NAME3}</a> {GA3}</td> <td align="center"><font style="font-size: 10px">{RANG3}</font></td> <td align="center">{GRUPE3}</td> <td align="center" width="20%"><a href="index.php?forum-privmsg-new=0&empfid={UID3}"><img src="include/images/icons/email_small.png" border="0"></a></td> <td align="center">{LLOGIN3}</td> <td align="center">{DATE3}</td> <td align="center">{POSTS3}</td> <th align="center"><img src="include/images/flags/{STAAT3}" alt="" border="0"></th> </tr>{EXPLODE} </table></td></tr> <tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="Cmember">{GRUPP2}</td> </tr> </table></td></tr> <tr><td><table width="100%" border="0" cellpadding="3" cellspacing="1" class="border"> <tr class="Chead" > <th height="100" width="80px">{_lang_avatar}</th> <th align="center" height="30" width="30%">{_lang_name}</th> <th align="center" width="20%">{_lang_clan}</th> <th align="center" width="20%">{_lang_group}</th> <th align="center" width="5%">{_lang_contact}</th> <th align="center" width="30%">{_lang_lasttimeonline}</th> <th align="center" width="15%">{_lang_regtime}</th> <th align="center" width="15%">{_lang_posts}</th> <th align="center" width="5%">{_lang_land}</th> </tr> {EXPLODE} <tr class="{CLASS2}"> <td><a href="index.php?user-details-{UID2}">{AVATAR2}</a></td> <td><a href="index.php?user-details-{UID2}">{NAME2}</a> {GA2}</td> <td align="center"><font style="font-size: 10px">{RANG2}</font></td> <td align="center">{GRUPE2}</td> <td align="center" width="20%"><a href="index.php?forum-privmsg-new=0&empfid={UID2}"><img src="include/images/icons/email_small.png" border="0"></a></td> <td align="center">{LLOGIN2}</td> <td align="center">{DATE2}</td> <td align="center">{POSTS2}</td> <th align="center"><img src="include/images/flags/{STAAT2}" alt="" border="0"></th> </tr> {EXPLODE} </table></td></tr> </table> <br /> <div align="center">{SITELINK}</div>
<?php # Copyright by: David Schwarz # Support: www.baduncles.game-host.org # Code Edit by: Rolf Berleth defined ('main') or die ( 'no direct access' ); $title = $allgAr['title'].' :: User :: '.$lang['listofmembers']; $hmenu = 'User <b> » </b> '.$lang['listofmembers']; $design = new design ( $title , $hmenu); $design->header(); // Funktionen der Memblist einbinden require_once('include/includes/func/membListFunctions.php'); $limit = 100; // Limit $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); $erg = db_query("SELECT id,name FROM prefix_grundrechte WHERE id < -1 ORDER BY id ASC"); while ($row = db_fetch_object($erg)){ $grundRechtBild= get_membListPicExt('include/images/rangs/',$row->name,$row->name); $grundRechtBildOut=($grundRechtBild != $row->name?'<img src="'.$grundRechtBild.'">':$grundRechtBild); $class == 'Cmite'; $userErg = db_query("SELECT posts, staat, email, llogin, id, regist, name, geschlecht, avatar, gebdatum FROM prefix_user WHERE recht = ".$row->id." ORDER by recht,regist,posts DESC LIMIT ".$anfang.",".$limit); if(db_num_rows($userErg)==0) continue; $tpl->set_out('GRUNDRECHT',$grundRechtBildOut,1); while ($userRow = db_fetch_object($userErg)) { $userAr = array('NAME' => $userRow->name, 'RANG' => userrang($userRow->posts,$userRow->id), 'CLASS' => ($class=='Cmite'?'Cnorm':'Cmite'), 'POSTS' => $userRow->posts, 'UID' => $userRow->id, 'DATE' => date('d.m.Y',$userRow->regist), 'GA' => ($userRow->gebdatum != 0000-00-00?($userRow->geschlecht == 0?get_membListAge($userRow->gebdatum):' - '.get_membListAge($userRow->gebdatum)):''), 'GRUPE' => $row->name, 'AVATAR' => get_membListAvatar($userRow->avatar,$userRow->geschlecht), 'STAAT' => $userRow->staat, 'EMAIL' => $userRow->email, 'LLOGIN' => date('d.m.Y <b\r> H:i',$userRow->llogin).' Uhr' ); $tpl->set_ar_out($userAr,2); } $tpl->out(3); } $tpl->out(4); $design->footer(); ?>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="border"> {EXPLODE} <tr> <td> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="Cmember">{GRUNDRECHT}</td> </tr> </table> </td> </tr><tr> <td> <table width="100%" border="0" cellpadding="3" cellspacing="1" class="border"> <tr class="Chead" > <th height="100" width="80px">{_lang_avatar}</th> <th align="center" height="30" width="30%">{_lang_name}</th> <th align="center" width="20%">{_lang_clan}</th> <th align="center" width="20%">{_lang_group}</th> <th align="center" width="5%">{_lang_contact}</th> <th align="center" width="30%">{_lang_lasttimeonline}</th> <th align="center" width="15%">{_lang_regtime}</th> <th align="center" width="15%">{_lang_posts}</th> <th align="center" width="5%">{_lang_land}</th> </tr> {EXPLODE} <tr class="{CLASS}"> <td><a href="index.php?user-details-{UID}">{AVATAR}</a></td> <td><a href="index.php?user-details-{UID}">{NAME}</a> {GA}</td> <td align="center"><font style="font-size: 10px">{RANG}</font></td> <td align="center">{GRUPE}</td> <td align="center" width="20%"><a href="index.php?forum-privmsg-new=0&empfid={UID}"><img src="include/images/icons/email_small.png" border="0"></a></td> <td align="center">{LLOGIN}</td> <td align="center">{DATE}</td> <td align="center">{POSTS}</td> <th align="center"><img src="include/images/flags/{STAAT}" alt="" border="0"></th> </tr> {EXPLODE} </table> </td> </tr> {EXPLODE} </table> <br /> <div align="center">{SITELINK}</div>
<?php # Copyright by: David Schwarz # Support: www.baduncles.game-host.org # Code Edit by: Rolf Berleth defined ('main') or die ( 'no direct access' ); function get_membListPicExt ($pfad, $fileName, $defaultReturn='') { $fileExt=''; $returnValue=''; if (file_exists($pfad.$fileName.'.gif')) { $fileExt='.gif'; } elseif (file_exists($pfad.$fileName.'.jpg')) { $fileExt='.jpg'; } elseif (file_exists($pfad.$fileName.'.jpeg')) { $fileExt='.jpeg'; } elseif (file_exists($pfad.$fileName.'.png')) { $fileExt='.png'; } else { $fileExt=''; } $returnValue=(empty($fileExt)?$defaultReturn:$pfad.$fileName.$fileExt); return ($returnValue); } function get_membListGender ($gender) { $genderReturn=''; switch ($gender) { case 1: $genderReturn='maennlich'; break; case 2: $genderReturn='weiblich'; break; default: $genderReturn='wurstegal'; break; } return ($genderReturn); } function get_membListAvatar($avatar,$gender) { if ( file_exists($avatar)) { $avatar = '<img src="'.$avatar.'" width="80px" height="80px" border="0">'; }else{ $genderName= get_membListGender($gender); $defaultImage= get_membListPicExt('include/images/avatars/',$genderName,'include/images/avatars/wurstegal.jpg'); $avatar = '<img src="'.$defaultImage.'" width="80px" height="80px" border="0">'; } return($avatar); } function get_membListAge($age) { $ageOut=''; if($age != 0000-00-00){ $ageArray=explode("-",$age); $ageOut=date('Y') - $ageArray[0]; // 1.Schritt if (date('m') < $ageArray[1]){ $ageOut--; } // 2. Schritt if (date('m') == $ageArray[1] AND date(d) < $ageArray[2]){ $ageOut--; } // 3. Schritt } else { $ageOut=''; } return $ageOut; } ?>
Parse error: syntax error, unexpected T_VARIABLE in /webs/4/1/13/10/13114/web1/main/include/contents/user/memb_list.php on line 31
<?php # Copyright by: David Schwarz # Support: www.baduncles.game-host.org # Code Edit by: Rolf Berleth defined ('main') or die ( 'no direct access' ); $title = $allgAr['title'].' :: User :: '.$lang['listofmembers']; $hmenu = 'User <b> » </b> '.$lang['listofmembers']; $design = new design ( $title , $hmenu); $design->header(); // Funktionen der Memblist einbinden require_once('include/includes/func/membListFunctions.php'); $tpl = new tpl ( 'user/memb_list.htm' ); if ($menu->get(1) == 'show') { $limit = 100; // Limit $page = ($menu->getA(1) == 'p' ? $menu->getE(1) : 1 ); $MPL = db_make_sites ($page , "" , $limit , '?user' , 'user' ); $anfang = ($page - 1) * $limit; $tpl->set_out ( 'SITELINK', $MPL, 1); $gid = escape($menu->get(2), 'integer'); $erg = db_query("SELECT id,name FROM prefix_grundrechte WHERE id < -1 ORDER BY id ASC"); while ($row = db_fetch_object($erg)){ $grundRechtBild= get_membListPicExt('include/images/rangs/',$row->name,$row->name); $grundRechtBildOut=($grundRechtBild != $row->name?'<img src="'.$grundRechtBild.'">':$grundRechtBild); $class == 'Cmite'; $userErg = db_query("SELECT a.posts, a.staat, a.email, a.llogin, a.id, a.regist, a.name, a.geschlecht, a.avatar, a.gebdatum FROM prefix_user as a LEFT JOIN prefix_groupusers as b ON a.id = b.uid WHERE a.recht = ".$row->id." AND b.gid = ".$gid." ORDER by a.recht,a.regist,a.posts DESC LIMIT ".$anfang.",".$limit); if(db_num_rows($userErg)==0) continue; $tpl->set_out('GRUNDRECHT',$grundRechtBildOut,2); while ($userRow = db_fetch_object($userErg)) { $userAr = array('NAME' => $userRow->name, 'RANG' => userrang($userRow->posts,$userRow->id), 'CLASS' => ($class=='Cmite'?'Cnorm':'Cmite'), 'POSTS' => $userRow->posts, 'UID' => $userRow->id, 'DATE' => date('d.m.Y',$userRow->regist), 'GA' => ($userRow->gebdatum != 0000-00-00?($userRow->geschlecht == 0?get_membListAge($userRow->gebdatum):' - '.get_membListAge($userRow->gebdatum)):''), 'GRUPE' => $row->name, 'AVATAR' => get_membListAvatar($userRow->avatar,$userRow->geschlecht), 'STAAT' => $userRow->staat, 'EMAIL' => $userRow->email, 'LLOGIN' => date('d.m.Y <b\r> H:i',$userRow->llogin).' Uhr' ); $tpl->set_ar_out($userAr,3); } $tpl->out(4); } $tpl->out(5); } else { $erg1 = db_query("SELECT name,img,id as gid FROM prefix_groups WHERE zeigen = 0 AND show_memblist = 1 ORDER BY pos"); while ($row = db_fetch_assoc($erg1) ) { if (!empty($row['img']) ) { $row['show'] = '<a href="index.php?user-show-'.$row['gid'].'"><img src="'.$row['img'].'" title="'.$row['name'].'" alt="'.$row['name'].'" border="0"></a>'; } else { $row['show'] = '<a href="index.php?user-show-'.$row['gid'].'"><b>'.$row['name'].'</b></a>'; } $tpl->set_ar_out($row,0); } } $design->footer(); ?>
<table width="100%" cellpadding="3" border="0" cellspacing="1" class="border"> <tr class="Cdark"> <td colspan="6" valign="bottom" align="center">{show}</td> </tr> </table> {EXPLODE} <table width="100%" border="0" cellpadding="3" cellspacing="1" class="border"> {EXPLODE} <tr> <td> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="Cmember">{GRUNDRECHT}</td> </tr> </table> </td> </tr><tr> <td> <table width="100%" border="0" cellpadding="3" cellspacing="1" class="border"> <tr class="Chead" > <th height="100" width="80px">{_lang_avatar}</th> <th align="center" height="30" width="30%">{_lang_name}</th> <th align="center" width="20%">{_lang_clan}</th> <th align="center" width="20%">{_lang_group}</th> <th align="center" width="5%">{_lang_contact}</th> <th align="center" width="30%">{_lang_lasttimeonline}</th> <th align="center" width="15%">{_lang_regtime}</th> <th align="center" width="15%">{_lang_posts}</th> <th align="center" width="5%">{_lang_land}</th> </tr> {EXPLODE} <tr class="{CLASS}"> <td><a href="index.php?user-details-{UID}">{AVATAR}</a></td> <td><a href="index.php?user-details-{UID}">{NAME}</a> {GA}</td> <td align="center"><font style="font-size: 10px">{RANG}</font></td> <td align="center">{GRUPE}</td> <td align="center" width="20%"><a href="index.php?forum-privmsg-new=0&empfid={UID}"><img src="include/images/icons/email_small.png" border="0"></a></td> <td align="center">{LLOGIN}</td> <td align="center">{DATE}</td> <td align="center">{POSTS}</td> <th align="center"><img src="include/images/flags/{STAAT}" alt="" border="0"></th> </tr> {EXPLODE} </table> </td> </tr> {EXPLODE} </table> <br /> <div align="center">{SITELINK}</div>
ALTER TABLE `ic1_groups` ADD `show_memblist` tinyint(1) NOT NULL default '0'
<?php # Copyright by: Manuel # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); defined ('admin') or die ( 'only admin access' ); function groups_update_modulerights_for ($ar) { $re = array ( 0 => array ('wars', 'groups', 'awards', 'awaycal'), 1 => array ('wars', 'groups', 'awards', 'awaycal'), 2 => array ('wars', 'awaycal'), 3 => array ('groups', 'awaycal'), ); foreach ($ar as $k => $uid) { if (0 == $uid) { continue; } foreach ($re[$k] as $r) { $s = "SELECT id FROM prefix_modules WHERE url = '".$r."'"; $mid = db_result(db_query($s),0,0); $s = "SELECT COUNT(*) FROM prefix_modulerights WHERE uid = ".$uid." AND mid = ".$mid; if (0 == db_result(db_query($s),0,0)) { db_query("INSERT INTO prefix_modulerights (mid,uid) VALUES (".$mid.",".$uid.")"); } } } } function may_changegroup ($gi,$m = 0) { global $allgAr; if ($_SESSION['authright'] <= -8 OR !$allgAr['groups_forall']) { return true; } elseif ($gi == 0) { return false; } else { $q = db_query("SELECT mod1, mod2".($m == 1?', mod4':'')." FROM `prefix_groups` WHERE id = $gi"); if (db_num_rows($q) < 1) { return false; } else { $r = db_fetch_assoc($q); if (in_array($_SESSION['authid'],$r)) { return true; } else { return false; } } } } $show = true; $msg = ''; $um = $menu->get(1); if ( $um == 'ins' ) { $pos = db_result(db_query("SELECT COUNT(*) FROM prefix_groups"),0); $name = escape($_POST['group_name'], 'string'); $img = escape($_POST['img'], 'string'); $mod1 = escape($_POST['mod1'], 'integer'); $mod2 = escape($_POST['mod2'], 'integer'); $mod3 = escape($_POST['mod3'], 'integer'); $mod4 = escape($_POST['mod4'], 'integer'); $zeigen = escape($_POST['zeigen'], 'integer'); $fightus = escape($_POST['fightus'], 'integer'); $joinus = escape($_POST['joinus'], 'integer'); $memblist = escape($_POST['memblist'], 'integer'); if (may_changegroup(0)) { db_query("INSERT INTO prefix_groups (name,img,`mod1`,`mod2`,`mod3`,`mod4`,show_fightus,show_joinus,zeigen,pos,show_memblist) VALUES ('".$name."','".$img."',".$mod1.",".$mod2.",".$mod3.",".$mod4.",".$fightus.",".$joinus.",".$zeigen.",".$pos.",".$memblist.")"); } if (is_coadmin()) { groups_update_modulerights_for (array($mod1,$mod2,$mod3,$mod4)); } } if ( isset ( $_POST['ins_user'] ) ) { $gid = escape($menu->get(2), 'integer'); if (may_changegroup($gid,1)) { if ( empty($_POST['fid']) ) { $_POST['fid'] = 0; } $fid = 0; if (!empty($_POST['fid'])) { $fid = escape($_POST['fid'], 'integer'); } $name = escape($_POST['name'], 'string'); $uid = @db_result(@db_query("SELECT id FROM prefix_user where name = BINARY '".$name."'"),0,0); if (!empty($uid) AND 0 == db_result(db_query("SELECT COUNT(*) FROM prefix_groupusers WHERE gid = ".$gid." AND uid = ".$uid),0)) { db_query("INSERT INTO prefix_groupusers (gid,uid,fid) VALUES (".$gid.",".$uid.",".$fid.")"); } } $um = 'addusers'; } if ( $um == 'ch' ) { $gid = escape($_POST['gid'], 'integer'); $oldopts = db_fetch_object(db_query("SELECT * FROM `prefix_groups` WHERE id = $gid")); $name = escape($_POST['group_name'], 'string'); $img = escape($_POST['img'], 'string'); $mod1 = escape($_POST['mod1'], 'integer'); $mod2 = escape($_POST['mod2'], 'integer'); $mod3 = escape($_POST['mod3'], 'integer'); $mod4 = escape($_POST['mod4'], 'integer'); $zeigen = escape($_POST['zeigen'], 'integer'); $fightus = escape($_POST['fightus'], 'integer'); $joinus = escape($_POST['joinus'], 'integer'); $memblist = escape($_POST['memblist'], 'integer'); if (!is_admin() and $oldopts->mod1 != $_SESSION['authid'] and $oldopts->mod2 == $_SESSION['authid']) { $mod1 = $oldopts->mod1; } elseif (!is_admin() and $oldopts->mod1 != $_SESSION['authid'] and $oldopts->mod2 != $_SESSION['authid'] and $oldopts->mod4 == $_SESSION['authid']) { $name = $oldopts->name; $img = $oldopts->img; $mod1 = $oldopts->mod1; $mod2 = $oldopts->mod2; $mod3 = $oldopts->mod3; $zeigen = $oldopts->zeigen; $fightus = $oldopts->show_fightus; $memblist = $oldopts->show_memblist; } if (may_changegroup($gid,1)) { db_query("UPDATE prefix_groups SET name = '".$name."', show_fightus = ".$fightus.", show_joinus = ".$joinus.", img = '".$img."', `mod1` = ".$mod1.", `mod2` = ".$mod2.", `mod3` = ".$mod3.", `mod4` = ".$mod4.", zeigen = ".$zeigen.", show_memblist = ".$memblist." WHERE id = ".$gid); $msg = "Die Gruppe wurde verändert"; } if (is_coadmin()) { # mods wieder die richtigen modulrechte geben. dazu erst loeschen, dann eintragen. groups_update_modulerights_for (array($mod1,$mod2,$mod3,$mod4)); $msg .= ", die Modulrechte wurden erneuert. Wenn allerdings Leader, Co-Leader, Warorga oder Memberorga geändert wurden haben diese User immer noch die Modulrechte ... das sollte daher überprüft werden."; } } if (isset ($_GET['group_delete']) AND ($gid = escape($_GET['group_delete'],'integer') AND may_changegroup(0))) { $pos = db_result(db_query("SELECT pos FROM prefix_groups WHERE id = ".$gid),0); db_query("DELETE FROM prefix_groups WHERE id = ".$gid); db_query("DELETE FROM prefix_groupusers WHERE gid = ".$gid); db_query("UPDATE prefix_groups SET pos = pos -1 WHERE pos > ".$pos); } if ( $menu->get(3) == 'user_delete' AND ($gid = escape($menu->get(2),'integer') AND may_changegroup($gid,1))) { $uid = escape($menu->get(4),'integer'); db_query("DELETE FROM prefix_groupusers WHERE gid = ".$gid." AND uid = ".$uid); } if ( $menu->get(3) == 'userchange' AND ($gid = escape($menu->get(2),'integer') AND may_changegroup($gid,1))) { $uid = escape($menu->get(4), 'integer'); $fid = escape($menu->get(5), 'integer'); db_query("UPDATE `prefix_groupusers` SET fid = $fid WHERE gid = $gid AND uid = $uid"); } if ( $um == 'addusers' ) { $design = new design ( 'Admins Area', 'Admins Area', 0 ); $design->header(); $gid = $menu->get(2); $tpl = new tpl ( 'groups/users', 1); $groupfuncs = array(); $erg = db_query("SELECT id,name FROM prefix_groupfuncs ORDER BY pos"); while ($row = db_fetch_object($erg)) { $groupfuncs[$row->id] = $row->name; } function group_func ($gid, $uid, $fid, $gf) { $out = '<select id="user'.$uid.'" onchange="change_user('.$gid.', '.$uid.', this.value, '.$fid.', \'user'.$uid.'\');">'; foreach ($gf as $key => $val) { $out .= '<option value="'.$key.'" '.($fid == $key ? 'selected="selected"' : '').'>'.$val.'</option>'; } $out .= '</select>'; return $out; } $row1 = db_fetch_object(db_query("SELECT name FROM prefix_groups WHERE id = ".$gid)); $tpl->set('gruppe', $row1->name); $tpl->set('fehler', ( empty($fehler) ? '' : $fehler ) ); $tpl->set('gid', $gid); $tpl->set('funcs', dbliste ( '', $tpl, 'funcs', "SELECT id,name FROM prefix_groupfuncs ORDER BY pos") ); $tpl->out(0); $class = 'Cnorm'; $q = "SELECT a.fid, a.gid, a.uid, b.name as username, c.name as funcname FROM prefix_groupusers a LEFT JOIN prefix_user b ON a.uid = b.id LEFT JOIN prefix_groupfuncs c ON a.fid = c.id WHERE a.gid = ".$gid." ORDER BY c.pos"; $erg = db_query($q); while($row = db_fetch_assoc($erg) ) { $class = ($class == 'Cnorm' ? 'Cmite' : 'Cnorm' ); $row['funcname'] = group_func($gid, $row['uid'], $row['fid'], $groupfuncs); $row['class'] = $class; $tpl->set_ar_out($row,1); } $tpl->out(2); $show = false; } if ($menu->get(1) == 'move' AND may_changegroup(0)) { $id = escape($menu->getE(2), 'integer'); $pos = db_result(db_query("SELECT pos FROM prefix_groups WHERE id = ".$id),0); $anz = db_result(db_query("SELECT COUNT(*) FROM prefix_groups"),0); if ($menu->getA(2) == 'u') { $npos = $pos + 1; } elseif ($menu->getA(2) == 'o') { $npos = $pos - 1; } if ($npos < 0) { db_query("UPDATE prefix_groups SET pos = ".$anz." WHERE id = ".$id); db_query("UPDATE prefix_groups SET pos = pos -1"); } if ($npos >= $anz) { db_query("UPDATE prefix_groups SET pos = -1 WHERE id = ".$id); db_query("UPDATE prefix_groups SET pos = pos +1"); } if ($npos>=0 AND $npos < $anz) { db_query("UPDATE prefix_groups SET pos = ".$pos." WHERE pos = ".$npos); db_query("UPDATE prefix_groups SET pos = ".$npos." WHERE id = ".$id); } } if ($um == 'funcs') { $design = new design ( 'Admins Area', 'Admins Area', 0 ); $design->header(); if (isset($_POST['s']) AND $_POST['s'] == 'Add') { $pos = escape($_POST['apos'], 'integer'); $name = escape($_POST['aname'], 'string'); db_query("INSERT INTO prefix_groupfuncs (pos,name) VALUES (".$pos.", '".$name."')"); } elseif (isset($_POST['s']) AND $_POST['s'] == 'Send') { $erg = db_query('SELECT * FROM `prefix_groupfuncs` ORDER BY pos'); while ($row = db_fetch_assoc($erg) ) { if ((!empty($_POST['pos'][$row['id']]) AND !empty($_POST['name'][$row['id']])) AND $_POST['pos'][$row['id']] != $row['pos'] OR $_POST['name'][$row['id']] != $row['name']) { $pos = escape($_POST['pos'][$row['id']], 'integer'); $name = escape($_POST['name'][$row['id']], 'string'); db_query("UPDATE prefix_groupfuncs SET pos = ".$pos.", name = '".$name."' WHERE id = ".$row['id']); } } } if ($menu->getA(2) == 'd' AND is_numeric($menu->getE(2))) { $id = escape($menu->getE(2), 'integer'); db_query("DELETE FROM prefix_groupfuncs WHERE id = ".$id); } $tpl = new tpl ( 'groups/funcs', 1); $tpl->out(0); $class = ''; $erg = db_query('SELECT * FROM `prefix_groupfuncs` ORDER BY pos'); while ($row = db_fetch_assoc($erg) ) { $class = ($class == 'Cmite' ? 'Cnorm' : 'Cmite' ); $row['class'] = $class; $tpl->set_ar_out($row,1); } $tpl->out(2); $show = false; } if ($um == 'joinus') { $design = new design ( 'Admins Area', 'Admins Area', 2 ); $design->header(); # als trial aufnehmen if ($menu->getA(2) == 'a' AND is_numeric($menu->getE(2)) AND $menu->getE(2) <> 0) { $check = escape($menu->get(3), 'string'); $id = escape($menu->getE(2), 'integer'); if ($menu->get(4) == 'addtoteam') { $gid = db_count_query("SELECT groupid FROM `prefix_usercheck` WHERE `check` = '$check'"); db_query("INSERT INTO `prefix_groupusers` (gid,uid,fid) VALUES ($gid,$id,4)"); $msg = 'Er wurde als Trial in das Team eingetragen.'; } else { $msg = 'Jetzt muss er noch in ein Team aufgenommen werden.'; } db_query("DELETE FROM prefix_usercheck WHERE ak = 4 AND `check` = '".$check."'"); db_query("UPDATE prefix_user SET recht = -3 WHERE id = ".$id." AND recht > -3"); sendpm ($_SESSION['authid'], $id, 'Deine Joinus Anfrage', 'Du wurdest als Trial-Member aufgenommen.'); $msg = 'erfolgreich als Trial markiert, der User wurde darueber informiert. '.$msg; } # aus check tabelle loeschen (nicht aufnehmen) if ($menu->getA(2) == 'd' AND is_numeric($menu->getE(2))) { $check = escape($menu->get(3), 'string'); $id = escape($menu->getE(2), 'integer'); db_query("DELETE FROM prefix_usercheck WHERE ak = 4 AND `check` = '".$check."'"); if ($id <> 0) { sendpm ($_SESSION['authid'], $id, 'Deine Joinus Anfrage', 'Deine Joinus Anfrage wurde leider abgelehnt'); } $msg = 'erfolgreich gelöscht ..., wenn er schon registriert war wurde ihm eine Nachricht geschickt.'; } $tpl = new tpl ( 'groups/joinus', 1); $tpl->set('msg',(empty($msg)?'':'<table width="50%" cellpadding="2" cellspacing="1" border="0" class="border"><tr><td class="Cnorm"><b>Nachricht:</b> '.$msg.'</td></tr></table>')); $tpl->out(0); if ($_SESSION['authright'] <= -8 OR $allgAr['groups_forall'] == 0) { $where = ''; } else { $where = " AND prefix_usercheck.groupid IN (SELECT id FROM `prefix_groups` WHERE mod1 = {$_SESSION['authid']} OR mod2 = {$_SESSION['authid']} OR mod4 = {$_SESSION['authid']})"; } $class = 'Cnorm'; $erg = db_query("SELECT `check`, prefix_usercheck.name, prefix_user.id, prefix_user.email, prefix_groups.name as groupname FROM prefix_usercheck LEFT JOIN prefix_user ON prefix_user.name = BINARY prefix_usercheck.name LEFT JOIN prefix_groups ON prefix_groups.id = prefix_usercheck.groupid WHERE ak = 4".$where); while ($r = db_fetch_assoc($erg)) { if ($r['id'] < 1) { $r['email'] = db_count_query("SELECT email FROM `prefix_usercheck` WHERE name = '{$r['name']}' AND ak"); } $class = ($class == 'Cnorm' ? 'Cmite' : 'Cnorm' ); $r['class'] = $class; $r['status'] = (empty($r['id'])?'Registrierung noch nicht abgeschlossen' : 'bereits Registriert'); if (empty($r['id'])) { $r['id'] = 0; } $tpl->set_ar_out($r,1); } $tpl->out(2); $show = false; } if ( $show ) { $design = new design ( 'Admins Area', 'Admins Area', 2 ); $design->header(); $tpl = new tpl ( 'groups/groups', 1); if ( $um == 'edit' ) { $ar = db_fetch_assoc(db_query("SELECT id as gid, name, img, `mod1`, `mod2`, `mod3`, `mod4`, zeigen, show_joinus, show_fightus FROM prefix_groups WHERE id = ".$menu->get(2) )); $ar['ak'] = 'ch'; $ar['zeigenja'] = ( $ar['zeigen'] == 1 ? 'checked' : '' ); $ar['zeigenno'] = ( $ar['zeigen'] == 1 ? '' : 'checked' ); $ar['joinusja'] = ( $ar['show_joinus'] == 1 ? 'checked' : '' ); $ar['joinusno'] = ( $ar['show_joinus'] == 1 ? '' : 'checked' ); $ar['fightusja'] = ( $ar['show_fightus'] == 1 ? 'checked' : '' ); $ar['fightusno'] = ( $ar['show_fightus'] == 1 ? '' : 'checked' ); $ar['memblistja'] = ( $ar['show_memblist'] == 1 ? 'checked' : '' ); $ar['memblistno'] = ( $ar['show_memblist'] == 1 ? '' : 'checked' ); } else { $ar = array ( 'name'=>'','img'=>'','mod1'=>'','mod2'=>'','mod3'=>'', 'mod4'=>'', 'zeigenja'=>'','zeigenno'=>'checked','ak'=>'ins','gid'=>'', 'fightusja'=>'','fightusno'=>'checked','joinusja'=>'','joinusno'=>'checked','memblistja'=>'','memblistno'=>'checked', ); } $ar['mods1'] = dbliste ( $ar['mod1'] , $tpl, 'mods1', "SELECT id,name FROM prefix_user WHERE recht <= -4 ORDER BY name"); $ar['mods2'] = dbliste ( $ar['mod2'] , $tpl, 'mods2', "SELECT id,name FROM prefix_user WHERE recht <= -4 ORDER BY name"); $ar['mods3'] = dbliste ( $ar['mod3'] , $tpl, 'mods3', "SELECT id,name FROM prefix_user WHERE recht <= -4 ORDER BY name"); $ar['mods4'] = dbliste ( $ar['mod4'] , $tpl, 'mods4', "SELECT id,name FROM prefix_user WHERE recht <= -4 ORDER BY name"); $ar['mods2'] = '<option value="0">keiner</option>'.$ar['mods2']; $ar['mods3'] = '<option value="0">keiner</option>'.$ar['mods3']; $ar['mods4'] = '<option value="0">keiner</option>'.$ar['mods4']; $ar['pic'] = arlistee( $ar['img'], get_teampic_ar() ); $ar['pic'] = '<option value="0">kein Bild<option>'.$ar['pic']; $ar['msg'] = (empty($msg)?'':'<table width="50%" cellpadding="2" cellspacing="1" border="0" class="border"><tr><td class="Cnorm"><b>Nachricht:</b> '.$msg.'</td></tr></table>'); $ar['joinu'] = ''; if (0 < db_result(db_query("SELECT COUNT(*) FROM prefix_usercheck WHERE ak = 4"),0)) { $ar['joinu'] = '<a href="admin.php?groups-joinus"><b>Joinus Anfragen bearbeiten</b></a><br /><br />'; } $tpl->set_ar_out($ar,0); $class = 'Cnorm'; $erg = db_query("SELECT name,id FROM prefix_groups ORDER BY pos ASC"); while($row = db_fetch_assoc($erg) ) { $row['useranz'] = db_count_query("SELECT COUNT(uid) FROM prefix_groupusers WHERE gid = ".$row['id']); $class = ($class == 'Cnorm' ? 'Cmite' : 'Cnorm' ); $row['class'] = $class; $tpl->set_ar_out($row,1); } $tpl->out(2); if ($allgAr['groups_forall'] AND $_SESSION['authright'] > -8) { $tpl->out(3); } $tpl->out(4); } $design->footer(); ?>
<script language="JavaScript" type="text/javascript"> <!-- function change_group ( gid ) { var x = prompt ( "Bitte den neuen Namen der Gruppe eingeben", "" ); if ( x ) { document.location.href="?groups&group_change="+gid+"&group_name="+x; } } function delete_group ( gid ) { var x = confirm ( "Wollen Sie diese Gruppe löschen?", "" ); if ( x ) { document.location.href="admin.php?groups&group_delete="+gid; } } function manageUser (GID) { var Fenster = window.open ('admin.php?groups-addusers-'+ GID, 'adduser', 'status=no,scrollbars=yes,height=400,width=500'); Fenster.focus(); } //--> </script> <table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/teams.png" /></td><td width="30"></td><td valign="bottom"><h1>Groups</h1></td></tr></table> {msg} <table width="100%"><tr><td valign="top" width="50%"> <tr> <td> <form action="admin.php?groups-{ak}" method="POST"> <input type="hidden" name="gid" value="{gid}" /> <table cellpadding="3" cellspacing="1" border="0" class="border"> <tr class="Chead"> <td colspan="2"><b>Gruppe</b></td> </tr><tr> <td class="Cmite">Name</td> <td class="Cnorm"><input type="text" name="group_name" value="{name}" /></td> </tr><tr> <td class="Cmite">Bild <font class="smalfont">Einfach ein Bild in den ordner include/images/teams packen und auswählen)</font></td> <td class="Cnorm"><select onchange="sichtbarA()" name="img">{pic}</select></td> </tr><tr> <td class="Cmite">Leader <font class="smalfont">(bekommt automatisch die Modulrechte: (wars, groups, awards, awaycal))</font></td> <td class="Cnorm"><select name="mod1">{_list_mods1@<option%1 value="%2">%3</option>}</select></td> </tr><tr> <td class="Cmite">Co-Leader <font class="smalfont">(bekommt automatisch die Modulrechte: (wars, groups, awards, awaycal))</font></td> <td class="Cnorm"><select name="mod2">{_list_mods2@<option%1 value="%2">%3</option>}</select></td> </tr><tr> <td class="Cmite">Warorga <font class="smalfont">(bekommt automatisch die Modulrechte: (wars, awaycal))</font></td> <td class="Cnorm"><select name="mod3">{_list_mods3@<option%1 value="%2">%3</option>}</select></td> </tr><tr> <td class="Cmite">Memberorga <font class="smalfont">(bekommt automatisch die Modulrechte: (groups, awaycal))</font></td> <td class="Cnorm"><select name="mod4">{_list_mods4@<option%1 value="%2">%3</option>}</select></td> </tr><tr> <td class="Cmite">Joinus <font class="smalfont">(Kann diesem Team beigetreten werden?)</font></td> <td class="Cnorm"><input id="joinusja" type="radio" {joinusja} name="joinus" value="1" /><label for="joinusja"> ja</label>, <input id="joinusno" type="radio" {joinusno} name="joinus" value="0" /><label for="joinusno"> nein</label></td> </tr><tr> <td class="Cmite">Fightus <font class="smalfont">(Darf gegen das Team gespielt werden?)</font></td> <td class="Cnorm"><input id="fightusja" type="radio" {fightusja} name="fightus" value="1" /><label for="fightusja"> ja</label>, <input id="fightusno" type="radio" {fightusno} name="fightus" value="0" /><label for="fightusno"> nein</label></td> </tr><tr> <td class="Cmite">Squads <font class="smalfont">(Soll das Team unter Squads aufgelistet werden?)</font></td> <td class="Cnorm"><input id="zeigenja" type="radio" {zeigenja} name="zeigen" value="1" /><label for="zeigenja"> ja</label>, <input id="zeigenno" type="radio" {zeigenno} name="zeigen" value="0" /><label for="zeigenno"> nein</label></td> </tr><tr> <td class="Cmite">Memberliste <font class="smalfont">(Soll das Team unter Mitglieder aufgelistet werden?)</font></td> <td class="Cnorm"><input id="memblistja" type="radio" {memblistja} name="memblist" value="1" /><label for="memblistja"> ja</label>, <input id="memblistno" type="radio" {memblistno} name="memblist" value="0" /><label for="zeigenno"> nein</label></td> </tr><tr class="Cdark"> <td></td> <td><input type="submit" value="Absenden" name="sub"></td> </tr> </table> </form> </td> <td> </td> <td valign="top" width="50%"> {joinu} <table cellpadding="2" cellspacing="1" border="0" class="border"> <tr class="Chead"> <td colspan="6"><b>Gruppen Übersicht</b></td> </tr> <tr class="Cdark"> <td>Name</td> <td>Users (Anzahl)</td> <td></td> <td></td> <td></td> <td></td> </tr> {EXPLODE} <tr class="{class}"> <td>{name}</td> <td><a href="javascript:manageUser({id})">manage Users</a> ({useranz})</td> <td><a href="?groups-edit-{id}"><img src="include/images/icons/edit.gif" alt="ändern" title="ändern" /></a></td> <td><a href="javascript:delete_group('{id}')"><img src="include/images/icons/del.gif" alt="löschen" title="löschen" /></a></td> <td><a href="?groups-move-o{id}"><img src="include/images/icons/pfeilo.gif" alt="hoch" title="hoch" /></td> <td><a href="?groups-move-u{id}"><img src="include/images/icons/pfeilu.gif" alt="runter" title="runter" /></a></td> </tr> {EXPLODE} </table> </td> </tr> {EXPLODE} <tr><td colspan="3"> <div class="info_box"> <b>ACHTUNG!</b> <br /> <span class="smalfont"> Volle Rechte in diesem Bereich haben nur Admins und Co-Admins, User mit Modulrechten können nur ihre Gruppe betreffende Dinge ändern, wenn du also etwas nicht ändern kannst, wende dich an einen Admin. Achte auch darauf, dir nicht selbst die Rechte für deine Gruppe wegzunehmen, sie können dir nur von einem Admin oder (Co-)Leader der Gruppe wiedergegeben werden.<br /> Gruppen löschen können auch nur Admins und Co-Admins. </span> </div> </td></tr> {EXPLODE} </table>
Geschlossen | ||
Zurück zu Allgemein |