<?php

if (isset($_POST['Paquetes']) && $_POST['Paquetes'] != '0') {
    include_once '../Controller/Servicios.php';
    include_once '../Controller/Visual.php';
    $Descripcion = new Servicios();
    $Render = new Visual();
    $Municipios = $Descripcion->VerMunicipios();
    $Municipios = $Render->FormatoSelect($Municipios);
    $id_paquete = $_POST['Paquetes'];
    $Datos = $Descripcion->VerDescripcionPaquete($id_paquete);
    $Nombre = $Datos['Nombre'];
    $Valor = $Datos['Valor'];
    $Fecha_inicio = $Datos['Fecha_inicio'];
    $Fecha_fin = $Datos['Fecha_fin'];
    $id_Muncipio = $Datos['id_Muncipio'];
    $Descripciones = $Datos['Descripcion'];
    echo '<div class="row"><div class="col-lg-12"><label from="Nombre">Nombre:</label><input type="text" value="' . $Nombre . '" name="Nombre" class="form-control"></div></div>';
    echo '<div class="row"><div class="col-lg-12"><h5>Valor: $' . number_format($Valor, 0, ',', '.') . '</h5>';
    echo '<div class="row"><div class="col-lg-12"><label from="Descripcion">Descripcion:</label><textarea rows="5" name="Descripcion" value="s" class="form-control">' . $Descripciones . '</textarea></div></div>';
    echo '<div class="row"><div class="col-lg-12"><label from="FechaInicio">Fecha de inicio:</label><input type="text" value="' . $Fecha_inicio . '" name="FechaInicio" id="FechaInicio" class="form-control"></div></div>';
    echo '<div class="row"><div class="col-lg-12"><label from="FechaFin">Fecha de fin:</label><input type="text" value="' . $Fecha_fin . '" name="FechaFin"  id="FechaFin" class="form-control"></div></div>';
    echo '<div class="row"><div class="col-lg-12"><label from="Municipio">Municipio</label>' . $Render->Select($Municipios, 'Municipios', $id_Muncipio, 'id_Muncipio', '', '', '', 'form-control') . '</div></div>';
    echo '<button class="btn btn-success" onclick="GuardarPaquetes()">Guardar</button>';
    echo ' <script>
        $("#FechaInicio").datepicker({dateFormat: "yy-mm-dd"});
        $("#FechaFin").datepicker({dateFormat: "yy-mm-dd"});
        </script>';
} else {
    echo null;
}
<?php

include_once '../Controller/Visual.php';
include_once '../Controller/Servicios.php';
$Render = new Visual();
$Servicios = new Servicios();
$id_proveedor = $_POST['proveedor'];
$Servicio = $Render->FormatoSelect($Servicios->VerServiciosProveedor($id_proveedor));
echo $Render->Select($Servicio, 'Servicios', '', 'idServicios', '', '', '', 'form-control');
<?php

include_once '../Controller/Servicios.php';
include_once '../Controller/Visual.php';
$render = new Visual();
$Mun = new Servicios();
$Datos = $render->FormatoSelect($Mun->VerMunicipios());
echo $render->Select($Datos, 'id_municipios', '', 'id_municipios', '', '', '', 'form-control');
<?php

if (isset($_POST['Paquetes'])) {
    include_once '../Controller/Servicios.php';
    include_once '../Controller/Visual.php';
    $Render = new Visual();
    $Servicios = new Servicios();
    $id_paquete = $_POST['Paquetes'];
    echo '<pre>';
    $Datos = $Render->FormatoSelect($Servicios->VerServiciosEditDelete($id_paquete));
    /*
    
    $Datos=$Render->FormatoNumerico($Datos,'6','',0);
    $Datos=$Render->FormatoNumerico($Datos,'7','$',0);
    * 
    */
    $Datos = $Render->FormatoNumerico($Datos, '9', '$', 0);
    $En = array('#', 'Editar', 'Eliminar', 'Servicio', 'Precio', 'Proveedor', 'Direccion', 'Telefono', 'Email', 'incluidos', 'Valor');
    echo $Render->Tabla($Datos, '', $En, 'table', '', TRUE);
}
<?php

include_once '../Controller/Servicios.php';
include_once '../Controller/Visual.php';
$Paquetes = new Servicios();
$Render = new Visual();
$Datos = $Render->FormatoSelect($Paquetes->VerPaquetes());
$Datos = $Render->img($Datos, 8, 'img-responsive');
$Datos = $Render->EliminarRegistro($Datos, 9);
$Datos = $Render->EliminarRegistro($Datos, 9);
$Datos2 = NULL;
foreach ($Datos as $Temp) {
    $url = 'CargarFotos.php?id=' . $Temp[0];
    $Temp[] = '<script></script>' . '<form method="post" action="' . $url . '" enctype="multipart/form-data">' . '<input type="file" name="image" id="image" >' . '<button onclick="CargarFoto(' . $Temp[0] . ')">' . '<img src="images/upload.png">' . '</button>' . '</form>';
    $Datos2[] = $Temp;
}
$Datos = $Datos2;
$Datos = $Render->GenerarLinkRegistro($Datos, 0, 'images/lapiz.png', 'ver_paquetes.html?id');
$Datos = $Render->FunctionTable($Datos, 2, 'Bloquear', 'images/x.png');
$Datos = $Render->FormatoNumerico($Datos, 3, '$', 0, '.', ',');
$enc = array('Ver', 'Nombre', 'Deshabilitar', 'Valor', 'Fecha inicio', 'Fecha fin', 'Municipio', 'Descripcion', 'Foto', 'Cambiar imagen');
echo $Render->Tabla($Datos, '', $enc, "table table-striped");
<?php

include_once '../Controller/Visual.php';
include_once '../Controller/Proveedor.php';
include_once '../Controller/Servicios.php';
$id = '';
if (isset($_POST['id'])) {
    $id = $_POST['id'];
}
$Render = new Visual();
$Proveedor = new Proveedor();
$Paquetes = new Servicios();
$DatosPaquete = $Render->FormatoSelect($Paquetes->VerPaquetes());
$DatosServicios = $Render->FormatoSelect($Proveedor->VerProveedores());
$Paquete = $Render->Select($DatosPaquete, 'Paquetes', $id, 'idPaquetes', 'CargarLista()', '', '', 'form-control');
$Proveedores = $Render->Select($DatosServicios, 'Proveedores', '', 'idProveedores', 'CargarServicios()', '', '', 'form-control');
echo json_encode(array('Paquetes' => $Paquete, 'Proveedores' => $Proveedores));