1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
13:
14: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
15:
16: unset($_SESSION["setuptype"]);
17:
18: 19: 20: 21: 22: 23:
24: class cSetupTypeChooser extends cSetupMask
25: {
26:
27: 28: 29:
30: public function __construct() {
31: cSetupMask::__construct("templates/setuptype.tpl");
32: $this->setHeader(i18n("Please choose your setup type", "setup"));
33: $this->_stepTemplateClass->set("s", "TITLE_SETUP", i18n("Install new CONTENIDO version", "setup"));
34: $this->_stepTemplateClass->set("s", "VERSION_SETUP", sprintf(i18n("Version %s", "setup"), CON_SETUP_VERSION));
35: $this->_stepTemplateClass->set("s", "DESCRIPTION_SETUP", sprintf(i18n("This setup type will install CONTENIDO %s.", "setup"), CON_SETUP_VERSION)."<br><br>".i18n("Please choose this type if you want to start with an empty or an example installation.", "setup")."<br><br>".i18n("Recommended for new projects.", "setup"));
36:
37: $this->_stepTemplateClass->set("s", "TITLE_UPGRADE", i18n("Upgrade existing installation", "setup"));
38: $this->_stepTemplateClass->set("s", "VERSION_UPGRADE", sprintf(i18n("Upgrade to %s", "setup"), CON_SETUP_VERSION));
39: $this->_stepTemplateClass->set("s", "DESCRIPTION_UPGRADE", i18n("This setup type will upgrade your existing installation (CONTENIDO 4.6.x or later required).", "setup")."<br><br>".i18n("Recommended for existing projects.", "setup"));
40:
41: $link = new cHTMLLink("#");
42: $link->setClass("nav");
43: $link->setContent("<span>»</span>");
44: $link->attachEventDefinition("stepAttach", "onclick", "document.setupform.step.value = 'setup1';");
45: $link->attachEventDefinition("setuptypeAttach", "onclick", "document.setupform.setuptype.value = 'setup';");
46: $link->attachEventDefinition("submitAttach", "onclick", "document.setupform.submit();");
47:
48: $this->_stepTemplateClass->set("s", "NEXT_SETUP", $link->render());
49:
50: $link = new cHTMLLink("#");
51: $link->setClass("nav");
52: $link->setContent("<span>»</span>");
53: $link->attachEventDefinition("stepAttach", "onclick", "document.setupform.step.value = 'upgrade1';");
54: $link->attachEventDefinition("setuptypeAttach", "onclick", "document.setupform.setuptype.value = 'upgrade';");
55: $link->attachEventDefinition("submitAttach", "onclick", "document.setupform.submit();");
56: $this->_stepTemplateClass->set("s", "NEXT_UPGRADE", $link->render());
57: }
58:
59: 60: 61: 62:
63: public function cSetupTypeChooser() {
64: cDeprecated('This method is deprecated and is not needed any longer. Please use __construct() as constructor function.');
65: $this->__construct();
66: }
67:
68: }
69:
70: $cSetupStep1 = new cSetupTypeChooser;
71: $cSetupStep1->render();
72: ?>