fixes for PHP 7

Dieser Commit ist enthalten in:
oldperl 2017-01-13 12:45:12 +00:00
Ursprung 263db360cf
Commit 6a52c9cda3
18 geänderte Dateien mit 979 neuen und 1068 gelöschten Zeilen

Datei anzeigen

@ -38,7 +38,7 @@ class cHTMLAlphaImage extends cHTMLImage {
var $_sMouseoverSrc; var $_sMouseoverSrc;
function __construct() { function __construct() {
cHTMLImage::__construct(); parent::__construct();
} }
function setMouseover ($sMouseoverSrc) function setMouseover ($sMouseoverSrc)
@ -90,7 +90,7 @@ class cHTMLErrorMessageList extends cHTMLDiv {
public function __construct() { public function __construct() {
$this->_oTable = new cHTMLTable(); $this->_oTable = new cHTMLTable();
$this->_oTable->setWidth("100%"); $this->_oTable->setWidth("100%");
cHTMLDiv::__construct(); parent::__construct();
$this->setClass("errorlist"); $this->setClass("errorlist");
$this->setStyle("width: 450px; height: 218px; overflow: auto; border: 1px solid black;"); $this->setStyle("width: 450px; height: 218px; overflow: auto; border: 1px solid black;");
} }
@ -163,7 +163,7 @@ class cHTMLFoldableErrorMessage extends cHTMLTableRow {
$this->_oIcon->setContent(" "); $this->_oIcon->setContent(" ");
} }
cHTMLTableRow::__construct(); parent::__construct();
} }
function toHTML() { function toHTML() {
@ -191,7 +191,7 @@ class cHTMLInfoMessage extends cHTMLTableRow {
$this->_oMessage->setContent($sMessage); $this->_oMessage->setContent($sMessage);
$this->_oMessage->setClass("entry_nowrap"); $this->_oMessage->setClass("entry_nowrap");
cHTMLTableRow::__construct(); parent::__construct();
} }
function toHTML() { function toHTML() {
@ -209,7 +209,7 @@ class cHTMLLanguageLink extends cHTMLDiv {
* @param int $stepnumber * @param int $stepnumber
*/ */
function __construct($langcode, $langname, $stepnumber) { function __construct($langcode, $langname, $stepnumber) {
cHTMLDiv::__construct(); parent::__construct();
$linkImage = new cHTMLAlphaImage(); $linkImage = new cHTMLAlphaImage();
$linkImage->setAlt(""); $linkImage->setAlt("");
@ -249,7 +249,7 @@ class cHTMLButtonLink extends cHTMLDiv {
* @param string $title * @param string $title
*/ */
function __construct($href, $title) { function __construct($href, $title) {
cHTMLDiv::__construct(); parent::__construct();
$linkImage = new cHTMLAlphaImage(); $linkImage = new cHTMLAlphaImage();
$linkImage->setSrc("../conlite/images/submit.gif"); $linkImage->setSrc("../conlite/images/submit.gif");

Datei anzeigen

@ -1,13 +1,16 @@
<?php <?php
/** /**
* Project: * Class Setup Mask
* Contenido Content Management System
* *
* Description: * @package ConLite
* @subpackage Setup
* @version $Rev: 279 $
* @author Ortwin Pinke <o.pinke@conlite.org>
* @copyright (c) 2017, conlite.org
* *
* Requirements: * $Id: class.setupmask.php 279 2013-11-21 14:34:53Z oldperl $:
* @con_php_req 5 */
* /**
* @package ContenidoBackendArea * @package ContenidoBackendArea
* @version 0.2 * @version 0.2
* @author unknown * @author unknown
@ -15,125 +18,100 @@
* @license http://www.contenido.org/license/LIZENZ.txt * @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de * @link http://www.4fb.de
* @link http://www.contenido.org * @link http://www.contenido.org
*
*
*
* {@internal
* created unknown
* modified 2008-07-07, bilal arslan, added security fix
*
* $Id: class.setupmask.php 279 2013-11-21 14:34:53Z oldperl $:
* }}
*
*/ */
if(!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
class cSetupMask class cSetupMask {
{
function cSetupMask ($sStepTemplate, $iStep = false)
{
$this->_oTpl = new Template;
$this->_oStepTemplate = new Template;
$this->_sStepTemplate = $sStepTemplate;
$this->_iStep = $iStep;
$this->_bNavigationEnabled = false;
}
function setNavigation ($sBackstep, $sNextstep)
{
$this->_bNavigationEnabled = true;
$this->_bBackstep = $sBackstep;
$this->_bNextstep = $sNextstep;
}
function setHeader ($sHeader)
{
if (array_key_exists("setuptype", $_SESSION))
{
$sSetupType = $_SESSION["setuptype"];
} else {
$sSetupType = "";
}
switch ($sSetupType)
{
case "setup":
$this->_sHeader = "Setup - ".$sHeader;
break;
case "upgrade":
$this->_sHeader = "Upgrade - ".$sHeader;
break;
case "migration":
$this->_sHeader = "Migration - ".$sHeader;
break;
default:
$this->_sHeader = $sHeader;
break;
}
public function __construct($sStepTemplate, $iStep = false) {
} $this->_oTpl = new Template;
$this->_oStepTemplate = new Template;
function _createNavigation ()
{
$link = new cHTMLLink("#");
$link->attachEventDefinition("pageAttach", "onclick", "document.setupform.step.value = '".$this->_bNextstep."';");
$link->attachEventDefinition("submitAttach", "onclick", "document.setupform.submit();");
$nextSetup = new cHTMLAlphaImage;
$nextSetup->setSrc("../conlite/images/submit.gif");
$nextSetup->setMouseOver("../conlite/images/submit_hover.gif");
$nextSetup->setClass("button");
$link->setContent($nextSetup);
if ($this->_bNextstep != "")
{
$this->_oStepTemplate->set("s", "NEXT", $link->render());
} else {
$this->_oStepTemplate->set("s", "NEXT", '');
}
$backlink = new cHTMLLink("#");
$backlink->attachEventDefinition("pageAttach", "onclick", "document.setupform.step.value = '".$this->_bBackstep."';");
$backlink->attachEventDefinition("submitAttach", "onclick", "document.setupform.submit();");
$backSetup = new cHTMLAlphaImage;
$backSetup->setSrc("images/controls/back.gif");
$backSetup->setMouseOver("images/controls/back.gif");
$backSetup->setClass("button");
$backSetup->setStyle("margin-right: 10px");
$backlink->setContent($backSetup);
$this->_oStepTemplate->set("s", "BACK", $backlink->render());
}
function render ()
{
if ($this->_bNavigationEnabled)
{
$this->_createNavigation();
}
if ($this->_iStep !== false)
{
$this->_oTpl->set("s", "STEPS", cGenerateSetupStepsDisplay($this->_iStep));
} else {
$this->_oTpl->set("s", "STEPS", "");
}
$this->_oTpl->set("s", "HEADER", $this->_sHeader);
$this->_oTpl->set("s", "TITLE", "ConLite Setup - " . $this->_sHeader);
$this->_oTpl->set("s", "CONTENT", $this->_oStepTemplate->generate($this->_sStepTemplate, true, false)); $this->_sStepTemplate = $sStepTemplate;
$this->_iStep = $iStep;
$this->_bNavigationEnabled = false;
}
$this->_oTpl->generate("templates/setup.tpl",false,false); public function setNavigation($sBackstep, $sNextstep) {
} $this->_bNavigationEnabled = true;
$this->_bBackstep = $sBackstep;
$this->_bNextstep = $sNextstep;
}
public function setHeader($sHeader) {
if (array_key_exists("setuptype", $_SESSION)) {
$sSetupType = $_SESSION["setuptype"];
} else {
$sSetupType = "";
}
switch ($sSetupType) {
case "setup":
$this->_sHeader = "Setup - " . $sHeader;
break;
case "upgrade":
$this->_sHeader = "Upgrade - " . $sHeader;
break;
case "migration":
$this->_sHeader = "Migration - " . $sHeader;
break;
default:
$this->_sHeader = $sHeader;
break;
}
}
public function _createNavigation() {
$link = new cHTMLLink("#");
$link->attachEventDefinition("pageAttach", "onclick", "document.setupform.step.value = '" . $this->_bNextstep . "';");
$link->attachEventDefinition("submitAttach", "onclick", "document.setupform.submit();");
$nextSetup = new cHTMLAlphaImage;
$nextSetup->setSrc("../conlite/images/submit.gif");
$nextSetup->setMouseOver("../conlite/images/submit_hover.gif");
$nextSetup->setClass("button");
$link->setContent($nextSetup);
if ($this->_bNextstep != "") {
$this->_oStepTemplate->set("s", "NEXT", $link->render());
} else {
$this->_oStepTemplate->set("s", "NEXT", '');
}
$backlink = new cHTMLLink("#");
$backlink->attachEventDefinition("pageAttach", "onclick", "document.setupform.step.value = '" . $this->_bBackstep . "';");
$backlink->attachEventDefinition("submitAttach", "onclick", "document.setupform.submit();");
$backSetup = new cHTMLAlphaImage;
$backSetup->setSrc("images/controls/back.gif");
$backSetup->setMouseOver("images/controls/back.gif");
$backSetup->setClass("button");
$backSetup->setStyle("margin-right: 10px");
$backlink->setContent($backSetup);
$this->_oStepTemplate->set("s", "BACK", $backlink->render());
}
public function render() {
if ($this->_bNavigationEnabled) {
$this->_createNavigation();
}
if ($this->_iStep !== false) {
$this->_oTpl->set("s", "STEPS", cGenerateSetupStepsDisplay($this->_iStep));
} else {
$this->_oTpl->set("s", "STEPS", "");
}
$this->_oTpl->set("s", "HEADER", $this->_sHeader);
$this->_oTpl->set("s", "TITLE", "ConLite Setup - " . $this->_sHeader);
$this->_oTpl->set("s", "CONTENT", $this->_oStepTemplate->generate($this->_sStepTemplate, true, false));
$this->_oTpl->generate("templates/setup.tpl", false, false);
}
} }
?> ?>

Datei anzeigen

@ -1,16 +1,16 @@
<?php <?php
/** /**
* Project: * Class Template for setup
* Contenido Content Management System
* *
* Description: * @package ConLite
* Contenido Template Engine * @subpackage Setup
* @version $Rev: 283 $
* @author Ortwin Pinke <o.pinke@conlite.org>
* @copyright (c) 2017, conlite.org
* *
* Requirements: * $Id: class.template.php 283 2014-01-09 14:48:38Z oldperl $:
* @con_php_req 5 */
* @con_notice /**
* Light template mechanism
*
* @package ContenidoBackendArea * @package ContenidoBackendArea
* @version 1.2 * @version 1.2
* @author Jan Lengowski <Jan.Lengowski@4fb.de> * @author Jan Lengowski <Jan.Lengowski@4fb.de>
@ -18,266 +18,239 @@
* @license http://www.contenido.org/license/LIZENZ.txt * @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de * @link http://www.4fb.de
* @link http://www.contenido.org * @link http://www.contenido.org
*
*
*
* {@internal
* created unknown
* modified unknown, Stefan Jelner (Optimizations)
* modified 2008-07-07, bilal arslan, added security fix
*
* $Id: class.template.php 283 2014-01-09 14:48:38Z oldperl $:
* }}
*
*/ */
if(!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
class Template class Template {
{
/**
* Needles (static)
* @var array
*/
var $needles = array ();
/** /**
* Replacements (static) * Needles (static)
* @var array * @var array
*/ */
var $replacements = array (); var $needles = array();
/** /**
* Dyn_Needles (dynamic) * Replacements (static)
* @var array * @var array
*/ */
var $Dyn_needles = array (); var $replacements = array();
/** /**
* Dyn_Replacements (dynamic) * Dyn_Needles (dynamic)
* @var array * @var array
*/ */
var $Dyn_replacements = array (); var $Dyn_needles = array();
/** /**
* Database instance * Dyn_Replacements (dynamic)
* @var object * @var array
*/ */
var $db; var $Dyn_replacements = array();
/** /**
* Template cache * Database instance
* @var array * @var object
*/ */
var $tplcache; var $db;
/** /**
* Template name cache * Template cache
* @var array * @var array
*/ */
var $tplnamecache; var $tplcache;
/** /**
* Dynamic counter * Template name cache
* @var int * @var array
*/ */
var $dyn_cnt = 0; var $tplnamecache;
/** /**
* Tags array (for dynamic blocks); * Dynamic counter
* @var array * @var int
*/ */
var $tags = array ('static' => '{%s}', 'start' => '<!-- BEGIN:BLOCK -->', 'end' => '<!-- END:BLOCK -->'); var $dyn_cnt = 0;
/** /**
* Constructor function * Tags array (for dynamic blocks);
* @return void * @var array
*/ */
function Template($tags = false) var $tags = array('static' => '{%s}', 'start' => '<!-- BEGIN:BLOCK -->', 'end' => '<!-- END:BLOCK -->');
{
$this->tplcache = Array ();
$this->tplnamecache = Array ();
if (is_array($tags)) /**
{ * Constructor function
$this->tags = $tags; * @return void
} */
public function __construct($tags = false) {
$this->setEncoding(""); $this->tplcache = Array();
$this->setDomain("conlite"); $this->tplnamecache = Array();
} // end function
if (is_array($tags)) {
$this->tags = $tags;
}
$this->setEncoding("");
$this->setDomain("conlite");
}
// end function
/** /**
* setDomain * setDomain
* *
* Sets the gettext domain to use for translations in a template * Sets the gettext domain to use for translations in a template
* *
* @param $sDomain string Sets the domain to use for template translations * @param $sDomain string Sets the domain to use for template translations
* @return none * @return none
*/ */
function setDomain ($sDomain) public function setDomain($sDomain) {
{ $this->_sDomain = $sDomain;
$this->_sDomain = $sDomain;
} }
/**
* Set Templates placeholders and values
*
* With this method you can replace the placeholders
* in the static templates with dynamic data.
*
* @param $which String 's' for Static or else dynamic
* @param $needle String Placeholder
* @param $replacement String Replacement String
*
* @return void
*/
function set($which = 's', $needle, $replacement)
{
if ($which == 's')
{ // static
$this->needles[] = sprintf($this->tags['static'], $needle);
$this->replacements[] = $replacement;
} else /**
{ // dynamic * Set Templates placeholders and values
$this->Dyn_needles[$this->dyn_cnt][] = sprintf($this->tags['static'], $needle); *
$this->Dyn_replacements[$this->dyn_cnt][] = $replacement; * With this method you can replace the placeholders
* in the static templates with dynamic data.
} *
} * @param $which String 's' for Static or else dynamic
* @param $needle String Placeholder
* @param $replacement String Replacement String
*
* @return void
*/
public function set($which = 's', $needle, $replacement) {
if ($which == 's') { // static
$this->needles[] = sprintf($this->tags['static'], $needle);
$this->replacements[] = $replacement;
} else { // dynamic
$this->Dyn_needles[$this->dyn_cnt][] = sprintf($this->tags['static'], $needle);
$this->Dyn_replacements[$this->dyn_cnt][] = $replacement;
}
}
/** /**
* Sets an encoding for the template's head block. * Sets an encoding for the template's head block.
* *
* @param $encoding string Encoding to set * @param $encoding string Encoding to set
*/ */
function setEncoding ($encoding) public function setEncoding($encoding) {
{ $this->_encoding = $encoding;
$this->_encoding = $encoding;
} }
/**
* Iterate internal counter by one
*
* @return void
*/
function next()
{
$this->dyn_cnt++;
}
/** /**
* Reset template data * Iterate internal counter by one
* *
* @return void * @return void
*/ */
function reset() public function next() {
{ $this->dyn_cnt++;
$this->dyn_cnt = 0; }
$this->needles = array ();
$this->replacements = array ();
$this->Dyn_needles = array ();
$this->Dyn_replacements = array ();
}
/** /**
* Generate the template and * Reset template data
* print/return it. (do translations sequentially to save memory!!!) *
* * @return void
* @param $template string/file Template */
* @param $return bool Return or print template public function reset() {
* @param $note bool Echo "Generated by ... " Comment $this->dyn_cnt = 0;
* $this->needles = array();
* @return string complete Template string $this->replacements = array();
*/ $this->Dyn_needles = array();
function generate($template, $return = 0, $note = 1) $this->Dyn_replacements = array();
{ }
global $cfg;
$this->set("s", "TPL_ACT_YEAR", date("Y"));
//check if the template is a file or a string
if (!@ file_exists($template))
$content = & $template; //template is a string (it is a reference to save memory!!!)
else
$content = implode("", file($template)); //template is a file
$content = (($note) ? "<!-- Generated by ConLite ".$cfg['version']."-->\n" : "").$content; /**
* Generate the template and
* print/return it. (do translations sequentially to save memory!!!)
*
* @param $template string/file Template
* @param $return bool Return or print template
* @param $note bool Echo "Generated by ... " Comment
*
* @return string complete Template string
*/
public function generate($template, $return = 0, $note = 1) {
global $cfg;
$this->set("s", "TPL_ACT_YEAR", date("Y"));
//check if the template is a file or a string
if (!@ file_exists($template))
$content = & $template; //template is a string (it is a reference to save memory!!!)
else
$content = implode("", file($template)); //template is a file
$pieces = array(); $content = (($note) ? "<!-- Generated by ConLite " . $cfg['version'] . "-->\n" : "") . $content;
//if content has dynamic blocks
if (preg_match("/^.*".preg_quote($this->tags['start'], "/").".*?".preg_quote($this->tags['end'], "/").".*$/s", $content))
{
//split everything into an array
preg_match_all("/^(.*)".preg_quote($this->tags['start'], "/")."(.*?)".preg_quote($this->tags['end'], "/")."(.*)$/s", $content, $pieces);
//safe memory
array_shift($pieces);
$content = "";
//now combine pieces together
//start block $pieces = array();
$pieces[0][0] = str_replace($this->needles, $this->replacements, $pieces[0][0]);
$this->replacei18n($pieces[0][0], "i18n");
$this->replacei18n($pieces[0][0], "trans");
$content .= $pieces[0][0];
unset ($pieces[0][0]);
//generate dynamic blocks //if content has dynamic blocks
for ($a = 0; $a < $this->dyn_cnt; $a ++) if (preg_match("/^.*" . preg_quote($this->tags['start'], "/") . ".*?" . preg_quote($this->tags['end'], "/") . ".*$/s", $content)) {
{ //split everything into an array
$temp = str_replace($this->Dyn_needles[$a], $this->Dyn_replacements[$a], $pieces[1][0]); preg_match_all("/^(.*)" . preg_quote($this->tags['start'], "/") . "(.*?)" . preg_quote($this->tags['end'], "/") . "(.*)$/s", $content, $pieces);
$this->replacei18n($temp, "i18n"); //safe memory
$this->replacei18n($temp, "trans"); array_shift($pieces);
$content .= $temp; $content = "";
} //now combine pieces together
unset ($temp); //start block
$pieces[0][0] = str_replace($this->needles, $this->replacements, $pieces[0][0]);
$this->replacei18n($pieces[0][0], "i18n");
$this->replacei18n($pieces[0][0], "trans");
$content .= $pieces[0][0];
unset($pieces[0][0]);
//end block //generate dynamic blocks
$pieces[2][0] = str_replace($this->needles, $this->replacements, $pieces[2][0]); for ($a = 0; $a < $this->dyn_cnt; $a ++) {
$this->replacei18n($pieces[2][0], "i18n"); $temp = str_replace($this->Dyn_needles[$a], $this->Dyn_replacements[$a], $pieces[1][0]);
$this->replacei18n($pieces[2][0], "trans"); $this->replacei18n($temp, "i18n");
$content .= $pieces[2][0]; $this->replacei18n($temp, "trans");
unset ($pieces[2][0]); $content .= $temp;
} else }
{ unset($temp);
$content = str_replace($this->needles, $this->replacements, $content);
$this->replacei18n($content, "i18n");
$this->replacei18n($content, "trans");
}
if ($this->_encoding != "") //end block
{ $pieces[2][0] = str_replace($this->needles, $this->replacements, $pieces[2][0]);
$content = str_replace("</head>", '<meta http-equiv="Content-Type" content="text/html; charset='.$this->_encoding.'">'."\n".'</head>', $content); $this->replacei18n($pieces[2][0], "i18n");
$this->replacei18n($pieces[2][0], "trans");
$content .= $pieces[2][0];
unset($pieces[2][0]);
} else {
$content = str_replace($this->needles, $this->replacements, $content);
$this->replacei18n($content, "i18n");
$this->replacei18n($content, "trans");
} }
if ($return)
return $content;
else
echo $content;
} # end function if ($this->_encoding != "") {
$content = str_replace("</head>", '<meta http-equiv="Content-Type" content="text/html; charset=' . $this->_encoding . '">' . "\n" . '</head>', $content);
}
/** if ($return)
* replacei18n() return $content;
* else
* Replaces a named function with the translated variant echo $content;
* }
* @param $template string Contents of the template to translate (it is reference to save memory!!!)
* @param $functionName string Name of the translation function (e.g. i18n)
*/
function replacei18n(& $template, $functionName)
{
$matches = array();
//if template contains functionName + parameter store all matches
preg_match_all("/".preg_quote($functionName, "/")."\\(([\\\"\\'])(.*?)\\1\\)/s", $template, $matches);
$matches = array_values(array_unique($matches[2]));
for ($a = 0; $a < count($matches); $a ++)
{
$template = preg_replace("/".preg_quote($functionName, "/")."\\([\\\"\\']".preg_quote($matches[$a], "/")."[\\\"\\']\\)/s", i18n($matches[$a], $this->_sDomain), $template);
}
}
} # end class # end function
/**
* replacei18n()
*
* Replaces a named function with the translated variant
*
* @param $template string Contents of the template to translate (it is reference to save memory!!!)
* @param $functionName string Name of the translation function (e.g. i18n)
*/
public function replacei18n(& $template, $functionName) {
$matches = array();
//if template contains functionName + parameter store all matches
preg_match_all("/" . preg_quote($functionName, "/") . "\\(([\\\"\\'])(.*?)\\1\\)/s", $template, $matches);
$matches = array_values(array_unique($matches[2]));
for ($a = 0; $a < count($matches); $a ++) {
$template = preg_replace("/" . preg_quote($functionName, "/") . "\\([\\\"\\']" . preg_quote($matches[$a], "/") . "[\\\"\\']\\)/s", i18n($matches[$a], $this->_sDomain), $template);
}
}
}
?> ?>

Datei anzeigen

@ -57,5 +57,5 @@ define('C_SETUP_STEPFILE_ACTIVE', 'images/steps/s%da.png');
define('C_SETUP_STEPWIDTH', 28); define('C_SETUP_STEPWIDTH', 28);
define('C_SETUP_STEPHEIGHT', 28); define('C_SETUP_STEPHEIGHT', 28);
define('C_SETUP_MIN_PHP_VERSION', '5.3'); define('C_SETUP_MIN_PHP_VERSION', '5.3');
define('C_SETUP_VERSION', '2.0.0RC3'); define('C_SETUP_VERSION', '2.0.1');
?> ?>

Datei anzeigen

@ -43,8 +43,8 @@ if (version_compare(PHP_VERSION, '5.3.0', '<')) {
// Check version // Check version
//PHP >= 5.0.0 and < 6.0.0 //PHP >= 5.0.0 and < 6.0.0
if (version_compare(PHP_VERSION, '6.0.0', '>=')) { if (version_compare(PHP_VERSION, '7.2.0', '>=')) {
die("You need PHP >= 5.3.0 < 6.0.0 for ConLite. Sorry, even the setup doesn't work otherwise. Your version: " . PHP_VERSION . "\n"); die("You need PHP >= 5.3.0 < 7.2.0 for ConLite. Sorry, even the setup doesn't work otherwise. Your version: " . PHP_VERSION . "\n");
} }

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -41,47 +42,46 @@
* }} * }}
* *
*/ */
if(!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
class cSetupAdditionalPlugins extends cSetupMask class cSetupAdditionalPlugins extends cSetupMask {
{
function cSetupAdditionalPlugins ($step, $previous, $next) public function __construct($step, $previous, $next) {
{
$db = getSetupMySQLDBConnection(); $db = getSetupMySQLDBConnection();
cSetupMask::cSetupMask("templates/setup/forms/additionalplugins.tpl", $step); parent::__construct("templates/setup/forms/additionalplugins.tpl", $step);
$this->setHeader(i18n_setup("Additional Plugins")); $this->setHeader(i18n_setup("Additional Plugins"));
$this->_oStepTemplate->set("s", "TITLE", i18n_setup("Additional Plugins")); $this->_oStepTemplate->set("s", "TITLE", i18n_setup("Additional Plugins"));
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Please select Plugins to be installed")); $this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Please select Plugins to be installed"));
// add new plugins to this array and you're done. // add new plugins to this array and you're done.
$aPlugins = array(); $aPlugins = array();
$aPlugins['plugin_newsletter'] = array('label' => i18n_setup('Newsletter'), 'desc' => i18n_setup('Newsletterfunctionality for dispatching text newsletters and HTML-Newsletters, extensible with professional newsletter extensions. Definition of newsletter recipients and groups of recipients. Layout design of the HTML-Newsletters by ConLite articles.')); $aPlugins['plugin_newsletter'] = array('label' => i18n_setup('Newsletter'), 'desc' => i18n_setup('Newsletterfunctionality for dispatching text newsletters and HTML-Newsletters, extensible with professional newsletter extensions. Definition of newsletter recipients and groups of recipients. Layout design of the HTML-Newsletters by ConLite articles.'));
$aPlugins['plugin_content_allocation'] = array('label' => i18n_setup('Content Allocation'), 'desc' => i18n_setup('For the representation and administration of content, 4fb developed the Content Allocation and content include technology. This technology dynamically allows on basis of a Template, to put the content in different places and in different formats according to several criteria.')); $aPlugins['plugin_content_allocation'] = array('label' => i18n_setup('Content Allocation'), 'desc' => i18n_setup('For the representation and administration of content, 4fb developed the Content Allocation and content include technology. This technology dynamically allows on basis of a Template, to put the content in different places and in different formats according to several criteria.'));
$aPlugins['plugin_mod_rewrite'] = array('label' => i18n_setup('Mod Rewrite'), 'desc' => i18n_setup('Creates so called Clean URLs for a ConLite installation')); $aPlugins['plugin_mod_rewrite'] = array('label' => i18n_setup('Mod Rewrite'), 'desc' => i18n_setup('Creates so called Clean URLs for a ConLite installation'));
$sCheckBoxes = ''; $sCheckBoxes = '';
if (sizeof($aPlugins) > 0) { if (sizeof($aPlugins) > 0) {
foreach ($aPlugins as $sInternalName => $aPluginData) { foreach ($aPlugins as $sInternalName => $aPluginData) {
$sChecked = ((isset($_SESSION[$sInternalName]) && strval($_SESSION[$sInternalName]) || checkExistingPlugin($db, $sInternalName)) == 'true') ? ' checked="checked"' : ''; $sChecked = ((isset($_SESSION[$sInternalName]) && strval($_SESSION[$sInternalName]) || checkExistingPlugin($db, $sInternalName)) == 'true') ? ' checked="checked"' : '';
$sCheckBoxes .= '<p class="plugin_select"> $sCheckBoxes .= '<p class="plugin_select">
<input type="checkbox" class="plugin_checkbox" id="'.$sInternalName.'" name="'.$sInternalName.'" value="true"'.$sChecked.'> <input type="checkbox" class="plugin_checkbox" id="' . $sInternalName . '" name="' . $sInternalName . '" value="true"' . $sChecked . '>
<label for="'.$sInternalName.'">'.$aPluginData['label'].'</label> <label for="' . $sInternalName . '">' . $aPluginData['label'] . '</label>
<a href="javascript://" onclick="showPluginInfo(\''.$aPluginData['label'].'\', \''.$aPluginData['desc'].'\');"> <a href="javascript://" onclick="showPluginInfo(\'' . $aPluginData['label'] . '\', \'' . $aPluginData['desc'] . '\');">
<img src="../conlite/images/info.gif" alt="'.i18n_setup('More information').'" title="'.i18n_setup('More information').'" class="plugin_info"> <img src="../conlite/images/info.gif" alt="' . i18n_setup('More information') . '" title="' . i18n_setup('More information') . '" class="plugin_info">
</a> </a>
</p>'; </p>';
} }
} else { } else {
$sCheckBoxes = i18n_setup("None available"); $sCheckBoxes = i18n_setup("None available");
} }
$this->_oStepTemplate->set("s", "PLUGINLIST", $sCheckBoxes); $this->_oStepTemplate->set("s", "PLUGINLIST", $sCheckBoxes);
$this->setNavigation($previous, $next); $this->setNavigation($previous, $next);
} }
} }
?> ?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -27,100 +28,96 @@
* }} * }}
* *
*/ */
if(!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
class cSetupClientAdjust extends cSetupMask class cSetupClientAdjust extends cSetupMask {
{
function cSetupClientAdjust ($step, $previous, $next) public function __construct($step, $previous, $next) {
{ global $cfg;
global $cfg;
$cfg["tab"]["sequence"] = $_SESSION["dbprefix"] . "_sequence";
$cfg["tab"]["sequence"] = $_SESSION["dbprefix"]."_sequence";
parent::__construct("templates/setup/forms/pathinfo.tpl", $step);
cSetupMask::cSetupMask("templates/setup/forms/pathinfo.tpl", $step); $this->setHeader(i18n_setup("Client Settings"));
$this->setHeader(i18n_setup("Client Settings")); $this->_oStepTemplate->set("s", "TITLE", i18n_setup("Client Settings"));
$this->_oStepTemplate->set("s", "TITLE", i18n_setup("Client Settings")); $this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("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."));
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("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."));
$db = getSetupMySQLDBConnection(); $db = getSetupMySQLDBConnection();
$aClients = listClients($db, $_SESSION["dbprefix"]."_clients");
$cHTMLErrorMessageList = new cHTMLErrorMessageList;
$cHTMLErrorMessageList->setStyle("width: 580px; height: 200px; overflow: auto; border: 1px solid black;");
$cHTMLFoldableErrorMessages = array();
$aPathList = array();
list($a_root_path, $a_root_http_path) = getSystemDirectories();
@include($a_root_path . "data/config/" . CL_ENVIRONMENT . "/config.php");
foreach ($aClients as $iIdClient => $aInfo)
{
if (!isset($_SESSION["frontendpath"][$iIdClient]) || $_SESSION["frontendpath"][$iIdClient] == "")
{
$iDifferencePos = findSimilarText($cfg['path']['frontend']."/", $aInfo["frontendpath"]);
if ($iDifferencePos > 0)
{
$sClientPath = $a_root_path ."/". substr($aInfo["frontendpath"], $iDifferencePos + 1, strlen($aInfo["frontendpath"]) - $iDifferencePos);
$_SESSION["frontendpath"][$iIdClient] = $sClientPath;
} else {
$_SESSION["frontendpath"][$iIdClient] = $aInfo["frontendpath"];
}
}
if (!isset($_SESSION["htmlpath"][$iIdClient]) || $_SESSION["htmlpath"][$iIdClient] == "")
{
/* Use frontendpath instead of htmlpath as the directories should be aligned pairwhise */
$iDifferencePos = findSimilarText($cfg['path']['frontend']."/", $aInfo["frontendpath"]);
if ($iDifferencePos > 0)
{
$sClientPath = $a_root_http_path . "/".substr($aInfo["frontendpath"], $iDifferencePos + 1, strlen($aInfo["frontendpath"]) - $iDifferencePos);
$_SESSION["htmlpath"][$iIdClient] = $sClientPath;
} else {
$_SESSION["htmlpath"][$iIdClient] = $aInfo["htmlpath"];
}
}
$sName = sprintf(i18n_setup("Old server path for %s (%s)"), $aInfo["name"], $iIdClient);
$sName .= ":<br>" . $aInfo["frontendpath"]."<br><br>";
$sName .= sprintf(i18n_setup("New server path for %s (%s)"), $aInfo["name"], $iIdClient);
$sName .= ":<br>";
$oSystemPathBox = new cHTMLTextbox("frontendpath[$iIdClient]", $_SESSION["frontendpath"][$iIdClient]);
$oSystemPathBox->setWidth(100);
$oSystemPathBox->setClass("small");
$oClientSystemPath = new cHTMLInfoMessage(array($sName, $oSystemPathBox), "&nbsp;");
$oClientSystemPath->_oTitle->setStyle("padding-left: 8px; padding-bottom: 8px");
$aPathList[] = $oClientSystemPath; $aClients = listClients($db, $_SESSION["dbprefix"] . "_clients");
$sName = sprintf(i18n_setup("Old web path for %s (%s)"), $aInfo["name"], $iIdClient);
$sName .= ":<br>" . $aInfo["htmlpath"]."<br><br>";
$sName .= sprintf(i18n_setup("New web path for %s (%s)"), $aInfo["name"], $iIdClient);
$sName .= ":<br>";
$oSystemPathBox = new cHTMLTextbox("htmlpath[$iIdClient]", $_SESSION["htmlpath"][$iIdClient]);
$oSystemPathBox->setWidth(100);
$oSystemPathBox->setClass("small");
$oClientSystemPath = new cHTMLInfoMessage(array($sName, $oSystemPathBox), "&nbsp;");
$oClientSystemPath->_oTitle->setStyle("padding-left: 8px; padding-bottom: 8px");
$cHTMLErrorMessageList = new cHTMLErrorMessageList;
$aPathList[] = $oClientSystemPath; $cHTMLErrorMessageList->setStyle("width: 580px; height: 200px; overflow: auto; border: 1px solid black;");
} $cHTMLFoldableErrorMessages = array();
$cHTMLErrorMessageList->setContent($aPathList); $aPathList = array();
list($a_root_path, $a_root_http_path) = getSystemDirectories();
$this->_oStepTemplate->set("s", "CONTROL_PATHINFO", $cHTMLErrorMessageList->render());
@include($a_root_path . "data/config/" . CL_ENVIRONMENT . "/config.php");
foreach ($aClients as $iIdClient => $aInfo) {
if (!isset($_SESSION["frontendpath"][$iIdClient]) || $_SESSION["frontendpath"][$iIdClient] == "") {
$iDifferencePos = findSimilarText($cfg['path']['frontend'] . "/", $aInfo["frontendpath"]);
if ($iDifferencePos > 0) {
$sClientPath = $a_root_path . "/" . substr($aInfo["frontendpath"], $iDifferencePos + 1, strlen($aInfo["frontendpath"]) - $iDifferencePos);
$_SESSION["frontendpath"][$iIdClient] = $sClientPath;
} else {
$_SESSION["frontendpath"][$iIdClient] = $aInfo["frontendpath"];
}
}
if (!isset($_SESSION["htmlpath"][$iIdClient]) || $_SESSION["htmlpath"][$iIdClient] == "") {
/* Use frontendpath instead of htmlpath as the directories should be aligned pairwhise */
$iDifferencePos = findSimilarText($cfg['path']['frontend'] . "/", $aInfo["frontendpath"]);
if ($iDifferencePos > 0) {
$sClientPath = $a_root_http_path . "/" . substr($aInfo["frontendpath"], $iDifferencePos + 1, strlen($aInfo["frontendpath"]) - $iDifferencePos);
$_SESSION["htmlpath"][$iIdClient] = $sClientPath;
} else {
$_SESSION["htmlpath"][$iIdClient] = $aInfo["htmlpath"];
}
}
$sName = sprintf(i18n_setup("Old server path for %s (%s)"), $aInfo["name"], $iIdClient);
$sName .= ":<br>" . $aInfo["frontendpath"] . "<br><br>";
$sName .= sprintf(i18n_setup("New server path for %s (%s)"), $aInfo["name"], $iIdClient);
$sName .= ":<br>";
$oSystemPathBox = new cHTMLTextbox("frontendpath[$iIdClient]", $_SESSION["frontendpath"][$iIdClient]);
$oSystemPathBox->setWidth(100);
$oSystemPathBox->setClass("small");
$oClientSystemPath = new cHTMLInfoMessage(array($sName, $oSystemPathBox), "&nbsp;");
$oClientSystemPath->_oTitle->setStyle("padding-left: 8px; padding-bottom: 8px");
$aPathList[] = $oClientSystemPath;
$sName = sprintf(i18n_setup("Old web path for %s (%s)"), $aInfo["name"], $iIdClient);
$sName .= ":<br>" . $aInfo["htmlpath"] . "<br><br>";
$sName .= sprintf(i18n_setup("New web path for %s (%s)"), $aInfo["name"], $iIdClient);
$sName .= ":<br>";
$oSystemPathBox = new cHTMLTextbox("htmlpath[$iIdClient]", $_SESSION["htmlpath"][$iIdClient]);
$oSystemPathBox->setWidth(100);
$oSystemPathBox->setClass("small");
$oClientSystemPath = new cHTMLInfoMessage(array($sName, $oSystemPathBox), "&nbsp;");
$oClientSystemPath->_oTitle->setStyle("padding-left: 8px; padding-bottom: 8px");
$aPathList[] = $oClientSystemPath;
}
$cHTMLErrorMessageList->setContent($aPathList);
$this->_oStepTemplate->set("s", "CONTROL_PATHINFO", $cHTMLErrorMessageList->render());
$this->setNavigation($previous, $next);
}
$this->setNavigation($previous, $next);
}
} }
?> ?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -26,48 +27,43 @@
* }} * }}
* *
*/ */
if(!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
class cSetupClientMode extends cSetupMask {
public function __construct($step, $previous, $next) {
parent::__construct("templates/setup/forms/clientmode.tpl", $step);
$this->setHeader(i18n_setup("Example Client"));
$this->_oStepTemplate->set("s", "TITLE", i18n_setup("Example Client"));
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("If you are new to ConLite, you should create an example client to start working with."));
class cSetupClientMode extends cSetupMask cInitializeArrayKey($_SESSION, "clientmode", "");
{
function cSetupClientMode ($step, $previous, $next)
{
cSetupMask::cSetupMask("templates/setup/forms/clientmode.tpl", $step);
$this->setHeader(i18n_setup("Example Client"));
$this->_oStepTemplate->set("s", "TITLE", i18n_setup("Example Client"));
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("If you are new to ConLite, you should create an example client to start working with."));
cInitializeArrayKey($_SESSION, "clientmode", ""); $aChoices = array("CLIENTEXAMPLES" => i18n_setup("Client with example modules and example content"),
"CLIENTMODULES" => i18n_setup("Client with example modules, but without example content"),
$aChoices = array( "CLIENTEXAMPLES" => i18n_setup("Client with example modules and example content"), "CLIENT" => i18n_setup("Client without examples"),
"CLIENTMODULES" => i18n_setup("Client with example modules, but without example content"), "NOCLIENT" => i18n_setup("Don't create client"));
"CLIENT" => i18n_setup("Client without examples"),
"NOCLIENT" => i18n_setup("Don't create client")); foreach ($aChoices as $sKey => $sChoice) {
$oRadio = new cHTMLRadiobutton("clientmode", $sKey);
foreach ($aChoices as $sKey => $sChoice) $oRadio->setLabelText(" ");
{ $oRadio->setStyle('width:auto;border:0;');
$oRadio = new cHTMLRadiobutton("clientmode", $sKey);
$oRadio->setLabelText(" "); if ($_SESSION["clientmode"] == $sKey || ($_SESSION["clientmode"] == "" && $sKey == "CLIENTEXAMPLES")) {
$oRadio->setStyle('width:auto;border:0;'); $oRadio->setChecked("checked");
}
if ($_SESSION["clientmode"] == $sKey || ($_SESSION["clientmode"] == "" && $sKey == "CLIENTEXAMPLES"))
{ $oLabel = new cHTMLLabel($sChoice, $oRadio->getId());
$oRadio->setChecked("checked");
} $this->_oStepTemplate->set("s", "CONTROL_" . $sKey, $oRadio->toHtml(false));
$this->_oStepTemplate->set("s", "LABEL_" . $sKey, $oLabel->render());
$oLabel = new cHTMLLabel($sChoice, $oRadio->getId()); }
$this->_oStepTemplate->set("s", "CONTROL_".$sKey, $oRadio->toHtml(false)); $this->setNavigation($previous, $next);
$this->_oStepTemplate->set("s", "LABEL_".$sKey, $oLabel->render()); }
}
$this->setNavigation($previous, $next);
}
} }
?> ?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -18,83 +19,78 @@
* *
* $Id: configmode.php 279 2013-11-21 14:34:53Z oldperl $: * $Id: configmode.php 279 2013-11-21 14:34:53Z oldperl $:
*/ */
if(!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
class cSetupConfigMode extends cSetupMask class cSetupConfigMode extends cSetupMask {
{
function cSetupConfigMode ($step, $previous, $next)
{
if ($_SESSION["setuptype"] == "setup")
{
cSetupMask::cSetupMask("templates/setup/forms/configmode.tpl", $step);
} else {
cSetupMask::cSetupMask("templates/setup/forms/configmodewopass.tpl", $step);
}
$this->setHeader(i18n_setup("config.php mode"));
$this->_oStepTemplate->set("s", "TITLE", i18n_setup("config.php mode"));
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Please choose 'save' or 'download'"));
$this->_oStepTemplate->set("s", "LABEL_DESCRIPTION", i18n_setup("ConLite 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;contenido/includes/&quot; manually when a download prompt appears. The download prompt appears at the end of the setup process."));
$oConfigSave = new cHTMLRadiobutton("configmode", "save");
$oConfigSave->setStyle('width:auto;border:0;');
$oConfigDownload = new cHTMLRadiobutton("configmode", "download"); public function __construct($step, $previous, $next) {
$oConfigDownload->setStyle('width:auto;border:0;'); if ($_SESSION["setuptype"] == "setup") {
parent::__construct("templates/setup/forms/configmode.tpl", $step);
if (canWriteFile("../conlite/includes/config.php")) } else {
{ parent::__construct("templates/setup/forms/configmodewopass.tpl", $step);
$oConfigSave->setChecked(true); }
} else { $this->setHeader(i18n_setup("config.php mode"));
$oConfigDownload->setChecked(true); $this->_oStepTemplate->set("s", "TITLE", i18n_setup("config.php mode"));
} $this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Please choose 'save' or 'download'"));
$this->_oStepTemplate->set("s", "LABEL_DESCRIPTION", i18n_setup("ConLite 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;contenido/includes/&quot; manually when a download prompt appears. The download prompt appears at the end of the setup process."));
$oConfigSaveLabel = new cHTMLLabel(i18n_setup("Save"), $oConfigSave->getId()); $oConfigSave = new cHTMLRadiobutton("configmode", "save");
$this->_oStepTemplate->set("s", "CONTROL_SAVE", $oConfigSave->toHtml(false)); $oConfigSave->setStyle('width:auto;border:0;');
$this->_oStepTemplate->set("s", "CONTROL_SAVELABEL", $oConfigSaveLabel->render());
$oConfigDownloadLabel = new cHTMLLabel(i18n_setup("Download"), $oConfigDownload->getId());
$this->_oStepTemplate->set("s", "CONTROL_DOWNLOAD", $oConfigDownload->toHtml(false));
$this->_oStepTemplate->set("s", "CONTROL_DOWNLOADLABEL", $oConfigDownloadLabel->render());
$this->setNavigation($previous, $next); $oConfigDownload = new cHTMLRadiobutton("configmode", "download");
} $oConfigDownload->setStyle('width:auto;border:0;');
function _createNavigation () if (canWriteFile("../conlite/includes/config.php")) {
{ $oConfigSave->setChecked(true);
$link = new cHTMLLink("#"); } else {
$oConfigDownload->setChecked(true);
if ($this->_bNextstep == "doinstall") }
{
/* Install launcher */
} $oConfigSaveLabel = new cHTMLLabel(i18n_setup("Save"), $oConfigSave->getId());
$this->_oStepTemplate->set("s", "CONTROL_SAVE", $oConfigSave->toHtml(false));
$this->_oStepTemplate->set("s", "CONTROL_SAVELABEL", $oConfigSaveLabel->render());
$oConfigDownloadLabel = new cHTMLLabel(i18n_setup("Download"), $oConfigDownload->getId());
$this->_oStepTemplate->set("s", "CONTROL_DOWNLOAD", $oConfigDownload->toHtml(false));
$this->_oStepTemplate->set("s", "CONTROL_DOWNLOADLABEL", $oConfigDownloadLabel->render());
$this->setNavigation($previous, $next);
}
public function _createNavigation() {
$link = new cHTMLLink("#");
if ($this->_bNextstep == "doinstall") {
/* Install launcher */
}
$link->attachEventDefinition("pageAttach", "onclick", "document.setupform.step.value = '" . $this->_bNextstep . "'; document.setupform.submit();");
$nextSetup = new cHTMLAlphaImage;
$nextSetup->setSrc("../conlite/images/submit.gif");
$nextSetup->setMouseOver("../conlite/images/submit_hover.gif");
$nextSetup->setClass("button");
$link->setContent($nextSetup);
$this->_oStepTemplate->set("s", "NEXT", $link->render());
$backlink = new cHTMLLink("#");
$backlink->attachEventDefinition("pageAttach", "onclick", "document.setupform.step.value = '" . $this->_bBackstep . "';");
$backlink->attachEventDefinition("submitAttach", "onclick", "document.setupform.submit();");
$backSetup = new cHTMLAlphaImage;
$backSetup->setSrc("images/controls/back.gif");
$backSetup->setMouseOver("images/controls/back.gif");
$backSetup->setClass("button");
$backSetup->setStyle("margin-right: 10px");
$backlink->setContent($backSetup);
$this->_oStepTemplate->set("s", "BACK", $backlink->render());
}
$link->attachEventDefinition("pageAttach", "onclick", "document.setupform.step.value = '".$this->_bNextstep."'; document.setupform.submit();");
$nextSetup = new cHTMLAlphaImage;
$nextSetup->setSrc("../conlite/images/submit.gif");
$nextSetup->setMouseOver("../conlite/images/submit_hover.gif");
$nextSetup->setClass("button");
$link->setContent($nextSetup);
$this->_oStepTemplate->set("s", "NEXT", $link->render());
$backlink = new cHTMLLink("#");
$backlink->attachEventDefinition("pageAttach", "onclick", "document.setupform.step.value = '".$this->_bBackstep."';");
$backlink->attachEventDefinition("submitAttach", "onclick", "document.setupform.submit();");
$backSetup = new cHTMLAlphaImage;
$backSetup->setSrc("images/controls/back.gif");
$backSetup->setMouseOver("images/controls/back.gif");
$backSetup->setClass("button");
$backSetup->setStyle("margin-right: 10px");
$backlink->setContent($backSetup);
$this->_oStepTemplate->set("s", "BACK", $backlink->render());
}
} }
?> ?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -26,45 +27,42 @@
* }} * }}
* *
*/ */
if(!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
class cSetupInstaller extends cSetupMask {
public function __construct($step) {
parent::__construct("templates/setup/forms/installer.tpl", $step);
$this->setHeader(i18n_setup("System Installation"));
$this->_oStepTemplate->set("s", "TITLE", i18n_setup("System Installation"));
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("ConLite will be installed, please wait ..."));
class cSetupInstaller extends cSetupMask $this->_oStepTemplate->set("s", "DBUPDATESCRIPT", "dbupdate.php");
{
function cSetupInstaller ($step) switch ($_SESSION["setuptype"]) {
{ case "setup":
cSetupMask::cSetupMask("templates/setup/forms/installer.tpl", $step); $this->_oStepTemplate->set("s", "DONEINSTALLATION", i18n_setup("Setup completed installing. Click on next to continue."));
$this->setHeader(i18n_setup("System Installation")); $this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Setup is installing, please wait..."));
$this->_oStepTemplate->set("s", "TITLE", i18n_setup("System Installation")); $_SESSION["upgrade_nextstep"] = "setup8";
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("ConLite will be installed, please wait ...")); $this->setNavigation("", "setup8");
break;
$this->_oStepTemplate->set("s", "DBUPDATESCRIPT", "dbupdate.php"); case "upgrade":
$this->_oStepTemplate->set("s", "DONEINSTALLATION", i18n_setup("Setup completed upgrading. Click on next to continue."));
switch ($_SESSION["setuptype"]) $this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Setup is upgrading, please wait..."));
{ $_SESSION["upgrade_nextstep"] = "ugprade7";
case "setup": $this->setNavigation("", "upgrade7");
$this->_oStepTemplate->set("s", "DONEINSTALLATION", i18n_setup("Setup completed installing. Click on next to continue.")); break;
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Setup is installing, please wait...")); case "migration":
$_SESSION["upgrade_nextstep"] = "setup8"; $this->_oStepTemplate->set("s", "DONEINSTALLATION", i18n_setup("Setup completed migration. Click on next to continue."));
$this->setNavigation("", "setup8"); $this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Setup is migrating, please wait..."));
break; $_SESSION["upgrade_nextstep"] = "migration8";
case "upgrade": $this->setNavigation("", "migration8");
$this->_oStepTemplate->set("s", "DONEINSTALLATION", i18n_setup("Setup completed upgrading. Click on next to continue.")); break;
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Setup is upgrading, please wait...")); }
$_SESSION["upgrade_nextstep"] = "ugprade7"; }
$this->setNavigation("", "upgrade7");
break;
case "migration":
$this->_oStepTemplate->set("s", "DONEINSTALLATION", i18n_setup("Setup completed migration. Click on next to continue."));
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Setup is migrating, please wait..."));
$_SESSION["upgrade_nextstep"] = "migration8";
$this->setNavigation("", "migration8");
break;
}
}
} }
?> ?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -26,46 +27,45 @@
* }} * }}
* *
*/ */
if(!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
class cSetupPath extends cSetupMask {
public function __construct($step, $previous, $next) {
parent::__construct("templates/setup/forms/pathinfo.tpl", $step);
$this->setHeader(i18n_setup("System Directories"));
$this->_oStepTemplate->set("s", "TITLE", i18n_setup("System Directories"));
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Please check the directories identified by the system. If you need to change a path, click on the name and enter the new path in the available input box."));
list($root_path, $root_http_path) = getSystemDirectories(true);
$cHTMLErrorMessageList = new cHTMLErrorMessageList;
$cHTMLErrorMessageList->setStyle("width: 580px; height: 200px; overflow: auto; border: 1px solid black;");
$cHTMLFoldableErrorMessages = array();
list($a_root_path, $a_root_http_path) = getSystemDirectories();
$oRootPath = new cHTMLTextbox("override_root_path", $a_root_path);
$oRootPath->setWidth(100);
$oRootPath->setClass("small");
$oWebPath = new cHTMLTextbox("override_root_http_path", $a_root_http_path);
$oWebPath->setWidth(100);
$oWebPath->setClass("small");
$cHTMLFoldableErrorMessages[0] = new cHTMLFoldableErrorMessage(i18n_setup("ConLite Root Path") . ":<br>" . $root_path, $oRootPath);
$cHTMLFoldableErrorMessages[0]->_oContent->setStyle("padding-bottom: 8px;");
$cHTMLFoldableErrorMessages[1] = new cHTMLFoldableErrorMessage(i18n_setup("ConLite Web Path") . ":<br>" . $root_http_path, $oWebPath);
$cHTMLFoldableErrorMessages[1]->_oContent->setStyle("padding-bottom: 8px;");
$cHTMLErrorMessageList->setContent($cHTMLFoldableErrorMessages);
class cSetupPath extends cSetupMask $this->_oStepTemplate->set("s", "CONTROL_PATHINFO", $cHTMLErrorMessageList->render());
{
function cSetupPath ($step, $previous, $next) $this->setNavigation($previous, $next);
{ }
cSetupMask::cSetupMask("templates/setup/forms/pathinfo.tpl", $step);
$this->setHeader(i18n_setup("System Directories"));
$this->_oStepTemplate->set("s", "TITLE", i18n_setup("System Directories"));
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Please check the directories identified by the system. If you need to change a path, click on the name and enter the new path in the available input box."));
list($root_path, $root_http_path) = getSystemDirectories(true);
$cHTMLErrorMessageList = new cHTMLErrorMessageList;
$cHTMLErrorMessageList->setStyle("width: 580px; height: 200px; overflow: auto; border: 1px solid black;");
$cHTMLFoldableErrorMessages = array();
list($a_root_path, $a_root_http_path) = getSystemDirectories();
$oRootPath = new cHTMLTextbox("override_root_path", $a_root_path);
$oRootPath->setWidth(100);
$oRootPath->setClass("small");
$oWebPath = new cHTMLTextbox("override_root_http_path", $a_root_http_path);
$oWebPath->setWidth(100);
$oWebPath->setClass("small");
$cHTMLFoldableErrorMessages[0] = new cHTMLFoldableErrorMessage(i18n_setup("ConLite Root Path").":<br>".$root_path, $oRootPath);
$cHTMLFoldableErrorMessages[0]->_oContent->setStyle("padding-bottom: 8px;");
$cHTMLFoldableErrorMessages[1] = new cHTMLFoldableErrorMessage(i18n_setup("ConLite Web Path").":<br>".$root_http_path, $oWebPath);
$cHTMLFoldableErrorMessages[1]->_oContent->setStyle("padding-bottom: 8px;");
$cHTMLErrorMessageList->setContent($cHTMLFoldableErrorMessages);
$this->_oStepTemplate->set("s", "CONTROL_PATHINFO", $cHTMLErrorMessageList->render());
$this->setNavigation($previous, $next);
}
} }
?> ?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -13,89 +14,85 @@
* *
* $Id: setupresults.php 377 2015-11-09 19:10:37Z oldperl $: * $Id: setupresults.php 377 2015-11-09 19:10:37Z oldperl $:
*/ */
if(!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
class cSetupResults extends cSetupMask {
class cSetupResults extends cSetupMask public function __construct($step) {
{ $this->setHeader(i18n_setup("Results"));
function cSetupResults ($step)
{
$this->setHeader(i18n_setup("Results")); if (!isset($_SESSION["install_failedchunks"]) && !isset($_SESSION["install_failedupgradetable"]) && !isset($_SESSION["configsavefailed"])) {
parent::__construct("templates/setup/forms/setupresults.tpl", $step);
$this->_oStepTemplate->set("s", "TITLE", i18n_setup("Results"));
if (!isset($_SESSION["install_failedchunks"]) && !isset($_SESSION["install_failedupgradetable"]) && !isset($_SESSION["configsavefailed"])) $this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("ConLite was installed and configured successfully on your server."));
{
cSetupMask::cSetupMask("templates/setup/forms/setupresults.tpl", $step);
$this->_oStepTemplate->set("s", "TITLE", i18n_setup("Results"));
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("ConLite was installed and configured successfully on your server."));
if ($_SESSION["setuptype"] == 'setup') { if ($_SESSION["setuptype"] == 'setup') {
$this->_oStepTemplate->set("s", "LOGIN_INFO", '<p>'.i18n_setup("Please use username <b>sysadmin</b> and password <b>sysadmin</b> to login into ConLite Backend.").'</p>'); $this->_oStepTemplate->set("s", "LOGIN_INFO", '<p>' . i18n_setup("Please use username <b>sysadmin</b> and password <b>sysadmin</b> to login into ConLite Backend.") . '</p>');
} else { } else {
$this->_oStepTemplate->set("s", "LOGIN_INFO", ''); $this->_oStepTemplate->set("s", "LOGIN_INFO", '');
} }
$this->_oStepTemplate->set("s", "CHOOSENEXTSTEP", i18n_setup("Please choose an item to start working:")); $this->_oStepTemplate->set("s", "CHOOSENEXTSTEP", i18n_setup("Please choose an item to start working:"));
$this->_oStepTemplate->set("s", "FINISHTEXT", i18n_setup("You can now start using ConLite. Please delete the folder named 'setup'!")); $this->_oStepTemplate->set("s", "FINISHTEXT", i18n_setup("You can now start using ConLite. Please delete the folder named 'setup'!"));
list($root_path, $root_http_path) = getSystemDirectories();
list($root_path, $root_http_path) = getSystemDirectories();
$cHTMLButtonLink = new cHTMLButtonLink($root_http_path."/conlite/", "Backend - CMS");
$this->_oStepTemplate->set("s", "BACKEND", $cHTMLButtonLink->render());
if ($_SESSION["setuptype"] == "setup" && $_SESSION["clientmode"] == "CLIENTEXAMPLES") $cHTMLButtonLink = new cHTMLButtonLink($root_http_path . "/conlite/", "Backend - CMS");
{ $this->_oStepTemplate->set("s", "BACKEND", $cHTMLButtonLink->render());
$cHTMLButtonLink = new cHTMLButtonLink($root_http_path."/cms/", "Frontend - Web");
$this->_oStepTemplate->set("s", "FRONTEND", $cHTMLButtonLink->render()); if ($_SESSION["setuptype"] == "setup" && $_SESSION["clientmode"] == "CLIENTEXAMPLES") {
} else { $cHTMLButtonLink = new cHTMLButtonLink($root_http_path . "/cms/", "Frontend - Web");
$this->_oStepTemplate->set("s", "FRONTEND", ""); $this->_oStepTemplate->set("s", "FRONTEND", $cHTMLButtonLink->render());
} } else {
$this->_oStepTemplate->set("s", "FRONTEND", "");
$cHTMLButtonLink = new cHTMLButtonLink("http://www.conlite.org/", "Conlite Website"); }
$this->_oStepTemplate->set("s", "WEBSITE", $cHTMLButtonLink->render());
/* $cHTMLButtonLink = new cHTMLButtonLink("http://www.conlite.org/", "Conlite Website");
$cHTMLButtonLink = new cHTMLButtonLink("http://forum.contenido.org/", "Contenido Forum"); $this->_oStepTemplate->set("s", "WEBSITE", $cHTMLButtonLink->render());
$this->_oStepTemplate->set("s", "FORUM", $cHTMLButtonLink->render()); /*
$cHTMLButtonLink = new cHTMLButtonLink("http://forum.contenido.org/", "Contenido Forum");
$this->_oStepTemplate->set("s", "FORUM", $cHTMLButtonLink->render());
*
*/
$this->_oStepTemplate->set("s", "FORUM", '');
$cHTMLButtonLink = new cHTMLButtonLink("https://faq.conlite.org/", "ConLite FAQ");
$this->_oStepTemplate->set("s", "FAQ", $cHTMLButtonLink->render());
} else {
parent::__construct("templates/setup/forms/setupresultsfail.tpl", $step);
$this->_oStepTemplate->set("s", "TITLE", i18n_setup("Setup Results"));
list($sRootPath, $rootWebPath) = getSystemDirectories();
if (file_exists($sRootPath . "/data/logs/setuplog.txt")) {
$sErrorLink = '<a target="_blank" href="../data/logs/setuplog.txt">setuplog.txt</a>';
} else {
$sErrorLink = 'setuplog.txt';
}
$this->_oStepTemplate->set("s", "DESCRIPTION", sprintf(i18n_setup("An error occured during installation. Please take a look at the file %s (located in &quot;data/logs/&quot;) for more information."), $sErrorLink));
switch ($_SESSION["setuptype"]) {
case "setup":
$this->setNavigation("setup1", "");
break;
case "upgrade":
$this->setNavigation("upgrade1", "");
break;
case "migration":
$this->setNavigation("migration1", "");
break;
}
}
}
$cHTMLButtonLink = new cHTMLButtonLink("http://faq.contenido.org/", "Contenido FAQ");
$this->_oStepTemplate->set("s", "FAQ", $cHTMLButtonLink->render());
*
*/
$this->_oStepTemplate->set("s", "FORUM", '');
$this->_oStepTemplate->set("s", "FAQ", '');
} else {
cSetupMask::cSetupMask("templates/setup/forms/setupresultsfail.tpl", $step);
$this->_oStepTemplate->set("s", "TITLE", i18n_setup("Setup Results"));
list($sRootPath, $rootWebPath) = getSystemDirectories();
if (file_exists($sRootPath . "/data/logs/setuplog.txt"))
{
$sErrorLink = '<a target="_blank" href="../data/logs/setuplog.txt">setuplog.txt</a>';
} else {
$sErrorLink = 'setuplog.txt';
}
$this->_oStepTemplate->set("s", "DESCRIPTION", sprintf(i18n_setup("An error occured during installation. Please take a look at the file %s (located in &quot;data/logs/&quot;) for more information."), $sErrorLink));
switch ($_SESSION["setuptype"])
{
case "setup":
$this->setNavigation("setup1", "");
break;
case "upgrade":
$this->setNavigation("upgrade1", "");
break;
case "migration":
$this->setNavigation("migration1", "");
break;
}
}
}
} }
?> ?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -26,82 +27,75 @@
* }} * }}
* *
*/ */
if(!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
class cSetupSetupSummary extends cSetupMask {
public function __construct($step, $previous, $next) {
parent::__construct("templates/setup/forms/setupsummary.tpl", $step);
$this->setHeader(i18n_setup("Summary"));
$this->_oStepTemplate->set("s", "TITLE", i18n_setup("Summary"));
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Please check your settings and click on the next button to start the installation"));
class cSetupSetupSummary extends cSetupMask $cHTMLErrorMessageList = new cHTMLErrorMessageList;
{
function cSetupSetupSummary ($step, $previous, $next)
{
cSetupMask::cSetupMask("templates/setup/forms/setupsummary.tpl", $step);
$this->setHeader(i18n_setup("Summary"));
$this->_oStepTemplate->set("s", "TITLE", i18n_setup("Summary"));
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Please check your settings and click on the next button to start the installation"));
$cHTMLErrorMessageList = new cHTMLErrorMessageList; switch ($_SESSION["setuptype"]) {
case "setup":
switch ($_SESSION["setuptype"]) $sType = i18n_setup("Setup");
{ break;
case "setup": case "upgrade":
$sType = i18n_setup("Setup"); $sType = i18n_setup("Upgrade");
break; break;
case "upgrade": case "migration":
$sType = i18n_setup("Upgrade"); $sType = i18n_setup("Migration");
break; break;
case "migration": }
$sType = i18n_setup("Migration");
break;
}
switch ($_SESSION["configmode"])
{
case "save":
$sConfigMode = i18n_setup("Save");
break;
case "download":
$sConfigMode = i18n_setup("Download");
break;
}
$messages = array( switch ($_SESSION["configmode"]) {
i18n_setup("Installation type").":" => $sType, case "save":
i18n_setup("Database parameters").":" => i18n_setup("Database host").": ".$_SESSION["dbhost"] . "<br>" . i18n_setup("Database name").": ".$_SESSION["dbname"] ."<br>".i18n_setup("Database username").": " . $_SESSION["dbuser"]. "<br>".i18n_setup("Database prefix").": ".$_SESSION["dbprefix"], $sConfigMode = i18n_setup("Save");
break;
case "download":
$sConfigMode = i18n_setup("Download");
break;
}
$messages = array(
i18n_setup("Installation type") . ":" => $sType,
i18n_setup("Database parameters") . ":" => i18n_setup("Database host") . ": " . $_SESSION["dbhost"] . "<br>" . i18n_setup("Database name") . ": " . $_SESSION["dbname"] . "<br>" . i18n_setup("Database username") . ": " . $_SESSION["dbuser"] . "<br>" . i18n_setup("Database prefix") . ": " . $_SESSION["dbprefix"],
); );
if ($_SESSION["setuptype"] == "setup") if ($_SESSION["setuptype"] == "setup") {
{ $aChoices = array("CLIENTEXAMPLES" => i18n_setup("Client with example modules and example content"),
$aChoices = array( "CLIENTEXAMPLES" => i18n_setup("Client with example modules and example content"), "CLIENTMODULES" => i18n_setup("Client with example modules but without example content"),
"CLIENTMODULES" => i18n_setup("Client with example modules but without example content"), "CLIENT" => i18n_setup("Client without examples"),
"CLIENT" => i18n_setup("Client without examples"), "NOCLIENT" => i18n_setup("Don't create a client"));
"NOCLIENT" => i18n_setup("Don't create a client")); $messages[i18n_setup("Client installation") . ":"] = $aChoices[$_SESSION["clientmode"]];
$messages[i18n_setup("Client installation").":"] = $aChoices[$_SESSION["clientmode"]]; }
}
// additional plugins // additional plugins
$aPlugins = $this->_getSelectedAdditionalPlugins(); $aPlugins = $this->_getSelectedAdditionalPlugins();
if (count($aPlugins) > 0) { if (count($aPlugins) > 0) {
$messages[i18n_setup("Additional Plugins").":"] = implode('<br>', $aPlugins);; $messages[i18n_setup("Additional Plugins") . ":"] = implode('<br>', $aPlugins);
;
} }
$cHTMLFoldableErrorMessages = array();
foreach ($messages as $key => $message)
{
$cHTMLFoldableErrorMessages[] = new cHTMLInfoMessage($key, $message);
}
$cHTMLErrorMessageList->setContent($cHTMLFoldableErrorMessages);
$this->_oStepTemplate->set("s", "CONTROL_SETUPSUMMARY", $cHTMLErrorMessageList->render());
$this->setNavigation($previous, $next);
}
function _getSelectedAdditionalPlugins() $cHTMLFoldableErrorMessages = array();
{
foreach ($messages as $key => $message) {
$cHTMLFoldableErrorMessages[] = new cHTMLInfoMessage($key, $message);
}
$cHTMLErrorMessageList->setContent($cHTMLFoldableErrorMessages);
$this->_oStepTemplate->set("s", "CONTROL_SETUPSUMMARY", $cHTMLErrorMessageList->render());
$this->setNavigation($previous, $next);
}
public function _getSelectedAdditionalPlugins() {
$aPlugins = array(); $aPlugins = array();
if ($_SESSION['plugin_newsletter'] == 'true') { if ($_SESSION['plugin_newsletter'] == 'true') {
$aPlugins[] = i18n_setup('Newsletter'); $aPlugins[] = i18n_setup('Newsletter');
@ -114,6 +108,7 @@ class cSetupSetupSummary extends cSetupMask
} }
return $aPlugins; return $aPlugins;
} }
} }
?> ?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -26,167 +27,150 @@
* }} * }}
* *
*/ */
if(!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
class cSetupSystemData extends cSetupMask {
public function __construct($step, $previous, $next) {
parent::__construct("templates/setup/forms/systemdata.tpl", $step);
class cSetupSystemData extends cSetupMask list($a_root_path, $a_root_http_path) = getSystemDirectories();
{
function cSetupSystemData ($step, $previous, $next) cInitializeArrayKey($_SESSION, "dbprefix", "");
{ cInitializeArrayKey($_SESSION, "dbhost", "");
cSetupMask::cSetupMask("templates/setup/forms/systemdata.tpl", $step); cInitializeArrayKey($_SESSION, "dbuser", "");
cInitializeArrayKey($_SESSION, "dbname", "");
list($a_root_path, $a_root_http_path) = getSystemDirectories(); cInitializeArrayKey($_SESSION, "dbpass", "");
cInitializeArrayKey($_SESSION, "dbprefix", ""); if (file_exists($a_root_path . "/conlite/includes/config.php") || file_exists($a_root_path . "/data/config/" . CL_ENVIRONMENT . "/config.php")) {
cInitializeArrayKey($_SESSION, "dbhost", ""); global $cfg; // Avoiding error message about "prepend3.php" on update from V4.x
cInitializeArrayKey($_SESSION, "dbuser", "");
cInitializeArrayKey($_SESSION, "dbname", ""); $contenido_host = ""; // Just define the variables to avoid warnings in IDE
cInitializeArrayKey($_SESSION, "dbpass", ""); $contenido_user = "";
$contenido_database = "";
if(file_exists($a_root_path."/conlite/includes/config.php") || file_exists($a_root_path."/data/config/".CL_ENVIRONMENT."/config.php")) { $contenido_password = "";
global $cfg; // Avoiding error message about "prepend3.php" on update from V4.x
if (file_exists($a_root_path . "/conlite/includes/config.php")) {
$contenido_host = ""; // Just define the variables to avoid warnings in IDE @include($a_root_path . "/conlite/includes/config.php");
$contenido_user = "";
$contenido_database = "";
$contenido_password = "";
if(file_exists($a_root_path."/conlite/includes/config.php")) {
@include($a_root_path."/conlite/includes/config.php");
} else { } else {
@include($a_root_path."/data/config/".CL_ENVIRONMENT."/config.php"); @include($a_root_path . "/data/config/" . CL_ENVIRONMENT . "/config.php");
} }
$aVars = array( "dbhost" => $contenido_host,
"dbuser" => $contenido_user,
"dbname" => $contenido_database,
"dbpass" => $contenido_password,
"dbprefix" => $cfg["sql"]["sqlprefix"]);
foreach ($aVars as $aVar => $sValue)
{
if ($_SESSION[$aVar] == "")
{
$_SESSION[$aVar] = $sValue;
}
}
}
$this->setHeader(i18n_setup("Database Parameters"));
$this->_oStepTemplate->set("s", "TITLE", i18n_setup("Database Parameters"));
switch ($_SESSION["setuptype"])
{
case "setup":
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Please enter the required database information. If you are unsure about the data, ask your provider or administrator.").i18n_setup("If the database does not exist and your database user has the sufficient permissions, setup will create the database automatically."));
break;
case "upgrade":
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Please enter the required database information. If the database data of your previous installation could have been read, the data will be inserted automatically. If you are unsure about the data, please ask your provider or administrator."));
break;
case "migration":
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Please enter the required database information. Make sure you copied the data from your old installation (e.g. development or staging system) into a new database. Please enter the parameters of the new database."));
break;
}
if ($_SESSION["dbprefix"] == "")
{
$_SESSION["dbprefix"] = "cl";
}
unset($_SESSION["install_failedchunks"]);
unset($_SESSION["install_failedupgradetable"]);
unset($_SESSION["configsavefailed"]);
unset($_SESSION["htmlpath"]);
unset($_SESSION["frontendpath"]);
$dbhost = new cHTMLTextbox("dbhost", $_SESSION["dbhost"], 30, 255);
$dbname = new cHTMLTextbox("dbname", $_SESSION["dbname"], 30, 255);
$dbuser = new cHTMLTextbox("dbuser", $_SESSION["dbuser"], 30, 255);
if ($_SESSION["dbpass"] != "")
{
$mpass = str_repeat("*", strlen($_SESSION["dbpass"]));
} else {
$mpass = "";
}
$dbpass = new cHTMLPasswordbox("dbpass", $mpass, 30, 255);
$dbpass->attachEventDefinition("onchange handler", "onchange", "document.setupform.dbpass_changed.value = 'true';");
$dbpass->attachEventDefinition("onchange handler", "onkeypress", "document.setupform.dbpass_changed.value = 'true';");
$dbpass_hidden = new cHTMLHiddenField("dbpass_changed", "false");
$dbprefix = new cHTMLTextbox("dbprefix", $_SESSION["dbprefix"], 10, 30);
$aVars = array("dbhost" => $contenido_host,
$this->_oStepTemplate->set("s", "LABEL_DBHOST", i18n_setup("Database Server (IP or name)")); "dbuser" => $contenido_user,
"dbname" => $contenido_database,
if ($_SESSION["setuptype"] == "setup") "dbpass" => $contenido_password,
{ "dbprefix" => $cfg["sql"]["sqlprefix"]);
$this->_oStepTemplate->set("s", "LABEL_DBNAME", i18n_setup("Database Name")."<br>".i18n_setup("(use empty or non-existant database)"));
} else {
$this->_oStepTemplate->set("s", "LABEL_DBNAME", i18n_setup("Database Name"));
}
$this->_oStepTemplate->set("s", "LABEL_DBUSERNAME", i18n_setup("Database Username"));
$this->_oStepTemplate->set("s", "LABEL_DBPASSWORD", i18n_setup("Database Password"));
$this->_oStepTemplate->set("s", "LABEL_DBPREFIX", i18n_setup("Table Prefix"));
$this->_oStepTemplate->set("s", "INPUT_DBHOST", $dbhost->render());
$this->_oStepTemplate->set("s", "INPUT_DBNAME", $dbname->render());
$this->_oStepTemplate->set("s", "INPUT_DBUSERNAME", $dbuser->render());
$this->_oStepTemplate->set("s", "INPUT_DBPASSWORD", $dbpass->render().$dbpass_hidden->render());
$this->_oStepTemplate->set("s", "INPUT_DBPREFIX", $dbprefix->render());
$this->setNavigation($previous, $next);
}
function _createNavigation () foreach ($aVars as $aVar => $sValue) {
{ if ($_SESSION[$aVar] == "") {
$link = new cHTMLLink("#"); $_SESSION[$aVar] = $sValue;
}
if ($_SESSION["setuptype"] == "setup") }
{ }
$checkScript = sprintf('var msg = ""; if (document.setupform.dbhost.value == "") { msg += "%s "; } if (document.setupform.dbname.value == "") { msg += "%s "; } if (document.setupform.dbuser.value == "") { msg += "%s "; } if (document.setupform.dbhost.value != "" && document.setupform.dbname.value != "" && document.setupform.dbuser.value != "") { document.setupform.submit(); } else { alert(msg); }',
i18n_setup("You need to enter a database host."), $this->setHeader(i18n_setup("Database Parameters"));
i18n_setup("You need to enter a database name."), $this->_oStepTemplate->set("s", "TITLE", i18n_setup("Database Parameters"));
i18n_setup("You need to enter a database user."));
$link->attachEventDefinition("pageAttach", "onclick", "document.setupform.step.value = '".$this->_bNextstep."';"); switch ($_SESSION["setuptype"]) {
$link->attachEventDefinition("submitAttach", "onclick", "$checkScript"); case "setup":
} else { $this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Please enter the required database information. If you are unsure about the data, ask your provider or administrator.") . i18n_setup("If the database does not exist and your database user has the sufficient permissions, setup will create the database automatically."));
$link->attachEventDefinition("pageAttach", "onclick", "document.setupform.step.value = '".$this->_bNextstep."'; document.setupform.submit();"); break;
} case "upgrade":
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Please enter the required database information. If the database data of your previous installation could have been read, the data will be inserted automatically. If you are unsure about the data, please ask your provider or administrator."));
$nextSetup = new cHTMLAlphaImage; break;
$nextSetup->setSrc("../conlite/images/submit.gif"); case "migration":
$nextSetup->setMouseOver("../conlite/images/submit_hover.gif"); $this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Please enter the required database information. Make sure you copied the data from your old installation (e.g. development or staging system) into a new database. Please enter the parameters of the new database."));
$nextSetup->setClass("button"); break;
}
$link->setContent($nextSetup);
if ($_SESSION["dbprefix"] == "") {
$this->_oStepTemplate->set("s", "NEXT", $link->render()); $_SESSION["dbprefix"] = "cl";
}
$backlink = new cHTMLLink("#");
$backlink->attachEventDefinition("pageAttach", "onclick", "document.setupform.step.value = '".$this->_bBackstep."';"); unset($_SESSION["install_failedchunks"]);
$backlink->attachEventDefinition("submitAttach", "onclick", "document.setupform.submit();"); unset($_SESSION["install_failedupgradetable"]);
unset($_SESSION["configsavefailed"]);
$backSetup = new cHTMLAlphaImage; unset($_SESSION["htmlpath"]);
$backSetup->setSrc("images/controls/back.gif"); unset($_SESSION["frontendpath"]);
$backSetup->setMouseOver("images/controls/back.gif");
$backSetup->setClass("button"); $dbhost = new cHTMLTextbox("dbhost", $_SESSION["dbhost"], 30, 255);
$backSetup->setStyle("margin-right: 10px"); $dbname = new cHTMLTextbox("dbname", $_SESSION["dbname"], 30, 255);
$backlink->setContent($backSetup); $dbuser = new cHTMLTextbox("dbuser", $_SESSION["dbuser"], 30, 255);
$this->_oStepTemplate->set("s", "BACK", $backlink->render());
if ($_SESSION["dbpass"] != "") {
$mpass = str_repeat("*", strlen($_SESSION["dbpass"]));
} } else {
$mpass = "";
}
$dbpass = new cHTMLPasswordbox("dbpass", $mpass, 30, 255);
$dbpass->attachEventDefinition("onchange handler", "onchange", "document.setupform.dbpass_changed.value = 'true';");
$dbpass->attachEventDefinition("onchange handler", "onkeypress", "document.setupform.dbpass_changed.value = 'true';");
$dbpass_hidden = new cHTMLHiddenField("dbpass_changed", "false");
$dbprefix = new cHTMLTextbox("dbprefix", $_SESSION["dbprefix"], 10, 30);
$this->_oStepTemplate->set("s", "LABEL_DBHOST", i18n_setup("Database Server (IP or name)"));
if ($_SESSION["setuptype"] == "setup") {
$this->_oStepTemplate->set("s", "LABEL_DBNAME", i18n_setup("Database Name") . "<br>" . i18n_setup("(use empty or non-existant database)"));
} else {
$this->_oStepTemplate->set("s", "LABEL_DBNAME", i18n_setup("Database Name"));
}
$this->_oStepTemplate->set("s", "LABEL_DBUSERNAME", i18n_setup("Database Username"));
$this->_oStepTemplate->set("s", "LABEL_DBPASSWORD", i18n_setup("Database Password"));
$this->_oStepTemplate->set("s", "LABEL_DBPREFIX", i18n_setup("Table Prefix"));
$this->_oStepTemplate->set("s", "INPUT_DBHOST", $dbhost->render());
$this->_oStepTemplate->set("s", "INPUT_DBNAME", $dbname->render());
$this->_oStepTemplate->set("s", "INPUT_DBUSERNAME", $dbuser->render());
$this->_oStepTemplate->set("s", "INPUT_DBPASSWORD", $dbpass->render() . $dbpass_hidden->render());
$this->_oStepTemplate->set("s", "INPUT_DBPREFIX", $dbprefix->render());
$this->setNavigation($previous, $next);
}
public function _createNavigation() {
$link = new cHTMLLink("#");
if ($_SESSION["setuptype"] == "setup") {
$checkScript = sprintf('var msg = ""; if (document.setupform.dbhost.value == "") { msg += "%s "; } if (document.setupform.dbname.value == "") { msg += "%s "; } if (document.setupform.dbuser.value == "") { msg += "%s "; } if (document.setupform.dbhost.value != "" && document.setupform.dbname.value != "" && document.setupform.dbuser.value != "") { document.setupform.submit(); } else { alert(msg); }', i18n_setup("You need to enter a database host."), i18n_setup("You need to enter a database name."), i18n_setup("You need to enter a database user."));
$link->attachEventDefinition("pageAttach", "onclick", "document.setupform.step.value = '" . $this->_bNextstep . "';");
$link->attachEventDefinition("submitAttach", "onclick", "$checkScript");
} else {
$link->attachEventDefinition("pageAttach", "onclick", "document.setupform.step.value = '" . $this->_bNextstep . "'; document.setupform.submit();");
}
$nextSetup = new cHTMLAlphaImage;
$nextSetup->setSrc("../conlite/images/submit.gif");
$nextSetup->setMouseOver("../conlite/images/submit_hover.gif");
$nextSetup->setClass("button");
$link->setContent($nextSetup);
$this->_oStepTemplate->set("s", "NEXT", $link->render());
$backlink = new cHTMLLink("#");
$backlink->attachEventDefinition("pageAttach", "onclick", "document.setupform.step.value = '" . $this->_bBackstep . "';");
$backlink->attachEventDefinition("submitAttach", "onclick", "document.setupform.submit();");
$backSetup = new cHTMLAlphaImage;
$backSetup->setSrc("images/controls/back.gif");
$backSetup->setMouseOver("images/controls/back.gif");
$backSetup->setClass("button");
$backSetup->setStyle("margin-right: 10px");
$backlink->setContent($backSetup);
$this->_oStepTemplate->set("s", "BACK", $backlink->render());
}
} }
?> ?>

Datei anzeigen

@ -24,8 +24,8 @@ define("C_SEVERITY_ERROR", 4);
class cSetupSystemtest extends cSetupMask { class cSetupSystemtest extends cSetupMask {
function cSetupSystemtest($step, $previous, $next) { public function __construct($step, $previous, $next) {
cSetupMask::cSetupMask("templates/setup/forms/systemtest.tpl", $step); parent::__construct("templates/setup/forms/systemtest.tpl", $step);
$bErrors = false; $bErrors = false;
$this->setHeader(i18n_setup("System Test")); $this->setHeader(i18n_setup("System Test"));
@ -94,7 +94,7 @@ class cSetupSystemtest extends cSetupMask {
} }
} }
function doExistingOldPluginTests() { public function doExistingOldPluginTests() {
$db = getSetupMySQLDBConnection(false); $db = getSetupMySQLDBConnection(false);
$sMessage = ''; $sMessage = '';
@ -157,7 +157,7 @@ class cSetupSystemtest extends cSetupMask {
} }
} }
function runTest($mResult, $iSeverity, $sHeadline = "", $sErrorMessage = "") { public function runTest($mResult, $iSeverity, $sHeadline = "", $sErrorMessage = "") {
/** /**
* @todo: Store results into an external file * @todo: Store results into an external file
*/ */
@ -166,7 +166,7 @@ class cSetupSystemtest extends cSetupMask {
} }
} }
function doPHPTests() { public function doPHPTests() {
#new demo client requires PHP5 #new demo client requires PHP5
if (!version_compare(phpversion(), "5.2.0", ">=") && $_SESSION["setuptype"] == 'setup') { if (!version_compare(phpversion(), "5.2.0", ">=") && $_SESSION["setuptype"] == 'setup') {
$this->runTest(false, C_SEVERITY_WARNING, i18n_setup('ConLite demo client requires PHP 5.2 or higher'), i18n_setup('The ConLite demo client requires PHP 5.2 or higher. If you want to install the demo client, please update your PHP version.') $this->runTest(false, C_SEVERITY_WARNING, i18n_setup('ConLite demo client requires PHP 5.2 or higher'), i18n_setup('The ConLite demo client requires PHP 5.2 or higher. If you want to install the demo client, please update your PHP version.')
@ -245,7 +245,7 @@ class cSetupSystemtest extends cSetupMask {
*/ */
} }
function doGDTests() { public function doGDTests() {
$this->runTest(function_exists("imagecreatefromgif"), C_SEVERITY_INFO, i18n_setup("GD-Library GIF read support missing"), i18n_setup("Your GD version doesn't support reading GIF files. This might cause problems with some modules.")); $this->runTest(function_exists("imagecreatefromgif"), C_SEVERITY_INFO, i18n_setup("GD-Library GIF read support missing"), i18n_setup("Your GD version doesn't support reading GIF files. This might cause problems with some modules."));
$this->runTest(function_exists("imagegif"), C_SEVERITY_INFO, i18n_setup("GD-Library GIF write support missing"), i18n_setup("Your GD version doesn't support writing GIF files. This might cause problems with some modules.")); $this->runTest(function_exists("imagegif"), C_SEVERITY_INFO, i18n_setup("GD-Library GIF write support missing"), i18n_setup("Your GD version doesn't support writing GIF files. This might cause problems with some modules."));
@ -259,7 +259,7 @@ class cSetupSystemtest extends cSetupMask {
$this->runTest(function_exists("imagepng"), C_SEVERITY_INFO, i18n_setup("GD-Library PNG write support missing"), i18n_setup("Your GD version doesn't support writing PNG files. This might cause problems with some modules.")); $this->runTest(function_exists("imagepng"), C_SEVERITY_INFO, i18n_setup("GD-Library PNG write support missing"), i18n_setup("Your GD version doesn't support writing PNG files. This might cause problems with some modules."));
} }
function doMySQLTests() { public function doMySQLTests() {
list($handle, $status) = doMySQLConnect($_SESSION["dbhost"], $_SESSION["dbuser"], $_SESSION["dbpass"]); list($handle, $status) = doMySQLConnect($_SESSION["dbhost"], $_SESSION["dbuser"], $_SESSION["dbpass"]);
@ -445,7 +445,7 @@ class cSetupSystemtest extends cSetupMask {
} }
} }
function doFileSystemTests() { public function doFileSystemTests() {
// old logs // old logs
if ($_SESSION["setuptype"] != "setup") { if ($_SESSION["setuptype"] != "setup") {
// old folders // old folders
@ -500,7 +500,7 @@ class cSetupSystemtest extends cSetupMask {
} }
} }
function logFilePrediction($sFile, $iSeverity = C_SEVERITY_WARNING) { public function logFilePrediction($sFile, $iSeverity = C_SEVERITY_WARNING) {
$status = canWriteFile("../" . $sFile); $status = canWriteFile("../" . $sFile);
$sTitle = sprintf(i18n_setup("Can't write %s"), $sFile); $sTitle = sprintf(i18n_setup("Can't write %s"), $sFile);
$sMessage = sprintf(i18n_setup("Setup or ConLite can't write to the file %s. Please change the file permissions to correct this problem."), $sFile); $sMessage = sprintf(i18n_setup("Setup or ConLite can't write to the file %s. Please change the file permissions to correct this problem."), $sFile);

Datei anzeigen

@ -1,5 +1,6 @@
<?php <?php
/**
/**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
* *
@ -26,41 +27,38 @@
* }} * }}
* *
*/ */
if(!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
session_unset(); session_unset();
class cSetupLanguageChooser extends cSetupMask class cSetupLanguageChooser extends cSetupMask {
{
function cSetupLanguageChooser () public function __construct() {
{ parent::__construct("templates/languagechooser.tpl");
cSetupMask::cSetupMask("templates/languagechooser.tpl"); $this->setHeader('Version ' . C_SETUP_VERSION);
$this->setHeader('Version '.C_SETUP_VERSION); $this->_oStepTemplate->set("s", "DE_HINT", "Diese Anwendung hilft Ihnen bei der Installation.");
$this->_oStepTemplate->set("s", "DE_HINT", "Diese Anwendung hilft Ihnen bei der Installation."); $this->_oStepTemplate->set("s", "EN_HINT", "This application will guide you trough the setup process.");
$this->_oStepTemplate->set("s", "EN_HINT", "This application will guide you trough the setup process."); $this->_oStepTemplate->set("s", "DE_HINT_LANG", "W&auml;hlen Sie bitte die gew&uuml;nschte Sprache f&uuml;r das Setup aus.");
$this->_oStepTemplate->set("s", "DE_HINT_LANG", "W&auml;hlen Sie bitte die gew&uuml;nschte Sprache f&uuml;r das Setup aus."); $this->_oStepTemplate->set("s", "EN_HINT_LANG", "Please choose your language to continue.");
$this->_oStepTemplate->set("s", "EN_HINT_LANG", "Please choose your language to continue.");
$langs = array("de_DE" => "Deutsch", "C" => "English");
$langs = array("de_DE" => "Deutsch", "C" => "English");
$m = "";
$m = "";
foreach ($langs as $entity => $lang) {
foreach ($langs as $entity => $lang) $test = new cHTMLLanguageLink($entity, $lang, "setuptype");
{ $m .= $test->render();
$test = new cHTMLLanguageLink($entity, $lang, "setuptype"); }
$m .= $test->render();
} $this->_oStepTemplate->set("s", "LANGUAGECHOOSER", $m);
}
$this->_oStepTemplate->set("s", "LANGUAGECHOOSER", $m);
}
} }
$cSetupStep1 = new cSetupLanguageChooser; $cSetupStep1 = new cSetupLanguageChooser;
$cSetupStep1->render(); $cSetupStep1->render();
?> ?>

Datei anzeigen

@ -1,5 +1,6 @@
<?php <?php
/**
/**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
* *
@ -15,7 +16,6 @@
* *
* $Id: notinstallable.php 137 2012-10-02 12:00:00Z oldperl $: * $Id: notinstallable.php 137 2012-10-02 12:00:00Z oldperl $:
*/ */
if (!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
@ -23,26 +23,25 @@ if (!defined('CON_FRAMEWORK')) {
session_unset(); session_unset();
class cSetupNotInstallable extends cSetupMask class cSetupNotInstallable extends cSetupMask {
{
function cSetupNotInstallable ($sReason) public function __construct($sReason) {
{ parent::__construct("templates/notinstallable.tpl");
cSetupMask::cSetupMask("templates/notinstallable.tpl"); $this->setHeader("Contenido Version " . C_SETUP_VERSION);
$this->setHeader("Contenido Version " . C_SETUP_VERSION); $this->_oStepTemplate->set("s", "TITLE", "Willkommen zu dem Setup von ConLite / Welcome to the ConLite Setup");
$this->_oStepTemplate->set("s", "TITLE", "Willkommen zu dem Setup von ConLite / Welcome to the ConLite Setup"); $this->_oStepTemplate->set("s", "ERRORTEXT", "Setup nicht ausf&uuml;hrbar / Setup not runnable");
$this->_oStepTemplate->set("s", "ERRORTEXT", "Setup nicht ausf&uuml;hrbar / Setup not runnable"); if ($sReason === 'session_use_cookies') {
if ($sReason === 'session_use_cookies') {
$this->_oStepTemplate->set("s", "REASONTEXT", "You need to set the PHP configuration directive 'session.use_cookies' to 1 and enable cookies in your browser. This setup won't work without that."); $this->_oStepTemplate->set("s", "REASONTEXT", "You need to set the PHP configuration directive 'session.use_cookies' to 1 and enable cookies in your browser. This setup won't work without that.");
} elseif ($sReason === 'database_extension') { } elseif ($sReason === 'database_extension') {
$this->_oStepTemplate->set("s", "REASONTEXT", "Couldn't detect neither MySQLi extension nor MySQL extension. You need to enable one of them in the PHP configuration (see dynamic extensions section in your php.ini). ConLite won't work without that."); $this->_oStepTemplate->set("s", "REASONTEXT", "Couldn't detect neither MySQLi extension nor MySQL extension. You need to enable one of them in the PHP configuration (see dynamic extensions section in your php.ini). ConLite won't work without that.");
} elseif ($sReason === 'php_version') { } elseif ($sReason === 'php_version') {
$this->_oStepTemplate->set("s", "REASONTEXT", "Leider erf&uuml;llt Ihr Webserver nicht die Mindestvorraussetzung von PHP " . C_SETUP_MIN_PHP_VERSION . " oder h<>her. Bitte installieren Sie PHP " . C_SETUP_MIN_PHP_VERSION . " oder h&ouml;her, um mit dem Setup fortzufahren.<br /><br />Unfortunately your webserver doesn't match the minimum requirement of PHP " . C_SETUP_MIN_PHP_VERSION . " or higher. Please install PHP " . C_SETUP_MIN_PHP_VERSION . " or higher and then run the setup again."); $this->_oStepTemplate->set("s", "REASONTEXT", "Leider erf&uuml;llt Ihr Webserver nicht die Mindestvorraussetzung von PHP " . C_SETUP_MIN_PHP_VERSION . " oder h<>her. Bitte installieren Sie PHP " . C_SETUP_MIN_PHP_VERSION . " oder h&ouml;her, um mit dem Setup fortzufahren.<br /><br />Unfortunately your webserver doesn't match the minimum requirement of PHP " . C_SETUP_MIN_PHP_VERSION . " or higher. Please install PHP " . C_SETUP_MIN_PHP_VERSION . " or higher and then run the setup again.");
} else { } else {
// this should not happen // this should not happen
$this->_oStepTemplate->set("s", "REASONTEXT", "Reason unknown"); $this->_oStepTemplate->set("s", "REASONTEXT", "Reason unknown");
} }
} }
} }
global $sNotInstallableReason; global $sNotInstallableReason;
@ -51,5 +50,4 @@ $cNotInstallable = new cSetupNotInstallable($sNotInstallableReason);
$cNotInstallable->render(); $cNotInstallable->render();
die(); die();
?> ?>

Datei anzeigen

@ -1,5 +1,6 @@
<?php <?php
/**
/**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
* *
@ -13,80 +14,80 @@
* *
* $Id: setuptype.php 279 2013-11-21 14:34:53Z oldperl $: * $Id: setuptype.php 279 2013-11-21 14:34:53Z oldperl $:
*/ */
if(!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
unset($_SESSION["setuptype"]); unset($_SESSION["setuptype"]);
class cSetupTypeChooser extends cSetupMask class cSetupTypeChooser extends cSetupMask {
{
function cSetupTypeChooser ()
{
cSetupMask::cSetupMask("templates/setuptype.tpl");
$this->setHeader(i18n_setup("Please choose your setup type"));
$this->_oStepTemplate->set("s", "TITLE_SETUP", i18n_setup("Install new version"));
$this->_oStepTemplate->set("s", "VERSION_SETUP", sprintf(i18n_setup("Version %s"), C_SETUP_VERSION));
$this->_oStepTemplate->set("s", "DESCRIPTION_SETUP", sprintf(i18n_setup("This setup type will install %s."), C_SETUP_VERSION)."<br><br>".i18n_setup("Please choose this type if you want to start with an empty or an example installation.")."<br><br>".i18n_setup("Recommended for new projects."));
$this->_oStepTemplate->set("s", "TITLE_UPGRADE", i18n_setup("Upgrade existing installation")); public function __construct() {
$this->_oStepTemplate->set("s", "VERSION_UPGRADE", sprintf(i18n_setup("Upgrade to %s"), C_SETUP_VERSION)); parent::__construct("templates/setuptype.tpl");
$this->_oStepTemplate->set("s", "DESCRIPTION_UPGRADE", i18n_setup("This setup type will upgrade your existing installation (ConLite 1.0.x/Contenido 4.6.x or later required).")."<br><br>".i18n_setup("Recommended for existing projects.")); $this->setHeader(i18n_setup("Please choose your setup type"));
$this->_oStepTemplate->set("s", "TITLE_SETUP", i18n_setup("Install new version"));
$this->_oStepTemplate->set("s", "TITLE_MIGRATION", i18n_setup("Migrate existing installation")); $this->_oStepTemplate->set("s", "VERSION_SETUP", sprintf(i18n_setup("Version %s"), C_SETUP_VERSION));
$this->_oStepTemplate->set("s", "VERSION_MIGRATION", sprintf(i18n_setup("Migrate (Version %s)"), C_SETUP_VERSION)); $this->_oStepTemplate->set("s", "DESCRIPTION_SETUP", sprintf(i18n_setup("This setup type will install %s."), C_SETUP_VERSION) . "<br><br>" . i18n_setup("Please choose this type if you want to start with an empty or an example installation.") . "<br><br>" . i18n_setup("Recommended for new projects."));
$this->_oStepTemplate->set("s", "DESCRIPTION_MIGRATION", i18n_setup("This setup type will help you migrating an existing installation to another server.")."<br><br>".i18n_setup("Recommended for moving projects across servers."));
$link = new cHTMLLink("#");
$this->_oStepTemplate->set("s", "TITLE_UPGRADE", i18n_setup("Upgrade existing installation"));
$nextSetup = new cHTMLAlphaImage; $this->_oStepTemplate->set("s", "VERSION_UPGRADE", sprintf(i18n_setup("Upgrade to %s"), C_SETUP_VERSION));
$nextSetup->setSrc("../conlite/images/submit.gif"); $this->_oStepTemplate->set("s", "DESCRIPTION_UPGRADE", i18n_setup("This setup type will upgrade your existing installation (ConLite 1.0.x/Contenido 4.6.x or later required).") . "<br><br>" . i18n_setup("Recommended for existing projects."));
$nextSetup->setMouseOver("../conlite/images/submit_hover.gif");
$nextSetup->setClass("button");
$link->setContent($nextSetup);
$link->attachEventDefinition("stepAttach", "onclick", "document.setupform.step.value = 'setup1';");
$link->attachEventDefinition("setuptypeAttach", "onclick", "document.setupform.setuptype.value = 'setup';");
$link->attachEventDefinition("submitAttach", "onclick", "document.setupform.submit();");
$this->_oStepTemplate->set("s", "NEXT_SETUP", $link->render());
$link = new cHTMLLink("#");
$this->_oStepTemplate->set("s", "TITLE_MIGRATION", i18n_setup("Migrate existing installation"));
$nextSetup = new cHTMLAlphaImage; $this->_oStepTemplate->set("s", "VERSION_MIGRATION", sprintf(i18n_setup("Migrate (Version %s)"), C_SETUP_VERSION));
$nextSetup->setSrc("../conlite/images/submit.gif"); $this->_oStepTemplate->set("s", "DESCRIPTION_MIGRATION", i18n_setup("This setup type will help you migrating an existing installation to another server.") . "<br><br>" . i18n_setup("Recommended for moving projects across servers."));
$nextSetup->setMouseOver("../conlite/images/submit_hover.gif");
$nextSetup->setClass("button");
$link->setContent($nextSetup);
$link->attachEventDefinition("stepAttach", "onclick", "document.setupform.step.value = 'upgrade1';");
$link->attachEventDefinition("setuptypeAttach", "onclick", "document.setupform.setuptype.value = 'upgrade';");
$link->attachEventDefinition("submitAttach", "onclick", "document.setupform.submit();");
$this->_oStepTemplate->set("s", "NEXT_UPGRADE", $link->render());
$link = new cHTMLLink("#"); $link = new cHTMLLink("#");
$nextSetup = new cHTMLAlphaImage;
$nextSetup->setSrc("../conlite/images/submit.gif");
$nextSetup->setMouseOver("../conlite/images/submit_hover.gif");
$nextSetup->setClass("button");
$link->setContent($nextSetup);
$link->attachEventDefinition("stepAttach", "onclick", "document.setupform.step.value = 'setup1';");
$link->attachEventDefinition("setuptypeAttach", "onclick", "document.setupform.setuptype.value = 'setup';");
$link->attachEventDefinition("submitAttach", "onclick", "document.setupform.submit();");
$this->_oStepTemplate->set("s", "NEXT_SETUP", $link->render());
$link = new cHTMLLink("#");
$nextSetup = new cHTMLAlphaImage;
$nextSetup->setSrc("../conlite/images/submit.gif");
$nextSetup->setMouseOver("../conlite/images/submit_hover.gif");
$nextSetup->setClass("button");
$link->setContent($nextSetup);
$link->attachEventDefinition("stepAttach", "onclick", "document.setupform.step.value = 'upgrade1';");
$link->attachEventDefinition("setuptypeAttach", "onclick", "document.setupform.setuptype.value = 'upgrade';");
$link->attachEventDefinition("submitAttach", "onclick", "document.setupform.submit();");
$this->_oStepTemplate->set("s", "NEXT_UPGRADE", $link->render());
$link = new cHTMLLink("#");
$nextSetup = new cHTMLAlphaImage;
$nextSetup->setSrc("../conlite/images/submit.gif");
$nextSetup->setMouseOver("../conlite/images/submit_hover.gif");
$nextSetup->setClass("button");
$link->setContent($nextSetup);
$link->attachEventDefinition("stepAttach", "onclick", "document.setupform.step.value = 'migration1';");
$link->attachEventDefinition("setuptypeAttach", "onclick", "document.setupform.setuptype.value = 'migration';");
$link->attachEventDefinition("submitAttach", "onclick", "document.setupform.submit();");
$this->_oStepTemplate->set("s", "NEXT_MIGRATION", $link->render());
}
$nextSetup = new cHTMLAlphaImage;
$nextSetup->setSrc("../conlite/images/submit.gif");
$nextSetup->setMouseOver("../conlite/images/submit_hover.gif");
$nextSetup->setClass("button");
$link->setContent($nextSetup);
$link->attachEventDefinition("stepAttach", "onclick", "document.setupform.step.value = 'migration1';");
$link->attachEventDefinition("setuptypeAttach", "onclick", "document.setupform.setuptype.value = 'migration';");
$link->attachEventDefinition("submitAttach", "onclick", "document.setupform.submit();");
$this->_oStepTemplate->set("s", "NEXT_MIGRATION", $link->render());
}
} }
$cSetupStep1 = new cSetupTypeChooser; $cSetupStep1 = new cSetupTypeChooser;
$cSetupStep1->render(); $cSetupStep1->render();
?> ?>