示例#1
1
$Crtime = $_REQUEST["Crtime"];
$Chdate = $_REQUEST["Chdate"];
$Chtime = $_REQUEST["Chtime"];
$Lockflag = $_REQUEST["Lockflag"];
$Internal = $_REQUEST["Internal"];
$Maillist = $_REQUEST["Maillist"];
$Maxday = $_REQUEST["Maxday"];
$Maxorder = $_REQUEST["Maxorder"];
try {
    $Bapi = new Bapi();
    $BapiImport = new BapiImport();
    $Receive = new Receive();
    $ResponseExport = new ResponseExport();
    if ($action == 'RESETPW') {
        $Bapi->bapiCall($bapiname['change_password']);
        $BapiImport->setImport('TOKEN', $_SESSION['TOKEN']);
        $BapiImport->setImport('ACTION', $action);
        $BapiImport->setImport('GUID', trim($Guid));
        $Receive->getResult();
    } else {
        $ICUSTOMER = array("MANDT" => $Mandt, "GUID" => $Guid, "STATUS" => $Status, "TITLE" => $Title, "FIRSTNAME" => $Firstname, "LASTNAME" => $Lastname, "KUNNR" => $Kunnr, "PARVW" => $Parvw, "JOBTITLE" => $Jobtitle, "TEL_NUMBER" => $TelNumber, "TEL_EXTENS" => $TelExtens, "CELLPHONE" => $Cellphone, "FAX_NUMBER" => $FaxNumber, "EMAIL" => $Email, "COMPANYNAME" => $Companyname, "STREET" => $Street, "CITY" => $City, "STATE" => $State, "POSTALCODE" => $Postalcode, "COUNTRY" => $Country, "REGION" => $Region, "COMPANYURL" => $Companyurl, "COMPANYTYPE" => $Companytype, "CUSTOMERTYPE" => $Customertype, "STORES" => $Stores, "NEWSTORES" => $Newstores, "FOCUS" => $Focus, "INTERESTPRODUCT" => $Interestproduct, "INSTALLSERVICE" => $Installservice, "HOWLEARN" => $Howlearn, "LOGONID" => $Logonid, "INITPASSWORD" => $Initpassword, "EXPIRYDATE" => $Expirydate, "ERNAM" => $Ernam, "CRDATE" => $Crdate, "CRTIME" => $Crtime, "CHDATE" => $Chdate, "CHTIME" => $Chtime, "LOCKFLAG" => $Lockflag, "INTERNAL" => $Internal, "MAILLIST" => $Maillist, "MAXDAY" => $Maxday, "MAXORDER" => $Maxorder);
        $Bapi->bapiCall($bapiname['registration_approval']);
        $BapiImport->setImport('TOKEN', $_SESSION['TOKEN']);
        $BapiImport->setImport('ACTION', $action);
        $BapiImport->setImport('IGUID', $Guid);
        $BapiImport->setImport('ICUSTOMER', $ICUSTOMER);
        $Receive->getResult();
    }
    $rp = $ResponseExport->export('RETURN');
} catch (Exception $e) {
    echo $msg = 'Message:- ' . $e->getMessage();
<?php

session_start();
if (!isset($_SESSION['TOKEN'])) {
    header('location:../index.php');
    exit;
}
include 'wsdls.php';
include 'Bapi.php';
ini_set("default_socket_timeout", 400);
$Iguid = $_REQUEST['Iguid'];
try {
    $Bapi = new Bapi();
    $Bapi->bapiCall($bapiname['registration_approval']);
    $BapiImport = new BapiImport();
    $BapiImport->setImport('TOKEN', $_SESSION['TOKEN']);
    $BapiImport->setImport('IGUID', $Iguid);
    $BapiImport->setImport('ACTION', 'READ');
    $Receive = new Receive();
    $Receive->getResult();
    $ResponseExport = new ResponseExport();
    $rp = $ResponseExport->export('OCUSTOMER');
    foreach ($rp as $keys => $val) {
        $rp[$keys] = mb_convert_encoding($val, "EUC-JP", "auto");
    }
} catch (Exception $e) {
    echo $msg = 'Message:- ' . $e->getMessage();
    exit;
}
//var_dump($rp);
//exit;
示例#3
1
<?php

session_start();
include 'wsdls.php';
include 'Bapi.php';
$Email = $_POST['email'];
$Password = $_POST['password'];
try {
    $Bapi = new Bapi();
    $Bapi->bapiCall($bapiname['logon']);
    $BapiImport = new BapiImport();
    $BapiImport->setImport('EMAIL', $Email);
    $BapiImport->setImport('PASSWORD', $Password);
    $BapiImport->setImport('ACTION', 'LOGON');
    $Receive = new Receive();
    $Receive->getResult();
    $ResponseExport = new ResponseExport();
    $result = $ResponseExport->export('RETURN');
    //$result=$response_export->Return;
} catch (Exception $e) {
    echo $msg = 'Message:- ' . $e->getMessage();
    exit;
}
$_SESSION['PARVW'] = $ResponseExport->export('PARVW');
if ($result['TYPE'] == 'S') {
    $token = $ResponseExport->export('TOKEN');
    $_SESSION['TOKEN'] = $token;
    $_SESSION['KUNNR'] = $ResponseExport->export('KUNNR');
    $_SESSION['screenwidth'] = $_POST['screenwidth'];
    if ($_SESSION['PARVW'] == 'AD') {
        echo "registration";
示例#4
0
$part = strtoupper($part);
/*
	Input validations must be done here as follows:

	$response = array(
		"success" => false,
		"error"   => "Error message"
	);
*/
$response = array();
if (empty($response)) {
    try {
        $bapi = new Bapi();
        $bapi->bapiCall($bapiname['query']);
        $bapiImport = new BapiImport();
        $bapiImport->setImport('TOKEN', $_SESSION['TOKEN']);
        $bapiImport->setImport('MATNR', $part);
        $bapiImport->setImport('ORT01', $city);
        $bapiImport->setImport('REGIO', $state);
        $bapiImport->setImport('PSTLZ', $zip);
        $bapiImport->setImport('DATE', $date);
        $bapiImport->setImport('STORE', $store);
        $receive = new Receive();
        $receive->getResult();
        $responseTable = new ResponseTable();
        $results = $responseTable->getTable('TLIST');
        $response = array("success" => true, "data" => $results);
    } catch (Exception $e) {
        $response = array("success" => false, "error" => $e->getMessage());
    }
}
示例#5
0
<?php

session_start();
if (!isset($_SESSION['TOKEN'])) {
    header('location:../index.php');
    exit;
}
include 'wsdls.php';
include 'Bapi.php';
try {
    $Bapi = new Bapi();
    $Bapi->bapiCall($bapiname['registration_list']);
    $BapiImport = new BapiImport();
    $BapiImport->setImport('TOKEN', $_SESSION['TOKEN']);
    $BapiImport->setImport('ACTION', 'SORT');
    $Receive = new Receive();
    $Receive->getResult();
    $ResponseTable = new ResponseTable();
    $rp = $ResponseTable->getTable('TREGLIST');
} catch (Exception $e) {
    $msg = 'Message:- ' . $e->getMessage();
    header('location:../html/registrationlist.php?error=' . $msg);
    exit;
}
//var_export($r);
//exit;
$table_as = $rp;
$_SESSION['table_reg_list'] = $table_as;
$Bapi->bapiCall($bapiname['dropdown']);
$Receive = new Receive();
$Receive->getResult();
示例#6
0
if (!isset($_SESSION['TOKEN'])) {
    header('location:../index.php');
    exit;
}
include 'wsdls.php';
include 'Bapi.php';
$cust_id = $_REQUEST['id'];
$data = file_get_contents('../data/stockreport.json');
$json = json_decode($data, true);
if (isset($json[$cust_id])) {
    $jsondata = $json[$cust_id][0];
    try {
        $Bapi = new Bapi();
        $Bapi->bapiCall($bapiname['stockreport']);
        $BapiImport = new BapiImport();
        $BapiImport->setImport('I_PLANT', $jsondata['I_PLANT']);
        $BapiImport->setImport('I_MRP_AREA', $jsondata['I_MRP_AREA']);
        $BapiImport->setImport('I_STORAGE', $jsondata['I_STORAGE']);
        $Receive = new Receive();
        $Receive->getResult();
        $ResponseTable = new ResponseTable();
        $rp = $ResponseTable->getTable('T_STATUS');
        $array_str[] = array('MATNR' => 'Material', 'MAKTX' => 'Description', 'UNRES' => 'On hand', 'RSRVS' => 'Reserved', 'OPENS' => 'Incoming PO', 'AVAIL' => 'Available');
        foreach ($rp as $values) {
            unset($values['MTART']);
            unset($values['WERKS']);
            unset($values['LGORT']);
            unset($values['BERID']);
            unset($values['KUNNR']);
            unset($values['EISBE']);
            unset($values['STATS']);
示例#7
0
<?php

session_start();
if (!isset($_SESSION['TOKEN'])) {
    header('location:../index.php');
    exit;
}
include 'wsdls.php';
include 'Bapi.php';
try {
    $Bapi = new Bapi();
    $Bapi->bapiCall($bapiname['orders']);
    $BapiImport = new BapiImport();
    $BapiImport->setImport('TOKEN', $_SESSION['TOKEN']);
    $BapiImport->setImport('ACTION', 'ORDERKLIST');
    $Receive = new Receive();
    $Receive->getResult();
    $ResponseTable = new ResponseTable();
    $rp = $ResponseTable->getTable('TORDERK');
    //$ResponseExport= new ResponseExport();
    //$rp=$ResponseExport->export('TORDERK');
} catch (Exception $e) {
    $msg = 'Message: ' . $e->getMessage();
    if ($_SESSION['screenwidth'] < 600) {
        header('location:../html/morderlist.php?msg=' . $msg);
    } else {
        header('location:../html/orderlist.php?msg=' . $msg);
    }
    exit;
}
$table_as = $rp;
示例#8
0
    header('location:../index.php');
    exit;
}
include 'wsdls.php';
include 'Bapi.php';
$row = urldecode($_POST['row']);
$action = trim($_POST['action']);
$json = json_decode($row, true);
//var_dump($json);
//exit;
$options = $_SESSION['options'];
try {
    $Bapi = new Bapi();
    $Bapi->bapiCall($bapiname['orders']);
    $BapiImport = new BapiImport();
    $BapiImport->setImport('TOKEN', $_SESSION['TOKEN']);
    $BapiImport->setImport('ACTION', $action);
    $BapiImport->setImport('ACTION_KEY', trim($json['VBELN']));
    $BapiImport->setImport('QORDERK', $json);
    $Receive = new Receive();
    $Receive->getResult();
    $ResponseExport = new ResponseExport();
    $r['ORDERK'] = $ResponseExport->export('ORDERK');
    $rowsag = saprfc_table_rows($fce, 'TTEXT');
    for ($i = 1; $i <= $rowsag; $i++) {
        $r['TTEXT'][] = saprfc_table_read($fce, 'TTEXT', $i);
    }
    $rowsag = saprfc_table_rows($fce, 'TORDERP');
    for ($i = 1; $i <= $rowsag; $i++) {
        $r['TORDERP'][] = saprfc_table_read($fce, 'TORDERP', $i);
    }
示例#9
0
    $BapiImport->setImport('EMAIL', trim($Email));
    $BapiImport->setImport('PASSWORD', trim($Oldpassword));
    $Receive->getResult();
    $result = $ResponseExport->export('RETURN');
    $token = $ResponseExport->export('TOKEN');
} catch (Exception $e) {
    echo $msg = 'Message:- ' . $e->getMessage();
    exit;
}
if ($result['TYPE'] == 'S' || $result['TYPE'] == 'C') {
    try {
        $Bapi->bapiCall($bapiname['change_password']);
        $BapiImport = new BapiImport();
        $Receive = new Receive();
        $ResponseExport = new ResponseExport();
        $BapiImport->setImport('ACTION', 'CHANGE');
        $BapiImport->setImport('CONFIRM_PASSWD', trim($Confassword));
        $BapiImport->setImport('NEW_PASSWD', trim($Password));
        $BapiImport->setImport('OLD_PASSWD', trim($Oldpassword));
        $BapiImport->setImport('TOKEN', trim($token));
        $Receive->getResult();
        $result = $ResponseExport->export('RETURN');
    } catch (Exception $e) {
        echo $msg = 'Message:- ' . $e->getMessage();
        exit;
    }
    if ($result['TYPE'] == 'S') {
        echo "success";
    } else {
        echo $result['MESSAGE'];
    }
示例#10
0
<?php

include 'wsdls.php';
include 'Bapi.php';
$ICUSTOMER = array('MANDT' => '', 'GUID' => '', 'STATUS' => '', 'TITLE' => $_POST['title'], 'FIRSTNAME' => $_POST['firstname'], 'LASTNAME' => $_POST['lastname'], 'KUNNR' => $_POST['kunnr'], 'PARVW' => '', 'JOBTITLE' => $_POST['jobtitle'], 'TEL_NUMBER' => $_POST['telnumber'], 'TEL_EXTENS' => '', 'CELLPHONE' => $_POST['cellphone'], 'FAX_NUMBER' => $_POST['faxnumber'], 'EMAIL' => $_POST['email'], 'COMPANYNAME' => $_POST['companyname'], 'STREET' => $_POST['street'], 'CITY' => $_POST['city'], 'STATE' => $_POST['state'], 'POSTALCODE' => $_POST['postalcode'], 'COUNTRY' => $_POST['country'], 'REGION' => $_POST['region'], 'COMPANYURL' => $_POST['companyurl'], 'COMPANYTYPE' => $_POST['companytype'], 'CUSTOMERTYPE' => $_POST['customertype'], 'STORES' => '', 'NEWSTORES' => '', 'FOCUS' => '', 'INTERESTPRODUCT' => '', 'INSTALLSERVICE' => '', 'HOWLEARN' => $_POST['howlearn'], 'LOGONID' => '', 'INITPASSWORD' => '', 'EXPIRYDATE' => '', 'ERNAM' => '', 'CRDATE' => '', 'CRTIME' => '', 'CHDATE' => '', 'CHTIME' => '', 'LOCKFLAG' => '', 'INTERNAL' => '', 'MAILLIST' => $_POST['maillist'], 'MAXDAY' => '', 'MAXORDER' => '', 'PASSWORD' => '');
try {
    $Bapi = new Bapi();
    $Bapi->bapiCall($bapiname['registration_approval']);
    $BapiImport = new BapiImport();
    $BapiImport->setImport('ACTION', 'REGCHECK');
    $BapiImport->setImport('ICUSTOMER', $ICUSTOMER);
    $Receive = new Receive();
    $Receive->getResult();
    $ResponseExport = new ResponseExport();
    $result = $ResponseExport->export('RETURN');
    //var_dump($response_export);
} catch (Exception $e) {
    echo $msg = 'Message:- ' . $e->getMessage();
    exit;
}
if ($result['TYPE'] == 'E') {
    echo $result['TYPE'] . '@' . $result['MESSAGE'];
} else {
    $BapiImport->setImport('ACTION', 'CREATE');
    $BapiImport->setImport('ICUSTOMER', $ICUSTOMER);
    $Receive->getResult();
    $result = $ResponseExport->export('RETURN');
    echo $result['TYPE'] . '@' . $result['MESSAGE'];
}
示例#11
0
            if ($i == $targetIndex) {
                $output[$toMove] = $itemToMove;
            }
            $output[$key] = $item;
            $i++;
        }
    }
    return $output;
}
$po = trim($_REQUEST['po']);
include 'wsdls.php';
include 'Bapi.php';
$Bapi = new Bapi();
$Bapi->bapiCall($bapiname['orders']);
$BapiImport = new BapiImport();
$BapiImport->setImport('TOKEN', $_SESSION['TOKEN']);
$BapiImport->setImport('ACTION', 'PACKINGBYPO');
$BapiImport->setImport('ACTION_KEY', $po);
$Receive = new Receive();
$Receive->getResult();
$ResponseTable = new ResponseTable();
$rp = $ResponseTable->getTable('TTEXT');
//echo 'E387B1F6E77CB2F197B300219BA1B6E0=='.$_SESSION['TOKEN'];
//$rp=$_SESSION['Ttext'];
//var_dump($rp);
$json_en = json_encode($rp);
$table_as = json_decode($json_en, true);
//var_dump($table_as);
if (!empty($table_as)) {
    $i = 0;
    foreach ($table_as as $keys => $values) {