Пример #1
0
?>
<div class="container-full">
	<!-- Modal -->
	<div class="modal modal-wide fade" id="tampil-image" size="Modal::SIZE_LARGE" tabindex="-1" role="dialog" aria-labelledby="create-poLabel">
	  <div class="modal-dialog modal-lg" role="document">
		<div class="modal-content">

			  <div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title" id="create-poLabel">VIEW IMAGE</h4>
			  </div>

			  <div class="modal-body" style="text-align:center">
				<?php 
$gambarkosong = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxAQDxAPERIUFBUVFxcPFxQUFRAUFxMUFRUWFhYXFRUYHSggGBooGxQVITEhJSkrLi4uFx8zODMsNygtLisBCgoKBQUFDgUFDisZExkrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrK//AABEIAMAAwAMBIgACEQEDEQH/xAAbAAEAAgMBAQAAAAAAAAAAAAAABQYBAgQDB//EAEAQAAIBAgMEBwQGCAcBAAAAAAABAgMRBAUhEjFRcQYTIkFhkdGBobHBMjNCUnKSFSM0U4PD8PEUQ2KywtLhFv/EABQBAQAAAAAAAAAAAAAAAAAAAAD/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwD6IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADB2YXLpz1+iuL+SA5DanSlL6Kb5JsnsPltOO9bT8fQ7ErAV6GWVX9m3No9Vk9TjH3+hOgCDeT1OMff6HlPK6q7k+TRYQBVatGUfpRa5o0LaclfLqc+6z4x0AroO3E5ZOGq7S8N/kcIGQAAAAAAAAAAAAA2p03JqKV2xSpuTUYq7ZYsFg40lxb3sDwwWWRhrLtS9yJAAAAAAAAAAAAABxY3L41NVpLjx5naAKrXoyg9mSszQs2Kw0akbS9j4FdxFCVOWzL+6A8wAAAAAAAACRybDbUnN7o7vFgd+W4Pq43f0nv8ADwO0AAAAAAAAAAAAAAAA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YAAYlJLVtLmBkHLVzClH7V+WpwV84b+hG3i/QCWq1FFXk7Ih8Zmrl2YaLj3vlwI+rVlN3k234moAAAAAAAAAAAAAAAAAAADBkAYPRVprdKXmzQAbuvP70vzM0YAAAAAAAAAAAAAAB//2Q==";
$searchModelViewImg = new CustomercallTimevisitSearch(['TGL' => '2016-09-01', 'USER_ID' => '59']);
$dataProviderViewImg = $searchModelViewImg->search(Yii::$app->request->queryParams);
$listImg = $dataProviderViewImg->getModels();
$startImg = '';
$endImg = '';
foreach ($listImg as $key => $value) {
    $startImg = $value['IMG_DECODE_START'] != '' ? $value['IMG_DECODE_START'] : $gambarkosong;
    $endImg = $value['IMG_DECODE_START'] != '' ? $value['IMG_DECODE_START'] : $gambarkosong;
    $items[] = ['src' => 'data:image/jpg;charset=utf-8;base64,' . $startImg, 'imageOptions' => ['width' => "120px", 'height' => "120px", 'class' => 'img-rounded']];
    $items[] = ['src' => 'data:image/jpg;charset=utf-8;base64,' . $endImg, 'imageOptions' => ['width' => "120px", 'height' => "120px", 'class' => 'img-rounded']];
}
/* 2 amigos two galerry author mix:wawan and ptr.nov ver 1.0*/
$viewItemImge = dosamigos\gallery\Gallery::widget(['items' => $items]);
echo Html::panel(['heading' => '<div> LIST IMAGE </div>', 'body' => $viewItemImge], Html::TYPE_INFO);
?>
			  </div>
 /**
  * Lists all CustomercallTimevisit models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new CustomercallTimevisitSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
Пример #3
0
 /**
  * IMAGE - DOWNLOAD
  * @author Piter Novian [ptr.nov@gmail.com]
  * @since 2.0
  */
 public function actionDownloadImage($tgl, $user_id)
 {
     $searchModelViewImg = new CustomercallTimevisitSearch(['TGL' => $tgl, 'USER_ID' => $user_id]);
     $dataProviderViewImg = $searchModelViewImg->search(Yii::$app->request->queryParams);
     $listImg = $dataProviderVi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lEcVsXm47N3ok73t6AVXL8nxNeinCfYbfZc5JaP7u4seQ5EsM3OUtqbVrrdFeHqd2VYFUKSpJuSTbu1be7nYB86xFFTxsoPdKs4vk5EznXR6jRoTqR2rq1ru61Z3f8Azcev6/rJX2+ttZWve9iUzLBqvSlSbttd613MCu9BN+I/h/zCGxaeHxkm19Gp1nOLltfBlwyXJo4XrLTctvZ3pK2ztf8AY9s0ymliEttO60Ulo16gedfPMPGk6iqRel1FPtN9ytvRUui1BzxUH9282/Zb5k0uh9O+tWduUfiTeX5fToR2aatfVve3zYGucfs9b8EvgVboV+0S/A/ii4Yuh1lOdNu20nG/C5GZPkMcNNzU3K8dmzSXen8gNulNBzws7b42n7E9fcQPQ/MYUpVIVGo7dmm9FdXTTfdvXkXUgMZ0VoTe1Fyp+EbNexPcBH9MMyp1IwpQkpWe22ndLRpK/tJHodQccNd/bk5rlZL5GmF6J0Yu85Sn4OyXttvLBGKSSXIDJF57U7MI8W35f3JQr2bVdqq/9PZ9QOMAAAABgseW4jbpriuyyunVl2K6ud3uej9QLGDCZkAAAAAAAAAAAAAAAAAAAPDGV+rg5eXPuKy2d2bYrblsrdH3vvZwgAAAAAAAAS2U47dTk/wv5EuVImMtzK9oT37k+PMCVAAAAAAAAAAAAAAAAI3NcbsrYjve98F6mcxzFQ7MdZf7f/SDbvqwAAAAAAAAAAAGDIA78FmcodmXaj716k1QrRmrxd/67yrGac3F3i2nxQFsBCUM4ktJq/itGd9LMqUvtW56AdgNYzT3NPk0zYAAYlJLVtLmBkHLVzClH7V+WpwV84b+hG3i/QCWq1FFXk7Ih8Zmrl2YaLj3vlwI+rVlN3k234moAAAAAAAAAAAAAAAAAAADBkAYPRVprdKXmzQAbuvP70vzM0YAAAAAAAAAAAAAAB//2Q==";
     $data = [];
     $dataRow1 = [];
     $dataRow2 = [];
     foreach ($listImg as $row => $value) {
         $img64row1 = [['img64' => $value['IMG_DECODE_START'] != '' ? $value['IMG_DECODE_START'] : $imgKosong, 'name' => $value['TGL'] . '_' . $value['CUST_NM'] . '_1START' . '-' . $value['SALES_NM'], 'tgl' => $value['TGL'], 'sales_nm' => $value['SALES_NM']]];
         $img64row2 = [['img64' => $value['IMG_DECODE_END'] != '' ? $value['IMG_DECODE_END'] : $imgKosong, 'name' => $value['TGL'] . '_' . $value['CUST_NM'] . '_2END' . '-' . $value['SALES_NM'], 'tgl' => $value['TGL'], 'sales_nm' => $value['SALES_NM']]];
         $dataRow1 = ArrayHelper::merge($dataRow1, $img64row1);
         $dataRow2 = ArrayHelper::merge($dataRow2, $img64row2);
     }
     $data = ArrayHelper::merge($dataRow1, $dataRow2);
     return $this->render('_download', ['model' => $data]);
     /*  $model = new \yii\base\DynamicModel(['pathDes']);
     		$model->addRule(['pathDes'], 'safe');
     		if ($model->load(Yii::$app->request->post())) {
     			$hsl = Yii::$app->request->post();
     			$valPath = $hsl['DynamicModel']['pathDes'];	
     			//$log=shell_exec('sudo zip -r /var/www/advanced/lukisongroup/cronjob/temp.zip /var/www/advanced/lukisongroup/cronjob/temp/ 2>&1');
     			//$log=exec("ls -l /var/www/advanced/lukisongroup/cronjob/temp 2>&1");
     			//\yii\helpers\VarDumper::dump($log, 10, 1);
     			//print_r("<pre>$log</pre>"); 
     			//self::downloadJpg('test',$dataScr);
     			//return $valPath;
     			//return $this->redirect(['index']);
     		}else{			
     			return $this->renderAjax('_formImgDownload', [
     				'model'=>$model,
     			]);
     		} */
 }