Changeset 378 for dev/mods

Show
Ignore:
Timestamp:
06/21/09 12:01:49 (11 years ago)
Author:
kovell
Message:

API feed caches date properly. Rank mod has missing TopLists?. Parser has better spelling.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/mods/rank_mod/rank.php

    r370 r378  
    33require_once('common/includes/class.pilot.php'); 
    44require_once('common/includes/class.killlist.php'); 
     5 
     6class TopWeaponListNoLimit extends TopList 
     7{ 
     8    function TopWeaponList() 
     9    { 
     10        $this->TopWeaponListNoLimit(); 
     11    } 
     12 
     13    function generate() 
     14    { 
     15        $sql = "select count(1) as cnt, ind.ind_wep_id as itm_id, itm.itm_group as itm_grp 
     16                from kb3_inv_detail ind 
     17                    inner join kb3_items itm on (itm_id = ind.ind_wep_id)"; 
     18        if (DB_USE_CCP) 
     19        { 
     20            $sql = "select count(*) as cnt, ind.ind_wep_id as itm_id, itm.GroupID as itm_grp 
     21                      from kb3_inv_detail ind 
     22                      inner join kb3_invtypes itm on (typeID = ind.ind_wep_id)"; 
     23        } 
     24 
     25        if ($this->invplt_) 
     26            $sqlbottom .= " and ind.ind_plt_id = ".$this->invplt_->getID(); 
     27 
     28        if ($this->invcrp_) 
     29            $sqlbottom .= " and ind.ind_crp_id = ".$this->invcrp_->getID(); 
     30 
     31        if ($this->invall_) 
     32            $sqlbottom .= " and ind.ind_all_id = ".$this->invall_->getID(); 
     33 
     34        $this->setSQLTop($sql); 
     35        if (DB_USE_CCP) 
     36        { 
     37            // since ccps database doesnt have icons for ships this will also fix the ship as weapon bug 
     38            $this->setSQLBottom(" and itm.volume < '12000' 
     39                                  and itm.typeName != 'Unknown' 
     40                                  group by ind.ind_wep_id order by 1 desc"); 
     41        } 
     42        else 
     43        $this->setSQLBottom(" //and itm.itm_icon not in ( '1', 'icon_null' ) 
     44                             and itm.itm_name != 'Unknown' 
     45                             group by ind.ind_wep_id order by 1 desc"); 
     46    } 
     47} 
     48 
     49class TopShipListNoLimit extends TopShipList 
     50{ 
     51    function TopShipListNoLimit() 
     52    { 
     53        $this->TopShipList(); 
     54    } 
     55 
     56    function generate() 
     57    { 
     58        $sql = "select count(1) as cnt, ind.ind_shp_id as shp_id, shp.shp_class as cls_id 
     59              from kb3_inv_detail ind 
     60              inner join kb3_ships shp on ( shp_id = ind.ind_shp_id )"; 
     61 
     62        if ($this->invplt_) 
     63            $sqlbottom .= " and ind.ind_plt_id = ".$this->invplt_->getID(); 
     64 
     65        if ($this->invcrp_) 
     66            $sqlbottom .= " and ind.ind_crp_id = ".$this->invcrp_->getID(); 
     67 
     68        if ($this->invall_) 
     69            $sqlbottom .= " and ind.ind_all_id = ".$this->invall_->getID(); 
     70 
     71        $this->setSQLTop($sql); 
     72        $this->setSQLBottom(" and ind.ind_shp_id != 31 
     73                             and shp.shp_class != 17 
     74                             group by ind.ind_shp_id order by 1 desc"); 
     75    } 
     76} 
    577 
    678function TimeID2Str($time_id)