fixes for PHP 7

Dieser Commit ist enthalten in:
Oldperl 2017-01-13 12:45:12 +00:00
Ursprung 0a54ff7ec8
Commit 0e0b093b26
18 geänderte Dateien mit 979 neuen und 1068 gelöschten Zeilen

Datei anzeigen

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

Datei anzeigen

@ -1,13 +1,16 @@
<?php
/**
* Project:
* Contenido Content Management System
* Class Setup Mask
*
* Description:
* @package ConLite
* @subpackage Setup
* @version $Rev: 279 $
* @author Ortwin Pinke <o.pinke@conlite.org>
* @copyright (c) 2017, conlite.org
*
* Requirements:
* @con_php_req 5
*
* $Id: class.setupmask.php 279 2013-11-21 14:34:53Z oldperl $:
*/
/**
* @package ContenidoBackendArea
* @version 0.2
* @author unknown
@ -15,125 +18,100 @@
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @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')) {
die('Illegal call');
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
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;
}
class cSetupMask {
}
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);
public function __construct($sStepTemplate, $iStep = false) {
$this->_oTpl = new Template;
$this->_oStepTemplate = new Template;
$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
/**
* Project:
* Contenido Content Management System
* Class Template for setup
*
* Description:
* Contenido Template Engine
* @package ConLite
* @subpackage Setup
* @version $Rev: 283 $
* @author Ortwin Pinke <o.pinke@conlite.org>
* @copyright (c) 2017, conlite.org
*
* Requirements:
* @con_php_req 5
* @con_notice
* Light template mechanism
*
* $Id: class.template.php 283 2014-01-09 14:48:38Z oldperl $:
*/
/**
* @package ContenidoBackendArea
* @version 1.2
* @author Jan Lengowski <Jan.Lengowski@4fb.de>
@ -18,266 +18,239 @@
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @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')) {
die('Illegal call');
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class Template
{
/**
* Needles (static)
* @var array
*/
var $needles = array ();
class Template {
/**
* Replacements (static)
* @var array
*/
var $replacements = array ();
/**
* Needles (static)
* @var array
*/
var $needles = array();
/**
* Dyn_Needles (dynamic)
* @var array
*/
var $Dyn_needles = array ();
/**
* Replacements (static)
* @var array
*/
var $replacements = array();
/**
* Dyn_Replacements (dynamic)
* @var array
*/
var $Dyn_replacements = array ();
/**
* Dyn_Needles (dynamic)
* @var array
*/
var $Dyn_needles = array();
/**
* Database instance
* @var object
*/
var $db;
/**
* Dyn_Replacements (dynamic)
* @var array
*/
var $Dyn_replacements = array();
/**
* Template cache
* @var array
*/
var $tplcache;
/**
* Database instance
* @var object
*/
var $db;
/**
* Template name cache
* @var array
*/
var $tplnamecache;
/**
* Template cache
* @var array
*/
var $tplcache;
/**
* Dynamic counter
* @var int
*/
var $dyn_cnt = 0;
/**
* Template name cache
* @var array
*/
var $tplnamecache;
/**
* Tags array (for dynamic blocks);
* @var array
*/
var $tags = array ('static' => '{%s}', 'start' => '<!-- BEGIN:BLOCK -->', 'end' => '<!-- END:BLOCK -->');
/**
* Dynamic counter
* @var int
*/
var $dyn_cnt = 0;
/**
* Constructor function
* @return void
*/
function Template($tags = false)
{
$this->tplcache = Array ();
$this->tplnamecache = Array ();
/**
* Tags array (for dynamic blocks);
* @var array
*/
var $tags = array('static' => '{%s}', 'start' => '<!-- BEGIN:BLOCK -->', 'end' => '<!-- END:BLOCK -->');
if (is_array($tags))
{
$this->tags = $tags;
}
$this->setEncoding("");
$this->setDomain("conlite");
} // end function
/**
* Constructor function
* @return void
*/
public function __construct($tags = false) {
$this->tplcache = Array();
$this->tplnamecache = Array();
if (is_array($tags)) {
$this->tags = $tags;
}
$this->setEncoding("");
$this->setDomain("conlite");
}
// end function
/**
* setDomain
*
* 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
*/
function setDomain ($sDomain)
{
$this->_sDomain = $sDomain;
*/
public function setDomain($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
$this->Dyn_needles[$this->dyn_cnt][] = sprintf($this->tags['static'], $needle);
$this->Dyn_replacements[$this->dyn_cnt][] = $replacement;
}
}
/**
* 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
*/
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.
*
* @param $encoding string Encoding to set
*/
function setEncoding ($encoding)
{
$this->_encoding = $encoding;
*/
public function setEncoding($encoding) {
$this->_encoding = $encoding;
}
/**
* Iterate internal counter by one
*
* @return void
*/
function next()
{
$this->dyn_cnt++;
}
/**
* Reset template data
*
* @return void
*/
function reset()
{
$this->dyn_cnt = 0;
$this->needles = array ();
$this->replacements = array ();
$this->Dyn_needles = array ();
$this->Dyn_replacements = array ();
}
/**
* Iterate internal counter by one
*
* @return void
*/
public function next() {
$this->dyn_cnt++;
}
/**
* 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
*/
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
/**
* Reset template data
*
* @return void
*/
public function reset() {
$this->dyn_cnt = 0;
$this->needles = array();
$this->replacements = array();
$this->Dyn_needles = array();
$this->Dyn_replacements = array();
}
$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();
//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
$content = (($note) ? "<!-- Generated by ConLite " . $cfg['version'] . "-->\n" : "") . $content;
//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]);
$pieces = array();
//generate dynamic blocks
for ($a = 0; $a < $this->dyn_cnt; $a ++)
{
$temp = str_replace($this->Dyn_needles[$a], $this->Dyn_replacements[$a], $pieces[1][0]);
$this->replacei18n($temp, "i18n");
$this->replacei18n($temp, "trans");
$content .= $temp;
}
unset ($temp);
//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[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
$pieces[2][0] = str_replace($this->needles, $this->replacements, $pieces[2][0]);
$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");
}
//generate dynamic blocks
for ($a = 0; $a < $this->dyn_cnt; $a ++) {
$temp = str_replace($this->Dyn_needles[$a], $this->Dyn_replacements[$a], $pieces[1][0]);
$this->replacei18n($temp, "i18n");
$this->replacei18n($temp, "trans");
$content .= $temp;
}
unset($temp);
if ($this->_encoding != "")
{
$content = str_replace("</head>", '<meta http-equiv="Content-Type" content="text/html; charset='.$this->_encoding.'">'."\n".'</head>', $content);
//end block
$pieces[2][0] = str_replace($this->needles, $this->replacements, $pieces[2][0]);
$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);
}
/**
* 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)
*/
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);
}
}
if ($return)
return $content;
else
echo $content;
}
} # 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_STEPHEIGHT', 28);
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
//PHP >= 5.0.0 and < 6.0.0
if (version_compare(PHP_VERSION, '6.0.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");
if (version_compare(PHP_VERSION, '7.2.0', '>=')) {
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
/**
* Project:
* Contenido Content Management System
@ -41,47 +42,46 @@
* }}
*
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class cSetupAdditionalPlugins extends cSetupMask
{
function cSetupAdditionalPlugins ($step, $previous, $next)
{
class cSetupAdditionalPlugins extends cSetupMask {
public function __construct($step, $previous, $next) {
$db = getSetupMySQLDBConnection();
cSetupMask::cSetupMask("templates/setup/forms/additionalplugins.tpl", $step);
$this->setHeader(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"));
// add new plugins to this array and you're done.
$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_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'));
$sCheckBoxes = '';
if (sizeof($aPlugins) > 0) {
foreach ($aPlugins as $sInternalName => $aPluginData) {
$sChecked = ((isset($_SESSION[$sInternalName]) && strval($_SESSION[$sInternalName]) || checkExistingPlugin($db, $sInternalName)) == 'true') ? ' checked="checked"' : '';
$sCheckBoxes .= '<p class="plugin_select">
<input type="checkbox" class="plugin_checkbox" id="'.$sInternalName.'" name="'.$sInternalName.'" value="true"'.$sChecked.'>
<label for="'.$sInternalName.'">'.$aPluginData['label'].'</label>
<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">
parent::__construct("templates/setup/forms/additionalplugins.tpl", $step);
$this->setHeader(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"));
// add new plugins to this array and you're done.
$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_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'));
$sCheckBoxes = '';
if (sizeof($aPlugins) > 0) {
foreach ($aPlugins as $sInternalName => $aPluginData) {
$sChecked = ((isset($_SESSION[$sInternalName]) && strval($_SESSION[$sInternalName]) || checkExistingPlugin($db, $sInternalName)) == 'true') ? ' checked="checked"' : '';
$sCheckBoxes .= '<p class="plugin_select">
<input type="checkbox" class="plugin_checkbox" id="' . $sInternalName . '" name="' . $sInternalName . '" value="true"' . $sChecked . '>
<label for="' . $sInternalName . '">' . $aPluginData['label'] . '</label>
<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">
</a>
</p>';
}
} else {
$sCheckBoxes = i18n_setup("None available");
}
$this->_oStepTemplate->set("s", "PLUGINLIST", $sCheckBoxes);
$this->setNavigation($previous, $next);
}
}
} else {
$sCheckBoxes = i18n_setup("None available");
}
$this->_oStepTemplate->set("s", "PLUGINLIST", $sCheckBoxes);
$this->setNavigation($previous, $next);
}
}
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* Project:
* Contenido Content Management System
@ -27,100 +28,96 @@
* }}
*
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class cSetupClientAdjust extends cSetupMask
{
function cSetupClientAdjust ($step, $previous, $next)
{
global $cfg;
$cfg["tab"]["sequence"] = $_SESSION["dbprefix"]."_sequence";
cSetupMask::cSetupMask("templates/setup/forms/pathinfo.tpl", $step);
$this->setHeader(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."));
class cSetupClientAdjust extends cSetupMask {
public function __construct($step, $previous, $next) {
global $cfg;
$cfg["tab"]["sequence"] = $_SESSION["dbprefix"] . "_sequence";
parent::__construct("templates/setup/forms/pathinfo.tpl", $step);
$this->setHeader(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."));
$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;
$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");
$aClients = listClients($db, $_SESSION["dbprefix"] . "_clients");
$aPathList[] = $oClientSystemPath;
}
$cHTMLErrorMessageList->setContent($aPathList);
$this->_oStepTemplate->set("s", "CONTROL_PATHINFO", $cHTMLErrorMessageList->render());
$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;
$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
/**
* Project:
* Contenido Content Management System
@ -26,48 +27,43 @@
* }}
*
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
if (!defined('CON_FRAMEWORK')) {
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
{
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", "");
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"),
"CLIENT" => i18n_setup("Client without examples"),
"NOCLIENT" => i18n_setup("Don't create client"));
foreach ($aChoices as $sKey => $sChoice)
{
$oRadio = new cHTMLRadiobutton("clientmode", $sKey);
$oRadio->setLabelText(" ");
$oRadio->setStyle('width:auto;border:0;');
if ($_SESSION["clientmode"] == $sKey || ($_SESSION["clientmode"] == "" && $sKey == "CLIENTEXAMPLES"))
{
$oRadio->setChecked("checked");
}
$oLabel = new cHTMLLabel($sChoice, $oRadio->getId());
$this->_oStepTemplate->set("s", "CONTROL_".$sKey, $oRadio->toHtml(false));
$this->_oStepTemplate->set("s", "LABEL_".$sKey, $oLabel->render());
}
$aChoices = array("CLIENTEXAMPLES" => i18n_setup("Client with example modules and example content"),
"CLIENTMODULES" => i18n_setup("Client with example modules, but without example content"),
"CLIENT" => i18n_setup("Client without examples"),
"NOCLIENT" => i18n_setup("Don't create client"));
foreach ($aChoices as $sKey => $sChoice) {
$oRadio = new cHTMLRadiobutton("clientmode", $sKey);
$oRadio->setLabelText(" ");
$oRadio->setStyle('width:auto;border:0;');
if ($_SESSION["clientmode"] == $sKey || ($_SESSION["clientmode"] == "" && $sKey == "CLIENTEXAMPLES")) {
$oRadio->setChecked("checked");
}
$oLabel = new cHTMLLabel($sChoice, $oRadio->getId());
$this->_oStepTemplate->set("s", "CONTROL_" . $sKey, $oRadio->toHtml(false));
$this->_oStepTemplate->set("s", "LABEL_" . $sKey, $oLabel->render());
}
$this->setNavigation($previous, $next);
}
$this->setNavigation($previous, $next);
}
}
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* Project:
* Contenido Content Management System
@ -18,83 +19,78 @@
*
* $Id: configmode.php 279 2013-11-21 14:34:53Z oldperl $:
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
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;');
class cSetupConfigMode extends cSetupMask {
$oConfigDownload = new cHTMLRadiobutton("configmode", "download");
$oConfigDownload->setStyle('width:auto;border:0;');
if (canWriteFile("../conlite/includes/config.php"))
{
$oConfigSave->setChecked(true);
} else {
$oConfigDownload->setChecked(true);
}
public function __construct($step, $previous, $next) {
if ($_SESSION["setuptype"] == "setup") {
parent::__construct("templates/setup/forms/configmode.tpl", $step);
} else {
parent::__construct("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."));
$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());
$oConfigSave = new cHTMLRadiobutton("configmode", "save");
$oConfigSave->setStyle('width:auto;border:0;');
$this->setNavigation($previous, $next);
}
$oConfigDownload = new cHTMLRadiobutton("configmode", "download");
$oConfigDownload->setStyle('width:auto;border:0;');
function _createNavigation ()
{
$link = new cHTMLLink("#");
if ($this->_bNextstep == "doinstall")
{
/* Install launcher */
}
if (canWriteFile("../conlite/includes/config.php")) {
$oConfigSave->setChecked(true);
} else {
$oConfigDownload->setChecked(true);
}
$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
/**
* Project:
* Contenido Content Management System
@ -26,45 +27,42 @@
* }}
*
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
if (!defined('CON_FRAMEWORK')) {
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
{
function cSetupInstaller ($step)
{
cSetupMask::cSetupMask("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 ..."));
$this->_oStepTemplate->set("s", "DBUPDATESCRIPT", "dbupdate.php");
switch ($_SESSION["setuptype"])
{
case "setup":
$this->_oStepTemplate->set("s", "DONEINSTALLATION", i18n_setup("Setup completed installing. Click on next to continue."));
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Setup is installing, please wait..."));
$_SESSION["upgrade_nextstep"] = "setup8";
$this->setNavigation("", "setup8");
break;
case "upgrade":
$this->_oStepTemplate->set("s", "DONEINSTALLATION", i18n_setup("Setup completed upgrading. Click on next to continue."));
$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;
}
$this->_oStepTemplate->set("s", "DBUPDATESCRIPT", "dbupdate.php");
switch ($_SESSION["setuptype"]) {
case "setup":
$this->_oStepTemplate->set("s", "DONEINSTALLATION", i18n_setup("Setup completed installing. Click on next to continue."));
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("Setup is installing, please wait..."));
$_SESSION["upgrade_nextstep"] = "setup8";
$this->setNavigation("", "setup8");
break;
case "upgrade":
$this->_oStepTemplate->set("s", "DONEINSTALLATION", i18n_setup("Setup completed upgrading. Click on next to continue."));
$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
/**
* Project:
* Contenido Content Management System
@ -26,46 +27,45 @@
* }}
*
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
if (!defined('CON_FRAMEWORK')) {
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
{
function cSetupPath ($step, $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->_oStepTemplate->set("s", "CONTROL_PATHINFO", $cHTMLErrorMessageList->render());
$this->setNavigation($previous, $next);
}
$this->setNavigation($previous, $next);
}
}
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* Project:
* Contenido Content Management System
@ -13,89 +14,85 @@
*
* $Id: setupresults.php 377 2015-11-09 19:10:37Z oldperl $:
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class cSetupResults extends cSetupMask {
class cSetupResults extends cSetupMask
{
function cSetupResults ($step)
{
$this->setHeader(i18n_setup("Results"));
if (!isset($_SESSION["install_failedchunks"]) && !isset($_SESSION["install_failedupgradetable"]) && !isset($_SESSION["configsavefailed"]))
{
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."));
public function __construct($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"));
$this->_oStepTemplate->set("s", "DESCRIPTION", i18n_setup("ConLite was installed and configured successfully on your server."));
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 {
$this->_oStepTemplate->set("s", "LOGIN_INFO", '');
}
$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'!"));
list($root_path, $root_http_path) = getSystemDirectories();
$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'!"));
$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."/cms/", "Frontend - Web");
$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://forum.contenido.org/", "Contenido Forum");
$this->_oStepTemplate->set("s", "FORUM", $cHTMLButtonLink->render());
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 . "/cms/", "Frontend - Web");
$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://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
/**
* Project:
* Contenido Content Management System
@ -26,82 +27,75 @@
* }}
*
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
if (!defined('CON_FRAMEWORK')) {
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
{
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;
$cHTMLErrorMessageList = new cHTMLErrorMessageList;
switch ($_SESSION["setuptype"])
{
case "setup":
$sType = i18n_setup("Setup");
break;
case "upgrade":
$sType = i18n_setup("Upgrade");
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;
}
switch ($_SESSION["setuptype"]) {
case "setup":
$sType = i18n_setup("Setup");
break;
case "upgrade":
$sType = i18n_setup("Upgrade");
break;
case "migration":
$sType = i18n_setup("Migration");
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"],
switch ($_SESSION["configmode"]) {
case "save":
$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")
{
$aChoices = array( "CLIENTEXAMPLES" => i18n_setup("Client with example modules and example content"),
"CLIENTMODULES" => i18n_setup("Client with example modules but without example content"),
"CLIENT" => i18n_setup("Client without examples"),
"NOCLIENT" => i18n_setup("Don't create a client"));
$messages[i18n_setup("Client installation").":"] = $aChoices[$_SESSION["clientmode"]];
}
if ($_SESSION["setuptype"] == "setup") {
$aChoices = array("CLIENTEXAMPLES" => i18n_setup("Client with example modules and example content"),
"CLIENTMODULES" => i18n_setup("Client with example modules but without example content"),
"CLIENT" => i18n_setup("Client without examples"),
"NOCLIENT" => i18n_setup("Don't create a client"));
$messages[i18n_setup("Client installation") . ":"] = $aChoices[$_SESSION["clientmode"]];
}
// additional plugins
$aPlugins = $this->_getSelectedAdditionalPlugins();
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();
if ($_SESSION['plugin_newsletter'] == 'true') {
$aPlugins[] = i18n_setup('Newsletter');
@ -114,6 +108,7 @@ class cSetupSetupSummary extends cSetupMask
}
return $aPlugins;
}
}
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* Project:
* Contenido Content Management System
@ -26,167 +27,150 @@
* }}
*
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
if (!defined('CON_FRAMEWORK')) {
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
{
function cSetupSystemData ($step, $previous, $next)
{
cSetupMask::cSetupMask("templates/setup/forms/systemdata.tpl", $step);
list($a_root_path, $a_root_http_path) = getSystemDirectories();
cInitializeArrayKey($_SESSION, "dbprefix", "");
cInitializeArrayKey($_SESSION, "dbhost", "");
cInitializeArrayKey($_SESSION, "dbuser", "");
cInitializeArrayKey($_SESSION, "dbname", "");
cInitializeArrayKey($_SESSION, "dbpass", "");
if(file_exists($a_root_path."/conlite/includes/config.php") || file_exists($a_root_path."/data/config/".CL_ENVIRONMENT."/config.php")) {
global $cfg; // Avoiding error message about "prepend3.php" on update from V4.x
$contenido_host = ""; // Just define the variables to avoid warnings in IDE
$contenido_user = "";
$contenido_database = "";
$contenido_password = "";
if(file_exists($a_root_path."/conlite/includes/config.php")) {
@include($a_root_path."/conlite/includes/config.php");
list($a_root_path, $a_root_http_path) = getSystemDirectories();
cInitializeArrayKey($_SESSION, "dbprefix", "");
cInitializeArrayKey($_SESSION, "dbhost", "");
cInitializeArrayKey($_SESSION, "dbuser", "");
cInitializeArrayKey($_SESSION, "dbname", "");
cInitializeArrayKey($_SESSION, "dbpass", "");
if (file_exists($a_root_path . "/conlite/includes/config.php") || file_exists($a_root_path . "/data/config/" . CL_ENVIRONMENT . "/config.php")) {
global $cfg; // Avoiding error message about "prepend3.php" on update from V4.x
$contenido_host = ""; // Just define the variables to avoid warnings in IDE
$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 {
@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);
$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);
}
$aVars = array("dbhost" => $contenido_host,
"dbuser" => $contenido_user,
"dbname" => $contenido_database,
"dbpass" => $contenido_password,
"dbprefix" => $cfg["sql"]["sqlprefix"]);
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());
}
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);
$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 {
function cSetupSystemtest($step, $previous, $next) {
cSetupMask::cSetupMask("templates/setup/forms/systemtest.tpl", $step);
public function __construct($step, $previous, $next) {
parent::__construct("templates/setup/forms/systemtest.tpl", $step);
$bErrors = false;
$this->setHeader(i18n_setup("System Test"));
@ -94,7 +94,7 @@ class cSetupSystemtest extends cSetupMask {
}
}
function doExistingOldPluginTests() {
public function doExistingOldPluginTests() {
$db = getSetupMySQLDBConnection(false);
$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
*/
@ -166,7 +166,7 @@ class cSetupSystemtest extends cSetupMask {
}
}
function doPHPTests() {
public function doPHPTests() {
#new demo client requires PHP5
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.')
@ -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("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."));
}
function doMySQLTests() {
public function doMySQLTests() {
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
if ($_SESSION["setuptype"] != "setup") {
// 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);
$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);

Datei anzeigen

@ -1,5 +1,6 @@
<?php
/**
/**
* Project:
* Contenido Content Management System
*
@ -26,41 +27,38 @@
* }}
*
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
session_unset();
class cSetupLanguageChooser extends cSetupMask
{
function cSetupLanguageChooser ()
{
cSetupMask::cSetupMask("templates/languagechooser.tpl");
$this->setHeader('Version '.C_SETUP_VERSION);
$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", "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.");
$langs = array("de_DE" => "Deutsch", "C" => "English");
$m = "";
foreach ($langs as $entity => $lang)
{
$test = new cHTMLLanguageLink($entity, $lang, "setuptype");
$m .= $test->render();
}
$this->_oStepTemplate->set("s", "LANGUAGECHOOSER", $m);
}
class cSetupLanguageChooser extends cSetupMask {
public function __construct() {
parent::__construct("templates/languagechooser.tpl");
$this->setHeader('Version ' . C_SETUP_VERSION);
$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", "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.");
$langs = array("de_DE" => "Deutsch", "C" => "English");
$m = "";
foreach ($langs as $entity => $lang) {
$test = new cHTMLLanguageLink($entity, $lang, "setuptype");
$m .= $test->render();
}
$this->_oStepTemplate->set("s", "LANGUAGECHOOSER", $m);
}
}
$cSetupStep1 = new cSetupLanguageChooser;
$cSetupStep1->render();
?>

Datei anzeigen

@ -1,5 +1,6 @@
<?php
/**
/**
* Project:
* Contenido Content Management System
*
@ -15,7 +16,6 @@
*
* $Id: notinstallable.php 137 2012-10-02 12:00:00Z oldperl $:
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
@ -23,26 +23,25 @@ if (!defined('CON_FRAMEWORK')) {
session_unset();
class cSetupNotInstallable extends cSetupMask
{
class cSetupNotInstallable extends cSetupMask {
function cSetupNotInstallable ($sReason)
{
cSetupMask::cSetupMask("templates/notinstallable.tpl");
$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", "ERRORTEXT", "Setup nicht ausf&uuml;hrbar / Setup not runnable");
if ($sReason === 'session_use_cookies') {
public function __construct($sReason) {
parent::__construct("templates/notinstallable.tpl");
$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", "ERRORTEXT", "Setup nicht ausf&uuml;hrbar / Setup not runnable");
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.");
} 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.");
} 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.");
} else {
// this should not happen
$this->_oStepTemplate->set("s", "REASONTEXT", "Reason unknown");
}
}
}
}
global $sNotInstallableReason;
@ -51,5 +50,4 @@ $cNotInstallable = new cSetupNotInstallable($sNotInstallableReason);
$cNotInstallable->render();
die();
?>

Datei anzeigen

@ -1,5 +1,6 @@
<?php
/**
/**
* Project:
* Contenido Content Management System
*
@ -13,80 +14,80 @@
*
* $Id: setuptype.php 279 2013-11-21 14:34:53Z oldperl $:
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
unset($_SESSION["setuptype"]);
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."));
class cSetupTypeChooser extends cSetupMask {
$this->_oStepTemplate->set("s", "TITLE_UPGRADE", i18n_setup("Upgrade existing installation"));
$this->_oStepTemplate->set("s", "VERSION_UPGRADE", sprintf(i18n_setup("Upgrade to %s"), C_SETUP_VERSION));
$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->_oStepTemplate->set("s", "TITLE_MIGRATION", i18n_setup("Migrate existing installation"));
$this->_oStepTemplate->set("s", "VERSION_MIGRATION", sprintf(i18n_setup("Migrate (Version %s)"), C_SETUP_VERSION));
$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("#");
public function __construct() {
parent::__construct("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."));
$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("#");
$this->_oStepTemplate->set("s", "TITLE_UPGRADE", i18n_setup("Upgrade existing installation"));
$this->_oStepTemplate->set("s", "VERSION_UPGRADE", sprintf(i18n_setup("Upgrade to %s"), C_SETUP_VERSION));
$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 = 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());
$this->_oStepTemplate->set("s", "TITLE_MIGRATION", i18n_setup("Migrate existing installation"));
$this->_oStepTemplate->set("s", "VERSION_MIGRATION", sprintf(i18n_setup("Migrate (Version %s)"), C_SETUP_VERSION));
$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("#");
$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->render();
?>