Changeset 423

Show
Ignore:
Timestamp:
07/14/09 17:04:11 (11 years ago)
Author:
kovell
Message:

Fixes: missing code in rankmod located. logo code detects missing gd function, api_alliance labels Faction a Faction

Location:
dev
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • dev/common/includes/evelogo.php

    r370 r423  
    133133                $newsize = imagecreatetruecolor($size, $size); 
    134134                imagealphablending ( $newsize , true ); 
    135                 imageantialias ( $newsize , true ); 
     135                if(function_exists('imageantialias')) imageantialias ( $newsize , true ); 
    136136                imagecopyresampled($newsize, $logo, 0, 0, 0, 0, $size, $size, 64, 64); 
    137137                //imagepng ( $newsize , "cache/corps/" . $filename . "_" . $size . ".jpg" ); 
  • dev/common/includes/globals.php

    r422 r423  
    77else 
    88{ 
    9         $svn_rev = '422'; 
     9        $svn_rev = '423'; 
    1010} 
    1111define('SVN_REV', $svn_rev); 
  • dev/mods/api_alliance/alliance_detail.php

    r376 r423  
    8080if ($myAlliance) 
    8181{ 
    82         $page = new Page('Alliance details - '.$alliance->getName() . " [" . $myAlliance["shortName"] . "]"); 
     82        if($alliance->isFaction()) $page = new Page('Faction details - '.$alliance->getName() . " [" . $myAlliance["shortName"] . "]"); 
     83        else $page = new Page('Alliance details - '.$alliance->getName() . " [" . $myAlliance["shortName"] . "]"); 
    8384         
    8485        foreach ( (array)$myAlliance["memberCorps"] as $tempcorp) 
     
    167168        $html .= "<br/>";             
    168169} else { 
    169         $page = new Page('Alliance details - '.$alliance->getName()); 
     170        if($alliance->isFaction()) $page = new Page('Faction details - '.$alliance->getName() . " [" . $myAlliance["shortName"] . "]"); 
     171        else $page = new Page('Alliance details - '.$alliance->getName() . " [" . $myAlliance["shortName"] . "]"); 
    170172         
    171173        $html .= "<table class=kb-table width=\"100%\" border=\"0\" cellspacing=1><tr class=kb-table-row-even><td rowspan=8 width=128 align=center bgcolor=black>"; 
  • dev/mods/rank_mod/corp_detail.php

    r418 r423  
    252252            $list->addVictimShipClass(new ShipClass($_GET['scl_id'])); 
    253253                $list->setStartDate(date('Y-m-d H:i',strtotime('- 30 days'))); 
    254          
     254 
    255255        $ltab = new KillListTable($list); 
    256256        $ltab->setLimit(10); 
     
    922922        $html .= "</table>"; 
    923923        break; 
    924    case "pilot_medals": 
    925         $qry = new DBQuery(); 
    926         $query = "SELECT rank.med_id AS med_id, rank.time_id AS time_id, rank.plt_id AS plt_id 
    927                 FROM `kb3_rank_medals` rank 
    928                 INNER JOIN `kb3_pilots` plts 
    929                 ON ( plts.plt_id = rank.plt_id ) 
    930                 WHERE plts.plt_crp_id = ".$corp->getID()." 
    931                 ORDER BY 1 ASC, 2 DESC"; 
    932         $qry->execute($query); 
    933         $meds = array(); 
    934         while ($row = $qry->getRow()) { 
    935          $meds[$row['med_id']][]=array('plt_id' => $row['plt_id'], 'time_id' => $row['time_id']); 
    936         } 
    937         $html .= "<div class=block-header2>Awarded Medals</div>"; 
    938         $html .= "<table>"; 
    939         $html .= ""; 
    940         $html .= "</table>"; 
    941         break; 
     924        case "pilot_medals": 
     925                $qry = new DBQuery(); 
     926                $query = "SELECT rank.med_id AS med_id, rank.time_id AS time_id, rank.plt_id AS plt_id FROM `kb3_rank_medals` rank INNER JOIN `kb3_pilots` plts ON ( plts.plt_id = rank.plt_id ) WHERE plts.plt_crp_id = ".$corp->getID()." ORDER BY 1 ASC, 2 DESC"; 
     927                $qry->execute($query); 
     928                $meds = array(); 
     929                while ($row = $qry->getRow()) { 
     930                $meds[$row['med_id']][]=array('plt_id' => $row['plt_id'], 'time_id' => $row['time_id']); 
     931                } 
     932                $medsconv = array(); 
     933                $i = 0; 
     934                foreach($meds as $award) { 
     935                  foreach($award as $item) { 
     936                         $medsconv[$item['time_id']][$i] = $item['plt_id']; 
     937                  } 
     938                  $i++; 
     939                } 
     940                $html .= "<div class=block-header2>Awarded Medals</div>"; 
     941                $html .= "<table class=kb-table cellspacing=1 width=\"100%\" border=\"1\">"; 
     942                $class='odd'; 
     943                $html .= "<tr class=kb-table-row-".$class." align=\"center\" valign=\"top\"><td width=\"60\">&nbsp;</td>"; 
     944                foreach($medals as $med) { 
     945                  $html .= "<td><img src=\"".IMG_URL."/ranks/awards/".$med['type'].".gif\" border=\"0\"><br />".$med['mname']."<br />Top ".$med['name']."</td>"; 
     946                } 
     947                $html .= "</tr>"; 
     948   foreach($medsconv as $month=>$awards) { 
     949      if ($class=='odd') {$class='even';} else {$class='odd';} 
     950      list($time_y, $temp ,$time_m) = explode(' ', $month); 
     951      $html .= "<tr class=kb-table-row-".$class." align=\"center\"><td><a href=?a=awards&amp;m=$time_m&amp;y=$time_y>" . $month . "</a></td>"; 
     952      for ($t = 0; $t <= 8; $t++) { 
     953         $pilot = new Pilot($awards[$t]); 
     954         if($awards[$t]) { $html .= "<td><a class=kb-shipclass href=?a=pilot_detail&amp;plt_id=".$pilot->getID()."><img src=\"".$pilot->getPortraitURL()."\" /></a></td>"; } else { $html .= "<td>&nbsp;</td>"; } 
     955      } 
     956      $html .= "</tr>"; 
     957   } 
     958   $html .= "</table>"; 
     959   break; 
    942960   case "rank_ribbons": 
    943961        $rank_badges = config::getnumerical('rankmod_badreqs'); 
  • dev/mods/rank_mod/rank.php

    r422 r423  
    315315 
    316316$bonus_rps=0; 
    317 $base_rps=round($killpoints/config::get(rankmod_convfactor)); 
     317if(config::get(rankmod_convfactor)) $base_rps=round($killpoints/config::get(rankmod_convfactor)); 
     318else $base_rps=0; 
    318319 
    319320// MEDALS STUFF