Sorry SeToY,
Lade dir es nochmal runter Jetzt sollte alles Perfekt funzn...
MfG OloX
Zuletzt modifiziert von OloX am 23.07.2008 - 18:10:08
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
<?php # Copyright by: Manuel Staechele # Support: www.ilch.de # Rendom Member Box Scroller # by OloX THX @ Mairu ;) defined ('main') or die ( 'no direct access' ); $limit = $allgAr['rmbox_limit']; $teamid = $allgAr['rmbox_teamid']; $bgcolor = $allgAr['rmbox_bgcolor']; $bodercolor = $allgAr['rmbox_bodercolor']; $width = $allgAr['rmbox_width']; $height = $allgAr['rmbox_height']; echo '<script src="include/includes/js/member_scroller.js" type="text/javascript"></script>'; echo '<style type="text/css"> #marqueecontainer { position: relative; width: '.$width.'; height: '.$height.'; background-color: '.$bgcolor.'; overflow: hidden; border: 1px solid '.$bodercolor.'; padding: 2px; } </style>'; echo '<div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"> <div id="vmarquee" style="position: absolute; width: 98%;">'; if($allgAr['rmbox_teamid'] == 0) { $sql = db_query("SELECT id as userid,name,avatar,staat,gebdatum,wohnort FROM prefix_user WHERE 1 ORDER BY rand() LIMIT $limit"); } else { $sql = db_query("SELECT b.uid as userid,a.name,a.avatar,a.staat,a.gebdatum,a.wohnort FROM prefix_groupusers b INNER JOIN prefix_user a ON b.uid = a.id WHERE b.gid = $teamid ORDER BY rand() LIMIT $limit"); } while ($r = db_fetch_object($sql)) { if(!empty($r->wohnort)){ $wohnort = $r->wohnort; } else { $wohnort = 'n/a'; } if(!empty($r->staat)){ $staat = '<img src="include/images/flags/'.$r->staat.'" border="0" alt="'.$r->staat.'" title="'.$r->staat.'" />'; } else { $staat = 'n/a'; } $avatar = ''; if ( file_exists($r->avatar)) { $avatar = '<img src="'.$r->avatar.'" border="0" alt="'.$r->name.'" title="'.$r->name.'" />'; } else { $avatar = '<img src="include/images/avatars/wurstegal.jpg" border="0" alt="'.$r->name.'" title="'.$r->name.'" />'; } if($r->gebdatum !== "0000-00-00"){ $gebdatum = date('d.m.Y',strtotime($r->gebdatum)); $tag = date('d',strtotime($r->gebdatum)); $monat = date('m',strtotime($r->gebdatum)); $jahr = date('Y',strtotime($r->gebdatum)); $jetzt = mktime(0,0,0,date("m"),date("d"),date("Y")); $geburtstag = mktime(0,0,0,$monat,$tag,$jahr); $alter = "(".intval(($jetzt - $geburtstag) / (3600 * 24 * 365)).")"; } else { $gebdatum = ''; $alter = ''; } echo '<div align="center">'.$avatar.'</div><div align="center">'.$staat.' <a href="index.php?user-details-'.$r->userid.'">'.$r->name.'</a> '.$alter.' '.$wohnort.'</a></div><br></br>'; } echo '</div></div>'; ?>
<?php # Copyright by: Manuel Staechele # Support: www.ilch.de # Rendom Member Box Scroller # by OloX THX @ Mairu ;) defined ('main') or die ( 'no direct access' ); $limit = $allgAr['rmbox_limit']; $teamid = $allgAr['rmbox_teamid']; $bgcolor = $allgAr['rmbox_bgcolor']; $bodercolor = $allgAr['rmbox_bodercolor']; $width = $allgAr['rmbox_width']; $height = $allgAr['rmbox_height']; echo '<script src="include/includes/js/member_scroller.js" type="text/javascript"></script>'; echo '<style type="text/css"> #marqueecontainer { position: relative; width: '.$width.'; height: '.$height.'; background-color: '.$bgcolor.'; overflow: hidden; border: 1px solid '.$bodercolor.'; padding: 2px; } </style>'; echo '<div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"> <div id="vmarquee" style="position: absolute; width: 98%;">'; if($allgAr['rmbox_teamid'] == 0) { $sql = db_query("SELECT id as userid,name,userpict,staat,gebdatum,wohnort FROM prefix_user WHERE 1 ORDER BY rand() LIMIT $limit"); } else { $sql = db_query("SELECT b.uid as userid,a.name,a.userpict,a.staat,a.gebdatum,a.wohnort FROM prefix_groupusers b INNER JOIN prefix_user a ON b.uid = a.id WHERE b.gid = $teamid ORDER BY rand() LIMIT $limit"); } while ($r = db_fetch_object($sql)) { if(!empty($r->wohnort)){ $wohnort = $r->wohnort; } else { $wohnort = 'n/a'; } if(!empty($r->staat)){ $staat = '<img src="include/images/flags/'.$r->staat.'" border="0" alt="'.$r->staat.'" title="'.$r->staat.'" />'; } else { $staat = 'n/a'; } $avatar = ''; if ( file_exists($r->userpict)) { $avatar = '<img src="'.$r->userpict.'" border="0" alt="'.$r->name.'" title="'.$r->name.'" />'; } else { $avatar = '<img src="include/images/avatars/wurstegal.jpg" border="0" alt="'.$r->name.'" title="'.$r->name.'" />'; } if($r->gebdatum !== "0000-00-00"){ $gebdatum = date('d.m.Y',strtotime($r->gebdatum)); $tag = date('d',strtotime($r->gebdatum)); $monat = date('m',strtotime($r->gebdatum)); $jahr = date('Y',strtotime($r->gebdatum)); $jetzt = mktime(0,0,0,date("m"),date("d"),date("Y")); $geburtstag = mktime(0,0,0,$monat,$tag,$jahr); $alter = "(".intval(($jetzt - $geburtstag) / (3600 * 24 * 365)).")"; } else { $gebdatum = ''; $alter = ''; } echo '<div align="center">'.$avatar.'</div><div align="center">'.$staat.' <a href="index.php?user-details-'.$r->userid.'">'.$r->name.'</a> '.$alter.' '.$wohnort.'</a></div><br></br>'; } echo '</div></div>'; ?>
if ( file_exists($row['userpict'])) { $playerpic = '<img src="'.$row['userpict'].'" alt="Player-Pic von '.$row['name'].'" border="0">'; } else { $playerpic = 'n/a'; }
if ( file_exists($row['userpict'])) { $row['PLAYERPICT'] = '<img src="'.$row['userpict'].'" alt="Player-Pic von '.$row['name'].'" border="0">'; } else { $row['PLAYERPICT'] = 'n/a'; }
<?php # Copyright by: Manuel # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); function show_members ($gid,$tpl) { global $allgAr; # icq team bild, hier die zahl aendern. $teams_show_icq_pic = 7; $q = "SELECT b.uid, a.icq, a.avatar, a.status, a.name, c.name as posi, staat FROM prefix_groupusers b LEFT JOIN prefix_user a ON a.id = b.uid LEFT JOIN prefix_groupfuncs c ON b.fid = c.id WHERE b.gid = ".$gid." ORDER BY c.pos ASC, a.name ASC"; $erg = db_query($q); if (db_num_rows($erg) < 1) { return false; } $tpl->out(1); $class = 'Cnorm'; while($row = db_fetch_assoc($erg) ) { $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' ); $row['class'] = $class; if ( $row['staat'] != '' ) { $row['staat'] = '<img src="include/images/flags/'.$row['staat'].'" alt="" border="0">'; } else { $row['staat'] = 'n/a'; } $row['status'] = ($row['status']? 'aktiv' : 'inaktiv' ); if(!empty($row['icq'])){ $row['icq'] = '<a href="http://www.icq.com/whitepages/cmd.php?uin='.$row['icq'].'&action=add"><img src="http://wwp.icq.com/scripts/online.dll?icq='.$row['icq'].'&img='.$teams_show_icq_pic.'" valign="bottom" border="0"></a>'; } else { $row['icq'] = 'n/a'; } if($allgAr['teams_show_list']==1){ if(empty($row['avatar'])){ $row['avatar'] = 'n/a'; } else { $row['avatar'] = '<img src="'.$row['avatar'].'" alt="Avatar von '.$row['name'].'" border="0" >'; } if ( file_exists($row['userpict'])) { $row['PLAYERPICT'] = '<img src="'.$row['userpict'].'" alt="Player-Pic von '.$row['name'].'" border="0">'; } else { $row['PLAYERPICT'] = 'n/a'; } $tpl->set_ar_out($row,2); } else { $tpl->set_ar_out($row,3); } } $tpl->out(4); } if ($menu->get(1) == 'show') { $groups = array(); #collect given teams $i = 2; while($gid = escape($menu->get($i), 'integer')){ $groups[] = $gid; $i++; } #$gid = escape($menu->get(2), 'integer'); if(count($groups) == 1){ #only 1 group to show $gid=$groups[0]; $name = @db_result (db_query("SELECT name FROM prefix_groups WHERE id =".$gid)); $bild = @db_result (db_query("SELECT img FROM prefix_groups WHERE id =".$gid)); $title = $allgAr['title'].' :: Teams :: '.$name; $hmenu = '<a class="smalfont" href="?teams">Teams</a> » '.$name; $design = new design ( $title , $hmenu ); $design->header(); $tpl = new tpl ('teams'); if (!empty($bild) ) { $show = '<img src="'.$bild.'" title="'.$name.'" alt="'.$name.'" border="0"></a>'; } else { $show = '<b>'.$name.'</b>'; } $tpl->set_out('show', $show,0); show_members ($gid,$tpl); }else{ #more groups to show $title = $allgAr['title'].' :: Teams :: '; $hmenu = '<a class="smalfont" href="?teams">Teams</a>'; $design = new design ( $title , $hmenu ); $design->header(); $tpl = new tpl ('teams'); foreach($groups as $gid){ $sql = db_query("SELECT name, img FROM prefix_groups WHERE id =".$gid); if (db_num_rows($sql) < 1) { continue; } $row = db_fetch_assoc ($sql); if (!empty($row['img']) ) { $show = '<img src="'.$row['img'].'" title="'.$row['name'].'" alt="'.$row['name'].'" border="0"></a>'; } else { $show = '<b>'.$row['name'].'</b>'; } $tpl->set_out('show', $show,0); show_members ($gid,$tpl); } } } else { $title = $allgAr['title'].' :: Teams'; $hmenu = 'Teams'; $design = new design ( $title , $hmenu ); $design->header(); $tpl = new tpl ('teams'); $erg1 = db_query("SELECT name,img,id as gid FROM prefix_groups WHERE zeigen = 1 ORDER BY pos"); while ($row = db_fetch_assoc($erg1) ) { if (!empty($row['img']) ) { $row['show'] = '<a href="index.php?teams-show-'.$row['gid'].'"><img src="'.$row['img'].'" title="'.$row['name'].'" alt="'.$row['name'].'" border="0"></a>'; } else { $row['show'] = '<a href="index.php?teams-show-'.$row['gid'].'"><b>'.$row['name'].'</b></a>'; } $tpl->set_ar_out($row,0); if ($allgAr['teams_show_cat'] == 0) { show_members ($row['gid'],$tpl); } } } $design->footer(0); ?>
Geschlossen | ||
Zurück zu HTML, PHP, SQL,... |