本文整理汇总了PHP中buildSelect函数的典型用法代码示例。如果您正苦于以下问题:PHP buildSelect函数的具体用法?PHP buildSelect怎么用?PHP buildSelect使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了buildSelect函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: printfmDNSUsersForm
/**
* Checks if an email address is valid
*
* @since 1.0
* @package facileManager
*
* @param string $address Email address to validate
* @return boolean
*/
function printfmDNSUsersForm($user_module_perms, $module_name)
{
global $__FM_CONFIG, $fmdb;
if (!array_key_exists($module_name, $__FM_CONFIG)) {
/** Include module variables */
@(include dirname(__FILE__) . '/variables.inc.php');
}
$available_zones_perms = 0;
if (isSerialized($user_module_perms)) {
$user_module_perms = unserialize($user_module_perms);
}
$available_zones_perms = isset($user_module_perms[$module_name]['access_specific_zones']) ? $user_module_perms[$module_name]['access_specific_zones'] : 0;
/** Get available zones */
$available_zones[0][] = 'All Zones';
$available_zones[0][] = '0';
basicGetList('fm_' . $__FM_CONFIG[$module_name]['prefix'] . 'domains', 'domain_mapping`,`domain_name', 'domain_', 'AND domain_clone_domain_id=0');
if ($fmdb->num_rows) {
$results = $fmdb->last_result;
for ($i = 0; $i < $fmdb->num_rows; $i++) {
$available_zones[$i + 1][] = !function_exists('displayFriendlyDomainName') ? $results[$i]->domain_name : displayFriendlyDomainName($results[$i]->domain_name);
$available_zones[$i + 1][] = $results[$i]->domain_id;
}
}
$zones_list = buildSelect("user_caps[{$module_name}][access_specific_zones]", 1, $available_zones, $available_zones_perms, 5, null, true, null, 'wide_select', __('Select one or more zones'));
return sprintf('
<tr class="user_permissions">
<th></th>
<td><strong>%s</strong><br />%s</td>
</tr>
', __('Limit access to the following zones:'), $zones_list);
}
示例2: getUserById
function getUserById($id)
{
$connection = dbConnect();
$options = ['columns' => 'u.id_setor, u.nome, u.email, u.ativo, u.tipo, s.sigla, s.nome as setor', 'join' => [['type' => 'INNER JOIN', 'table' => 'setores s', 'columns' => 's.id = u.id_setor']], 'where' => ['u.id' => $id]];
$sql = buildSelect('usuarios u', $options);
$stmt = mysqli_prepare($connection, $sql);
mysqli_stmt_bind_param($stmt, 'i', $id);
mysqli_stmt_execute($stmt);
$resultObject = mysqli_stmt_get_result($stmt);
$result = mysqli_fetch_all($resultObject, MYSQLI_ASSOC);
mysqli_stmt_close($stmt);
dbClose($connection);
return $result[0];
}
示例3: getStatusById
function getStatusById($id)
{
$connection = dbConnect();
$options = ['columns' => 'id, status', 'where' => ['id' => $id]];
$sql = buildSelect('status_atividade', $options);
$stmt = mysqli_prepare($connection, $sql);
mysqli_stmt_bind_param($stmt, 'i', $id);
mysqli_stmt_execute($stmt);
$resultObject = mysqli_stmt_get_result($stmt);
$result = mysqli_fetch_all($resultObject, MYSQLI_ASSOC);
mysqli_stmt_close($stmt);
dbClose($connection);
return $result[0];
}
示例4: getActivitiesById
function getActivitiesById($id)
{
$connection = dbConnect();
$options = ['columns' => 'a.id, a.id_demandante, a.id_responsavel, a.id_setor, a.id_status, a.descricao,
ud.nome as demandante, s.sigla, sa.status, a.titulo, a.data, a.tempo_gasto', 'join' => [['type' => 'INNER JOIN', 'table' => 'setores s', 'columns' => 's.id = a.id_setor'], ['type' => 'INNER JOIN', 'table' => 'status_atividade sa', 'columns' => 'sa.id = a.id_status'], ['type' => 'INNER JOIN', 'table' => 'usuarios ud', 'columns' => 'ud.id = a.id_demandante']], 'where' => ['a.id' => $id]];
$sql = buildSelect('atividades a', $options);
$stmt = mysqli_prepare($connection, $sql);
mysqli_stmt_bind_param($stmt, 'i', $id);
mysqli_stmt_execute($stmt);
$resultObject = mysqli_stmt_get_result($stmt);
$result = mysqli_fetch_all($resultObject, MYSQLI_ASSOC);
mysqli_stmt_close($stmt);
dbClose($connection);
return $result[0];
}
示例5: translate
</tr>
<?php
}
?>
</tbody>
</table>
<hr/>
<table id="sortTable" class="filterTable" cellspacing="0">
<tbody>
<tr>
<td><label for="sort_field"><?php
echo translate('SortBy');
?>
</label><?php
echo buildSelect("sort_field", $sort_fields);
echo buildSelect("sort_asc", $sort_dirns);
?>
</td>
<td><label for="limit"><?php
echo translate('LimitResultsPre');
?>
</label><input type="text" size="6" id="limit" name="limit" value="<?php
echo isset($_REQUEST['limit']) ? validInt($_REQUEST['limit']) : "";
?>
"/><?php
echo translate('LimitResultsPost');
?>
</td>
</tr>
</tbody>
</table>
示例6: buildSelect
</div>
<h2><?php
echo $SLANG['Control'];
?>
</h2>
<div id="headerControl">
<form name="contentForm" id="contentForm" method="get" action="<?php
echo $_SERVER['PHP_SELF'];
?>
">
<input type="hidden" name="view" value="<?php
echo $view;
?>
"/>
<?php
echo buildSelect("mid", $mids, "this.form.submit();");
?>
</form>
</div>
</div>
<div id="content">
<div id="ptzControls" class="ptzControls">
<?php
echo ptzControls($monitor);
?>
</div>
</div>
</div>
</body>
</html>
示例7: translate
<th scope="row"><?php
echo translate('VideoFormat');
?>
</th>
<td><?php
echo buildSelect("videoFormat", $videoFormats);
?>
</td>
</tr>
<tr>
<th scope="row"><?php
echo translate('FrameRate');
?>
</th>
<td><?php
echo buildSelect("rate", $rates);
?>
</td>
</tr>
<tr>
<th scope="row"><?php
echo translate('OverwriteExisting');
?>
</th>
<td><input type="checkbox" name="overwrite" value="1"<?php
if (isset($overwrite)) {
?>
checked="checked"<?php
}
?>
/></td>
示例8: buildSelect
</div>
<div id="content">
<form name="contentForm" id="contentForm" method="post" action="<?php
echo $_SERVER['PHP_SELF'];
?>
">
<input type="hidden" name="view" value="none"/>
<input type="hidden" name="mid" value="<?php
echo $monitor['Id'];
?>
"/>
<input type="hidden" name="action" value="control"/>
<input type="hidden" name="control" value="presetSet"/>
<input type="hidden" name="showControls" value="1"/>
<p><?php
echo buildSelect("preset", $presets, "updateLabel()");
?>
</p>
<p><label for="newLabel"><?php
echo $SLANG['NewLabel'];
?>
</label><input type="text" name="newLabel" id="newLabel" value="" size="16"/></p>
<div id="contentButtons">
<input type="submit" value="<?php
echo $SLANG['Save'];
?>
"/><input type="button" value="<?php
echo $SLANG['Cancel'];
?>
" onclick="closeWindow()"/>
</div>
示例9: translate
<?php
}
?>
</select></td></tr>
<tr><td><?php
echo translate('DefaultRate');
?>
</td><td><?php
echo buildSelect("newMonitor[DefaultRate]", $rates);
?>
</td></tr>
<tr><td><?php
echo translate('DefaultScale');
?>
</td><td><?php
echo buildSelect("newMonitor[DefaultScale]", $scales);
?>
</td></tr>
<?php
if (ZM_HAS_V4L && $newMonitor['Type'] == "Local") {
?>
<tr><td><?php
echo translate('SignalCheckColour');
?>
</td><td><input type="text" name="newMonitor[SignalCheckColour]" value="<?php
echo validHtmlStr($newMonitor['SignalCheckColour']);
?>
" size="10" onchange="$('SignalCheckSwatch').setStyle( 'backgroundColor', this.value )"/><span id="SignalCheckSwatch" class="swatch" style="background-color: <?php
echo $newMonitor['SignalCheckColour'];
?>
;"> </span></td></tr>
示例10: printForm
/**
* Displays the form to add new policy
*/
function printForm($data = '', $action = 'add', $type = 'rules')
{
global $__FM_CONFIG;
$policy_id = $policy_order_id = 0;
$policy_interface = $policy_direction = $policy_time = $policy_comment = $policy_options = null;
$policy_services = $policy_source = $policy_destination = $policy_action = null;
$source_items = $destination_items = $services_items = null;
$policy_source_not = $policy_destination_not = $policy_services_not = null;
$ucaction = ucfirst($action);
if (!empty($_POST) && !array_key_exists('is_ajax', $_POST)) {
if (is_array($_POST)) {
extract($_POST);
}
} elseif (@is_object($data[0])) {
extract(get_object_vars($data[0]));
}
$server_firewall_type = getNameFromID($_POST['server_serial_no'], 'fm_' . $__FM_CONFIG[$_SESSION['module']]['prefix'] . 'servers', 'server_', 'server_serial_no', 'server_type');
$available_policy_actions = enumMYSQLSelect('fm_' . $__FM_CONFIG[$_SESSION['module']]['prefix'] . 'policies', 'policy_action');
if ($server_firewall_type == 'ipfilter') {
array_pop($available_policy_actions);
}
$policy_interface = buildSelect('policy_interface', 'policy_interface', $this->availableInterfaces($_REQUEST['server_serial_no']), $policy_interface);
$policy_direction = buildSelect('policy_direction', 'policy_direction', enumMYSQLSelect('fm_' . $__FM_CONFIG[$_SESSION['module']]['prefix'] . 'policies', 'policy_direction'), $policy_direction, 1);
$policy_action = buildSelect('policy_action', 'policy_action', $available_policy_actions, $policy_action, 1);
$source_items_assigned = getGroupItems($policy_source);
$source_items = buildSelect('source_items', 'source_items', availableGroupItems('object', 'available'), $source_items_assigned, 1, null, true, null, null, __('Select one or more objects'));
$destination_items_assigned = getGroupItems($policy_destination);
$destination_items = buildSelect('destination_items', 'destination_items', availableGroupItems('object', 'available'), $destination_items_assigned, 1, null, true, null, null, __('Select one or more objects'));
$services_items_assigned = getGroupItems($policy_services);
$services_items = buildSelect('services_items', 'services_items', availableGroupItems('service', 'available'), $services_items_assigned, 1, null, true, null, null, __('Select one or more services'));
$source_not_check = $policy_source_not ? 'checked' : null;
$destination_not_check = $policy_destination_not ? 'checked' : null;
$service_not_check = $policy_services_not ? 'checked' : null;
$popup_title = $action == 'add' ? __('Add Policy') : __('Edit Policy');
$popup_header = buildPopup('header', $popup_title);
$popup_footer = buildPopup('footer');
$return_form = <<<FORM
\t\t<form name="manage" id="manage" method="post" action="?server_serial_no={$_REQUEST['server_serial_no']}">
\t\t{$popup_header}
\t\t\t<input type="hidden" name="action" value="{$action}" />
\t\t\t<input type="hidden" name="policy_id" value="{$policy_id}" />
\t\t\t<input type="hidden" name="policy_order_id" value="{$policy_order_id}" />
\t\t\t<input type="hidden" name="policy_source_not" value="0" />
\t\t\t<input type="hidden" name="policy_destination_not" value="0" />
\t\t\t<input type="hidden" name="policy_services_not" value="0" />
FORM;
if ($type == 'rules') {
$return_form .= sprintf('
<table class="form-table policy-form">
<tr>
<th width="33%" scope="row"><label for="policy_interface">%s</label></th>
<td width="67%">%s</td>
</tr>
<tr>
<th width="33%" scope="row"><label for="policy_direction">%s</label></th>
<td width="67%">%s</td>
</tr>
<tr>
<th width="33%" scope="row">%s</th>
<td width="67%">
<input name="policy_source_not" id="policy_source_not" value="1" type="checkbox" %s /><label for="policy_source_not"><b>%s</b></label>
<p class="checkbox_desc">%s</p>
%s
</td>
</tr>
<tr>
<th width="33%" scope="row">%s</th>
<td width="67%">
<input name="policy_destination_not" id="policy_destination_not" value="1" type="checkbox" %s /><label for="policy_destination_not"><b>%s</b></label>
<p class="checkbox_desc">%s</p>
%s
</td>
</tr>
<tr>
<th width="33%" scope="row">%s</th>
<td width="67%">
<input name="policy_services_not" id="policy_services_not" value="1" type="checkbox" %s /><label for="policy_services_not"><b>%s</b></label>
<p class="checkbox_desc">%s</p>
%s
</td>
</tr>', __('Interface'), $policy_interface, __('Direction'), $policy_direction, __('Source'), $source_not_check, __('not'), __('Use this option to invert the match'), $source_items, __('Destination'), $destination_not_check, __('not'), __('Use this option to invert the match'), $destination_items, __('Services'), $service_not_check, __('not'), __('Use this option to invert the match'), $services_items);
if ($server_firewall_type == 'iptables') {
$policy_time = buildSelect('policy_time', 'policy_time', $this->availableTimes(), $policy_time);
$return_form .= sprintf('
<tr>
<th width="33%" scope="row"><label for="policy_time">%s</label></th>
<td width="67%">%s</td>
</tr>', __('Time Restriction'), $policy_time);
}
/** Parse options */
$options = null;
if ($server_firewall_type == 'pf') {
array_pop($__FM_CONFIG['fw']['policy_options']);
array_pop($__FM_CONFIG['fw']['policy_options']);
}
foreach ($__FM_CONFIG['fw']['policy_options'] as $opt => $opt_array) {
$checked = $policy_options & $opt_array['bit'] ? 'checked' : null;
//.........这里部分代码省略.........
示例11: buildSelect
<div class="row">
<div class="col-md-2 col-sm-4 col-xs-7">
<?php
echo buildSelect('property_city');
?>
<?php
echo buildSelect('property_status');
?>
<?php
echo buildSelect('locations');
?>
<?php
echo buildSelect('property_type');
?>
</div>
<div class="col-md-3 col-sm-4 col-xs-7">
<div class="inner-gray-box">
<label for="exampleInputEmail1">Bathroom(Min/Max)</label>
<div class="form-group">
<div class="col-md-6 col-sm-6">
<select class="form-control input-sm" name="min_bathroom">
<option value="">Any</option>
<option value="-1" selected>Studio</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
示例12: sanitize
/** Query search */
if (isset($log_search_query) && !empty($log_search_query)) {
$search_sql .= "AND log_data LIKE '%" . sanitize($log_search_query) . "%' ";
}
$query = "SELECT * FROM fm_logs WHERE account_id IN (0,{$_SESSION['user']['account_id']}) {$search_sql} ORDER BY log_timestamp DESC";
$fmdb->query($query);
$log_count = $fmdb->num_rows;
$total_pages = ceil($log_count / $_SESSION['user']['record_count']);
if ($page > $total_pages) {
$page = $total_pages;
}
$pagination = displayPagination($page, $total_pages);
$log_search_module = isset($log_search_module) ? $log_search_module : _('All Modules');
$log_search_user = isset($log_search_user) ? $log_search_user : 0;
$module_list = buildSelect('log_search_module', 1, buildModuleList(), $log_search_module, 4, null, true);
$user_list = buildSelect('log_search_user', 1, buildUserList(), $log_search_user, 4, null, true);
$table_info = array('class' => 'display_results');
$title_array = array(_('Timestamp'), _('Module'), _('User'), array('title' => _('Message'), 'style' => 'width: 50%;'));
$header = displayTableHeader($table_info, $title_array);
echo printPageHeader($response);
printf('<form class="search-form" id="date-range" action="" method="post">
<table class="log_search_form" align="center">
<tbody>
<tr>
<td>%s</td>
<td>%s</td>
<td><input name="log_search_date_b" value="%s" type="text" class="datepicker" placeholder="%s" /></td>
<td><input name="log_search_date_e" value="%s" type="text" class="datepicker" placeholder="%s" /></td>
<td><input type="text" name="log_search_query" value="%s" placeholder="%s" /></td>
<td><input value="%s" type="submit" class="button" /></td>
</tr>
示例13: makePopupLink
}
}
if (canView('Control') && $monitor->Type() == "Local") {
?>
<div id="settingsControl"><?php
echo makePopupLink('?view=settings&mid=' . $monitor->Id(), 'zmSettings' . $monitor->Id(), 'settings', translate('Settings'), true, 'id="settingsLink"');
?>
</div>
<?php
}
?>
<div id="scaleControl"><?php
echo translate('Scale');
?>
: <?php
echo buildSelect("scale", $scales, "changeScale( this );");
?>
</div>
</div>
</div>
<div id="imageFeed">
<?php
if ($streamMode == "mpeg") {
outputVideoStream("liveStream", $streamSrc, reScale($monitor->Width(), $scale), reScale($monitor->Height(), $scale), ZM_MPEG_LIVE_FORMAT, $monitor->Name());
} elseif ($streamMode == "jpeg") {
if (canStreamNative()) {
outputImageStream("liveStream", $streamSrc, reScale($monitor->Width(), $scale), reScale($monitor->Height(), $scale), $monitor->Name());
} elseif (canStreamApplet()) {
outputHelperStream("liveStream", $streamSrc, reScale($monitor->Width(), $scale), reScale($monitor->Height(), $scale), $monitor->Name());
}
} else {
示例14: bloginfo
<br />
<form method="get" action="<?php
bloginfo('url');
?>
/listing-search-results/">
<?php
/*$taxonomies = get_object_taxonomies('property');
foreach($taxonomies as $tax){
echo buildSelect($tax);
}
*/
echo buildSelect('property_status');
echo buildSelect('property_type');
echo buildSelect('locations');
echo buildSelect('property_city');
?>
<select name="min_bedroom">
<option value=""> Any</option>
<option value="-1"> Studio</option>
<option value="1"> 1</option>
<option value="2"> 2</option>
<option value="5"> 5</option>
</select>
<select name="max_bedroom">
<option value=""> Any</option>
<option value="-1">Studio</option>
<option value="1"> 1</option>
<option value="2"> 2</option>
<option value="3"> 3</option>
示例15: printForm
/**
* Displays the form to add new object
*/
function printForm($data = '', $action = 'add', $type = 'host')
{
global $__FM_CONFIG;
$object_id = 0;
$object_name = $object_address = $object_comment = null;
$object_mask = null;
$ucaction = ucfirst($action);
if (!empty($_POST) && !array_key_exists('is_ajax', $_POST)) {
if (is_array($_POST)) {
extract($_POST);
}
} elseif (@is_object($data[0])) {
extract(get_object_vars($data[0]));
}
/** Show/hide divs */
$netmask_option = $type == 'host' ? 'style="display: none;"' : null;
$object_name_length = getColumnLength('fm_' . $__FM_CONFIG[$_SESSION['module']]['prefix'] . 'objects', 'object_name');
$object_address_length = getColumnLength('fm_' . $__FM_CONFIG[$_SESSION['module']]['prefix'] . 'objects', 'object_address');
$object_mask_length = getColumnLength('fm_' . $__FM_CONFIG[$_SESSION['module']]['prefix'] . 'objects', 'object_mask');
$object_type = buildSelect('object_type', 'object_type', enumMYSQLSelect('fm_' . $__FM_CONFIG[$_SESSION['module']]['prefix'] . 'objects', 'object_type'), $type, 1);
$popup_title = $action == 'add' ? __('Add Object') : __('Edit Object');
$popup_header = buildPopup('header', $popup_title);
$popup_footer = buildPopup('footer');
$return_form = sprintf('<form name="manage" id="manage" method="post" action="?type=%s">
%s
<input type="hidden" name="action" value="%s" />
<input type="hidden" name="object_id" value="%s" />
<table class="form-table">
<tr>
<th width="33%" scope="row"><label for="object_name">%s</label></th>
<td width="67%"><input name="object_name" id="object_name" type="text" value="%s" size="40" placeholder="http" maxlength="%s" /></td>
</tr>
<tr>
<th width="33%" scope="row"><label for="object_type">%s</label></th>
<td width="67%">
%s
</td>
</tr>
<tr>
<th width="33%" scope="row"><label for="object_address">%s</label></th>
<td width="67%"><input name="object_address" id="object_address" type="text" value="%s" size="40" placeholder="127.0.0.1" maxlength="%s" /></td>
</tr>
<tr id="netmask_option" %s>
<th width="33%" scope="row"><label for="object_mask">%s</label></th>
<td width="67%"><input name="object_mask" id="object_mask" type="text" value="%s" size="40" placeholder="255.255.255.0" maxlength="%s" /></td>
</tr>
<tr>
<th width="33%" scope="row"><label for="object_comment">%s</label></th>
<td width="67%"><textarea id="object_comment" name="object_comment" rows="4" cols="30">%s</textarea></td>
</tr>
</table>
%s
</form>
<script>
$(document).ready(function() {
$("#manage select").select2({
width: "200px",
minimumResultsForSearch: 10
});
});
</script>', $type, $popup_header, $action, $object_id, __('Object Name'), $object_name, $object_name_length, __('Object Type'), $object_type, __('Address'), $object_address, $object_address_length, $netmask_option, __('Netmask'), $object_mask, $object_mask_length, __('Comment'), $object_comment, $popup_footer);
return $return_form;
}