Example #1
0
/**
 * アクセスログを出力します
 */
function putAccessLog($cookieId) {
	$data = array();
	// アクセス時間
	$data[] = date('Y-m-d H:i:s', $_SERVER['REQUEST_TIME']);

	// リクエストURLファイル
	$data[] = $_SERVER['SCRIPT_NAME'];

	// クッキーID
	$data[] = $cookieId;

	// GETとPOSTパラメータ一覧
	$str = "";
	$array = array_merge((array)$_POST, (array)$_GET);
	foreach ($array as $key => $value) {
		$str .= $key . '=' . $value . '&';
	}
	$data[] = $str;

	// クッキー一覧
	$str = "";
	foreach ($_COOKIE as $key => $value) {
		$str .= $key . '=' . $value . '&';
	}
	$data[] = $str;

	// IP
	$data[] = $_SERVER['REMOTE_ADDR'];
	$data[] = $_SERVER['HTTP_X_FORWARDED_FOR'];
	// リファラー
	$data[] = $_SERVER['HTTP_REFERER'];
	// ユーザエージェント
	$data[] = $_SERVER['HTTP_USER_AGENT'];

	// タブでつなげてログ出力
	$str = implode("\t", $data);
	$logger =& CgmCore::getLogger('access.sem');
	$logger->log($str);
}
Example #2
0
require_once '../../conf/config.php';
//↑↑===========nm00142 end==================================
require_once 'CgmCore.php';

//--------------------------------------
// 投稿
//--------------------------------------
$body = $_POST['body'];
$threadId = $_POST['thread_id'];
$isAgree = $_POST['is_agree'];
//↓↓========nm00142 2009/08/13 start===================================
$siteId = $_POST['site_id'];

// マネージャー
//$man =& CgmCore::getThreadManager($threadId);
$man =& CgmCore::getThreadManager($threadId, $siteId);
//↑↑========nm00142 2009/08/13 end=====================================
$d = $man->addMessage($body, $isAgree);

//↓↓===========nm00142 start================================
//↓↓$url = base64_decode(urldecode($_POST['url']));
//↓↓header("Location: {$url}#cgm-01");
$name = base64_decode($_POST['name']);
$uri = base64_decode($_POST['uri']);
if (strstr($uri, "#cgm-01") == false) {
	$uri = $uri."#cgm-01";
}
$url = "http://".$name.$uri;
//echo $url;
header("Location: {$url}");
//↑↑===========nm00142 end==================================