? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/public_html/old/administrator/components/com_coalawebtraffic/models/
File Upload :
Current File : /home/admin/public_html/old/administrator/components/com_coalawebtraffic/models/csvreportall.php

<?php

/**
 * @package             Joomla
 * @subpackage          com_coalawebtraffic
 * @author              Steven Palmer
 * @author url          http://coalaweb.com
 * @author email        support@coalaweb.com
 * @license             GNU/GPL, see /files/en-GB.license.txt
 * @copyright           Copyright (c) 2016 Steven Palmer All rights reserved.
 *
 * CoalaWeb Traffic is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

defined('_JEXEC') or die('Restricted access');

// import Joomla modelform library
jimport('joomla.application.component.modellist');

// import helper so we can use the component options
jimport('joomla.application.component.helper');

JLoader::register('CoalawebtrafficModelVisitors', JPATH_COMPONENT . '/models/visitors.php');

/**
 * Methods supporting the export of CSV report
 *
 * @package    Joomla.Administrator
 * @subpackage com_coalawebtraffic
 */
class CoalawebtrafficModelCSVReportAll extends CoalawebtrafficModelVisitors
{

    /**
     * Get data with the help of the visitors model
     * 
     * @return query
     */
    protected function getListQuery() 
    {
        $storeRaw = JComponentHelper::getParams('com_coalawebtraffic')->get('store_raw', 1);
        
        // Create a new query object.
        $db = $this->getDbo();
        $query = $db->getQuery(true);

        // Select the required fields from the table.
        if ($storeRaw) {
            $query->select('a.id AS ID, DATE(FROM_UNIXTIME(tm)) AS Date, TIME(FROM_UNIXTIME(tm)) AS Time, a.ip as IP, a.browser as Browser, a.bversion as Version, a.platform as Platform, a.country_name AS Country, a.city AS City');
        } else {
            $query->select('a.id AS ID, DATE(FROM_UNIXTIME(tm)) AS Date, TIME(FROM_UNIXTIME(tm)) AS Time, a.browser as Browser, a.bversion as Version, a.platform as Platform, a.country_name AS Country, a.city AS City');
        }

        // From the cwtraffic table
        $query->from($db->qn('#__cwtraffic') . ' AS a');

        return $query;
    }

}

T1KUS90T
  root-grov@210.1.60.28:~$