/**
* 
* Function delete_template
* This function removes files added in delete_folder_loop
* @param string $path = Root path to the folder we wish to delete
* @version 1.0
* @author Patrick Lockley
*/
function delete_template($path)
{
    global $dir_path, $new_path, $temp_dir_path, $temp_new_path;
    $dir_path = $path;
    /*
     * find the files to delete
     */
    delete_folder_loop($dir_path);
    /*
     * remove the files
     */
    clean_up_files();
    /*
     * delete the directory for this template
     */
    rmdir($path);
}
Exemplo n.º 2
0
        scorm_html5_page_create($row['template_framework'], $lo_name, $xml->getLanguage());
    }
} else {
    if ($scorm == "2004") {
        $useflash = $export_flash && !$export_html5;
        lmsmanifest_2004_create($row['zipname'], $useflash, $lo_name);
        if ($export_flash && !$export_html5) {
            scorm2004_html_page_create($row['template_name'], $row['template_framework'], $rlo_file, $lo_name, $xml->getLanguage());
        } else {
            scorm2004_html5_page_create($row['template_framework'], $lo_name, $xml->getLanguage());
        }
    } else {
        if ($export_flash) {
            basic_html_page_create($row['template_name'], $row['template_framework'], $rlo_file, $lo_name);
        }
        if ($export_html5) {
            basic_html5_page_create($row['template_framework'], $lo_name);
        }
    }
}
/*
 * Add the files to the zip file, create the archive, then send it to the user
 */
xerte_zip_files($fullArchive, $dir_path);
$zipfile->create_archive();
$zipfile->download_file($row['zipname']);
/*
 * remove the files
 */
clean_up_files();
unlink($dir_path . "template.xml");