Conditions | 3 |
Paths | 4 |
Total Lines | 27 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
6 | function b_waiting_system() |
||
7 | { |
||
8 | /** @var \XoopsMySQLDatabase $xoopsDB */ |
||
9 | $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
||
10 | $ret = []; |
||
11 | |||
12 | // comments |
||
13 | $block = []; |
||
14 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('xoopscomments') . ' WHERE com_status=1'); |
||
15 | if ($result) { |
||
16 | $block['adminlink'] = XOOPS_URL . '/modules/system/admin.php?module=0&status=1&fct=comments'; |
||
17 | [$block['pendingnum']] = $xoopsDB->fetchRow($result); |
||
|
|||
18 | $block['lang_linkname'] = _PI_WAITING_COMMENTS; |
||
19 | } |
||
20 | $ret[] = $block; |
||
21 | |||
22 | // Inactive Users |
||
23 | $block = []; |
||
24 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('users') . ' WHERE level=0'); |
||
25 | if ($result) { |
||
26 | $block['adminlink'] = XOOPS_URL . '/modules/system/admin.php?fct=users'; |
||
27 | [$block['pendingnum']] = $xoopsDB->fetchRow($result); |
||
28 | $block['lang_linkname'] = _PI_WAITING_INACTIVE_USERS; |
||
29 | } |
||
30 | $ret[] = $block; |
||
31 | |||
32 | return $ret; |
||
33 | } |
||
34 |