File size: 2.57Kb
<?php
require_once './element_options/element_options.php';
if (!$user) { header('Location: /'); exit; }
require_once './element_function/element_function_mission.php';
if (readcache('element_user_mesto'.$user['lost_id']) != 'Миссии') writecache('element_user_mesto'.$user['lost_id'], 'Миссии');
$title = 'Миссии';
require_once './element_include/element_head.php';
require_once './element_include/element_header_user_true.php';
echo '<div class="nfl p5 mb5 mt5 mlra">';
$query = mysql_query("SELECT * FROM `element_mission_list`");
$user_mission = mission_user_location($user['lost_id']);
echo '<div class="medium yellow1">';
$i = 1;
while ($myrrow = mysql_fetch_array($query)) {
$procent = (($user_mission['lost_location'.$myrrow['lost_id']] > 0) ? (int)(($user_mission['lost_location'.$myrrow['lost_id']] / $myrrow['lost_count']) * 100) : 0);
if (!isset($close)) {
echo '<div class="ml5 cntr mr5">
<a class="bl p5 small block odd" href="/mission/location?id='.$myrrow['lost_id'].'">
<span class="white">'.$i.'.</span>
<span class="yellow1">'.$myrrow['lost_location'].'</span><br/>
<div class="mt5 white">'.(($procent < 100) ? 'Доступ в локацию открыт. Пройдено миссий: '.$procent.'%' : 'Локация пройдена. Вы можете играть в следующих локациях!').'</div>';
echo '<div class="mt5 yellow1">Качества выпадения вещей: ';
for ($c = 0; $c <= $myrrow['lost_quality']; $c++) {
$image = quality_item_name($c);
echo $image['image'].' ';
}
echo '</div>';
echo '</a>
</div>';
} else {
echo '<div class="ml5 cntr mr5">
<div class="bl p5 small block">
<span class="white">'.$i.'.</span>
<span class="yellow1">'.$myrrow['lost_location'].'</span><br/>
<div class="mt5 ccc">Чтобы открыть доступ в эту локацию, Вам необходимо пройти предыдущие локации</div>';
echo '<div class="mt5 yellow1">Качества выпадения вещей: ';
for ($c = 0; $c <= $myrrow['lost_quality']; $c++) {
$image = quality_item_name($c);
echo $image['image'].' ';
}
echo '</div>';
echo ' </div>
</div>';
}
if ($myrrow['lost_count'] > $user_mission['lost_location'.$myrrow['lost_id']]) $close = true;
$i++;
}
echo '</div>';
// elewar.mobi.error.log
// elewar.mobi.access.log
echo '</div>';
require_once './element_include/element_foot_user_true.php';
?>