| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/icd/administrator/components/com_linkr/models/ |
Upload File : |
<?php
defined('_JEXEC') or die;
jimport( 'joomla.application.component.model' );
/**
* Bookmarks model for Linkr component
*
* @package Linkr
* @author Frank
*/
class LinkrModelBookmarks extends JModel
{
function getBookmarks()
{
if (isset( $this->_bms )) {
return $this->_bms;
}
// Retrieve bookmarks from database
$o = $this->getOrder();
$q = 'SELECT id,name,text,ordering,popular '.
'FROM #__linkr_bookmarks '.
'ORDER BY '. $o['order'] .
' '. $o['order_Dir'];
if ($list = $this->_getList( $q )) {
$this->_bms = $list;
} else {
$this->_bms = array();
}
return $this->_bms;
}
function getOrder()
{
if (isset( $this->_order )) {
return $this->_order;
}
$o = array();
global $mainframe;
$o['order'] = $mainframe->getUserStateFromRequest( 'linkrbm.order', 'filter_order', 'ordering', 'word' );
$o['order_Dir'] = $mainframe->getUserStateFromRequest( 'linkrbm.dir', 'filter_order_Dir', 'ASC', 'word' );
$this->_order = $o;
return $this->_order;
}
function getPagination()
{
if (!isset( $this->_page ))
{
$bms = $this->getBookmarks();
jimport( 'joomla.html.pagination' );
$this->_page = new JPagination( count( $bms ), 0, 0 );
}
return $this->_page;
}
}