本文整理汇总了PHP中erLhAbstractModelWidgetTheme类的典型用法代码示例。如果您正苦于以下问题:PHP erLhAbstractModelWidgetTheme类的具体用法?PHP erLhAbstractModelWidgetTheme怎么用?PHP erLhAbstractModelWidgetTheme使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了erLhAbstractModelWidgetTheme类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: removeInstanceData
public function removeInstanceData()
{
foreach (erLhAbstractModelFormCollected::getList(array('limit' => 1000000)) as $item) {
$item->removeThis();
}
foreach (erLhAbstractModelWidgetTheme::getList(array('limit' => 1000000)) as $item) {
$item->removeThis();
}
foreach (erLhcoreClassChat::getList(array('limit' => 1000000)) as $item) {
$item->removeThis();
}
foreach (erLhcoreClassChat::getList(array('limit' => 1000000), 'erLhcoreClassModelChatFile', 'lh_chat_file') as $item) {
$item->removeThis();
}
foreach (erLhcoreClassModelUser::getUserList(array('limit' => 1000000)) as $item) {
$item->removeFile();
}
// Dispatch event for extensions
erLhcoreClassChatEventDispatcher::getInstance()->dispatch('instance.destroyed', array('instance' => $this));
return true;
}
示例2: foreach
<option value="http:">http:</option>
<option value="https:">https:</option>
</select>
</div>
<div class="columns large-6 end">
<label><?php
echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/htmlcode', 'Theme');
?>
</label>
<select id="ThemeID">
<option value="0"><?php
echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/htmlcode', 'Default');
?>
</option>
<?php
foreach (erLhAbstractModelWidgetTheme::getList(array('limit' => 1000)) as $theme) {
?>
<option value="<?php
echo $theme->id;
?>
"><?php
echo htmlspecialchars($theme->name);
?>
</option>
<?php
}
?>
</select>
</div>
</div>
<label><input type="checkbox" id="DisableMiminize" value="on"><?php
示例3: array
$tpl = erLhcoreClassTemplate::getInstance('lhtheme/import.tpl.php');
if (ezcInputForm::hasPostData()) {
if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token'])) {
erLhcoreClassModule::redirect('theme/import');
exit;
}
if (erLhcoreClassSearchHandler::isFile('themefile', array('json'))) {
$dir = 'var/tmpfiles/';
erLhcoreClassChatEventDispatcher::getInstance()->dispatch('theme.temppath', array('dir' => &$dir));
erLhcoreClassFileUpload::mkdirRecursive($dir);
$filename = erLhcoreClassSearchHandler::moveUploadedFile('themefile', $dir);
$content = file_get_contents($dir . $filename);
unlink($dir . $filename);
$data = json_decode($content);
if ($data !== null) {
$widgetTheme = new erLhAbstractModelWidgetTheme();
$data = (array) $data;
$imgData = array();
if (isset($data['logo_image_data'])) {
$imgData['logo_image'] = $data['logo_image_data'];
unset($data['logo_image_data']);
}
if (isset($data['need_help_image_data'])) {
$imgData['need_help_image'] = $data['need_help_image_data'];
unset($data['need_help_image_data']);
}
if (isset($data['online_image_data'])) {
$imgData['online_image'] = $data['online_image_data'];
unset($data['online_image_data']);
}
if (isset($data['offline_image_data'])) {
示例4: header
<?php
// For IE to support headers if chat is installed on different domain
header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');
$tpl = erLhcoreClassTemplate::getInstance('lhsurvey/fillwidget.tpl.php');
$embedMode = false;
if ((string) $Params['user_parameters_unordered']['mode'] == 'embed') {
$embedMode = true;
}
if (isset($Params['user_parameters_unordered']['theme']) && (int) $Params['user_parameters_unordered']['theme'] > 0) {
try {
$theme = erLhAbstractModelWidgetTheme::fetch($Params['user_parameters_unordered']['theme']);
$Result['theme'] = $theme;
$tpl->set('theme', $theme);
} catch (Exception $e) {
}
}
try {
if (is_numeric((string) $Params['user_parameters_unordered']['chatid']) && $Params['user_parameters_unordered']['chatid'] > 0) {
if ((string) $Params['user_parameters_unordered']['hash'] != '') {
$hash = $Params['user_parameters_unordered']['hash'];
}
if (is_numeric($Params['user_parameters_unordered']['chatid'])) {
$chat = erLhcoreClassModelChat::fetch($Params['user_parameters_unordered']['chatid']);
}
} else {
if ((string) $Params['user_parameters_unordered']['hash'] != '') {
list($chatID, $hash) = explode('_', $Params['user_parameters_unordered']['hash']);
$chat = erLhcoreClassModelChat::fetch($chatID);
}
}
示例5: erLhcoreClassModelChat
}
$tpl->set('playsound', (string) $Params['user_parameters_unordered']['playsound'] == 'true' && !isset($_POST['askQuestion']) && erLhcoreClassModelChatConfig::fetch('sound_invitation')->current_value == 1);
$chat = new erLhcoreClassModelChat();
$modeAppendTheme = '';
if (isset($Params['user_parameters_unordered']['theme']) && (int) $Params['user_parameters_unordered']['theme'] > 0) {
try {
$theme = erLhAbstractModelWidgetTheme::fetch($Params['user_parameters_unordered']['theme']);
$Result['theme'] = $theme;
$modeAppendTheme = '/(theme)/' . $theme->id;
} catch (Exception $e) {
}
} else {
$defaultTheme = erLhcoreClassModelChatConfig::fetch('default_theme_id')->current_value;
if ($defaultTheme > 0) {
try {
$theme = erLhAbstractModelWidgetTheme::fetch($defaultTheme);
$Result['theme'] = $theme;
$modeAppendTheme = '/(theme)/' . $theme->id;
} catch (Exception $e) {
}
}
}
if (isset($_POST['askQuestion'])) {
$validationFields = array();
$validationFields['Question'] = new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw');
$validationFields['DepartamentID'] = new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'int', array('min_range' => 1));
$validationFields['DepartmentIDDefined'] = new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'int', array('min_range' => 1), FILTER_REQUIRE_ARRAY);
$validationFields['operator'] = new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'int', array('min_range' => 1));
$validationFields['Email'] = new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'validate_email');
$validationFields['Username'] = new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw');
$validationFields['Phone'] = new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string');
示例6: explode
<?php
$theme = erLhAbstractModelWidgetTheme::fetch((int) $Params['user_parameters']['theme']);
$exportData = $theme->getState();
unset($exportData['id']);
unset($exportData['online_image']);
unset($exportData['online_image_path']);
unset($exportData['offline_image']);
unset($exportData['offline_image_path']);
unset($exportData['logo_image']);
unset($exportData['logo_image_path']);
unset($exportData['need_help_image_path']);
unset($exportData['need_help_image']);
unset($exportData['copyright_image_path']);
unset($exportData['operator_image_path']);
unset($exportData['copyright_image']);
unset($exportData['operator_image']);
unset($exportData['minimize_image']);
unset($exportData['restore_image']);
unset($exportData['close_image']);
unset($exportData['popup_image']);
unset($exportData['minimize_image_path']);
unset($exportData['restore_image_path']);
unset($exportData['close_image_path']);
unset($exportData['popup_image_path']);
if ($theme->logo_image_url != '') {
$exportData['logo_image_data'] = base64_encode($theme->getContentAttribute('logo_image'));
$parts = explode('.', $theme->logo_image);
$exportData['logo_image_data_ext'] = array_pop($parts);
}
if ($theme->copyright_image_url != '') {
示例7: catch
$referer = $_GET['URLReferer'];
$tpl->set('referer', $referer);
}
if (isset($_POST['URLRefer'])) {
$referer = $_POST['URLRefer'];
$tpl->set('referer', $_POST['URLRefer']);
}
$embedMode = false;
$modeAppend = '';
if ((string) $Params['user_parameters_unordered']['mode'] == 'embed') {
$embedMode = true;
$modeAppend = '/(mode)/embed';
}
if ($themeID > 0) {
try {
$theme = erLhAbstractModelWidgetTheme::fetch($themeID);
$Result['theme'] = $theme;
$modeAppend .= '/(theme)/' . $theme->id;
} catch (Exception $e) {
}
}
$tpl->set('append_mode', $modeAppend);
$Result['content'] = $tpl->fetch();
$Result['pagelayout'] = 'widget';
$Result['pagelayout_css_append'] = 'widget-chat';
$Result['dynamic_height'] = true;
$Result['dynamic_height_message'] = 'lhc_sizing_chatbox';
$Result['additional_post_message'] = 'lhc_chb:nick:' . htmlspecialchars($visitorName, ENT_QUOTES);
$Result['is_sync_required'] = true;
if ($embedMode == true) {
$Result['dynamic_height_message'] = 'lhc_sizing_chatbox_page';