|
|
@@ -13,15 +13,19 @@ if (isset($_POST["ExportAuth"])) {
|
|
|
if ($val) {
|
|
|
$sSQL = "SELECT User_list.login, User_auth.ip, User_auth.mac, User_auth.comments, User_auth.dns_name, User_auth.last_found FROM User_auth, User_list WHERE User_auth.user_id = User_list.id AND User_auth.id = " . $val;
|
|
|
$record = get_record_sql($db_link, $sSQL);
|
|
|
- print $record['login'] . ';' . $record['ip'] . ';' . $record['mac'] . ';' . $record['comments'] . ';' . $record['dns_name'] . ';' . $record['last_found'] . ';' . get_connection($db_link, $val)."\n";
|
|
|
+ print $record['login'] . ';' . $record['ip'] . ';' . $record['mac'] . ';' . $record['comments'] . ';' . $record['dns_name'] . ';' . $record['last_found'] . ';' . get_connection_string($db_link, $val)."\n";
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
//export all
|
|
|
- $sSQL = "SELECT User_list.login, User_auth.id, User_User_auth.ip, User_auth.mac, User_auth.comments, User_auth.dns_name, User_auth.last_found FROM User_auth, User_list WHERE User_auth.user_id = User_list.id AND User_auth.deleted = 0 ORDER BY User_auth.ip_int";
|
|
|
+ $ip_filter = '';
|
|
|
+ $sort = 'User_auth.ip_int';
|
|
|
+ if (!empty($_POST["ip-filter"])) { $ip_filter = $_POST['ip-filter']; }
|
|
|
+ if (!empty($_POST["ip-sort"])) { $sort = $_POST['ip-sort']; }
|
|
|
+ $sSQL = "SELECT User_auth.*, User_list.login, User_list.enabled as UEnabled, User_list.blocked as UBlocked FROM User_auth, User_list WHERE User_auth.user_id = User_list.id AND User_auth.deleted = 0 $ip_filter ORDER BY $sort";
|
|
|
$auth_table = mysqli_query($db_link, $sSQL);
|
|
|
while ($record = mysqli_fetch_array($auth_table)) {
|
|
|
- print $record['login'] . ';' . $record['ip'] . ';' . $record['mac'] . ';' . $record['comments'] . ';' . $record['dns_name'] . ';' . $record['last_found'] .';' . get_connection($db_link, $record['id']). "\n";
|
|
|
+ print $record['login'] . ';' . $record['ip'] . ';' . $record['mac'] . ';' . $record['comments'] . ';' . $record['dns_name'] . ';' . $record['last_found'] .';' . get_connection_string($db_link, $record['id']). "\n";
|
|
|
}
|
|
|
}
|
|
|
}
|