Podmieniłem i wyszedł mi totalny nieporządek na stronie,wszystko poprzestawiane...może coś zrobilem nie tak ? <?php
if (!defined("IN_FUSION")) { die("Access Denied"); }
require_once INFUSIONS.'sf_core/base.php';
require_once INFUSIONS.'sf_matches_panel/infusion_db.php';
require_once INFUSIONS.'sf_calendar_panel/infusion_db.php';
if (file_exists(INFUSIONS."sf_matches_panel/locale/".$settings['locale'].".php")) {
require_once INFUSIONS."sf_matches_panel/locale/".$settings['locale'].".php";
} else {
require_once INFUSIONS."sf_matches_panel/locale/English.php";
}
add_to_head('<link rel="stylesheet" href="'.INFUSIONS.'sf_matches_panel/css/sfm_panel.css" type="text/css" media="screen" />');
$query = 'SELECT m.cup, m.sparing, m.departure, m.id, m.date, m.result_1, m.result_2, t1.id as id_1, t2.id as id_2, t1.logo as logo_1, t2.logo as logo_2, t1.name as name_1, t2.name as name_2
FROM '.SF_MATCHES.' m
LEFT JOIN '.SF_TEAMS.' t1 ON t1.id=m.team_1
LEFT JOIN '.SF_TEAMS.' t2 ON t2.id=m.team_2
WHERE ';
$next = dbarray(dbquery($query.' (t1.id="1" or t2.id="1") AND result_1="" AND result_2="" ORDER BY date ASC LIMIT 1'));
$prev = dbarray(dbquery($query.' (t1.id="1" or t2.id="1") AND result_1!="" AND result_2!="" ORDER BY date DESC LIMIT 1'));
openside("Mecze", array("class"=>"match-panel"));
?>
<?php if($prev['id']):?>
<div class="match">
<?php $no = $prev['departure']? 2 : 1 ?>
<?php if($prev['logo_'.$no]):?>
<img src="<?php echo INFUSIONS.'sf_teams_panel/upload/logos/'.$prev['logo_'.$no]?>" alt="" />
<?php endif ?>
<div class="info">
<span class="teams">
<?php if ($prev['cup'] == 1)
{
echo "<span style='font-size:14px'>Puchar</span><br />";
}
else if ($prev['sparing'] == 1)
{
echo "<span style='font-size:14px'>Sparing</span><br />";
}
?>
<?php if( $prev['departure'] ): ?>
<a href="<?php echo INFUSIONS.'sf_matches_panel/team.php?id='.$prev['id_2']?>"><?php echo $prev['name_2']?></a> -
<a href="<?php echo INFUSIONS.'sf_teams_panel/team.php?id='.$prev['id_1']?>"><?php echo $prev['name_1']?></a>
<?php echo $prev['result_2']?>:<?php echo $prev['result_1']?>
<?php else: ?>
<a href="<?php echo INFUSIONS.'sf_teams_panel/team.php?id='.$prev['id_1']?>"><?php echo $prev['name_1']?></a> -
<a href="<?php echo INFUSIONS.'sf_matches_panel/team.php?id='.$prev['id_2']?>"><?php echo $prev['name_2']?></a>
<?php echo $prev['result_1']?>:<?php echo $prev['result_2']?>
<?php endif?>
</span>
<span class="date"><?php echo date('d.m.Y H:i',strtotime($prev['date']))?></span>
<?php $result = dbquery('SELECT name, value FROM '.SF_MATCHES_CUSTOM_FIELDS.' WHERE match_id="'.$prev['id'].'" ORDER BY position '); ?>
<ul class="goals">
<?php
while($data = dbarray($result)){
if ($data['name'] != 'brak')
echo '<li>'.$data['name'].'</li>';
}
?>
</ul>
<?php $result = dbquery('SELECT name, value FROM '.SF_MATCHES_CUSTOM_FIELDS.' WHERE match_id="'.$prev['id'].'" ORDER BY position '); ?>
<ul class="goals">
<?php
while($data = dbarray($result)){
echo '<li>'.$data['value'].'</li>';
}
?>
</ul>
</div>
<?php
$last_round = dbarray(databaseClass::query('select id
from '.SF_CALENDAR_ROUND.' r
where team_id='.$prev['id_1'].' and r.date > NOW()
order by r.date asc
limit 1 '));
?>
<div class="sfm_panel_stats">
<a href="<?php echo INFUSIONS.'sf_matches_panel/stats.php?id='.$prev['id']?>"><?php echo $locale['sfm_stats']?></a> <a href="<?php echo BASEDIR.'statystyki.php?team_id='.$prev['id_1']?>">Statystyki ogólne</a>
</div>
</div>
<?php endif ?>
<?php if($next['id']):?>
<div class="match">
<hr />
<?php $no = $next['departure']? 2 : 1 ?>
<?php if($next['logo_'.$no]):?>
<img src="<?php echo INFUSIONS.'sf_teams_panel/upload/logos/'.$next['logo_'.$no]?>" alt="" />
<?php endif ?>
<div class="info">
<span class="teams">
<?php if ($next['cup'] == 1)
{
echo "<span style='font-size:14px'>Puchar</span><br />";
}
else if ($next['sparing'] == 1)
{
echo "<span style='font-size:14px'>Sparing</span><br />";
}
?>
<?php if( $next['departure'] ): ?>
<a href="<?php echo INFUSIONS.'sf_matches_panel/team.php?id='.$next['id_2']?>"><?php echo $next['name_2']?></a> -
<a href="<?php echo INFUSIONS.'sf_teams_panel/team.php?id='.$next['id_1']?>"><?php echo $next['name_1']?></a>
<?php else:?>
<a href="<?php echo INFUSIONS.'sf_teams_panel/team.php?id='.$next['id_1']?>"><?php echo $next['name_1']?></a> -
<a href="<?php echo INFUSIONS.'sf_matches_panel/team.php?id='.$next['id_2']?>"><?php echo $next['name_2']?></a>
<?php endif ?>
</span>
<span class="date"><?php echo date('d.m.Y H:i',strtotime($next['date']))?></span>
<?php
$result = dbquery('SELECT id, live FROM '.DB_PREFIX.'relacje_live WHERE team1_name="'.$next['name_1'].'" AND team2_name="'.$next['name_2'].'" LIMIT 1');
if (dbrows($result))
{
$data = dbarray($result);
echo "<a href='".BASEDIR."live' style='display: block;text-align:center;font-weight:bold;font-size: 14px'>Relacja LIVE</a></div></div>Relacja LIVE</a>";
}
?>
</div>
</div>
<?php endif ?>
<?php if(!$next['id'] && !$prev['id']){
echo $locale['sf_empty_panel'];
}?>
<?php
closeside();
?>
Kliknij i zaczekaj na załadowanie kodu ...
Edytowane przez Huragan Morag dnia 29.04.2014 09:49:37
|