当前位置: 首页>>代码示例>>PHP>>正文


PHP returnXML函数代码示例

本文整理汇总了PHP中returnXML函数的典型用法代码示例。如果您正苦于以下问题:PHP returnXML函数的具体用法?PHP returnXML怎么用?PHP returnXML使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了returnXML函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getAdvanceAmountforBankAndDate

 function getAdvanceAmountforBankAndDate($AdvanceDate, $TDate, $BankID)
 {
     try {
         $class_name = $this->class_name;
         $function_name = 'getAdvanceAmountforBankAndDate';
         if (authenUser(func_get_args(), $this, $function_name) > 0) {
             return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
         }
         $this->items = array();
         $query = sprintf("CALL sp_getAdvanceAmountforBankAndDate('%s','%s','%s')", $AdvanceDate, $TDate, $BankID);
         $result = $this->_MDB2->extended->getAll($query);
         $num_row = count($result);
         if ($num_row > 0) {
             for ($i = 0; $i < $num_row; $i++) {
                 $this->items[$i] = new SOAP_Value('items', '{urn:' . $class_name . '}' . $function_name . 'Struct', array('AdvanceAmount' => new SOAP_Value("AdvanceAmount", "string", $result[$i]['advanceamount']), 'Numday' => new SOAP_Value("Numday", "string", $result[$i]['numday']), 'Val' => new SOAP_Value("Val", "string", $result[$i]['val'])));
             }
         }
     } catch (Exception $e) {
         write_my_log_path('PHP-Exception', $function_name . ' Caught exception: ' . $e->getMessage() . ' ' . date('Y-m-d h:i:s'), DEBUG_PATH);
         $this->_ERROR_CODE = 23022;
     }
     return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
 }
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:23,代码来源:classAdvancePaper.php

示例2: insertBuyingStockDivident

 function insertBuyingStockDivident($AccountID, $BankID, $Amount, $DepositDate, $Note, $CreatedBy)
 {
     $function_name = 'insertBuyingStockDivident';
     $struct = '{urn:' . $this->class_name . '}' . $function_name . 'Struct';
     if (authenUser(func_get_args(), $this, $function_name) > 0) {
         return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
     }
     if (!required($AccountID) || !unsigned($AccountID) || !required($BankID) || !unsigned($BankID) || !required($Amount) || !unsigned($Amount) || !required($DepositDate)) {
         if (!required($AccountID) || !unsigned($AccountID)) {
             $this->_ERROR_CODE = 22230;
         }
         if (!required($BankID) || !unsigned($BankID)) {
             $this->_ERROR_CODE = 22231;
         }
         if (!required($Amount) || !unsigned($Amount)) {
             $this->_ERROR_CODE = 22232;
         }
         if (!required($DepositDate)) {
             $this->_ERROR_CODE = 22233;
         }
     } else {
         $query = sprintf("CALL sp_VirtualBank_insertBuyingStockDivident(%u, %u, %f, '%s', '%s', '%s' )", $AccountID, $BankID, $Amount, $DepositDate, $Note, $CreatedBy);
         $rs = $this->_MDB2_WRITE->extended->getRow($query);
         if (empty($rs)) {
             $this->_ERROR_CODE = 22234;
         } else {
             $result = $rs['varerror'];
             if ($result < 0) {
                 switch ($result) {
                     case '-1':
                         $this->_ERROR_CODE = 22235;
                         break;
                     case '-2':
                         $this->_ERROR_CODE = 22236;
                         break;
                     case '-3':
                         $this->_ERROR_CODE = 22237;
                         break;
                     case '-4':
                         $this->_ERROR_CODE = 22238;
                         break;
                     case '-5':
                         $this->_ERROR_CODE = 22239;
                         break;
                     case '-9':
                         $this->_ERROR_CODE = 22240;
                         break;
                     default:
                         $this->_ERROR_CODE = $result;
                 }
             }
         }
     }
     return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
 }
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:55,代码来源:classTradingRegister_old.php

示例3: checkQuotaAccountIsExisted

 function checkQuotaAccountIsExisted($AccountNo)
 {
     $function_name = 'checkQuotaAccountIsExisted';
     $struct = '{urn:' . $this->class_name . '}' . $function_name . 'Struct';
     if (authenUser(func_get_args(), $this, $function_name) > 0) {
         return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
     }
     $MDB2 = initDB();
     $query = sprintf("SELECT f_quota_QuotaAccount_IsExisted('%s') AS Boolean", $AccountNo);
     $result = $MDB2->extended->getRow($query);
     $this->items[0] = new SOAP_Value('item', $struct, array("Boolean" => new SOAP_Value("Boolean", "string", $result['boolean'])));
     return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
 }
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:13,代码来源:classOrder.php

示例4: ConfirmExtraCollectDisbursement

 function ConfirmExtraCollectDisbursement($ID, $UpdatedBy)
 {
     $function_name = 'ConfirmExtraCollectDisbursement';
     $struct = '{urn:' . $this->class_name . '}' . $function_name . 'Struct';
     if (authenUser(func_get_args(), $this, $function_name) > 0) {
         return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
     }
     $query = sprintf("CALL sp_ExtraCollectDisbursement_getInfo('%s')", $ID);
     $rs = $this->_MDB2->extended->getRow($query);
     $BankAccount = $rs['bankaccount'];
     $BankID = (int) $rs['bankid'];
     $BravoCode = (int) $rs['bravocode'];
     $Amount = $rs['amount'];
     $AccountNo = $rs['accountno'];
     $TradingDate = $rs['tradingdate'];
     $Note = $rs['note'];
     $TranTypeID = (int) $rs['trantypeid'];
     if ($BankAccount != '') {
         switch ($BankID) {
             case DAB_ID:
                 $dab =& new CDAB();
                 $refno = $AccountNo . "_" . $ID . "_" . date('Y-m-d');
                 if ($TranTypeID == 1) {
                     // Thu tien
                     $dab_rs = $dab->transfertoEPS($BankAccount, $AccountNo, $refno, $Amount, $Note);
                 } elseif ($TranTypeID == 2) {
                     // Chuyen tien
                     $dab_rs = $dab->transferfromEPS($BankAccount, $AccountNo, $refno, $Amount, $Note);
                 }
                 break;
             case OFFLINE:
                 $mdb = initWriteDB();
                 $query = sprintf("CALL sp_VirtualBank_ExtraCollectDisbursement(%u, '%s', '%s')", $ID, date("Y-m-d"), $UpdatedBy);
                 $offline_rs = $mdb->extended->getRow($query);
                 $mdb->disconnect();
                 if (PEAR::isError($offline_rs)) {
                     $this->_ERROR_CODE = 31500;
                 } else {
                     $result = $offline_rs['varerror'];
                     if ($result < 0) {
                         switch ($result) {
                             case '-1':
                                 $this->_ERROR_CODE = 31501;
                                 break;
                             case '-2':
                                 $this->_ERROR_CODE = 31502;
                                 break;
                             case '-3':
                                 $this->_ERROR_CODE = 31503;
                                 break;
                             case '-4':
                                 $this->_ERROR_CODE = 30624;
                                 // khong du tien
                                 break;
                             case '-5':
                                 $this->_ERROR_CODE = 31504;
                                 break;
                             case '-9':
                                 $this->_ERROR_CODE = 31505;
                                 break;
                         }
                         //switch
                     } else {
                         //if
                         $dab_rs = 0;
                     }
                 }
                 //if PEAR
                 break;
         }
         //switch
         if ($dab_rs == 0) {
             $query = sprintf("CALL sp_ExtraCollectDisbursement_Confirm(%u,'%s')", $ID, $UpdatedBy);
             $rs = $this->_MDB2_WRITE->extended->getRow($query);
             if ($rs['varerror'] < 0) {
                 switch ($rs['varerror']) {
                     case '-2':
                         $this->_ERROR_CODE = 31450;
                         break;
                 }
                 return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
             } else {
                 //update Bank
                 $soap =& new Bravo();
                 if ($TranTypeID == 1) {
                     // Thu tien
                     $transactionType = "M13.09";
                 } elseif ($TranTypeID == 2) {
                     // Chuyen tien
                     $transactionType = "M13.08";
                 }
                 $Deposit_value = array("TradingDate" => date('Y-m-d'), 'TransactionType' => $transactionType, "AccountNo" => $AccountNo, "Amount" => $Amount, "Bank" => $BravoCode, "Branch" => "", "Note" => $Note);
                 $ret = $soap->deposit($Deposit_value);
                 if ($ret['table0']['Result'] != 1) {
                     switch ($ret['table0']['Result']) {
                         case 0:
                             $this->_ERROR_CODE = 0;
                             break;
                         case -2:
                             //Error - bravo
//.........这里部分代码省略.........
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:101,代码来源:classMortage.php

示例5: ConfirmExtraCollectDisbursement

 function ConfirmExtraCollectDisbursement($ID, $UpdatedBy)
 {
     $function_name = 'ConfirmExtraCollectDisbursement';
     $struct = '{urn:' . $this->class_name . '}' . $function_name . 'Struct';
     if (authenUser(func_get_args(), $this, $function_name) > 0) {
         return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
     }
     $query = sprintf("CALL sp_ExtraCollectDisbursement_getInfo('%s')", $ID);
     $rs = $this->_MDB2->extended->getRow($query);
     $BankAccount = $rs['bankaccount'];
     $BankID = (int) $rs['bankid'];
     $BravoCode = (int) $rs['bravocode'];
     $Amount = $rs['amount'];
     $AccountNo = $rs['accountno'];
     $TradingDate = $rs['tradingdate'];
     $Note = $rs['note'];
     $TranTypeID = (int) $rs['trantypeid'];
     if ($BankAccount != '') {
         switch ($BankID) {
             case DAB_ID:
                 $dab =& new CDAB();
                 $refno = $AccountNo . "_" . $ID . "_" . date('Y-m-d');
                 if ($TranTypeID == 1) {
                     // Thu tien
                     $dab_rs = $dab->transfertoEPS($BankAccount, $AccountNo, $refno, $Amount, $Note);
                 } elseif ($TranTypeID == 2) {
                     // Chuyen tien
                     $dab_rs = $dab->transferfromEPS($BankAccount, $AccountNo, $refno, $Amount, $Note);
                 }
                 break;
             case OFFLINE:
                 $mdb = initWriteDB();
                 $query = sprintf("CALL sp_VirtualBank_ExtraCollectDisbursement(%u, '%s', '%s')", $ID, date("Y-m-d"), $UpdatedBy);
                 $offline_rs = $mdb->extended->getRow($query);
                 $mdb->disconnect();
                 if (PEAR::isError($offline_rs)) {
                     $this->_ERROR_CODE = 31500;
                 } else {
                     $result = $offline_rs['varerror'];
                     if ($result < 0) {
                         switch ($result) {
                             case '-1':
                                 $this->_ERROR_CODE = 31501;
                                 break;
                             case '-2':
                                 $this->_ERROR_CODE = 31502;
                                 break;
                             case '-3':
                                 $this->_ERROR_CODE = 31503;
                                 break;
                             case '-4':
                                 $this->_ERROR_CODE = 30624;
                                 // khong du tien
                                 break;
                             case '-5':
                                 $this->_ERROR_CODE = 31504;
                                 break;
                             case '-9':
                                 $this->_ERROR_CODE = 31505;
                                 break;
                         }
                         //switch
                     } else {
                         //if
                         $dab_rs = 0;
                     }
                 }
                 //if PEAR
                 break;
         }
         //switch
         if ($dab_rs == 0) {
             $query = sprintf("CALL sp_ExtraCollectDisbursement_Confirm(%u,'%s')", $ID, $UpdatedBy);
             $rs = $this->_MDB2_WRITE->extended->getRow($query);
             if ($rs['varerror'] < 0) {
                 switch ($rs['varerror']) {
                     case '-2':
                         $this->_ERROR_CODE = 31450;
                         break;
                 }
                 return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
             } else {
                 //update Bank
                 $soap =& new Bravo();
                 if ($TranTypeID == 1) {
                     // Thu tien
                     $transactionType = "M13.09";
                     $sign = '-';
                 } elseif ($TranTypeID == 2) {
                     // Chuyen tien
                     $transactionType = "M13.08";
                     $sign = '%2B';
                 }
                 if ($BankID == OFFLINE) {
                     $query = "SELECT mobilephone,ab.usableamount FROM " . TBL_INVESTOR;
                     $query .= " i INNER JOIN " . TBL_ACCOUNT . " a ON(i.id=a.investorId)";
                     $query .= " INNER JOIN " . TBL_ACCOUNT_BANK . " ab ON(a.id=ab.accountid)";
                     $query .= " WHERE a.accountNo='" . $AccountNo . "' AND ab.bankid=" . OFFLINE;
                     $mdb = initWriteDB();
                     $acc_rs = $mdb->extended->getRow($query);
//.........这里部分代码省略.........
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:101,代码来源:classMortage_251.php

示例6: insertCoSellOrder

 function insertCoSellOrder($CoAccountNo, $AccountNo, $StockID, $OrderQuantity, $OrderPrice, $Session, $FromTypeID, $Note, $OrderDate, $IsAssigner, $IsGotPaper, $CreatedBy, $AccountNoContra, $CompanyNameContra)
 {
     $function_name = 'insertCoSellOrder';
     $struct = '{urn:' . $this->class_name . '}' . $function_name . 'Struct';
     $log[] = sprintf('insertCoSellOrder - CoAccountNo:%s;AccountNo:%s;StockID:%s;OrderQuantity:%s;OrderPrice:%s;Session:%s;FromTypeID:%s;Note:%s;OrderDate:%s;IsAssigner:%s;IsGotPaper:%s;CreatedBy:%s;AccountNoContra:%s;CompanyNameContra:%s;ExecutedTime:%s', $CoAccountNo, $AccountNo, $StockID, $OrderQuantity, $OrderPrice, $Session, $FromTypeID, $Note, $OrderDate, $IsAssigner, $IsGotPaper, $CreatedBy, $AccountNoContra, $CompanyNameContra, date('Y-m-d h:i:s'));
     if (authenUser(func_get_args(), $this, $function_name) > 0) {
         $log[] = sprintf('authenUser: ERROR_CODE: %s', $this->_ERROR_CODE);
         write_my_log_path("insertCoSellOrder", implode("\n --> ", $log), '/home/vhosts/eSMS/htdocs/logs/otc/');
         return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
     }
     $log[] = sprintf('authenUser: ERROR_CODE: %s', $this->_ERROR_CODE);
     // checking account is active / not
     if (!checkAccountIsActive($AccountNo) || !checkAccountIsActive($CoAccountNo)) {
         $this->_ERROR_CODE = 30275;
         $log[] = sprintf('checkAccountIsActive: ERROR_CODE: %s; AccountNo:%s,%s;CoAccountNo: %s,%s', $this->_ERROR_CODE, $AccountNo, checkAccountIsActive($AccountNo) ? 'TRUE' : 'FALSE', $CoAccountNo, checkAccountIsActive($CoAccountNo) ? 'TRUE' : 'FALSE');
         write_my_log_path("insertCoSellOrder", implode("\n --> ", $log), '/home/vhosts/eSMS/htdocs/logs/otc/');
         return returnXML(func_get_args(), $this->class_name, $function_name, 30275, $this->items, $this);
     }
     $log[] = sprintf('checkAccountIsActive: ERROR_CODE: %s; AccountNo:%s,%s;CoAccountNo: %s,%s', $this->_ERROR_CODE, $AccountNo, checkAccountIsActive($AccountNo) ? 'TRUE' : 'FALSE', $CoAccountNo, checkAccountIsActive($CoAccountNo) ? 'TRUE' : 'FALSE');
     if (!required($CoAccountNo) || !required($AccountNo) || !required($OrderDate) || !required($StockID) || !required($OrderQuantity) || !required($OrderPrice) || !required($Session) || !unsigned($OrderQuantity) || !unsigned($StockID)) {
         if (!required($AccountNo) || !required($CoAccountNo)) {
             $this->_ERROR_CODE = 30051;
         }
         if (!required($OrderDate)) {
             $this->_ERROR_CODE = 30052;
         }
         if (!required($StockID) || !unsigned($StockID)) {
             $this->_ERROR_CODE = 30053;
         }
         if (!required($OrderQuantity) || !unsigned($OrderQuantity)) {
             $this->_ERROR_CODE = 30054;
         }
         if (!required($Session)) {
             $this->_ERROR_CODE = 30055;
         }
         if (!required($OrderPrice)) {
             $this->_ERROR_CODE = 30056;
         }
         $log[] = sprintf('check require: ERROR_CODE: %s', $this->_ERROR_CODE);
     } else {
         $vip = checkVIPAccount($AccountNo);
         // 1: exist 0: not exist
         $vipCo = checkVIPAccount($CoAccountNo);
         // 1: exist 0: not exist
         if (($vip == 1 || $vipCo == 1) && $FromTypeID == 5) {
             // web
             $this->_ERROR_CODE = 30602;
             $log[] = sprintf('Vip on web: Fail; AccountNo: %s;CoAccountNo: %s', $vip == 0 ? 'not vip' : 'vip', $vipCo == 0 ? 'not vip' : 'vip');
             write_my_log_path("insertCoSellOrder", implode("\n --> ", $log), '/home/vhosts/eSMS/htdocs/logs/otc/');
             return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
         }
         if ((strpos(EOT_PROHIBITION_ACCOUNT, $AccountNo) !== false || strpos(EOT_PROHIBITION_ACCOUNT, $CoAccountNo) !== false) && $FromTypeID == 5) {
             $this->_ERROR_CODE = 30602;
             $log[] = sprintf('check EOT_PROHIBITION_ACCOUNT: ERROR_CODE: %s;AccountNo:%s,%s;CoAccountNo:%s,%s', $this->_ERROR_CODE, $AccountNo, strpos(EOT_PROHIBITION_ACCOUNT, $AccountNo), $CoAccountNo, strpos(EOT_PROHIBITION_ACCOUNT, $CoAccountNo));
             write_my_log_path("insertCoSellOrder", implode("\n --> ", $log), '/home/vhosts/eSMS/htdocs/logs/otc/');
             return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
         }
         if (!checkStockPrice($StockID, $OrderPrice, $OrderDate)) {
             $this->_ERROR_CODE = 30057;
         }
         $log[] = sprintf('checkStockPrice: ERROR_CODE: %s', $this->_ERROR_CODE);
         $sellingOrderID = '';
         $buyingOrderID = '';
         try {
             if ($this->_ERROR_CODE == 0) {
                 // -------------------------------------------------------------------------------------- //
                 // Insert sell order for $CoAccountNo
                 // -------------------------------------------------------------------------------------- //
                 $query = sprintf("CALL sp_upcom_insertSellingOrder('%s', %u, %u, %u, %u, '%u', '%s', '%s', '%u', '%u', '%s', '%s', '%s')", $CoAccountNo, $StockID, $OrderQuantity, $OrderPrice, $Session, $FromTypeID, $Note, $OrderDate, $IsAssigner, $IsGotPaper, $CreatedBy, $AccountNoContra, $CompanyNameContra);
                 $log[] = sprintf('%s', $query);
                 $mdb = initWriteDB();
                 $rs = $mdb->extended->getRow($query);
                 $mdb->disconnect();
                 if (empty($rs)) {
                     $this->_ERROR_CODE = 30060;
                 } else {
                     $result = $rs['varerror'];
                     if ($result < 0) {
                         switch ($result) {
                             case '-1':
                                 $this->_ERROR_CODE = 19010;
                                 break;
                             case '-2':
                                 $this->_ERROR_CODE = 19011;
                                 break;
                             case '-3':
                                 $this->_ERROR_CODE = 19012;
                                 break;
                             case '-4':
                                 $this->_ERROR_CODE = 19013;
                                 break;
                             case '-5':
                                 $this->_ERROR_CODE = 19014;
                                 break;
                             case '-6':
                                 $this->_ERROR_CODE = 19015;
                                 break;
                             default:
                                 $this->_ERROR_CODE = $result;
                         }
//.........这里部分代码省略.........
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:101,代码来源:classOTC.php

示例7: getTransferingOrderForReSend

 function getTransferingOrderForReSend($OrderDate, $AccountNo, $OrderID)
 {
     $function_name = 'getTransferingOrderForReSend';
     $struct = '{urn:' . $this->class_name . '}' . $function_name . 'Struct';
     if (authenUser(func_get_args(), $this, $function_name) > 0) {
         return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
     }
     try {
         $this->_MDB2_WRITE = newInitWriteDB();
         $query = sprintf("CALL sp_hnx_GetTransferingOrderForReSend('%s', '%s', %u)", $OrderDate, $AccountNo, $OrderID);
         $result = $this->_MDB2_WRITE->extended->getAll($query);
         $count = count($result);
         if ($count > 0) {
             for ($i = 0; $i < $count; $i++) {
                 $this->items[$i] = new SOAP_Value('item', $struct, array("OrderID" => new SOAP_Value("OrderID", "string", $result[$i]['OrderID']), "OrderNumber" => new SOAP_Value("OrderNumber", "string", $result[$i]['OrderNumber']), "AccountNo" => new SOAP_Value("AccountNo", "string", $result[$i]['AccountNo']), "OrderSideName" => new SOAP_Value("OrderSideName", "string", $result[$i]['OrderSideName']), "Symbol" => new SOAP_Value("Symbol", "string", $result[$i]['Symbol']), "OrderStyleName" => new SOAP_Value("OrderStyleName", "string", $result[$i]['OrderStyleName']), "OrderPrice" => new SOAP_Value("OrderPrice", "string", $result[$i]['OrderPrice']), "OrderQuantity" => new SOAP_Value("OrderQuantity", "string", $result[$i]['OrderQuantity']), "StatusName" => new SOAP_Value("StatusName", "string", $result[$i]['StatusName']), "GetNumber" => new SOAP_Value("GetNumber", "string", $result[$i]['o.GetNumber'])));
             }
         }
         $content = date("d/m/Y H:i:s") . "\t" . $query . "\t--> " . $count;
         another_write_log($function_name, $content, 'directly_tranfer');
     } catch (Exception $e) {
         $this->_ERROR_CODE = $e->getMessage();
     }
     return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
 }
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:24,代码来源:classDirectlyOrderTransfer_prepare_up.php

示例8: ReportVirtualBank_GetAccountBalanceByDate

 function ReportVirtualBank_GetAccountBalanceByDate($BankID, $AccountNo, $FromDate, $ToDate)
 {
     $function_name = 'ReportVirtualBank_GetAccountBalanceByDate';
     $struct = '{urn:' . $this->class_name . '}' . $function_name . 'Struct';
     if (authenUser(func_get_args(), $this, $function_name) > 0) {
         return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
     }
     $query = sprintf("CALL sp_VirtualBank_getAccountBalanceByDate('%s','%s','%s','%s')", $BankID, $AccountNo, $FromDate, $ToDate);
     $result = $this->_MDB2->extended->getAll($query);
     $num_row = count($result);
     if ($num_row > 0) {
         for ($i = 0; $i < $num_row; $i++) {
             $this->items[$i] = new SOAP_Value('items', '{urn:' . $this->class_name . '}' . $function_name . 'Struct', array('PrevBalance' => new SOAP_Value("PrevBalance", "string", $result[$i]['prevbalance']), 'NextBalance' => new SOAP_Value("NextBalance", "string", $result[$i]['nextbalance']), 'AccountNo' => new SOAP_Value("AccountNo", "string", $result[$i]['accountno']), 'InvestorName' => new SOAP_Value("InvestorName", "string", $result[$i]['investorname'])));
         }
     }
     return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
 }
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:17,代码来源:classBank.php

示例9: UpdateIsCollectedVSDFee

 function UpdateIsCollectedVSDFee()
 {
     $class_name = $this->class_name;
     $function_name = 'UpdateIsCollectedVSDFee';
     $struct = '{urn:' . $this->class_name . '}' . $function_name . 'Struct';
     if (authenUser(func_get_args(), $this, $function_name) > 0) {
         return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
     }
     $date_array = getdate();
     $csv_dir = $this->path . 'vcb_kq/';
     if (!is_dir($csv_dir)) {
         mkdir($csv_dir, 0755);
     }
     $csv_dir = $csv_dir . 'logs/';
     if (!is_dir($csv_dir)) {
         mkdir($csv_dir, 0755);
     }
     $csv_dir = $csv_dir . $date_array['year'] . '/';
     if (!is_dir($csv_dir)) {
         mkdir($csv_dir, 0755);
     }
     $csv_dir = $csv_dir . $date_array['mon'] . '/';
     if (!is_dir($csv_dir)) {
         mkdir($csv_dir, 0755);
     }
     $filename = 'eps' . date('Ymd') . '_buy_log.vcbit';
     $filepath = $csv_dir . $filename;
     $vsdlogfile = 'vsdrefno_' . date('Ymd') . '.txt';
     $vsdlogfile = sprintf('%s%s%s/%s/%s', $this->path, 'vcb_kq/', $date_array['year'], $date_array['mon'], $vsdlogfile);
     if (is_file($vsdlogfile)) {
         if (!is_file($filepath)) {
             $conn_id = ftp_connect($this->ftp_server);
             // login with username and password
             $login_result = ftp_login($conn_id, $this->ftp_user_name, $this->ftp_user_pass);
             // check connection
             if (!$conn_id || !$login_result) {
                 $this->_ERROR_CODE = 24001;
             } else {
                 $destination_file = $filepath;
                 // open some file to write to
                 $handle = fopen($destination_file, 'w');
                 $source_file = 'OUT/' . $filename;
                 // get the size of $file
                 $res = ftp_size($conn_id, $source_file);
                 if ($res != -1) {
                     $upload = ftp_fget($conn_id, $handle, $source_file, FTP_BINARY);
                     // check upload status
                     if (!$upload) {
                         $this->_ERROR_CODE = 24002;
                     } else {
                         $this->_ERROR_CODE = 0;
                     }
                 } else {
                     //echo "couldn't get the size";
                     $this->_ERROR_CODE = 24005;
                 }
                 // close the FTP stream
                 ftp_close($conn_id);
                 fclose($handle);
             }
         }
         if (file_exists($filepath) === true) {
             $handle = fopen($vsdlogfile, "r");
             $vsdlogcontent = fgets($handle);
             fclose($handle);
             $vsdrefarray = explode('_', $vsdlogcontent);
             $handle = fopen($filepath, "r");
             while (!feof($handle)) {
                 $line = fgets($handle);
                 $splited = explode(';', $line);
                 if (in_array($splited[1], $vsdrefarray)) {
                     $orderID = substr($splited[1], 0, strlen($splited[1]) - 6);
                     $unitCode = substr($splited[1], -6);
                     if ($splited[15] == '0000') {
                         $this->_MDB2->connect();
                         $query = sprintf("CALL sp_FeeForVSD_updateIsCollectedForVCB('%s')", $orderID);
                         $result = $this->_MDB2->extended->getAll($query);
                         $this->_MDB2->disconnect();
                     }
                     $content = $line . ' ' . $query . ' varerror: ' . $result[0]['varerror'];
                     write_my_log_path('UpdateIsCollectedVSDFee', $content, $csv_dir);
                     $this->items[] = new SOAP_Value('item', $struct, array('Refno' => new SOAP_Value("Refno", "string", $splited[1]), 'OrderID' => new SOAP_Value("OrderID", "string", $orderID), 'UnitCode' => new SOAP_Value("UnitCode", "string", $unitCode), 'AccountNo' => new SOAP_Value("AccountNo", "string", $splited[4]), 'Amount' => new SOAP_Value("Amount", "string", $splited[12]), 'VCBResult' => new SOAP_Value("VCBResult", "string", $splited[15]), 'Note' => new SOAP_Value("Note", "string", substr($splited[16], 0, strlen($splited[16]) - 1)), 'UpdateIsCollectedResult' => new SOAP_Value("UpdateIsCollectedResult", "string", $result[0]['varerror'])));
                 }
             }
             fclose($handle);
         } else {
             // Chua co log file
             $this->_ERROR_CODE = 24004;
         }
     } else {
         // Khong tim thay file vsdfee refno log
         $this->_ERROR_CODE = 43007;
     }
     return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
 }
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:95,代码来源:classVCBBank_real.php

示例10: InsertListOfQuota4AcountVB

 function InsertListOfQuota4AcountVB($TradingDate)
 {
     $class_name = $this->class_name;
     $function_name = 'InsertListOfQuota4AcountVB';
     $struct = '{urn:' . $this->class_name . '}' . $function_name . 'Struct';
     $log[] = sprintf('InsertListOfQuota4AcountVB - TradingDate:%s;BankID:%s;ExecutedTime:%s', $TradingDate, OFFLINE, date('Y-m-d h:i:s'));
     if (authenUser(func_get_args(), $this, $function_name) > 0) {
         $log[] = sprintf('ErrorCode:%s(authenUser);', $this->_ERROR_CODE);
         write_my_log_path("InsertListOfQuota4AcountVB", implode("\n --> ", $log), '/home/vhosts/eSMS/htdocs/logs/quota/');
         return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
     }
     $query = sprintf("CALL sp_quota_getQuota4Bravo('%s', %u)", $TradingDate, OFFLINE);
     $result = $this->_MDB2->extended->getAll($query);
     $count = count($result);
     $log[] = sprintf('Query:%s;Count:%s', $query, $count);
     $f_args = func_get_args();
     $argscount = count($f_args);
     for ($i = 0; $i < $count; $i++) {
         $error_code = 0;
         $query = sprintf("CALL sp_quota_insertQuota4AccountVB(%u, %f, '%s', '%s', %u, '%s')", $result[$i]['accountid'], $result[$i]['debtamount'], 'Nộp hạn mức', $TradingDate, OFFLINE, $f_args[$argscount - 2]);
         $mdb = initWriteDB();
         $result2 = $mdb->extended->getAll($query);
         $log[] = sprintf('Query:%s; Times:%s', $query, $i);
         if (!isset($result2[0]['varerror'])) {
             $error_code = 40001;
         } else {
             $varerror = $result2[0]['varerror'];
             if ($varerror < 0) {
                 switch ($varerror) {
                     case '-1':
                         $error_code = 40002;
                         break;
                     case '-2':
                         $error_code = 40047;
                         break;
                     case '-3':
                         $error_code = 40048;
                         break;
                     case '-4':
                         $error_code = 40049;
                         break;
                     case '-5':
                         $error_code = 40050;
                         break;
                     default:
                         $error_code = $varerror;
                         break;
                 }
             }
         }
         $log[] = sprintf('ErrorCode:%s;', $error_code);
         if ($error_code == 0) {
             $deposit = array("TradingDate" => date("Y-m-d"), 'TransactionType' => BRAVO_QUOTA, "AccountNo" => $result[$i]['accountno'], "Amount" => $result[$i]['debtamount'], "Fee" => $result[$i]['debtamount'], "Bank" => VIRTUAL_BANK_BRAVO_BANKCODE, "Branch" => "", "Note" => 'Nop han muc');
             $log[] = sprintf('Bravo: TransactionType:%s;AccountNo:%s;Amount:%s;Fee:%s;Bank:%s;', BRAVO_QUOTA, $result[$i]['accountno'], $result[$i]['debtamount'], $result[$i]['debtamount'], VIRTUAL_BANK_BRAVO_BANKCODE);
             $soap =& new Bravo();
             $ret = $soap->deposit($deposit);
             if ($ret['table0']['Result'] != 1) {
                 switch ($ret['table0']['Result']) {
                     case '-2':
                         $error_code = 23002;
                         break;
                     case '-1':
                         $error_code = 23003;
                         break;
                     case '-13':
                         $error_code = 23006;
                         break;
                     case '-15':
                         $error_code = 23005;
                         break;
                     case '-16':
                         $error_code = 23004;
                         break;
                     default:
                         $error_code = 'Bravo' . $ret['table0']['Result'];
                 }
             }
             $log[] = sprintf('ErrorCode:%s;', $error_code);
         }
         if ($error_code != 0) {
             $this->_ERROR_CODE = $error_code;
             $this->items[] = new SOAP_Value('item', $struct, array("AccountID" => new SOAP_Value("AccountID", "string", $result[$i]['accountid']), "AccountNo" => new SOAP_Value("AccountNo", "string", $result[$i]['accountno']), "DebtAmount" => new SOAP_Value("DebtAmount", "string", $result[$i]['debtamount']), "BravoCode" => new SOAP_Value("BravoCode", "string", $result[$i]['bravocode']), "ErrorCode" => new SOAP_Value("ErrorCode", "string", $error_code)));
         }
     }
     $log[] = "\n\n";
     write_my_log_path("InsertListOfQuota4AcountVB", implode("\n --> ", $log), '/home/vhosts/eSMS/htdocs/logs/quota/');
     return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
 }
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:88,代码来源:classQuota_251.php

示例11: NewGetPaymentDetailListWithCondition

 /**
 	Function: NewGetPaymentDetailListWithCondition
 	Description:
 	Input:
 	Output: ???
 */
 function NewGetPaymentDetailListWithCondition($WhereClause, $TimeZone)
 {
     $function_name = 'NewGetPaymentDetailListWithCondition';
     $struct = '{urn:' . $this->class_name . '}' . $function_name . 'Struct';
     if (authenUser(func_get_args(), $this, $function_name) > 0) {
         return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
     }
     $query = sprintf("CALL sp_Mortage_getPaymentDetailConditionList( \"%s\", \"%s\")", $WhereClause, $TimeZone);
     $result = $this->_MDB2->extended->getAll($query);
     for ($i = 0; $i < count($result); $i++) {
         $this->items[$i] = new SOAP_Value('item', $struct, array("ID" => new SOAP_Value("ID", "string", $result[$i]['id']), "MortageID" => new SOAP_Value("MortageID", "string", $result[$i]['mortageid']), "AccountID" => new SOAP_Value("AccountNo", "string", $result[$i]['accountid']), "AccountNo" => new SOAP_Value("AccountNo", "string", $result[$i]['accountno']), "StockID" => new SOAP_Value("StockID", "string", $result[$i]['stockid']), "Symbol" => new SOAP_Value("Symbol", "string", $result[$i]['symbol']), "Quantity" => new SOAP_Value("Quantity", "string", $result[$i]['quantity']), "PaymentDate" => new SOAP_Value("PaymentDate", "string", $result[$i]['paymentdate']), "Note" => new SOAP_Value("Note", "string", $result[$i]['note']), "IsConfirmed" => new SOAP_Value("IsConfirmed", "string", $result[$i]['isconfirmed']), "FullName" => new SOAP_Value("FullName", "string", $result[$i]['fullname']), "CreatedBy" => new SOAP_Value("CreatedBy", "string", $result[$i]['createdby']), "CreatedDate" => new SOAP_Value("CreatedDate", "string", $result[$i]['createddate']), "UpdatedBy" => new SOAP_Value("UpdatedBy", "string", $result[$i]['updatedby']), "UpdatedDate" => new SOAP_Value("UpdatedDate", "string", $result[$i]['updateddate'])));
     }
     return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
 }
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:20,代码来源:classPayment.php

示例12: ListFolder

function ListFolder($rootFolder, $ReturnAttr, $instituteArr, $courseArr, $classArr, $moderatorArr)
{
    $folderArr = "";
    $folderArrCnt = "";
    $dir_handle = "";
    $dirname = "";
    $parentFolder = "";
    $fPath = "";
    $Return = "";
    $xmlTreeFile = isset($xmlTreeFile) ? $xmlTreeFile : '';
    $xmlTreeFolder = isset($xmlTreeFolder) ? $xmlTreeFolder : '';
    //echo $rootFolder; exit;
    $dir_handle = @opendir($rootFolder) or die(returnXML("Unable to open the directory"));
    //Open the root directory
    $dirname = end(explode("/", $rootFolder));
    while (false !== ($file = readdir($dir_handle))) {
        //Read the root directory
        $fileLabel = "";
        $fileSize = "";
        $modified = "";
        $isModerator = "N";
        // default value set for is_moderator to N (means not a moderator)
        $showFolder = true;
        $icon = "";
        $unfold = 0;
        $tempPath = $rootFolder . "/" . $file;
        $folderArr = explode("/", $tempPath);
        $folderArrCnt = count($folderArr);
        $parentFolder = trim($folderArr[$folderArrCnt - 2]);
        if ($parentFolder == "institutes") {
            $fileLabel = isset($instituteArr[$file]) ? $instituteArr[$file] : "Doc {$file}";
            if (!array_key_exists($file, $instituteArr)) {
                $showFolder = false;
            }
        } else {
            if ($parentFolder == "courses") {
                $fileLabel = isset($courseArr[$file]) ? $courseArr[$file] : "Course {$file}";
                if (!array_key_exists($file, $courseArr)) {
                    $showFolder = false;
                }
            } else {
                if ($parentFolder == "classes") {
                    $fileLabel = isset($classArr[$file]) ? $classArr[$file] : "Class {$file}";
                    if (!array_key_exists($file, $classArr)) {
                        $showFolder = false;
                    }
                } else {
                    $fileLabel = $file;
                }
            }
        }
        if ($file != "." && $file != ".." && $showFolder && $file != '@@-Thumbnails-@@' && $file != '@@-OriginalDocs-@@') {
            if (is_dir($rootFolder . "/" . $file)) {
                //Check whether the file is a directory or not
                $checkFolder = substr($file, 0, 6);
                $modified = date("F d Y H:i:s.", @filemtime($tempPath));
                //$fileSize 		= convertSize(getFileSize($tempPath)); // get file size in KB or B
                $isModerator = isset($moderatorArr[$file]) ? $moderatorArr[$file] : $isModerator;
                if ($file != "courses" && $file != "classes") {
                    if ($checkFolder == '_sfp__') {
                        $xmlTreeFile .= "<files id='" . $file . "'label='" . substr($file, 6, strlen($file)) . "' path='" . $tempPath . "' cDate='" . $modified . "' fSize='" . $fileSize . "' type='file'></files>";
                        $emptyFolderCheckFlag = false;
                    } else {
                        $xmlTreeFolder .= "<folder id='" . $file . "' label='" . $fileLabel . "' path='" . $tempPath . "' cDate='" . $modified . "' fSize='" . $fileSize . "' is_moderator='" . $isModerator . "' type='" . $parentFolder . "'>";
                        $emptyFolderCheckFlag = is_empty_dir($tempPath);
                    }
                }
                if ($emptyFolderCheckFlag) {
                    $xmlTreeFolder .= "<emptyFolder label=\" - No documents - \" path='" . $tempPath . "' type='No Documents'></emptyFolder>";
                } else {
                    if ($checkFolder != '_sfp__') {
                        $rootFolder = substr($rootFolder, -1, 1) == "/" ? substr($rootFolder, 0, -1) : $rootFolder;
                        //exit;
                        $xmlTreeFolder .= ListFolder($rootFolder . "/" . $file, $Return, $instituteArr, $courseArr, $classArr, $moderatorArr);
                    }
                }
                if ($file != "courses" && $file != "classes" && $checkFolder != '_sfp__') {
                    $xmlTreeFolder .= "</folder>";
                }
            } else {
                //$fileSize 	=   convertSize(getFileSize($tempPath)); // get file size in KB or B
                $file = str_replace('.swf', '', $file);
                $modified = date("F d Y H:i:s.", @filemtime($tempPath));
                $xmlTreeFile .= "<files label='" . $file . "' path='" . $tempPath . "' cDate='" . $modified . "' fSize='" . $fileSize . "' type='file'></files>";
            }
        }
    }
    $Return = $xmlTreeFolder . $xmlTreeFile;
    closedir($dir_handle);
    return $Return;
}
开发者ID:aview,项目名称:aview-content-php,代码行数:91,代码来源:centralRepPath.php

示例13: CloseBravoAccount

 /**
  * Function CloseBravoAccount  : update money --> bravo
  * Input         : $TradingDate
  * OutPut         : error code and items ( AccountNo, success or fail)
  */
 function CloseBravoAccount($AccountNo)
 {
     $class_name = $this->class_name;
     $function_name = 'CloseBravoAccount';
     if (authenUser(func_get_args(), $this, $function_name) > 0) {
         return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
     }
     $this->items = array();
     $soap =& new Bravo();
     $this->_ERROR_CODE = $soap->closeCustomer($AccountNo);
     $this->write_my_log('MoneyBravo', $function_name . ' AccountNo ' . $AccountNo . ' ' . $date . '  varerror ' . $this->_ERROR_CODE . ' ' . date('Y-m-d h:i:s'));
     return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
 }
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:18,代码来源:classBravo.php

示例14: OpenAccount1

 function OpenAccount1($PersonalCard, $Name, $Address, $BankAccountNo, $PartnerType, $dtBirthDay, $PlaceOfBirth, $dtDateIssue, $PlaceIssue, $ZipCode, $Country, $Email, $Phone, $Fax, $CompanyAddress, $CompanyPhone, $MailingAddress, $MailingPhone)
 {
     $class_name = $this->class_name;
     $function_name = 'OpenAccount1';
     $this->_ERROR_CODE = '0000';
     if (0) {
         //authenUser(func_get_args(), $this, $function_name) > 0 ){
         $Name = '';
         $Address = '';
         $Account = '';
         $Status = '';
         $RespString = 'Invalid user/Password';
         $OldNewAccount = '';
         write_my_log('VCB-test', $_SERVER['REMOTE_ADDR'] . ' function_name ' . $function_name . ' Input PersonalCard ' . $PersonalCard . ' Name ' . $Name . ' Address ' . $Address . ' BankAccountNo ' . $BankAccountNo . ' PartnerType ' . $PartnerType . ' dtBirthDay ' . $dtBirthDay . ' PlaceOfBirth ' . $PlaceOfBirth . ' dtDateIssue ' . $dtDateIssue . ' PlaceIssue ' . $PlaceIssue . ' ZipCode ' . $ZipCode . ' Country ' . $Country . ' Email ' . $Email . ' Phone ' . $Phone . ' Fax ' . $Fax . ' CompanyAddress ' . $CompanyAddress . ' CompanyPhone ' . $CompanyPhone . ' MailingAddress ' . $MailingAddress . ' MailingPhone ' . $MailingPhone . ' ErrorCode ' . $this->_ERROR_CODE . ' ' . date('Y-m-d h:i:s'));
         mailSMTP('webmaster@eps.com.vn', 'webmaster@eps.com.vn', 'chi.dl@eps.com.vn', '', '', 'Ket noi VietCombank test', 'Test ket noi VietComBank ' . $_SERVER['REMOTE_ADDR'] . ' function_name ' . $function_name . ' Input PersonalCard ' . $PersonalCard . ' Name ' . $Name . ' Address ' . $Address . ' BankAccountNo ' . $BankAccountNo . ' PartnerType ' . $PartnerType . ' dtBirthDay ' . $dtBirthDay . ' PlaceOfBirth ' . $PlaceOfBirth . ' dtDateIssue ' . $dtDateIssue . ' PlaceIssue ' . $PlaceIssue . ' ZipCode ' . $ZipCode . ' Country ' . $Country . ' Email ' . $Email . ' Phone ' . $Phone . ' Fax ' . $Fax . ' CompanyAddress ' . $CompanyAddress . ' CompanyPhone ' . $CompanyPhone . ' MailingAddress ' . $MailingAddress . ' MailingPhone ' . $MailingPhone . ' ErrorCode ' . $this->_ERROR_CODE . ' ' . date('Y-m-d h:i:s') . ' ErrorCode ' . $this->_ERROR_CODE);
         $array_input['PersonalCard'] = new SOAP_Value('PersonalCard', 'string', $PersonalCard);
         $array_input['Name'] = new SOAP_Value('Name', 'string', $Name);
         $array_input['Account'] = new SOAP_Value('Account', 'string', $Account);
         $array_input['State'] = new SOAP_Value('State', 'string', $State);
         $array_input['ResponseCode'] = new SOAP_Value('ResponseCode', 'string', $this->_ERROR_CODE);
         $array_input['RespString'] = new SOAP_Value('RespString', 'string', $RespString);
         $array_input['OldNewAccount'] = new SOAP_Value('OldNewAccount', 'string', $OldNewAccount);
         return returnXML(func_get_args(), $this->class_name, $function_name, $array_input, $this);
     }
     if (!required($Name)) {
         $this->_ERROR_CODE = 8013;
         $RespString = 'Name is null';
     }
     if ($this->_ERROR_CODE == '0000' && !required($BankAccountNo)) {
         $this->_ERROR_CODE = 8016;
         $RespString = 'BankAccountNo is null';
     }
     if ($this->_ERROR_CODE == '0000' && !required($PersonalCard)) {
         $this->_ERROR_CODE = 8072;
         $RespString = 'PersonalCard is null';
     }
     if ($this->_ERROR_CODE == '0000' && isset($PartnerType) && strlen($PartnerType) > 0 && !in_array($PartnerType, array('C', 'F', 'P'))) {
         $this->_ERROR_CODE = 8028;
         $RespString = 'Invalid PartnerType';
     }
     if ($this->_ERROR_CODE == '0000') {
         $BankName = 'VietComBank';
         $pos = strpos($Name, ' ');
         $FirstName = substr($Name, 0, $pos + 1);
         $LastName = substr($Name, $pos + 1);
         $query = sprintf("CALL Sp_aaaaOpenPrivateAccount_VCB\r\n('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')", $FirstName, $LastName, $PartnerType, $Address, $MailingAddress, $Phone, $MailingPhone, $Email, $dtBirthDay, $PersonalCard, $dtDateIssue, $PlaceIssue, 'F', $BankAccountNo, $Country, $BankName);
         $result = $this->_MDB2_WRITE->extended->getAll($query);
         $this->_MDB2_WRITE->disconnect();
         $Name = '';
         $Address = '';
         $Account = '';
         $Status = '';
         $RespString = '';
         $OldNewAccount = '';
         if (empty($result) || is_object($result)) {
             $this->_ERROR_CODE = 8049;
         } else {
             if (isset($result[0]['varerror'])) {
                 if ($result[0]['varerror'] == -1) {
                     $this->_ERROR_CODE = 8051;
                     //exception
                     $RespString = 'EPS-err : exception';
                 }
                 //if($result[0]['varerror'] == -2) $this->_ERROR_CODE = 18052;// duplicate cardno
                 if ($result[0]['varerror'] == -3) {
                     $this->_ERROR_CODE = 8053;
                     //invalid countryName
                     $RespString = 'EPS-err invalid country name';
                 }
                 if ($result[0]['varerror'] == -4) {
                     $this->_ERROR_CODE = 8054;
                     //update account err
                     $RespString = 'EPS-err update account';
                 }
                 if ($result[0]['varerror'] == -5) {
                     $this->_ERROR_CODE = 8055;
                     //insert investor err
                     $RespString = 'EPS-err insert Investor';
                 }
                 if ($result[0]['varerror'] == -6) {
                     $this->_ERROR_CODE = 8056;
                     //ins MoneyBalance err
                     $RespString = 'EPS-err insert Balance';
                 }
                 if ($result[0]['varerror'] == -2 || $result[0]['varerror'] == 0) {
                     $Name = $result[0]['v_sfullname'];
                     $Address = $result[0]['sresidentaddress'];
                     $Account = $result[0]['v_saccountno'];
                     $Status = $result[0]['v_iisactive'] ? 'A' : 'H';
                     $OldNewAccount = $result[0]['v_icreated'] ? 0 : 1;
                     $RespString = 'Sucess';
                 }
             } else {
                 $this->_ERROR_CODE = 8049;
                 $RespString = 'EPS-err: db err';
             }
         }
     }
     $array_input['PersonalCard'] = new SOAP_Value('PersonalCard', 'string', $PersonalCard);
     $array_input['Name'] = new SOAP_Value('Name', 'string', $Name);
//.........这里部分代码省略.........
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:101,代码来源:classVCB.php

示例15: deleteSetOfEmployee4Group

 function deleteSetOfEmployee4Group($GroupID, $SetOfEmployeeID, $UpdatedBy)
 {
     $function_name = 'deleteSetOfEmployee4Group';
     $struct = '{urn:' . $this->class_name . '}' . $function_name . 'Struct';
     $delete_log = array();
     $lastest_error = 0;
     if (authenUser(func_get_args(), $this, $function_name) > 0) {
         $delete_log[] = sprintf('GroupID:%s;SetOfEmployeeID:%s;UpdatedBy:%s;ErrorCode:%s;ExecutedTime:%s', $GroupID, $SetOfEmployeeID, $UpdatedBy, $this->_ERROR_CODE, date('Y-m-d h:i:s'));
         write_my_log_path("deleteSetOfEmployee4Group", implode("\n --> ", $delete_log), '/home/vhosts/eSMS/htdocs/logs/employee/');
         return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
     }
     if (!required($GroupID) || !unsigned($GroupID) || !required($SetOfEmployeeID)) {
         if (!required($GroupID) || !unsigned($GroupID)) {
             $this->_ERROR_CODE = $lastest_error = 32071;
         }
         if (!required($SetOfEmployeeID)) {
             $this->_ERROR_CODE = $lastest_error = 32070;
         }
         $delete_log[] = sprintf('GroupID:%s;SetOfEmployeeID:%s;UpdatedBy:%s;ErrorCode:%s;ExecutedTime:%s', $GroupID, $SetOfEmployeeID, $UpdatedBy, $this->_ERROR_CODE, date('Y-m-d h:i:s'));
     } else {
         $arr_epm = explode(',', $SetOfEmployeeID);
         $delete_success = array();
         $delete_fail = array();
         $delete_log[] = sprintf('GroupID:%s;SetOfEmployeeID:%s;UpdatedBy:%s;ExecutedTime:%s', $GroupID, $SetOfEmployeeID, $UpdatedBy, date('Y-m-d h:i:s'));
         foreach ($arr_epm as $emp_id) {
             $this->_ERROR_CODE = 0;
             $result = NULL;
             if (!unsigned($emp_id)) {
                 $this->_ERROR_CODE = 32070;
                 $delete_fail[] = trim($emp_id);
             } else {
                 $query = sprintf("CALL sp_deleteEmployeeGroup(%u, %u, '%s')", trim($emp_id), $GroupID, $UpdatedBy);
                 $mdb = initWriteDB();
                 $rs = $mdb->extended->getRow($query);
                 if (empty($rs)) {
                     $this->_ERROR_CODE = 32072;
                     $delete_fail[] = trim($emp_id);
                 } else {
                     $result = $rs['varerror'];
                     if ($result < 0) {
                         $delete_fail[] = trim($emp_id);
                         switch ($result) {
                             case '-1':
                                 $this->_ERROR_CODE = 32073;
                                 break;
                             case '-2':
                                 $this->_ERROR_CODE = 32074;
                                 break;
                         }
                     }
                 }
             }
             if ($this->_ERROR_CODE == 0) {
                 $delete_success[] = trim($emp_id);
             } else {
                 $lastest_error = $this->_ERROR_CODE;
             }
             $delete_log[] = sprintf('GroupID:%s;EmployeeID:%s;UpdatedBy:%s;ErrorCode:%s;ExecutedTime:%s', $GroupID, trim($emp_id), $UpdatedBy, $this->_ERROR_CODE, date('Y-m-d h:i:s'));
         }
         $this->items[] = new SOAP_Value('item', $struct, array("SuccessdedEmployeeID" => new SOAP_Value("SuccessdedEmployeeID", "string", implode(', ', $delete_success)), "FailedEmployeeID" => new SOAP_Value("FailedEmployeeID", "string", implode(', ', $delete_fail))));
     }
     write_my_log_path("deleteSetOfEmployee4Group", implode("\n --> ", $delete_log), '/home/vhosts/eSMS/htdocs/logs/employee/');
     return returnXML(func_get_args(), $this->class_name, $function_name, $lastest_error, $this->items, $this);
 }
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:64,代码来源:classEmployee_251.php


注:本文中的returnXML函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。