Listing 1815
Submitted by anonymous user, 2 December 2008
$array1=array("grupo:texto:20","perfiles:combo:mostrarDatosPerfiles","ciudades:combo","naturaleza1:radio:naturaleza:1:modClase('divnaturaleza','no')","naturaleza2:radio:naturaleza:2:modClase('divnaturaleza','no')",
"naturaleza3:radio:naturaleza:3:modClase('divnaturaleza','no')"
,"naturaleza4:radio:naturaleza:4:modClase('divnaturaleza','no')"
,"naturaleza5:radio:naturaleza:5:modClase('divnaturaleza','no')"
,"naturaleza6:radio:naturaleza:6:modClase('divnaturaleza','si')"
,"naturalezaotro:texto:10"
,"calle:texto:10","nro:texto:10","piso:texto:10","depto:texto:10","barrio:texto:10","ciudades_grupo:combo","codpostal:texto");
$array2=array("grupo","id_perfil","id_ciudad","naturaleza","naturaleza","naturaleza","naturaleza","naturaleza","naturaleza","naturalezaotro","calle","nro","piso","dpto","barrio","ciudad_grupo:combo","codpostal");
$sqlCombo2="select id_ciudad,ciudad from $tablaCiudades order by ciudad asc";
$sqlCombo1="select id_perfil,perfil from $tablaPerfiles order by perfil asc";
$array3=array($maxCaracteresGrupo,$sqlCombo1,$sqlCombo2,1,1,1,1,1,1,$maxCaracteresNaturaleza,$maxCaracteresCalle,10,$maxCaracteresPiso,$maxCaracteresDepto,$maxCaracteresBarrio,$sqlCombo2,$maxCaracteresCodPostal);
$sqlData="select t1.* from $tablaGrupos t1 where t1.id_grupo='#numero#'";
$arrayAgregar=array($array1,$array2,$array3,$sqlData,"agenteejecutor.php");
// Campos a mostrar , campos a ordenar , sql
$array1=array("id_grupo","grupo","agente");
$array2=array("id_grupo","gruporeal");
$img1="<img ".imgTitle('')." border=".chr(34)."0".chr(34)." src=".chr(34)."/images/fallo.gif".chr(34)." ></img>";
$img2="<img ".imgTitle('')." border=".chr(34)."0".chr(34)." src=".chr(34)."/images/acierto.gif".chr(34)." ></img>";
$sqlGenerico="select t1.id_perfil,t1.id_grupo,t1.grupo,t1.gruporeal,IF(t2.agenteejecutor='0','".$img1."','".$img2."') as agente from
( select t1.id_perfil,t1.id_grupo,t1.grupo as gruporeal,concat_ws(' ',t1.grupo,'(' , t1.total , ')' )
as grupo from
(
( select t1.id_perfil,t1.id_grupo,t1.grupo,0 as total from $tablaGrupos t1 where t1.id_grupo not in (select t2.id_grupo from $tablaUsuarios t2) )
union
( select t1.id_perfil,t1.id_grupo,t1.grupo ,count(*) as total from $tablaGrupos t1 inner join $tablaUsuarios t2 on t1.id_grupo=t2.id_grupo group by t1.id_grupo )
) t1
) t1 inner join $tablaPerfiles t2 on t1.id_perfil=t2.id_perfil
>>orden<<";
$data=array("grupo","grupos","4",$array1,$array2,"id_grupo",$sqlGenerico,$arrayAgregar);
$historiales="historialTablas7";
$_SESSION[$historiales]=$data;
