| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- <?php
- /**
- * Site header view.
- *
- * To be included from all views.
- *
- * @category View
- */
- /** @var int $UID User id. */
- ?>
- <script>
- function setMode(rta){
- if (rta === true){
- mode = <?=GAME_MODE_ID::RTA?>;
- }
- else if (rta === false){
- mode = <?=GAME_MODE_ID::NORMAL?>;
- }
- else{
- return false;
- }
- params = '?uid=<?=$UID?>&mode=' + mode;
- var xhttp = new XMLHttpRequest();
- xhttp.onreadystatechange = function() {
- if (this.readyState == 4){
- if (this.status == 201){
- window.location.reload(false);
- }
- }
- };
- xhttp.open('GET', '/action/change_game_mode/' + params, true);
- xhttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
- xhttp.send();
- return true;
- }
- </script>
- <header>
- <?php
- if ($_SESSION['session'] == true){
- ?>
- <nav id='menu'>
- <table>
- <tr>
- <td rowspan='2'>
- <div id='logo'>
- <img id='logo_img' src='<?=URL::IMG["LOGO"]?>sw.png' alt=''/>
- <h1 id='logo_text'>
- <span class='large'>D</span>
- <span class='small'>ata</span>
- <span class='large'>B</span>
- <span class='small'>ase</span>
- </h1>
- </div>
- </td>
- <td class='item'>
- <a href='/<?=$UID?>/'>
- Home
- </a>
- </td>
- <td class='item'>
- <a href='/<?=$UID?>/monsters/'>
- Monsters
- </a>
- </td>
- <td class='item'>
- <a href='/<?=$UID?>/runes/'>
- Runes
- </a>
- </td>
- <td class='item'>
- <a href='/<?=$UID?>/artifacts/'>
- Artifacts
- </a>
- </td>
- <td class='item'>
- <a href='/<?=$UID?>/enchantments/'>
- Enchantments
- </a>
- </td>
- <td class='item'>
- <a href='/<?=$UID?>/teams/'>
- Teams
- </a>
- </td>
- <td class='last profile'>
- <a href='/<?=$UID?>/profile/'>
- <?=$_SESSION['name']?>
- </a>
- </td>
- </tr>
- <tr>
- <td class='item'>
- <a href='/<?=$UID?>/catalog/'>
- Catalog
- </a>
- </td>
- <td class='item'>
- <a href='/<?=$UID?>/fusion/'>
- Fusion
- </a>
- </td>
- <td class='item'>
- <a href='/<?=$UID?>/guild/'>
- Guild
- </a>
- </td>
- <td class='item'>
- <a href='/<?=$UID?>/runs/'>
- Runs
- </a>
- </td>
- <td class='item'>
- <a href='/<?=$UID?>/report/'>
- Reports
- </a>
- </td>
- <td class='item'>
- <a href='/<?=$UID?>/optimizer/'>
- Optimizer
- </a>
- </td>
- <!--<td class='item'>
- <a href='/<?=$UID?>/stats/'>
- Stats
- </a>
- </td>-->
- <td class='last mode'>
- <div id='mode_switch'>
- <span class='mode'>
- N<span class='desktop'>ormal</span>
- </span>
- <label class='switch'>
- <input type="checkbox" <?=($MODE == GAME_MODE_ID::RTA ? "checked='cheecked'" : "")?> onChange='setMode(this.checked);'/>
- <span class="slider round"></span>
- </label>
- <span class='mode'>
- R<span class='desktop'>TA</span>
- </span>
- </div>
- </td>
- </tr>
- </table>
- </nav>
- <?php
- }
- ?>
- </header>
|