本文整理汇总了PHP中FSS_Helper::StylesAndJS方法的典型用法代码示例。如果您正苦于以下问题:PHP FSS_Helper::StylesAndJS方法的具体用法?PHP FSS_Helper::StylesAndJS怎么用?PHP FSS_Helper::StylesAndJS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FSS_Helper
的用法示例。
在下文中一共展示了FSS_Helper::StylesAndJS方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _glossary
protected function _glossary(&$text, &$params)
{
$text = FSS_Glossary::ReplaceGlossary($text);
$text .= FSS_Glossary::Footer();
FSS_Helper::StylesAndJS();
return true;
}
示例2: __construct
function __construct()
{
if (!JFormFieldFSSChecklist::$init) {
FSS_Helper::StylesAndJS(array(), array("administrator/components/com_fss/assets/css/field.fsschecklist.css"), array("administrator/components/com_fss/assets/js/field.fsschecklist.js"));
JFormFieldfssChecklist::$init = true;
}
//parent::__construct();
}
示例3: Input
function Input($current, $params, $context, $id)
{
if (array_key_exists("custom_" . $id . "_raw", $_POST)) {
$current = $_POST["custom_" . $id . "_raw"];
}
$params = $this->parseParams($params);
FSS_Helper::StylesAndJS(array('calendar'));
$display = $current;
if ($params->today_default && ($current == "" || $current == 0)) {
if ($params->use_time) {
$current = date("Y-m-d H:i:s");
} else {
$current = date("Y-m-d");
}
// need to convert the date into cal format specified
if ($params->format) {
$display = date($this->DXtoPhpFormat($params->format), strtotime($current));
} else {
$display = $current;
}
} else {
if ($current != "") {
$display = date($this->DXtoPhpFormat($params->format), strtotime($current));
}
}
FSS_Translate_Helper::CalenderLocale();
$output = "<input type='text' name='custom_{$id}' id='custom_{$id}' value='{$display}'>";
$output .= "<input type='hidden' name='custom_{$id}_raw' id='custom_{$id}_raw' value='{$current}'>";
$output .= "<script>";
$output .= "\n\t\tjQuery(document).ready(function () {\n\t\t\tmyCalendar = new dhtmlXCalendarObject('custom_{$id}','omega');\n\t\t\tmyCalendar.loadUserLanguage('" . FSS_Translate_Helper::CalenderLocaleCode() . "');\n\t\t\tmyCalendar.attachEvent('onClick',function(date){\n\t\t\t\t\n";
if ($params->use_time) {
$output .= " var raw = this.getFormatedDate('%Y-%m-%d %H:%i:%s');\n";
} else {
$output .= " var raw = this.getFormatedDate('%Y-%m-%d');\n";
}
$output .= "\n\t\t\t\tjQuery('#custom_{$id}_raw').val(raw);\n\t\t\t})\n\t\t\t";
if ($params->no_past) {
$output .= "myCalendar.setSensitiveRange('" . date("Y-m-d") . "', null);\n";
}
if ($params->format) {
$output .= "myCalendar.setDateFormat('{$params->format}');\n";
}
if (!$params->use_time) {
$output .= "myCalendar.hideTime();\n";
}
$output .= "});";
$output .= "</script>";
return $output;
}
示例4: init
function init()
{
$user = JFactory::getUser();
$this->userid = $user->get('id');
$this->model = $this->getModel("admin_support");
if (!FSS_Permission::auth("fss.handler", "com_fss.support_admin")) {
return FSS_Admin_Helper::NoPerm();
}
$this->def_open = FSS_Ticket_Helper::GetStatusID('def_open');
$this->ticket_view = FSS_Input::getCmd('tickets', $this->def_open);
$this->count = SupportTickets::getTicketCount();
FSS_Helper::StylesAndJS(array('calendar', 'base64'));
if (Task_Helper::HandleTasks($this)) {
return false;
}
return true;
}
示例5: display
function display($tpl = null)
{
FSS_Helper::StylesAndJS(array('accordion'));
$mainframe = JFactory::getApplication();
$user = JFactory::getUser();
$userid = $user->id;
$db = JFactory::getDBO();
$this->params = FSS_Settings::GetViewSettingsObj('test');
$this->test_show_prod_mode = $this->params->get('test_show_prod_mode', 'accordian');
$this->test_always_prod_select = $this->params->get('test_always_prod_select', '0');
$layout = FSS_Input::getCmd('layout');
$this->prodid = FSS_Input::getInt('prodid');
if ($this->prodid == "") {
$this->prodid = -1;
}
$this->products = $this->get('Products');
//print_p($this->products);
if (count($this->products) == 0) {
$this->prodid = 0;
}
$this->comments = new FSS_Comments("test", $this->prodid);
if ($this->prodid == -1) {
$this->comments->opt_show_posted_message_only = 1;
}
$onlyprodid = FSS_Input::getCmd('onlyprodid', 'x');
if ($onlyprodid != 'x' && $onlyprodid != -1) {
$this->comments->itemid = (int) $onlyprodid;
$this->comments->show_item_select = false;
}
if ($this->params->get('hide_add', 0)) {
$this->comments->can_add = 0;
}
if ($layout == "create") {
$this->setupCommentsCreate();
}
if ($this->comments->Process()) {
return;
}
if ($layout == "create") {
return $this->displayCreate();
}
if ($this->prodid != -1) {
return $this->displaySingleProduct();
}
return $this->displayAllProducts();
}
示例6: display
function display($tpl = NULL)
{
SupportSource::load();
FSS_Helper::StylesAndJS(array('ticket_list'));
// check sorting, and if sorted disable groupings
if (JFactory::getApplication()->getUserStateFromRequest("fss_admin.ordering", "ordering", "") != "") {
SupportUsers::setSetting('group_products', 0);
SupportUsers::setSetting('group_departments', 0);
SupportUsers::setSetting('group_cats', 0);
SupportUsers::setSetting('group_group', 0);
SupportUsers::setSetting('group_pri', 0);
}
$this->checkCreateCancel();
$this->processBatch();
$this->setupMerge();
$this->getLimits();
if (FSS_Input::getCmd("what") == "search") {
return $this->searchTickets();
}
return $this->listTickets();
}
示例7: GetGlossary
static function GetGlossary()
{
if (empty(FSS_Glossary::$glossary)) {
$db = JFactory::getDBO();
$query = 'SELECT * FROM #__fss_glossary';
$where = array();
$where[] = " published = 1 ";
$where[] = 'language in (' . $db->Quote(JFactory::getLanguage()->getTag()) . ',' . $db->Quote('*') . ')';
$user = JFactory::getUser();
$where[] = 'access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')';
if (count($where) > 0) {
$query .= " WHERE " . implode(" AND ", $where);
}
$query .= ' ORDER BY LENGTH(word) DESC';
$db->setQuery($query);
self::$glossary = $db->loadObjectList();
$extra = array();
foreach (self::$glossary as $offset => &$data) {
$data->base_offset = -1;
$altwords = explode("\n", $data->altwords);
$awp = array();
foreach ($altwords as $aw) {
$aw = trim($aw);
if (!$aw) {
continue;
}
$ex = clone $data;
$ex->is_clone = true;
$ex->word = $aw;
$ex->linkword = $data->word;
$ex->base_offset = $offset;
$extra[] = $ex;
}
}
self::$glossary = array_merge(self::$glossary, $extra);
// add javascript
FSS_Helper::StylesAndJS(array('tooltip', 'glossary'));
}
}
示例8: defined
/**
* @package Freestyle Joomla
* @author Freestyle Joomla
* @copyright (C) 2013 Freestyle Joomla
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
**/
defined('_JEXEC') or die;
// Include the syndicate functions only once
if (!defined("DS")) {
define('DS', DIRECTORY_SEPARATOR);
}
if (file_exists(JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'helper.php')) {
require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'j3helper.php';
require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'helper.php';
global $posdata, $date_format;
FSS_Helper::StylesAndJS(array('autoscroll'), array("modules/mod_fss_faqs/tmpl/mod_fss_faqs.css"));
$document = JFactory::getDocument();
$document->addScript(JURI::root(true) . '/components/com_fss/assets/js/module.js');
$catid = $params->get('catid');
$dispcount = $params->get('dispcount');
$maxheight = (int) $params->get('maxheight');
$mode = $params->get('listtype');
$per_page = $params->get('per_page');
if ($mode == "accordion") {
$maxheight = 0;
}
$db = JFactory::getDBO();
$qry = "SELECT * FROM #__fss_faq_faq";
$where = array();
$where[] = "published = 1";
// for cats
示例9: listFilterValues
function listFilterValues()
{
$html = array();
$db = JFactory::getDBO();
$document = JFactory::getDocument();
$html[] = "<dl class='dl-horizontal margin-none'>";
foreach ($this->filter as $filter) {
if (isset($filter->type) && $filter->type == "daterange") {
FSS_Helper::StylesAndJS(array('calendar'));
$to = FSS_Input::getString("{$filter->name}_to", $this->getDateRangeTo($filter));
$from = FSS_Input::getString("{$filter->name}_from", $this->getDateRangeFrom($filter));
$html[] = "<dt>" . JText::_('FSS_FROM') . "</dt>";
$html[] = "<dd>" . $from . "</dd>";
$html[] = "<dt>" . JText::_('FSS_TILL') . "</dt>";
$html[] = "<dd>" . $to . "</dd>";
} else {
if ($filter->type == "lookup") {
// need to lookup the values from the db
$qry = "SELECT {$filter->key} as `key`, {$filter->display} as display FROM {$filter->table}";
if (isset($filter->published) && $filter->published) {
$qry .= " WHERE published = 1 ";
}
$qry .= " GROUP BY {$filter->order}";
$db->setQuery($qry);
$values = array();
$values[] = JHTML::_('select.option', '', JText::_($filter->header), 'key', 'display');
$values = array_merge($values, $db->loadObjectList());
$value = FSS_Input::getString('filter_' . $filter->name, isset($filter->default) ? $filter->default : '');
foreach ($values as $temp) {
if ($temp->key == $value && $value != "") {
$value = $temp->display;
break;
}
}
if ($value == "") {
$value = "-";
}
$html[] = "<dt>" . JText::_($filter->title) . "</dt>";
$html[] = "<dd>" . $value . " </dd>";
} else {
if ($filter->type == "datepresets") {
} else {
$value = FSS_Input::getString('filter_' . $filter->name, isset($filter->default) ? $filter->default : '');
if (isset($filter->options[$value])) {
$value = $filter->options[$value]->display;
}
$html[] = "<dt>" . JText::_($filter->title) . "</dt>";
$html[] = "<dd>" . $value . " </dd>";
}
}
}
}
$html[] = "</dl>";
return implode($html);
}
示例10:
echo "</pre>";
}
}
// do version check
$ver_inst = FSSAdminHelper::GetInstalledVersion();
$ver_files = FSSAdminHelper::GetVersion();
if (!JFactory::getUser()->authorise('core.manage', 'com_fss')) {
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
// if bad version display warning message
if ($ver_files != $ver_inst) {
$task = JRequest::getVar('task');
$view = JRequest::getVar('view');
if ($task != "update" || $view != "backup") {
JError::raiseWarning(100, JText::sprintf('INCORRECT_VERSION', FSSRoute::_('index.php?option=com_fss&view=backup&task=update')));
}
if ($view != "" && $view != "backup") {
JRequest::setVar('view', '');
}
}
// if bad version and controller is not fsss dont display
// Create the controller
$controllername = $controller;
$classname = 'FsssController' . $controller;
$controller = new $classname();
FSS_Helper::StylesAndJS(array('force_jquery', 'tooltip', 'translate', 'admin_css'));
// Perform the Request task
$controller->execute(JRequest::getVar('task'));
// Redirect if set by the controller
$controller->redirect();
}
示例11: display
function display($tpl = null)
{
FSS_CSSParse::OutputCSS('components/com_fss/assets/css/bootstrap/bootstrap_fssonly.less');
$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');
FSS_Helper::StylesAndJS(array('csstest'));
JHTML::_('behavior.modal');
$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::GetAllSettings();
$db = JFactory::getDBO();
if ($what == "testref") {
return $this->TestRef();
} else {
if ($what == "testdates") {
return $this->testdates();
} else {
if ($what == "send_test_email") {
return $this->test_email_send();
} else {
if ($what == "save") {
$support_autoclose = JRequest::getInt('support_autoclose');
$support_autoclose_duration = JRequest::getInt('support_autoclose_duration');
$support_autoclose_audit = JRequest::getInt('support_autoclose_audit');
$support_autoclose_email = JRequest::getInt('support_autoclose_email');
$aparams = "addaudit:{$support_autoclose_audit};emailuser:{$support_autoclose_email};closeinterval:{$support_autoclose_duration};";
$qry = "UPDATE #__fss_cron SET params = '" . FSSJ3Helper::getEscaped($db, $aparams) . "', published = {$support_autoclose}, `interval` = 5 WHERE class = 'AutoClose'";
$db->setQuery($qry);
//echo $qry."<br>";
$db->Query();
unset($_POST['support_autoclose']);
unset($_POST['support_autoclose_duration']);
unset($_POST['support_autoclose_audit']);
unset($_POST['support_autoclose_email']);
$large = FSS_Settings::GetLargeList();
$templates = FSS_Settings::GetTemplateList();
// save any large settings that arent in the templates list
foreach ($large as $setting) {
// skip any setting that is in the templates list
if (array_key_exists($setting, $templates)) {
continue;
}
//
$value = JRequest::getVar($setting, '', 'post', 'string', JREQUEST_ALLOWRAW);
$qry = "REPLACE INTO #__fss_settings_big (setting, value) VALUES ('";
$qry .= FSSJ3Helper::getEscaped($db, $setting) . "','";
$qry .= FSSJ3Helper::getEscaped($db, $value) . "')";
$db->setQuery($qry);
$db->Query();
$qry = "DELETE FROM #__fss_settings WHERE setting = '" . FSSJ3Helper::getEscaped($db, $setting) . "'";
$db->setQuery($qry);
$db->Query();
unset($_POST[$setting]);
}
$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;
}
// skip any setting that is in the templates list
if (array_key_exists($setting, $templates)) {
continue;
}
if (array_key_exists($setting, $large)) {
continue;
}
$qry = "REPLACE INTO #__fss_settings (setting, value) VALUES ('";
$qry .= FSSJ3Helper::getEscaped($db, $setting) . "','";
$qry .= FSSJ3Helper::getEscaped($db, $value) . "')";
$db->setQuery($qry);
$db->Query();
//echo $qry."<br>";
}
FSS_Settings::reload();
$msg = JText::_("Settings_Saved");
$msgtytpe = "message";
if (!FSS_CSSParse::ParseStaticFiles()) {
$msg = "<p>Freestyle Support Portal cannot write to the following files:</p>";
$msg .= "<ul>";
foreach (FSS_CSSParse::$failed as $file) {
$msg .= "<li>" . $file . "</li>";
}
$msg .= "</ul>";
$msg .= "<p>Without this it may not display correctly on your site.</p>";
$msgtytpe = "error";
}
$link = 'index.php?option=com_fss&view=settings#' . $this->tab;
//.........这里部分代码省略.........
示例12: defined
/**
* @package Freestyle Joomla
* @author Freestyle Joomla
* @copyright (C) 2013 Freestyle Joomla
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
**/
defined('_JEXEC') or die;
// Include the syndicate functions only once
if (!defined("DS")) {
define('DS', DIRECTORY_SEPARATOR);
}
if (file_exists(JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'helper.php')) {
require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'j3helper.php';
require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'helper.php';
FSS_Helper::StylesAndJS();
$prodid = FSS_Input::getInt('prodid');
if ($prodid > 0) {
$show_prod = $params->get('show_prod');
$show_cat = $params->get('show_cat');
$show_art = $params->get('show_art');
$show = true;
if (FSS_Input::getInt('kbartid')) {
if (!$show_art) {
$show = false;
}
} else {
if (FSS_Input::getInt('catid')) {
if (!$show_cat) {
$show = false;
}
示例13: defined
/**
* @package Freestyle Joomla
* @author Freestyle Joomla
* @copyright (C) 2013 Freestyle Joomla
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
**/
defined('_JEXEC') or die;
// Include the syndicate functions only once
if (!defined("DS")) {
define('DS', DIRECTORY_SEPARATOR);
}
if (file_exists(JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'helper.php')) {
require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'j3helper.php';
require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'helper.php';
require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'parser.php';
FSS_Helper::StylesAndJS(array('autoscroll'));
$db = JFactory::getDBO();
jimport('joomla.utilities.date');
$query = "SELECT * FROM #__fss_announce";
$where = array();
$where[] = "published = 1";
$where[] = 'language in (' . $db->Quote(JFactory::getLanguage()->getTag()) . ',' . $db->Quote('*') . ')';
$user = JFactory::getUser();
$where[] = 'access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')';
if (count($where) > 0) {
$query .= " WHERE " . implode(" AND ", $where);
}
$query .= " ORDER BY added DESC ";
if ($params->get('listall') == 0) {
$query .= " LIMIT " . $params->get('dispcount');
}
示例14:
// Require specific controller if requested
if ($controller = FSS_Input::getCmd('controller')) {
$path = JPATH_COMPONENT . DS . 'controllers' . DS . $controller . '.php';
if (file_exists($path)) {
require_once $path;
} else {
$controller = '';
}
}
FSS_Helper::CheckTicketLink();
// Create the controller
$classname = 'FssController' . $controller;
$controller = new $classname();
$view = FSS_Input::getCmd('view');
if ($view != "csstest") {
FSS_Helper::StylesAndJS(array('tooltip'));
}
// Perform the Request task
$task = FSS_Input::getCmd('task');
if ($task == "captcha_image") {
ob_clean();
require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'captcha.php';
$cap = new FSS_Captcha();
$cap->GetImage();
exit;
} else {
$controller->execute($task);
// Redirect if set by the controller
$controller->redirect();
}
}