XOOPS
2.6.0
Main Page
Related Pages
Classes
Files
Examples
File List
File Members
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
24
$xoops
=
Xoops::getInstance
();
25
$helper
=
Avatars::getInstance
();
26
$avatar_Handler
=
$helper
->getHandlerAvatar();
27
28
$xoops
->header();
29
// avatars not display system
30
$criteria
=
new
CriteriaCompo
();
31
$criteria
->add(
new
Criteria
(
'avatar_display'
, 0));
32
$criteria
->add(
new
Criteria
(
'avatar_type'
,
'S'
));
33
$avatars_notdisplay_s
=
$avatar_Handler
->getCount(
$criteria
);
34
// avatars display system
35
$criteria
=
new
CriteriaCompo
();
36
$criteria
->add(
new
Criteria
(
'avatar_display'
, 0,
'!='
));
37
$criteria
->add(
new
Criteria
(
'avatar_type'
,
'S'
));
38
$avatars_display_s
=
$avatar_Handler
->getCount(
$criteria
);
39
// total avatars system
40
$avatars_total_s
=
$avatars_notdisplay_s
+
$avatars_display_s
;
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'
));
45
$avatars_notdisplay_c
=
$avatar_Handler
->getCount(
$criteria
);
46
// avatars display custom
47
$criteria
=
new
CriteriaCompo
();
48
$criteria
->add(
new
Criteria
(
'avatar_display'
, 0,
'!='
));
49
$criteria
->add(
new
Criteria
(
'avatar_type'
,
'C'
));
50
$avatars_display_c
=
$avatar_Handler
->getCount(
$criteria
);
51
// total avatars custom
52
$avatars_total_c
=
$avatars_notdisplay_c
+
$avatars_display_c
;
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();
AvatarsLocaleEn_US\NBTOTAL_C
const NBTOTAL_C
Definition:
en_US.php:46
$folder_path
$folder_path
Definition:
index.php:54
AvatarsLocaleEn_US\NBTOTAL_S
const NBTOTAL_S
Definition:
en_US.php:47
Xoops\getInstance
static getInstance()
Definition:
Xoops.php:160
$avatars_notdisplay_c
$avatars_notdisplay_c
Definition:
index.php:45
AvatarsLocaleEn_US\NBNOTDISPLAY_C
const NBNOTDISPLAY_C
Definition:
en_US.php:44
AvatarsLocaleEn_US\SYSTEM
const SYSTEM
Definition:
en_US.php:48
$avatars_total_s
$avatars_total_s
Definition:
index.php:40
$avatars_display_s
$avatars_display_s
Definition:
index.php:38
XoopsBaseConfig\get
static get($name)
Definition:
XoopsBaseConfig.php:117
$criteria
$criteria
Definition:
index.php:30
AvatarsLocaleEn_US\NBDISPLAY_S
const NBDISPLAY_S
Definition:
en_US.php:43
Avatars\getInstance
static getInstance()
Definition:
helper.php:34
include
$avatars_notdisplay_s
$avatars_notdisplay_s
Definition:
index.php:33
AvatarsLocaleEn_US\NBDISPLAY_C
const NBDISPLAY_C
Definition:
en_US.php:42
AvatarsLocaleEn_US\NBNOTDISPLAY_S
const NBNOTDISPLAY_S
Definition:
en_US.php:45
$helper
$helper
Definition:
index.php:25
$admin_page
$admin_page
Definition:
index.php:56
AvatarsLocaleEn_US\CUSTOM
const CUSTOM
Definition:
en_US.php:37
$avatars_total_c
$avatars_total_c
Definition:
index.php:52
CriteriaCompo
Definition:
criteria.php:22
$avatar_Handler
$avatar_Handler
Definition:
index.php:26
Criteria
Definition:
criteria.php:29
$avatars_display_c
$avatars_display_c
Definition:
index.php:50
$xoops
if(file_exists($mainfile)) elseif(file_exists(__DIR__. '/install/index.php')) $xoops
Definition:
index.php:36
usr64
htdocs
modules
avatars
admin
index.php
Generated on Fri May 22 2015 03:07:00 for XOOPS by
1.8.9.1