-
Notifications
You must be signed in to change notification settings - Fork 9
/
deckbuilder.php
143 lines (134 loc) · 5.1 KB
/
deckbuilder.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<?php
include 'lib.php' ;
html_head(
'Deck builder',
array(
'style.css'
, 'deckbuilder.css'
, 'menu.css'
, 'options.css'
),
array(
'image.js',
'math.js',
'menu.js',
'deck.js',
'html.js',
'options.js',
'../variables.js.php',
'deckbuilder.js',
'stats.js',
'lib/Flotr2/flotr2.min.js'
)
) ;
?>
<body onload="load(this, '<?php echo addslashes($_GET['deck']) ; ?>' );">
<?php
html_menu() ;
?>
<!-- Search form -->
<div id="search" class="section">
<h1 class="hideable">Cards</h1>
<select id="deck_language" name="lang"></select>
<form id="search_cards" method="get">
<input type="hidden" name="page" value="1">
<input id="cardname" type="text" name="name" placeholder="name" autocomplete="off" title="Search inside card name, use % as a joker">
<button id="clear_search" type="button">X</button>
<div id="hidden_form" class="hidden">
<input id="cardext" type="text" name="ext" placeholder="extension" autocomplete="off" title="Limit cards to given extension code or name (begin)">
<input id="cardtypes" type="text" name="types" placeholder="supertype - type - subtype" autocomplete="off" title="Search inside card supertypes (legendary, basic, snow), types (creature, land ...) or subtypes (elf, equipment, aura), use % as a joker">
<input id="cardtext" type="text" name="text" placeholder="text" autocomplete="off" title="Search inside card text, use % as a joker">
<input id="cardcost" type="text" name="cost" placeholder="cost" autocomplete="off" title="Search inside card cost, use % as a joker">
<label>Cards per page :
<input id="cardlimit" type="text" name="limit" value="20" title="Number of cards to display" size="2" maxlength="2" title="Number of results to display per page"></label>
</div>
<input type="submit" name="submit" value="Search" title="Search all cards matching all criteria">
<span id="advanced_search" title="Show/hide advanced search parameters"></span>
<div id="pagination"></div>
</form>
<!-- Cards found -->
<table id="cardlist">
<thead>
<tr>
<th>Ext</th>
<th>Card</th>
</tr>
</thead>
<tbody id="search_result">
</tbody>
</table>
</div>
<!-- Buttons -->
<div id="builder_buttons" class="section">
<ul>
<li><button id="add_md" accesskey="a" title="Add card to deck">
<img src="themes/<?php echo $theme ; ?>/deckbuilder/1rightarrow.png" alt="=>">
</button></li>
<li><button id="add_sb" accesskey="b" title="Add card to sideboard">
<img src="themes/<?php echo $theme ; ?>/deckbuilder/2rightarrow.png" alt=">>">
</button></li>
<li><button id="del" accesskey="d" title="Remove card from deck / sideboard">
<img src="themes/<?php echo $theme ; ?>/deckbuilder/1leftarrow.png" alt="<=">
</button></li>
<li><hr>
<li><button id="up" accesskey="u" title="up card">
<img src="themes/<?php echo $theme ; ?>/deckbuilder/1uparrow.png" alt=">>">
</button></li>
<li><button id="down" accesskey="j" title="down card">
<img src="themes/<?php echo $theme ; ?>/deckbuilder/1downarrow.png" alt="<=">
</button></li>
<li><hr>
<li><button id="comment" accesskey="c" title="Add a comment over selected line">
<img src="themes/<?php echo $theme ; ?>/deckbuilder/edit.png" alt="comment">
</button></li>
<li><hr>
<li><button id="save" accesskey="s" title="Save deck">
<img src="themes/<?php echo $theme ; ?>/deckbuilder/filesave.png" alt="save">
</button></li>
<li><button id="saveas" accesskey="v" title="Save deck giving it another name">
<img src="themes/<?php echo $theme ; ?>/deckbuilder/filesaveas.png" alt="save">
</button></li>
<li><button id="export" accesskey="e" title="Save deck as a file on your computer">
<img src="themes/<?php echo $theme ; ?>/deckbuilder/export.png" alt="save">
</button></li>
</ul>
</div>
<!-- List of cards in current deck -->
<div id="decksection" class="section">
<h1 class="hideable">Deck</h1>
<label title="If unchecked, extensions won't be saved, and a default one will be defined on next deck loading">
<input id="savextensions" type="checkbox">Save selected extension
</label>
<button id="sort" title="Sort deck by type, then converted cost">Sort</button>
<label title="Add comments to separate each group of type, when sorting">
<input id="sort_comments" type="checkbox" checked="checked">Add type comments
</label>
<table id="deck">
<thead>
<tr>
<th>.</th>
<th>Ext</th>
<th>Card</th>
<th class="buttonlist">Act.</th>
</tr>
</thead>
<tbody id="maindeck">
</tbody>
<tbody id="sideboard">
</tbody>
</table>
</div>
<div id="infos">
<!-- Zoom image -->
<div id="zoombox" class="section">
<h1 class="hideable">Zoom</h1>
<img id="zoom" src="<?php echo $cardimages_default ; ?>back.jpg" title="Left click : zoom in, Right click : zoom out, middle click : open on MCI">
</div>
<!-- Deck stats -->
<div id="stats" class="section">
<h1 class="hideable">Stats</h1>
<div id="stats_graphs"></div>
</div>
</div>
<?php
html_foot() ;