Changeset 357
- Timestamp:
- 10/27/08 12:26:01 (14 years ago)
- Location:
- dev
- Files:
-
- 7 modified
Legend:
- Unmodified
- Added
- Removed
-
dev/common/includes/class.corp.php
r343 r357 78 78 if ($qry->recordCount() == 0) 79 79 { 80 $qry->execute("insert into kb3_corps values ( null,'".slashfix($name)."',"80 $qry->execute("insert into kb3_corps (crp_id, crp_name, crp_all_id, crp_trial, crp_updated) values ( null,'".slashfix($name)."'," 81 81 .$alliance->getID().",0,date_format('".$timestamp."','%Y.%m.%d %H:%i:%s'))"); 82 82 $this->id_ = $qry->getInsertID(); -
dev/common/includes/class.item.php
r355 r357 17 17 { 18 18 $this->execQuery(); 19 if (DB_USE_CCP) 20 { 21 return $this->row_['typeName']; 22 } 23 return $this->row_['itm_name']; 19 return $this->row_['typeName']; 24 20 } 25 21 … … 43 39 { 44 40 $img = IMG_URL.'/blueprints/'.$size.'_'.$size.'/'.$this->row_['itm_externalid'].'.png'; 45 } 46 else 47 { 48 // fix for new db structure, just make sure old clients dont break 49 if (!strstr($this->row_['itm_icon'], 'icon')) 50 { 51 $this->row_['itm_icon'] = 'icon'.$this->row_['itm_icon']; 52 } 53 $img = IMG_URL.'/items/'.$size.'_'.$size.'/'.$this->row_['itm_icon'].'.png'; 54 } 41 } 42 55 43 if ($size == 24) 56 44 { … … 166 154 return false; 167 155 } 168 $this->sql_ = "select * 169 from kb3_items 170 left join kb3_item_types on itm_type = itt_id 171 where itm_id = '".$this->id_."'"; 172 173 if (DB_USE_CCP) 174 { 175 // new 176 $this->sql_ = "select inv.*, kb3_item_types.*, dga.value as techlevel, itp.price 156 157 $this->sql_ = "select inv.*, kb3_item_types.*, dga.value as techlevel, itp.price 177 158 from kb3_invtypes inv 178 159 left join kb3_dgmtypeattributes dga on dga.typeID=inv.typeID and dga.attributeID=633 … … 180 161 left join kb3_item_types on groupID=itt_id 181 162 where inv.typeID = '".$this->id_."'"; 182 }183 163 $this->qry_->execute($this->sql_); 184 164 $this->row_ = $this->qry_->getRow(); 185 if (DB_USE_CCP) 186 { 187 $this->row_['itm_icon'] = $this->row_['icon']; 188 $this->row_['itm_techlevel'] = $this->row_['techlevel']; 189 $this->row_['itm_externalid'] = $this->row_['typeID']; 190 $this->row_['itm_value'] = $this->row_['price']; 191 } 192 } 193 } 194 165 $this->row_['itm_icon'] = $this->row_['icon']; 166 $this->row_['itm_techlevel'] = $this->row_['techlevel']; 167 $this->row_['itm_externalid'] = $this->row_['typeID']; 168 $this->row_['itm_value'] = $this->row_['price']; 169 } 170 } 171 172 // loads $this->id_ by name 195 173 function lookup($name) 196 174 { 197 175 $name = trim($name); 198 176 $qry = new DBQuery(); 199 $query = "select * from kb3_items itm 200 where itm_name = '".slashfix($name)."'"; 201 if (DB_USE_CCP) 202 { 203 $query = "select *,typeID as itm_id from kb3_invtypes itm 204 where typeName = '".slashfix($name)."'"; 205 } 177 $query = "select *,typeID as itm_id from kb3_invtypes itm 178 where typeName = '".slashfix($name)."'"; 206 179 $qry->execute($query); 207 180 $row = $qry->getRow(); 208 181 if (!isset($row['itm_id'])) 209 182 { 210 if (config::get('adapt_items') && DB_USE_CCP !== true) 211 { 212 // if the item is a tec2 we likely have the tec1 213 if (substr($name, -2, 2) == 'II') 214 { 215 $qry->execute("select * from kb3_items itm 216 where itm_name = '".slashfix(substr($name,0,-1))."'"); 217 $row = $qry->getRow(); 218 if (!$row['itm_type']) 219 { 220 return false; 221 } 222 $qry->execute("INSERT INTO kb3_items (itm_name,itm_volume,itm_type,itm_externalid,itm_techlevel,itm_icon) 223 VALUES ('".slashfix($name)."','".$row['itm_volume']."','".$row['itm_type']."','".$row['itm_externalid']."','2','".$row['itm_icon']."')"); 224 } 225 else 226 { 227 // no idea what this is, insert as 'Temp' 228 $qry->execute("INSERT INTO kb3_items (itm_name,itm_type) 229 VALUES ('".slashfix($name)."','721')"); 230 } 231 $row['itm_id'] = $qry->getInsertID(); 232 } 233 else 234 { 235 // that item doesnt exist or is misspelled 236 return false; 237 } 183 return false; 238 184 } 239 185 $this->id_ = $row['itm_id']; 240 186 } 241 187 242 188 // return typeID by name, dont change $this->id_ 243 189 function get_item_id($name) 244 190 { 245 191 $qry = new DBQuery(); 246 $query = "select * 247 from kb3_items 248 where itm_name = '".slashfix($name)."'"; 249 if (DB_USE_CCP) 250 { 251 $query = "select *,typeID as itm_id 252 from kb3_items 253 where typeName = '".slashfix($name)."'"; 254 } 192 $query = "select *,typeID as itm_id 193 from kb3_items 194 where typeName = '".slashfix($name)."'"; 255 195 $qry->execute($query); 256 196 … … 316 256 } 317 257 318 258 function get_group_id($name) 319 259 { 320 260 $qry = new DBQuery(); -
dev/common/includes/class.kill.php
r340 r357 770 770 771 771 $qry = new DBQuery(); 772 $sql = "insert into kb3_kills values (".$qid.", 772 $sql = "INSERT INTO kb3_kills 773 (kll_id , kll_timestamp , kll_victim_id , kll_all_id , kll_crp_id , kll_ship_id , kll_system_id , kll_fb_all_id , kll_fb_crp_id , kll_fb_plt_id , kll_points , kll_dmgtaken) 774 VALUES (".$qid.", 773 775 date_format('".$this->timestamp_."', '%Y.%m.%d %H:%i:%s'), 774 ".$this->victimid_.", ".$this->victimallianceid_.", 775 ".$this->victimcorpid_.", ".$this->victimship_->getID().", 776 ".$this->solarsystem_->getID().", ".$this->getFBAllianceID().", 777 ".$this->getFBCorpID().", ".$this->getFBPilotID().", ".$this->calculateKillPoints().", ".$this->dmgtaken." )"; 776 ".$this->victimid_.", 777 ".$this->victimallianceid_.", 778 ".$this->victimcorpid_.", 779 ".$this->victimship_->getID().", 780 ".$this->solarsystem_->getID().", 781 ".$this->getFBAllianceID().", 782 ".$this->getFBCorpID().", 783 ".$this->getFBPilotID().", 784 ".$this->calculateKillPoints().", 785 ".$this->dmgtaken." )"; 778 786 $qry->execute($sql); 779 787 … … 808 816 809 817 $sql = "insert into kb3_inv_detail 810 values ( ".$this->getID().", ".$inv->getPilotID().", '".$inv->getSecStatus()."', " 818 (ind_kll_id, ind_plt_id, ind_sec_status, ind_all_id, ind_crp_id, ind_shp_id, ind_wep_id, ind_order, ind_dmgdone ) 819 values ( ".$this->getID().", ".$inv->getPilotID().", '".$inv->getSecStatus()."', " 811 820 .$inv->getAllianceID().", ".$inv->getCorpID().", ".$ship->getID().", " 812 821 .$weapon->getID().", ".$order++.", ".$inv->dmgdone_.")"; … … 816 825 { 817 826 array_push($invall, $inv->getAllianceID()); 818 $qry->execute("insert into kb3_inv_all values ( ".$this->getID().", ".$inv->getAllianceID()." )") or die($qry->getErrorMsg());827 $qry->execute("insert into kb3_inv_all (ina_kll_id, ina_all_id) values ( ".$this->getID().", ".$inv->getAllianceID()." )") or die($qry->getErrorMsg()); 819 828 } 820 829 if (!in_array($inv->getCorpID(), $invcrp)) 821 830 { 822 831 array_push($invcrp, $inv->getCorpID()); 823 $qry->execute("insert into kb3_inv_crp values ( ".$this->getID().", ".$inv->getCorpID()." )") or die($qry->getErrorMsg());832 $qry->execute("insert into kb3_inv_crp (inc_kll_id, inc_crp_id) values ( ".$this->getID().", ".$inv->getCorpID()." )") or die($qry->getErrorMsg()); 824 833 } 825 834 if (!in_array($inv->getPilotID(), $invplt)) 826 835 { 827 836 array_push($invplt, $inv->getPilotID()); 828 $qry->execute("insert into kb3_inv_plt values ( ".$this->getID().", ".$inv->getPilotID()." )") or die($qry->getErrorMsg());837 $qry->execute("insert into kb3_inv_plt (inp_kll_id, inp_plt_id) values ( ".$this->getID().", ".$inv->getPilotID()." )") or die($qry->getErrorMsg()); 829 838 } 830 839 } … … 842 851 } 843 852 844 $sql = "insert into kb3_items_destroyed 853 $sql = "insert into kb3_items_destroyed (itd_kll_id, itd_itm_id, itd_quantity, itd_itl_id) 845 854 values ( ".$this->getID().", ".$item->getID().", ".$dest->getQuantity().", " 846 855 .$loc_id." )"; … … 860 869 } 861 870 862 $sql = "insert into kb3_items_dropped 871 $sql = "insert into kb3_items_dropped (itd_kll_id, itd_itm_id, itd_quantity, itd_itl_id) 863 872 values ( ".$this->getID().", ".$item->getID().", ".$dest->getQuantity().", " 864 873 .$loc_id." )"; -
dev/common/includes/globals.php
r355 r357 1 1 <?php 2 2 // current subversion revision 3 preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 35 5$', $match);3 preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 357 $', $match); 4 4 define('SVN_REV', $match[1]); 5 5 -
dev/mods/history/about.php
r355 r357 69 69 if ($count > 5 && !isset($_GET['showAll'])) 70 70 break; 71 $html .= "<tr class=kb-table-row-odd><td width = 50><a href='http ://trac.eve-dev.net/changeset/".$set->rev."' target='_blank'>REV".$set->rev."</a><td>".$set->author."</td><td width=100 align='right'>".$set->date."</tr>";71 $html .= "<tr class=kb-table-row-odd><td width = 50><a href='https://svn.nsbit.dk/trac/edk/changeset/".$set->rev."' target='_blank'>REV".$set->rev."</a><td>".$set->author."</td><td width=100 align='right'>".$set->date."</tr>"; 72 72 foreach ($set->comment as $comment) 73 73 { -
dev/mods/history/history.xml
r355 r357 2 2 <history> 3 3 <changeset> 4 <rev>355</rev> 4 <rev>357</rev> 5 <author>Ralle030583</author> 6 <date>27.10.2008</date> 7 <comment> 8 <type>FIX</type> 9 <text> 10 linking in history-mod about page rev numbers to beansmans trac, 11 cause trac.eve-dev.net is currenty down 12 </text> 13 </comment> 14 <comment> 15 <type>FIX</type> 16 <text> 17 removing some old queris from preior CCP dump use 18 (DB_USE_CCP stuff) 19 </text> 20 </comment> 21 <comment> 22 <type>FIX</type> 23 <text> 24 path for swf-banner corrected to banner/{banner} 25 </text> 26 </comment> 27 <comment> 28 <type>UPD</type> 29 <text> 30 Changed inserts into name adressed ones 31 </text> 32 </comment> 33 </changeset> 34 <changeset> 35 <rev>355/356</rev> 5 36 <author>beans</author> 6 37 <date>24.10.2008</date> -
dev/templates/index.tpl
r343 r357 27 27 {if $bannerswf=='true'} 28 28 <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="1000" HEIGHT="200" id="{$banner}" ALIGN=""> 29 <PARAM NAME=movie VALUE=" {$img_url}/logo/{$banner}"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=black> <EMBED src="{$banner}" quality=high bgcolor=black WIDTH="1000" HEIGHT="200" NAME="{$banner}" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED> </OBJECT>29 <PARAM NAME=movie VALUE="banner/{$banner}"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=black> <EMBED src="banner/{$banner}" quality=high bgcolor=black WIDTH="1000" HEIGHT="200" NAME="{$banner}" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED> </OBJECT> 30 30 {else} 31 31 {if $banner_link}