<?php
/* 	
 * Author   : Ferry / Tanggal   : 22-06-2015	
 * Revisi   : Dhidhik / Tanggal : 12-10-2015
 */
?>
<div id="cc" class="easyui-layout" data-options="fit:true, border:false">
    <div data-options="region:'west',split:true, border:true" title="" style="width:270px; background-color:#F8F8F8;">
        <div title="" style="padding:10px;overflow:auto;" data-options="selected:true" >
            <b>Report Category :</b>

            <div class="indextoreport_menu">
                <ul>
                    <?php
                    foreach ($report_menu as $row_report) {
                        ?>
                        <li><a href="<?php echo site_url($row_report->MenuLink); ?>"><img src="<?php echo base_url(); ?>assets/custom/icons/report.png" alt=""/> <span><b><?php echo $row_report->MenuLabel; ?></b></span></a></li>	
                        <?php
                    }
                    ?>
                </ul>
            </div>	
        </div>
    </div>

    <div data-options="region:'center',fit:true,plain:true, border:false" style="background-color:#eee;">
        <div id="form-wrapper" class="easyui-panel" border="false" style="width:928%;height:570px; background:#eee;">
            <?php
            if (!empty($group_user->ViewPrivillage) && $group_user->ViewPrivillage == 1) {
                ?>
                <div style="overflow:hidden;padding:10px;">
                    <b>Report Detail :</b>

                    <div class="indextoreport_menu">
                        <ul>
                            <?php
                            foreach ($group_sub_report as $row_sub_report) {
                                ?>
<!--                                <li><a href="javascript:void(0)" onClick="<?php echo $row_sub_report->MenuLink; ?>"><img src="<?php echo base_url(); ?>assets/custom/icons/<?php echo $row_sub_report->Icon; ?>.png" alt=""/> <span><?php echo $row_sub_report->MenuLabel; ?></span></a></li>-->
                                <li><a href="javascript:void(0)" onClick="parent.tab_add('<?php echo $row_sub_report->MenuLabel; ?> Report', '<?php echo $row_sub_report->MenuLink;  ?>')"><img src="<?php echo base_url(); ?>assets/custom/icons/<?php echo $row_sub_report->Icon; ?>.png" alt=""/> <span><?php echo $row_sub_report->MenuLabel; ?></span></a></li>
                                
                                    <?php
                            }
                            ?>
                        </ul>
                    </div>
                </div>
                <?php
            }
            ?>
        </div>
    </div>
</div>

<!-- -------------------------------------------------------------Batas Awal Date Period--------------------------------------------------------------- -->
<div id="dialog_date_period" class="easyui-dialog" style="width:450px;height:200px;background-color:#F8F8F8;padding:0px;" closed="true" data-options="modal:true, iconCls:'icon-edit'" buttons="#dialog-date-button">
    <div class="easyui-layout" data-options="fit:true,border:false">
        <div>
            <h3>Select Date :</h3>
        </div>
        <div data-options="region:'south',border:false" style="padding:0px;padding-bottom:0px;">
            <table width="100%" cellpadding="0" cellspacing="2">                   
                <tr>
                    <td width='90'></td>
                    <td colspan width="120" align='left'><b>Begin Period</b></td>
                    <td width="10"><b>:</b></td>
                    <td><input type="text" name="txt_begin_date" id="txt_begin_date" class="easyui-datebox" required="required" value="today" style="width:90px;height:20px" editable="false" /></td>
                </tr>
                <tr>
                    <td width='90'></td>
                    <td width="120" align='left'><b>End Period</b></td>
                    <td width="10"><b>:</b></td>
                    <td><input type="text" name="txt_end_date" id="txt_end_date" class="easyui-datebox" required="required" value="today" style="width:90px;height:20px" editable="false" /></td>
                </tr>
            </table>
        </div>    
        <div id="dialog-date-button" style="border:none;">
            <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onClick="payment();">&nbsp; OK &nbsp; &nbsp;</a>
            <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onClick="modal_close('dialog_date_period');">Cancel</a>
        </div>
    </div>
</div>
<!-- -------------------------------------------------------------Batas Akhir Date Period--------------------------------------------------------------- -->

<script type="text/javascript">
    function choose_date() {
        $('#txt_begin_date').datebox('setValue', '<?= date('d-m-Y') ?>');
        $('#txt_end_date').datebox('setValue', '<?= date('d-m-Y') ?>');
        modal_open('Date Period', 'dialog_date_period');
    }
</script>