Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 17th, 2012  |  syntax: PHP  |  size: 0.81 KB  |  hits: 27  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. function generate_html() {
  2.  
  3. $invoice_id = uri_assoc('invoice_id');
  4.  
  5. $this->load->library('invoices/lib_output');
  6.  
  7. $this->load->model('invoices/mdl_invoice_history');
  8.  
  9. $this->mdl_invoice_history->save($invoice_id, $this->session->userdata('user_id'), $this->lang->line('generated_invoice_html'));
  10.  
  11. $this->lib_output->html($invoice_id, uri_assoc('invoice_template'));
  12.  
  13.  /*  ------------------ GENERATE MD5-HTML ---------------------------  */
  14.      $file = md5('my_output_path'.$invoice_id).'.html';
  15.  
  16.      echo "<a href='my_output_path".$file."'>Link to client invoice</a>";
  17.      $f = fopen('my_invoice_path'.$file, 'w');
  18.      $template = $this->load->view('invoice_templates/default_template');
  19.  fwrite($f, $template);true;    
  20.      /*  ------------------ End generate md5 ---------------------------  */
  21.      }