예제 #1
0
 function email_receipt($id)
 {
     $this->load->model('order');
     $this->load->model('order_item');
     $order = new Order($id);
     if (!is_admin() and $order->customer_id != get_customer_id()) {
         redirect('/');
     }
     $data['order'] = $order;
     $body = $this->load->view('receipt/receipt', $data, TRUE);
     $config = array('protocol' => 'smtp', 'smtp_crypto' => 'ssl', 'smtp_host' => 'smtp.gmail.com', 'smtp_port' => 465, 'smtp_user' => '', 'smtp_pass' => '', 'mailtype' => 'html', 'charset' => 'utf-8');
     $this->load->library('email');
     $this->email->initialize($config);
     $this->email->from($config['smtp_user'], 'eStore');
     $this->email->to(get_customer_email());
     $this->email->subject('eStore - receipt order #' . $order->id);
     $this->email->message($body);
     $this->email->send();
     $this->email->print_debugger();
 }
include "include/header_admin.php";
include "include/admin_menu.php";
?>
<div id="content6"> 
<table>
  <tr>
    <td>Name&nbsp;&nbsp;</td>
	<td><?php 
echo ucwords(get_customer_name($_GET['id']));
?>
</td>
   </tr>
  <tr>
    <td>Email&nbsp;&nbsp;</td>
    <td><?php 
echo ucwords(get_customer_email($_GET['id']));
?>
</td>
  </tr>
 
  <tr>
    <td>Mobile no.&nbsp;&nbsp;</td>
    <td><?php 
echo ucwords(get_customer_mobile($_GET['id']));
?>
</td>
   
  </tr>
  <tr>
    <td>UserName&nbsp;&nbsp;</td>
    <td><?php