From 0aa0d7afa79507273c83ae8653faf0cebf08c1c7 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Tue, 11 May 2021 02:44:43 +0800 Subject: [PATCH] invite after signup do not delete --- lang/chs/lang_invite.php | 6 ++++-- lang/cht/lang_invite.php | 6 ++++-- lang/en/lang_invite.php | 8 +++++--- public/invite.php | 17 ++++++++++++++--- public/takesignup.php | 4 ++-- 5 files changed, 29 insertions(+), 12 deletions(-) diff --git a/lang/chs/lang_invite.php b/lang/chs/lang_invite.php index b6485d80..3c2ba11a 100644 --- a/lang/chs/lang_invite.php +++ b/lang/chs/lang_invite.php @@ -33,11 +33,13 @@ $lang_invite = array 'text_no_invitation_sent' => "当前没有已发邀请", 'text_hash' => "Hash", 'text_send_date' => "发送日期", + 'text_hash_status' => 'Hash 有效', + 'text_invitee_user' => '被邀请者', 'text_invitation_body' => " 你好, -我邀请你加入 $SITENAME, 这是一个拥有丰富资源的非开放社区. -如果你有兴趣加入我们请阅读规则并确认邀请.最后,确保维持一个良好的分享率 +我邀请你加入 $SITENAME, 这是一个拥有丰富资源的非开放社区. +如果你有兴趣加入我们请阅读规则并确认邀请.最后,确保维持一个良好的分享率 分享允许的资源. 欢迎到来! :) diff --git a/lang/cht/lang_invite.php b/lang/cht/lang_invite.php index 25bc46e1..5b6ccd6f 100644 --- a/lang/cht/lang_invite.php +++ b/lang/cht/lang_invite.php @@ -33,11 +33,13 @@ $lang_invite = array 'text_no_invitation_sent' => "當前沒有已發邀請", 'text_hash' => "Hash", 'text_send_date' => "發送日期", + 'text_hash_status' => 'Hash 有效', + 'text_invitee_user' => '被邀請者', 'text_invitation_body' => " 你好, -我邀請你加入 $SITENAME, 這是一個擁有豐富高質量資源的非開放社區. -如果你有興趣加入我們請閱讀規則並確認邀請.最後,確保維持一個良好的分享率 +我邀請你加入 $SITENAME, 這是一個擁有豐富高質量資源的非開放社區. +如果你有興趣加入我們請閱讀規則並確認邀請.最後,確保維持一個良好的分享率 分享允許的資源. 歡迎到來! :) diff --git a/lang/en/lang_invite.php b/lang/en/lang_invite.php index 705ad6bc..766b96ef 100644 --- a/lang/en/lang_invite.php +++ b/lang/en/lang_invite.php @@ -33,13 +33,15 @@ $lang_invite = array 'text_no_invitation_sent' => "No invitations sent out at the moment.", 'text_hash' => "Hash", 'text_send_date' => "Send Date", - + 'text_hash_status' => 'Hash valid', + 'text_invitee_user' => 'Invitee user', + 'text_invitation_body' => " Hi Buddy, I am inviting you to join $SITENAME which is a private community that have the finest -and most abundant stuff. If you are interested in joining us please read over -the rules and confirm the invite. Finally, please make sure you keep a nice ratio and +and most abundant stuff. If you are interested in joining us please read over +the rules and confirm the invite. Finally, please make sure you keep a nice ratio and only upload content that follows rules of the site. Welcome aboard! :) diff --git a/public/invite.php b/public/invite.php index 2637b648..512500b7 100644 --- a/public/invite.php +++ b/public/invite.php @@ -126,7 +126,7 @@ if ($type == 'new'){ $number1 = $arre[0]; - $rer = sql_query("SELECT invitee, hash, time_invited FROM invites WHERE inviter = ".mysql_real_escape_string($id)) or sqlerr(); + $rer = sql_query("SELECT * FROM invites WHERE inviter = ".mysql_real_escape_string($id)) or sqlerr(); $num1 = mysql_num_rows($rer); @@ -137,11 +137,22 @@ if ($type == 'new'){ print("".$lang_invite['text_no_invitation_sent'].""); } else { - print("".$lang_invite['text_email']."".$lang_invite['text_hash']."".$lang_invite['text_send_date'].""); + print("".$lang_invite['text_email']."".$lang_invite['text_hash']."".$lang_invite['text_send_date']."".$lang_invite['text_hash_status']."".$lang_invite['text_invitee_user'].""); for ($i = 0; $i < $num1; ++$i) { $arr1 = mysql_fetch_assoc($rer); - print("{$arr1['invitee']}{$arr1['hash']}{$arr1['time_invited']}"); + $tr = ""; + $tr .= "{$arr1['invitee']}"; + $tr .= "{$arr1['hash']}"; + $tr .= "{$arr1['time_invited']}"; + $tr .= "".\App\Models\Invite::$validInfo[$arr1['valid']]['text'].""; + if ($arr1['valid'] == \App\Models\Invite::VALID_NO) { + $tr .= "".$arr1['invitee_register_username'].""; + } else { + $tr .= ""; + } + $tr .= ""; + print($tr); } } print(""); diff --git a/public/takesignup.php b/public/takesignup.php index 4b51693d..9a35817b 100644 --- a/public/takesignup.php +++ b/public/takesignup.php @@ -198,8 +198,8 @@ if ($type == 'invite') $update = [ 'valid' => \App\Models\Invite::VALID_NO, 'invitee_register_uid' => $id, - 'invitee_register_email' => $email, - 'invitee_register_username' => $wantusername, + 'invitee_register_email' => $_POST['email'], + 'invitee_register_username' => $_POST['wantusername'], ]; \App\Models\Invite::query()->where('id', $inv['id'])->update($update);