Example #1
0
include "../../tool.php";
SimpleAutentificacionAutomatica("visual-iframe");
$op = new Producto();
$op->Crea();
$Referencia = $op->get("Referencia");
$Nombre = $op->get("Nombre");
$Marca = _("Varias");
$primerCB = $op->get("CodigoBarras");
switch ($modo) {
    case "cb":
        echo $primerCB;
        break;
    case "subfamilia":
        $IdFamilia = CleanID($_GET["IdFamilia"]);
        $SubFamilia = genArraySubFamilias($IdFamilia);
        foreach ($SubFamilia as $key => $value) {
            echo "{$value}={$key}\n";
        }
        break;
    case "tallas":
        $IdTallaje = CleanID($_GET["IdTallaje"]);
        $IdFamilia = CleanID($_GET["IdFamilia"]);
        $talla = genArrayTallas($IdTallaje, $IdFamilia);
        foreach ($talla as $key => $value) {
            echo "{$value}={$key}\n";
        }
        break;
    case "colores":
        $idfamilia = CleanID($_GET["IdFamilia"]);
        $color = genArrayColores($idfamilia);
Example #2
0
        }
        echo "\r\n\t\tfunction UsarNuevo() {\r\n              \r\n\t\t\tvar url;\r\n\t\t\tvar familia = document.getElementById('nuevafamilia').value;\t\t\t\r\n\r\n            if (!familia || familia == '')\r\n                 return;\r\n            \r\n\t\t\turl = 'selfamilia.php';\r\n\t\t\turl = url +'?';\r\n            url = url + 'modo';\r\n            url = url + '=salvafamilia';\r\n            url = url + '&'+'familia=' + familia;\r\n\t\t\tdocument.location.href = url\t\t\t\r\n\t\t}\r\n\t\t";
        echo "\n</script>";
        echo "<listbox id='Familia' flex='1'  onclick='opener.change(this,fam[this.value]);window.close();return true;'>";
        echo genXulComboFamilias();
        echo "</listbox>";
        echo "</groupbox>";
        echo "<groupbox>" . "<caption label='" . _("Nueva familia") . "'/>";
        echo "<textbox id='nuevafamilia'/>";
        echo "<button label='" . _("Nuevo") . "' onkeypress='if (event.which == 13) UsarNuevo()' oncommand='UsarNuevo()'/>";
        echo "</groupbox>";
        break;
    case "subfamilia":
        $idfamilia = CleanID($_GET["IdFamilia"]);
        echo "<groupbox  flex='1'> <caption label='" . _("Sub familias") . "'/>";
        $subfamilias = genArraySubFamilias($idfamilia);
        echo "<script>\n";
        echo " fam =new Object();\n";
        foreach ($subfamilias as $key => $value) {
            echo "fam[{$key}] = '{$value}';\n";
        }
        echo "\n</script>";
        //echo "Mostrando sub familia de familia id '$idfamilia'<p>";
        echo "<listbox id='Subfamilia' flex='1' rows='7' onclick='opener.changeSub(this,fam[this.value]);window.close();return true;'>";
        echo genXulComboSubFamilias(false, $idfamilia);
        echo "</listbox>";
        echo "</groupbox>";
        break;
    default:
        break;
}