public function hapus_pesan($id, $compare) { $signature = new signature(); $key = $this->config->item('encryption_key'); $cek = $signature->compareSignature($id, $compare, $key); if (!$cek) { redirect('admin/pesan'); } $this->model_pesan->delete_pesan($id); redirect('admin/pesan'); }
<div class="box-body table-responsive"> <table id="tabel" class="table table-bordered table-striped tab-content" cellpadding="4" cellspacing="2" style="background-color:#CF9; border:solid 1px #C6F; #C6F; border-radius:0px;"> <thead> <tr> <th>Nomor</th> <th>Nama</th> <th>Email</th> <th>Komentar</th> <th>Tanggal di buat</th> <th>Opsi</th> </tr> </thead> <tbody> <?php $no = 1; $signature = new signature(); $key = $this->config->item('encryption_key'); foreach ($pesan as $data_pesan) { ?> <tr> <td><?php echo $no; ?> </td> <td><?php echo $data_pesan->nama; ?> </td> <td><?php echo $data_pesan->email; ?>
imagettftext($image, $this->config['size'][1], 0, 8, 12 * $o, imagecolorallocate($image, $color['r'], $color['g'], $color['b']), "./{$this->config[font]}", " " . $bolds[$i]); } if ($split[0] != "The requested image does not exist.") { imagettftext($image, $this->config['size'][1], 0, 250, 10 + round(imagesy($image) / 2 - imagefontheight($this->config['size'][1]) / 2), imagecolorallocate($image, 0, 0, 0), "./{$this->config[font]}", $split[2]); imagettftext($image, $this->config['size'][1], 0, 249, 10 + round(imagesy($image) / 2 - imagefontheight($this->config['size'][1]) / 2) - 1, imagecolorallocate($image, $statuscolor['r'], $statuscolor['g'], $statuscolor['b']), "./{$this->config[font]}", $split[2]); } } else { for ($i = 0; $i <= count($content); $i++) { $o = $i == 0 ? 1.5 : $i + 1.5; imagestring($image, $this->config['size'][0], -4, 12 * $o, " " . $content[$i], imagecolorallocate($image, $color['r'], $color['g'], $color['b'])); } for ($i = 0; $i <= count($bolds); $i++) { $o = $i == 0 ? 1.5 : $i + 1.5; imagestring($image, $this->config['size'][0], -3, 12 * $o, " " . $bolds[$i], imagecolorallocate($image, $color['r'], $color['g'], $color['b'])); } if ($split[0] != "The requested image does not exist.") { imagestring($image, $this->config['size'][0], 250, round(imagesy($image) / 2 - imagefontheight($this->config['size'][1]) / 2) - 1, $split[2], imagecolorallocate($image, 0, 0, 0)); imagestring($image, $this->config['size'][0], 249, round(imagesy($image) / 2 - imagefontheight($this->config['size'][1]) / 2) - 2, $split[2], imagecolorallocate($image, $statuscolor['r'], $statuscolor['g'], $statuscolor['b'])); } } imagepng($image); imagedestroy($image); } } $signature = new signature(); if (!empty($_GET)) { $signature->generate($_GET['character'], $_GET['image']); } ?>