コード例 #1
0
ファイル: index.php プロジェクト: SmartPCGuy/fxphp
 $errorMessage = 'None';
 if (strtolower($FXE_action) == 'update') {
     $FXQuery->SetDBData($FXE_currentDatabaseName, $FXE_currentLayoutName);
     session_name('FXE_sessionID');
     session_start();
     if (!isset($HTTP_SESSION_VARS['currentLayout']) || isset($HTTP_SESSION_VARS['currentLayout']) && $HTTP_SESSION_VARS['currentLayout'] != $FXE_currentLayoutName) {
         $editFields = array();
         $HTTP_SESSION_VARS['currentLayout'] = $FXE_currentLayoutName;
         foreach ($formParams as $key => $value) {
             if ($key != '-recid' && strcasecmp($key, '-foundSetParams_begin') != 0 && strcasecmp($key, '-foundSetParams_end') != 0) {
                 if (is_array($value)) {
                     $value = implode("\n", $value);
                 }
                 $FXQuery->AddDBParam('-recid', $FXE_currentRecord);
                 $FXQuery->AddDBParam($key, $value);
                 $updateResult = $FXQuery->FMEdit(true, 'basic');
             }
             if ($key == '-recid' || isset($updateResult['errorCode']) && $updateResult['errorCode'] == 0) {
                 $editFields[] = $key;
             }
         }
         $HTTP_SESSION_VARS['editFields'] = serialize($editFields);
     } else {
         $editFields = unserialize($HTTP_SESSION_VARS['editFields']);
         foreach ($editFields as $key => $value) {
             if (is_array($formParams[$value])) {
                 $formParams[$value] = implode("\n", $formParams[$value]);
             }
             $FXQuery->AddDBParam($value, $formParams[$value]);
         }
         $updateResult = $FXQuery->FMEdit();
コード例 #2
0
You will only need something like a layout for example by the name of: xmlOrderStatusFlag
with only one number field orderStatus

and to update this order you will only need the order number from $_SESSION[$myaccount][$currentorder]
of some sort to find the -recid in /var/www/com.example.www/xml/order/<<ordernumber>>.xml

And to set the orderStatus from WorldPay or the likes, saying paid in full is 5,
you will have to do an FMEdit of -recid found above, to set the orderStatus
*/
$q = new FX($dinnerForOne, $sandeman);
$q->SetDBData('WorldWideWait', 'xmlOrderStatusFlag');
$q->AddDBParam('-recid', $recid);
$q->AddDBParam('orderStatus', 5);
$q->SetDBPassword($xmlPass, $xmlUser);
$r = $q->FMEdit();
print_r($r);
/*
Part of the struggle with FileMaker's XML RPC is that it only serves on 1 NIC,
with this apporach we avoid using those NICs, we actually publish this on the disk,
and let nginx or apache handle fopen calls from its 0.0.0.0

most normal servers serve to the local routing table 0.0.0.0, while FMSA serves to 1 of the NICs on your FMSA,
this is a bit of a paranoid approach and and is a very efficient way of creating a bottle neck.

Imagine an FMSA node with several NICs

1 NIC for LAN FMAPP users
1 NIC for WAN FMAPP users
1 NIC for WPE used with mailrobots
1 NIC for WPE used with webservices