Changeset 254 for dev/common/includes/class.map.php
- Timestamp:
- 12/05/07 20:53:40 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
dev/common/includes/class.map.php
r212 r254 139 139 and sjp.sjp_from = sys.sys_eve_id'; 140 140 141 $regioncache = 'cache/map/'.KB_SITE.'_'.$this->regionid_.'_'.$this->imgwidth_.'.png';142 $cached = false;143 144 141 if ($this->mode_ == "map") 145 142 { 146 if (file_exists($regioncache)) 147 { 148 header("Content-type: image/png"); 149 readfile($regioncache); 150 return; 151 } 143 $regioncache = 'cache/map/'.KB_SITE.'_'.$this->regionid_.'_'.$this->imgwidth_.'.png'; 152 144 $caption = $this->regname_; 153 145 } 154 155 if ($this->mode_ == "region")156 {146 elseif ($this->mode_ == "region") 147 { 148 $regioncache = 'cache/map/'.KB_SITE.'_'.$this->conid_.'_'.$this->imgwidth_.'.png'; 157 149 $sql .= " and reg.reg_id = ".$this->regionid_; 158 150 $caption = $this->conname_; 159 151 } 160 161 if ($this->mode_ == "cons") 162 { 152 elseif ($this->mode_ == "cons") 153 { 154 $regioncache = 'cache/map/'.KB_SITE.'_'.$this->systemid_.'_'.$this->imgwidth_.'.png'; 155 163 156 $sql .= " and con.con_id = ".$this->conid_; 164 157 $caption = $this->sysname_." (".roundsec($this->syssec_).")"; 165 158 } 166 167 if (!$cached) 159 if (file_exists($regioncache)) 160 { 161 header("Content-type: image/png"); 162 readfile($regioncache); 163 return; 164 } 165 166 if (true) 168 167 { 169 168 $qry = new DBQuery(); … … 357 356 358 357 imagestring($img, 1, 2, 2, $title, $captioncolor); 359 // imagettftext ( $img, 6, 0, 360 // 5, 361 // 10, 362 // $captioncolor, 363 // "../fonts/04B_03__.TTF", 364 // $title ); 365 if ($this->mode_ == "map" && !$cached) 358 if ($this->mode_ == "map") 359 { 360 imagepng($img, $regioncache); 361 } 362 // optionally cache constellation maps 363 elseif ($this->mode_ == 'region' && config::get('map_region_cache')) 364 { 365 imagepng($img, $regioncache); 366 } 367 // cache everything if we are reinforced 368 elseif (config::get('is_reinforced')) 366 369 { 367 370 imagepng($img, $regioncache);