X7ROOT File Manager
Current Path:
/home/jurarevi/beta.jurareview.ro/application/controllers
home
/
jurarevi
/
beta.jurareview.ro
/
application
/
controllers
/
📁
..
📄
announcements.php
(2.85 KB)
📄
chapters.php
(8.95 KB)
📄
config.php
(2.01 KB)
📄
contact.php
(2.52 KB)
📄
headerFooter.php
(1.39 KB)
📄
home.php
(731 B)
📄
index.html
(114 B)
📄
login.php
(925 B)
📄
menu.php
(2.19 KB)
📄
pagini.php
(3.86 KB)
📄
search.php
(1.19 KB)
📄
sidebars.php
(2.18 KB)
📄
test.php
(773 B)
📄
volumes.php
(8.79 KB)
📄
welcome.php
(770 B)
Editing: contact.php
<?php class Contact extends MY_Controller{ function __construct() { parent::__construct(); $this->load->model('sidebars_model'); } public function sendMail() { $this->load->library('email'); $config = array(); $config['mailtype'] = 'html'; $this->email->initialize($config); $this->email->from($_POST['email'], $_POST['name']); $this->email->to(trim($GLOBALS['userConfig']['email']['contact_email_address']['firstText'])); $this->email->subject($_POST['subject']); $this->email->message(strip_tags($this->br2nl($_POST['message']))); if ( isset($_FILES['file']) && isset($_FILES['file']['error']) && $_FILES['file']['error'] == 0 && isset($_FILES['file']['size']) && $_FILES['file']['size'] > 0 ) { $target_file = __DIR__ . '/../../assets/temp/'.$_FILES['file']['name']; move_uploaded_file($_FILES['file']["tmp_name"], $target_file); $this->email->attach($target_file); } $this->email->send(); if (isset($target_file)) { unlink($target_file); } $this->sendReplyEmail($_POST['email'], $_POST['name']); header('Location: /online-submission'); } public function sendReplyEmail($email, $name) { $this->email->clear(true); $this->email->from(trim($GLOBALS['userConfig']['email']['contact_autoreply_email']['firstText']), $GLOBALS['userConfig']['email']['contact_autoreply_name']['firstText']); $this->email->to($email); $this->email->subject($GLOBALS['userConfig']['email']['contact_autoreply_subject']['firstText']); $this->email->message(str_replace('{sender}', $name, $GLOBALS['userConfig']['email']['contact_autoreply_message']['firstText'])); $this->email->send(); return true; } public function index() { $data = array(); $data['page_title'] = 'Contact'; $data['sidebar'] = $this->sidebars_model->get_main_sidebar(); $this->load->view('common/header', $data); $this->load->view('common/menu', $data); $this->load->view('contact', $data); $this->load->view('common/sidebar', $data); $this->load->view('common/footer', $data); } function br2nl( $input ) { return preg_replace('/<br\s?\/?>/ius', "\n", str_replace("\n","",str_replace("\r","", htmlspecialchars_decode($input)))); } }
Upload File
Create Folder