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
|
|
|
* Alumni module for Xoops |
13
|
|
|
* |
14
|
|
|
* @copyright XOOPS Project https://xoops.org/ |
15
|
|
|
* @license GPL 2.0 or later |
16
|
|
|
* @package alumni |
17
|
|
|
* @since 2.6.x |
18
|
|
|
* @author John Mordo (jlm69) |
19
|
|
|
*/ |
20
|
|
|
|
21
|
|
|
include __DIR__ . '/admin_header.php'; |
22
|
|
|
$xoops = Xoops::getInstance(); |
23
|
|
|
$xoops->header(); |
24
|
|
|
|
25
|
|
|
$listingHandler = $xoops->getModuleHandler('listing', 'alumni'); |
26
|
|
|
|
27
|
|
|
$criteria = new CriteriaCompo(); |
28
|
|
|
$criteria->add(new Criteria('valid', 1)); |
29
|
|
|
$listing_valid = $listingHandler->getCount($criteria); |
|
|
|
|
30
|
|
|
|
31
|
|
|
$moderateCriteria = new CriteriaCompo(); |
32
|
|
|
$moderateCriteria->add(new Criteria('valid', 0, '=')); |
33
|
|
|
$moderate_count = $listingHandler->getCount($moderateCriteria); |
|
|
|
|
34
|
|
|
|
35
|
|
|
$adminObject = new \Xoops\Module\Admin(); |
36
|
|
|
$adminObject->displayNavigation('index.php'); |
37
|
|
|
$adminObject->addInfoBox(AlumniLocale::LISTINGS, 'listing'); |
38
|
|
|
$adminObject->addInfoBoxLine(sprintf(AlumniLocale::TOTAL_LISTINGS, $moderate_count + $listing_valid), 'listing'); |
|
|
|
|
39
|
|
|
$adminObject->addInfoBoxLine(sprintf(AlumniLocale::TOTAL_VALID, $listing_valid), 'listing'); |
|
|
|
|
40
|
|
|
$adminObject->addInfoBoxLine(sprintf(AlumniLocale::TOTAL_NOT_VALID, $moderate_count), 'listing'); |
|
|
|
|
41
|
|
|
|
42
|
|
|
$extensions = [ |
43
|
|
|
'comments' => 'extension', |
44
|
|
|
'notifications' => 'extension', |
45
|
|
|
'xcaptcha' => 'extension' |
46
|
|
|
]; |
47
|
|
|
foreach ($extensions as $module => $type) { |
48
|
|
|
$adminObject->addConfigBoxLine([$module, 'warning'], $type); |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
$adminObject->displayIndex(); |
52
|
|
|
|
53
|
|
|
$xoops->footer(); |
54
|
|
|
|
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.