load->model('Property'); $this->lang->load('var_lang.php', 'var'); $package_id = $this->input->get('package_id'); $data['package_id'] = $package_id; // if(isset($_SESSION['login']) && isset($_SESSION['member_id'])){ // header('location: '.base_url().'paypal?member_id='.$_SESSION['member_id'].'&package_id='.$package_id); // exit; // } $this->load->view('frontend/register.landing.php',$data); } public function login() { if($this->input->post('save')){ $email = $this->input->post('email'); $password = $this->input->post('password'); $query = $this->db->get_where('site_member',array('email'=>$email,'password'=>$password)); $rs = $query->result(); if(isset($rs[0]->member_id)){ $_SESSION['member_id'] = $rs[0]->member_id; $_SESSION['login'] = true; echo $rs[0]->member_id; } } } public function register_mobile(){ $this->load->view('frontend/registermobile.php',$data); } public function upload_regismobile(){ $data['firstname'] = $this->input->post("namesurname"); $data['callsign'] = $this->input->post("callsign"); $data['mobile'] = $this->input->post("telp"); $data['password'] = $this->input->post("password"); $data['iar'] = $this->input->post("iar"); $data['nri'] = $this->input->post("nri"); $data['email'] = $this->input->post("email"); $this->db->insert("site_member",$data); redirect("http://com.orari.apps.android.orari.apk.mobile.orari.or.id"); } public function signup() { $this->load->model('Member'); if($this->input->post('save')){ $firstname = $this->input->post('firstname'); $lastname = $this->input->post('lastname'); $email = $this->input->post('email'); $password = $this->input->post('password'); $member_id = $this->Member->insert(); $_SESSION['member_id'] = $member_id; $_SESSION['login'] = true; $package_id = $this->input->get('package_id'); // redirect(base_url('Front_home/')); // $this->mail($member_id,$package_id); echo $member_id; } } public function sihn(){ redirect(base_url('Front_home/')); } public function mail($member_id,$package_id){ $row = $this->db->get_where("site_member",array("member_id"=>$member_id))->row(); $row2 = $this->db->get_where("site_member_package",array("package_id"=>$package_id))->row(); $table = $row->firstname." ".$row->lastname." Telah Mendaftar Dengan Layanan ".$row2->name." Seharga ".$row2->price." Per ". $row2->months. " Bulan Silahkan Melakukan Pembayaran Ke Rekening ini 9999828819929 Setelah Selesai harap konfirmasi dengan bukti pembayaran link"; $this->load->library('email'); $config['protocol'] = 'smtp'; // $config['newline'] = "\r\n"; $config['smtp_host'] = 'ssl://smtp.gmail.com'; //change this $config['smtp_port'] = '465'; $config['smtp_user'] = 'sixgolfer@gmail.com'; //change this $config['smtp_pass'] = 'vitto1007'; //change this $config['mailtype'] = 'html'; $config['charset'] = 'utf-8'; $config['newline'] = "\r\n"; $config['wordwrap'] = TRUE; $this->email->initialize($config); // $this->email->set_newline("\r\n"); $this->email->from('sixgolfer@gmail.com', 'Sixgolfer'); $this->email->to('tegarkurniawan145@gmail.com'); $this->email->subject('New Reservation'); $this->email->message($table); if ($this->email->send()){ echo "Mail Sent!"; }else{ echo $this->email->print_debugger(); } } public function paypal_redirect() { $this->load->model('Member'); $this->load->model('Property'); $this->lang->load('var_lang.php', 'var'); $package_id = $this->input->get('package_id'); $member_id = $this->input->get('member_id'); $query = $this->db->get_where('site_member_package',array('package_id'=>$package_id)); $data['package'] = $query->result(); $data['member'] = $this->Member->get_id($member_id); $data['property'] = $this->Property->get(); $this->load->view('frontend/register.paypal.php',$data); } public function paypalIPN() { $this->load->model('Property'); $package_id = $this->input->get('package_id'); $member_id = $this->input->get('member_id'); $payment_status = $this->input->post('payment_status'); $data['property'] = $this->Property->get(); if($payment_status == "Completed"){ $payment_detail = json_encode($_POST); $query = $this->db->get_where('site_member_package',array('package_id'=>$package_id)); $package = $query->result(); $sql = "SELECT FROM site_member WHERE member_id = '$member_id' "; $query = $this->db->query($sql); $member = $query->result(); $sql = "SELECT MAX(expired) AS expried "; $sql .= "FROM site_member_extend "; $sql .= "WHERE member_id = '".$member[0]->member_id."' "; $query = $this->db->query($sql); $rs = $query->result(); if(isset($rs[0]->expried)){ list($y,$m,$d) = explode('-',$rs[0]->expired); if(mktime(0,0,0,$m,$d,$y) < mktime(0,0,0,date('m'),date('d'),date('Y'))){ $expired = date('Y-m-d',mktime(0,0,0,date('m')+$package[0]->months,date('d'),date('Y'))); }else{ $expired = date('Y-m-d',mktime(0,0,0,$m+$package[0]->months,$d,$y)); } $sql = "INSERT INTO site_member_extend "; $sql .= "SET "; $sql .= "package_id = '$package_id', "; $sql .= "expired = '".$expired."', "; $sql .= "member_id = '".$member[0]->member_id."', "; $sql .= "payment_detail = '".$payment_detail."', "; $sql .= "entered = NOW() "; $this->db->query($sql); }else{ $sql = "INSERT site_member_extend "; $sql .= "SET "; $sql .= "package_id = '$package_id', "; $sql .= "member_id = '".$member[0]->member_id."', "; $sql .= "expired = '".date('Y-m-d',mktime(0,0,0,date('m')+$package[0]->months,date('d'),date('Y')))."', "; $sql .= "payment_detail = '".$payment_detail."', "; $sql .= "entered = NOW() "; $this->db->query($sql); } } } }

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /usr/home/orari56/public_html/app-website/adm.orari.or.id/application/controllers/Front_register.php:195)

Filename: core/Common.php

Line Number: 573

Backtrace:

File: /usr/home/orari56/public_html/app-website/adm.orari.or.id/index.php
Line: 292
Function: require_once

404 Page Not Found

404 Page Not Found

The page you requested was not found.