correcion en areas

This commit is contained in:
humano 2018-06-14 05:44:28 -05:00
parent db90798bb5
commit f57b20343d

View File

@ -9397,9 +9397,8 @@ $control = md5(rand(1,99999999).microtime());
}
$respuesta = new xajaxResponse('utf-8');
if(isset($_SESSION['id_empresa'])) {$id_empresa= $_SESSION['id_empresa'];}
$consulta= "SELECT * , form_areas.orden FROM form_campos, `form_contenido_campos`, form_areas WHERE form_campos.campo_area = form_areas.id AND form_campos.id = form_contenido_campos.id_campo AND form_contenido_campos.id_form = '$perfil' GROUP BY form_campos.campo_area ORDER BY form_areas.orden
";
// $consulta= "SELECT * , form_areas.orden FROM form_campos, `form_contenido_campos`, form_areas WHERE form_campos.campo_area = form_areas.id AND form_campos.id = form_contenido_campos.id_campo AND form_contenido_campos.id_form = '$perfil' GROUP BY form_campos.campo_area ORDER BY form_areas.orden";
$consulta= "SELECT * , form_areas.orden FROM form_campos, `form_contenido_campos`, form_areas WHERE form_campos.campo_area = form_areas.id AND form_campos.id = form_contenido_campos.id_campo AND form_contenido_campos.id_form = '$perfil' GROUP BY form_campos.campo_area ORDER BY form_areas.orden";
$link=Conectarse();
mysqli_set_charset($link, "utf8");
@ -9713,7 +9712,7 @@ $editar_campo2= editar_campo("$tabla",$row['id'],"$campo2","","","","");
$editar_campo3= editar_campo("$tabla",$row['id'],"$campo3","","","","");
$editar_campo4= editar_campo("$tabla",$row['id'],"$campo4","","","","");
$eliminar = "<a onclick=\" xajax_eliminar_campo('$tabla','$row[id]','tr_$row[id]')\"><i class='glyphicon glyphicon-trash'></i> </a>";
$resultado .= "<tr id ='tr_$row[id]'><td>$row[$value]</td><td>$editar_campo1</td><td>$editar_campo2</td><td>$editar_campo3</td><td>$editar_campo4</td><td class='danger'>$eliminar</td></tr>";
$resultado .= "<tr id ='tr_$row[id]'><td>$row[$value]</td><td>$editar_campo1</td><td>$editar_campo2</td><td>$editar_campo3</td><td>$editar_campo4</td><td class='danger'><!-- $eliminar --></td></tr>";
$linea++;
}
@ -14149,7 +14148,7 @@ $campos_formulario .= "
<div class='form-group'>
<label for='campo_area' >Área o grupo del campo</label>
$areas
$areas $row[campo_area]
</div>
</div>
<div class='col-sm-12'>
@ -15606,9 +15605,10 @@ function formulario_grabar($formulario,$accion) {
if($accion == "api"){
$respuesta = new xajaxResponse('utf-8');
$Formulario_original = $formulario;
$formulario = json_decode($formulario,true);
//$formulario = print_r($formulario,true);
$respuesta->addAssign("resultado_triage","innerHTML","hOLA $formulario" );
$respuesta->addAssign("resultado_triage","innerHTML","hOLA $formulario_original" );
//return $respuesta;
}
@ -16369,15 +16369,15 @@ $resultado="<SELECT class='form-control' NAME='$name' id='$name' onchange=\"$onc
<option value=''>$nombre</option>$vacio
" ;
while( $row = mysqli_fetch_array( $sql ) ) {
if($row[$value]=="") {$resultado.="";}else{
if($row[$value] ==="$valor"){$selected="selected";}else{$selected ="";}
if($row["$value"]=="") {$resultado.="";}else{
if($row["$value"] =="$valor"){$selected="selected";}else{$selected ="";}
$mostrar_id = "[$row[$value]]";
//$valor= urlencode($row["$value"]);
$valor=$row["$value"];
$resultado .= "<option value='$valor' $selected > ".substr(@$row[$campo1], 0, 150 )." ".substr(@$row[$campo2], 0, 30 )." </option>";
//$valor=$row["$value"];
$resultado .= "<option value='$row[$value]' $selected > ".substr(@$row[$campo1], 0, 150 )." ".substr(@$row[$campo2], 0, 30 )." </option>";
}
}
$resultado .= "</select>";
$resultado .= "</select> " ;
}else{$resultado = "<div class='alert alert-warning alert_sin_resultados'><i class='glyphicon glyphicon-exclamation-triangle'></i> No hay resultados 0011</div>";}
return $resultado;