$header = "Shoutbox"; $forum_id = -1; $col_arr = array('#444444', '#282828', '#202020', '#888888'); dbn("update {$db_name}_users set last_access_forum='" . time() . "' where login_id = '{$user['login_id']}'"); $out .= '<div id="derniers_messages">' . make_table2(array('Derniers messages<br />du forum')); $phpbb_root_path = 'forum/'; $sql = 'SELECT p.*, t.* FROM phpbb_posts p JOIN phpbb_topics t ON p.topic_id = t.topic_id GROUP BY t.topic_id ORDER BY p.post_id DESC LIMIT 12'; db($sql); $messages = ''; while ($row = dbr()) { if (strlen($row['topic_title']) > 40) { $row['topic_title'] = substr($row['topic_title'], 0, 37) . '...'; } $messages .= '<a href="' . $phpbb_root_path . 'viewtopic.php?t=' . $row['topic_id'] . '" target="_blank">' . ucfirst($row['topic_title']) . '</a><br />'; } $out .= q_row($messages, 'l_col'); //end the left-bar cell $out .= "\n</table></div>"; // facebook like box $out .= '<iframe src="http://www.facebook.com/plugins/likebox.php?id=151362804883979&width=292&connections=10&stream=false&header=false&height=255" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:255px; background-color: #FFFFFF;" allowTransparency="false"></iframe>'; $out .= '<div class="spacer"></div>'; } else { //messing around print_page("Dunno", "You've been messing with things you don't understand again, havn't you?"); } /******************* * Message Deletion *******************/ if (isset($_GET['killmsg']) && $admin_powers == 1) { if ($forum_id == -50) { //deleting from central forum
} else { $output_str .= $st[578]; } $ship_stuff = ""; if ($user_ship['empty_bays'] != $user_ship['cargo_bays']) { $ship_stuff .= q_row("<a href='location.php?jettison=1'>" . $cw['jettison_cargo'] . "</a>", "l_col"); } if (config_check("er", $user_ship)) { $ship_stuff .= q_row("<a href='location.php?emergency_return=1'>" . $cw['emergency_return'] . "!</a>", "l_col"); } if ($user['genesis'] > 0) { $ship_stuff .= q_row("<a href='planet_build.php?location={$user['location']}'>" . $cw['use_genesis_device'] . "</a> (<b>{$user['genesis']}</b>)", "l_col"); } if ($user['gdt'] > 0) { $ship_stuff .= q_row("<a href='location.php?tempo=1'>" . $cw['deployer_bulle_tempo'] . "</a> (<b>" . $user['gdt'] . "</b>)", "l_col"); } if ($user['alpha'] > 0) { $ship_stuff .= q_row("<a href='bombs.php?alpha=1'>" . $cw['deploy_alpha_bomb'] . "</a> (<b>{$user['alpha']}</b>)", "l_col"); } if ($user['gamma'] > 0) { $ship_stuff .= q_row("<a href='bombs.php?bomb_type=1'>" . $cw['detonate_gamma_bomb'] . "</a> (<b>{$user['gamma']}</b>)", "l_col"); } if ($user['delta'] > 0) { $ship_stuff .= q_row("<a href='bombs.php?bomb_type=2'>" . $cw['delta_bomb_purge'] . "</a>!", "l_col"); } //only make the table if it will have content if (!empty($ship_stuff)) { $output_str .= "<p />" . make_table2(array($cw['ship_equipement_functions']), "s_funcs"); $output_str .= $ship_stuff . "</table>"; } print_page($cw['fleet_command'], $output_str);
$file_rand = ""; } else { $file_rand = "_" . $game_info['random_filename']; } $error_str .= "<table border=1 bordercolor=#808080 cellspacing=0 cellpadding=0>\n<tr>\n<td>\n<img src={$directories['images']}/{$db_name}_maps/sm{$user['location']}{$file_rand}.png border=0 width=300 height=300 alt=\"Mini-carte des systèmes autour de #{$user['location']}\" usemap='#system_map' />"; } //map for the mini-map: $error_str .= "<map name='system_map'>\n"; //get location of each star linked to db("select star_id, x_loc, y_loc from {$db_name}_stars where star_id = '" . implode('\' || `star_id` = \'', $star_links) . "'"); if (!empty($star_links)) { //compensate for present star location. Note: -100 is half of mini-map size. while ($loop_stars = dbr()) { $loop_stars['x_loc'] -= $star['x_loc'] - 150; $loop_stars['y_loc'] -= $star['y_loc'] - 150; $linkInfo[(int) $loop_stars['star_id']] = $loop_stars; } //create html foreach ($linkInfo as $id => $s) { $error_str .= "<area shape='rect' coords='" . ($s['x_loc'] - 10) . "," . ($s['y_loc'] - 10) . "," . ($s['x_loc'] + 10) . "," . ($s['y_loc'] + 10) . "' href='location.php?toloc={$id}' alt='Système #{$id}' />\n"; } } $error_str .= "</map></td></tr></table><a href='location.php?minimap=1'>Basculer en affichage 3D</a>"; } if (config_check("sj", $user_ship)) { $error_str .= "<p />" . make_table2(array($cw['subspace_jump']), "s_funcs"); $error_str .= q_row("<form name='subspace_form' action='location.php' method='POST'><center>" . $cw['set_destination_jump'] . "<br /><input type='text' size='4' maxlength='4' name='subspace' class='inputtext' /> - <input type='submit' value='" . $cw['jump'] . "' />", "l_col"); } //close the table that seperates the minimap $error_str .= "</td></tr></table>"; print_page($header, $error_str);
function print_leftbar() { global $user, $db_name, $game_info, $user_ship, $GAME_VARS, $p_user, $cw, $st; //create the major table for the WHOLE PAGE $str = "\n<table border='0' cellspacing='0' cellpadding='0' width='100%'>"; //whole page fills 1 "row". $str .= "\n<tr width='100%'>"; //create "cell" for left bar. width stipulates width of this bar. //uses class "leftbar" from the stylesheets to decide on it's width $str .= "\n<td class='leftbar' align='left' valign='top'>"; /*************** Content *************/ $str .= '<img src="images/logos/logo_petit.png" /><br />'; //top box with game details in it $str .= make_table2(array(date("d M - H:i")), "l_col"); $str .= q_row(popup_help("game_info.php?db_name={$db_name}", 600, 450, $game_info['name']), "l_col"); if ($game_info['paused'] == 1) { $str .= q_row($cw['game_paused'], "l_col"); } else { $str .= q_row("<b>{$game_info['days_left']}</b> " . $cw['days_left'], "l_col"); } //active user count details $end_lnk = ""; $cnt_link_str = ""; if ($user['login_id'] == 1 || $user['login_id'] == OWNER_ID) { $cnt_link_str .= "<a href='admin.php?show_active=1'>"; $end_lnk = "</a>"; } db("select count(login_id) from {$db_name}_users where login_id > 1 && last_request > " . (time() - 300)); $lr_result = dbr(); $str .= q_row($cnt_link_str . "<b>{$lr_result['0']}</b> " . $cw['active_users'] . "{$end_lnk}</b>", "l_col"); $str .= "</table><p />"; //end top box with game details $str .= make_table2(array(stripslashes(print_name($user))), "l_col"); $str .= q_row("<b>" . number_format($user['turns']) . "</b> " . strtolower($cw['turns']) . " sur <b>" . number_format($GAME_VARS['max_turns']) . "</b> max<br /><a href='buy.php' id='plusCycles'>Plus de cycles</a>", "l_col"); //newbie safety, or admin link if ($user['login_id'] == 1 || $user['login_id'] == OWNER_ID) { //cheating and using this space for admin links $str .= "\n<td><a href='admin.php'>" . $cw['admin'] . "</a>"; if ($user['login_id'] == OWNER_ID) { //server admin link $str .= "\n<br /><a href='developer.php'>" . $cw['server_admin'] . "</a>"; } $str .= "</td>"; /*} elseif($user['turns_run'] > $GAME_VARS['turns_safe']){ $str .= "\n<td><a href='buy.php' style='color:#FF0000;'>".$cw['Get more turns']."</a></td>";*/ } elseif ($user['turns_run'] < $GAME_VARS['turns_safe']) { $s_turns = $GAME_VARS['turns_safe'] - $user['turns_run']; $str .= q_row("<b>{$s_turns}</b> <b class='b1'>" . $cw['safe_turns_left'] . "</b>", "l_col"); } elseif ($user['turns_run'] <= $GAME_VARS['turns_safe']) { $str .= q_row("<b class='b1'>" . $cw['leaving_newbie_safety'] . "</b>", "l_col"); charge_turns(1); send_message($user['login_id'], $st[7]); } if (!$p_user['bp_user_id']) { $plusCubits = "<br /><a href='buy_cubits.php' id='plusCycles'>Plus de cubits</a>"; } $str .= q_row("<b>" . number_format($user['cash'], 0, ',', ' ') . "</b> " . strtolower($cw['credits']) . $plusCubits, "l_col"); $str .= q_row("<b>" . number_format($user['tech']) . "</b> " . $cw['tech_units'], "l_col"); $str .= "</table>"; /* //if not in a ship, don't show these details if($user['ship_id'] == 1) { $str .= make_table2(array($cw['ship_destroyed']), "l_col"); } else { $str .= make_table2(array(stripslashes($user_ship['ship_name'])), "l_col"); $str .= q_row(popup_help("help.php?popup=1&ship_info=".$user_ship['shipclass']."&db_name=$db_name", 300, 600, $user_ship['class_name']), "l_col"); $clan_fleet_str = ""; if($user['clan_id'] > 0 && $GAME_VARS['clan_fleet_attacking'] == 1){ $clan_fleet_str= " ".$cw['c_fleet'].": <b>$user_ship[clan_fleet_id]</b>"; } $str .= q_row($cw['fleet'].": <b>$user_ship[fleet_id]</b><br />".$clan_fleet_str, "l_col"); $str .= q_row($cw['fighters'].": <b>".number_format($user_ship['fighters'])."</b> / <b>".number_format($user_ship['max_fighters'])."</b>", "l_col"); $str .= q_row($cw['shields'].": <b>".number_format($user_ship['shields'])."</b> / <b>".number_format($user_ship['max_shields'])."</b>", "l_col"); $str .= q_row($cw['armour'].": <b>".number_format($user_ship['armour'])."</b> / <b>".number_format($user_ship['max_armour'])."</b>", "l_col"); $str .= q_row($cw['cargo_bays'].":<br />".bay_storage($user_ship), "l_col"); } $str .= "</table>"; //end of ship detail listing */ /*************************Forum Links***************************/ /* //prepare to get central forum information $last_globals = $p_user['last_access_global_forum']; $last_admin = 0; if($user['login_id'] == 1){ //last access admin forum for admins $last_admin = $game_info['last_access_admin_forum']; } elseif($user['login_id'] == OWNER_ID) { //last access admin forum for server op $last_admin = $p_user['icq']; } //get new messages from central forums (admin and globals). db("select count(message_id) as new_messages, forum_id from se_central_messages where (timestamp > '$last_admin' && (('$user[login_id]' = 1 && (game_id != '$game_info[game_id]' || sender_id != 1)) || (sender_id != '$user[login_id]' && '$user[login_id]' = '".OWNER_ID."')) && forum_id = -99) || (timestamp > '$last_globals' && (sender_id = 1 || (sender_id != 1 && sender_id != '$user[login_id]')) && forum_id = -50) group by forum_id"); //initialise array that will contain how many of each message was found. $msgs_array = array(-1 => 0, -5 => 0, -50 => 0, -99 => 0); while($msg_tmp = dbr(1)){ $msgs_array[$msg_tmp['forum_id']] = $msg_tmp['new_messages']; } //get new messages for regular and clan forums db("select count(message_id) as new_messages, login_id as forum_id from ${db_name}_messages where (timestamp > '$user[last_access_forum]' && login_id = -1 && sender_id != '$user[login_id]') || (timestamp > '$user[last_access_clan_forum]' && login_id = -5 && clan_id = '$user[clan_id]' && sender_id != '$user[login_id]') group by login_id"); while($msg_tmp = dbr(1)){ $msgs_array[$msg_tmp['forum_id']] = $msg_tmp['new_messages']; } //initiate comms. table $str .= "<p />".make_table2(array($cw['communications']), "l_col"); //messages links. Need to work out if there are any messages for the player. db("select count(message_id) from ${db_name}_messages where login_id = '$user[login_id]' and timestamp > ".$user['last_access_msg']); $counted = dbr(); if($counted[0] == 0){ $str .= q_row("\n<a href='mpage.php'>".$cw['no_messages']."</a> - <a href='message.php'>".$cw['send']."</a>", "l_col"); }else{ $str .= q_row("\n<a href='mpage.php'><b>$counted[0]</b> ".$cw['messages']."</a> - <a href='message.php'>".$cw['send']."</a>", "l_col"); } */ /******************* * Forum Link *******************/ /*$forum_temp_str = "<a href='forum.php?target_id=-1'>".$cw['shout_box']."</a>"; if($msgs_array[-1] > 0){ $forum_temp_str .= " - {$msgs_array[-1]} <a href='forum.php?target_id=-1&last_time=$user[last_access_forum]'>".$cw['new']."</a>"; } $str .= q_row($forum_temp_str, "l_col");*/ /******************* * Global Forum Link *******************/ /*$forum_temp_str = "<a href='/forum' target='_blank'>".$cw['forum']."</a>"; $str .= q_row($forum_temp_str, "l_col"); $forum_temp_str = "";*/ /******************* * Clan Forum Link *******************/ /*if($user['login_id'] == 1 || $user['login_id'] == OWNER_ID){ $forum_temp_str .= "<a href='forum.php?target_id=-5'>".$cw['clan_forums']."</a>"; } elseif($user['clan_id'] > 0) { $forum_temp_str .= "<a href='forum.php?target_id=-5'><font color='$user[clan_sym_color]'>$user[clan_sym]</font> ".$cw['forum']."</a>"; if($msgs_array[-5] > 0){ $forum_temp_str .= " - ({$msgs_array[-5]} <a href='forum.php?target_id=-5&last_time=$user[last_access_clan_forum]'>".$cw['new']."</a>)"; } //security precaution unset($_REQUEST['clan_id']); } //only print the clan forum link for people in a clan (!empty($forum_temp_str)) ? $str .= q_row($forum_temp_str, "l_col") : 0; $forum_temp_str = ""; */ /******************* * Admin Forum Link *******************/ /*if($user['login_id'] == 1 || $user['login_id'] == OWNER_ID){ $forum_temp_str .= "<a href='forum.php?target_id=-99'>".$cw['admin_forums']."</a>"; if($msgs_array[-99] > 0){ $forum_temp_str .= " - ({$msgs_array[-99]} <a href='forum.php?target_id=-99&last_time=$user[last_access_clan_forum]'>new</a>)"; } } //only print the clan forum link for people in a clan (!empty($forum_temp_str)) ? $str .= q_row($forum_temp_str, "l_col") : 0; $str .= "</table>"; //end forums table $str .= "<p />".make_table2(array($cw['account_functions']), "l_col"); $str .= q_row("\n<a href='parrainage.php'>".$cw['parrainage']."</a>", "l_col"); $str .= q_row("\n<a href='options.php'>".$cw['preferences']."</a>", "l_col"); $str .= q_row("\n ", "v_col"); //admin lower sidebar if($user['login_id'] == 1){ $str .= q_row("\n<a href='logout.php'>".$cw['logout']."</a>", "l_col"); } else { //player lower sidebar $str .= q_row("\n<a href='logout.php?logout_single_game=1' target='_top'>".$cw['game_list']."</a>", "l_col"); $str .= q_row("\n<a href='logout.php?comp_logout=1' target='_top'>".$cw['complete_logout']."</a>", "l_col"); } $str .= "</table>";*/ /*************** End Content *************/ if ($p_user['id_didac']) { db("select * from se_didacticiel where id=" . $p_user['id_didac']); $data = dbr(); $str .= "<div id='didacticiel'>"; $str .= "<div id='texte_didac'>"; $str .= nl2br($data['texte']); $str .= "</div>"; $str .= "<div id='liens_didac'>"; $str .= "<a href='#null' id='prec_didac'><< Préc.</a> "; $str .= "<a href='#null' id='suiv_didac'>Suiv. >></a>"; $str .= "</div>"; $str .= "<a href='#null' id='annuler_didac'>Fermer</a>"; $str .= "</div>"; } $str .= '<br />Pour nous soutenir votez sur facebook:<br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%253A%252F%252Fwww.astravires.fr%252F&layout=button_count&show_faces=false&width=150&action=like&font=arial&colorscheme=dark&height=40" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:150px; margin: 5px; height:40px;" allowTransparency="true"></iframe>'; $rand = mt_rand(1, 999999); /* * publicité désactivée * if (!$p_user['bp_user_id']) { $str .= "<br /> <iframe id='a7eabf27' name='a7eabf27' src='http://pub.nilsine.fr/www/delivery/afr.php?zoneid=2&cb=$rand' framespacing='0' frameborder='no' scrolling='no' width='120' height='600'><a href='http://pub.nilsine.fr/www/delivery/ck.php?n=a3e02ac4&cb=$rand' target='_blank'><img src='http://pub.nilsine.fr/www/delivery/avw.php?zoneid=2&cb=$rand&n=a3e02ac4' border='0' alt='' /></a></iframe> "; } */ $str .= '</td>'; echo $str; }