网站首页  汉语字词  英语词汇  考试资料  写作素材  旧版资料

请输入您要查询的范文:

 

标题 ECSHOP 验证邮箱送积分、送可用资金、送冻结余额 插件
范文 ,p>修改user.php
    找到
    /* 验证用户注册邮件*/
    elseif ($action == 'validate_email')
    {
    $hash = empty($_GET['hash']) ? '' : trim($_GET['hash']);
    if ($hash)
    {
    include_once(ROOT_PATH . 'includes/lib_passport.php');
    $id = register_hash('decode', $hash);
    if ($id > 0)
    {
    $sql = "UPDATE " . $ecs->table('users') . " SET is_validated = 1 WHERE user_id='$id'";
    $db->query($sql);
    $sql = 'SELECT user_name, email FROM ' . $ecs->table('users') . " WHERE user_id = '$id'";
    $row = $db->getRow($sql);
    show_message(sprintf($_LANG['validate_ok'], $row['user_name'], $row['email']),$_LANG['profile_lnk'], 'user.php');
    }
    }
    show_message($_LANG['validate_fail']);
    }
    修改为
    /* 验证用户注册邮件 */
    elseif ($action == 'validate_email')
    {
    $hash = empty($_GET['hash']) ? '' : trim($_GET['hash']);
    if ($hash)
    {
    include_once(ROOT_PATH . 'includes/lib_passport.php');
    $id = register_hash('decode', $hash);
    if ($id > 0)
    {
    $sql = 'SELECT is_validated FROM '.$ecs->table('users')." WHERE user_id='$id'";
    $row = $db->getRow($sql);
    if($row['is_validated'] == 0)
    {
    $sql = "UPDATE " . $ecs->table('users') . " SET is_validated = 1 WHERE user_id='$id'";
    $db->query($sql);
    $sql = 'SELECT user_name, email FROM ' . $ecs->table('users') . " WHERE user_id = '$id'";
    $row = $db->getRow($sql);
    //验证完成 送积分 by gaojin 201003300850
    include_once(ROOT_PATH .'includes/lib_common.php');
    log_account_change($id, 0, 0, 0, 100,$GLOBALS['_LANG']['register_points']);
    show_message(sprintf($_LANG['validate_ok'], $row['user_name'], $row['email']),$_LANG['profile_lnk'], 'user.php');
    }
    else
    {
    show_message(sprintf('请不要重复验证', $row['user_name'], $row['email']),$_LANG['profile_lnk'], 'user.php');
    }
    }
    }
    show_message($_LANG['validate_fail']);
    }
随便看

 

在线学习网范文大全提供好词好句、学习总结、工作总结、演讲稿等写作素材及范文模板,是学习及工作的有利工具。

 

Copyright © 2002-2024 cuapp.net All Rights Reserved
更新时间:2025/5/18 6:48:43