XOOPS
2.6.0
Main Page
Related Pages
Classes
Files
Examples
File List
File Members
jquery.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
dirname(dirname(__DIR__)) .
'/header.php'
;
23
24
$xoops
=
Xoops::getInstance
();
25
$system
=
System::getInstance
();
26
27
if
(!
$xoops
->isUser() || !
$xoops
->isModule() || !
$xoops
->user->isAdmin(
$xoops
->module->mid())) {
28
exit
(
XoopsLocale::E_NO_ACCESS_PERMISSION
);
29
}
30
31
$xoops
->logger()->quiet();
32
//$xoops->disableErrorReporting();
33
34
if
(isset($_REQUEST[
"op"
])) {
35
$op
= $_REQUEST[
"op"
];
36
}
else
{
37
@
$op
=
"default"
;
38
}
39
40
switch
(
$op
) {
41
42
// Display post
43
case
'display_post'
:
44
include_once
$xoops
->path(
'modules/system/include/functions.php'
);
45
46
$uid
=
$system
->cleanVars($_REQUEST,
'uid'
,
'int'
);
47
$total_posts = 0;
48
49
/* @var $plugin SystemPluginInterface */
50
$plugins = \Xoops\Module\Plugin::getPlugins();
51
foreach
($plugins as $plugin) {
52
if
(
$res
= $plugin->userPosts(
$uid
)) {
53
$total_posts +=
$res
;
54
}
55
}
56
57
$qb =
$xoops
->db()->createXoopsQueryBuilder();
58
$eb = $qb->expr();
59
$sql
= $qb->updatePrefix(
'users'
)
60
->set(
'posts'
,
':posts'
)
61
->where(
'uid = :uid'
)
62
->setParameter(
':posts'
, $total_posts)
63
->setParameter(
':uid'
,
$uid
);
64
$row_count =
$sql
->execute();
65
echo $row_count;
66
break
;
67
}
$res
if(!$dbm->isConnectable()) $res
Definition:
page_siteinit.php:119
System\getInstance
static getInstance()
Definition:
system.php:46
Xoops\getInstance
static getInstance()
Definition:
Xoops.php:160
exit
exit
Definition:
browse.php:104
$system
$system
Definition:
jquery.php:25
$uid
if(!$xoops->isUser()) $uid
Definition:
index.php:31
include
$xoops
$xoops
Definition:
jquery.php:24
$sql
$sql
Definition:
pda.php:32
XoopsLocaleEn_US\E_NO_ACCESS_PERMISSION
const E_NO_ACCESS_PERMISSION
Definition:
en_US.php:351
$op
$op
Definition:
xoops_images.php:31
usr64
htdocs
modules
system
admin
users
jquery.php
Generated on Fri May 22 2015 03:07:04 for XOOPS by
1.8.9.1