예제 #1
0
	public function novoModeloLimpeza(){
		$novaPlanta = new Planta();
		$novosAgente = new Agente();

		$modeloLimpeza = new ModeloLimpeza();
		$modeloLimpeza->setPlanta($novaPlanta->carregarPlantaUsuario($_COOKIE['idUsuario']));	
		$modeloLimpeza->setAgentes($novosAgente->recuperarDadosAgenteLimpeza(null,$_COOKIE['idUsuario'] ));
		$modeloLimpeza->setDataProgramado('');	
		$modeloLimpeza->setDescricao('');
		$modeloLimpeza->setTempoEstimado('');	
		return $modeloLimpeza;
			
	}
예제 #2
0
 public function postUpload()
 {
     $agente = Agente::find(1);
     if (Input::hasFile('file')) {
         $file = Input::file('file');
         $name = $file->getClientOriginalName();
         $extension = $file->getClientOriginalExtension();
         $size = File::size($file);
         //dd($extension);
         $data = array('nombre' => $name, 'extension' => $extension, 'size' => $size);
         $rules = array('extension' => 'required|mimes:jpeg');
         $messages = array('required' => 'El campo :attribute es obligatorio.', 'min' => 'El campo :attribute no puede tener menos de :min carácteres.', 'email' => 'El campo :attribute debe ser un email válido.', 'max' => 'El campo :attribute no puede tener más de :max carácteres.', 'unique' => 'La factura ingresada ya está agregada en la base de datos.', 'confirmed' => 'Los passwords no coinciden.', 'mimes' => 'El campo :attribute debe ser un archivo de tipo :values.');
         $validation = Validator::make($rules, $messages);
         if ($validation->fails()) {
             return Redirect::route('logo-post')->withInput()->withErrors($validation);
         } else {
             if ($extension != 'jpg') {
                 return Redirect::route('logo-post')->with('global', 'Es necesario que la imagen sea de extension .jpg.');
             } else {
                 $path = public_path() . '/assets/img/';
                 $newName = 'logo';
                 $subir = $file->move($path, $newName . '.' . $extension);
                 return Redirect::route('agente.index')->with('create', 'El logo ha sido actualizado correctamente!');
             }
         }
     } else {
         return Redirect::route('logo-post')->with('global', 'Es necesario que selecciones una imagen.');
     }
 }
예제 #3
0
 public function postBoxagente()
 {
     $input = Input::All();
     $idAgente = $input['idAgente'];
     $agente = Agente::find($idAgente);
     $agente->localidad->provincia;
     return $agente->toJson();
 }
예제 #4
0
 public function getGenerateTxt($desde, $hasta)
 {
     $reportes = Reporte::where('fecha', '>=', $desde)->where('fecha', '<=', $hasta)->get();
     $facturas = Factura::all();
     $agente = Agente::find(1);
     $proveedores = Proveedor::all();
     $code = str_random(10);
     $content = \View::make('excel.txt')->with('reportes', $reportes)->with('facturas', $facturas)->with('agente', $agente)->with('proveedores', $proveedores);
     return \Response::make($content, '200')->header('Content-Type', 'plain/txt');
 }
예제 #5
0
 public function postAgentes()
 {
     $input = Input::All();
     //Ver de validar los privilegios
     $agentes = Agente::Where('codigo', 'like', $input['codigo'] . '%')->Where('nombre_fantasia', 'like', $input['nombre_fantasia'] . '%')->Where('razon_social', 'like', $input['razon_social'] . '%')->WhereHas('localidad', function ($localidad) use($input) {
         $localidad->Where('id_provincia', '=', $input['provincia']);
     })->get();
     $provincias = Provincia::All()->Lists('descripcion', 'id');
     return $this->layout->content = View::make('operador.Listado_agentes', compact('agentes', 'provincias'));
 }
예제 #6
0
 public function getBorrar($id = null)
 {
     if ($id != null) {
         $agente = Agente::find($id);
         if ($agente != null) {
             $agente->delete();
         }
     }
     return Redirect::action('AbmAgenteController@getIndex');
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $reportesVentas = Reportesventa::find($id);
     if (is_null($reportesVentas)) {
         return Redirect::route('ventas.index')->with('global', '<i class="fa fa-exclamation fa-fw x3"></i> Pagina no encontrada');
     }
     $ventas = DB::table('ventas')->where('id', '=', $reportesVentas->id_fecha)->first();
     $agente = Agente::find(1);
     return View::make('reportesventas.edit', array('ventas' => $ventas, 'agente' => $agente))->with('reportesVentas', $reportesVentas);
 }
	public function salvarModelo($planta, $descricao, $agentes, $dataHora, $objetoPlantaDoModelo){
		$novoModeloLimpeza = new ModeloLimpeza();

		$objetoAgente = new Agente();			
		$agentesEscolhidos = array();

		foreach ($agentes as $cadaAgente) {
			 $objetoAgente->setIdAgente($cadaAgente);
			 $agentesEscolhidos[] = $objetoAgente;
		}		

		$novoModeloLimpeza->setDescricao($descricao);
		$novoModeloLimpeza->setDataProgramado($dataHora);
		$novoModeloLimpeza->setUsuario($_COOKIE['idUsuario']);
		$novoModeloLimpeza->setTempoEstimado(0);	
		$novoModeloLimpeza->setPlanta($objetoPlantaDoModelo);	
		$novoModeloLimpeza->setAgentes($agentesEscolhidos);			
		
		$novoModeloLimpeza->salvarModeloLimpeza($novoModeloLimpeza);
	}
예제 #9
0
 public function getIndexIslr($id)
 {
     $reportesislr = DB::table('reportesislr')->where('id', '=', $id)->first();
     $facturasislr = DB::table('facturasislr')->where('id_reporteislr', '=', $id)->get();
     $agente = Agente::find(1);
     $proveedor = DB::table('empleados')->where('id', '=', $reportesislr->id_empleado)->first();
     $contador = 0;
     $pdf = PDF::loadView('pdfs.pdfislr', array('reportesislr' => $reportesislr, 'facturasislr' => $facturasislr, 'agente' => $agente, 'proveedor' => $proveedor))->setPaper('Carta')->setOrientation('landscape');
     return $pdf->stream();
     //var_dump($proveedor);
 }
예제 #10
0
    public function home()
    {
        $agente = Agente::find(1);
        $totalAgente = DB::table('agente')->count();
        $iva = DB::table('impuesto')->where('estatus', '=', 'actual')->first();
        date_default_timezone_set('America/Caracas');
        $dia = date('d');
        $mes = date('m');
        $anio = date('Y');
        $hoy = $anio . '-' . $mes . '-' . $dia;
        $mesActual = $anio . '-' . $mes;
        $reportesIva = DB::table('reportes')->orderBy('id', 'DESC')->where('fecha', '=', $hoy)->get();
        $reportesTodos = DB::table('reportes')->orderBy('n_comp', 'desc')->get();
        $proveedores = Proveedor::all();
        $totalDia = 0;
        $totalMes = 0;
        $contador = 0;
        $reportesIslr = DB::table('reportesislr')->where('fecha', '=', $hoy)->orderBy('fecha', 'desc')->get();
        $empleados = Empleado::all();
        $reportesIslrTodos = DB::table('reportesislr')->orderBy('fecha', 'desc')->get();
        // Suscripcion
        $diaLicencia = date('d', strtotime($agente->hasta));
        $mesLicencia = date('m', strtotime($agente->hasta));
        $anioLicencia = date('Y', strtotime($agente->hasta));
        $licencia = date('Y-m-d', strtotime($agente->hasta));
        $fechaHoy = date('Y-m-d');
        $datetime1 = new DateTime($fechaHoy);
        $datetime2 = new DateTime($licencia);
        $interval = $datetime1->diff($datetime2);
        $resta = $interval->format('%R%a');
        $diasRestante = str_replace("+", "", $resta);
        //dd($diasRestante);
        $hoyLicencia = date('d-m-Y');
        if ($hoyLicencia == $diaLicencia . '-' . $mesLicencia . '-' . $anioLicencia) {
            $mensaje = '<div class="alert alert-warning">
					      	<button type="button" class="close" data-dismiss="alert">×</button>
							<p>Hasta hoy ' . date("d/m/Y", strtotime($hoyLicencia)) . ' puedes usar la aplicación</p>
					    </div>';
        } elseif ($diasRestante <= 30) {
            $mensaje = '<div class="alert alert-warning">
					      	<button type="button" class="close" data-dismiss="alert">×</button>
							<p>Te quedan ' . $diasRestante . ' días de suscripción, Por favor ponte en contacto con <b>joserph.a@gmail.com<b></p>
					    </div>';
        } else {
            $mensaje = '';
        }
        if (is_null($iva)) {
            $iva = 'vencido';
        }
        return View::make('home', array('agente' => $agente, 'totalAgente' => $totalAgente, 'iva' => $iva, 'reportesIva' => $reportesIva, 'proveedores' => $proveedores, 'reportesTodos' => $reportesTodos, 'reportesIslr' => $reportesIslr, 'empleados' => $empleados, 'reportesIslrTodos' => $reportesIslrTodos))->with('contador', $contador)->with('totalDia', $totalDia)->with('totalMes', $totalMes)->with('hoy', $hoy)->with('mes', $mes)->with('anio', $anio)->with('mensaje', $mensaje);
        //return var_dump($reportesTodos);
    }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     if (isset($_GET['buscar'])) {
         $buscar = Input::get('buscar');
         $empleados = DB::table('empleados')->orderBy('created_at', 'desc')->where('tipo', 'LIKE', '%' . $buscar . '%')->orwhere('nombre', 'LIKE', '%' . $buscar . '%')->orwhere('rif', 'LIKE', '%' . $buscar . '%')->orwhere('direccion', 'LIKE', '%' . $buscar . '%')->orwhere('tlf', 'LIKE', '%' . $buscar . '%')->paginate(10);
     } else {
         $empleados = DB::table('empleados')->orderBy('created_at', 'desc')->paginate(10);
     }
     $agente = Agente::find(1);
     $contador = 0;
     $totalEmpleados = DB::table('empleados')->count();
     return View::make('empleados.index', array('empleados' => $empleados, 'agente' => $agente, 'totalEmpleados' => $totalEmpleados))->with('contador', $contador);
 }
예제 #12
0
 public function getImprimiragentes($codigos)
 {
     $agentes = array();
     $contador = 0;
     foreach (explode("-", $codigos) as $codigo) {
         $agente = Agente::where('codigo', '=', $codigo)->first();
         if ($agente != null) {
             $agentes[$contador] = $agente;
             $contador++;
         }
     }
     ImpresionService::imprimeListadoAgente($agentes);
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     if (isset($_GET['buscar'])) {
         $buscar = Input::get('buscar');
         $ventas = DB::table('reportesventas')->orderBy('created_at', 'desc')->where('n_zetas', 'LIKE', '%' . $buscar . '%')->orwhere('total_v', 'LIKE', '%' . $buscar . '%')->orwhere('tributado', 'LIKE', '%' . $buscar . '%')->orwhere('exento', 'LIKE', '%' . $buscar . '%')->orwhere('impuesto', 'LIKE', '%' . $buscar . '%')->paginate(10);
     } else {
         $ventas = DB::table('reportesventas')->orderBy('created_at', 'desc')->paginate(10);
     }
     $totalVentas = DB::table('reportesventas')->count();
     $contador = 0;
     $agente = Agente::find(1);
     $fechaVentas = Venta::all();
     return View::make('all-ventas.index', array('ventas' => $ventas, 'agente' => $agente, 'fechaVentas' => $fechaVentas, 'totalVentas' => $totalVentas))->with('contador', $contador);
     //var_dump($facturas);
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     if (isset($_GET['buscar'])) {
         $buscar = Input::get('buscar');
         $facturasislr = Facturaislr::orderBy('id', 'desc')->where('fecha_fac', 'LIKE', '%' . $buscar . '%')->orwhere('n_factura', 'LIKE', '%' . $buscar . '%')->orwhere('n_control', 'LIKE', '%' . $buscar . '%')->orwhere('total_compra', 'LIKE', '%' . $buscar . '%')->orwhere('base_imp', 'LIKE', '%' . $buscar . '%')->orwhere('impuesto_iva', 'LIKE', '%' . $buscar . '%')->orwhere('n_codigo', 'LIKE', '%' . $buscar . '%')->paginate(10);
         $facturasislr->each(function ($facturasislr) {
             $facturasislr->reporteislr;
         });
     } else {
         $facturasislr = Facturaislr::orderBy('id', 'desc')->paginate(10);
         $facturasislr->each(function ($facturasislr) {
             $facturasislr->reporteislr;
         });
     }
     $agente = Agente::find(1);
     $totalFactuasIslr = DB::table('facturasislr')->count();
     $contador = 0;
     return View::make('facturasislr.index', array('agente' => $agente, 'totalFactuasIslr' => $totalFactuasIslr))->with('facturasislr', $facturasislr)->with('contador', $contador);
 }
예제 #15
0
        // destruyo la sesión
        header("Location: ../index.html");
        //envío al usuario a la pag. de autenticación
        //sino, actualizo la fecha de la sesión
    } else {
        $_SESSION["ultimoAcceso"] = $ahora;
    }
}
if (isset($_REQUEST['ID'])) {
    $ID = $_REQUEST['ID'];
} else {
    header("Location: V_Agentes.php");
}
require '../header.php';
include_once "../Modelo/MAgente.php";
$ma = new Agente();
$ID = $_REQUEST['ID'];
$i = (int) $ID;
$sx = $ma->Elegir_Agente($i);
$Nm = "";
$Dc = "";
$Tf = 0;
$Cr = "";
while ($row = mysql_fetch_array($sx)) {
    $Nm = $row['Nombre'];
    $Dc = $row['Direccion'];
    $Tf = $row['Telefono'];
    $Cr = $row['Correo'];
}
?>
 
예제 #16
0
<?php

include_once '../Modelo/MAgente.php';
include_once '../Modelo/MGrado.php';
include_once '../Modelo/MBitacora.php';
$ma = new Agente();
$mg = new Grado();
$bi = new Bitacora();
date_default_timezone_set("America/Asuncion");
$fecha = date("d/m/Y");
$hora = date("h:i:s");
$ac = "Eliminar Agente Policial";
if (isset($_POST['Registrar'])) {
    $Nombre = $_POST['cmbGrado'];
    $datos['CI'] = $_POST['CI'];
    $datos['Nombre'] = $_POST['Nombre'];
    $datos['Direccion'] = $_POST['Direccion'];
    $datos['Correo'] = $_POST['Correo'];
    $datos['Telefono'] = $_POST['Telefono'];
    $datos['Grado'] = $_POST['cmbGrado'];
    $datos['Pass'] = $_POST['Password'];
    $datos['Longitud'] = 0;
    $datos['Latitud'] = 0;
    $datos['Estado'] = 1;
    $sx = $ma->Insertar_Agente($datos);
    header("Location: ../Vista/V_Agentes.php");
}
if (isset($_POST['Modificar'])) {
    $datos['CI'] = $_POST['CI'];
    $datos['Nombre'] = $_POST['Nombre'];
    $datos['Direccion'] = $_POST['Direccion'];
예제 #17
0
    if ($tiempo_transcurrido >= 600) {
        //si pasaron 10 minutos o más
        session_destroy();
        // destruyo la sesión
        header("Location: ../index.html");
        //envío al usuario a la pag. de autenticación
        //sino, actualizo la fecha de la sesión
    } else {
        $_SESSION["ultimoAcceso"] = $ahora;
    }
}
require '../header.php';
include_once "../Modelo/MAgente.php";
include_once "../Modelo/MGrado.php";
$mg = new Grado();
$ma = new Agente();
$sx = $ma->Cargar_Agentes();
$sy = $mg->Elegir_Grado();
while ($row = mysql_fetch_array($sy)) {
    $cmgrado .= " <option value='" . $row['Nombre'] . "'>" . $row['Nombre'] . "</option>";
}
?>

 <h1 style="margin-top: -60px;">AGENTES POLICIALES</h1>
<div class="row" style="margin-top: -200px;">
          <table class="table table-striped table-bordered" style="margin-top: 80px;">
            <thead>
              <tr>
                <th style="background:black; color:white; text-align: center;">ID</th>
                <th style="background:black; color:white; text-align: center;">CI</th>
                <th style="background:black; color:white; text-align: center;">Nombre</th>
예제 #18
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $agente = Agente::find($id);
     if (is_null($agente)) {
         App::abort(404);
     }
     $agente->delete();
     return Redirect::route('agente.index')->with('delete', 'El agente de retención <b>' . $agente->nombre . '</b> ha sido eliminado correctamente.');
 }
예제 #19
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $ventas = Venta::find($id);
     if (is_null($ventas)) {
         return Redirect::route('ventas.index')->with('global', '<i class="fa fa-exclamation fa-fw x3"></i> Pagina no encontrada');
     }
     $agente = Agente::find(1);
     return View::make('ventas.form')->with('ventas', $ventas)->with('agente', $agente);
 }
예제 #20
0
 protected function setFieldsFromJsonObj($jsonObj)
 {
     if (isset($jsonObj->codice)) {
         $this->setCodice($jsonObj->codice);
     }
     if (isset($jsonObj->committente)) {
         $this->setCommittente($jsonObj->committente);
     }
     if (isset($jsonObj->dataRegEsenzione) && !empty($jsonObj->dataRegEsenzione)) {
         $this->setDataRegEsenzione($jsonObj->dataRegEsenzione);
     }
     if (isset($jsonObj->numeroRegEsenzione)) {
         $this->setNumeroRegEsenzione($jsonObj->numeroRegEsenzione);
     }
     if (isset($jsonObj->dataScadenzaEsenzione) && !empty($jsonObj->dataScadenzaEsenzione)) {
         $this->setDataScadenzaEsenzione($jsonObj->dataScadenzaEsenzione);
     }
     if (isset($jsonObj->numeroEsenzione)) {
         $this->setNumeroEsenzione($jsonObj->numeroEsenzione);
     }
     if (isset($jsonObj->dataEsenzione) && !empty($jsonObj->dataEsenzione)) {
         $this->setDataEsenzione($jsonObj->dataEsenzione);
     }
     if (isset($jsonObj->personaDaContattare)) {
         $this->setPersonaDaContattare($jsonObj->personaDaContattare);
     }
     if (isset($jsonObj->email)) {
         $this->setEmail($jsonObj->email);
     }
     if (isset($jsonObj->contoCorrente)) {
         $this->setContoCorrente($jsonObj->contoCorrente);
     }
     if (isset($jsonObj->codicePaese)) {
         $this->setCodicePaese($jsonObj->codicePaese);
     }
     if (isset($jsonObj->iban)) {
         $this->setIban($jsonObj->iban);
     }
     if (isset($jsonObj->swift)) {
         $this->setSwift($jsonObj->swift);
     }
     if (isset($jsonObj->note)) {
         $this->setNote($jsonObj->note);
     }
     if (isset($jsonObj->soggetto)) {
         $this->setSoggetto(Soggetto::fromJson($jsonObj->soggetto, $this->_xapiClient));
     }
     if (isset($jsonObj->tipoSoggetto)) {
         $this->setTipoSoggetto(TipoSoggetto::fromJson($jsonObj->tipoSoggetto, $this->_xapiClient));
     }
     if (isset($jsonObj->sedeDocumento)) {
         $this->setSedeDocumento(Sede::fromJson($jsonObj->sedeDocumento, $this->_xapiClient));
     }
     if (isset($jsonObj->sedeMerce)) {
         $this->setSedeMerce(Sede::fromJson($jsonObj->sedeMerce, $this->_xapiClient));
     }
     if (isset($jsonObj->sedeRiba)) {
         $this->setSedeRiba(Sede::fromJson($jsonObj->sedeRiba, $this->_xapiClient));
     }
     if (isset($jsonObj->esenzioneIva)) {
         $this->setEsenzioneIva(Iva::fromJson($jsonObj->esenzioneIva, $this->_xapiClient));
     }
     if (isset($jsonObj->agente)) {
         $this->setAgente(Agente::fromJson($jsonObj->agente, $this->_xapiClient));
     }
     if (isset($jsonObj->listino)) {
         $this->setListino(Listino::fromJson($jsonObj->listino, $this->_xapiClient));
     }
     if (isset($jsonObj->modalitaPagamento)) {
         $this->setModalitaPagamento(ModalitaPagamento::fromJson($jsonObj->modalitaPagamento, $this->_xapiClient));
     }
     if (isset($jsonObj->deposito)) {
         $this->setDeposito(Deposito::fromJson($jsonObj->deposito, $this->_xapiClient));
     }
     if (isset($jsonObj->banca)) {
         $this->setBanca(Banca::fromJson($jsonObj->banca, $this->_xapiClient));
     }
 }
예제 #21
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $reportes = Reporte::find($id);
     if (is_null($reportes)) {
         return Redirect::route('reportes.index')->with('global', '<i class="fa fa-exclamation fa-fw x3"></i> Pagina no encontrada');
     }
     $agente = Agente::find(1);
     $proveedores = Proveedor::orderBy('nombre', 'ASC')->lists('nombre', 'id');
     return View::make('reportes.edit', array('agente' => $agente))->with('proveedores', $proveedores)->with('reportes', $reportes);
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $reportesislr = Reporteislr::find($id);
     if (is_null($reportesislr)) {
         return Redirect::route('islr-reportes.index')->with('global', '<i class="fa fa-exclamation fa-fw x3"></i> Pagina no encontrada');
     }
     $agente = Agente::find(1);
     $empleados = Empleado::orderBy('nombre', 'ASC')->lists('nombre', 'id');
     return View::make('reportesislr.edit', array('agente' => $agente))->with('reportesislr', $reportesislr)->with('empleados', $empleados);
 }
예제 #23
0
	public function listarAgentes(){
		$listaDeAgentes = Agente::listarAgentes(1);
		include('../View/agentePrincipal.php');
	}
예제 #24
0
*/
Route::filter('admon', function () {
    if (Auth::user()->id_rol != 0) {
        return Redirect::route('home')->with('global', '<i class="fa fa-exclamation fa-fw x3"></i> No posee privilegios para acceder a esta pagina');
    }
});
/*
| Editor filter.
*/
Route::filter('editor', function () {
    if (Auth::user()->id_rol != 0 && Auth::user()->id_rol != 1) {
        return Redirect::route('home')->with('global', '<i class="fa fa-exclamation fa-fw x3"></i> No posee privilegios para acceder a esta pagina');
    }
});
Route::filter('suscription', function () {
    $agente = Agente::find(1);
    if (Suscripcion::count() == 0) {
        return Redirect::route('home')->with('global', '<i class="fa fa-exclamation fa-fw"></i> Debe poseer una suscripción para disfrutar de la aplicación, Por favor ponte en contacto con <b>joserph.a@gmail.com</b>');
    } elseif ($agente->estatus != 1) {
        return Redirect::route('home')->with('global', '<i class="fa fa-exclamation fa-fw"></i> La suscripción no está activa, Por favor ponte en contacto con <b>joserph.a@gmail.com<b>');
    } else {
        $dia = date('d', strtotime($agente->hasta));
        $mes = date('m', strtotime($agente->hasta));
        $anio = date('Y', strtotime($agente->hasta));
        $hoy = date('d-m-Y');
        if ($hoy == $dia . '-' . $mes . '-' . $anio) {
            return Redirect::route('home')->with('global', '<i class="fa fa-exclamation fa-fw"></i> Hasta hoy ' . date('d/m/Y', strtotime($hoy)) . ' puedes usar la aplicación, Por favor ponte en contacto con <b>joserph.a@gmail.com<b>');
        } elseif (date('d', strtotime($hoy)) > $dia && date('m', strtotime($hoy)) == $mes && date('Y', strtotime($hoy)) == $anio) {
            return Redirect::route('home')->with('global', '<i class="fa fa-exclamation fa-fw"></i> Su suscripción vencio el dia ' . date('d/m/Y', strtotime($agente->hasta)) . ' y por esa razón no puedes usar la aplicación, Por favor ponte en contacto con <b>joserph.a@gmail.com<b>');
        } elseif (date('m', strtotime($hoy)) > $mes && date('Y', strtotime($hoy)) == $anio) {
            return Redirect::route('home')->with('global', '<i class="fa fa-exclamation fa-fw"></i> Su suscripción vencio el dia ' . date('d/m/Y', strtotime($agente->hasta)) . ' y por esa razón no puedes usar la aplicación, Por favor ponte en contacto con <b>joserph.a@gmail.com<b>');
예제 #25
0
    public function recuperarDadosAgenteLimpeza($idModeloLimpeza=false, $idUsuario=false){
    	if($idModeloLimpeza){
            //vou usar isso quando for editar algum modelo
        }else if($idUsuario){
            $buscaInfoAgentes = "SELECT idAgente, descricao, tempoLimpeza from agente where idUsuario = {$idUsuario} AND status ='A'";
        }else{
            return false;
        }

           
        $resultadoBruto = mysql_query($buscaInfoAgentes);
        $agentes = array();
        while ($row = mysql_fetch_assoc($resultadoBruto)) {
            $agenteAux= new Agente();
            $agenteAux->setIdAgente($row['idAgente']);
            $agenteAux->setDescricao($row['descricao']);
            $agenteAux->setTempoLimpeza($row['tempoLimpeza']);
            $agentes[] = $agenteAux;   
        }
        return $agentes;
            
    }
예제 #26
0
 protected function setFieldsFromJsonObj($jsonObj)
 {
     if (isset($jsonObj->anno)) {
         $this->setAnno($jsonObj->anno);
     }
     if (isset($jsonObj->cambioValuta)) {
         $this->setCambioValuta($jsonObj->cambioValuta);
     }
     if (isset($jsonObj->dataDocumento)) {
         $this->setDataDocumento($this->parseDate($jsonObj->dataDocumento));
     }
     if (isset($jsonObj->numeroDocumento)) {
         $this->setNumeroDocumento($jsonObj->numeroDocumento);
     }
     if (isset($jsonObj->serie)) {
         $this->setSerie($jsonObj->serie);
     }
     if (isset($jsonObj->codice)) {
         $this->setCodice($jsonObj->codice);
     }
     if (isset($jsonObj->contoCorrente)) {
         $this->setContoCorrente($jsonObj->contoCorrente);
     }
     if (isset($jsonObj->codicePaese)) {
         $this->setCodicePaese($jsonObj->codicePaese);
     }
     if (isset($jsonObj->iban)) {
         $this->setIban($jsonObj->iban);
     }
     if (isset($jsonObj->swift)) {
         $this->setSwift($jsonObj->swift);
     }
     if (isset($jsonObj->scontoPercentuale)) {
         $this->setScontoPercentuale($jsonObj->scontoPercentuale);
     }
     if (isset($jsonObj->scontoValore)) {
         $this->setScontoValore($jsonObj->scontoValore);
     }
     if (isset($jsonObj->scontoValorePercentuale)) {
         $this->setScontoValorePercentuale($jsonObj->scontoValorePercentuale);
     }
     if (isset($jsonObj->imponibile)) {
         $this->setImponibile($jsonObj->imponibile);
     }
     if (isset($jsonObj->imponibileScontato)) {
         $this->setImponibileScontato($jsonObj->imponibileScontato);
     }
     if (isset($jsonObj->imposta)) {
         $this->setImposta($jsonObj->imposta);
     }
     if (isset($jsonObj->totale)) {
         $this->setTotale($jsonObj->totale);
     }
     if (isset($jsonObj->noteTestata)) {
         $this->setNoteTestata($jsonObj->noteTestata);
     }
     if (isset($jsonObj->notePiede)) {
         $this->setNotePiede($jsonObj->notePiede);
     }
     if (isset($jsonObj->acconto)) {
         $this->setAcconto($jsonObj->acconto);
     }
     if (isset($jsonObj->speseBancarie)) {
         $this->setSpeseBancarie($jsonObj->speseBancarie);
     }
     if (isset($jsonObj->speseTrasporto)) {
         $this->setSpeseTrasporto($jsonObj->speseTrasporto);
     }
     if (isset($jsonObj->assegnaProtocollo)) {
         $this->setAssegnaProtocollo($jsonObj->assegnaProtocollo);
     }
     if (isset($jsonObj->numeroProtocollo)) {
         $this->setNumeroProtocollo($jsonObj->numeroProtocollo);
     }
     if (isset($jsonObj->dataProtocollo)) {
         $this->setDataProtocollo($this->parseDate($jsonObj->dataProtocollo));
     }
     if (isset($jsonObj->protocolloAssegnato)) {
         $this->setProtocolloAssegnato($jsonObj->protocolloAssegnato);
     }
     if (isset($jsonObj->protocolloAggiuntivo)) {
         $this->setProtocolloAggiuntivo($jsonObj->protocolloAggiuntivo);
     }
     if (isset($jsonObj->noteImballo)) {
         $this->setNoteImballo($jsonObj->noteImballo);
     }
     if (isset($jsonObj->dataConsegna)) {
         $this->setDataConsegna($this->parseDate($jsonObj->dataConsegna));
     }
     if (isset($jsonObj->riferimentoDocumento)) {
         $this->setRiferimentoDocumento($jsonObj->riferimentoDocumento);
     }
     if (isset($jsonObj->sequenziale)) {
         $this->setSequenziale($jsonObj->sequenziale);
     }
     if (isset($jsonObj->terminiConsegna)) {
         $this->setTerminiConsegna($jsonObj->terminiConsegna);
     }
     if (isset($jsonObj->jolly)) {
         $this->setJolly($jsonObj->jolly);
     }
     if (isset($jsonObj->valuta)) {
         $this->setValuta(Valuta::fromJson($jsonObj->valuta, $this->_xapiClient));
     }
     if (isset($jsonObj->causaleMagazzino)) {
         $this->setCausaleMagazzino(CausaleMagazzino::fromJson($jsonObj->causaleMagazzino, $this->_xapiClient));
     }
     if (isset($jsonObj->causaleMagazzino2)) {
         $this->setCausaleMagazzino2(CausaleMagazzino::fromJson($jsonObj->causaleMagazzino2, $this->_xapiClient));
     }
     if (isset($jsonObj->causaleContabile)) {
         $this->setCausaleContabile(CausaleContabile::fromJson($jsonObj->causaleContabile, $this->_xapiClient));
     }
     if (isset($jsonObj->tipoDocumento)) {
         $this->setTipoDocumento(TipoDocumento::fromJson($jsonObj->tipoDocumento, $this->_xapiClient));
     }
     if (isset($jsonObj->divisione)) {
         $this->setDivisione(Divisione::fromJson($jsonObj->divisione, $this->_xapiClient));
     }
     if (isset($jsonObj->soggetto)) {
         $this->setSoggetto(Soggetto::fromJson($jsonObj->soggetto, $this->_xapiClient));
     }
     if (isset($jsonObj->rapporto)) {
         $this->setRapporto(Rapporto::fromJson($jsonObj->rapporto, $this->_xapiClient));
     }
     if (isset($jsonObj->sedeLegale)) {
         $this->setSedeLegale(Sede::fromJson($jsonObj->sedeLegale, $this->_xapiClient));
     }
     if (isset($jsonObj->sedeDocumento)) {
         $this->setSedeDocumento(Sede::fromJson($jsonObj->sedeDocumento, $this->_xapiClient));
     }
     if (isset($jsonObj->sedeMerce)) {
         $this->setSedeMerce(Sede::fromJson($jsonObj->sedeMerce, $this->_xapiClient));
     }
     if (isset($jsonObj->agente)) {
         $this->setAgente(Agente::fromJson($jsonObj->agente, $this->_xapiClient));
     }
     if (isset($jsonObj->deposito)) {
         $this->setDeposito(Deposito::fromJson($jsonObj->deposito, $this->_xapiClient));
     }
     if (isset($jsonObj->deposito2)) {
         $this->setDeposito2(Deposito::fromJson($jsonObj->deposito2, $this->_xapiClient));
     }
     if (isset($jsonObj->porto)) {
         $this->setPorto(Porto::fromJson($jsonObj->porto, $this->_xapiClient));
     }
     if (isset($jsonObj->vettore)) {
         $this->setVettore(Vettore::fromJson($jsonObj->vettore, $this->_xapiClient));
     }
     if (isset($jsonObj->modalitaTrasporto)) {
         $this->setModalitaTrasporto(ModalitaTrasporto::fromJson($jsonObj->modalitaTrasporto, $this->_xapiClient));
     }
     if (isset($jsonObj->banca)) {
         $this->setBanca(Banca::fromJson($jsonObj->banca, $this->_xapiClient));
     }
     if (isset($jsonObj->modalitaPagamento)) {
         $this->setModalitaPagamento(ModalitaPagamento::fromJson($jsonObj->modalitaPagamento, $this->_xapiClient));
     }
     if (isset($jsonObj->assoggettamentoIva)) {
         $this->setAssoggettamentoIva(Iva::fromJson($jsonObj->assoggettamentoIva, $this->_xapiClient));
     }
     if (isset($jsonObj->imballo)) {
         $this->setImballo(Imballo::fromJson($jsonObj->imballo, $this->_xapiClient));
     }
     if (isset($jsonObj->listino)) {
         $this->setListino(Listino::fromJson($jsonObj->listino, $this->_xapiClient));
     }
     if (isset($jsonObj->ordine)) {
         $this->setOrdine(DocumentoTestata::fromJson($jsonObj->ordine, $this->_xapiClient));
     }
     if (isset($jsonObj->documentiDettaglio) && is_array($jsonObj->documentiDettaglio)) {
         $documentiDettaglio = array();
         foreach ($jsonObj->documentiDettaglio as $dettaglioObj) {
             $documentiDettaglio[] = DocumentoDettaglio::fromJson($dettaglioObj, $this->_xapiClient);
         }
         $this->setDocumentiDettaglio($documentiDettaglio);
     }
 }
예제 #27
0
        // destruyo la sesión
        header("Location: ../index.html");
        //envío al usuario a la pag. de autenticación
        //sino, actualizo la fecha de la sesión
    } else {
        $_SESSION["ultimoAcceso"] = $ahora;
    }
}
if (isset($_REQUEST['ID'])) {
    $ID = $_REQUEST['ID'];
} else {
    header("Location: V_Agentes.php");
}
include '../header.php';
include_once "../Modelo/MAgente.php";
$ma = new Agente();
$sx = $ma->Elegir_Agente($ID);
$Nm = "";
$Dc = "";
while ($row = mysql_fetch_array($sx)) {
    $Nm = $row['Nombre'];
}
?>
 <form action="../Controlador/C_Agente.php" method="POST">
<div class="container" >
<h2 style="font-size: 40px; color:black; margin-left: 55px; margin-top: 80px;">Eliminar Agente Policial</h2>
 <section class="content bgcolor-1" style="margin-left: 80px;">
				<span class="input input--nao">
					<input class="input__field input__field--nao" type="text" id="input-1" name="CI" value="<?php 
echo "{$ID}";
?>
예제 #28
0
 public function getDatosPersonales()
 {
     $agente = Agente::Find(Auth::user()->id_usuario);
     return $this->layout->content = View::make('agente.Agente_datos', compact('agente'));
 }
예제 #29
0
파일: Juego.php 프로젝트: suarezlea/truco
 /**
  * Muestra por pantalla las cartas del agente
  */
 public function mostrarCartas()
 {
     for ($i = 0; $i < 3; $i++) {
         echo "Jugador 1 - Carta " . ((string) $i + 1) . ": " . $this->_agente->darCarta($i) . "\n";
     }
 }