<?php include 'concha.php';
?>



<?


  
$e = $_GET['e'];

  include 'concha.php';


mysql_connect ("$host", "$usuario", "$contra");


mysql_select_db ("$basedatos");


$sql = "SELECT * FROM menu WHERE ID = '$e'";


$consulta = mysql_query ($sql);


while ($row = mysql_fetch_array($consulta))


{


$texto= $row["link"];


$url = $row["url"];



$titulo = $row["titulo"];





 }


mysql_free_result($consulta);

?>

<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<?php include 'concha.php';?>
<title><?php echo $nombresitio ?> - <?php echo $titulo ?></title>

 
<!-- Mobile viewport -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

<link rel="shortcut icon" href="images/favicon.ico"  type="image/x-icon">

<!-- CSS-->
<!-- Google web fonts. You can get your own bundle at http://www.google.com/fonts. Don't forget to update the CSS accordingly!-->
<link href='http://fonts.googleapis.com/css?family=Droid+Serif|Ubuntu' rel='stylesheet' type='text/css'>

<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="js/flexslider/flexslider.css">
<link rel="stylesheet" href="css/basic-style.css">

<!-- end CSS-->
    
<!-- JS-->
<script src="js/libs/modernizr-2.6.2.min.js"></script>
<!-- end JS-->


<!-- columns demo style. DELETE IT! -->
<style type="text/css">
<!--

#columnsdemo .grid_1,
#columnsdemo .grid_2,
#columnsdemo .grid_3,
#columnsdemo .grid_4,
#columnsdemo .grid_5,
#columnsdemo .grid_6,
#columnsdemo .grid_7,
#columnsdemo .grid_8,
#columnsdemo .grid_9,
#columnsdemo .grid_10,
#columnsdemo .grid_11,
#columnsdemo .grid_12 {
border: solid 1px #999;
color:#999;
text-align: center;
margin-top:20px;
padding:20px 15px;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>

<body id="home">
  
<!-- header area -->
    <header class="wrapper clearfix">
		       
        <div id="banner">        
        	<div id="logo"><a href="index.php"><img src="<?php echo $logo_C ?>" alt="logo"></a></div> 
      </div>
        
    <?php  include 'menu.php';?>
  
    </header><!-- end header -->
 
 
      
      
    <!-- columns demo, delete it!-->
    <section id="columnsdemo" style="margin-bottom:60px; width:100%" class="clearfix">

 
        
 
        
         <div class="grid_12">
         
         
         
         
<?


//NOMBRE DEL ARCHIVO PHP
$pagina = "archivo.php";
//NOMBRE DE LA TABLA ADONDE SE QUIERE REALIZAR LA CONSULTA
$tabla = "notas";
//CANTIDAD DE RESULTADOS POR TABLA
$c = 20;

$ID = $_GET['ID'];
$i = $_GET['i'];
$p = $_GET['p'];
if ($i == NULL) {$i = 0; $p = 1;} else {};


mysql_connect ("$host", "$usuario", "$contra");
mysql_select_db ("$basedatos");
$sql = "SELECT * FROM $tabla WHERE ver = 'si' ORDER BY ID desc LIMIT $i,$c";
$consulta = mysql_query ($sql);
while ($row = mysql_fetch_array($consulta))
{

$i_d = 0;

$ID = $row["ID"];
$visitas = $row["visitas"];


$titulo = $row["titulo"];
$bajada = $row["bajada"];
$color = $row["color"];
$carpetafoto  = $row["carpetafoto"];

$foto = $row["foto"];
$destacado = $row["destacado"];
$audio = $row["audio"];
$youtube = $row["youtube"];

$d = $row["d"];


$m = $row["m"];


$a = $row["a"];

$fecha = "$d - $m - $a";


?>


        
        
<div class="news news-r ">
	<div class="mg">
          <?php if ($foto == NULL) {} else {?>    
    <a href="<? echo $dom;?>/movil/nota.php?ID=<?php echo $ID ?>" title="Leer m&aacute;s"><img height="75" width="110"  src="<? echo $dom;?>/<?php echo $carpetafoto ?>/thumbnail_<?php echo $foto ?>.jpg" border="0" /></a>
    <?php };?>
    
    </div>
	<div class="hd">
		<a href="<? echo $dom;?>/movil/nota.php?ID=<?php echo $ID ?>"><?php echo $titulo ?> - <?php echo $d ?>/<?php echo $m ?>/<?php echo $a ?>
        
     </a>
        
        
        
	</div>
	<p><?php echo $bajada ?></p>
<hr>
</div>



          <?


 }
mysql_free_result($consulta);

?>   












<?php 
$cant = 0;
mysql_connect ("$host", "$usuario", "$contra");
mysql_select_db ("$basedatos");
$sql = "SELECT * FROM $tabla";
$consulta = mysql_query ($sql);
while ($row = mysql_fetch_array($consulta))
{
$cant = $cant + 1;
}

mysql_free_result($consulta);

$cant = $cant + $c - 1;
$cant = $cant / $c;
$cant = (int) $cant; //esto es un integer
$pag = 1;
$cuenta = 1;
?>
                <div align="center" class="Estilo1">
                  <?php if ($p == 1) {} else { ?>
                  &laquo;&laquo; <a href="<?php echo $pagina ?>?i=<?php echo $i - $c; ?>&amp;p=<?php echo $p - 1; ?>">Anterior</a>
                  <?php }?>
                  -
                  <?php if ($p == $cant) {} else { ?>
                  <a href="<?php echo $pagina ?>?i=<?php echo $i + $c; ?>&amp;p=<?php echo $p + 1; ?>">Siguiente</a> &raquo;&raquo;
                  <?php }?>
                </div>
                <div align="center"><br />
              |
                <?
while ($cuenta <= $cant) {
if ($cuenta == $p) {
?>
                <span class="Estilo5 Estilo20"><strong><?php echo $cuenta ?></strong></span><span class="Estilo5"> |</span>
                <?
} else {
?>
                <a href='<?php echo $pagina ?>?i=<?php echo $pag ?>&amp;p=<?php echo $cuenta ?>'> <span class="Estilo5"><?php echo $cuenta ?></span></a><span class="Estilo5"> |</span>
                <?

};

$pag = $pag + $c;
$cuenta++;
}
?>

         
        
         </div>
  
     
    </section>
    <!-- end columns demo -->  
    
      
  </div><!-- #end div #main .wrapper -->


<!-- footer area -->    
<footer>
	<div id="colophon" class="wrapper clearfix">
<?php echo     	$nombresitio ?>
    </div>
    

    
</footer><!-- #end footer area --> 


<!-- jQuery -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.9.0.min.js">\x3C/script>')</script>

<script defer src="js/flexslider/jquery.flexslider-min.js"></script>

<!-- fire ups - read this file!  -->   
<script src="js/main.js"></script>

</body>
</html>