示例#1
0
    public static function build_menu()
    {
        $ret = '';
        $lock = defined("LOCK") && LOCK;
        $bydeler = '
				<li class="bydeler_alt"><a href="' . ess::$s['relative_path'] . '/bydeler#?b" class="menu-icon menu-bydel">Bydeler<span class="icon"></span></a></li>
				<li class="bydeler_filter"><a href="' . ess::$s['relative_path'] . '/bydeler" class="menu-icon menu-ff" id="f_">Broderskap og firma<span class="icon"></span></a>';
        if (isset(self::$data['bydeler_menu'])) {
            $bydeler .= '
				<ul>
					<li><a href="#" id="f_familie" class="bydeler_vis_familie">Broderskap</a></li>
					<li>
						<a href="#" id="f_firma" class="bydeler_vis_firma">Firmaer</a>
						<ul>
							<li><a href="#" id="f_avisfirma" class="bydeler_vis_avisfirma">Avisfirmaer</a></li>
							<li><a href="#" id="f_bankfirma" class="bydeler_vis_bankfirma">Bankfirmaer</a></li>
							<li><a href="#" id="f_bomberomfirma" class="bydeler_vis_bomberomfirma">Bomberom</a></li>
							<li><a href="#" id="f_garasjeutleiefirma" class="bydeler_vis_garasjeutleiefirma">Utleiefirma</a></li>
							<li><a href="#" id="f_sykehusfirma" class="bydeler_vis_sykehusfirma">Sykehus</a></li>
							<li><a href="#" id="f_vapbesfirma" class="bydeler_vis_vapbesfirma" title="Våpen, kuler og beskyttelse">Våpen/besk.</a></li>
						</ul>
					</li>
				</ul>';
        }
        $bydeler .= '</li>';
        $min_side = '
				<li><a href="' . ess::$s['relative_path'] . '/min_side" class="menu-icon menu-minside">Min side<span class="icon"></span></a></li>';
        if (!$lock && login::$logged_in) {
            $poker_active = cache::fetch("poker_active", 0);
            $auksjoner_active = game::auksjoner_active_count();
            $fengsel_count = game::fengsel_count();
            $ret .= '
			<ul>
				<li><a href="' . ess::$s['relative_path'] . '/kriminalitet" class="menu-icon menu-krim">Kriminalitet<span class="icon"></span></a></li>
				<li><a href="' . ess::$s['relative_path'] . '/utpressing" class="menu-icon menu-utpr">Utpressing<span class="icon"></span></a>' . (isset(self::$data['utpressing']) ? '
					<ul>
						<li><a href="' . ess::$s['relative_path'] . '/utpressing/log">Siste utpressinger</a></li>
					</ul>' : '') . '</li>
				<li><a href="' . ess::$s['relative_path'] . '/gta" class="menu-icon menu-bilt">Biltyveri<span class="icon"></span></a>' . (defined("SHOW_GTA_MENU") ? '
					<ul>
						<li><a href="' . ess::$s['relative_path'] . '/gta/garasje">Garasje</a></li>
						<li><a href="' . ess::$s['relative_path'] . '/gta/stats">Statistikk</a></li>
					</ul>' : '') . '</li>
				<li><a href="' . ess::$s['relative_path'] . '/oppdrag" class="menu-icon menu-oppd">Oppdrag<span class="icon"></span></a></li>
				<li><a href="' . ess::$s['relative_path'] . '/lotto" class="menu-icon menu-lotto">Lotto<span class="icon"></span></a>' . (isset(self::$data['lotto']) ? '
					<ul>
						<li><a href="' . ess::$s['relative_path'] . '/lotto_trekninger">Trekninger</a></li>
					</ul>' : '') . '</li>
				<li><a href="' . ess::$s['relative_path'] . '/fengsel" class="menu-icon menu-fengsel">Fengsel <span class="ny2" id="fengsel_count">' . ($fengsel_count > 0 ? $fengsel_count : '') . '</span><span class="icon"></span></a></li>
				<li><a href="' . ess::$s['relative_path'] . '/angrip" class="menu-icon menu-angr">Angrip spiller<span class="icon"></span></a></li>
			</ul>
			<ul>
				<li><a href="' . ess::$s['relative_path'] . '/banken" class="menu-icon menu-banken">Banken<span class="icon"></span></a></li>' . $min_side . '
				<li><a href="' . ess::$s['relative_path'] . '/poker" class="menu-icon menu-poker">Poker <span class="ny2" id="poker_active">' . ($poker_active > 0 ? $poker_active : '') . '</span><span class="icon"></span></a></li>
				<li><a href="' . ess::$s['relative_path'] . '/auksjoner" class="menu-icon menu-auks">Auksjoner <span class="ny2" id="auksjoner_active">' . ($auksjoner_active > 0 ? $auksjoner_active : '') . '</span><span class="icon"></span></a></li>' . $bydeler . '
				<li><a href="' . ess::$s['relative_path'] . '/min_side?a=achievements" class="menu-icon menu-achievements">Prestasjoner<span class="icon"></span></a>' . (self::has_page_id("achievements") || self::has_page_id("hall_of_fame") ? '
					<ul>
						<li><a href="' . ess::$s['relative_path'] . '/hall_of_fame" class="menu-icon menu-achievements">Hall of Fame</a></li>
					</ul>' : '') . '</li>
				<li><a href="' . ess::$s['relative_path'] . '/etterlyst" class="menu-icon menu-etterl">Etterlyst<span class="icon"></span></a></li>
				<li><a href="' . ess::$s['relative_path'] . '/drap" class="menu-icon menu-drap">Drapliste<span class="icon"></span></a></li>
			</ul>';
        } elseif (login::$logged_in) {
            $ret .= '
			<ul>' . $min_side . $bydeler . '
			</ul>';
        } else {
            $ret .= '
			<ul>
				<li><a href="' . ess::$s['relative_path'] . '/?orign=' . urlencode($_SERVER['REQUEST_URI']) . '" class="menu-icon menu-logginn">Logg inn<span class="icon"></span></a></li>
				<li><a href="' . ess::$s['relative_path'] . '/registrer" class="menu-icon menu-register">Registrer deg<span class="icon"></span></a></li>
			</ul>
			<ul>' . $bydeler . '
				<li><a href="' . ess::$s['relative_path'] . '/hall_of_fame" class="menu-icon menu-achievements">Hall of Fame<span class="icon"></span></a></li>
			</ul>';
        }
        $ret .= '
			<ul>';
        if (!$lock) {
            $ret .= self::get_custom_forums();
        }
        $ret .= '
				<li><a href="' . ess::$s['relative_path'] . '/forum/forum?id=1" class="menu-icon menu-forum">Game forum<span class="icon"></span></a></li>
				<li><a href="' . ess::$s['relative_path'] . '/forum/forum?id=2" class="menu-icon menu-forum">Off-topic forum<span class="icon"></span></a></li>
				<li><a href="' . ess::$s['relative_path'] . '/forum/forum?id=3" class="menu-icon menu-forum">Salg/søknad forum<span class="icon"></span></a></li>
			</ul>';
        $ret .= '
			<ul>
				<li><a href="' . ess::$s['relative_path'] . '/node" class="menu-icon menu-help"><b>Hjelp</b> / Support<span class="icon"></span></a></li>' . (!$lock ? '
				<li><a href="' . ess::$s['relative_path'] . '/soknader" class="menu-icon menu-sokn">Søknader<span class="icon"></span></a></li>' . (!isset(self::$data['is_avstemning']) || !self::$data['is_avstemning'] ? '
				<li><a href="' . ess::$s['relative_path'] . '/polls" class="menu-icon menu-avst">Avstemninger<span class="icon"></span></a></li>' : '') . '
				<li><a href="' . ess::$s['relative_path'] . '/ranklist" class="menu-icon menu-rankl">Ranklist<span class="icon"></span></a></li>
				<li><a href="' . ess::$s['relative_path'] . '/online_list" class="menu-icon menu-online">Spillere pålogget<span class="icon"></span></a></li>' : '') . '
				<li><a href="' . ess::$s['relative_path'] . '/crewet" class="menu-icon menu-crew">Crewet<span class="icon"></span></a></li>' . (!$lock ? '
				<li><a href="' . ess::$s['relative_path'] . '/statistikk" class="menu-icon menu-stats">Statistikk<span class="icon"></span></a></li>' : '') . '
				<li><a href="' . ess::$s['relative_path'] . '/donasjon" class="menu-icon menu-donate">Donasjoner<span class="icon"></span></a></li>
			</ul>';
        if (!MAIN_SERVER) {
            $ret .= '
			<ul>
				<li><a href="&rpath;/dev/" class="menu-icon menu-devt">Utviklerverktøy<span class="icon"></span></a></li>
			</ul>';
        }
        return $ret;
    }
示例#2
0
		<up_reg_time_rel>' . htmlspecialchars(game::timespan($user['up_created_time'], game::TIME_ABS)) . '</up_reg_time_rel>
		<up_status>' . htmlspecialchars($status) . '</up_status>
		<up_last_online_abs>' . htmlspecialchars($_base->date->get($user['up_last_online'])->format(date::FORMAT_SEC)) . '</up_last_online_abs>
		<up_last_online_rel>' . htmlspecialchars(game::timespan($user['up_last_online'], game::TIME_ABS)) . '</up_last_online_rel>
		<up_activated>' . htmlspecialchars($user['up_access_level'] == 0 ? 0 : 1) . '</up_activated>
		<up_profile_image>' . htmlspecialchars($profile_image) . '</up_profile_image>
		<up_log_new>' . ($user['up_log_new'] + $user['up_log_ff_new']) . '</up_log_new>
		<up_rank_name>' . htmlspecialchars($rank['name'] . ($rank['orig'] ? ' (' . $rank['orig'] . ')' : '')) . '</up_rank_name>
		<up_rank_position>' . $user['upr_rank_pos'] . '</up_rank_position>
		<up_hits>' . $user['up_hits'] . '</up_hits>
		<up_cash>' . game::format_cash($user['up_cash']) . '</up_cash>
		<up_bank>' . game::format_cash($user['up_bank']) . '</up_bank>
		<up_money>' . game::format_cash($user['money']) . '</up_money>
		<up_money_title>' . game::cash_name($user['money']) . '</up_money_title>
		<up_last_interest>' . game::format_cash($user['up_interest_last']) . '</up_last_interest>
		<up_bydel_latitude>' . htmlspecialchars($bydel['latitude']) . '</up_bydel_latitude>
		<up_bydel_longitude>' . htmlspecialchars($bydel['longitude']) . '</up_bydel_longitude>
		<up_bydel_id>' . htmlspecialchars($bydel['id']) . '</up_bydel_id>
		<up_bydel_name>' . htmlspecialchars($bydel['name']) . '</up_bydel_name>
		<up_health>' . ($health == 100 ? '100' : sprintf("%.2f", $health)) . '</up_health>
		<up_energy>' . ($energy == 100 ? '100' : sprintf("%.2f", $energy)) . '</up_energy>
		<up_protection>' . (!$user['up_protection_id'] ? 'null' : ($user['up_protection_state'] == 1 ? '100' : sprintf("%.2f", $user['up_protection_state'] * 100))) . '</up_protection>
		<up_rank>' . sprintf("%.3f", login::$user->player->rank['need_points'] == 0 ? $user['up_points'] / login::$user->player->rank['points'] * 100 : ($user['up_points'] - login::$user->player->rank['points']) / login::$user->player->rank['need_points'] * 100) . ':' . $user['up_points'] . '</up_rank>
		<up_wanted>' . ($user['up_wanted_level'] == 0 ? '0' : sprintf("%.1f", $user['up_wanted_level'] / 10, 1)) . '</up_wanted>
	</player>
	<game>
		<poker_active>' . cache::fetch("poker_active", 0) . '</poker_active>
		<auksjoner_active>' . game::auksjoner_active_count() . '</auksjoner_active>
		<fengsel_count>' . game::fengsel_count() . '</fengsel_count>
	</game>
</userinfo>');