Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • PHP
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • 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 mode setup mask.
  4:  *
  5:  * @package    Setup
  6:  * @subpackage Form
  7:  * @author     Unknown
  8:  * @copyright  four for business AG <www.4fb.de>
  9:  * @license    http://www.contenido.org/license/LIZENZ.txt
 10:  * @link       http://www.4fb.de
 11:  * @link       http://www.contenido.org
 12:  */
 13: 
 14: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
 15: 
 16: /**
 17:  * Client mode setup mask.
 18:  *
 19:  * @package Setup
 20:  * @subpackage Form
 21:  */
 22: class cSetupClientMode extends cSetupMask {
 23: 
 24:     /**
 25:      * cSetupClientMode constructor.
 26:      * @param $step
 27:      * @param $previous
 28:      * @param $next
 29:      */
 30:     public function __construct($step, $previous, $next) {
 31: 
 32:         cSetupMask::__construct("templates/setup/forms/clientmode.tpl", $step);
 33:         $this->setHeader(i18n("Example Client", "setup"));
 34:         $this->_stepTemplateClass->set("s", "TITLE", i18n("Example Client", "setup"));
 35:         $this->_stepTemplateClass->set("s", "DESCRIPTION", i18n("If you are new to CONTENIDO, you should create an example client to start working with.", "setup"));
 36: 
 37:         cArray::initializeKey($_SESSION, "clientmode", "");
 38: 
 39:         $folders = "";
 40:         $moduleFolderNotEmpty = false;
 41:         if (cFileHandler::exists("../cms/css")) {
 42:             if (!cDirHandler::isDirectoryEmpty("../cms/css")) {
 43:                 $folders .= "cms/css/, ";
 44:             }
 45:         }
 46:         if (cFileHandler::exists("../cms/js")) {
 47:             if (!cDirHandler::isDirectoryEmpty("../cms/js")) {
 48:                 $folders .= "cms/js/, ";
 49:             }
 50:         }
 51:         if (cFileHandler::exists("../cms/templates")) {
 52:             if (!cDirHandler::isDirectoryEmpty("../cms/templates")) {
 53:                 $folders .= "cms/templates/, ";
 54:             }
 55:         }
 56:         if (cFileHandler::exists("../cms/data/modules")) {
 57:             if (!cDirHandler::isDirectoryEmpty("../cms/data/modules")) {
 58:                 $folders .= "cms/data/modules/, ";
 59:                 $moduleFolderNotEmpty = true;
 60:             }
 61:         }
 62:         if (cFileHandler::exists("../cms/data/layouts")) {
 63:             if (!cDirHandler::isDirectoryEmpty("../cms/data/layouts")) {
 64:                 $folders .= "cms/data/layouts/, ";
 65:             }
 66:         }
 67: 
 68:         $this->_stepTemplateClass->set("s", "FOLDER_MESSAGE_EXAMPLES", "");
 69:         $this->_stepTemplateClass->set("s", "FOLDER_MESSAGE_MODULES", "");
 70:         if (cString::getStringLength($folders) > 0) {
 71:             $folders = cString::getPartOfString($folders, 0, cString::getStringLength($folders) - 2);
 72:         }
 73: 
 74:         $exampleMessage = i18n("PLEASE NOTE: Some folders (%s) which are used by the example client aren't empty. THESE WILL BE OVERWRITTEN", "setup");
 75:         $moduleMessage = i18n("PLEASE NOTE: The cms/data/modules folder is not empty. IT WILL BE OVERWRITTEN", "setup");
 76: 
 77:         $aChoices = array(
 78:             "CLIENTEXAMPLES" => i18n("Client with example modules and example content", "setup") . ((cString::getStringLength($folders) > 0) ? " <span class='additionalInfo'>(" . sprintf($exampleMessage, $folders) . ")</span>" : ""),
 79:             "CLIENTMODULES" => i18n("Client with example modules, but without example content", "setup") . (($moduleFolderNotEmpty) ? " <span class='additionalInfo'>(" . $moduleMessage . ")</span>" : ""),
 80:             "NOCLIENT" => i18n("Don't create client", "setup")
 81:         );
 82: 
 83:         foreach ($aChoices as $sKey => $sChoice) {
 84:             $oRadio = new cHTMLRadiobutton("clientmode", $sKey);
 85:             $oRadio->setLabelText(" ");
 86:             $oRadio->setStyle('width:auto;border:0;');
 87: 
 88:             if ($_SESSION["clientmode"] == $sKey || ($_SESSION["clientmode"] == "" && $sKey == "CLIENTEXAMPLES")) {
 89:                 $oRadio->setChecked("checked");
 90:             }
 91: 
 92:             $oLabel = new cHTMLLabel($sChoice, $oRadio->getID());
 93: 
 94:             $this->_stepTemplateClass->set("s", "CONTROL_" . $sKey, $oRadio->render());
 95:             $this->_stepTemplateClass->set("s", "LABEL_" . $sKey, $oLabel->render());
 96:         }
 97: 
 98:         $this->setNavigation($previous, $next);
 99:     }
100: 
101:     /**
102:      * Old constructor
103:      * @deprecated [2016-04-14] This method is deprecated and is not needed any longer. Please use __construct() as constructor function.
104:      * @param $step
105:      * @param $previous
106:      * @param $next
107:      */
108:     function cSetupClientMode($step, $previous, $next) {
109:         cDeprecated('This method is deprecated and is not needed any longer. Please use __construct() as constructor function.');
110:         $this->__construct($step, $previous, $next);
111:     }
112: 
113: }
114: 
115: ?>
CMS CONTENIDO 4.10.0 API documentation generated by ApiGen 2.8.0