mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-18 15:50:50 +08:00
fix: disable invite system error msg duplicate head
This commit is contained in:
@@ -1664,13 +1664,13 @@ function registration_check($type = "invitesystem", $maxuserscheck = true, $ipch
|
||||
global $invitesystem, $registration, $maxusers, $SITENAME, $maxip;
|
||||
if ($type == "invitesystem") {
|
||||
if ($invitesystem == "no") {
|
||||
stderr($lang_functions['std_oops'], $lang_functions['std_invite_system_disabled'], 0);
|
||||
stderr($lang_functions['std_oops'], $lang_functions['std_invite_system_disabled'], 0, false);
|
||||
}
|
||||
}
|
||||
|
||||
if ($type == "normal") {
|
||||
if ($registration == "no") {
|
||||
stderr($lang_functions['std_sorry'], $lang_functions['std_open_registration_disabled'], 0);
|
||||
stderr($lang_functions['std_sorry'], $lang_functions['std_open_registration_disabled'], 0, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1678,14 +1678,14 @@ function registration_check($type = "invitesystem", $maxuserscheck = true, $ipch
|
||||
$res = sql_query("SELECT COUNT(*) FROM users") or sqlerr(__FILE__, __LINE__);
|
||||
$arr = mysql_fetch_row($res);
|
||||
if ($arr[0] >= $maxusers)
|
||||
stderr($lang_functions['std_sorry'], $lang_functions['std_account_limit_reached'], 0);
|
||||
stderr($lang_functions['std_sorry'], $lang_functions['std_account_limit_reached'], 0, false);
|
||||
}
|
||||
|
||||
if ($ipcheck) {
|
||||
$ip = getip () ;
|
||||
$a = (@mysql_fetch_row(@sql_query("select count(*) from users where ip='" . mysql_real_escape_string($ip) . "'"))) or sqlerr(__FILE__, __LINE__);
|
||||
if ($a[0] > $maxip)
|
||||
stderr($lang_functions['std_sorry'], $lang_functions['std_the_ip']."<b>" . htmlspecialchars($ip) ."</b>". $lang_functions['std_used_many_times'],false);
|
||||
stderr($lang_functions['std_sorry'], $lang_functions['std_the_ip']."<b>" . htmlspecialchars($ip) ."</b>". $lang_functions['std_used_many_times'],false, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10,12 +10,12 @@ $menuSelected = $_REQUEST['menu'] ?? 'invitee';
|
||||
$pageSize = 50;
|
||||
|
||||
function inviteMenu ($selected = "invitee") {
|
||||
global $lang_invite, $id, $CURUSER;
|
||||
global $lang_invite, $id, $CURUSER, $invitesystem;
|
||||
begin_main_frame("", false, "100%");
|
||||
print ("<div id=\"invitenav\" style='position: relative'><ul id=\"invitemenu\" class=\"menu\">");
|
||||
print ("<li" . ($selected == "invitee" ? " class=selected" : "") . "><a href=\"?id=".$id."&menu=invitee\">".$lang_invite['text_invite_status']."</a></li>");
|
||||
print ("<li" . ($selected == "sent" ? " class=selected" : "") . "><a href=\"?id=".$id."&menu=sent\">".$lang_invite['text_sent_invites_status']."</a></li>");
|
||||
if (user_can('sendinvite')) {
|
||||
if (user_can('sendinvite') && $invitesystem == 'yes') {
|
||||
print ("</ul><form style='position: absolute;top:0;right:0' method=post action=invite.php?id=".htmlspecialchars($id)."&type=new><input type=submit ".($CURUSER['invites'] <= 0 ? "disabled " : "")." value='".$lang_invite['sumbit_invite_someone']."'></form></div>");
|
||||
}
|
||||
end_main_frame();
|
||||
|
||||
Reference in New Issue
Block a user