Overview

Packages

  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Datatype
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cSetupAdminPassword
  • cSetupClientAdjust
  • cSetupClientMode
  • cSetupConfigMode
  • cSetupInstaller
  • cSetupPath
  • cSetupResults
  • cSetupSetupSummary
  • cSetupSystemData
  • cSetupSystemtest
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  1: <?php
  2: /**
  3:  * This file contains the client adjust setup mask.
  4:  *
  5:  * @package    Setup
  6:  * @subpackage Form
  7:  * @version    SVN Revision $Rev:$
  8:  *
  9:  * @author     Unknown
 10:  * @copyright  four for business AG <www.4fb.de>
 11:  * @license    http://www.contenido.org/license/LIZENZ.txt
 12:  * @link       http://www.4fb.de
 13:  * @link       http://www.contenido.org
 14:  */
 15: 
 16: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
 17: 
 18: /**
 19:  * Client adjust setup mask.
 20:  *
 21:  * @package Setup
 22:  * @subpackage Form
 23:  */
 24: class cSetupClientAdjust extends cSetupMask {
 25: 
 26:     function cSetupClientAdjust($step, $previous, $next) {
 27:         global $db, $cfg, $cfgClient;
 28: 
 29:         cSetupMask::cSetupMask("templates/setup/forms/pathinfo.tpl", $step);
 30:         $this->setHeader(i18n("Client Settings", "setup"));
 31:         $this->_oStepTemplate->set("s", "TITLE", i18n("Client Settings", "setup"));
 32:         $this->_oStepTemplate->set("s", "DESCRIPTION", i18n("Please check the directories identified by the system. If you need to change a client path, click on the name and enter your new path in the available input box.", "setup"));
 33: 
 34:         $db = getSetupMySQLDBConnection();
 35: 
 36:         $aClients = listClients($db, $cfg['tab']['clients']);
 37: 
 38:         $cHTMLErrorMessageList = new cHTMLErrorMessageList();
 39:         $cHTMLFoldableErrorMessages = array();
 40: 
 41:         $aPathList = array();
 42: 
 43:         list($a_root_path, $a_root_http_path) = getSystemDirectories();
 44: 
 45:         @include($cfg['path']['contenido_config'] . 'config.php');
 46: 
 47:         setupInitializeCfgClient();
 48: 
 49:         foreach ($aClients as $idclient => $aInfo) {
 50:             $name = $aInfo['name'];
 51: 
 52:             if (isset($cfgClient[$idclient])) {
 53:                 $htmlPath = $cfgClient[$idclient]["path"]["htmlpath"];
 54:                 $frontendPath = $cfgClient[$idclient]["path"]["frontend"];
 55:             } else {
 56:                 $htmlPath = '';
 57:                 $frontendPath = '';
 58:             }
 59: 
 60:             if ($_SESSION["frontendpath"][$idclient] == "") {
 61:                 $iDifferencePos = findSimilarText($cfg['path']['frontend'] . "/", $frontendPath);
 62:                 if ($iDifferencePos > 0) {
 63:                     $sClientPath = $a_root_path . "/" . substr($frontendPath, $iDifferencePos + 1, strlen($frontendPath) - $iDifferencePos);
 64:                     $_SESSION["frontendpath"][$idclient] = $sClientPath;
 65:                 } else {
 66:                     $_SESSION["frontendpath"][$idclient] = $frontendPath;
 67:                 }
 68:             }
 69: 
 70:             if ($_SESSION["htmlpath"][$idclient] == "") {
 71:                 // Use frontendpath instead of htmlpath as the directories should be aligned pairwhise
 72:                 $iDifferencePos = findSimilarText($cfg['path']['frontend'] . "/", $frontendPath);
 73:                 if ($iDifferencePos > 0) {
 74:                     $sClientPath = $a_root_http_path . "/" . substr($frontendPath, $iDifferencePos + 1, strlen($frontendPath) - $iDifferencePos);
 75:                     $_SESSION["htmlpath"][$idclient] = $sClientPath;
 76:                 } else {
 77:                     $_SESSION["htmlpath"][$idclient] = $htmlPath;
 78:                 }
 79:             }
 80: 
 81:             $sName = sprintf(i18n("Old server path for %s (%s)", "setup"), $name, $idclient);
 82:             $sName .= ":<br>" . $frontendPath . "<br><br>";
 83:             $sName .= sprintf(i18n("New server path for %s (%s)", "setup"), $name, $idclient);
 84:             $sName .= ":<br>";
 85:             $oSystemPathBox = new cHTMLTextbox("frontendpath[$idclient]", $_SESSION["frontendpath"][$idclient]);
 86:             $oSystemPathBox->setWidth(100);
 87:             $oSystemPathBox->setClass("small");
 88:             $oClientSystemPath = new cHTMLInfoMessage(array($sName, $oSystemPathBox), "&nbsp;");
 89:             $oClientSystemPath->_oTitle->setStyle("padding-left:8px;padding-bottom:8px;width:90%;");
 90: 
 91:             $aPathList[] = $oClientSystemPath;
 92: 
 93:             $sName = sprintf(i18n("Old web path for %s (%s)", "setup"), $name, $idclient);
 94:             $sName .= ":<br>" . $htmlPath . "<br><br>";
 95:             $sName .= sprintf(i18n("New web path for %s (%s)", "setup"), $name, $idclient);
 96:             $sName .= ":<br>";
 97:             $oSystemPathBox = new cHTMLTextbox("htmlpath[$idclient]", $_SESSION["htmlpath"][$idclient]);
 98:             $oSystemPathBox->setWidth(100);
 99:             $oSystemPathBox->setClass("small");
100:             $oClientSystemPath = new cHTMLInfoMessage(array($sName, $oSystemPathBox), "&nbsp;");
101:             $oClientSystemPath->_oTitle->setStyle("padding-left:8px;padding-bottom:8px;width:90%;");
102: 
103:             $aPathList[] = $oClientSystemPath;
104:         }
105: 
106:         $cHTMLErrorMessageList->setContent($aPathList);
107: 
108:         $this->_oStepTemplate->set("s", "CONTROL_PATHINFO", $cHTMLErrorMessageList->render());
109: 
110:         $this->setNavigation($previous, $next);
111:     }
112: 
113: }
114: 
115: ?>
CMS CONTENIDO 4.9.3 API documentation generated by ApiGen 2.8.0