c5_labsci/web/admin/welcome.php
2026-01-27 00:52:00 +08:00

30 lines
1.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace web\admin;
class welcome {
public static function json_init() {
global $db;
$rsuser = verifyfast();
$works = array();
// $csql = new \ciy\sql('zc_risk');
// $csql->where("bread=2");
// $cnt = toint($db->get1($csql));
// if ($cnt > 0)
// $works[] = array('title' => '风险待处置 ' . $cnt . '条', 'url' => 'risk.html?liid=1', 'tab' => '风险处置');
// $takarr = getstrparam(file_get_contents(PATH_ROOT . 'log/fork_apinotify.tak'), ',');
// if ($takarr['curr'] > $takarr['max'] / 2)
// $works[] = array('title' => 'apinotify任务排队过长。' . $takarr['curr'] . '/max' . $takarr['max'] . '' . (time() - $takarr['time']) . '秒前');
$errlog = file_get_contents(PATH_ROOT . 'log/err_db.log');
if (!empty($errlog))
$works[] = array('title' => '发现异常db数据 ' . count(explode("\n", $errlog)) . ' 条', 'url' => 'rigger/logfile.html?file=err_db');
$ret['works'] = $works;
return succjson($ret);
}
}