mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
add subselect_data_module file in general, search filter by module type #4001
(cherry picked from commit 609e1a03794039f572359ed34d8fe5b556ae78b1)
This commit is contained in:
parent
644fac4c9a
commit
99c29a751d
51
pandora_console/general/subselect_data_module.php
Normal file
51
pandora_console/general/subselect_data_module.php
Normal 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>';
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user