%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/11585/cwd/html/ppaobm/backend/modules/booking_data/views/bookingdata/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/11585/cwd/html/ppaobm/backend/modules/booking_data/views/bookingdata/report_month.php
<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use dektrium\user\models\Profile;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use backend\modules\booking_data\models\BookingData;
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\widgets\Pjax;

/* @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
//$model = backend\modules\booking_data\models\BookingData::find()->all();
?>
<div class="content-wrapper">
    <section class="content-header">
        <h1>
            <?= Html::encode($this->title) ?>
            <small>ศูนย์ประสานแผนพัฒนาท้องถิ่นประจำอำเภอ</small>
        </h1>
    </section>
    <section class="content">
        <div class="booking-data-view">
            <?php Pjax::begin(['id' => 'PjaxBooking']); ?>
            <div class="row">
                <div class="col-md-12">
                    <div class="box box-primary">
                        <div class="hidden-print" style="text-align: center;padding-top: 10px;">
                            <span style="font-size: 1.8rem;">รายงานสรุปประจำเดือน</span>
                            <?= Html::beginForm(['reportmonth'], 'post', ['id' => 'formBooking', 'data-pjax' => 'true']); ?>
                            <div class="box-header with-border">
                                <h3 class="box-title"></h3>
                                <?=
                                Html::dropDownList('location', $location, ArrayHelper::map(LocationCenter::find()->all(), 'id', 'name'), [
                                    'prompt' => '',
//                                    'onchange' => '$("#formBooking").submit()'
                                ])
                                ?>
                                <?=
                                Html::dropDownList('month', $month, [
                                    '01' => 'มกราคม',
                                    '02' => 'กุมภาพันธ์',
                                    '03' => 'มีนาคม',
                                    '04' => 'เมษายน',
                                    '05' => 'พฤษภาคม',
                                    '06' => 'มิถุนายน',
                                    '07' => 'กรกฎาคม',
                                    '08' => 'สิงหาคม',
                                    '09' => 'กันยายน',
                                    '10' => 'ตุลาคม',
                                    '11' => 'พฤศจิกายน',
                                    '12' => 'ธันวาคม',
                                        ], [
                                    'prompt' => '',
//                                    'onchange' => '$("#formBooking").submit()'
                                ])
                                ?>
                                <?php
                                $time = time();
                                $today_year = Yii::$app->formatter->asDate($time, 'yyyy');
                                $array_year = [
                                    $today_year => $today_year + 543,
                                    $today_year - 1 => $today_year + 543 - 1,
                                    $today_year - 2 => $today_year + 543 - 2,
                                    $today_year - 3 => $today_year + 543 - 3,
                                    $today_year - 4 => $today_year + 543 - 4,
                                    $today_year - 5 => $today_year + 543 - 5,
                                ];
                                echo Html::dropDownList('year', $year, $array_year, [
                                    'prompt' => '',
//                                    'onchange' => '$("#formBooking").submit()'
                                ])
                                ?>
                                <?= Html::submitButton('ค้นหา', ['class' => 'btn hidden-print']) ?>
                            </div>
                            <?= Html::endForm() ?>
                        </div>
                        <div id="opop1" class="col-12 visible-print" style="text-align: center;padding-top: 10px;"><span>รายงานสรุปประจำเดือน<br>การขอใช้ห้องประชุมและอาคารสถานที่<br><?php
                                $data = LocationCenter::find()->where(['id' => $location])->one();
                                echo $data->name;
                                ?><br>ประจำเดือน <?php
                                $fmonth = array('มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม');
                                echo $fmonth[intval($month-1)];
                                ?> พ.ศ.<?=$year+543?></span></div>
                        <div class="box-body">
                            <table id="ppaobmreportyear" class="table table-bordered table-striped">
                                <thead>
                                    <tr>
                                        <th>วันที่ใช้บริการ</th>
                                        <th>ผู้ขอใช้บริการ</th>
                                        <th>ประเภทผู้ขอใช้</th>
                                        <th>จำนวนผู้เข้าใช้</th>
                                        <th>ส่วนที่ขอใช้บริการ</th>
                                        <th>ค่าตอบแทน</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php
                                    $rows = BookingData::find()->where(['DATE_FORMAT(datein, "%m")' => $month])->andWhere(['DATE_FORMAT(datein, "%Y")' => $year])->andWhere(['location_center_id' => $location])->andWhere(['status' => 1])->all();
                                    foreach ($rows as $row) {
                                        ?>
                                        <tr>
                                            <td>
                                                <?php
                                                $data1 = Yii::$app->formatter->asDate($row->datein, 'MM');
                                                $data2 = Yii::$app->formatter->asDate($row->dateon, 'MM');
                                                if (Yii::$app->formatter->asDate($row->datein, 'dd') !== Yii::$app->formatter->asDate($row->dateon, 'dd')) {
                                                    echo Yii::$app->thaiFormatter->asDateTime($row->datein, 'php:d M Y เวลา H:i') . ' ถึง</br>' . Yii::$app->thaiFormatter->asDateTime($row->dateon, 'php:d M Y เวลา H:i');
                                                } else {
                                                    echo Yii::$app->thaiFormatter->asDateTime($row->datein, 'php:d M Y เวลา H:i') . ' - ' . Yii::$app->thaiFormatter->asDateTime($row->dateon, 'php:H:i');
                                                }
                                                ?>
                                            </td>
                                            <td style="text-align: center;"><?= $row->department_name ?></td>
                                            <td style="text-align: center;"><?php
                                                $data = DepartmentType::find()->where(['id' => $row->department_type_id])->one();
                                                echo $data->name;
                                                ?></td>
                                            <td style="text-align: center;"><?= $row->num_user ?></td>
                                            <td style="text-align: center;"><?php
                                                $data = LocationRoom::find()->where(['id' => $row->location_room_id])->one();
                                                echo $data->name;
                                                ?></td>
                                            <td style="text-align: center;">
                                                <?= $row->cost ?>
                                            </td>
                                        </tr>
                                    <?php } ?>
                                </tbody>
                            </table>
                        </div>
                        <div class="form-group box-footer">
                            <p style="text-align: center;">
                                <button type="button" class="btn btn-app hidden-print" onclick="window.print();"><i class="fa fa-print"></i> พิมพ์รายงาน</button>
                            </p>
                        </div>
                    </div>
                </div>
                <?php Pjax::end(); ?>
            </div>
    </section>
</div>

Anon7 - 2022
AnonSec Team