-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
159 lines (142 loc) · 6.11 KB
/
index.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<?php
/*
Pony Fusion - Make a pony the colour of another pony!
Copyright (C) 2014 Tailszefox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see [http://www.gnu.org/licenses/].
Contact:
E-mail: [email protected]
*/
include_once("ponies.php");
if(isset($_GET["from"]))
{
$from = $_GET["from"];
if(!isset($ponies[$from]))
die("Invalid combination");
}
else
$from = "";
if(isset($_GET["to"]))
{
$to = $_GET["to"];
if(!isset($ponies[$to]))
die("Invalid combination");
}
else
$to = "";
?>
<!DOCTYPE html>
<head>
<title>Pony Fusion</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#f0f0f0" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#2b2b2b" media="(prefers-color-scheme: dark)">
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="css/style.css" rel="stylesheet" media="screen">
<link href="css/style-small.css" rel="stylesheet" media="screen and (max-width: 800px)">
<link href="css/dark.css" rel="stylesheet" media="screen and (prefers-color-scheme: dark)" id="darkSheet">
<link href="css/print.css" rel="stylesheet" media="print">
</head>
<body>
<div id="faqWrapper">
<div id="faq" class="well">
<div id="faqClose">
<span id="faqCloseButton">×</span>
</div>
<?php
$faqIncluded = TRUE;
include("faq.php");
?>
</div>
</div>
<div id="container">
<div id="header">
<img src="mode_light.png" id="darkSwitch" title="Switch to Dark Mode" data-mode="light">
<p>Pony Fusion</p>
</div>
<div id="content">
<div id="audio">
<audio controls loop>
<source src="merp/merp.ogg" type="audio/ogg">
<source src="merp/merp.mp3" type="audio/mpeg">
</audio>
</div>
<form method="GET" id="formFusion">
<p>
<select name="from" id="from" class="fusionChoice">
<?php
if($from == "vinyl2" || $to == "vinyl2")
{
$ponies["vinyl2"]["hidden"] = FALSE;
$ponies["vinyl"]["hidden"] = TRUE;
}
if($from == "starlight2" || $to == "starlight2")
{
$ponies["starlight2"]["hidden"] = FALSE;
$ponies["starlight"]["hidden"] = TRUE;
}
foreach($ponies as $id => $properties)
{
if(strpos($id, "break") !== FALSE)
{
?><optgroup label="<?php echo $properties ?>"></optgroup><?php
}
else if(isset($properties["hidden"]) === FALSE)
{
?><option value="<?php echo $id ?>" <?php if($from == $id) { ?>selected="selected"<?php } ?>><?php echo $properties["first"] . $properties["second"] ?></option><?php
}
}
?>
</select>
<button class="btn btn-info" id="buttonSwap">Swap</button>
<select name="to" id="to" class="fusionChoice">
<?php
foreach($ponies as $id => $properties)
{
if(strpos($id, "break") !== FALSE)
{
?><optgroup label="<?php echo $properties ?>"></optgroup><?php
}
else if(isset($properties["hidden"]) === FALSE)
{
?><option value="<?php echo $id ?>" <?php if($to == $id) { ?>selected="selected"<?php } ?>><?php echo $properties["first"] . $properties["second"] ?></option><?php
}
}
?>
</select>
</p>
<p><button type="submit" class="btn btn-info buttonsRandomize" id="buttonRandomizeFrom">Randomize <span class="leftAndRight">this one</span><span class="topAndBottom">top one</span></button> <button type="submit" class="btn btn-info buttonsRandomize" id="buttonRandomize">Randomize both</button> <button type="submit" class="btn btn-info buttonsRandomize" id="buttonRandomizeTo">Randomize <span class="leftAndRight">that one</span><span class="topAndBottom">bottom one</span></button></p>
<noscript><p><button type="submit" class="btn btn-primary">Fusion</button></p></noscript>
</form>
<div id="resultDivContent">
<?php
if(!empty($from) && !empty($to))
{
$fusionInclude = TRUE;
include("fusion_ajax.php");
}
?>
</div>
</div>
<div id="legal" class="well">
<p>
This application is released under <a rel="license" href="http://www.gnu.org/licenses/gpl.html"><img title="GPL v3 License" src="gpl_v3.png" width="80" height="15" /></a> - <a href="https://github.com/Tailszefox/Pony-Fusion">Source code available on GitHub</a> - See the source link for each vector's license
- <a href="http://www.mattyhex.net/CMR/">Celestia Redux font source</a> - <a href="faq.php" id="faqLink">FAQ</a> - <a href="mailto:pony@tailszefox.net?subject=Pony%20Fusion">Contact</a> - <a href="https://www.ponyar.net/">Be sure to also check out PonyAR!</a>
</p>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js" integrity="sha384-lifoBlbdwizTl3Yoe612uhI3AcOam/QtWkozF7SuiACaf5UJl5reOYu4MigVxrCH" crossorigin="anonymous"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/konami.js"></script>
<script src="js/base.js"></script>
</body>
</html>