<?php /* Smarty version Smarty-3.1.11, created on 2023-09-02 13:35:07
         compiled from "../views/screen/clinics/all/dental.html.tpl" */ ?>
<?php /*%%SmartyHeaderCode:15316809164d12f08e61676-08028521%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '33b6737392dd2702331790ccac6fc3b2afc02678' => 
    array (
      0 => '../views/screen/clinics/all/dental.html.tpl',
      1 => 1693087406,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '15316809164d12f08e61676-08028521',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_64d12f08ecc8f3_57262288',
  'variables' => 
  array (
    'hosturl' => 0,
    'path' => 0,
    'doctorsCount' => 0,
    'doctors' => 0,
    'doctor' => 0,
    'value' => 0,
    'i' => 0,
    'roles' => 0,
    'role' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_64d12f08ecc8f3_57262288')) {function content_64d12f08ecc8f3_57262288($_smarty_tpl) {?><!DOCTYPE html>
<html dir="rtl">
    <head>
        <meta charset="utf-8" > 
        <title> Clinics </title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <link rel="stylesheet"
              href="https://fonts.googleapis.com/css?family=Tajawal">
        <link rel="stylesheet" href="../views/screen/clinics/all/bootstrap.min.css">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <script src="../views/screen/clinics/all/jquery.js"></script>
        <style>

            body {
                font-family: 'Tajawal', sans-serif;
                color: black;
                font-size: 22px;
                font-weight: bold;

            }

            table th, table td {
                text-align: center;
            }

            table th, table td {
                text-align: center;
            }

            .danger {
                color: red
            }

            .table-bordered > tbody > tr > td, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > td, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > thead > tr > th {
                border: 1px solid #656565;
            }

            .table-dark td, .table-dark th, .table-dark thead th {
                border-color: transparent;
            }

            .bt {
                border-top: 2px solid #000 !important;
            }

            .bl {
                border-left: 2px solid #000 !important;

            }

            .table {
                margin: 0px 5px 5px 5px;
                border: 1px solid #ddd;
                float: right;
            }

            .table thead th, .table td {
                border: 0 !important;
            }

            thead {
                background-color: #173f5f;
                color: #fff;
            }

            thead th {
                color: #black
            }

            .bg-red {
                background-color: #53cbda;
                color: #000;
                font-weight: bold;
            }

            .table td, .table th {
                vertical-align: middle !important;
                padding: 0.25rem !important;
            }


            @media (min-width: 767px) and (max-width: 1080px) {
                .table {
                    width: 50%;
                    float: right;
                }
            }

            @media (max-width: 767px) {
                .table {
                    width: 100%;
                    float: right;
                }
            }

            .col-md-12,.col-sm-4{
                padding:0}

            li {
                text-align: right;
            }

            .row {
                margin-left: 0px;
                margin-right: 15px;
            }

            #todayTable {
                margin: 0px 5px 5px 5px;
                border: 1px solid #ddd;
                width: 100%;
                float: right;
            }
            .bg-info{
                background-color:rgba(108, 117, 125, 1) !important
            }
            .bg-blue-chambray{
                background-color:#11115e
            }
        </style>

    </head>
    <body>
        <input type="hidden" id="hosturl" value="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
"/>
        <input type="hidden" id="path" value="<?php echo $_smarty_tpl->tpl_vars['path']->value;?>
"/>
        <div class="full-container table-responsive" id="operation_container">

            <div class="row">
                <?php if ($_smarty_tpl->tpl_vars['doctorsCount']->value>0){?>
                    <div class="col-sm-4">
                        <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                        <?php  $_smarty_tpl->tpl_vars['doctor'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['doctor']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['doctors']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['doctor']->key => $_smarty_tpl->tpl_vars['doctor']->value){
$_smarty_tpl->tpl_vars['doctor']->_loop = true;
?>
                            <table class="table table-striped table-hover " id="todayTable">
                                <thead>
                                    <tr class=" bg-info">  <th><?php echo $_smarty_tpl->tpl_vars['doctor']->value['for_doctor_name'];?>
 </th> </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>
                                            <ul>
                                                <?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['value']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['doctor']->value['drVisits']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value){
$_smarty_tpl->tpl_vars['value']->_loop = true;
?>
                                                    <li>  <?php echo $_smarty_tpl->tpl_vars['value']->value->patientName;?>
  </li>
                                                    <?php } ?>
                                            </ul>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->value+1;?>
<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
 if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents());
 if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents());
 Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean();
} else $_smarty_tpl->capture_error();?>
                    <?php } ?>
                </div>
            <?php }else{ ?>
                <div class="col-sm-4">
                    <table class="table table-striped table-hover " id="todayTable">
                        <thead>
                            <tr class=" bg-info">  <th> Today's List </th> </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>
                                    <ul>

                                    </ul>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div> 

            <?php }?>

            <div class="col-sm-8">
                <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                <?php  $_smarty_tpl->tpl_vars['role'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['role']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['roles']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['role']->key => $_smarty_tpl->tpl_vars['role']->value){
$_smarty_tpl->tpl_vars['role']->_loop = true;
?>
                    <table class="table table-striped table-hover ">
                        <thead>
                            <tr  class=" bg-blue-chambray">  
                                <th style="width:50%; text-align: right; padding-right: 5% !important;" > <?php echo $_smarty_tpl->tpl_vars['role']->value->doctor_name;?>
 </th>
                                <th  style="width:50%; text-align: left; padding-left: 5% !important;"> <?php echo $_smarty_tpl->tpl_vars['role']->value->name;?>
 </th>
                            </tr>
                            <tr colspan="2" style=" background-color: #bdd5e8;">  <th colspan="2" style="color: black;"> <?php echo $_smarty_tpl->tpl_vars['role']->value->roleCurrentPatient;?>
 </th> </tr>
                        </thead>

                        <tbody>
                            <tr  colspan="2">
                                <td  colspan="2">
                                    <ul>
                                        <?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['value']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['role']->value->visits; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value){
$_smarty_tpl->tpl_vars['value']->_loop = true;
?>
                                            <li>  <?php echo $_smarty_tpl->tpl_vars['value']->value->patientName;?>
  </li>
                                            <?php } ?>
                                    </ul>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->value+1;?>
<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
 if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents());
 if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents());
 Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean();
} else $_smarty_tpl->capture_error();?>
            <?php } ?>
        </div>
    </div>

</div>

</div>

    <script>
        $(document).ready(function () {
            var host_url = $('#hosturl').val();

            setInterval(function () {
                $.post(host_url + '/controllers/index_dental.php?ac=clinicsInfo', function (result) {
                    //console.log(result);
                    $('#operation_container').html(result);
                });
            }, 30000); //120000
        });
    </script>



</body>
</html>

<?php }} ?>