corrections mineures
This commit is contained in:
parent
d5b3af901a
commit
3c2f8d6824
@ -11,30 +11,4 @@ define( "INFO", 1);
|
||||
define( "ALERT", 2);
|
||||
define( "ERROR", 3);
|
||||
|
||||
// initialise le user si accès authentifié
|
||||
/*if ( isset( $_SERVER['PHP_AUTH_USER']) )
|
||||
{
|
||||
$user = $_SERVER['PHP_AUTH_USER'];
|
||||
}*/
|
||||
// création de l'objet base de donnée, mais pas ouverture de la base
|
||||
|
||||
//variables diverses
|
||||
//$admin = "Daniel";
|
||||
//$site = "Espace Tuina";
|
||||
//$dossier = "/espacetuina";
|
||||
//$basedir = dirname( $_SERVER['DOCUMENT_ROOT'] ) . $dossier;
|
||||
//$lang_basedir = $basedir . "/languages/";
|
||||
//$base_url = "https://librepc.homelinux.org" . $dossier;
|
||||
//$url_gestion = $base_url . "/gestion";
|
||||
//$url_admin = $base_url . "/outils";
|
||||
//$alias = "et";
|
||||
//$table_prefix = ""; //$alias . "_";
|
||||
//$lang_list[] = array();
|
||||
//$lang_dir = '';
|
||||
|
||||
//$_SESSION['basedir'] = $basedir;
|
||||
//$_SESSION['base_url'] = $base_url;
|
||||
|
||||
//set_include_path("./");
|
||||
|
||||
?>
|
||||
|
31
log.php
31
log.php
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
require_once( "entete_mail.php" );
|
||||
|
||||
// $level => INFO, ALERT, ERROR
|
||||
function log_write($log, $level=INFO)
|
||||
{
|
||||
global $webmaster, $headers;
|
||||
if ( $level == ALERT )
|
||||
{
|
||||
mail( $webmaster, "Connecteur nextcloud pour dolibarr: Alerte", $log_mail, $headers );
|
||||
}elseif ( $level == ERROR )
|
||||
{
|
||||
mail( $webmaster, "Connecteur nextcloud pour dolibarr: Erreur", $log_mail, $headers );
|
||||
}
|
||||
}
|
||||
|
||||
// $die = true -> execute die()
|
||||
function log_error($log, $die=true)
|
||||
{
|
||||
global $webmaster, $headers;
|
||||
echo "$log<br />" . EOL;
|
||||
log_write($log);
|
||||
$log_err = 'erreur dans la requête' . "<br/>" . "un rapport détaillé a été envoyé au webmaster";
|
||||
if ( $die )
|
||||
{
|
||||
echo "\n";
|
||||
die( $log_err );
|
||||
}
|
||||
}
|
||||
?>
|
@ -81,7 +81,7 @@ while ($user = $doldb->result->fetch_assoc())
|
||||
$oc_preferences_query_email = "INSERT INTO oc_preferences(userid, appid, configkey, configvalue) VALUES ('" . $user["login"] . "', 'settings', 'email', '" . $user["email"] . "')";
|
||||
echo $account_data . EOL . $oc_account_query . EOL . $oc_users_query .EOL . $oc_group_user_query . EOL . $oc_preferences_query_quota . EOL . $oc_preferences_query_email . EOL;
|
||||
|
||||
if (!$ncdb->query($oc_account_query))
|
||||
if ($ncdb->query($oc_account_query))
|
||||
{
|
||||
echo "Echec lors de la requete : (" . $ncdb->connect->errno . ") " . $ncdb->connect->error;
|
||||
}
|
||||
|
Reference in New Issue
Block a user