/gui/tools/filemanager/modules/admin/admin.inc.php
https://github.com/BenBE/ispCP · PHP · 189 lines · 29 code · 64 blank · 96 comment · 6 complexity · e325d7cb1863f51c29cc68ebbcb452b9 MD5 · raw file
- <?php
-
- // -------------------------------------------------------------------------------
- // | net2ftp: a web based FTP client |
- // | Copyright (c) 2003-2009 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;
-
- // -------------------------------------------------------------------------
- // Check Admin username and password
- // Redirect to the login_small page if needed
- // -------------------------------------------------------------------------
- checkAdminUsernamePassword();
-
- // -------------------------------------------------------------------------
- // Send XHTML header
- // -------------------------------------------------------------------------
- // header("Content-type: application/xhtml+xml; charset=" . __("iso-8859-1"));
-
- } // end net2ftp_sendHttpHeaders
-
- // ** **
- // ** **
- // **************************************************************************************
- // **************************************************************************************
-
-
-
-
-
- // **************************************************************************************
- // **************************************************************************************
- // ** **
- // ** **
-
- function net2ftp_module_printJavascript() {
-
- // --------------
- // This function prints Javascript code and includes
- // --------------
-
- // global $net2ftp_settings, $net2ftp_globals;
-
- // 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") . "&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;
-
- if (isset($_POST["input_admin_username"]) == true) { $input_admin_username = htmlEncode2(validateGenericInput($_POST["input_admin_username"])); }
- else { $input_admin_username = ""; }
- if (isset($_POST["input_admin_password"]) == true) { $input_admin_password = htmlEncode2(validateGenericInput($_POST["input_admin_password"])); }
- else { $input_admin_password = ""; }
-
- // -------------------------------------------------------------------------
- // Variables
- // -------------------------------------------------------------------------
-
- // Title
- $title = __("Admin functions");
-
- // Form name, back and forward buttons
- $formname = "AdminForm";
- $back_onclick = "document.forms['" . $formname . "'].state.value='login';document.forms['" . $formname . "'].submit();";
-
- // Current build number
- $application_build_nr = $net2ftp_settings["application_build_nr"];
-
- // Date from and to
- $today = date("Y-m-d");
- $oneweekago = date("Y-m-d", time() - 3600*24*7);
- $datefrom = $oneweekago;
- $dateto = $today;
-
- // -------------------------------------------------------------------------
- // Print the output
- // -------------------------------------------------------------------------
- require_once($net2ftp_globals["application_skinsdir"] . "/" . $net2ftp_globals["skin"] . "/manage.template.php");
-
- } // End net2ftp_printBody
-
- // ** **
- // ** **
- // **************************************************************************************
- // **************************************************************************************
-
- ?>