*/ include dirname(dirname(__DIR__)) . '/header.php'; // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) { exit(_NOPERM); } error_reporting(0); $GLOBALS['xoopsLogger']->activated = false; if (file_exists('./../../language/' . $xoopsConfig['language'] . '"/admin/tplsets.php')) { include_once './../../language/' . $xoopsConfig['language'] . '/admin/tplsets.php'; } else { include_once './../../language/english/admin/tplsets.php'; } XoopsLoad::load('XoopsRequest'); $GLOBALS['xoopsLogger']->usePopup = true; $op = XoopsRequest::getCmd('op', 'default'); switch ($op) { // Display tree folder case 'tpls_display_folder': $_REQUEST['dir'] = urldecode($_REQUEST['dir']); $root = XOOPS_THEME_PATH; if (file_exists($root . $_REQUEST['dir'])) { $files = scandir($root . $_REQUEST['dir']); natcasesort($files); if (count($files) > 2) { /* The 2 accounts for . and .. */ echo "<ul class=\"jqueryFileTree\" style=\"display: none;\">"; // All dirs foreach ($files as $file) { if (file_exists($root . $_REQUEST['dir'] . $file) && $file !== '.' && $file !== '..' && is_dir($root . $_REQUEST['dir'] . $file)) { //retirer .svn
* @license GNU GPL 2 (http://www.gnu.org/licenses/gpl-2.0.html) * @package kernel * @since 2.0.0 */ include __DIR__ . '/mainfile.php'; XoopsLoad::load('XoopsRequest'); $xoopsPreload = XoopsPreload::getInstance(); $xoopsPreload->triggerEvent('core.edituser.start'); xoops_loadLanguage('user'); include_once $GLOBALS['xoops']->path('class/xoopsformloader.php'); // If not a user, redirect if (!is_object($xoopsUser)) { redirect_header('index.php', 3, _US_NOEDITRIGHT); } // initialize $op variable $op = XoopsRequest::getCmd('op', 'editprofile'); $config_handler = xoops_getHandler('config'); $xoopsConfigUser = $config_handler->getConfigsByCat(XOOPS_CONF_USER); $myts = MyTextSanitizer::getInstance(); if ($op === 'saveuser') { if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header('index.php', 3, _US_NOEDITRIGHT . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); } $uid = XoopsRequest::getInt('uid', 0); if (empty($uid) || $xoopsUser->getVar('uid') != $uid) { redirect_header('index.php', 3, _US_NOEDITRIGHT); } $errors = array(); if ($xoopsConfigUser['allow_chgmail'] == 1) { $email = XoopsRequest::getEmail('email', ''); if (empty($email)) {
exit; } } if (is_object($xoopsUser)) { $myts = MyTextSanitizer::getInstance(); if ($op === 'submit') { $res = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('users') . ' WHERE uid=' . XoopsRequest::getInt('to_userid', 0, 'POST') . ''); list($count) = $xoopsDB->fetchRow($res); if ($count != 1) { echo '<br><br><div><h4>' . _PM_USERNOEXIST . '<br>'; echo _PM_PLZTRYAGAIN . '</h4><br>'; echo "[ <a href='javascript:history.go(-1)' title=''>" . _PM_GOBACK . '</a> ]</div>'; } else { $pm_handler = xoops_getHandler('privmessage'); $pm = $pm_handler->create(); $msg_image = XoopsRequest::getCmd('icon', null, 'POST'); if (in_array($msg_image, $subject_icons)) { $pm->setVar('msg_image', $msg_image); } $pm->setVar('subject', XoopsRequest::getString('subject', null, 'POST')); $pm->setVar('msg_text', XoopsRequest::getString('message', null, 'POST')); $pm->setVar('to_userid', XoopsRequest::getInt('to_userid', 0, 'POST')); $pm->setVar('from_userid', $xoopsUser->getVar('uid')); if (!$pm_handler->insert($pm)) { echo $pm->getHtmlErrors(); echo "<br><a href='javascript:history.go(-1)' title=''>" . _PM_GOBACK . '</a>'; } else { echo "<br><br><div style='text-align:center;'><h4>" . _PM_MESSAGEPOSTED . "</h4><br><a href=\"javascript:window.opener.location='" . XOOPS_URL . "/viewpmsg.php';window.close();\" title=\"\">" . _PM_CLICKHERE . "</a><br><br><a href=\"javascript:window.close();\" title=\"\">" . _PM_ORCLOSEWINDOW . '</a></div>'; } } } elseif ($reply == 1 || $send == 1 || $send2 == 1) {