<? 
require_once('require/config.inc.php5');

$url = mysql_real_escape_string ( $_GET ['u']);
if($url == 'movies'){
	$idioma = 2;
	$titulo = 'Movies';
}elseif($url == 'videos'){
	$idioma = 1;
	$titulo = 'Vídeos';
}

  $_SESSION['IDIOMA'] = $idioma;
	$css = 'empresa';
	include('require/doctype.inc.php5');
	
	$numPhoto = 1;
	
?>

</head>

<body>

<div id="wrap">
	<div id="top">
    	<div id="language">
             <a href="<?=$urlSite;?>/videos/videos.html" title="Mudar para Portugu&ecirc;s" class="disabled"><img src="<?=$urlSite;?>/img/brasil.png" alt="" /></a>
			 <a href="<?=$urlSite;?>/videos/movies.html" title="Change to English" class="enable"><img src="<?=$urlSite;?>/img/usa.png" alt="" /></a>
		</div><!--end language-->
    	<?php require_once('require/logo.php5');    ?><!--end logo-->
        <div id="title_container">
        	<div class="title"><span class="text"><?=$titulo?></span><span class="corner_title">&nbsp;</span></div>
        </div><!--end title-->
    	<div class="photo" style="background:url(<?=$urlSite;?>/img/topo/bg_top<?=$numPhoto;?>.png) no-repeat top left;" >
         &nbsp;
        </div><!--end photo-->
    </div><!--end top-->
    <div id="middle">
    	<div id="left_col">
           <?
				require_once("require/menu.php5");
			?>
        	<div id="footer">
    <?
													require_once ("require/rodape.php5");
													?>        	



            </div><!--end footer-->
        </div><!--end left_col-->
        
        <div id="right_col">
            <div id="content">
  <?
$cont2 = 1;
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"10\"><tr>\n";

$objCon->selectTab('video','*','ORDER BY idVideo DESC');
while($lh = mysql_fetch_array($objCon->resultado)){
	$imagem = $lh['imagem'];
	$titulo = stripcslashes($lh['titulo']);
	$legenda = stripcslashes($lh['legenda']);
	$video = $lh['video'];
	$codigo = $lh['idVideo'];
	
	$img = getConteudo("/v/","&",$video);
	$imagem = "http://i1.ytimg.com/vi/$img/hqdefault.jpg";
	
	
	
	$chars = array('width="600" height="525"', 'width="560" height="340"', 'width="660" height="525"','width="640" height="385"', 'width="500" height="405"', 'width="445" height="364"', 'width="340" height="285"', 'width="640" height="505"', 'width="" height="344"', 'width="480" height="295"', 'color1=', 'color2=', 'border='); // 
// CARACTERES QUE IRAO SUBSTITUI-LOS
$chars2 = array('width="425" height="355"','width="425" height="355"', 'width="425" height="355"', 'width="425" height="355"', 'width="425" height="355"', 'width="425" height="355"', 'width="425" height="355"', 'width="425" height="355"', 'width="425" height="355"', 'width="425" height="355"', '', '', '');

$video1 = str_replace($chars,$chars2,$video);

	

 if($cont2%2 ==1 or $cont2 ==1)
	 echo "<tr>";
?>
<td>
<a class="linkDestaque"  href="#Video_<?=$cont2?>" href="<?=$urlSite?>/videos.php5?cod=<?=$codigo?>"><img src="<?=$imagem?>" border="0" style="width:230px" /></a>
<br />
<h3></h3><a class="linkDestaque"  href="#Video_<?=$cont2?>" href="<?=$urlSite?>/videos.php5?cod=<?=$codigo?>"><?=$titulo?></a></h3>
<div style="display:none" id="Video_<?=$cont2?>"><?=$video1?></div>
</td>
<?
if ($cont2%2 ==0)
echo "</tr>";	
$cont2++; 
		} // FECHA O LACO
echo "</table>";	

?>	
            
            
            </div><!--end content-->
        </div><!--end right_col-->
          <div id="assinatura">
			<?
                require_once("require/assinatura.php5");
            ?>
  		</div>
  </div><!--end middle-->
</div><!--end wrap-->

</body>
</html>