<?php

    // ------------------RATANIE 100.ho navstevnika ----------------------------
    if(isset($_SESSION['show_reward']) && $_SESSION['show_reward'])
    {
        $visits = $dba->GetOne('mobile_counter', 1, 'status');
        echo '<div class="menu01"><div class="menu01_head">Gratulujeme!</div><div id="reward_text"> Ste náš '.$visits.' návštevník a ako odmenu získavate <b>5</b> <span class="red"><b>4mobile</b></span> kredity.</div></div>';
        $_SESSION['show_reward'] = false;
    }

	if(session_is_registered('mobile_logged_in'))
	{
		$moj_mobil = $dba->GetOne('mobile_users', $_SESSION['my_id'], 'moj_mobil');
		
		if($moj_mobil!=0)
		{
			$row = $dba->GetRow('mobile_mobil', $moj_mobil, 'menu_res, temy_typ');
//			$roz = $dba->GetOne('mobile_mobil', $moj_mobil, 'menu_res');
			$roz = $row['menu_res'];
			$temy_typ = $row['temy_typ'];
			if($roz==0) $roz=1;
		}
		else 
		{
			$roz=1;
			$temy_typ = 0;
		}
	}
	else $roz = 1;
?>

  <div class="menu01">
    <div class="menu01_head">:: menu</div>
    <div class="menu01_item">
      <img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href="index.php" class="menu01_link">home</a><br />
      <img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href="index.php?module=pozadia&amp;res=<?php echo $roz; ?>" class="menu01_link">pozadia</a><br />
      <img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href="index.php?module=melodie" class="menu01_link">melódie</a><br />
      <img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href="index.php?module=chart" class="menu01_link">EURO chart</a><br />
      <img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href="index.php?module=hry" class="menu01_link">hry</a><br />
      <img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href="index.php?module=videa" class="menu01_link">videá</a><br />
      <img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href="index.php?module=temy&amp;typ=<?php echo $temy_typ; ?>" class="menu01_link">témy</a><br />
      <img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href="index.php?module=slovnik" class="menu01_link">slovník pojmov</a><br />
      <img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href="index.php?module=smsky" class="menu01_link">smsky</a><br />
      <img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href="index.php?module=flash_games" class="menu01_link">flash games</a><br />
      <img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href="index.php?module=bazar" class="menu01_link">bazár</a><br />
      <img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href="index.php?module=forum" class="menu01_link">fórum</a><br />
      <img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href="index.php?module=gbook" class="menu01_link">guestbook</a><br />
      <img src='images/arrow-left.png' class='sipka' alt='4mobile' /> <a href="index.php?module=faq" class="menu01_link">FAQ</a><br />
      <?php
      
		if(session_is_registered('mobile_logged_in'))
		{
		echo '<img src=\'images/arrow-left.png\' alt=\'4mobile\' /> <a href="index.php?module=stlac" class="menu01_link">SMS editor</a><br />';
		}
      
		if(session_is_registered('mobile_moj_mobil') && $_SESSION['mobile_moj_mobil']==0)
		{
			  echo '<br /><span class="cervena">Vyplňte prosím v časti Môj mobil položku Môj mobil. Ďakujeme.</span>';
		}
      
      ?>
    </div>
  </div>
  
   <?php
    
    	if(true)
    	{
    
    ?>    <div class="reklama_div_left">
    <div class="menu01_head">:: vyhľadávanie</div>
    	<!-- SiteSearch Google -->
<form method="get" action="http://4mobile.peterpech.com/index.php?module=vyhladavanie" target="_top" style='_margin: 2px 0 5px 0; '>
<table border="0" width='90%' align="center" cellpadding="0" cellspacing="0" bgcolor="#414040"  style='margin: 5px auto 5px auto; 	_margin: 0; '>
	<tr>
		<td nowrap="nowrap" valign="top" align="left">
			<input type="hidden" name="domains" value="4mobile.sk"></input>
			<label for="sbi" style="display: none">Zadajte hľadané výrazy</label>
			<input type="text" name="q" size="20" maxlength="255" value="" id="sbi"></input>
		</td>
	</tr>
	<tr>
		<td nowrap="nowrap">
			<table>
				<tr>
					<td>
						<input type="radio" name="sitesearch" value="4mobile.peterpech.com" id="ss1" checked></input>
						<label for="ss1" title="Vyhľadávanie 4mobile.sk"><font size="-1" color="#ffffff">4mobile</font></label><br/>
						<input type="radio" name="sitesearch" value="" id="ss0"></input>
						<label for="ss0" title="Vyhľadávať na webe"><font size="-1" color="#ffffff">Web</font></label>
					</td>
				</tr>
			</table>
			<label for="sbb" style="display: none">Odoslať formulár vyhľadávania</label>
			<input type="submit" name="sa" value="Google hľadaj!" id="sbb"></input>
			<input type="hidden" name="client" value="pub-4917301309934013"></input>
			<input type="hidden" name="forid" value="1"></input>
			<input type="hidden" name="channel" value="2225736174"></input>
			<input type="hidden" name="ie" value="ISO-8859-2"></input>
			<input type="hidden" name="oe" value="ISO-8859-2"></input>
			<input type="hidden" name="cof" value="GALT:#FFFFFF;GL:1;DIV:#353434;VLC:a10407;AH:center;BGC:171717;LBGC:353434;ALC:ffffff;LC:ffffff;T:CCCCCC;GFNT:a10407;GIMP:a10407;LH:50;LW:152;L:http://4mobile.peterpech.com/images/logo_04.jpg;S:http://4mobile.sk;FORID:11"></input>
			<input type="hidden" name="hl" value="sk"></input>
		</td>
	</tr>
</table>
</form>
<!-- SiteSearch Google -->




    </div>
	<?php
		}
  	?>

	<?php
//		if(true)
//		{
	?>
	
	<div class="reklama_div_left">
    <div class="menu01_reklama_item" style='margin: 5px; padding: 3px 0 5px 1px;'>
    	<script type="text/javascript"><!--
		google_ad_client = "pub-4917301309934013";
		//120x90, bola vytvorená 15.1.2008
		google_ad_slot = "3003871301";
		google_ad_width = 120;
		google_ad_height = 90;
		//--></script>
		<script type="text/javascript"
		src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
		</script>
			</div>
    </div>
	
	<div class="reklama_div_left">
    <div class="menu01_head">:: reklama</div>
    <div class="menu01_reklama_item">
    	<script type="text/javascript"><!--
			google_ad_client = "pub-4917301309934013";
			//120x240, bola vytvorená 14.1.2008
			google_ad_slot = "8025531173";
			google_ad_width = 120;
			google_ad_height = 240;
			//--></script>
			<script type="text/javascript"
			src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
			</script>
			</div>
    </div>
  
  <div class="menu01">
    <div class="menu01_head">:: misc</div>
    <div class="menu01_item">
      <b>Kredity slúžia iba na sťahovanie do počítača! Na sťahovanie do telefónu ich nepotrebujete!</b><br /><br />
	  online: <?php echo $online_all.'<br />'; ?>
	  prihlásení: <?php echo $online_logged; ?><br />
	  <br />
	  <div>ICQ Pesto <img src="http://status.icq.com/online.gif?icq=359545257&amp;img=5" align="top" title="359545257" width="14" height="14" alt=""/></div>
	  <div>ICQ Buchtik <img src="http://status.icq.com/online.gif?icq=205414335&amp;img=5" align="top" title="205414335"  width="14" height="14" alt=""/></div>
	  <?php
	  
	  if(isset($_SESSION['mobile_logged_in']))
	  {
			{
				echo "<br/><a href=\"index.php?module=faq\" id=\"menu02_link\">Kreditov: <b>$kreditov</b></a><br/>";
				echo "Klik do kreditu: ";
				$klks = $kliknuti_na_kredit - $_SESSION['kliknuti'];
				echo "<b>".$klks."</b><br/>";
			}
			
//			if(in_array($_SESSION['my_id'], $admins))
//			{
//				echo " <span id=\"red\">|</span> do hlas kred: ";
//				$hl = $hlasov_na_kredit - $_SESSION['hls'];
//				echo $hl;
//			}
	  }
	  
	  if(session_is_registered('my_id') && in_array($_SESSION['my_id'], $admins))
	  {
		  echo '<br />- <a href="index.php?module=stats" class="menu01_link">stats</a>';
	  }
	  ?>
    </div>
  </div>
  
  <div id="reklama_lava">
	  <?php
	  
	  $query = "SELECT ID, code FROM mobile_reklama_left WHERE visible=1 ORDER BY selector ASC";
	  $result = $dba->GetResult($query);
	  if($result)
	  {
	  		$check = true;
	  		while($row = mysql_fetch_array($result))
	  		{
	  			if($check)
	  			{
	  				$inc_id = $row['ID'];
	  				$check = false;
	  			}
	  			echo $row['code'].'<br/><br/>';
//	  			$dba->Increment('mobile_reklama_left', 'zobrazeni', $row['ID'], 1);
	  		}
	  		$query = "UPDATE mobile_reklama_left SET zobrazeni = zobrazeni + 1 WHERE visible=1";
	  		$dba->ExecuteQuery($query);
	  		$dba->Increment('mobile_reklama_left', 'selector', $inc_id, 1);
	  }
	  
	  ?>
  </div>