public function buscarusuariodocumento($Documento)
 {
     $Datos = NULL;
     $C = atable::Make('cliente');
     $C->Load("numero_id = {$Documento}");
     if (!is_null($C->id_cliente)) {
         $Datos['id_cliente'] = $C->id_cliente;
         $Datos['nombres'] = $C->nombres;
         $Datos['apellidos'] = $C->apellidos;
         $Datos['tipoid'] = $C->tipoid;
         $Datos['numero_id'] = $C->numero_id;
         $Datos['email'] = $C->email;
     }
     return $Datos;
 }
 public function CabCotizacion($fecha_inicio, $descripcion, $id_cliente, $fecha_cotizacion = '')
 {
     $fecha_cotizacion = date("Y-m-d");
     $P = atable::Make('cotizacion');
     $P->id_cliente = $id_cliente;
     $P->fecha_cotizacion = $fecha_cotizacion;
     $P->fecha_inicio = $fecha_inicio;
     $P->descripcion = $descripcion;
     $P->estado = 'P';
     $P->Save();
     return $P->id_cotizacion;
 }
 public function VerProveedorCod($codigo)
 {
     $P = atable::Make('proveedor');
     $P->load("codigo = '{$codigo}'");
     $Datos = array();
     $Datos['id_proveedor'] = $P->id_proveedor;
     $Datos['Nombre'] = $P->nombre;
     $Datos['Telefono'] = $P->telefono;
     $Datos['Email'] = $P->email;
     $Datos['Nit'] = $P->nit;
     $Datos['Estado'] = $P->estado;
     $Datos['Codigo'] = $P->codigo;
     return $Datos;
 }
 public function Pagar($Id_reserva)
 {
     $R = atable::Make('reserva');
     $R->Load('Id_reserva=' . $Id_reserva);
     if (!is_null($R->id_reserva)) {
         $R->pago = 'S';
         $R->estado = 'Confirmado';
         $R->Save();
     }
     return $R->id_reserva;
 }
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<script type="text/javascript" src="scripts.js"></script>
<?php 
include './function.php';
$table = new table();
$atable = new atable();
$abfrage = new db();
$text = new text();
$methode = $_GET['tmet'];
if ($methode == 1) {
    $border = 1;
    $tableheadarray = array($text->view("Objektnummer"), $text->view("Kategorie"), $text->view("Aktionen"));
    $table->start($border);
    $table->head($tableheadarray);
    $abfrage2 = $sql->prepare("\n\t\t\tSELECT objekt.OID,kategorie.KNAME,attribute.ANAME,objatt.TVALUE,objatt.NVALUE FROM objekt \n\t\t\tINNER JOIN kategorie ON objekt.KID=kategorie.KID\n\t\t\tINNER JOIN objatt ON objatt.OID=objekt.OID\n\t\t\tINNER JOIN attribute ON objatt.AID=attribute.AID\n\t\t\t\n\t\t\t");
    $sqlobj = $abfrage->select_i("objekt.OID,KNAME", "objekt", "kategorie", "KID", "KID");
    while ($erg = $sqlobj->fetch()) {
        $buttons1 = "<button onclick='anzeige(" . '"form.php?fmet=4&objid=' . $erg[0] . '"' . ")'>Objekt Bearbeiten</button>";
        array_push($erg, $buttons1);
        $table->row($erg);
    }
    $table->end();
}
if ($methode == 2) {
    $headarray = array("KategorieID", "Kategoriename", "Kategorie Kurztext", "Kategorie Langtext");
    $atable->a(0, 1, $headarray, "kategorie", "KID,KNAME,KURZTEXT,LANGTEXT", "");
}
 public function CambiarDisponibilidad($cod_proveedor, $Disponibilidad)
 {
     $S = atable::Make('proveedor');
     $S->Load("Codigo = {$cod_proveedor}");
     $id = $S->id_proveedor;
     $S = atable::Make('servicios');
     $S->Load("fk_Proveedor = {$id}");
     $S->disponibilidad = $Disponibilidad;
 }