add promotion and announce_waint log

This commit is contained in:
xiaomlove
2021-06-14 12:49:16 +08:00
parent c63005fbf7
commit 3c6d1a4787
5 changed files with 94 additions and 27 deletions

View File

@@ -223,7 +223,6 @@ function delete_user(\Illuminate\Database\Eloquent\Builder $query, $reasonKey)
return $uidArr;
}
function docleanup($forceAll = 0, $printProgress = false) {
//require_once(get_langfile_path("cleanup.php",true));
global $lang_cleanup_target;
@@ -294,6 +293,14 @@ function docleanup($forceAll = 0, $printProgress = false) {
printProgress($log);
}
$examRep = new \App\Repositories\ExamRepository();
$updateExamProgressResult = $examRep->updateProgressBulk();
$log = 'update exam progress';
do_log($log . ", result: " . json_encode($updateExamProgressResult));
if ($printProgress) {
printProgress($log);
}
//Priority Class 2: cleanup every 30 mins
$res = sql_query("SELECT value_u FROM avps WHERE arg = 'lastcleantime2'");
$row = mysql_fetch_array($res);

View File

@@ -3956,6 +3956,8 @@ function get_torrent_promotion_append($promotion = 1,$forcemode = "",$showtimele
$sp_torrent = "";
$onmouseover = "";
$log = "[GET_PROMOTION], promotion: $promotion, forcemode: $forcemode, showtimeleft: $showtimeleft, added: $added, promotionTimeType: $promotionTimeType, promotionUntil: $promotionUntil";
$log .= ", get_global_sp_state() == " . get_global_sp_state();
if (get_global_sp_state() == 1) {
switch ($promotion){
case 2:
@@ -4057,39 +4059,60 @@ function get_torrent_promotion_append($promotion = 1,$forcemode = "",$showtimele
}
}
if (($CURUSER['appendpromotion'] == 'word' && $forcemode == "" ) || $forcemode == 'word'){
$log .= ", user appendpromotion = word";
if(($promotion==2 && get_global_sp_state() == 1) || get_global_sp_state() == 2){
$log .= ", promotion or global_sp_state = 2";
$sp_torrent = " <b>[<font class='free' ".$onmouseover.">".$lang_functions['text_free']."</font>]</b>";
}
elseif(($promotion==3 && get_global_sp_state() == 1) || get_global_sp_state() == 3){
$log .= ", promotion or global_sp_state = 3";
$sp_torrent = " <b>[<font class='twoup' ".$onmouseover.">".$lang_functions['text_two_times_up']."</font>]</b>";
}
elseif(($promotion==4 && get_global_sp_state() == 1) || get_global_sp_state() == 4){
$log .= ", promotion or global_sp_state = 4";
$sp_torrent = " <b>[<font class='twoupfree' ".$onmouseover.">".$lang_functions['text_free_two_times_up']."</font>]</b>";
}
elseif(($promotion==5 && get_global_sp_state() == 1) || get_global_sp_state() == 5){
$log .= ", promotion or global_sp_state = 5";
$sp_torrent = " <b>[<font class='halfdown' ".$onmouseover.">".$lang_functions['text_half_down']."</font>]</b>";
}
elseif(($promotion==6 && get_global_sp_state() == 1) || get_global_sp_state() == 6){
$log .= ", promotion or global_sp_state = 6";
$sp_torrent = " <b>[<font class='twouphalfdown' ".$onmouseover.">".$lang_functions['text_half_down_two_up']."</font>]</b>";
}
elseif(($promotion==7 && get_global_sp_state() == 1) || get_global_sp_state() == 7){
$log .= ", promotion or global_sp_state = 7";
$sp_torrent = " <b>[<font class='thirtypercent' ".$onmouseover.">".$lang_functions['text_thirty_percent_down']."</font>]</b>";
}
}
elseif (($CURUSER['appendpromotion'] == 'icon' && $forcemode == "") || $forcemode == 'icon'){
if(($promotion==2 && get_global_sp_state() == 1) || get_global_sp_state() == 2)
$sp_torrent = " <img class=\"pro_free\" src=\"pic/trans.gif\" alt=\"Free\" ".($onmouseover ? $onmouseover : "title=\"".$lang_functions['text_free']."\"")." />";
elseif(($promotion==3 && get_global_sp_state() == 1) || get_global_sp_state() == 3)
$sp_torrent = " <img class=\"pro_2up\" src=\"pic/trans.gif\" alt=\"2X\" ".($onmouseover ? $onmouseover : "title=\"".$lang_functions['text_two_times_up']."\"")." />";
elseif(($promotion==4 && get_global_sp_state() == 1) || get_global_sp_state() == 4)
$sp_torrent = " <img class=\"pro_free2up\" src=\"pic/trans.gif\" alt=\"2X Free\" ".($onmouseover ? $onmouseover : "title=\"".$lang_functions['text_free_two_times_up']."\"")." />";
elseif(($promotion==5 && get_global_sp_state() == 1) || get_global_sp_state() == 5)
$sp_torrent = " <img class=\"pro_50pctdown\" src=\"pic/trans.gif\" alt=\"50%\" ".($onmouseover ? $onmouseover : "title=\"".$lang_functions['text_half_down']."\"")." />";
elseif(($promotion==6 && get_global_sp_state() == 1) || get_global_sp_state() == 6)
$sp_torrent = " <img class=\"pro_50pctdown2up\" src=\"pic/trans.gif\" alt=\"2X 50%\" ".($onmouseover ? $onmouseover : "title=\"".$lang_functions['text_half_down_two_up']."\"")." />";
elseif(($promotion==7 && get_global_sp_state() == 1) || get_global_sp_state() == 7)
$sp_torrent = " <img class=\"pro_30pctdown\" src=\"pic/trans.gif\" alt=\"30%\" ".($onmouseover ? $onmouseover : "title=\"".$lang_functions['text_thirty_percent_down']."\"")." />";
$log .= ", user appendpromotion = icon";
if(($promotion==2 && get_global_sp_state() == 1) || get_global_sp_state() == 2) {
$log .= ", promotion or global_sp_state = 2";
$sp_torrent = " <img class=\"pro_free\" src=\"pic/trans.gif\" alt=\"Free\" ".($onmouseover ? $onmouseover : "title=\"".$lang_functions['text_free']."\"")." />";
}
elseif(($promotion==3 && get_global_sp_state() == 1) || get_global_sp_state() == 3) {
$log .= ", promotion or global_sp_state = 3";
$sp_torrent = " <img class=\"pro_2up\" src=\"pic/trans.gif\" alt=\"2X\" ".($onmouseover ? $onmouseover : "title=\"".$lang_functions['text_two_times_up']."\"")." />";
}
elseif(($promotion==4 && get_global_sp_state() == 1) || get_global_sp_state() == 4) {
$log .= ", promotion or global_sp_state = 4";
$sp_torrent = " <img class=\"pro_free2up\" src=\"pic/trans.gif\" alt=\"2X Free\" ".($onmouseover ? $onmouseover : "title=\"".$lang_functions['text_free_two_times_up']."\"")." />";
}
elseif(($promotion==5 && get_global_sp_state() == 1) || get_global_sp_state() == 5) {
$log .= ", promotion or global_sp_state = 5";
$sp_torrent = " <img class=\"pro_50pctdown\" src=\"pic/trans.gif\" alt=\"50%\" ".($onmouseover ? $onmouseover : "title=\"".$lang_functions['text_half_down']."\"")." />";
}
elseif(($promotion==6 && get_global_sp_state() == 1) || get_global_sp_state() == 6) {
$log .= ", promotion or global_sp_state = 6";
$sp_torrent = " <img class=\"pro_50pctdown2up\" src=\"pic/trans.gif\" alt=\"2X 50%\" ".($onmouseover ? $onmouseover : "title=\"".$lang_functions['text_half_down_two_up']."\"")." />";
}
elseif(($promotion==7 && get_global_sp_state() == 1) || get_global_sp_state() == 7) {
$log .= ", promotion or global_sp_state = 7";
$sp_torrent = " <img class=\"pro_30pctdown\" src=\"pic/trans.gif\" alt=\"30%\" ".($onmouseover ? $onmouseover : "title=\"".$lang_functions['text_thirty_percent_down']."\"")." />";
}
}
do_log("$log, sp_torrent: $sp_torrent");
return $sp_torrent;
}