Code:
diff -r eqdkp_patch\listmembers.php eqdkp\listmembers.php
192,199c192,193
< // Find 14 days ago, then find how many raids occurred in those 14 days
< // Do the same for 30, 60 and 90 days
< if($conf_plus['pk_attendance14']==1)
< {
< $fourteen_days = mktime(0, 0, 0, date('m'), date('d')-14, date('Y'));
< $raid_count_14 = $db->query_first('SELECT count(*) FROM ' . RAIDS_TABLE . ' WHERE raid_date BETWEEN '.$fourteen_days.' AND '.time());
< }
<
---
> // Find 30 days ago, then find how many raids occurred in those 30 days
> // Do the same for 60 and 90 days
291d284
< $rc_14 = array();
309,312d301
< if ( $row['date'] > $fourteen_days ) {
< if (!$rc_14[$row['name']]) $rc_14[$row['name']] = 0;
< $rc_14[$row['name']] += 1;
< }
336,341d324
< if($conf_plus['pk_attendance14']==1)
< {
< $individual_raid_count_14 = $rc_14[$row['member_name']];
< $percent_of_raids_14 = ( $raid_count_14 > 0 ) ? round(($individual_raid_count_14 / $raid_count_14) * 100) : 0;
< }
<
375d357
< $members_rows[$member_count]['individual_raid_count_14'] = $individual_raid_count_14;
381d362
< $members_rows[$member_count]['percent_of_raids_14'] = $percent_of_raids_14;
728,729c709
< 'RAIDS_14_DAYS' => $row['percent_of_raids_14'],
< 'RAIDS_30_DAYS' => $row['percent_of_raids_30'],
---
> 'RAIDS_30_DAYS' => $row['percent_of_raids_30'],
734d713
< 'RAIDS_14_DAYS_C' => ($row['individual_raid_count_14']) ? $row['individual_raid_count_14'] : 0,
767d745
< 'C_RAIDS_14_DAYS' => color_item($row['percent_of_raids_14'], true),
893d870
< 'SHOW_ATTEND_14' => ( $conf_plus['pk_attendance14'] == 1 )? true : false,
918d894
< 'L_RAIDS_14_DAYS' => sprintf($user->lang['raids_x_days'], 14),
diff -r eqdkp_patch\pluskernel\lang\english\lang_main.php eqdkp\pluskernel\lang\english\lang_main.php
136d135
< $plang['pk_set_attendance14'] = 'Show Raid Attendance 14 Day';
186d184
< $plang['pk_help_lm_atten14'] = "An extra column is being displayed, showing a members participation in raid during the last 14 days (in percent).";
diff -r eqdkp_patch\pluskernel\settings.php eqdkp\pluskernel\settings.php
237d236
< $plusdb->UpdateConfig('pk_attendance14', $_POST['pk_attendance14'], $isplusconfarray); # Show Raid Attendance
570d568
< $output .= $html->CheckBox('pk_attendance14', $plang['pk_set_attendance14'] , $conf['pk_attendance14'], $plang['pk_help_lm_atten14']);
diff -r eqdkp_patch\templates\default\listmembers.html eqdkp\templates\default\listmembers.html
91,93d90
< <!-- IF SHOW_ATTEND_14 -->
< <th align="left" width="100" nowrap="nowrap">{L_RAIDS_14_DAYS}</th>
< <!-- ENDIF -->
216,218d212
< <!-- IF SHOW_ATTEND_14 -->
< <td width="100" align="center" nowrap="nowrap" class="{members_row.C_RAIDS_14_DAYS}">{members_row.RAIDS_14_DAYS} % ({members_row.RAIDS_14_DAYS_C})</td>
< <!-- ENDIF -->
242c236
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\default\viewmember.html eqdkp\templates\default\viewmember.html
36d35
< <tr class="row1"><td align="left" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>:</td><td> <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
48d46
< <tr><td align="left" class="row1" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>: <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
205c203
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\defaultV\listmembers.html eqdkp\templates\defaultV\listmembers.html
91,93d90
< <!-- IF SHOW_ATTEND_14 -->
< <th align="left" width="100" nowrap="nowrap">{L_RAIDS_14_DAYS}</th>
< <!-- ENDIF -->
216,218d212
< <!-- IF SHOW_ATTEND_14 -->
< <td width="100" align="center" nowrap="nowrap" class="{members_row.C_RAIDS_14_DAYS}">{members_row.RAIDS_14_DAYS} % ({members_row.RAIDS_14_DAYS_C})</td>
< <!-- ENDIF -->
242c236
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\defaultV\viewmember.html eqdkp\templates\defaultV\viewmember.html
36d35
< <tr class="row1"><td align="left" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>:</td><td> <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
48d46
< <tr><td align="left" class="row1" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>: <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
205c203
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\luna_wotlk\listmembers.html eqdkp\templates\luna_wotlk\listmembers.html
93,95d92
< <!-- IF SHOW_ATTEND_14 -->
< <th align="left" width="100" nowrap="nowrap">{L_RAIDS_14_DAYS}</th>
< <!-- ENDIF -->
218,220d214
< <!-- IF SHOW_ATTEND_14 -->
< <td width="100" align="center" nowrap="nowrap" class="{members_row.C_RAIDS_14_DAYS}">{members_row.RAIDS_14_DAYS} % ({members_row.RAIDS_14_DAYS_C})</td>
< <!-- ENDIF -->
244c238
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\luna_wotlk\viewmember.html eqdkp\templates\luna_wotlk\viewmember.html
36d35
< <tr class="row1"><td align="left" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>:</td><td> <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
48d46
< <tr><td align="left" class="row1" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>: <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
205c203
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\m9wotlk\listmembers.html eqdkp\templates\m9wotlk\listmembers.html
91,93d90
< <!-- IF SHOW_ATTEND_14 -->
< <th align="left" width="100" nowrap="nowrap">{L_RAIDS_14_DAYS}</th>
< <!-- ENDIF -->
216,218d212
< <!-- IF SHOW_ATTEND_14 -->
< <td width="100" align="center" nowrap="nowrap" class="{members_row.C_RAIDS_14_DAYS}">{members_row.RAIDS_14_DAYS} % ({members_row.RAIDS_14_DAYS_C})</td>
< <!-- ENDIF -->
242c236
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\m9wotlk\viewmember.html eqdkp\templates\m9wotlk\viewmember.html
36d35
< <tr class="row1"><td align="left" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>:</td><td> <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
48d46
< <tr><td align="left" class="row1" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>: <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
205c203
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\m9wow3eq\listmembers.html eqdkp\templates\m9wow3eq\listmembers.html
91,93d90
< <!-- IF SHOW_ATTEND_14 -->
< <th align="left" width="100" nowrap="nowrap">{L_RAIDS_14_DAYS}</th>
< <!-- ENDIF -->
216,218d212
< <!-- IF SHOW_ATTEND_14 -->
< <td width="100" align="center" nowrap="nowrap" class="{members_row.C_RAIDS_14_DAYS}">{members_row.RAIDS_14_DAYS} % ({members_row.RAIDS_14_DAYS_C})</td>
< <!-- ENDIF -->
242c236
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\m9wow3eq\viewmember.html eqdkp\templates\m9wow3eq\viewmember.html
36d35
< <tr class="row1"><td align="left" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>:</td><td> <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
48d46
< <tr><td align="left" class="row1" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>: <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
205c203
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\wow_style\listmembers.html eqdkp\templates\wow_style\listmembers.html
91,93d90
< <!-- IF SHOW_ATTEND_14 -->
< <th align="left" width="100" nowrap="nowrap">{L_RAIDS_14_DAYS}</th>
< <!-- ENDIF -->
216,218d212
< <!-- IF SHOW_ATTEND_14 -->
< <td width="100" align="center" nowrap="nowrap" class="{members_row.C_RAIDS_14_DAYS}">{members_row.RAIDS_14_DAYS} % ({members_row.RAIDS_14_DAYS_C})</td>
< <!-- ENDIF -->
242c236
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\wow_style\viewmember.html eqdkp\templates\wow_style\viewmember.html
36d35
< <tr class="row1"><td align="left" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>:</td><td> <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
48d46
< <tr><td align="left" class="row1" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>: <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
205c203
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\wow_styleV\listmembers.html eqdkp\templates\wow_styleV\listmembers.html
91,93d90
< <!-- IF SHOW_ATTEND_14 -->
< <th align="left" width="100" nowrap="nowrap">{L_RAIDS_14_DAYS}</th>
< <!-- ENDIF -->
216,218d212
< <!-- IF SHOW_ATTEND_14 -->
< <td width="100" align="center" nowrap="nowrap" class="{members_row.C_RAIDS_14_DAYS}">{members_row.RAIDS_14_DAYS} % ({members_row.RAIDS_14_DAYS_C})</td>
< <!-- ENDIF -->
242c236
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\wow_styleV\viewmember.html eqdkp\templates\wow_styleV\viewmember.html
36d35
< <tr class="row1"><td align="left" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>:</td><td> <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
48d46
< <tr><td align="left" class="row1" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>: <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
205c203
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\WoWMaevahEmpire\listmembers.html eqdkp\templates\WoWMaevahEmpire\listmembers.html
91,93d90
< <!-- IF SHOW_ATTEND_14 -->
< <th align="left" width="100" nowrap="nowrap">{L_RAIDS_14_DAYS}</th>
< <!-- ENDIF -->
216,218d212
< <!-- IF SHOW_ATTEND_14 -->
< <td width="100" align="center" nowrap="nowrap" class="{members_row.C_RAIDS_14_DAYS}">{members_row.RAIDS_14_DAYS} % ({members_row.RAIDS_14_DAYS_C})</td>
< <!-- ENDIF -->
242c236
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\WoWMaevahEmpire\viewmember.html eqdkp\templates\WoWMaevahEmpire\viewmember.html
36d35
< <tr class="row1"><td align="left" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>:</td><td> <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
48d46
< <tr><td align="left" class="row1" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>: <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
205c203
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\WoWMaevahEmpireV\listmembers.html eqdkp\templates\WoWMaevahEmpireV\listmembers.html
91,93d90
< <!-- IF SHOW_ATTEND_14 -->
< <th align="left" width="100" nowrap="nowrap">{L_RAIDS_14_DAYS}</th>
< <!-- ENDIF -->
216,218d212
< <!-- IF SHOW_ATTEND_14 -->
< <td width="100" align="center" nowrap="nowrap" class="{members_row.C_RAIDS_14_DAYS}">{members_row.RAIDS_14_DAYS} % ({members_row.RAIDS_14_DAYS_C})</td>
< <!-- ENDIF -->
242c236
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\WoWMaevahEmpireV\viewmember.html eqdkp\templates\WoWMaevahEmpireV\viewmember.html
36d35
< <tr class="row1"><td align="left" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>:</td><td> <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
48d46
< <tr><td align="left" class="row1" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>: <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
205c203
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\WoWMoonclaw01\listmembers.html eqdkp\templates\WoWMoonclaw01\listmembers.html
91,93d90
< <!-- IF SHOW_ATTEND_14 -->
< <th align="left" width="100" nowrap="nowrap">{L_RAIDS_14_DAYS}</th>
< <!-- ENDIF -->
216,218d212
< <!-- IF SHOW_ATTEND_14 -->
< <td width="100" align="center" nowrap="nowrap" class="{members_row.C_RAIDS_14_DAYS}">{members_row.RAIDS_14_DAYS} % ({members_row.RAIDS_14_DAYS_C})</td>
< <!-- ENDIF -->
242c236
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\WoWMoonclaw01\viewmember.html eqdkp\templates\WoWMoonclaw01\viewmember.html
36d35
< <tr class="row1"><td align="left" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>:</td><td> <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
48d46
< <tr><td align="left" class="row1" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>: <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
205c203
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\WoWMoonclaw01V\listmembers.html eqdkp\templates\WoWMoonclaw01V\listmembers.html
91,93d90
< <!-- IF SHOW_ATTEND_14 -->
< <th align="left" width="100" nowrap="nowrap">{L_RAIDS_14_DAYS}</th>
< <!-- ENDIF -->
216,218d212
< <!-- IF SHOW_ATTEND_14 -->
< <td width="100" align="center" nowrap="nowrap" class="{members_row.C_RAIDS_14_DAYS}">{members_row.RAIDS_14_DAYS} % ({members_row.RAIDS_14_DAYS_C})</td>
< <!-- ENDIF -->
242c236
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\WoWMoonclaw01V\viewmember.html eqdkp\templates\WoWMoonclaw01V\viewmember.html
36d35
< <tr class="row1"><td align="left" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>:</td><td> <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
48,49c47
< <tr><td align="left" class="row1" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>: <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
< <tr><td align="left" class="row1" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>: <span class="{C_RAIDS_30_DAYS}">{RAIDS_30_DAYS}</span></td></tr>
---
> <tr><td align="left" class="row1" width="20%" nowrap="nowrap"><b>{L_RAIDS_30_DAYS}</b>: <span class="{C_RAIDS_30_DAYS}">{RAIDS_30_DAYS}</span></td></tr>
205c203
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\wowV\listmembers.html eqdkp\templates\wowV\listmembers.html
91,93d90
< <!-- IF SHOW_ATTEND_14 -->
< <th align="left" width="100" nowrap="nowrap">{L_RAIDS_14_DAYS}</th>
< <!-- ENDIF -->
216,218d212
< <!-- IF SHOW_ATTEND_14 -->
< <td width="100" align="center" nowrap="nowrap" class="{members_row.C_RAIDS_14_DAYS}">{members_row.RAIDS_14_DAYS} % ({members_row.RAIDS_14_DAYS_C})</td>
< <!-- ENDIF -->
242c236
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\templates\wowV\viewmember.html eqdkp\templates\wowV\viewmember.html
36d35
< <tr class="row1"><td align="left" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>:</td><td> <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
48d46
< <tr><td align="left" class="row1" width="20%" nowrap="nowrap"><b>{L_RAIDS_14_DAYS}</b>: <span class="{C_RAIDS_14_DAYS}">{RAIDS_14_DAYS}</span></td></tr>
206c204
< <!-- INCLUDE page_tail.html -->
---
> <!-- INCLUDE page_tail.html -->
\ No newline at end of file
diff -r eqdkp_patch\viewmember.php eqdkp\viewmember.php
48,49c48
< // Find the percent of raids they've attended in the last
< // 14, 30, 60 and 90 days
---
> // Find the percent of raids they've attended in the last 30, 60 and 90 days
51d49
< '14' => raid_count(mktime(0, 0, 0, date('m'), date('d')-14, date('Y')), time(), $member['member_name']),
365d362
< 'L_RAIDS_14_DAYS' => sprintf($user->lang['raids_x_days'], 14),
396d392
< 'RAIDS_14_DAYS' => sprintf($user->lang['of_raids'], $percent_of_raids['14']),
404d399
< 'C_RAIDS_14_DAYS' => color_item($percent_of_raids['14'], true),