<?php
require "settings.php";
require "db_sql/db_connect.$PHP_EXTENSION";
require "security.$PHP_EXTENSION";
require "functions.$PHP_EXTENSION";

$DB_link = db_connect();
$DB = new sql($DB_link);
$DB2 = new sql($DB_link);

if(!$lang)
   $lang = $DB->first_record("SELECT obrevation FROM am_languages WHERE on_off=1");

$id = get_user_id();

require "header.$PHP_EXTENSION";
$flash = $DB->first_record("SELECT  value FROM am_settings WHERE name='Main page flash link' AND lang='$lang'");

$common_header = getHeader();
$header_report = getHeaderReport(0, $id);
echo $common_header;
echo $header_report;
getBodyHeader();
/*********************** prisijungimas *******************/
	if ($id){
		$login_body = user_logged($id);
	}
	else { 
	$login_body = prisijungti(); 
} 
echo $login_body;
getBody();
require( "stat.".$PHP_EXTENSION );


	
function getBody()
{
  global $PHP_EXTENSION, $flash;
?>
 <img src="images/gray.gif" width="180" height="1" vspace="10" border="0"><br>
 svetainę sukūrė: <a href="http://www.amstudio.lt" target="_blank">amstudio</a>
 </td>
 <td width="20" valign="top"><img src="images/spacer.gif" width="20" height="1"></td>
 <td width="555" valign="top"><img border="0" src="images/gray.gif" width="555" height="1"><br> 
 <table width="555" border="0" cellspacing="0" cellpadding="0">
   <tr> 
    <td height="40">
    <table border="0" cellspacing="0" cellpadding="0" bgcolor="#939393">
	<form method="post" action="vid.<?="$PHP_EXTENSION?mid=2"?>">
      <tr> 
        <td><img border="0" src="images/spacer.gif" width="15" height="15"></td>
        <td class="white">Paieška</td>
        <td> <img border="0" src="images/spacer.gif" width="16" height="20"></td>
     </tr>
    </table>
    </td>
    <td align="center">
	<table width="180" border="0" cellspacing="0" cellpadding="0">
      <tr> 
         <td width="118" height="38"><input name="search_word" type="text" class="laukelis" size="2"></td>
         <td width="62" align="right"><input class="mygtukas" type="submit" value="Ieškoti" name="submit"></td>
      </tr>
    </table>
    </td>
    <td align="center">
	<table border="0" cellspacing="0" cellpadding="0">
      <tr> 
        <td width="66" height="38">Rodyti po:</td>
        <td width="42">
		 <select name="kiek" class="laukelis">
         <option selected>12</option>
         <option>24</option>
         <option>36</option>
         <option>48</option>
         </select>
		</td>
		<input type="hidden" name="in_search" value="1">
		</form>
      </tr>
     </table>
     </td>
     <td align="right"><a href="vid.<?=$PHP_EXTENSION?>?mid=2&advs=1">Išplėstinė paieška</a></td>
     </tr>
     </table>
	   <img border="0" src="images/gray.gif" width="555" height="1"><br>
       <img src="images/spacer.gif" width="1" height="15">
	   <br>
       
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0',
'width','555',
'height','366',
'src','<?=$flash?>',
'quality','high',
'pluginspage','http://www.macromedia.com/go/getflashplayer',
'movie','<?=$flash?>' ); //end AC code
</script>
       
        
        
		<img src="images/spacer.gif" width="1" height="10"><br>
	   Paupio 16, LT-2014 Vilnius tel./faks. +370 5 2600030 mob. tel. +370 659 22456 <a href="mailto:info@fotos.lt">info@fotos.lt</a><br><Br>
	</td>
    </tr>
  </table>
</body>
</html>
<?
}
function getBodyHeader()
{
?>
<table width="770" border="0" cellspacing="0" cellpadding="0">
 <tr> 
  <td width="15" valign="top"><img src="images/spacer.gif" width="15" height="1" vspace="10"></td>
  <td width="180" valign="top"><img border="0" src="images/gray.gif" width="180" height="1"><br>
  <img src="images/spacer.gif" width="1" height="10"><br>
<?php
}

?>