case 'listaTallas': $db = TBase::conectaDB(); $obj = new TRopa($_GET['item']); $rs = $db->Execute("select * from talla where idItem = " . $_GET['item']); $datos = array(); while (!$rs->EOF) { $rs->fields['json'] = json_encode($rs->fields); array_push($datos, $rs->fields); $rs->moveNext(); } $smarty->assign("lista", $datos); $smarty->assign("precio", $obj->getPrecio()); break; case 'ctalla': switch ($objModulo->getAction()) { case 'add': $db = TBase::conectaDB(); $obj = new TTalla(); $obj->setId($_POST['id']); $obj->setRopa($_POST['item']); $obj->setNombre($_POST['nombre']); $obj->setAdicional($_POST['adicional']); echo json_encode(array("band" => $obj->guardar())); break; case 'del': $obj = new TTalla($_POST['id']); echo json_encode(array("band" => $obj->eliminar())); break; } break; }
array_push($datos, $rs->fields); $rs->moveNext(); } $smarty->assign("clientes", $datos); $rs = $db->Execute("select * from otrastecnicas a join item b using(idItem)"); while (!$rs->EOF) { $smarty->assign(strtr(strtolower($rs->fields['nombre']), 'àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ', 'aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY'), $rs->fields['idItem']); $rs->moveNext(); } break; case 'cotizador_tallas': $db = TBase::conectaDB(); $rs = $db->Execute("select * from talla where idItem = " . $_GET['id']); $datos = array(); while (!$rs->EOF) { $obj = new TTalla($rs->fields['idTalla']); $rs->fields['neto'] = $obj->getNeto(); array_push($datos, $rs->fields); $rs->moveNext(); } $smarty->assign("tallas", $datos); break; case 'listaCotizaciones': $db = TBase::conectaDB(); $rs = $db->Execute("select * from cotizacion a join cliente b using(idCliente)"); $datos = array(); while (!$rs->EOF) { $rs->fields['comentarios'] = ''; array_push($datos, $rs->fields); $rs->moveNext(); }