From da43b286c2e05d2960396d28634a79f6fa355e29 Mon Sep 17 00:00:00 2001 From: humano Date: Mon, 2 Apr 2018 09:06:08 -0500 Subject: [PATCH] mejoras en index --- index.php | 44 +++++++++++- milfs/funciones/funciones.php | 130 +++++++++++++++++++++++++--------- 2 files changed, 140 insertions(+), 34 deletions(-) diff --git a/index.php b/index.php index 8878a98..1493227 100644 --- a/index.php +++ b/index.php @@ -77,8 +77,9 @@ $librerias_pie =""; /// k= suite /// l= Listado /// m = checklist - /// n=notas +/// o=parallax + /// p= Planilla /// s= SET DE DATOS * /// S= SET DE DATOS EMBEBIDO @@ -369,6 +370,7 @@ if ($variable !=''){ elseif($v[0] =='c') { /// f= FORMULARIO $form =$v[1]; + //$presentacion = contenido_presentacion("$form"); $presentacion = contenido_presentacion("$form"); $embebido = "1"; $empresa = remplacetas('form_id','id',"$form",'id_empresa',"") ; @@ -737,6 +739,46 @@ $aplicacion_pie=" } } + elseif($v[0] =='o') { + /// f= FORMULARIO + $form =$v[1]; + //$presentacion = contenido_presentacion("$form"); + $presentacion = contenido_parallax("$form","$plantilla"); + $embebido = "1"; + $empresa = remplacetas('form_id','id',"$form",'id_empresa',"") ; + $id_empresa= $empresa[0]; + $logo = remplacetas('empresa','id',$id_empresa,'imagen','') ; + $no_mostrar ="display:none; "; + // if($_REQUEST['tema'] !="") { $tema= "$_REQUEST[tema]";} else {$tema="moon";} + ////$librerias_cabeza =$presentacion_cabeza; + //$librerias_pie =$presentacion_pie; + $banner = banner_empresa("$id_empresa","$form"); + $onload=" + +
+
+ $banner +
+ + + $presentacion + + "; + } else{ diff --git a/milfs/funciones/funciones.php b/milfs/funciones/funciones.php index 54b97f9..d9f5711 100644 --- a/milfs/funciones/funciones.php +++ b/milfs/funciones/funciones.php @@ -1,5 +1,48 @@ $titulo[0] +

$descripcion[0]

+ + "; + + }else{$formulario="";} + + $razon_social = remplacetas('empresa','id',"$id_empresa",'razon_social','') ; + $slogan = remplacetas('empresa','id',"$id_empresa",'slogan','') ; + $web = remplacetas('empresa','id',"$id_empresa",'web',''); + $logo = remplacetas('empresa','id',"$id_empresa",'imagen','') ; + + $resultado=" +
+
+ + + +
+
+

+ $razon_social[0]

+
+

$slogan[0]

+ $formulario +
+
+
+ + + "; +return $resultado; + } + + function vista_favorita($form_id){ $favorita=""; $vista_favorita = remplacetas('form_parametrizacion','campo',$form_id,'descripcion'," tabla='form_id' AND opcion='vista_favorita'") ; @@ -11410,14 +11453,14 @@ while( $row = mysqli_fetch_array( $sql ) ) { -function contenido_parallax($id){ +function contenido_parallax($id,$plantilla){ $div = "contenedor"; - $respuesta = new xajaxResponse('utf-8'); +// $respuesta = new xajaxResponse('utf-8'); $campo_titulo = remplacetas('form_parametrizacion','campo',$id,'descripcion'," tabla='form_id' and opcion = 'titulo'") ; if($campo_titulo[0] !='') {$w_campo = "AND id_campo = '$campo_titulo[0]'";} $campo_titulo = $campo_titulo[0]; -$consulta ="SELECT *,GROUP_CONCAT(id ORDER by timestamp desc ) as identificador FROM form_datos WHERE form_id = '$id' $w_campo GROUP BY control order by contenido"; +$consulta ="SELECT *, control as identificador FROM form_datos WHERE form_id = '$id' $w_campo GROUP BY control order by id DESC "; $link=Conectarse(); $sql=mysqli_query($link,$consulta); if (mysqli_num_rows($sql)!='0'){ @@ -11429,8 +11472,17 @@ if (mysqli_num_rows($sql)!='0'){ while( $row = mysqli_fetch_array( $sql ) ) { //$orden = $orden+500; $identificador = explode(',',$row[identificador]); - $identificador = $identificador[0]; - $contenido_desplegado = contenido_mostrar("$row[form_id]","$row[control]",'','contenido'); + $identificador = $row['control']; $identificador[0]; + + + $campo_imagen = buscar_campo_tipo("$id","15"); + $imagen = remplacetas('form_datos','id_campo',$campo_imagen[0],'contenido'," control = '$row[control]' ") ; + if($imagen[0] ==""){$imagen[0] ="";} + else{$imagen[0] = $imagen[0];} + + + + $contenido_desplegado = contenido_mostrar("$row[form_id]","$row[control]",'',"$plantilla"); $titulo = remplacetas('form_datos','id',$identificador,'contenido',"") ; $nav_li .="