Bitte kein Problem
Zuletzt modifiziert von Fonsi1 am 11.10.2010 - 19:58:54
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
<?php # Copyright by: dastiac.de # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); if(is_numeric($menu->get(1))) { $oid = escape($menu->get(1), 'integer'); $title = $allgAr['title'].' :: Clans :: '.get_opponent_details('name',$oid); $hmenu = '<a class="smalfont" href="?clans">Clandatenbank</a> » '.get_opponent_details('name',$oid); $design = new design ( $title , $hmenu ); $design->header(); $tpl = new tpl ('clans'); $abf = "SELECT * FROM prefix_opponents WHERE oid = $oid"; $erg = db_query($abf); $row = db_fetch_assoc($erg); $row['wins'] = db_result(db_query("SELECT count(id) FROM prefix_wars WHERE oid = $oid AND wlp = 1"),0); $row['draws']= db_result(db_query("SELECT count(id) FROM prefix_wars WHERE oid = $oid AND wlp = 3"),0); $row['loss'] = db_result(db_query("SELECT count(id) FROM prefix_wars WHERE oid = $oid AND wlp = 2"),0); $row['ges'] = db_result(db_query("SELECT count(id) FROM prefix_wars WHERE oid = $oid AND status = 3"),0); if($row['ges'] == 0) { $row['percentWin'] = 0; $row['percentLos'] = 0; $row['percentPat'] = 0; } else { $row['percentWin'] = round($row['wins'] / $row['ges'] * 100); $row['percentLos'] = round($row['loss'] / $row['ges'] * 100); $row['percentPat'] = round($row['draws'] / $row['ges'] * 100); } $tpl->set_ar_out($row,0); if($row['ges'] == 0) { $tpl->set_out('','',1); } else { $abf = "SELECT * FROM prefix_wars WHERE oid = $oid ORDER BY datime DESC LIMIT 5"; $erg = db_query($abf); while($r = db_fetch_assoc($erg)) { if($r['wlp'] == 1) { $color = "green"; } elseif($r['wlp'] == 2) { $color = "red"; } else { $color = "orange"; } $r['team'] = get_team_details('name',$r['tid']); $r['gegner'] = get_opponent_details('name', $r['oid']); $r['land2'] = get_opponent_details('land', $r['oid']); $r['erg'] = '<span style="color: '.$color.';">'.$r['owp'].':'.$r['opp'].'</span>'; $tpl->set_ar_out($r,2); } } $tpl->set_out('','',3); $design->footer(); } else { $title = $allgAr['title'].' :: Clandatenbank'; $hmenu = '<a class="smalfont" href="?clans">Clandatenbank</a>'; $design = new design ( $title , $hmenu ); $design->header(); $tpl = new tpl ('clandb'); $limit = 25; $page = ( $menu->getA(1) == 'p' ? $menu->getE(1) : 1 ); $MPL = db_make_sites ($page , "" , $limit , '?clans' , 'opponents' ); $anfang = ($page - 1) * $limit; $abf = "SELECT * FROM prefix_opponents LIMIT $anfang,$limit"; $erg = db_query($abf); $tpl->set_out("","",0); $row['ges'] = db_result(db_query("SELECT count(oid) FROM prefix_opponents"),0); if($row['ges'] == 0) { $tpl->set_out("","",1); } while($row = db_fetch_assoc($erg)) { $row['land2'] = get_opponent_details('land',$row['oid']); $row['name'] = get_opponent_details('name',$row['oid']); $tpl->set_ar_out($row, 2); } $tpl->set_out('SITELINK',$MPL,3); $design->footer(); }
$abf = "SELECT * FROM prefix_opponents WHERE oid = $oid order by name asc";
<table width="100%" cellpadding="1" cellspacing="1" border="0"> <tr> <td width="100%" class="Chead" align="left"><strong>» Matchübersicht</strong></td> </tr> <tr> <td width="100%" class="Cmite" valign="top"> <table width="100%" cellpadding="1" cellspacing="1" border="0"> <tr> <td width="100%" colspan="3" class="Cmite"> </td> </tr> <tr> <td width="35%" class="Cnorm" align="center" style="font-size: 12px; font-weight: bold;"> <img src="{teamlogo}" style="border:1px solid #000000;" /><br />{team} </td> <td width="30%" class="Cmite" style="font-size: 20px;" align="center"><strong>[{owp} : {opp}]</strong><br />{mlink}</td> <td width="35%" class="Cnorm" align="center" style="font-size: 12px; font-weight: bold;"> <img src="{logo}" style="border:1px solid #000000;" /><br /> <img src="include/images/flags/{land}" alt="" /> <a href="?clans-{oid}" target="_blank">{gegner}</a> </tr> <tr> <td> </td> </tr> <tr> <td width="100%" align="center" colspan="3"></td> </tr> </table> <table width="100%" cellpadding="1" cellspacing="1" border="0"> <tr> <td colspan="3" align="left" class="Chead"><strong>» Matchdetails</strong></td> </tr> <tr> <td width="100%" colspan="3" class="Cnorm" align="left"> <table width="100%" cellpadding="1" cellspacing="1" border="0"> <tr> <td width="33%" class="Cmite">Datum:</td> <td width="67%" class="Cnorm">{datum}</td> </tr> <tr> <td width="33%" class="Cmite">Uhrzeit:</td> <td width="67%" class="Cnorm">{zeit} {_lang_oclock}</td> </tr> <tr> <td width="33%" class="Cmite">Spieltyp:</td> <td width="67%" class="Cnorm">{mtyp} ({mod})</td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td width="100%" colspan="3" align="center" class="Cmite"> </td> </tr> <tr> <td colspan="3" align="left" class="Chead"><strong>» Rundenergebnisse</strong></td> </tr> <tr> <td colspan="3" class="Cnorm"> {ergliste} </td> </tr> <tr> <td width="100%" colspan="3" align="center" class="Cmite"> </td> </tr> <tr> <td colspan="3" align="left" class="Chead"><strong>» Screenshots</strong></td> </tr> <tr> <td colspan="3" align="center" class="Cnorm"> <table width="100%" cellpadding="1" cellspacing="1"> {screenliste} </table> </td> </tr> <tr> <td width="100%" colspan="3" align="center" class="Cmite"> </td> </tr> <tr> <td width="100%" colspan="3" align="left" class="Chead"><strong>» Lineup: {team}</strong></td> </tr> <tr> <td width="100%" colspan="3" align="center" class="Cnorm" style="padding:0px auto 0px auto;"><div style="position: relative;">{memberliste}</div></td> </tr> <tr> <td class="Cmite" colspan="3"> </td> </tr> <tr> <td width="100%" colspan="3" align="left" class="Chead"><strong>» Lineup: {gegner}</strong></td> </tr> <tr> <td width="100%" colspan="3" align="center" class="Cnorm">{lineupopp}</td> </tr> <tr> <td class="Cmite" colspan="3"> </td> </tr> <tr> <td width="100%" colspan="3" class="Chead" align="left"><strong>» Matchbericht</strong></td> </tr> <tr> <td width="100%" colspan="3" class="Cnorm" align="left">{txt}</td> </tr> <tr> <td width="100%" colspan="3" class="Chead" align="center"> </td> </tr> </table> {EXPLODE} <form action="index.php?wars-more-{id}" method="POST"> <input type="hidden" name="kommentar_fuer_last_wars" value="yes" /> <table border="0" cellpadding="2" cellspacing="1" class="border" width="100%"> <tr> <td class="Chead">{_lang_addcomment}</td> </tr><tr> <td class="Cmite"><textarea cols="60" rows="2" name="text"></textarea></td> </tr><tr> <td class="Cdark"><input type="submit" value="{_lang_formsub}" /></td> </tr> </table> {EXPLODE} <table border="0" cellpadding="2" cellspacing="1" class="border" width="100%"> <tr> <td width="10%"class="{class}">{name}</td> <td class="{class}">{text}</td> </tr> </table> {EXPLODE} </form>
Geschlossen | ||
Zurück zu Module und Modifikationen |