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


PHP FSS_Settings类代码示例

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


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

示例1: displayUnRegistered

 function displayUnRegistered()
 {
     if (FSS_Settings::get('support_no_admin_for_user_open')) {
         JFactory::getApplication()->redirect("index.php?option=com_fss&view=admin_support");
     }
     $this->_display("unregistered");
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:7,代码来源:layout.new.php

示例2: __construct

 function __construct()
 {
     parent::__construct();
     $mainframe = JFactory::getApplication();
     global $option;
     $aparams = FSS_Settings::GetViewSettingsObj('kb');
     $this->_enable_prod_pages = $aparams->get('main_prod_pages', 0);
     if ($this->_enable_prod_pages == 1) {
         $limit = $mainframe->getUserStateFromRequest('global.list.limit_prod', 'limit', FSS_Settings::Get('kb_prod_per_page'), 'int');
         $limitstart = FSS_Input::getInt('limitstart');
         // In case limit has been changed, adjust it
         $limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0;
         $this->setState('limit_prod', $limit);
         $this->setState('limitstart', $limitstart);
     }
     $this->_enable_art_pages = $aparams->get('cat_art_pages', 0);
     if ($this->_enable_art_pages == 1) {
         $limit = $mainframe->getUserStateFromRequest('global.list.limit_art', 'limit', FSS_Settings::Get('kb_art_per_page'), 'int');
         $limitstart = FSS_Input::getInt('limitstart');
         // In case limit has been changed, adjust it
         $limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0;
         $this->setState('limit_art', $limit);
         $this->setState('limitstart', $limitstart);
     }
     //$aparams = new stdClass();
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:26,代码来源:kb.php

示例3: onContentPrepare

 public function onContentPrepare($context, &$row, &$params, $page = 0)
 {
     if (is_object($row)) {
         if (property_exists($row, "id")) {
             $context .= "." . $row->id;
         }
     } else {
         if (is_array($row)) {
             if (array_key_exists("id", $row)) {
                 $context .= "." . $row['id'];
             }
         }
     }
     FSS_Glossary::$context = $context;
     $ignore = FSS_Settings::Get('glossary_ignore');
     $option = FSS_Input::getCmd('option');
     if (trim($ignore) != "") {
         $ignore = explode("\n", $ignore);
         foreach ($ignore as $ign) {
             $ign = trim($ign);
             if ($ign == "") {
                 continue;
             }
             if (stripos($context, $ign) !== FALSE) {
                 return true;
             }
             if ($option) {
                 if (stripos($option, $ign) !== FALSE) {
                     return true;
                 }
             }
         }
     }
     // skip plugin on freestyle components
     if (strpos($context, "_fss") > 0) {
         return true;
     }
     // Don't run this plugin when the content is being indexed
     if (strpos($context, 'finder.indexer') > 0) {
         return true;
     }
     if (is_object($row)) {
         if (!empty($row->noglossary)) {
             // skip glossary plugin on fss content
             return true;
         }
         //$row->text .= "\n\n\n<div style='display:none;' id='fss_glossary_context'>$context</div>\n\n\n";
         return $this->_glossary($row->text, $params);
     } else {
         if (is_array($row)) {
             //$row['text'] .= "\n\n\n<div style='display:none;' id='fss_glossary_context'>$context</div>\n\n\n";
             return $this->_glossary($row['text'], $params);
         }
     }
     //$row .= "<div style='display:none;' id='fss_glossary_context'>$context</div>";
     return $this->_glossary($row, $params);
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:57,代码来源:fss_glossary.php

示例4: resend_password

 function resend_password()
 {
     $this->loadTicket();
     FSS_Settings::set('support_email_on_create', 1);
     FSS_EMail::User_Create_Unreg($this->ticket, $this->ticket->title, JText::_('RESENDING_TICKET_PASSWORD'));
     $link = FSSRoute::_("index.php?option=com_fss&view=admin_support&layout=ticket&ticketid=" . $this->ticket->id, false);
     JFactory::getApplication()->redirect($link, JText::_("PASSWORD_FOR_TICKET_HAS_BEEN_RESENT_TO_THE_USER"));
     return false;
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:9,代码来源:task.ticket.php

示例5: display

 function display($tpl = null)
 {
     JHTML::_('behavior.modal');
     $document = JFactory::getDocument();
     $document->addScriptDeclaration("\nvar fss_settings_url = '" . JRoute::_('index.php?option=com_fss&view=settings', false) . "';\n");
     $document->addScript(JURI::root() . 'administrator/components/com_fss/assets/js/settings.js');
     $what = JRequest::getString('what', '');
     $this->tab = JRequest::getVar('tab');
     if (JRequest::getVar('task') == "cancellist") {
         $mainframe = JFactory::getApplication();
         $link = FSSRoute::_('index.php?option=com_fss&view=fsss', false);
         $mainframe->redirect($link);
         return;
     }
     $settings = FSS_Settings::GetAllViewSettings();
     // CHANGE
     $db = JFactory::getDBO();
     if ($what == "save") {
         $data = JRequest::get('POST', JREQUEST_ALLOWRAW);
         foreach ($data as $setting => $value) {
             if (array_key_exists($setting, $settings)) {
                 $settings[$setting] = $value;
             }
         }
         foreach ($settings as $setting => $value) {
             if (!array_key_exists($setting, $data)) {
                 $settings[$setting] = 0;
                 $value = 0;
             }
             $qry = "REPLACE INTO #__fss_settings_view (setting, value) VALUES ('";
             $qry .= FSSJ3Helper::getEscaped($db, $setting) . "','";
             $qry .= FSSJ3Helper::getEscaped($db, $value) . "')";
             $db->setQuery($qry);
             $db->Query();
         }
         $link = 'index.php?option=com_fss&view=settingsview#' . $this->tab;
         if (JRequest::getVar('task') == "save") {
             $link = 'index.php?option=com_fss';
         }
         $mainframe = JFactory::getApplication();
         $mainframe->redirect($link, JText::_("View_Settings_Saved"));
         exit;
     } else {
         $document = JFactory::getDocument();
         $document->addStyleSheet(JURI::root() . 'administrator/components/com_fss/assets/css/js_color_picker_v2.css');
         $document->addScript(JURI::root() . 'administrator/components/com_fss/assets/js/color_functions.js');
         $document->addScript(JURI::root() . 'administrator/components/com_fss/assets/js/js_color_picker_v2.js');
         $this->settings = $settings;
         JToolBarHelper::title(JText::_("FREESTYLE_SUPPORT_PORTAL") . ' - ' . JText::_("VIEW_SETTINGS"), 'fss_viewsettings');
         JToolBarHelper::apply();
         JToolBarHelper::save();
         JToolBarHelper::cancel('cancellist');
         FSSAdminHelper::DoSubToolbar();
         parent::display($tpl);
     }
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:56,代码来源:view.html.php

示例6: __construct

 function __construct()
 {
     parent::__construct();
     $mainframe = JFactory::getApplication();
     global $option;
     $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', FSS_Settings::Get('announce_per_page'), 'int');
     $limitstart = FSS_Input::getInt('limitstart', 0);
     // In case limit has been changed, adjust it
     $limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0;
     $this->setState('limit', $limit);
     $this->setState('limitstart', $limitstart);
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:12,代码来源:announce.php

示例7: SaveLog

 function SaveLog()
 {
     $db = JFactory::getDBO();
     $class = get_class($this);
     $class = str_ireplace("FSSCron", "", $class);
     $now = FSS_Helper::CurDate();
     $qry = "INSERT INTO #__fss_cron_log (cron, `when`, log) VALUES ('" . FSSJ3Helper::getEscaped($db, $class) . "', '{$now}', '" . FSSJ3Helper::getEscaped($db, $this->_log) . "')";
     $db->SetQuery($qry);
     $db->Query();
     //echo $qry."<br>";
     $qry = "DELETE FROM #__fss_cron_log WHERE `when` < DATE_SUB('{$now}', INTERVAL " . (int) FSS_Settings::get('support_cronlog_keep') . " DAY)";
     $db->SetQuery($qry);
     $db->Query();
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:14,代码来源:cron.php

示例8: display

 function display($tpl = null)
 {
     $fileid = FSS_Input::getInt('fileid');
     $key = FSS_Input::getCmd('key');
     $decoded = FSS_Helper::decrypt(FSS_Helper::base64url_decode($key), FSS_Helper::getEncKey("file"));
     if ($fileid != $decoded) {
         exit;
     }
     $db = JFactory::getDBO();
     $sql = "SELECT * FROM #__fss_ticket_attach WHERE id = " . $fileid;
     $db->setQuery($sql);
     $attach = $db->loadObject();
     $image = in_array(strtolower(pathinfo($attach->filename, PATHINFO_EXTENSION)), array('jpg', 'jpeg', 'png', 'gif'));
     $image_file = JPATH_SITE . DS . FSS_Settings::get('attach_location') . DS . "support" . DS . $attach->diskfile;
     require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'files.php';
     FSS_File_Helper::OutputImage($image_file, pathinfo($attach->filename, PATHINFO_EXTENSION));
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:17,代码来源:view.html.php

示例9: __construct

 function __construct($parent)
 {
     $this->comments = $parent;
     $this->comments->use_comments = FSS_Settings::get('announce_comments_allow');
     $this->comments->opt_display = 1;
     $this->short_thanks = 1;
     $this->email_title = "An Announcement comment";
     $this->email_article_type = JText::_('ANNOUNCEMENT');
     $this->description = JText::_('ANNOUNCEMENT');
     $this->descriptions = JText::_('ANNOUNCEMENTS');
     $this->long_desc = JText::_('COMMENTS_ANNOUNCEMENTS');
     $this->article_link = "index.php?option=com_fss&view=announce&announceid={id}";
     $this->table = "#__fss_announce";
     $this->has_published = 1;
     $this->field_title = "title";
     $this->field_id = "id";
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:17,代码来源:announce.php

示例10: __construct

 function __construct()
 {
     parent::__construct();
     $mainframe = JFactory::getApplication();
     global $option;
     // Get pagination request variables
     $aparams = FSS_Settings::GetViewSettingsObj('faqs');
     $this->_enable_pages = $aparams->get('enable_pages', 1);
     $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', FSS_Settings::Get('faq_per_page'), 'int');
     if ($this->_enable_pages == 0) {
         $limit = 999999;
     }
     $limitstart = FSS_Input::getInt('limitstart', 0);
     // In case limit has been changed, adjust it
     $limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0;
     $this->setState('limit', $limit);
     $this->setState('limitstart', $limitstart);
     $this->_curcatid = FSS_Input::getInt('catid', '');
     $this->_search = FSS_Input::getString('search', '');
     $this->_catlist = $this->_getCatList();
     if ($this->_search != "") {
         $this->_curcattitle = JText::_("SEARCH_RESULTS");
         $this->_curcatid = -1;
         $this->_curcatimage = "/components/com_fss/assets/images/search.png";
     } else {
         if ($this->_curcatid == "0") {
             $this->_curcattitle = JText::_("ALL_FAQS");
             $this->_curcatimage = "/components/com_fss/assets/images/allfaqs.png";
         } else {
             foreach ($this->_catlist as $cat) {
                 if ($cat['id'] == $this->_curcatid) {
                     $this->_curcattitle = $cat['title'];
                     $this->_curcatimage = $cat['image'];
                     $this->_curcatdesc = $cat['description'];
                 }
             }
         }
     }
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:39,代码来源:faq.php

示例11: ValidateCaptcha

 function ValidateCaptcha($setting = 'captcha_type', $direct = '')
 {
     $usecaptcha = FSS_Settings::get($setting);
     if ($direct != "") {
         $usecaptcha = $direct;
     }
     if ($usecaptcha == "") {
         return true;
     }
     if ($usecaptcha == "fsj") {
         if ($_SESSION['security_code'] == $_POST['security_code'] && !empty($_SESSION['security_code'])) {
             return true;
         }
         return false;
     }
     if ($usecaptcha == "recaptcha") {
         if (!class_exists("ReCaptcha\\ReCaptcha")) {
             require JPATH_ROOT . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'third' . DS . 'ReCaptcha' . DS . 'ReCaptcha.php';
             require JPATH_ROOT . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'third' . DS . 'ReCaptcha' . DS . 'RequestMethod.php';
             require JPATH_ROOT . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'third' . DS . 'ReCaptcha' . DS . 'RequestParameters.php';
             require JPATH_ROOT . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'third' . DS . 'ReCaptcha' . DS . 'Response.php';
             require JPATH_ROOT . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'third' . DS . 'ReCaptcha' . DS . 'RequestMethod' . DS . 'Post.php';
         }
         $secret = FSS_Settings::get('recaptcha_private');
         if (!$secret) {
             $secret = "12345";
         }
         $recaptcha = new \ReCaptcha\ReCaptcha($secret);
         $resp = $recaptcha->verify($_POST['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']);
         if ($resp->isSuccess()) {
             return true;
         } else {
             return false;
         }
     }
     return true;
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:37,代码来源:captcha.php

示例12: Admin_ForwardHandler

 function Admin_ForwardHandler($ticket, $params)
 {
     $handler_msg = $params['handler_message'];
     $user_msg = $params['user_message'];
     if (FSS_Settings::Get('support_email_send_empty_handler')) {
         if (!$user_msg) {
             $user_msg = JText::_("THIS_TICKET_HAS_BEEN_FORWARDED_TO_ANOTHER_HANDLER");
         }
         // translation message missing, provide english version just in case
         if (!$user_msg || $user_msg == "THIS_TICKET_HAS_BEEN_FORWARDED_TO_ANOTHER_HANDLER") {
             $user_msg = 'This ticket has been forwarded to another handler';
         }
     }
     if ($handler_msg) {
         FSS_EMail::Admin_Forward($ticket, $params['subject'], $handler_msg, $params['files']);
     } else {
         if ($user_msg) {
             FSS_EMail::Admin_Forward($ticket, $params['subject'], $user_msg, $params['files']);
         }
     }
     if ($user_msg) {
         FSS_EMail::Admin_Reply($ticket, $params['subject'], $user_msg, $params['files']);
     }
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:24,代码来源:emailsend.php

示例13:

" style='cursor: pointer;'>
			<a href="<?php 
echo FSSRoute::_('index.php?option=com_fss&view=faq&faqid=' . $faq['id']);
?>
" onclick='return false;'><?php 
echo $faq['question'];
?>
</a>
		</h5>
				
		<div class="collapse" id="faq_<?php 
echo $cat['id'] . "_" . $faq['id'];
?>
">
			<?php 
if (FSS_Settings::get('glossary_faqs')) {
    echo FSS_Glossary::ReplaceGlossary($faq['answer']);
    if ($faq['fullanswer']) {
        echo FSS_Glossary::ReplaceGlossary($faq['fullanswer']);
    }
} else {
    echo $faq['answer'];
    if ($faq['fullanswer']) {
        echo $faq['fullanswer'];
    }
}
?>
					
			<?php 
if (array_key_exists($faq['id'], $this->tags)) {
    ?>
开发者ID:vstorm83,项目名称:propertease,代码行数:31,代码来源:_faq_accordian.php

示例14: getAttachFormatRegex

 static function getAttachFormatRegex()
 {
     if (substr(FSS_Input::GetCmd('view'), 0, 5) == "admin") {
         $formats = trim(FSS_Settings::get('support_attach_types_admins'));
     } else {
         $formats = trim(FSS_Settings::get('support_attach_types'));
     }
     if (substr($formats, 0, 1) == "/") {
         return $formats;
     }
     $parsed = array();
     if ($formats != "") {
         $formats = explode(",", $formats);
         foreach ($formats as $fm) {
             $fm = trim($fm);
             if (!$fm) {
                 continue;
             }
             $parsed[] = $fm;
         }
     }
     if (count($parsed) > 0) {
         return "/.(" . implode("|", $parsed) . ")\$/i";
     }
     return "null";
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:26,代码来源:helper.php

示例15: Footer

 static function Footer()
 {
     FSS_Glossary::GetGlossary();
     if (count(FSS_Glossary::$glossary) == 0) {
         return "";
     }
     $tail = "<div id='glossary_words' style='display:none;'>";
     $temp = "";
     $count = 0;
     foreach (FSS_Glossary::$glossary as $data) {
         if (empty($data->inuse) || !$data->inuse) {
             continue;
         }
         //if (!empty($data->is_clone) && $data->is_clone)
         //	continue;
         $count++;
         $footer = "";
         if ($data->longdesc && FSS_Settings::get('glossary_show_read_more')) {
             $footer = "<p class='right fss_glossary_read_more' style='text-align: right'>" . JText::_(FSS_Settings::get('glossary_read_more_text')) . "</p>";
         }
         if (FSS_Settings::get('glossary_title')) {
             $tail .= "<div id='glossary_" . $data->ref . "'><h4>" . $data->linkword . "</h4><div class='fsj_gt_inner'>" . $data->description . " {$footer}</div></div>";
         } else {
             $tail .= "<div id='glossary_" . $data->ref . "'><div class='fsj_gt_inner'>" . $data->description . " {$footer}</div></div>";
         }
     }
     $tail .= "</div>";
     if (!$count) {
         return "";
     }
     return $tail;
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:32,代码来源:glossary.php


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