public function checkTodo() { $checkTodo = S("checkTodo"); if (empty($checkTodo)) { $check_res = ""; $AccessEvent = new AccessEvent(); $UpdateEvent = new UpdateEvent(); if ($UpdateEvent->check()) { $check_res .= '<li><a href="' . U("Admin/System/update") . '"><i class="fa fa-laptop"></i> 发现新的可升级版本</a></li>'; } if (!$UpdateEvent->checkVersion()) { $check_res .= '<li><a href="' . U("Admin/System/update") . '"><i class="fa fa-laptop"></i> 数据库中版本号与代码中不一致</a></li>'; } if (!$AccessEvent->checkAccess()) { $check_res .= '<li><a href="' . U("Admin/Access/rolelist") . '"><i class="fa fa-laptop"></i> 需要重建角色权限!</a></li>'; } if (!$AccessEvent->checkNode()) { $check_res .= '<li><a href="' . U("Admin/Access/nodelist") . '"><i class="fa fa-laptop"></i> 需要重建节点!</a></li>'; } if ($check_res == "") { $check_res = "none"; } S("checkTodo", $check_res); die($check_res); } else { die(S("checkTodo")); } }
public function checkVersion() { $UpdateEvent = new UpdateEvent(); $cheack_res = $UpdateEvent->check(); if ($cheack_res) { $message = '<li><a href="' . U("Admin/System/update") . '"><i class="fa fa-laptop"></i> 发现新的可升级版本</a></li>'; } else { $message = 'none'; } die($message); }
/** * */ public function checkupdate() { $Update = new UpdateEvent(); $Update->check(); }