123456789101112131415161718192021222324252627282930313233 |
- <?php
- /*
- |--------------------------------------------------------------------------
- | log.php 后台操作日志
- |--------------------------------------------------------------------------
- */
- namespace MazeApp\Manage\Lib;
- use Maze;
- class Log
- {
- /**
- * 记录后台操作日志
- *
- * @return string
- */
- static public function add($project, $table, $info, $tid)
- {
- $data['操作'] = $info['method'];
- $data['TID'] = $tid;
- $data['时间'] = date('Y-m-d H:i:s');
- $data += $info['input'];
-
- $admin = Maze::load('manage/auth.info');
- $param['add_project'] = $project;
- $param['add_table'] = $table;
- $param['add_info'] = base64_encode(Maze::table($data));
- $param['add_admin'] = $admin['id'];
- $param['add_tid'] = $tid;
- return Maze::load('manage/log-insert', $param);
- }
- }
|