<?php $gotourl=TGET('gotourl'); $DBConn->connect(true); member_refresh_login($DBConn); $mb_id=current_mb_id(); if (!$gotourl) $gotourl="./"; $urlpath=parseURL($gotourl,PHP_URL_PATH); parse_str(parseURL($gotourl,PHP_URL_QUERY),$urlparams); if (basename($urlpath.'a')=="a" && !$urlparams['cmd']) $gotourl=$urlpath; $gotourl=ereg_replace('/m(-[a-zA-Z0-9]+)?/','/m-'.urlencode(session_id()).'/',$gotourl); if (NOCOOKIE && strpos($gotourl,'/m-')===false) $gotourl='/m-'.urlencode(session_id()).($gotourl[0]=='/'?'':'/').$gotourl; header("Location: ".$gotourl); ?>