1
0

edituser.php 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  1. <?php
  2. require_once ($_SERVER["DOCUMENT_ROOT"]."/inc/auth.php");
  3. require_once ($_SERVER["DOCUMENT_ROOT"]."/inc/languages/" . $language . ".php");
  4. require_once ($_SERVER["DOCUMENT_ROOT"]."/inc/idfilter.php");
  5. global $default_user_ou_id;
  6. global $default_hotspot_ou_id;
  7. $default_sort='ip_int';
  8. require_once ($_SERVER['DOCUMENT_ROOT']."/inc/sortfilter.php");
  9. $msg_error = "";
  10. if (isset($_POST["edituser"])) {
  11. unset($new);
  12. $new["ou_id"] = $_POST["f_ou"] * 1;
  13. $new["filter_group_id"] = $_POST["f_filter"]*1;
  14. $new["queue_id"] = $_POST["f_queue"]*1;
  15. $new["login"] = trim($_POST["f_login"]);
  16. $new["fio"] = trim($_POST["f_fio"]);
  17. if ($default_user_ou_id == $new["ou_id"] or $default_hotspot_ou_id == $new["ou_id"]) {
  18. $new["enabled"] = 0;
  19. $new["blocked"] = 0;
  20. $new["day_quota"] = 0;
  21. $new["month_quota"] = 0;
  22. $auth["enabled"] = 0;
  23. $auth["blocked"] = 0;
  24. } else {
  25. $new["enabled"] = $_POST["f_enabled"] * 1;
  26. $new["blocked"] = $_POST["f_blocked"] * 1;
  27. $new["day_quota"] = trim($_POST["f_perday"]) * 1;
  28. $new["month_quota"] = trim($_POST["f_permonth"]) * 1;
  29. }
  30. $changes = get_diff_rec($db_link,"User_list","id='$id'", $new, 0);
  31. if (!empty($changes)) { LOG_WARNING($db_link,"Изменён пользователь id: $id. \r\nПрименено: $changes"); }
  32. update_record($db_link, "User_list", "id='$id'", $new);
  33. run_sql($db_link, "UPDATE User_auth SET ou_id=".$new["ou_id"]." WHERE user_id=".$id);
  34. run_sql($db_link, "UPDATE devices SET device_name=".$new["login"]." WHERE user_id=".$id);
  35. header("Location: " . $_SERVER["REQUEST_URI"]);
  36. exit;
  37. }
  38. if (isset($_POST["addMacRule"])) {
  39. unset($new);
  40. $first_auth = get_record_sql($db_link,"SELECT mac FROM User_auth WHERE user_id=".$id." AND deleted=0 ORDER BY id");
  41. if (!empty($first_auth)) {
  42. $new['user_id']=$id;
  43. $new['type']=2;
  44. $new['rule']=$first_auth['mac'];
  45. insert_record($db_link,"auth_rules",$new);
  46. LOG_INFO($db_link,"Создано правило атоназначения юзеру id: ".$id." для мака ".$first_auth['mac']);
  47. }
  48. header("Location: " . $_SERVER["REQUEST_URI"]);
  49. exit;
  50. }
  51. if (isset($_POST["delMacRule"])) {
  52. run_sql($db_link,"DELETE FROM auth_rules WHERE user_id=".$id." AND type=2");
  53. LOG_INFO($db_link,"Удалены все правила атоназначения юзеру id: $id по маку");
  54. header("Location: " . $_SERVER["REQUEST_URI"]);
  55. exit;
  56. }
  57. if (isset($_POST["showDevice"])) {
  58. $device = get_record_sql($db_link,"SELECT * FROM devices WHERE user_id=".$id);
  59. $auth = get_record_sql($db_link,"SELECT * FROM User_auth WHERE user_id=".$id);
  60. if (empty($device) and !empty($auth)) {
  61. $sSQL = "SELECT * FROM User_list WHERE id=$id";
  62. $user_info = get_record_sql($db_link, $sSQL);
  63. global $snmp_default_version;
  64. global $snmp_default_community;
  65. $new['user_id']=$id;
  66. $new['device_name'] = $user_info['login'];
  67. $new['device_type'] = 5;
  68. $new['ip']=$auth['ip'];
  69. $new['community'] = $snmp_default_community;
  70. $new['snmp_version'] = $snmp_default_version;
  71. $new_id=insert_record($db_link, "devices", $new);
  72. unset($_POST);
  73. if (!empty($new_id)) {
  74. LOG_INFO($db_link, "Created device with id: $new_id for auth_id: $id");
  75. header("Location: /admin/devices/editdevice.php?id={$new_id}");
  76. exit;
  77. } else {
  78. header("Location: ".$_SERVER["REQUEST_URI"]);
  79. exit;
  80. }
  81. }
  82. header("Location: /admin/devices/editdevice.php?id=".$device['id']);
  83. exit;
  84. }
  85. if (isset($_POST["addauth"])) {
  86. $fip = substr(trim($_POST["newip"]), 0, 18);
  87. if (isset($_POST["newmac"])) { $fmac = mac_dotted(substr(trim($_POST["newmac"]), 0, 17)); }
  88. if ($fip) {
  89. if (checkValidIp($fip)) {
  90. $ip_aton = ip2long($fip);
  91. //search mac
  92. $mac_exists=find_mac_in_subnet($db_link,$fip,$fmac);
  93. if (isset($mac_exists) and $mac_exists['count']>=1 and !in_array($id,$mac_exists['users_id'])) {
  94. $dup_sql = "SELECT * FROM User_list WHERE id=".$mac_exists['users_id']['0'];
  95. $dup_info = get_record_sql($db_link, $dup_sql);
  96. $msg_error="Mac already exists at another user in this subnet! Skip creating $fip [$fmac].<br>Old user id: ".$dup_info['id']." login: ".$dup_info['login'];
  97. $_SESSION[$page_url]['msg'] = $msg_error;
  98. LOG_ERROR($db_link, $msg_error);
  99. header("Location: " . $_SERVER["REQUEST_URI"]);
  100. exit;
  101. }
  102. //disable dhcp for secondary ip
  103. $f_dhcp = 1;
  104. if (in_array($id,$mac_exists['users_id'])) { $f_dhcp = 0; }
  105. //search ip
  106. $dup_ip_record = get_record_sql($db_link, "SELECT * FROM User_auth WHERE `ip_int`=$ip_aton AND user_id<>".$id." AND deleted=0");
  107. if (!empty($dup_ip_record)) {
  108. $dup_info = get_record_sql($db_link, "SELECT * FROM User_list WHERE id=".$dup_ip_record['user_id']);
  109. $msg_error = "$fip already exists. Skip creating $fip [$fmac].<br>Old user id: ".$dup_info['id']." login: ".$dup_info['login'];
  110. $_SESSION[$page_url]['msg'] = $msg_error;
  111. LOG_ERROR($db_link, $msg_error);
  112. header("Location: " . $_SERVER["REQUEST_URI"]);
  113. exit;
  114. }
  115. $fid = new_auth($db_link, $fip, $fmac, $id);
  116. if (!empty($fid)) {
  117. $new['dhcp']=$f_dhcp;
  118. update_record($db_link,"User_auth","id=".$fid,$new);
  119. LOG_WARNING($db_link,"Создан новый адрес доступа: ip => $fip, mac => $fmac");
  120. header("Location: /admin/users/editauth.php?id=".$fid);
  121. exit;
  122. }
  123. header("Location: " . $_SERVER["REQUEST_URI"]);
  124. exit;
  125. } else {
  126. $msg_error = "$msg_ip_error xxx.xxx.xxx.xxx";
  127. $_SESSION[$page_url]['msg'] = $msg_error;
  128. }
  129. }
  130. header("Location: " . $_SERVER["REQUEST_URI"]);
  131. exit;
  132. }
  133. if (isset($_POST["removeauth"])) {
  134. $auth_id = $_POST["f_auth_id"];
  135. foreach ($auth_id as $key => $val) {
  136. if ($val) {
  137. run_sql($db_link, 'DELETE FROM connections WHERE auth_id='.$val);
  138. run_sql($db_link, 'DELETE FROM User_auth_alias WHERE auth_id='.$val);
  139. $auth["deleted"] = 1;
  140. $changes = get_diff_rec($db_link,"User_auth","id='$val'", '', 0);
  141. if (!empty($changes)) { LOG_WARNING($db_link,"Удалён адрес доступа: \r\n $changes"); }
  142. update_record($db_link, "User_auth", "id=" . $val, $auth);
  143. }
  144. }
  145. header("Location: " . $_SERVER["REQUEST_URI"]);
  146. exit;
  147. }
  148. if (isset($_POST["ApplyForAll"])) {
  149. $auth_id = $_POST["f_auth_id"];
  150. $a_enabled = $_POST["a_enabled"] * 1;
  151. $a_dhcp = $_POST["a_dhcp"] * 1;
  152. $a_day = $_POST["a_day_q"] * 1;
  153. $a_month = $_POST["a_month_q"] * 1;
  154. $a_queue = $_POST["a_queue_id"] * 1;
  155. $a_group = $_POST["a_group_id"] * 1;
  156. foreach ($auth_id as $key => $val) {
  157. if ($val) {
  158. unset($new);
  159. if ($default_user_id == $id or $hotspot_user_id == $id) {
  160. $new["dhcp"] = 0;
  161. $new["enabled"] = 0;
  162. $new["day_quota"] = 0;
  163. $new["month_quota"] = 0;
  164. $new["queue_id"] = 0;
  165. $new["filter_group_id"] = 0;
  166. } else {
  167. $new["dhcp"] = $a_dhcp;
  168. $new["enabled"] = $a_enabled;
  169. $new["day_quota"] = $a_day;
  170. $new["month_quota"] = $a_month;
  171. $new["queue_id"] = $a_queue;
  172. $new["filter_group_id"] = $a_group;
  173. }
  174. $changes = get_diff_rec($db_link,"User_auth","id='$val'", $new, 0);
  175. if (!empty($changes)) { LOG_WARNING($db_link,"Изменён адрес доступа id: $val. Применено: $changes"); }
  176. update_record($db_link, "User_auth", "id='" . $val . "'", $new);
  177. }
  178. }
  179. header("Location: " . $_SERVER["REQUEST_URI"]);
  180. exit;
  181. }
  182. if (isset($_POST["moveauth"]) and isset($_POST["new_parent"])) {
  183. $new_user_id = $_POST["new_parent"]*1;
  184. $auth_id = $_POST["f_auth_id"];
  185. if ($new_user_id <> $id) {
  186. $user_rec = get_record($db_link, 'User_list', "id=".$new_user_id);
  187. foreach ($auth_id as $key => $val) {
  188. if ($val) {
  189. $new["filter_group_id"]=$user_rec["filter_group_id"];
  190. $new["queue_id"] = $user_rec["queue_id"];
  191. $new["enabled"] = $user_rec["enabled"];
  192. $new["user_id"] = $new_user_id;
  193. $changes = get_diff_rec($db_link,"User_auth","id='$val'", $new, 0);
  194. if (!empty($changes)) { LOG_WARNING($db_link,"Адрес доступа перемещён к другому пользователю id: $val (".$user_rec["login"]."). Применено: $changes"); }
  195. update_record($db_link, "User_auth", "id='" . $val . "'", $new);
  196. }
  197. }
  198. }
  199. header("Location: " . $_SERVER["REQUEST_URI"]);
  200. exit;
  201. }
  202. if (isset($_POST["new_user"])) {
  203. $auth_id = $_POST["f_auth_id"];
  204. $save_traf = get_option($db_link, 23) * 1;
  205. foreach ($auth_id as $key => $val) {
  206. if ($val) {
  207. $flist = mysqli_query($db_link, "SELECT ip, comments, dns_name, dhcp_hostname from User_auth WHERE id=$val");
  208. list ($f_auth_ip, $f_auth_comments, $f_dns_name, $f_dhcp_name) = mysqli_fetch_array($flist);
  209. $ou_id = $_POST["f_new_ou"] * 1;
  210. if (!isset($ou_id)) { $ou_id = 0; }
  211. $login = $f_auth_ip;
  212. if (isset($f_auth_comments) and strlen($f_auth_comments) > 0) { $login = $f_auth_comments; }
  213. if (isset($f_dhcp_name) and strlen($f_dhcp_name) > 0) { $login = $f_dhcp_name; }
  214. if (isset($f_dns_name) and strlen($f_dns_name) > 0) { $login = $f_dns_name; }
  215. list ($l_id) = mysqli_fetch_array(mysqli_query($db_link, "Select id from User_list where LCase(login)=LCase('$login') and deleted=0"));
  216. if (isset($l_id) and $l_id > 0) {
  217. // move auth
  218. $auth["user_id"] = $l_id;
  219. $auth["save_traf"] = $save_traf;
  220. update_record($db_link, "User_auth", "id='" . $val . "'", $auth);
  221. apply_auth_rule($db_link,$val,$l_id);
  222. $changes = get_diff_rec($db_link,"User_auth","id='$val'", $new, 0);
  223. if (!empty($changes)) { LOG_WARNING($db_link,"Изменён адрес доступа id: $val. Применено: $changes"); }
  224. } else {
  225. $new["login"] = $login;
  226. $new["ou_id"] = $ou_id;
  227. $l_id=insert_record($db_link, "User_list", $new);
  228. $auth["user_id"] = $l_id;
  229. $auth["save_traf"] = $save_traf;
  230. update_record($db_link, "User_auth", "id='" . $val . "'", $auth);
  231. $changes = get_diff_rec($db_link,"User_auth","id='$val'", '', 0);
  232. LOG_WARNING($db_link,"Создан новый пользователь из адреса доступа: login => $login. Адрес доступа перемещён к созданному пользователю: $changes");
  233. }
  234. }
  235. }
  236. header("Location: " . $_SERVER["REQUEST_URI"]);
  237. exit;
  238. }
  239. unset($_POST);
  240. $sSQL = "SELECT * FROM User_list WHERE id=$id";
  241. $user_info = get_record_sql($db_link, $sSQL);
  242. require_once ($_SERVER["DOCUMENT_ROOT"]."/inc/header.php");
  243. ?>
  244. <div id="cont">
  245. <?php
  246. if (!empty($_SESSION[$page_url]['msg'])) {
  247. print '<div id="msg">'.$_SESSION[$page_url]['msg'].'</div>';
  248. unset($_SESSION[$page_url]['msg']);
  249. }
  250. ?>
  251. <form name="def" action="edituser.php?id=<?php echo $id; ?>" method="post">
  252. <input type="hidden" name="id" value=<?php echo $id; ?>>
  253. <table class="data">
  254. <tr>
  255. <td colspan=2><?php print $cell_login; ?></td>
  256. <td colspan=2><?php print $cell_fio; ?></td>
  257. <td colspan=2><?php print $cell_ou; ?></td>
  258. </tr>
  259. <tr>
  260. <td colspan=2><input type="text" name="f_login" value="<?php print $user_info["login"]; ?>" size=25></td>
  261. <td colspan=2><input type="text" name="f_fio" value="<?php print $user_info["fio"]; ?>" size=25></td>
  262. <td colspan=2><?php print_ou_set($db_link, 'f_ou', $user_info["ou_id"]); ?></td>
  263. </tr>
  264. <tr>
  265. <td><?php print $cell_filter; ?></td>
  266. <td><?php print $cell_shaper; ?></td>
  267. <td><?php print $cell_enabled; ?></td>
  268. <td><?php print $cell_perday; ?></td>
  269. <td><?php print $cell_permonth; ?></td>
  270. <td><?php print $cell_blocked; ?></td>
  271. </tr>
  272. <tr>
  273. <td><?php print_group_select($db_link, 'f_filter', $user_info["filter_group_id"]); ?></td>
  274. <td><?php print_queue_select($db_link, 'f_queue', $user_info["queue_id"]); ?></td>
  275. <td><?php print_qa_select('f_enabled', $user_info["enabled"]); ?></td>
  276. <td><input type="text" name="f_perday" value="<?php echo $user_info["day_quota"]; ?>" size=5></td>
  277. <td><input type="text" name="f_permonth" value="<?php echo $user_info["month_quota"]; ?>" size=5></td>
  278. <td><?php print_qa_select('f_blocked', $user_info["blocked"]); ?></td>
  279. </tr>
  280. <tr>
  281. <?php
  282. print "<td>"; print_url("Список правил","/admin/users/edit_rules.php?id=$id"); print "</td>";
  283. $rule_count = get_count_records($db_link,"auth_rules","user_id=".$id);
  284. if ($rule_count>0) { print "<td > Count: ".$rule_count."</td>"; } else { print "<td></td>"; }
  285. $first_auth = get_record_sql($db_link,"SELECT id FROM User_auth WHERE user_id=".$id." AND deleted=0 ORDER BY id");
  286. if (!empty($first_auth)) {
  287. $mac_rule_count = get_count_records($db_link,"auth_rules","user_id=".$id." AND type=2");
  288. if (!empty($mac_rule_count)) {
  289. print "<td><input type=\"submit\" name=\"delMacRule\" value=".$btn_mac_del." ></td><td></td>";
  290. } else {
  291. print "<td><input type=\"submit\" name=\"addMacRule\" value=".$btn_mac_add." ></td><td></td>";
  292. }
  293. } else { print "<td colspan=2></td>"; }
  294. ?>
  295. <td colspan=2>Created: <?php print $user_info["timestamp"]; ?></td><td></td>
  296. </tr>
  297. <tr>
  298. <?php print "<td colspan=2>"; print_url("Трафик за день","/admin/reports/userday.php?id=$id"); ?></td>
  299. <td></td>
  300. <td><input type="submit" name="showDevice" value=<?php print $btn_device; ?>></td>
  301. <td></td>
  302. <td><input type="submit" name="edituser" value=<?php print $btn_save; ?>></td>
  303. </tr>
  304. </table>
  305. <br>
  306. <?php
  307. if ($msg_error) { print "<div id='msg'><b>$msg_error</b></div><br>\n"; }
  308. ?>
  309. <table class="data">
  310. <tr>
  311. <td>Для выделенных установить: Включен&nbsp<?php print_qa_select('a_enabled', 0); ?></td>
  312. <td>DHCP&nbsp<?php print_qa_select('a_dhcp', 1); ?></td>
  313. <td>Фильтр&nbsp<?php print_group_select($db_link, 'a_group_id', 0); ?></td>
  314. <td>Шейпер&nbsp<?php print_queue_select($db_link, 'a_queue_id', 0); ?></td>
  315. <td>В день&nbsp<input type="text" name="a_day_q" value="0" size=5></td>
  316. <td>В месяц&nbsp<input type="text" name="a_month_q" value="0" size=5></td>
  317. <td>&nbsp<input type="submit" onclick="return confirm('Применить для выделенных?')" name="ApplyForAll" value="Apply"></td>
  318. </tr>
  319. <tr>
  320. <?php
  321. print "<td colspan=6>Переместить выделенных к пользователю "; print_login_select($db_link, 'new_parent', $id); print "<input type=\"submit\" name=\"moveauth\" value=".$btn_move.">"; print "</td>";
  322. print "</tr><tr>";
  323. print "<td colspan=4>Создать пользователей по выделению в группе "; print_ou_select($db_link, 'f_new_ou', $user_info["ou_id"]); print "<button name='new_user'>Создать</button>\n"; print "</td>";
  324. print "<td colspan=2 align=\"right\">Удалить выделенных <input type=\"submit\" onclick=\"return confirm('Удалить выделенных?')\" name=\"removeauth\" value=".$btn_remove.">";
  325. ?>
  326. </tr>
  327. </table>
  328. <?php
  329. $sort_table = 'User_auth';
  330. $sort_url = "<a href=edituser.php?id=" . $id;
  331. if ($id == $default_user_id or $id == $hotspot_user_id) { $default_sort = 'last_found DESC'; }
  332. ?>
  333. <br> <b>Список адресов доступа</b><br>
  334. <table class="data">
  335. <tr>
  336. <td class="data">Новый адрес доступа IP:&nbsp<input type=text name=newip value=""></td>
  337. <td class="data">Mac (необязательно):&nbsp<input type=text name=newmac value=""></td>
  338. <td class="data"><input type="submit" name="addauth" value="Добавить"></td>
  339. </tr>
  340. </table>
  341. <table class="data">
  342. <tr>
  343. <td class="data"><input type="checkbox" onClick="checkAll(this.checked);"></td>
  344. <td class="data"><?php print $sort_url . "&sort=ip_int&order=$new_order>" . $cell_ip . "</a>"; ?></td>
  345. <td class="data"><?php print $sort_url . "&sort=mac&order=$new_order>" . $cell_mac . "</a>"; ?></td>
  346. <td class="data"><?php print $cell_comment; ?></td>
  347. <td class="data"><?php print $sort_url . "&sort=dns_name&order=$new_order>" . $cell_dns_name . "</a>"; ?></td>
  348. <td class="data"><?php print $cell_enabled; ?></td>
  349. <td class="data"><?php print $cell_dhcp; ?></td>
  350. <td class="data"><?php print $cell_filter; ?></td>
  351. <td class="data"><?php print $cell_shaper; ?></td>
  352. <td class="data"><?php print $cell_perday."/<br>".$cell_permonth.", Mb"; ?></td>
  353. <td class="data"><?php print $cell_connection; ?></td>
  354. <td class="data"><?php print $sort_url . "&sort=timestamp&order=$new_order>Created</a>"; ?></td>
  355. <td class="data">Last DHCP/ARP Event</td>
  356. <td class="data"><?php print $sort_url . "&sort=last_found&order=$new_order>Last found</a>"; ?></td>
  357. </tr>
  358. <?php
  359. $flist=get_records($db_link,'User_auth',"user_id=".$id." and deleted=0 ORDER BY $sort_table.$sort_field $order");
  360. if (!empty($flist)) {
  361. foreach ( $flist as $row ) {
  362. if ($row["dhcp_time"] == '0000-00-00 00:00:00') {
  363. $dhcp_str = '';
  364. } else {
  365. $dhcp_str = FormatDateStr('Y.m.d H:m',$row["dhcp_time"]) . " (" . $row["dhcp_action"] . ")";
  366. }
  367. if ($row["last_found"] == '0000-00-00 00:00:00') { $row["last_found"] = ''; }
  368. print "<tr align=center>\n";
  369. print "<td class=\"data\" style='padding:0'><input type=checkbox name=f_auth_id[] value=".$row["id"]." ></td>\n";
  370. print "<td class=\"data\" align=left><a href=editauth.php?id=".$row["id"].">" . $row["ip"] . "</a></td>\n";
  371. print "<td class=\"data\" >" . expand_mac($db_link,$row["mac"]) . "</td>\n";
  372. if (isset($row["dhcp_hostname"]) and strlen($row["dhcp_hostname"]) > 0) {
  373. print "<td class=\"data\" >".$row["comments"]." [" . $row["dhcp_hostname"] . "]</td>\n";
  374. } else {
  375. print "<td class=\"data\" >".$row["comments"]."</td>\n";
  376. }
  377. print "<td class=\"data\" >".$row["dns_name"]."</td>\n";
  378. $ip_status = 1;
  379. if ($row["blocked"] or !$row["enabled"]) { $ip_status = 0; }
  380. print "<td class=\"data\" >" . get_qa($ip_status). "</td>\n";
  381. print "<td class=\"data\" >" . get_qa($row["dhcp"]). "</td>\n";
  382. print "<td class=\"data\" >" . get_group($db_link, $row["filter_group_id"]) . "</td>\n";
  383. print "<td class=\"data\" >" . get_queue($db_link, $row["queue_id"]) . "</td>\n";
  384. print "<td class=\"data\" >".$row["day_quota"]."/".$row["month_quota"]."</td>\n";
  385. print "<td class=\"data\" >" . get_connection($db_link, $row["id"]) . "</td>\n";
  386. print "<td class=\"data\" >" . FormatDateStr('Y.m.d',$row["timestamp"]) . "</td>\n";
  387. print "<td class=\"data\" >" . $dhcp_str . "</td>\n";
  388. print "<td class=\"data\" >" . FormatDateStr('Y.m.d H:i',$row["last_found"]) . "</td>\n";
  389. print "</tr>";
  390. }
  391. }
  392. ?>
  393. </table>
  394. </form>
  395. <?php
  396. require_once ($_SERVER["DOCUMENT_ROOT"]."/inc/footer.php");
  397. ?>