<?php /* Smarty version Smarty-3.1.11, created on 2021-08-28 11:34:29
         compiled from "..\views\screen\op\index.html" */ ?>
<?php /*%%SmartyHeaderCode:25596612a0325b1e616-27384265%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '1e4bee33965c192e0c8b19e70de4f0559c68e682' => 
    array (
      0 => '..\\views\\screen\\op\\index.html',
      1 => 1629978327,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '25596612a0325b1e616-27384265',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'path' => 0,
    'hosturl' => 0,
    'rooms_info' => 0,
    'single' => 0,
    'op_itr' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_612a032604c158_25421103',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_612a032604c158_25421103')) {function content_612a032604c158_25421103($_smarty_tpl) {?><!DOCTYPE html>
<html dir="rtl">
<head>
    <title>شاشه عمليات</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="<?php echo $_smarty_tpl->tpl_vars['path']->value;?>
/op/bootstrap.min.css">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="<?php echo $_smarty_tpl->tpl_vars['path']->value;?>
/op/jquery.js"></script>
    <style>

        body {
            font-family: 'Tajawal', sans-serif;

        }

        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 {
            border: 1px solid #ddd;
            width: 25%;
            float: right;
        }

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

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

        thead th {
            color: #fff
        }

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

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

        .bg-info {
            background-color: #cfeef3 !important;
        }

        .bg-success {
            background-color: #89e29e !important;
        }

        .bg1 {
            background-color: #20639b;
            color: #fff;
            padding: 10px !important;
        }

        .bg2 {
            background-color: #3caea3;
            padding: 10px !important;
        }

        .bg3 {
            background-color: #caa521;
            padding: 10px !important;
        }

        .bg4 {
            background-color: #ed553b;
            padding: 10px !important;
        }

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

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

        /* .bb{
          border-bottom: 3px solid #000;
        } */
    </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">

    <table class="table table-striped table-hover ">
        <thead>
        <tr>
            <th colspan="5" class="bg1" style="padding: 10px!important;">غرفة عمليات رقم 1</th>
        </tr>
        <tr class=" bb">
            <th>الدخول - الخروج</th>
            <th> الطبيب المعالج</th>
            <th> اسم العملية</th>
            <th> اسم الحالة</th>
            <th> غرفة الاقامة</th>
        </tr>
        </thead>
        <tbody>

        <?php $_smarty_tpl->tpl_vars['op_itr'] = new Smarty_variable(1, null, 0);?>
        <?php  $_smarty_tpl->tpl_vars['single'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['single']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['rooms_info']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['single']->key => $_smarty_tpl->tpl_vars['single']->value){
$_smarty_tpl->tpl_vars['single']->_loop = true;
?>
        <?php if ($_smarty_tpl->tpl_vars['single']->value->room_no==4&&$_smarty_tpl->tpl_vars['op_itr']->value<=3){?>
        <tr class="<?php if ($_smarty_tpl->tpl_vars['op_itr']->value==1){?>even bg-success<?php }elseif($_smarty_tpl->tpl_vars['op_itr']->value==2){?>bg-info bb<?php }?>">
            <td><?php echo $_smarty_tpl->tpl_vars['single']->value->enterance;?>
 - <?php echo $_smarty_tpl->tpl_vars['single']->value->p_exit;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['single']->value->doctor_name;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['single']->value->operation_name;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['single']->value->patient_name;?>
</td>
            <td>غرفة <?php echo $_smarty_tpl->tpl_vars['single']->value->res_room_name;?>
</td>
        </tr>
        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'op_itr', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['op_itr']->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 }?>
        <?php } ?>

        </tbody>

    </table>
    <table class="table table-striped table-hover ">
        <thead>
        <tr>
            <th colspan="5" class="bg2" style="padding: 10px!important;">غرفة عمليات رقم 2</th>
        </tr>
        <tr class=" bb">
            <th>الدخول - الخروج</th>
            <th> الطبيب المعالج</th>
            <th> اسم العملية</th>
            <th> اسم الحالة</th>
            <th> غرفة الاقامة</th>
        </tr>
        </thead>
        <tbody>

        <?php $_smarty_tpl->tpl_vars['op_itr'] = new Smarty_variable(1, null, 0);?>
        <?php  $_smarty_tpl->tpl_vars['single'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['single']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['rooms_info']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['single']->key => $_smarty_tpl->tpl_vars['single']->value){
$_smarty_tpl->tpl_vars['single']->_loop = true;
?>
        <?php if ($_smarty_tpl->tpl_vars['single']->value->room_no==5&&$_smarty_tpl->tpl_vars['op_itr']->value<=3){?>
        <tr class="<?php if ($_smarty_tpl->tpl_vars['op_itr']->value==1){?>even bg-success<?php }elseif($_smarty_tpl->tpl_vars['op_itr']->value==2){?>bg-info bb<?php }?>">
            <td><?php echo $_smarty_tpl->tpl_vars['single']->value->enterance;?>
 - <?php echo $_smarty_tpl->tpl_vars['single']->value->p_exit;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['single']->value->doctor_name;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['single']->value->operation_name;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['single']->value->patient_name;?>
</td>
            <td>غرفة <?php echo $_smarty_tpl->tpl_vars['single']->value->res_room_name;?>
</td>
        </tr>
        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'op_itr', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['op_itr']->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 }?>
        <?php } ?>


        </tbody>

    </table>
    <table class="table table-striped table-hover ">
        <thead>
        <tr>
            <th colspan="5" class="bg3" style="padding: 10px!important;">غرفة عمليات رقم 3</th>
        </tr>
        <tr class=" bb">
            <th>الدخول - الخروج</th>
            <th> الطبيب المعالج</th>
            <th> اسم العملية</th>
            <th> اسم الحالة</th>
            <th> غرفة الاقامة</th>
        </tr>
        </thead>
        <tbody>
        <?php $_smarty_tpl->tpl_vars['op_itr'] = new Smarty_variable(1, null, 0);?>
        <?php  $_smarty_tpl->tpl_vars['single'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['single']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['rooms_info']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['single']->key => $_smarty_tpl->tpl_vars['single']->value){
$_smarty_tpl->tpl_vars['single']->_loop = true;
?>
        <?php if ($_smarty_tpl->tpl_vars['single']->value->room_no==6&&$_smarty_tpl->tpl_vars['op_itr']->value<=3){?>
        <tr class="<?php if ($_smarty_tpl->tpl_vars['op_itr']->value==1){?>even bg-success<?php }elseif($_smarty_tpl->tpl_vars['op_itr']->value==2){?>bg-info bb<?php }?>">
            <td><?php echo $_smarty_tpl->tpl_vars['single']->value->enterance;?>
 - <?php echo $_smarty_tpl->tpl_vars['single']->value->p_exit;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['single']->value->doctor_name;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['single']->value->operation_name;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['single']->value->patient_name;?>
</td>
            <td>غرفة <?php echo $_smarty_tpl->tpl_vars['single']->value->res_room_name;?>
</td>
        </tr>
        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'op_itr', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['op_itr']->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 }?>
        <?php } ?>

        </tbody>

    </table>
    <table class="table table-striped table-hover ">
        <thead>
        <tr>
            <th colspan="5" class="bg4" style="padding: 10px!important;">غرفة عمليات رقم 4</th>
        </tr>
        <tr class=" bb">
            <th>الدخول - الخروج</th>
            <th> الطبيب المعالج</th>
            <th> اسم العملية</th>
            <th> اسم الحالة</th>
            <th> غرفة الاقامة</th>
        </tr>
        </thead>
        <tbody>
        <?php $_smarty_tpl->tpl_vars['op_itr'] = new Smarty_variable(1, null, 0);?>
        <?php  $_smarty_tpl->tpl_vars['single'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['single']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['rooms_info']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['single']->key => $_smarty_tpl->tpl_vars['single']->value){
$_smarty_tpl->tpl_vars['single']->_loop = true;
?>
        <?php if ($_smarty_tpl->tpl_vars['single']->value->room_no==7&&$_smarty_tpl->tpl_vars['op_itr']->value<=3){?>
        <tr class="<?php if ($_smarty_tpl->tpl_vars['op_itr']->value==1){?>even bg-success<?php }elseif($_smarty_tpl->tpl_vars['op_itr']->value==2){?>bg-info bb<?php }?>">
            <td><?php echo $_smarty_tpl->tpl_vars['single']->value->enterance;?>
 - <?php echo $_smarty_tpl->tpl_vars['single']->value->p_exit;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['single']->value->doctor_name;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['single']->value->operation_name;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['single']->value->patient_name;?>
</td>
            <td>غرفة <?php echo $_smarty_tpl->tpl_vars['single']->value->res_room_name;?>
</td>
        </tr>
        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'op_itr', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['op_itr']->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 }?>
        <?php } ?>


        </tbody>

    </table>


</div>

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

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



</body>
</html>

<?php }} ?>