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(); }
imagecopyresized($img, $dotLayerImg, 840, 550, 0, 0, 200, 100, 200, 100); //header text $box = new Box($img); $box->setFontFace(__DIR__ . '/fonts/Amatic-Bold.ttf'); $box->setFontColor($colorHeader); $box->setFontSize(80); $box->setLineHeight(1); $box->setBox(580, 70, 480, 50); $box->setTextAlign('center', 'center'); $box->draw($headerText); //route box $box = new Box($img); $box->setFontFace(__DIR__ . '/fonts/Lato-Medium.ttf'); $box->setFontColor($colorRoute); $box->setFontSize(21); $box->setBox(600, 140, 460, 100); $box->setTextAlign('center', 'center'); $box->draw($routeText); //description box $box = new Box($img); $box->setFontFace(__DIR__ . '/fonts/Lato-Light.ttf'); $box->setFontColor($colorText); $box->setFontSize(19); $box->setLineHeight(1.4); $box->setBox(630, 260, 440, 300); $box->setTextAlign('center', 'top'); $box->draw($descriptionText); //send photo to user header('Content-type: image/jpeg'); header('Content-Disposition: inline; filename="day-' . $_POST['day'] . '.jpg"'); imagejpeg($img, null, 100);
$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();