mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-16 05:50:55 +08:00
refactor attendance
This commit is contained in:
@@ -305,10 +305,10 @@ $basictax_bonus = $BONUS['basictax'];
|
||||
$taxpercentage_bonus = $BONUS['taxpercentage'];
|
||||
$prolinkpoint_bonus = $BONUS['prolinkpoint'];
|
||||
$prolinktime_bonus = $BONUS['prolinktime'];
|
||||
$attendance_initial_bonus = isset($BONUS['attendance_initial']) ? (int) $BONUS['attendance_initial'] : 10;
|
||||
$attendance_step_bonus = isset($BONUS['attendance_step']) ? (int) $BONUS['attendance_step'] : 5;
|
||||
$attendance_max_bonus = isset($BONUS['attendance_max']) ? (int) $BONUS['attendance_max'] : 1000;
|
||||
$attendance_continuous_bonus = isset($BONUS['attendance_continuous']) && is_array($BONUS['attendance_continuous']) ? $BONUS['attendance_continuous'] : array(10 => 200, 20 => 500, 30 => 1000);
|
||||
$attendance_initial_bonus = isset($BONUS['attendance_initial']) ? (int) $BONUS['attendance_initial'] : \App\Models\Attendance::INITIAL_BONUS;
|
||||
$attendance_step_bonus = isset($BONUS['attendance_step']) ? (int) $BONUS['attendance_step'] : \App\Models\Attendance::STEP_BONUS;
|
||||
$attendance_max_bonus = isset($BONUS['attendance_max']) ? (int) $BONUS['attendance_max'] : \App\Models\Attendance::MAX_BONUS;
|
||||
$attendance_continuous_bonus = isset($BONUS['attendance_continuous']) && is_array($BONUS['attendance_continuous']) ? $BONUS['attendance_continuous'] : \App\Models\Attendance::CONTINUOUS_BONUS;
|
||||
|
||||
$neverdelete_account = $ACCOUNT['neverdelete'];
|
||||
$neverdeletepacked_account = $ACCOUNT['neverdeletepacked'];
|
||||
|
||||
@@ -2248,7 +2248,7 @@ function get_cat_folder($cat = 101)
|
||||
if ($caticonrow['multilang'] == 'yes') {
|
||||
$path .= '/' . trim($CURLANGDIR, '/');
|
||||
}
|
||||
do_log("cat: $cat, path: $path");
|
||||
do_log("cat: $cat, path: $path", 'debug');
|
||||
$catPath[$cat] = $path;
|
||||
}
|
||||
return $catPath[$cat] ?? '';
|
||||
@@ -2465,8 +2465,10 @@ else {
|
||||
}
|
||||
|
||||
$inboxpic = "<img class=\"".($unread ? "inboxnew" : "inbox")."\" src=\"pic/trans.gif\" alt=\"inbox\" title=\"".($unread ? $lang_functions['title_inbox_new_messages'] : $lang_functions['title_inbox_no_new_messages'])."\" />";
|
||||
$attend_desk = new Attendance($CURUSER['id']);
|
||||
$attendance = $attend_desk->check();
|
||||
// $attend_desk = new Attendance($CURUSER['id']);
|
||||
// $attendance = $attend_desk->check();
|
||||
$attendanceRep = new \App\Repositories\AttendanceRepository();
|
||||
$attendance = $attendanceRep->getAttendance($CURUSER['id'], date('Ymd'))
|
||||
?>
|
||||
|
||||
<table id="info_block" cellpadding="4" cellspacing="0" border="0" width="100%"><tr>
|
||||
@@ -2481,7 +2483,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)?>
|
||||
<font class = 'color_bonus'><?php echo $lang_functions['text_seed_points'] ?></font>: <?php echo number_format($CURUSER['seed_points'], 1)?>
|
||||
<?php if($attendance){ printf(' '.$lang_functions['text_attended'], $attendance['points']); }else{ printf(' <a href="attendance.php" class="faqlink">%s</a>', $lang_functions['text_attendance']);}?>
|
||||
<?php if($attendance){ printf(' '.$lang_functions['text_attended'], $attendance->points); }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']?>
|
||||
<br />
|
||||
<font class="color_ratio"><?php echo $lang_functions['text_ratio'] ?></font> <?php echo $ratio?>
|
||||
|
||||
@@ -620,7 +620,7 @@ function nexus_trans($key, $replace = [], $locale = null)
|
||||
$search = array_map(function ($value) {return ":$value";}, array_keys($replace));
|
||||
$result = str_replace($search, array_values($replace), $result);
|
||||
}
|
||||
do_log("key: $key, replace: " . nexus_json_encode($replace) . ", locale: $locale, getKey: $getKey, result: $result");
|
||||
do_log("key: $key, replace: " . nexus_json_encode($replace) . ", locale: $locale, getKey: $getKey, result: $result", 'debug');
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user