Пример #1
0
        <tr>
            <?php 
if (isset($objs[0])) {
    foreach ($objs[0] as $colom => $isi) {
        ?>
                <th id="sort_<?php 
        echo $colom;
        echo $t;
        ?>
"><?php 
        echo Lang::t($colom);
        ?>
</th>

                <?php 
        Crud::sortBy($arr, $webClass, "sort_" . $colom . $t, $colom);
    }
}
?>
        </tr>

        <?php 
foreach ($objs as $num => $obj) {
    ?>
            <tr id="<?php 
    echo $c;
    ?>
_<?php 
    echo $obj->{$main_id};
    ?>
">
    public function bankDiscountModel()
    {
        //create the model object
        $cal = new BankDiscountModel();
        //send the webclass
        $webClass = __CLASS__;
        //run the crud utility
        Crud::run($cal, $webClass);
        ?>
<h1><?php 
        echo Lang::t($webClass);
        ?>
</h1>
<div class="row hidden-print" style="margin-bottom: 10px;">
    <?php 
        if ($obj->crud_setting['search']) {
            Crud::searchBox($arr, $webClass);
        }
        ?>
    <div class="col-md-8 col-xs-12">
        <div class="btn-group">
            <?php 
        if ($obj->crud_setting['viewall']) {
            Crud::viewAll($arr, $webClass);
        }
        ?>
            <?php 
        if ($obj->crud_setting['export']) {
            Crud::exportExcel($arr, $webClass);
        }
        ?>
            <?php 
        if ($obj->crud_setting['import']) {
            Crud::importExcel($arr, $webClass);
        }
        ?>
            <?php 
        if ($obj->crud_setting['add']) {
            Crud::AddButton($arr, $webClass);
        }
        ?>
            <?php 
        if ($obj->crud_setting['toggle']) {
            Crud::filter($arr, $webClass, $t);
        }
        ?>
            <?php 
        if ($obj->crud_setting['webservice']) {
            Crud::listWebService($arr, $webClass);
        }
        ?>
        </div>
    </div>
    <?php 
        if ($obj->crud_setting['toggle']) {
            Crud::filterButton($arr, $webClass, $t);
        }
        ?>
</div>
<div class="table-responsive">
    <table class="table table-bordered table-striped table-hover crud-table" style="background-color: white;">

        <tr>
            <?php 
        if (isset($objs[0])) {
            foreach ($objs[0] as $colom => $isi) {
                if ($colom == "removeAutoCrudClick") {
                    continue;
                }
                ?>
                <th id="sort_<?php 
                echo $colom;
                echo $t;
                ?>
"><?php 
                echo Lang::t($colom);
                ?>
</th>

                <?php 
                Crud::sortBy($arr, $webClass, "sort_" . $colom . $t, $colom);
            }
        }
        ?>
        </tr>

        <?php 
        foreach ($objs as $num => $obj) {
            ?>
            <tr id="<?php 
            echo $c;
            ?>
_<?php 
            echo $obj->{$main_id};
            ?>
">

                <?php 
            foreach ($obj as $colom => $isi) {
                if ($colom == "removeAutoCrudClick") {
                    continue;
                }
                ?>
                    <td id="<?php 
                echo $colom;
                ?>
_<?php 
                echo $obj->{$main_id};
                ?>
">
                        <?php 
                echo stripslashes($isi);
                ?>
                    </td>
                    <?php 
                if (!in_array($colom, $obj->removeAutoCrudClick)) {
                    ?>
                    <script type="text/javascript">
                        $("#<?php 
                    echo $colom;
                    ?>
_<?php 
                    echo $obj->{$main_id};
                    ?>
").click(function () {
                            openLw('<?php 
                    echo $webClass;
                    ?>
View', '<?php 
                    echo _SPPATH;
                    echo $webClass;
                    ?>
/<?php 
                    echo $c;
                    ?>
?cmd=edit&id=<?php 
                    echo $obj->{$main_id};
                    ?>
&parent_page=' + window.selected_page+'&loadagain='+$.now(), 'fade');
                        });
                    </script>
                    <?php 
                }
                ?>
                <?php 
            }
            ?>
            </tr>


        <?php 
        }
        ?>

    </table>
</div>
<div class="row hidden-print">
    <div class="col-md-12">
        <?php 
        Crud::pagination($arr, $webClass);
        ?>
    </div>
</div>
<?php 
        //        pr($mps);
    }