
<script type="text/javascript" charset="utf-8">


    $(document).ready(function () {
        $('#example').dataTable({
            "bPaginate": false,
            "bStateSave": true,
            "sDom": 'TCR<"clear">lfrtip',
            "oTableTools": {
                "aButtons": [
                    "copy",
                    "print",
                    {
                        "sExtends": "collection",
                        "sButtonText": "حفظ",
                        "aButtons": ["csv", "xls"]
                    }
                ]
            }
        });
    });

</script>
<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">المنتجات</a></li>
            <li><a href="productCatController.php?do=show">تصنيفات المنتجات</a></li>
            <li class="active">عرض تصنيفات المنتجات</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading">عرض تصنيفات المنتجات</div>
            <div class="panel-body">
                <div id="outputString" class="alert alert-block alert-success fade in" style="display:none">
                    <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">&times;</button>
                    <p id="outputStringValue">{$outputString}</p>
                    <div class="clearfix"></div>
                </div>
            </div>
            <hr/>

            <!-- Table -->
            {literal}
            <form method="post" action="showController.php?do=edit" onsubmit="if (Spry.Widget.Form.validate(this)) {
                        return countChoosenProducts('productCatController');
                    } else {
                        return false;
                    }">
                {/literal}
                <table class="display table-black" id="example" style="text-align: center">
                    <thead >
                        <th >
                            <input type="checkbox" name="checkAll" id="checkAll"/>
                        </th>
                        <th style="text-align: center"> العميل </th>
                        <th style="text-align: center"> التاريخ </th>
                        <th style="text-align: center">ايقاف</th>
                        <th style="text-align: center">تعديل</th>
                        <th style="text-align: center">حذف </th>

                    </thead>
                    <tbody >
                    {foreach $allclient as $data}
                    <tr style="text-align: center" >
                        <td></td>
                        <td>{$data->proclient}</td>
                        <td>{$data->mydate}</td>
                        {if $data->del eq 1}
                        <td id="plusitemp{$data->id}" >
                            <a class="btn red btn-xs data"   data-id="{$data->id}"  data-em="0" style="color: red"> تفعيل</a>
                        </td>
                        {else}
                        <td id="plusitemp{$data->id}">
                            <a class="btn blue btn-xs data" data-id="{$data->id}"  data-em="1" style="color: blue">تعطيل   </a>
                        </td >
                        {/if}
                        <td class="btn_showm_edit">
                            <a href="showController.php?do=&id={$data->id}" class="btn blue-hoki btn-xs"><i class="fa fa-pencil"></i>اضافه</a>
                            <a href="showController.php?do=edit&id={$data->id}" class="btn blue-hoki btn-xs"><i class="fa fa-pencil"></i>تعديل</a>
                        </td>
                        <td class="btn_showm_del">
                            <a   class="btn grey-cascade btn-xs newsdel" data-id="{$data->id}" ><i class="fa fa-times"></i></a>
                        </td>
                    </tr>
                    {/foreach}

                    </tbody>

                </table>
                <div class="clearfix"></div>

                <!-- Modal -->
                <div class="hidden-print">
                    <div class="modal fade " id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                        <div class="modal-dialog">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close pull-left" data-dismiss="modal" aria-hidden="true">&times;</button>
                                    <h4 class="modal-title">تأكيد حذف مجموعة</h4>
                                </div>
                                <div class="modal-body"> هل تريد حذف هذا التصنيف؟ </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">لا</button>
                                    <button type="button" class="btn btn-primary savemodel1">نعم</button>
                                </div>
                            </div>
                            <!-- /.modal-content -->
                        </div>
                        <!-- /.modal-dialog -->
                    </div>
                </div>
                <!-- /.modal -->

                <hr />
                <div  class="hidden-print">
                    <div class="col-lg-12">
                        <div class="well well-sm">
                            <div class="form-group">
                                <div class="col-lg-4">
                                    <label for="operation"></label>
                                    <span id="spryselect1">
                                        <select name="operation" id="operation"  data-placeholder="اختر العملية" class="select2 wdt100">
                                            <option value="-1">اختر عملية</option>
                                            <option value="1">ايقاف</option>
                                            <option value="2">تشغيل </option>
                                        </select>
                                        <span class="selectInvalidMsg">*</span></span></div>
                            </div>
                            <div class="form-group">
                                <div class="col-lg-4">
                                    <input name=""  class="hidden-print btn btn-primary" type="submit" value="تنفيذ"/>
                                </div>
                            </div>
                            <div class="clearfix"></div>
                            <div id="noElementsError" class="alert alert-danger fade in" style="display:none;">
                                <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">×</button>
                                <p>يجب اختيار العناصر أولاً</p>
                                <div class="clearfix"></div>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-4">
                                <button type="button" onclick="print_Custom('mycustomheader');" class="btn btn-success pull-right">طباعة</button>
                            </div>
                        </div>
                    </div>
                    <div class="clearfix"></div>
                </div>
                <div class="clearfix"></div>




            </form>
        </div>

    </div>
</div>
{literal}
<script type="text/javascript">
    var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", {isRequired: false, invalidValue: "-1"});
</script>
{/literal}