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

class Travel_Model_TblSeason {
    
     
    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_Seasons.SeasonId' ;
    
    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 4 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 getSeasonListingRecord()
	{
		$sql = " SELECT AAc.SeasonId, AAC.Title, AAC.Icon, AAC.IsActive  FROM TB_Master_Seasons as AAC WHERE AAC.IsMarkForDel =0 " ;
			
			if(!empty($this->searchArr)) {
				//echo "<pre>"; print_r($this->searchArr); die;
				
				if($this->searchArr['Title']!='')
				{
				  $sql .= " AND AAC.Title LIKE '%".$this->searchArr['Title']."%' ";
				}
				if($this->searchArr['filter1']!='All' && $this->searchArr['filter1']!='')
				{
				  $sql .= " AND AAC.IsActive = '".$this->searchArr['filter1']."' ";
				}
				
			 }
			 
		     $sql .= " ORDER BY AAC.SeasonId DESC ";
			//echo $sql; //die();
			
		$rowset = $this->db->query($sql)->fetchAll();
        return $rowset;
	}
	
	
    # End : functions added by Shailender Joshi on 4 Oct 2016
    
}

Youez - 2016 - github.com/yon3zu
LinuXploit