| Server IP : 54.36.91.62 / Your IP : 216.73.217.94 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/c/o/o/coopiak/amisdesseniors-fr/plugins/content/jlexreview/elements/ |
Upload File : |
<?php
defined('_JEXEC') or die;
$j5 = JPATH_ROOT.'/administrator/components/com_jlexreview/libs/j5.php';
if(file_exists($j5))
require_once $j5;
jimport ( 'joomla.form.formfield' );
class JFormFieldiCagenda extends JFormField
{
protected $type = 'iCagenda';
protected function getInput()
{
$db = JFactory::getDBO();
// Check K2 installed yet?
$loader = JPATH_ROOT.'/components/com_icagenda/icagenda.php';
if(!is_file($loader))
{
return '<span style="color:red">iCagenda not installed.</span>';
}
$query = $db->getQuery(true);
$query->select('id,title')
->from('#__icagenda_category')
->order('title ASC');
$result = $db->setQuery($query)->loadObjectList();
if(!$result)
{
return '<span style="color:red">No category found.</span>';
}
$mitems = array();
if($result)
{
foreach($result as $item)
{
$mitems[] = JHtml::_('select.option', $item->id, $item->title);
}
}
$fieldName = $this->name.'[]'; // allow select multiple categories
$output = JHtml::_('select.genericlist', $mitems, $fieldName, 'class="inputbox" multiple="multiple" size="10"', 'value', 'text', $this->value);
return $output;
}
}