示例#1
0
<?php

//#####  SMARTY STUFF #########
require_once $_SERVER['DOCUMENT_ROOT'] . '/../inc/config.inc.php';
require_once 'class.configsmarty.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/../API/fromEMT/emt/fromEmt.php';
print_r($_POST);
$smarty = new ConfigSmarty();
$smarty->assign('page', 'unsub');
$smarty->display('index.html');
示例#2
0
$list = $_REQUEST['list'];
$bhID = $_REQUEST['bhID'];
if ($list == "11761") {
    $entity = "Candidate";
} elseif ($list == "11762") {
    $entity = "ClientContact";
} else {
    $entity = NULL;
}
$findObj = new fromEmt();
$API_currentSession = $findObj->getSESSION();
$client = $API_currentSession->client;
$corporationId = $API_currentSession->corporationId;
$userId = $API_currentSession->userId;
if (empty($bhID)) {
    $dto = fromEmt::getUser($userEmail, $client, $corporationId, $userId, $entity);
} else {
    $dto = $bhID;
}
$findID = new SoapVar($dto, XSD_INTEGER, "int", "http://www.w3.org/2001/XMLSchema");
$find_request = array('session' => $API_currentSession, 'entityName' => $entity, 'id' => $findID);
$findResult = $findObj->getCLIENT()->find($find_request);
$result = $findResult->return->dto;
//extract info and populate the form
$user = array('entity' => $entity, 'list' => $list, 'firstname' => (string) $result->firstName, 'lastname' => (string) $result->lastName, 'email' => (string) $result->email, 'jobtitle' => (string) $result->occupation, 'city' => (string) $result->address->city, 'state' => (string) $result->address->state, 'zip' => (string) $result->address->zip, 'bullhornuserid' => (int) $result->userID);
$_SESSION['email'] = (string) $result->email;
// print_r($result);
$smarty = new ConfigSmarty();
$smarty->assign('user', $user);
$smarty->assign('page', 'form');
$smarty->display('index.html');
示例#3
0
    $SOAP_this_entity = new SoapVar($this_entity, SOAP_ENC_OBJECT, "candidateDto", "http://candidate.entity.bullhorn.com/");
    $request_array = array('session' => $API_currentSession, 'dto' => $SOAP_this_entity);
    $SOAP_request = new SoapVar($request_array, SOAP_ENC_OBJECT, "save", "http://save.apiservice.bullhorn.com/");
    $saveResult = $editObj->getCLIENT()->save($SOAP_request);
    $emtObj = new EMT($_POST['entity'], "update", $_POST['list']);
    if ($_SESSION['email'] != $_POST['email']) {
        $delete_url = $emtObj->baseUrl;
        $delete_url .= "subscribersaddresses_delete/";
        $delete_url .= $emtObj->username . "/";
        $delete_url .= $emtObj->pass;
        $data = array('email' => $_SESSION['email']);
        $emtObj->sendToEmt($delete_url, $data);
        //$eXML = simplexml_load_string($emt);
        //$smarty->assign('status',$eXML[status]);
    }
    $url = $emtObj->baseUrl;
    $url .= "subscribersaddresses_add/";
    $url .= $emtObj->username . "/";
    $url .= $emtObj->pass;
    if ($_POST['entity'] == "Candidate") {
        $postData = array('listID[]' => $emtObj->listID, 'email' => $_POST['email'], 'firstname' => $_POST['firstname'], 'lastname' => $_POST['lastname'], 'job_title' => $_POST['job_title'], 'city' => $_POST['city'], 'state' => $_POST['state'], 'zip' => $_POST['zip'], 'bullhornuserid' => $_POST['userid']);
    } elseif ($_POST['entity'] == "ClientContact") {
        $postData = array('listID[]' => $emtObj->listID, 'email' => $_POST['email'], 'firstname' => $_POST['firstname'], 'lastname' => $_POST['lastname'], 'city' => $_POST['city'], 'state' => $_POST['state'], 'zip' => $_POST['zip'], 'bullhornuserid' => $_POST['userid']);
    }
    $emtresponse = $emtObj->sendToEmt($url, $postData);
    $emtXML = simplexml_load_string($emtresponse);
    $smarty->assign('status', $emtXML[status]);
}
session_destroy();
$smarty->assign('page', 'thankyou');
$smarty->display('index.html');