Advertisement
Guest User

extract.php

a guest
Jan 30th, 2014
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.68 KB | None | 0 0
  1. <pre><?php
  2.  
  3. include_once 'config.php';
  4.  
  5. $uploaded_file  = $_FILES['bin']                      ;
  6. $uFileName      = explode('.',$uploaded_file['name']) ;
  7. $uFileName[0]   = str_replace('ex-',"",$uFileName[0]) ;
  8. $destination    = DIR_EXTRACTED.'ex-'.$uFileName[0].'.'.microtime(true).'.xls';
  9.  
  10.  
  11. # loading the template
  12. @include_once DIR_TEMPLATES.$uFileName[0].'.php';
  13.  
  14. if ( @count($template) == 0 ) die ('No available template for this file. Create a template file in '.DIR_TEMPLATES.$uFileName[0].'.php');
  15.  
  16. if ( $uFileName[0] =='skilllevel' )
  17.   extract_skilllevel_bin($uploaded_file['tmp_name'],$destination ) ;
  18. else
  19.   extract_bin($uploaded_file['tmp_name'],$destination ) ;
  20.  
  21. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement