walkor 11 years ago
parent
commit
b694a00b4f

+ 10 - 0
applications/Statistics/Modules/admin.php

@@ -1,5 +1,7 @@
 <?php
 namespace Statistics\Modules;
+use Statistics\Lib\Cache;
+
 function admin()
 {
     $act = isset($_GET['act'])? $_GET['act'] : 'home';
@@ -31,6 +33,14 @@ function admin()
             break;
     }
     
+    $ip_list_str = '';
+    foreach($ip_list as $ip)
+    {
+        if(!isset(Cache::$ServerIpList[$ip]))
+        {
+            $ip_list_str .= $ip."\r\n"; 
+        }
+    }
     
     include ST_ROOT . '/Views/header.tpl.php';
     include ST_ROOT . '/Views/admin.tpl.php';

+ 2 - 2
applications/Statistics/Views/admin.tpl.php

@@ -28,8 +28,8 @@
 	<div class="row clearfix">
 		<div class="col-md-12 column">
 			<form action="/?fn=admin&act=save_server_list" method="post">
-			<textarea rows="300" cols="100">
-			<?php echo $ip_list;?>
+			<textarea rows="100" cols="30">
+			<?php echo $ip_list_str;?>
 			</textarea>
 			</form>
 		</div>