Ejemplo n.º 1
0
echo '<br>' . ($email = test_input($_POST['email']));
echo '<br> ancia' . ($tagsancia = test_input($_POST['tagsancia']));
echo '<br> lf' . ($tagslf = test_input($_POST['tagslf']));
echo '<br>' . ($note = test_input($_POST['notes']));
$nurturetags = $_POST['nurturetags'];
$app = new iSDK();
if ($app->cfgCon("connectionName")) {
    /*$contact = array(
        "Email" => $email,
        "ContactNotes" => $note
    );
    
       $CID = $app->addWithDupCheck($contact,'Email');
    
    */
    $CID = find_id_by_email($email, $app);
    $aData = array('ContactId' => $CID, 'ActionType' => 'Commentaires recruteur', 'ActionDescription' => 'Commentaires recruteur', 'CreationNotes' => $note);
    if ($note != "") {
        $note = $app->dsAdd("ContactAction", $aData);
    }
    $app->optIn($email, 'Opt in par API');
    $app->optStatus($email, 'Opt in par API');
    if ($CID > 0) {
        if ($tagsancia != "") {
            $app->grpAssign($CID, $tagsancia);
        }
        if ($tagslf != "") {
            $app->grpAssign($CID, $tagslf);
        }
        foreach ($nurturetags as $selectValue) {
            $app->grpAssign($CID, $selectValue);
Ejemplo n.º 2
0
}
if (isset($presi_dg)) {
    $array = explode(',', $presi_dg);
    //Extraire les éléments séprés par des virgule et les mettre dans un tableau
    $niveau = $niveau . $array[count($array) - 1] . ", ";
    //recuperer le dernier élément du tableau qui correspond au niveaux
}
//pour l'anglais
$array = explode(',', $anglais);
//Extraire les éléments séprés par des virgule et les mettre dans un tableau
$anglais_champs = $anglais_champs . $array[count($array) - 1] . ", ";
//recuperer le dernier élément du tableau qui correspond au niveaux
//echo "tous les niveaux".utf8_encode($niveau);
$app = new iSDK();
if ($app->cfgCon("connectionName")) {
    if (find_id_by_email($email, $app) != 0) {
        $exist = true;
        $contactLeadId = '';
    } else {
        $exist = false;
        $contactLeadId = 22;
    }
    if (is_uploaded_file($_FILES['fichiercv']['tmp_name'])) {
        $url = file_upload($filename, enlever_accents($nom), enlever_accents($prenom), $telephone1);
    }
    $contact = array("FirstName" => $nom, "LastName" => $prenom, "Email" => $email, "Phone1" => $telephone1, "Phone2" => $telephone2, "State" => $province, "StreetAddress1" => $adresse, "PostalCode" => $codepostal, "City" => $ville, "ContactNotes" => $commentaire, "Website" => $url, "ContactType" => 'ANCIA Candidat', "LeadSourceId" => $contactLeadId, "_Formation" => utf8_encode(remove_underscor($f)), "_Experienceprofessionnelle" => utf8_encode($tous_dpartement), "_Niveauhirarchique" => $niveau, "_Langue" => $anglais_champs);
    //$url_cv='http://emploi.lefebvrefortier.ca/'.file_upload($filename,$nom,$prenom,$telephone1);
    //$CID=ajoutContact($contact);
    //créer le tag pour postuler
    //check si c'est un nouveau candidat ou non
    //echo "le id". $CID = $app->addCon($contact);
Ejemplo n.º 3
0
<?php

/**
 * Created by JetBrains PhpStorm.
 * User: AlassaneOusmane
 * Date: 04/05/15
 * Time: 11:01
 * To change this template use File | Settings | File Templates.
 */
require_once "../bd/fonctions.php";
require_once "src/isdk.php";
$app = new iSDK();
$email = test_input($_POST['email']);
$id_poste = test_input($_POST['id-poste']);
if ($app->cfgCon("connectionName")) {
    $cid = find_id_by_email($email, $app);
    if (find_id_by_email($email, $app) != null || find_id_by_email($email, $app) != "") {
        //post id pour le test
        //$app->grpAssign($cid,1803);
        $app->grpAssign($cid, $id_poste);
        $app->grpRemove($cid, 1817);
        $app->grpAssign($cid, 1817);
        // echo utf8_decode("Merci d'avoir postulé, vous recevrez un courriel dans quelques instants");
        header('Location: ../adejapostule.php');
    } else {
        header('Location: ../index.php?post=' . $id_poste . '');
    }
} else {
    echo "erreur de connexion";
    exit;
}