Пример #1
0
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="../piwidata/css/default.css" type="text/css" />
<link rel="stylesheet" href="../piwidata/js/jscalendar/calendar-win2k-1.css" type="text/css" />
</head>
<body>
<?php 
define('PIWI_URL', '../');
include_once '../Piwi.php';
/*Field set*/
$entryPC = new Entry('codigo', '', 'Código Postal');
$entryPC->setComment('Código Postal');
$fieldset = new FieldSet('Dirección');
$fieldset->add($entryPC);
$fieldset->add(new Entry('colonia', '', 'Colonia'));
/*A ComboGroup*/
$combogroup = new ComboGroup('opciones2', 'Muchas opciones');
$pares = array();
$impares = array();
for ($i = 0; $i < 20; $i++) {
    if ($i % 2 == 0) {
        $pares[] = new ComboOption("numero {$i}", "Número {$i}");
    } else {
        $impares[] = new ComboOption("{$numero} {$i}", "Número {$i}");
    }
}
$combogroup->addGroup('pares', 'pares', $pares);
$combogroup->addGroup('impares', 'impares', $impares, true);
$combogroup->setDefault('Número 2');
$combogroup->setComment('numeros');
/*Text Area*/
$fieldset2 = new FieldSet('Botones');
Пример #2
0
$button = new Button("boton", "Boton");
$button->SetSubmit();
$button->SetStock(STOCK_CANCEL);
$button->AddEvent(new JSEvent(ON_CLICK, "javascript:alert('huevudisimo');"));
//$button->Show ();
$entry = new Entry("cajita", "Una cosa");
$entry->AddEvent(new JSEvent(ON_CHANGE, "javascript:alert(this.value)"));
$entry->AddEvent(new JSEvent(ON_CHANGE, "javascript:alert(calcMD5(this.value));", "http://jaws.com.mx/templates/controlpanel/md5.js"));
//$entry->Show ();
$combo = new Combo("opciones");
$combo->AddOption("Jaws Proyect", "jawsproject");
$combo->AddOption("Piwi Proyect", "piwiproject");
$combo->AddOption("mBloggy", "mbloggy");
$combo->SetDefault("mbloggy");
//$combo->Show ();
$combogroup = new ComboGroup("opciones2");
$pares = array();
$impares = array();
for ($i = 0; $i < 20; $i++) {
    if ($i % 2 == 0) {
        $pares[] = new ComboOption("numero {$i}", "N�mero {$i}");
    } else {
        $impares[] = new ComboOption("numero {$i}", "N�mero {$i}");
    }
}
$combogroup->AddGroup("pares", "pares", $pares);
$combogroup->AddGroup("impares", "impares", $impares, true);
$combogroup->SetDefault("N�mero 2");
//$combogroup->Show ();
$comboimage = new ComboImage("comboimage");
$comboimage->AddOption("Jaws Proyect", "jawsproject", STOCK_CANCEL);
Пример #3
0
include_once "Piwi.php";
$button = new Button("boton", "Boton");
$button->SetSubmit();
$button->SetStock(STOCK_CANCEL);
$button->AddEvent(new JSEvent(ON_CLICK, "javascript:alert('huevudisimo');"));
echo $button->GetPiwiXML();
echo "\n\n\n";
$combo = new Combo("opciones");
$combo->AddOption("Jaws Proyect", "jawsproject");
$combo->AddOption("Piwi Proyect", "piwiproject");
$combo->AddOption("mBloggy", "mbloggy");
$combo->SetDefault("mbloggy");
echo $combo->GetPiwiXML();
echo "\n\n\n";
$combogroup = new ComboGroup("opciones2");
$pares = array();
$impares = array();
for ($i = 0; $i < 20; $i++) {
    if ($i % 2 == 0) {
        $pares[] = new ComboOption("numero {$i}", "Número {$i}");
    } else {
        $impares[] = new ComboOption("numero {$i}", "Número {$i}");
    }
}
$combogroup->AddGroup("pares", "pares", $pares);
$combogroup->AddGroup("impares", "impares", $impares, true);
$combogroup->SetDefault("pares", "Número 2");
echo $combogroup->GetPiwiXML();
echo "\n\n\n";
$textarea = new TextArea("textarea", "Texto");