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/b2bzend/application/models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2bzend/application/models//TblBulkPackage.php
<?php
/**
 * Class Bulk Package Master
 * Description 	This model contains the basic activity functions needed for packages.
 * @name	Bulk Package Master
 * @author	Praveen Kumar
 * @version 	1.0
 * @copyright 	Catabatic Automation Pvt. Ltd.
 * Handle 	Bulk Package Related function
 *
*/

class Travel_Model_TblBulkPackage extends Zend_Db_Table_Abstract
{
    #declare class vairables
    public $intId        = NULL;
     
    private $db          = NULL;
    
    /**
     * Class Constructors
    */
    public function __construct(){
        
        #initialize db adapter
        $this->db = Zend_Db_Table::getDefaultAdapter(); 
        
        $request = Zend_Controller_Front::getInstance()->getRequest();
        $this->baseUrl = $request->getScheme() . '://' . $request->getHttpHost();
        
        $registry = Zend_Registry::getInstance();
        $this->imageServerUrl = @$registry->imageServerURL;
    }
    
	
    
    public function __destruct() {
        $this->db->closeConnection(); 
    }  
    
    
    public function getAutoSuggest($term, $CitySysIds, $CountrySysId,$agencySysId = NULL)
    {
        $keyword = trim($term);
        $cond   = !empty($agencySysId) ? " AND (TA.IsApproved = '1' OR (TA.ICSourceSysId = '$agencySysId' AND TA.IsAgentSpec = 1)  ) " : " AND (TA.IsApproved = '1') ";
         $sql = "SELECT AccomSysId,TA.Title,EconomyType,ShortName,Stars,TC.Title as CityName FROM TB_IC_Accomdation as TA
                 LEFT JOIN TB_Master_Geo_City as TC ON TA.CitySysId = TC.CityId
                  WHERE TA.Title != '' AND TA.Title like '%".$keyword."%' AND CitySysId = '".$CitySysIds."'
                  AND TA.IsMarkForDel = '0' AND TA.IsActive = '1'  $cond ORDER BY TA.Title ASC";

//        $sql = " SELECT AccomSysId, TB_IC_Accomdation.Title, ShortName, Stars, TB_Master_Geo_City.Title as CityName, TB_IC_Accomdation.ContSysId
//                FROM TB_IC_Accomdation 
//                LEFT JOIN TB_Master_Geo_City ON TB_IC_Accomdation.CitySysId = TB_Master_Geo_City.CityId
//                WHERE 1 = 1 " ;
//        $sql .= " AND TB_IC_Accomdation.Title like '%".$keyword."%' AND TB_IC_Accomdation.ContSysId = '" .$CountrySysId."' AND TB_IC_Accomdation.CitySysId = '" .$CitySysIds."' ";  
//        $sql .= " AND TB_IC_Accomdation.IsActive='1' AND TB_IC_Accomdation.IsMarkForDel='0'";
//        $sql .= " ORDER BY TB_IC_Accomdation.Title" ;
        
//        echo $sql; die;
        $rowset = $this->db->query($sql)->fetchAll();
        //echo "<pre>"; print_r($rowset);die;
        
        $response = array();
        if(count($rowset) >  0 ){
            foreach($rowset as $row) {
                //$response[] = array('AccomSysId' => $row['AccomSysId'], 'Title' => $row['Title']); ;
                $response[] = array('value' => $row['AccomSysId'],'hotelKeyName' => ucfirst(strtolower($row['Title'])), 'label' => $row['Title'] .' , '.$row['CityName'], 'Stars' => $row['Stars']);
                //$response[] = $row['Title'] ;
            }
        } else {
        $response[] = array('value' => -1 , 'label' => "Add Hotel (Using Google or Manually)");
        }
        
        return $response;
    }
    
    public function addMarkupSettings($data) {
        $this->db->insert('TB_IC_Accomdation_Info', $data);
        return $this->db->lastInsertId();
    }
    
    
    public function getAllHotelSupplementListByAgencyId($intAgencySysId, $hotelId) 
    {
        $select = $this->db->select()
                ->from(array("tb1" => "TB_IC_Accomdation_Info"), array('tb1.*','CONVERT(VARCHAR(24),tb1.StartDate,103) as FromDate','CONVERT(VARCHAR(24),tb1.EndDate,103) as ToDate'))
                ->joinLeft(array('tb2' => 'TB_IC_Accomdation'), 'tb2.AccomSysId=tb1.AccomSysId', array('tb2.Title as hotelName'))
                ->where("tb1.AgencySysId=?", $intAgencySysId)
                ->where("tb1.AccomSysId=?", $hotelId)
                ->where("tb1.IsActive=?", '1');
        $result = $this->db->fetchAll($select);
        return $result;
    }
    
    
    public function getTravelPlanLastId()
    {   
        $select = $this->db->select()
                ->from("TB_TravelPlan", array('TPSysId'))
                ->order("TPSysId DESC")
                ->limit(0);
        $result = $this->db->fetchRow($select);
        return $result;
    }
    
    public function deleteCustomizedMarkupSetting($InvnItemSysId)
    {
        $where = array('AccomInfoSysId = ? ' => $InvnItemSysId);
        $this->db->delete('TB_IC_Accomdation_Info', $where);
    }
    
}

Youez - 2016 - github.com/yon3zu
LinuXploit