1: <?php
 2:  3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 14: 
15: 
16: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
17: 
18: 19: 20: 21: 22: 23: 
24: class cSetupResults extends cSetupMask
25: {
26:     function cSetupResults($step)
27:     {
28:         $this->setHeader(i18n("Results", "setup"));
29: 
30:         if (!isset($_SESSION["install_failedchunks"]) && !isset($_SESSION["install_failedupgradetable"]) && !isset($_SESSION["configsavefailed"]))
31:         {
32:             cSetupMask::cSetupMask("templates/setup/forms/setupresults.tpl", $step);
33:             $this->_oStepTemplate->set("s", "TITLE", i18n("Results", "setup"));
34:             $this->_oStepTemplate->set("s", "DESCRIPTION", i18n("CONTENIDO was installed and configured successfully on your server.", "setup"));
35:             if ($_SESSION["setuptype"] == 'setup') {
36:                 $this->_oStepTemplate->set("s", "LOGIN_INFO", '<p>'.i18n("Please use username <b>sysadmin</b> and the configured password to login into CONTENIDO Backend.", "setup").'</p>');
37:             } else {
38:                 $this->_oStepTemplate->set("s", "LOGIN_INFO", '');
39:             }
40:             $this->_oStepTemplate->set("s", "CHOOSENEXTSTEP", i18n("Please choose an item to start working:", "setup"));
41:             $this->_oStepTemplate->set("s", "FINISHTEXT", i18n("You can now start using CONTENIDO. Please delete the folder named 'setup'!", "setup"));
42: 
43:             list($rootPath, $rootHttpPath) = getSystemDirectories();
44: 
45:             $cHTMLButtonLink = new cHTMLButtonLink($rootHttpPath . "/contenido/", "Backend - CMS");
46:             $this->_oStepTemplate->set("s", "BACKEND", $cHTMLButtonLink->render());
47: 
48:             if ($_SESSION["setuptype"] == "setup" && $_SESSION["clientmode"] == "CLIENTEXAMPLES") {
49:                 $cHTMLButtonLink = new cHTMLButtonLink($rootHttpPath . "/cms/", "Frontend - Web");
50:                 $this->_oStepTemplate->set("s", "FRONTEND", $cHTMLButtonLink->render());
51:             } else {
52:                 $this->_oStepTemplate->set("s", "FRONTEND", "");
53:             }
54: 
55:             $cHTMLButtonLink = new cHTMLButtonLink("http://www.contenido.org/", "CONTENIDO Website");
56:             $this->_oStepTemplate->set("s", "WEBSITE", $cHTMLButtonLink->render());
57: 
58:             $cHTMLButtonLink = new cHTMLButtonLink("http://forum.contenido.org/", "CONTENIDO Forum");
59:             $this->_oStepTemplate->set("s", "FORUM", $cHTMLButtonLink->render());
60: 
61:             $cHTMLButtonLink = new cHTMLButtonLink("http://faq.contenido.org/", "CONTENIDO FAQ");
62:             $this->_oStepTemplate->set("s", "FAQ", $cHTMLButtonLink->render());
63:         } else {
64:             cSetupMask::cSetupMask("templates/setup/forms/setupresultsfail.tpl", $step);
65:             $this->_oStepTemplate->set("s", "TITLE", i18n("Setup Results", "setup"));
66: 
67:             $this->_oStepTemplate->set("s", "DESCRIPTION", sprintf(i18n("An error occured during installation. Please take a look at the file %s (located in "data/logs/") for more information.", "setup"), 'setuplog.txt'));
68: 
69:             switch ($_SESSION["setuptype"]) {
70:                 case "setup":
71:                     $this->setNavigation("setup1", "");
72:                     break;
73:                 case "upgrade":
74:                     $this->setNavigation("upgrade1", "");
75:                     break;
76:             }
77:         }
78:     }
79: }
80: 
81: ?>