Changeset 287 for quests/statistic.php


Ignore:
Timestamp:
Jan 30, 2008, 6:59:15 PM (17 years ago)
Author:
maron
Message:

oprava statistic.php

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quests/statistic.php

    r286 r287  
    3737  echo '<tr><th><a href="statistic.php?order=user&amp;desc='.$desc.'">Jméno</a></th>
    3838  <th><a href="statistic.php?order=NumberTranslate&amp;desc='.$desc.'" Title="Poèet pøelo¾ených questù">Pøelo¾ených</a></th>
    39   <th><a href="statistic.php?order=vote&amp;desc='.$desc.'" Title="Prùmìrná známka questù">Prùmìrná známka</a></th>
     39  <th><a href="statistic.php?order=Vote&amp;desc='.$desc.'" Title="Prùmìrná známka questù">Prùmìrná známka</a></th>
    4040  <th><a href="statistic.php?order=GM&amp;desc='.$desc.'">Oprávnìní</a></th>
    4141  <th><a href="statistic.php?order=LastLogin&amp;desc='.$desc.'">Poslední pøipojení</a></th></tr>';
     
    6464     + IFNULL((SELECT sum(Vote) AS Vote FROM `page_text` WHERE User = user.ID AND Complete =1),0)
    6565     + IFNULL((SELECT sum(Vote) AS Vote FROM `npc_text` WHERE User = user.ID AND Complete =1),0)
    66      ) AS SumVote, (
     66     ) / (
    6767       (SELECT count(Vote) AS Vote FROM `quests` WHERE User = user.ID AND Complete =1)
    6868     + (SELECT count(Vote) AS Vote FROM `page_text` WHERE User = user.ID AND Complete =1)
    6969     + (SELECT count(Vote) AS Vote FROM `npc_text` WHERE User = user.ID AND Complete =1)
    70      ) AS CountText
     70     ) AS Vote
    7171   FROM `user` ORDER BY $order $desc");
    7272   
    7373      while ($Line = mysql_fetch_array($ID)) {
    74      
    75         if ($Line['CountText'] <> 0)
    76           $Vote = $Line['SumVote']/$Line['CountText'];
    77         else $Vote = 0;
    78        
     74             
    7975        if (Licence(1))
    8076          $Name = '<a href="user.php?user='.$Line['ID'].'">'.$Line['user'].'</a>';
     
    8480        echo '<tr><td>'.$Name.'</td>
    8581        <td>'.$Line['NumberTranslate'].'</td>
    86         <td>'.substr($Vote, 0, 4).'</td>
     82        <td>'.substr($Line['Vote'], 0, 4).'</td>
    8783        <td>'.$Moderators[$Line['GM']].'</td>
    8884        <td>'.$Line['LastLogin'].'</td></tr>';
Note: See TracChangeset for help on using the changeset viewer.