Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jappix/jappix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'server/download-chat.php')
-rw-r--r--server/download-chat.php54
1 files changed, 0 insertions, 54 deletions
diff --git a/server/download-chat.php b/server/download-chat.php
deleted file mode 100644
index 60b9cdf6..00000000
--- a/server/download-chat.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-
-/*
-
-Jappix - An open social platform
-This is the PHP script used to download a chat log
-
--------------------------------------------------
-
-License: AGPL
-Author: Valérian Saliou
-
-*/
-
-// PHP base
-define('JAPPIX_BASE', '..');
-
-// Get the needed files
-require_once('./functions.php');
-require_once('./read-main.php');
-require_once('./read-hosts.php');
-
-// Prepare application
-enableErrorSink();
-hideErrors();
-compressThis();
-
-// Not allowed for a special node
-if(isStatic() || isUpload()) {
- exit;
-}
-
-// Send the HTML file to be downloaded
-if(isset($_GET['id']) && !empty($_GET['id']) && isSafe($_GET['id'])) {
- // We define the variables
- $filename = $_GET['id'];
- $content_dir = '../tmp/archives/';
- $filepath = $content_dir.$filename.'.html';
-
- // We set special headers
- header("Content-disposition: attachment; filename=\"$filename.html\"");
- header("Content-Type: application/force-download");
- header("Content-Transfer-Encoding: text/html\n");
- header("Content-Length: ".filesize($filepath));
- header("Pragma: no-cache");
- header("Cache-Control: must-revalidate, post-check=0, pre-check=0, public");
- header("Expires: 0");
- readfile($filepath);
-
- // We delete the stored log file
- unlink($filepath);
-}
-
-?>