Example #1
0
 public function action_index()
 {
     if (isset($_POST['submit'])) {
         $gestiones = new Model_gestiones();
         $fecha_1 = explode('/', $_POST['fechaIni']);
         $fecha_2 = explode('/', $_POST['fechaFin']);
         $fecha1 = $fecha_1[2] . '-' . $fecha_1[1] . '-' . $fecha_1[0] . ' 00:00:00';
         $fecha2 = $fecha_2[2] . '-' . $fecha_2[1] . '-' . $fecha_2[0] . ' 23:59:59';
         $result = $gestiones->reporteFecha($_POST['inicioContrato'], $fecha1, $fecha2);
         //var_dump($result);
         $this->template->content = View::factory('archivero/reportes/resulcontrato')->bind('result', $result);
     } else {
         $gestiones = ORM::factory('gestiones')->find_all();
         $users = ORM::factory('users')->find_all();
         $this->template->content = View::factory('archivero/reportes/vistacontrato')->bind('gestiones', $gestiones)->bind('users', $users);
     }
 }
Example #2
0
 public function action_gestion()
 {
     $oGestiones = new Model_gestiones();
     echo json_encode($oGestiones->lista());
 }