Version 2.2.2
增加注销按钮 完善注释
This commit is contained in:
42
admin.php
42
admin.php
@@ -58,22 +58,29 @@ require("auth.php");
|
||||
<ul id="Tab" class="nav">
|
||||
<li class="active">
|
||||
<a href="#panel" data-toggle="tab">
|
||||
<span class="icon icon-chart-column"></span>接收面板</a>
|
||||
<span class="icon icon-panel"></span>接收面板</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#js" data-toggle="tab">
|
||||
<span class="icon icon-star-empty"></span>我的JS</a>
|
||||
<span class="icon icon-my-js"></span>我的JS</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#template" data-toggle="tab">
|
||||
<span class="icon icon-faves"></span>公共模板</a>
|
||||
<span class="icon icon-template"></span>公共模板</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#aboutus" data-toggle="tab">
|
||||
<span class="icon icon-info"></span>关于</a>
|
||||
</li>
|
||||
|
||||
<li id="logout">
|
||||
<a href="#logout" >
|
||||
<span class="icon icon-logout"></span>注销</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
<span id="rights">Copyright © 2015-2016 Powered by Firesun</span>
|
||||
<span id="rights">Copyright © 2015-2016<br>Powered by <a href="https://github.com/firesunCN" target="_blank">Firesun</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -107,18 +114,19 @@ require("auth.php");
|
||||
<h2 class="eam-efficiency col-xs-3">关于</h2>
|
||||
<div style="clear:both;"></div>
|
||||
</div>
|
||||
<div id="about_detail"></div>
|
||||
<div id="about_detail">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="notifications-bottom-right"></div>
|
||||
|
||||
<div style="display: none;">
|
||||
|
||||
|
||||
<div id="searchWindow" class="windows">
|
||||
<div>
|
||||
查找记录</div>
|
||||
@@ -157,6 +165,24 @@ require("auth.php");
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="logoutConfirmWindow" class="windows">
|
||||
<div>
|
||||
<img width="14" height="14" src="static/images/help.png" alt="" />
|
||||
确认</div>
|
||||
<div>
|
||||
<div style="margin: 5px;">
|
||||
您确认注销吗?
|
||||
</div>
|
||||
<div>
|
||||
<div style="float: right; margin-top: 15px;">
|
||||
<input type="button" id="logoutConfirm_ok" value="确认" style="margin-right: 10px" />
|
||||
<input type="button" id="logoutConfirm_cancel" value="取消" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="clearConfirmWindow" class="windows">
|
||||
<div>
|
||||
<img width="14" height="14" src="static/images/help.png" alt="" />
|
||||
|
||||
28
api.php
28
api.php
@@ -9,15 +9,17 @@ if(isset($_GET['cmd']))
|
||||
{
|
||||
switch($_GET['cmd'])
|
||||
{
|
||||
//所有记录包括详细信息
|
||||
case 'list':
|
||||
echo json_encode(dirList());
|
||||
break;
|
||||
|
||||
|
||||
//只列出时间戳(索引id)
|
||||
case 'simplelist':
|
||||
|
||||
echo json_encode(dirSimpleList());
|
||||
break;
|
||||
|
||||
|
||||
//根据时间戳(索引id)获得单条信息
|
||||
case 'get':
|
||||
if(isset($_GET['id'])&&preg_match('/^[0-9]{10}$/',$_GET['id']))
|
||||
echo json_encode(loadInfo($_GET['id']));
|
||||
@@ -25,6 +27,7 @@ if(isset($_GET['cmd']))
|
||||
echo json_encode(false);
|
||||
break;
|
||||
|
||||
//根据时间戳(索引id)删除单条信息
|
||||
case 'del':
|
||||
if(isset($_GET['id'])&&preg_match('/^[0-9]{10}$/',$_GET['id']))
|
||||
echo json_encode(delInfo($_GET['id']));
|
||||
@@ -32,11 +35,18 @@ if(isset($_GET['cmd']))
|
||||
echo json_encode(false);
|
||||
break;
|
||||
|
||||
//清空记录
|
||||
case 'clear':
|
||||
echo json_encode(clearInfo());
|
||||
break;
|
||||
break;
|
||||
|
||||
default:
|
||||
echo json_encode(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
echo json_encode(false);
|
||||
|
||||
function dirSimpleList() {
|
||||
$files = glob(DATA_PATH . '/*.php');
|
||||
foreach ($files as &$file){
|
||||
@@ -44,17 +54,17 @@ function dirSimpleList() {
|
||||
}
|
||||
return $files;
|
||||
}
|
||||
function dirList() {
|
||||
|
||||
function dirList() {
|
||||
$list=array();
|
||||
$files = glob(DATA_PATH . '/*.php');
|
||||
arsort($files);
|
||||
foreach ($files as $file) {
|
||||
$listinfo=array();
|
||||
$filename=basename($file,".php");
|
||||
$info=loadInfo($filename);
|
||||
$isChange=false;
|
||||
|
||||
//如果没有设置location,就查询qqwry.dat判断location
|
||||
if(!isset($info['location']))
|
||||
{
|
||||
$info['location']=convertip($info['user_IP'],IPDATA_PATH);
|
||||
@@ -63,10 +73,8 @@ function dirList() {
|
||||
|
||||
if($isChange)
|
||||
saveInfo(json_encode($info),$filename);
|
||||
|
||||
$list[]= $info;
|
||||
}
|
||||
|
||||
}
|
||||
return $list;
|
||||
}
|
||||
}
|
||||
?>
|
||||
6
auth.php
6
auth.php
@@ -2,9 +2,12 @@
|
||||
if(!defined('IN_XSS_PLATFORM')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
//设置httponly
|
||||
ini_set("session.cookie_httponly", 1);
|
||||
session_start();
|
||||
|
||||
//判断登陆情况,ip和useragent是否改变,改变则强制退出
|
||||
if(!(isset($_SESSION['isLogin']) && $_SESSION['isLogin']===true && isset($_SESSION['user_IP']) &&$_SESSION['user_IP']!="" &&$_SESSION['user_IP']=== $_SERVER['REMOTE_ADDR'] &&isset($_SESSION['user_agent']) &&$_SESSION['user_agent']!="" &&$_SESSION['user_agent']=== $_SERVER['HTTP_USER_AGENT'] ))
|
||||
{
|
||||
$_SESSION['isLogin']=false;
|
||||
@@ -16,9 +19,8 @@ if(!(isset($_SESSION['isLogin']) && $_SESSION['isLogin']===true && isset($_SESSI
|
||||
exit();
|
||||
}
|
||||
|
||||
//开启CSP
|
||||
header("Content-Security-Policy: default-src 'self'; object-src 'none'; style-src 'self' 'unsafe-inline'; frame-src 'none'");
|
||||
header("X-Content-Security-Policy: default-src 'self'; object-src 'none'; style-src 'self' 'unsafe-inline'; frame-src 'none'");
|
||||
header("X-WebKit-CSP: default-src 'self'; object-src 'none'; style-src 'self' 'unsafe-inline'; frame-src 'none'");
|
||||
|
||||
|
||||
?>
|
||||
@@ -2,11 +2,16 @@
|
||||
if(!defined('IN_XSS_PLATFORM')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
define('PASS', '2a05218c7aa0a6dbd370985d984627b8');//bluelotus
|
||||
//默认密码bluelotus
|
||||
define('PASS', '2a05218c7aa0a6dbd370985d984627b8');
|
||||
//记录,封禁ip列表存放位置
|
||||
define('DATA_PATH', 'data');
|
||||
//开启对记录,封禁ip列表的AES加密
|
||||
define('ENABLE_ENCRYPT', true);
|
||||
//加密密码
|
||||
define('ENCRYPT_PASS', "bluelotus");
|
||||
//是否启用KEEP_SESSION功能,需要外部定时访问keepsession.php
|
||||
define('KEEP_SESSION', true);
|
||||
//ip数据库地址
|
||||
define('IPDATA_PATH', "qqwry.dat");
|
||||
?>
|
||||
1
dio.php
1
dio.php
@@ -5,6 +5,7 @@ if(!defined('IN_XSS_PLATFORM')) {
|
||||
require_once("config.php");
|
||||
require_once("functions.php");
|
||||
|
||||
//对记录的读写操作,无数据库,采用读写文件的方式,文件名即请求时的时间戳,同时也是记录的id
|
||||
function saveInfo($info,$filename)
|
||||
{
|
||||
$logFile = dirname( __FILE__ ).'/'.DATA_PATH.'/'.$filename.'.php';
|
||||
|
||||
@@ -4,6 +4,7 @@ if(!defined('IN_XSS_PLATFORM')) {
|
||||
}
|
||||
require_once("aes.php");
|
||||
|
||||
//nginx无getallheaders函数
|
||||
if (!function_exists('getallheaders')) {
|
||||
function getallheaders() {
|
||||
foreach ($_SERVER as $name => $value) {
|
||||
@@ -15,7 +16,7 @@ if (!function_exists('getallheaders')) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//判断该记录是否
|
||||
function isKeepSession($info){
|
||||
$keepsession=false;
|
||||
foreach($info['cookie_data'] as $k => $v) {
|
||||
@@ -33,8 +34,7 @@ function isKeepSession($info){
|
||||
return $keepsession;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//xss过滤
|
||||
function stripStr($str){
|
||||
if(get_magic_quotes_gpc())
|
||||
$str=stripslashes($str);
|
||||
@@ -49,6 +49,7 @@ function stripArr($arr){
|
||||
return $new_arr;
|
||||
}
|
||||
|
||||
//尝试base64解码
|
||||
function tryBase64Decode($arr)
|
||||
{
|
||||
if(isset($arr)&&count($arr)>0)
|
||||
@@ -74,6 +75,7 @@ function tryBase64Decode($arr)
|
||||
return false;
|
||||
}
|
||||
|
||||
//判断string是否为base64编码(判断方法:解码后为可见字符串)
|
||||
function isBase64Formatted($str)
|
||||
{
|
||||
if(preg_match('/^[A-Za-z0-9+\/=]+$/',$str))
|
||||
@@ -93,6 +95,7 @@ function decrypt($info,$encryptPass)
|
||||
return AESDecryptCtr($info,$encryptPass);
|
||||
}
|
||||
|
||||
//基于Discuz X3.1 function_misc.php
|
||||
function convertip($ip, $ipdatafile) {
|
||||
$ipaddr = '未知';
|
||||
if(preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/", $ip)) {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 107 KiB |
@@ -19,6 +19,7 @@ $request_time = isset($_SERVER['REQUEST_TIME'])?$_SERVER['REQUEST_TIME']:time();
|
||||
|
||||
$headers_data =getallheaders();
|
||||
|
||||
//如果提交的数据有base64编码的就解码
|
||||
$get_data=$_GET;
|
||||
$decoded_get_data=tryBase64Decode($_GET);
|
||||
$post_data=$_POST;
|
||||
@@ -26,6 +27,7 @@ $decoded_post_data=tryBase64Decode($_POST);
|
||||
$cookie_data=$_COOKIE;
|
||||
$decoded_cookie_data=tryBase64Decode($_COOKIE);
|
||||
|
||||
//防xss过滤,对array要同时处理key与value
|
||||
$info['user_IP'] = stripStr($user_IP);
|
||||
$info['user_port'] = stripStr($user_port);
|
||||
$info['protocol'] = stripStr($protocol);
|
||||
@@ -46,6 +48,7 @@ $info['cookie_data'] = stripArr($cookie_data);
|
||||
if($decoded_cookie_data)
|
||||
$info['decoded_cookie_data'] = stripArr($decoded_cookie_data);
|
||||
|
||||
//判断是否keepsession(判断标准:get或者post或者cookie包含keepsession=1)
|
||||
$info['keepsession']=isKeepSession($info)?true:false;
|
||||
|
||||
saveInfo(json_encode($info),$request_time);
|
||||
|
||||
14
login.php
14
login.php
@@ -5,18 +5,20 @@ header("Content-Security-Policy: default-src 'self'; object-src 'none'; frame-sr
|
||||
header("X-Content-Security-Policy: default-src 'self'; object-src 'none'; frame-src 'none'");
|
||||
header("X-WebKit-CSP: default-src 'self'; object-src 'none'; frame-src 'none'");
|
||||
|
||||
//设置httponly
|
||||
ini_set("session.cookie_httponly", 1);
|
||||
session_start();
|
||||
require_once("config.php");
|
||||
require_once("functions.php");
|
||||
|
||||
|
||||
//判断是否登陆
|
||||
if(isset($_SESSION['isLogin']) && $_SESSION['isLogin']===true)
|
||||
{
|
||||
header("Location: admin.php");
|
||||
exit();
|
||||
}
|
||||
|
||||
//判断ip是否在封禁列表中
|
||||
$forbiddenIPList=loadForbiddenIPList();
|
||||
$ip=$_SERVER['REMOTE_ADDR'];
|
||||
if(!isset($forbiddenIPList[$ip]) || $forbiddenIPList[$ip]<3)
|
||||
@@ -53,7 +55,8 @@ function loadForbiddenIPList()
|
||||
$logfile = DATA_PATH . '/forbiddenIPList.dat';
|
||||
!file_exists( $logfile ) && @touch( $logfile );
|
||||
$str = file_get_contents( $logfile );
|
||||
$str =decrypt($str,ENCRYPT_PASS);
|
||||
if(ENABLE_ENCRYPT)
|
||||
$str =decrypt($str,ENCRYPT_PASS);
|
||||
if($str!='')
|
||||
{
|
||||
$result=json_decode($str,true);
|
||||
@@ -70,7 +73,10 @@ function saveForbiddenIPList($forbiddenIPList)
|
||||
{
|
||||
$logfile = DATA_PATH . '/forbiddenIPList.dat';
|
||||
!file_exists( $logfile ) && @touch( $logfile );
|
||||
@file_put_contents($logfile, encrypt(json_encode($forbiddenIPList),ENCRYPT_PASS));
|
||||
$str=json_encode($forbiddenIPList);
|
||||
if(ENABLE_ENCRYPT)
|
||||
$str = encrypt($str,ENCRYPT_PASS);
|
||||
@file_put_contents($logfile, $str);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -81,6 +87,7 @@ function checkPassword($p)
|
||||
{
|
||||
if(isset($_SESSION['firesunCheck'])&&isset($_POST['firesunCheck'])&&$_SESSION['firesunCheck']!=""&&$_POST['firesunCheck']===$_SESSION['firesunCheck'])
|
||||
{
|
||||
//改了这个盐记得改login.js里的,两个要一致
|
||||
$salt="!KTMdg#^^I6Z!deIVR#SgpAI6qTN7oVl";
|
||||
$key=PASS;
|
||||
$key=md5($salt.$key.$_SESSION['firesunCheck'].$salt);
|
||||
@@ -92,6 +99,7 @@ function checkPassword($p)
|
||||
return false;
|
||||
}
|
||||
|
||||
//生成挑战应答的随机值
|
||||
function generate_password( $length = 32 ) {
|
||||
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
||||
$password = "";
|
||||
|
||||
10
logout.php
Normal file
10
logout.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
session_start();
|
||||
$_SESSION['isLogin']=false;
|
||||
$_SESSION['user_IP']="";
|
||||
$_SESSION['user_agent']="";
|
||||
session_unset();
|
||||
session_destroy();
|
||||
header("Location: login.php");
|
||||
exit();
|
||||
?>
|
||||
Binary file not shown.
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Generated by IcoMoon</metadata>
|
||||
<defs>
|
||||
<font id="icomoon" horiz-adv-x="512">
|
||||
<font-face units-per-em="512" ascent="480" descent="-32" />
|
||||
<missing-glyph horiz-adv-x="512" />
|
||||
<glyph unicode=" " d="" horiz-adv-x="256" />
|
||||
<glyph unicode="" d="M312 72c0-30.797-25.203-56-56-56v0c-30.801 0-56 25.203-56 56v160c0 30.801 25.199 56 56 56v0c30.797 0 56-25.199 56-56v-160zM312 376c0-30.801-25.203-56-56-56v0c-30.801 0-56 25.199-56 56v0c0 30.801 25.199 56 56 56v0c30.797 0 56-25.199 56-56v0z" />
|
||||
<glyph unicode="" d="M124.063 272.297c0 26.398 20.801 53.824 46.219 60.941l136.719 38.281c25.422 7.121 46.219 26.207 46.219 42.426 0 16.215-20.797 23.664-46.219 16.543l-185.328-51.887c-25.426-7.121-46.215-34.547-46.215-60.945v-215.094c0-26.406 10.933-44.938 24.305-41.203 13.367 3.75 24.301 28.406 24.301 54.813v156.125zM205 309.168c-25.426-7.121-46.222-34.543-46.222-60.946v-195.66c0-26.406 20.797-42.18 46.222-35.063l185.328 51.883c25.422 7.133 46.219 34.547 46.219 60.945v195.664c0 26.399-20.805 42.176-46.219 35.054l-185.328-51.879zM351.594 156.515c6.797-18.508-2.203-28.242-20-21.64-17.797 6.594-46.922-3.75-64.719-23-17.793-19.258-26.793-15.922-19.996 7.414 6.801 23.336-2.199 47.836-20 54.445-17.801 6.601-14.359 18.406 7.641 26.219 22 7.828 45.551 33.313 52.356 56.649 6.797 23.336 17.922 27.285 24.719 8.781 6.805-18.504 30.367-27.246 52.359-19.422 21.992 7.816 25.43-1.535 7.64-20.801-17.797-19.254-26.797-50.145-20-68.645z" />
|
||||
<glyph unicode="" d="M374.182 185.598l32.291-168.709-150.473 82.844-150.474-82.844 32.289 168.709-125.288 117.507 170.432 21.427 73.041 155.47 73.041-155.469 170.427-21.427-125.286-117.508zM300.527 288.752l-44.528 94.781-44.531-94.781-103.901-13.063 76.383-71.641-19.688-102.85 91.738 50.505 91.735-50.506-19.685 102.85 76.383 71.641-103.904 13.063z" />
|
||||
<glyph unicode="" d="M127.999 64.002c-17.672 0-32.001 14.325-32.001 31.998v128.004c0 17.672 14.329 31.997 32.001 31.997 17.672 0 32.001-14.325 32.001-31.997v-128.004c0-17.672-14.329-31.998-32.001-31.998v0zM223.999 64.002c-17.672 0-32.001 14.325-32.001 31.998v64.004c0 17.67 14.329 31.998 32.001 31.998 17.672 0 32.001-14.328 32.001-31.998v-64.004c0-17.672-14.329-31.998-32.001-31.998v0zM319.998 64.002c-17.672 0-32 14.325-32 31.998v160.001c0 17.672 14.328 32.001 32 32.001 17.673 0 32.002-14.329 32.002-32.001v-160.001c0-17.672-14.33-31.998-32.002-31.998v0zM415.998 64.002c-17.672 0-32 14.325-32 31.998v256.001c0 17.675 14.328 32.001 32 32.001 17.676 0 32.002-14.326 32.002-32.001v-256.001c0-17.672-14.326-31.998-32.002-31.998v0z" />
|
||||
<glyph unicode="" d="M368 480h-224c-26.4 0-48-21.6-48-48v-416c0-26.4 21.6-48 48-48h224c26.4 0 48 21.6 48 48v416c0 26.4-21.6 48-48 48zM192 456h128v-16h-128v16zM256 0c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zM384 96h-256v320h256v-320z" />
|
||||
</font></defs></svg>
|
||||
|
Before Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
Binary file not shown.
@@ -37,11 +37,11 @@ body,
|
||||
/* font */
|
||||
@font-face {
|
||||
font-family: 'icomoon';
|
||||
src:url('Fonts/icomoon.eot?c8m22a');
|
||||
src:url('Fonts/icomoon.eot?#iefixc8m22a') format('embedded-opentype'),
|
||||
url('Fonts/icomoon.woff?c8m22a') format('woff'),
|
||||
url('Fonts/icomoon.ttf?c8m22a') format('truetype'),
|
||||
url('Fonts/icomoon.svg?c8m22a#icomoon') format('svg');
|
||||
src:url('../fonts/icomoon.eot?c8m22a');
|
||||
src:url('../fonts/icomoon.eot?#iefixc8m22a') format('embedded-opentype'),
|
||||
url('../fonts/icomoon.woff?c8m22a') format('woff'),
|
||||
url('../fonts/icomoon.ttf?c8m22a') format('truetype'),
|
||||
url('../fonts/icomoon.svg?c8m22a#icomoon') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
@@ -60,20 +60,20 @@ body,
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-logout:before {
|
||||
content: "\e900";
|
||||
}
|
||||
.icon-info:before {
|
||||
content: "\e600";
|
||||
content: "\e904";
|
||||
}
|
||||
.icon-faves:before {
|
||||
content: "\e601";
|
||||
.icon-template:before {
|
||||
content: "\e901";
|
||||
}
|
||||
.icon-star-empty:before {
|
||||
content: "\e602";
|
||||
.icon-my-js:before {
|
||||
content: "\e903";
|
||||
}
|
||||
.icon-chart-column:before {
|
||||
content: "\e603";
|
||||
}
|
||||
.icon-mobile:before {
|
||||
content: "\e604";
|
||||
.icon-panel:before {
|
||||
content: "\e902";
|
||||
}
|
||||
|
||||
.icon {
|
||||
@@ -146,12 +146,16 @@ body,
|
||||
}
|
||||
|
||||
#rights {
|
||||
width:100%;
|
||||
color: #848690;
|
||||
font-size: 10px;
|
||||
font-size: 12px;
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
text-align: center;
|
||||
line-height: 120%;
|
||||
}
|
||||
|
||||
|
||||
/* Toggle button */
|
||||
#toggle-button {
|
||||
margin-top: 27px;
|
||||
@@ -197,4 +201,5 @@ body,
|
||||
-webkit-box-shadow: 1px 0 4px #ededee;
|
||||
box-shadow: 1px 0 4px #ededee;
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BIN
static/fonts/icomoon.eot
Normal file
BIN
static/fonts/icomoon.eot
Normal file
Binary file not shown.
15
static/fonts/icomoon.svg
Normal file
15
static/fonts/icomoon.svg
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Generated by IcoMoon</metadata>
|
||||
<defs>
|
||||
<font id="icomoon" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " horiz-adv-x="512" d="" />
|
||||
<glyph unicode="" glyph-name="enter" d="M384 448h-320v128h320v128l192-192-192-192zM1024 960v-832l-384-192v192h-384v256h64v-192h320v576l256 128h-576v-256h-64v320z" />
|
||||
<glyph unicode="" glyph-name="file-text2" d="M917.806 730.924c-22.212 30.292-53.174 65.7-87.178 99.704s-69.412 64.964-99.704 87.178c-51.574 37.82-76.592 42.194-90.924 42.194h-496c-44.112 0-80-35.888-80-80v-864c0-44.112 35.888-80 80-80h736c44.112 0 80 35.888 80 80v624c0 14.332-4.372 39.35-42.194 90.924zM785.374 785.374c30.7-30.7 54.8-58.398 72.58-81.374h-153.954v153.946c22.984-17.78 50.678-41.878 81.374-72.572zM896 16c0-8.672-7.328-16-16-16h-736c-8.672 0-16 7.328-16 16v864c0 8.672 7.328 16 16 16 0 0 495.956 0.002 496 0v-224c0-17.672 14.326-32 32-32h224v-624zM736 128h-448c-17.672 0-32 14.326-32 32s14.328 32 32 32h448c17.674 0 32-14.326 32-32s-14.326-32-32-32zM736 256h-448c-17.672 0-32 14.326-32 32s14.328 32 32 32h448c17.674 0 32-14.326 32-32s-14.326-32-32-32zM736 384h-448c-17.672 0-32 14.326-32 32s14.328 32 32 32h448c17.674 0 32-14.326 32-32s-14.326-32-32-32z" />
|
||||
<glyph unicode="" glyph-name="download2" d="M896 448h-160l-224-224-224 224h-160l-128-256v-64h1024v64l-128 256zM0 64h1024v-64h-1024v64zM576 640v256h-128v-256h-224l288-288 288 288h-224z" />
|
||||
<glyph unicode="" glyph-name="attachment" d="M665.832 632.952l-64.952 64.922-324.81-324.742c-53.814-53.792-53.814-141.048 0-194.844 53.804-53.792 141.060-53.792 194.874 0l389.772 389.708c89.714 89.662 89.714 235.062 0 324.726-89.666 89.704-235.112 89.704-324.782 0l-409.23-409.178c-0.29-0.304-0.612-0.576-0.876-0.846-125.102-125.096-125.102-327.856 0-452.906 125.054-125.056 327.868-125.056 452.988 0 0.274 0.274 0.516 0.568 0.82 0.876l0.032-0.034 279.332 279.292-64.986 64.92-279.33-279.262c-0.296-0.268-0.564-0.57-0.846-0.844-89.074-89.058-233.98-89.058-323.076 0-89.062 89.042-89.062 233.922 0 322.978 0.304 0.304 0.604 0.582 0.888 0.846l-0.046 0.060 409.28 409.166c53.712 53.738 141.144 53.738 194.886 0 53.712-53.734 53.712-141.148 0-194.84l-389.772-389.7c-17.936-17.922-47.054-17.922-64.972 0-17.894 17.886-17.894 47.032 0 64.92l324.806 324.782z" />
|
||||
<glyph unicode="" glyph-name="heart" d="M755.188 896c-107.63 0-200.258-87.554-243.164-179-42.938 91.444-135.578 179-243.216 179-148.382 0-268.808-120.44-268.808-268.832 0-301.846 304.5-380.994 512.022-679.418 196.154 296.576 511.978 387.206 511.978 679.418 0 148.392-120.43 268.832-268.812 268.832z" />
|
||||
</font></defs></svg>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
BIN
static/fonts/icomoon.ttf
Normal file
BIN
static/fonts/icomoon.ttf
Normal file
Binary file not shown.
BIN
static/fonts/icomoon.woff
Normal file
BIN
static/fonts/icomoon.woff
Normal file
Binary file not shown.
@@ -7,6 +7,7 @@ var interval = 1000; //向服务器获取记录的时间间隔,同时也是aja
|
||||
$(document).ready(function() {
|
||||
var self = this;
|
||||
|
||||
//数据源与datafields
|
||||
var source = {
|
||||
datatype: "json",
|
||||
datafields: [{
|
||||
@@ -76,6 +77,7 @@ $(document).ready(function() {
|
||||
root: 'data',
|
||||
};
|
||||
|
||||
//从接口获得数据后的处理,格式化时间与根据useragent判断客户端
|
||||
var dataAdapter = new $.jqx.dataAdapter(source, {
|
||||
downloadComplete: function(data, status, xhr) {
|
||||
if (status == "success") {
|
||||
@@ -104,6 +106,7 @@ $(document).ready(function() {
|
||||
},
|
||||
});
|
||||
|
||||
//每行detail信息初始化
|
||||
var initrowdetails = function(index, parentElement, gridElement, datarecord) {
|
||||
var tabsdiv = null;
|
||||
var information = null;
|
||||
@@ -119,7 +122,8 @@ $(document).ready(function() {
|
||||
post_grid = tabsdiv.find('.post_grid');
|
||||
cookie_grid = tabsdiv.find('.cookie_grid');
|
||||
headers_grid = tabsdiv.find('.headers_grid');
|
||||
//datarecord.client=datarecord.headers_data["User-Agent"]?get_client_info(datarecord.headers_data["User-Agent"]):"未知";
|
||||
|
||||
//GET表
|
||||
var get_data = new Array();
|
||||
for (key in datarecord.get_data) {
|
||||
var get_data_item = new Array();
|
||||
@@ -193,6 +197,7 @@ $(document).ready(function() {
|
||||
]
|
||||
});
|
||||
|
||||
//POST表
|
||||
var post_data = new Array();
|
||||
for (key in datarecord.post_data) {
|
||||
var post_data_item = new Array();
|
||||
@@ -269,6 +274,7 @@ $(document).ready(function() {
|
||||
]
|
||||
});
|
||||
|
||||
//COOKIE表
|
||||
var cookie_data = new Array();
|
||||
for (key in datarecord.cookie_data) {
|
||||
var cookie_data_item = new Array();
|
||||
@@ -341,6 +347,7 @@ $(document).ready(function() {
|
||||
]
|
||||
});
|
||||
|
||||
//HTTP Headers表
|
||||
var headers_data = new Array();
|
||||
for (key in datarecord.headers_data) {
|
||||
var headers_data_item = new Array();
|
||||
@@ -392,6 +399,8 @@ $(document).ready(function() {
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
//其他信息
|
||||
var container = $('<div style="margin: 25px;"></div>');
|
||||
container.appendTo($(information));
|
||||
var leftcolumn = $('<div style="float: left; width: 45%;"></div>');
|
||||
@@ -419,6 +428,7 @@ $(document).ready(function() {
|
||||
$(rightcolumn).append(uri_item);
|
||||
$(rightcolumn).append(client_item);
|
||||
|
||||
//tab大小调整
|
||||
$(tabsdiv).jqxTabs({
|
||||
width: '95%',
|
||||
height: '100%'
|
||||
@@ -426,16 +436,18 @@ $(document).ready(function() {
|
||||
}
|
||||
}
|
||||
|
||||
//主面板初始化
|
||||
$("#panelGrid").jqxGrid({
|
||||
|
||||
pageable: true,
|
||||
//如果需要autoresizecolumn,可以在这开启
|
||||
ready: function() {
|
||||
//$('#panelGrid').jqxGrid('autoresizecolumn', 'request_date_and_time_string');
|
||||
//$('#panelGrid').jqxGrid('autoresizecolumn', 'data_type');
|
||||
//$('#panelGrid').jqxGrid('autoresizecolumn', 'user_IP');
|
||||
},
|
||||
//最底下的状态栏初始化
|
||||
pagerrenderer: function() {
|
||||
|
||||
var container = $("<div style='overflow: hidden; position: relative; '></div>");
|
||||
var deleteButton = $("<div style='float: left; margin-left: 5px;'><img style='position: relative; margin-top: 2px;' src='static/images/delete.png'/><span style='margin-left: 4px; position: relative; top: 3px;'>删除</span></div>");
|
||||
var clearButton = $("<div style='float: left; margin-left: 5px;'><img style='position: relative; margin-top: 2px;' src='static/images/clear.png'/><span style='margin-left: 4px; position: relative; top: 3px;'>清空</span></div>");
|
||||
@@ -468,20 +480,15 @@ $(document).ready(function() {
|
||||
|
||||
});
|
||||
|
||||
// reload grid data.
|
||||
clearButton.click(function(event) {
|
||||
$('#clearConfirmWindow').jqxWindow('open');
|
||||
$("#clearConfirmWindow").addClass('animated');
|
||||
//$("#panelGrid").jqxGrid({
|
||||
// source: getAdapter()
|
||||
//});
|
||||
});
|
||||
|
||||
// search for a record.
|
||||
searchButton.click(function(event) {
|
||||
//var offset = $("#panelGrid").offset();
|
||||
$("#searchWindow").jqxWindow('open');
|
||||
$("#searchWindow").addClass('animated');
|
||||
//$("#jqxwindow").jqxWindow('move', offset.left + 30, offset.top + 30);
|
||||
});
|
||||
|
||||
var pageElementsContainer = $("<div style='overflow: hidden;float: right;position: relative;margin: 5.5px; '></div>");
|
||||
@@ -524,8 +531,6 @@ $(document).ready(function() {
|
||||
});
|
||||
return container;
|
||||
},
|
||||
|
||||
//selectionmode: 'multiplerowsextended',
|
||||
scrollmode: 'logical',
|
||||
sortable: true,
|
||||
pagesize: 25,
|
||||
@@ -677,6 +682,32 @@ $(document).ready(function() {
|
||||
}
|
||||
});
|
||||
|
||||
//注销确认窗口
|
||||
$('#logoutConfirmWindow').jqxWindow({
|
||||
height: 100,
|
||||
width: 270,
|
||||
resizable: false,
|
||||
okButton: $('#logoutConfirm_ok'),
|
||||
cancelButton: $('#logoutConfirm_cancel'),
|
||||
autoOpen: false,
|
||||
});
|
||||
|
||||
$('#logoutConfirm_ok').jqxButton({
|
||||
width: '65px'
|
||||
});
|
||||
$('#logoutConfirm_cancel').jqxButton({
|
||||
width: '65px'
|
||||
});
|
||||
|
||||
$('#logoutConfirmWindow').on('close',
|
||||
function(event) {
|
||||
if (event.args.dialogResult.OK) {
|
||||
window.location.href = "logout.php";
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('#failedWindow').jqxWindow({
|
||||
height: 100,
|
||||
width: 270,
|
||||
@@ -697,6 +728,7 @@ $(document).ready(function() {
|
||||
width: 210,
|
||||
height: 180
|
||||
});
|
||||
|
||||
// create find and clear buttons.
|
||||
$("#findButton").jqxButton({
|
||||
width: 70
|
||||
@@ -704,6 +736,7 @@ $(document).ready(function() {
|
||||
$("#clearButton").jqxButton({
|
||||
width: 70
|
||||
});
|
||||
|
||||
// find records that match a criteria.
|
||||
$("#dropdownlist").jqxDropDownList({
|
||||
autoDropDownHeight: true,
|
||||
@@ -768,6 +801,12 @@ $(document).ready(function() {
|
||||
//$('#panelGrid').jqxGrid('autoresizecolumn', 'user_IP');
|
||||
});
|
||||
|
||||
$("#logout").click(function() {
|
||||
$('#logoutConfirmWindow').jqxWindow('open');
|
||||
$("#logoutConfirmWindow").addClass('animated');
|
||||
|
||||
});
|
||||
|
||||
//定时判断是否有新的记录
|
||||
checkNewMessages();
|
||||
setIntervalID = setInterval(checkNewMessages, interval);
|
||||
|
||||
Reference in New Issue
Block a user