本文整理汇总了PHP中Params::printForm方法的典型用法代码示例。如果您正苦于以下问题:PHP Params::printForm方法的具体用法?PHP Params::printForm怎么用?PHP Params::printForm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Params
的用法示例。
在下文中一共展示了Params::printForm方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _print
function _print($type, $namel, $options, $list, $prefix)
{
global $loc;
assert('$loc');
assert('!empty($namel)');
// $loc_share = new Localize(OBIB_LOCALE, "shared"); // //jalg multi 5-7-2015
$loc_share = new Localize(OBIB_LOCALE, "shared");
if ($type == 'session_id') {
return;
}
if (isset($options['hidden'])) {
//jalg multi 5-7-2015
return;
}
if ($type == 'group') {
echo '<tr><td class="' . $prefix . 'group" colspan="2">';
Params::printForm($list, $prefix, $namel);
echo '</td></tr>';
return;
}
if ($type == 'order_by') {
$title = 'Sort By';
} elseif (isset($options['title']) && $options['title']) {
$title = $options['title'];
} else {
$title = $namel[count($namel) - 1];
}
$name = $prefix . array_shift($namel);
foreach ($namel as $n) {
$name .= '[' . $n . ']';
}
if (isset($options['default'])) {
$default = $options['default'];
} else {
$default = '';
}
echo '<tr class="' . $prefix . 'param">';
echo '<td><label for="' . H($name) . '">';
echo $loc->getText($title);
echo '</label></td><td>';
switch ($type) {
case 'string':
echo inputField('text', $name, $default);
break;
case 'date':
echo inputField('date', $name, $default);
break;
case 'select':
$l = array();
foreach ($list as $v) {
list($n, $o) = $v;
if (isset($o['title']) && $o['title']) {
$l[$n] = $loc->getText($o['title']);
} elseif (strcmp($name, "rpt_material_type") == 0 || strcmp($name, "rpt_collection") == 0) {
$l[''] = $loc_share->getText("any");
foreach ($o as $i) {
$l[$o['code']] = $o['description'];
}
} else {
$l[$n] = $n;
}
}
echo inputField('select', $name, $default, NULL, $l);
break;
case 'order_by':
$l = array();
foreach ($list as $v) {
list($n, $o) = $v;
if (isset($o['title']) and $o['title']) {
$l[$n] = $loc->getText($o['title']);
} else {
$l[$n] = $n;
}
$l[$n . '!r'] = $l[$n] . ' ' . $loc->getText('reportsReverse');
// $l[$n.'!r'] = $l[$n].' ('.$loc->getText("Reverse").')';// revisar de ALX
}
echo inputField('select', $name, $default, NULL, $l);
break;
default:
assert(NULL);
}
echo '</td></tr>';
}
示例2: H
?>
<form name="layoutparamform" method="GET" action="../shared/layout.php">
<input type="hidden" name="name" value="<?php
echo H($_REQUEST["name"]);
?>
" />
<input type="hidden" name="rpt" value="<?php
echo H($_REQUEST["rpt"]);
?>
" />
<input type="hidden" name="tab" value="<?php
echo H($tab);
?>
" />
<input type="hidden" name="filled" value="<?php
echo H('1');
?>
" />
<?php
Params::printForm($defs, 'lay_');
?>
<input type="submit" value="Submit" class="button" />
</form>
<?php
include "../shared/footer.php";
?>
?>
示例3: header
header('Location: ../reports/index.php');
exit(0);
}
Nav::node('reportcriteria', 'Report Criteria');
include "../shared/header.php";
#****************************************************************************
#* getting form vars
#****************************************************************************
require "../shared/get_form_vars.php";
echo '<h1>' . $loc->getText($rpt->title()) . '</h1>';
if (isset($_REQUEST['msg'])) {
echo '<p><font class="error">' . H($_REQUEST['msg']) . '</font></p>';
}
?>
<form name="reportcriteriaform" method="GET" action="../reports/run_report.php">
<input type="hidden" name="type" value="<?php
echo H($rpt->type());
?>
" />
<?php
$format = array(array('select', '__format', array('title' => 'Format'), array(array('paged', array('title' => 'HTML (page-by-page)')), array('html', array('title' => 'HTML (one big page)')), array('csv', array('title' => 'CSV')))));
$params = array_merge($rpt->paramDefs(), $format);
Params::printForm($params);
?>
<input type="submit" value="Submit" class="button" />
</form>
<?php
include "../shared/footer.php";
示例4: _print
function _print($type, $namel, $options, $list, $prefix)
{
global $loc;
assert('$loc');
assert('!empty($namel)');
if ($type == 'session_id') {
return;
}
if (isset($options['hidden'])) {
return;
}
if ($type == 'group') {
echo '<tr><td class="' . $prefix . 'group" colspan="2">';
Params::printForm($list, $prefix, $namel);
echo '</td></tr>';
return;
}
if ($type == 'order_by') {
$title = 'Sort By';
} elseif (isset($options['title']) && $options['title']) {
$title = $options['title'];
} else {
$title = $namel[count($namel) - 1];
}
$name = $prefix . array_shift($namel);
foreach ($namel as $n) {
$name .= '[' . $n . ']';
}
if (isset($options['default'])) {
$default = $options['default'];
} else {
$default = '';
}
echo '<tr class="' . $prefix . 'param">';
echo '<td><label for="' . H($name) . '">';
echo $loc->getText($title);
echo '</label></td><td>';
switch ($type) {
case 'string':
case 'date':
echo inputField('text', $name, $default);
break;
case 'select':
$l = array();
foreach ($list as $v) {
list($n, $o) = $v;
if (isset($o['title']) && $o['title']) {
$l[$n] = $loc->getText($o['title']);
} else {
$l[$n] = $n;
}
}
echo inputField('select', $name, $default, NULL, $l);
break;
case 'order_by':
$l = array();
foreach ($list as $v) {
list($n, $o) = $v;
if (isset($o['title']) and $o['title']) {
$l[$n] = $loc->getText($o['title']);
} else {
$l[$n] = $n;
}
$l[$n . '!r'] = $l[$n] . ' (Reverse)';
}
echo inputField('select', $name, $default, NULL, $l);
break;
default:
assert(NULL);
}
echo '</td></tr>';
}