<?php /* Smarty version Smarty-3.1.11, created on 2023-10-11 17:42:32
         compiled from "../views/default/productCatview/show.html" */ ?>
<?php /*%%SmartyHeaderCode:13807625956526b458869717-75685488%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '19e6a54e1677313c07b123ab3da648cc14af4e70' => 
    array (
      0 => '../views/default/productCatview/show.html',
      1 => 1694894782,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '13807625956526b458869717-75685488',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'youtubes' => 0,
    'outputString' => 0,
    'allData' => 0,
    'cat' => 0,
    'Programsettingdata' => 0,
    'productCatData' => 0,
    'data' => 0,
    'i' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_6526b4589413f6_83540023',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_6526b4589413f6_83540023')) {function content_6526b4589413f6_83540023($_smarty_tpl) {?>
<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="#"><?php echo @PRODUCTS;?>
</a></li>
            <li><a href="productCatController.php?do=show"><?php echo @PRODUCTS_CATEGORIES;?>
</a></li>
            <li class="active"><?php echo @SHOW_MAIN_CATEGORIES;?>
</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading" style="padding:5px 15px 15px">
                <h3 class="panel-title" style="display: inline-block;"><?php echo @SHOW_MAIN_CATEGORIES;?>
</h3>
                <a href="<?php echo $_smarty_tpl->tpl_vars['youtubes']->value[47]->url;?>
" target="_blank" class="hidden-print"><img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>
                <a href="productCatController.php" class="hidden-print"><input type="button"  id="submit" style="margin-left: 12px" class="btn btn-primary pull-left " value="<?php echo @CATEGORY_ADD_NEW;?>
"/></a>
            </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"><?php echo $_smarty_tpl->tpl_vars['outputString']->value;?>
</p>
                    <div class="clearfix"></div>
                </div>
            </div>
            <hr/>
            <form class="form-inline  hidden-print" method="post" action="productCatController.php?do=show">
                <div class="form-group">
                    <label class="sr-only"><?php echo @CATEGORY_NAME;?>
</label>
                    <select data-placeholder="<?php echo @CHOOSE_CATEGORY;?>
"  class="select2 wdt100"  name="catId" id="catId" onChange="this.form.submit();">
                        <option value="-1"><?php echo @CHOOSE_CATEGORY;?>
</option>





                        <?php  $_smarty_tpl->tpl_vars['cat'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['cat']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['cat']->key => $_smarty_tpl->tpl_vars['cat']->value){
$_smarty_tpl->tpl_vars['cat']->_loop = true;
?>





                        <option value="<?php echo $_smarty_tpl->tpl_vars['cat']->value->productCatId;?>
"><?php echo $_smarty_tpl->tpl_vars['cat']->value->productCatName;?>
</option>





                        <?php } ?>





                    </select>
                </div>
                <button type="submit" class="btn btn-primary"><?php echo @CATEGORY_SEARCH;?>
</button>
            </form>
            <!-- Table -->
            
            <form method="post" action="productCatController.php?do=executeOperation" onsubmit="if (Spry.Widget.Form.validate(this)) {
                        return countChoosenProducts('productCatController');
                    } else {
                        return false;
                    }">
                
                <table class="display table-black" id="example">
                    <thead>
                        <tr>
                            <th  class="hidden-print">
                                <input type="checkbox" name="checkAll" id="checkAll"/>
                            </th>
                            <th><?php echo @MAIN_PRODUCT_NAME;?>
</th>
                            <th class="hidden-print"><?php echo @CATEGORY_STOP;?>
</th>
                            <th class="hidden-print"><?php echo @CATEGORY_EDIT;?>
</th>

                            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->allowfinsldelete;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1==0){?>
                            <th class="hidden-print"><?php echo @CATEGORY_DELETE;?>
 </th>
                            <?php }?>
                        </tr>
                    </thead>
                    <tbody>

                        <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['productCatData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['data']->key => $_smarty_tpl->tpl_vars['data']->value){
$_smarty_tpl->tpl_vars['data']->_loop = true;
?>
                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->conditions;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2==1){?>
                        <tr class="danger" style="background-color:#eed3d7;"> <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->conditions;?>
<?php $_tmp3=ob_get_clean();?><?php if ($_tmp3==0){?>

                        <tr> <?php }}?>
                            <td class="hidden-print">
                                <input type="checkbox" name="choosedItem[]" id="checked<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" class="choosenItem" value="<?php echo $_smarty_tpl->tpl_vars['data']->value->productCatId;?>
" />
                            </td>
                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->productCatName;?>
<?php if ($_smarty_tpl->tpl_vars['data']->value->parentName!=''){?> / <?php echo $_smarty_tpl->tpl_vars['data']->value->parentName;?>
<?php }?></td>
                            <td class="hidden-print"> <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->conditions;?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp4==0){?> <a href="productCatController.php?do=tempdelete&id=<?php echo $_smarty_tpl->tpl_vars['data']->value->productCatId;?>
" type="button" class="btn btn-default btn-lg removeicon"></a> <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->conditions;?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5==1){?> <a href="productCatController.php?do=returndelete&id=<?php echo $_smarty_tpl->tpl_vars['data']->value->productCatId;?>
" type="button" class="btn btn-default btn-lg correcticon"></a> <?php }}?> </td>
                            <td class="hidden-print"> <a href="productCatController.php?do=edit&id=<?php echo $_smarty_tpl->tpl_vars['data']->value->productCatId;?>
&parentid=<?php echo $_smarty_tpl->tpl_vars['data']->value->productCatParent;?>
" class="btn btn-default btn-lg editicon"></a> </td>

                            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->allowfinsldelete;?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp6==0){?>
                            <td class="hidden-print"><a href="#" name="dd" type="button" class="btn btn-default btn-lg deleteicon conformdel1" data-position="productCatController.php?do=deleteFinaly&id=<?php echo $_smarty_tpl->tpl_vars['data']->value->productCatId;?>
" ></a></td>
                            <?php }?>
                        </tr>
                        <?php } ?>

                    </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"><?php echo @CATEGORY_CONFIRM_GROUP_DELETION;?>
</h4>
                                </div>
                                <div class="modal-body"> <?php echo @CATEGORY_WANT_DELETE_CATEGORY;?>
 </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo @CATEGORY_NO;?>
</button>
                                    <button type="button" class="btn btn-primary savemodel1"><?php echo @CATEGORY_YES;?>
</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="<?php echo @CATEGORY_CHOOSE_PROCESS;?>
" class="select2 wdt100">
                                            <option value="-1"><?php echo @CATEGORY_CHOOSE_PROCESS;?>
</option>
                                            <option value="1"><?php echo @CATEGORY_STOP;?>
</option>
                                            <option value="2"> <?php echo @CATEGORY_START;?>
</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="<?php echo @CATEGORY_EXECUTION;?>
"/>
                                </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><?php echo @CATEGORY_ITEMS_SELECTED_FIRST;?>
</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"><?php echo @CATEGORY_PRINT;?>
</button>
                            </div>
                        </div>
                    </div>
                    <div class="clearfix"></div>
                </div>
                <div class="clearfix"></div>




            </form>
        </div>

    </div>
</div>

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