forked from cdwolfling/NexusPHP
-
Notifications
You must be signed in to change notification settings - Fork 1
/
attendance.php
30 lines (28 loc) · 1011 Bytes
/
attendance.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
require 'include/bittorrent.php';
dbconn();
require get_langfile_path();
loggedinorreturn();
parked();
$desk = new Attendance($CURUSER['id']);
if($result = $desk->attend($attendance_initial_bonus, $attendance_step_bonus, $attendance_max_bonus, $attendance_continuous_bonus)){
list($count, $cdays, $points) = $result;
stdhead($lang_attendance['title']);
begin_main_frame();
begin_frame($lang_attendance['success']);
printf('<p>'.$lang_attendance['attend_info'].'</p>', $count, $cdays, $points);
end_frame();
echo '<ul>';
printf('<li>'.$lang_attendance['initial'].'</li>', $attendance_initial_bonus);
printf('<li>'.$lang_attendance['steps'].'</li>', $attendance_step_bonus, $attendance_max_bonus);
echo '<li><ol>';
foreach($attendance_continuous_bonus as $day => $value){
printf('<li>'.$lang_attendance['continuous'].'</li>', $day, $value);
}
echo '</ol></li>';
echo '</ul>';
end_main_frame();
stdfoot();
}else{
stderr($lang_attendance['sorry'], $lang_attendance['already_attended']);
}