Exemplo n.º 1
0
 function commentdel($id)
 {
     if ($this->session->userdata('id')) {
         $comment = new information_comment($id);
         if ($comment->user_id == $this->session->userdata('id') || is_login('Administrator')) {
             $comment->delete();
         }
         set_notify('success', 'ลบความคิดเห็นเรียบร้อยค่ะ');
     }
     redirect($_SERVER['HTTP_REFERER']);
 }