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 config 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:  * Config mode setup mask.
 18:  *
 19:  * @package Setup
 20:  * @subpackage Form
 21:  */
 22: class cSetupConfigMode extends cSetupMask {
 23: 
 24:     /**
 25:      * cSetupConfigMode constructor.
 26:      * @param string $step
 27:      * @param string $previous
 28:      * @param string $next
 29:      */
 30:     public function __construct($step, $previous, $next) {
 31:         $cfg = cRegistry::getConfig();
 32: 
 33:         if ($_SESSION["setuptype"] == "setup") {
 34:             cSetupMask::__construct("templates/setup/forms/configmode.tpl", $step);
 35:         } else {
 36:             cSetupMask::__construct("templates/setup/forms/configmodewopass.tpl", $step);
 37:         }
 38:         $this->setHeader(i18n("config.php mode", "setup"));
 39:         $this->_stepTemplateClass->set("s", "TITLE", i18n("config.php mode", "setup"));
 40:         $this->_stepTemplateClass->set("s", "DESCRIPTION", i18n("Please choose 'save' or 'download'", "setup"));
 41:         $this->_stepTemplateClass->set("s", "LABEL_DESCRIPTION", i18n("CONTENIDO requires a configuration file called 'config.php'. This file will be generated by the setup automatically if the filesystem permissions are correct. If 'save' is activated by default, setup can save the file config.php. If not, 'download' is activated by default, and you have to place the file in the directory &quot;data/config/{environment}/&quot; manually when a download prompt appears. The download prompt appears at the end of the setup process.", "setup"));
 42: 
 43:         $oConfigSave = new cHTMLRadiobutton("configmode", "save");
 44:         $oConfigSave->setLabelText(" ");
 45:         $oConfigSave->setStyle('width:auto;border:0;');
 46: 
 47:         $oConfigDownload = new cHTMLRadiobutton("configmode", "download");
 48:         $oConfigDownload->setLabelText(" ");
 49:         $oConfigDownload->setStyle('width:auto;border:0;');
 50: 
 51:         if (canWriteFile($cfg['path']['contenido_config'] . 'config.php')) {
 52:             $oConfigSave->setChecked(true);
 53:         } else {
 54:             $oConfigDownload->setChecked(true);
 55:         }
 56: 
 57:         $oConfigSaveLabel = new cHTMLLabel(i18n("Save", "setup"), $oConfigSave->getID());
 58:         $this->_stepTemplateClass->set("s", "CONTROL_SAVE", $oConfigSave->render());
 59:         $this->_stepTemplateClass->set("s", "CONTROL_SAVELABEL", $oConfigSaveLabel->render());
 60: 
 61:         $oConfigDownloadLabel = new cHTMLLabel(i18n("Download", "setup"), $oConfigDownload->getID());
 62:         $this->_stepTemplateClass->set("s", "CONTROL_DOWNLOAD", $oConfigDownload->render());
 63:         $this->_stepTemplateClass->set("s", "CONTROL_DOWNLOADLABEL", $oConfigDownloadLabel->render());
 64: 
 65:         $this->setNavigation($previous, $next);
 66:     }
 67: 
 68:     /**
 69:      * Old constructor
 70:      * @deprecated [2016-04-14] This method is deprecated and is not needed any longer. Please use __construct() as constructor function.
 71:      * @param string $step
 72:      * @param string $previous
 73:      * @param string $next
 74:      */
 75:     public function cSetupConfigMode($step, $previous, $next) {
 76:         cDeprecated('This method is deprecated and is not needed any longer. Please use __construct() as constructor function.');
 77:         $this->__construct($step, $previous, $next);
 78:     }
 79: 
 80:     /**
 81:      * (non-PHPdoc)
 82:      * @see cSetupMask::_createNavigation()
 83:      */
 84:     protected function _createNavigation() {
 85:         $link = new cHTMLLink("#");
 86: 
 87:         if ($this->_nextstep == "doinstall") {
 88:             // Install launcher
 89:         }
 90: 
 91:         $link->attachEventDefinition("pageAttach", "onclick", "document.setupform.step.value = '".$this->_nextstep."'; document.setupform.submit();");
 92:         $link->setClass("nav");
 93:         $link->setContent("<span>&raquo;</span>");
 94:         $this->_stepTemplateClass->set("s", "NEXT", $link->render());
 95: 
 96:         $backlink = new cHTMLLink("#");
 97:         $backlink->attachEventDefinition("pageAttach", "onclick", "document.setupform.step.value = '".$this->_backstep."';");
 98:         $backlink->attachEventDefinition("submitAttach", "onclick", "document.setupform.submit();");
 99:         $backlink->setClass("nav navBack");
100:         $backlink->setContent("<span>&raquo;</span>");
101:         $this->_stepTemplateClass->set("s", "BACK", $backlink->render());
102:     }
103: 
104: }
105: 
106: ?>
CMS CONTENIDO 4.10.0 API documentation generated by ApiGen 2.8.0