teams.php 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689
  1. <?php
  2. global $AREA_TYPE;
  3. global $SCENARIO;
  4. global $DUNGEON;
  5. global $LABYRINTH_STAGES;
  6. global $DIFFICULTY;
  7. global $ELEMENTAL_RIFT_DUNGEON;
  8. global $UID;
  9. ?>
  10. <!DOCTYPE html>
  11. <html lang='en'>
  12. <head>
  13. <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
  14. <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
  15. <title><?=$page->title?></title>
  16. <link rel='shortcut icon' href='<?=$page->favicon?>'/>
  17. <!-- CSS files -->
  18. <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>ui.css'/>
  19. <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>teams.css'/>
  20. <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>filters.css'/>
  21. <!-- Script files -->
  22. <script src="<?=$path["js"]?>ui.js"></script>
  23. <script src="<?=$path["js"]?>teams.js"></script>
  24. <!-- Meta tags -->
  25. <link rel='canonical' href='<?=$page->canonical?>'/>
  26. <link rel='author' href='<?=$page->author?>'/>
  27. <link rel='publisher' href='<?=$page->author?>'/>
  28. <meta name='description' content='<?=$page->description?>'/>
  29. <meta property='og:title' content='<?=$page->title?>'/>
  30. <meta property='og:url' content='<?=$page->canonical?>'/>
  31. <meta property='og:description' content='<?=$page->description?>'/>
  32. <meta property='og:image' content='<?=$page->icon?>'/>
  33. <meta property='og:site_name' content='<?=$page->name?>'/>
  34. <meta property='og:type' content='website'/>
  35. <meta property='og:locale' content='en'/>
  36. <meta name='twitter:card' content='summary'/>
  37. <meta name='twitter:title' content='<?=$page->title?>'/>
  38. <meta name='twitter:description' content='<?=$page->description?>'/>
  39. <meta name='twitter:image' content='<?=$page->icon?>'/>
  40. <meta name='twitter:url' content='<?=$page->canonical?>'/>
  41. <meta name='robots' content='index follow'/>
  42. <script>
  43. units = [];
  44. max_units = 0;
  45. selected_units = 0;
  46. selected_ids = [];
  47. <?php
  48. foreach ($page->units as $unit){
  49. ?>
  50. units.push(
  51. {
  52. id: <?=$unit->id?>,
  53. name: "<?=$unit->title?>",
  54. stars: <?=$unit->stars?>,
  55. level: <?=$unit->level?>,
  56. image: '<?=$unit->unit->get_image()?>',
  57. awakens_from: '<?=$unit->unit->awakens_from?>',
  58. awakens_to: '<?=$unit->unit->awakens_to?>',
  59. element: '<?=$unit->unit->element_name?>'
  60. }
  61. );
  62. <?php
  63. }
  64. ?>
  65. /**
  66. * Shows or hiddes the new team panel.
  67. *
  68. * @param show True to show, false to hide.
  69. */
  70. function showNewTeam(show){
  71. if (show === true){
  72. document.getElementById('new_team').style.display = 'block';
  73. }
  74. else{
  75. document.getElementById('new_team').style.display = 'none';
  76. }
  77. }
  78. function saveTeam(){
  79. if (selected_units > max_units){
  80. alert('Too many units selected.');
  81. return;
  82. }
  83. var name = document.getElementById('new_team_name').value;
  84. var description = document.getElementById('new_team_description').value;
  85. var area_type = document.getElementById('new_area_type').options[document.getElementById('new_area_type').selectedIndex].value;
  86. var area = null;
  87. var difficulty = null;
  88. var stage = null;
  89. switch (area_type){
  90. case '<?=$AREA_TYPE["SCENARIO"]?>':
  91. area = document.getElementById('new_area_scenario').options[document.getElementById('new_area_scenario').selectedIndex].value;
  92. difficulty = document.getElementById('new_area_difficulty').options[document.getElementById('new_area_difficulty').selectedIndex].value;
  93. stage = document.getElementById('new_area_stage').options[document.getElementById('new_area_stage').selectedIndex].value;
  94. break;
  95. case '<?=$AREA_TYPE["CAIROS_DUNGEON"]?>':
  96. area = document.getElementById('new_area_cairos_dungeon').options[document.getElementById('new_area_cairos_dungeon').selectedIndex].value;
  97. stage = document.getElementById('new_area_stage').options[document.getElementById('new_area_stage').selectedIndex].value;
  98. break;
  99. case '<?=$AREA_TYPE["RIFT_DUNGEON"]?>':
  100. area = document.getElementById('new_area_rift_dungeon').options[document.getElementById('new_area_rift_dungeon').selectedIndex].value;
  101. break;
  102. case '<?=$AREA_TYPE["RIFT_RAID"]?>':
  103. area = document.getElementById('new_area_rift_raid').options[document.getElementById('new_area_rift_raid').selectedIndex].value;
  104. stage = document.getElementById('new_area_stage').options[document.getElementById('new_area_stage').selectedIndex].value;
  105. break;
  106. case '<?=$AREA_TYPE["ARENA"]?>':
  107. break;
  108. case '<?=$AREA_TYPE["GUILD_WAR"]?>':
  109. break;
  110. case '<?=$AREA_TYPE["GUILD_SIEGE"]?>':
  111. break;
  112. case '<?=$AREA_TYPE["TARTARUS_LABYRINTH"]?>':
  113. difficulty = document.getElementById('new_area_difficulty').options[document.getElementById('new_area_difficulty').selectedIndex].value;
  114. stage = document.getElementById('new_area_stage').options[document.getElementById('new_area_stage').selectedIndex].value;
  115. break;
  116. case '<?=$AREA_TYPE["TRIAL_OF_ASCENSION"]?>':
  117. difficulty = document.getElementById('new_area_difficulty').options[document.getElementById('new_area_difficulty').selectedIndex].value;
  118. break;
  119. case '<?=$AREA_TYPE["DIMENSIONAL_HOLE"]?>':
  120. area = document.getElementById('new_area_dimensional_hole').options[document.getElementById('new_area_dimensional_hole').selectedIndex].value;
  121. stage = document.getElementById('new_area_stage').options[document.getElementById('new_area_stage').selectedIndex].value;
  122. break;
  123. case '<?=$AREA_TYPE["DIMENSIONAL_RIFT"]?>':
  124. difficulty = document.getElementById('new_area_difficulty').options[document.getElementById('new_area_difficulty').selectedIndex].value;
  125. break;
  126. default:
  127. alert('Unknown Area');
  128. return;
  129. }
  130. if (!Number.isInteger(parseInt(area))){
  131. area = 0;
  132. }
  133. if (!Number.isInteger(parseInt(stage))){
  134. stage = 0;
  135. }
  136. if (!Number.isInteger(parseInt(difficulty))){
  137. difficulty = 0;
  138. }
  139. var ids = selected_ids.join(',');
  140. var xhttp = new XMLHttpRequest();
  141. xhttp.onreadystatechange = function() {
  142. if (this.readyState == 4 && this.status == 200) {
  143. alert("200");
  144. //location.reload();
  145. }
  146. };
  147. xhttp.open("POST", "/action/new_team/", true);
  148. xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  149. console.log('uid=<?=$UID?>&ids=' + ids + '&area_type=' + area_type + '&area=' + area + '&difficulty=' + difficulty + '&stage=' + stage + '&name=' + encodeURI(name) + '&description=' + encodeURI(description));
  150. xhttp.send('uid=<?=$UID?>&ids=' + ids + '&area_type=' + area_type + '&area=' + area + '&difficulty=' + difficulty + '&stage=' + stage + '&name=' + encodeURI(name) + '&description=' + encodeURI(description));
  151. }
  152. /**
  153. * Searches a unit with the pattern entered in the 'new_unit_id'
  154. * field. Shows a clickable list of matching units.
  155. */
  156. function searchUnit(){
  157. key = document.getElementById('new_unit_id').value;
  158. var autocomplete = document.getElementById('new_unit_autocomplete');
  159. while (autocomplete.firstChild) {
  160. autocomplete.removeChild(autocomplete.firstChild);
  161. }
  162. if (key.length == 0){
  163. autocomplete.style.display = 'none';
  164. }
  165. for (var i = 0; i < units.length; i++) {
  166. if (units[i].name.toUpperCase().includes(key.toUpperCase())){
  167. autocomplete.style.display = 'block';
  168. var line = document.createElement('div');
  169. var img = document.createElement('img');
  170. img.setAttribute('src', units[i].image);
  171. var nam = document.createElement('span');
  172. var tex = document.createTextNode(units[i].name + '(' + units[i].stars + '*, Lv. ' + units[i].level + ')');
  173. nam.appendChild(tex);
  174. line.appendChild(img);
  175. line.appendChild(nam);
  176. sid = units[i].id;
  177. line.setAttribute('onclick', 'selectUnit(' + sid + ');');
  178. autocomplete.appendChild(line);
  179. }
  180. }
  181. }
  182. /**
  183. * Selects a unit from the list and adds it to the new team.
  184. * The search list is hidden afterwards.
  185. *
  186. * @param id Unit id.
  187. */
  188. function selectUnit(id){
  189. var name = null;
  190. var stars = null;
  191. var level = null;
  192. var image = null;
  193. var element = null;
  194. for (var i = 0; i < units.length; i ++) {
  195. if (units[i].id == id){
  196. name = units[i].name;
  197. stars = units[i].stars;
  198. level = units[i].level;
  199. image = units[i].image;
  200. element = units[i].element;
  201. break;
  202. }
  203. }
  204. if (name != null){
  205. var monsterPanel = document.createElement('div');
  206. monsterPanel.setAttribute('class', 'monster_panel');
  207. var monsterStars = document.createElement('span');
  208. monsterStars.setAttribute('class', 'stars');
  209. for (var i = 0; i < stars; i ++){
  210. var star = document.createElement('img');
  211. // TODO: Handle star color.
  212. star.setAttribute('class', 'star star_purple');
  213. star.setAttribute('src', '<?=$path["img"]["icon"]?>star.png');
  214. monsterStars.appendChild(star);
  215. }
  216. var monsterImage = document.createElement('img');
  217. monsterImage.setAttribute('class', 'monster border_' + element);
  218. monsterImage.setAttribute('src', image);
  219. var monsterLevel = document.createElement('span');
  220. monsterLevel.setAttribute('class', 'level');
  221. monsterLevel.appendChild(document.createTextNode(level));
  222. monsterPanel.appendChild(monsterStars);
  223. monsterPanel.appendChild(monsterImage);
  224. monsterPanel.appendChild(monsterLevel);
  225. var teamPanel = document.getElementById('new_team_units');
  226. teamPanel.appendChild(monsterPanel);
  227. // Hide the selector
  228. var autocomplete = document.getElementById('new_unit_autocomplete');
  229. while (autocomplete.firstChild) {
  230. autocomplete.removeChild(autocomplete.firstChild);
  231. }
  232. autocomplete.style.display = 'none';
  233. document.getElementById('new_unit_id').value = '';
  234. selected_units ++;
  235. if (selected_units >= max_units){
  236. document.getElementById('new_unit').style.display = 'none';
  237. }
  238. else{
  239. document.getElementById('new_unit').style.display = 'block';
  240. }
  241. selected_ids.push(id);
  242. }
  243. }
  244. /**
  245. * Deletes a unit from the new team form.
  246. *
  247. * @param id Unit id.
  248. */
  249. function deleteUnit(id){
  250. }
  251. /**
  252. * Shows the stage selector in the new team panel.
  253. *
  254. * @param total The number of stages to show.
  255. */
  256. function populateStage(total){
  257. var sel = document.getElementById('new_area_stage');
  258. while (sel.firstChild) {
  259. sel.removeChild(sel.firstChild);
  260. }
  261. var opt;
  262. var att;
  263. // Empty
  264. opt = document.createElement('option');
  265. tex = document.createTextNode('');
  266. opt.appendChild(tex);
  267. sel.appendChild(opt);
  268. for (var i = 1; i <= total; i ++){
  269. opt = document.createElement('option');
  270. tex = document.createTextNode('Stage ' + i);
  271. att = document.createAttribute('value');
  272. att.value = i;
  273. opt.setAttributeNode(att);
  274. opt.appendChild(tex);
  275. sel.appendChild(opt);
  276. }
  277. }
  278. /**
  279. * Shows the difficulty selector in the new team panel.
  280. *
  281. * @param labyrinth Indicates if the area type is the Tartarus
  282. * labyrinth. If so, it includes 'Easy'.
  283. * @param toa Indicates if the area type is the Tower of
  284. * Ascension. If so, it excludes 'Hell'.
  285. */
  286. function populateDifficulty(labyrinth = false, toa = false){
  287. var sel = document.getElementById('new_area_difficulty');
  288. while (sel.firstChild) {
  289. sel.removeChild(sel.firstChild);
  290. }
  291. var opt;
  292. var att;
  293. var tex;
  294. // Empty
  295. opt = document.createElement('option');
  296. tex = document.createTextNode('');
  297. opt.appendChild(tex);
  298. sel.appendChild(opt);
  299. // Easy (Labyrinth only)
  300. if (labyrinth){
  301. opt = document.createElement('option');
  302. tex = document.createTextNode('Easy difficulty');
  303. att = document.createAttribute('value');
  304. att.value = '<?=$DIFFICULTY["EASY"]?>';
  305. opt.setAttributeNode(att);
  306. opt.appendChild(tex);
  307. sel.appendChild(opt);
  308. }
  309. // Normal
  310. opt = document.createElement('option');
  311. tex = document.createTextNode('Normal difficulty');
  312. att = document.createAttribute('value');
  313. att.value = '<?=$DIFFICULTY["NORMAL"]?>';
  314. opt.setAttributeNode(att);
  315. opt.appendChild(tex);
  316. sel.appendChild(opt);
  317. // Hard
  318. opt = document.createElement('option');
  319. tex = document.createTextNode('Hard difficulty');
  320. att = document.createAttribute('value');
  321. att.value = '<?=$DIFFICULTY["HARD"]?>';
  322. opt.setAttributeNode(att);
  323. opt.appendChild(tex);
  324. sel.appendChild(opt);
  325. // Hell
  326. if (!toa){
  327. opt = document.createElement('option');
  328. tex = document.createTextNode('Hell difficulty');
  329. att = document.createAttribute('value');
  330. att.value = '<?=$DIFFICULTY["HELL"]?>';
  331. opt.setAttributeNode(att);
  332. opt.appendChild(tex);
  333. sel.appendChild(opt);
  334. }
  335. }
  336. /**
  337. * Shows the appropiate area selector when the area type is
  338. * selected in the new team panel.
  339. */
  340. function selectNewAreaType(){
  341. var type = document.getElementById('new_area_type').options[document.getElementById('new_area_type').selectedIndex].value;
  342. document.getElementById('new_area_scenario').style.display = 'none';
  343. document.getElementById('new_area_scenario').selectedIndex = 0;
  344. document.getElementById('new_area_cairos_dungeon').style.display = 'none';
  345. document.getElementById('new_area_cairos_dungeon').selectedIndex = 0;
  346. document.getElementById('new_area_rift_dungeon').style.display = 'none';
  347. document.getElementById('new_area_rift_dungeon').selectedIndex = 0;
  348. document.getElementById('new_area_tartarus_labyrinth').style.display = 'none';
  349. document.getElementById('new_area_tartarus_labyrinth').selectedIndex = 0;
  350. document.getElementById('new_area_dimensional_hole').style.display = 'none';
  351. document.getElementById('new_area_dimensional_hole').selectedIndex = 0;
  352. document.getElementById('new_area_difficulty').style.display = 'none';
  353. document.getElementById('new_area_difficulty').selectedIndex = 0;
  354. document.getElementById('new_area_stage').style.display = 'none';
  355. document.getElementById('new_area_stage').selectedIndex = 0;
  356. switch (type){
  357. case '<?=$AREA_TYPE["SCENARIO"]?>':
  358. document.getElementById('new_area_scenario').style.display = 'inline';
  359. max_units = 4;
  360. break;
  361. case '<?=$AREA_TYPE["CAIROS_DUNGEON"]?>':
  362. document.getElementById('new_area_cairos_dungeon').style.display = 'inline';
  363. max_units = 5;
  364. break;
  365. case '<?=$AREA_TYPE["RIFT_DUNGEON"]?>':
  366. document.getElementById('new_area_rift_dungeon').style.display = 'inline';
  367. max_units = 6;
  368. break;
  369. case '<?=$AREA_TYPE["RIFT_RAID"]?>':
  370. document.getElementById('new_area_rift_raid').style.display = 'inline';
  371. max_units = 6
  372. break;
  373. case '<?=$AREA_TYPE["ARENA"]?>':
  374. max_units = 4;
  375. //document.getElementById('new_area_arena').style.display = 'inline';
  376. break;
  377. case '<?=$AREA_TYPE["GUILD_WAR"]?>':
  378. max_units = 3;
  379. document.getElementById('new_area_guild_war').style.display = 'inline';
  380. break;
  381. case '<?=$AREA_TYPE["GUILD_SIEGE"]?>':
  382. max_units = 3;
  383. document.getElementById('new_area_guild_siege').style.display = 'inline';
  384. break;
  385. case '<?=$AREA_TYPE["TARTARUS_LABYRINTH"]?>':
  386. max_units = 5;
  387. document.getElementById('new_area_tartarus_labyrinth').style.display = 'inline';
  388. break;
  389. case '<?=$AREA_TYPE["TRIAL_OF_ASCENSION"]?>':
  390. max_units = 5;
  391. //document.getElementById('new_area_trial_of_ascension').style.display = 'inline';
  392. break;
  393. case '<?=$AREA_TYPE["WORLD_BOSS"]?>':
  394. //max_units = 5;
  395. //document.getElementById('new_area_world_boss').style.display = 'inline';
  396. break;
  397. case '<?=$AREA_TYPE["DIMENSIONAL_HOLE"]?>':
  398. max_units = 4;
  399. document.getElementById('new_area_dimensional_hole').style.display = 'inline';
  400. break;
  401. case '<?=$AREA_TYPE["DIMENSIONAL_RIFT"]?>':
  402. max_units = 5;
  403. //document.getElementById('new_area_dimensional_rift').style.display = 'inline';
  404. break;
  405. }
  406. if (selected_units >= max_units || type == ''){
  407. document.getElementById('new_unit').style.display = 'none';
  408. }
  409. else{
  410. document.getElementById('new_unit').style.display = 'block';
  411. }
  412. }
  413. /**
  414. * Populates the difficulty and stage selectors when an area is
  415. * selected in the new team panel.
  416. */
  417. function selectNewArea(){
  418. var type = document.getElementById('new_area_type').options[document.getElementById('new_area_type').selectedIndex].value;
  419. document.getElementById('new_area_stage').selectedIndex = 0;
  420. document.getElementById('new_area_difficulty').selectedIndex = 0;
  421. document.getElementById('new_area_stage').style.display = 'none';
  422. document.getElementById('new_area_difficulty').style.display = 'none';
  423. switch (type){
  424. case '<?=$AREA_TYPE["SCENARIO"]?>':
  425. document.getElementById('new_area_stage').style.display = 'inline';
  426. document.getElementById('new_area_difficulty').style.display = 'inline';
  427. populateStage(7);
  428. populateDifficulty();
  429. break;
  430. case '<?=$AREA_TYPE["CAIROS_DUNGEON"]?>':
  431. document.getElementById('new_area_stage').style.display = 'inline';
  432. populateStage(10);
  433. populateDifficulty();
  434. break;
  435. case '<?=$AREA_TYPE["RIFT_DUNGEON"]?>':
  436. break;
  437. case '<?=$AREA_TYPE["RIFT_RAID"]?>':
  438. document.getElementById('new_area_stage').style.display = 'inline';
  439. populateStage(5);
  440. break;
  441. case '<?=$AREA_TYPE["ARENA"]?>':
  442. break;
  443. case '<?=$AREA_TYPE["GUILD_WAR"]?>':
  444. break;
  445. case '<?=$AREA_TYPE["GUILD_SIEGE"]?>':
  446. break;
  447. case '<?=$AREA_TYPE["TARTARUS_LABYRINTH"]?>':
  448. document.getElementById('new_area_difficulty').style.display = 'inline';
  449. populateDifficulty(true, false);
  450. break;
  451. case '<?=$AREA_TYPE["TRIAL_OF_ASCENSION"]?>':
  452. document.getElementById('new_area_difficulty').style.display = 'inline';
  453. populateDifficulty(false, true);
  454. break;
  455. case '<?=$AREA_TYPE["WORLD_BOSS"]?>':
  456. break;
  457. case '<?=$AREA_TYPE["DIMENSIONAL_HOLE"]?>':
  458. document.getElementById('new_area_stage').style.display = 'inline';
  459. populateStage(5);
  460. break;
  461. case '<?=$AREA_TYPE["DIMENSIONAL_RIFT"]?>':
  462. break;
  463. }
  464. }
  465. </script>
  466. </head>
  467. <body>
  468. <?php
  469. include __DIR__ . "/inc/header.php";
  470. ?>
  471. <section class='filters'>
  472. <h2>
  473. Team filters
  474. </h2>
  475. <?php
  476. $filters = $page->filters;
  477. include __DIR__ . "/inc/filter_team.php";
  478. ?>
  479. </section> <!-- #filters -->
  480. <section class='list'>
  481. <h2>
  482. Teams
  483. </h2>
  484. <article>
  485. <table id='teams'>
  486. <tr>
  487. <th>
  488. Team
  489. </th>
  490. <th>
  491. Description
  492. </th>
  493. <th>
  494. Units
  495. </th>
  496. </tr>
  497. <?php
  498. $odd = "odd";
  499. foreach ($page->teams as $team){
  500. ?>
  501. <tr>
  502. <td class='team <?=$odd?>'>
  503. <h4>
  504. <?=$team->name?>
  505. </h4>
  506. <?php
  507. $area = $team->area->name;
  508. if (intval($team->stage) > 0){
  509. $area = $area . " - " . $team->stage;
  510. }
  511. ?>
  512. <h5>
  513. <?=$area?>
  514. </h5>
  515. </td>
  516. <td class='description <?=$odd?>'>
  517. <?=$team->description?>
  518. </td>
  519. <td class='units <?=$odd?>'>
  520. <?php
  521. foreach ($team->unit as $unit){
  522. ?>
  523. <a href='/<?=$UID?>/monsters/<?=$unit->id?>'>
  524. <div class='monster_panel'>
  525. <?=html_unit_panel($unit)?>
  526. </div>
  527. </a>
  528. <?php
  529. }
  530. ?>
  531. </td>
  532. </tr>
  533. <?php
  534. if ($odd == ""){
  535. $odd = "odd";
  536. }
  537. else{
  538. $odd = "";
  539. }
  540. }
  541. ?>
  542. </table>
  543. <input type='button' onClick='showNewTeam(true);' value='New Team'/>
  544. </article>
  545. </section> <!-- .list -->
  546. <?php
  547. include __DIR__ . "/inc/footer.php";
  548. ?>
  549. <section id='new_team' class='content'>
  550. <h2>
  551. New team
  552. </h2>
  553. <article>
  554. <table>
  555. <tr>
  556. <td class='new_title'>
  557. Area
  558. </td>
  559. <td class='new_values'>
  560. <select id='new_area_type' name='new_area_type' onChange='selectNewAreaType();'>
  561. <option value=''> </option>
  562. <option value='<?=$AREA_TYPE["SCENARIO"]?>'>Scenario</option>
  563. <option value='<?=$AREA_TYPE["CAIROS_DUNGEON"]?>'>Cairos Dungeon</option>
  564. <option value='<?=$AREA_TYPE["RIFT_DUNGEON"]?>'>Rift Dungeon</option>
  565. <option value='<?=$AREA_TYPE["RIFT_RAID"]?>'>Rift Raid</option>
  566. <option value='<?=$AREA_TYPE["DIMENSIONAL_HOLE"]?>'>Dimensional Hole</option>
  567. <option value='<?=$AREA_TYPE["ARENA"]?>'>Arena</option>
  568. <option value='<?=$AREA_TYPE["GUILD_WAR"]?>'>Guild War</option>
  569. <option value='<?=$AREA_TYPE["GUILD_SIEGE"]?>'>Guild Siege</option>
  570. <option value='<?=$AREA_TYPE["TARTARUS_LABYRINTH"]?>'>Tartarus Labyrinth</option>
  571. <option value='<?=$AREA_TYPE["TRIAL_OF_ASCENSION"]?>'>Trial of Ascension</option>
  572. <!--<option value='<?=$AREA_TYPE["WORLD_BOSS"]?>'>World Boss</option>-->
  573. <option value='<?=$AREA_TYPE["DIMENSIONAL_RIFT"]?>'>Dimensinal Rift</option>
  574. </select>
  575. <select id='new_area_scenario' class='new_area' onChange='selectNewArea();'>
  576. <option value=''> </option>
  577. <option value='<?=$SCENARIO['GAREN_FOREST']?>'>Garen Forest</option>
  578. <option value='<?=$SCENARIO['MT_SIZ']?>'>Mt. Siz</option>
  579. <option value='<?=$SCENARIO['KABIR_RUINS']?>'>Kabir Ruins</option>
  580. <option value='<?=$SCENARIO['MT_WHITE_RAGON']?>'>Mt. White Ragon</option>
  581. <option value='<?=$SCENARIO['TELAIN_FOREST']?>'>Telain Forest</option>
  582. <option value='<?=$SCENARIO['HYDENI_RUINS']?>'>Hydeni Ruins</option>
  583. <option value='<?=$SCENARIO['TAMOR_DESERT']?>'>Tamor Desert</option>
  584. <option value='<?=$SCENARIO['VROFAGUS_RUINS']?>'>Vrofagus Ruins</option>
  585. <option value='<?=$SCENARIO['FAIMON_VOLCANO']?>'>Faimon Volcano</option>
  586. <option value='<?=$SCENARIO['AIDEN_FOREST']?>'>Aiden Forest</option>
  587. <option value='<?=$SCENARIO['FERUN_CASTLE']?>'>Ferun Castle</option>
  588. <option value='<?=$SCENARIO['MT_RUNAR']?>'>Mt. Runar</option>
  589. <option value='<?=$SCENARIO['CHIRUKA_REMAINS']?>'>Charuca Remains</option>
  590. </select>
  591. <select id='new_area_cairos_dungeon' class='new_area' onChange='selectNewArea();'>
  592. <option value=''> </option>
  593. <option value='<?=$DUNGEON['GIANTS_KEEP']?>'>Giant&#39;s Keep</option>
  594. <option value='<?=$DUNGEON['DRAGONS_LAIR']?>'>Dragon&#39;s Lair</option>
  595. <option value='<?=$DUNGEON['NECROPOLIS']?>'>Necropolis</option>
  596. <option value='<?=$DUNGEON['HALL_OF_MAGIC']?>'>Hall of Magic</option>
  597. <option value='<?=$DUNGEON['HALL_OF_FIRE']?>'>Hall of Fire</option>
  598. <option value='<?=$DUNGEON['HALL_OF_WATER']?>'>Hall of Water</option>
  599. <option value='<?=$DUNGEON['HALL_OF_WIND']?>'>Hall of Wind</option>
  600. <option value='<?=$DUNGEON['HALL_OF_LIGHT']?>'>Hall of Light</option>
  601. <option value='<?=$DUNGEON['HALL_OF_DARK']?>'>Hall of Dark</option>
  602. </select>
  603. <select id='new_area_rift_dungeon' class='new_area' onChange='selectNewArea();'>
  604. <option value=''> </option>
  605. <option value='<?=$ELEMENTAL_RIFT_DUNGEON['FIRE_BEAST']?>'>Fire Beast</option>
  606. <option value='<?=$ELEMENTAL_RIFT_DUNGEON['ICE_BEAST']?>'>Ice Beast</option>
  607. <option value='<?=$ELEMENTAL_RIFT_DUNGEON['WIND_BEAST']?>'>Wind Beast</option>
  608. <option value='<?=$ELEMENTAL_RIFT_DUNGEON['LIGHT_BEAST']?>'>Light Beast</option>
  609. <option value='<?=$ELEMENTAL_RIFT_DUNGEON['DARK_BEAST']?>'>Dark Beast</option>
  610. </select>
  611. <select id='new_area_dimensional_hole' class='new_area' onChange='selectNewArea();'>
  612. <option value=''> </option>
  613. <option value='<?=$DUNGEON['FOREST_OF_ROARING_BEASTS']?>'>Forest or Roaring Beasts</option>
  614. <option value='<?=$DUNGEON['KARZHAN_REMAINS_WARBEAR']?>'>Karzhan Remains (Warbear)</option>
  615. <option value='<?=$DUNGEON['KARZHAN_REMAINS_WARBEAR']?>'>Karzhan Remains (Inugami)</option>
  616. <option value='<?=$DUNGEON['SANCTUARY_OF_DREAMING_FAIRIES']?>'>Sanctuary of Dreaming Fairies</option>
  617. <option value='<?=$DUNGEON['ELLUNIA_REMAINS_FAIRY']?>'>Ellunia Remains (Fairy)</option>
  618. <option value='<?=$DUNGEON['ELLUNIA_REMAINS_PIXIE']?>'>Ellunia Remains (Pixie)</option>
  619. <!-- TODO: Lumel -->
  620. </select>
  621. <select id='new_area_tartarus_labyrinth' class='new_area' onChange='selectNewArea();'>
  622. <option value=''> </option>
  623. <option value='<?=$LABYRINTH_STAGES['TARTARUS']?>'>Tartarus</option>
  624. <option value='<?=$LABYRINTH_STAGES['KOTTOS']?>'>Kottos</option>
  625. <option value='<?=$LABYRINTH_STAGES['LEOS']?>'>Leos</option>
  626. <option value='<?=$LABYRINTH_STAGES['AQUILES']?>'>Aquiles</option>
  627. <option value='<?=$LABYRINTH_STAGES['NORMAL']?>'>Normal Stage</option>
  628. <option value='<?=$LABYRINTH_STAGES['RESCUE']?>'>Rescue Stage</option>
  629. <option value='<?=$LABYRINTH_STAGES['EXPLODE']?>'>Explode Stage</option>
  630. <option value='<?=$LABYRINTH_STAGES['COOL_TIME']?>'>Cool Time Stage</option>
  631. <option value='<?=$LABYRINTH_STAGES['SPEED_LIMIT']?>'>Speed Limit Stage</option>
  632. <option value='<?=$LABYRINTH_STAGES['TIME_LIMIT']?>'>Time Limit Stage</option>
  633. <!-- TODO: Lumel -->
  634. </select>
  635. <select id='new_area_difficulty'>
  636. </select>
  637. <select id='new_area_stage'>
  638. </select>
  639. </td>
  640. </tr>
  641. <tr>
  642. <td class='new_title'>
  643. Name
  644. </td>
  645. <td class='new_values'>
  646. <input type='text' id='new_team_name' name='name'/>
  647. </td>
  648. </tr>
  649. <tr>
  650. <td class='new_title'>
  651. Description
  652. </td>
  653. <td class='new_values'>
  654. <textarea id='new_team_description' name='description'></textarea>
  655. </td>
  656. </tr>
  657. <tr>
  658. <td class='new_title'>
  659. Units:
  660. <div class='new_unit' id='new_unit'>
  661. <input id='new_unit_id' onInput='searchUnit();'/>
  662. <div id='new_unit_autocomplete' class='new_unit_autocomplete'>
  663. </div>
  664. </td>
  665. <td class='new_values'>
  666. <div id='new_team_units'>
  667. </div>
  668. </td>
  669. </tr>
  670. <tr>
  671. <td colspan='2'>
  672. <input type='button' value='Save' onClick='saveTeam();'/>
  673. </td>
  674. </tr>
  675. </article>
  676. </section>
  677. </body>
  678. </html>