本文整理汇总了PHP中FSS_Helper类的典型用法代码示例。如果您正苦于以下问题:PHP FSS_Helper类的具体用法?PHP FSS_Helper怎么用?PHP FSS_Helper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FSS_Helper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display($tpl = null)
{
JToolBarHelper::title(JText::_("PRODUCTS"), 'fss_prods');
JToolBarHelper::deleteList();
JToolBarHelper::editList();
JToolBarHelper::addNew();
JToolBarHelper::divider();
if (FSS_Helper::TableExists("#__virtuemart_products_en_gb") || FSS_Helper::TableExists("#__vm_product")) {
JToolBarHelper::custom('import_vm', 'copy', 'copy', 'IMPORT_FROM_VIRTUEMART', false);
}
if (FSS_Helper::TableExists("#__hikashop_product")) {
JToolBarHelper::custom('import_hs', 'copy', 'copy', 'Import From Hika Shop', false);
}
JToolBarHelper::cancel('cancellist');
FSSAdminHelper::DoSubToolbar();
$this->lists = $this->get('Lists');
$this->data = $this->get('Data');
$this->pagination = $this->get('Pagination');
$categories = array();
$categories[] = JHTML::_('select.option', '-1', JText::_("IS_PUBLISHED"), 'id', 'title');
$categories[] = JHTML::_('select.option', '1', JText::_("PUBLISHED"), 'id', 'title');
$categories[] = JHTML::_('select.option', '0', JText::_("UNPUBLISHED"), 'id', 'title');
$this->lists['published'] = JHTML::_('select.genericlist', $categories, 'ispublished', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'id', 'title', $this->lists['ispublished']);
$what = JRequest::getVar('what');
if ($what == "togglefield") {
return $this->toggleField();
}
parent::display($tpl);
}
示例2: getPrintList
static function getPrintList($for_admin, $ticket)
{
$result = array();
$path = JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'plugins' . DS . 'ticketprint';
$files = JFolder::files($path, ".xml\$");
foreach ($files as $file) {
$id = pathinfo($file, PATHINFO_FILENAME);
if (!FSS_Helper::IsPluignEnabled("ticketprint", $id)) {
continue;
}
$xml = simplexml_load_file($path . DS . $file);
if ($for_admin && (int) $xml->admin != 1) {
continue;
}
if (!$for_admin && (int) $xml->user != 1) {
continue;
}
if ($xml->can_run_php) {
$fn = create_function('$for_admin,$ticket', (string) $xml->can_run_php);
if (!$fn($for_admin, $ticket)) {
continue;
}
}
$result[str_ireplace(".xml", "", $file)] = (string) $xml->title;
}
return $result;
}
示例3: _glossary
protected function _glossary(&$text, &$params)
{
$text = FSS_Glossary::ReplaceGlossary($text);
$text .= FSS_Glossary::Footer();
FSS_Helper::StylesAndJS();
return true;
}
示例4: LoadPlugins
static function LoadPlugins($also_disabled = false)
{
// load in all php files in components/com_fss/plugins/tickets and for each make a new object
if (empty(self::$plugins)) {
self::$plugins = array();
$path = JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'plugins' . DS . 'tickets';
$files = JFolder::files($path, ".php\$");
foreach ($files as $file) {
$fullpath = $path . DS . $file;
$info = pathinfo($fullpath);
if (!FSS_Helper::IsPluignEnabled("tickets", $info['filename'])) {
continue;
}
$ext = $info['extension'];
$classname = "SupportActions" . $info['filename'];
require_once $fullpath;
if (class_exists($classname)) {
$plugin = new $classname();
$plugin->enabled = true;
$plugin->php_file = $fullpath;
$plugin->id = $info['filename'];
self::$plugins[] = $plugin;
}
}
}
return self::$plugins;
}
示例5: Input
function Input($current, $params, $context, $id)
{
$params = $this->parseParams($params);
$output = array();
$checked = array();
$posted = FSS_Input::getInt("custom_{$id}_count");
if ($posted) {
for ($i = 1; $i <= $posted; $i++) {
$val = FSS_Input::getString("custom_{$id}_{$i}");
if ($val) {
$checked[$val] = $val;
}
}
}
$i = 0;
foreach ($params->entries as $entry) {
$i++;
$output[] = '<label class="checkbox-inline">';
$output[] = '<input type="checkbox" id="custom_$id_' . $i . '" name="custom_' . $id . '_' . $i . '" value="' . FSS_Helper::encode($entry) . '" ';
if (array_key_exists($entry, $checked)) {
$output[] = " checked='checked' ";
}
$output[] = '>';
$output[] = $entry;
$output[] = '</label>';
}
$output[] = "<input type='hidden' name='custom_{$id}_count' value='{$i}' />";
return implode("\n", $output);
}
示例6: __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();
}
示例7: displayRegistered
function displayRegistered()
{
if (FSS_Settings::get('support_no_admin_for_user_open')) {
JFactory::getApplication()->redirect("index.php?option=com_fss&view=admin_support");
}
FSS_Helper::IncludeModal();
$this->_display("registered");
}
示例8: display
function display($tpl = NULL)
{
FSS_Helper::AddSCEditor();
if (FSS_Input::getInt('sigid')) {
return $this->display_edit();
}
$this->sigs = SupportCanned::GetAllSigs(null);
$this->_display("list");
}
示例9: display
function display($tpl = NULL)
{
// view a ticket!
$this->ticketid = FSS_Input::getInt('ticketid');
$document = JFactory::getDocument();
$document->addScript(JURI::root() . 'components/com_fss/assets/js/bootstrap/bootstrap-timepicker.min.js');
$this->ticket = new SupportTicket();
if (!$this->ticket->load($this->ticketid)) {
if ($this->ticket->checkExist($this->ticketid)) {
return $this->_display("noperm");
} else {
return JError::raiseWarning(404, JText::_('Ticket not found'));
}
}
if ($this->ticket->merged > 0 && FSS_Input::getInt('no_redirect') != '1') {
JFactory::getApplication()->redirect(FSSRoute::_('index.php?option=com_fss&view=admin_support&layout=ticket&ticketid=' . $this->ticket->merged . "&Itemid=" . FSS_Input::getInt('Itemid'), false));
}
$reverse = JRequest::getInt('sort', null);
if ($reverse !== null) {
if ($reverse) {
// we want messages in opposite order to normal
if (SupportUsers::getSetting("reverse_order")) {
$reverse = true;
} else {
$reverse = false;
}
} else {
// we want messages in normal order
$reverse = null;
}
}
$this->ticket->loadAll($reverse);
$this->loadMerged();
$pathway = JFactory::getApplication()->getPathway();
$pathway->addItem(JText::_("SUPPORT"), FSSRoute::_('index.php?option=com_fss&view=admin_support&tickets=' . $this->ticket_view));
$pathway->addItem(JText::_("VIEW_TICKET") . " : " . $this->ticket->reference . " - " . $this->ticket->title);
$this->assignOnOpen();
$this->tryLock();
if ($this->ticket->admin_id > 0) {
$this->adminuser = SupportUsers::getUser($this->ticket->admin_id);
}
$this->ticket_view = $this->ticket->ticket_status_id;
$this->HandleRefresh();
if (FSS_Settings::get('time_tracking') == "auto") {
$session = JFactory::getSession();
$session->set('ticket_' . $this->ticket->id . "_opened", time());
}
FSS_Helper::IncludeModal();
FSS_Helper::AddSCEditor();
$this->HandleRefresh();
$this->print = FSS_Input::getCmd('print');
if ($this->print) {
return $this->_display("print");
}
$this->_display();
}
示例10: EMail_AddFields
function EMail_AddFields(&$comment)
{
$comment['title'] = $this->email_title;
$comment['article_type'] = $this->email_article_type;
$itemid = $comment['itemid'];
$item = $this->GetItem($itemid);
$comment['article'] = $item[$this->field_title];
$link = FSS_Helper::GetBaseURL() . FSSRoute::_(str_replace("{id}", $itemid, $this->article_link));
$comment['linkart'] = $link;
}
示例11: displayType
function displayType()
{
require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'content' . DS . $this->type . '.php';
$class = "FSS_ContentEdit_{$this->type}";
$content = new $class();
$content->layout = $this->layout;
$content->type = $this->type;
$content->view = $this->view;
FSS_Helper::IncludeModal();
$content->Display();
}
示例12: display
function display($tpl = NULL)
{
$preview = FSS_Input::getCmd('preview');
if ($preview) {
return $this->showPreview($preview);
}
FSS_Helper::IncludeModal();
$this->state = FSS_Input::getCmd('state');
$this->ticket_view = "";
$this->getLimits();
$this->pending = $this->loadPending();
$this->_display();
}
示例13: 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();
}
示例14: 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;
}
示例15: 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;
}