<?php

	require_once('modules/initiate.php');
	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
<meta name="description" content="4mobile.sk - Pozadia, melódie, hry a videá pre Váš mobil zadarmo! Stiahnite si do svojho mobilu niektoré z tisícok pozadí, melódií, hier alebo videí!" />
<meta name="keywords" content="pozadia, obrázky, tapety, melódie, videá, hry, pozadia zdarma, obrázky zdarma, tapety zdarma, melódie zdarma, videá zdarma, hry zdarma, pozadia zdarma, obrázky zdarma, tapety zdarma, melódie zdarma, videá zdarma, hry zdarma, pozadia zadarmo, obrázky zadarmo, tapety zadarmo, melódie zadarmo, videá zadarmo, hry zadarmo, pozadia na mobil, obrázky na mobil, tapety na mobil, melódie na mobil, videá na mobil, hry na mobil, sťahovanie do mobilu, sťahovanie na mobil" />
<meta name="Robots" content="index,follow" />
<meta name="GOOGLEBOT" content="index, follow" />
<meta name="verify-v1" content="kc0uB6UN61PtI3gxs4a+K52kQwyZgb2AhHl4nBN2/rA=" />
<!-- This page contains information about: pozadia, obrázky, tapety, melódie, videá, hry, zdarma -->
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="style_alt.css" />
<link rel="icon" type="image/png" href="icon.png" />
<link rel="shortcut icon" type="image/png" href="icon.png" />
<title><?php echo $title; ?></title>
</head>
<body>
<?php
// vlozenie vrchneho logged_in menu
	if(isset($_SESSION['mobile_logged_in']))
	{
		require('modules/logged_menu.php');
	}
	
  
	  $query = "SELECT ID, code FROM mobile_reklama_top WHERE visible=1 ORDER BY selector ASC limit 0, 1";
	  $result = $dba->GetResult($query);
	  if($result && mysql_num_rows($result) == 1)
	  {
	  		echo '<div id="reklama_top">';
	  		while($row = mysql_fetch_array($result))
	  		{
	  			echo $row['code'];
	  			$query = "UPDATE mobile_reklama_top SET zobrazeni = zobrazeni + 1, selector = selector + 1 WHERE ID='".$row['ID']."' limit 1";
	  			$dba->ExecuteQuery($query);
//	  			$dba->Increment('mobile_reklama_top', 'zobrazeni', $row['ID'], 1);
//	  			$dba->Increment('mobile_reklama_top', 'selector', $row['ID'], 1);
	  		}
	  		echo '</div>';
	  }
	  
	  ?>
	  <div style='margin-top: 4px;'>
<script type="text/javascript"><!--
google_ad_client = "pub-4917301309934013";
//728x15, bola vytvorená 15.1.2008
google_ad_slot = "5682488000";
google_ad_width = 728;
google_ad_height = 15;
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<div id="main_div">
<table width="100%"><tr><td><?php

//	$xmas = (fnIsAdmin()) ? '_xmas' : '';

  ?><img src="images/logo_04.jpg" class="logo" alt="4mobile.sk - Pozadia, melóie, hry a videá pre Váš mobil zadarmo!"/></td><td align="right" style='padding-right: 15px;'>
 <?php
	  
	  $query = "SELECT ID, code FROM mobile_reklama_top_right WHERE visible=1 ORDER BY selector ASC limit 0, 1";
	  $result = $dba->GetResult($query);
	  if($result)
	  {
	  		while($row = mysql_fetch_array($result))
	  		{
	  			echo $row['code'];
	  			$query = "UPDATE mobile_reklama_top_right SET zobrazeni = zobrazeni + 1, selector = selector + 1 WHERE ID='".$row['ID']."' limit 1";
	  			$dba->ExecuteQuery($query);
//	  			$dba->Increment('mobile_reklama_top_right', 'zobrazeni', $row['ID'], 1);
//	  			$dba->Increment('mobile_reklama_top_right', 'selector', $row['ID'], 1);
	  		}
	  }
	  
	  ?>
</td></tr></table>
  <table id="main_table">
  	<tr>
  	  <td class="main_table_td01" valign="top">
<?php
// lavy stlpec	  
// vlozenie formularu na prihlasenie pokial uzivatel nie je prihlaseny...

    if(!isset($_SESSION['mobile_logged_in']))
    {
    	include('modules/menu_login_form.php');
    }
    
// ---------------------------------------------
// vlozenie podmenu resp inych sraciek pre hlavny modul VLAVO..
    foreach($modules_left as $mod_left)
    {
    	if($mod_left['parent'] == $module && (!in_array($mod_left['child'], $protected_modules) || session_is_registered('mobile_logged_in')) || $mod_left['parent'] == 'all')
    	{
    		include('modules/'.$mod_left['child'].'.php');
    	}
    }
	
// ---------------------------------------------
// include body modulov
?>
  	  </td>
  	  <td class="main_table_td02" valign="top">
  	  <?php
		if(isset($_SESSION['mobile_active']) && $_SESSION['mobile_active'] == 't' && !in_array($module, array('setup_form', 'activate', 'send_email')))
		{
		echo "<div class='alert'>Z dôvodu veľkého množstva špekulatívnych registrácíí sme sa rozhodli zaviesť registrácie viazané na emailovú adresu.<br/><br/>
				Všetky existujúce kontá je nutné aktivovať v časti nastavenia vyplnením platnej emailovaj adresy, na ktorú si kliknutím na odkaz dáte zaslať
				aktivačný mail, v ktorom Vám bude doručená aktivačná linka, po ktorej navštívení bude Vaše konto aktivované.<br/><br/>
				Pokiaľ Vaše konto nebude aktivované, NEBUDÚ VÁM PRIPOČÍTAVANÉ KREDITY!!!<br/><br/>";
		
			echo "Aktivovať konto si môžete v časti <a href='http://4mobile.peterpech.com/index.php?module=setup_form'>Nastavenia</a>. ";
		
			echo "</div>";
		}
	

	// ******************************** STRED *************************************
	// body-moduly, pokial nie je nalogovany zobrazia sa len nie protected moduly
	
		if(!in_array($module, $protected_modules) || session_is_registered('mobile_logged_in')) $module = $module;
		else $module = 'index';
		if(in_array($module, $modules_body))
		{
			include('modules/'.$module.'.php');
		}
	
	// modul natvrdo vyzadovany nejakoym top modulom
	if(isset($hard_require_module) && $hard_require_module<>'')
	{
		if(in_array($hard_require_module, $modules_body))
		{
			include('modules/'.$hard_require_module.'.php');
		}
	}
	
?>
  	  </td>
	  <td class="main_table_td01" valign="top">
<?php
// ---------------------------------------------
// vlozenie podmenu resp inych sraciek pre hlavny modul VPRAVO..

	//testovaci caal priatelov menu
//	if(fnIsAdmin())
//	{
//		include('modules/friends_menu.php');
//	}

    foreach($modules_right as $mod_right)
    {
    	if(($mod_right['parent'] == $module|| $mod_right['parent'] == 'all') && (!in_array($mod_right['child'], $protected_modules) || session_is_registered('mobile_logged_in')))
    	{
    		include('modules/'.$mod_right['child'].'.php');
    	}
    }
?>
  	  </td>
  	</tr>
  </table>
</div>
  <div id="time">
  <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td id="footer"><span class="red">4</span>mobile.sk <span class="red">|</span> Created by Pesto &amp; Buchtík</td>
      <td align="right"><?php echo round(fnExec_time() - $start_time, 5); ?> 
      
      <a href="http://www.toplist.cz/"><script language="JavaScript" type="text/javascript">
<!--
document.write ('<img src="http://toplist.cz/dot.asp?id=209538&http='+escape(document.referrer)+'&wi='+escape(window.screen.width)+'&he='+escape(window.screen.height)+'&cd='+escape(window.screen.colorDepth)+'&t='+escape(document.title)+'" width="1" height="1" border=0 alt="TOPlist" />');
//-->
</script><noscript><img src="http://toplist.cz/dot.asp?id=209538" border="0" alt="TOPlist" width="1" height="1" /></noscript>
	</a>
</td>
    </tr>
    <tr><td colspan='2' class='footer'>Partneri: 
    	<a href='http://3p.peterpech.com' target="_blank">Peter Pech - Fotografie krajiny a prírody</a> |
    	<a href='http://www.mobitola.sk/' target="_blank">Špecifikácie mobilov</a> | 
    	<a target="_blank" title="Java hry zadarmo" href="http://java-hry.4mobil.sk/">Java hry</a> |  
		<a target="_blank" title="Obrázky na mobil zadarmo" href="http://obrazky.4mobil.sk/">Obrázky na mobil</a> |  
		<a target="_blank" title="Témy na mobil zadarmo" href="http://temy.4mobil.sk/">Témy na mobil</a> |  
		<a target="_blank" title="ICQ Jimm na mobil " href="http://icqmobil.info/">ICQ na mobil</a> |  
		<a target="_blank" title="Mp4 Video zadarmo" href="http://www.mp4-video.4mobil.sk">Mp4 Video</a> |  
		<a target="_blank" title="3gp video zadarmo" href="http://www.3gp.4mobil.sk/">3gp video</a> |  
		<a target="_blank" title="UIQ Symbian" href="http://www.uiq.sk">UIQ Symbian</a> |  
		<a target="_blank" title="Tapety a pozadia na mobil" href="http://tapety-pozadia.4mobil.sk/">Tapety a pozadia na mobil</a> |  
		<a target="_blank" title="Java hry zdarma " href="http://java-hry.na-mobil-zdarma.cz/">Java hry</a> |  
		<a target="_blank" title="Obrázky na mobil zdarma" href="http://obrazky.na-mobil-zdarma.cz/">Obrázky na mobil</a> |  
		<a target="_blank" title="Schémata na mobil zdarma" href="http://schemata.na-mobil-zdarma.cz/">Témy na mobil</a> |  
		<a target="_blank" title="Mp4 Video zdarma" href="http://www.mp4-video.na-mobil-zdarma.cz">Mp4 Video</a> |  
		<a target="_blank" title="UIQ Symbian" href="http://www.uiq.cz">UIQ Symbian</a> | 
		<a target="_blank" title="Tapety a pozadia na mobil" href="http://tapety-pozadi.na-mobil-zdarma.cz/">Tapety a pozadi na mobil</a> 
    	</td></tr>
  </table>
  </div>
  <div id="reklama_bottom">
  <?php
	  
	  $query = "SELECT ID, code FROM mobile_reklama_bottom WHERE visible=1 ORDER BY selector ASC limit 0, 1";
	  $result = $dba->GetResult($query);
	  if($result)
	  {
	  		while($row = mysql_fetch_array($result))
	  		{
	  			echo $row['code'];
	  			$query = "UPDATE mobile_reklama_bottom SET zobrazeni = zobrazeni + 1, selector = selector + 1 WHERE ID='".$row['ID']."' limit 1";
	  			$dba->ExecuteQuery($query);
//	  			$dba->Increment('mobile_reklama_bottom', 'zobrazeni', $row['ID'], 1);
//	  			$dba->Increment('mobile_reklama_bottom', 'selector', $row['ID'], 1);
	  		}
	  }
	  
//	  $dba->showAllQueries();
	  
	  ?>
</div>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-1631733-1";
urchinTracker();
</script>
</body>
</html>