예제 #1
0
     show_upload_file_form();
     break;
 case 2:
     $filename = upload_file($_FILES["file"]);
     if ($filename) {
         go_to_step(3, $filename);
     } else {
         go_to_step(1, null);
     }
     break;
 case 3:
     ask_kind_of_importing();
     break;
 case 4:
     if ($_POST['submit'] == "Clear existing data and import") {
         if (!CCategoryManager::ClearAllCategories()) {
             break;
         }
         echo "Cleared all categories.<br/>";
         $import_type = "override";
     } else {
         if ($_POST['submit'] == "Merge with existing data") {
             $import_type = "merge";
         } else {
             header('Location: xls_importer.php');
         }
     }
     $filename = $_POST['filename'];
     import_category($filename);
     $extra_data = array();
     $extra_data[0] = $filename;