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


PHP Params::printForm方法代码示例

本文整理汇总了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>';
 }
开发者ID:Giordano-Bruno,项目名称:GiordanoBruno,代码行数:83,代码来源:Params.php

示例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";
?>
?>
开发者ID:aimakun,项目名称:odlib,代码行数:30,代码来源:layout.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";
开发者ID:vishnu35,项目名称:Granthalay,代码行数:31,代码来源:report_criteria.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>';
 }
开发者ID:vishnu35,项目名称:Granthalay,代码行数:72,代码来源:Params.php


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