<?php
error_reporting (E_ALL);
$IN_ENGINE = true;

$IN_ENGINE = true;
$show_menu = true;
$show_flash = true;
require_once("includes/dbconnect.php");
require_once("includes/preprocessing.php");
require_once("template/header.php");
?>

<table cellpadding="0" cellspacing="0" border="0" class="cont_header_txt" width="100%"><tr><td>Предоставляемые сервера</td><td align="right"><a href="?type=pro" style="text-transform: none" class="red">PRO</a> / <a href="?type=game" style="text-transform: none">Игровые</a> / <a href="?type=voice" style="text-transform: none">Голосовые</a></td></tr></table>

<?php
if (!isset($_GET['type'])) $_GET['type'] = "game";

echo "<table width='100%'>";

$i = 1;
$enginesq = mysql_query("SELECT * FROM dgh_engines WHERE showasorder = '1' AND kind = '".$_GET['type']."' ORDER BY rand() LIMIT 10");
while($engine = mysql_fetch_array($enginesq)) {
	if ($i == 1) echo "<tr>";
	echo "<td width='100%' valign='top'>";
	$title = $engine['name'];
	
	$content = "";
#	$content .= "<img src='template/images/games/".$engine['type'].".jpg' alt='' style='border-right: 1px solid #000; border-bottom: 1px solid #000; float: left; margin: 0px 5px 2px 0px'>";
#	$content .= $engine['description']."<br><br>";
	$content .= "<a href='order.php?engine=".$engine['eid']."'>Заказать сервер</a>";
	include("template/table_content.php");
	echo "</td>";
#	if ($i == 2) { echo "</tr>"; $i = 0; }
#	
#	$i++;
}

echo "</table>";

require_once("template/footer.php");
?>
