|
@@ -2,6 +2,7 @@
|
|
|
require_once ($_SERVER['DOCUMENT_ROOT']."/inc/auth.php");
|
|
require_once ($_SERVER['DOCUMENT_ROOT']."/inc/auth.php");
|
|
|
require_once ($_SERVER['DOCUMENT_ROOT']."/inc/languages/" . HTML_LANG . ".php");
|
|
require_once ($_SERVER['DOCUMENT_ROOT']."/inc/languages/" . HTML_LANG . ".php");
|
|
|
require_once ($_SERVER['DOCUMENT_ROOT']."/inc/devtypesfilter.php");
|
|
require_once ($_SERVER['DOCUMENT_ROOT']."/inc/devtypesfilter.php");
|
|
|
|
|
+require_once ($_SERVER['DOCUMENT_ROOT']."/inc/devmodelsfilter.php");
|
|
|
require_once ($_SERVER['DOCUMENT_ROOT']."/inc/buildingfilter.php");
|
|
require_once ($_SERVER['DOCUMENT_ROOT']."/inc/buildingfilter.php");
|
|
|
$default_sort='device_name';
|
|
$default_sort='device_name';
|
|
|
require_once ($_SERVER['DOCUMENT_ROOT']."/inc/sortfilter.php");
|
|
require_once ($_SERVER['DOCUMENT_ROOT']."/inc/sortfilter.php");
|
|
@@ -33,7 +34,8 @@ if (!empty($sort_field) and !empty($order)) { $sort_sql = " ORDER BY $sort_field
|
|
|
<form name="def" action="index.php" method="post">
|
|
<form name="def" action="index.php" method="post">
|
|
|
<table class="data">
|
|
<table class="data">
|
|
|
<tr class="info" align="right">
|
|
<tr class="info" align="right">
|
|
|
-<td class="info" colspan=6> <?php print WEB_device_type_show; print_devtypes_select($db_link, "devtypes", $f_devtype_id, "id<3"); ?>
|
|
|
|
|
|
|
+<td class="info" colspan=3> <?php print WEB_device_type_show; print_devtypes_select($db_link, "devtypes", $f_devtype_id, "id<3"); ?>
|
|
|
|
|
+<td class="info" colspan=3> <?php print WEB_models; print_devmodels_select($db_link, "devmodels", $f_devmodel_id); ?>
|
|
|
<?php print WEB_device_show_location; print_building_select($db_link, "building_id", $f_building_id); ?></td>
|
|
<?php print WEB_device_show_location; print_building_select($db_link, "building_id", $f_building_id); ?></td>
|
|
|
<td class="info"><input type="submit" name="apply" value="<?php echo WEB_btn_show; ?>"></td>
|
|
<td class="info"><input type="submit" name="apply" value="<?php echo WEB_btn_show; ?>"></td>
|
|
|
<td class="info" colspan=2><input type="submit" onclick="return confirm('<?php echo WEB_msg_delete; ?>?')" name="remove_device" value="<?php echo WEB_btn_delete; ?>"></td>
|
|
<td class="info" colspan=2><input type="submit" onclick="return confirm('<?php echo WEB_msg_delete; ?>?')" name="remove_device" value="<?php echo WEB_btn_delete; ?>"></td>
|
|
@@ -53,6 +55,7 @@ if (!empty($sort_field) and !empty($order)) { $sort_sql = " ORDER BY $sort_field
|
|
|
$filter = '';
|
|
$filter = '';
|
|
|
if ($f_building_id > 0) { $filter .= ' and building_id=' . $f_building_id; }
|
|
if ($f_building_id > 0) { $filter .= ' and building_id=' . $f_building_id; }
|
|
|
if ($f_devtype_id >= 0) { $filter .= ' and device_type=' . $f_devtype_id; } else { $filter .= ' and device_type<=2'; }
|
|
if ($f_devtype_id >= 0) { $filter .= ' and device_type=' . $f_devtype_id; } else { $filter .= ' and device_type<=2'; }
|
|
|
|
|
+if ($f_devmodel_id > 0) { $filter .= ' and device_model_id=' . $f_devmodel_id; }
|
|
|
|
|
|
|
|
$dSQL = 'SELECT * FROM devices WHERE deleted=0 '.$filter.' '.$sort_sql;
|
|
$dSQL = 'SELECT * FROM devices WHERE deleted=0 '.$filter.' '.$sort_sql;
|
|
|
$switches = get_records_sql($db_link,$dSQL);
|
|
$switches = get_records_sql($db_link,$dSQL);
|