Example #1
0
 public function EnviarCorreo($Email, $Nombre, $Apellido, $Fecha, $Precio, $TablaDatos)
 {
     $Render = new Visual();
     $Mensaje = "<p><center><strong>Cordial saludo {$Nombre} {$Apellido}</center></strong></p>\n\n            <p>Debido a la cotización que realizo el {$Fecha} hemos establecido una \n            tarifa que le puede agradar \$({$Precio}). Cualquier duda cuente\n            con nosotros.</p><br/>";
     $Tabla = $Render->Tabla($TablaDatos);
     $Mensaje .= $Tabla;
     echo $Mensaje;
 }
Example #2
0
 protected function rm($args)
 {
     $result = parent::rm($args);
     foreach ($args['targets'] as $target) {
         // If the image has a corresponding Visual, remove it
         $path = $this->getPath($target);
         $v = Visual::get_by_path($path);
         if ($v) {
             $v->delete();
         }
     }
     return $result;
 }
Example #3
0
 static function loadAllForLexems($lexems)
 {
     $map = array();
     foreach ($lexems as $l) {
         $vs = Visual::get_all_by_lexemeId($l->id);
         foreach ($vs as $v) {
             $map[$v->id] = $v;
         }
         $vts = VisualTag::get_all_by_lexemeId($l->id);
         foreach ($vts as $vt) {
             $v = Visual::get_by_id($vt->imageId);
             $map[$v->id] = $v;
         }
     }
     foreach ($map as $v) {
         $v->ensureThumb();
     }
     return array_values($map);
 }
Example #4
0
    $pageDescription .= " pentru {$cuv}";
    if (count($sourceList)) {
        $pageDescription .= " din dicționarele: " . implode(", ", $sourceList);
    }
    SmartyWrap::assign('pageDescription', $pageDescription);
}
// Ads
AdsModule::runAllModules(empty($lexems) ? null : $lexems, empty($definitions) ? null : $definitions);
SmartyWrap::assign('text', $text);
SmartyWrap::assign('searchType', $searchType);
SmartyWrap::assign('showParadigm', $showParadigm);
SmartyWrap::assign('locParadigm', session_user_prefers(Preferences::LOC_PARADIGM));
SmartyWrap::assign('paradigmLink', $paradigmLink);
SmartyWrap::assign('advancedSearch', $text || $sourceId);
/* Gallery */
$images = empty($lexems) ? array() : Visual::loadAllForLexems($lexems);
SmartyWrap::assign('images', $images);
if (count($images)) {
    SmartyWrap::addCss('gallery');
    SmartyWrap::addJs('gallery');
}
if (!$xml) {
    SmartyWrap::addCss('paradigm');
    SmartyWrap::display('search.tpl');
} else {
    header('Content-type: text/xml');
    SmartyWrap::displayWithoutSkin('xml/search.tpl');
}
if (Config::get('global.logSearch')) {
    $logDefinitions = isset($definitions) ? $definitions : array();
    $log = new Log($cuv, $redirectFrom, $searchType, $redirect, $logDefinitions);
<?php

include_once '../Controller/Visual.php';
include_once '../Controller/Servicios.php';
$Render = new Visual();
$Proveedor = new Servicios();
$Proveedores = $Proveedor->VerProveedoresActivos();
echo '<div="row">';
echo '<div class="col-lg-2"><label from ="Proveedor">Proveedor</label></div><div class="col-lg-10">' . $Render->Select($Proveedores, 'id_proveedores', '', 'id_proveedores', 'buscarservicios()', '', '', 'form-control') . '</div>';
echo '</div>';
<?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/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

include_once '../Controller/Reserva.php';
include_once '../Controller/Visual.php';
$Render = new Visual();
$Pagos = new Reserva();
extract($_POST);
if ($id_proveedores == 0) {
    $id_proveedores = '';
}
$Datos = $Pagos->VerReservasPagasProveedores($FechaInicio, $FechaFin, $id_proveedores);
$V = 0;
for ($i = 0; $i < count($Datos); $i++) {
    $V = $V + $Datos[$i]['valor'];
}
echo '<center><h1>Total: $' . $V . '</h1></center>';
$Datos = $Render->FunctionTable($Datos, '0', 'imprimir', 'images/imp.gif');
$Datos = $Render->FunctionTable($Datos, '1', 'Detalle', 'images/lapiz.png');
echo $Render->Tabla($Datos, '', array('#', 'Imprimir', 'Ver', 'Proveedor', 'Fecha de pedido', 'valor', 'Tipo'), 'table table-hover', '', true);
<?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/Reserva.php';
include_once '../Controller/Visual.php';
$Render = new Visual();
$reservas = new Reserva();
$id = $_POST['id'];
$Datos = $reservas->VerdetalleReserva($id);
$Datos = $Render->FormatoNumerico($Datos, 4, '$', 0);
$Datos = $Render->FormatoNumerico($Datos, 5, '$', 0);
$Cab = $reservas->DatosReserva($id);
echo '<a href="javascript:imprimir(1)"><img src="images/imp.gif"/></a><br/>';
echo '<strong>Valor:</strong>$' . number_format($Cab['valor']) . '<br>';
echo '<strong>Proveedor:</strong>' . $Cab['Nombre'] . '<br>';
echo $Render->Tabla($Datos, '', array('#', 'Descripcion', 'Servicio', 'Fecha de reserva', 'Cantidad', 'Valor unitario', 'Valor total'), 'table table-hover', '', 1);
<?php

include_once '../Controller/Servicios.php';
include_once '../Controller/Visual.php';
$Render = new Visual();
$Paquete = new Servicios();
$municipio = 0;
if (isset($_POST['municipio'])) {
    $municipio = $_POST['municipio'];
}
$FechaInicion = $_POST['FechaInicion'];
$FechaFin = $_POST['FechaFin'];
$n_pagina = $_POST['n_pagina'];
$cantidad_registros_pagina = $_POST['cantidad_registros_pagina'];
$Datos = $Paquete->BuscarPaquetes($municipio, $FechaInicion, $FechaFin, $n_pagina, $cantidad_registros_pagina);
$cantidad = $Datos['Cantidad'] / $cantidad_registros_pagina;
$col = 2;
$count = count($Datos['Datos']);
$Res = $Datos['Datos'];
if ($count > 0) {
    for ($i = 0; $i < $count; $i++) {
        $value = $Res[$i];
        $id_paquete = $value['id_paquete'];
        $Nombre = $value['Nombre'];
        $Valor = $value['Valor'];
        $Fecha = $value['Fecha_inicio'];
        $Image = $value['foto'];
        $Decripcion = $value['Descripcion'];
        $Datos = array('Nombre' => $Nombre, 'Valor' => $Valor, 'Fecha' => $Fecha, 'Image' => $Image, 'Descripcion' => $Decripcion);
        $html = '<div class="col-lg-' . $col . '">' . '<a href="javascript:VerModal(' . $id_paquete . ');">
        <div class="panel panel-primary" title="' . $Decripcion . '">
Example #12
0
 public function VerServiciosEditDelete($id_Paquete)
 {
     $Render = new Visual();
     $edit = new ModelServicios();
     $Datos = $edit->ServiciosXPaqueteEdit($id_Paquete);
     $Res = array();
     foreach ($Datos as $Temp) {
         $Temp['Edit'] = $Render->GenerardorLink('', 'Editar(' . $Temp['Edit'] . ')', 'images/lapiz.png');
         $Temp['Delete'] = $Render->GenerardorLink('', 'Eliminar(' . $Temp['Delete'] . ')', 'images/recycle.png');
         $Res[] = $Temp;
     }
     return $Res;
 }
<?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/Proveedor.php';
include_once '../Controller/Visual.php';
$Render = new Visual();
$Ver = new Proveedor();
$List = $Ver->VerProveedoresActivosInactivos();
$List = $Render->FormatoTable($List);
$List = $Render->FunctionTable($List, 0, 'Ver', 'images/lapiz.png');
$List = $Render->FunctionRecortarTexto($List, 7, 30);
$Tabla = $Render->Tabla($List, '', array('Editar', 'Estado', 'Activar<br/>Quitar', 'Proveedor', 'Teléfono', 'Email', 'Nit', 'Código', 'Descripcion'), 'table table-hover');
echo $Tabla;
Example #15
0
function handleLexemActions()
{
    $lexemId = util_getRequestParameter('lexemId');
    $lexem = Lexem::get_by_id($lexemId);
    $associateDefinitionId = util_getRequestParameter('associateDefinitionId');
    if ($associateDefinitionId) {
        LexemDefinitionMap::associate($lexem->id, $associateDefinitionId);
        util_redirect("lexemEdit.php?lexemId={$lexem->id}");
    }
    $dissociateDefinitionId = util_getRequestParameter('dissociateDefinitionId');
    if ($dissociateDefinitionId) {
        LexemDefinitionMap::dissociate($lexem->id, $dissociateDefinitionId);
        util_redirect("lexemEdit.php?lexemId={$lexem->id}");
    }
    $createDefinition = util_getRequestParameter('createDefinition');
    $miniDefTarget = util_getRequestParameter('miniDefTarget');
    if ($createDefinition) {
        $def = Model::factory('Definition')->create();
        $def->userId = session_getUserId();
        $def->sourceId = Source::get_by_shortName('Neoficial')->id;
        $def->lexicon = $lexem->formNoAccent;
        $def->internalRep = '@' . mb_strtoupper(AdminStringUtil::internalize($lexem->form, false)) . '@ v. @' . $miniDefTarget . '.@';
        $def->htmlRep = AdminStringUtil::htmlize($def->internalRep, $def->sourceId);
        $def->status = Definition::ST_ACTIVE;
        $def->save();
        LexemDefinitionMap::associate($lexem->id, $def->id);
        util_redirect("lexemEdit.php?lexemId={$lexem->id}");
    }
    $deleteLexem = util_getRequestParameter('deleteLexem');
    if ($deleteLexem) {
        $homonyms = Model::factory('Lexem')->where('formNoAccent', $lexem->formNoAccent)->where_not_equal('id', $lexem->id)->find_many();
        $lexem->delete();
        SmartyWrap::assign('lexem', $lexem);
        SmartyWrap::assign('homonyms', $homonyms);
        SmartyWrap::displayAdminPage('admin/lexemDeleted.tpl');
        exit;
    }
    $cloneLexem = util_getRequestParameter('cloneLexem');
    if ($cloneLexem) {
        $newLexem = $lexem->cloneLexem();
        log_userLog("Cloned lexem {$lexem->id} ({$lexem->form}), new id is {$newLexem->id}");
        util_redirect("lexemEdit.php?lexemId={$newLexem->id}");
    }
    $mergeLexem = util_getRequestParameter('mergeLexem');
    $mergeLexemId = util_getRequestParameter('mergeLexemId');
    if ($mergeLexem) {
        $other = Lexem::get_by_id($mergeLexemId);
        if ($lexem->form != $other->form) {
            FlashMessage::add('Nu pot unifica lexemele deoarece accentele diferă. Rezolvați diferența și încercați din nou.');
            util_redirect("lexemEdit.php?lexemId={$lexem->id}");
        }
        $defs = Definition::loadByLexemId($lexem->id);
        foreach ($defs as $def) {
            LexemDefinitionMap::associate($other->id, $def->id);
        }
        // Add lexem models from $lexem to $other if the form is the same. Exclude T-type models.
        $displayOrder = count($other->getLexemModels());
        foreach ($lexem->getLexemModels() as $lm) {
            if ($lm->modelType != 'T' && !$other->hasModel($lm->modelType, $lm->modelNumber)) {
                $lm->lexemId = $other->id;
                $lm->displayOrder = ++$displayOrder;
                $lm->save();
            }
        }
        // Add meanings from $lexem to $other and renumber their displayOrder and breadcrumb
        // displayOrders are generated sequentially regardless of level.
        // Breadcrumbs follow levels so only their first part changes.
        $counter = Model::factory('Meaning')->where('lexemId', $other->id)->count();
        $numRoots = Model::factory('Meaning')->where('lexemId', $other->id)->where('parentId', 0)->count();
        $meanings = Model::factory('Meaning')->where('lexemId', $lexem->id)->order_by_asc('displayOrder')->find_many();
        foreach ($meanings as $m) {
            $m->lexemId = $other->id;
            $m->displayOrder = ++$counter;
            $parts = explode('.', $m->breadcrumb, 2);
            $parts[0] += $numRoots;
            $m->breadcrumb = implode('.', $parts);
            $m->save();
        }
        // Add images and image tags from $lexem to $other
        $visuals = Visual::get_all_by_lexemeId($lexem->id);
        foreach ($visuals as $v) {
            $v->lexemeId = $other->id;
            $v->save();
        }
        $visualTags = VisualTag::get_all_by_lexemeId($lexem->id);
        foreach ($visualTags as $vt) {
            $vt->lexemeId = $other->id;
            $vt->save();
        }
        $lexem->delete();
        util_redirect("lexemEdit.php?lexemId={$other->id}");
    }
}
<?php

include_once '../Controller/Servicios.php';
include_once '../Controller/Visual.php';
$servicios = new Servicios();
$Render = new Visual();
if ($_POST['idPaquetes'] != "0") {
    $id_paquete = $_POST['idPaquetes'];
    $Res = $servicios->VerDescripcionPaquete($id_paquete);
    $Ser = $servicios->ServiciosXPaquete($id_paquete);
    $Ser = $Render->FormatoTable($Ser);
    $Ser = $Render->FormatoNumerico($Ser, '1', '$');
    $Ser = $Render->FormatoNumerico($Ser, '7', '$');
    echo '<div class="row">
        <div class="col-lg-12" id="reserva">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h4>' . $Res['Nombre'] . '</h4>
                </div>
            <div class="panel-body">
                Precio: <strong>$' . $Res["Valor"] . '</strong> <br/>
                Fecha de inicio: <strong>' . $Res["Fecha_inicio"] . '</strong> <br/>
                Fecha de fin: <strong>' . $Res["Fecha_fin"] . '</strong> <br/>
                Municipio: <strong>' . $Res["nombreMunicipio"] . '</strong> <br/>
                <h3>' . $Res["Descripcion"] . '</h3> <br/>
                <button class="btn btn-primary" onclick="Reservar()">Reservar</button>
            </div>
        </div>
    <div class="row">
    <div class="col-lg-12">
            <div class="panel panel-default">
<?php

include_once '../Controller/Cotizar.php';
include_once '../Controller/Visual.php';
$cotizar = new Cotizar();
$Render = new Visual();
$id_cotizacion = $_POST['id'];
$Res = $cotizar->VerCotizacionEdit($id_cotizacion);
$Res = $Render->FormatoNumerico($Res, 4, '$', 0, '.', ',');
$Total = $cotizar->Total($id_cotizacion);
$Datos = $Render->Tabla($Res, '', array('#', 'Proveedor', 'Servicio', 'Cantidad', 'Valor', 'Valor total'), 'table', '', true);
echo json_encode(array('Datos' => $Datos, 'Total' => 'Precio estimado $' . number_format($Total, 0, '.', ',')));
<?php

include_once '../Controller/Servicios.php';
include_once '../Controller/Visual.php';
$Render = new Visual();
$Ser = new Servicios();
$id_proveedor = $_POST['id_proveedor'];
$res = $Ser->VerServiciosProveedor($id_proveedor);
$res = $Render->FormatoTable($res);
$res = $Render->FunctionTable($res, 0, 'Editar', 'images/lapiz.png');
echo $Render->Tabla($res, '1', array('#', 'Editar', 'Servicio', 'Estado', 'Disponible'), "table table-hover", '', true);
<?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');
Example #20
0
<?php

require_once '../../phplib/util.php';
$visualId = util_getRequestParameter('visualId');
$page = util_getRequestParameter('page');
$limit = util_getRequestParameter('rows');
$usage = util_getRequestParameter('usage');
$resp = array();
$tags = array();
if ($usage == 'table') {
    $total = Model::factory('VisualTag')->where('imageId', $visualId)->count();
    $lines = Model::factory('VisualTag')->where('imageId', $visualId)->limit($limit)->offset(($page - 1) * $limit)->find_many();
} else {
    if ($usage == 'gallery') {
        $image = Visual::get_by_id($visualId);
        $dims = array('width' => $image->width, 'height' => $image->height);
        $lines = VisualTag::get_all_by_imageId($visualId);
    }
}
foreach ($lines as $line) {
    $row = Lexem::get_by_id($line->lexemeId);
    $tags[] = array('id' => $line->id, 'label' => $line->label, 'textX' => $line->textXCoord, 'textY' => $line->textYCoord, 'imgX' => $line->imgXCoord, 'imgY' => $line->imgYCoord, 'lexeme' => !empty($row) ? $row->formUtf8General : '');
}
if ($usage == 'table') {
    $resp = array('total' => ceil($total / $limit), 'page' => $page, 'records' => $total, 'rows' => $tags);
} else {
    if ($usage == 'gallery') {
        $resp = array('dims' => $dims, 'tags' => $tags);
    }
}
echo json_encode($resp);
<?php

include_once '../Controller/Cotizar.php';
include_once '../Controller/Visual.php';
$Render = new Visual();
$Cot = new Cotizar();
$id_cotizacion = $_POST['id'];
$Datos = $Cot->VerCotizacionAprobadas($id_cotizacion);
$Precio = $Cot->VerTotal($id_cotizacion);
echo '<center><button class="btn btn-primary" onclick="Recargar()">Cancelar</button><button class="btn btn-success" onclick="AprobarCotizacion(' . $id_cotizacion . ')">Generar reserva</button><button onclick="EliminarCotizacion(' . $id_cotizacion . ')" class="btn btn-danger">Eliminar reserva</button></center><br/>';
$Form = '<div class="panel panel-primary">
    <div class="panel-heading">
        <h1> Precio total $' . number_format($Precio, '0', ',', '.') . '</h1>
    </div>
    <div class="panel-body">
    <form id="ArmarCotizaciones" type="post">
    <div class="row">
        <div id="proveedor">
        </div>
    </div>

    <div class="row">

        <div class="col-lg-2">
            <label>Servicio</label>
        </div>
        <div class="col-lg-10">
            <div id="servicios">

                <select class="form-control"></select>
            </div>
<?php

include_once '../Controller/Cotizar.php';
include_once '../Controller/Visual.php';
$Render = new Visual();
$cot = new Cotizar();
$Servicios = $_POST["Servicios"];
$cantidad = $_POST["cantida"];
$CodCabCotizacion = $_POST["CodCabCotizacion"];
$id = $cot->DetalleCotizacion($Servicios, $cantidad, $CodCabCotizacion);
$Res = $cot->VerCotizacion($CodCabCotizacion);
echo '<h1 align="center">Precio $' . number_format($cot->Total($CodCabCotizacion), 0, ',', '.') . '</h1><br/>';
$Res = $Render->FormatoNumerico($Res, 3, '$', 0);
$Res = $Render->FormatoNumerico($Res, 4, '$', 0);
echo $Render->Tabla($Res, '', array('#', 'Proveedor', 'Servicio', 'Cantidad', 'Valor unitario', 'Valor total'), 'table', '', TRUE);
<?php

include_once '../Controller/Reserva.php';
include_once '../Controller/Visual.php';
$Render = new Visual();
$Reserva = new Reserva();
$Datos = $Reserva->VerReservasHechas();
$Datos = $Render->FunctionTable($Datos, '', 'editar', 'images/lapiz.png');
$Datos = $Render->FormatoNumerico($Datos, 4, '$', 0);
echo $Render->Tabla($Datos, '', array('#', 'Ver', 'Cliente', 'Email', 'Telefono', 'Precio', 'Fecha', 'Estado', 'Pago', 'Tipo'), 'table table-hover', '', 1);
<?php

include_once '../Controller/Reserva.php';
include_once '../Controller/Visual.php';
$Reserva = new Reserva();
$Render = new Visual();
$Datos = $Reserva->VerReservaHecha($_POST['id']);
$Detalle = $Datos['Detalle'];
$Cab = $Datos['Cab'];
echo '<strong>Nombre</strong>:' . $Cab['Nombre'] . '<br>';
echo '<strong>Email</strong>:' . $Cab['Email'] . '<br>';
echo '<strong>Telefono</strong>:' . $Cab['Telefono'] . '<br>';
echo '<strong>valor</strong>:$' . number_format($Cab['valor'], 0, '.', ',') . '<br>';
echo '<strong>Tipo de pago</strong>:<select name="tipopago" id="tipopago"><option value="efectivo">Efectivo</option><option value="Tarjetadebido">Tarjeta de debito</option><option value="credito">Tarjeta de crédito</option><option value="cheque">cheque</option><option value="transferencia">Transferencia bancaria</option></select><br>';
echo '<div class="modal-footer">';
echo '<center><button class="btn btn-danger" onclick="Cargar()">Regresar</button>';
if ($Cab['Pago'] != 'Pago') {
    echo '<button class="btn btn-success" onclick="Pagar()">Confirmar pago</button></center>';
}
echo '</div>';
echo '<input type="hidden" value="' . $_POST['id'] . '" id="cod" name="cod">';
echo $Render->Tabla($Detalle, '', array('#', 'Servicio', 'Proveedor', 'Direccion', 'Telefono', 'Cantidad', 'Valor unitario'), 'table table-hover', '', 1);
<?php

include_once '../Controller/Cotizar.php';
include_once '../Controller/Visual.php';
$Cotizar = new Cotizar();
$Render = new Visual();
$Res = $Cotizar->VerCabCotizacion();
$Res = $Render->FunctionTable($Res, 0, 'VerDetalle', 'images/lapiz.png');
echo $Render->Tabla($Res, '', array('#', 'Ver', 'Nombre', 'Apellido', 'Email', 'Telefono', 'Fecha de pedido', 'Fecha para viaje', 'Descripción', 'Valor estimado'), 'table', '', TRUE);
<?php

include_once '../Controller/Servicios.php';
include_once '../Controller/Visual.php';
$render = new Visual();
$Paquete = new Servicios();
$id_paquete = $_POST['id'];
$Paqueteinfo = $Paquete->VerDescripcionPaquete($id_paquete);
$Titulo = strtoupper('<center>' . $Paqueteinfo['Nombre'] . ' - $' . number_format($Paqueteinfo['Valor']) . '</center>');
$Detalle = $Paqueteinfo['Descripcion'];
$PaqueteDetalle = $Paquete->ServiciosXPaquete($id_paquete);
$PaqueteDetalle = $render->FormatoTable($PaqueteDetalle);
$PaqueteDetalle = $render->Tabla($PaqueteDetalle, '1', array('Servicio', 'Precio unitario', 'Proveedor', 'Direccion', 'Telefono', 'Email', 'Cantidad', 'Valor con paquete'), 'table');
$Botones = '<button type="button" class="btn btn-primary">Comprar</button>';
$Botones .= '<button type="button" class="btn btn-success">Cotizar</button>';
$Botones .= '<button type="button" class="btn btn-danger" data-dismiss="modal">Salir</button>';
$Datos = array('Titulo' => $Titulo, 'Contenido' => $Detalle . '<br/><h1>Servicios</h1>' . $PaqueteDetalle . '<br/>', 'Botones' => $Botones);
echo json_encode($Datos);
Example #27
0
$tagLexemId = util_getRequestParameter('tagLexemId');
$tagLabel = util_getRequestParameter('tagLabel');
$textXCoord = util_getRequestParameter('textXCoord');
$textYCoord = util_getRequestParameter('textYCoord');
$imgXCoord = util_getRequestParameter('imgXCoord');
$imgYCoord = util_getRequestParameter('imgYCoord');
$addTagButton = util_getRequestParameter('addTagButton');
// Tag the image specified by $fileName. Create a Visual object if one doesn't exist, then redirect to it.
if ($fileName) {
    $v = Visual::get_by_path($fileName);
    if (!$v) {
        $v = Visual::createFromFile($fileName);
    }
    util_redirect("?id={$v->id}");
}
$v = Visual::get_by_id($id);
if ($saveButton) {
    $v->lexemeId = $lexemId;
    $v->revised = $revised;
    $v->save();
    util_redirect("?id={$v->id}");
}
if ($addTagButton) {
    $vt = Model::factory('VisualTag')->create();
    $vt->imageId = $v->id;
    $vt->lexemeId = $tagLexemId;
    $vt->label = $tagLabel;
    $vt->textXCoord = $textXCoord;
    $vt->textYCoord = $textYCoord;
    $vt->imgXCoord = $imgXCoord;
    $vt->imgYCoord = $imgYCoord;
<?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));