<?php include "local.php"; $sf = new scaffold("pedidos_paso"); $sf->open($r->id); $sf->delete(); print_arr(errorobject::errorlist()); echo "ok";
function filter($method) { $this->show_db_queries = true; $this->cpa("admin", $this->config["site"]["simplepass"]); $this->ctl = $this->ctl . '/' . $this->table_name; parent::filter($method); $this->sv("simple", 1); $tables = $this->model()->table_names(); $this->sv("tables", $tables); $this->sv("cmspath", "cms2"); }
function filter($method) { $this->initdb("utf8"); $this->cpa("admin", $this->config["site"]["simplepass"]); $this->ctl = $this->ctl . '/' . $this->table_name; parent::filter($method); $this->sv("simple", 1); $this->tableslist = array("qiye", "qiyesingle"); $this->sv("tables", $this->tableslist); $this->sv("cmspath", "qiyedb"); $this->show_db_queries = false; }
function filter($method) { $this->initdb("utf8"); //$this->cpa("root","admin12345"); $this->ctl = $this->ctl . '/' . $this->table_name; parent::filter($method); $this->sv("simple", 1); $this->tableslist = array("classes", "course_student", "courses", "students", "teachers", "users"); $this->sv("tables", $this->tableslist); $this->sv("cmspath", "demo"); $this->show_db_queries = true; }
<?php include "local.php"; $sf = new scaffold("pedidos_ventanas"); $sf->fromObject($r); $sf->insert(); print_arr(errorobject::errorlist()); echo "ok";
{ $item = new scaffold($this->dPage['pageVars']['editor'], $_GET['id']); if ($_POST['scaffoldSubmitted'] == 'true') { $item->process($_POST); $this->dOutput['formErrors'] = $item->invalid; } if ($_GET['delete']) { $item->delete($_GET['delete']); } $this->dOutput['form'] = $item->makeForm(); $this->dOutput['baseurl'] = $item->urlbase; $this->dOutput['table'] = $item->makeTable(); } else { $item = new scaffold('user', $_GET['id']); if ($_POST['scaffoldSubmitted'] == 'true') { $item->process($_POST); $this->dOutput['formErrors'] = $item->invalid; } if ($_GET['delete']) { $item->delete($_GET['delete']); } $this->dOutput['form'] = $item->makeForm(); $this->dOutput['baseurl'] = $item->urlbase; $this->dOutput['table'] = $item->makeTable(); } ?>
<?php include "local.php"; $sf = new scaffold("pedidos_ventanas"); $sf->setCondition("idpedido", $r->pedido_id); $sf->__query = "SELECT * FROM pedidos_ventanas where idpedido=" . $r->pedido_id . " ORDER BY id ASC"; header("content-type:text/xml"); echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; echo "<ventanas>"; foreach ($sf->getList() as $ventana) { $madera = new scaffold("maderas"); $modelo = new scaffold("modelos"); $madera->open($ventana["idmadera"]); $modelo->open($ventana["idmodelo"]); echo "\n<ventana\nid=\"" . $ventana["id"] . "\" \nunidades=\"" . $ventana["unidades"] . "\"\nmadera=\"" . $madera->referencia . "\"\nmodelo=\"" . $modelo->referencia . "\"\nhojas=\"" . $ventana["hojas"] . "\"\nventana_largo=\"" . $ventana["ventana_largo"] . "\"\nventana_ancho=\"" . $ventana["ventana_ancho"] . "\"\nventana_grueso=\"" . $ventana["ventana_grueso"] . "\"\njamba_dm=\"" . $ventana["jamba_dm"] . "\"\njamba_macizo=\"" . $ventana["jamba_macizo"] . "\"\njamba_medidas=\"" . $ventana["jamba_medidas"] . "\"\noscilante=\"" . $ventana["oscilante"] . "\"\nbatiente=\"" . $ventana["batiente"] . "\"\ncristal=\"" . $ventana["cristal"] . "\"\ncristal_mate=\"" . $ventana["cristal_mate"] . "\"\ncristal_carglass=\"" . $ventana["cristal_carglass"] . "\"\ncristal_grueso=\"" . $ventana["cristal_grueso"] . "\"\nmaterial_inox=\"" . $ventana["material_inox"] . "\"\nmaterial_laton=\"" . $ventana["material_laton"] . "\"\n/>"; } echo "</ventanas>";
public static function getFormIdValue($object, $datForm) { $myAct = new OPF_myActiveRecord(); $resSql = scaffold::getResultSelectFields($myAct, $datForm['table_name']); $myForm = new OPF_myForm('FormIdValue'); $myForm->addComment('cm1:2', ''); $myForm->addComment('cm2:2', ''); $myForm->addComment('cm3:2', ''); $cols = array(); foreach ($resSql[0] as $id => $value) { $cols[$id] = $id; } $key = ''; if (isset($_SESSION['temp_scaff_info']['rt'][$object]['key'])) { $key = $_SESSION['temp_scaff_info']['rt'][$object]['key']; } $myForm->addSelect(OPF_myLang::getPhrase('OPF_SCAFF_50'), 'key:2', $cols, $key); $value = ''; if (isset($_SESSION['temp_scaff_info']['rt'][$object]['value'])) { $value = $_SESSION['temp_scaff_info']['rt'][$object]['value']; } $myForm->addSelect(OPF_myLang::getPhrase('OPF_SCAFF_51'), 'value:2', $cols, $value); $myForm->addComment('cm4:2', ''); $myForm->addComment('cm5:2', ''); $myForm->addButton('btn2', OPF_myLang::getPhrase('OPF_SCAFF_14'), 'back.gif'); $myForm->addButton('btn1', OPF_myLang::getPhrase('OPF_SCAFF_15'), 'ok.gif'); $myForm->addEvent('btn1', 'onclick', 'onClickSetIdValRT', $object); $myForm->addEvent('btn2', 'onclick', 'selectOtherTable', $object, true); return $myForm->getForm(2); }
<?php /** * Vista inicial. * * @author José Ignacio Gutiérrez Guzmán <*****@*****.**> * @link http://www.osezno-framework.org/ * @copyright Copyright © 2007-2012 Osezno PHP Framework * @license http://www.osezno-framework.org/license.txt */ /** * Asignar contenidos a areas de la plantilla */ OPF_osezno::assign('nom_modulo', OPF_myLang::getPhrase('OPF_SCAFF_TITLE')); OPF_osezno::assign('desc_modulo', OPF_myLang::getPhrase('OPF_SCAFF_DESC')); OPF_osezno::assign('content1', scaffold::formStartUp()); /** * Mostrar la plantilla */ OPF_osezno::call_template('scaffold' . DS . 'modulo.tpl');
<?php include "local.php"; header("content-type: text/xml"); echo "<?xml version=\"1.0\"?>"; echo "\n<results>"; $r = new request(); $sf = new scaffold($r->entity); $sf->setCondition($r->condition_entity, $r->condition_value); foreach ($sf->getList() as $item) { echo "\n\t<result id=\"" . $item["id"] . "\" name=\"" . $item["referencia"] . "\" />"; } echo "\n</results>";
<?php /* * Scaffold User generation file */ include "../config/include_global.php"; //Load required classes $core_class = array("db" => "core", "scaffold" => "core"); $load->load_class($core_class); //Initialize and connect to database $db = new db(); $db->connect(); $scaffold = new scaffold(); $message = (int) $_GET['error']; $error_text = ""; $success_text = ""; switch ($message) { case 1: $success_text = "File Created Successfully"; } ?> <!DOCTYPE html> <html> <head> <title>Generate Scaffold</title> <link rel="stylesheet" href="css/style.css" type="text/css" media="screen, projection" charset="utf-8" /> </head> <body> <div class="topbar"> <div class="topbar-inner"> <div class="topcontainer">
<?php include "local.php"; $sf = new scaffold("pedidos"); $sf->setCondition("tracking", "AW/" . $r->prefix . "/" . strtoupper($r->suffix)); $list = $sf->getList(); 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";
function filter($method) { parent::filter($method); $this->sv("simple", 1); }
<?php include "local.php"; $p = new aworkspage(); error_reporting(E_ALL); $sf = new scaffold("pedidos"); $sf->open($r->pedido_id); if ($r->referencia) { $sf->fromObject($r); $sf->update(); } $b = new Box("Datos Generales del Pedido"); $t = new toolbar(); $t->addWidget(new button("Guardar Datos", "javascript:document.forms[0].submit()", "disk")); $t->addWidget(new button("Actualizar Estado del Pedido", "pedido_evento_add.php?pedido_id=" . $r->pedido_id, "lightning")); $b->addWidget($t); $f = new form("", ""); $f->addWidget(new form_separator("Referencia y Cliente")); $f->addWidget(new form_input("referencia", "Referencia", $sf->referencia)); $f->addWidget(new form_html("Tracking", "<span style=\"font-size:14px;font-weight:bold;\">" . $sf->tracking)); $f->addWidget(new form_input("cliente", "Cliente", $sf->cliente)); $f->addWidget(new form_separator("Fechas")); $d = new date(); $d->timestamp = $sf->fecha_pedido; $d->parse(); $f->addWidget(new form_html("Fecha de Pedido ", $d->string)); $d = new date(); $d->timestamp = $sf->fecha_entrega_prevista; $d->parse(); $f->addWidget(new form_html("Fecha Entrega Prevista", $d->string)); $d = new date();
<?php include '../config/include_global.php'; $core_class = array("db" => "core", "scaffold" => "core"); $call = new load(); $cl = $call->load_class($core_class); $db = new db(); $db->connect(); $cls = new scaffold(); $result = $cls->get_table_list("", true, true); echo '<pre>'; print_r($result); echo '</pre>';
<?php include "local.php"; $sf = new scaffold("pedidos_paso"); $sf->setCondition("idpedido", $r->pedido_id); $sf->__query = "SELECT * FROM pedidos_paso where idpedido=" . $r->pedido_id . " ORDER BY id ASC"; header("content-type:text/xml"); echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; echo "<puertas_paso>"; foreach ($sf->getList() as $puerta) { $madera = new scaffold("maderas"); $modelo = new scaffold("modelos"); $madera->open($puerta["idmadera"]); $modelo->open($puerta["idmodelo"]); echo "\n<puerta_paso\nid=\"" . $puerta["id"] . "\" \nunidades=\"" . $puerta["unidades"] . "\"\nmadera=\"" . $madera->referencia . "\"\nmodelo=\"" . $modelo->referencia . "\"\npuerta_largo=\"" . $puerta["puerta_largo"] . "\"\npuerta_ancho=\"" . $puerta["puerta_ancho"] . "\"\npuerta_grueso=\"" . $puerta["puerta_grueso"] . "\"\nregrueso_dm=\"" . $puerta["regrueso_dm"] . "\"\nregrueso_macizo=\"" . $puerta["regrueso_macizo"] . "\"\nregrueso_medidas=\"" . $puerta["regrueso_medidas"] . "\"\njamba_dm=\"" . $puerta["jamba_dm"] . "\"\njamba_macizo=\"" . $puerta["jamba_macizo"] . "\"\njamba_medidas=\"" . $puerta["jamba_medidas"] . "\"\nmano_izq=\"" . $puerta["mano_izq"] . "\"\nmano_dch=\"" . $puerta["mano_dch"] . "\"\ncondena=\"" . $puerta["condena"] . "\"\nmaterial_inox=\"" . $puerta["material_inox"] . "\"\nmaterial_laton=\"" . $puerta["material_laton"] . "\"\n/>"; } echo "</puertas_paso>";
<?php if (!empty($_POST)) { include "../config/include_global.php"; //Load required classes $core_class = array("db" => "core", "scaffold" => "core"); $load->load_class($core_class); //Initialize and connect to database $db = new db(); $db->connect(); $scaffold = new scaffold(); $filename = $_POST['scaffold_filename']; $tablename = $_POST['scaffold_table']; $create_mvc = $scaffold->quick_create($filename, $tablename); switch ($create_mvc) { case 1: header("Location:" . $baseurl . 'scaffold/template.php?file=' . $filename); break; case 2: header("Location:" . $baseurl . 'scaffold/index.php?error=2'); break; case 3: header("Location:" . $baseurl . 'scaffold/index.php?error=3'); break; } } else { header("Location:" . $baseurl . 'scaffold/index.php?error=4'); }
public function toScaffStep2($datForm) { if ($this->MYFORM_validate($datForm, array('table_name'))) { $myAct = new OPF_myActiveRecord(); if (!isset($_SESSION['temp_scaff_info'])) { $_SESSION['temp_scaff_info'] = array(); } $resSql = scaffold::getResultSelectFields($myAct, $datForm['table_name']); if (!$resSql) { $this->messageBox(OPF_myLang::getPhrase('OPF_SCAFF_10'), 'warning'); } else { $_SESSION['temp_scaff_info']['table_name'] = $datForm['table_name']; $this->newScaff($datForm, 2); } } else { $this->notificationWindow(OPF_myLang::getPhrase('MSG_CAMPOS_REQUERIDOS'), 5, 'error'); } return $this->response; }
function draw() { $o = $this->popMailBox(); $id = $o->id; $es = new estadowidget(); $es->drop($o); $out .= $es->draw(); $sf = new scaffold("pedidos_eventos"); $sf->__query = "SELECT * FROM pedidos_eventos WHERE idpedido=" . $id . " ORDER BY fecha DESC"; $out .= "<div style=\"overflow:auto;border:inset 1px;background:white;height:250px;\">"; $out .= "<table style=\"font-size:12px;\" class=\"eventos\"><thead><td>Fecha</td><td>Estado Antiguo</td><td>Estado Nuevo</td><td>Fecha Prevista</td><td>Descripción</td></thead>"; foreach ($sf->getList() as $evento) { $d = new date(); $d->timestamp = $evento["fecha"]; $d->parse(); $d2 = new date(); $d2->timestamp = $evento["fecha_entrega_prevista"]; $d2->parse(); $ewa = new estadolistwidget(); $ewn = new estadolistwidget(); $o = new oobject(); $o->estado = $evento["estado_viejo"]; $ewa->drop($o); $o = new oobject(); $o->estado = $evento["estado_nuevo"]; $ewn->drop($o); $out .= "<tr><td style=\"width:110px\">" . $d->string . "</td><td style=\"width:158px;\">" . $ewa->draw() . "</td><td style=\"width:158px;\">" . $ewn->draw() . "</td><td style=\"width:110px;\">" . $d2->short_string . "</td><td style=\"font-size:9px;\">" . $evento["descripcion"] . "</td></tr>"; } $out .= "</table>"; $out .= "</div>"; return $out; }