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