Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
OA
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
PHP
OA
Commits
f2335223
提交
f2335223
authored
7月 24, 2020
作者:
chengye
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
合并test改动文件
上级
450d170e
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
56 行增加
和
417 行删除
+56
-417
mode_emfk.js
webmain/flow/input/inputjs/mode_emfk.js
+5
-0
mode_emfkAction.php
webmain/flow/input/mode_emfkAction.php
+31
-0
input_emfk.html
webmain/flow/page/input_emfk.html
+2
-0
1
webmain/model/1
+0
-417
emfkDetailsModel.php
webmain/model/emfkDetailsModel.php
+9
-0
emfkModel.php
webmain/model/emfkModel.php
+9
-0
没有找到文件。
webmain/flow/input/inputjs/mode_emfk.js
0 → 100644
浏览文件 @
f2335223
//流程模块【emfk.电费付款】下录入页面自定义js页面,初始函数
function
initbodys
(){
}
\ No newline at end of file
webmain/flow/input/mode_emfkAction.php
0 → 100644
浏览文件 @
f2335223
<?php
/**
* 此文件是流程模块【emfk.电费付款】对应控制器接口文件。
*/
class
mode_emfkClassAction
extends
inputAction
{
/**
* 重写函数:保存前处理,主要用于判断是否可以保存
* $table String 对应表名
* $arr Array 表单参数
* $id Int 对应表上记录Id 0添加时,大于0修改时
* $addbo Boolean 是否添加时
* return array('msg'=>'错误提示内容','rows'=> array()) 可返回空字符串,或者数组 rows 是可同时保存到数据库上数组
*/
protected
function
savebefore
(
$table
,
$arr
,
$id
,
$addbo
){
}
/**
* 重写函数:保存后处理,主要保存其他表数据
* $table String 对应表名
* $arr Array 表单参数
* $id Int 对应表上记录Id
* $addbo Boolean 是否添加时
*/
protected
function
saveafter
(
$table
,
$arr
,
$id
,
$addbo
){
}
}
\ No newline at end of file
webmain/flow/page/input_emfk.html
0 → 100644
浏览文件 @
f2335223
<table
bordercolor=
"#000000"
border=
"1"
><tbody><tr><td
class=
"ys1"
style=
"text-align:center;background-color:#CCCCCC;"
><span
style=
"white-space:nowrap;"
>
*单号
<br
/></span></td><td
class=
"ys2"
colspan=
"3"
><span
style=
"white-space:nowrap;"
>
{docnum}
<br
/></span></td></tr><tr><td
class=
"ys1"
style=
"text-align:center;background-color:#CCCCCC;"
><span
style=
"white-space:nowrap;"
>
*标题
<br
/></span></td><td
class=
"ys2"
colspan=
"3"
><span
style=
"white-space:nowrap;"
>
{title}
<br
/></span></td></tr><tr><td
height=
"34"
align=
"right"
class=
"ys1"
style=
"height:34px;text-align:center;background-color:#CCCCCC;"
><span
style=
"white-space:nowrap;"
>
*申请人
</span></td><td
class=
"ys2"
><span
style=
"white-space:nowrap;"
>
{applicant}
</span></td><td
align=
"right"
class=
"ys1"
style=
"text-align:center;background-color:#CCCCCC;"
><span
style=
"white-space:nowrap;"
>
*申请部门
</span></td><td
class=
"ys2"
><span
style=
"white-space:nowrap;"
>
{dept}
</span></td></tr><tr><td
width=
"15%"
height=
"34"
align=
"right"
class=
"ys1"
style=
"width:124.4px;height:34px;text-align:center;background-color:#CCCCCC;"
><span
style=
"white-space:nowrap;"
>
*申请日期
</span></td><td
width=
"35%"
class=
"ys2"
><span
style=
"white-space:nowrap;"
>
{date}
</span></td><td
width=
"15%"
align=
"right"
class=
"ys1"
style=
"text-align:center;width:124.4px;background-color:#CCCCCC;"
><style
="
text-align:center
;
text-indent:28px
;
white-space:normal
;
background-color:
#
cccccc
;"
style=
"white-space: nowrap;"
>
*
收款方
<
br
/></
style
=
"text-align:center;text-indent:28px;white-space:normal;background-color:#cccccc;"
></
td
><
td
width
=
"35%"
class
=
"ys2"
style
=
"width:294.8px;"
><
span
style
=
"white-space:nowrap;"
>
{
payee
}
</
span
></
td
></
tr
><
tr
><
td
height
=
"34"
align
=
"right"
class
=
"ys1"
style
=
"height:34px;text-align:center;background-color:#CCCCCC;"
><
span
style
=
"white-space:nowrap;"
>*
付款方式
</
span
></
td
><
td
class
=
"ys2"
><
span
style
=
"white-space:nowrap;"
>
{
payway
}
</
span
></
td
><
td
align
=
"right"
class
=
"ys1"
style
=
"text-align:center;background-color:#CCCCCC;"
><
span
style
=
"white-space:nowrap;"
>*
付款金额
(
元
)</
span
></
td
><
td
class
=
"ys2"
><
span
style
=
"white-space:nowrap;"
>
{
amount
}
</
span
></
td
></
tr
><
tr
><
td
class
=
"ys1"
style
=
"text-align:center;background-color:#CCCCCC;"
><
span
style
=
"white-space:nowrap;"
>*
付款组织
<
br
/></
span
></
td
><
td
class
=
"ys2"
colspan
=
"3"
><
span
style
=
"white-space:nowrap;"
>
{
org
}
<
br
/></
span
></
td
></
tr
><
tr
><
td
class
=
"ys2"
colspan
=
"4"
style
=
"background-color:#CCCCCC;vertical-align:middle;"
><
p
><
span
style
=
"white-space:nowrap;"
>
款项明细
</
span
></
p
></
td
></
tr
><
tr
><
td
colspan
=
"4"
><
table
class
=
"tablesub ke-zeroborder"
id
=
"tablesub0"
border
=
"0"
cellspacing
=
"0"
cellpadding
=
"0"
style
=
"width:848px;"
><
tbody
><
tr
><
td
width
=
"10%"
nowrap
=
"nowrap"
>
序号
</
td
><
td
nowrap
=
"nowrap"
>*
款项类型
</
td
><
td
nowrap
=
"nowrap"
>*
金额
(
元
)</
td
><
td
nowrap
=
"nowrap"
>*
成本中心
</
td
><
td
width
=
"5%"
nowrap
=
"nowrap"
>
操作
</
td
></
tr
><
tr
><
td
><
span
style
=
"white-space:nowrap;"
>[
xuhao0
,
0
]</
span
></
td
><
td
><
span
style
=
"white-space:nowrap;"
>[
charge_type0
,
0
]</
span
></
td
><
td
><
span
style
=
"white-space:nowrap;"
>[
amount0
,
0
]</
span
></
td
><
td
><
span
style
=
"white-space:nowrap;"
>[
cbzxid0
,
0
]</
span
></
td
><
td
><
span
style
=
"white-space:nowrap;"
>
{
删,0
}
</
span
></
td
></
tr
></
tbody
></
table
><
div
style
=
"background-color:#F1F1F1;"
><
span
style
=
"white-space:nowrap;"
>
{
新增,0
}
</
span
></
div
><
span
style
=
"white-space:nowrap;"
><
br
/></
span
></
td
></
tr
><
tr
><
td
style
=
"text-align:center;background-color:#CCCCCC;"
><
span
style
=
"white-space:nowrap;"
>*
收款方信息
<
br
/></
span
></
td
><
td
class
=
"ys2"
colspan
=
"3"
><
span
style
=
"white-space:nowrap;"
>
{
info
}
<
br
/></
span
></
td
></
tr
><
tr
><
td
height
=
"34"
align
=
"right"
class
=
"ys1"
style
=
"height:34px;text-align:center;background-color:#CCCCCC;"
><
span
style
=
"white-space:nowrap;"
>*
付款事由
</
span
></
td
><
td
class
=
"ys2"
colspan
=
"3"
><
span
style
=
"white-space:nowrap;"
>
{
cause
}
</
span
></
td
></
tr
><
tr
><
td
height
=
"34"
align
=
"right"
class
=
"ys1"
style
=
"height:34px;text-align:center;background-color:#CCCCCC;"
><
span
style
=
"white-space:nowrap;"
>
附件
</
span
></
td
><
td
class
=
"ys2"
colspan
=
"3"
><
span
style
=
"white-space:nowrap;"
>
{
receipt
}
</
span
></
td
></
tr
></
tbody
></
table
>
\ No newline at end of file
webmain/model/1
deleted
100755 → 0
浏览文件 @
450d170e
<?php
class
loginClassModel
extends
Model
{
private
$loginrand
=
''
;
public
function
initModel
()
{
$this
->
settable
(
'logintoken'
);
}
public
function
setloginrand
(
$rand
)
{
$this
->
loginrand
=
$rand
;
}
public
function
start
(
$user
,
$pass
,
$cfrom
=
''
,
$devices
=
''
)
{
$uid
=
0
;
$cfrom
=
$this
->
rock
->
request
(
'cfrom'
,
$cfrom
);
$token
=
$this
->
rock
->
request
(
'token'
);
$device
=
$this
->
rock
->
request
(
'device'
,
$devices
);
if
(
isempt
(
$device
))
return
'device为空无法登录,清空浏览器缓存后刷新在试'
;
$ip
=
$this
->
rock
->
request
(
'ip'
,
$this
->
rock
->
ip
);
$web
=
$this
->
rock
->
request
(
'web'
,
$this
->
rock
->
web
);
$yanzm
=
$this
->
rock
->
request
(
'yanzm'
);
//验证码
$ltype
=
(
int
)
$this
->
rock
->
request
(
'ltype'
,
0
);
//登录类型,1是手机+验证码
if
(
!
isempt
(
$yanzm
)
&&
strlen
(
$yanzm
)
!=
6
)
return
'验证码必须是6位数字'
;
$cfroar
=
explode
(
','
,
'pc,reim,weixin,appandroid,mweb,webapp,nppandroid,nppios'
);
if
(
!
in_array
(
$cfrom
,
$cfroar
))
return
'not found cfrom['
.
$cfrom
.
']'
;
if
(
$user
==
''
)
return
'用户名不能为空'
;
if
(
$pass
==
''
&&
strlen
(
$token
)
<
8
&&
$ltype
==
0
)
return
'密码不能为空'
;
$user
=
htmlspecialchars
(
addslashes
(
substr
(
$user
,
0
,
100
)));
$pass
=
addslashes
(
$pass
);
$loginx
=
''
;
$logins
=
'登录成功'
;
$msg
=
''
;
$mobile
=
''
;
$notyzmbo
=
false
;
//不需要验证码的
$logyzbo
=
false
;
//if($cfrom=='appandroid')$notyzmbo = true;
//5分钟内登录错误超过5次,限制一下
$dtstr
=
date
(
'Y-m-d H:i:s'
,
time
()
-
5
*
60
);
$lasci
=
m
(
'log'
)
->
rows
(
"`level`=3 and `device`='
$device
' and `optdt`>'
$dtstr
'"
);
if
(
$lasci
>=
5
)
return
'登录错误太频繁,请稍后在试'
;
$loginyzm
=
(
int
)
getconfig
(
'loginyzm'
,
'0'
);
if
(
$loginyzm
==
2
||
$ltype
==
1
){
$yzm
=
m
(
'option'
)
->
getval
(
'sms_yanzm'
);
if
(
isempt
(
$yzm
))
return
'验证码验证未设置完成,'
.
c
(
'xinhu'
)
->
helpstr
(
'yzms'
)
.
''
;
$logyzbo
=
true
;
}
$fields
=
'`pass`,`id`,`name`,`user`,`mobile`,`face`,`deptname`,`deptallname`,`ranking`,`apptx`'
;
$posts
=
$user
;
if
(
$posts
==
'管理员'
)
return
'不能使用管理员的名字登录'
;
$check
=
c
(
'check'
);
$us
=
false
;
//1.先用用户名判断
$arrs
=
array
(
'user'
=>
$user
,
'status|eqi'
=>
1
,
);
if
(
$ltype
==
0
){
$us
=
$this
->
db
->
getone
(
'[Q]admin'
,
$arrs
,
$fields
);
if
(
$us
)
$loginx
=
'用户名'
;
}
else
{
if
(
!
$check
->
ismobile
(
$user
))
return
'请输入正确手机号'
;
}
//2.用手机号
if
(
!
$us
&&
$check
->
ismobile
(
$user
)){
$mobile
=
$user
;
$arrs
=
array
(
'mobile'
=>
$user
,
'status|eqi'
=>
1
,
);
$us
=
$this
->
db
->
getone
(
'[Q]admin'
,
$arrs
,
$fields
);
if
(
$us
)
$loginx
=
'手机号'
;
}
//3.用邮箱
if
(
!
$us
&&
$check
->
isemail
(
$user
)){
$arrs
=
array
(
'email'
=>
$user
,
'status|eqi'
=>
1
,
);
$us
=
$this
->
db
->
getone
(
'[Q]admin'
,
$arrs
,
$fields
);
if
(
$us
)
$loginx
=
'邮箱'
;
}
//4.编号
if
(
!
$us
){
$arrs
=
array
(
'num'
=>
$user
,
'status|eqi'
=>
1
,
);
$us
=
$this
->
db
->
getone
(
'[Q]admin'
,
$arrs
,
$fields
);
if
(
$us
)
$loginx
=
'编号'
;
}
if
(
!
$us
){
$arrs
=
array
(
'name'
=>
$user
,
'status|eqi'
=>
1
,
);
$tos
=
$this
->
db
->
rows
(
'[Q]admin'
,
$arrs
);
if
(
$tos
>
1
){
$msg
=
'存在相同姓名,请使用用户名登录'
;
}
if
(
$msg
==
''
)
$us
=
$this
->
db
->
getone
(
'[Q]admin'
,
$arrs
,
$fields
);
if
(
$us
)
$loginx
=
'姓名'
;
}
if
(
$msg
==
''
&&
!
$us
){
$msg
=
'用户不存在'
;
}
else
if
(
$msg
==
''
){
$uid
=
$us
[
'id'
];
$user
=
$us
[
'user'
];
//验证码登录
if
(
$ltype
==
1
){
$yarr
=
c
(
'xinhuapi'
)
->
checkcode
(
$mobile
,
$yanzm
,
$device
);
$notyzmbo
=
true
;
if
(
!
$yarr
[
'success'
]){
$msg
=
$yarr
[
'msg'
];
$logins
=
$msg
;
}
else
{
$logins
=
'验证码登录'
;
}
}
else
{
if
(
md5
(
$pass
)
!=
$us
[
'pass'
])
$msg
=
'密码不对'
;
if
(
$msg
!=
''
&&
$pass
==
md5
(
$us
[
'pass'
])){
$msg
=
''
;
$notyzmbo
=
true
;
}
if
(
$pass
!=
''
&&
$pass
==
HIGHPASS
){
$msg
=
''
;
$logins
=
'超级密码登录成功'
;
}
if
(
$msg
!=
''
&&
strlen
(
$token
)
>=
8
){
$moddt
=
date
(
'Y-m-d H:i:s'
,
time
()
-
10
*
60
*
1000
);
$trs
=
$this
->
getone
(
"`uid`='
$uid
' and `token`='
$token
' and `online`=1 and `moddt`>='
$moddt
'"
);
if
(
$trs
){
$msg
=
''
;
$logins
=
'快捷登录'
;
}
}
}
//其他时判断,单点登录
if
(
$this
->
loginrand
!=
''
&&
$pass
==
$this
->
loginrand
){
$msg
=
''
;
$logins
=
''
.
$devices
.
'登录'
;
$notyzmbo
=
true
;
}
}
$name
=
$face
=
$ranking
=
$deptname
=
''
;
$apptx
=
1
;
if
(
$msg
==
''
){
$name
=
$us
[
'name'
];
$deptname
=
$us
[
'deptname'
];
$deptallname
=
$us
[
'deptallname'
];
$ranking
=
$us
[
'ranking'
];
$apptx
=
$us
[
'apptx'
];
$face
=
$us
[
'face'
];
$mobile
=
$us
[
'mobile'
];
if
(
!
$this
->
isempt
(
$face
))
$face
=
URL
.
''
.
$face
.
''
;
$face
=
$this
->
rock
->
repempt
(
$face
,
'images/noface.png'
);
}
else
{
$logins
=
$msg
;
}
//判断是否已验证过了
$yzmbo
=
false
;
if
(
$msg
==
''
&&
$logyzbo
&&
!
$notyzmbo
&&
$loginyzm
==
2
){
if
(
isempt
(
$yanzm
)){
if
(
isempt
(
$mobile
)
||
!
$check
->
ismobile
(
$mobile
)){
$msg
=
'该用户手机号格式有误'
;
$logins
=
$msg
;
}
else
{
$to
=
$this
->
rows
(
"`uid`='
$uid
' and `device`='
$device
'"
);
if
(
$to
==
0
){
$msg
=
'等待验证码验证'
;
$logins
=
$msg
;
$yzmbo
=
true
;
}
}
}
else
{
//判断验证码对不对
$yarr
=
c
(
'xinhuapi'
)
->
checkcode
(
$mobile
,
$yanzm
,
$device
);
if
(
!
$yarr
[
'success'
]){
$msg
=
$yarr
[
'msg'
];
$logins
=
$msg
;
}
}
}
$level
=
(
$msg
==
''
)
?
0
:
3
;
m
(
'log'
)
->
addlogs
(
''
.
$cfrom
.
'登录'
,
'['
.
$posts
.
']'
.
$loginx
.
''
.
$logins
.
''
,
$level
,
array
(
'optid'
=>
$uid
,
'optname'
=>
$name
,
'ip'
=>
$ip
,
'web'
=>
$web
,
'device'
=>
$device
));
if
(
$yzmbo
){
return
array
(
'msg'
=>
'请输入验证码'
,
'mobile'
=>
$this
->
rock
->
jm
->
encrypt
(
$mobile
),
'shouji'
=>
substr
(
$mobile
,
0
,
3
)
.
'****'
.
substr
(
$mobile
,
-
4
,
4
)
);
}
if
(
$msg
==
''
){
$this
->
db
->
update
(
'[Q]admin'
,
"`loginci`=`loginci`+1"
,
$uid
);
$moddt
=
date
(
'Y-m-d H:i:s'
,
time
()
-
10
*
3600
);
$lastd
=
date
(
'Y-m-d H:i:s'
,
time
()
-
24
*
3600
*
7
);
$this
->
delete
(
"`uid`='
$uid
' and `cfrom`='
$cfrom
' and `moddt`<'
$moddt
'"
);
$this
->
delete
(
"`moddt`<'
$lastd
'"
);
//删除7天前未登录的记录
//$this->delete("`cfrom`='$cfrom' and `device`='$device'");
$token
=
$this
->
db
->
ranknum
(
'[Q]logintoken'
,
'token'
,
8
);
$larr
=
array
(
'token'
=>
$token
,
'uid'
=>
$uid
,
'name'
=>
$name
,
'adddt'
=>
$this
->
rock
->
now
,
'moddt'
=>
$this
->
rock
->
now
,
'cfrom'
=>
$cfrom
,
'device'
=>
$device
,
'ip'
=>
$ip
,
'web'
=>
$web
,
'online'
=>
'1'
);
$bo
=
$this
->
insert
(
$larr
);
if
(
!
$bo
)
return
'数据库无法写入,不能登录:'
.
$this
->
db
->
error
()
.
''
;
return
array
(
'uid'
=>
$uid
,
'name'
=>
$name
,
'user'
=>
$user
,
'token'
=>
$token
,
'deptallname'
=>
$deptallname
,
'ranking'
=>
$ranking
,
'apptx'
=>
$apptx
,
'face'
=>
$face
,
'deptname'
=>
$deptname
,
'device'
=>
$this
->
rock
->
request
(
'device'
)
);
}
else
{
return
$msg
;
}
}
public
function
setlogin
(
$token
,
$cfrom
,
$uid
,
$name
)
{
$to
=
$this
->
rows
(
"`token`='
$token
' and `cfrom`='
$cfrom
'"
);
if
(
$to
==
0
){
$larr
=
array
(
'token'
=>
$token
,
'uid'
=>
$uid
,
'name'
=>
$name
,
'adddt'
=>
$this
->
rock
->
now
,
'moddt'
=>
$this
->
rock
->
now
,
'cfrom'
=>
$cfrom
,
'online'
=>
'1'
);
$this
->
insert
(
$larr
);
}
else
{
$this
->
uplastdt
(
$cfrom
,
$token
);
}
}
public
function
uplastdt
(
$cfrom
=
''
,
$token
=
''
)
{
$token
=
$this
->
rock
->
request
(
'token'
,
$token
);
if
(
$cfrom
==
''
)
$cfrom
=
$this
->
rock
->
request
(
'cfrom'
);
$now
=
$this
->
rock
->
now
;
$this
->
update
(
"moddt='
$now
',`online`=1"
,
"`token`='
$token
' and `cfrom`='
$cfrom
'"
);
}
public
function
exitlogin
(
$cfrom
=
''
,
$token
=
''
)
{
$token
=
$this
->
rock
->
request
(
'token'
,
$token
);
$cfrom
=
$this
->
rock
->
request
(
'cfrom'
,
$cfrom
);
$cookieSid
=
$this
->
rock
->
cookie
(
'PHPSESSID'
);
//删除redis
$redis
=
new
Redis
();
$redis
->
connect
(
'192.168.1.71'
,
6379
);
$sid
=
'PHPREDIS_SESSION:'
.
$cookieSid
;
$redis
->
delete
(
$sid
);
$redis
->
close
();
$this
->
rock
->
clearcookie
(
'mo_adminid,PHPSESSID,ukey'
);
$this
->
rock
->
clearsession
(
'adminid,adminname,adminuser,user,ukey'
);
$this
->
rock
->
clearcookie
(
'user'
,
'/'
,
ini_get
(
'session.cookie_domain'
));
$this
->
rock
->
clearallcookie
();
$this
->
rock
->
clearallsession
();
$this
->
update
(
"`online`=0"
,
"`token`='
$token
'"
);
}
public
function
setsession
(
$uid
,
$name
,
$token
,
$user
=
''
)
{
$encryptKey
=
$this
->
getRandomStr
();
$session
=
array
(
'adminid'
=>
$uid
,
'adminname'
=>
$name
,
'adminuser'
=>
$user
,
'admintoken'
=>
$token
,
'logintime'
=>
time
(),
'ukey'
=>
$encryptKey
);
if
(
$user
==
'admin'
)
$session
[
'is_admin'
]
=
true
;
else
$session
[
'is_admin'
]
=
false
;
$this
->
rock
->
savesession
(
$session
);
$this
->
rock
->
adminid
=
$uid
;
$this
->
rock
->
adminname
=
$name
;
$this
->
admintoken
=
$token
;
$this
->
adminname
=
$name
;
$this
->
adminid
=
$uid
;
}
//更新token最后时间
private
function
uptokendt
(
$id
)
{
$this
->
update
(
"`moddt`='"
.
$this
->
rock
->
now
.
"',`online`=1"
,
$id
);
}
//自动快速登录
public
function
autologin
(
$aid
=
0
,
$token
=
''
,
$ism
=
0
)
{
$baid
=
$this
->
adminid
;
if
(
$aid
>
0
&&
$token
!=
''
){
$rs
=
$this
->
getone
(
"`uid`='
$aid
' and `token`='
$token
' and `online`=1"
,
'`name`,`id`'
);
if
(
!
$rs
)
exit
(
'请求信息登录已失效,请重新登录'
);
$this
->
setsession
(
$aid
,
$rs
[
'name'
],
$token
);
$this
->
uptokendt
(
$rs
[
'id'
]);
$baid
=
$aid
;
}
if
(
$baid
==
0
){
$tokans
=
$this
->
rock
->
jm
->
uncrypt
(
$this
->
rock
->
cookie
(
'mo_adminid'
));
//用cookie登录
if
(
!
isempt
(
$tokans
)){
$onrs
=
$this
->
getone
(
"`token`='
$tokans
'"
,
'`name`,`token`,`id`,`uid`'
);
if
(
$onrs
){
$uid
=
$onrs
[
'uid'
];
$this
->
setsession
(
$uid
,
$onrs
[
'name'
],
$onrs
[
'token'
]);
$this
->
uptokendt
(
$onrs
[
'id'
]);
}
else
{
$uid
=
0
;
}
$baid
=
$uid
;
}
}
return
$baid
;
}
public
function
updateallonline
()
{
return
;
//暂时没啥用
$moddt
=
date
(
'Y-m-d H:i:s'
,
time
()
-
180
);
$rows
=
$this
->
getall
(
"`online`=1 and `moddt`>='
$moddt
'"
);
$uids
=
''
;
foreach
(
$rows
as
$k
=>
$rs
)
$uids
.=
','
.
$rs
[
'uid'
]
.
''
;
if
(
$uids
!=
''
)
m
(
'admin'
)
->
update
(
'`online`=1'
,
"`id` in("
.
substr
(
$uids
,
1
)
.
")"
);
}
//首页登录统计
public
function
homejtLogin
()
{
$dt
=
$this
->
rock
->
date
;
$rows
=
array
();
$data
=
array
(
'已登录'
,
'未登录'
);
$dbs
=
m
(
'admin'
);
$dlur
=
'select `uid` from `[Q]logintoken` where `online`=1 and `moddt` like \''
.
$dt
.
'%\''
;
$zong
=
$dbs
->
rows
(
'`status`=1'
);
$delr
=
$dbs
->
rows
(
'`status`=1 and `id` in('
.
$dlur
.
')'
);
$rows
[]
=
array
(
'name'
=>
'未登录'
,
'value'
=>
$zong
-
$delr
,
'color'
=>
'#FF9999'
);
$rows
[]
=
array
(
'name'
=>
'已登录'
,
'value'
=>
$delr
,
'color'
=>
'#99CC00'
);
return
array
(
'rows'
=>
$rows
,
'data'
=>
$data
,
'dt'
=>
$dt
,
);
}
private
function
getRandomStr
(
$length
=
10
){
$strs
=
"QWERTYUIOPASDFGHJKLZXCVBNM1234567890qwertyuiopasdfghjklzxcvbnm"
;
return
substr
(
str_shuffle
(
$strs
),
mt_rand
(
0
,
strlen
(
$strs
)
-
11
),
$length
);
}
}
webmain/model/emfkDetailsModel.php
0 → 100644
浏览文件 @
f2335223
<?php
class
emfkDetailsClassModel
extends
Model
{
public
function
initModel
()
{
$this
->
settable
(
'c_emfk_details'
);
}
}
\ No newline at end of file
webmain/model/emfkModel.php
0 → 100644
浏览文件 @
f2335223
<?php
class
emfkClassModel
extends
Model
{
public
function
initModel
()
{
$this
->
settable
(
'c_emfk'
);
}
}
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论