Changeset 135
- Timestamp:
- 12/06/06 14:56:04 (16 years ago)
- Location:
- dev
- Files:
-
- 1 added
- 6 modified
Legend:
- Unmodified
- Added
- Removed
-
dev/common/admin.php
r134 r135 21 21 check_tblstrct3(); 22 22 check_tblstrct4(); 23 check_tblstrct5(); 23 24 24 25 if ($_POST['submit']) -
dev/common/autoupgrade.php
r123 r135 166 166 $qry->execute('ALTER TABLE `kb3_items` CHANGE `itm_externalid` `itm_externalid` INT( 11 ) NOT NULL DEFAULT \'0\''); 167 167 } 168 169 function check_tblstrct5() 170 { 171 $qry = new DBQuery(); 172 $query = 'select count(*) from kb3_standings'; 173 $result = mysql_query($query); 174 if ($result) 175 { 176 $query = 'select count(*) from kb3_standings where sta_from=1 and sta_to=1 and sta_from_type=\'a\' and 177 sta_to_type=\'c\''; 178 $result = mysql_query($query); 179 if ($result) 180 { 181 return; 182 } 183 $qry->execute('drop table kb3_standings'); 184 } 185 $query = 'CREATE TABLE `kb3_standings` ( 186 `sta_from` int(11) NOT NULL default \'0\', 187 `sta_to` int(11) NOT NULL default \'0\', 188 `sta_from_type` enum(\'a\',\'c\') NOT NULL default \'a\', 189 `sta_to_type` enum(\'a\',\'c\') NOT NULL default \'a\', 190 `sta_value` float NOT NULL default \'0\', 191 `sta_comment` varchar(200) NOT NULL, 192 KEY `sta_from` (`sta_from`) 193 ) TYPE=MyISAM;'; 194 $qry->execute($query); 195 } 168 196 ?> -
dev/common/home.php
r104 r135 69 69 } 70 70 71 $html .= "<div class=kb-kills-header>20 most recent kills</div>"; 71 // bad hax0ring, we really need mod callback stuff 72 if (strpos($config->getConfig('mods_active'), 'rss_feed') !== false) 73 { 74 $html .= "<div class=kb-kills-header><a href=\"?a=rss\"><img src=\"mods/rss_feed/rss_icon.png\" alt=\"RSS-Feed\" border=\"0\"></a> 20 most recent kills</div>"; 75 } 76 else 77 { 78 $html .= "<div class=kb-kills-header>20 most recent kills</div>"; 79 } 72 80 73 81 $klist = new KillList(); -
dev/common/kill_detail.php
r134 r135 12 12 if ($config->getConfig('item_values')) 13 13 { 14 $smarty->assign('item_values', "true");14 $smarty->assign('item_values', 'true'); 15 15 if ($page->isAdmin()) 16 16 { 17 $smarty->assign('admin', "true");17 $smarty->assign('admin', 'true'); 18 18 if (isset($_POST['submit'])) 19 19 { … … 21 21 $IID = $_POST['IID']; 22 22 $Val = $_POST[$IID]; 23 // 23 //echo "UPDATE kb3_items SET itm_value ='" . $Val . "' WHERE itm_id='" . $IID . "'"; 24 24 $qry = new DBQuery(); 25 25 $qry->execute("UPDATE kb3_items SET itm_value ='".$Val."' WHERE itm_id='".$IID."'"); … … 98 98 ++$i; 99 99 } 100 101 100 $smarty->assign_by_ref('involved', $involved); 102 101 … … 125 124 if (count($kill->destroyeditems_) > 0) 126 125 { 127 $cargo = array(); 128 $drone = array(); 129 $high_slot = array(); 130 $mid_slot = array(); 131 $low_slot = array(); 126 $dest_array = array(); 127 $dest_array[1] = array('img' => 'fitted_-_high_slot.jpg', 'text' => 'Fitted - High slot', 'items' => array()); 128 $dest_array[2] = array('img' => 'fitted_-_medium_slot.jpg', 'text' => 'Fitted - Mid slot', 'items' => array()); 129 $dest_array[3] = array('img' => 'fitted_-_low_slot.jpg', 'text' => 'Fitted - Low slot', 'items' => array()); 130 $dest_array[6] = array('img' => 'drone_bay.jpg', 'text' => 'Drone bay', 'items' => array()); 131 $dest_array[4] = array('img' => 'cargo.jpg', 'text' => 'Cargo Bay', 'items' => array()); 132 132 133 133 foreach($kill->destroyeditems_ as $destroyed) … … 170 170 } 171 171 } 172 $dest_array[$destroyed->getLocationID()][] = array('Icon' => $item->getIcon(32), 'Name' => $item->getName(), 'Quantity' => $destroyed->getQuantity(), 'Value' => $Formatted, 'single_unit' => $value_single, 'itemID' => $item->getID()); 173 } 174 } 175 176 /* 177 echo count($mid_slot); 178 print_r($low_slot); 179 print_r($dest_array['1']);*/ 172 $dest_array[$destroyed->getLocationID()]['items'][] = array('Icon' => $item->getIcon(32), 'Name' => $item->getName(), 'Quantity' => $destroyed->getQuantity(), 'Value' => $Formatted, 'single_unit' => $value_single, 'itemID' => $item->getID()); 173 } 174 } 180 175 181 176 if ($TotalValue > 0) … … 183 178 $Formatted = number_format($TotalValue, 2); 184 179 } 180 185 181 // Get Ship Value 186 182 $ShipValue = $ship->getPrice(); 187 188 183 $TotalLoss = number_format($TotalValue + $ShipValue, 2); 189 184 $ShipValue = number_format($ShipValue, 2); 190 185 191 $smarty->assign_by_ref('high_slot', $dest_array['1']); 192 $smarty->assign_by_ref('mid_slot', $dest_array['2']); 193 $smarty->assign_by_ref('low_slot', $dest_array['3']); 194 $smarty->assign_by_ref('cargo', $dest_array['4']); 195 $smarty->assign_by_ref('drone', $dest_array['6']); 186 $smarty->assign_by_ref('destroyed', $dest_array); 196 187 $smarty->assign('ItemValue', $Formatted); 197 188 $smarty->assign('ShipValue', $ShipValue); 198 189 $smarty->assign('TotalLoss', $TotalLoss); 199 190 200 $menubox = new box("Menu");191 $menubox = new Box("Menu"); 201 192 $menubox->setIcon("menu-item.gif"); 202 193 $menubox->addOption("caption", "View"); 203 $menubox->addOption("link","Killmail", "javascript:sndReq('index.php?a=kill_mail&kll_id=".$kill->getID()."');ReverseContentDisplay('popup')");194 $menubox->addOption("link", "Killmail", "javascript:sndReq('index.php?a=kill_mail&kll_id=".$kill->getID()."');ReverseContentDisplay('popup')"); 204 195 if ($kill->relatedKillCount() > 1 || $kill->relatedLossCount() > 1) 205 196 { -
dev/install/install_step4_tblchk.php
r133 r135 155 155 } 156 156 157 function check_tblstrct5() 158 { 159 $query = 'select count(*) from kb3_standings'; 160 $result = mysql_query($query); 161 if ($result) 162 { 163 $query = 'select count(*) from kb3_standings where sta_from=1 and sta_to=1 and sta_from_type=\'a\' and 164 sta_to_type=\'c\''; 165 $result = mysql_query($query); 166 if ($result) 167 { 168 return; 169 } 170 mysql_query('drop table kb3_standings'); 171 } 172 $query = 'CREATE TABLE `kb3_standings` ( 173 `sta_from` int(11) NOT NULL default \'0\', 174 `sta_to` int(11) NOT NULL default \'0\', 175 `sta_from_type` enum(\'a\',\'c\') NOT NULL default \'a\', 176 `sta_to_type` enum(\'a\',\'c\') NOT NULL default \'a\', 177 `sta_value` float NOT NULL default \'0\', 178 `sta_comment` varchar(200) NOT NULL, 179 KEY `sta_from` (`sta_from`) 180 ) TYPE=MyISAM;'; 181 mysql_query($query); 182 } 157 183 158 184 check_commenttable(); … … 167 193 check_tblstrct3(); 168 194 check_tblstrct4(); 195 check_tblstrct5(); 169 196 ?> -
dev/templates/kill_detail.tpl
r131 r135 57 57 </tr> 58 58 </table> 59 <div class=block-header>Ship details</div>60 59 61 {if $item_values} 62 <table class=kb-table width=360 border="0" cellspacing="1"> 63 64 <tr class=kb-table-row-even> 65 <td width="32"><img src="img/fitted_-_high_slot.jpg" alt="Fitted - High slot" border="0"></td> 66 <td colspan="2" class=kb-table-cell><b>Fitted - High slot</b> </td> 67 <td align="center" class=kb-table-cell><b>Value</b></td> 60 <div class="block-header">Ship details</div> 61 <table class="kb-table" width="360" border="0" cellspacing="1"> 62 {foreach from=$destroyed item=slot} 63 {* set to true to show empty slots *} 64 {if $slot.items} 65 <tr class="kb-table-row-even"> 66 <td width="32"><img src="img/{$slot.img}" alt="{$slot.text}" border="0"></td> 67 <td colspan="2" class="kb-table-cell"><b>{$slot.text}</b> </td> 68 {if $config->getConfig('item_values')} 69 <td align="center" class="kb-table-cell"><b>Value</b></td> 70 {/if} 68 71 </tr> 69 {foreach from=$ high_slot key=kitem=i}70 <tr class= kb-table-row-odd>71 <td class= item-icon width="32" height="34" valign=top>{$i.Icon}</td>72 <td class= kb-table-cell>{$i.Name}</td>72 {foreach from=$slot.items item=i} 73 <tr class="kb-table-row-odd"> 74 <td class="item-icon" width="32" height="34" valign="top">{$i.Icon}</td> 75 <td class="kb-table-cell">{$i.Name}</td> 73 76 <td width="30" align="center">{$i.Quantity}</td> 77 {if $config->getConfig('item_values')} 74 78 <td align="center">{$i.Value}</td> 79 {/if} 75 80 </tr> 76 {if $admin }77 <tr class= kb-table-row-odd>78 <form method=post id="{$value}" name="{$value}" action=>79 <td height="34" colspan="3" valign= top>81 {if $admin and $config->getConfig('item_values')} 82 <tr class="kb-table-row-even"> 83 <form method="post" action=""> 84 <td height="34" colspan="3" valign="top"> 80 85 <div align="right"> 81 86 Current single Item Value: 82 <input checked='checked' name='IID' value="{$i.itemID}" type='hidden'>83 <input name= '{$i.itemID}' type='text' class='comment-button' value='{$i.single_unit}' size='6'>87 <input name="IID" value="{$i.itemID}" type="hidden"> 88 <input name="{$i.itemID}" type="text" class="comment-button" value="{$i.single_unit}" size="6"> 84 89 </div> 85 <td height="34" valign= top ><input type='submit' name='submit' value='Update' class='comment-button'></td>86 90 <td height="34" valign="top"><input type="submit" name="submit" value="Update" class="comment-button"></td> 91 </form> 87 92 </tr> 88 93 {/if} 89 94 {foreachelse} 90 <tr class=kb-table-row-odd> 91 <td height="34" colspan="4" valign=top >No Information Stored</tr> 95 <tr class="kb-table-row-odd"> 96 <td colspan="4" valign="top">No Items lost</td> 97 </tr> 92 98 {/foreach} 93 <tr class=kb-table-row-even> 94 <td width="32"><img src="img/fitted_-_medium_slot.jpg" alt="Fitted - Mid slot" border="0"></td> 95 <td colspan=2 class=kb-table-cell> 96 <b>Fitted - Mid slot</b></td> 97 <td align="center" class=kb-table-cell><b>Value</b></td> 98 </tr> 99 {foreach from=$mid_slot key=k item=i} 100 <tr class=kb-table-row-odd> 101 <td class=item-icon width="32" height="34" valign=top>{$i.Icon}</td> 102 <td class=kb-table-cell>{$i.Name}</td> 103 <td width="30" align="center">{$i.Quantity}</td> 104 <td align="center">{$i.Value}</td> 105 </tr> 106 {if $admin=="true"} 107 <tr class={cycle values="kb-table-row-odd,kb-table-row-odd"}> 108 <form method=post id="{$value}" name="{$value}" action= > 109 <td height="34" colspan="3" valign=top > 110 <div align="right"> 111 Current single Item Value: 112 <input checked='checked' name='IID' value="{$i.itemID}" type='hidden'> 113 <input name= '{$i.itemID}' type='text' class='comment-button' value='{$i.single_unit}' size='6'> 114 </div> 115 <td height="34" valign=top ><input type='submit' name='submit' value='Update' class='comment-button'> </td> 116 </form> 117 </tr> 118 {/if} 119 {foreachelse} 120 <tr class={cycle values="kb-table-row-odd,kb-table-row-odd"}> 121 <td height="34" colspan="4" valign=top >No Information Stored</tr> 122 {/foreach} 123 <tr class=kb-table-row-even> 124 <td width="32"><img src="img/fitted_-_low_slot.jpg" alt="Fitted - Low slot" border="0"></td> 125 <td colspan=2 class=kb-table-cell><b>Fitted - Low slot</b></td> 126 127 <td align="center" class=kb-table-cell><b>Value</b></td> 128 </tr> 129 {foreach from=$low_slot key=k item=i} 130 <tr class=kb-table-row-odd> 131 <td class=item-icon width="32" height="34" valign=top>{$i.Icon}</td> 132 <td class=kb-table-cell>{$i.Name}</td> 133 <td width="30" align="center">{$i.Quantity}</td> 134 <td align="center">{$i.Value}</td> 135 </tr> 136 {if $admin=="true"} 137 <tr class={cycle values="kb-table-row-odd,kb-table-row-odd"}> 138 <form method=post id="{$value}" name="{$value}" action= > 139 <td height="34" colspan="3" valign=top > 140 <div align="right"> 141 Current single Item Value: 142 <input checked='checked' name='IID' value="{$i.itemID}" type='hidden'> 143 <input name= '{$i.itemID}' type='text' class='comment-button' value='{$i.single_unit}' size='6'> 144 </div> 145 <td height="34" valign=top ><input type='submit' name='submit' value='Update' class='comment-button'> </td> 146 </form> 147 </tr> 148 {/if} 149 {foreachelse} 150 <tr class={cycle values="kb-table-row-odd,kb-table-row-odd"}> 151 <td height="34" colspan="4" valign=top >No Information Stored</tr> 152 {/foreach} 153 <tr class=kb-table-row-even> 154 <td width="32"><img src="img/drone_bay.jpg" alt="Drone Bay" border="0"></td> 155 <td colspan=2 class=kb-table-cell><b>Drone Bay</b></td> 156 <td align="center" class=kb-table-cell><b>Value</b></td> 157 </tr> 158 159 {foreach from=$drones key=k item=i} 160 <tr class=kb-table-row-odd> 161 <td class=item-icon width="32" height="34" valign=top>{$i.Icon}</td> 162 <td class=kb-table-cell>{$i.Name}</td> 163 <td width="30" align="center">{$i.Quantity}</td> 164 <td align="center">{$i.Value}</td> 165 </tr> 166 {if $admin=="true"} 167 <tr class={cycle values="kb-table-row-odd,kb-table-row-odd"}> 168 <form method=post id="{$value}" name="{$value}" action= > 169 <td height="34" colspan="3" valign=top > 170 <div align="right"> 171 Current single Item Value: 172 <input checked='checked' name='IID' value="{$i.itemID}" type='hidden'> 173 <input name= '{$i.itemID}' type='text' class='comment-button' value='{$i.single_unit}' size='6'> 174 </div> 175 <td height="34" valign=top ><input type='submit' name='submit' value='Update' class='comment-button'> </td> 176 </form> 177 </tr> 178 {/if} 179 {foreachelse} 180 <tr class={cycle values="kb-table-row-odd,kb-table-row-odd"}> 181 <td height="34" colspan="4" valign=top >No Information Stored</tr> 182 {/foreach} 183 <tr class=kb-table-row-even> 184 <td width="32"><img src="img/cargo.jpg" alt="Drone Bay" border="0"></td> 185 <td colspan=2 class=kb-table-cell><b>Cargo Bay</b></td> 186 <td align="center" class=kb-table-cell><b>Value</b></td> 187 </tr> 188 {foreach from=$cargo key=k item=i} 189 <tr class=kb-table-row-odd> 190 <td class=item-icon width="32" height="34" valign=top>{$i.Icon}</td> 191 <td class=kb-table-cell>{$i.Name}</td> 192 <td width="30" align="center">{$i.Quantity}</td> 193 <td width="30" align="center">{$i.Value}</td> 194 </tr> 195 {if $admin=="true"} 196 <tr class=kb-table-row-odd> 197 <form method=post id="{$value}" name="{$value}" action= > 198 <td height="34" colspan="3" valign=top > 199 <div align="right"> 200 Current single Item Value: 201 <input checked='checked' name='IID' value="{$i.itemID}" type='hidden'> 202 <input name= '{$i.itemID}' type='text' class='comment-button' value='{$i.single_unit}' size='6'> 203 </div> 204 <td height="34" valign=top ><input type='submit' name='submit' value='Update' class='comment-button'> </td> 205 </form> 206 </tr> 207 {/if} 208 {foreachelse} 209 <tr class=kb-table-row-odd> 210 <td height="34" colspan="4" valign=top >No Information Stored</tr> 211 {/foreach} 212 {if $item_values=="true"} 99 {/if} 100 {/foreach} 101 {if $item_values} 213 102 <tr class={cycle name=ccl}> 214 <td colspan="3" 215 <td >{$ItemValue}</td>103 <td colspan="3"><div align="right"><strong>Total Module Loss:</strong></div></td> 104 <td align="right">{$ItemValue}</td> 216 105 </tr> 217 106 <tr class={cycle name=ccl}> 218 <td colspan="3" 219 <td >{$ShipValue}</td>107 <td colspan="3"><div align="right"><strong>Ship Loss:</strong></div></td> 108 <td align="right">{$ShipValue}</td> 220 109 </tr> 221 110 <tr class={cycle name=ccl}> 222 <td colspan="3" 223 <td >{$TotalLoss}</td>111 <td colspan="3"><div align="right"><strong>Total Loss:</strong></div></td> 112 <td align="right">{$TotalLoss}</td> 224 113 </tr> 225 114 {/if} 226 115 </table> 227 {else}228 <table class=kb-table width=360 border="0" cellspacing="1">229 230 <tr class=kb-table-row-odd>231 <td width="32"><img src="img/fitted_-_high_slot.jpg" alt="Fitted - High slot" border="0"></td>232 <td class=kb-table-cell colspan=2><b>Fitted - High slot</b></td>233 </tr>234 {foreach from=$high_slot key=k item=i}235 <tr class=kb-table-row-even>236 <td class=item-icon width="32" height="34" valign=top>{$i.Icon}</td>237 <td class=kb-table-cell>{$i.Name}</td>238 <td width="30" align="center">{$i.Quantity}</td>239 </tr>240 {foreachelse}241 <tr class=kb-table-row-even>242 <td height="34" colspan="3" valign=top >No Information Stored</tr>243 {/foreach}244 <tr class=kb-table-row-odd>245 <td width="32"><img src="img/fitted_-_medium_slot.jpg" alt="Fitted - Mid slot" border="0"></td>246 <td class=kb-table-cell colspan=2><b>Fitted - Mid slot</b></td>247 </tr>248 {foreach from=$mid_slot key=k item=i}249 <tr class=kb-table-row-even>250 <td class=item-icon width="32" height="34" valign=top>{$i.Icon}</td>251 <td class=kb-table-cell>{$i.Name}</td>252 <td width="30" align="center">{$i.Quantity}</td>253 </tr>254 {foreachelse}255 <tr class=kb-table-row-even>256 <td height="34" colspan="3" valign=top >No Information Stored</tr>257 {/foreach}258 <tr class=kb-table-row-odd>259 <td width="32"><img src="img/fitted_-_low_slot.jpg" alt="Fitted - low slot" border="0"></td>260 <td class=kb-table-cell colspan=2><b>Fitted - Low slot</b></td>261 </tr>262 {foreach from=$low_slot key=k item=i}263 <tr class=kb-table-row-even>264 <td class=item-icon width="32" height="34" valign=top>{$i.Icon}</td>265 <td class=kb-table-cell>{$i.Name}</td>266 <td width="30" align="center">{$i.Quantity}</td>267 </tr>268 {foreachelse}269 <tr class=kb-table-row-even>270 <td height="34" colspan="3" valign=top >No Information Stored</tr>271 {/foreach}272 <tr class=kb-table-row-odd>273 <td width="32"><img src="img/drone_bay.jpg" alt="Drone Bay" border="0"></td>274 <td class=kb-table-cell colspan=2><b>Drone Bay</b></td>275 </tr>276 {foreach from=$drone key=k item=i}277 <tr class=kb-table-row-even>278 <td class=item-icon width="32" height="34" valign=top>{$i.Icon}</td>279 <td class=kb-table-cell>{$i.Name}</td>280 <td width="30" align="center">{$i.Quantity}</td>281 </tr>282 {foreachelse}283 <tr class=kb-table-row-even>284 <td height="34" colspan="3" valign=top >No Information Stored</tr>285 {/foreach}286 <tr class=kb-table-row-odd>287 <td width="32"><img src="img/cargo.jpg" alt="Drone Bay" border="0"></td>288 <td class=kb-table-cell colspan=2><b>Cargo Bay</b></td>289 </tr>290 {foreach from=$cargo key=k item=i}291 <tr class=kb-table-row-even>292 <td class=item-icon width="32" height="34" valign=top>{$i.Icon}</td>293 <td class=kb-table-cell>{$i.Name}</td>294 <td width="30" align="center">{$i.Quantity}</td>295 </tr>296 {foreachelse}297 <tr class=kb-table-row-even>298 <td height="34" colspan="3" valign=top >No Information Stored</tr>299 {/foreach}300 </table>301 {/if}302 116 </td> 303 117 </tr>