Your IP : 216.73.217.64


Current Path : /home3/gp97/docs.sapat20172020.97gp.net/php/
Upload File :
Current File : //home3/gp97/docs.sapat20172020.97gp.net/php/common.php

<?php
/* *************************************************
 *
 * Document Manager (C) 2002-2010
 * Version 4 - dmanager MySQL
 * Benjamin Sonntag <benjamin@sonntag.fr>
 * Chantal Bernard-Putz <chantal@bernard-putz.net>
 * Franck Denis
 * This software is protected by copyright laws,
 * please read the file COPYRIGHT
 * This software is provided as is with no warranty.
 *
 ************************************************* */

/* $Id: common.php 45 2011-05-30 22:20:48Z benjamin $ */

$sMicro = microtime();
@session_start();

if (!defined("SEP")) {
  if (getenv("WINDIR")) {
    define("SEP","\\");
  } else {
    define("SEP","/");
  }
}

// Overrides GPC variables
if (get_magic_quotes_gpc())
{
	function stripslashes_deep($value)
	{
		$value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value);
		return $value;
	}

	$_POST = array_map('stripslashes_deep', $_POST);
	$_GET = array_map('stripslashes_deep', $_GET);
	$_COOKIE = array_map('stripslashes_deep', $_COOKIE);
	$_FILES = array_map('stripslashes_deep', $_FILES);
}

if (!file_exists("dbconfig.php")) {
	include("install.php");
	exit();
}

require_once("error_handler.php");
require_once("functions.php");
require_once("dbconfig.php");
require_once("m_docmanager.php");

// Goes to UTF-8 encoding : 
mysql_query("SET NAMES UTF-8;");

$doc = new docmanager();
$doc->getConfig();
$pngPath = "styles/" . substr($doc->config["conf_style"], 0, strrpos($doc->config["conf_style"], ".css")) . "/";

// we can put it in a cron php so that it will not take too much
// resources on busy document managers
// $doc->cleancomment();

require_once("lang.php");

if (empty($_SESSION["Sconnected"]) && empty($nocheck))
{
	$_SESSION = array();
	session_write_close();
	header ("Location: login.php");
	exit();
}

if (!empty($admin) && empty($_SESSION["Suser_admin"]))
{
	echo "<span style=\"color: red;\">" . _l("This page is restricted to administrators.") . "</span>";
	exit();
}


$available_mailcondition = array (
	0  => "Never",
	1  => "When a file is uploaded (every time)",
	2  => "The user choose it, and the default is Yes",
	3  => "The user choose it, and the default is No",
);

$available_sendrecipient = array (
	0  => "The administrator",
	1  => "All the users (whose 'mail' field has been filled)",
);

$yesno = array (
	0  => "No",
	1  => "Yes",
);

?>