site_url . str_replace($xerte_toolkits_site->root_file_path,"",$dir_path) . "/" . $f . "'\">" . $f . "
" . substr((filesize($full)/1000000),0,4) . " MB
In use "; }else{ $result = "
site_url . str_replace($xerte_toolkits_site->root_file_path,"",$dir_path) . "/" . $f . "'\">" . $f . "
" . substr((filesize($full)/1000000),0,4) . " MB
Not in use \"Click
"; /** * add the files to the delete array that are not in use so they can be listed for use in the delete function */ array_push($delete_string,$f); } $quota += filesize($full); } array_push($result_string,$result); $result=""; } } database_connect("Media and quota template database connect success","Media and quota template database connect failed"); if(is_numeric($_POST['template_id'])){ if(has_rights_to_this_template(mysql_real_escape_string($_POST['template_id']), $_SESSION['toolkits_logon_id'])||is_user_admin()){ $query_for_path = "select " . $xerte_toolkits_site->database_table_prefix . "originaltemplatesdetails.template_name, " . $xerte_toolkits_site->database_table_prefix . "templaterights.folder, " . $xerte_toolkits_site->database_table_prefix . "logindetails.username from " . $xerte_toolkits_site->database_table_prefix . "originaltemplatesdetails, " . $xerte_toolkits_site->database_table_prefix . "templatedetails, " . $xerte_toolkits_site->database_table_prefix . "templaterights, " . $xerte_toolkits_site->database_table_prefix . "logindetails where " . $xerte_toolkits_site->database_table_prefix . "originaltemplatesdetails.template_type_id = " . $xerte_toolkits_site->database_table_prefix . "templatedetails.template_type_id and " . $xerte_toolkits_site->database_table_prefix . "templaterights.template_id = " . $xerte_toolkits_site->database_table_prefix . "templatedetails.template_id and " . $xerte_toolkits_site->database_table_prefix . "templatedetails.creator_id = " . $xerte_toolkits_site->database_table_prefix . "logindetails.login_id and " . $xerte_toolkits_site->database_table_prefix . "templatedetails.template_id =\"" . mysql_real_escape_string($_POST['template_id']) . "\" and role=\"creator\""; $query_for_path_response = mysql_query($query_for_path); $row_path = mysql_fetch_array($query_for_path_response); $end_of_path = $_POST['template_id'] . "-" . $row_path['username'] . "-" . $row_path['template_name']; /** * Set the paths */ $dir_path = $xerte_toolkits_site->users_file_area_full . $end_of_path . "/media"; $xmlpath = $xerte_toolkits_site->users_file_area_full . $end_of_path . "/data.xml"; $previewpath = $xerte_toolkits_site->users_file_area_full . $end_of_path . "/preview.xml"; $quota = filesize($xerte_toolkits_site->users_file_area_full . $end_of_path . "/data.xml") + filesize($xerte_toolkits_site->users_file_area_full . $end_of_path . "/preview.xml"); $d = opendir($dir_path); media_folder_loop($d); echo "

This project is currently using " . substr(($quota/1000000),0,4) . " MB

"; echo "

Import



Click on a file name and a link will appear below

"; echo "
"; /** * display the first string */ while($y=array_pop($result_string)){ echo $y; } //echo "
"; /** * display the list of files that are not in use so they can be deleted. */ //while($y=array_pop($delete_string)){ // echo "

Click to delete the unused file " . $y . "

"; //} //echo "
"; echo "
"; }else{ echo "

Sorry you do not have rights to this template

"; } } ?>