|
|
|
@ -2204,7 +2204,8 @@ function a_array_unique($array){
|
|
|
|
|
* op_type=>操作类型 1:编辑 2:删除 3:下载,
|
|
|
|
|
* op_name=>操作说明 例如:编辑,删除,锁定等,
|
|
|
|
|
* url=>需要跳转的url 添加去列表加唯一id,编辑直接去编辑页面,下载可以重新下载(新开页面),
|
|
|
|
|
* key=>关键词:用户的账号,游戏的名词等
|
|
|
|
|
* key=>关键词:用户的账号,游戏的名词等,
|
|
|
|
|
* menu=>非必须,菜单目录,不存在的话按控制器寻找
|
|
|
|
|
* )
|
|
|
|
|
*/
|
|
|
|
|
function addOperationLog($options)
|
|
|
|
@ -2229,18 +2230,24 @@ function a_array_unique($array){
|
|
|
|
|
'key'=>$options['key'],
|
|
|
|
|
'create_time'=>time()
|
|
|
|
|
];
|
|
|
|
|
//获取菜单名词
|
|
|
|
|
$act = CONTROLLER_NAME.'/'.ACTION_NAME;
|
|
|
|
|
$arr = [];
|
|
|
|
|
$menuname = D("menu")->field('title,pid,group')->where("url = '{$act}'")->find();
|
|
|
|
|
if($menuname){
|
|
|
|
|
$arr[] = $menuname['title'];
|
|
|
|
|
if(!empty($menuname['group'])){
|
|
|
|
|
$arr[] = $menuname['group'];
|
|
|
|
|
//获取菜单名称
|
|
|
|
|
if(!array_key_exists("menu",$options)){
|
|
|
|
|
$act = CONTROLLER_NAME.'/'.ACTION_NAME;
|
|
|
|
|
$arr = [];
|
|
|
|
|
$menuname = D("menu")->field('title,pid,group')->where("url = '{$act}'")->find();
|
|
|
|
|
if($menuname){
|
|
|
|
|
$arr[] = $menuname['title'];
|
|
|
|
|
if(!empty($menuname['group'])){
|
|
|
|
|
$arr[] = $menuname['group'];
|
|
|
|
|
}
|
|
|
|
|
getLink($menuname['pid'],$arr);
|
|
|
|
|
}
|
|
|
|
|
getLink($menuname['pid'],$arr);
|
|
|
|
|
$addarray['menu'] = implode ( "-",array_reverse($arr));
|
|
|
|
|
}else{
|
|
|
|
|
$addarray['menu'] = $options['menu'];
|
|
|
|
|
}
|
|
|
|
|
$addarray['menu'] = implode ( "-",array_reverse($arr));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
M("OperationLog","tab_")->add($addarray);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|