WoWInterface SVN DEEP

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 14 to Rev 15
    Reverse comparison

Rev 14 → Rev 15

trunk/DEEP/dkp_list2.php New file
0,0 → 1,147
<?php
/******************************
* GetDKP Plus
*
* © Corgan @ Server Antonidas PvE German -> www.seniorenraid.de
* ------------------
* dkp_list.php
*
* Version 2.0
* 06/25/06
* Support English / German -> http://www.seniorenraid.de/forum/forumdisplay.php?f=13
*
* modified: Sonath
* for use with SDKP
* version 0.4
* 3/20/09
*
******************************/
 
############# you dont have to change anything below !!!! ######################################
 
echo "local _G = _G
";
echo "local DEEP = _G.DEEP
";
echo "DEEP.timedownload = ".time()."
";
echo "DEEP.Players = {";
define('EQDKP_INC', true);
$eqdkp_root_path = './';
include_once($eqdkp_root_path . 'common.php');
 
$replacement_table = array(
"à" => "\\195\\160",
"è" => "\\195\\168",
"ì" => "\\195\\172",
"ò" => "\\195\\178",
"ù" => "\\195\\185",
"á" => "\\195\\161",
"é" => "\\195\\169",
"í" => "\\195\\173",
"ó" => "\\195\\179",
"ú" => "\\195\\186",
"â" => "\\195\\162",
"ê" => "\\195\\170",
"î" => "\\195\\174",
"ô" => "\\195\\180",
"û" => "\\195\\187",
"ã" => "\\195\\163",
"ë" => "\\195\\171",
"ï" => "\\195\\175",
"õ" => "\\195\\181",
"ü" => "\\195\\188",
"ä" => "\\195\\164",
"ñ" => "\\195\\177",
"ö" => "\\195\\182",
"æ" => "\\195\\166",
"ø" => "\\195\\184",
"ç" => "\\195\\167",
"œ" => "\\197\\147",
"Ä" => "\\195\\132",
"Ö" => "\\195\\150",
"Ü" => "\\195\\156",
"ß" => "\\195\\159"
);
 
// Get DKP without spitting out the whole page
 
$sql = ("SELECT m.member_id, m.member_name, c.class_name, r.rank_name,
m.member_earned + m.member_adjustment as player_earned,
m.member_spent as player_spent
FROM " . MEMBERS_TABLE . " m, " . CLASS_TABLE . " c, " . MEMBER_RANKS_TABLE . " r
WHERE m.member_class_id = c.class_id
AND m.member_rank_id = r.rank_id
GROUP BY m.member_name
ORDER BY member_name ASC");
 
if (!($res = mysql_query($sql))) {
print $sql;
message_die("Could not download member DKP information", "", __FILE__, __LINE__, $sql);
}
$i = 1;
while ($row = $db->fetch_record($res)) {
$member_name = iconv("cp1251","UTF-8",$row['member_name']);
$class_name = iconv("cp1251","UTF-8",$row['class_name']);
$rank_name = $row['rank_name'];
$member_id = $row['member_id'];
 
 
$raids_30 = raid_count(mktime(0, 0, 0, date('m'), date('d')-30, date('Y')), time(), $row['member_name']);
#$raids_60 = raid_count(mktime(0, 0, 0, date('m'), date('d')-60, date('Y')), time(), $row['member_name']);
#$raids_90 = raid_count(mktime(0, 0, 0, date('m'), date('d')-90, date('Y')), time(), $row['member_name']);
 
// empty DKP "pool"
# printf("\"\" \"%s\" \"%s\" \"%s\" \"%f\" \"%f\" \"%f\" \"%f\" \"%f\"\n",
# $member_name,
# $class_name,
# $rank_name,
# $raids_30,
# $raids_60,
# $raids_90,
# $row['player_earned'],
# $row['player_spent']);
$a = $row['player_earned'] ;
$b = $row['player_spent'] ;
#$c =
$dkp = $a - $b;
 
echo "[$i] = {";
echo "[\"name\"] = \"$member_name\",";
echo "[\"class\"] = \"$class_name\",";
echo "[\"dkp\"] = $dkp,";
echo "[\"atnd\"] = $raids_30,";
echo "},";
$i++;
}
 
function raid_count($start_date, $end_date, $member_name) {
global $db;
 
$raid_count = $db->query_first("SELECT count(*) FROM " .
RAIDS_TABLE .
" WHERE (raid_date BETWEEN " .
$start_date .
" AND " .
$end_date . ")");
 
$sql = ("SELECT count(*) FROM " .
RAIDS_TABLE . " r, " . RAID_ATTENDEES_TABLE . " ra " .
"WHERE (ra.raid_id = r.raid_id) " .
"AND (ra.member_name='" . $member_name . "') " .
"AND (r.raid_date BETWEEN " . $start_date . " AND " . $end_date . ")");
 
$individual_raid_count = $db->query_first($sql);
$percent_of_raids = ( $raid_count > 0 ) ? round(($individual_raid_count / $raid_count) * 100) : 0;
$raid_count_stats = array(
'percent' => $percent_of_raids,
'total_count' => $raid_count,
'indiv_count' => $individual_raid_count);
 
return $raid_count_stats['percent']; // Only thing needed ATM
}
 
$db->free_result($res);
 
echo "}";
?>
trunk/DEEP/GetDkp.exe Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream