mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
temporary invite
This commit is contained in:
+2
-1
@@ -248,6 +248,7 @@ function docleanup($forceAll = 0, $printProgress = false) {
|
||||
set_time_limit(0);
|
||||
ignore_user_abort(1);
|
||||
$now = time();
|
||||
$nowStr = \Carbon\Carbon::now()->toDateTimeString();
|
||||
do_log("start docleanup(), forceAll: $forceAll, printProgress: $printProgress, now: $now, " . date('Y-m-d H:i:s', $now));
|
||||
|
||||
//Priority Class 1: cleanup every 15 mins
|
||||
@@ -592,7 +593,7 @@ function docleanup($forceAll = 0, $printProgress = false) {
|
||||
//6.delete old invite codes
|
||||
$secs = $invite_timeout*24*60*60; // when?
|
||||
$dt = sqlesc(date("Y-m-d H:i:s",(TIMENOW - $secs))); // calculate date.
|
||||
sql_query("DELETE FROM invites WHERE time_invited < $dt") or sqlerr(__FILE__, __LINE__);
|
||||
sql_query("DELETE FROM invites WHERE ((time_invited < $dt and time_invited is not null and invitee != '') or (invitee = '' and expired_at < '$nowStr' and expired_at is not null))") or sqlerr(__FILE__, __LINE__);
|
||||
$log = "delete old invite codes";
|
||||
do_log($log);
|
||||
if ($printProgress) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.0');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-12-08');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-12-13');
|
||||
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||
|
||||
@@ -2659,7 +2659,7 @@ else {
|
||||
[<a href="torrents.php?inclbookmarked=1&allsec=1&incldead=0"><?php echo $lang_functions['text_bookmarks'] ?></a>]
|
||||
<font class = 'color_bonus'><?php echo $lang_functions['text_bonus'] ?></font>[<a href="mybonus.php"><?php echo $lang_functions['text_use'] ?></a>]: <?php echo number_format($CURUSER['seedbonus'], 1)?>
|
||||
<?php if($attendance){ printf(' <a href="attendance.php" class="">'.$lang_functions['text_attended'].'</a>', $attendance->points, $CURUSER['attendance_card']); }else{ printf(' <a href="attendance.php" class="faqlink">%s</a>', $lang_functions['text_attendance']);}?>
|
||||
<font class = 'color_invite'><?php echo $lang_functions['text_invite'] ?></font>[<a href="invite.php?id=<?php echo $CURUSER['id']?>"><?php echo $lang_functions['text_send'] ?></a>]: <?php echo $CURUSER['invites']?>
|
||||
<font class = 'color_invite'><?php echo $lang_functions['text_invite'] ?></font>[<a href="invite.php?id=<?php echo $CURUSER['id']?>"><?php echo $lang_functions['text_send'] ?></a>]: <?php echo sprintf('%s(%s)', $CURUSER['invites'], \App\Models\Invite::query()->where('inviter', $CURUSER['id'])->where('invitee', '')->where('expired_at', '>', now())->count())?>
|
||||
<?php if(get_user_class() >= \App\Models\User::CLASS_ADMINISTRATOR) printf('[<a href="%s" target="_blank">%s</a>]', nexus_env('FILAMENT_PATH', 'nexusphp'), $lang_functions['text_management_system'])?>
|
||||
<br />
|
||||
<font class="color_ratio"><?php echo $lang_functions['text_ratio'] ?></font> <?php echo $ratio?>
|
||||
|
||||
Reference in New Issue
Block a user