Changeset 16230
- Timestamp:
- 2007/10/02 15:14:36 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/data/class/SC_Customer.php
r16188 r16230 190 190 $_SESSION['customer'] = $this->customer_data; 191 191 // セッション情報の保存 192 GC_Utils_Ex::gfPrintLog("access : user=".$this->customer_data['customer_id'] ."\t"."ip=". $ _SERVER['REMOTE_HOST'], CUSTOMER_LOG_PATH );192 GC_Utils_Ex::gfPrintLog("access : user=".$this->customer_data['customer_id'] ."\t"."ip=". $this->getRemoteHost(), CUSTOMER_LOG_PATH ); 193 193 } 194 194 … … 198 198 unset($_SESSION['customer']); 199 199 // ログに記録する 200 GC_Utils_Ex::gfPrintLog("logout : user=".$this->customer_data['customer_id'] ."\t"."ip=". $ _SERVER['REMOTE_HOST'], CUSTOMER_LOG_PATH );200 GC_Utils_Ex::gfPrintLog("logout : user=".$this->customer_data['customer_id'] ."\t"."ip=". $this->getRemoteHost(), CUSTOMER_LOG_PATH ); 201 201 } 202 202 … … 250 250 return false; 251 251 } 252 253 /** 254 * $_SERVER['REMOTE_HOST'] または $_SERVER['REMOTE_ADDR'] を返す. 255 * 256 * $_SERVER['REMOTE_HOST'] が取得できない場合は $_SERVER['REMOTE_ADDR'] 257 * を返す. 258 * 259 * @return string $_SERVER['REMOTE_HOST'] 又は $_SERVER['REMOTE_ADDR']の文字列 260 */ 261 function getRemoteHost() { 262 263 if (!empty($_SERVER['REMOTE_HOST'])) { 264 return $_SERVER['REMOTE_HOST']; 265 } elseif (!empty($_SERVER['REMOTE_ADDR'])) { 266 return $_SERVER['REMOTE_ADDR']; 267 } else { 268 return ""; 269 } 270 } 252 271 } 253 272 ?>
Note: See TracChangeset
for help on using the changeset viewer.