2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Merging the Limesurvey 1.91+ branch of queXS in to the trunk

This commit is contained in:
azammitdcarf
2011-09-08 01:58:41 +00:00
parent dfa55a3b9e
commit eaa9578ab8
2312 changed files with 811461 additions and 597534 deletions

View File

@@ -1,74 +1,74 @@
<?php
/*
* LimeSurvey
* Copyright (C) 2007 The LimeSurvey Project Team / Carsten Schmitz
* All rights reserved.
* License: GNU/GPL License v2 or later, see LICENSE.php
* LimeSurvey is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*
* $Id: export_resources_zip.php 6853 2009-05-15 12:51:09Z c_schmitz $
*/
* LimeSurvey
* Copyright (C) 2007 The LimeSurvey Project Team / Carsten Schmitz
* All rights reserved.
* License: GNU/GPL License v2 or later, see LICENSE.php
* LimeSurvey is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*
* $Id: export_resources_zip.php 10925 2011-09-02 14:12:02Z c_schmitz $
*/
include_once("login_check.php");
if (!isset($surveyid))
{
returnglobal('sid');
returnglobal('sid');
}
if (!isset($lid))
{
returnglobal('lid');
returnglobal('lid');
}
if ($action == "exportsurvresources" && $surveyid) {
require("classes/phpzip/phpzip.inc.php");
$z = new PHPZip();
$resourcesdir="$publicdir/upload/surveys/$surveyid/";
$zipfile="$tempdir/resources-survey-$surveyid.zip";
$z -> Zip($resourcesdir, $zipfile);
if (is_file($zipfile)) {
//Send the file for download!
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
require("classes/phpzip/phpzip.inc.php");
$z = new PHPZip();
$resourcesdir=$uploaddir. "/surveys/$surveyid/";
$zipfile="$tempdir/resources-survey-$surveyid.zip";
$z -> Zip($resourcesdir, $zipfile);
if (is_file($zipfile)) {
//Send the file for download!
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header( "Content-Disposition: attachment; filename=resources-survey-$surveyid.zip" );
header( "Content-Description: File Transfer");
@readfile($zipfile);
header("Content-Type: application/force-download");
header( "Content-Disposition: attachment; filename=resources-survey-$surveyid.zip" );
header( "Content-Description: File Transfer");
@readfile($zipfile);
//Delete the temporary file
unlink($zipfile);
//Delete the temporary file
unlink($zipfile);
}
}
}
if ($action == "exportlabelresources" && $lid) {
require("classes/phpzip/phpzip.inc.php");
$z = new PHPZip();
$resourcesdir="$publicdir/upload/labels/$lid/";
$zipfile="$tempdir/resources-labelset-$lid.zip";
$z -> Zip($resourcesdir, $zipfile);
if (is_file($zipfile)) {
//Send the file for download!
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
require("classes/phpzip/phpzip.inc.php");
$z = new PHPZip();
$resourcesdir=$uploaddir. "/upload/labels/$lid/";
$zipfile="$tempdir/resources-labelset-$lid.zip";
$z -> Zip($resourcesdir, $zipfile);
if (is_file($zipfile)) {
//Send the file for download!
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header( "Content-Disposition: attachment; filename=resources-label-$lid.zip" );
header( "Content-Description: File Transfer");
@readfile($zipfile);
header("Content-Type: application/force-download");
header( "Content-Disposition: attachment; filename=resources-label-$lid.zip" );
header( "Content-Description: File Transfer");
@readfile($zipfile);
//Delete the temporary file
unlink($zipfile);
//Delete the temporary file
unlink($zipfile);
}
}
}