Esempio n. 1
0
/* Modified by Masayuki Nii (2004/3/23), for Japanese language supporting. */
/* Modified by Masayuki Nii (2004/8/13), for adding Japanese field name support. */
/* Modified by Masayuki Nii (2004/9/4), for UTF-8. */
header('Content-Type: text/html;charset=utf-8');
// Added by msyk 2004/3/23
// For avoiding MOJI-BAKE( invalid character ), please saving this file by UTF-8 chacter set.
// このファイルはUTF-8で保存して利用してください。
include_once 'FX_charset.php';
// FX_charset.php contains the class for pulling data
// from FileMaker into PHP -- 'include_once()'
// makes sure the class is only declared once.
include_once 'server_data.php';
// To make sure that these examples work for you, be sure
// to set the IP address of your server in server_data.php
// IMPORTANT: The leading '$' denotes a variable in PHP
$BookQuery = new FX_charset($serverIP, $webCompanionPort, 'FMPro7');
// This line creates an instance of the FX class
// If you use version 6 pro/unlimited, modify to 'FMPro5/6' from 'FMPro7'.
//$BookQuery->SetCharacterEncoding('utf8');	// Added by msyk 2004/3/23
// These lines pass the character set information to FX class.
//$BookQuery->SetDataParamsEncoding('SJIS');
// If you use version 6 pro/unlimited, you need this statement.
//If you want to use UTF-8 only, you don't need to abve methods for FX_charset class.
$BookQuery->SetDBData("Book_List.fp7", "Detail_View");
// The '->' indicates that SetDBData is part of the FX instance we just created.
$arrayName = 'HTTP_' . $HTTP_SERVER_VARS["REQUEST_METHOD"] . '_VARS';
// Note the '$$' a couple of lines down.  I'm using a variable
// whose name is the contents of another variable.  VERY handy.
// **** Added by msyk 2004/3/23 **** To make a new record in DB.
if (${$arrayName}['currentQuery'] == 'New Record') {
    foreach ($HTTP_POST_VARS as $key => $value) {
Esempio n. 2
0
// '<?' or '<?php' tells PHP to start parsing
/********************************************************************
 * The comments herein are designed to be helpful to someone with	*
 * little or no programming experience.  To that end, many of the	*
 * comments may address things will appear obvious to many coders.   *
 * For the most part I'll place my comments at the end of each line. *
 * Feel free to e-mail any comments or questions to FX@iviking.org.  *
 * Please remember that this code is being released as open source   *
 * under The Artistic License of PERL fame:						  *
 * http://www.opensource.org/licenses/artistic-license.html		  *
 *********************************************************************/
/* Modified by Masayuki Nii (2004/8/13), for adding Japanese field name support. */
header('Content-Type: text/html;charset=EUC-JP');
// Added by msyk 2004/8/13
// For avoiding MOJI-BAKE( invalid character ), please saving this file by EUC chacter set.
// このファイルはEUCで保存して利用してください。
include_once 'FX_charset.php';
// FX.php contains the class for pulling data
// from FileMaker into PHP -- 'include_once()'
// makes sure the class is only declared once.
include_once 'server_data.php';
// To make sure that these examples work for you, be sure
// to set the IP address of your server in server_data.php
// IMPORTANT: The leading '$' denotes a variable in PHP
$BookQuery = new FX_charset($serverIP, $webCompanionPort, 'FMPro7');
// This line creates an instance of the FX class
// If you use version 6 pro/unlimited, modify to 'FMPro5/6' from 'FMPro7'.
$BookQuery->SetCharacterEncoding('EUC-JP');
// Added by msyk 2004/8/13
$BookQuery->SetDataParamsEncoding('UTF-8');
$BookQuery->SetDBData("Book_List", "Detail_View");
Esempio n. 3
0
 *********************************************************************/
/* Modified by Masayuki Nii (2004/3/23), for Japanese language supporting. */
/* Modified by Masayuki Nii (2004/8/13), for adding Japanese field name support. */
header('Content-Type: text/html;charset=EUC-JP');
// Added by msyk 2004/3/23
// For avoiding MOJI-BAKE( invalid character ), please saving this file by EUC chacter set.
// このファイルはEUCで保存して利用してください。
include_once 'FX_charset.php';
// FX.php contains the class for pulling data
// from FileMaker into PHP -- 'include_once()'
// makes sure the class is only declared once.
include_once 'server_data.php';
// To make sure that these examples work for you, be sure
// to set the IP address of your server in server_data.php
// IMPORTANT: The leading '$' denotes a variable in PHP
$BookQuery = new FX_charset($serverIP, $webCompanionPort, 'FMPro7');
// This line creates an instance of the FX class
// If you use version 6 pro/unlimited, modify to 'FMPro5/6' from 'FMPro7'.
$BookQuery->SetCharacterEncoding('EUC-JP');
// Added by msyk 2004/3/23
// These lines pass the character set information to FX class.
$BookQuery->SetDataParamsEncoding('UTF-8');
// When you use  EUC-JP for the character encoding, you need to specify
// the data parameter encoding in spite of FMS7Adv.
//    FMS7Adv -> 'UTF-8',  FM6 -> 'SJIS'  for Japanese.
$BookQuery->SetDBData("Book_List.fp7", "Detail_View");
// The '->' indicates that SetDBData is part of the FX instance we just created.
$arrayName = 'HTTP_' . $HTTP_SERVER_VARS["REQUEST_METHOD"] . '_VARS';
// Note the '$$' a couple of lines down.  I'm using a variable
// whose name is the contents of another variable.  VERY handy.
// **** Added by msyk 2004/3/23 **** To make a new record in DB.
Esempio n. 4
0
 * http://www.opensource.org/licenses/artistic-license.html		  *
 *********************************************************************/
/* Modified by Masayuki Nii (2004/8/13), for adding Japanese field name support. */
header('Content-Type: text/html;charset=utf-8');
// Added by msyk 2004/8/13
// For avoiding MOJI-BAKE( invalid character ), please saving this file by UTF-8 chacter set.
// このファイルはUTF-8で保存して利用してください。
include_once 'FX_charset.php';
// FX_charset.php contains the class for pulling data
// from FileMaker into PHP -- 'include_once()'
// makes sure the class is only declared once.
include_once 'server_data.php';
// To make sure that these examples work for you, be sure
// to set the IP address of your server in server_data.php
// IMPORTANT: The leading '$' denotes a variable in PHP
$BookQuery = new FX_charset($serverIP, $webCompanionPort, 'FMPro7');
// This line creates an instance of the FX class
// If you use version 6 pro/unlimited, modify to 'FMPro5/6' from 'FMPro7'.
//$BookQuery->SetCharacterEncoding('utf8');	// Added by msyk 2004/8/13
//$BookQuery->SetDataParamsEncoding('SJIS');	// Added by msyk 2004/8/13
//If you want to use UTF-8 only, you don't need to abve methods for FX_charset class.
$BookQuery->SetDBData("Book_List", "Detail_View");
// The '->' indicates that SetDBData is part of the FX instance we just created.
$BookQuery->AddDBParam('-recid', $HTTP_GET_VARS['ID']);
// '-recid' is a reference to the unique ID that FileMaker
// creates for each record.  You'll also note that PHP
// recognizes the parameters passed from the last page ('ID').
$query = $HTTP_GET_VARS['query'];
$BookData = $BookQuery->FMFind();
$currentKey = key($BookData['data']);
// From the online PHP manual: