<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>KGCMS企业应用管理平台 - Powered by KGCMS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<!-- <meta http-equiv="cache-control" content="no-siteapp" /> -->
<link rel="stylesheet" href="{{ kg['tpl_url'] }}style/ipaddress.css">
<script src="{{ kg['tpl_url'] }}script/jquery.min.js"></script>
<script src="{{ kg['server']['HTTP_HOST'] }}/tools/amazeui/js/amazeui.min.js"></script>
<script src="{{kg['tpl_url']}}script/common.js"></script>
<script src="{{kg['tpl_url']}}script/ipaddress.js"></script>
</head>
<body data-type="generalComponents">
	{% include 'component_header.tpl' %}
	<div class="tpl-page-container tpl-page-header-fixed">
		<div class="scrollbar-wrap">
		{% include 'component_left.tpl' %}
		<div class="tpl-content-wrapper">
			<div class="tpl-content-page-title">
				IP地址管理
			</div>
			<ol class="am-breadcrumb">
				<li><a href="./" class="am-icon-home">首页</a></li>
				<li class="am-active">IP地址管理</li>
			</ol>
			<div class="tpl-portlet-components">
				<div class="portlet-title">
					<div class="caption font-green bold"><span class="am-icon-code"></span>&nbsp;IP地址管理</div>
					<ul class="list-inline ngsty-boxR">
						<li>
							<div class="am-select-hover am-no-marginbtm am-no-outline">
								<select onchange="window.open(this.options[this.selectedIndex].value,'_self')" data-am-selected="{btnSize: 'sm'}">
									<option value="ipaddress">所有省份</option>
									{% for row in province_data %}
									<option {% if province==row['province']%}selected="selected" {% endif %} value="ipaddress?{{url['province']}}province={{row['province']}}">{{row['province']}}</option>
									{% endfor %}
								</select>
							</div>
						</li>
						{% if province or city or ips %}
						<li>
							<div class="am-select-hover am-no-marginbtm am-no-outline">
								<select onchange="window.open(this.options[this.selectedIndex].value,'_self')" data-am-selected="{btnSize: 'sm'}">
									<option value="ipaddress">所有城市</option>
									{% for row in city_data %}
									<option {% if city==row['city']%}selected="selected" {% endif %}value="ipaddress?{{url['city']}}city={{row['city']}}">{{row['city']}}</option>
									{% endfor %}
								</select>
							</div>
						</li>
						{% endif %}
						<li>
							<div class="am-select-hover am-no-marginbtm am-no-outline">
								<select onchange="window.open(this.options[this.selectedIndex].value,'_self')" data-am-selected="{btnSize: 'sm'}">
									<option value="ipaddress">所有运营商</option>
									{% for row in ips_data %}
									{% if row['ips'] %}
									<option {% if ips==row['ips'] %} selected="selected" {% endif %} value="ipaddress?{{url['ips']}}ips={{row['ips']}}">{{row['ips']}}</option>
									{% endif %}
									{% endfor %}
								</select>
							</div>
						</li>
						<li>
							<div class="portlet-input input-small input-inline">
								<form action="#" method="get" id="search">
									<div class="input-icon right">
										<i class="am-icon-search log-search"></i>
										<input type="text" class="ngar-Vxiugai-radius form-control am-hover form-control-solid ngco-Alo-Noborder" placeholder="搜索ip地址" name="word" value="{{word}}" id="word">
									</div>
								</form>
							</div>
						</li>
						<li>
							<div class="am-btn-group am-btn-group-xs">
								<a href="ipaddress?{{ kg['run_start_time'][1] }}" class="am-btn am-btn-secondary ng-add-hightB"><span class="am-icon-search"></span>&nbsp;刷新</a>
								<a href="ipaddress?action=clear" class="am-btn am-btn-default am-btn-danger"><span class="am-icon-trash-o"></span>&nbsp;一键清空</a>
							</div>
						</li>
					</ul>
				</div>
				<div class="am-g">
					<div class="am-u-sm-12 ngALL-AFenyeFu-marginT ngco-No-paddingR">
						<form class="am-form">
							<table class="am-table am-table-striped am-table-hover table-main ngco-Esz-mgibdr">
								<thead>
									<tr>
										<th class="id">ID</th>
										<th class="table-title">IP</th>
										<th class="table-title">国家</th>
										<th class="table-title">省份区域</th>
										<th class="table-title">城市</th>
										<th class="table-title">运营商</th>
										<th class="table-title">经纬度</th>
										<th class="table-title">时间</th>
										<th class="table-title">操作</th>
									</tr>
								</thead>
								<tbody>
									{% for row in list %}
									<tr>
										<td>{{row['id']}}</td>
										<td>{{row['ip']}}</td>
										<td>{{row['country']}}</td>
										<td><a href="ipaddress?{{url['province']}}province={{row['province']}}">{{row['province']}}</a></td>
										<td><a href="ipaddress?{{url['city']}}city={{row['city']}}">{{row['city']}}</a></td>
										<td><a href="ipaddress?{{url['ips']}}ips={{row['ips']}}">{{row['ips']}}</a></td>
										<td>{% if row['rectangle'] %}{{row['rectangle']}}{%else%}-- --{% endif %}</td>
										<td>{{row['date']}}</td>
										<td>
											<div class="am-btn-toolbar">
												<div class="am-btn-group am-btn-group-xs">
													<a href="ipaddress?action=del&id={{row['id']}}" class="am-btn am-btn-default am-btn-xs am-text-danger ngro-Jclick-shanchubi title2div" title="删除该IP信息"><span class="am-icon-trash-o"></span>&nbsp;删除</a>
												</div>
											</div>
										</td>
									</tr>
									{% endfor %}
								</tbody>
							</table>
							{% if not list %}<div class="no-data"><ul>没有相关数据</ul></div>{% endif %}
							{% if page_data['total_page'] > 1 %}
							{{ page_html }}
							{% endif %}
						</form>
					</div>
				</div>
			</div>
			{% include 'component_footer.tpl' %}
		</div>
		</div><!-- /.scrollbar-wrap -->
	</div>
	<script>
	kg.title2div('title2div'); //调用此方法， 把该元素的title属性替换成div
	</script>
</body>
</html>