if (!config_check("er", $user_ship)) { $user_loc_message .= $st[21]; } elseif ($user['location'] == 1) { $user_loc_message .= $st[22]; } elseif (!isset($_POST['sure'])) { //not confirmed yet. get_var($cw['emergency_return'], $_SERVER['PHP_SELF'], $st[23], 'sure', 'yes'); } else { explore_sys($user, 1); //on the off chance it hasn't been destroyed. $user_ship['config'] = str_replace("er", "", $user_ship['config']); dbn("update {$db_name}_ships set location = '1', mine_mode = '0', config='{$user_ship['config']}', upgrade_slots = upgrade_slots + 1 where ship_id = '{$user['ship_id']}'"); $user_ship['mine_mode'] = 0; $user_ship['location'] = 1; $user['location'] = 1; get_star(); } } archive_links(); #random event stuff: if ($star['event_random'] > 0) { if ($star['event_random'] == 2) { $random_str = "<font color=#00aaaa><center><p />" . $st[24] . " <a href='help.php?topic=Random_Events' target='_blank'>(" . $cw['help'] . ")</a>"; $random_str .= "<p />" . $st[25] . "</center><p /></font>"; $header = $cw['nebula']; } elseif ($star['event_random'] == 4) { $random_str = "<center><p />" . $st[26]; $random_str .= "<p />" . $st[27] . "</center>"; $header = $cw['metal_rush']; } elseif ($star['event_random'] == 5) { $random_str = "<center><p />" . $st[28];
function get_star_image($it_id) { global $g5; $sql = "select (SUM(is_score) / COUNT(*)) as score from {$g5['g5_shop_item_use_table']} where it_id = '{$it_id}' "; $row = sql_fetch($sql); return (int) get_star($row['score']); }
?> <script src="<?php echo G5_JS_URL; ?> /viewimageresize.js"></script> <!-- 상품 사용후기 시작 { --> <section id="sit_use_list"> <h3>등록된 사용후기</h3> <?php $thumbnail_width = 500; for ($i = 0; $row = sql_fetch_array($result); $i++) { $is_num = $total_count - ($page - 1) * $rows - $i; $is_star = get_star($row['is_score']); $is_name = get_text($row['is_name']); $is_subject = conv_subject($row['is_subject'], 50, "…"); $is_content = get_view_thumbnail(conv_content($row['is_content'], 1), $thumbnail_width); $is_time = substr($row['is_time'], 2, 8); $is_href = './itemuselist.php?bo_table=itemuse&wr_id=' . $row['wr_id']; $hash = md5($row['is_id'] . $row['is_time'] . $row['is_ip']); if ($i == 0) { echo '<ol id="sit_use_ol">'; } ?> <li class="sit_use_li"> <button type="button" class="sit_use_li_title"><b><?php echo $is_num; ?>
$production_tag = create_production_tag($pid); } echo "<SR_REQUEST type=\"planet_info_prod\" pid=\"" . $pid . "\">"; echo $production_tag; echo "</SR_REQUEST>"; } $map_info = new map_info($uid); switch ($_GET["act"]) { case "clickOnPlanet": getPlanetData(); break; case "clickOnGetItems": get_items(); break; case "clickOnStar": get_star($_GET["sid"]); break; case "clickOnJumpGate": get_jumpgate($_GET["sid"]); break; case "clickOnGetPlanetInfo": get_planetDetail($_GET["pid"]); break; case "getPlanetInfoProduction": get_planetProduction($_GET["pid"]); break; } $content = ob_get_contents(); ob_end_clean(); #if ($_GET["debug"]) print $content;
function bfbc2_display_player_vehicles($player) { $vehicles = object2array($player->vehicles); $vehiclelist = '<table width="100%" border="0" cellspacing="1" cellpadding="0" class="outertable"> <tr> <td> <table width="100%" border="0" cellspacing="2" cellpadding="0" class="innertable"> <tr class="outertable"> <td colspan="6" align="center">Your Vehicle Stats</td> </tr> <tr> <td class="innertable" align="center"> '; foreach ($vehicles as $vname => $vstats) { if ($vstats['seconds'] > 0) { //Change seconds to hh:mm:ss (specially format time) $time_seconds = round($vstats['seconds']); $hh = intval($time_seconds / 3600); $ss_remaining = $time_seconds - $hh * 3600; $mm = intval($ss_remaining / 60); $ss = $ss_remaining - $mm * 60; $time = sprintf("%02d", $hh) . "h " . sprintf("%02d", $mm) . "m " . sprintf("%02d", $ss) . "s"; $avgspeed = @($vstats['distance'] / $time_seconds); $star = get_star($vstats); $vname = strtolower($vname); //Array of vehicles that have different names on gamelog and bfbcs.com data (bfbcs_name => gamelog_name) $dif_vnames = array("hmv" => "humv", "t90" => "t90r", "havoc" => "mi24", "uav" => "uav1", "xm312" => "x312", "aav" => "zu23"); if (array_key_exists($vname, $dif_vnames)) { $vname = $dif_vnames[$vname]; } $vehiclelist .= '<div class="weapon"> <div class="image"><img src ="images/weapons/bfbc2/small/' . $vname . '.png" width="120"/></div> <div class="name">' . $vstats['name'] . '</div> '; if (isset($star)) { $vehiclelist .= '<div class="star"><img src ="images/bc2global/stars/' . $star[0] . '.png" title="You have ' . (isset($star[1]) ? $star[1] . ' ' . $star[2] . ' stars!' : 'a ' . $star[2] . ' star!') . ' " />' . $star[1] . '</div>'; } $vehiclelist .= ' <ul> <li> <span class="label">Class:</span> <span class="score">' . ucwords($vstats['class']) . '</span> </li> <li> <span class="label">Kills:</span> <span class="score">' . number_format($vstats['kills'], 0, " ", " ") . '</span> </li> <li> <span class="label">Roadkills:</span> <span class="score">' . ($vstats['class'] != 'stationary' ? number_format($vstats['roadkills'], 0, " ", " ") : 'N/A') . '</span> </li> <li> <span class="label">Distance:</span> <span class="score">' . ($vstats['class'] != 'stationary' ? number_format($vstats['distance'], 0, " ", " ") : 'N/A') . '</span> </li> <li> <span class="label">Time:</span> <span class="score">' . $time . '</span> </li> <li> <span class="label">Avg.Speed:</span> <span class="score">' . ($vstats['class'] != 'stationary' ? number_format($avgspeed, 2, ".", " ") . ' d/s' : 'N/A') . '</span> </li> </ul> </div> '; } } $vehiclelist .= ' </td></tr> </table> </td> </tr> </table> '; return $vehiclelist; }