Changeset 609 for trunk/pages/guilda.php


Ignore:
Timestamp:
Aug 7, 2009, 10:03:50 PM (15 years ago)
Author:
george
Message:
  • Upraveno: Stránky přizpůsobeny pro podporu více světů. Doplněna stránka seznamu světů.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pages/guilda.php

    r595 r609  
    33function count_days($a, $b)
    44{
    5         $gd_a = getdate($a);
    6         $gd_b = getdate($b);
    7         $a_new = mktime(12, 0, 0, $gd_a['mon'], $gd_a['mday'], $gd_a['year']);
    8         $b_new = mktime(12, 0, 0, $gd_b['mon'], $gd_b['mday'], $gd_b['year']);
    9         return round(abs($a_new - $b_new) / 86400);
     5  $gd_a = getdate($a);
     6  $gd_b = getdate($b);
     7  $a_new = mktime(12, 0, 0, $gd_a['mon'], $gd_a['mday'], $gd_a['year']);
     8  $b_new = mktime(12, 0, 0, $gd_b['mon'], $gd_b['mday'], $gd_b['year']);
     9  return round(abs($a_new - $b_new) / 86400);
    1010}
    1111
    12 $db->select_db($Config['Mangos']['DatabaseCharacters']);
     12$db->select_db($Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters']);
    1313$id = (isset($_GET['id'])) ? $_GET['id'] : 0;
    1414if($id != 0)
     
    5959    $query = $db->query('SELECT `race`,`class`,`online`, `account`, `logout_time`, SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, " ", '.$Config['Mangos']['CharacterDataOffset']['Level'].' + 1), " ", -1) AS level, mid(lpad( hex( CAST(substring_index(substring_index(data, " ", '.($Config['Mangos']['CharacterDataOffset']['Gender'] + 1).'), " ", -1) as unsigned) ), 8, 0), 4, 1) as gender FROM `characters` WHERE `guid` = '.$member[0].' LIMIT 1;');
    6060    $online = $query->fetch_assoc();
    61           $accid = $online['account'];
    62          
     61    $accid = $online['account'];
     62   
    6363    $LogoutTime = count_days($online['logout_time'], time());
    6464    $LogoutTimeColorList = array(0 => '#0000CC', 5 => '#FFFF00', 15 => '#FF8000', 30 => '#FF0000', 60 => '#FF00FF', 90 => '#8000FF');
     
    6969    }
    7070   
    71         $Level = $online['level'];
     71    $Level = $online['level'];
    7272    $LevelColorList = array(9 => '#858585', 19 => '#339900', 29 => '#3300CC', 39 => '#5552FF', 49 => '#FF8000', 59 => '#FF0000', 69 => '#FF00CC', 70 => '#FFF000');
    7373    $LevelColor = '#FFFFFF';
     
    7777    }
    7878   
    79                 if($online['gender'] == 0) $gender = 0;
     79    if($online['gender'] == 0) $gender = 0;
    8080    else $gender = 1;
    8181    echo('<tr>'.
Note: See TracChangeset for help on using the changeset viewer.