Booked Scheduler is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Booked Scheduler. If not, see <http://www.gnu.org/licenses/>. */ define('ROOT_DIR', '../../'); $smartyTemplateCacheDir = ROOT_DIR . 'tpl_c'; /** * Checking directory permission */ if (SmartyPermissionsAreOk($smartyTemplateCacheDir)) { require_once ROOT_DIR . 'Pages/Install/InstallPage.php'; $page = new InstallPage(); $page->PageLoad(); } else { echo "The web server (such as _www on Mac or apache on Linux) must have write access to {$smartyTemplateCacheDir}. "; echo "<br/>The permissions are currently set as " . substr(sprintf('%o', fileperms($smartyTemplateCacheDir)), -4); echo "<br/>You can either change {$smartyTemplateCacheDir} to group for example: _www/apache accordingly"; echo "<br/>Or change {$smartyTemplateCacheDir} to have permission 777 which is only for testing due to security vulnerability."; } /** * Determine the permission of given directory * @param string $smartyTemplateCacheDir location of tpl_c directory * @return bool|string bool when writable, and string otherwise */ function SmartyPermissionsAreOk($smartyTemplateCacheDir) { if (!is_writable($smartyTemplateCacheDir)) {
<?php require_once realpath(__DIR__ . DIRECTORY_SEPARATOR . 'install.php'); use nzedb\Install; $page = new InstallPage(); $page->title = "OpenSSL Setup"; $cfg = new Install(); if (!$cfg->isInitialized()) { header("Location: index.php"); die; } $cfg = $cfg->getSession(); if ($page->isPostBack()) { $cfg->doCheck = true; $cfg->nZEDb_SSL_CAFILE = trim($_POST['cafile']); $cfg->nZEDb_SSL_CAPATH = trim($_POST['capath']); $cfg->nZEDb_SSL_VERIFY_PEER = isset($_POST['verifypeer']) ? trim($_POST['verifypeer']) == '1' ? true : false : false; $cfg->nZEDb_SSL_VERIFY_HOST = isset($_POST['verifyhost']) ? trim($_POST['verifyhost']) == '1' ? true : false : false; $cfg->nZEDb_SSL_ALLOW_SELF_SIGNED = isset($_POST['allowselfsigned']) ? trim($_POST['allowselfsigned']) == '1' ? true : false : false; // If the user doesn't want to verify peer, disable everything. if (!$cfg->nZEDb_SSL_VERIFY_PEER) { $cfg->nZEDb_SSL_ALLOW_SELF_SIGNED = true; $cfg->nZEDb_SSL_VERIFY_HOST = false; $cfg->nZEDb_SSL_CAFILE = $cfg->nZEDb_SSL_CAPATH = ''; } // If both paths are empty, disable everything. if (!$cfg->nZEDb_SSL_CAPATH && !$cfg->nZEDb_SSL_CAFILE) { $cfg->nZEDb_SSL_VERIFY_PEER = $cfg->nZEDb_SSL_VERIFY_HOST = false; $cfg->nZEDb_SSL_ALLOW_SELF_SIGNED = true; $cfg->nZEDb_SSL_CAFILE = $cfg->nZEDb_SSL_CAPATH = ''; }
$Page->setTemplateVar('tagline', __('Version %s', array(kVERSION))); global $languages; $Page->setTemplateVar('languages', $languages); } function failure(&$Page, &$Contents) { $Contents->appendChild(new XMLElement('h2', __('Installation Failure'))); $Contents->appendChild(new XMLElement('p', __('An error occurred during installation. You can view you log <a href="install-log.txt">here</a> for more details.'))); $Page->setTemplateVar('title', __('Installation Failure')); $Page->setTemplateVar('tagline', __('Version %s', array(kVERSION))); global $languages; $Page->setTemplateVar('languages', $languages); } } $Log = new SymphonyLog('install-log.txt'); $Page = new InstallPage($Log); $Page->setHeader(kHEADER); $Page->setFooter(kFOOTER); $Contents = new XMLElement('body'); $Contents->appendChild(new XMLElement('h1', '<!-- TITLE --> <em><!-- TAGLINE --></em>')); $Contents->appendChild(new XMLElement('ul', '<!-- LANGUAGES --><li class="more"><a href="http://symphony-cms.com/download/extensions/translations/">' . __('Symphony is also available in other languages') . '</a></li>')); if (defined('__IS_UPDATE__') && __IS_UPDATE__ == true) { $Page->setPage('update'); } elseif (defined('__ALREADY_UP_TO_DATE__') && __ALREADY_UP_TO_DATE__ == true) { $Page->setPage('uptodate'); } else { $Page->setPage('index'); Action::requirements($Page); } if (is_array($Page->missing) && !empty($Page->missing)) { $Page->setPage('requirements');