Finding Form Coding |
The following is the code I copied from the index.php file which I think is related to the form on the home page. I added MYDOMAIN to any place where the domain name was mentioned.
There is a reference to query db atabase and admin_users and admin_email. --- Begin Code --- function subscribers(){ $datestring = "%Y-%m-%d %H:%i:%s"; $time = time(); $now = mdate($datestring, $time); $id_box=$this->input->post('type'); $this->db->where('id',$id_box); $query_response=$this->db->get('subscriptions_response'); foreach($query_response->result() as $row_contact) { $from_mail = $row_contact->from; $title=$row_contact->subject; $content=html_entity_decode($row_contact->description); } $this->db->where('id', 1); $query=$this->db->get("admin_users"); foreach ($query->result() as $row) { $admin_email = $row->email; } if($this->input->post('type') == "1"){ $country = $this->home_model->getCountryName($this->input->post('country1')); $to = $this->input->post('email_address1'); $from = $from_mail; $message = $content; $subject = $title; $headers = "From:".$from_mail."\n"; $headers .= "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; $send=mail($to,$subject,$message,$headers); $coaches_data = array( 'type' => $this->input->post('type'), 'first_name' => $this->input->post('fname1'), 'last_name' => $this->input->post('lname1'), 'email' => $this->input->post('email_address1'), 'country' => $this->input->post('country1'), 'number' => $this->input->post('contact_id1'), 'datentime' => $now ); $this->db->insert('subscriptions', $coaches_data); $name1 = $this->input->post('fname1').' '.$this->input->post('lname1'); $subject1 = 'Subscription request about becoming a XXXXXXXXXX'; $from1 = $this->input->post('email_address1'); $to1 = $from_mail; $msg1 = 'Dear Admin,'.'<br><br>'; $msg1 .= $this->input->post('fname1').' '.$this->input->post('lname1').' has subscribed to become a XXXXXXXXXX.'.'<br><br>'; $msg1 .='Please <a href="'.base_url().'admin/subscriptions">click here</a> to see more details.'.'<br><br>'; $msg1 .= 'MYDOMAIN Team'.'<br>'; $headers1 = "From: [email protected]\n"; $headers1 .= "MIME-Version: 1.0" . "\r\n"; $headers1 .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; $send1=mail($to1,$subject1,$msg1,$headers1); if($this->home_model->getNumofRows($this->input->post('email_address1')) == 0) { $data_insert = array( 'first_name' => $this->input->post('fname1'), 'last_name' => $this->input->post('lname1'), 'email' => $this->input->post('email_address1'), 'buss_phone' => $this->input->post('contact_id1'), 'country' => $this->input->post('country1'), 'date_created'=>date('Y-m-d H:i'), 'affiliate' => 'MYDOMAIN Affiliate' ); $this->db->insert('coaches_db', $data_insert); } return true; } if($this->input->post('type') == "2"){ $country = $this->home_model->getCountryName($this->input->post('country2')); $to = $this->input->post('email_address2'); $from = $from_mail; $message = $content; $subject = $title; $headers = "From:".$from_mail."\n"; $headers .= "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; $send=mail($to,$subject,$message,$headers); $partners_data = array( 'type' => $this->input->post('type'), 'first_name' => $this->input->post('fname2'), 'last_name' => $this->input->post('lname2'), 'email' => $this->input->post('email_address2'), 'country' => $this->input->post('country2'), 'number' => $this->input->post('contact_id2'), 'datentime' => $now ); $this->db->insert('subscriptions', $partners_data); $name1 = $this->input->post('fname2').' '.$this->input->post('lname2'); $subject1 = 'Subscription request about becoming a MYDOMAIN Affiliate'; $from1 = $this->input->post('email_address2'); $to1 = $from_mail; $msg1 = 'Dear Admin,'.'<br><br>'; $msg1 .= $this->input->post('fname2').' '.$this->input->post('lname2').' has subscribed to become a MYDOMAIN Affiliate.'.'<br><br>'; $msg1 .='Please <a href="'.base_url().'admin/subscriptions">click here</a> to see more details.'.'<br><br>'; $msg1 .= 'MYDOMAIN Team'.'<br>'; $headers1 = "From: [email protected]\n"; $headers1 .= "MIME-Version: 1.0" . "\r\n"; $headers1 .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; $send1=mail($to1,$subject1,$msg1,$headers1); if($this->home_model->getNumofRows($this->input->post('email_address2')) == 0) { $data_insert = array( 'first_name' => $this->input->post('fname2'), 'last_name' => $this->input->post('lname2'), 'email' => $this->input->post('email_address2'), 'buss_phone' => $this->input->post('contact_id2'), 'country' => $this->input->post('country2'), 'date_created'=>date('Y-m-d H:i'), 'affiliate' => 'MYDOMAIN Affiliate' ); $this->db->insert('coaches_db', $data_insert); } return true; } if($this->input->post('type') == "3"){ $country = $this->home_model->getCountryName($this->input->post('country')); $to = $this->input->post('email_address'); $from = $from_mail; $message = $content; $subject = $title; $headers = "From:".$from_mail."\n"; $headers .= "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; $send=mail($to,$subject,$message,$headers); $learners_data = array( 'type' => $this->input->post('type'), 'first_name' => $this->input->post('fname'), 'last_name' => $this->input->post('lname'), 'email' => $this->input->post('email_address'), 'country' => $this->input->post('country'), 'number' => $this->input->post('contact_id'), 'datentime' => $now ); $this->db->insert('subscriptions', $learners_data); $name1 = $this->input->post('fname').' '.$this->input->post('lname'); $subject1 = "Subscription request to Know More about XXXXXXXXXX"; $from1 = $this->input->post('email_address'); $to1 = $from_mail; $msg1 = 'Dear Admin,'.'<br><br>'; $msg1 .= $this->input->post('fname').' '.$this->input->post('lname').' has subscribed to know more about XXXXXXXXXX.'.'<br><br>'; $msg1 .='Please <a href="'.base_url().'admin/subscriptions">click here</a> to see more details.'.'<br><br>'; $msg1 .= 'MYDOMAIN Team'.'<br>'; $headers1 = "From: [email protected]\n"; $headers1 .= "MIME-Version: 1.0" . "\r\n"; $headers1 .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; $send1=mail($to1,$subject1,$msg1,$headers1); if($this->home_model->getNumofRows($this->input->post('email_address')) == 0) { $data_insert = array( 'first_name' => $this->input->post('fname'), 'last_name' => $this->input->post('lname'), 'email' => $this->input->post('email_address'), 'buss_phone' => $this->input->post('contact_id'), 'country' => $this->input->post('country'), 'date_created'=> date('Y-m-d H:i'), 'affiliate' => 'MYDOMAIN Affiliate' ); $this->db->insert('coaches_db', $data_insert); } return true; } } --- End Code --- |
Messages In This Thread |
Finding Form Coding - by UTXinc - 07-15-2016, 07:51 AM
RE: Finding Form Coding - by PaulD - 07-15-2016, 08:36 AM
RE: Finding Form Coding - by UTXinc - 07-15-2016, 10:11 AM
RE: Finding Form Coding - by UTXinc - 07-15-2016, 10:33 AM
RE: Finding Form Coding - by UTXinc - 07-15-2016, 10:36 AM
RE: Finding Form Coding - by PaulD - 07-15-2016, 12:33 PM
|