mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-28 15:27:24 +08:00
migrate disable&enable user basic
This commit is contained in:
@@ -141,5 +141,6 @@ $lang_userdetails = array
|
|||||||
'row_show_ad' => "显示广告",
|
'row_show_ad' => "显示广告",
|
||||||
'row_no_ad_until' => "不显示广告直到",
|
'row_no_ad_until' => "不显示广告直到",
|
||||||
'text_no_ad_until_note' => "时间格式为'年年年年-月月-日日 时时:分分:秒秒'。无广告待遇结束的时间。",
|
'text_no_ad_until_note' => "时间格式为'年年年年-月月-日日 时时:分分:秒秒'。无广告待遇结束的时间。",
|
||||||
|
'disable_user_migrated' => '启用或禁用用户请到管理后台操作',
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -141,5 +141,6 @@ $lang_userdetails = array
|
|||||||
'row_show_ad' => "察看廣告",
|
'row_show_ad' => "察看廣告",
|
||||||
'row_no_ad_until' => "不顯示廣告直到",
|
'row_no_ad_until' => "不顯示廣告直到",
|
||||||
'text_no_ad_until_note' => "時間格式為'年年年年-月月-日日 時時:分分:秒秒'。無廣告待遇結束的時間。",
|
'text_no_ad_until_note' => "時間格式為'年年年年-月月-日日 時時:分分:秒秒'。無廣告待遇結束的時間。",
|
||||||
|
'disable_user_migrated' => '啟用或禁用用戶請到管理後臺操作',
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -141,5 +141,6 @@ $lang_userdetails = array
|
|||||||
'row_show_ad' => "Show Ad",
|
'row_show_ad' => "Show Ad",
|
||||||
'row_no_ad_until' => "No Ad Until",
|
'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.",
|
'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.',
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
|
|||||||
+23
-23
@@ -74,7 +74,7 @@ if ($action == "edituser")
|
|||||||
$updateset[] = "stafffor = " . sqlesc($stafffor);
|
$updateset[] = "stafffor = " . sqlesc($stafffor);
|
||||||
$updateset[] = "pickfor = " . sqlesc($pickfor);
|
$updateset[] = "pickfor = " . sqlesc($pickfor);
|
||||||
$updateset[] = "picker = " . sqlesc($moviepicker);
|
$updateset[] = "picker = " . sqlesc($moviepicker);
|
||||||
$updateset[] = "enabled = " . sqlesc($enabled);
|
// $updateset[] = "enabled = " . sqlesc($enabled);
|
||||||
$updateset[] = "uploadpos = " . sqlesc($uploadpos);
|
$updateset[] = "uploadpos = " . sqlesc($uploadpos);
|
||||||
$updateset[] = "downloadpos = " . sqlesc($downloadpos);
|
$updateset[] = "downloadpos = " . sqlesc($downloadpos);
|
||||||
$updateset[] = "forumpost = " . sqlesc($forumpost);
|
$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__);
|
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']}";
|
$updateset[] = "warned = 'yes', timeswarned = timeswarned+1, lastwarned=$added, warnedby={$CURUSER['id']}";
|
||||||
}
|
}
|
||||||
if ($enabled != $curenabled)
|
// if ($enabled != $curenabled)
|
||||||
{
|
// {
|
||||||
if ($enabled == 'yes') {
|
// if ($enabled == 'yes') {
|
||||||
$modcomment = date("Y-m-d") . " - Enabled by " . $CURUSER['username']. ".\n". $modcomment;
|
// $modcomment = date("Y-m-d") . " - Enabled by " . $CURUSER['username']. ".\n". $modcomment;
|
||||||
if (get_single_value("users","class","WHERE id = ".sqlesc($userid)) == UC_PEASANT){
|
// if (get_single_value("users","class","WHERE id = ".sqlesc($userid)) == UC_PEASANT){
|
||||||
$length = 30*86400; // warn users until 30 days
|
// $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)));
|
// $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));
|
// sql_query("UPDATE users SET enabled='yes', leechwarn='yes', leechwarnuntil=$until WHERE id = ".sqlesc($userid));
|
||||||
}
|
// }
|
||||||
else{
|
// else{
|
||||||
sql_query("UPDATE users SET enabled='yes', leechwarn='no' WHERE id = ".sqlesc($userid)) or sqlerr(__FILE__, __LINE__);
|
// sql_query("UPDATE users SET enabled='yes', leechwarn='no' WHERE id = ".sqlesc($userid)) or sqlerr(__FILE__, __LINE__);
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
$modcomment = date("Y-m-d") . " - Disabled by " . $CURUSER['username']. ".\n". $modcomment;
|
// $modcomment = date("Y-m-d") . " - Disabled by " . $CURUSER['username']. ".\n". $modcomment;
|
||||||
$banLog = [
|
// $banLog = [
|
||||||
'uid' => $userid,
|
// 'uid' => $userid,
|
||||||
'username' => $user->username,
|
// 'username' => $user->username,
|
||||||
'operator' => $CURUSER['id'],
|
// 'operator' => $CURUSER['id'],
|
||||||
'reason' => nexus_trans('user.edit_ban_reason', [], $user->locale),
|
// 'reason' => nexus_trans('user.edit_ban_reason', [], $user->locale),
|
||||||
];
|
// ];
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if ($arr['noad'] != $noad){
|
if ($arr['noad'] != $noad){
|
||||||
$updateset[]='noad = '.sqlesc($noad);
|
$updateset[]='noad = '.sqlesc($noad);
|
||||||
$modcomment = date("Y-m-d") . " - No Ad set to ".$noad." by ". $CURUSER['username']. ".\n". $modcomment;
|
$modcomment = date("Y-m-d") . " - No Ad set to ".$noad." by ". $CURUSER['username']. ".\n". $modcomment;
|
||||||
|
|||||||
@@ -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("<td class=\"rowfollow\">".$lang_userdetails['text_no_warned']."</td></tr>\n");
|
||||||
}
|
}
|
||||||
print("</table></td></tr>");
|
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_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_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);
|
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