%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
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 : /var/www/html/eoffice/frontend/modules/dispatchs/views/default/ |
Upload File : |
<?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->dispatch_num; $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>', ['/dispatchs/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"> <?= DetailView::widget([ 'model' => $model, 'template' => '<tr><th width="30%">{label}</th><td>{value}</td></tr>', 'attributes' => [ [ 'attribute' => 'dispatch_num', ], [ 'attribute' => 'booknum', ], [ 'attribute' => 'from_dis', ], [ 'attribute' => 'to_dis', ], [ 'attribute' => 'subject', ], [ 'attribute' => 'departments_id', 'value' => function ($model) { $department = Departments::find()->where(['id' => $model->departments_id])->one(); return $department->name; }, ], [ '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> <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>