add subselect_data_module file in general, search filter by module type #4001

This commit is contained in:
enriquecd 2016-10-21 18:06:33 +02:00
parent 9053dee2f4
commit 609e1a0379
1 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,51 @@
<?php
switch ($_GET['module'])
{
case 1:
$sql = sprintf ('SELECT id_tipo, descripcion
FROM ttipo_modulo
WHERE categoria IN (6,7,8,0,1,2,-1) order by descripcion ');
break;
case 2:
$sql = sprintf ('SELECT id_tipo, descripcion
FROM ttipo_modulo
WHERE categoria between 3 and 5 ');
break;
case 4:
$sql = sprintf ('SELECT id_tipo, descripcion
FROM ttipo_modulo
WHERE categoria between 0 and 2 ');
break;
case 6:
$sql = sprintf ('SELECT id_tipo, descripcion
FROM ttipo_modulo
WHERE categoria between 0 and 2 ');
break;
case 7:
$sql = sprintf ('SELECT id_tipo, descripcion
FROM ttipo_modulo
WHERE categoria = 9');
break;
case 5:
$sql = sprintf ('SELECT id_tipo, descripcion
FROM ttipo_modulo
WHERE categoria = 0');
break;
case '':
$sql = sprintf ('SELECT id_tipo, descripcion
FROM ttipo_modulo');
break;
}
echo '<select id="datatype" name="datatype">';
echo '<option name="datatype" value="">'.__("All").'</option>';
$a = db_get_all_rows_sql($sql);
foreach ($a as $valor) {
echo '<option name="datatype" value="'.$valor['id_tipo'].'">'.$valor['descripcion'].'</option>';
}
echo '</select>';
?>