当前位置: 首页>>代码示例>>PHP>>正文


PHP erLhcoreClassDesign::baseurldirect方法代码示例

本文整理汇总了PHP中erLhcoreClassDesign::baseurldirect方法的典型用法代码示例。如果您正苦于以下问题:PHP erLhcoreClassDesign::baseurldirect方法的具体用法?PHP erLhcoreClassDesign::baseurldirect怎么用?PHP erLhcoreClassDesign::baseurldirect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在erLhcoreClassDesign的用法示例。


在下文中一共展示了erLhcoreClassDesign::baseurldirect方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getFormattedContent

 public function getFormattedContent()
 {
     $dataCollected = array();
     foreach ($this->content_array as $nameAttr => $contentArray) {
         if (isset($contentArray['definition']['type']) && $contentArray['definition']['type'] == 'file') {
             $dataCollected[] = $contentArray['definition']['name_literal'] . " - " . erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurldirect('user/login') . '/(r)/' . rawurlencode(base64_encode('form/download/' . $this->id . '/' . $nameAttr));
         } elseif (isset($contentArray['definition']['type']) && $contentArray['definition']['type'] == 'checkbox') {
             $dataCollected[] = $contentArray['definition']['name_literal'] . " - " . ($contentArray['value'] == 1 ? 'Y' : 'N');
         } else {
             $dataCollected[] = $contentArray['definition']['name_literal'] . " - " . $contentArray['value'];
         }
     }
     return implode("\n", $dataCollected);
 }
开发者ID:sirromas,项目名称:medical,代码行数:14,代码来源:erlhabstractmodelformcollected.php

示例2: generateEmbedCode

    var id_position =  '/(position)/'+$('#PositionID').val();
	var textStatus = $('#id_status_text').val();
	var top = '/(top)/'+($('#id_top_text').val() == '' ? 300 : $('#id_top_text').val());
	var topposition = '/(units)/'+$('#UnitsTop').val();
	var widthwidget = '/(width)/'+($('#id_width_text').val() == '' ? 300 : $('#id_width_text').val());
	var heightwidget = '/(height)/'+($('#id_height_text').val() == '' ? 300 : $('#id_height_text').val());
	var chat_height = '/(chat_height)/'+($('#id_chat_height').val() == '' ? 220 : $('#id_chat_height').val());	
	var show_content = ($('#ShowContent').is(':checked') ? '/(sc)/true' : '');
	var show_min = ($('#ShowContentMinimized').is(':checked')? '/(scm)/true' : '');
	var dis_min = ($('#DisableMiminize').is(':checked')? '/(dmn)/true' : '');
	var id_disable_responsive = $('#id_disable_responsive').is(':checked') ? '/(noresponse)/true' : '';
	var id_theme = $('#ThemeID').val() > 0 ? '/(theme)/'+$('#ThemeID').val() : '';
	
    var script = '<script type="text/javascript">'+"\nvar LHCChatboxOptions = {hashchatbox:'empty',identifier:'default',status_text:'"+textStatus+"'};\n"+
      '(function() {'+"\n"+
        'var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;'+"\n"+
        'po.src = \''+$('#HttpMode').val()+'//<?php 
echo $_SERVER['HTTP_HOST'];
echo erLhcoreClassDesign::baseurldirect();
?>
'+siteAccess+'chatbox/getstatus'+id_position+top+id_disable_responsive+topposition+widthwidget+id_theme+heightwidget+chat_height+show_content+show_min+dis_min+"';\n"+
        'var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);'+"\n"+
      '})();'+"\n"+
    '</scr'+'ipt>';
    $('#HMLTContent').text(script);
};
$('#LocaleID,#PositionID,#HttpMode,#id_status_text,#UnitsTop,#id_top_text,#id_width_text,#id_height_text,#ThemeID,#id_disable_responsive,#id_chat_height,#ShowContent,#ShowContentMinimized,#DisableMiminize').change(function(){
    generateEmbedCode();
});
generateEmbedCode();
</script>
开发者ID:sudogitguy,项目名称:livehelperchat,代码行数:31,代码来源:htmlcode.tpl.php

示例3: header

<?php

$currentUser = erLhcoreClassUser::instance();
$instance = erLhcoreClassSystem::instance();
if ($instance->SiteAccess != 'site_admin') {
    if ($currentUser->isLogged() && !empty($Params['user_parameters_unordered']['r'])) {
        header('Location: ' . erLhcoreClassDesign::baseurldirect('site_admin') . '/' . base64_decode(rawurldecode($Params['user_parameters_unordered']['r'])));
        exit;
    }
    $redirect = rawurldecode($Params['user_parameters_unordered']['r']);
    $redirectFull = $redirect != '' ? '/(r)/' . rawurlencode($redirect) : '';
    header('Location: ' . erLhcoreClassDesign::baseurldirect('site_admin/user/login') . $redirectFull);
    exit;
}
$tpl = erLhcoreClassTemplate::getInstance('lhuser/login.tpl.php');
$redirect = '';
if (isset($_POST['redirect'])) {
    $redirect = $_POST['redirect'];
    $tpl->set('redirect_url', $redirect);
} else {
    $redirect = rawurldecode($Params['user_parameters_unordered']['r']);
    $tpl->set('redirect_url', $redirect);
}
if (isset($_POST['Login'])) {
    if (!$currentUser->authenticate($_POST['Username'], $_POST['Password'], isset($_POST['rememberMe']) && $_POST['rememberMe'] == 1 ? true : false)) {
        $Error = erTranslationClassLhTranslation::getInstance()->getTranslation('user/login', 'Incorrect username or password');
        $tpl->set('errors', array($Error));
    } else {
        if ($redirect != '') {
            erLhcoreClassModule::redirect(base64_decode($redirect));
        } else {
开发者ID:sudogitguy,项目名称:livehelperchat,代码行数:31,代码来源:login.php

示例4: informFormFilled

 public static function informFormFilled($formCollected, $params = array())
 {
     $sendMail = erLhAbstractModelEmailTemplate::fetch(8);
     $mail = new PHPMailer();
     $mail->CharSet = "UTF-8";
     if ($sendMail->from_email != '') {
         $mail->From = $mail->Sender = $sendMail->from_email;
     }
     if (isset($params['email']) && $params['email'] !== false && $params['email'] != '') {
         $mail->AddReplyTo($params['email']);
     }
     $mail->FromName = $sendMail->from_name;
     $mail->Subject = str_replace(array('{form_name}'), array($formCollected->form), $sendMail->subject);
     $mail->Body = str_replace(array('{identifier}', '{form_name}', '{content}', '{ip}', '{url_download}', '{url_view}'), array($formCollected->identifier, (string) $formCollected->form, $formCollected->form_content, $formCollected->ip, erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurldirect('user/login') . '/(r)/' . rawurlencode(base64_encode('form/downloaditem/' . $formCollected->id)), erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurldirect('user/login') . '/(r)/' . rawurlencode(base64_encode('form/viewcollected/' . $formCollected->id))), $sendMail->content);
     $emailRecipient = array();
     if ($formCollected->form->recipient != '') {
         $emailRecipient = array($formCollected->form->recipient);
     } elseif ($sendMail->recipient != '') {
         $emailRecipient = array($sendMail->recipient);
     }
     if (!empty($emailRecipient)) {
         foreach ($emailRecipient as $receiver) {
             $mail->AddAddress($receiver);
         }
         self::setupSMTP($mail);
         if ($sendMail->bcc_recipients != '') {
             $recipientsBCC = explode(',', $sendMail->bcc_recipients);
             foreach ($recipientsBCC as $recipientBCC) {
                 $mail->AddBCC(trim($recipientBCC));
             }
         }
         $mail->Send();
         $mail->ClearAddresses();
     }
 }
开发者ID:sirromas,项目名称:medical,代码行数:35,代码来源:lhchatmail.php

示例5: fetch

 /**
  * Open, parse, and return the template file.
  *
  * @param $file string the template file name
  */
 function fetch($fileTemplate = null)
 {
     $instance = erLhcoreClassSystem::instance();
     $port = isset($_SERVER['SERVER_PORT']) ? $_SERVER['SERVER_PORT'] : 80;
     if (!$fileTemplate) {
         $fileTemplate = $this->file;
     }
     if ($this->cacheEnabled == true && key_exists(md5($fileTemplate . $instance->WWWDirLang . $instance->Language . $port), $this->cacheTemplates)) {
         try {
             return $this->fetchExecute($this->cacheTemplates[md5($fileTemplate . $instance->WWWDirLang . $instance->Language . $port)]);
         } catch (Exception $e) {
         }
     }
     $cfg = erConfigClassLhConfig::getInstance();
     $file = erLhcoreClassDesign::designtpl($fileTemplate);
     if ($this->templatecompile == true) {
         $contentFile = php_strip_whitespace($file);
         // Compile templates - 3 level of inclusions
         for ($i = 0; $i < 9; $i++) {
             $Matches = array();
             preg_match_all('/<\\?php(\\s*)include_once\\(erLhcoreClassDesign::designtpl\\(\'([a-zA-Z0-9-\\.-\\/\\_]+)\'\\)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
             foreach ($Matches[2] as $key => $Match) {
                 $contentFile = str_replace($Matches[0][$key], php_strip_whitespace(erLhcoreClassDesign::designtpl($Match)), $contentFile);
             }
             //Compile templates inclusions first level.
             $Matches = array();
             preg_match_all('/<\\?php(\\s*)include\\(erLhcoreClassDesign::designtpl\\(\'([a-zA-Z0-9-\\.-\\/\\_]+)\'\\)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
             foreach ($Matches[2] as $key => $Match) {
                 $contentFile = str_replace($Matches[0][$key], php_strip_whitespace(erLhcoreClassDesign::designtpl($Match)), $contentFile);
             }
         }
         //Compile image css paths. Etc..
         $Matches = array();
         preg_match_all('/<\\?php echo erLhcoreClassDesign::design\\(\'([a-zA-Z0-9-\\.-\\/\\_]+)\'\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $Match) {
             $contentFile = str_replace($Matches[0][$key], erLhcoreClassDesign::design($Match), $contentFile);
         }
         //Compile translations, pure translations
         $Matches = array();
         preg_match_all('/<\\?php echo erTranslationClassLhTranslation::getInstance\\(\\)->getTranslation\\(\'(.*?)\',\'(.*?)\'\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $TranslateContent) {
             $contentFile = str_replace($Matches[0][$key], erTranslationClassLhTranslation::getInstance()->getTranslation($TranslateContent, $Matches[2][$key]), $contentFile);
         }
         //Translations used in logical conditions
         $Matches = array();
         preg_match_all('/erTranslationClassLhTranslation::getInstance\\(\\)->getTranslation\\(\'(.*?)\',\'(.*?)\'\\)/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $TranslateContent) {
             $contentFile = str_replace($Matches[0][$key], '\'' . erTranslationClassLhTranslation::getInstance()->getTranslation($TranslateContent, $Matches[2][$key]) . '\'', $contentFile);
         }
         // Compile url addresses
         $Matches = array();
         preg_match_all('/<\\?php echo erLhcoreClassDesign::baseurl\\((.*?)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], erLhcoreClassDesign::baseurl(trim($UrlAddress, '\'')), $contentFile);
         }
         // Compile url direct addresses
         $Matches = array();
         preg_match_all('/<\\?php echo erLhcoreClassDesign::baseurldirect\\((.*?)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], erLhcoreClassDesign::baseurldirect(trim($UrlAddress, '\'')), $contentFile);
         }
         // Compile url direct addresses
         $Matches = array();
         preg_match_all('/<\\?php echo erLhcoreClassDesign::baseurlsite\\(\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], erLhcoreClassDesign::baseurlsite(), $contentFile);
         }
         // Compile css url addresses
         $Matches = array();
         preg_match_all('/<\\?php echo erLhcoreClassDesign::designCSS\\((.*?)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], erLhcoreClassDesign::designCSS(trim($UrlAddress, '\'')), $contentFile);
         }
         // Compile css url addresses
         $Matches = array();
         preg_match_all('/<\\?php echo erLhcoreClassDesign::designJS\\((.*?)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], erLhcoreClassDesign::designJS(trim($UrlAddress, '\'')), $contentFile);
         }
         // Compile url addresses in logical operations
         $Matches = array();
         preg_match_all('/erLhcoreClassDesign::baseurl\\((.*?)\\)/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], '\'' . erLhcoreClassDesign::baseurl(trim($UrlAddress, '\'')) . '\'', $contentFile);
         }
         // Compile url addresses in logical operations
         $Matches = array();
         preg_match_all('/erLhcoreClassDesign::baseurldirect\\((.*?)\\)/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], '\'' . erLhcoreClassDesign::baseurldirect(trim($UrlAddress, '\'')) . '\'', $contentFile);
         }
         // Compile config settings, direct output
         $Matches = array();
         preg_match_all('/<\\?php echo erConfigClassLhConfig::getInstance\\(\\)->getSetting\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?),(\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
//.........这里部分代码省略.........
开发者ID:mdb-webdev,项目名称:livehelperchat,代码行数:101,代码来源:tpl.php

示例6: array

<?php

try {
    $cfgSite = erConfigClassLhConfig::getInstance();
    if ($cfgSite->getSetting('site', 'installed') == true) {
        $Params['module']['functions'] = array('install');
        include_once 'modules/lhkernel/nopermission.php';
        $Result['pagelayout'] = 'install';
        $Result['path'] = array(array('title' => 'Live helper chat installation'));
        return $Result;
        exit;
    }
    $instance = erLhcoreClassSystem::instance();
    if ($instance->SiteAccess != 'site_admin') {
        header('Location: ' . erLhcoreClassDesign::baseurldirect('site_admin/install/install'));
        exit;
    }
    $tpl = new erLhcoreClassTemplate('lhinstall/install1.tpl.php');
    switch ((int) $Params['user_parameters']['step_id']) {
        case '1':
            $Errors = array();
            if (!is_writable("cache/cacheconfig")) {
                $Errors[] = "cache/cacheconfig is not writable";
            }
            if (!is_writable("settings/")) {
                $Errors[] = "settings/ is not writable";
            }
            if (!is_writable("cache/translations")) {
                $Errors[] = "cache/translations is not writable";
            }
            if (!is_writable("cache/userinfo")) {
开发者ID:p4prawin,项目名称:livechat,代码行数:31,代码来源:install.php

示例7: foreach

foreach ($form->xls_columns_data as $data) {
    $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($i, 1, $data['name']);
    $i++;
}
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($i, 1, erTranslationClassLhTranslation::getInstance()->getTranslation('form/index', 'Date'));
$i++;
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($i, 1, 'IP');
$i++;
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($i, 1, erTranslationClassLhTranslation::getInstance()->getTranslation('form/index', 'Identifier'));
// Set data
$i = 2;
foreach ($items as $item) {
    $y = 0;
    foreach ($form->xls_columns_data as $data) {
        if (isset($item->content_array[$data['attr_name']]['definition']['type']) && $item->content_array[$data['attr_name']]['definition']['type'] == 'file') {
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($y, $i, erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurldirect('user/login') . '/(r)/' . rawurlencode(base64_encode('form/download/' . $item->id . '/' . $data['attr_name'])));
        } else {
            if (strpos($data['attr_name'], ',') === false) {
                $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($y, $i, $item->content_array[$data['attr_name']]['value']);
            } else {
                $nameParts = explode(',', $data['attr_name']);
                $valuesPart = array();
                foreach ($nameParts as $part) {
                    $valuesPart[] = isset($item->content_array[$part]['value']) ? $item->content_array[$part]['value'] : $part;
                }
                $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($y, $i, implode('', $valuesPart));
            }
        }
        $y++;
    }
    $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($y, $i, $item->ctime_full_front);
开发者ID:Adeelgill,项目名称:livehelperchat,代码行数:31,代码来源:downloadcollected.php

示例8: array

        }
        try {
            if (is_numeric($dataRequest['u'])) {
                $userToLogin = erLhcoreClassModelUser::fetch((int) $dataRequest['u']);
            } else {
                $users = erLhcoreClassModelUser::getUserList(array('limit' => 1, 'filter' => array('username' => $dataRequest['l'])));
                if (!empty($users)) {
                    $userToLogin = array_shift($users);
                } else {
                    die(erTranslationClassLhTranslation::getInstance()->getTranslation('users/autologin', 'Could not find a user'));
                }
            }
        } catch (Exception $e) {
            die($e->getMessage());
        }
        if ($userToLogin instanceof erLhcoreClassModelUser) {
            erLhcoreClassUser::instance()->setLoggedUser($userToLogin->id);
            header('Location: ' . erLhcoreClassDesign::baseurldirect('site_admin') . '/' . ltrim($dataRequest['r'], '/'));
            exit;
        } else {
            die(erTranslationClassLhTranslation::getInstance()->getTranslation('users/autologin', 'Could not find a provided user'));
        }
    } else {
        die(erTranslationClassLhTranslation::getInstance()->getTranslation('users/autologin', 'Invalid autologin hash'));
        exit;
    }
} else {
    die(erTranslationClassLhTranslation::getInstance()->getTranslation('users/autologin', 'Auto login module is not enabled'));
    exit;
}
exit;
开发者ID:Adeelgill,项目名称:livehelperchat,代码行数:31,代码来源:autologin.php

示例9: getModuleFile

 public static function getModuleFile($disableCacheManually = false)
 {
     $cfg = erConfigClassLhConfig::getInstance();
     $cacheEnabled = $cfg->getSetting('site', 'modulecompile');
     if ($cacheEnabled === false || $disableCacheManually === true) {
         return self::$currentModule[self::$currentView]['script_path'];
     } else {
         $instance = erLhcoreClassSystem::instance();
         $cacheKey = md5(self::$currentModuleName . '_' . self::$currentView . '_' . $instance->WWWDirLang . '_' . $instance->Language);
         if (($cacheModules = self::$cacheInstance->restore('moduleCache_' . self::$currentModuleName . '_version_' . self::$cacheVersionSite)) !== false && key_exists($cacheKey, $cacheModules)) {
             return $cacheModules[$cacheKey];
         }
         $cacheWriter = new erLhcoreClassCacheStorage('cache/cacheconfig/');
         if (($cacheModules = $cacheWriter->restore('moduleCache_' . self::$currentModuleName)) == false) {
             $cacheWriter->store('moduleCache_' . self::$currentModuleName, array());
             $cacheModules = array();
         }
         if (key_exists($cacheKey, $cacheModules)) {
             self::$cacheInstance->store('moduleCache_' . self::$currentModuleName . '_version_' . self::$cacheVersionSite, $cacheModules);
             return $cacheModules[$cacheKey];
         }
         $file = self::$currentModule[self::$currentView]['script_path'];
         $contentFile = php_strip_whitespace($file);
         $Matches = array();
         preg_match_all('/erTranslationClassLhTranslation::getInstance\\(\\)->getTranslation\\(\'(.*?)\',(.*?)\'(.*?)\'\\)/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $TranslateContent) {
             $contentFile = str_replace($Matches[0][$key], '\'' . erTranslationClassLhTranslation::getInstance()->getTranslation($TranslateContent, $Matches[3][$key]) . '\'', $contentFile);
         }
         $Matches = array();
         preg_match_all('/erLhcoreClassDesign::baseurl\\((.*?)\\)/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], '\'' . erLhcoreClassDesign::baseurl(trim($UrlAddress, '\'')) . '\'', $contentFile);
         }
         // Compile additional JS
         $Matches = array();
         preg_match_all('/erLhcoreClassDesign::designJS\\(\'(.*?)\'\\)/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], '\'' . erLhcoreClassDesign::designJS(trim($UrlAddress, '\'')) . '\'', $contentFile);
         }
         $Matches = array();
         preg_match_all('/erLhcoreClassDesign::baseurldirect\\((.*?)\\)/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], '\'' . erLhcoreClassDesign::baseurldirect(trim($UrlAddress, '\'')) . '\'', $contentFile);
         }
         $contentFile = str_replace('erLhcoreClassSystem::instance()->SiteAccess', '\'' . erLhcoreClassSystem::instance()->SiteAccess . '\'', $contentFile);
         $Matches = array();
         preg_match_all('/erConfigClassLhConfig::getInstance\\(\\)->getSetting\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?),(\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $valueConfig = erConfigClassLhConfig::getInstance()->getSetting($Matches[2][$key], $Matches[5][$key]);
             $valueReplace = '';
             if (is_bool($valueConfig)) {
                 $valueReplace = $valueConfig == false ? 'false' : 'true';
             } elseif (is_integer($valueConfig)) {
                 $valueReplace = $valueConfig;
             } elseif (is_array($valueConfig)) {
                 $valueReplace = var_export($valueConfig, true);
             } else {
                 $valueReplace = '\'' . $valueConfig . '\'';
             }
             $contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
         }
         if (self::$cacheDbVariables === true) {
             $fetchMethods = array('fetch', 'fetchCache');
             foreach ($fetchMethods as $fetchMethod) {
                 // Compile config settings
                 $Matches = array();
                 preg_match_all('/erLhcoreClassModelChatConfig::' . $fetchMethod . '\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)->current_value/i', $contentFile, $Matches);
                 foreach ($Matches[1] as $key => $UrlAddress) {
                     $valueConfig = erLhcoreClassModelChatConfig::fetch($Matches[2][$key])->current_value;
                     $valueReplace = '';
                     $valueReplace = '\'' . str_replace("'", "\\'", $valueConfig) . '\'';
                     $contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
                 }
                 // Compile config settings in php scripts
                 $Matches = array();
                 preg_match_all('/erLhcoreClassModelChatConfig::' . $fetchMethod . '\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)->data_value/i', $contentFile, $Matches);
                 foreach ($Matches[1] as $key => $UrlAddress) {
                     $valueConfig = erLhcoreClassModelChatConfig::fetch($Matches[2][$key])->data_value;
                     $valueReplace = var_export($valueConfig, true);
                     $contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
                 }
                 // Compile config settings array
                 $Matches = array();
                 preg_match_all('/erLhcoreClassModelChatConfig::' . $fetchMethod . '\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)->data\\[\'([a-zA-Z0-9-\\.-\\/\\_]+)\'\\]/i', $contentFile, $Matches);
                 foreach ($Matches[1] as $key => $UrlAddress) {
                     $valueConfig = erLhcoreClassModelChatConfig::fetch($Matches[2][$key])->data[$Matches[4][$key]];
                     $valueReplace = '';
                     $valueReplace = '\'' . str_replace("'", "\\'", $valueConfig) . '\'';
                     $contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
                 }
             }
         }
         $fileCompiled = 'cache/compiledtemplates/' . md5($file . $instance->WWWDirLang . '_' . $instance->Language) . '.php';
         // Atomoc template compilation to avoid concurent request compiling and writing to the same file
         $fileTemp = 'cache/cacheconfig/' . md5(time() . microtime() . rand(0, 1000) . $file . $instance->WWWDirLang . '_' . $instance->Language) . '.php';
         file_put_contents($fileTemp, $contentFile);
         // Atomic file write
         rename($fileTemp, $fileCompiled);
         $cacheModules[$cacheKey] = $fileCompiled;
         $cacheWriter->store('moduleCache_' . self::$currentModuleName, $cacheModules);
//.........这里部分代码省略.........
开发者ID:detain,项目名称:livehelperchat,代码行数:101,代码来源:lhmodule.php

示例10: array

                $users = erLhcoreClassModelUser::getUserList(array('limit' => 1, 'filter' => array('username' => $dataRequest['l'])));
                if (!empty($users)) {
                    $userToLogin = array_shift($users);
                } else {
                    die(erTranslationClassLhTranslation::getInstance()->getTranslation('users/autologin', 'Could not find a user'));
                }
            }
        } catch (Exception $e) {
            die($e->getMessage());
        }
        if ($userToLogin instanceof erLhcoreClassModelUser) {
            erLhcoreClassUser::instance()->setLoggedUser($userToLogin->id);
            $pg = '/' . ltrim($dataRequest['r'], '/') . $nomenu;
            if (strstr($pg, "dashboard")) {
                header('Location: ' . erLhcoreClassDesign::baseurldirect('site_admin') . (!empty($nomenu) ? $nomenu : ""));
            } else {
                header('Location: ' . erLhcoreClassDesign::baseurldirect('site_admin') . $pg);
            }
            exit;
        } else {
            die(erTranslationClassLhTranslation::getInstance()->getTranslation('users/autologin', 'Could not find a provided user'));
        }
    } else {
        die(erTranslationClassLhTranslation::getInstance()->getTranslation('users/autologin', 'Invalid autologin hash'));
        exit;
    }
} else {
    die(erTranslationClassLhTranslation::getInstance()->getTranslation('users/autologin', 'Auto login module is not enabled'));
    exit;
}
exit;
开发者ID:homeonline,项目名称:lhchat,代码行数:31,代码来源:autologin.php

示例11:

echo erTranslationClassLhTranslation::getInstance()->getTranslation('form/collected', 'Download XLS');
?>
</a></div>
	<div class="columns large-6">
	
		<div class="row collapse">        
	        <div class="small-2 columns">
	          <span class="prefix"><?php 
echo erTranslationClassLhTranslation::getInstance()->getTranslation('form/collected', 'URL');
?>
</span>
	        </div>
	        <div class="small-10 columns">
	          <input type="text" value="<?php 
echo erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'];
echo erLhcoreClassDesign::baseurldirect('form/fill');
?>
/<?php 
echo $form->id;
?>
">
	        </div>
	    </div>    	
	
	</div>
</div>

<table class="twelve" cellpadding="0" cellspacing="0">
<thead>
<tr>
    <th><?php 
开发者ID:nagyistoce,项目名称:livehelperchat,代码行数:31,代码来源:collected.tpl.php

示例12: configureObject

 public static function configureObject($instance)
 {
     $cfg = erConfigClassLhConfig::getInstance();
     switch ($instance) {
         case 'slave':
             if ($cfg->getSetting('db', 'use_slaves') === true) {
                 try {
                     $dbSlaves = $cfg->getSetting('db', 'db_slaves');
                     $slaveParams = $dbSlaves[rand(0, count($dbSlaves) - 1)];
                     $db = ezcDbFactory::create("mysql://{$slaveParams['user']}:{$slaveParams['password']}@{$slaveParams['host']}:{$slaveParams['port']}/{$slaveParams['database']}");
                     $db->query('SET NAMES utf8');
                 } catch (Exception $e) {
                     die('Cannot connect to database.');
                 }
                 return $db;
             } else {
                 // Perhaps connection is already done with master?
                 if (isset(self::$connectionMaster)) {
                     return self::$connectionMaster;
                 }
                 try {
                     $db = ezcDbFactory::create("mysql://{$cfg->getSetting('db', 'user')}:{$cfg->getSetting('db', 'password')}@{$cfg->getSetting('db', 'host')}:{$cfg->getSetting('db', 'port')}/{$cfg->getSetting('db', 'database')}");
                     $db->query('SET NAMES utf8');
                     self::$connectionMaster = $db;
                     return $db;
                 } catch (Exception $e) {
                     die('Cannot connect to database.....');
                 }
             }
             break;
         case 'dbmongo':
             try {
                 $cfg = erConfigClassLhConfig::getInstance();
                 $db = ezcDbFactory::create("mongodb://{$cfg->getSetting('dbmongo', 'user')}:{$cfg->getSetting('dbmongo', 'password')}@{$cfg->getSetting('dbmongo', 'host')}:{$cfg->getSetting('dbmongo', 'port')}/{$cfg->getSetting('dbmongo', 'database')}");
                 return $db;
             } catch (Exception $e) {
                 print_r($e);
                 die('Cannot connect to mongo database.');
             }
             break;
         case false:
             try {
                 if (isset(self::$connectionMaster)) {
                     return self::$connectionMaster;
                 }
                 // If we do not user slaves and slave request already got connection
                 $db = ezcDbFactory::create("mysql://{$cfg->getSetting('db', 'user')}:{$cfg->getSetting('db', 'password')}@{$cfg->getSetting('db', 'host')}:{$cfg->getSetting('db', 'port')}/{$cfg->getSetting('db', 'database')}");
                 $db->query('SET NAMES utf8');
                 self::$connectionMaster = $db;
                 erLhcoreClassInstance::setupInstance(self::$connectionMaster);
                 return $db;
             } catch (Exception $e) {
                 // Are we installed?
                 if ($cfg->getSetting('site', 'installed') == false) {
                     header('Location: ' . erLhcoreClassDesign::baseurldirect('site_admin/install/install'));
                     exit;
                 }
                 die('Cannot connect to database. If you are installing application please use /index.php/install/install url. If you keep getting this error please check that application can write to cache folder and cgi.fix_pathinfo = 1');
             }
         case 'sqlite':
             return ezcDbFactory::create('sqlite://:memory:');
     }
 }
开发者ID:alisadali,项目名称:automated-hosting,代码行数:63,代码来源:lhdb.php

示例13: _make_url_mail_file

 public static function _make_url_mail_file($matches)
 {
     if (isset($matches[1])) {
         list($fileID, $hash) = explode('_', $matches[1]);
         try {
             $file = erLhcoreClassModelChatFile::fetch($fileID);
             // Check that user has permission to see the chat. Let say if user purposely types file bbcode
             if ($hash == md5($file->name . '_' . $file->chat_id)) {
                 return erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurldirect('file/downloadfile') . "/{$file->id}/{$hash}";
             }
         } catch (Exception $e) {
         }
         return '';
     }
     return '';
 }
开发者ID:Topspot,项目名称:livehelperchat,代码行数:16,代码来源:lhbbcode.php

示例14:

}
?>
	</ul>	
	</div>	
	<div class="columns large-6">
		<div class="row collapse">        
	        <div class="small-2 columns">
	          <span class="prefix"><?php 
echo erTranslationClassLhTranslation::getInstance()->getTranslation('docshare/edit', 'URL');
?>
</span>
	        </div>
	        <div class="small-10 columns">
	          <input type="text" value="<?php 
echo erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'];
echo erLhcoreClassDesign::baseurldirect('docshare/view');
?>
/<?php 
echo $docshare->id;
?>
">
	        </div>
	    </div>
	</div>
</div>

<?php 
if (isset($errors)) {
    ?>
		<?php 
    include erLhcoreClassDesign::designtpl('lhkernel/validation_error.tpl.php');
开发者ID:sudogitguy,项目名称:livehelperchat,代码行数:31,代码来源:edit.tpl.php

示例15: htmlspecialchars

    <div class="col-xs-10"><h1><?php 
echo erTranslationClassLhTranslation::getInstance()->getTranslation('admintheme/form', 'Edit theme');
?>
 - <?php 
echo htmlspecialchars($form->name);
?>
</h1></div>
    <?php 
/*?><div class="col-xs-2">
      <a class="btn btn-default" href="?export=1"><i class="material-icons mr-0">file_download</i></a>
  </div>*/
?>
</div>

<form action="<?php 
echo erLhcoreClassDesign::baseurldirect('theme/adminthemeedit');
?>
/<?php 
echo $form->id;
?>
" method="post" autocomplete="off" enctype="multipart/form-data">

    <?php 
if (isset($updated)) {
    $msg = erTranslationClassLhTranslation::getInstance()->getTranslation('admintheme/form', 'Updated');
    ?>
			<?php 
    include erLhcoreClassDesign::designtpl('lhkernel/alert_success.tpl.php');
    ?>
	<?php 
}
开发者ID:detain,项目名称:livehelperchat,代码行数:31,代码来源:adminthemeedit.tpl.php


注:本文中的erLhcoreClassDesign::baseurldirect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。