Bitte schön:
<?php
# Copyright by: OloX
# Support: www.ilch.de
# www.dms-gaming.com [+] mairu.ilch.net
defined ('main') or die ( 'no direct access' );
function its_age($date) {
$dif = 0;
$parts = explode ( '-', $date );
if ( $parts[0] < 1970 ) {
$dif = 1970 - $parts[0];
$parts[0] = $parts[0] + $dif;
}
$seconds = mktime ( 0, 0, 0, $parts[2], $parts[1], $parts[0] );
$seconds = time () - $seconds;
$age = date ( 'Y', $seconds ) - 1970 + $dif;
return ($age);
}
$jsdir = 'include/includes/js/teamSlider';
$ILCH_HEADER_ADDITIONS .= sprintf("<link rel=\"stylesheet\" type=\"text/css\" href=\"include/includes/css/teamSlider/teamSlider.css\" />
<script type=\"text/javascript\" src=\"%s/jquery-1.4.2.min.js\"></script>
<script type=\"text/javascript\" src=\"%s/easySlider1.5.js\"></script>
<script type=\"text/javascript\" src=\"%s/teamSlider.js\"></script>
<script type=\"text/javascript\">
$(document).ready(function(){
$(\"#ilchTeamSlider\").ilchTeamSlider({ boxWidth: %d,
pause: %d,
fadeSpeed: %d,
userAvatarHeight: %d,
userAvatarWidth: %d,
showUserData: %s,
userDatabelow: %s,
showUserNavi: %s,
vertical: %s
});
});
</script>", $jsdir, $jsdir, $jsdir, intval($allgAr['its_boxwidth']), intval($allgAr['its_pause']*1000), intval($allgAr['its_fadespeed']), intval($allgAr['Fahohe']), intval($allgAr['Fabreite']), $allgAr['its_showdetails'] == '1' ? 'true' : 'false', $allgAr['its_belowdetails'] == '1' ? 'true' : 'false', $allgAr['its_shownavi'] == '1' ? 'true' : 'false', $allgAr['its_vertical'] == '1' ? 'true' : 'false')."\n";
$tpl = new tpl ( 'box/teamslider' );
$i = 1;
$teamIds = array();
$q = db_query("SELECT `a`.`id`, `a`.`name`, COUNT(`b`.`uid`) AS `useranz`
FROM `prefix_groups` AS `a`
LEFT JOIN `prefix_groupusers` AS `b` ON `a`.`id` = `b`.`gid`
WHERE `a`.`zeigen` = 1 AND `a`.`show_its` = 1
GROUP BY `a`.`id`
HAVING `useranz` > 0
ORDER BY `a`.`pos` ASC");
if (db_num_rows($q) > 0 ) {
$tpl->out(0);
while ($row = db_fetch_object($q)) {
$teamIds[$i] = array('teamid' => $row->id,
'teamname' => $row->name,
'teamanz' => $row->useranz,
'teami' => $i);
$tpl->set_ar_out( array('teamname' => $row->name, 'teamanz' => $row->useranz, 'teami' => $i), 1);
$i++;
}
$tpl->out(2);
foreach ($teamIds as $key => $value) {
$tpl->set_out('teamnumber', $value['teami'], 3);
$query = db_query(sprintf("SELECT `b`.`uid`,`a`.`name`,`a`.`staat`, SUBSTRING_INDEX(`staat`, '.', 1) AS `bstaat` ,`a`.`avatar`,`a`.`gebdatum`,`a`.`wohnort`,`a`.`id` AS `userid`,`c`.`name` AS `teamtask`
FROM `prefix_groupusers` AS `b`
LEFT JOIN `prefix_user` AS `a` ON `b`.`uid` = `a`.`id`
LEFT JOIN `prefix_groupfuncs` AS `c` ON `b`.`fid` = `c`.`id`
WHERE `b`.`gid` = %d
ORDER BY `c`.`pos` ASC", $value['teamid']));
while ($r = db_fetch_object($query)) {
$tpl->set_ar_out( array('userid' => $r->userid,
'username' => $r->name,
'staat' => !empty($r->staat) ? '<img src="include/images/flags/'.$r->staat.'" alt="'.$r->bstaat.'" title="'.$r->bstaat.'" />' : '<img src="include/images/flags/na.png" alt="keine Angabe" title="keine Angabe" />',
'avatar' => file_exists($r->avatar) ? $r->avatar : 'include/images/avatars/wurstegal.jpg',
'teamtask' => $r->teamtask,
'wohnort' => empty($r->wohnort) ? 'n/a' : $r->wohnort), 4);
}
$tpl->set_out('teamnumber', $value['teami'], 5);
}
$tpl->out(6);
} else {
$tpl->out(7);
}
?>
<!-- Ilch Team Silder by OloX [+] www.dms-gaming.com -->
<div id="ilchTeamSlider">
<div id="its_team-switch">
<span id="prev_team"></span>
<ul id="its_teams_list">
{EXPLODE}
<li title="({teamanz} Teammitglied{_if_{teamanz}>'1'}er{/_endif})" id="its_item_{teami}">{teamname}</li>
{EXPLODE}
</ul>
<span id="next_team"></span>
<div style="clear:both;"></div>
</div>
{EXPLODE}
<div class="its_team" id="its_team_{teamnumber}">
<ul>
{EXPLODE}
<li><span class="its_user-avatar"><a href="index.php?user-details-{userid}"><img src="{avatar}" class="gradualfader" alt="{username}" title="{username}" /></a></span>
<span class="its_user-data">
<em><a href="index.php?user-details-{userid}"><strong>{username}</strong></a> </em>
<em style="font-style:italic;">{teamtask}</em>
<em>{staat} {wohnort}</em
></span>
</li>
{EXPLODE}
</ul>
</div>
<div class="its_team_navi" id="its_team_navi_{teamnumber}">
<span style="float:left;" id="its_prevBtn_{teamnumber}"><a class="rand" href="javascript:void(0);"><img src="include/images/back.png" class="gradualfader" alt="Back" width="52" height="16" border="0" /></a></span> <span id="its_nextBtn_{teamnumber}" style="float:right;"><a class="rand" href="javascript:void(0);"><img src="include/images/next.png" class="gradualfader" alt="Next" width="52" height="16" border="0" /></a></span>
<div style="clear:both;"></div>
</div>
{EXPLODE}
</div>
<!-- Ilch Team Silder END -->
{EXPLODE}
<div class="its_errortitle"><strong>ERROR:</strong><br />{_lang_noteamthere}</div>