403Webshell
Server IP : 103.234.187.230  /  Your IP : 216.73.216.216
Web Server : Apache
System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/junkdata/holidays.tripjack.comOLDSEP11bak/application/models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/junkdata/holidays.tripjack.comOLDSEP11bak/application/models/Markup.php
<?php

class Travel_Model_Markup
{

	protected $db = NULL;
	public $intId = NULL;

	/*     * ************************************ */

	public function __construct()
	{
		$request = Zend_Controller_Front::getInstance()->getRequest();
		$this->baseUrl = $request->getScheme() . '://' . $request->getHttpHost();
		$this->db = Zend_Db_Table::getDefaultAdapter();
	}

	public function __destruct()
	{
		$this->db->closeConnection();
	}
	public function insertTable($tablename, array $addData)
	{
		$dbtable = new Zend_Db_Table($tablename);
		return $dbtable->insert($addData);
	}
	public function updateTable($tablename, array $addData, $where)
	{
		return $this->db->update($tablename, $addData, $where);
	}

	public function getDetailsForFlight($table, $AgencySysId, $AccomType, $ItemSourceType, $MPType)
	{
		$select = $this->db->select()
			->from("$table")
			->where("IsApproved =?", 1)
			->where("IsMarkForDel =?", 0)
			->where("MPType =?", $MPType)
			->where("ItemSourceType =?", $ItemSourceType)
			->where("AirType =?", $AccomType)
			->where("AgencySysId =?", $AgencySysId);
		$result = $this->db->fetchRow($select);
		return $result;
	}
	public function getDetailsForHotel($table, $AgencySysId, $AccomType, $ItemSourceType, $MPType)
	{
		$select = $this->db->select()
			->from("$table")
			->where("IsApproved =?", 1)
			->where("IsMarkForDel =?", 0)
			->where("MPType =?", $MPType)
			->where("ItemSourceType =?", $ItemSourceType)
			->where("AccomType =?", $AccomType)
			->where("AgencySysId =?", $AgencySysId);
			//echo $select;die;
		$result = $this->db->fetchRow($select);
		return $result;
	}
	public function getDetailsForHotelAgency($table, $AgencySysId)
	{
		try {
			$select = $this->db->select()
				->from("$table")
				->where("IsApproved =?", 1)
				->where("IsMarkForDel =?", 0)
				->where("AgencySysId =?", $AgencySysId);
			$result = $this->db->fetchAll($select);
			return $result;
		} catch (Zend_Exception $e) {
			print_r($e->getMessage());
			exit;
		}
	}

	public function getAgencyMarkups($intAirType, $AgencySysId)
	{
		$arrAirMarkups = array('Currency', 'AirType', 'MarkUpType', 'StdMarkUpPer', 'TaxPer', 'CommssionType', 'CommssionVal');
		$select = $this->db->select();
		$select->from(array('tbl' => "tb_mp_stdmarkup_air"), $arrAirMarkups);
		if (!empty($AgencySysId)) {
			$select->where("tbl.AgencySysId = ?", $AgencySysId);
		}
		//$select->where("tbl.AgencySysId = ?", $AgencySysId);
		$select->where("tbl.ItemSourceType = ?", 1);
		$select->where("tbl.AirType = ?", $intAirType);
		$select->where("tbl.MPType = ?", 2);
		$select->where("tbl.IsApproved = ?", 1);
		$select->where("tbl.IsMarkForDel = ?", 0);
		$select->where("tbl.IsActive = ?", 1);
		$select->limit(1);
		//echo $select; exit;
		$result = $this->db->fetchAll($select);

		return $result;
	}
	public function getAgencyMarkupsHotel($intAirType, $AgencySysId)
	{
		$arrAirMarkups = array('Currency', 'AccomType', 'MarkUpType', 'MarkUp');
		$select = $this->db->select();
		$select->from(array('tbl' => "tb_mp_stdmarkup_accom"), $arrAirMarkups);
		if (!empty($AgencySysId)) {
			$select->where("tbl.AgencySysId = ?", $AgencySysId);
		}
		//$select->where("tbl.AgencySysId = ?", $AgencySysId);
		$select->where("tbl.ItemSourceType = ?", 1);
		$select->where("tbl.AccomType = ?", $intAirType);
		$select->where("tbl.MPType = ?", 2);
		$select->where("tbl.IsApproved = ?", 1);
		$select->where("tbl.IsMarkForDel = ?", 0);
		$select->where("tbl.IsActive = ?", 1);
		$select->limit(1);
		//echo $select; exit;
		$result = $this->db->fetchAll($select);

		return $result;
	}

	public function getAgencyCancellation($ItemSourceType, $AgencySysId)
	{
		$arrAirMarkups = array('ServiceType', 'AgencySysId', 'ItemSourceType', 'MPType', 'MarkUpType', 'MarkUp');
		$select = $this->db->select();
		$select->from(array('tbl' => "tb_agency_cancellation_charges"), $arrAirMarkups);
		if (!empty($AgencySysId)) {
			$select->where("tbl.AgencySysId = ?", $AgencySysId);
		}
		$select->where("tbl.ItemSourceType = ?", $ItemSourceType);
		$select->where("tbl.IsMarkForDel = ?", 0);
		$select->where("tbl.IsActive = ?", 1);
		$select->limit(1);
		//echo $select; exit;
		$result = $this->db->fetchAll($select);
		$MarkUp = isset($result[0]['MarkUp']) ? $result[0]['MarkUp'] : 0;
		return $MarkUp;
	}

	public function DBConnect()
	{
		return $this->db;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit