芝麻web文件管理V1.00
编辑当前文件:/home/lekhnath/hoteldaybreak/ncsitebuilder/index.php
'a188dd9c20cb001baa72d7b68c95a453', 'alias' => '', 'file' => 'a188dd9c20cb001baa72d7b68c95a453.php', 'controllers' => array(), 'type' => 0 ), array( 'id' => 'a188dd9c20cb016d4b4ff6532ea0d63a', 'alias' => 'About-us', 'file' => 'a188dd9c20cb016d4b4ff6532ea0d63a.php', 'controllers' => array(), 'type' => 0 ), array( 'id' => 'a188dd9c20cb04473cfbaf247976dd49', 'alias' => 'Rooms', 'file' => 'a188dd9c20cb04473cfbaf247976dd49.php', 'controllers' => array(), 'type' => 0 ), array( 'id' => 'a188dd9c20cb03098c3b8592ada72d08', 'alias' => 'Restaurant', 'file' => 'a188dd9c20cb03098c3b8592ada72d08.php', 'controllers' => array(), 'type' => 0 ), array( 'id' => 'a188dd9c20cb02058514b5ed2be098c4', 'alias' => 'Contacts', 'file' => 'a188dd9c20cb02058514b5ed2be098c4.php', 'controllers' => array(), 'type' => 0 ) ); $forms = array( 'a188dd9c20cb02058514b5ed2be098c4' => array( '3f9957ab' => array( 'email' => '', 'emailFrom' => '', 'subject' => 'Enquire from the web page', 'sentMessage' => 'Form was sent.', 'object' => '', 'objectRenderer' => '', 'loggingHandler' => '', 'smtpEnable' => false, 'smtpHost' => null, 'smtpPort' => null, 'smtpEncryption' => null, 'smtpUsername' => null, 'smtpPassword' => null, 'recVersion' => 'v2', 'recSiteKey' => null, 'recSecretKey' => null, 'useGclidCapture' => false, 'maxFileSizeTotal' => 2, 'postUrl' => null, 'redirectUrl' => null, 'webhookUrl' => null, 'brandId' => '87101', 'fields' => array( array( 'fidx' => '0', 'name' => 'Name', 'default' => '', 'type' => 'input', 'enabled' => 1, 'required' => 1, 'settings' => array( 'lengthMin' => 0, 'lengthMax' => 255 ) ), array( 'fidx' => '1', 'name' => 'E-mail', 'default' => '', 'type' => 'input', 'enabled' => 1, 'required' => 1, 'settings' => array( 'lengthMin' => 0, 'lengthMax' => 255 ) ), array( 'fidx' => '2', 'name' => 'Country', 'default' => '', 'type' => 'input', 'enabled' => 1, 'required' => 1, 'settings' => array( 'lengthMin' => 0, 'lengthMax' => 255 ) ), array( 'fidx' => '3', 'name' => 'Address', 'default' => '', 'type' => 'input', 'enabled' => 1, 'required' => 1, 'settings' => array( 'lengthMin' => 0, 'lengthMax' => 255 ) ), array( 'fidx' => '4', 'name' => 'Your Field', 'default' => '', 'type' => 'input', 'enabled' => 1, 'required' => 1, 'settings' => array( 'lengthMin' => 0, 'lengthMax' => 255 ) ), array( 'fidx' => '5', 'name' => 'Your Field', 'default' => '', 'type' => 'input', 'enabled' => 1, 'required' => 1, 'settings' => array( 'lengthMin' => 0, 'lengthMax' => 255 ) ), array( 'fidx' => '6', 'name' => 'How did you find us?', 'default' => '', 'type' => 'select', 'enabled' => 1, 'required' => 1, 'settings' => array( 'options' => array( 'Found on Google', ' Followed link from other website', ' Friend told me' ) ) ), array( 'fidx' => '7', 'name' => 'Message', 'default' => '', 'type' => 'textarea', 'enabled' => 1, 'required' => 1, 'settings' => array( 'textareaRow' => 4 ) ), array( 'fidx' => '8', 'name' => 'I want to receive newsletters', 'default' => '', 'type' => 'checkbox', 'enabled' => 1, 'required' => 0, 'settings' => array( 'options' => array( '' ), 'layout' => 'vertical' ) ), array( 'fidx' => '9', 'name' => 'I agree to the Terms and Conditions', 'default' => '', 'type' => 'checkbox', 'enabled' => 1, 'required' => 1, 'settings' => array( 'options' => array( '' ), 'layout' => 'vertical' ) ) ) ) ) ); $langs = null; $def_lang = null; $base_lang = 'en'; $site_id = 'f4e013ed'; ${'sitemapUrls'} = array( "https://hoteldaybreak.com/", "https://hoteldaybreak.com/About-us/", "https://hoteldaybreak.com/Rooms/", "https://hoteldaybreak.com/Restaurant/", "https://hoteldaybreak.com/Contacts/" ); $websiteUID = '4c311b962173ad7518a5f4f6ef6ea7be59c3a71b133a498f58e9498a3a0475165dced260bf754cb0'; $base_dir = dirname(__FILE__); $base_url = '/'; $user_domain = 'hoteldaybreak.com'; $pretty_domain = 'hoteldaybreak.com'; $home_page = 'a188dd9c20cb001baa72d7b68c95a453'; $mod_rewrite = true; $show_comments = false; $ga_code = (is_file($ga_code_file = dirname(__FILE__).'/ga_code') ? file_get_contents($ga_code_file) : null); require_once dirname(__FILE__).'/src/forms/FormNavigation.php'; require_once dirname(__FILE__).'/src/forms/FormModuleInquiries.php'; require_once dirname(__FILE__).'/src/forms/FormModuleInquiriesField.php'; require_once dirname(__FILE__).'/src/forms/FormModule.php'; require_once dirname(__FILE__).'/src/forms/FormInquiriesApi.php'; require_once dirname(__FILE__).'/src/SiteInfo.php'; require_once dirname(__FILE__).'/src/SiteModule.php'; require_once dirname(__FILE__).'/functions.inc.php'; $siteInfo = SiteInfo::build(array('siteId' => $site_id, 'websiteUID' => $websiteUID, 'domain' => $user_domain, 'prettyDomain' => $pretty_domain, 'homePageId' => $home_page, 'baseDir' => $base_dir, 'baseUrl' => $base_url, 'defLang' => $def_lang, 'baseLang' => $base_lang, 'langs' => $langs, 'pages' => $pages, 'forms' => $forms, 'modRewrite' => $mod_rewrite, 'gaCode' => $ga_code, 'gaAnonymizeIp' => false, 'port' => null, 'pathPrefix' => null, 'useTrailingSlashes' => true, 'disableFormSending' => false,)); $requestInfo = SiteRequestInfo::build(array('requestUri' => getRequestUri($siteInfo->baseUrl),)); FormModule::init(array(), $siteInfo); SiteModule::init(null, $siteInfo); list($page_id, $lang, $urlArgs, $route) = parse_uri($siteInfo, $requestInfo); $page404 = $pageMaint = null; foreach ($pages as $k => $p) { if ($p['type'] === 2) $page404 = $p; if ($p['type'] === 3) $pageMaint = $p; } $preview = false; $requestInfo->{'page'} = (isset($pages[$page_id]) ? $pages[$page_id] : null); $requestInfo->{'lang'} = $lang; $requestInfo->{'urlArgs'} = $urlArgs; $requestInfo->{'route'} = $route; handleTrailingSlashRedirect($siteInfo, $requestInfo); SiteModule::setLang($requestInfo->{'lang'}); SiteModule::initTranslations(array( '-' => array( 'Form sending failed' => 'Form sending failed', 'Form was not sent, are you a robot?' => 'Form was not sent, are you a robot?', 'File %s is too big' => 'File %s is too big', 'File %s could not be uploaded for sending' => 'File %s could not be uploaded for sending', 'Total size of attachments must not exceed %s MB' => 'Total size of attachments must not exceed %s MB', 'Field %s is not present' => 'Field %s is not present', 'Failed to create a directory for attachments' => 'Failed to create a directory for attachments', 'Attachments inode on the server is not a directory' => 'Attachments inode on the server is not a directory', 'Failed to move uploaded file to attachments directory' => 'Failed to move uploaded file to attachments directory', 'Receiver not specified' => 'Receiver not specified', 'Form sending from preview is not available' => 'Form sending from preview is not available', 'Max file size (Mb): %s' => 'Max file size (Mb): %s', 'Max number of files: 1' => 'Max number of files: 1', 'You exceed number of files' => 'You exceeded number of files', 'I\'m not a robot' => 'I\'m not a robot', 'Captcha is not available in preview' => 'Captcha is not available in preview', 'Submit' => 'Submit' ) )); if (!isHttps() && !headers_sent()) { header('Status: 301 Moved Permanently'); header('Location: '.getCurrUrl(false, 'https')); exit(); } $requestHandledByModule = false; $hr_out = ''; if (is_callable('FormModule::parseRequest')) { list($m_out, $requestHandled) = call_user_func('FormModule::parseRequest', $requestInfo); $hr_out .= $m_out; $requestHandledByModule = $requestHandledByModule || $requestHandled; } $page = $requestInfo->{'page'}; if (!$requestHandledByModule && !empty($urlArgs)) $page = null; if (!$page) { if ($page404) $page = $page404; elseif ($pageMaint) $page = $pageMaint; } elseif ($pageMaint) $page = $pageMaint; if (!is_null($page)) { handleComments($page['id'], $siteInfo); if (isset($_POST["wb_form_id"])) handleForms($page['id'], $siteInfo); } ob_start(); if ($page) { $fl = dirname(__FILE__).'/'.$page['file']; if (is_file($fl)) { ${'seoTitle'} = $requestInfo->{'title'}; ${'seoDescription'} = $requestInfo->{'description'}; ${'seoKeywords'} = $requestInfo->{'keywords'}; ${'seoImage'} = $requestInfo->{'image'}; if (isset($_GET['wbPopupMode']) && $_GET['wbPopupMode'] == 1) { $wbPopupMode = true; } ob_start(); include $fl; $out = ob_get_clean(); $ga_out = ''; if ($lang && $langs) { foreach ($langs as $ln => $default) { $pageUri = getPageUri($page['id'], $ln, $siteInfo); $out = str_replace('{{lang_'.$ln.'}}', $pageUri, $out); $out = str_replace(urlencode('{{lang_'.$ln.'}}'), $pageUri, $out); } } if (is_file($ga_tpl = dirname(__FILE__).'/ga.php')) { ob_start(); include $ga_tpl; $ga_out = ob_get_clean(); } $currUrl = getCurrUrl(); $out = str_replace('
', $ga_out, $out); $out = str_replace('{{base_url}}', getBaseUrl(), $out); $out = str_replace('{{curr_url}}', $currUrl, $out); $out = str_replace('__wb_curr_url__', strpos($currUrl, '?') ? rtrim($currUrl, '/') : $currUrl, $out); $out = str_replace('{{hr_out}}', $hr_out, $out); header('Content-type: text/html; charset=utf-8', true, $page['type'] === 2 ? 404 : ($page['type'] === 3 ? 503 : 0) ); echo $out; } } else { header("Content-type: text/html; charset=utf-8", true, 404); if (is_file(dirname(__FILE__).'/../../error_docs/not_found.html')) { include dirname(__FILE__).'/../../error_docs/not_found.html'; } else if (is_file(dirname(__FILE__).'/404.html')) { include dirname(__FILE__).'/404.html'; } else { echo "\n"; echo "\n"; echo "\n"; echo "
404 Not found
\n"; echo "\n"; echo "\n"; echo "404 Not found\n"; echo "\n"; echo ""; } } ob_end_flush(); ?>