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 class="container">
<aside>
</aside>
<div class="col-md-9">
<div id='formulario_login' class='' ></div>
@ -1204,12 +1202,17 @@ echo $css_adicional;
<div class="container">
<?php
$ultimos = mas_visto("ultimos","5","1","$set","$id_empresa");
if ($v[0]=='s'){
$buscar_datos = buscar_datos("*formato*","$set","$plantilla","texto_articulo");
echo "
<div class='col-md-3'>
<aside id='aside_index'>
$buscar_datos
<div id='grid_resultado_landing'></div>
<br>
$ultimos
</aside>
</div>
<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= "";
$contenido= "";
if($divider =="" ) { $divider =6;}
$cols = (12/$divider);
$titulo[]="";
if ($form !=""){ $w_form = "AND form_id='$form' ";}else{ $w_form="";}
if($tipo =="ultimos") {
$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" ){
$tipo = "ultimos";
$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{
$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","","");
$contenido .= "
<article class='col-lg-$cols col-md-$cols col-sm-$cols col-xs-6 col-xxs-12 animate-box'>
<figure>
<a href='I$row[campo]'>
<figure class='vistos_figure'>
<a href='i$row[campo]'>
<img style=' max-height:320px;' class=' img-responsive img-rounded ' src ='milfs/images/secure/?file=300/$imagen[0]'>
</a>
</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>
<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>
";
@ -4828,7 +4829,11 @@ $link=Conectarse();
}
elseif($tipo =='ultimos') {
//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_titulo = remplacetas('form_id','id',"$formulario[0]",'nombre',"") ;
@ -4853,12 +4858,12 @@ $link=Conectarse();
$contenido .= "
<article class='col-lg-$cols col-md-$cols col-sm-$cols col-xs-6 col-xxs-12 animate-box'>
<figure>
<a href='I$row[control]'>
<img style=' max-height:320px;' class=' img-responsive img-rounded' src ='milfs/images/secure/?file=300/$imagen[0]'>
<a href='i$row[control]'>
<img style=' max-height:320px;' class=' img-responsive img-rounded' src ='milfs/images/secure/?file=150/$imagen[0]'>
</a>
</figure>
<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>
<span class='fh5co-meta'><a href='i$row[control]'>$titulo_post[0] </a></span>
$datos_formulario
</article>
";
}
@ -5222,8 +5227,7 @@ $acciones="
$resultado = "
<a name='cabecera'></a>
<h1><a href='b$id_form'>$nombre[0]</a></h1>
<h2>$descripcion[0]</h2>
$acciones
<div id='mostrar_resultado' class='mostrar_resultado_landingpage'>
<!-- landingpage_contenido_identificador() -->