Skip to content

Commit 7b4571f

Browse files
刘天宇刘天宇
刘天宇
authored and
刘天宇
committed
Catfish 2016/9/14 14:01:30
1 parent 0550ab6 commit 7b4571f

21 files changed

+795
-3
lines changed

.DS_Store

4 KB
Binary file not shown.

captcha.sublime-workspace

+169
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
{
2+
"auto_complete":
3+
{
4+
"selected_items":
5+
[
6+
]
7+
},
8+
"buffers":
9+
[
10+
],
11+
"build_system": "",
12+
"build_system_choices":
13+
[
14+
],
15+
"build_varint": "",
16+
"command_palette":
17+
{
18+
"height": 87.0,
19+
"last_filter": "install",
20+
"selected_items":
21+
[
22+
[
23+
"install",
24+
"Package Control: Install Package"
25+
]
26+
],
27+
"width": 449.0
28+
},
29+
"console":
30+
{
31+
"height": 272.0,
32+
"history":
33+
[
34+
"import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read())"
35+
]
36+
},
37+
"distraction_free":
38+
{
39+
"menu_visible": true,
40+
"show_minimap": false,
41+
"show_open_files": false,
42+
"show_tabs": false,
43+
"side_bar_visible": false,
44+
"status_bar_visible": false
45+
},
46+
"file_history":
47+
[
48+
],
49+
"find":
50+
{
51+
"height": 0.0
52+
},
53+
"find_in_files":
54+
{
55+
"height": 0.0,
56+
"where_history":
57+
[
58+
]
59+
},
60+
"find_state":
61+
{
62+
"case_sensitive": false,
63+
"find_history":
64+
[
65+
],
66+
"highlight": true,
67+
"in_selection": false,
68+
"preserve_case": false,
69+
"regex": false,
70+
"replace_history":
71+
[
72+
],
73+
"reverse": false,
74+
"show_context": true,
75+
"use_buffer2": true,
76+
"whole_word": false,
77+
"wrap": true
78+
},
79+
"groups":
80+
[
81+
{
82+
"sheets":
83+
[
84+
]
85+
}
86+
],
87+
"incremental_find":
88+
{
89+
"height": 0.0
90+
},
91+
"input":
92+
{
93+
"height": 0.0
94+
},
95+
"layout":
96+
{
97+
"cells":
98+
[
99+
[
100+
0,
101+
0,
102+
1,
103+
1
104+
]
105+
],
106+
"cols":
107+
[
108+
0.0,
109+
1.0
110+
],
111+
"rows":
112+
[
113+
0.0,
114+
1.0
115+
]
116+
},
117+
"menu_visible": true,
118+
"output.find_results":
119+
{
120+
"height": 0.0
121+
},
122+
"pinned_build_system": "",
123+
"project": "captcha.sublime-project",
124+
"replace":
125+
{
126+
"height": 0.0
127+
},
128+
"save_all_on_build": true,
129+
"select_file":
130+
{
131+
"height": 0.0,
132+
"last_filter": "",
133+
"selected_items":
134+
[
135+
],
136+
"width": 0.0
137+
},
138+
"select_project":
139+
{
140+
"height": 0.0,
141+
"last_filter": "",
142+
"selected_items":
143+
[
144+
],
145+
"width": 0.0
146+
},
147+
"select_symbol":
148+
{
149+
"height": 0.0,
150+
"last_filter": "",
151+
"selected_items":
152+
[
153+
],
154+
"width": 0.0
155+
},
156+
"selected_group": 0,
157+
"settings":
158+
{
159+
},
160+
"show_minimap": true,
161+
"show_open_files": false,
162+
"show_tabs": true,
163+
"side_bar_visible": true,
164+
"side_bar_width": 150.0,
165+
"status_bar_visible": true,
166+
"template_settings":
167+
{
168+
}
169+
}

class/.DS_Store

6 KB
Binary file not shown.

class/config.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
define("MEMCACHE_HOST", "MEMCACHE_HOST");
88
define("MEMCACHE_PORT", "MEMCACHE_PORT");
99
define("MEMCACHE_TIME", "MEMCACHE_TIME");
10-
$config = array(SQL_HOST => "localhost", SQL_PORT => 3306, SQL_USERNAME => "root", SQL_PASSWORD => "", SQL_DATABASE => "yanghua_sms", MEMCACHE_HOST => "127.0.0.1", MEMCACHE_PORT => 11211, MEMCACHE_TIME => 3600);
10+
$config = array(SQL_HOST => "localhost", SQL_PORT => 3306, SQL_USERNAME => "root", SQL_PASSWORD => "root", SQL_DATABASE => "yanghua_sms", MEMCACHE_HOST => "127.0.0.1", MEMCACHE_PORT => 11211, MEMCACHE_TIME => 3600);
1111
?>

class/dao.class.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ class dao {
77
function __construct() {
88
global $config;
99
$this->conn = new mysqli($config[SQL_HOST], $config[SQL_USERNAME], $config[SQL_PASSWORD], $config[SQL_DATABASE]);
10-
$this->mem = new Memcache();
10+
try {
11+
$this->mem = new Memcache();
12+
} catch (Exception $e) {
13+
$this->mem = new Memcached();
14+
}
1115
$this->mem->connect($config[MEMCACHE_HOST], $config[MEMCACHE_PORT]);
1216
$this->time = (int) $config[MEMCACHE_TIME];
1317
}

class/redirect.class.php

+3
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@ function toindex() {
66
function tologin() {
77
header("Location:login.php");
88
}
9+
function toprofile() {
10+
header("Location:profile.php");
11+
}
912
}
1013
?>

console.html

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
<script type="text/javascript" src="js/bootstrap.js"></script>
88
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
99
<link rel="stylesheet" type="text/css" href="css/signin.css">
10+
<link type="image/x-icon" rel="shortcut icon" href="favicon.ico" />
11+
<title>扬华SMS-控制台</title>
1012
</head>
1113
<body class="fix-top">
1214
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
@@ -27,6 +29,7 @@
2729
<li><a href="fresh_manage.html">招新管理</a></li>
2830
<li><a href="member_manage.html">成员管理</a></li>
2931
<li><a href="send_log.html">历史记录</a></li>
32+
<li><a href="profile.html">个人中心</a></li>
3033
</ul>
3134
</div>
3235
</div>

console.php

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
l<?php
22
include "./class/PatternCheck.class.php";
33
include "./class/account.class.php";
44
include "./class/date.class.php";
@@ -28,45 +28,53 @@
2828
$app_count_2 = 0;
2929
$app_title = null;
3030
$date = new date(time());
31+
//通知-今日
3132
$starttime = $date->getTodayStart();
3233
$endtime = $date->getTodayEnd();
3334
$sql = "SELECT COUNT(*) FROM sms_sendlog,sms_send WHERE sms_send.sendlog=sms_sendlog.id AND sms_sendlog.app=1 AND sms_sendlog.organization='$id' AND sms_sendlog.time BETWEEN '$starttime' AND '$endtime'";
3435
$result = $D->getcachequery($sql);
3536
if ($result) {
3637
$todayapp1 = intval($result[0][0]);
3738
}
39+
//招新-今日
3840
$sql = "SELECT COUNT(*) FROM sms_sendlog,sms_send WHERE sms_send.sendlog=sms_sendlog.id AND sms_sendlog.app=2 AND sms_sendlog.organization='$id' AND sms_sendlog.time BETWEEN '$starttime' AND '$endtime'";
3941
$result = $D->getcachequery($sql);
4042
if ($result) {
4143
$todayapp2 = intval($result[0][0]);
4244
}
45+
//通知-本月
4346
$starttime = $date->getMonthStart();
4447
$endtime = $date->getMonthEnd();
4548
$sql = "SELECT COUNT(*) FROM sms_sendlog,sms_send WHERE sms_send.sendlog=sms_sendlog.id AND sms_sendlog.app=1 AND sms_sendlog.organization='$id' AND sms_sendlog.time BETWEEN '$starttime' AND '$endtime'";
4649
$result = $D->getcachequery($sql);
4750
if ($result) {
4851
$monthapp1 = intval($result[0][0]);
4952
}
53+
//招新-本月
5054
$sql = "SELECT COUNT(*) FROM sms_sendlog,sms_send WHERE sms_send.sendlog=sms_sendlog.id AND sms_sendlog.app=2 AND sms_sendlog.organization='$id' AND sms_sendlog.time BETWEEN '$starttime' AND '$endtime'";
5155
$result = $D->getcachequery($sql);
5256
if ($result) {
5357
$monthapp2 = intval($result[0][0]);
5458
}
59+
//本组织成员数
5560
$sql = "SELECT COUNT(*) FROM sms_user WHERE sms_user.organization='$id'";
5661
$result = $D->getcachequery($sql);
5762
if ($result) {
5863
$membercount = $result[0][0];
5964
}
65+
//通知-联系人数
6066
$sql = "SELECT COUNT(*) FROM sms_group,sms_contacts WHERE sms_group.organization='$id' AND sms_group.app=1 AND sms_contacts.groups=sms_group.id";
6167
$result = $D->getcachequery($sql);
6268
if ($result) {
6369
$app_count_1 = $result[0][0];
6470
}
71+
//招新-联系人数
6572
$sql = "SELECT COUNT(*) FROM sms_group,sms_contacts WHERE sms_group.organization='$id' AND sms_group.app=2 AND sms_contacts.groups=sms_group.id";
6673
$result = $D->getcachequery($sql);
6774
if ($result) {
6875
$app_count_2 = $result[0][0];
6976
}
77+
//组织名
7078
$sql = "SELECT name FROM sms_organization WHERE id='$id'";
7179
$result = $D->getcachequery($sql);
7280
if ($result) {

fresh_contacts.html

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<li class="active"><a href="fresh_manage.html">招新管理</a></li>
2626
<li><a href="member_manage.html">成员管理</a></li>
2727
<li><a href="send_log.html">历史记录</a></li>
28+
<li><a href="profile.html">个人中心</a></li>s
2829
</ul>
2930
</div>
3031
</div>

fresh_manage.html

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<li class="active"><a href="fresh_manage.html">招新管理</a></li>
2828
<li><a href="member_manage.html">成员管理</a></li>
2929
<li><a href="send_log.html">历史记录</a></li>
30+
<li><a href="profile.html">个人中心</a></li>
3031
</ul>
3132
</div>
3233
</div>

fresh_manage.php

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<?php
2+
include "class/account.class.php";
3+
include "class/PatternCheck.class.php";
4+
include "class/redirect.class.php";
5+
include "class/config_var.class.php";
6+
logcheck();
7+
8+
?>
9+
<!DOCTYPE HTML>
10+
<html>
11+
<head>
12+
<meta http-equiv="Content-Type" content="text/html" charset="utf-8">
13+
<meta name="viewport" content="width=device-width, initial-scale=1">
14+
<script type="text/javascript" src="js/jquery.min.js"></script>
15+
<script type="text/javascript" src="js/bootstrap.js"></script>
16+
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
17+
<link rel="stylesheet" type="text/css" href="css/signin.css">
18+
</head>
19+
<body class="fix-top">
20+
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
21+
<div class="container">
22+
<div class="navbar-header">
23+
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".navbar-responsive-collapse">
24+
<span class="sr-only">Toggle Navigation</span>
25+
<span class="icon-bar"></span>
26+
<span class="icon-bar"></span>
27+
<span class="icon-bar"></span>
28+
</button>
29+
<a href="##" class="navbar-brand">扬华SMS</a>
30+
</div>
31+
<div class="collapse navbar-collapse navbar-responsive-collapse">
32+
<ul class="nav navbar-nav">
33+
<li><a href="console.php?id=<?php echo $id; ?>">控制台</a></li>
34+
<li><a href="notice_manage.html">通知</a></li>
35+
<li class="active"><a href="fresh_manage.html">招新管理</a></li>
36+
<li><a href="javascript:location.reload();">成员管理</a></li>
37+
<li><a href="send_log.html">历史记录</a></li>
38+
<li><a href="profile.php"><span class="glyphicon glyphicon-user" aria-hidden="true"></span><?php echo $A->getusername(); ?></a></li>
39+
<li><a href="logout.php">退出登录</a></li>
40+
</ul>
41+
</div>
42+
</div>
43+
</div>
44+
<div class="container">
45+
<div class="row">
46+
<div class="col-md-3 col-lg-2">
47+
<div class="list-group">
48+
<a href="fresh_manage.html" class="list-group-item active">概述</a>
49+
<a href="fresh_contacts.html" class="list-group-item">通讯录管理</a>
50+
<a href="fresh_send.html" class="list-group-item">信息发送</a>
51+
</div>
52+
</div>
53+
<div class="col-md-9 col-lg-10">
54+
<div class="panel panel-default">
55+
<div class="panel-heading">
56+
<span class="glyphicon glyphicon-stats" aria-hidden="true"></span>
57+
<label>使用统计</label>
58+
</div>
59+
<table class="table table-responsive">
60+
<thead>
61+
<tr>
62+
<th>今日使用</th>
63+
<th>本月使用</th>
64+
</tr>
65+
</thead>
66+
<tbody>
67+
<tr>
68+
<td>30</td>
69+
<td>50</td>
70+
</tr>
71+
</tbody>
72+
</table>
73+
</div>
74+
<div class="panel panel-default">
75+
<div class="panel-heading">
76+
<span class="glyphicon glyphicon-scale" aria-hidden="true"></span>
77+
<label>应用统计</label>
78+
</div>
79+
<table class="table table-responsive">
80+
<thead>
81+
<tr>
82+
<th>应用名</th>
83+
<th>今日使用</th>
84+
<th>近一个月使用量</th>
85+
<th>联系人数</th>
86+
</tr>
87+
</thead>
88+
<tbody>
89+
<tr>
90+
<td>招新管理</td>
91+
<td>30</td>
92+
<td>50</td>
93+
<td>100</td>
94+
</tr>
95+
</tbody>
96+
</table>
97+
</div>
98+
</div>
99+
</div>
100+
</div>
101+
</body>
102+
</html>

0 commit comments

Comments
 (0)