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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/dcb/application/models/Lms.php
<?php

/* * *************************************************************
 * Catabatic Technology Pvt. Ltd.
 * File Name : Slider.php
 * File Description : Slider Model
 * Created By : Prashant Kumar
 * Created Date: 05-September-2023
 * ************************************************************* */

class Application_Model_Lms extends Zend_Db_Table_Abstract {

    function __construct() {
        
    }

    /**
     * add() method is used to add lms data
     * @param array
     * @return true 
     */
    public function add($addData = array()) {
        $dbtable = new Zend_Db_Table('tbl_lms');
        $dbtable->insert($addData);
    }

    public function addData($addData = array(), $table) {
        $dbtable = new Zend_Db_Table($table);
        $dbtable->insert($addData);
    }

    /**
     * getStateDetailsByStateId() method is used to get city list by state id
     * @param email string
     * @return object 
     */
    public function getStateDetailsByStateId($state_id) {
        $dbtable = new Zend_Db_Table('tbl_states');
        $select = $dbtable->select()
                ->where('id = ?', $state_id)
                ->where('status = ?', 'Activate');
        $result = $dbtable->fetchRow($select);
        return $result;
    }

    /**
     * getAllCityListByStateId() method is used to get city list by state id
     * @param email string
     * @return object 
     */
    public function getAllCityListByCityId($city_id) {
        $dbtable = new Zend_Db_Table('tbl_cities');
        $select = $dbtable->select()
                ->where('id = ?', $city_id)
                ->where('status = ?', 'Activate');
        $result = $dbtable->fetchRow($select);
        return $result;
    }

    /**
     * getPageTitleByPageUrl() method is used to get page title by page url
     * @param page_url string
     * @return object 
     */
    public function getPageTitleByPageUrl($reference_page_name) {
        $db = Zend_Db_Table::getDefaultAdapter();
        $select = $db->select()
                ->from(array("tbl_static_pages"), array('page_title'))
                ->where('status =?', 'Activate')
                ->where('page_key =?', $reference_page_name)
                ->where('is_publish =?', 1);
        $result = $db->fetchOne($select);
        return $result;
    }

    /**
     * getCountryCodeByCountry() method is used to get city list by state id
     * @param email string
     * @return object 
     */
    public function getCountryCodeByCountry($country_name) {
        $dbtable = new Zend_Db_Table('tbl_countries');
        $select = $dbtable->select()
                ->where('Name = ?', $country_name)
                ->where('status = ?', 'Activate');
        $result = $dbtable->fetchRow($select);
        return $result;
    }

    /**
     * getNriTrackingByIp() method is used to get city list by state id
     * @param email string
     * @return object 
     */
    public function getNriTrackingByIp($url_ip_address, $url_utm_content) {
        $dbtable = new Zend_Db_Table('tbl_nri_tracking_count');
        $select = $dbtable->select()
                ->where('ip_address = ?', $url_ip_address)
                ->where('source_name = ?', $url_utm_content)
                ->where('status = ?', '1')
                ->order('id DESC');
        $result = $dbtable->fetchRow($select);
        return $result;
    }

    /**
     * insertNriTracking() method is used to add lms data
     * @param array
     * @return true 
     */
    public function insertNriTracking($addData = array()) {
        $dbtable = new Zend_Db_Table('tbl_nri_tracking_count');
        $dbtable->insert($addData);
    }

    public function checkMultiPleLeadFromSoiceId($ids, $FormSysId) {
        $dbtable = Zend_Db_Table::getDefaultAdapter();
        $select = $dbtable->select();
        $select->from(array('tb1' => "tbl_facebook_lms"), array('SocialSysId'));
        $select->where("tb1.SocialSysId IN (?)", $ids);
        $select->where("tb1.SocialFormSysId = ?", $FormSysId);
        //echo $select; exit;
        $result = $dbtable->fetchAll($select);
        return $result;
    }

    public function checkLeadFromSoiceId($id) {
        $dbtable = Zend_Db_Table::getDefaultAdapter();
        $select = $dbtable->select();
        $select->from(array('tb1' => "tbl_facebook_lms"), array('Id'));
        $select->where("tb1.SocialSysId = ?", $id);
        //echo $select; exit;
        $result = $dbtable->fetchAll($select);
        return $result;
    }

    public function addFaceBookLead($addData = array()) {
        $dbtable = new Zend_Db_Table('tbl_facebook_lms');
        return $dbtable->insert($addData);
    }

    public function getComplaintCategory() {
        $dbtable = Zend_Db_Table::getDefaultAdapter();
        $select = $dbtable->select();
        $select->from(array('tb1' => "tbl_complaint_category"), array('id', 'name'));
        // $select->where("tb1.SocialSysId = ?", $id);
        //echo $select; exit;
        $result = $dbtable->fetchAll($select);
        return $result;
    }

    public function getComplaintSubCategory($id = NULL) {
        $dbtable = Zend_Db_Table::getDefaultAdapter();
        $select = $dbtable->select();
        $select->from(array('tb1' => "tbl_complaint_sub_category"), array('id', 'name'));
        if ($id) {
            $select->where("tb1.pid = ?", $id);
        }
        //echo $select; exit;
        $result = $dbtable->fetchAll($select);
        return $result;
    }

    public function getGrievanceData($id = NULL) {
        $dbtable = Zend_Db_Table::getDefaultAdapter();
        $select = $dbtable->select();
        $select->from(array('tb1' => "tbl_grievance"), array('id', 'name'));
        if ($id) {
            $select->where("tb1.pid = ?", $id);
        }
        //echo $select; exit;
        $result = $dbtable->fetchAll($select);
        return $result;
    }

    public function getComplaintCategoryFetchOne($id) {
        $dbtable = Zend_Db_Table::getDefaultAdapter();
        $select = $dbtable->select();
        $select->from(array('tb1' => "tbl_complaint_category"), array('id', 'name'));
        $select->where("tb1.id = ?", $id);
        //echo $select; exit;
        $result = $dbtable->fetchAll($select);
        return $result;
    }

    public function getComplaintSubCategoryFetchOne($id) {
        $dbtable = Zend_Db_Table::getDefaultAdapter();
        $select = $dbtable->select();
        $select->from(array('tb1' => "tbl_complaint_sub_category"), array('id', 'name'));
        $select->where("tb1.id = ?", $id);
        $result = $dbtable->fetchAll($select);
        return $result;
    }

    public function getGrievanceDataFetchOne($id) {
        $dbtable = Zend_Db_Table::getDefaultAdapter();
        $select = $dbtable->select();
        $select->from(array('tb1' => "tbl_grievance"), array('id', 'name'));
        $select->where("tb1.id = ?", $id);
        $result = $dbtable->fetchAll($select);
        return $result;
    }

    public function getOtpvalidateDb($ip, $pno) {
        $dbtable = Zend_Db_Table::getDefaultAdapter();
        $select = $dbtable->select();
        $todate = date("Y-m-d");
        $select->from(array('tb1' => "tbl_otp_validate"));
        if ($ip) {
            $select->where("tb1.ip_address = ?", $ip);
            $select->where("tb1.phone_no = ?", $pno);
            $select->where("DATE(tb1.create_date) = ?", $todate);
        }
        //echo $select; exit;
        $result = $dbtable->fetchAll($select);
        return $result;
    }
	public function updateData($editData=array(),$where)
    {   
        $dbtable = new Zend_Db_Table('tbl_otp_validate');
        $dbtable->update($editData,$where);
    }
	
    public function deleteOtpvalidateDb($ip, $pno) {
        $dbtable = new Zend_Db_Table('tbl_otp_validate');
        $where = array('ip_address = ?' => $ip, 'phone_no = ? ' => $pno);
        $dbtable->delete($where);
    }

}

Youez - 2016 - github.com/yon3zu
LinuXploit