mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
migrate disable&enable user basic
This commit is contained in:
@@ -141,5 +141,6 @@ $lang_userdetails = array
|
||||
'row_show_ad' => "显示广告",
|
||||
'row_no_ad_until' => "不显示广告直到",
|
||||
'text_no_ad_until_note' => "时间格式为'年年年年-月月-日日 时时:分分:秒秒'。无广告待遇结束的时间。",
|
||||
'disable_user_migrated' => '启用或禁用用户请到管理后台操作',
|
||||
);
|
||||
?>
|
||||
|
||||
@@ -141,5 +141,6 @@ $lang_userdetails = array
|
||||
'row_show_ad' => "察看廣告",
|
||||
'row_no_ad_until' => "不顯示廣告直到",
|
||||
'text_no_ad_until_note' => "時間格式為'年年年年-月月-日日 時時:分分:秒秒'。無廣告待遇結束的時間。",
|
||||
'disable_user_migrated' => '啟用或禁用用戶請到管理後臺操作',
|
||||
);
|
||||
?>
|
||||
|
||||
@@ -141,5 +141,6 @@ $lang_userdetails = array
|
||||
'row_show_ad' => "Show Ad",
|
||||
'row_no_ad_until' => "No Ad Until",
|
||||
'text_no_ad_until_note' => "Time format is YYYY-MM-DD hh:mm:ss. The time until when the user can turn ads off.",
|
||||
'disable_user_migrated' => 'Enable or disable use please go to the new management system.',
|
||||
);
|
||||
?>
|
||||
|
||||
@@ -74,7 +74,7 @@ if ($action == "edituser")
|
||||
$updateset[] = "stafffor = " . sqlesc($stafffor);
|
||||
$updateset[] = "pickfor = " . sqlesc($pickfor);
|
||||
$updateset[] = "picker = " . sqlesc($moviepicker);
|
||||
$updateset[] = "enabled = " . sqlesc($enabled);
|
||||
// $updateset[] = "enabled = " . sqlesc($enabled);
|
||||
$updateset[] = "uploadpos = " . sqlesc($uploadpos);
|
||||
$updateset[] = "downloadpos = " . sqlesc($downloadpos);
|
||||
$updateset[] = "forumpost = " . sqlesc($forumpost);
|
||||
@@ -242,28 +242,28 @@ if ($action == "edituser")
|
||||
sql_query("INSERT INTO messages (sender, receiver, subject, msg, added) VALUES (0, $userid, $subject, $msg, $added)") or sqlerr(__FILE__, __LINE__);
|
||||
$updateset[] = "warned = 'yes', timeswarned = timeswarned+1, lastwarned=$added, warnedby={$CURUSER['id']}";
|
||||
}
|
||||
if ($enabled != $curenabled)
|
||||
{
|
||||
if ($enabled == 'yes') {
|
||||
$modcomment = date("Y-m-d") . " - Enabled by " . $CURUSER['username']. ".\n". $modcomment;
|
||||
if (get_single_value("users","class","WHERE id = ".sqlesc($userid)) == UC_PEASANT){
|
||||
$length = 30*86400; // warn users until 30 days
|
||||
$until = sqlesc(date("Y-m-d H:i:s",(strtotime(date("Y-m-d H:i:s")) + $length)));
|
||||
sql_query("UPDATE users SET enabled='yes', leechwarn='yes', leechwarnuntil=$until WHERE id = ".sqlesc($userid));
|
||||
}
|
||||
else{
|
||||
sql_query("UPDATE users SET enabled='yes', leechwarn='no' WHERE id = ".sqlesc($userid)) or sqlerr(__FILE__, __LINE__);
|
||||
}
|
||||
} else {
|
||||
$modcomment = date("Y-m-d") . " - Disabled by " . $CURUSER['username']. ".\n". $modcomment;
|
||||
$banLog = [
|
||||
'uid' => $userid,
|
||||
'username' => $user->username,
|
||||
'operator' => $CURUSER['id'],
|
||||
'reason' => nexus_trans('user.edit_ban_reason', [], $user->locale),
|
||||
];
|
||||
}
|
||||
}
|
||||
// if ($enabled != $curenabled)
|
||||
// {
|
||||
// if ($enabled == 'yes') {
|
||||
// $modcomment = date("Y-m-d") . " - Enabled by " . $CURUSER['username']. ".\n". $modcomment;
|
||||
// if (get_single_value("users","class","WHERE id = ".sqlesc($userid)) == UC_PEASANT){
|
||||
// $length = 30*86400; // warn users until 30 days
|
||||
// $until = sqlesc(date("Y-m-d H:i:s",(strtotime(date("Y-m-d H:i:s")) + $length)));
|
||||
// sql_query("UPDATE users SET enabled='yes', leechwarn='yes', leechwarnuntil=$until WHERE id = ".sqlesc($userid));
|
||||
// }
|
||||
// else{
|
||||
// sql_query("UPDATE users SET enabled='yes', leechwarn='no' WHERE id = ".sqlesc($userid)) or sqlerr(__FILE__, __LINE__);
|
||||
// }
|
||||
// } else {
|
||||
// $modcomment = date("Y-m-d") . " - Disabled by " . $CURUSER['username']. ".\n". $modcomment;
|
||||
// $banLog = [
|
||||
// 'uid' => $userid,
|
||||
// 'username' => $user->username,
|
||||
// 'operator' => $CURUSER['id'],
|
||||
// 'reason' => nexus_trans('user.edit_ban_reason', [], $user->locale),
|
||||
// ];
|
||||
// }
|
||||
// }
|
||||
if ($arr['noad'] != $noad){
|
||||
$updateset[]='noad = '.sqlesc($noad);
|
||||
$modcomment = date("Y-m-d") . " - No Ad set to ".$noad." by ". $CURUSER['username']. ".\n". $modcomment;
|
||||
|
||||
@@ -125,7 +125,7 @@ if (($user["privacy"] != "strong") OR (get_user_class() >= $prfmanage_class) ||
|
||||
$other_user_2_curuser_value[$user_snatched_arr_target['userid']] += $torrent_2_user_value_target * $torrent_2_user_value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$val = $other_user_2_curuser_value[$user['id']];
|
||||
if ($val > 1)
|
||||
{
|
||||
@@ -161,7 +161,7 @@ if (($user["privacy"] != "strong") OR (get_user_class() >= $prfmanage_class) ||
|
||||
}
|
||||
$width = $val * 400;
|
||||
$compatibility_info = "<table align=left border=0 width=400><tr><td style='padding: 0px; background-image: url(pic/loadbarbg.gif); background-repeat: repeat-x; width: 400px' title='" . number_format($val * 100, 2) . "%'><img align=left height=15 width=" . $width . " src=\"" . $bar_url ."\" alt='" . number_format($val * 100, 2) . "%'></td><td align=right class=embedded><strong> <nobr>" . $compatibility_info . "</nobr> </strong></td></tr></table>";
|
||||
|
||||
|
||||
//die("ss" . htmlspecialchars($compatibility_info));
|
||||
}
|
||||
print("<tr><td class=rowhead width=13%>".$lang_userdetails['row_compatibility']."</td><td class=rowfollow align=left width=87%>". $compatibility_info ."</td></tr>\n");
|
||||
@@ -431,7 +431,8 @@ if (get_user_class() >= $prfmanage_class && $user["class"] < get_user_class())
|
||||
print("<td class=\"rowfollow\">".$lang_userdetails['text_no_warned']."</td></tr>\n");
|
||||
}
|
||||
print("</table></td></tr>");
|
||||
tr($lang_userdetails['row_enabled'], "<input name=\"enabled\" value=\"yes\" type=\"radio\"" . ($enabled ? " checked=\"checked\"" : "") . " />".$lang_userdetails['radio_yes']."<input name=\"enabled\" value=\"no\" type=\"radio\"" . (!$enabled ? " checked=\"checked\"" : "") . " />".$lang_userdetails['radio_no'], 1);
|
||||
// tr($lang_userdetails['row_enabled'], "<input name=\"enabled\" value=\"yes\" type=\"radio\"" . ($enabled ? " checked=\"checked\"" : "") . " />".$lang_userdetails['radio_yes']."<input name=\"enabled\" value=\"no\" type=\"radio\"" . (!$enabled ? " checked=\"checked\"" : "") . " />".$lang_userdetails['radio_no'], 1);
|
||||
tr($lang_userdetails['row_enabled'], $lang_userdetails['disable_user_migrated'], 1);
|
||||
tr($lang_userdetails['row_forum_post_possible'], "<input type=\"radio\" name=\"forumpost\" value=\"yes\"" .($user["forumpost"]=="yes" ? " checked=\"checked\"" : "") . " />".$lang_userdetails['radio_yes']."<input type=\"radio\" name=\"forumpost\" value=\"no\"" .($user["forumpost"]=="no" ? " checked=\"checked\"" : "") . " />".$lang_userdetails['radio_no'], 1);
|
||||
tr($lang_userdetails['row_upload_possible'], "<input type=\"radio\" name=\"uploadpos\" value=\"yes\"" .($user["uploadpos"]=="yes" ? " checked=\"checked\"" : "") . " />".$lang_userdetails['radio_yes']."<input type=\"radio\" name=\"uploadpos\" value=\"no\"" .($user["uploadpos"]=="no" ? " checked=\"checked\"" : "") . " />".$lang_userdetails['radio_no'], 1);
|
||||
tr($lang_userdetails['row_download_possible'], "<input type=\"radio\" name=\"downloadpos\" value=\"yes\"" .($user["downloadpos"]=="yes" ? " checked=\"checked\"" : "") . " />".$lang_userdetails['radio_yes']."<input type=\"radio\" name=\"downloadpos\" value=\"no\"" .($user["downloadpos"]=="no" ? " checked=\"checked\"" : "") . " />".$lang_userdetails['radio_no'], 1);
|
||||
|
||||
Reference in New Issue
Block a user