<?php

/**
 *
 * Core to manage contact form and send it to SAV
 * USE ONLY ON MOBILE
 * @author flabadens
 * @version 1.0
 * @see Conctact.functions.php
 * @todo delete accent in $message and $sujet
 * 
 *
 */

if ($versionmobile){
    include_once("../config.php3");
    $RACINE_DIR="../";
    $CORE = "CORE/";
}
else {
    include_once("config.php3");
    $RACINE_DIR="";
}

include_once $RACINE_DIR.$MOBILE_DIR."configMobile.php3";
include_once 'Contact.functions.php';
include_once($RACINE_DIR.$BIB_DIR_FROM_RACINE."bib_db.php3");
include_once($RACINE_DIR.$BIB_DIR_FROM_RACINE."bib_generic.php3");
include_once($RACINE_DIR.$BIB_DIR_FROM_RACINE."bib_check_members.php3");
include_once($RACINE_DIR.$BIB_DIR_FROM_RACINE."LOC_bib_check_members_vip.php3");


// on récupère les informations de la session
$sess = open_page($sessid);

if ($sess->memberid != -1)
{
    $member = getmember($sess->memberid);
    $player = getplayer($sess->memberid);
    //debug($sujet_id);

    echo sendmail($member['Email'],$message,  formatStringUTF($SUJET[$sujet_id]), $sessid);

}
else
{
    echo 'ErrorSESSID';
    exit();
}


?>
