Esempio n. 1
0
function viewTable($data, $count)
{
    $sub_city = new SubCity();
    $paginations = new Paginations();
    $paginations->setLimit(10);
    $paginations->setPage($_REQUEST['page']);
    $paginations->setJSCallback("viewSubCity");
    $paginations->setTotalPages($count);
    $paginations->makePagination();
    ?>
        <div class="mws-panel-header">
            <span class="mws-i-24 i-table-1">View Sub City</span>
        </div>
        <div class="mws-panel-body">
            <table cellpadding="0" cellspacing="0" border="0" class="mws-datatable-fn mws-table">
                <colgroup>
                    <col class="con0"/>
                    <col class="con1"/>
                </colgroup>
                <thead>
                <tr>
                    <th class="head1">Name</th>
                    <th class="head0">Geo Location</th>
                    <th class="head0">&nbsp;</th>
                    <th class="head1">&nbsp;</th>
                </tr>
                </thead>
                <tbody>
                <?php 
    if (count($data) > 0) {
        ?>

                    <?php 
        for ($i = 0; $i < count($data); $i++) {
            $sub_city->extractor($data, $i);
            ?>
                        <tr id="row_<?php 
            echo $sub_city->subCityId();
            ?>
">
                            <td class="con1"><?php 
            echo $sub_city->subCityName();
            ?>
</td>
                            <td class="con0"><?php 
            echo $sub_city->subCityGeoLocation();
            ?>
</td>
                            <td class="con0"><?php 
            //echo $sub_city->username();
            ?>
</td>
                            <td class="center"><a
                                    onclick="loadGUIContent('subcity','edit','<?php 
            echo $sub_city->subCityId();
            ?>
')">Edit</a>
                                <a href="javascript:;" onclick="deleteSubCity(<?php 
            echo $sub_city->subCityId();
            ?>
)"
                                   class="toggle">Delete</a></td>
                        </tr>
                    <?php 
        }
        ?>

                <?php 
    }
    ?>
                </tbody>
            </table>
        </div>
        <?php 
    $paginations->drawPagination();
}