Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function generate_html() {
- $invoice_id = uri_assoc('invoice_id');
- $this->load->library('invoices/lib_output');
- $this->load->model('invoices/mdl_invoice_history');
- $this->mdl_invoice_history->save($invoice_id, $this->session->userdata('user_id'), $this->lang->line('generated_invoice_html'));
- $this->lib_output->html($invoice_id, uri_assoc('invoice_template'));
- /* ------------------ GENERATE MD5-HTML --------------------------- */
- $file = md5('my_output_path'.$invoice_id).'.html';
- echo "<a href='my_output_path".$file."'>Link to client invoice</a>";
- $f = fopen('my_invoice_path'.$file, 'w');
- $template = $this->load->view('invoice_templates/default_template');
- fwrite($f, $template);true;
- /* ------------------ End generate md5 --------------------------- */
- }
Advertisement
Add Comment
Please, Sign In to add comment