XOOPS  2.6.0
index.php
Go to the documentation of this file.
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 
22 include __DIR__ . '/header.php';
23 // Get avatars handler
26 $avatar_Handler = $helper->getHandlerAvatar();
27 
28 $xoops->header();
29 // avatars not display system
31 $criteria->add(new Criteria('avatar_display', 0));
32 $criteria->add(new Criteria('avatar_type', 'S'));
34 // avatars display system
35 $criteria = new CriteriaCompo();
36 $criteria->add(new Criteria('avatar_display', 0, '!='));
37 $criteria->add(new Criteria('avatar_type', 'S'));
39 // total avatars system
41 // avatars not display custom
42 $criteria = new CriteriaCompo();
43 $criteria->add(new Criteria('avatar_display', 0));
44 $criteria->add(new Criteria('avatar_type', 'C'));
46 // avatars display custom
47 $criteria = new CriteriaCompo();
48 $criteria->add(new Criteria('avatar_display', 0, '!='));
49 $criteria->add(new Criteria('avatar_type', 'C'));
51 // total avatars custom
53 // folder path
54 $folder_path = \XoopsBaseConfig::get('root-path') . '/uploads/avatars';
55 
56 $admin_page = new \Xoops\Module\Admin();
57 $admin_page->displayNavigation('index.php');
58 
59 $admin_page->addInfoBox(AvatarsLocale::SYSTEM, 'avatar_system');
60 $admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBTOTAL_S, $avatars_total_s), 'avatar_system');
61 $admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBDISPLAY_S, '<span class="green">' . $avatars_display_s . '</span>'), 'avatar_system');
62 $admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBNOTDISPLAY_S, '<span class="red">' . $avatars_notdisplay_s . '</span>'), 'avatar_system');
63 
64 $admin_page->addInfoBox(AvatarsLocale::CUSTOM, 'avatar_custom');
65 $admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBTOTAL_C, $avatars_total_c), 'avatar_custom');
66 $admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBDISPLAY_C, '<span class="green">' . $avatars_display_c . '</span>'), 'avatar_custom');
67 $admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBNOTDISPLAY_C, '<span class="red">' . $avatars_notdisplay_c . '</span>'), 'avatar_custom');
68 
69 $admin_page->addConfigBoxLine($folder_path, 'folder');
70 $admin_page->addConfigBoxLine(array($folder_path, '777'), 'chmod');
71 $admin_page->addConfigBoxLine('thumbnail', 'service');
72 
73 $admin_page->displayIndex();
74 
75 $xoops->footer();
const NBTOTAL_C
Definition: en_US.php:46
$folder_path
Definition: index.php:54
const NBTOTAL_S
Definition: en_US.php:47
static getInstance()
Definition: Xoops.php:160
$avatars_notdisplay_c
Definition: index.php:45
const NBNOTDISPLAY_C
Definition: en_US.php:44
$avatars_total_s
Definition: index.php:40
$avatars_display_s
Definition: index.php:38
static get($name)
$criteria
Definition: index.php:30
const NBDISPLAY_S
Definition: en_US.php:43
static getInstance()
Definition: helper.php:34
$avatars_notdisplay_s
Definition: index.php:33
const NBDISPLAY_C
Definition: en_US.php:42
const NBNOTDISPLAY_S
Definition: en_US.php:45
$helper
Definition: index.php:25
$admin_page
Definition: index.php:56
$avatars_total_c
Definition: index.php:52
$avatar_Handler
Definition: index.php:26
$avatars_display_c
Definition: index.php:50
if(file_exists($mainfile)) elseif(file_exists(__DIR__. '/install/index.php')) $xoops
Definition: index.php:36