Minahito
minah****@users*****
2006年 9月 2日 (土) 16:28:47 JST
Index: xoops2jp/extras/login.php diff -u xoops2jp/extras/login.php:1.2.8.1 xoops2jp/extras/login.php:1.2.8.2 --- xoops2jp/extras/login.php:1.2.8.1 Wed Oct 19 02:10:59 2005 +++ xoops2jp/extras/login.php Sat Sep 2 16:28:46 2006 @@ -17,8 +17,7 @@ $op ='login'; } -echo ' -<html> +$header = '<html> <head> <meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" /> <meta http-equiv="content-language" content="'._LANGCODE.'" /> @@ -30,9 +29,9 @@ $style = xoops_getcss($xoopsConfig['theme_set']); } if ($style != '') { - echo '<link rel="stylesheet" type="text/css" media="all" href="'.$style.'" />'; + $header .= '<link rel="stylesheet" type="text/css" media="all" href="'.$style.'" />'; } -echo ' +$header .= ' </head> <body> '; @@ -40,7 +39,7 @@ if ($op == 'dologin') { $member_handler =& xoops_gethandler('member'); $myts =& MyTextsanitizer::getInstance(); - $user =& $member_handler->loginUser(addslashes($myts->stripSlashesGPC($username)), addslashes($myts->stripSlashesGPC($password))); + $user =& $member_handler->loginUser(addslashes($myts->stripSlashesGPC($username)), $myts->stripSlashesGPC($password)); if (is_object($user)) { if (0 == $user->getVar('level')) { redirect_header(XOOPS_URL.'/index.php', 5, _US_NOACTTPADM); @@ -62,12 +61,15 @@ $user->setVar('last_login', time()); if (!$member_handler->insertUser($user)) { } + require_once XOOPS_ROOT_PATH . '/include/session.php'; + xoops_session_regenerate(); $_SESSION = array(); $_SESSION['xoopsUserId'] = $user->getVar('uid'); $_SESSION['xoopsUserGroups'] = $user->getGroups(); if (!empty($xoopsConfig['use_ssl'])) { xoops_confirm(array($xoopsConfig['sslpost_name'] => session_id()), XOOPS_URL.'/misc.php?action=showpopups&type=ssllogin', _US_PRESSLOGIN, _LOGIN); } else { + echo $header; echo sprintf(_US_LOGGINGU, $user->getVar('uname')); echo '<div style="text-align:center;"><input value="'._CLOSE.'" type="button" onclick="document.window.opener.location.reload();document.window.close();" /></div>'; } @@ -77,6 +79,7 @@ } if ($op == 'login') { + echo $header; echo ' <div style="text-align: center; padding: 5; margin: 0"> <form action="login.php" method="post">