Beispiel #1
0
 function display($tpl = null)
 {
     $mainframe = MFactory::getApplication();
     $option = MRequest::getCmd('option');
     $document = MFactory::getDocument();
     $document->addStyleSheet(MURL_MIWOSQL . '/admin/assets/css/miwosql.css');
     MToolBarHelper::title(MText::_('MiwoSQL') . ' - ' . MText::_('COM_MIWOSQL_SAVED_QUERIES'), 'miwosql');
     MToolBarHelper::editList();
     MToolBarHelper::deleteList();
     // ACL
     if (version_compare(MVERSION, '1.6.0', 'ge') && MFactory::getUser()->authorise('core.admin', 'com_miwosql')) {
         MToolBarHelper::divider();
         MToolBarHelper::preferences('com_miwosql', '550');
     }
     $this->mainframe = MFactory::getApplication();
     $this->option = MRequest::getWord('option');
     $filter_order = $mainframe->getUserStateFromRequest($option . '.queries.filter_order', 'filter_order', 'title', 'string');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($option . '.queries.filter_order_Dir', 'filter_order_Dir', '', 'word');
     $search = $mainframe->getUserStateFromRequest($option . '.queries.search', 'search', '', 'string');
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     // search filter
     $lists['search'] = $search;
     $this->lists = $lists;
     $this->items = $this->get('Data');
     $this->pagination = $this->get('Pagination');
     parent::display($tpl);
 }
Beispiel #2
0
 public function display($tpl = null)
 {
     $document = MFactory::getDocument();
     $document->addStyleSheet(MURL_MIWOSQL . '/admin/assets/css/miwosql.css');
     // Toolbar
     MToolBarHelper::title(MText::_('MiwoSQL') . ' - ' . MText::_('COM_MIWOSQL_RUN_QUERY'), 'miwosql');
     if (MiwosqlHelper::is30()) {
         MToolBarHelper::custom('run', 'play.png', 'play.png', MText::_('COM_MIWOSQL_RUN_QUERY'), false);
         MToolBarHelper::divider();
         MToolBarHelper::custom('savequery', 'folder-close.png', 'folder-close.png', MText::_('COM_MIWOSQL_SAVE_QUERY'), false);
         MToolBarHelper::divider();
         MToolBarHelper::custom('csv', 'upload.png', 'upload.png', MText::_('COM_MIWOSQL_EXPORT_CSV'), false);
     } else {
         MToolBarHelper::custom('run', 'run.png', 'run.png', MText::_('COM_MIWOSQL_RUN_QUERY'), false);
         MToolBarHelper::divider();
         MToolBarHelper::custom('savequery', 'savequery.png', 'savequery.png', MText::_('COM_MIWOSQL_SAVE_QUERY'), false);
         MToolBarHelper::divider();
         MToolBarHelper::custom('csv', 'csv.png', 'csv.png', MText::_('COM_MIWOSQL_EXPORT_CSV'), false);
     }
     // ACL
     if (version_compare(MVERSION, '1.6.0', 'ge') && MFactory::getUser()->authorise('core.admin', 'com_miwosql')) {
         MToolBarHelper::divider();
         MToolBarHelper::preferences('com_miwosql', '550');
     }
     $this->data = $this->get('Data');
     $this->tables = $this->get('Tables');
     $this->prefix = $this->get('Prefix');
     parent::display($tpl);
 }