From 3bd6a114264572d7a246040a29236df63e0c4f34 Mon Sep 17 00:00:00 2001 From: humano Date: Wed, 18 Feb 2015 10:50:45 -0500 Subject: [PATCH] Cambios en el manejo de imagenes adjuntas , ahora se debe incluir expresamente un campo de tipo imagen en cada formulario, para compativilidad hacia atras revisar leer el readme.md --- API.md | 10 +++++ README.md | 6 +++ milfs.sql.gz | Bin 7755 -> 5641 bytes milfs/funciones/funciones.php | 82 +++++++++++++++++++++++++--------- 4 files changed, 76 insertions(+), 22 deletions(-) diff --git a/API.md b/API.md index d1b3245..87453b7 100644 --- a/API.md +++ b/API.md @@ -12,6 +12,15 @@ Consulta todo el contenido que se ha introducido en un formulario pasándole el id como parametro. http://localhost/milfs/api.php?identificador=04718326a4922f93d9f7b5f6f682d111 + + +Para que se muestren las imagenes por medio de la api.php en las versiones antes del 20150218 +se debe hacer la siguiente entrada en el mysql + +INSERT INTO `form_campos` (`id`, `id_especialista`, `id_empresa`, `campo_nombre`, `campo_descripcion`, `campo_tipo`, `campo_area`, `orden`, `activo`, `identificador`, `bloqueo`, `tipo_contenido`) VALUES +(0, 0, 1, 'imagen', 'Campo especial para la imagen', 15, 0, 0, 1, 'imagen', 0, ''); + + Consulta todos los datos que se han llenado en cada formulario pasando el identificador como parametro, cabe anotar que cuando se edita un formulario se guarda la versión anterior de este campo por lo que si @@ -19,6 +28,7 @@ se quiere conocer el estado actual de un formulario que ha sido editado, debería filtrarse por timestamp para conocer su ultima versión o vesiones anteriores. + http://qwerty.co/demo/api.php?dato=126 Consulta la info sobre un dato en concreto pasando el id del dato como parametro. diff --git a/README.md b/README.md index 6457f30..f39f2b1 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,12 @@ https://github.com/humano/milfs/blob/master/milfs/images/secure/index.php Linea 22 cambiando HTTP por HTTPS + +Para que se muestren las imagenes por medio de la api.php en las versiones antes del 20150218 +se debe hacer la siguiente entrada en el mysql + +INSERT INTO `form_campos` (`id`, `id_especialista`, `id_empresa`, `campo_nombre`, `campo_descripcion`, `campo_tipo`, `campo_area`, `orden`, `activo`, `identificador`, `bloqueo`, `tipo_contenido`) VALUES +(0, 0, 1, 'imagen', 'Campo especial para la imagen', 15, 0, 0, 1, 'imagen', 0, ''); DISFRUTALO. diff --git a/milfs.sql.gz b/milfs.sql.gz index c363c2ccbe4d6d4cad2cbb37107923e68811f5f4..0712b7782ba66439e4365fdb8b46bf9a7840dea0 100644 GIT binary patch literal 5641 zcmV+k7WU~MiwFP!000001I=7XliawKzUx=eb~sY>I~cn0;BpQ);MmWTo} zRsNeaFV2lPWi)<*N0sy^k%){IO4ehv6z9fk5gLe?2DXrE(8560xkHSL8&&v0WYBQk z__^Vpxo3_wMJn&@o43Ya+6?c^h4g0+vq#nM`OV#{neo#2?d{$C;@#uj{4W>R?`HG6 z+xdUb?(cs4y)IWk`|~epB2>Zuu&i^-f}Cg1zWc*(91B^ud9wVL-+l3a!#4SJH=tj90VQ7ob#QVoi+8yPF#|N0SF(EY>vR)DW=|af8FJ zju`lC#E@5ZV4@phQM7(5cV8IIylLgeV9*H~X|t@F3s$6A**ANm{}}}foaZTv zX#C#zKr`I}cAaC}h!!zDNkE(~X!71D#HV6+ORincX$tVVd03C3XQ9^76bVjh?#Sd^J-nH`Kn9mYR!7QOqY>JzNC5~f|iz1uAYrX(AWP> zhN7QnUeJA_UxOz*O6n>Dy=HsmzAcN@!i>MI0q=wnEmi#}`}%j&Sgi$DiJ1bEN^Au! zwa&NnK*;E)o^_ls0aAdBax~c52aK;(VQ%#Ln2vPugGgAU=1dv!5u(-bJ9Rg-ktXBQ z1JIPhqKOrVe!Ep_Dd9T(sCxC#8I*^IB=(} zyyoimVRrv$T-`q2b%~7PG3J1@m=(J)8>(P#5CgMz@Mhzv&C&;(U1w_c{G?erJhOIO z=7<9_M;(c|)hU=`;BJn=vN?{bgX9wG%rVR|w_}dk0|m2P+-7%?n%%`_HjBnA*MYfd z&*soB%`qctB{mso|#9h6^t-n1-T5 z1!nU4z98r_?mnVmh!kp^fj1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Pp zi92~Ux$hTtm=~5kM33XNNN+O{C!)URbBH;&tfDZbUaLfcDv5uICsERbUZ{{55M8gFW$NezV^*hl6q66g- zFY*|UNE~``kV^2q1GldljeH<`fqBsgQ@i`R5!8YCUECS3|i$sbo3{YBo zv7j9KBB^51zFN@_NeEILvo0(5AXah{PZ4)81A#jvsKdTO}BdHa@Fh?bvM zMh3UAQ!y>0PzfKjQ29uNUVumxaU`TxKBv0{&g_bm_XO?GbiQG5G0c`9hvxO5D$q2H zyif=RlP9Qovr7kf_n}s^3S%R9)H_7{o~#;b=Sw{kx7DSk4eSb-d2@=8JPIjgG!9ja zHIg`DEb?H=cd)B*Ax_Qrjp*EZ4+`7~tx6{%f7Hg_-7+IzH+FPpyty*qZZn*tmoJ^y zZ%)sT-u#{O*C&5h`Wxd7k9^xtpJ<)&1w_~1K;9$V%iKWRwdrp!PXFfZiA`RAzx(60 zgnhfydr9A>ZncHJcEW8baQ-mY6^XKdG_*VEXVoX)2;R2oLs#$formulario_descripcion[0] $impresionPoweredy by MILFS"; return $muestra_form ; } @@ -21,7 +21,7 @@ function json($datos){ WHERE form_datos.id_campo = `form_campos`.id AND form_datos.form_id = `form_id`.id AND (form_id = '$datos[id]' ) - $publico + $publico ORDER BY form_datos.control ,form_datos.timestamp "; } elseif($datos[identificador] !=''){ @@ -63,11 +63,13 @@ function json($datos){ if (mysql_num_rows($sql)!='0'){ $id = 1; $features = array(); + while($row = mysql_fetch_array( $sql )) { $features[] = $row; $i++; } + /* while( $row = mysql_fetch_array( $sql ) ) { $marcador = array(); @@ -870,8 +872,8 @@ $xajax->registerFunction("cambiar_imagen"); function limpiar_caracteres($valor){ -$b=array("{","}","]","/","[",";","¡","!","¿","?","'",'"',"'" ); -$c=array(" "," "," "," "," "," "," "," "," "," "," ",""); +$b=array("{","}","]","[",";","¡","!","¿","?","'",'"' ); +$c=array(" "," "," "," "," "," "," "," ","'"," "); $resultado=str_replace($b,$c,$valor); return $resultado ; } @@ -1178,19 +1180,23 @@ if (mysql_num_rows($sql)!='0'){ return $resultado; } -function subir_imagen($respuesta){ +function subir_imagen($respuesta,$id){ ///vinculado con la funcion de javascript resultadoUpload(estado, file) que esta en librerias/scripts.js - +//this.form.taget= 'ventana'; this.form.action = 'destinoEspecial.html'; this.form.submit()" $javascript="includes/upload.php"; +if ($id ==''){$id='imagen';} $resultado .=" +
- +target='iframeUpload' class='form-horizontal' name='subir_imagen_$id' id='subir_imagen_$id'> + +
La imagen debe estar en formato .jpg y de tamaño máximo 4MB
-
"; + +"; return $resultado; } @@ -2787,19 +2793,24 @@ $consulta =" ";} elseif($campo_tipo_accion == 'textarea'){ $render = " "; - } + } + //$subir_imagen = subir_imagen(''); + elseif($campo_tipo_accion == 'imagen'){ + $render= " "; //subir_imagen('',$id_campo[$item]); + } + elseif($campo_tipo_accion == 'html'){ $render = " "; } elseif($campo_tipo_accion == 'limit'){ - $limite = limite("".$id_campo."[".$item."]",''); + $limite = limite("".$id_campo."[".$item."]",'','limite'); $rows = ceil($limite / 50 )+1; $render = "$limite / - + "; } @@ -2811,7 +2822,9 @@ $consulta =" elseif($campo_tipo_accion == 'number'){$render = "(Este campo solo acepta números) ";} else{$render = " ";} - if($multiple =='1'){ + if($multiple =='1'){ + + $campo_multiple = "
@@ -2824,6 +2837,10 @@ $consulta =" } if($item == 0) { $label = "";} else {$label = "";} + ///// CAMPOS QUE NO SE MOSTRARAN + if($campo_tipo_accion == 'imagen'){ + $label=""; + } $input = "
@@ -3020,7 +3037,7 @@ $datos .= "

$$c = \$formulario['$c'][$C]; // $V /$campo_tipo[0]

" } if($campo_tipo[0]=='17') { - $limite = limite("$c",''); + $limite = limite("$c",'','limite'); $size= strlen($V); $restante = ($limite - $size); if( $restante < 0) { @@ -3289,20 +3306,37 @@ if (mysql_num_rows($sql)!='0'){
"; -if ($tipo != "embebido") { -$subir_imagen = subir_imagen(''); + +$campo_imagen = buscar_campo_tipo($id,"15"); +$campo_imagen_nombre = $campo_imagen[1]; +$campo_imagen = $campo_imagen[0]; + + +if ($campo_imagen[0] != "") { +$subir_imagen = subir_imagen('',"$campo_imagen"."[0]"); } $muestra_form = " -
- $subir_imagen +
+
+
+ +
+ $subir_imagen +
+ +
+ + +
- + "; if($tipo=="edit") {$control_edit = "$control";}else {$control_edit = "";} + mysql_data_seek($sql, 0); while( $row = mysql_fetch_array( $sql ) ) { if($row[multiple] ==='1' AND $tipo =='edit'){ @@ -3454,7 +3488,7 @@ $resultado="
return $resultado; } -function limite($id_campo,$contenido){ +function limite($id_campo,$contenido,$tipo){ $link=Conectarse(); mysql_query("SET NAMES 'utf8'"); @@ -3465,8 +3499,10 @@ if (mysql_num_rows($sql)!='0'){ $limite=mysql_result($sql,0,"campo_valor"); }else{} + if($tipo =='limite') { return $limite;} +$respuesta = new xajaxResponse('utf-8'); if($contenido !='') { - $respuesta = new xajaxResponse('utf-8'); + $size= strlen($contenido); $restante = ($limite - $size); $div_input = "input_$id_campo"; @@ -3485,7 +3521,9 @@ $respuesta->addAssign("$div_input","className","has-success "); return $respuesta; } - return $limite; + $respuesta->addAssign("aviso_$id_campo","innerHTML","$limite"); + return $respuesta; + //return $limite; } $xajax->registerFunction("limite");