public function actionGenHandler() { $num = $_POST['num']; $type = $_POST['type']; $arr_no = []; for ($i = 0; $i < $num; $i++) { $no = Util::next($type); if ($no >= 10 && $no < 100) { $no = '0' . $no; } else { if ($no < 10) { $no = '00' . $no; } } $no = $type . $no; $arr_no[] = $no; $card = new Card(); $card->no = $no; $card->type = $type; $card->status = 'A'; $card->create_dt = date('Y-m-d'); $card->create_by = \Yii::$app->user->id; $card->save(); $this->genBarCode($no); } $ty = Ref::getDesc('ctype', $type); $content = $this->renderPartial('daily_card', ['arr_no' => $arr_no, 'type' => $ty]); $pdf = new Pdf(['content' => $content, 'orientation' => Pdf::ORIENT_PORTRAIT, 'cssFile' => 'css/card.css', 'marginLeft' => 5, 'marginRight' => 5]); $pdf->render(); }
?> </td> <td><?php echo $visit->pass_no; ?> </td> <td align='center'><?php echo $visit->num; ?> </td> <td><?php echo $visit->purpose; ?> </td> <td><?php echo Ref::getDesc('jab', $visit->dept); ?> </td> <td><?php echo $visit->to_meet; ?> </td> <td align='center'> <a class="dlg2" href="#" val="<?php echo $visit->id; ?> "><span class="glyphicon glyphicon-log-out"></span></a> </td> </tr> <?php }
</tr> <?php $i = 1; foreach ($cms as $c) { ?> <tr> <td><?php echo $i++; ?> .</td> <td><?php echo $c->title; ?> </td> <td><?php echo Ref::getDesc('csts', $c->status); ?> </td> <td> <a href="<?php echo URL::toRoute('cms/edit'); ?> &id=<?php echo $c->id; ?> "><span class="glyphicon glyphicon-pencil"/></a> <a href="<?php echo URL::toRoute('cms/delete'); ?> &id=<?php echo $c->id;
?> <tr> <td><?php echo $i++; ?> .</td> <td><?php echo $card->no; ?> </td> <td><?php echo Ref::getDesc('ctype', $card->type); ?> </td> <td><?php echo Ref::getDesc('status', $card->status); ?> </td> <td><?php echo $card->create_dt; ?> </td> <td><?php echo $card->create_by; ?> </td> <td align='center'><a href="index.php?r=card/print&id=<?php echo $card->id; ?> " target="window"><span class="glyphicon glyphicon-print"></span></a></td> </tr>
?> .</td> <td><?php echo $user->name; ?> </td> <td><?php echo $user->user_id; ?> </td> <td><?php echo $user->email; ?> </td> <td><?php echo Ref::getDesc('role', $user->role); ?> </td> <td align="center"> <a href="<?php echo URL::toRoute('user/edit'); ?> &id=<?php echo $user->user_id; ?> " title="Kemaskini" data-rel="tooltip"><span class="fa fa-pencil-square-o bigger-130"/></a> <a href="<?php echo URL::toRoute('user/delete'); ?> &id=<?php echo $user->user_id;
} } }, tooltip: { headerFormat: '<span style="font-size:11px">{series.name}</span><br>', pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>{point.y:.2f}%</b> of total<br/>' }, series: [{ name: "Brands", colorByPoint: true, data: [ <?php foreach ($rs as $r) { ?> { name: "<?php echo Ref::getDesc('jab', $r['dept']); ?> ", y: <?php echo $r['bil']; ?> }, <?php } ?> ] }] }); }); </script>
<div class="col col-sm-4 xlabel">Pengesahan Katalaluan</div> <div class="col col-sm-8"><input type="password" name="User[confirm_password]" value="<?php echo $model->password; ?> " class="form-control"></div> </div> <div class="row"> <div class="col col-sm-4 xlabel">Emel</div> <div class="col col-sm-8"><?php echo $form->field($model, 'email')->label(false); ?> </div> </div> <div class="row"> <div class="col col-sm-4 xlabel">Tahap Capaian</div> <div class="col col-sm-8"><?php echo Ref::getDesc('role', $model->role); ?> </div> </div> <div class="row"> <div class="col col-sm-4"></div> <div class="col col-sm-8"><?php echo Html::submitButton('Simpan', ['class' => 'btn btn-primary']); ?> </div> </div> <?php ActiveForm::end(); ?> </div>