$key = $_GET['key']; if (strlen($key) != 10 || strlen($user) > 20) { die; } $db = get_db(); $db->query("select name,id,password,authenticated from fb_yh where name='{$user}' and authenticate_string='{$key}'"); if (!$db->move_first()) { $str = '对不起,您的验证码不正确,无法完成激活!'; } else { $name = $db->field_by_name('name'); $user_id = $db->field_by_name('id'); $password = $db->field_by_name('password'); $authenticated = $db->field_by_name('authenticated'); if ($authenticated == 0) { $db->execute("update fb_yh set authenticated=1 where id={$user_id}"); adjust_user_score($user_id, 50, "用户激活"); } #$str = '恭喜您,激活成功,感谢您注册成为福布斯中文网会员!请继续填写完整的个人信息'; $cache_name = sprintf('%06s', $user_id) . rand_str(24); $db->execute("update fb_yh set cache_name='{$cache_name}' where id={$user_id}"); setcookie("name", $name, 0, '/'); setcookie("cache_name", $cache_name, 0, '/'); setcookie("password", $password, 0, '/'); } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv=Content-Type content="text/html; charset=utf-8"> <meta http-equiv=Content-Language content=zh-cn> <title>用户激活_福布斯中文网</title>
if ($type == 'news') { $content = $_GET['name'][$i] . ",你好:<br/><br/> 您的好友" . $sname . "想与您分享福布斯中文网的文章《" . $news->title . "》,您可以点击以下连接阅读<br/><br/> <a href='http://www.forbeschina.com" . static_news_url($news) . "'>http://www.forbeschina.com" . static_news_url($news) . "</a><br/> 如果点击以上链接不起作用,请将此网址复制并粘贴到新的浏览器窗口中。"; $title = $news->title; } else { if ($type == 'pic_list') { $content = $_GET['name'][$i] . ",你好:<br/><br/> 您的好友" . $sname . "想与您分享福布斯中文网的榜单《" . $list->name . "》,您可以点击以下连接查看<br/><br/> <a href='http://www.forbeschina.com/list/" . $news_id . "'>http://www.forbeschina.com/list/" . $news_id . "</a><br/> 如果点击以上链接不起作用,请将此网址复制并粘贴到新的浏览器窗口中。"; $title = $list->name; } } send_mail('smtp.qiye.163.com', '*****@*****.**', 'userservice', '*****@*****.**', $_GET['mail'][$i], $title, $content); } } } $user_id = front_user_id(); if ($user_id) { adjust_user_score($user_id, 30, '推荐文章给好友'); } #redirect('share.php?news_id='.$news_id); ?> alert("已成功分享!"); <?php if ($type == 'news') { ?> window.location.href = "<?php echo static_news_url($news); ?> "; <?php } else { if ($type == 'pic_list') { ?>
<?php include_once '../../frame.php'; if ($_POST['post_type'] == "del") { $post = new table_class("fb_comment"); $post->delete($_POST['comment_id']); echo $_POST['comment_id']; } elseif ($_POST['post_type'] == 'unapprove') { $id = intval($_POST['id']); $db = get_db(); $db->execute("update fb_comment set is_approve = 0 where id={$id}"); } elseif ($_POST['post_type'] == 'approve') { $id = intval($_POST['id']); $db = get_db(); $db->execute("update fb_comment set is_approve = 1 where id={$id}"); $db->query("select user_id from fb_comment where id = {$id}"); $user_id = intval($db->field_by_name('user_id')); if ($user_id) { adjust_user_score($user_id, 30, '评论通过审批'); } }