1
|
|
|
<?php |
2
|
|
|
/* |
3
|
|
|
You may not change or alter any portion of this comment or credits |
4
|
|
|
of supporting developers from this source code or any supporting source code |
5
|
|
|
which is considered copyrighted (c) material of the original comment or credit authors. |
6
|
|
|
|
7
|
|
|
This program is distributed in the hope that it will be useful, |
8
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
9
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* animal module for xoops |
14
|
|
|
* |
15
|
|
|
* @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/ |
16
|
|
|
* @copyright XOOPS Project (https://xoops.org) |
17
|
|
|
* @license GPL 2.0 or later |
18
|
|
|
* @package animal |
19
|
|
|
* @since 2.5.x |
20
|
|
|
* @author XOOPS Development Team ( [email protected] ) - ( https://xoops.org ) |
21
|
|
|
*/ |
22
|
|
|
function b_waiting_animal() |
23
|
|
|
{ |
24
|
|
|
$xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
|
|
|
|
25
|
|
|
$ret = []; |
26
|
|
|
|
27
|
|
|
// waiting pedigree_trash |
28
|
|
|
$block = []; |
29
|
|
|
|
30
|
|
|
$result = $GLOBALS['xoopsDB']->query('SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_trash') . ' WHERE pedigree_trash_waiting=1'); |
31
|
|
|
if ($result) { |
32
|
|
|
$block['adminlink'] = XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/admin/pedigree_trash.php?op=listWaiting'; |
|
|
|
|
33
|
|
|
[$block['pendingnum']] = $GLOBALS['xoopsDB']->fetchRow($result); |
34
|
|
|
$block['lang_linkname'] = _PI_WAITING_WAITINGS; |
|
|
|
|
35
|
|
|
} |
36
|
|
|
$ret[] = $block; |
37
|
|
|
|
38
|
|
|
// waiting mod_owner |
39
|
|
|
$block = []; |
40
|
|
|
|
41
|
|
|
$result = $GLOBALS['xoopsDB']->query('SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_owner') . ' WHERE owner_waiting=1'); |
42
|
|
|
if ($result) { |
43
|
|
|
$block['adminlink'] = XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/admin/owner.php?op=listWaiting'; |
44
|
|
|
[$block['pendingnum']] = $GLOBALS['xoopsDB']->fetchRow($result); |
45
|
|
|
$block['lang_linkname'] = _PI_WAITING_WAITINGS; |
46
|
|
|
} |
47
|
|
|
$ret[] = $block; |
48
|
|
|
|
49
|
|
|
// waiting pedigree_temp |
50
|
|
|
$block = []; |
51
|
|
|
|
52
|
|
|
$result = $GLOBALS['xoopsDB']->query('SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_temp') . ' WHERE pedigree_temp_waiting=1'); |
53
|
|
|
if ($result) { |
54
|
|
|
$block['adminlink'] = XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/admin/pedigree_temp.php?op=listWaiting'; |
55
|
|
|
[$block['pendingnum']] = $GLOBALS['xoopsDB']->fetchRow($result); |
56
|
|
|
$block['lang_linkname'] = _PI_WAITING_WAITINGS; |
57
|
|
|
} |
58
|
|
|
$ret[] = $block; |
59
|
|
|
|
60
|
|
|
// waiting pedigree |
61
|
|
|
$block = []; |
62
|
|
|
|
63
|
|
|
$result = $GLOBALS['xoopsDB']->query('SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_registry') . ' WHERE pedigree_waiting=1'); |
64
|
|
|
if ($result) { |
65
|
|
|
$block['adminlink'] = XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/admin/pedigree.php?op=listWaiting'; |
66
|
|
|
[$block['pendingnum']] = $GLOBALS['xoopsDB']->fetchRow($result); |
67
|
|
|
$block['lang_linkname'] = _PI_WAITING_WAITINGS; |
68
|
|
|
} |
69
|
|
|
$ret[] = $block; |
70
|
|
|
|
71
|
|
|
// waiting pedigree_fields |
72
|
|
|
$block = []; |
73
|
|
|
|
74
|
|
|
$result = $GLOBALS['xoopsDB']->query('SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . ' WHERE pedigree_fields_waiting=1'); |
75
|
|
|
if ($result) { |
76
|
|
|
$block['adminlink'] = XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/admin/pedigree_fields.php?op=listWaiting'; |
77
|
|
|
[$block['pendingnum']] = $GLOBALS['xoopsDB']->fetchRow($result); |
78
|
|
|
$block['lang_linkname'] = _PI_WAITING_WAITINGS; |
79
|
|
|
} |
80
|
|
|
$ret[] = $block; |
81
|
|
|
|
82
|
|
|
return $ret; |
83
|
|
|
} |
84
|
|
|
|