mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-30 00:47:22 +08:00
send invite temporary only
This commit is contained in:
+5
-3
@@ -28,7 +28,7 @@ function inviteMenu ($selected = "invitee") {
|
|||||||
end_main_frame();
|
end_main_frame();
|
||||||
}
|
}
|
||||||
|
|
||||||
$res = sql_query("SELECT username FROM users WHERE id = ".mysql_real_escape_string($id)) or sqlerr();
|
$res = sql_query("SELECT * FROM users WHERE id = ".mysql_real_escape_string($id)) or sqlerr();
|
||||||
$user = mysql_fetch_assoc($res);
|
$user = mysql_fetch_assoc($res);
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
stderr($lang_invite['std_sorry'], 'Invalid id');
|
stderr($lang_invite['std_sorry'], 'Invalid id');
|
||||||
@@ -43,8 +43,7 @@ print("<h1 align=center><a href=\"invite.php?id=".$id."\">".$user['username'].$l
|
|||||||
print("<p align=center><font color=red>".$msg."</font></p>");
|
print("<p align=center><font color=red>".$msg."</font></p>");
|
||||||
}
|
}
|
||||||
|
|
||||||
$res = sql_query("SELECT invites FROM users WHERE id = ".mysql_real_escape_string($id)) or sqlerr();
|
$inv = $user;
|
||||||
$inv = mysql_fetch_assoc($res);
|
|
||||||
|
|
||||||
//for one or more. "invite"/"invites"
|
//for one or more. "invite"/"invites"
|
||||||
if ($inv["invites"] != 1){
|
if ($inv["invites"] != 1){
|
||||||
@@ -72,7 +71,10 @@ if ($type == 'new'){
|
|||||||
;
|
;
|
||||||
$invitation_body = $lang_invite['text_invitation_body'].$CURUSER['username'];
|
$invitation_body = $lang_invite['text_invitation_body'].$CURUSER['username'];
|
||||||
//$invitation_body_insite = str_replace("<br />","\n",$invitation_body);
|
//$invitation_body_insite = str_replace("<br />","\n",$invitation_body);
|
||||||
|
$inviteSelectOptions = '';
|
||||||
|
if ($inv['invites'] > 0) {
|
||||||
$inviteSelectOptions = '<option value="permanent">'.$lang_invite['text_permanent'].'</option>';
|
$inviteSelectOptions = '<option value="permanent">'.$lang_invite['text_permanent'].'</option>';
|
||||||
|
}
|
||||||
foreach ($temporaryInvites as $tmp) {
|
foreach ($temporaryInvites as $tmp) {
|
||||||
$inviteSelectOptions .= sprintf('<option value="%s">%s (%s: %s)</option>', $tmp->hash, $tmp->hash, $lang_invite['text_expired_at'], $tmp->expired_at);
|
$inviteSelectOptions .= sprintf('<option value="%s">%s (%s: %s)</option>', $tmp->hash, $tmp->hash, $lang_invite['text_expired_at'], $tmp->expired_at);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user