| Server IP : 54.36.91.62 / Your IP : 216.73.217.112 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/coopiak/amisdesseniors-fr/administrator/components/com_jlexreview/models/fields/ |
Upload File : |
<?php
/**
* @package JLex Review
* @version 4.2.3
* @copyright Copyright (c) 2013-2018 JLexArt. All rights reserved
* @license GNU General Public License version 2 or later;
* @author www.jlexart.com
*/
defined('_JEXEC') or die;
class JFormFieldJSection extends JFormField
{
/**
* The form field type.
*
* @var string
* @since 1.6
*/
public $type = 'JSection';
/**
* Method to get the user field input markup.
*
* @return string The field input markup.
*
* @since 1.6
*/
protected function getInput()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select("*")
->from("#__jlexreview_form")
->order("name ASC");
$rows = $db->setQuery($query)->loadObjectList();
foreach ($rows as $k=>&$row)
{
$row->text = ucfirst($row->name);
$row->value = $row->id;
$row->url = JUri::base(true) . "/index.php?option=com_jlexreview&view=filesection&id=" . $row->id;
unset($row->id);
unset($row->name);
unset($row->params);
}
$url = JUri::base(true) . "/index.php?option=com_jlexreview&view=filesection";
$html = JHTML::_ ( 'select.genericlist',
$rows ,
$this->name,
' class="input-medium custom-select" ',
'value', 'text',
$this->value);
$html.= '<table class="table" style="margin-top:18px">';
$html.= '<thead>';
$html.= '<th>'.JText::_('JR_SECTION').'</th>';
$html.= '<th>'.JText::_('JR_ACTION').'</th>';
$html.= '</thead>';
$html.= '<tbody>';
foreach ($rows as $item)
{
$url2remove = JUri::base(true) . "/index.php?option=com_jlexreview&view=filesection&task=remove&id=" . $item->value;
$html.= '<tr>';
$html.= '<td><a href="'.$item->url.'">' . $item->text . '</a></td>';
$html.= '<td><a class="btn btn-small btn-danger" href="'. $url2remove .'">'. JText::_('JR_REMOVE') .'</a></td>';
$html.= '</tr>';
}
$html.= '<tr>';
$html.= '<td colspan="2">';
$html.= '<a class="btn btn-success" href="'.$url.'">'. JText::_('JR_NEW_FILE_SECTION') .'</a>';
$html.= '</td>';
$html.= '</tr>';
$html.= '</tbody>';
$html.= '</table>';
return $html;
}
}