<?php
/**
 * 
 * @file getpwd.php
 * @copyright (c) 2005 - 2007 eifr.com
 * @license http://www.gnu.org/copyleft/gpl.html gnu/gpl
 * eifr is free software
 */
require_once(dirname(__FILE__) . '/includes/inc_general.php');

$errormsg = '';

if (isset($act)) {
    $sql = "SELECT * FROM " . TB_USER . " WHERE " . TF_USER_NAME . "='" . $username . "' and email='" . $useremail . "'";
    $rs = $db -> Execute($sql); 
    // echo $sql;
    if (!$rs -> EOF) {
        $mailtitle = "你在" . SYS_WEBURL . "的用户名和密码";
        $mailbody = "\r\n用户名：'" . $rs -> fields[TF_USER_NAME] . "'  密码：'" . $rs -> fields['password'] . "'\r\n\r\n，" . SYS_TITLE . "";
        $headers = "From: " . SYS_EMAIL . "\r\nReply-To: " . SYS_EMAIL . "";
        @mail($rs -> fields['email'], $mailtitle, $mailbody, $headers);
        $errormsg = $lang['sendSuccess'];
    } else {
        $errormsg = $lang['inputMatchingInvalid'];
    } 

    $rs -> Close();
} 

$tpl_file = 'getpwd';
require_once(getTemplatePath($tpl_file));

?>

 