Created
February 17, 2011 09:01
-
-
Save lizheming/831340 to your computer and use it in GitHub Desktop.
httprequest.php send reply修改
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case 'sendreply': | |
if ($options['allow_comment'] == 'false') | |
{ | |
Helper::PrintJavaScript("alert('对方评论功能已经关闭'); window.location = '" . BASE_URL . "?act=view&id=" . intval($_POST['entryid']) . "';"); | |
} | |
if (intval($_POST['entryid']) > 0 AND trim($_POST['message'])) | |
{ | |
if ($is_guest) | |
{ | |
require_once('lib/class_iplocation.php'); | |
$iplocation = new IpLocation('database/QQWry.Dat'); | |
$location = $iplocation->getlocation(Helper::FetchIP()); | |
$geo = $location['country']; | |
} | |
else | |
{ | |
$geo = 'owner'; | |
$_POST['nickname'] = "公子"; //输入你自己的昵称 | |
$_POST['email'] = "[email protected]"; //输入你自己的邮箱 | |
$_POST['url'] = "http://pagecookery.net"; //输入你的个人主页地址 | |
} | |
$SQL->Insert('reply', array('entryid', 'message', 'geo', 'ip', 'time', 'userid', 'nickname', 'email', 'url'), array(intval($_POST['entryid']), Format::Safe($_POST['message'], true), $geo, Helper::FetchIP(), time(), $User['id'], Format::Safe($_POST['nickname'], true), Format::Safe($_POST['email'], true), Format::Safe(CKURL($_POST['url']), true))); | |
Helper::BakeCookie('nickname', $_POST['nickname'], time() + 3600 * 24 * 30); | |
if ($_POST['byquick'] == 'TRUE') | |
{ | |
Helper::PrintJavaScript("window.location = '" . BASE_URL . "?act=view&id=" . intval($_POST['entryid']) . "';"); | |
} | |
else if ($_POST['bymobile'] == 'TRUE') | |
{ | |
header('Location: ' . BASE_URL . 'm/?act=view&id=' . intval($_POST['entryid'])); | |
exit; | |
} | |
else | |
{ | |
echo 'done'; | |
} | |
} | |
else if ($_POST['bymobile'] == 'TRUE') | |
{ | |
header('Location: ' . BASE_URL . 'm/?act=view&id=' . intval($_POST['entryid'])); | |
exit; | |
} | |
break; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment