Panel/modules/ftp/modules/logout/logout.inc.php
2025-09-11 13:29:15 -04:00

174 lines
No EOL
7.5 KiB
PHP

<?php
// -------------------------------------------------------------------------------
// | net2ftp: a web based FTP client |
// | Copyright (c) 2003-2013 by David Gartner |
// | |
// | This program is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU General Public License |
// | as published by the Free Software Foundation; either version 2 |
// | of the License, or (at your option) any later version. |
// | |
// -------------------------------------------------------------------------------
// **************************************************************************************
// **************************************************************************************
// ** **
// ** **
function net2ftp_module_sendHttpHeaders() {
// --------------
// This function sends HTTP headers
// --------------
// global $net2ftp_settings, $net2ftp_globals, $net2ftp_messages, $net2ftp_result;
} // end net2ftp_sendHttpHeaders
// ** **
// ** **
// **************************************************************************************
// **************************************************************************************
// **************************************************************************************
// **************************************************************************************
// ** **
// ** **
function net2ftp_module_printJavascript() {
// --------------
// This function prints Javascript code and includes
// --------------
// global $net2ftp_settings, $net2ftp_globals, $net2ftp_messages, $net2ftp_result;
// Code
// echo "<script type=\"text/javascript\"><!--\n";
// echo "//--></script>\n";
// Include
// echo "<script type=\"text/javascript\" src=\"". $net2ftp_globals["application_rootdir_url"] . "/modules/login/login.js\"></script>\n";
} // end net2ftp_printJavascript
// ** **
// ** **
// **************************************************************************************
// **************************************************************************************
// **************************************************************************************
// **************************************************************************************
// ** **
// ** **
function net2ftp_module_printCss() {
// --------------
// This function prints CSS code and includes
// --------------
global $net2ftp_settings, $net2ftp_globals;
// Include
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"". $net2ftp_globals["application_rootdir_url"] . "/skins/" . $net2ftp_globals["skin"] . "/css/main.css.php?ltr=" . __("ltr") . "&amp;image_url=" . urlEncode2($net2ftp_globals["image_url"]) . "\" />\n";
} // end net2ftp_printCssInclude
// ** **
// ** **
// **************************************************************************************
// **************************************************************************************
// **************************************************************************************
// **************************************************************************************
// ** **
// ** **
function net2ftp_module_printBodyOnload() {
// --------------
// This function prints the <body onload="" actions
// --------------
// global $net2ftp_settings, $net2ftp_globals, $net2ftp_messages, $net2ftp_result;
// echo "";
} // end net2ftp_printBodyOnload
// ** **
// ** **
// **************************************************************************************
// **************************************************************************************
// **************************************************************************************
// **************************************************************************************
// ** **
// ** **
function net2ftp_module_printBody() {
// --------------
// This function prints the login screen
// --------------
// -------------------------------------------------------------------------
// Global variables
// -------------------------------------------------------------------------
global $net2ftp_settings, $net2ftp_globals, $net2ftp_messages, $net2ftp_result;
// -------------------------------------------------------------------------
// Variables
// -------------------------------------------------------------------------
$url = $net2ftp_globals["action_url"];
// -------------------------------------------------------------------------
// Delete all temporary files in the /temp folder which are older than 10 minutes
// -------------------------------------------------------------------------
$max_age_seconds = 600; // default: 10 minutes
if ($handle = @opendir($net2ftp_globals["application_tempdir"])) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && $file != ".htaccess" && $file != ".htpasswd" && $file != "chmod_this_dir_to_777.txt" && $file != "index.php") {
$dirfile = glueDirectories($net2ftp_globals["application_tempdir"], $file);
$age_in_seconds = time() - @filemtime($dirfile);
if ($age_in_seconds > $max_age_seconds) { @unlink($dirfile); }
}
}
closedir($handle);
}
// -------------------------------------------------------------------------
// Print the output
// -------------------------------------------------------------------------
require_once($net2ftp_globals["application_skinsdir"] . "/" . $net2ftp_globals["skin"] . "/logout.template.php");
} // End net2ftp_printBody
// ** **
// ** **
// **************************************************************************************
// **************************************************************************************
?>