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

PHP ELAdmin类代码示例

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

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



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

示例1: display

 function display($tpl = null)
 {
     $mainframe =& JFactory::getApplication();
     $option = JRequest::getCmd('option');
     //initialise variables
     $document =& JFactory::getDocument();
     $db =& JFactory::getDBO();
     $user =& JFactory::getUser();
     $elsettings = JComponentHelper::getParams('com_redevent');
     //get vars
     $filter_order = $mainframe->getUserStateFromRequest($option . '.archive.filter_order', 'filter_order', 'x.dates', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($option . '.archive.filter_order_Dir', 'filter_order_Dir', '', 'word');
     $filter = $mainframe->getUserStateFromRequest($option . '.archive.filter', 'filter', '', 'int');
     $filter = intval($filter);
     $search = $mainframe->getUserStateFromRequest($option . '.archive.search', 'search', '', 'string');
     $search = $db->getEscaped(trim(JString::strtolower($search)));
     $template = $mainframe->getTemplate();
     $document->setTitle(JText::_('COM_REDEVENT_PAGETITLE_ARCHIVE'));
     //add css and submenu to document
     $document->addStyleSheet('components/com_redevent/assets/css/redeventbackend.css');
     //Create Submenu
     ELAdmin::setMenu();
     JHTML::_('behavior.tooltip');
     //create the toolbar
     JToolBarHelper::title(JText::_('COM_REDEVENT_ARCHIVESCREEN'), 'archive');
     JToolBarHelper::customX('unarchive', 'redevent_unarchive', 'redevent_unarchive', JText::_('COM_REDEVENT_Unarchive'), true);
     JToolBarHelper::spacer();
     JToolBarHelper::deleteList();
     JToolBarHelper::spacer();
     if ($user->authorise('core.admin', 'com_redevent')) {
         JToolBarHelper::preferences('com_redevent', '600', '800');
     }
     // Get data from the model
     $rows =& $this->get('Data');
     //$total      = & $this->get( 'Total');
     $pageNav =& $this->get('Pagination');
     //search filter
     $filters = array();
     $filters[] = JHTML::_('select.option', '1', JText::_('COM_REDEVENT_EVENT_TITLE'));
     $filters[] = JHTML::_('select.option', '2', JText::_('COM_REDEVENT_VENUE'));
     $filters[] = JHTML::_('select.option', '3', JText::_('COM_REDEVENT_CITY'));
     $filters[] = JHTML::_('select.option', '4', JText::_('COM_REDEVENT_CATEGORY'));
     $lists['filter'] = JHTML::_('select.genericlist', $filters, 'filter', 'size="1" class="inputbox"', 'value', 'text', $filter);
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     /* Venue and time details */
     $eventvenues = $this->get('ArchiveEventVenues');
     // search filter
     $lists['search'] = $search;
     //assign data to template
     $this->assignRef('lists', $lists);
     $this->assignRef('user', $user);
     $this->assignRef('rows', $rows);
     $this->assignRef('pageNav', $pageNav);
     $this->assignRef('elsettings', $elsettings);
     $this->assignRef('template', $template);
     $this->assignRef('eventvenues', $eventvenues);
     parent::display($tpl);
 }
开发者ID:jaanusnurmoja,项目名称:redjoomla,代码行数:60,代码来源:view.html.php


示例2: getUpdatedata

 /**
  * Logic for the Update Check
  *
  * @access public
  * @return object
  * @since 0.9
  */
 function getUpdatedata()
 {
     $elsettings = ELAdmin::config();
     include_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'classes' . DS . 'Snoopy.class.php';
     $snoopy = new Snoopy();
     //set the source file
     $file = 'http://update.schlu.net/elupdate.php';
     $snoopy->read_timeout = 30;
     $snoopy->agent = "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.6.2) (KHTML, like Gecko)";
     $snoopy->fetch($file);
     $_updatedata = null;
     if ($snoopy->status != 200 || $snoopy->error) {
         $_updatedata->failed = 1;
     } else {
         $data = explode('|', $snoopy->results);
         $_updatedata->version = $data[0];
         $_updatedata->versiondetail = $data[1];
         $_updatedata->date = strftime($elsettings->formatdate, strtotime($data[2]));
         $_updatedata->info = $data[3];
         $_updatedata->download = $data[4];
         $_updatedata->notes = $data[5];
         $_updatedata->changes = explode(';', $data[6]);
         $_updatedata->failed = 0;
         $_updatedata->current = version_compare('0.9.0.0.alpha', $_updatedata->version);
     }
     return $_updatedata;
 }
开发者ID:reeleis,项目名称:ohiocitycycles,代码行数:34,代码来源:updatecheck.php


示例3: check

 function check()
 {
     if (!$this->text_name) {
         $this->setError(JText::_('COM_REDEVENT_NAME_IS_REQUIRED'));
         return false;
     }
     // check tag unicity
     $exists = ELAdmin::checkTagExists($this->text_name);
     if ($exists && !($exists->section == 'library' && $exists->id == $this->id)) {
         $this->setError(JText::sprintf('COM_REDEVENT_ERROR_TAG_ALREADY_EXISTS', $exists->section));
         return false;
     }
     return true;
 }
开发者ID:jaanusnurmoja,项目名称:redjoomla,代码行数:14,代码来源:textlibrary.php


示例4: display

 function display($tpl = null)
 {
     global $mainframe, $option;
     //initialise variables
     $db =& JFactory::getDBO();
     $elsettings = ELAdmin::config();
     $document =& JFactory::getDocument();
     JHTML::_('behavior.tooltip');
     JHTML::_('behavior.modal');
     //get var
     $filter_order = $mainframe->getUserStateFromRequest($option . '.eventelement.filter_order', 'filter_order', 'a.dates', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($option . '.eventelement.filter_order_Dir', 'filter_order_Dir', '', 'word');
     $filter = $mainframe->getUserStateFromRequest($option . '.eventelement.filter', 'filter', '', 'int');
     $filter_state = $mainframe->getUserStateFromRequest($option . '.eventelement.filter_state', 'filter_state', '*', 'word');
     $search = $mainframe->getUserStateFromRequest($option . '.eventelement.search', 'search', '', 'string');
     $search = $db->getEscaped(trim(JString::strtolower($search)));
     $template = $mainframe->getTemplate();
     //prepare the document
     $document->setTitle(JText::_('SELECTEVENT'));
     $document->addStyleSheet('templates/' . $template . '/css/general.css');
     $document->addStyleSheet('components/com_eventlist/assets/css/eventlistbackend.css');
     //Get data from the model
     $rows =& $this->get('Data');
     //		$total      = & $this->get( 'Total');
     $pageNav =& $this->get('Pagination');
     //publish unpublished filter
     $lists['state'] = JHTML::_('grid.state', $filter_state);
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     //Create the filter selectlist
     $filters = array();
     $filters[] = JHTML::_('select.option', '1', JText::_('EVENT TITLE'));
     $filters[] = JHTML::_('select.option', '2', JText::_('VENUE'));
     $filters[] = JHTML::_('select.option', '3', JText::_('CITY'));
     $filters[] = JHTML::_('select.option', '4', JText::_('CATEGORY'));
     $lists['filter'] = JHTML::_('select.genericlist', $filters, 'filter', 'size="1" class="inputbox"', 'value', 'text', $filter);
     // search filter
     $lists['search'] = $search;
     //assign data to template
     $this->assignRef('lists', $lists);
     $this->assignRef('rows', $rows);
     $this->assignRef('pageNav', $pageNav);
     $this->assignRef('elsettings', $elsettings);
     parent::display($tpl);
 }
开发者ID:RangerWalt,项目名称:ecci,代码行数:46,代码来源:view.html.php


示例5: uploadimage

 /**
  * logic for uploading an image
  *
  * @access public
  * @return void
  * @since 0.9
  */
 function uploadimage()
 {
     global $mainframe;
     // Check for request forgeries
     JRequest::checkToken() or die('Invalid Token');
     $elsettings = ELAdmin::config();
     $file = JRequest::getVar('userfile', '', 'files', 'array');
     $task = JRequest::getVar('task');
     // Set FTP credentials, if given
     jimport('joomla.client.helper');
     JClientHelper::setCredentialsFromRequest('ftp');
     //$ftp = JClientHelper::getCredentials('ftp');
     //set the target directory
     if ($task == 'venueimgup') {
         $base_Dir = JPATH_SITE . DS . 'images' . DS . 'eventlist' . DS . 'venues' . DS;
     } else {
         $base_Dir = JPATH_SITE . DS . 'images' . DS . 'eventlist' . DS . 'events' . DS;
     }
     //do we have an upload?
     if (empty($file['name'])) {
         echo "<script> alert('" . JText::_('IMAGE EMPTY') . "'); window.history.go(-1); </script>\n";
         $mainframe->close();
     }
     //check the image
     $check = ELImage::check($file, $elsettings);
     if ($check === false) {
         $mainframe->redirect($_SERVER['HTTP_REFERER']);
     }
     //sanitize the image filename
     $filename = ELImage::sanitize($base_Dir, $file['name']);
     $filepath = $base_Dir . $filename;
     //upload the image
     if (!JFile::upload($file['tmp_name'], $filepath)) {
         echo "<script> alert('" . JText::_('UPLOAD FAILED') . "'); window.history.go(-1); </script>\n";
         $mainframe->close();
     } else {
         echo "<script> alert('" . JText::_('UPLOAD COMPLETE') . "'); window.history.go(-1); window.parent.elSelectImage('{$filename}', '{$filename}'); </script>\n";
         $mainframe->close();
     }
 }
开发者ID:RangerWalt,项目名称:ecci,代码行数:47,代码来源:imagehandler.php


示例6: _displayImport

 function _displayImport($tpl = null)
 {
     $document =& JFactory::getDocument();
     $document->setTitle(JText::_('COM_REDEVENT_PAGETITLE_TEXTLIBRARY_IMPORT'));
     //add css and submenu to document
     $document->addStyleSheet('components/com_redevent/assets/css/redeventbackend.css');
     //Create Submenu
     ELAdmin::setMenu();
     JHTML::_('behavior.tooltip');
     //create the toolbar
     JToolBarHelper::title(JText::_('COM_REDEVENT_PAGETITLE_TEXTLIBRARY_IMPORT'), 'events');
     JToolBarHelper::back();
     $lists = array();
     //assign data to template
     $this->assignRef('lists', $lists);
     parent::display($tpl);
 }
开发者ID:jaanusnurmoja,项目名称:redjoomla,代码行数:17,代码来源:view.html.php


示例7: store

 /**
  * Method to store the event
  *
  * @access	public
  * @return	boolean	True on success
  * @since	1.5
  */
 function store($data)
 {
     global $mainframe;
     $elsettings = ELAdmin::config();
     $user =& JFactory::getUser();
     $tzoffset = $mainframe->getCfg('offset');
     $row =& JTable::getInstance('eventlist_events', '');
     // Bind the form fields to the table
     if (!$row->bind($data)) {
         $this->setError($this->_db->getErrorMsg());
         return false;
     }
     // Check/sanitize the metatags
     $row->meta_description = htmlspecialchars(trim(addslashes($row->meta_description)));
     if (JString::strlen($row->meta_description) > 255) {
         $row->meta_description = JString::substr($row->meta_description, 0, 254);
     }
     $row->meta_keywords = htmlspecialchars(trim(addslashes($row->meta_keywords)));
     if (JString::strlen($row->meta_keywords) > 200) {
         $row->meta_keywords = JString::substr($row->meta_keywords, 0, 199);
     }
     //Check if image was selected
     jimport('joomla.filesystem.file');
     $format = JFile::getExt('JPATH_SITE/images/eventlist/events/' . $row->datimage);
     $allowable = array('gif', 'jpg', 'png');
     if (in_array($format, $allowable)) {
         $row->datimage = $row->datimage;
     } else {
         $row->datimage = '';
     }
     // sanitise id field
     $row->id = (int) $row->id;
     $nullDate = $this->_db->getNullDate();
     // Are we saving from an item edit?
     if ($row->id) {
         $row->modified = gmdate('Y-m-d H:i:s');
         $row->modified_by = $user->get('id');
     } else {
         $row->modified = $nullDate;
         $row->modified_by = '';
         //get IP, time and userid
         $row->created = gmdate('Y-m-d H:i:s');
         $row->author_ip = $elsettings->storeip ? getenv('REMOTE_ADDR') : 'DISABLED';
         $row->created_by = $user->get('id');
     }
     // Make sure the data is valid
     if (!$row->check($elsettings)) {
         $this->setError($row->getError());
         return false;
     }
     // Store the table to the database
     if (!$row->store(true)) {
         $this->setError($this->_db->getErrorMsg());
         return false;
     }
     return $row->id;
 }
开发者ID:janssit,项目名称:www.kadulleke.be,代码行数:64,代码来源:event.php


示例8: store

 /**
  * Method to store the venue
  *
  * @access	public
  * @return	boolean	True on success
  * @since	1.5
  */
 function store($data)
 {
     $elsettings = ELAdmin::config();
     $user =& JFactory::getUser();
     $config =& JFactory::getConfig();
     $tzoffset = $config->getValue('config.offset');
     $row =& $this->getTable('eventlist_venues', '');
     // bind it to the table
     if (!$row->bind($data)) {
         JError::raiseError(500, $this->_db->getErrorMsg());
         return false;
     }
     // Check if image was selected
     jimport('joomla.filesystem.file');
     $format = JFile::getExt(JPATH_SITE . '/images/eventlist/venues/' . $row->locimage);
     $allowable = array('gif', 'jpg', 'png');
     if (in_array($format, $allowable)) {
         $row->locimage = $row->locimage;
     } else {
         $row->locimage = '';
     }
     // sanitise id field
     $row->id = (int) $row->id;
     $nullDate = $this->_db->getNullDate();
     // Are we saving from an item edit?
     if ($row->id) {
         $row->modified = gmdate('Y-m-d H:i:s');
         $row->modified_by = $user->get('id');
     } else {
         $row->modified = $nullDate;
         $row->modified_by = '';
         //get IP, time and userid
         $row->created = gmdate('Y-m-d H:i:s');
         $row->author_ip = $elsettings->storeip ? getenv('REMOTE_ADDR') : 'DISABLED';
     }
     //uppercase needed by mapservices
     if ($row->country) {
         $row->country = JString::strtoupper($row->country);
     }
     //update item order
     if (!$row->id) {
         $row->ordering = $row->getNextOrder();
     }
     $row->version++;
     // Make sure the data is valid
     if (!$row->check($elsettings)) {
         $this->setError($row->getError());
         return false;
     }
     // Store it in the db
     if (!$row->store()) {
         JError::raiseError(500, $this->_db->getErrorMsg());
         return false;
     }
     return $row->id;
 }
开发者ID:julienV,项目名称:testrepo,代码行数:63,代码来源:venue.php


示例9: _displayuploadimage

 /**
  * Prepares the upload image screen
  *
  * @param $tpl
  *
  * @since 0.9
  */
 function _displayuploadimage($tpl = null)
 {
     //initialise variables
     $document =& JFactory::getDocument();
     $uri =& JFactory::getURI();
     $elsettings = ELAdmin::config();
     //get vars
     $task = JRequest::getVar('task');
     //add css
     $document->addStyleSheet('components/com_eventlist/assets/css/eventlistbackend.css');
     jimport('joomla.client.helper');
     $ftp =& JClientHelper::setCredentialsFromRequest('ftp');
     //assign data to template
     $this->assignRef('task', $task);
     $this->assignRef('elsettings', $elsettings);
     $this->assignRef('request_url', $uri->toString());
     $this->assignRef('ftp', $ftp);
     parent::display($tpl);
 }
开发者ID:RangerWalt,项目名称:ecci,代码行数:26,代码来源:view.html.php


示例10: getCategories

 /**
  * Get a option list of all categories
  */
 public function getCategories()
 {
     return ELAdmin::getCategoriesOptions();
 }
开发者ID:jaanusnurmoja,项目名称:redjoomla,代码行数:7,代码来源:event.php


示例11: display

 function display($tpl = null)
 {
     global $mainframe, $option;
     //initialise variables
     $user =& JFactory::getUser();
     $document =& JFactory::getDocument();
     $db =& JFactory::getDBO();
     $elsettings = ELAdmin::config();
     //get vars
     $filter_order = $mainframe->getUserStateFromRequest($option . '.events.filter_order', 'filter_order', 'a.dates', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($option . '.events.filter_order_Dir', 'filter_order_Dir', '', 'word');
     $filter_state = $mainframe->getUserStateFromRequest($option . '.events.filter_state', 'filter_state', '*', 'word');
     $filter = $mainframe->getUserStateFromRequest($option . '.events.filter', 'filter', '', 'int');
     $search = $mainframe->getUserStateFromRequest($option . '.events.search', 'search', '', 'string');
     $search = $db->getEscaped(trim(JString::strtolower($search)));
     $template = $mainframe->getTemplate();
     //add css and submenu to document
     $document->addStyleSheet('components/com_eventlist/assets/css/eventlistbackend.css');
     //Create Submenu
     JSubMenuHelper::addEntry(JText::_('EVENTLIST'), 'index.php?option=com_eventlist');
     JSubMenuHelper::addEntry(JText::_('EVENTS'), 'index.php?option=com_eventlist&view=events', true);
     JSubMenuHelper::addEntry(JText::_('VENUES'), 'index.php?option=com_eventlist&view=venues');
     JSubMenuHelper::addEntry(JText::_('CATEGORIES'), 'index.php?option=com_eventlist&view=categories');
     JSubMenuHelper::addEntry(JText::_('ARCHIVE'), 'index.php?option=com_eventlist&view=archive');
     JSubMenuHelper::addEntry(JText::_('GROUPS'), 'index.php?option=com_eventlist&view=groups');
     JSubMenuHelper::addEntry(JText::_('HELP'), 'index.php?option=com_eventlist&view=help');
     if ($user->get('gid') > 24) {
         JSubMenuHelper::addEntry(JText::_('SETTINGS'), 'index.php?option=com_eventlist&controller=settings&task=edit');
     }
     JHTML::_('behavior.tooltip');
     //create the toolbar
     JToolBarHelper::title(JText::_('EVENTS'), 'events');
     JToolBarHelper::archiveList();
     JToolBarHelper::spacer();
     JToolBarHelper::publishList();
     JToolBarHelper::spacer();
     JToolBarHelper::unpublishList();
     JToolBarHelper::spacer();
     JToolBarHelper::addNew();
     JToolBarHelper::spacer();
     JToolBarHelper::editList();
     JToolBarHelper::spacer();
     JToolBarHelper::deleteList();
     JToolBarHelper::spacer();
     JToolBarHelper::custom('copy', 'copy.png', 'copy_f2.png', 'Copy');
     JToolBarHelper::spacer();
     JToolBarHelper::help('el.listevents', true);
     // Get data from the model
     $rows =& $this->get('Data');
     //$total      = & $this->get( 'Total');
     $pageNav =& $this->get('Pagination');
     //publish unpublished filter
     $lists['state'] = JHTML::_('grid.state', $filter_state);
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     //search filter
     $filters = array();
     $filters[] = JHTML::_('select.option', '1', JText::_('EVENT TITLE'));
     $filters[] = JHTML::_('select.option', '2', JText::_('VENUE'));
     $filters[] = JHTML::_('select.option', '3', JText::_('CITY'));
     $filters[] = JHTML::_('select.option', '4', JText::_('CATEGORY'));
     $lists['filter'] = JHTML::_('select.genericlist', $filters, 'filter', 'size="1" class="inputbox"', 'value', 'text', $filter);
     // search filter
     $lists['search'] = $search;
     //assign data to template
     $this->assignRef('lists', $lists);
     $this->assignRef('rows', $rows);
     $this->assignRef('pageNav', $pageNav);
     $this->assignRef('user', $user);
     $this->assignRef('template', $template);
     $this->assignRef('elsettings', $elsettings);
     parent::display($tpl);
 }
开发者ID:reeleis,项目名称:ohiocitycycles,代码行数:74,代码来源:view.html.php


示例12: _displayprint

 /**
  * Prepares the print screen
  *
  * @param $tpl
  *
  * @since 0.9
  */
 function _displayprint($tpl = null)
 {
     $elsettings = ELAdmin::config();
     $document =& JFactory::getDocument();
     $document->addStyleSheet('components/com_eventlist/assets/css/eventlistbackend.css');
     $rows =& $this->get('Data');
     $event =& $this->get('Event');
     $event->dates = strftime($elsettings->formatdate, strtotime($event->dates));
     //assign data to template
     $this->assignRef('rows', $rows);
     $this->assignRef('event', $event);
     parent::display($tpl);
 }
开发者ID:RangerWalt,项目名称:ecci,代码行数:20,代码来源:view.html.php


示例13: _displayaddvenue

 /**
  * Creates the output for the add venue screen
  *
  * @since 0.9
  *
  */
 function _displayaddvenue($tpl)
 {
     //initialise variables
     $editor =& JFactory::getEditor();
     $document =& JFactory::getDocument();
     $uri =& JFactory::getURI();
     $elsettings = ELAdmin::config();
     //add css and js to document
     JHTML::_('behavior.modal', 'a.modal');
     JHTML::_('behavior.tooltip');
     //Build the image select functionality
     $js = "\n\t\tfunction elSelectImage(image, imagename) {\n\t\t\tdocument.getElementById('a_image').value = image;\n\t\t\tdocument.getElementById('a_imagename').value = imagename;\n\t\t\tdocument.getElementById('sbox-window').close();\n\t\t}";
     $link = 'index.php?option=com_eventlist&amp;view=imagehandler&amp;layout=uploadimage&amp;task=venueimg&amp;tmpl=component';
     $link2 = 'index.php?option=com_eventlist&amp;view=imagehandler&amp;task=selectvenueimg&amp;tmpl=component';
     $document->addScriptDeclaration($js);
     $imageselect = "\n<input style=\"background: #ffffff;\" type=\"text\" id=\"a_imagename\" value=\"" . JText::_('SELECTIMAGE') . "\" disabled=\"disabled\" onchange=\"javascript:if (document.forms[0].a_imagename.value!='') {document.imagelib.src='../images/eventlist/venues/' + document.forms[0].a_imagename.value} else {document.imagelib.src='../images/blank.png'}\"; /><br />";
     $imageselect .= "<div class=\"button2-left\"><div class=\"blank\"><a class=\"modal\" title=\"" . JText::_('Upload') . "\" href=\"{$link}\" rel=\"{handler: 'iframe', size: {x: 650, y: 375}}\">" . JText::_('Upload') . "</a></div></div>\n";
     $imageselect .= "<div class=\"button2-left\"><div class=\"blank\"><a class=\"modal\" title=\"" . JText::_('SELECTIMAGE') . "\" href=\"{$link2}\" rel=\"{handler: 'iframe', size: {x: 650, y: 375}}\">" . JText::_('SELECTIMAGE') . "</a></div></div>\n";
     $imageselect .= "\n&nbsp;<input class=\"inputbox\" type=\"button\" onclick=\"elSelectImage('', '" . JText::_('SELECTIMAGE') . "' );\" value=\"" . JText::_('Reset') . "\" />";
     $imageselect .= "\n<input type=\"hidden\" id=\"a_image\" name=\"locimage\" value=\"" . JText::_('SELECTIMAGE') . "\" />";
     $countries = array();
     $countries[] = JHTML::_('select.option', '', JText::_('Select country'));
     $countries = array_merge($countries, ELHelper::getCountryOptions());
     $lists['countries'] = JHTML::_('select.genericlist', $countries, 'country', 'class="inputbox"', 'value', 'text');
     unset($countries);
     //set published
     $published = 1;
     //assign to template
     $this->assignRef('editor', $editor);
     $this->assignRef('imageselect', $imageselect);
     $this->assignRef('published', $published);
     $this->assignRef('request_url', $uri->toString());
     $this->assignRef('elsettings', $elsettings);
     $this->assignRef('lists', $lists);
     parent::display($tpl);
 }
开发者ID:julienV,项目名称:testrepo,代码行数:42,代码来源:view.html.php


示例14: _displayExport

 function _displayExport($tpl = null)
 {
     $document =& JFactory::getDocument();
     $document->setTitle(JText::_('COM_REDEVENT_PAGETITLE_VENUES_EXPORT'));
     //add css and submenu to document
     $document->addStyleSheet('components/com_redevent/assets/css/redeventbackend.css');
     //Create Submenu
     ELAdmin::setMenu();
     JHTML::_('behavior.tooltip');
     //create the toolbar
     JToolBarHelper::title(JText::_('COM_REDEVENT_PAGETITLE_VENUES_EXPORT'), 'events');
     JToolBarHelper::back();
     JToolBarHelper::custom('doexport', 'exportevents', 'exportevents', JText::_('COM_REDEVENT_BUTTON_EXPORT'), false);
     $lists = array();
     $lists['categories'] = JHTML::_('select.genericlist', $this->get('CategoriesOptions'), 'categories[]', 'size="15" multiple="multiple"', 'value', 'text');
     //assign data to template
     $this->assignRef('lists', $lists);
     parent::display($tpl);
 }
开发者ID:jaanusnurmoja,项目名称:redjoomla,代码行数:19,代码来源:view.html.php


示例15: display

 function display($tpl = null)
 {
     $app =& JFactory::getApplication();
     // Load pane behavior
     jimport('joomla.html.pane');
     JHTML::_('behavior.tooltip');
     // Load the form validation behavior
     JHTML::_('behavior.formvalidation');
     //initialise variables
     $editor =& JFactory::getEditor();
     $document =& JFactory::getDocument();
     $pane =& JPane::getInstance('sliders');
     $user =& JFactory::getUser();
     $db =& JFactory::getDBO();
     $settings = ELAdmin::config();
     $nullDate = $db->getNullDate();
     //get vars
     $cid = JRequest::getInt('cid');
     //add css and js to document
     $document->addScript('../includes/js/joomla/popup.js');
     $document->addStyleSheet('../includes/js/joomla/popup.css');
     $document->addStyleSheet('components/com_eventlist/assets/css/eventlistbackend.css');
     // Get data from the model
     $model =& $this->getModel();
     $row =& $this->get('Data');
     // fail if checked out not by 'me'
     if ($row->id) {
         if ($model->isCheckedOut($user->get('id'))) {
             JError::raiseWarning('SOME_ERROR_CODE', $row->venue . ' ' . JText::_('EDITED BY ANOTHER ADMIN'));
             $app->redirect('index.php?option=com_eventlist&view=venues');
         }
     }
     //create the toolbar
     if ($cid) {
         JToolBarHelper::title(JText::_('EDIT VENUE'), 'venuesedit');
         //makes data safe
         JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'locdescription');
     } else {
         JToolBarHelper::title(JText::_('ADD VENUE'), 'venuesedit');
         //set the submenu
         JSubMenuHelper::addEntry(JText::_('EVENTLIST'), 'index.php?option=com_eventlist');
         JSubMenuHelper::addEntry(JText::_('EVENTS'), 'index.php?option=com_eventlist&view=events');
         JSubMenuHelper::addEntry(JText::_('VENUES'), 'index.php?option=com_eventlist&view=venues');
         JSubMenuHelper::addEntry(JText::_('CATEGORIES'), 'index.php?option=com_eventlist&view=categories');
         JSubMenuHelper::addEntry(JText::_('ARCHIVESCREEN'), 'index.php?option=com_eventlist&view=archive');
         JSubMenuHelper::addEntry(JText::_('GROUPS'), 'index.php?option=com_eventlist&view=groups');
         JSubMenuHelper::addEntry(JText::_('HELP'), 'index.php?option=com_eventlist&view=help');
         if ($user->get('gid') > 24) {
             JSubMenuHelper::addEntry(JText::_('SETTINGS'), 'index.php?option=com_eventlist&controller=settings&task=edit');
         }
     }
     JToolBarHelper::apply();
     JToolBarHelper::spacer();
     JToolBarHelper::save();
     JToolBarHelper::spacer();
     JToolBarHelper::cancel();
     JToolBarHelper::spacer();
     JToolBarHelper::help('el.editvenues', true);
     //Build the image select functionality
     $js = "\n\t\tfunction elSelectImage(image, imagename) {\n\t\t\tdocument.getElementById('a_image').value = image;\n\t\t\tdocument.getElementById('a_imagename').value = imagename;\n\t\t\tdocument.getElementById('imagelib').src = '../images/eventlist/venues/' + image;\n\t\t\tdocument.getElementById('sbox-window').close();\n\t\t}";
     $link = 'index.php?option=com_eventlist&amp;view=imagehandler&amp;layout=uploadimage&amp;task=venueimg&amp;tmpl=component';
     $link2 = 'index.php?option=com_eventlist&amp;view=imagehandler&amp;task=selectvenueimg&amp;tmpl=component';
     $document->addScriptDeclaration($js);
     JHTML::_('behavior.modal', 'a.modal');
     $imageselect = "\n<input style=\"background: #ffffff;\" type=\"text\" id=\"a_imagename\" value=\"{$row->locimage}\" disabled=\"disabled\" onchange=\"javascript:if (document.forms[0].a_imagename.value!='') {document.imagelib.src='../images/eventlist/venues/' + document.forms[0].a_imagename.value} else {document.imagelib.src='../images/blank.png'}\"; /><br />";
     $imageselect .= "<div class=\"button2-left\"><div class=\"blank\"><a class=\"modal\" title=\"" . JText::_('Upload') . "\" href=\"{$link}\" rel=\"{handler: 'iframe', size: {x: 650, y: 375}}\">" . JText::_('Upload') . "</a></div></div>\n";
     $imageselect .= "<div class=\"button2-left\"><div class=\"blank\"><a class=\"modal\" title=\"" . JText::_('SELECTIMAGE') . "\" href=\"{$link2}\" rel=\"{handler: 'iframe', size: {x: 650, y: 375}}\">" . JText::_('SELECTIMAGE') . "</a></div></div>\n";
     $imageselect .= "\n&nbsp;<input class=\"inputbox\" type=\"button\" onclick=\"elSelectImage('', '" . JText::_('SELECTIMAGE') . "' );\" value=\"" . JText::_('Reset') . "\" />";
     $imageselect .= "\n<input type=\"hidden\" id=\"a_image\" name=\"locimage\" value=\"{$row->locimage}\" />";
     $countries = array();
     $countries[] = JHTML::_('select.option', '', JText::_('Select country'));
     $countries = array_merge($countries, ELHelper::getCountryOptions());
     $lists['countries'] = JHTML::_('select.genericlist', $countries, 'country', 'class="inputbox"', 'value', 'text', $row->country);
     unset($countries);
     //assign data to template
     $this->assignRef('row', $row);
     $this->assignRef('pane', $pane);
     $this->assignRef('editor', $editor);
     $this->assignRef('settings', $settings);
     $this->assignRef('nullDate', $nullDate);
     $this->assignRef('imageselect', $imageselect);
     $this->assignRef('lists', $lists);
     parent::display($tpl);
 }
开发者ID:julienV,项目名称:testrepo,代码行数:84,代码来源:view.html.php


示例16: check

 /**
  * Overloaded check method to ensure data integrity
  *
  * @access public
  * @return boolean True on success
  * @since 1.0
  */
 function check()
 {
     // check that there is only alphanumerics in tag ?
     // check tag unicity
     $exists = ELAdmin::checkTagExists($this->tag);
     if ($exists && !($exists->section == 'custom' && $exists->id == $this->id)) {
         $this->setError(JText::sprintf('COM_REDEVENT_ERROR_TAG_ALREADY_EXISTS', $exists->section));
         return false;
     }
     return true;
 }
开发者ID:jaanusnurmoja,项目名称:redjoomla,代码行数:18,代码来源:redevent_customfield.php


示例17:

?>
</b>
						</td>
					</tr>
					<tr>
						<td>
							<?php 
echo JText::_('CATEGORIES TOTAL') . ': ';
?>
						</td>
						<td>
							<b><?php 
echo $this->category[2];
?>
</b>
						</td>
					</tr>
				</table>
				<?php 
echo $this->pane->endPanel();
echo $this->pane->endPane();
?>
			</td>
		</tr>
		</table>

	<p class="copyright">
		<?php 
echo ELAdmin::footer();
?>
	</p>
开发者ID:julienV,项目名称:testrepo,代码行数:31,代码来源:default.php


示例18: store

 /**
  * Method to store the event
  *
  * @access	public
  * @return	boolean	True on success
  * @since	1.5
  */
 function store($data)
 {
     //$app = & JFactory::getApplication();
     $elsettings = ELAdmin::config();
     $user =& JFactory::getUser();
     $cats = JRequest::getVar('cid', array(), 'post', 'array');
     $row =& JTable::getInstance('eventlist_events', '');
     // Bind the form fields to the table
     if (!$row->bind($data)) {
         $this->setError($this->_db->getErrorMsg());
         return false;
     }
     //get values from time selectlist and concatenate them accordingly
     $starthours = JRequest::getCmd('starthours');
     $startminutes = JRequest::getCmd('startminutes');
     $endhours = JRequest::getCmd('endhours');
     $endminutes = JRequest::getCmd('endminutes');
     $row->times = $starthours . ':' . $startminutes;
     $row->endtimes = $endhours . ':' . $endminutes;
     // Check the metatags
     if (JString::strlen($row->meta_description) > 255) {
         $row->meta_description = JString::substr($row->meta_description, 0, 254);
     }
     if (JString::strlen($row->meta_keywords) > 200) {
         $row->meta_keywords = JString::substr($row->meta_keywords, 0, 199);
     }
     //Check if image was selected
     jimport('joomla.filesystem.file');
     $format = JFile::getExt('JPATH_SITE/images/eventlist/events/' . $row->datimage);
     $allowable = array('gif', 'jpg', 'png');
     if (in_array($format, $allowable)) {
         $row->datimage = $row->datimage;
     } else {
         $row->datimage = '';
     }
     // sanitise id field
     $row->id = (int) $row->id;
     $nullDate = $this->_db->getNullDate();
     // Are we saving from an item edit?
     if ($row->id) {
         $row->modified = gmdate('Y-m-d H:i:s');
         $row->modified_by = $user->get('id');
     } else {
         $row->modified = $nullDate;
         $row->modified_by = '';
         //get IP, time and userid
         $row->created = gmdate('Y-m-d H:i:s');
         $row->author_ip = $elsettings->storeip ? getenv('REMOTE_ADDR') : 'DISABLED';
     }
     $row->version++;
     // Make sure the data is valid
     if (!$row->check($elsettings)) {
         $this->setError($row->getError());
         return false;
     }
     // Store the table to the database
     if (!$row->store(true)) {
         $this->setError($this->_db->getErrorMsg());
         return false;
     }
     //store cat relation
     $query = 'DELETE FROM #__eventlist_cats_event_relations WHERE itemid = ' . $row->id;
     $this->_db->setQuery($query);
     $this->_db->query();
     foreach ($cats as $cat) {
         $query = 'INSERT INTO #__eventlist_cats_event_relations (`catid`, `itemid`) VALUES(' . $cat . ',' . $row->id . ')';
         $this->_db->setQuery($query);
         $this->_db->query();
     }
     return $row->id;
 }
开发者ID:julienV,项目名称:testrepo,代码行数:78,代码来源:event.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP EM_Event类代码示例发布时间:2022-05-23
下一篇:
PHP EE_Transaction类代码示例发布时间: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