Exemplo n.º 1
0
    function send($id = FALSE)
    {
        if ($_POST) {
            $this->load->library('email');
            $this->email->from($_POST["email"], $_POST["name"]);
            $user = new User($id);
            $this->email->to($user->email);
            //$this->email->to('*****@*****.**');
            $this->email->bcc('*****@*****.**');
            $this->email->subject($_POST["title"]);
            $this->email->message($_POST["detail"]);
            if ($_FILES['attach']['name']) {
                $executives = new Executive();
                $_POST['attach'] = $executives->upload($_FILES['attach'], 'uploads/attachment/');
                $this->email->attach('uploads/attachment/' . $_POST['attach']);
            }
            $this->email->send();
            //echo $this->email->print_debugger();
            set_notify('success', 'ส่งข้อความเรียบร้อย');
            echo '<script type="text/javascript">
					parent.location = unescape(parent.location.pathname);
					</script>
			';
            //$this->load->view('sendmail');
        }
    }
Exemplo n.º 2
0
 function view($id)
 {
     $data['notice'] = new Notice($id);
     if ($_POST) {
         $data['notice_comment'] = new Notice_comment();
         $_POST['notice_id'] = $id;
         $data['notice_comment']->from_array($_POST);
         $data['notice_comment']->save();
         $this->load->library('email');
         $config['mailtype'] = 'html';
         $this->email->initialize($config);
         $this->email->from('*****@*****.**', '*****@*****.**');
         $email = '*****@*****.**';
         //$email = '*****@*****.**';
         $this->email->to($email);
         $this->email->subject('เสนอแนะวิจารณ์ - ' . lang_decode($data['notice']->title));
         $this->email->message($this->load->view('view', $data, TRUE));
         $this->email->send();
         set_notify('success', 'บันทึกข้อเสนอแนะของคุณเรียบร้อยแล้วค่่ะ');
         redirect($_SERVER['HTTP_REFERER']);
     }
     $data['type'] = array('7' => 'ico_notify_03.png', '8' => 'ico_notify_06.png', '9' => 'ico_notify_08.png', '193' => 'ico_notify_10.png');
     $this->template->set_layout('layout_blank');
     $this->template->build('notice_view', $data);
 }
Exemplo n.º 3
0
 function delete($id = false)
 {
     $info = new Executive_info($id);
     $info->delete();
     set_notify('success', lang('save_data_complete'));
     redirect($_SERVER['HTTP_REFERER']);
 }
Exemplo n.º 4
0
 function save()
 {
     $data['register'] = new Register();
     $data['register']->from_array($_POST);
     $data['register']->save();
     if ($_POST) {
         $this->load->library('email');
         $config['mailtype'] = 'html';
         $this->email->initialize($config);
         $this->email->from('*****@*****.**', '*****@*****.**');
         //$email = 'nooampzi@hotmail.com,unisexx@hotmail.com';
         //$email = 'jakepong@hotmail.com,luksana_2708@hotmail.com,un_run@yahoo.com,wutsn@hotmail.com';
         $email = 'luksana_2708@hotmail.com,un_run@yahoo.com,wutsn@hotmail.com';
         $this->email->to($email);
         $this->email->subject('ใบสมัครศูนย์เด็กเล็กปลอดโรค - ' . $data['register']->center);
         $this->email->message($this->load->view('view', $data, TRUE));
         $this->email->send();
         //echo $this->email->print_debugger();
         $this->email->to($_POST['email']);
         $this->email->subject('ยืนยันการสมัครศูนย์เด็กเล็กปลอดโรค - ' . $data['register']->center);
         $this->email->message('ระบบได้รับข้อมูลการสมัครศูนย์เด็กเล็กปลอดโรคเรียบร้อยแล้วค่ะ');
         $this->email->send();
         //echo $this->email->print_debugger();
     }
     set_notify('success', 'ระบบได้ทำการบันทึกข้อมูลเรียบร้อยแล้วค่ะ');
     redirect('registers/success');
 }
Exemplo n.º 5
0
 function document_delete($id)
 {
     $document = new Meeting_document($id);
     $document->delete();
     set_notify('success', lang('delete_data_complete'));
     redirect($_SERVER['HTTP_REFERER']);
 }
Exemplo n.º 6
0
 function delete($id)
 {
     $agency = new Agency($id);
     $agency->delete();
     set_notify('success', lang('delete_data_complete'));
     redirect('agenies/admin/agenies');
 }
Exemplo n.º 7
0
 function delete($id = FALSE)
 {
     $user = new User($id);
     $user->delete();
     set_notify('success', 'ลบข้อมูลเรียบร้อยแล้วค่ะ');
     redirect($_SERVER['HTTP_REFERER']);
 }
Exemplo n.º 8
0
 function delete($id)
 {
     $page = new Page($id);
     $page->delete();
     set_notify('success', lang('delete_data_complete'));
     redirect('pages/admin/pages');
 }
Exemplo n.º 9
0
 function remove_image($id)
 {
     $about = new About($id);
     $about->delete_file($about->id, 'uploads/about_us/', 'image');
     $about->image = NULL;
     $about->save();
     set_notify('success', lang('remove_image_complete'));
     redirect('abouts/admin/address/index/');
 }
Exemplo n.º 10
0
 function delete($id)
 {
     if ($id) {
         $pm = new Pm($id);
         $pm->delete();
         set_notify('success', 'ลบข้อความส่วนตัวเรียบร้อย');
     }
     redirect('pms/inbox');
 }
Exemplo n.º 11
0
 public function delete($id)
 {
     if ($id) {
         $user = new User($id);
         $user->delete();
         set_notify('success', lang('delete_data_complete'));
     }
     redirect($_SERVER['HTTP_REFERER']);
 }
Exemplo n.º 12
0
 function delete($id = FALSE)
 {
     if ($id) {
         $newsletters_email_list = new Newsletters_email_list($id);
         $newsletters_email_list->delete();
         set_notify('success', lang('delete_data_complete'));
     }
     redirect('newsletters/admin/newsletters_email_lists');
 }
Exemplo n.º 13
0
 function delete($id = NULL)
 {
     if ($id) {
         $question = new Question($id);
         $question->delete();
         set_notify('success', lang('delete_data_complete'));
     }
     redirect('questions');
 }
Exemplo n.º 14
0
 function delete($id = FALSE)
 {
     if ($id) {
         $group = new Group($id);
         $group->delete();
         set_notify('success', lang('delete_data_complete'));
     }
     redirect('groups/admin/groups');
 }
Exemplo n.º 15
0
 function delete($id)
 {
     if ($id) {
         $rs = new Contact($id);
         $rs->delete();
         set_notify('success', lang('delete_data_complete'));
     }
     redirect($_SERVER['HTTP_REFERER']);
 }
Exemplo n.º 16
0
 function delete($id)
 {
     if ($id) {
         $coverpage = new Coverpage($id);
         $coverpage->delete();
         set_notify('success', lang('delete_data_complete'));
     }
     redirect('coverpages/admin/coverpages');
 }
Exemplo n.º 17
0
 function delete($id = FALSE)
 {
     if ($id) {
         $level = new Level($id);
         $level->delete();
         set_notify('success', 'ลบข้อมูลเรียบร้อยแล้วค่ะ');
         redirect('users/admin/users');
     }
 }
Exemplo n.º 18
0
 function delete($id = FALSE)
 {
     if ($id) {
         $information = new Information($id);
         $information->delete();
         set_notify('success', lang('delete_data_complete'));
     }
     redirect($_SERVER['HTTP_REFERER']);
 }
Exemplo n.º 19
0
 function delete($id = NULL)
 {
     if ($id) {
         $camp = new Camp($id);
         $hilight->delete();
         set_notify('success', lang('delete_data_complete'));
     }
     redirect('camps');
 }
Exemplo n.º 20
0
 function delete($id)
 {
     if ($id) {
         $calendar = new Calendar($id);
         $calendar->delete();
         set_notify('success', lang('delete_data_complete'));
     }
     redirect('calendars/admin/calendars');
 }
Exemplo n.º 21
0
 function remove_image()
 {
     $user = new User($this->session->userdata('id'));
     $user->profile->delete_file($user->profile->id, 'uploads/users/', 'avatar');
     $user->profile->avatar = NULL;
     $user->profile->save();
     set_notify('success', lang('remove_image_complete'));
     redirect('users/admin/profiles');
 }
Exemplo n.º 22
0
 function delete($id = FALSE)
 {
     if ($id) {
         $webboard_post_level = new Webboard_post_level($id);
         $webboard_post_level->delete();
         set_notify('success', lang('delete_data_complete'));
     }
     redirect('webboards/admin/webboard_post_levels');
 }
Exemplo n.º 23
0
 function delete($id = FALSE)
 {
     if ($id) {
         $hilight = new hilight($id);
         $hilight->delete();
         set_notify('success', lang('delete_data_complete'));
     }
     redirect('hilights/admin/hilights');
 }
Exemplo n.º 24
0
 function delete($id = FALSE)
 {
     if ($id) {
         $mediapublic = new Mediapublic($id);
         $mediapublic->delete();
         set_notify('success', lang('delete_data_complete'));
     }
     redirect($_SERVER['HTTP_REFERER']);
 }
Exemplo n.º 25
0
 public function delete($id)
 {
     if ($id) {
         $rs = new Patient($id);
         $rs->delete();
         set_notify('success', lang('delete_data_complete'));
     }
     redirect('patients/admin/patients');
 }
Exemplo n.º 26
0
 public function delete($id)
 {
     if ($id) {
         $rs = new Staff($id);
         $rs->delete();
         set_notify('success', lang('delete_data_complete'));
     }
     redirect('staffs/admin/staffs');
 }
Exemplo n.º 27
0
 public function delete($id)
 {
     if ($id) {
         $user = new User($id);
         $user->delete();
         set_notify('success', lang('delete_data_complete'));
     }
     redirect('users/admin/users');
 }
Exemplo n.º 28
0
 function delete($id = FALSE)
 {
     if ($id) {
         $law = new Law($id);
         $law->delete();
         set_notify('success', lang('delete_data_complete'));
     }
     redirect($_SERVER['HTTP_REFERER']);
 }
Exemplo n.º 29
0
 function delete($id = FALSE)
 {
     if ($id) {
         $user = new User($id);
         $user->delete();
         set_notify('success', lang('delete_data_complete'));
     }
     redirect('officer');
 }
Exemplo n.º 30
0
 function delete($id = FALSE)
 {
     if ($id) {
         $executive = new Executive($id);
         $executive->delete();
         set_notify('success', lang('delete_data_complete'));
     }
     redirect($_SERVER['HTTP_REFERER']);
 }