コード例 #1
0
function processPost()
{
    connectToDatabase();
    $id = createInitialTask();
    $xml = generateXml($id);
    addRequestXml($id, $xml);
    $response = postXml($xml);
    addResponse($id, $response);
}
コード例 #2
0
ファイル: addResponse.php プロジェクト: danielpaul69/cgates
<?php

include '../bdd/bdd_connexion.php';
include "../bdd/functions.php";
if (isset($_POST['response'])) {
    if (isset($_POST['idQuestion']) && isset($_POST['idMarketteur']) && isset($_POST['idContact']) && $_POST['response'] != '') {
        //Si tableau de valeur (checkbox) alors concat
        is_array($_POST['response']) ? $reponse = implode('|', $_POST['response']) : ($reponse = $_POST['response']);
        // si reponse deja en base alors passage de l'ID reponse a mettre a jour sinon ID vide
        isset($_POST['UpdateRequete']) ? $IDReponse = $_POST['UpdateRequete'] : ($IDReponse = "");
        $retour = addResponse($bdd, $_POST['idQuestion'], $_POST['idMarketteur'], $_POST['idContact'], $reponse, $IDReponse);
        if (isset($_POST['aRepondu'])) {
            $retour = addContactRepondu($bdd, $_POST['idContact']);
        }
        echo $retour;
    } else {
        echo -1;
    }
} else {
    echo -1;
}