| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530 |
- <?php
- /**
- * Home view.
- *
- * Contains the view layout and some code to present the data.
- *
- * @category View
- * @property_read Home_Page $page The page model.
- */
- ?>
- <!DOCTYPE html>
- <html lang='en'>
- <head>
- <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
- <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
- <title><?=$page->title?></title>
- <link rel='shortcut icon' href='<?=$page->favicon?>'/>
- <!-- CSS files -->
- <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>ui.css'/>
- <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>home.css'/>
- <!-- Meta tags -->
- <link rel='canonical' href='<?=$page->canonical?>'/>
- <link rel='author' href='<?=$page->author?>'/>
- <link rel='publisher' href='<?=$page->author?>'/>
- <meta name='description' content='<?=$page->description?>'/>
- <meta property='og:title' content='<?=$page->title?>'/>
- <meta property='og:url' content='<?=$page->canonical?>'/>
- <meta property='og:description' content='<?=$page->description?>'/>
- <meta property='og:image' content='<?=$page->icon?>'/>
- <meta property='og:site_name' content='<?=$page->name?>'/>
- <meta property='og:type' content='website'/>
- <meta property='og:locale' content='en'/>
- <meta name='twitter:card' content='summary'/>
- <meta name='twitter:title' content='<?=$page->title?>'/>
- <meta name='twitter:description' content='<?=$page->description?>'/>
- <meta name='twitter:image' content='<?=$page->icon?>'/>
- <meta name='twitter:url' content='<?=$page->canonical?>'/>
- <meta name='robots' content='index follow'/>
- </head>
- <body>
- <?php
- include __DIR__ . "/inc/header.php";
- ?>
- <section class='content'>
- <h2>
- <span>
- Summoners War DataBase
- </span>
- </h2>
- <article id='profile'>
- <div class='panel' id='panel_left'>
- <div id='player' class='profile_section'>
- <h4>
- <?=$page->player->name?>
- </h4>
- <table>
- <tr>
- <td class='label'>
- Lv.
- </td>
- <td class='value'>
- <?=$page->player->level?>
- </td>
- </tr>
- <tr>
- <td class='label'>
- Exp.
- </td>
- <td class='value'>
- <?=$page->player->experience?>
- </td>
- </tr>
- <tr>
- <td class='label'>
- Country
- </td>
- <td class='value'>
- <?=$page->player->country?>
- </td>
- </tr>
- <tr>
- <td class='label'>
- Since
- </td>
- <td class='value'>
- <?=date('Y-m-d', $page->player->joined)?>
- </td>
- </tr>
- <tr>
- <td class='label'>
- Days
- </td>
- <td class='value'>
- <?=round((time() - $page->player->joined) / (60 * 60 * 24))?>
- </td>
- </tr>
- </table>
- </div>
- <div id='placements' class='profile_section'>
- <h4>
- Placements
- </h4>
- <div id='placements_rep'>
- <h5>
- Rep monster:
- </h5>
- <div class='monster_panel'>
- <?=HTML::unit_panel($page->player->rep)?>
- </div> <!-- .monster_panel -->
- </div>
- <div id='placements_arena'>
- <h5>
- Arena defense:
- </h5>
- <?php
- $first = true;
- foreach ($page->player->defense as $defense){
- ?>
- <div class='monster_panel'>
- <?=HTML::unit_panel($defense)?>
- </div>
- <?php
- if ($first && isset($defense->unit->leader_skill) && ($defense->unit->leader_skill->area == $EFFECT_AREA["GENERAL"] || $defense->unit->leader_skill->area == $EFFECT_AREA["ARENA"])){
- ?>
- <div class='skill'>
- <img class='skill_img' title='<?=$defense->unit->leader_skill->create_description()?>' src='<?=$defense->unit->leader_skill->get_image()?>'/>
- </div>
- <?php
- }
- $first = false;
- }
- ?>
- </div>
- <div id='placements_gw'>
- <h5>
- Guild War defense:
- </h5>
- <?php
- $first = true;
- foreach ($page->player->gw_defense[0] as $defense){
- ?>
- <div class='monster_panel'>
- <?=HTML::unit_panel($defense)?>
- </div>
- <?php
- if ($first && isset($defense->unit->leader_skill) && ($defense->unit->leader_skill->area == $EFFECT_AREA["GENERAL"] || $defense->unit->leader_skill->area == $EFFECT_AREA["ARENA"])){
- ?>
- <div class='skill'>
- <img class='skill_img' title='<?=$defense->unit->leader_skill->create_description()?>' src='<?=$defense->unit->leader_skill->get_image()?>'/>
- </div>
- <?php
- }
- $first = false;
- }
- ?>
- <hr/>
- <?php
- $first = true;
- foreach ($page->player->gw_defense[1] as $defense){
- ?>
- <div class='monster_panel'>
- <?=HTML::unit_panel($defense)?>
- </div>
- <?php
- if ($first && isset($defense->unit->leader_skill) && ($defense->unit->leader_skill->area == $EFFECT_AREA["GENERAL"] || $defense->unit->leader_skill->area == $EFFECT_AREA["ARENA"])){
- ?>
- <div class='skill'>
- <img class='skill_img' title='<?=$defense->unit->leader_skill->create_description()?>' src='<?=$defense->unit->leader_skill->get_image()?>'/>
- </div>
- <?php
- }
- $first = false;
- }
- ?>
- </div>
- </div>
- <div id='building' class='profile_section'>
- <h4>
- Buildings
- </h4>
- <?php
- // Buildings
- $half = sizeof($page->player->building) / 2;
- $i = 0;
- foreach ($page->player->building as $building){
- if ($i == $half){
- ?>
- <br class='desktop'/>
- <?php
- }
- ?>
- <?=HTML::building_panel($building)?>
- <?php
- $i ++;
- }
- ?>
- <br/>
- <?php
- // Decorations
- $half = sizeof($page->player->decoration) / 2;
- $i = 0;
- foreach ($page->player->decoration as $decoration){
- if ($i == $half){
- ?>
- <br class='desktop'/>
- <?php
- }
- ?>
- <?=HTML::building_panel($decoration)?>
- <?php
- $i ++;
- }
- ?>
- </div>
- <div class='inventory profile_section' id='inventory'>
- <h4>
- Inventory
- </h4>
- <ul>
- <li>
- <img title='Energy' src='<?=URL::IMG["CURRENCY"]?>energy.png'/>
- <?=$page->player->currency["energy"]?> / <?=$page->player->currency["energy_max"]?>
- </li>
- <li>
- <img title='Arena Invitations' src='<?=URL::IMG["CURRENCY"]?>arenaenergy.png'/>
- <?=$page->player->currency["arena_energy"]?> / <?=$page->player->currency["arena_energy_max"]?>
- </li>
- <li>
- <img title='Dimensional Energy' src='<?=URL::IMG["CURRENCY"]?>dimensionenergy.png'/>
- <?=$page->player->currency["dimension_energy"]?> / <?=$page->player->currency["dimension_energy_max"]?>
- </li>
- <li>
- <img title='Dimensional Crystal' src='<?=URL::IMG["CURRENCY"]?>darkportalenergy.png'/>
- <?=$page->player->currency["darkportal_energy"]?> / <?=$page->player->currency["darkportal_energy_max"]?>
- </li>
- <li>
- <img title='Mana' src='<?=URL::IMG["CURRENCY"]?>mana.png'/>
- <?=$page->player->currency["mana"]?>
- </li>
- <li>
- <img title='Crystal' src='<?=URL::IMG["CURRENCY"]?>crystal.png'/>
- <?=$page->player->currency["crystal"]?>
- </li>
- <li>
- <img title='Social Points' src='<?=URL::IMG["CURRENCY"]?>socialpoint.png'/>
- <?=$page->player->currency["social_point"]?>
- </li>
- <li>
- <img title='Honor Points' src='<?=URL::IMG["CURRENCY"]?>honor.png'/>
- <?=$page->player->currency["honor_point"]?>
- </li>
- <li>
- <img title='Guild Points' src='<?=URL::IMG["CURRENCY"]?>guildpoint.png'/>
- <?=$page->player->currency["guild_point"]?>
- </li>
- <li>
- <img title='Honor Medals' src='<?=URL::IMG["CURRENCY"]?>badge.png'/>
- <?=$page->player->currency["honor_medal"]?>
- </li>
- <li>
- <img src='<?=URL::IMG["CURRENCY"]?>mark.png'/>
- <?=$page->player->currency["honor_mark"]?>
- </li>
- <li>
- <img title='Ancient Coins' src='<?=URL::IMG["CURRENCY"]?>ancientcoin.png'/>
- <?=$page->player->currency["event_coin"]?>
- </li>
- <li>
- <img title='Ancient Crystal' src='<?=URL::IMG["CURRENCY"]?>ancientstone.png'/>
- <?=$page->player->currency["ancient_stone"]?>
- </li>
- <li>
- <img title='Shapeshifting Stones' src='<?=URL::IMG["CURRENCY"]?>costumestone.png'/>
- <?=$page->player->currency["costume_point"]?>
- </li>
- </ul>
- <?php
- // Scrolls
- $half = sizeof($page->player->building) / 2;
- $i = 0;
- foreach ($page->player->inventory_scroll as $item){
- if ($half > 6 && $i == $half){
- ?>
- <br class='desktop'/>
- <?php
- }
- ?>
- <?=HTML::item_panel($item)?>
- <?php
- $i ++;
- }
- ?>
- <br/>
- <?php
- // Rune craft materials
- $prev = 0;
- foreach ($page->player->inventory_craft_rune as $item){
- ?>
- <?=HTML::item_panel($item)?>
- <?php
- $prev = $item->id;
- }
- ?>
- <br/>
- <?php
- // Other craft materials
- $prev = 0;
- foreach ($page->player->inventory_craft as $item){
- if ($prev != 0 && $prev < 5000 && $item->id > 5000){
- ?>
- <br class='desktop'/>
- <?php
- }
- ?>
- <?=HTML::item_panel($item)?>
- <?php
- $prev = $item->id;
- }
- ?>
- <br/>
- <?php
- // Essences
- $prev = "";
- $i = 0;
- foreach ($page->player->inventory_essence as $item){
- //if ($prev != "" && $prev != preg_split('/\s+/', $item->name)[2]){
- if ($i > 0 && $i % 6 == 0){
- ?>
- <br class='desktop'/>
- <?php
- }
- ?>
- <?=HTML::item_panel($item)?>
- <?php
- $prev = preg_split('/\s+/', $item->name)[2];
- $i ++;
- }
- ?>
- </div>
- </div> <!-- #panel_left -->
- <div class='panel' id='panel_right'>
- <div class='profile_section' id='records'>
- <h4>
- Records
- </h4>
- <div class='record'>
- <table id='rank_records'>
- <tr>
- <td class='label'>
- Arena
- </td>
- <td class='value rank'>
- <?=HTML::arena_rank_icon($page->player->top_rank_arena)?>
- </td>
- </tr>
- <tr>
- <td class='label'>
- World Arena
- </td>
- <td class='value rank'>
- <?=HTML::arena_rank_icon($page->player->top_rank_world_arena)?>
- </td>
- </tr>
- <tr>
- <td class='label'>
- Special League
- </td>
- <td class='value rank'>
- <?=HTML::arena_rank_icon($page->player->top_rank_special_league)?>
- </td>
- </tr>
- <tr>
- <td class='label'>
- Guild War
- </td>
- <td class='value rank'>
- <?=HTML::arena_rank_icon($page->player->top_rank_gw - 10)?>
- </td>
- </tr>
- <tr>
- <td class='label'>
- Siege Battle
- </td>
- <td class='value rank'>
- <?=HTML::arena_rank_icon($page->player->top_rank_siege)?>
- </td>
- </tr>
- <tr>
- <td class='label'>
- World Boss
- </td>
- <td class='value wboss'>
- <?=WORLD_BOSS_RANK_ID::RANK[$page->player->top_rank_wboss]?>
- </td>
- </tr>
- <tr>
- <td class='label'>
- Trial of Ascension (N)
- </td>
- <td class='value toa'>
- <?=$page->player->top_rank_toan?>F
- </td>
- </tr>
- <tr>
- <td class='label'>
- Trial of Ascension (N)
- </td>
- <td class='value toa'>
- <?=$page->player->top_rank_toah?>F
- </td>
- </tr>
- </table>
- <table id='battle_records'>
- <?php
- foreach ($page->player->record as $record){
- ?>
- <tr>
- <td class='record_dungeon'>
- <img title='<?=$record->area->name?>' class='area' src='<?=$record->area->get_image()?>'/>
- </td>
- <td class='record_info'>
- <span class='title'>
- <?php
- $title = "";
- switch ($record->area->type){
- case AREA_TYPE_ID::CAIROS_DUNGEON:
- $title = $record->area->name . " " . $record->stage . "F";
- break;
- case AREA_TYPE_ID::RIFT_DUNGEON:
- $title = $record->area->name;
- break;
- case AREA_TYPE_ID::RIFT_RAID:
- $title = $record->area->name;
-
- }
- ?>
- <?=$title?>
- </span>
- <?php
- if ($record->area->type == AREA_TYPE_ID::RIFT_DUNGEON){
- ?>
- <span class='score'>
- <?=$record->score?>
- </span>
- <span class='rank'>
- <?=$record->rank?>
- </span>
- <?php
- }
- else{
- $s = floor($record->time / 1000);
- $m = floor($s / 60);
- $s = floor($s % 60);
- $ms = ($record-> time - (1000 * 60 * $m) - (1000 * 60 * $s) / 100);
- $s = str_pad($s, 2, '0', STR_PAD_LEFT);
- $ms = str_pad($ms, 2, '0', STR_PAD_LEFT);
- ?>
- <span class='time'>
- <?=$m?>:<?=$s?><span class='ms'>.<?=$ms?></span>
- </span>
- <?php
- }
- ?>
- </td>
- <?php
- $class_frontline = "";
- if ($record->area->type == AREA_TYPE_ID::RIFT_DUNGEON || $record->area->type == AREA_TYPE_ID::RIFT_RAID){
- $class_frontline = "frontlines";
- }
- ?>
- <td class='record_party <?=$class_frontline?>'>
- <?php
- $prev_front = false;
- $front = "undefined";
- foreach ($record->party as $party){
- $front = in_array($party->id, $record->frontline);
- if ($front != "undefined" && $prev_front != $front){
- ?>
- <hr class='frontline'/>
- <?php
- }
- if ($party instanceof K_Unit){
- $enable_save = false;
- $disabled = "disabled";
- }
- else{
- $disabled = "";
- }
- if ($disabled == ""){
- ?>
- <a target='_blank' href='/<?=$UID?>>/monster/<?=$party->id?>'>
- <?php
- }
- ?>
- <div class='monster_panel <?=$disabled?>'>
- <?=HTML::unit_panel($party)?>
- <?php
- if ($party->id == $record->leader){
- ?>
- <img alt='Leader' class='leader' src='<?=URL::IMG["ICON"]?>leader.png'/>
- <?php
- }
- ?>
- </div>
- <?php
- if ($disabled == ""){
- ?>
- </a>
- <?php
- }
- $prev_front = $front;
- }
- ?>
- </td>
- </tr>
-
- <?php
- }
- ?>
- </table>
- </div>
- </div>
- </div> <!-- #panel_right -->
- </article>
- </section>
- <?php
- include __DIR__ . "/inc/footer.php";
- ?>
- </body>
- </html>
|