2016-10-21 18:06:33 +02:00
|
|
|
<?php
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
switch ($_GET['module']) {
|
2016-10-21 18:06:33 +02:00
|
|
|
case 1:
|
2019-01-30 16:18:44 +01:00
|
|
|
$sql = sprintf(
|
|
|
|
'SELECT id_tipo, descripcion
|
2016-10-21 18:06:33 +02:00
|
|
|
FROM ttipo_modulo
|
2019-01-30 16:18:44 +01:00
|
|
|
WHERE categoria IN (6,7,8,0,1,2,-1) order by descripcion '
|
|
|
|
);
|
|
|
|
break;
|
|
|
|
|
2016-10-21 18:06:33 +02:00
|
|
|
case 2:
|
2019-01-30 16:18:44 +01:00
|
|
|
$sql = sprintf(
|
|
|
|
'SELECT id_tipo, descripcion
|
2016-10-21 18:06:33 +02:00
|
|
|
FROM ttipo_modulo
|
2019-01-30 16:18:44 +01:00
|
|
|
WHERE categoria between 3 and 5 '
|
|
|
|
);
|
|
|
|
break;
|
|
|
|
|
2016-10-21 18:06:33 +02:00
|
|
|
case 4:
|
2019-01-30 16:18:44 +01:00
|
|
|
$sql = sprintf(
|
|
|
|
'SELECT id_tipo, descripcion
|
2016-10-21 18:06:33 +02:00
|
|
|
FROM ttipo_modulo
|
2019-01-30 16:18:44 +01:00
|
|
|
WHERE categoria between 0 and 2 '
|
|
|
|
);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 6:
|
|
|
|
$sql = sprintf(
|
|
|
|
'SELECT id_tipo, descripcion
|
2016-10-21 18:06:33 +02:00
|
|
|
FROM ttipo_modulo
|
2019-01-30 16:18:44 +01:00
|
|
|
WHERE categoria between 0 and 2 '
|
|
|
|
);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 7:
|
|
|
|
$sql = sprintf(
|
|
|
|
'SELECT id_tipo, descripcion
|
2016-10-21 18:06:33 +02:00
|
|
|
FROM ttipo_modulo
|
2019-01-30 16:18:44 +01:00
|
|
|
WHERE categoria = 9'
|
|
|
|
);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 5:
|
|
|
|
$sql = sprintf(
|
|
|
|
'SELECT id_tipo, descripcion
|
2016-10-21 18:06:33 +02:00
|
|
|
FROM ttipo_modulo
|
2019-01-30 16:18:44 +01:00
|
|
|
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>';
|