NEW #0002205 Mode maintenance
This commit is contained in:
parent
69bbda205c
commit
3ea69c3113
17 changed files with 55 additions and 7 deletions
5
block.html-example
Normal file
5
block.html-example
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<h1> Nous sommes en maintenance </h1>
|
||||||
|
<p>
|
||||||
|
Le site est actuellement en maintenance.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
@ -31,6 +31,7 @@ if (file_exists("../include/config.inc.php") ) {
|
||||||
define ('ALLOWED',1);
|
define ('ALLOWED',1);
|
||||||
define ('ALLOWED_ADMIN',1);
|
define ('ALLOWED_ADMIN',1);
|
||||||
require_once '../include/constant.php';
|
require_once '../include/constant.php';
|
||||||
|
require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
|
||||||
|
|
||||||
\Noalyss\Dbg::echo_file(__FILE__);
|
\Noalyss\Dbg::echo_file(__FILE__);
|
||||||
if ( DEBUGNOALYSS > 1 ) {
|
if ( DEBUGNOALYSS > 1 ) {
|
||||||
|
|
@ -41,6 +42,8 @@ if (file_exists("../include/config.inc.php") ) {
|
||||||
\Noalyss\Dbg::display_request();
|
\Noalyss\Dbg::display_request();
|
||||||
\Noalyss\Dbg::display_global();
|
\Noalyss\Dbg::display_global();
|
||||||
} //<--- if DEBUG
|
} //<--- if DEBUG
|
||||||
|
|
||||||
|
MaintenanceMode("block.html");
|
||||||
require_once NOALYSS_INCLUDE.'/admin_repo.inc.php';
|
require_once NOALYSS_INCLUDE.'/admin_repo.inc.php';
|
||||||
} else {
|
} else {
|
||||||
// Redirect to install file , if this file exists then
|
// Redirect to install file , if this file exists then
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,13 @@
|
||||||
*/
|
*/
|
||||||
if ( ! defined ('ALLOWED') ) define ('ALLOWED',1);
|
if ( ! defined ('ALLOWED') ) define ('ALLOWED',1);
|
||||||
require_once '../include/constant.php';
|
require_once '../include/constant.php';
|
||||||
|
require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/icon_action.class.php';
|
require_once NOALYSS_INCLUDE.'/lib/icon_action.class.php';
|
||||||
require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/extension.class.php';
|
require_once NOALYSS_INCLUDE.'/class/extension.class.php';
|
||||||
if ( !isset ($_REQUEST['gDossier'])) exit();
|
if ( !isset ($_REQUEST['gDossier'])) exit();
|
||||||
|
MaintenanceMode("block.html");
|
||||||
require_once NOALYSS_INCLUDE.'/class/noalyss_parameter_folder.class.php';
|
require_once NOALYSS_INCLUDE.'/class/noalyss_parameter_folder.class.php';
|
||||||
mb_internal_encoding("UTF-8");
|
mb_internal_encoding("UTF-8");
|
||||||
/**
|
/**
|
||||||
|
|
@ -29,6 +30,7 @@ if ( ! isset($_SESSION[SESSION_KEY."g_user"])) {
|
||||||
echo "NOCONX";
|
echo "NOCONX";
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
global $g_user,$cn,$g_parameter;
|
global $g_user,$cn,$g_parameter;
|
||||||
$cn=Dossier::connect();
|
$cn=Dossier::connect();
|
||||||
$g_parameter=new Noalyss_Parameter_Folder($cn);
|
$g_parameter=new Noalyss_Parameter_Folder($cn);
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,9 @@ require_once NOALYSS_INCLUDE.'/class/dossier.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/acc_tva.class.php';
|
require_once NOALYSS_INCLUDE.'/class/acc_tva.class.php';
|
||||||
require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
||||||
|
|
||||||
|
require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
|
||||||
|
MaintenanceMode("block.html");
|
||||||
|
|
||||||
// Check if the needed field does exist
|
// Check if the needed field does exist
|
||||||
extract ($_GET, EXTR_SKIP );
|
extract ($_GET, EXTR_SKIP );
|
||||||
foreach (array('t','c','p','q','n','gDossier') as $a)
|
foreach (array('t','c','p','q','n','gDossier') as $a)
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,8 @@
|
||||||
require_once '../include/constant.php';
|
require_once '../include/constant.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
||||||
require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
||||||
|
require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
|
||||||
|
MaintenanceMode("block.html");
|
||||||
|
|
||||||
$cn=Dossier::connect();
|
$cn=Dossier::connect();
|
||||||
global $g_user;
|
global $g_user;
|
||||||
|
|
|
||||||
|
|
@ -23,13 +23,15 @@ define('ALLOWED',1);
|
||||||
* \brief Main file
|
* \brief Main file
|
||||||
*/
|
*/
|
||||||
require_once '../include/constant.php';
|
require_once '../include/constant.php';
|
||||||
|
require_once NOALYSS_INCLUDE.'/constant.security.php';
|
||||||
|
require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
|
||||||
|
|
||||||
|
MaintenanceMode("block.html");
|
||||||
|
|
||||||
require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/dossier.class.php';
|
require_once NOALYSS_INCLUDE.'/class/dossier.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/user_common.php';
|
require_once NOALYSS_INCLUDE.'/lib/user_common.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
|
|
||||||
require_once NOALYSS_INCLUDE.'/lib/function_javascript.php';
|
require_once NOALYSS_INCLUDE.'/lib/function_javascript.php';
|
||||||
require_once NOALYSS_INCLUDE.'/constant.security.php';
|
|
||||||
require_once NOALYSS_INCLUDE.'/lib/html_input.class.php';
|
require_once NOALYSS_INCLUDE.'/lib/html_input.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
|
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/icon_action.class.php';
|
require_once NOALYSS_INCLUDE.'/lib/icon_action.class.php';
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,9 @@
|
||||||
*/
|
*/
|
||||||
define ('ALLOWED',1);
|
define ('ALLOWED',1);
|
||||||
require_once '../include/constant.php';
|
require_once '../include/constant.php';
|
||||||
|
require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
|
||||||
|
MaintenanceMode("block.html");
|
||||||
|
|
||||||
global $g_user,$cn,$g_parameter;
|
global $g_user,$cn,$g_parameter;
|
||||||
require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
||||||
require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,8 @@ require_once NOALYSS_INCLUDE.'/lib/html_input.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/iselect.class.php';
|
require_once NOALYSS_INCLUDE.'/lib/iselect.class.php';
|
||||||
require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
||||||
|
|
||||||
|
MaintenanceMode("block.html");
|
||||||
|
|
||||||
global $g_user,$cn,$g_parameter;
|
global $g_user,$cn,$g_parameter;
|
||||||
$http=new HttpInput();
|
$http=new HttpInput();
|
||||||
$cn=Dossier::connect();
|
$cn=Dossier::connect();
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,8 @@
|
||||||
*\note if the j is -1 then all the card are shown
|
*\note if the j is -1 then all the card are shown
|
||||||
*/
|
*/
|
||||||
require_once '../include/constant.php';
|
require_once '../include/constant.php';
|
||||||
|
require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
|
||||||
|
MaintenanceMode("block.html");
|
||||||
/**
|
/**
|
||||||
* if not connected, session is expired then exit with a message NOCONX
|
* if not connected, session is expired then exit with a message NOCONX
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,9 @@ require_once '../include/constant.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
|
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/dossier.class.php';
|
require_once NOALYSS_INCLUDE.'/class/dossier.class.php';
|
||||||
|
require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
|
||||||
|
MaintenanceMode("block.html");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* if not connected, session is expired then exit with a message NOCONX
|
* if not connected, session is expired then exit with a message NOCONX
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,8 @@ $my_domain="";
|
||||||
require_once '../include/constant.php';
|
require_once '../include/constant.php';
|
||||||
require_once '../include/config.inc.php';
|
require_once '../include/config.inc.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
|
require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
|
||||||
|
MaintenanceMode("block.html");
|
||||||
|
|
||||||
if ( file_exists("install.php")&& DEBUGNOALYSS == 0 )
|
if ( file_exists("install.php")&& DEBUGNOALYSS == 0 )
|
||||||
{
|
{
|
||||||
// At the end of the installation procedure , the install file must be removed
|
// At the end of the installation procedure , the install file must be removed
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@
|
||||||
// Copyright Author Dany De Bontridder danydb@aevalys.eu
|
// Copyright Author Dany De Bontridder danydb@aevalys.eu
|
||||||
require_once '../include/constant.php';
|
require_once '../include/constant.php';
|
||||||
|
|
||||||
include_once NOALYSS_INCLUDE.'/lib/ac_common.php';
|
require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
|
||||||
|
MaintenanceMode("block.html");
|
||||||
|
|
||||||
/*! \file
|
/*! \file
|
||||||
* \brief Login page
|
* \brief Login page
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once '../include/constant.php';
|
require_once '../include/constant.php';
|
||||||
|
require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
|
||||||
|
MaintenanceMode("block.html");
|
||||||
|
|
||||||
global $g_user;
|
global $g_user;
|
||||||
|
|
||||||
$cn=new Database();
|
$cn=new Database();
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@ require_once NOALYSS_INCLUDE.'/class/acc_ledger.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/acc_ledger_search.class.php';
|
require_once NOALYSS_INCLUDE.'/class/acc_ledger_search.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/icon_action.class.php';
|
require_once NOALYSS_INCLUDE.'/lib/icon_action.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
|
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
|
||||||
|
MaintenanceMode("block.html");
|
||||||
|
|
||||||
if ( ! isset ($_SESSION[SESSION_KEY.'g_theme']))
|
if ( ! isset ($_SESSION[SESSION_KEY.'g_theme']))
|
||||||
{
|
{
|
||||||
echo "<h2>"._('Vous êtes déconnecté')."</h2>";
|
echo "<h2>"._('Vous êtes déconnecté')."</h2>";
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,8 @@ require_once NOALYSS_INCLUDE.'/lib/function_javascript.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/icon_action.class.php';
|
require_once NOALYSS_INCLUDE.'/lib/icon_action.class.php';
|
||||||
|
|
||||||
@html_page_start($_SESSION[SESSION_KEY.'g_theme']);
|
@html_page_start($_SESSION[SESSION_KEY.'g_theme']);
|
||||||
|
MaintenanceMode("block.html");
|
||||||
|
|
||||||
$rep=new Database();
|
$rep=new Database();
|
||||||
require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
||||||
$User=new Noalyss_user($rep);
|
$User=new Noalyss_user($rep);
|
||||||
|
|
|
||||||
|
|
@ -1686,3 +1686,15 @@ function linkTo($p_url)
|
||||||
return $p_url;
|
return $p_url;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @brief When you want to prevent users to connect, create a file in noalyss/ (NOALYSS_BASE) with the
|
||||||
|
* message in Html
|
||||||
|
* @param string $p_file file in NOALYSS_BASE
|
||||||
|
*/
|
||||||
|
function MaintenanceMode($p_file)
|
||||||
|
{
|
||||||
|
if ( file_exists(NOALYSS_BASE."/".$p_file )) {
|
||||||
|
include NOALYSS_BASE."/".$p_file;
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
* Global variables
|
* Global variables
|
||||||
*/
|
*/
|
||||||
global $g_connection,$g_parameter,$g_user;
|
global $g_connection,$g_parameter,$g_user;
|
||||||
if (!defined("DOSSIER"))define ("DOSSIER",25);
|
if (!defined("DOSSIER"))define ("DOSSIER",101);
|
||||||
|
|
||||||
$_REQUEST['gDossier'] = DOSSIER;
|
$_REQUEST['gDossier'] = DOSSIER;
|
||||||
$g_connection=new Database(DOSSIER);
|
$g_connection=new Database(DOSSIER);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue