function aworkstrackpage() { $this->page(); $this->stylesheet = "style.css"; $this->__widgetfields[] = html::write("<script src=\"shortcuts.js\"></script><div id=\"header\"></div>"); $this->__widgetfields[] = html::write("<h1>Seguimiento de Pedidos</h1>"); }
function errorList() { global $__gl_errors; for ($i = 0; $i < count($__gl_errors); $i++) { $out .= "<li>" . $__gl_errors[$i]->string . ($__gl_errors[$i]->param ? " : " . $__gl_errors[$i]->param : "") . "</li>"; } return html::write($out); }
function draw() { global $__utime_start; global $__debug_array; debug($this, "Execution time (until debugWidget) :" . round(microtime_float() - $__utime_start, 3) . "s"); $arr =& $__debug_array; $out .= "<table class=\"debug\"><tr><td class=\"debug_header\">Object</td><td class=\"debug_header\">Message</td></tr>"; for ($i = 0; $i < count($arr); $i++) { $out .= "<tr><td class=\"debug_object\"><b>" . $arr[$i]["object"] . "</b></td><td class=\"debug_message\">" . $arr[$i]["message"] . "</td></tr>"; } $out .= "</table>"; $box = new Box("ooCommon NG Debug"); $box->addWidget(html::write($out)); return $box->draw(); }
function drawWidget() { $s = new session(); if (session::check() != false) { $w = new box($this->logged_in_realm_caption); $w->css_box = "login"; $w->addWidget(html::write($this->logged_in_caption . $s->user->username)); $w->addWidget(new button($this->logout_caption, $this->logouttarget . "?logout=1")); return $w->draw(); } $h = new html(); $h->html .= "\n\t\t\t\t\t\n\t\t\t\t\t<form method=\"post\" action=\"" . $this->target . "\">\n\t\t\t\t\t<table>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=\"2\">\n\t\t\t\t\t\t\t" . $this->realm_caption . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td>" . $this->username_caption . "</td><td><input type=\"text\" name=\"username\"></td></tr>\t\t\t\n\t\t\t\t\t\t<tr><td>" . $this->password_caption . "</td><td><input type=\"password\" name=\"password\"></td></tr>\n\t\t\t\t\t\t<tr><td><input type=\"submit\" value=\"" . $this->submit_caption . "\"></td></tr></table></form>"; $b = new box($this->realm_caption, $h); $b->css_box = "login"; return $b->draw(); }
$d = new date(); $d->timestamp = $sf->fecha_entrega; $d->parse(); $f->addWidget(new form_html("Fecha Entrega", $d->string)); $elw = new estadolistwidget(); $elw->drop($sf); $f->addWidget(new form_widget("Estado", "", $elw)); $f->addWidget(new form_separator("Datos adicionales")); $f->addWidget(new form_textarea("otro_material", "Otros materiales", $sf->otro_material)); $f->addWidget(new form_textarea("observaciones", "Observaciones", $sf->observaciones)); $b2 = new Box("Datos Generales del Pedido"); $b2->addWidget($f); $b3 = new Box("Eventos del Pedido"); $ev = new eventviewer(); $ev->drop($sf); $b3->addWidget($ev); $b->addWidget(html::write("<table style=\"width:100%;\"><tr><td valign=\"top\" style=\"width:40%;\">" . $b2->draw() . "</td><td valign=\"top\">" . $b3->draw() . "</td></tr></table>")); $b->addWidget(html::write("<script> var idpedido='" . $sf->id . "';</script>")); $p->addWidget($b); $b = new Box("Detalle del Pedido"); if ($sf->tipo_pedido == 0 || $sf->tipo_pedido == 2) { $b->addWidget(new puertas_paso($sf->estado < 1 ? true : false)); } if ($sf->tipo_pedido == 0 || $sf->tipo_pedido == 2) { $b->addWidget(new puertas_entrada($sf->estado < 1 ? true : false)); } if ($sf->tipo_pedido == 1 || $sf->tipo_pedido == 2) { $b->addWidget(new ventanas($sf->estado < 1 ? true : false)); } $p->addWidget($b); $p->draw();
function predrawWidget() { $r = new request(); if ($r->id) { $this->__scaffoldobject->open($r->id); } $this->__gridobject->drop($this->__scaffoldobject); $this->__dataform->drop($this->__scaffoldobject); switch ($r->action) { default: $button_add = new button($this->button_add, $this->controller . "?action=add"); $b = new box($this->name ? $this->name : "List", $this->__gridobject); $b->addWidget($button_add); return $b; break; case "add": $this->__dataform->action = $this->__dataform->action . "?action=insert"; $this->__dataform->submit = $this->button_add; $this->__dataform->__target = $this->__dataform->action; return new box($this->name ? $this->name : "Add", $this->__dataform); break; case "insert": $this->__scaffoldobject->fromObject($r); if ($this->__scaffoldobject->insert()) { $b = new box($this->name ? $this->name : "Message", html::write($this->message_insert_ok)); $b->addWidget(new button($this->button_list, $this->controller)); return $b; } else { $b = new box($this->name ? $this->name : "Message", html::write($this->message_insert_failed)); $b->addWidget(new button($this->button_list, $this->controller)); return $b; } break; case "update": $this->__scaffoldobject->open($r->id); $this->__scaffoldobject->fromObject($r); if ($this->__scaffoldobject->update()) { $b = new box($this->name ? $this->name : "Message", html::write($this->message_update_ok)); $b->addWidget(new button($this->button_list, $this->controller)); return $b; } else { $b = new box($this->name ? $this->name : "Message", html::write($this->message_update_failed)); $b->addWidget(new button($this->button_list, $this->controller)); return $b; } break; case "view": $this->__dataform->action = $this->__dataform->action . "?action=update&id=" . $r->id; $this->__dataform->__target = $this->__dataform->action; $this->__dataform->submit = $this->button_update; $b = new box($this->name ? $this->name : "View", $this->__dataform); $b->addWidget(new button($this->button_list, $this->controller)); $b->addWidget(new button($this->button_delete, $this->controller . "?action=delete&id=" . $r->id)); return $b; break; case "delete": $this->__scaffoldobject->open($r->id); if ($this->__scaffoldobject->delete()) { $b = new box($this->name ? $this->name : "Message", html::write($this->message_delete_ok)); $b->addWidget(new button($this->button_list, $this->controller)); return $b; } else { $b = new box($this->name ? $this->name : "Message", html::write($this->message_delete_failed)); $b->addWidget(new button($this->button_list, $this->controller)); return $b; } break; } }
<?php include "local.php"; error_reporting(E_ALL); $p = new aworkspage(); $sf = new scaffold("pedidos"); $p->addWidget(html::write("<h1>Bienvenid@</h1>")); $d = new datagrid("pedido", "pedido.php?"); $d->toolbar = false; $sf->__query = "SELECT * FROM pedidos order by estado"; $d->objectField("idmodelo", new scaffold("modelos"), "referencia"); $d->objectField("idmadera", new scaffold("maderas"), "referencia"); $d->specialField("fecha", "timestamp", "date", "html"); $d->headers("tipo_pedido", "Tipo de Pedido"); $d->specialField("tipo_pedido", "tipo_pedido", "ooentity", "tipowidget"); $d->headers("estado", "Estado"); $d->headers("cliente", "Cliente"); $d->headers("referencia", "Referencia"); $d->hideField("observaciones"); $d->hideField("otro_material"); $d->specialField("estado", "estado", ooentity, estadolistwidget); $d->specialField("fecha_pedido", "timestamp", date, html); $d->specialField("fecha_entrega_prevista", "timestamp", date, html); $d->specialField("fecha_entrega", "timestamp", date, html); $d->headers("fecha_entrega", "Fecha de Entrega"); $d->headers("fecha_entrega_prevista", "Fecha de Entrega Prevista"); $d->headers("fecha_pedido", "Fecha de Pedido"); $b = new Box("Pedidos en Cartera"); $d->drop($sf); $t = new toolbar(); $t->addWidget(new button("Añadir Pedido", "pedido_add.php", "add"));
$sfe->idpedido = $r->pedido_id; $sfe->insert(); if (!errorobject::hasErrors()) { $sf->estado = $sfe->estado_nuevo; $sf->fecha_entrega_prevista = $sfe->fecha_entrega_prevista; if ($sfe->estado_nuevo == 8) { $sf->fecha_entrega = time(); } $sf->update(); header("location:pedido.php?pedido_id=" . $r->pedido_id); } else { $p->addWidget(new infobox("Error", "Error en el formulario, compruebe los datos", false)); } } error_reporting(E_ALL); $p->addWidget(html::write("<h1>Añadir evento a pedido <b>" . $sf->referencia . "</b> de <b>" . $sf->cliente . "</b> </h1>")); $b = new Box("Datos del Evento"); $t = new toolbar(); $t->addWidget(new button("Guardar Datos del Evento", "javascript:document.forms[0].submit()", "disk")); $b->addWidget($t); $f = new form("", ""); $opts[] = array("caption" => "Sin procesar", "value" => 0); $opts[] = array("caption" => "Orden", "value" => 1); $opts[] = array("caption" => "Taller", "value" => 2); $opts[] = array("caption" => "Excepción Taller", "value" => 3); $opts[] = array("caption" => "Fabricación", "value" => 4); $opts[] = array("caption" => "Excepción en Fabricación", "value" => 5); $opts[] = array("caption" => "Almacén", "value" => 6); $opts[] = array("caption" => "Excepción en Almacén", "value" => 7); $opts[] = array("caption" => "Entrega", "value" => 8); $opts[] = array("caption" => "Excepción en Entrega", "value" => 9);
<?php include "local.php"; $p = new aworkstrackpage(); if ($r->error) { $out .= "<center><h2 style=\"color:red;position:absolute;left:25%;width:50%;\">Numero de pedido incorrecto<br /><span style=\"font-size:14px\">Revise su número de pedido y vuelva a intentarlo</span></h2>"; } $out .= "\n<form method=\"post\" action=\"tracking_pedido.php\">\n<table style=\"width:100%;height:80%;\">\n<tr style=\"height:80%\">\n<td style=\"width:25%\"></td><td style=\"width:50%;\"><center>\n<div style=\"font-size:32px;background:rgb(230,230,230);height:300px;border:outset 2px;\">\n<br />\n<b>Seguimiento de Pedido</b><br />\n<span style=\"font-size:14px;\">\nIntroduzca número de seguimiento de pedido proporcionado.<br />\n</span><br />\n<div style=\"border:inset 1px;width:440px;padding:12px;background:white;\">\nAW/<input name=\"prefix\" value=\"" . $r->prefix . "\" type=\"text\" size=\"3\" style=\"font-size:32px;border:dotted 2px;text-align:center;\">/<input value=\"" . $r->suffix . "\" name=\"suffix\" type=\"text\" size=\"6\" style=\"text-align:center;font-size:32px;border:dotted 2px;\"><button style=\"font-weight:bold;background:#55ff55;width:56px;height:52px;vertical-align:middle;margin-top:-10px;padding-top:6px;\" onclick=\"document.forms[0].submit()\"><img src=\"icons/16x16/arrow_switch.png\"></button>\n</div>\n<span style=\"font-size:9px;\">\n<br />\n<div style=\"padding:18px;text-align:justify;\">\nLorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut tincidunt vehicula nibh. Donec massa. Sed in mauris in arcu accumsan gravida. Vestibulum pretium felis eget nibh congue venenatis. Aenean aliquam. Sed placerat sapien sit amet sapien. Cras nisi diam, lacinia sit amet, rutrum ornare, ultricies ut, justo. Mauris sit amet ligula. Mauris sit amet mauris et dolor ultricies dapibus. Curabitur in massa vulputate felis sollicitudin lacinia.\n</span>\n</div>\n</div>\n</td>\n<td style=\"width:25%\">\n</td>\n</tr>\n</table>\n</form>\n"; $p->addWidget(html::write($out)); $p->draw();
<?php include "local.php"; $p = new aworkspage(); $p->addWidget(html::write("<h1>Gestión de Maderas</h1>")); $app = new dataapp("maderas", "maderas.php", ""); $p->addWidget($app); $p->draw();
public function get_namespaces() { if ($result = $this->ns->get_all()) { foreach ($result as $row) { $option = new html('option'); $option->data($row['name']); $ns = $_SESSION['namespace'] ? $_SESSION['namespace'] : 'public'; if ($ns == $row['name']) { $option->attr('selected', 'selected'); } $option->write(); } } }
$d->parse(); $sf->fecha_entrega_prevista = $d->timestamp; $sf->fecha_pedido = time(); $sf->fecha_entrega = -1; $tracking = "AW/" . date("y") . date("w") . "/" . strtoupper(substr(md5(uniqid(rand)), 4, 2) . substr(md5(uniqid(rand)), 7, 2) . substr(md5(uniqid(rand)), 12, 2)); $sf->tracking = $tracking; $sf->insert(); if (errorobject::haserrors()) { } else { $id = mysql_insert_id(); header("location:pedido.php?pedido_id=" . $id); } } $p = new aworkspage(); $b = new Box("Añadir Pedido"); $p->addWidget(html::write("<h1>Añadir Pedido</h1>")); $t = new toolbar(); $t->addWidget(new button("Guardar Pedido", "javascript:document.forms[0].submit()", "add")); $b->addWidget($t); $f = new form("", ""); $f->addWidget(new form_separator("Referencia y Cliente")); $f->addWidget(new form_input("referencia", "Referencia Cliente", $r->referencia)); $f->addWidget(new form_input("cliente", "Cliente", $r->cliente)); $sel = new form_select("tipo_pedido", "Tipo de Pedido"); $opts[] = array("value" => 0, "caption" => "Puertas"); $opts[] = array("value" => 1, "caption" => "Ventanas"); $opts[] = array("value" => 2, "caption" => "Puertas+Ventanas"); $sel->addOptions($opts); unset($opts); $f->addWidget($sel); $f->addWidget(new form_separator("Fechas"));
<?php include "local.php"; $p = new aworkspage(); $p->addWidget(html::write("<h1>Gestión de Modelos</h1>")); $app = new dataapp("modelos", "modelos.php", ""); $p->addWidget($app); $p->draw();
function predrawWidget() { $identificator = $this->name; $action = $this->name . "_action"; $_identificator = $this->name . "_id"; $r = new request(); if ($r->filter_text) { if (strpos($this->controller, "?") === false) { $this->controller .= "?prepend=1"; } $this->controller .= "&filter_text=" . $r->filter_text . "&filter_field=" . $r->filter_field; if ($r->filter_match) { $this->controller .= "&filter_match=1"; } } if ($r->{$_identificator}) { $this->__scaffoldobject->open($r->{$_identificator}); } $this->__gridobject->drop($this->__scaffoldobject); if ($r->{$action} == "insert") { $this->__scaffoldobject->fromObject($r); } $this->__formobject->drop($this->__scaffoldobject); switch ($r->{$action}) { default: $button_add = new button($this->button_add, $this->controller . (strpos($this->controller, "?") === false ? "?" : "&") . $action . "=add", "add"); $b = new box($this->name ? $this->name : "List", $this->__gridobject); if (!$this->__disable_add) { $b->addWidget($button_add); } return $b; break; case "add": $this->__formobject->action = $this->__formobject->action . (strpos($this->__formobject->action, "?") === false ? "?" : "&") . $action . "=insert"; $this->__formobject->submit = $this->button_add; $this->__formobject->__target = $this->__formobject->action; return new box($this->name ? $this->name : "Add", $this->__formobject); break; case "insert": $this->__scaffoldobject->fromObject($r); if (is_array($this->__composites)) { foreach ($this->__composites as $k => $v) { $entity = $this->__composites[$k]["entity"]; $efield = $this->__composites[$k]["efield"]; $this->__scaffoldobject->composeField($k, $entity, $efield); } } if ($this->__scaffoldobject->insert()) { $b = new box($this->name ? $this->name : "Message", html::write($this->message_insert_ok)); $t = new toolbar(); $b->addWidget(html::write("<script>setTimeout(\"document.location='" . $this->controller . "'\",1000);</script>")); $b->addWidget($t); return $b; } else { $w = new oowidget(); $b = new box($this->name ? $this->name : "Message", html::write($this->message_insert_failed)); $b->addWidget(errorobject::errorList()); $this->__formobject->action = $this->__formobject->action . (strpos($this->__formobject->action, "?") === false ? "?" : "&") . $action . "=insert"; $this->__formobject->submit = $this->button_add; $this->__formobject->__target = $this->__formobject->action; $b2 = new box($this->name ? $this->name : "Add", $this->__formobject); $w->addWidget($b); $w->addWidget($b2); $b->addWidget(new button($this->button_list, $this->controller)); return $w; } break; case "update": $tmpsf = $this->__scaffoldobject; $this->__scaffoldobject = new scaffold($this->name); $this->__scaffoldobject->__validators = $tmpsf->__validators; $this->__scaffoldobject->fromObject($r); if (is_array($this->__composites)) { foreach ($this->__composites as $k => $v) { $entity = $this->__composites[$k]["entity"]; $efield = $this->__composites[$k]["efield"]; $this->__scaffoldobject->composeField($k, $entity, $efield); } } if ($this->__scaffoldobject->update()) { $b = new box($this->name ? $this->name : "Message", html::write($this->message_update_ok)); $t = new toolbar(); //$b->addWidget(new button($this->button_list, $this->controller)); $b->addWidget(html::write("<script>setTimeout(\"document.location='" . $this->controller . "'\",1000);</script>")); return $b; } else { $w = new oowidget(); $this->__formobject->action = $this->__formobject->action . (strpos($this->__formobject->action, "?") === false ? "?" : "&") . $action . "=update&" . $this->name . "_id=" . $r->{$_identificator}; $this->__formobject->__target = $this->__formobject->action; $this->__formobject->submit = $this->button_update; $b2 = new box($this->name ? $this->name : "View", $this->__formobject); $b = new box($this->name ? $this->name : "Message", html::write($this->message_update_failed)); $b->addWidget(errorobject::errorList()); $b->addWidget(new button($this->button_list, $this->controller)); $w->addWidget($b); $w->addWidget($b2); $b->addWidget(new button($this->button_list, $this->controller)); return $w; return $b; } break; case "view": $this->__formobject->action = $this->__formobject->action . (strpos($this->__formobject->action, "?") === false ? "?" : "&") . $action . "=update&" . $this->name . "_id=" . $r->{$_identificator}; $this->__formobject->__target = $this->__formobject->action; $this->__formobject->submit = $this->button_update; $b = new box($this->name ? $this->name : "View", $this->__formobject); for ($i = 0; $i < count($this->__additionalwidgets); $i++) { $b->addWidget($this->__additionalwidgets[$i]); } $t = new toolbar(); $t->addWidget(new button($this->button_list, $this->controller, "book_previous")); $t->addWidget(new button($this->button_delete, $this->controller . (strpos($this->controller, "?") === false ? "?" : "&") . $action . "=delete&" . $_identificator . "=" . $r->{$_identificator}, "delete")); $b->addWidget($t); return $b; break; case "delete": $b = new box($this->name ? $this->name : "Delete"); $b->addWidget(html::write($this->message_delete_confirm)); $t = new toolbar(); $t->addWidget(new button($this->button_delete, $this->controller . (strpos($this->controller, "?") === false ? "?" : "&") . $action . "=delete_confirm&" . $_identificator . "=" . $r->{$_identificator}, "delete")); $t->addWidget(new button($this->button_list, $this->controller . (strpos($this->controller, "?") === false ? "?" : "&") . $action . "=&" . $_identificator . "=" . $r->{$_identificator}, "book_previous")); $b->addWidget($t); return $b; break; case "delete_confirm": $this->__scaffoldobject->open($r->{$_identificator}); if ($this->__scaffoldobject->delete()) { $b = new box($this->name ? $this->name : "Message", html::write($this->message_delete_ok)); $t = new toolbar(); $t->addWidget(new button($this->button_list, $this->controller)); $t->addWidget(html::write("<meta http-equiv=\"refresh\" content=\"1; url=" . $this->controller . "\" />")); $b->addWidget($t); return $b; } else { $b = new box($this->name ? $this->name : "Message", html::write($this->message_delete_failed)); $b->addWidget(errorobject::errorList()); $b->addWidget(new button($this->button_list, $this->controller)); return $b; } break; } }
$d->specialField("fecha", "timestamp", "date", "html"); $d->hideField("observaciones"); $d->hideField("otro_material"); $d->specialField("estado", "estado", ooentity, estadolistwidget); $d->specialField("fecha_pedido", "timestamp", date, html); $d->headers("tipo_pedido", "Tipo de Pedido"); $d->specialField("tipo_pedido", "tipo_pedido", "ooentity", "tipowidget"); $d->specialField("fecha_entrega_prevista", "timestamp", date, html); $d->specialField("fecha_entrega", "timestamp", date, html); $d->headers("fecha_entrega", "Fecha de Entrega"); $d->headers("fecha_entrega_prevista", "Fecha de Entrega Prevista"); $d->headers("fecha_pedido", "Fecha de Pedido"); $b = new Box("Pedidos en Cartera"); $d->drop($sf); $p->addWidget($d); $p->addWidget(html::write("<h1>Últimos Pedidos Entregados</h1>")); $d = new datagrid("pedido", "pedido.php?"); $d->toolbar = false; $sf->__query = "SELECT * FROM pedidos where estado =8 OR estado=9"; $d->objectField("idmodelo", new scaffold("modelos"), "referencia"); $d->objectField("idmadera", new scaffold("maderas"), "referencia"); $d->specialField("fecha", "timestamp", "date", "html"); $d->hideField("observaciones"); $d->hideField("otro_material"); $d->specialField("estado", "estado", ooentity, estadolistwidget); $d->specialField("fecha_pedido", "timestamp", date, html); $d->specialField("fecha_entrega_prevista", "timestamp", date, html); $d->specialField("fecha_entrega", "timestamp", date, html); $d->headers("fecha_entrega", "Fecha de Entrega"); $d->headers("tipo_pedido", "Tipo de Pedido"); $d->specialField("tipo_pedido", "tipo_pedido", "ooentity", "tipowidget");
if ($list[0]["id"] == "") { header("location:tracking.php?error=1&prefix=" . $r->prefix . "&suffix=" . $r->suffix); die; } $p = new aworkstrackpage(); $sf->open($list[0]["id"]); $ew = new estadolistwidget(); $ew->drop($sf); $d_pedido = new date(); $d_pedido->timestamp = $sf->fecha_pedido; $d_pedido->parse(); $d_entrega_estimada = new date(); $d_entrega_estimada->timestamp = $sf->fecha_entrega_prevista; $d_entrega_estimada->parse(); $d_entrega = new date(); $d_entrega->timestamp = $sf->fecha_entrega; $d_entrega->parse(); $out .= "\n<br /><br /><center><div style=\"background:rgb(239,237,222);width:640px;padding:12px;border:outset 2px;\">\n<center><br />\n<h2>Pedido " . $sf->tracking . "</h2>\n<table style=\"width:560px;\"><tr><td style=\"width:220px;\">Pedido</td><td> <b>" . $sf->tracking; $out .= "</td></tr><tr><td> Cliente </td><td><b>" . $sf->cliente; $out .= "</td></tr><tr><td> Referencia Cliente </td><td> <b>" . $sf->referencia; $out .= "</td></tr><tr><td> Estado </td><td>" . $ew->draw(); $out .= "</td></tr><tr><td> Fecha Pedido</td><td>" . $d_pedido->string; $out .= "</td></tr><tr><td> Fecha Entrega Estimada</td><td>" . $d_entrega_estimada->string; $out .= "</td></tr><tr><td> Fecha Entrega</td><td>" . $d_entrega->string; $out .= "</table>\n\n"; $p->addWidget(html::write($out)); $ev = new eventviewer(); $ev->drop($sf); $p->addWidget($ev); $p->addWidget(html::write("<br /><br /><br ></div>")); $p->draw();
$d->specialField("fecha", "timestamp", "date", "html"); $d->hideField("observaciones"); $d->hideField("otro_material"); $d->specialField("estado", "estado", ooentity, estadolistwidget); $d->specialField("fecha_pedido", "timestamp", date, html); $d->specialField("fecha_entrega_prevista", "timestamp", date, html); $d->specialField("fecha_entrega", "timestamp", date, html); $d->headers("fecha_entrega", "Fecha de Entrega"); $d->headers("tipo_pedido", "Tipo de Pedido"); $d->specialField("tipo_pedido", "tipo_pedido", "ooentity", "tipowidget"); $d->headers("fecha_entrega_prevista", "Fecha de Entrega Prevista"); $d->headers("fecha_pedido", "Fecha de Pedido"); $b = new Box("Pedidos en Cartera"); $d->drop($sf); $p->addWidget($d); $p->addWidget(html::write("<h1>Pedidos en Fabricación</h1>")); $d = new datagrid("pedido", "pedido.php?"); $d->toolbar = false; $sf->__query = "SELECT * FROM pedidos where estado =4 OR estado=5"; $d->objectField("idmodelo", new scaffold("modelos"), "referencia"); $d->objectField("idmadera", new scaffold("maderas"), "referencia"); $d->specialField("fecha", "timestamp", "date", "html"); $d->hideField("observaciones"); $d->hideField("otro_material"); $d->specialField("estado", "estado", ooentity, estadolistwidget); $d->specialField("fecha_pedido", "timestamp", date, html); $d->specialField("fecha_entrega_prevista", "timestamp", date, html); $d->specialField("fecha_entrega", "timestamp", date, html); $d->headers("fecha_entrega", "Fecha de Entrega"); $d->headers("fecha_entrega_prevista", "Fecha de Entrega Prevista"); $d->headers("fecha_pedido", "Fecha de Pedido");