function suivi_colis($suivi) { $url = 'http://www.tnt.fr/service/tracking?wsdl'; $username = ''; $password = ''; $authheader = sprintf(' <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken> <wsse:Username>%s</wsse:Username> <wsse:Password>%s</wsse:Password> </wsse:UsernameToken> </wsse:Security>', htmlspecialchars($username), htmlspecialchars($password)); $authvars = new SoapVar($authheader, XSD_ANYXML); $header = new SoapHeader('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', 'Security', $authvars); $soap = new SoapClient($url, array('trace' => 1)); $soap->__setSOAPHeaders(array($header)); try { $result = $soap->trackingByConsignment(array('parcelNumber' => $suivi)); $etape = getStage($result); if (is_array($result->Parcel->longStatus)) { $statut = $result->Parcel->longStatus[0]; $message = $result->Parcel->longStatus[1]; } else { $statut = $result->Parcel->longStatus; $message = ''; } $result = 'tntB2CSuiviColisDisplayDetail(["' . $result->Parcel->consignmentNumber . '","' . $result->Parcel->reference . '","' . $result->Parcel->receiver->city . '","","",["' . $statut . '","' . $message . '"],[],"' . $etape . '"])'; } catch (Exception $e) { $result = $e->getMessage(); } return $result; }
session_start(); require 'controller/bookingControl.php'; require 'controller/define.php'; $login = false; if (isset($_COOKIE['user']) || isset($_SESSION['user'])) { if (!isset($_SESSION['user'])) { $_SESSION['user'] = $_COOKIE['user']; } $login = true; $shift = getAllShift(); $purpose = getAllPurposes(); $serv = getAllServices(); $addiFood = getAllAdditionalFood(); $addiFoodFull = getAllFullFood(); $stage = getStage(); $gate = getGate(); $book = checkSameDate(); $setMenu = getSetMenu(); $booked = implode(",", $book); } ?> <!DOCTYPE HTML> <html> <head> <?php require_once 'includes/head.php'; ?> <link href="<?php echo SERVER; ?>
/** * 指定されたステージなのかどうかをチェックする * @param $argStage string local dev test stage release */ function checkStage($argStage, $argHost = NULL) { if ($argStage === getStage($argHost)) { return TRUE; } return FALSE; }
function updateEvento($con, $request) { // echo $request["IdComercial"][1]; //$nueva=json_encode($request["IdComercial"]); $idComercial = $request->IdComercial[0]->Id; $idTipoEvento = $request->EventoTipo[0]->Id; //echo "TIPOEV".$idTipoEvento; $update = "UPDATE`Eventos` set codigo='" . $request->Codigo . "' , TotalBudget='" . $request->TotalBudget . "',FechaActualizacion='" . getFechaHoy() . "' ,idUsuarioComercial='" . $idComercial . "' ,FechaDesde='" . getFormatedDate($request->FechaDesde) . "' ,FechaPresentacion='" . getFormatedDate($request->FechaPresentacion) . "',FechasAlt ='" . getEsFechaAlt($request) . "',Pax='" . $request->Pax . "' ,Comentarios='" . $request->Comentario . "',Presupuesto='" . $request->Presupuesto . "',IdTipoEvento='" . $idTipoEvento . "' ,nombre='" . $request->Nombre . "', FechaHasta ='" . getFormatedDate($request->FechaHasta) . "' ,IdActualizadoPor='" . $_SESSION['idUser'] . "',IdUsuarioProductor='" . getProductor($request) . "',IdStage='" . getStage($request) . "' where id='" . $request->Id . "'"; if (!mysqli_query($con, $update)) { printf("Errormessage: %s\n", mysql_error()); } else { addNotifiacion($con, "Edicion", $request->Id, $_SESSION['idUser'], 1, 1); addNotifiacion($con, "Edicion", $request->Id, $_SESSION['idUser'], 2, 1); } //echo "ENTRO".$update; }