output['th_players'] = $text['th_players']; $tpl->output['th_name'] = $text['name']; $tpl->output['th_latency'] = $text['th_latency']; $tpl->output['th_version'] = $text['th_version']; $tpl->output['th_xp'] = $text['th_xp']; $tpl->output['th_online_state'] = $text['th_online_state']; $tpl->output['th_type'] = $text['th_type']; $tpl->output['th_rating'] = $text['th_rating']; $tpl->output['th_recommend'] = $text['th_recommend']; $tpl->output['server_reg_desc'] = $text['reg_desc']; $tpl->output['info_place'] = $text['info_place']; $tpl->output['info_avarage_players'] = $text['info_avarage_players']; $tpl->output['info_owner'] = $text['info_owner']; $id = (int)$_GET['str1']; $server_info = $db->strip($db->query_fetch_assoc('SELECT *, CAST(`online_players_sum`/`player_checks` AS UNSIGNED) as `online_players` FROM `servers` WHERE `id` = '.$id)); if($server_info['wss_partner'] == 1) { $tpl->output['server_name'] = 'WSS Partner'.$server_info['name']; } else { $tpl->output['server_name'] = $server_info['name']; } $tpl->output['title_name'] = $server_info['name']; $tpl->output['server_version'] = $server_info['version']; $tpl->output['server_typ'] = $server_info['type']; $tpl->output['server_limit'] = $server_info['limit']; $tpl->output['server_description'] = $server_info['desc']; $tpl->output['server_added'] = datum($server_info['created']); $tpl->output['info_added'] = $text['server_added_info']; if ((int)$server_info['player_checks']<>0) { $tpl->output['server_online_players'] = $server_info['online_players']; } else { $tpl->output['server_online_players']='0'; } $tpl->output['server_online'] = @round($server_info['online'], 2).'%'; switch ($server_info['xp']) { case 1: $tpl->output['server_xp'] = 'Very low'; break; case 2: $tpl->output['server_xp'] = 'Low'; break; case 3: $tpl->output['server_xp'] = 'Normal'; break; case 4: $tpl->output['server_xp'] = 'High'; break; case 5: $tpl->output['server_xp'] = 'Very high'; break; } $tpl->output['server_emu'] = $server_info['emu']; if ($server_info['place']==1) { $tpl->output['server_place'] = $text['reg_czech']; } else { $tpl->output['server_place'] = $text['reg_abroad']; } $tpl->output['server_web'] = ''.$server_info['web'].''; $tpl->output['server_web_reg'] = ''.$server_info['web_reg'].''; $tpl->output['server_port'] = $server_info['port']; $tpl->output['server_owner'] = print_nick($server_info['owner']); if($server_info['latency'] == 0) $Latency = '?'; else $Latency = round($server_info['latency']).'ms'; $tpl->output['server_latency'] = $Latency; if (empty($_SESSION['id'])) { $vote = false; } else { $c = $db->query_result('SELECT COUNT(*) as `pocet` FROM ratings WHERE (`server_id`= '.(int)$server_info['id'].' AND `user_id`='.(int)$_SESSION['id'].')'); if ($c == 1) { $vote = false; } else { $vote = true; } } if ($server_info['ratings']==0) { $rating = 0; } else { $rating = round($server_info['rating_sum']/$server_info['ratings'], 2); } $rating_width = 30*$rating; if ($vote) { $tpl->output['rating_stars'] = "
  • "; $tpl->output['rating_stars'] .= "
  • "; $tpl->output['rating_stars'] .= "
  • "; $tpl->output['rating_stars'] .= "
  • "; $tpl->output['rating_stars'] .= "
  • "; $tpl->output['rating_stars'] .= "
  • "; } else { $tpl->output['rating_stars'] = "
  • "; } if (($user['admin']==1) OR ($server_info['owner']==$_SESSION['id'])) { $tpl->output['admin'] = ''.ulink('edit-server/'.$id, 'Edit').' | Delete'; } else { $tpl->output['admin']=''; } if ($user['admin']==1) { if ($server_info['wss_partner']==1) { $tpl->output['admin'] .= ' | Odebrat WSS'; } else { $tpl->output['admin'] .= ' | Přidat WSS'; } } else { $tpl->output['admin'].=''; } //comments $count_comment = $db->query_result('select count(*) as pocet from `comments` where server='.$id); $tpl->output['comments']='Komentáře('.$count_comment.')'; ?>