Witam, mam problem ze sklepem by ghost...
Chcę aby po wejściu w listę usług nie wyświetlało domyślnie listy usług 1 serwera z listy, tylko żeby pojawiła się lista usług jakiegoś serwera trzeba wybrać serwer. Jeśli niejasno napisałem mogę wytłumaczyć dokładniej wystarczy napisać

Link do strony :
http://ustrzel.eu/shop/service/dane testowe:
Nick: Your-Design
Hasło: test123
Kod pliku w którym jest zawarta chyba cała potrzebna formuła
<?php Core::get('View')->execute('global/head') ?>
<div id="board">
<div class="breadcrumb">
<a href="
<?php echo Core
::$site ?>">Sklep Automatyczny</a> → <a href="
<?php echo Core
::$site ?>service">Lista usług</a>
</div>
<div class="page_title">Lista usług</div>
<?php
// Ustawmy ilość znalezionych grup na 0
$find = 0;
// Jeśli są jakieś usługi
{
?>
<script>
function buy(se_id){
new SimpleBox({
url: core.getConfig('base_url') + 'service/buy/index',
data: {id: se_id},
submitValue: false
}).show();
}
function setServer(server_hash, li){
$('.vertical_menu ul li').removeClass('active');
$(li).addClass('active');
$('.service').animate({
opacity: 0.0
}, 600, function(){
$('.service').hide();
$('.service_' + server_hash).show();
$('.service_' + server_hash).animate({
opacity: 1.0
}, 600);
});
}
</script>
<?php
foreach((array)$services as $_level => $data) {
{
continue;
}
$clear = '';
if($_level % 2)
{
$clear = '<div style="clear: both"></div>';
}
// Chyba można wyświetlić usługę do wyświetlenia
$key = md5($data['server']['hostname']);
{
}
$show[$key][] = $data;
// Dodajmy znaleziono grupe, aby później nie wyświetliło komunikatu
// że nie ma żadnych usług
$find++;
}
echo '<div style="clear: both"></div>'; }
if($find > 0)
{
$menu_li = '';
$display = '';
$first = '';
foreach($show as $hash => $service)
{
$first = $first == '' ? $hash : $first;
$menu_li .= "<li class='{$hash}' onclick='setServer(\"{$hash}\", this)'><div><span style='float: left; max-width: 90%'>{$service[0]['server']['hostname']}</span><span class='stats' style='float: right'>{$c}</span></div><div style='clear: both; height: 1px'></div></li>";
$display .= "<div style='display: none' class='service service_{$hash}'>";
foreach($service as $data)
{
$display .= <<< SERVICE
<div class="img_bar">{$data['name']} <span style="float: right" onclick="buy({$data['id']})">Zamów</span></div>
<div class="blue_box" style="margin-bottom: 15px">
<div class="content" style="padding: 3px">
<table class="table">
<tr class="header">
<td>Serwer</td>
<td>Okres na jaki można zamówić</td>
<td>Cena</td>
</tr>
<tr>
<td>{$data['server']['hostname']}</td>
<td>{$data['min_day']} do {$data['max_day']} Dni</td>
<td>{$data['cost_per_day']} PLN / Dzień</td>
</tr>
</table>
<div style="margin: 5px">
{$data['desc']}
</div>
<div style="clear: both"></div>
</div>
</div>
SERVICE;
}
$display .= "</div>";
}
echo "<script>$(document).ready(function(){ setServer('{$first}', $('.{$first}')); });</script>";
<div class="blue_box">
<div class="vertical_menu" style="width: 305px">
<h3>Wybierz serwer</h3>
<ul>
{$menu_li}
</ul>
</div>
<div class="admin_content" style="min-height: 300px; width: 830px; padding: 10px">
{$display}
</div>
</div>
CONTENT;
}
else
{
echo '<div class="warning">Aktualnie nie ma żadnych usług do kupienia</div>'; }
?>
</div>
<?php Core::get('View')->execute('global/footer') ?>
Refresh
Pomoże ktoś ?
F5