Просмотр файла style/element_index_user_true.php

Размер файла: 5.76Kb
	<?php
	// Формат: время(><)играю/не играю(><)дух(><)этап(><)нагр. крист(><)нагр. опыт(><)Золото(победа)
	$labirint = explode(' ', $user['lost_labirint']);
	$status = StatusLabirint($labirint[0],$labirint[1]);
	$user_quests = user_quests($user['lost_id']);
	
	
	$time_update = element_settings_game('lost_time_bank_update');	// Время восстановления всего золота
	$count_gold_2 = 10 + $user['lost_level'];						// Максимальное золото для обмена
	$time_1 = (int)($time_update / $count_gold_2);					// Время восстановления 1 золота
	
	
	if ($user['lost_time_bank'] <= time() OR empty($user['lost_time_bank'])) {
		$dost_gold = $count_gold_2;										// Доступно для обмена
	} else {
		$other_time = $user['lost_time_bank'] - time();					// Получаем оставшее время восстановления
		$other_time_2 = $time_update - $other_time;
		$dost_gold = (int)($other_time_2 / $time_1);						// Количество доступного золота
	}
	
	
	$payment = mysql_fetch_array(mysql_query("SELECT `lost_sum`,`lost_refferal` FROM `element_xsolla` WHERE `lost_user` = '$user[lost_id]' AND `lost_zabral` = '1' LIMIT 1"));
	
	if ($payment) {
		echo '<div class="nfl p5 mb5 mt5 cntr small mlra">
				<span class="white">Покупка золота: </span>
				<span class="yellow1">'.$payment['lost_sum'].'</span><br/>
				<a class="submit222 mt5 w30" href="#">Забрать</a>
				</div>';
	}
	
	
	$subforum = mysql_fetch_array(mysql_query("SELECT `lost_id` FROM `element_forum_list` WHERE `lost_novosti` = '1' LIMIT 1"));
		if ($subforum) {
			$topic = mysql_fetch_array(mysql_query("SELECT `lost_id`,`lost_name`,`lost_time_comment` FROM `element_forum_topic` WHERE `lost_subforum` = '$subforum[lost_id]' ORDER BY `lost_time_comment` DESC LIMIT 1"));
			if ($topic) {
				if ($lost_other[0] < $topic['lost_time_comment'] AND time() < ($topic['lost_time_comment'] + (86400 * 10))) {
					$read = mysql_fetch_array(mysql_query("SELECT `lost_topic` FROM `element_forum_read` WHERE `lost_user` = '$user[lost_id]' AND `lost_topic` = '$topic[lost_id]' LIMIT 1"));
					if (!$read) {
					echo '<div class="nfl p5 mb5 mt5 cntr small mlra">
					<span class="white">Свежие новости:</span><br/>
					<span class="yellow1 bold">« '.$topic['lost_name'].' »</span><br/>
					<a class="submit222 mt5 w30" href="/forum/topic?id='.$topic['lost_id'].'">Смотреть</a>
					</div>';
					}
				}
			}
		}
	
	?>
	
	<div class="nfl p5 mb5 mt5 mlra">
	<div class="cntr mt5 mb5">
	
	<span class="inbl w30 va_t">
		<a class="atask" href="/mission">
			<span class="inbl prel">
				<img width="40" height="40" src="/images/mission.gif" alt=""/>
				<?php echo ($user_energy[0] > 0) ? '<img width="22" height="22" class="g-arrow" src="/images/green-arrow.png"/>' : ''; ?>
			</span><br/>
			<span class="small <?php echo ($user_energy[0] > 0) ? 'lngreen' : ''; ?> mt3">Миссии</span>
		</a>
	</span>
	
	<span class="inbl w30 va_t">
		<a class="atask" href="/arena">
			<span class="inbl prel">
				<img width="40" height="40" src="/images/arena.gif" alt=""/>
				<img width="22" height="22" class="g-arrow" src="/images/green-arrow.png"/>
			</span><br/>
			<span class="small lngreen mt3">Арена</span>
		</a>
	</span>
	
	<span class="inbl w30 va_t">
		<a class="atask" href="/labirint">
			<span class="inbl prel">
				<img width="40" height="40" src="/images/labirint.gif" alt=""/>
				<?php echo ($status == 0 OR $status == 1 OR $status == 3) ? '<img width="22" height="22" class="g-arrow" src="/images/green-arrow.png"/>' : ''; ?>
			</span><br/>
			<span class="small <?php echo ($status == 0 OR $status == 1 OR $status == 3) ? 'lngreen' : ''; ?> mt3">Лабиринт</span>
		</a>
	</span>
</div>
	
<div class="cntr mt10">
	<span class="inbl w30 va_t">
		<a class="atask" href="/quests">
			<span class="inbl prel">
				<img width="40" height="40" src="/images/index.gif" alt=""/>
				<?php echo ($user_quests['lost_new'] > 0) ? '<img width="22" height="22" class="g-arrow" src="/images/green-arrow.png"/>' : ''; ?>
			</span><br/>
			<span class="small <?php echo ($user_quests['lost_new'] > 0) ? 'lngreen' : ''; ?> mt3">Задания</span>
		</a>
	</span>
	
	<span class="inbl w30 va_t">
		<a class="atask" href="/gold">
			<span class="inbl prel">
				<img width="40" height="40" src="/images/gold.gif" alt=""/>
				<?php echo ($dost_gold > 0) ? '<img width="22" height="22" class="g-arrow" src="/images/green-arrow.png"/>' : ''; ?>
			</span><br/>
			<span class="small <?php echo ($dost_gold > 0) ? 'lngreen' : ''; ?> mt3">Банк</span>
		</a>
	</span>
	
	<span class="inbl w30 va_t">
		<a class="atask" href="#">
			<span class="inbl prel">
				<img width="40" height="40" src="/images/arena.gif" alt=""/>
			</span><br/>
			<span class="small gray1 mt3">Битва городов</span>
		</a>
	</span>
</div>	
	
	
	<div class="nf2 small mt5 p5 mlra">
			<div class="ml5 mr5">
				<a class="bl p5 block odd" href="#">
					<span class="small yellow1"><img src="/images/icons/shop.png"> Магазины</span> <span class="lngreen"></span>
				</a>
			</div>
			<div class="ml5 mr5">
				<a class="bl p5 block" href="/abilities">
					<span class="small yellow1"><img src="/images/icons/shop.png"> Усиления</span> <span class="lngreen"></span>
				</a>
			</div>
			<div class="ml5 mr5">
				<a class="bl p5 block odd" href="/rating">
					<span class="small yellow1"><img src="/images/icons/rating.png"> Рейтинги</span> <span class="lngreen"></span>
				</a>
				<div class="hr"></div>
			</div>
		</div>
	
	
	
	
		
	</div>