Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Alumno; ..

Decoded Output download

<?php 
 
namespace App\Http\Controllers; 
 
use Illuminate\Http\Request; 
use App\Alumno; 
use App\Persona; 
use App\Programaciones; 
use App\Asignatura; 
use Validator; 
use Auth; 
use App\Setting_globals; 
use App\Libreta_Regular; 
 
class CambioIdiomaController extends Controller 
{ 
  public function estado_idm_cambio($id) 
  { 
    try { 
      $datos = Alumno::select("genero", "nombre", "apellidos", "alumnos.id as id_alumno", "ci_persona", "activated", "ra", "ru_reg", "alumnos.gestion", "nombre_area", "nombre_carrera", "nombre_extension", "alumnos.nivel", "alumnos.gestion", "pensums.year", "alumnos.tipo_inscripcion", "alumnos.convenio_id", "alumnos.nivel", "alumnos.curso", "alumnos.tipo_inscripcion", "alumnos.tipo_alumno", "alumnos.cambio", "alumnos.carrera_id", "alumnos.curso_numeral", "alumnos.plan_id", "alumnos.mension_id", "alumnos.carrera_paralela", "alumnos.persona_id")->join("personas", "personas.id", "=", "alumnos.persona_id")->join("areas", "areas.id", "=", "alumnos.area_id")->join("carreras", "carreras.id", "=", "alumnos.carrera_id")->join("extensiones", "extensiones.id", "=", "alumnos.extension_id")->join("requisito_alumnos", "requisito_alumnos.alumno_id", "=", "alumnos.id")->join("users", "users.persona_id", "=", "personas.id")->join("pensums", "pensums.id", "=", "alumnos.plan_id")->where("alumnos.cumplido", 0)->where("alumnos.desistir", 0)->where("alumnos.bloqueado_cambio", "NO")->where("alumnos.id", $id)->first(); 
      $programacion = Programaciones::select("asignaturas.*", "libreta_regular.nota_final", "asignaturas.id as asignarura_id", "programaciones.id as programacion_id", "programaciones.gestion as gestion_pro", "programaciones.etapa as etapa", "programaciones.id as programacion_id", "asignaturas.optativa")->join("asignaturas", "asignaturas.id", "=", "programaciones.asignatura_id")->join("libreta_regular", "libreta_regular.programacion_id", "=", "programaciones.id")->where("alumno_id", $datos->id_alumno)->where("asignaturas.tipo", "IDIOMAS")->where("programaciones.estado", 1)->get(); 
      return view("cambio_idioma.estado_idm_cambio", compact("programacion", "datos")); 
    } catch (\Exception $e) { 
      return view("errors.404"); 
    } 
  } 
  public function idiomas_optativas(Request $request) 
  { 
    try { 
      $materia = Programaciones::select("pensum_id", "identificador", "nombre", "nota_final", "asignaturas.id")->join("asignaturas", "asignaturas.id", "=", "programaciones.asignatura_id")->join("libreta_regular", "libreta_regular.programacion_id", "programaciones.id")->where("programaciones.id", $request->programacion)->where("asignaturas.optativa", "SI")->first(); 
      $asignaturas = Asignatura::select("nombre", "id", "paralelo")->where("pensum_id", $materia->pensum_id)->where("tipo", "IDIOMAS")->where("identificador", $materia->identificador)->where("id", "!=", $materia->id)->orderBy("id", "asc")->get(); 
      $paralelo = array(); 
      if ($asignaturas->count() != 0 && $asignaturas[0]->paralelo != null) { 
        $paralelo = json_decode($asignaturas[0]->paralelo); 
      } 
      return response()->json(array("materia" => $materia, "asignaturas" => $asignaturas, "paralelo" => $paralelo, "programacion" => $request->programacion, "alumno" => $request->alumno)); 
    } catch (\Exception $e) { 
      return view("errors.404"); 
    } 
  } 
  public function idiomas_paralelo(Request $request) 
  { 
    try { 
      $asignaturas = Asignatura::select("paralelo", "id", "paralelo", "nombre", "pensum_id")->where("id", $request->id)->first(); 
      $paralelo = array(); 
      if ($asignaturas != null && $asignaturas->paralelo != null) { 
        $paralelo = json_decode($asignaturas->paralelo); 
      } 
      return response()->json(array("paralelo" => $paralelo)); 
    } catch (\Exception $e) { 
      return view("errors.404"); 
    } 
  } 
  public function cambiar_idioma(Request $request) 
  { 
    \DB::beginTransaction(); 
    try { 
      $materia = Asignatura::find($request->idioma); 
      $programacion = Programaciones::find($request->programacion_id); 
      $programacion->paralelo = $request->paralelo == null ? null : $request->paralelo; 
      $programacion->nombre_materia = $materia->nombre; 
      $programacion->asignatura_id = $materia->id; 
      $programacion->comun = null; 
      $programacion->user_id = Auth::user()->id; 
      $programacion->update(); 
      $libreta = Libreta_Regular::where("programacion_id", $programacion->id)->first(); 
      $libreta->nota_primero_uno = null; 
      $libreta->nota_primero_dos = null; 
      $libreta->nota_primero_tres = null; 
      $libreta->nota_primero_final = null; 
      $libreta->nota_segundo_uno = null; 
      $libreta->nota_segundo_dos = null; 
      $libreta->nota_segundo_tres = null; 
      $libreta->nota_segundo_final = null; 
      $libreta->nota_tercero_uno = null; 
      $libreta->nota_tercero_dos = null; 
      $libreta->nota_tercero_tres = null; 
      $libreta->nota_tercero_final = null; 
      $libreta->nota_cuarto_uno = null; 
      $libreta->nota_cuarto_dos = null; 
      $libreta->nota_cuarto_tres = null; 
      $libreta->nota_cuarto_final = null; 
      $libreta->nota_final = null; 
      $libreta->observacion = null; 
      $libreta->nota_revalida = null; 
      $libreta->obs_revalida = null; 
      $libreta->update(); 
      \DB::commit(); 
      return redirect()->back()->with("info", "EL IDIOMA FUA ACTUALIZADO CON EXITO."); 
    } catch (\Exception $e) { 
      \DB::rollback(); 
      return redirect()->back()->with("errorinfo", "UPS OCURRIO UN ERROR."); 
    } 
  } 
} 
 ?>

Did this file decode correctly?

Original Code

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Alumno;
use App\Persona;
use App\Programaciones;
use App\Asignatura;
use Validator;
use Auth;
use App\Setting_globals;
use App\Libreta_Regular;

class CambioIdiomaController extends Controller
{
  public function estado_idm_cambio($id)
  {
    try {
      $datos = Alumno::select("\147\x65\156\x65\162\157", "\156\157\155\142\162\145", "\x61\160\x65\154\154\151\144\x6f\163", "\x61\x6c\x75\x6d\x6e\157\x73\x2e\151\144\x20\141\x73\40\x69\x64\137\141\154\165\x6d\x6e\157", "\143\x69\137\x70\x65\162\163\x6f\156\x61", "\x61\x63\x74\x69\x76\x61\x74\x65\144", "\162\141", "\162\x75\x5f\162\x65\147", "\141\154\165\155\156\x6f\163\x2e\x67\x65\x73\x74\x69\x6f\156", "\156\x6f\155\x62\x72\145\x5f\141\162\145\x61", "\156\x6f\155\142\x72\x65\137\143\141\x72\x72\x65\x72\141", "\156\x6f\155\142\162\x65\x5f\145\x78\164\145\x6e\163\x69\x6f\156", "\x61\154\165\155\x6e\157\x73\56\156\151\166\x65\154", "\141\x6c\165\x6d\x6e\157\163\56\x67\x65\x73\164\151\x6f\156", "\160\x65\156\163\165\x6d\163\56\x79\145\141\162", "\x61\x6c\x75\155\156\x6f\x73\56\164\151\x70\x6f\x5f\151\x6e\x73\x63\x72\x69\x70\143\151\x6f\156", "\x61\x6c\165\155\156\x6f\163\x2e\143\157\x6e\x76\145\156\151\157\x5f\151\144", "\x61\154\x75\155\156\157\x73\x2e\156\151\166\145\154", "\141\x6c\165\x6d\x6e\x6f\x73\56\143\165\x72\163\157", "\141\x6c\165\x6d\156\157\x73\x2e\x74\x69\x70\x6f\x5f\x69\x6e\x73\143\x72\151\x70\x63\x69\157\x6e", "\x61\154\x75\x6d\156\x6f\163\56\x74\x69\160\x6f\137\x61\x6c\x75\155\x6e\x6f", "\141\x6c\x75\x6d\x6e\157\x73\x2e\x63\141\x6d\x62\x69\157", "\141\x6c\165\x6d\156\x6f\x73\56\x63\x61\162\x72\x65\x72\x61\137\151\x64", "\141\154\165\x6d\156\x6f\163\56\143\x75\162\163\x6f\x5f\156\165\x6d\145\x72\x61\x6c", "\141\x6c\x75\155\156\x6f\x73\56\160\154\141\x6e\137\151\x64", "\x61\x6c\x75\155\156\x6f\x73\x2e\x6d\145\156\x73\151\x6f\x6e\137\x69\x64", "\x61\x6c\165\x6d\x6e\x6f\x73\x2e\143\141\162\162\145\162\x61\x5f\160\141\162\x61\154\x65\x6c\x61", "\x61\154\x75\x6d\x6e\x6f\163\x2e\160\x65\162\x73\157\x6e\x61\x5f\151\x64")->join("\x70\x65\x72\x73\x6f\156\x61\163", "\x70\x65\162\163\x6f\156\x61\x73\x2e\151\144", "\x3d", "\x61\154\x75\x6d\x6e\157\163\56\160\145\162\x73\157\156\141\137\151\144")->join("\141\x72\145\x61\163", "\141\162\145\x61\163\x2e\x69\x64", "\x3d", "\x61\x6c\165\155\x6e\x6f\x73\56\x61\x72\x65\141\137\151\x64")->join("\143\x61\162\162\x65\162\141\x73", "\143\141\162\x72\x65\x72\x61\163\x2e\x69\144", "\x3d", "\x61\154\165\x6d\156\157\163\56\143\141\162\x72\145\x72\141\137\151\x64")->join("\145\170\x74\x65\156\163\151\157\x6e\x65\x73", "\x65\170\164\x65\x6e\x73\151\x6f\x6e\x65\163\56\151\x64", "\x3d", "\x61\x6c\165\155\x6e\157\x73\56\x65\170\164\145\x6e\163\x69\157\x6e\x5f\x69\144")->join("\162\145\161\165\151\163\151\164\x6f\x5f\x61\154\165\x6d\156\x6f\x73", "\162\145\x71\165\151\x73\x69\164\157\x5f\x61\154\x75\x6d\x6e\157\163\x2e\x61\x6c\165\155\156\x6f\x5f\x69\x64", "\x3d", "\141\154\165\x6d\156\157\x73\56\151\x64")->join("\165\163\145\162\163", "\165\x73\x65\x72\163\56\160\x65\x72\163\157\x6e\141\x5f\151\144", "\75", "\160\145\162\163\x6f\x6e\141\163\x2e\x69\x64")->join("\160\x65\156\x73\165\x6d\163", "\x70\145\156\x73\165\155\x73\56\x69\144", "\x3d", "\x61\154\165\x6d\x6e\157\x73\56\x70\x6c\141\x6e\x5f\151\144")->where("\x61\x6c\x75\155\156\157\163\56\x63\x75\x6d\160\154\x69\x64\x6f", 0)->where("\141\x6c\x75\x6d\156\157\x73\56\x64\145\x73\x69\x73\164\151\162", 0)->where("\x61\x6c\165\x6d\156\x6f\163\x2e\x62\154\157\161\165\145\x61\x64\157\137\x63\141\x6d\x62\151\157", "\116\x4f")->where("\x61\x6c\x75\155\x6e\x6f\x73\x2e\151\144", $id)->first();
      $programacion = Programaciones::select("\x61\163\151\147\x6e\141\x74\x75\162\141\163\x2e\x2a", "\154\151\x62\162\145\164\141\137\x72\x65\x67\x75\x6c\141\x72\x2e\x6e\x6f\x74\141\137\x66\151\156\x61\x6c", "\x61\x73\151\147\156\x61\x74\x75\x72\141\x73\56\x69\144\x20\x61\163\40\x61\163\151\x67\156\x61\162\165\x72\x61\137\x69\x64", "\160\x72\x6f\x67\162\141\155\141\143\x69\157\x6e\145\163\x2e\x69\144\40\x61\163\40\160\162\x6f\x67\x72\141\x6d\141\143\151\x6f\x6e\x5f\x69\144", "\160\x72\157\147\162\141\155\141\x63\151\x6f\x6e\145\163\x2e\147\145\163\x74\x69\x6f\156\x20\x61\163\x20\147\x65\x73\164\x69\x6f\156\x5f\160\x72\157", "\160\x72\157\x67\x72\141\155\141\143\151\157\156\145\163\x2e\145\164\x61\160\141\40\141\163\40\x65\x74\x61\x70\141", "\x70\x72\x6f\x67\x72\x61\155\141\x63\x69\157\x6e\x65\163\56\x69\144\x20\x61\x73\x20\x70\x72\157\147\x72\x61\155\141\x63\151\157\156\x5f\x69\144", "\141\x73\151\x67\156\141\x74\165\x72\141\163\56\x6f\160\x74\x61\164\x69\x76\141")->join("\x61\x73\151\x67\x6e\x61\x74\x75\162\141\x73", "\x61\163\x69\x67\156\141\x74\165\162\141\163\x2e\x69\x64", "\75", "\x70\x72\157\x67\x72\x61\155\x61\x63\151\x6f\x6e\x65\163\56\x61\x73\x69\147\x6e\x61\x74\x75\162\x61\137\151\144")->join("\x6c\151\142\162\x65\x74\x61\x5f\x72\145\x67\165\x6c\141\162", "\154\x69\142\162\145\164\141\x5f\162\145\147\x75\x6c\x61\x72\56\x70\x72\157\x67\x72\141\x6d\x61\143\151\x6f\x6e\137\151\144", "\x3d", "\x70\x72\x6f\147\x72\x61\x6d\141\x63\151\157\x6e\145\x73\x2e\x69\144")->where("\141\154\x75\155\156\157\137\151\x64", $datos->id_alumno)->where("\141\x73\x69\147\x6e\x61\x74\x75\162\x61\x73\x2e\164\151\160\x6f", "\x49\x44\111\x4f\x4d\101\x53")->where("\160\x72\x6f\147\162\x61\x6d\x61\x63\x69\x6f\156\145\163\56\x65\163\x74\x61\x64\x6f", 1)->get();
      return view("\143\x61\x6d\x62\x69\x6f\x5f\151\144\151\x6f\x6d\x61\56\x65\163\164\x61\144\157\x5f\151\x64\155\137\143\x61\x6d\x62\x69\157", compact("\x70\x72\x6f\x67\x72\x61\155\141\x63\x69\x6f\156", "\144\141\x74\157\x73"));
    } catch (\Exception $e) {
      return view("\x65\x72\x72\157\x72\x73\x2e\64\60\x34");
    }
  }
  public function idiomas_optativas(Request $request)
  {
    try {
      $materia = Programaciones::select("\x70\145\156\163\165\x6d\137\151\x64", "\x69\144\145\x6e\x74\151\146\x69\x63\141\x64\x6f\162", "\156\x6f\x6d\x62\x72\x65", "\x6e\x6f\x74\141\x5f\146\151\x6e\x61\x6c", "\141\163\x69\147\156\141\164\x75\162\141\x73\56\151\144")->join("\141\163\x69\147\x6e\141\164\165\162\x61\x73", "\141\163\151\147\156\141\164\165\162\141\163\x2e\151\x64", "\x3d", "\160\162\x6f\x67\162\x61\155\x61\143\151\157\156\145\x73\x2e\x61\x73\151\x67\x6e\x61\x74\165\x72\141\x5f\151\144")->join("\x6c\x69\x62\162\145\164\141\137\162\145\x67\165\x6c\141\162", "\154\x69\x62\x72\x65\164\x61\137\x72\145\x67\x75\154\x61\x72\56\x70\x72\157\147\162\141\x6d\141\x63\151\157\156\x5f\151\144", "\x70\x72\157\147\x72\141\x6d\141\143\x69\157\156\145\x73\x2e\x69\144")->where("\x70\162\x6f\x67\162\x61\155\141\143\151\157\x6e\145\163\56\151\144", $request->programacion)->where("\141\x73\151\x67\156\141\164\x75\x72\141\x73\x2e\157\160\x74\x61\x74\x69\x76\141", "\x53\x49")->first();
      $asignaturas = Asignatura::select("\156\x6f\155\x62\x72\x65", "\151\144", "\x70\x61\x72\141\154\x65\154\157")->where("\160\x65\156\x73\x75\155\137\x69\144", $materia->pensum_id)->where("\x74\151\160\x6f", "\x49\x44\x49\117\115\101\x53")->where("\x69\144\x65\156\x74\x69\146\151\x63\x61\144\157\x72", $materia->identificador)->where("\151\x64", "\x21\75", $materia->id)->orderBy("\x69\x64", "\141\x73\143")->get();
      $paralelo = array();
      if ($asignaturas->count() != 0 && $asignaturas[0]->paralelo != null) {
        $paralelo = json_decode($asignaturas[0]->paralelo);
      }
      return response()->json(array("\155\141\164\145\x72\151\141" => $materia, "\x61\x73\151\147\x6e\x61\164\165\162\x61\163" => $asignaturas, "\x70\x61\162\x61\154\x65\x6c\157" => $paralelo, "\x70\162\157\147\x72\x61\155\x61\143\x69\x6f\x6e" => $request->programacion, "\x61\154\165\x6d\156\x6f" => $request->alumno));
    } catch (\Exception $e) {
      return view("\145\162\162\x6f\162\163\x2e\x34\x30\64");
    }
  }
  public function idiomas_paralelo(Request $request)
  {
    try {
      $asignaturas = Asignatura::select("\x70\141\162\141\154\x65\154\x6f", "\151\144", "\160\141\x72\x61\154\x65\154\x6f", "\x6e\x6f\x6d\x62\x72\145", "\160\145\x6e\x73\x75\155\137\151\144")->where("\151\144", $request->id)->first();
      $paralelo = array();
      if ($asignaturas != null && $asignaturas->paralelo != null) {
        $paralelo = json_decode($asignaturas->paralelo);
      }
      return response()->json(array("\x70\x61\x72\141\154\145\154\157" => $paralelo));
    } catch (\Exception $e) {
      return view("\x65\162\162\157\162\x73\56\x34\x30\64");
    }
  }
  public function cambiar_idioma(Request $request)
  {
    \DB::beginTransaction();
    try {
      $materia = Asignatura::find($request->idioma);
      $programacion = Programaciones::find($request->programacion_id);
      $programacion->paralelo = $request->paralelo == null ? null : $request->paralelo;
      $programacion->nombre_materia = $materia->nombre;
      $programacion->asignatura_id = $materia->id;
      $programacion->comun = null;
      $programacion->user_id = Auth::user()->id;
      $programacion->update();
      $libreta = Libreta_Regular::where("\x70\x72\157\x67\x72\x61\x6d\141\143\151\x6f\x6e\x5f\151\144", $programacion->id)->first();
      $libreta->nota_primero_uno = null;
      $libreta->nota_primero_dos = null;
      $libreta->nota_primero_tres = null;
      $libreta->nota_primero_final = null;
      $libreta->nota_segundo_uno = null;
      $libreta->nota_segundo_dos = null;
      $libreta->nota_segundo_tres = null;
      $libreta->nota_segundo_final = null;
      $libreta->nota_tercero_uno = null;
      $libreta->nota_tercero_dos = null;
      $libreta->nota_tercero_tres = null;
      $libreta->nota_tercero_final = null;
      $libreta->nota_cuarto_uno = null;
      $libreta->nota_cuarto_dos = null;
      $libreta->nota_cuarto_tres = null;
      $libreta->nota_cuarto_final = null;
      $libreta->nota_final = null;
      $libreta->observacion = null;
      $libreta->nota_revalida = null;
      $libreta->obs_revalida = null;
      $libreta->update();
      \DB::commit();
      return redirect()->back()->with("\151\x6e\146\x6f", "\105\x4c\40\111\104\111\x4f\x4d\x41\x20\106\x55\101\40\x41\103\124\x55\101\114\111\x5a\101\104\x4f\40\x43\117\116\x20\105\130\x49\x54\x4f\56");
    } catch (\Exception $e) {
      \DB::rollback();
      return redirect()->back()->with("\145\x72\162\x6f\x72\151\x6e\146\157", "\x55\120\123\40\117\103\125\122\122\111\x4f\x20\125\116\40\105\122\122\117\x52\x2e");
    }
  }
}

Function Calls

None

Variables

None

Stats

MD5 f2b2b77f12edb956014f08c22ea4b4c3
Eval Count 0
Decode Time 82 ms