Project: CodeBase
Location: root /
File: project_download.php

uitklappen
<?php require_once ("includes/database.php"); require_once ("includes/project.php"); $project_id = (int) $_GET['project']; if ($act == "code" || $act == "screenshots" || $act == "documentation") { // valid } else { } $Project = new Project($project_id); if ($type == "zip") { // Create a ZIP-file require_once ("includes/archive/CreateZipFile.php"); $createZip = new CreateZip; $createZip->addDirectory ("./projects/". $Project->loc ."/". $act ); $filename = "source.zip"; $fh = fopen("./archives/". $filename, "wb"); $out = fwrite($fh, $createZip-> getZippedFile()); $createZip -> forceDownload("archives/". $fileName); @ unlink("./archives/". $fileName); } ?>
|