Commit a0d386ea by nurchamim

modul : bug data karyawan

status : selesai
keterangan : bug fix foto saat cetak biodata tidak tampil
parent 72ccf0aa
...@@ -8,6 +8,7 @@ class Karyawan extends MY_Controller ...@@ -8,6 +8,7 @@ class Karyawan extends MY_Controller
{ {
parent::__construct(); parent::__construct();
$this->load->model('Karyawan_m'); $this->load->model('Karyawan_m');
$this->load->helper('image');
} }
public function index() public function index()
......
<?php
if(!function_exists('image_pdf')) {
function image_pdf($type, $dir) {
$CI =& get_instance();
$location = $CI->config->item('base_upload');
$filename = $location.$dir;
if(empty($dir)){
$filename = __file_exists_image($type);
}else{
if(file_exists($filename)){
$filename = $filename;
}else{
$filename = __file_exists_image($type);
}
}
return $filename;
}
}
...@@ -27,10 +27,7 @@ ...@@ -27,10 +27,7 @@
<table width="100%" border="0" style="border-collapse: collapse;"> <table width="100%" border="0" style="border-collapse: collapse;">
<tr> <tr>
<td width="100%" align="right"> <td width="100%" align="right">
<?php <img src="<?= image_pdf('photo', $data_diri->foto) ?>" style="max-height: 120px;">
$foto = $this->config->item('base_image').'image?_t=photo&_d='.$data_diri->foto;
?>
<img src="<?= $foto ?>" style="width: 100px; height: 120px;">
</td> </td>
</tr> </tr>
</table> </table>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment