Minahito
minah****@users*****
2006年 1月 27日 (金) 18:26:00 JST
Index: xoops2jp/html/modules/user/lostpass.php diff -u xoops2jp/html/modules/user/lostpass.php:1.1.2.2 xoops2jp/html/modules/user/lostpass.php:removed --- xoops2jp/html/modules/user/lostpass.php:1.1.2.2 Tue Nov 8 18:56:41 2005 +++ xoops2jp/html/modules/user/lostpass.php Fri Jan 27 18:26:00 2006 @@ -1,102 +0,0 @@ -<?php -// $Id: lostpass.php,v 1.2 2005/03/18 12:51:55 onokazu Exp $ -// ------------------------------------------------------------------------ // -// XOOPS - PHP Content Management System // -// Copyright (c) 2000 XOOPS.org // -// <http://www.xoops.org/> // -// ------------------------------------------------------------------------ // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// You may not change or alter any portion of this comment or credits // -// of supporting developers from this source code or any supporting // -// source code which is considered copyrighted (c) material of the // -// original comment or credit authors. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program; if not, write to the Free Software // -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // - -require_once "../../mainfile.php"; -require_once XOOPS_ROOT_PATH."/header.php"; -require_once "./class/LostpassForm.class.php" - -require_once "./class/LostpassMailDirector.class.php"; -require_once "./class/LostpassMailBuilder.class.php"; - -$editform = new LostpassForm(); -$dmy = null; -switch($editform->startup($dmy)) { - case UCONTROLLER_ACTIONFORM_INIT: - case UCONTROLLER_ACTIONFORM_ERROR: - XCube_Utils::redirectHeader("user.php",2,_US_SORRYNOTFOUND); - break; - - case UCONTROLLER_ACTIONFORM_SUCCESS: - $memberHandler=&xoops_gethandler('member'); - $user=&memberHandler->getUserByEmail($editform->mEmailAddress); - - $builder = new LostpassMailBuilder(); - $director = new LostpassMailDirector($builder,$user,$xoopsConfig); - $director->contruct(); - $xoopsMailer=&$builder->getResult(); - - // @todo use template - if ( !$xoopsMailer->send() ) { - echo $xoopsMailer->getErrors(); - } - echo "<h4>"; - printf(_US_CONFMAIL,$user->getVar("uname")); - echo "</h4>"; - - break; -} - -require_once XOOPS_ROOT_PATH."/footer.php"; - -/* - $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) ) { - require_once XOOPS_ROOT_PATH."/header.php"; - echo _US_MAILPWDNG; - require_once XOOPS_ROOT_PATH."/footer.php"; - exit(); - } - redirect_header("user.php", 3, sprintf(_US_PWDMAILED,$getuser[0]->getVar("uname")), false); - exit(); - // If no Code, send it -*/ -// } else { - - } -} -?> \ No newline at end of file