user modify migrate

This commit is contained in:
xiaomlove
2022-11-08 19:06:37 +08:00
parent c9ed79b227
commit b92b911b1e
27 changed files with 583 additions and 263 deletions

View File

@@ -738,6 +738,30 @@ function docleanup($forceAll = 0, $printProgress = false) {
printProgress($log);
}
//remove donor status if time's up
$res = sql_query("SELECT id, modcomment FROM users WHERE donor='yes' AND donoruntil is not null and donoruntil != '0000-00-00 00:00:00' and donoruntil < NOW()") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) > 0)
{
while ($arr = mysql_fetch_assoc($res))
{
$dt = sqlesc(date("Y-m-d H:i:s"));
$subject = sqlesc($lang_cleanup_target[get_user_lang($arr['id'])]['msg_donor_status_removed']);
$msg = sqlesc($lang_cleanup_target[get_user_lang($arr['id'])]['msg_donor_status_removed_body']);
///---AUTOSYSTEM MODCOMMENT---//
$modcomment = htmlspecialchars($arr["modcomment"]);
$modcomment = date("Y-m-d") . " - donor status removed by - AutoSystem.\n". $modcomment;
$modcom = sqlesc($modcomment);
///---end
sql_query("UPDATE users SET donor = 'no', modcomment = $modcom WHERE id = {$arr['id']}") or sqlerr(__FILE__, __LINE__);
sql_query("INSERT INTO messages (sender, receiver, added, msg, subject) VALUES(0, {$arr['id']}, $dt, $msg, $subject)") or sqlerr(__FILE__, __LINE__);
}
}
$log = "remove donor status if time's up";
do_log($log);
if ($printProgress) {
printProgress($log);
}
// promote peasant back to user
peasant_to_user($psdlfive_account,0, $psratiofive_account);

View File

@@ -1,6 +1,6 @@
<?php
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.0');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-11-07');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-11-08');
defined('IN_TRACKER') || define('IN_TRACKER', false);
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");

View File

@@ -2659,7 +2659,7 @@ else {
<?php if(\App\Models\Claim::getConfigIsEnabled()) { ?><font class='color_bonus'><?php echo $lang_functions['menu_claim']?></font> <?php echo sprintf('[<a href="claim.php?uid=%s">%s</a>]', $CURUSER['id'], (new \App\Repositories\ClaimRepository())->getStats($CURUSER['id']))?><?php }?>
</span>
</td>
<?php if(get_setting('main.spsct') == 'yes'){?>
<?php if(get_setting('main.spsct') == 'yes' && get_setting('main.enable_global_search') == 'yes'){?>
<td class="bottom" align="left" style="border: none">
<form action="search.php" method="get" target="<?php echo nexus()->getScript() == 'search' ? '_self' : '_blank'?>">
<div style="display: flex;align-items: center">