-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathindex.php
More file actions
176 lines (174 loc) · 7.43 KB
/
index.php
File metadata and controls
176 lines (174 loc) · 7.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<?php
define('APPID', 'lmxcc');
set_time_limit(600);
session_start();
date_default_timezone_set('Asia/Shanghai');
header("Content-type: text/html; charset=utf-8");
define('IS_WIN',strstr(PHP_OS, 'WIN') ? 1 : 0 );
if (!empty($_POST['logout'])){
$_SESSION=[];
$_COOKIE=[];
die("已退出系统!");
}
require_once 'func.inc.php';
$limitIPs = []; //ip黑名单
checkip();
if (isset($_POST['changepwd'])){
header("Content-type: text/html; charset=utf-8");
if (isset($_SESSION['user_id'] )){
$changepwd = $_POST['changepwd'];
$old = $_POST['old'];
DB_init();
$a = $pdo->prepare("update login_users set `pwd` = ? where id = ? and pwd = ? limit 1");
$b = $a->execute([$changepwd,$_SESSION['user_id'] ,$old]);
if ($b) die("更新密码完毕!");
else die("更新时操作失败!");
}else die(" 无权修改!");
}
if (isset($_POST['username']) && !empty($_POST['psd']) ) {
if (login()){
$_SESSION['lmxccusers'] = $_POST['username'];
}else
showlogin("需要验证身份!","");
}elseif (!isset($_SESSION['lmxccusers']))
showlogin("需要验证身份!","");
$adm_level = is_adm();
if ($adm_level>4){
$menu = ' <li class="highlight">
<a class="nav_head" href="javascipt:;">
<i class="icon fa fa-users"></i>
<span>呼叫账号</span>
</a>
<a href="DM_users_cp.php" target="mainiframe" class="item">呼叫人员</a>
<a href="DM_users_batch.php" target="mainiframe" class="item">批量设置</a>
<a href="DM_groups_cp.php" target="mainiframe" class="item">分组设置</a>
<a href="DM_agents_cp.php" target="mainiframe" class="item">坐席设置</a>
</li>
<li class="highlight">
<a class="nav_head" href="javascipt:;">
<i class="icon fa fa-diamond"></i>
<span>呼叫管理</span>
</a>
<a href="DM_agents_status.php" target="mainiframe" class="item">坐席状态</a>
<a href="DM_cdr_list.php" target="mainiframe" class="item">通话记录</a>
<a href="DM_crm.php" target="_blank" class="item">顾客信息</a>
<a href="DM_callcenter.php" target="mainiframe" class="item">呼叫中心</a>
<a href="DM_cp.php?editDomain=8" target="mainiframe" class="item">呼叫信息</a>
<a href="DM_ivr.php" target="mainiframe" class="item">管理IVR</a>
</li>
<li class="highlight">
<a class="nav_head" href="javascipt:;">
<i class="icon fa fa-list-alt"></i>
<span>自动外呼</span>
</a>
<a href="DM_tasks_cp.php" target="mainiframe" class="item">任务管理</a>
<a href="DM_tasks_cp.php?edittask=0" target="mainiframe" class="item">新建任务</a>
</li>
<li class="highlight">
<a class="nav_head" href="javascipt:;">
<i class="icon fa fa-phone"></i>
<span>使用话机</span>
</a>
<a href="sipml5/DM_call.php" target="mainiframe" class="item">在线呼叫</a>
</li>
';
}else{
$menu = ' <li class="highlight">
<a class="nav_head" href="javascipt:;">
<i class="icon fa fa-users"></i>
<span>呼叫账号</span>
</a>
<a href="DM_users_cp.php" target="mainiframe" class="item">呼叫人员</a>
<a href="DM_groups_cp.php" target="mainiframe" class="item">分组设置</a>
</li>
<li class="highlight">
<a class="nav_head" href="javascipt:;">
<i class="icon fa fa-diamond"></i>
<span>呼叫管理</span>
</a>
<a href="DM_agents_status.php" target="mainiframe" class="item">坐席状态</a>
<a href="DM_cdr_list.php" target="mainiframe" class="item">通话记录</a>
<a href="DM_crm.php" target="_blank" class="item">顾客信息</a>
<a href="DM_callcenter.php" target="mainiframe" class="item">呼叫中心</a>
<a href="DM_cp.php?editDomain=8" target="mainiframe" class="item">呼叫信息</a>
</li>
<li class="highlight">
<a class="nav_head" href="javascipt:;">
<i class="icon fa fa-phone"></i>
<span>使用话机</span>
</a>
<a href="sipml5/DM_call.php" target="mainiframe" class="item">在线呼叫</a>
</li>
';
}?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>CallCenter Domain User Control Plane 域用户控制面板</title>
<link rel="stylesheet" href="css/helang.css"><script type="text/javascript" src="css/jquery.js"></script>
<script type="text/javascript">
function logout(){var a = confirm("你确认退出?退出后需要重新进行用户登录!");if (a) {$.post("index.php", { logout:"1"}).done(function( data ) { alert("执行退出:" + data);window.location="?";});}};
function changepwd(){var code =prompt("请输入新密码:"); if (code.length >2 && code!='undefined') { var code1 =prompt("请再次输入新密码:"); if (code1 == code) { var code2 =prompt("请输入当前密码:"); if (code2.length >2 && code2!='undefined') { $.post("index.php", { old: code2,changepwd:code }).done(function( data ) { alert( "【修改密码】 " + data);window.location.href="index.php"; }); }else alert('输入的现密码不对!'); }else alert('两次密码不一致!');}else alert('请输入密码,长度不能少于3个字符!');}
</script>
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<style type="text/css">
.info_box{
margin: 100px auto 0 auto;
width: 400px;
background-color: #ffffff;
color: #333333;
padding:0 0 0 30px;
}
.info_box>li{
padding: 15px 0;
font-size: 14px;
border-top: #e5e5e5 dashed 1px;
}
.info_box>li:first-child{
list-style: none;
font-size: 16px;
color: #FD463E;
border-top: none;
font-weight: bold;
}
.info_box>li:last-child{
list-style: none;
font-size: 12px;
color: #999999;
}
</style>
</head>
<body>
<nav class="hl_nav">
<ul class="nav_list">
<li>
<a class="nav_head" href="javascipt:;">
<span> <?=$_SESSION['domainid'];?> </span><i class="fa fa-angle-right" aria-hidden="true"> </i>
</a>
<a href="#" class="item">账号:<?=$_SESSION['lmxccusers'];?></a>
</li>
<?=$menu;?>
<li class="right highlight">
<a class="nav_head" href="javascipt:;">
<i class="icon fa fa-cog "></i>
<span>基础设置</span>
</a>
<a href="DM_cp.php" target="mainiframe" class="item">配置概要</a>
<a href="" onclick ="changepwd();" class="item">修改密码</a>
<a href="javascipt:;" onclick ="logout();" class="item">退出帐号</a>
</li>
</ul>
<div class="shade"></div>
</nav>
<iframe class="resp-iframe" src="DM_cp.php" id="mainiframe" name="mainiframe" ></iframe>
<script type="text/javascript" language="javascript">
function changeFrameHeight(){
$("#mainiframe").height($(document).height()-64);
}
window.onresize=function(){ changeFrameHeight();}
$(function(){changeFrameHeight();});
</script>
</body>
</html>