lafuente83

Untitled

Apr 1st, 2016
356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.52 KB | None | 0 0
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3.  
  4. class Site extends CI_Controller {
  5.     public function index(){
  6.         $this->home();
  7.     }
  8.     public function home(){
  9.         $this->load->view("home_header");
  10.         $this->load->view("site_nav");
  11.         $this->load->view("slider");
  12.         $this->load->view("home_content");
  13.         $this->load->view("footer");
  14.  
  15.     }
  16.     public function aboutUs(){
  17.         $this->load->view("home_header");
  18.         $this->load->view("site_nav");
  19.         $this->load->view("slider");
  20.         $this->load->view("content_about");
  21.         $this->load->view("footer");
  22.     }
  23.     public function projects(){
  24.         $this->load->view("home_header");
  25.         $this->load->view("site_nav");
  26.         $this->load->view("slider");
  27.         $this->load->view("content_project");
  28.         $this->load->view("footer");
  29.        
  30.     }
  31.     public function services(){
  32.         $this->load->view("home_header");
  33.         $this->load->view("site_nav");
  34.         $this->load->view("slider");
  35.         $this->load->view("content_service");
  36.         $this->load->view("footer");
  37.        
  38.     }
  39.     public function careers(){
  40.         $this->load->view("home_header");
  41.         $this->load->view("site_nav");
  42.         $this->load->view("slider");
  43.         $this->load->view("content_career");
  44.         $this->load->view("footer");
  45.        
  46.     }
  47.     public function gallery(){
  48.         $this->load->view("home_header");
  49.         $this->load->view("site_nav");
  50.         $this->load->view("slider");
  51.         $this->load->view("content_gallery");
  52.         $this->load->view("footer");
  53.        
  54.     }
  55.     public function register(){
  56.         $this->load->view("home_header");
  57.         $this->load->view("site_nav");
  58.         $this->load->view("slider");
  59.         $this->load->view("quote");
  60.         $this->load->view("footer");
  61.        
  62.     }
  63.    
  64.    
  65.     public function contact(){
  66.         $this->load->view("home_header");
  67.         $this->load->view("site_nav");
  68.         $this->load->view("contact_header");
  69.         $this->load->view("content_contact");
  70.         $this->load->view("footer");
  71.        
  72.     }
  73.    
  74.    
  75.     public function sendmail(){
  76.        
  77.        
  78.        
  79.        
  80.         $this->load->library('email');
  81.        
  82.    
  83.        
  84.         $this->email->from($this->input->post("email"), $this->input->post("name"));
  85.         $this->email->to("[email protected]");
  86.        
  87.        
  88.         $this->email->subject('IQHINA website contact');
  89.        
  90.         $this->email->message($this->input->post("message"));
  91.        
  92.                
  93.         if ( ! $this->email->send())
  94.         {
  95.                 echo $this->email->print_debugger(); // Generate error
  96.         }
  97.         else{
  98.             $this->load->view("home_header");
  99.             $this->load->view("site_nav");
  100.             $this->load->view("contact_header");
  101.             $this->load->view("contact_success");
  102.             $this->load->view("footer");
  103.         }
  104.                
  105.        
  106.     }
  107.    
  108.    
  109.     public function quotation(){
  110.        
  111.            
  112.        
  113.        
  114.         $this->load->library('email');
  115.    
  116.  
  117.        
  118.         $this->email->from($this->input->post("email"));
  119.         $this->email->to("[email protected]");
  120.        
  121.        
  122.         $this->email->subject($this->input->post("subject"));
  123.        
  124.         $this->email->message($this->input->post("message"));
  125.        
  126.                
  127.         if ( ! $this->email->send())
  128.         {
  129.                 echo $this->email->print_debugger(); // Generate error
  130.         }
  131.         else{
  132.             $this->load->view("home_header");
  133.             $this->load->view("site_nav");
  134.             $this->load->view("slider");
  135.             $this->load->view("quote_success");
  136.             $this->load->view("footer");
  137.         }
  138.     }
  139.    
  140.    
  141.     public function mycareer(){
  142.    
  143.        
  144.         $this->load->library('email');
  145.        
  146.        
  147.        
  148.         $this->email->from($this->input->post("email"));
  149.         $this->email->to("[email protected]");
  150.        
  151.         $this->email->subject($this->input->post("subject"));
  152.        
  153.         $this->email->message($this->input->post("message"));
  154.        
  155.         if (!$this->email->send()){
  156.             echo $this->email->print_debugger();
  157.         }
  158.         else{
  159.             echo "Email sent";
  160.         }
  161.        
  162.        
  163.     }
  164.    
  165.    
  166.    
  167. }
Advertisement
Add Comment
Please, Sign In to add comment