public function submit_create_sot()
 {
     if (Auth::check()) {
         $data["inside_url"] = Config::get('app.inside_url');
         $data["user"] = Session::get('user');
         // Verifico si el usuario es un Webmaster
         if ($data["user"]->idrol == 1 || $data["user"]->idrol == 2 || $data["user"]->idrol == 3 || $data["user"]->idrol == 4) {
             // Validate the info, create rules for the inputs
             $attributes = array('area' => 'Área', 'tipo' => 'Tipo de Solicitud', 'fecha_solicitud' => 'Fecha de Solicitud', 'motivo' => 'Motivo de Solicitud', 'detalle' => 'Detalle de Solicitud', 'descripcion' => 'Descripcion de la Solicitud', 'encargado' => 'Usuario Encargado');
             $messages = array();
             $rules = array('area' => 'required', 'tipo' => 'required', 'fecha_solicitud' => 'required', 'detalle' => 'max:500|alpha_num_spaces_slash_dash_enter', 'motivo' => 'max:500|alpha_num_spaces_slash_dash_enter', 'descripcion' => 'max:500|alpha_num_spaces_slash_dash_enter', 'encargado' => 'required');
             // Run the validation rules on the inputs from the form
             $validator = Validator::make(Input::all(), $rules, $messages, $attributes);
             // If the validator fails, redirect back to the form
             if ($validator->fails()) {
                 return Redirect::to('solicitud_busqueda_informacion/create_sot')->withErrors($validator)->withInput(Input::all());
             } else {
                 $sot = new SolicitudBusquedaInformacion();
                 $fecha = date('Y-m-d H:i:s', strtotime(Input::get('fecha_solicitud')));
                 $abreviatura = "SBI";
                 // Algoritmo para añadir numeros correlativos
                 $string = $this->getCorrelativeReportNumberSot();
                 $sot->fecha_solicitud = $fecha;
                 $sot->idarea = Input::get('area');
                 $sot->idestado = 14;
                 $sot->idtipo_busqueda_info = Input::get('tipo');
                 $sot->motivo = Input::get('motivo');
                 $sot->descripcion = Input::get('descripcion');
                 $sot->detalle = Input::get('detalle');
                 $sot->sot_tipo_abreviatura = $abreviatura;
                 $sot->sot_correlativo = $string;
                 $sot->id = $data["user"]->id;
                 $sot->id_usuarioencargado = Input::get('encargado');
                 $sot->save();
                 return Redirect::to('solicitud_busqueda_informacion/list_busqueda_informacion')->with('message', 'Se registró correctamente la solicitud: ' . $sot->ot_tipo_abreviatura . $sot->ot_correlativo);
             }
         } else {
             return View::make('error/error', $data);
         }
     } else {
         return View::make('error/error', $data);
     }
 }