Skip to content
Snippets Groups Projects
Select Git revision
  • 948cc7c3a4f23a1312cc0454d7958c663a12bdba
  • master default protected
  • eole-amon-ecole-2.8
  • 24-badpathinpostinstall
4 results

postinstall_reseau.sh

Blame
  • doli_shell.php 1.39 KiB
    <?php
    /**
     * Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
     * Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
     *
     * 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 3 of the License, or
     * (at your option) any later version.
     *
     * This program is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     * GNU General Public License for more details.
     *
     * You should have received a copy of the GNU General Public License
     * along with this program. If not, see <https://www.gnu.org/licenses/>.
     */
    
    /**
     * \file scripts/user/sync_groups_dolibarr2ldap.php
     * \ingroup ldap core
     * \brief Script de mise a jour des groupes dans LDAP depuis base Dolibarr
     */
    
    if (!defined('NOSESSION')) {
    	define('NOSESSION', '1');
    }
    
    function dd($data) {
    	echo json_encode($data, JSON_PRETTY_PRINT);
    }
    
    function query($raw) {
    	global $db;
    	return $db->query($raw);
    }
    
    function fetch($raw) {
    	global $db;
    	$resql = query($raw);
    	if ($resql) {
    		return $db->fetch_object($resql);
    	}
    	return null;
    }
    
    $sapi_type = php_sapi_name();
    $script_file = basename(__FILE__);
    $path = __DIR__.'/';
    
    include "/var/www/dolibarr/htdocs/master.inc.php";