[xoops-cvslog 2281] CVS update: xoops2jp/html

Zurück zum Archiv-Index

onokazu onoka****@users*****
2006年 2月 5日 (日) 14:19:52 JST


Index: xoops2jp/html/header.php
diff -u xoops2jp/html/header.php:1.5 xoops2jp/html/header.php:1.5.4.1
--- xoops2jp/html/header.php:1.5	Mon Sep  5 05:46:08 2005
+++ xoops2jp/html/header.php	Sun Feb  5 14:19:52 2006
@@ -1,5 +1,5 @@
 <?php
-// $Id: header.php,v 1.5 2005/09/04 20:46:08 onokazu Exp $
+// $Id: header.php,v 1.5.4.1 2006/02/05 05:19:52 onokazu Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -144,11 +144,11 @@
                     continue;
                 }
                 $xoopsTpl->assign_by_ref('block', $bresult);
-                $bcontent =& $xoopsTpl->fetch('db:'.$btpl, 'blk_'.$block_arr[$i]->getVar('bid'));
+                $bcontent = $xoopsTpl->fetch('db:'.$btpl, 'blk_'.$block_arr[$i]->getVar('bid'));
                 $xoopsTpl->clear_assign('block');
             } else {
                 $xoopsLogger->addBlock($block_arr[$i]->getVar('name'), true, $bcachetime);
-                $bcontent =& $xoopsTpl->fetch('db:'.$btpl, 'blk_'.$block_arr[$i]->getVar('bid'));
+                $bcontent = $xoopsTpl->fetch('db:'.$btpl, 'blk_'.$block_arr[$i]->getVar('bid'));
             }
         } else {
             $bid = $block_arr[$i]->getVar('bid');
@@ -159,11 +159,11 @@
                     continue;
                 }
                 $xoopsTpl->assign_by_ref('dummy_content', $bresult['content']);
-                $bcontent =& $xoopsTpl->fetch('db:system_dummy.html', 'blk_'.$bid);
+                $bcontent = $xoopsTpl->fetch('db:system_dummy.html', 'blk_'.$bid);
                 $xoopsTpl->clear_assign('block');
             } else {
                 $xoopsLogger->addBlock($block_arr[$i]->getVar('name'), true, $bcachetime);
-                $bcontent =& $xoopsTpl->fetch('db:system_dummy.html', 'blk_'.$bid);
+                $bcontent = $xoopsTpl->fetch('db:system_dummy.html', 'blk_'.$bid);
             }
         }
         switch ($block_arr[$i]->getVar('side')) {
Index: xoops2jp/html/lostpass.php
diff -u xoops2jp/html/lostpass.php:1.3 xoops2jp/html/lostpass.php:1.3.6.1
--- xoops2jp/html/lostpass.php:1.3	Wed Aug  3 21:39:11 2005
+++ xoops2jp/html/lostpass.php	Sun Feb  5 14:19:52 2006
@@ -1,5 +1,5 @@
 <?php
-// $Id: lostpass.php,v 1.3 2005/08/03 12:39:11 onokazu Exp $
+// $Id: lostpass.php,v 1.3.6.1 2006/02/05 05:19:52 onokazu Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -30,70 +30,70 @@
 $email = isset($_GET['email']) ? trim($_GET['email']) : '';
 $email = isset($_POST['email']) ? trim($_POST['email']) : $email;
 if ($email == '') {
-	redirect_header("user.php",2,_US_SORRYNOTFOUND);
-	exit();
+    redirect_header("user.php",2,_US_SORRYNOTFOUND);
+    exit();
 }
 
 $myts =& MyTextSanitizer::getInstance();
 $member_handler =& xoops_gethandler('member');
-$getuser =& $member_handler->getUsers(new Criteria('email', $myts->addSlashes($email)));
+$getuser = $member_handler->getUsers(new Criteria('email', $myts->addSlashes($email)));
 
 if (empty($getuser)) {
-	redirect_header("user.php",2,_US_SORRYNOTFOUND);
-	exit();
+    redirect_header("user.php",2,_US_SORRYNOTFOUND);
+    exit();
 } else {
-	$code = isset($_GET['code']) ? trim($_GET['code']) : '';
-	$areyou = substr($getuser[0]->getVar("pass"), 0, 5);
-	if ($code != '' && $areyou == $code) {
-		$newpass = xoops_makepass();
-		$xoopsMailer =& getMailer();
-		$xoopsMailer->useMail();
-		$xoopsMailer->setTemplate("lostpass2.tpl");
-		$xoopsMailer->assign("SITENAME", $xoopsConfig['sitename']);
-		$xoopsMailer->assign("ADMINMAIL", $xoopsConfig['adminmail']);
-		$xoopsMailer->assign("SITEURL", XOOPS_URL."/");
-		$xoopsMailer->assign("IP", $_SERVER['REMOTE_ADDR']);
-		$xoopsMailer->assign("NEWPWD", $newpass);
-		$xoopsMailer->setToUsers($getuser[0]);
-		$xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
-		$xoopsMailer->setFromName($xoopsConfig['sitename']);
-		$xoopsMailer->setSubject(sprintf(_US_NEWPWDREQ,XOOPS_URL));
-		if ( !$xoopsMailer->send() ) {
-			echo $xoopsMailer->getErrors();
-		}
+    $code = isset($_GET['code']) ? trim($_GET['code']) : '';
+    $areyou = substr($getuser[0]->getVar("pass"), 0, 5);
+    if ($code != '' && $areyou == $code) {
+        $newpass = xoops_makepass();
+        $xoopsMailer =& getMailer();
+        $xoopsMailer->useMail();
+        $xoopsMailer->setTemplate("lostpass2.tpl");
+        $xoopsMailer->assign("SITENAME", $xoopsConfig['sitename']);
+        $xoopsMailer->assign("ADMINMAIL", $xoopsConfig['adminmail']);
+        $xoopsMailer->assign("SITEURL", XOOPS_URL."/");
+        $xoopsMailer->assign("IP", $_SERVER['REMOTE_ADDR']);
+        $xoopsMailer->assign("NEWPWD", $newpass);
+        $xoopsMailer->setToUsers($getuser[0]);
+        $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
+        $xoopsMailer->setFromName($xoopsConfig['sitename']);
+        $xoopsMailer->setSubject(sprintf(_US_NEWPWDREQ,XOOPS_URL));
+        if ( !$xoopsMailer->send() ) {
+            echo $xoopsMailer->getErrors();
+        }
 
-		// Next step: add the new password to the database
-		$sql = sprintf("UPDATE %s SET pass = '%s' WHERE uid = %u", $xoopsDB->prefix("users"), md5($newpass), $getuser[0]->getVar('uid'));
-		if ( !$xoopsDB->queryF($sql) ) {
-			include "header.php";
-			echo _US_MAILPWDNG;
-			include "footer.php";
-			exit();
-		}
-		redirect_header("user.php", 3, sprintf(_US_PWDMAILED,$getuser[0]->getVar("uname")), false);
-		exit();
-	// If no Code, send it
-	} else {
-		$xoopsMailer =& getMailer();
-		$xoopsMailer->useMail();
-		$xoopsMailer->setTemplate("lostpass1.tpl");
-		$xoopsMailer->assign("SITENAME", $xoopsConfig['sitename']);
-		$xoopsMailer->assign("ADMINMAIL", $xoopsConfig['adminmail']);
-		$xoopsMailer->assign("SITEURL", XOOPS_URL."/");
-		$xoopsMailer->assign("IP", $_SERVER['REMOTE_ADDR']);
-		$xoopsMailer->assign("NEWPWD_LINK", XOOPS_URL."/lostpass.php?email=".$email."&code=".$areyou);
-		$xoopsMailer->setToUsers($getuser[0]);
-		$xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
-		$xoopsMailer->setFromName($xoopsConfig['sitename']);
-		$xoopsMailer->setSubject(sprintf(_US_NEWPWDREQ,$xoopsConfig['sitename']));
-		include "header.php";
-		if ( !$xoopsMailer->send() ) {
-			echo $xoopsMailer->getErrors();
-		}
-		echo "<h4>";
-		printf(_US_CONFMAIL,$getuser[0]->getVar("uname"));
-		echo "</h4>";
-		include "footer.php";
-	}
+        // Next step: add the new password to the database
+        $sql = sprintf("UPDATE %s SET pass = '%s' WHERE uid = %u", $xoopsDB->prefix("users"), md5($newpass), $getuser[0]->getVar('uid'));
+        if ( !$xoopsDB->queryF($sql) ) {
+            include "header.php";
+            echo _US_MAILPWDNG;
+            include "footer.php";
+            exit();
+        }
+        redirect_header("user.php", 3, sprintf(_US_PWDMAILED,$getuser[0]->getVar("uname")), false);
+        exit();
+    // If no Code, send it
+    } else {
+        $xoopsMailer =& getMailer();
+        $xoopsMailer->useMail();
+        $xoopsMailer->setTemplate("lostpass1.tpl");
+        $xoopsMailer->assign("SITENAME", $xoopsConfig['sitename']);
+        $xoopsMailer->assign("ADMINMAIL", $xoopsConfig['adminmail']);
+        $xoopsMailer->assign("SITEURL", XOOPS_URL."/");
+        $xoopsMailer->assign("IP", $_SERVER['REMOTE_ADDR']);
+        $xoopsMailer->assign("NEWPWD_LINK", XOOPS_URL."/lostpass.php?email=".$email."&code=".$areyou);
+        $xoopsMailer->setToUsers($getuser[0]);
+        $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
+        $xoopsMailer->setFromName($xoopsConfig['sitename']);
+        $xoopsMailer->setSubject(sprintf(_US_NEWPWDREQ,$xoopsConfig['sitename']));
+        include "header.php";
+        if ( !$xoopsMailer->send() ) {
+            echo $xoopsMailer->getErrors();
+        }
+        echo "<h4>";
+        printf(_US_CONFMAIL,$getuser[0]->getVar("uname"));
+        echo "</h4>";
+        include "footer.php";
+    }
 }
 ?>
\ No newline at end of file
Index: xoops2jp/html/userinfo.php
diff -u xoops2jp/html/userinfo.php:1.2 xoops2jp/html/userinfo.php:1.2.16.1
--- xoops2jp/html/userinfo.php:1.2	Fri Mar 18 21:51:55 2005
+++ xoops2jp/html/userinfo.php	Sun Feb  5 14:19:52 2006
@@ -1,5 +1,5 @@
 <?php
-// $Id: userinfo.php,v 1.2 2005/03/18 12:51:55 onokazu Exp $
+// $Id: userinfo.php,v 1.2.16.1 2006/02/05 05:19:52 onokazu Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -33,60 +33,60 @@
 
 $uid = intval($_GET['uid']);
 if ($uid <= 0) {
-	redirect_header('index.php', 3, _US_SELECTNG);
-	exit();
+    redirect_header('index.php', 3, _US_SELECTNG);
+    exit();
 }
 
 $gperm_handler = & xoops_gethandler( 'groupperm' );
 $groups = ( $xoopsUser ) ? $xoopsUser -> getGroups() : XOOPS_GROUP_ANONYMOUS;
 
-$isAdmin = $gperm_handler->checkRight( 'system_admin', XOOPS_SYSTEM_USER, $groups);			// isadmin is true if user has 'edit users' admin rights
+$isAdmin = $gperm_handler->checkRight( 'system_admin', XOOPS_SYSTEM_USER, $groups);         // isadmin is true if user has 'edit users' admin rights
 
 if (is_object($xoopsUser)) {
-	if ($uid == $xoopsUser->getVar('uid')) {
-		$config_handler =& xoops_gethandler('config');
-		$xoopsConfigUser =& $config_handler->getConfigsByCat(XOOPS_CONF_USER);
-		$xoopsOption['template_main'] = 'system_userinfo.html';
-		include XOOPS_ROOT_PATH.'/header.php';
-		$xoopsTpl->assign('user_ownpage', true);
-		$xoopsTpl->assign('lang_editprofile', _US_EDITPROFILE);
-		$xoopsTpl->assign('lang_avatar', _US_AVATAR);
-		$xoopsTpl->assign('lang_inbox', _US_INBOX);
-		$xoopsTpl->assign('lang_logout', _US_LOGOUT);
-		if ($xoopsConfigUser['self_delete'] == 1) {
-			$xoopsTpl->assign('user_candelete', true);
-			$xoopsTpl->assign('lang_deleteaccount', _US_DELACCOUNT);
-		} else {
-			$xoopsTpl->assign('user_candelete', false);
-		}
-		$thisUser =& $xoopsUser;
-	} else {
-		$member_handler =& xoops_gethandler('member');
-		$thisUser =& $member_handler->getUser($uid);
-		if (!is_object($thisUser) || !$thisUser->isActive() ) {
-			redirect_header("index.php",3,_US_SELECTNG);
-			exit();
-		}
-		$xoopsOption['template_main'] = 'system_userinfo.html';
-		include XOOPS_ROOT_PATH.'/header.php';
-		$xoopsTpl->assign('user_ownpage', false);
-	}
+    if ($uid == $xoopsUser->getVar('uid')) {
+        $config_handler =& xoops_gethandler('config');
+        $xoopsConfigUser =& $config_handler->getConfigsByCat(XOOPS_CONF_USER);
+        $xoopsOption['template_main'] = 'system_userinfo.html';
+        include XOOPS_ROOT_PATH.'/header.php';
+        $xoopsTpl->assign('user_ownpage', true);
+        $xoopsTpl->assign('lang_editprofile', _US_EDITPROFILE);
+        $xoopsTpl->assign('lang_avatar', _US_AVATAR);
+        $xoopsTpl->assign('lang_inbox', _US_INBOX);
+        $xoopsTpl->assign('lang_logout', _US_LOGOUT);
+        if ($xoopsConfigUser['self_delete'] == 1) {
+            $xoopsTpl->assign('user_candelete', true);
+            $xoopsTpl->assign('lang_deleteaccount', _US_DELACCOUNT);
+        } else {
+            $xoopsTpl->assign('user_candelete', false);
+        }
+        $thisUser =& $xoopsUser;
+    } else {
+        $member_handler =& xoops_gethandler('member');
+        $thisUser =& $member_handler->getUser($uid);
+        if (!is_object($thisUser) || !$thisUser->isActive() ) {
+            redirect_header("index.php",3,_US_SELECTNG);
+            exit();
+        }
+        $xoopsOption['template_main'] = 'system_userinfo.html';
+        include XOOPS_ROOT_PATH.'/header.php';
+        $xoopsTpl->assign('user_ownpage', false);
+    }
 } else {
-	$member_handler =& xoops_gethandler('member');
-	$thisUser =& $member_handler->getUser($uid);
-	if (!is_object($thisUser) || !$thisUser->isActive()) {
-		redirect_header("index.php",3,_US_SELECTNG);
-		exit();
-	}
-	$xoopsOption['template_main'] = 'system_userinfo.html';
-	include(XOOPS_ROOT_PATH.'/header.php');
-	$xoopsTpl->assign('user_ownpage', false);
+    $member_handler =& xoops_gethandler('member');
+    $thisUser =& $member_handler->getUser($uid);
+    if (!is_object($thisUser) || !$thisUser->isActive()) {
+        redirect_header("index.php",3,_US_SELECTNG);
+        exit();
+    }
+    $xoopsOption['template_main'] = 'system_userinfo.html';
+    include(XOOPS_ROOT_PATH.'/header.php');
+    $xoopsTpl->assign('user_ownpage', false);
 }
 $myts =& MyTextSanitizer::getInstance();
 if ( is_object($xoopsUser) && $isAdmin ) {
-	$xoopsTpl->assign('lang_editprofile', _US_EDITPROFILE);
-	$xoopsTpl->assign('lang_deleteaccount', _US_DELACCOUNT);
-	$xoopsTpl->assign('user_uid', $thisUser->getVar('uid'));
+    $xoopsTpl->assign('lang_editprofile', _US_EDITPROFILE);
+    $xoopsTpl->assign('lang_deleteaccount', _US_DELACCOUNT);
+    $xoopsTpl->assign('user_uid', $thisUser->getVar('uid'));
 }
 $xoopsTpl->assign('lang_allaboutuser', sprintf(_US_ALLABOUT,$thisUser->getVar('uname')));
 $xoopsTpl->assign('lang_avatar', _US_AVATAR);
@@ -129,63 +129,63 @@
 $xoopsTpl->assign('user_signature', $myts->makeTareaData4Show($thisUser->getVar('user_sig', 'N'),0,1,1));
 
 if ($thisUser->getVar('user_viewemail') == 1) {
-	$xoopsTpl->assign('user_email', $thisUser->getVar('email', 'E'));
+    $xoopsTpl->assign('user_email', $thisUser->getVar('email', 'E'));
 } else {
-	if (is_object($xoopsUser)) {
-	 	// All admins will be allowed to see emails, even those that are not allowed to edit users (I think it's ok like this)
-		if ($xoopsUserIsAdmin || ($xoopsUser->getVar("uid") == $thisUser->getVar("uid"))) {
-			$xoopsTpl->assign('user_email', $thisUser->getVar('email', 'E'));
-		} else {
-			$xoopsTpl->assign('user_email', '&nbsp;');
-		}
-	}
+    if (is_object($xoopsUser)) {
+        // All admins will be allowed to see emails, even those that are not allowed to edit users (I think it's ok like this)
+        if ($xoopsUserIsAdmin || ($xoopsUser->getVar("uid") == $thisUser->getVar("uid"))) {
+            $xoopsTpl->assign('user_email', $thisUser->getVar('email', 'E'));
+        } else {
+            $xoopsTpl->assign('user_email', '&nbsp;');
+        }
+    }
 }
 if (is_object($xoopsUser)) {
-	$xoopsTpl->assign('user_pmlink', "<a href=\"javascript:openWithSelfMain('".XOOPS_URL."/pmlite.php?send2=1&amp;to_userid=".$thisUser->getVar('uid')."', 'pmlite', 450, 380);\"><img src=\"".XOOPS_URL."/images/icons/pm.gif\" alt=\"".sprintf(_SENDPMTO,$thisUser->getVar('uname'))."\" /></a>");
+    $xoopsTpl->assign('user_pmlink', "<a href=\"javascript:openWithSelfMain('".XOOPS_URL."/pmlite.php?send2=1&amp;to_userid=".$thisUser->getVar('uid')."', 'pmlite', 450, 380);\"><img src=\"".XOOPS_URL."/images/icons/pm.gif\" alt=\"".sprintf(_SENDPMTO,$thisUser->getVar('uname'))."\" /></a>");
 } else {
-	$xoopsTpl->assign('user_pmlink', '');
+    $xoopsTpl->assign('user_pmlink', '');
 }
-$userrank =& $thisUser->rank();
+$userrank = $thisUser->rank();
 if ($userrank['image']) {
-	$xoopsTpl->assign('user_rankimage', '<img src="'.XOOPS_UPLOAD_URL.'/'.$userrank['image'].'" alt="" />');
+    $xoopsTpl->assign('user_rankimage', '<img src="'.XOOPS_UPLOAD_URL.'/'.$userrank['image'].'" alt="" />');
 }
 $xoopsTpl->assign('user_ranktitle', $userrank['title']);
 $date = $thisUser->getVar("last_login");
 if (!empty($date)) {
-	$xoopsTpl->assign('user_lastlogin', formatTimestamp($date,"m"));
+    $xoopsTpl->assign('user_lastlogin', formatTimestamp($date,"m"));
 }
 
 
 $module_handler =& xoops_gethandler('module');
 $criteria = new CriteriaCompo(new Criteria('hassearch', 1));
 $criteria->add(new Criteria('isactive', 1));
-$mids =& array_keys($module_handler->getList($criteria));
+$mids = array_keys($module_handler->getList($criteria));
 
 foreach ($mids as $mid) {
     // Hack by marcan : only return results of modules for which user has access permission
   if ( $gperm_handler->checkRight('module_read', $mid, $groups)) {
-	$module =& $module_handler->get($mid);
-	$results =& $module->search('', '', 5, 0, $thisUser->getVar('uid'));
-	$count = count($results);
-	if (is_array($results) && $count > 0) {
-		for ($i = 0; $i < $count; $i++) {
-			if (isset($results[$i]['image']) && $results[$i]['image'] != '') {
-				$results[$i]['image'] = 'modules/'.$module->getVar('dirname').'/'.$results[$i]['image'];
-			} else {
-				$results[$i]['image'] = 'images/icons/posticon2.gif';
-			}
-			$results[$i]['link'] = 'modules/'.$module->getVar('dirname').'/'.$results[$i]['link'];
-			$results[$i]['title'] = $myts->makeTboxData4Show($results[$i]['title']);
-			$results[$i]['time'] = $results[$i]['time'] ? formatTimestamp($results[$i]['time']) : '';
-		}
-		if ($count == 5) {
-			$showall_link = '<a href="search.php?action=showallbyuser&amp;mid='.$mid.'&amp;uid='.$thisUser->getVar('uid').'">'._US_SHOWALL.'</a>';
-		} else {
-			$showall_link = '';
-		}
-		$xoopsTpl->append('modules', array('name' => $module->getVar('name'), 'results' => $results, 'showall_link' => $showall_link));
-	}
-	unset($module);
+    $module =& $module_handler->get($mid);
+    $results =& $module->search('', '', 5, 0, $thisUser->getVar('uid'));
+    $count = count($results);
+    if (is_array($results) && $count > 0) {
+        for ($i = 0; $i < $count; $i++) {
+            if (isset($results[$i]['image']) && $results[$i]['image'] != '') {
+                $results[$i]['image'] = 'modules/'.$module->getVar('dirname').'/'.$results[$i]['image'];
+            } else {
+                $results[$i]['image'] = 'images/icons/posticon2.gif';
+            }
+            $results[$i]['link'] = 'modules/'.$module->getVar('dirname').'/'.$results[$i]['link'];
+            $results[$i]['title'] = $myts->makeTboxData4Show($results[$i]['title']);
+            $results[$i]['time'] = $results[$i]['time'] ? formatTimestamp($results[$i]['time']) : '';
+        }
+        if ($count == 5) {
+            $showall_link = '<a href="search.php?action=showallbyuser&amp;mid='.$mid.'&amp;uid='.$thisUser->getVar('uid').'">'._US_SHOWALL.'</a>';
+        } else {
+            $showall_link = '';
+        }
+        $xoopsTpl->append('modules', array('name' => $module->getVar('name'), 'results' => $results, 'showall_link' => $showall_link));
+    }
+    unset($module);
   }
 }
 include XOOPS_ROOT_PATH.'/footer.php';


xoops-cvslog メーリングリストの案内
Zurück zum Archiv-Index