function funcExcelKaigyo($org) { $org_hen = htmlspecialchars_decode($org); $org_hen = my_str_replace("\n", "\r\n", $org_hen, "UTF-8"); return $org_hen; }
/** * Merge two language arrays * This function does all the work. Any missing text strings are copied * over from english.php. Also does some pretty-printing. */ function mergeArrays($ENG, $OTHER, $arrayName, $comment = '') { global $mb, $config_constants; $numElements = count($ENG); $counter = 0; if ($comment !== false) { separator(); } if (!empty($comment)) { $comments = explode("\n", $comment); foreach ($comments as $c) { echo "# {$c}\n"; } } echo "\n\${$arrayName} = array(\n"; foreach ($ENG as $key => $txt) { $counter++; if (is_numeric($key)) { echo " {$key} => "; } else { echo " '{$key}' => "; } if (empty($OTHER[$key])) { // string does not exist in other language - use English text $newText = $txt; } else { if (isset($ENG[$key]) && empty($ENG[$key])) { // string is now empty in English language file - remove it $newText = ''; } else { // string exists in other language - keep it $newText = $OTHER[$key]; } } if (!is_array($newText)) { $newText = my_str_replace("\n", '\\n', $newText); } if (is_array($newText)) { // mainly for the config selects if (!empty($OTHER[$key]) && count($ENG[$key]) != count($OTHER[$key])) { // In case there are new entries for a config, merge those // into the existing one to keep the translation intact. // Note: We can't use array_merge() or "+" since we want to // keep the original order intact. $newText = array(); foreach ($ENG[$key] as $eKey => $eValue) { $oKey = array_search($eValue, $OTHER[$key], true); if ($oKey === false) { $newText[$eKey] = $eValue; } else { $newText[$oKey] = $eValue; } } } $quotedText = 'array('; foreach ($newText as $nKey => $nTxt) { $quotedText .= "'" . my_str_replace("'", "\\'", $nKey) . "' => "; if ($nTxt === true) { $quotedText .= 'true'; } elseif ($nTxt === false) { $quotedText .= 'false'; } elseif (is_numeric($nTxt)) { $quotedText .= $nTxt; } elseif (in_array($nTxt, $config_constants)) { $quotedText .= $nTxt; } else { $quotedText .= "'" . my_str_replace("'", "\\'", $nTxt) . "'"; } $quotedText .= ', '; } if ($mb) { $quotedText = mb_substr($quotedText, 0, -2); } else { $quotedText = substr($quotedText, 0, -2); } $quotedText .= ')'; // hack for this special case ... if ($quotedText == "array('True' => 1, 'False' => '')") { $quotedText = "array('True' => TRUE, 'False' => FALSE)"; } // ??? $quotedText = mb_ereg_replace("\n", '\n', $quotedtext); } else { $quotedText = prepareText($newText); } $quotedText = makeXHTML($quotedText); if ($counter != $numElements) { $quotedText .= ','; } echo "{$quotedText}\n"; } if ($comment === false) { echo ");\n"; } else { echo ");\n\n"; } }
require_once "../common/common.php"; try { $data = rhePDO($_REQUEST); foreach ($data as $column => $val) { ${$column} = $val; } if (!funcPdoConnect($pdo)) { throw new Exception("PDO::error:" . $pdo->errorCode() . ":" . $pdo->errorInfo()); } funcPdoClear($arrNm, $arrVal, $arrType); $strQuery = "select * from m_original " . "where del_dt is NULL and replace(replace(org_nm,' ',''),' ','')=:org_nm and org_birthday=:org_birthday "; $member_nm = my_str_replace(" ", "", $member_nm, "UTF-8"); $member_nm = my_str_replace(" ", "", $member_nm, "UTF-8"); funcPdoParaSet(":org_nm", $member_nm, PDO::PARAM_STR, $arrNm, $arrVal, $arrType); $member_birthday = my_str_replace("/", "-", $member_birthday, "UTF-8"); funcPdoParaSet(":org_birthday", $member_birthday, PDO::PARAM_STR, $arrNm, $arrVal, $arrType); if (!($pdo_st = funcPdoSelect($pdo, $strQuery, $arrNm, $arrVal, $arrType))) { throw new Exception("PDO::error:" . $pdo->errorCode() . ":" . $pdo->errorInfo()); } if ($pdo_st->rowCount() == 0) { echo "NG"; } else { echo "OK"; } exit; } catch (Exception $e) { $msg = "エラー発生:" . $e->getMessage(); if ($comDEBUG) { echo $msg; }