本文整理汇总了PHP中ELAdmin类的典型用法代码示例。如果您正苦于以下问题:PHP ELAdmin类的具体用法?PHP ELAdmin怎么用?PHP ELAdmin使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ELAdmin类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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;
}
示例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;
}
示例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);
}
示例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();
}
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例10: getCategories
/**
* Get a option list of all categories
*/
public function getCategories()
{
return ELAdmin::getCategoriesOptions();
}
示例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);
}
示例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);
}
示例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&view=imagehandler&layout=uploadimage&task=venueimg&tmpl=component';
$link2 = 'index.php?option=com_eventlist&view=imagehandler&task=selectvenueimg&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 <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);
}
示例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);
}
示例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&view=imagehandler&layout=uploadimage&task=venueimg&tmpl=component';
$link2 = 'index.php?option=com_eventlist&view=imagehandler&task=selectvenueimg&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 <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);
}