<?php
if(fnIsAdmin())
{

?>

<div id="menu03">
    <div id="menu01_head">:: vyhľadávanie</div>
    <div id="menu01_item">
    	<form name="login_form" action="index.php?module=hry" method="post" style="margin: 0; margin-top: 2px; margin-bottom: 2px;">
    	<?php
    	
    		$value = (isset($_POST['search'])) ? $_POST['search'] : '';
    	
    	?>
	      <input id="form_field01" type="text" name="search" size="19" maxlength="30" value="<?php echo $value; ?>"><br />
	      <select name='zaner' class='form_field01'>
	      	<option value='0'>Všetky</option>
	      <?php
	      
	      	$game_search_types = $game_types;
	      	$game_search_types[4]['type'] = 'SE 176x220px';
	      
	      	foreach ($game_search_types as $k => $v)
	      	{
	      		echo "<option value='$k'";
	      		if(isset($_POST['zaner']) && $_POST['zaner'] == $k)
	      		{
	      			echo " selected";
	      		}
	      		echo ">".$v['type']."</option>";
	      	}
	      
	      ?>
	      </select>
	      <input class="form_button01" type="submit" name="Submit" value="OK"><br /> 
	    </form>
    </div>
  </div>  
  <?php
  
}
  ?>

<div id="menu03">
    <div id="menu01_head">:: typ</div>
    <div id="menu01_item">
      <?php
      
      		foreach($game_types as $k => $game_type)
      		{
      			if($k == $typ)
      			{
      				echo "<img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <span id='red'>".$game_type['type']."</span><br />";
      			}
      			else 
      			{
      				echo "<img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href=\"index.php?module=hry&amp;typ=$k&amp;genre=$genre\" id=\"menu01_link\">".$game_type['type']."</a><br />";
      			}
      		}
      
      ?>
      <img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href="index.php?module=hry&amp;genre=<?php echo $_GET['genre']; ?>" id="menu01_link">všetky</a><br />
    </div>
  </div>
  
  <div id="menu03">
    <div id="menu01_head">:: žáner</div>
    <div id="menu01_item">
      <?php
      
      		foreach($game_genres as $kg => $g_genre)
      		{
      			if($kg == $genre)
      			{
      				echo "<img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <span id='red'>$g_genre</span><br />";
      			}
      			else 
      			{
      				echo "<img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href=\"index.php?module=hry&amp;typ=$typ&amp;genre=$kg\" id=\"menu01_link\">".$g_genre."</a><br />";
      			}
      		}
      		$typ = (isset($_GET['typ'])) ? $_GET['typ'] : '';
      		echo '<img src=\'images/arrow-left.png\' alt=\'4mobile\' /> <a href="index.php?module=hry&amp;typ='.$typ.'" id="menu01_link">všetky</a><br />';
      		if(session_is_registered('my_id') && in_array($_SESSION['my_id'], $admins))
	    	{
	    		echo '<br />';
	    		if(!session_is_registered('hry_edit'))
	    		{
	    			echo "<img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href=\"index.php?module_top=hry_sort&amp;action=on\" id=\"menu01_link\">zapni triedenie</a> ";
	    		}
	    		else 
	    		{
	    			echo "<img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href=\"index.php?module_top=hry_sort&amp;action=off\" id=\"menu01_link\">vypni triedenie</a> ";
	    		}
	    	}
      
      ?>
    </div>
  </div>
  
  <div id="menu03">
    <div id="menu01_head">:: rebríčky</div>
    <div id="menu01_item">
    	<img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href="index.php?module=hry&amp;action=new&amp;typ=<?php if(isset($_GET['typ'])) echo $_GET['typ']; ?>" id="menu01_link">NEW <?php echo $hry_charts; ?></a><br />
    	<img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href="index.php?module=hry&amp;action=top" id="menu01_link">TOP <?php echo $hry_charts; ?></a><br />
    	<img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href="index.php?module=hry&amp;action=dload" id="menu01_link">TOP DLOAD<?php echo $hry_charts; ?></a>
    </div>
  </div>
  
 <div id="menu03">
    <div id="menu01_head">:: reklama</div>
    <div id="news_item">
       <script type="text/javascript"><!--
		google_ad_client = "pub-4917301309934013";
		//120x600, bola vytvorená 14.1.2008
		google_ad_slot = "2443565869";
		google_ad_width = 120;
		google_ad_height = 600;
		//--></script>
		<script type="text/javascript"
		src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
		</script>
    </div>
  </div>