Ejemplo n.º 1
0
    function alert($id)
    {
        if ($_POST) {
            $comment = new blogcomment_alert();
            $comment->from_array($_POST);
            $comment->save();
            set_notify('success', 'แจ้งลบความเห็นเรียบร้อย');
            echo '<script type="text/javascript">
					parent.location = unescape(parent.location.pathname);
					</script>
			';
        } else {
            $data['id'] = $id;
            $this->template->set_layout('blank');
            $this->template->build('alert', $data);
        }
    }