ultimos post en barra lateral

This commit is contained in:
humano 2018-03-26 17:51:56 -05:00
parent c39f6fff9f
commit 4a70186d3d
2 changed files with 24 additions and 17 deletions

View File

@ -1153,8 +1153,6 @@ echo $css_adicional;
<div id='meta_cabecera' class="col-lg-12 col-md-12 "> <div id='meta_cabecera' class="col-lg-12 col-md-12 ">
<div class="container"> <div class="container">
<aside>
</aside>
<div class="col-md-9"> <div class="col-md-9">
<div id='formulario_login' class='' ></div> <div id='formulario_login' class='' ></div>
@ -1204,12 +1202,17 @@ echo $css_adicional;
<div class="container"> <div class="container">
<?php <?php
$ultimos = mas_visto("ultimos","5","1","$set","$id_empresa");
if ($v[0]=='s'){ if ($v[0]=='s'){
$buscar_datos = buscar_datos("*formato*","$set","$plantilla","texto_articulo"); $buscar_datos = buscar_datos("*formato*","$set","$plantilla","texto_articulo");
echo " echo "
<div class='col-md-3'> <div class='col-md-3'>
<aside id='aside_index'>
$buscar_datos $buscar_datos
<div id='grid_resultado_landing'></div> <div id='grid_resultado_landing'></div>
<br>
$ultimos
</aside>
</div> </div>
<div class='col-md-9' id='texto_articulo'>" <div class='col-md-9' id='texto_articulo'>"
; ;

View File

@ -4739,21 +4739,22 @@ return $resultado;
} }
function mas_visto($tipo,$limite,$divider) { function mas_visto($tipo,$limite,$divider,$form,$empresa) {
$resultado= ""; $resultado= "";
$contenido= ""; $contenido= "";
if($divider =="" ) { $divider =6;} if($divider =="" ) { $divider =6;}
$cols = (12/$divider); $cols = (12/$divider);
$titulo[]=""; $titulo[]="";
if ($form !=""){ $w_form = "AND form_id='$form' ";}else{ $w_form="";}
if($tipo =="ultimos") { if($tipo =="ultimos") {
$titulo="LO ÚLTIMO"; $titulo="LO ÚLTIMO";
$consulta ="SELECT * FROM `form_datos`, form_id WHERE `form_datos`.form_id = form_id.id AND form_id.publico = '1' GROUP BY form_datos.control ORDER BY form_datos.timestamp DESC LIMIT $limite"; $consulta ="SELECT * FROM `form_datos`, form_id WHERE `form_datos`.form_id = form_id.id AND form_id.publico = '1' $w_form GROUP BY form_datos.control ORDER BY form_datos.timestamp DESC LIMIT $limite";
} }
elseif($tipo =="aleatorios" ){ elseif($tipo =="aleatorios" ){
$tipo = "ultimos"; $tipo = "ultimos";
$titulo="TE INTERESA"; $titulo="TE INTERESA";
$consulta ="SELECT * FROM `form_datos`, form_id WHERE `form_datos`.form_id = form_id.id AND form_id.publico = '1' GROUP BY form_datos.control ORDER BY RAND() LIMIT $limite"; $consulta ="SELECT * FROM `form_datos`, form_id WHERE `form_datos`.form_id = form_id.id AND form_id.publico = '1' $w_form GROUP BY form_datos.control ORDER BY RAND() LIMIT $limite";
} }
else{ else{
$consulta ="SELECT * FROM `form_parametrizacion` WHERE `opcion` LIKE '$tipo' ORDER BY CAST(descripcion AS SIGNED ) DESC LIMIT $limite"; $consulta ="SELECT * FROM `form_parametrizacion` WHERE `opcion` LIKE '$tipo' ORDER BY CAST(descripcion AS SIGNED ) DESC LIMIT $limite";
@ -4780,15 +4781,15 @@ $link=Conectarse();
//$impresion = mostrar_identificador("$row[campo]","","landingpage","",""); //$impresion = mostrar_identificador("$row[campo]","","landingpage","","");
$contenido .= " $contenido .= "
<article class='col-lg-$cols col-md-$cols col-sm-$cols col-xs-6 col-xxs-12 animate-box'> <article class='col-lg-$cols col-md-$cols col-sm-$cols col-xs-6 col-xxs-12 animate-box'>
<figure> <figure class='vistos_figure'>
<a href='I$row[campo]'> <a href='i$row[campo]'>
<img style=' max-height:320px;' class=' img-responsive img-rounded ' src ='milfs/images/secure/?file=300/$imagen[0]'> <img style=' max-height:320px;' class=' img-responsive img-rounded ' src ='milfs/images/secure/?file=300/$imagen[0]'>
</a> </a>
</figure> </figure>
<span class='fh5co-meta'><a href='I$row[campo]'>$formulario_titulo[0] </a> <span class='vistos_encabezado'><a href='i$row[campo]'>$formulario_titulo[0] </a>
<span class=' fh5co-date'><i class='glyphicon glyphicon-eye-open'></i> $row[descripcion]</span> <span class=' fh5co-date'><i class='glyphicon glyphicon-eye-open'></i> $row[descripcion]</span>
</span> </span>
<h4 style='word-wrap: break-word; ' class='fh5co-article-title'><a href='I$row[campo]'>$titulo[0]</a></h4> <h4 style='word-wrap: break-word; ' class='fh5co-article-title'><a href='i$row[campo]'>$titulo[0]</a></h4>
</article> </article>
"; ";
@ -4828,7 +4829,11 @@ $link=Conectarse();
} }
elseif($tipo =='ultimos') { elseif($tipo =='ultimos') {
//while( $row = mysqli_fetch_array( $sql ) ) { //while( $row = mysqli_fetch_array( $sql ) ) {
while( $row = mysqli_fetch_array( $sql ) ) { while( $row = mysqli_fetch_array( $sql ) ) {
if($form ==""){ $datos_formulario =" <h4 style='word-wrap: break-word; ' class='article-title'><a href='i$row[control]'>$row[nombre]</a></h4>";}
else{$datos_formulario ="";}
//$formulario = remplacetas('form_datos','control',"$row[control]",'form_id',"") ; //$formulario = remplacetas('form_datos','control',"$row[control]",'form_id',"") ;
//$formulario_titulo = remplacetas('form_id','id',"$formulario[0]",'nombre',"") ; //$formulario_titulo = remplacetas('form_id','id',"$formulario[0]",'nombre',"") ;
@ -4853,12 +4858,12 @@ $link=Conectarse();
$contenido .= " $contenido .= "
<article class='col-lg-$cols col-md-$cols col-sm-$cols col-xs-6 col-xxs-12 animate-box'> <article class='col-lg-$cols col-md-$cols col-sm-$cols col-xs-6 col-xxs-12 animate-box'>
<figure> <figure>
<a href='I$row[control]'> <a href='i$row[control]'>
<img style=' max-height:320px;' class=' img-responsive img-rounded' src ='milfs/images/secure/?file=300/$imagen[0]'> <img style=' max-height:320px;' class=' img-responsive img-rounded' src ='milfs/images/secure/?file=150/$imagen[0]'>
</a> </a>
</figure> </figure>
<span class='fh5co-meta'><a href='I$row[control]'>$titulo_post[0] </a></span> <span class='fh5co-meta'><a href='i$row[control]'>$titulo_post[0] </a></span>
<h4 style='word-wrap: break-word; ' class='fh5co-article-title'><a href='I$row[control]'>$row[nombre]</a></h4> $datos_formulario
</article> </article>
"; ";
} }
@ -5222,8 +5227,7 @@ $acciones="
$resultado = " $resultado = "
<a name='cabecera'></a> <a name='cabecera'></a>
<h1><a href='b$id_form'>$nombre[0]</a></h1>
<h2>$descripcion[0]</h2>
$acciones $acciones
<div id='mostrar_resultado' class='mostrar_resultado_landingpage'> <div id='mostrar_resultado' class='mostrar_resultado_landingpage'>
<!-- landingpage_contenido_identificador() --> <!-- landingpage_contenido_identificador() -->