[xoops-cvslog 96] CVS update: xoops2jp/extras

Back to archive index

onokazu onoka****@users*****
2005年 6月 11日 (土) 11:32:37 JST


Index: xoops2jp/extras/login.php
diff -u xoops2jp/extras/login.php:1.2 xoops2jp/extras/login.php:1.3
--- xoops2jp/extras/login.php:1.2	Fri Mar 18 21:51:55 2005
+++ xoops2jp/extras/login.php	Sat Jun 11 11:32:37 2005
@@ -6,7 +6,7 @@
 
 include $path.'/mainfile.php';
 if (!defined('XOOPS_ROOT_PATH')) {
-	exit();
+    exit();
 }
 include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/user.php';
 $op = (isset($_POST['op']) && $_POST['op'] == 'dologin') ? 'dologin' : 'login';
@@ -22,15 +22,15 @@
   <head>
     <meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" />
     <meta http-equiv="content-language" content="'._LANGCODE.'" />
-    <title>'.$xoopsConfig['sitename'].'</title>
+    <title>'.htmlspecialchars($xoopsConfig['sitename']).'</title>
     <link rel="stylesheet" type="text/css" media="all" href="'.XOOPS_URL.'/xoops.css" />
 ';
 $style = getcss($xoopsConfig['theme_set']);
 if ($style == '') {
-	$style = xoops_getcss($xoopsConfig['theme_set']);
+    $style = xoops_getcss($xoopsConfig['theme_set']);
 }
 if ($style != '') {
-	echo '<link rel="stylesheet" type="text/css" media="all" href="'.$style.'" />';
+    echo '<link rel="stylesheet" type="text/css" media="all" href="'.$style.'" />';
 }
 echo '
   </head>
@@ -40,44 +40,44 @@
 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)), addslashes($myts->stripSlashesGPC($password)));
     if (is_object($user)) {
-		if (0 == $user->getVar('level')) {
-			redirect_header(XOOPS_URL.'/index.php', 5, _US_NOACTTPADM);
-			exit();
-		}
-		if ($xoopsConfig['closesite'] == 1) {
-			$allowed = false;
-			foreach ($user->getGroups() as $group) {
-				if (in_array($group, $xoopsConfig['closesite_okgrp']) || XOOPS_GROUP_ADMIN == $group) {
-					$allowed = true;
-					break;
-				}
-			}
-			if (!$allowed) {
-				redirect_header(XOOPS_URL.'/index.php', 1, _NOPERM);
-				exit();
-			}
-		}
-		$user->setVar('last_login', time());
-		if (!$member_handler->insertUser($user)) {
-		}
-		$_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&amp;type=ssllogin', _US_PRESSLOGIN, _LOGIN);
-		} else {
-			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>';
-		}
+        if (0 == $user->getVar('level')) {
+            redirect_header(XOOPS_URL.'/index.php', 5, _US_NOACTTPADM);
+            exit();
+        }
+        if ($xoopsConfig['closesite'] == 1) {
+            $allowed = false;
+            foreach ($user->getGroups() as $group) {
+                if (in_array($group, $xoopsConfig['closesite_okgrp']) || XOOPS_GROUP_ADMIN == $group) {
+                    $allowed = true;
+                    break;
+                }
+            }
+            if (!$allowed) {
+                redirect_header(XOOPS_URL.'/index.php', 1, _NOPERM);
+                exit();
+            }
+        }
+        $user->setVar('last_login', time());
+        if (!$member_handler->insertUser($user)) {
+        }
+        $_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&amp;type=ssllogin', _US_PRESSLOGIN, _LOGIN);
+        } else {
+            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>';
+        }
     } else {
         xoops_error(_US_INCORRECTLOGIN.'<br /><a href="login.php">'._BACK.'</a>');
     }
 }
 
 if ($op == 'login') {
-	echo '
+    echo '
     <div style="text-align: center; padding: 5; margin: 0">
     <form action="login.php" method="post">
       <table class="outer" width="95%">
@@ -96,7 +96,7 @@
       </table>
     </form>
     </div>
-	';
+    ';
 }
 
 echo '


xoops-cvslog メーリングリストの案内
Back to archive index