Esempio n. 1
0
 print "<form action='" . urlStr("base/computers/{$target}", array()) . "' method='POST'><table>";
 print "<input type='hidden' name='imaging_server' value='{$imaging_server}'/>";
 // need to be changed in getCriterionType (we don't use the second part of the array...
 $type = getTypeForCriterionInModule(quickGet('req'), quickGet('add_param'));
 $extended = getExtended(quickGet('req'), quickGet('add_param'));
 print "<tr><td>" . quickGet('req') . " > " . quickGet('add_param') . "</td><td>";
 if (strlen($extended)) {
     // Insert a hidden input which contains the type of data
     print "<input type='hidden' name='type_extended' value='" . $extended . "' />";
     // Display an option list to chose the comparison operator
     $operators = array('=', '<', '>', '!=');
     $listbox = new SelectItem("operator");
     $listbox->setElements($operators);
     $listbox->setElementsVal($operators);
     print _T("Comparison operator : ");
     $listbox->display();
     print "</td><td>";
     switch ($extended) {
         // Execute a regexp that checks the right type
         case 'int':
             // Nothing to do for the moment.
             break;
             // Display a calendar widget instead of an input
         // Display a calendar widget instead of an input
         case 'date':
             include "modules/base/includes/AjaxFilterLog.inc.php";
             $dateWidget = new LogDynamicDateTpl("value", _("Date"));
             $dateWidget->display();
             print "</td><td>";
             print "<input class='btnPrimary' value='" . _T("Add", "dyngroup") . "' name='Add' type='submit'/>";
             print "</td><td>";
Esempio n. 2
0
                    <?php 
    $servList->display();
    ?>
                </div>
            </div>
            <?php 
}
?>
            <div class="control-group">
                <label class="control-label" for="lang"><?php 
echo _("Language");
?>
</label>
                <div class="controls">
                    <?php 
echo $langList->display();
?>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="username"><?php 
echo _("Login");
?>
</label>
                <div class="controls">
                    <input name="username" type="text" class="input-small" id="username" value="<?php 
echo $login;
?>
" />
                </div>
            </div>
Esempio n. 3
0
}
$_SESSION['p_api_id'] = $_GET['papi'];
$files = getTemporaryFiles($_GET['papi']);
if (count($files)) {
    $r = new SelectItem("rdo_files");
    $vals = array();
    $keys = array();
    foreach ($files as $fi) {
        if ($fi[1] == True) {
            $vals[] = $fi[0];
            $keys[] = $fi[0];
        }
    }
    $r->setElementsVal($vals);
    $r->setElements($keys);
    $r->display();
    ?>
<script type="text/javascript">
    /*
     * Auto fill fields of form
     * if tempdir is empty (when changing packageAPI)
     * default tempdir will be chosen in ajaxGetSuggestedCommand
     * php file.
     */
    // FIXME: duplicated fillForm function
    function fillForm(selectedPapi, tempdir) {
        url = '<?php 
    echo urlStrRedirect("pkgs/pkgs/ajaxGetSuggestedCommand");
    ?>
&papiid=' + selectedPapi;
        if (tempdir != undefined) {