• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP JEV_CommonFunctions类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: listevents

 function listevents()
 {
     list($year, $month, $day) = JEVHelper::getYMD();
     $Itemid = JEVHelper::getItemid();
     // get the view
     $document =& JFactory::getDocument();
     $viewType = $document->getType();
     $cfg =& JEVConfig::getInstance();
     $theme = JEV_CommonFunctions::getJEventsViewName();
     $view = "day";
     $this->addViewPath($this->_basePath . DS . "views" . DS . $theme);
     $this->view =& $this->getView($view, $viewType, $theme, array('base_path' => $this->_basePath, "template_path" => $this->_basePath . DS . "views" . DS . $theme . DS . $view . DS . 'tmpl', "name" => $theme . DS . $view));
     // Set the layout
     $this->view->setLayout('listevents');
     $this->view->assign("Itemid", $Itemid);
     $this->view->assign("month", $month);
     $this->view->assign("day", $day);
     $this->view->assign("year", $year);
     $this->view->assign("task", $this->_task);
     // View caching logic -- simple... are we logged in?
     $cfg =& JEVConfig::getInstance();
     $useCache = intval($cfg->get('com_cache', 0));
     $user =& JFactory::getUser();
     if ($user->get('id') || !$useCache) {
         $this->view->display();
     } else {
         $cache =& JFactory::getCache(JEV_COM_COMPONENT, 'view');
         $cache->get($this->view, 'display');
     }
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:30,代码来源:day.php


示例2: DefaultdateFormattedDateRange

function DefaultdateFormattedDateRange($view)
{
    $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
    if ($params->get("daterangeformat", "") == "") {
        $return = JEventsHTML::getDateFormat($view->startyear, $view->startmonth, $view->startday, 1) . "   -   " . JEventsHTML::getDateFormat($view->endyear, $view->endmonth, $view->endday, 1);
    } else {
        $return = $params->get("daterangeformat", "");
        $startmatches = array();
        preg_match_all('|{START(.*?)}|', $return, $startmatches);
        if (count($startmatches) == 2 && count($startmatches[1]) == 1) {
            $replace = str_replace(array("(", ")"), "", $startmatches[1][0]);
            $datestp = JevDate::mktime(0, 0, 0, $view->startmonth, $view->startday, $view->startyear);
            $replace = JEV_CommonFunctions::jev_strftime($replace, $datestp);
            $return = str_replace($startmatches[0][0], $replace, $return);
        }
        $endmatches = array();
        preg_match_all('|{END(.*?)}|', $return, $endmatches);
        if (count($endmatches) == 2 && count($endmatches[1]) == 1) {
            $replace = str_replace(array("(", ")"), "", $endmatches[1][0]);
            $datestp = JevDate::mktime(0, 0, 0, $view->endmonth, $view->endday, $view->endyear);
            $replace = JEV_CommonFunctions::jev_strftime($replace, $datestp);
            $return = str_replace($endmatches[0][0], $replace, $return);
        }
        //$return = $params->get("daterangeformat", "");
    }
    return $return;
}
开发者ID:madcsaba,项目名称:li-de,代码行数:27,代码来源:defaultdateformatteddaterange.php


示例3: __construct

 function __construct($config = null)
 {
     parent::__construct($config);
     jimport('joomla.filesystem.file');
     if (JevJoomlaVersion::isCompatible("3.0")) {
         JEVHelper::stylesheet('eventsadmin.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/');
     } else {
         JEVHelper::stylesheet('eventsadminjq.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/');
     }
     $this->_addPath('template', $this->_basePath . '/' . 'views' . '/' . 'abstract' . '/' . 'tmpl');
     // note that the name config variable is ignored in the parent construct!
     if (JevJoomlaVersion::isCompatible("2.5")) {
         // Ok getTemplate doesn't seem to get the active menu item's template, so lets do it ourselves if it exists
         $app = JFactory::getApplication();
         // Get current template style ID
         $page_template_id = $app->isAdmin() ? "0" : @$app->getMenu()->getActive()->template_style_id;
         // Check it's a valid style with simple check
         if (!($page_template_id == "" || $page_template_id == "0")) {
             // Load the valid style:
             $db = JFactory::getDbo();
             $query = $db->getQuery(true)->select('template')->from('#__template_styles')->where('id =' . $db->quote($page_template_id) . '');
             $db->setQuery($query);
             $template = $db->loadResult();
         } else {
             $template = JFactory::getApplication()->getTemplate();
         }
         $theme = JEV_CommonFunctions::getJEventsViewName();
         $name = $this->getName();
         $name = str_replace($theme . "/", "", $name);
         $this->addTemplatePath(JPATH_BASE . '/' . 'templates' . '/' . $template . '/' . 'html' . '/' . JEV_COM_COMPONENT . '/' . $theme . '/' . $name);
         // or could have used
         //$this->addTemplatePath( JPATH_BASE.'/'.'templates'.'/'.JFactory::getApplication()->getTemplate().'/'.'html'.'/'.JEV_COM_COMPONENT.'/'.$config['name'] );
     }
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:34,代码来源:abstract.php


示例4: getOptions

 public function getOptions()
 {
     // Must load admin language files
     $lang = JFactory::getLanguage();
     $lang->load("com_jevents", JPATH_ADMINISTRATOR);
     $views = array();
     include_once JPATH_ADMINISTRATOR . "/components/com_jevents/jevents.defines.php";
     $exceptions_values = (string) $this->element['except'] ? (string) $this->element['except'] : "";
     $exceptions = array();
     $exceptions = explode(',', $exceptions_values);
     foreach (JEV_CommonFunctions::getJEventsViewList((string) $this->element["viewtype"]) as $viewfile) {
         if (in_array($viewfile, $exceptions)) {
             continue;
         }
         $views[] = JHTML::_('select.option', $viewfile, $viewfile);
     }
     sort($views);
     if ($this->menu != 'hide') {
         $task = JRequest::getVar('task');
         if ($task == "params.edit") {
             unset($views['global']);
         } else {
             array_unshift($views, JHTML::_('select.option', 'global', JText::_('USE_GLOBAL')));
         }
     }
     return $views;
 }
开发者ID:hriggs,项目名称:cs-website,代码行数:27,代码来源:jevview.php


示例5: detail

 function detail()
 {
     // Do we have to be logged in to see this event
     $user = JFactory::getUser();
     if (JRequest::getInt("login", 0) && $user->id == 0) {
         $uri = JURI::getInstance();
         $link = $uri->toString();
         $comuser = version_compare(JVERSION, '1.6.0', '>=') ? "com_users" : "com_user";
         $link = 'index.php?option=' . $comuser . '&view=login&return=' . base64_encode($link);
         $link = JRoute::_($link);
         $this->setRedirect($link, JText::_('JEV_LOGIN_TO_VIEW_EVENT'));
         return;
     }
     $evid = JRequest::getInt("rp_id", 0);
     if ($evid == 0) {
         $evid = JRequest::getInt("evid", 0);
         // In this case I do not have a repeat id so I
     }
     // if cancelling from save of copy and edit use the old event id
     if ($evid == 0) {
         $evid = JRequest::getInt("old_evid", 0);
     }
     $pop = intval(JRequest::getVar('pop', 0));
     list($year, $month, $day) = JEVHelper::getYMD();
     $Itemid = JEVHelper::getItemid();
     $uid = urldecode(JRequest::getVar('uid', ""));
     $document =& JFactory::getDocument();
     $viewType = $document->getType();
     $cfg =& JEVConfig::getInstance();
     $theme = JEV_CommonFunctions::getJEventsViewName();
     $view = "icalevent";
     $this->addViewPath($this->_basePath . DS . "views" . DS . $theme);
     $this->view =& $this->getView($view, $viewType, $theme . "View", array('base_path' => $this->_basePath, "template_path" => $this->_basePath . DS . "views" . DS . $theme . DS . $view . DS . 'tmpl', "name" => $theme . DS . $view));
     // Set the layout
     $this->view->setLayout("detail");
     $this->view->assign("Itemid", $Itemid);
     $this->view->assign("month", $month);
     $this->view->assign("day", $day);
     $this->view->assign("year", $year);
     $this->view->assign("task", $this->_task);
     $this->view->assign("pop", $pop);
     $this->view->assign("evid", $evid);
     $this->view->assign("jevtype", "icaldb");
     $this->view->assign("uid", $uid);
     // View caching logic -- simple... are we logged in?
     $cfg =& JEVConfig::getInstance();
     $useCache = intval($cfg->get('com_cache', 0));
     if ($user->get('id') || !$useCache) {
         $this->view->display();
     } else {
         $cache =& JFactory::getCache(JEV_COM_COMPONENT, 'view');
         $cache->get($this->view, 'display');
     }
 }
开发者ID:madseller,项目名称:coperio,代码行数:54,代码来源:icalrepeat.php


示例6: __construct

 function __construct($config = null)
 {
     parent::__construct($config);
     $this->_addPath('template', $this->_basePath . DS . 'views' . DS . 'abstract' . DS . 'tmpl');
     // note that the name config variable is ignored in the parent construct!
     if (JVersion::isCompatible("2.5")) {
         $theme = JEV_CommonFunctions::getJEventsViewName();
         $this->addTemplatePath(JPATH_BASE . DS . 'templates' . DS . JFactory::getApplication()->getTemplate() . DS . 'html' . DS . JEV_COM_COMPONENT . DS . $theme . DS . $this->getName());
         // or could have used
         //$this->addTemplatePath( JPATH_BASE.DS.'templates'.DS.JFactory::getApplication()->getTemplate().DS.'html'.DS.JEV_COM_COMPONENT.DS.$config['name'] );
     }
 }
开发者ID:madseller,项目名称:coperio,代码行数:12,代码来源:abstract.php


示例7: getViewClass

 function getViewClass($theme, $module, $layout, $params = false)
 {
     // If we have a specified over ride then use it here
     if ($params && strlen($params->get("layout", "")) > 0) {
         $speciallayout = strtolower($params->get("layout", ""));
         // Build the template and base path for the layout
         $tPath = JPATH_SITE . '/' . 'templates' . '/' . JFactory::getApplication()->getTemplate() . '/' . 'html' . '/' . $module . '/' . $theme . '/' . $speciallayout . '.php';
         // If the template has a layout override use it
         if (file_exists($tPath)) {
             $viewclass = "Override" . ucfirst($theme) . "ModCalView" . ucfirst($speciallayout);
             require_once $tPath;
             if (class_exists($viewclass)) {
                 return $viewclass;
             }
         }
     }
     if ($layout == "" || $layout == "global") {
         $layout = JEV_CommonFunctions::getJEventsViewName();
     }
     // Build the template and base path for the layout
     $tPath = JPATH_SITE . '/' . 'templates' . '/' . JFactory::getApplication()->getTemplate() . '/' . 'html' . '/' . $module . '/' . $layout . '.php';
     $bPath = JPATH_SITE . '/' . 'modules' . '/' . $module . '/' . 'tmpl' . '/' . $layout . '.php';
     jimport('joomla.filesystem.file');
     // If the template has a layout override use it
     if (JFile::exists($tPath)) {
         require_once $tPath;
         $viewclass = "Override" . ucfirst($theme) . "ModCalView";
         if (class_exists($viewclass)) {
             return $viewclass;
         } else {
             // fall back to badly declared template override!
             $viewclass = ucfirst($theme) . "ModCalView";
             if (class_exists($viewclass)) {
                 return $viewclass;
             }
         }
     }
     if (JFile::exists($bPath)) {
         require_once $bPath;
         $viewclass = ucfirst($theme) . "ModCalView";
         return $viewclass;
     } else {
         echo "<strong>" . JText::sprintf("JEV_PLEASE_REINSTALL_LAYOUT", $theme) . "</strong>";
         $bPath = JPATH_SITE . '/' . 'modules' . '/' . $module . '/' . 'tmpl' . '/' . 'default' . '/' . 'calendar.php';
         require_once $bPath;
         $viewclass = "DefaultModCalView";
         return $viewclass;
     }
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:49,代码来源:helper.php


示例8: getOptions

 public function getOptions()
 {
     // Must load admin language files
     $lang =& JFactory::getLanguage();
     $lang->load("com_jevents", JPATH_ADMINISTRATOR);
     $views = array();
     include_once JPATH_ADMINISTRATOR . "/components/com_jevents/jevents.defines.php";
     foreach (JEV_CommonFunctions::getJEventsViewList() as $viewfile) {
         $views[] = JHTML::_('select.option', $viewfile, $viewfile);
     }
     sort($views);
     if ($this->menu != 'hide') {
         array_unshift($views, JHTML::_('select.option', '', JText::_('USE_GLOBAL')));
     }
     return $views;
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:16,代码来源:jevview.php


示例9: __construct

 function __construct($config = array())
 {
     if (!isset($config['base_path'])) {
         $config['base_path'] = JEV_PATH;
     }
     parent::__construct($config);
     // TODO get this from config
     $this->registerDefaultTask('calendar');
     $cfg =& JEVConfig::getInstance();
     $theme = ucfirst(JEV_CommonFunctions::getJEventsViewName());
     JLoader::register('JEvents' . ucfirst($theme) . 'View', JEV_VIEWS . "/" . $theme . "/abstract/abstract.php");
     include_once JEV_LIBS . "/modfunctions.php";
     if (!isset($this->_basePath) && JVersion::isCompatible("1.6.0")) {
         $this->_basePath = $this->basePath;
         $this->_task = $this->task;
     }
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:17,代码来源:modlatest.php


示例10: fetchElement

 function fetchElement($name, $value, &$node, $control_name)
 {
     // Must load admin language files
     $lang = JFactory::getLanguage();
     $lang->load("com_jevents", JPATH_ADMINISTRATOR);
     $views = array();
     include_once JPATH_ADMINISTRATOR . "/components/com_jevents/jevents.defines.php";
     foreach (JEV_CommonFunctions::getJEventsViewList() as $viewfile) {
         $views[] = JHTML::_('select.option', $viewfile, $viewfile);
         $load = $lang->load("com_jevents", JPATH_SITE . "/components/com_jevents/views/" . $viewfile . "/assets");
     }
     sort($views);
     if ($node->attributes('menu') != 'hide') {
         array_unshift($views, JHTML::_('select.option', '', JText::_('USE_GLOBAL')));
     }
     return JHTML::_('select.genericlist', $views, '' . $control_name . '[' . $name . ']', '', 'value', 'text', $value, $control_name . $name);
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:17,代码来源:jevview.php


示例11: listevents

 function listevents()
 {
     $is_event_editor = JEVHelper::isEventCreator();
     $Itemid = JEVHelper::getItemid();
     $user = JFactory::getUser();
     if (!$is_event_editor) {
         $returnlink = JRoute::_('index.php?option=' . JEV_COM_COMPONENT . '&task=month.calendar&Itemid=' . $Itemid, false);
         $this->setRedirect($returnlink, html_entity_decode(JText::_('JEV_NOPERMISSION')));
         $this->redirect();
         return;
     }
     list($year, $month, $day) = JEVHelper::getYMD();
     // Joomla unhelpfully switched limitstart to start when sef is enabled!  includes/router.php line 390
     $limitstart = intval(JRequest::getVar('start', JRequest::getVar('limitstart', 0)));
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     $limit = intval(JFactory::getApplication()->getUserStateFromRequest('jevlistlimit', 'limit', $params->get("com_calEventListRowsPpg", 15)));
     $Itemid = JEVHelper::getItemid();
     $task = $this->_task;
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     $adminuser = $params->get("jevadmin", -1);
     if (JEVHelper::isAdminUser($user) || $user->id == $adminuser) {
         $creator_id = 'ADMIN';
     } else {
         $creator_id = $user->id;
     }
     // get the view
     $document = JFactory::getDocument();
     $viewType = $document->getType();
     $cfg = JEVConfig::getInstance();
     $theme = JEV_CommonFunctions::getJEventsViewName();
     $view = "admin";
     $this->addViewPath($this->_basePath . '/' . "views" . '/' . $theme);
     $this->view = $this->getView($view, $viewType, $theme . "View", array('base_path' => $this->_basePath, "template_path" => $this->_basePath . '/' . "views" . '/' . $theme . '/' . $view . '/' . 'tmpl', "name" => $theme . '/' . $view));
     // Set the layout
     $this->view->setLayout('listevents');
     $this->view->assign("Itemid", $Itemid);
     $this->view->assign("limitstart", $limitstart);
     $this->view->assign("limit", $limit);
     $this->view->assign("month", $month);
     $this->view->assign("day", $day);
     $this->view->assign("year", $year);
     $this->view->assign("task", $task);
     $this->view->assign("creator_id", $creator_id);
     $this->view->display();
 }
开发者ID:poorgeek,项目名称:JEvents,代码行数:45,代码来源:admin.php


示例12: DefaultEventsLegend

function DefaultEventsLegend($view)
{
    $cfg =& JEVConfig::getInstance();
    $theme = JEV_CommonFunctions::getJEventsViewName();
    $modpath = JModuleHelper::getLayoutPath('mod_jevents_legend', $theme . DS . "legend");
    if (!file_exists($modpath)) {
        return;
    }
    // load the helper class
    require_once JPATH_SITE . '/modules/mod_jevents_legend/helper.php';
    require_once $modpath;
    $viewclass = ucfirst($theme) . "ModLegendView";
    $module = JModuleHelper::getModule("mod_jevents_legend", false);
    $params = new JParameter($module->params);
    $modview = new $viewclass($params, $module->id);
    echo $modview->displayCalendarLegend("block");
    echo "<br style='clear:both'/>";
}
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:18,代码来源:defaulteventslegend.php


示例13: __construct

 function __construct($config = null)
 {
     parent::__construct($config);
     jimport('joomla.filesystem.file');
     if (JevJoomlaVersion::isCompatible("3.0")) {
         JEVHelper::stylesheet('eventsadmin.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/');
     } else {
         JEVHelper::stylesheet('eventsadmin16.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/');
     }
     $this->_addPath('template', $this->_basePath . '/' . 'views' . '/' . 'abstract' . '/' . 'tmpl');
     // note that the name config variable is ignored in the parent construct!
     if (JevJoomlaVersion::isCompatible("2.5")) {
         $theme = JEV_CommonFunctions::getJEventsViewName();
         $this->addTemplatePath(JPATH_BASE . '/' . 'templates' . '/' . JFactory::getApplication()->getTemplate() . '/' . 'html' . '/' . JEV_COM_COMPONENT . '/' . $theme . '/' . $this->getName());
         // or could have used
         //$this->addTemplatePath( JPATH_BASE.'/'.'templates'.'/'.JFactory::getApplication()->getTemplate().'/'.'html'.'/'.JEV_COM_COMPONENT.'/'.$config['name'] );
     }
 }
开发者ID:rogatnev-nikita,项目名称:cloudinterpreter,代码行数:18,代码来源:abstract.php


示例14: listevents

 function listevents()
 {
     list($year, $month, $day) = JEVHelper::getYMD();
     // Joomla unhelpfully switched limitstart to start when sef is enabled!  includes/router.php line 390
     $limitstart = intval(JRequest::getVar('start', JRequest::getVar('limitstart', 0)));
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     $limit = intval(JFactory::getApplication()->getUserStateFromRequest('jevlistlimit', 'limit', $params->get("com_calEventListRowsPpg", 15)));
     //	$catid 	= intval( JRequest::getVar( 	'catid', 		0 ) );
     $catids = JRequest::getVar('catids', "");
     $catids = explode("|", $catids);
     $Itemid = JEVHelper::getItemid();
     // get the view
     $document = JFactory::getDocument();
     $viewType = $document->getType();
     $cfg = JEVConfig::getInstance();
     $theme = JEV_CommonFunctions::getJEventsViewName();
     $view = "cat";
     $this->addViewPath($this->_basePath . '/' . "views" . '/' . $theme);
     $this->view = $this->getView($view, $viewType, $theme . "View", array('base_path' => $this->_basePath, "template_path" => $this->_basePath . '/' . "views" . '/' . $theme . '/' . $view . '/' . 'tmpl', "name" => $theme . '/' . $view));
     // Set the layout
     $this->view->setLayout('listevents');
     $this->view->assign("Itemid", $Itemid);
     $this->view->assign("limitstart", $limitstart);
     $this->view->assign("limit", $limit);
     $this->view->assign("catids", $catids);
     $this->view->assign("month", $month);
     $this->view->assign("day", $day);
     $this->view->assign("year", $year);
     $this->view->assign("task", $this->_task);
     // View caching logic -- simple... are we logged in?
     $cfg = JEVConfig::getInstance();
     $joomlaconf = JFactory::getConfig();
     $useCache = intval($cfg->get('com_cache', 0)) && $joomlaconf->get('caching', 1);
     $user = JFactory::getUser();
     if ($user->get('id') || !$useCache) {
         $this->view->display();
     } else {
         $cache = JFactory::getCache(JEV_COM_COMPONENT, 'view');
         $cache->get($this->view, 'display');
     }
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:41,代码来源:cat.php


示例15: results

 function results()
 {
     list($year, $month, $day) = JEVHelper::getYMD();
     $Itemid = JEVHelper::getItemid();
     $db =& JFactory::getDBO();
     $keyword = $db->getEscaped(JRequest::getVar('keyword', ''));
     // Joomla unhelpfully switched limitstart to start when sef is enabled!  includes/router.php line 390
     $limitstart = intval(JRequest::getVar('start', JRequest::getVar('limitstart', 0)));
     $params =& JComponentHelper::getParams(JEV_COM_COMPONENT);
     $limit = intval(JFactory::getApplication()->getUserStateFromRequest('jevlistlimit', 'limit', $params->getValue("com_calEventListRowsPpg", 15)));
     $document =& JFactory::getDocument();
     $viewType = $document->getType();
     $cfg =& JEVConfig::getInstance();
     $theme = JEV_CommonFunctions::getJEventsViewName();
     $view = "search";
     $this->addViewPath($this->_basePath . DS . "views" . DS . $theme);
     $this->view =& $this->getView($view, $viewType, $theme, array('base_path' => $this->_basePath, "template_path" => $this->_basePath . DS . "views" . DS . $theme . DS . $view . DS . 'tmpl', "name" => $theme . DS . $view));
     // Set the layout
     $this->view->setLayout('results');
     $this->view->assign("Itemid", $Itemid);
     $this->view->assign("month", $month);
     $this->view->assign("day", $day);
     $this->view->assign("year", $year);
     $this->view->assign("task", $this->_task);
     $this->view->assign("keyword", $keyword);
     $this->view->assign("limit", $limit);
     $this->view->assign("limitstart", $limitstart);
     // View caching logic -- simple... are we logged in?
     $cfg =& JEVConfig::getInstance();
     $useCache = intval($cfg->get('com_cache', 0));
     $user =& JFactory::getUser();
     if ($user->get('id') || !$useCache) {
         $this->view->display();
     } else {
         $cache =& JFactory::getCache(JEV_COM_COMPONENT, 'view');
         $uri = JURI::getInstance();
         $url = $uri->toString();
         $cache->get($this->view, 'display', base64_encode($keyword . $Itemid . $limit . $limitstart . $month . $day . $year . $url));
     }
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:40,代码来源:search.php


示例16: DefaultEventsLegend

function DefaultEventsLegend($view)
{
    $cfg = JEVConfig::getInstance();
    if ($cfg->get('com_calShowLegend', 1) == 1) {
        $theme = JEV_CommonFunctions::getJEventsViewName();
        $modpath = JModuleHelper::getLayoutPath('mod_jevents_legend', $theme . '/' . "legend");
        if (!file_exists($modpath) || !file_exists(JPATH_SITE . '/modules/mod_jevents_legend/helper.php')) {
            return;
        }
        // load the helper class
        require_once JPATH_SITE . '/modules/mod_jevents_legend/helper.php';
        require_once $modpath;
        $viewclass = ucfirst($theme) . "ModLegendView";
        $module = JModuleHelper::getModule("mod_jevents_legend", false);
        $params = new JRegistry($module->params);
        $modview = new $viewclass($params, $module->id);
        echo $modview->displayCalendarLegend("block");
        echo "<br style='clear:both;height:0px;line-height:0px;'/>";
    } else {
        //Do nothing
    }
}
开发者ID:madcsaba,项目名称:li-de,代码行数:22,代码来源:defaulteventslegend.php


示例17: listevents

 function listevents()
 {
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     $fixedDay = $params->get('fixedday', '');
     if ($fixedDay) {
         $year = date('Y', strtotime($fixedDay));
         $month = date('m', strtotime($fixedDay));
         $day = date('d', strtotime($fixedDay));
     } else {
         list($year, $month, $day) = JEVHelper::getYMD();
     }
     $Itemid = JEVHelper::getItemid();
     // get the view
     $document = JFactory::getDocument();
     $viewType = $document->getType();
     $cfg = JEVConfig::getInstance();
     $theme = JEV_CommonFunctions::getJEventsViewName();
     $view = "day";
     $this->addViewPath($this->_basePath . '/' . "views" . '/' . $theme);
     $this->view = $this->getView($view, $viewType, $theme . "View", array('base_path' => $this->_basePath, "template_path" => $this->_basePath . '/' . "views" . '/' . $theme . '/' . $view . '/' . 'tmpl', "name" => $theme . '/' . $view));
     // Set the layout
     $this->view->setLayout('listevents');
     $this->view->assign("Itemid", $Itemid);
     $this->view->assign("month", $month);
     $this->view->assign("day", $day);
     $this->view->assign("year", $year);
     $this->view->assign("task", $this->_task);
     // View caching logic -- simple... are we logged in?
     $cfg = JEVConfig::getInstance();
     $joomlaconf = JFactory::getConfig();
     $useCache = intval($cfg->get('com_cache', 0)) && $joomlaconf->get('caching', 1);
     $user = JFactory::getUser();
     if ($user->get('id') || !$useCache) {
         $this->view->display();
     } else {
         $cache = JFactory::getCache(JEV_COM_COMPONENT, 'view');
         $cache->get($this->view, 'display');
     }
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:39,代码来源:day.php


示例18: detail

 function detail()
 {
     $evid = JRequest::getInt("evid", 0);
     $pop = intval(JRequest::getVar('pop', 0));
     list($year, $month, $day) = JEVHelper::getYMD();
     $Itemid = JEVHelper::getItemid();
     // get the view
     $document = JFactory::getDocument();
     $viewType = $document->getType();
     $cfg = JEVConfig::getInstance();
     $theme = JEV_CommonFunctions::getJEventsViewName();
     $view = "jevent";
     $this->addViewPath($this->_basePath . '/' . "views" . '/' . $theme);
     $this->view = $this->getView($view, $viewType, $theme . "View", array('base_path' => $this->_basePath, "template_path" => $this->_basePath . '/' . "views" . '/' . $theme . '/' . $view . '/' . 'tmpl', "name" => $theme . '/' . $view));
     // Set the layout
     $this->view->setLayout("detail");
     $this->view->assign("Itemid", $Itemid);
     $this->view->assign("month", $month);
     $this->view->assign("day", $day);
     $this->view->assign("year", $year);
     $this->view->assign("task", $this->_task);
     $this->view->assign("pop", $pop);
     $this->view->assign("evid", $evid);
     $this->view->assign("jevtype", "jevent");
     // View caching logic -- simple... are we logged in?
     $cfg = JEVConfig::getInstance();
     $joomlaconf = JFactory::getConfig();
     $useCache = intval($cfg->get('com_cache', 0)) && $joomlaconf->get('caching', 1);
     $user = JFactory::getUser();
     if ($user->get('id') || !$useCache) {
         $this->view->display();
     } else {
         $cache = JFactory::getCache(JEV_COM_COMPONENT, 'view');
         $cache->get($this->view, 'display');
     }
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:36,代码来源:jevent.php


示例19: bgcolor

 function bgcolor($val = "")
 {
     if (JString::strlen($val) == 0) {
         if (!isset($this->_bgcolor)) {
             $this->_bgcolor = JEV_CommonFunctions::setColor($this);
         }
         return $this->_bgcolor;
     } else {
         $this->_bgcolor = $val;
     }
 }
开发者ID:poorgeek,项目名称:JEvents,代码行数:11,代码来源:jeventcal.php


示例20: ProcessRequest

function ProcessRequest(&$requestObject, $returnData)
{
    define("REQUESTOBJECT", serialize($requestObject));
    define("RETURNDATA", serialize($returnData));
    require_once JPATH_BASE . DS . 'includes' . DS . 'defines.php';
    require_once JPATH_BASE . DS . 'includes' . DS . 'framework.php';
    $requestObject = unserialize(REQUESTOBJECT);
    $returnData = unserialize(RETURNDATA);
    $returnData->allclear = 1;
    ini_set("display_errors", 0);
    global $option;
    $client = "site";
    if (isset($requestObject->client) && in_array($requestObject->client, array("site", "administrator"))) {
        $client = $requestObject->client;
    }
    $mainframe = JFactory::getApplication($client);
    JFactory::getApplication()->initialise();
    $option = "com_jevents";
    // Not sure why this is needed but it is if (use use $mainframe =& JFactory::getApplication($client); )!!!
    // needed for Joomla 1.5 plugins
    $GLOBALS['mainframe'] = $mainframe;
    $lang =& JFactory::getLanguage();
    $lang->load("com_jevents", JPATH_SITE);
    $lang->load("com_jevents", JPATH_ADMINISTRATOR);
    include_once JPATH_SITE . "/components/com_jevents/jevents.defines.php";
    $params =& JComponentHelper::getParams("com_jevents");
    if (!$params->get("checkclashes", 0) && !$params->get("noclashes", 0)) {
        return $returnData;
    }
    // Enforce referrer
    if (!$params->get("skipreferrer", 0)) {
        if (!array_key_exists("HTTP_REFERER", $_SERVER)) {
            throwerror("There was an error");
        }
        $live_site = $_SERVER['HTTP_HOST'];
        $ref_parts = parse_url($_SERVER["HTTP_REFERER"]);
        if (!isset($ref_parts["host"]) || $ref_parts["host"] . (isset($ref_parts["port"]) ? ':' . $ref_parts["port"] : '') != $live_site) {
            throwerror("There was an error - missing host in referrer");
        }
    }
    if ($params->get("icaltimezonelive", "") != "" && is_callable("date_default_timezone_set") && $params->get("icaltimezonelive", "") != "") {
        $timezone = date_default_timezone_get();
        $tz = $params->get("icaltimezonelive", "");
        date_default_timezone_set($tz);
        $registry =& JRegistry::getInstance("jevents");
        $registry->setValue("jevents.timezone", $timezone);
    }
    $token = JUtility::getToken();
    if (!isset($requestObject->token) || $requestObject->token != $token) {
        throwerror("There was an error - bad token.  Please refresh the page and try again.");
    }
    $user = JFactory::getUser();
    if (!JEVHelper::isEventCreator()) {
        throwerror("There was an error");
    }
    if (intval($requestObject->formdata->evid) > 0) {
        $db = JFactory::getDBO();
        $dataModel = new JEventsDataModel("JEventsAdminDBModel");
        $queryModel = new JEventsDBModel($dataModel);
        $event = $queryModel->getEventById(intval($requestObject->formdata->evid), 1, "icaldb");
        //$db->setQuery("SELECT * FROM #__jevents_vevent where ev_id=".intval($requestObject->formdata->evid));
        //	$event = $db->loadObject();
        if (!$event || !JEVHelper::canEditEvent($event)) {
            throwerror("There was an error");
        }
    }
    $returnData->overlaps = array();
    if ($requestObject->pressbutton == "icalrepeat.apply" || $requestObject->pressbutton == "icalrepeat.save") {
        $testrepeat = simulateSaveRepeat($requestObject);
        // now we have out event and its repetitions we now check to see for overlapping events
        $overlaps = checkRepeatOverlaps($testrepeat, $returnData, intval($requestObject->formdata->evid), $requestObject);
    } else {
        $testevent = simulateSaveEvent($requestObject);
        // now we have out event and its repetitions we now check to see for overlapping events
        $overlaps = checkEventOverlaps($testevent, $returnData, intval($requestObject->formdata->evid), $requestObject);
    }
    if (count($overlaps) > 0) {
        $returnData->allclear = 0;
        foreach ($overlaps as $olp) {
            $overlap = new stdClass();
            $overlap->event_id = $olp->eventid;
            $overlap->eventdetail_id = $olp->eventdetail_id;
            $overlap->summary = $olp->summary;
            $overlap->rp_id = $olp->rp_id;
            $overlap->startrepeat = $olp->startrepeat;
            $overlap->endrepeat = $olp->endrepeat;
            list($y, $m, $d, $h, $m, $d) = sscanf($olp->startrepeat, "%d-%d-%d %d:%d:%d");
            $tstring = JText::_("JEV_OVERLAP_MESSAGE");
            $overlap->conflictMessage = sprintf($tstring, $olp->summary, JEV_CommonFunctions::jev_strftime(JText::_("DATE_FORMAT_4"), JevDate::strtotime($olp->startrepeat)), JEV_CommonFunctions::jev_strftime(JText::_("DATE_FORMAT_4"), JevDate::strtotime($olp->endrepeat)), $olp->conflictCause);
            $overlap->conflictMessage = addslashes($overlap->conflictMessage);
            $overlap->url = JURI::root() . "index.php?option=com_jevents&task=icalrepeat.detail&evid=" . $olp->rp_id . "&year={$y}&month={$m}&day={$d}";
            $overlap->url = str_replace("components/com_jevents/libraries/", "", $overlap->url);
            $returnData->overlaps[] = $overlap;
        }
    }
    if ($requestObject->error) {
        $returnData->allclear = 0;
        return "Error";
    }
    return $returnData;
//.........这里部分代码省略.........
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:101,代码来源:checkconflict.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP JEditor类代码示例发布时间:2022-05-23
下一篇:
PHP JEVHelper类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap