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
    • NavigationMain
    • 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 mode 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 mode setup mask.
 20:  *
 21:  * @package Setup
 22:  * @subpackage Form
 23:  */
 24: class cSetupClientMode extends cSetupMask {
 25: 
 26:     function cSetupClientMode($step, $previous, $next) {
 27:         global $cfgClient;
 28: 
 29:         cSetupMask::cSetupMask("templates/setup/forms/clientmode.tpl", $step);
 30:         $this->setHeader(i18n("Example Client", "setup"));
 31:         $this->_oStepTemplate->set("s", "TITLE", i18n("Example Client", "setup"));
 32:         $this->_oStepTemplate->set("s", "DESCRIPTION", i18n("If you are new to CONTENIDO, you should create an example client to start working with.", "setup"));
 33: 
 34:         cArray::initializeKey($_SESSION, "clientmode", "");
 35: 
 36:         $folders = "";
 37:         $moduleFolderNotEmpty = false;
 38:         if (cFileHandler::exists("../cms/css")) {
 39:             if (!cFileHandler::isDirectoryEmpty("../cms/css")) {
 40:                 $folders .= "cms/css/, ";
 41:             }
 42:         }
 43:         if (cFileHandler::exists("../cms/js")) {
 44:             if (!cFileHandler::isDirectoryEmpty("../cms/js")) {
 45:                 $folders .= "cms/js/, ";
 46:             }
 47:         }
 48:         if (cFileHandler::exists("../cms/templates")) {
 49:             if (!cFileHandler::isDirectoryEmpty("../cms/templates")) {
 50:                 $folders .= "cms/templates/, ";
 51:             }
 52:         }
 53:         if (cFileHandler::exists("../cms/data/modules")) {
 54:             if (!cFileHandler::isDirectoryEmpty("../cms/data/modules")) {
 55:                 $folders .= "cms/data/modules/, ";
 56:                 $moduleFolderNotEmpty = true;
 57:             }
 58:         }
 59:         if (cFileHandler::exists("../cms/data/layouts")) {
 60:             if (!cFileHandler::isDirectoryEmpty("../cms/data/layouts")) {
 61:                 $folders .= "cms/data/layouts/, ";
 62:             }
 63:         }
 64: 
 65:         $this->_oStepTemplate->set("s", "FOLDER_MESSAGE_EXAMPLES", "");
 66:         $this->_oStepTemplate->set("s", "FOLDER_MESSAGE_MODULES", "");
 67:         if (strlen($folders) > 0) {
 68:             $folders = substr($folders, 0, strlen($folders) - 2);
 69:         }
 70: 
 71:         $exampleMessage = i18n("PLEASE NOTE: Some folders (%s) which are used by the example client aren't empty. THESE WILL BE OVERWRITTEN", "setup");
 72:         $moduleMessage = i18n("PLEASE NOTE: The cms/data/modules folder is not empty. IT WILL BE OVERWRITTEN", "setup");
 73: 
 74:         $aChoices = array(
 75:             "CLIENTEXAMPLES" => i18n("Client with example modules and example content", "setup") . ((strlen($folders) > 0) ? " <span class='additionalInfo'>(" . sprintf($exampleMessage, $folders) . ")</span>" : ""),
 76:             "CLIENTMODULES" => i18n("Client with example modules, but without example content", "setup") . (($moduleFolderNotEmpty) ? " <span class='additionalInfo'>(" . $moduleMessage . ")</span>" : ""),
 77:             "NOCLIENT" => i18n("Don't create client", "setup")
 78:         );
 79: 
 80:         foreach ($aChoices as $sKey => $sChoice) {
 81:             $oRadio = new cHTMLRadiobutton("clientmode", $sKey);
 82:             $oRadio->setLabelText(" ");
 83:             $oRadio->setStyle('width:auto;border:0;');
 84: 
 85:             if ($_SESSION["clientmode"] == $sKey || ($_SESSION["clientmode"] == "" && $sKey == "CLIENTEXAMPLES")) {
 86:                 $oRadio->setChecked("checked");
 87:             }
 88: 
 89:             $oLabel = new cHTMLLabel($sChoice, $oRadio->getId());
 90: 
 91:             $this->_oStepTemplate->set("s", "CONTROL_" . $sKey, $oRadio->render());
 92:             $this->_oStepTemplate->set("s", "LABEL_" . $sKey, $oLabel->render());
 93:         }
 94: 
 95:         $this->setNavigation($previous, $next);
 96:     }
 97: 
 98: }
 99: 
100: ?>
CMS CONTENIDO 4.9.0 API documentation generated by ApiGen 2.8.0