当前位置: 首页>>代码示例>>PHP>>正文


PHP printSelect函数代码示例

本文整理汇总了PHP中printSelect函数的典型用法代码示例。如果您正苦于以下问题:PHP printSelect函数的具体用法?PHP printSelect怎么用?PHP printSelect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了printSelect函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: printSelect

    /** Recursively prints selects to present hierarchy */
    function printSelect($class, $hierarchy, $selectedId, $nameForSelected)
    {
        if (isset($hierarchy) && is_array($hierarchy) && count($hierarchy) > 0) {
            $item = array_shift($hierarchy);
            // Remove head from the hierarchy
            $item_children = call_user_func(array($class, "getChildren"), $item["id"]);
            // Get children
            if (isset($hierarchy[0])) {
                // There is a "next one"
                $currentSelectionId = $hierarchy[0]["id"];
                // Select item
                $overrideName = $currentSelectionId == $selectedId && !empty($nameForSelected);
            }
            if (count($item_children)) {
                ?>
                <select name="<?php 
                echo $overrideName ? $nameForSelected : $item['name'];
                ?>
" class="hierarchy_item" style="width:120px">
                    <option value="<?php 
                echo $item["id"];
                ?>
" <?php 
                echo isset($currentSelectionId) ? "" : "selected";
                ?>
 >&nbsp;</option>

                    <?php 
                foreach ($item_children as $key => $value) {
                    ?>
                        <option value="<?php 
                    echo $key;
                    ?>
" <?php 
                    echo $currentSelectionId == $key ? "selected" : "";
                    ?>
 ><?php 
                    echo $value;
                    ?>
</option>
                    <?php 
                }
                ?>
                </select>
    <?php 
                printSelect($class, $hierarchy, $selectedId, $nameForSelected);
            }
        }
    }
开发者ID:CHILMEX,项目名称:amocasion,代码行数:50,代码来源:nestedSelects.php

示例2: printSelect

    <td><?php 
echo $loc->getText("biblioFieldsCollection");
?>
:</td>
    <td><?php 
printSelect("collectionCd", "collection_dm", $postVars);
?>
</td>
  </tr>
  <tr>
    <td><?php 
echo $loc->getText("biblioFieldsMaterialTyp");
?>
:</td>
    <td><?php 
printSelect("materialCd", "material_type_dm", $postVars);
?>
</td>
  </tr>
  <tr>
    <td><?php 
echo $loc->getText("biblioFieldsOpacFlg");
?>
:</td>
    <td>
      <SELECT name=opac id=opac>
        <option value=Y SELECTED><?php 
echo $loc->getText("AnswerYes");
?>
</option>
        <option value=N><?php 
开发者ID:Giordano-Bruno,项目名称:GiordanoBruno,代码行数:31,代码来源:upload_csv_form.php

示例3: renderEditVService

function renderEditVService($vsid)
{
    $vsinfo = spotEntity('ipv4vs', $vsid);
    printOpFormIntro('updIPv4VS');
    echo '<table border=0 align=center>';
    echo "<tr><th class=tdright>VIP:</th><td class=tdleft><input type=text name=vip value='{$vsinfo['vip']}'></td></tr>\n";
    echo "<tr><th class=tdright>Port:</th><td class=tdleft><input type=text name=vport value='{$vsinfo['vport']}'></td></tr>\n";
    echo "<tr><th class=tdright>Proto:</th><td class=tdleft>";
    global $vs_proto;
    printSelect($vs_proto, array('name' => 'proto'), $vsinfo['proto']);
    echo "</td></tr>\n";
    echo "<tr><th class=tdright>Name:</th><td class=tdleft><input type=text name=name value='{$vsinfo['name']}'></td></tr>\n";
    echo "<tr><th class=tdright>Tags:</th><td class=tdleft>";
    printTagsPicker();
    echo "</td></tr>\n";
    echo "<tr><th class=tdright>VS config:</th><td class=tdleft><textarea name=vsconfig rows=20 cols=80>{$vsinfo['vsconfig']}</textarea></td></tr>\n";
    echo "<tr><th class=tdright>RS config:</th><td class=tdleft><textarea name=rsconfig rows=20 cols=80>{$vsinfo['rsconfig']}</textarea></td></tr>\n";
    echo "<tr><th class=submit colspan=2>";
    printImageHREF('SAVE', 'Save changes', TRUE);
    echo "</td></tr>\n";
    echo "</table></form>\n";
    // delete link
    echo '<p class="centered">';
    if ($vsinfo['refcnt'] > 0) {
        echo getOpLink(NULL, 'Delete virtual service', 'nodestroy', "Could not delete: there are {$vsinfo['refcnt']} LB links");
    } else {
        echo getOpLink(array('op' => 'del', 'id' => $vsinfo['id']), 'Delete virtual service', 'destroy');
    }
}
开发者ID:spartak-radchenko,项目名称:racktables,代码行数:29,代码来源:slb-interface.php

示例4: createInfoField

    print createInfoField(userData::ADDRESS_TAG, util::UTF8toISO8859($userData->getAddress()) . ", " . $userData->getCity() . ", " . $userData->getZipCode());
    print createInfoField(userData::PHONE_TAG, $userData->getPhone());
    print '	</div>			
			<div class="registerField" style="float: right;margin-top:8 ">
				<input class="searchButton" style="font-size: 16" size="15" value="Modifier" type="submit" />
			</div>
		</fieldset>';
    print '</form>';
    // DEMANDE
    //////////////////////////
    print '<form method="post" action="" name="demande" enctype="multipart/form-data">
			<input type="hidden" name="submissionTarget" value="demande"/>';
    print '<fieldset >
			<legend> <h3>Demande de stationnement</h3> </legend>
			<div style="display:block" >';
    printn('<label>Type de paiement :</label>' . printSelect(demande::PAYMENT_METHOD_FORM_FIELD, $demande->getPaymentMethod(), $demande->getPaymentErrorMessage()) . '<br/></br>');
    createCheckBoxField(demande::CARPOOLING_FORM_FIELD, $demande->isCarpooling(), "Je prevois faire du covoiturage (si oui, indiquer le nom, prénom et matricule des personnes \n\t\t\t\t\t\tavec qui vous prevoyez covoiturer dans les notes concernant votre demande");
    createCheckBoxField(demande::CARPOOLING_OTHERS_FORM_FIELD, $demande->isCarpoolingOthers(), 'Je serais interesse à trouver des personnes pour faire du covoiturage');
    printn('<label class="formFieldFileLabel">Note concernant votre demande (optionnel) :</label><textarea name="' . demande::DETAILS_FORM_FIELD . '" style="max-width:65%" cols="40" rows="7">' . $demande->getDetails() . '</textarea><br/>');
    print createDemandFileField('Preuve de permis de conduire', '(nom de fichier alphanum&eacuterique [a-z][0-9] sans espace)', '', 'file', demande::DRIVING_LICENSE_FORM_FIELD, '', demande::DRIVING_LICENSE_FORM_FIELD, $demande->getLicenseErrorMessage(), $demande->getLicense());
    print createDemandFileField('Preuve de résidence', '(nom de fichier alphanum&eacuterique [a-z][0-9] sans espace)', '', 'file', demande::PROOF_OF_RESIDENCE_FORM_FIELD, '', demande::PROOF_OF_RESIDENCE_FORM_FIELD, $demande->getResidenceErrorMessage(), $demande->getResidenceProof());
    print '	</div>			
		</fieldset>';
    // VOITURES
    //////////////////////////
    createCarForm($demande->getFirstCar(), '1');
    createCarForm($demande->getSecondCar(), '2 - optionnel');
    print '	<div class="registerField" style="float: right;margin-top:8;margin-bottom:15 ">				
			<input class="searchButton" style="font-size: 16" size="15" value="' . ($demande->hasExistingDemandInDB() ? "Enregistrer" : "Soumettre") . '" type="submit"' . (util::isWebsiteOpen() ? "" : "disabled") . '/>
			</div>';
    print '</form>';
开发者ID:Gwagz,项目名称:stationnement_aep,代码行数:31,代码来源:demande.php

示例5: printSelect

                    </div>
                </li>
                <li class="clearfix bb_d pb10 pt10">
                    <div class="fl fb w80">影像报告单</div>
                    <div class="oh zoom fs pl30 write_report_detail">
                        <?php 
    printSelect($attachment, 'yingxiang');
    ?>
                        <?php 
    printSelect($attachment, 'other');
    ?>
                    </div>
                </li>
                <li class="clearfix bb_d pb10 pt10">
                    <div class="fl fb w80">其他报告单</div>
                    <div class="oh zoom fs pl30 write_report_detail">
                        <?php 
    printSelect($attachment, 'zhenduan');
    ?>
                        <?php 
    printSelect($attachment, 'waiguan');
    ?>
                    </div>
                </li>
            </ul>
        </div>
        </div>
    </div>
</div>
<?php 
}
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:31,代码来源:_ask_upload.inc.php

示例6: printSelect

  <tr>
    <th colspan="2" valign="top" nowrap="yes" align="left">
      <?php 
echo $loc->getText("mbrAccountLabel");
?>
    </td>
  </tr>
  <tr>
    <td nowrap="true" class="primary">
      <?php 
echo $loc->getText("mbrAccountTransTyp");
?>
    </td>
    <td valign="top" class="primary">
      <?php 
printSelect("transactionTypeCd", "transaction_type_dm", $postVars);
?>
    </td>
  </tr>
  <tr>
    <td nowrap="true" class="primary" valign="top">
      <?php 
echo $loc->getText("mbrAccountDesc");
?>
    </td>
    <td valign="top" class="primary">
      <?php 
printInputText("description", 40, 128, $postVars, $pageErrors);
?>
    </td>
  </tr>
开发者ID:Giordano-Bruno,项目名称:GiordanoBruno,代码行数:31,代码来源:mbr_account.php

示例7: renderNewTripletForm

function renderNewTripletForm($realm1, $realm2)
{
    function get_realm_data($realm)
    {
        $name = NULL;
        $list = array();
        $options = array();
        switch ($realm) {
            case 'object':
                $name = 'Load balancer';
                $list = getNarrowObjectList('IPV4LB_LISTSRC');
                $options = array('name' => 'object_id');
                break;
            case 'ipvs':
                $name = 'Virtual service';
                $list = formatEntityList(listCells('ipvs'));
                $options = array('name' => 'vs_id');
                break;
            case 'ipv4rspool':
                $name = 'RS pool';
                $list = formatEntityList(listCells('ipv4rspool'));
                $options = array('name' => 'rspool_id');
                break;
            default:
                throw new InvalidArgException('realm', $realm);
        }
        return array('name' => $name, 'list' => $list, 'options' => $options);
    }
    $realm1_data = get_realm_data($realm1);
    $realm2_data = get_realm_data($realm2);
    startPortlet('Add new VS group');
    if (count($realm1_data['list']) && count($realm2_data['list'])) {
        printOpFormIntro('addLink');
    }
    echo "<table cellspacing=0 cellpadding=5 align=center>";
    echo "<tr valign=top><th class=tdright>{$realm1_data['name']}</th><td class=tdleft>";
    printSelect($realm1_data['list'], $realm1_data['options']);
    echo '</td><td class=tdcenter valign=middle rowspan=2>';
    if (count($realm1_data['list']) && count($realm2_data['list'])) {
        printImageHREF('ADD', 'Configure LB', TRUE);
    } else {
        $names = array();
        if (!count($realm1_data['list'])) {
            $names[] = 'a ' . $realm1_data['name'];
        }
        if (!count($realm2_data['list'])) {
            $names[] = 'a ' . $realm2_data['name'];
        }
        $message = 'Please create ' . implode(' and ', $names) . '.';
        showNotice($message);
        printImageHREF('DENIED', $message, FALSE);
    }
    echo "<tr valign=top><th class=tdright>{$realm2_data['name']}</th><td class=tdleft>";
    printSelect($realm2_data['list'], $realm2_data['options']);
    echo "</td></tr>\n";
    echo "</table></form>\n";
    finishPortlet();
}
开发者ID:spartak-radchenko,项目名称:racktables,代码行数:58,代码来源:slb2-interface.php

示例8: printSelect

                    <div class="oh zoom fs pl30 write_report_detail">
                        <?php printSelect($attachment, 'huayandan', $patient->id); ?>
                    </div>
                </li>
                <li class="clearfix bbd_e9 pb10 pt10">
                    <div class="fl fb w80">影像报告单</div>
                    <div class="oh zoom fs pl30 write_report_detail">
                        <?php printSelect($attachment, 'yingxiang', $patient->id); ?>
                        <?php printSelect($attachment, 'other', $patient->id); ?>
                    </div>
                </li>
                <li class="clearfix bbd_e9 pb10 pt10">
                    <div class="fl fb w80">其他报告单</div>
                    <div class="oh zoom fs pl30 write_report_detail">
                        <?php printSelect($attachment, 'zhenduan', $patient->id); ?>
                        <?php printSelect($attachment, 'waiguan', $patient->id); ?>
                    </div>
                </li>
            </ul>
        </div>
    </div>
    </div>
    </div>
<?php
}
?>
<script>
function showPopupBingli4Space(type_id, patientId)
{//{{{
    fancyBoxOpenWindow('/bingli/showbl/'+type_id+'.htm?patientId='+patientId+'&bingli4space=1');
}//}}} 
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:31,代码来源:_writebingli.php

示例9: handlePopupPortLink


//.........这里部分代码省略.........
            $js_table .= "POIFC['{$pair['type1']}-{$pair['type2']}'] = 1;\n";
        }
    }
    if ($matches) {
        if ($port_info['oif_id'] != $type_local) {
            commitUpdatePortOIF($port_info['id'], $type_local);
        }
        if ($remote_port_info['oif_id'] != $type_remote) {
            commitUpdatePortOIF($remote_port_info['id'], $type_remote);
        }
        linkPorts($port_info['id'], $remote_port_info['id'], $_REQUEST['cable']);
        // patch cable?
        if (array_key_exists('heap_id', $_REQUEST)) {
            // Leave the compatibility constraints check up to the foreign keys.
            if (0 != ($heap_id = genericAssertion('heap_id', 'uint0'))) {
                $heaps = getPatchCableHeapSummary();
                if (commitModifyPatchCableAmount($heap_id, -1)) {
                    showSuccess('consumed a patch cable from ' . formatPatchCableHeapAsPlainText($heaps[$heap_id]));
                } else {
                    showError('failed to consume a patch cable');
                }
            }
        }
        showOneLiner(8, array(formatPortLink($port_info['object_id'], NULL, $port_info['id'], $port_info['name']), formatPort($remote_port_info)));
        addJS(<<<END
window.opener.location.reload(true);
window.close();
END
, TRUE);
        backupLogMessages();
    } else {
        // JS code to display port compatibility hint
        addJS(<<<END
POIFC = {};
{$js_table}
\$(document).ready(function () {
\t\$('select.porttype').change(onPortTypeChange);\t
\tonPortTypeChange();
});
function onPortTypeChange() {
\tvar key = \$('*[name=port_type]')[0].value + '-' + \$('*[name=remote_port_type]')[0].value;
\tif (POIFC[key] == 1)
\t{
\t\t\$('#hint-not-compat').hide();
\t\t\$('#hint-compat').show();
\t}
\telse
\t{
\t\t\$('#hint-compat').hide();
\t\t\$('#hint-not-compat').show();
\t}
}
END
, TRUE);
        addCSS(<<<END
.compat-hint {
\tdisplay: none;
\tfont-size: 125%;
}
.compat-hint#hint-compat {
\tcolor: green;
}
.compat-hint#hint-not-compat {
\tcolor: #804040;
}
END
, TRUE);
        // render port type editor form
        echo '<form method=GET>';
        echo '<input type=hidden name="module" value="popup">';
        echo '<input type=hidden name="helper" value="portlist">';
        echo '<input type=hidden name="port" value="' . $port_info['id'] . '">';
        echo '<input type=hidden name="remote_port" value="' . $remote_port_info['id'] . '">';
        echo '<input type=hidden name="cable" value="' . htmlspecialchars($_REQUEST['cable'], ENT_QUOTES) . '">';
        echo '<p>The ports you have selected are not compatible. Please select a compatible transceiver pair.';
        echo '<p>';
        echo formatPort($port_info) . ' ';
        if ($port_info['iif_id'] == 1) {
            echo formatPortIIFOIF($port_info);
            echo '<input type=hidden name="port_type" value="' . $port_info['oif_id'] . '">';
        } else {
            echo '<label>' . $port_info['iif_name'] . ' ';
            printSelect(getExistingPortTypeOptions($port_info), array('class' => 'porttype', 'name' => 'port_type'), $type_local);
            echo '</label>';
        }
        echo ' &mdash; ';
        if ($remote_port_info['iif_id'] == 1) {
            echo formatPortIIFOIF($remote_port_info);
            echo '<input type=hidden name="remote_port_type" value="' . $remote_port_info['oif_id'] . '">';
        } else {
            echo '<label>' . $remote_port_info['iif_name'] . ' ';
            printSelect(getExistingPortTypeOptions($remote_port_info), array('class' => 'porttype', 'name' => 'remote_port_type'), $type_remote);
            echo '</label>';
        }
        echo ' ' . formatPort($remote_port_info);
        echo '<p class="compat-hint" id="hint-not-compat">&#10005; Not compatible port types</p>';
        echo '<p class="compat-hint" id="hint-compat">&#10004; Compatible port types</p>';
        echo '<p><input type=submit name="do_link" value="Link">';
    }
}
开发者ID:spartak-radchenko,项目名称:racktables,代码行数:101,代码来源:popup.php

示例10: printNewItemTR

 function printNewItemTR()
 {
     global $vtoptions;
     printOpFormIntro('add');
     echo '<tr><td>';
     printImageHREF('create', 'add VLAN', TRUE, 110);
     echo '</td><td>';
     echo '<input type=text name=vlan_id size=4 tabindex=101>';
     echo '</td><td>';
     printSelect($vtoptions, array('name' => 'vlan_type', 'tabindex' => 102), 'ondemand');
     echo '</td><td>';
     echo '<input type=text size=48 name=vlan_descr tabindex=103>';
     echo '</td><td>';
     printImageHREF('create', 'add VLAN', TRUE, 110);
     echo '</td></tr></form>';
 }
开发者ID:xtha,项目名称:salt,代码行数:16,代码来源:interface.php

示例11: H

    echo ">" . H($dm->getDescription()) . "</option>\n";
}
echo "</select>\n";
?>
    </td>
  </tr>
  <tr>
    <td nowrap="true" class="primary form-required">
      <sup>*</sup> <?php 
echo $loc->getText("biblioFieldsCollection");
?>
:
    </td>
    <td valign="top" class="primary">
      <?php 
printSelect("collectionCd", "collection_dm", $postVars);
?>
    </td>
  </tr>
  <tr>
    <td nowrap="true" class="primary form-required" valign="top">
      <sup>*</sup> <?php 
echo $loc->getText("biblioFieldsCallNmbr");
?>
:
    </td>
    <td valign="top" class="primary">
      <?php 
printInputText("callNmbr1", 20, 20, $postVars, $pageErrors);
?>
<br>
开发者ID:Giordano-Bruno,项目名称:GiordanoBruno,代码行数:31,代码来源:biblio_fields.php

示例12: renderNetworkEditAttrs

function renderNetworkEditAttrs()
{
    global $pageno, $netobject_type_id;
    $network = spotEntity($pageno === 'ipv4net' ? 'ipv4net' : 'ipv6net', getBypassValue());
    $values = getAttrValuesForNetwork($network);
    echo '<p>';
    startPortlet("Attributes");
    printOpFormIntro('updateAttrs');
    // optional attributes
    echo '<table border=0 cellspacing=0 cellpadding=3 align=center>';
    $suggest_records = array();
    if (count($values) > 0) {
        $i = 0;
        foreach ($values as $record) {
            if (!permitted(NULL, NULL, NULL, array(array('tag' => '$attr_' . $record['id']), array('tag' => '$any_op')))) {
                continue;
            }
            echo "<input type=hidden name={$i}_attr_id value={$record['id']}>";
            echo '<tr><td>';
            if (strlen($record['value'])) {
                echo "<a href='" . makeHrefProcess(array('op' => 'clearSticker', 'id' => $network['id'], 'attr_id' => $record['id'])) . "'>";
                printImageHREF('clear', 'Clear value');
                echo '</a>';
            } else {
                echo '&nbsp;';
            }
            echo '</td>';
            echo "<th class=sticker>{$record['name']}:</th><td class=tdleft>";
            switch ($record['type']) {
                case 'uint':
                case 'float':
                case 'string':
                    echo "<input type=text name={$i}_value value='{$record['value']}'>";
                    break;
                case 'dict':
                    $opts = array('0' => '(none)') + readChapter($record['chapter_id'], 'o');
                    printSelect($opts, array('name' => "{$i}_value"), $record['key']);
                    break;
                case 'date':
                    $date_value = $record['value'] ? date(getConfigVar('DATETIME_FORMAT'), $record['value']) : '';
                    echo "<input type=text name={$i}_value value='{$date_value}'>";
                    break;
            }
            $i++;
            echo '<input type=hidden name=num_attrs value=' . $i . ">\n";
        }
    }
    echo '</table>';
    printImageHREF('SAVE', 'Save changes', TRUE);
    echo '</form>';
    finishPortlet();
}
开发者ID:cengn-tao,项目名称:racktables-contribs,代码行数:52,代码来源:network-attrs.php

示例13: printSelect

                        <?php 
    printSelect($attachment, 'yingxiang', $ref->patient->id);
    ?>
                        <?php 
    printSelect($attachment, 'other', $ref->patient->id);
    ?>
                    </div>
                </li>
                <li class="clearfix bb_d pb10 pt10">
                    <div class="fl fb w80">其他报告单</div>
                    <div class="oh zoom fs pl30 write_report_detail">
                        <?php 
    printSelect($attachment, 'zhenduan', $ref->patient->id);
    ?>
                        <?php 
    printSelect($attachment, 'waiguan', $ref->patient->id);
    ?>
                    </div>
                </li>
            </ul>
        </div>
    </div>
    </div>
    </div>
<?php 
}
?>
<script>
function showPopupBingli4Space(type_id, patientId)
{//{{{
    fancyBoxOpenWindow('/bingli/showbl/'+type_id+'.htm?patientId='+patientId+'&bingli4space=1');
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:31,代码来源:_flow_upload.inc.php

示例14: printSelect

            $selected = '';
        }
        $options_str .= "<option " . $selected . " value=" . $key . ">" . $text . "</option>";
    }
    echo "<select name=" . $name . ">" . $options_str . "</select>";
}
?>
</pre>
	<form method="post">
		<label for="first-name">Имя:&nbsp;</label>
		<input value="<?php 
echo $_POST['first-name'];
?>
" name="first-name" id="first-name">
		<br>
		<label>Домашние животные: </label>
			<?php 
printSelect($_POST, 'animals', array('Dog' => 'Собака', 'Cat' => 'Кошка'));
?>
 
		<br>
		<label>Автомобиль: </label>
			<?php 
makeSelect($_POST, 'cars', array('BMW' => 'БМВ', 'Mersedes' => 'Мерседес'));
?>
		<br>
		<input type="submit" value="Send">
	</form>
</body>
</html>
开发者ID:gorbenko,项目名称:learning,代码行数:30,代码来源:lesson4.php

示例15: printNewItemTR

 function printNewItemTR()
 {
     printOpFormIntro('add');
     echo '<tr><td>';
     printImageHREF('create', 'Create attribute', TRUE);
     echo "</td><td><input type=text name=attr_name></td><td>";
     global $attrtypes;
     printSelect($attrtypes, array('name' => 'attr_type'));
     echo '</td><td>';
     printImageHREF('create', 'Create attribute', TRUE);
     echo '</td></tr></form>';
 }
开发者ID:spartak-radchenko,项目名称:racktables,代码行数:12,代码来源:interface-config.php


注:本文中的printSelect函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。