public function export_pdf()
 {
     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 || $data["user"]->idrol == 5 || $data["user"]->idrol == 6 || $data["user"]->idrol == 7 || $data["user"]->idrol == 8 || $data["user"]->idrol == 9 || $data["user"]->idrol == 10 || $data["user"]->idrol == 11 || $data["user"]->idrol == 12) {
             $idot_busqueda_info = Input::get('idot_busqueda_info');
             $data["ot_info"] = OrdenesTrabajoBusquedaInformacion::searchOtBusquedaInformacionById($idot_busqueda_info)->get();
             if ($data["ot_info"]->isEmpty()) {
                 return Redirect::to('busqueda_informacion/list_busqueda_informacion');
             }
             $data["ot_info"] = $data["ot_info"][0];
             $data["tipo"] = TipoOtBusquedaInformacion::find($data["ot_info"]->idtipo_busqueda_info);
             $data["tareas"] = TareasOtBusquedaInformacion::getTareasXOt($data["ot_info"]->idot_busqueda_info)->get();
             $data["personal_data"] = PersonalOtBusquedaInformacion::getPersonalXOt($data["ot_info"]->idot_busqueda_info)->get();
             $html = View::make('ot/busquedaInformacion/otBusquedaInformacionExport', $data);
             return PDF::load($html, "A4", "portrait")->download('OTM busqueda informacion ' . $data["ot_info"]->ot_tipo_abreviatura . $data["ot_info"]->ot_correlativo);
         } else {
             return View::make('error/error', $data);
         }
     } else {
         return View::make('error/error', $data);
     }
 }
 public function list_busqueda_informacion()
 {
     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 || $data["user"]->idrol == 5 || $data["user"]->idrol == 6 || $data["user"]->idrol == 7 || $data["user"]->idrol == 8 || $data["user"]->idrol == 9 || $data["user"]->idrol == 10 || $data["user"]->idrol == 11 || $data["user"]->idrol == 12) {
             $data["search_tipo"] = null;
             $data["search_area"] = null;
             $data["search_encargado"] = null;
             $data["search_ot"] = null;
             $data["search_ini"] = null;
             $data["search_fin"] = null;
             $data["areas"] = Area::lists('nombre', 'idarea');
             $data['solicitantes'] = User::getJefes()->get();
             $data["tipos"] = TipoOtBusquedaInformacion::lists('nombre', 'idtipo_busqueda_info');
             $data["busquedas"] = SolicitudBusquedaInformacion::getSotsInfo()->paginate(10);
             return View::make('ot/busquedaInformacion/listOtBusquedaInformacion', $data);
         } else {
             return View::make('error/error', $data);
         }
     } else {
         return View::make('error/error', $data);
     }
 }