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


PHP FormLib::standardDepartmentFields方法代码示例

本文整理汇总了PHP中FormLib::standardDepartmentFields方法的典型用法代码示例。如果您正苦于以下问题:PHP FormLib::standardDepartmentFields方法的具体用法?PHP FormLib::standardDepartmentFields怎么用?PHP FormLib::standardDepartmentFields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FormLib的用法示例。


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

示例1: form_content

    function form_content()
    {
        $dbc = $this->connection;
        $dbc->selectDB($this->config->get('OP_DB'));
        $deptsQ = $dbc->prepare_statement("select dept_no,dept_name from departments order by dept_no");
        $deptsR = $dbc->exec_statement($deptsQ);
        $deptsList = "";
        while ($deptsW = $dbc->fetch_array($deptsR)) {
            $deptsList .= "<option value={$deptsW['0']}>{$deptsW['0']} {$deptsW['1']}</option>";
        }
        ob_start();
        ?>
<form method="get" action="NonMovementReport.php" class="form-horizontal">
    <div class="col-sm-6">
        <?php 
        echo FormLib::standardDepartmentFields();
        ?>
        <div class="form-group">
            <label class="control-label col-sm-4">
                Excel
                <input type=checkbox name=excel value=xls id="excel" />
            </label>
            <label class="control-label col-sm-4">
                Netted
                <input type=checkbox name=netted id="netted" />
            </label>
        </div>
        <div class="form-group">
            <button type=submit name=submit value="Submit" class="btn btn-default btn-core">Submit</button>
            <button type=reset name=reset class="btn btn-default btn-reset"
                onclick="$('#super-id').val('').trigger('change');">Start Over</button>
        </div>
    </div>
    <div class="col-sm-5">
        <div class="form-group">
            <label class="col-sm-4 control-label">Start Date</label>
            <div class="col-sm-8">
                <input type=text id=date1 name=date1 class="form-control date-field" required />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">End Date</label>
            <div class="col-sm-8">
                <input type=text id=date2 name=date2 class="form-control date-field" required />
            </div>
        </div>
        <div class="form-group">
            <?php 
        echo FormLib::date_range_picker();
        ?>
                            
        </div>
    </div>
</form>
<?php 
        return ob_get_clean();
    }
开发者ID:phpsmith,项目名称:IS4C,代码行数:57,代码来源:NonMovementReport.php

示例2: form_content

    function form_content()
    {
        global $FANNIE_OP_DB;
        $dbc = FannieDB::get($FANNIE_OP_DB);
        $deptQ = $dbc->prepare_statement("select dept_no,dept_name from departments order by dept_no");
        $deptR = $dbc->exec_statement($deptQ);
        $depts = array();
        while ($deptW = $dbc->fetch_array($deptR)) {
            $depts[$deptW['dept_no']] = $deptW['dept_name'];
        }
        $superQ = $dbc->prepare_statement("SELECT superID,super_name FROM superDeptNames \n            ORDER BY superID");
        $superR = $dbc->exec_statement($superQ);
        $supers = array();
        while ($superW = $dbc->fetch_row($superR)) {
            $supers[$superW['superID']] = $superW['super_name'];
        }
        $subs = array();
        if (count($depts) > 0) {
            $dept_numbers = array_keys($depts);
            $first = $dept_numbers[0];
            $subsP = $dbc->prepare('
                SELECT subdept_no,
                    subdept_name
                FROM subdepts
                WHERE dept_ID=?
                ORDER BY subdept_no');
            $subsR = $dbc->execute($subsP, array($first));
            while ($subsW = $dbc->fetch_row($subsR)) {
                $subs[$subsW['subdept_no']] = $subsW['subdept_name'];
            }
        }
        ob_start();
        ?>
        <form method="get" action="ProductListPage.php">
        <ul class="nav nav-tabs" role="tablist">
            <li class="active"><a href="#dept-tab" data-toggle="tab"
                onclick="$('#supertype').val('dept');">By Department</a></li>
            <li><a href="#manu-tab" data-toggle="tab"
                onclick="$('#supertype').val('manu');">By Brand</a></li>
            <li><a href="#vendor-tab" data-toggle="tab"
                onclick="$('#supertype').val('vendor');">By Vendor</a></li>
        </ul>
        <input id="supertype" name="supertype" type="hidden" value="dept" />
        <div class="tab-content">
            <p>
            <div class="tab-pane active" id="dept-tab">
                <div class="row form-horizontal">
                    <div class="col-sm-8">
                    <?php 
        echo FormLib::standardDepartmentFields('deptSub');
        ?>
                    </div>
                </div>
            </div>
            <div class="tab-pane" id="manu-tab">
                <div class="form-group form-inline">
                    <label><?php 
        echo _('Brand');
        ?>
</label>
                    <input type=text name=manufacturer class="form-control" />
                </div>
                <div class="form-group form-inline">
                    <label><input type=radio name=mtype value=prefix checked />
                        UPC prefix</label>
                    <label><input type=radio name=mtype value=name />
                        <?php 
        echo _('Brand name');
        ?>
</label>
                </div>
            </div>
            <div class="tab-pane" id="vendor-tab">
                <div class="form-group form-inline">
                    <label>Vendor</label>
                    <select name="vendor" class="form-control">
                    <?php 
        $vendors = new VendorsModel($dbc);
        foreach ($vendors->find('vendorName') as $v) {
            printf('<option value="%d">%s</option>', $v->vendorID(), $v->vendorName());
        }
        ?>
                    </select>
                </div>
            </div>
        </p>
        </div>
        <div class="form-group form-inline">
            <label>Sort by</label>
            <select name="sort" class="form-control">
                <option>Department</option>
                <option>UPC</option>
                <option>Description</option>
            </select> 
            <label>
                <input type=checkbox name="inUse" value="1" checked />
                In Use
            </label>
            |
            <label>
//.........这里部分代码省略.........
开发者ID:phpsmith,项目名称:IS4C,代码行数:101,代码来源:ProductListPage.php

示例3: form_content

    public function form_content()
    {
        ob_start();
        ?>
<form method="get" class="form-horizontal">
<div class="row">
    <div class="col-sm-6">
        <?php 
        echo FormLib::standardDepartmentFields('buyer');
        ?>
        <div class="form-group">
            <label class="col-sm-4 control-label">
                Group by weekday?
                <input type=checkbox name=weekday value=1>
            </label>
        </div>
        <div class="form-group">
            <label class="control-label col-sm-4">Save to Excel
                <input type=checkbox name=excel id=excel value=1>
            </label>
            <label class="col-sm-4 control-label">Store</label>
            <div class="col-sm-4">
                <?php 
        $ret = FormLib::storePicker();
        echo $ret['html'];
        ?>
            </div>
        </div>
    </div>
    <div class="col-sm-5">
        <div class="form-group">
            <label class="col-sm-4 control-label">Start Date</label>
            <div class="col-sm-8">
                <input type=text id=date1 name=date1 class="form-control date-field" required />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">End Date</label>
            <div class="col-sm-8">
                <input type=text id=date2 name=date2 class="form-control date-field" required />
            </div>
        </div>
        <div class="form-group">
            <?php 
        echo FormLib::date_range_picker();
        ?>
                            
        </div>
    </div>
</div>
    <p>
        <button type=submit name=submit value="Submit" class="btn btn-default btn-core">Submit</button>
        <button type=reset name=reset class="btn btn-default btn-reset"
            onclick="$('#super-id').val('').trigger('change');">Start Over</button>
    </p>
</form>
        <?php 
        $this->addOnloadCommand("\$('#subdepts').closest('.form-group').hide();");
        return ob_get_clean();
    }
开发者ID:phpsmith,项目名称:IS4C,代码行数:60,代码来源:HourlySalesReport.php

示例4: form_content

 public function form_content()
 {
     $ret = '<form method="get" class="form-horizontal pull-left">' . FormLib::standardDepartmentFields() . '<p>
         <button type="submit" name="submit" value="1" 
             class="btn btn-default">Get Report</button>     
         </p>
         </form>';
     return $ret;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:9,代码来源:PluSkuReport.php


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