$msg = $myts->htmlspecialchars($msg, ENT_QUOTES, _UPGRADE_CHARSET, false); return '<span class="result-y">y</span> ' . $msg; } else { switch ($path) { case 'lib': case 'data': default: $msg = ERR_COULD_NOT_ACCESS; break; } $msg = $myts->htmlspecialchars($msg, ENT_QUOTES, _UPGRADE_CHARSET, false); return '<span class="result-x">x</span> ' . $msg; } } $vars =& $_SESSION['settings']; $ctrl = new PathStuffController(); if ($res = $ctrl->execute()) { return $res; } $myts = MyTextSanitizer::getInstance(); ?> <form action='<?php echo $_SERVER['PHP_SELF']; ?> ' method='post'> <fieldset> <legend><?php echo LEGEND_XOOPS_PATHS; ?>
<p><?php echo TRUST_PATH_NEED_CREATED_MANUALLY . '</p>'; ?> <button type="button" onclick="createTrustPath(this.form.elements.trustpath.value);"><?php echo BUTTON_REFRESH; ?> </button> <?php } else { ?> <p><?php echo TRUST_PATH_SUCCESSFULLY_CREATED . '</p>'; } } $ctrl = new PathStuffController(); if ($_SERVER['REQUEST_METHOD'] == 'GET' && @$_GET['action'] == 'checkrootpath') { $ctrl->xoopsRootPath = $_GET['path']; echo genRootCheckHtml($ctrl->checkRootPath()); exit; } if ($_SERVER['REQUEST_METHOD'] == 'GET' && @$_GET['action'] == 'checktrustpath') { $ctrl->xoopsTrustPath = $_GET['path']; echo genTrustPathCheckHtml($ctrl->checkTrustPath()); exit; } if ($_SERVER['REQUEST_METHOD'] == 'GET' && @$_GET['action'] == 'createtrustpath') { $ctrl->xoopsTrustPath = $_GET['path']; echo genCreateTrustPathHtml($ctrl->createTrustPath()); exit; }
function check_path() { if (!(defined("XOOPS_PATH") && defined("XOOPS_VAR_PATH") && defined("XOOPS_TRUST_PATH"))) { return false; } $ctrl = new PathStuffController(); if (!$ctrl->checkPath()) { return false; } if (!$ctrl->checkPermissions()) { return false; } return true; }
* @since 2.3.0 * @author Haruki Setoyama <*****@*****.**> * @author Kazumi Ono <*****@*****.**> * @author Skalpa Keo <*****@*****.**> * @author Taiwen Jiang <*****@*****.**> * @author DuGris (aka L. JEN) <*****@*****.**> * @version $Id: page_pathsettings.php 2841 2009-02-21 10:24:09Z phppp $ **/ require_once './include/common.inc.php'; if (!defined('XOOPS_INSTALL')) { die('XOOPS Installation wizard die'); } include_once './class/pathcontroller.php'; $pageHasForm = true; $pageHasHelp = true; $ctrl = new PathStuffController($wizard->configs['xoopsPathDefault'], $wizard->configs['dataPath']); if ($_SERVER['REQUEST_METHOD'] == 'GET' && @$_GET['var'] && @$_GET['action'] == 'checkpath') { $path = $_GET['var']; $ctrl->xoopsPath[$path] = htmlspecialchars(trim($_GET['path'])); echo genPathCheckHtml($path, $ctrl->checkPath($path)); exit; } $ctrl->execute(); if ($_SERVER['REQUEST_METHOD'] == 'POST') { return; } ob_start(); ?> <script type="text/javascript"> function removeTrailing(id, val) { if (val[val.length-1] == '/') {