forked from peric/GetCountries
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
227 lines (223 loc) · 7.26 KB
/
index.html
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Get countries list from geonames">
<meta name="author" content="Drazen Peric">
<meta name="keywords" content="countries, list, mysql,firebird, geonames, xml">
<title>Generate countries list in various formats</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-35038390-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<a href="https://github.com/peric/GetCountries"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png" alt="Fork me on GitHub"></a>
<div class="jumbotron">
<div class="container">
<h1>getCountries()</h1>
<p><strong>MySQL</strong>, <strong>Firebird</strong>, <strong>XML</strong>, <strong>JSON</strong>, <strong>CSV</strong> and <strong>YAML</strong> generator for custom Countries data. In the textarea below, you can see pre-generated output for MySQL table. All the data is fetched from <a href="http://www.geonames.org" target="_blank">geonames.org</a></p>
<p>
<a id="showexamplecode" href="#">MySQL output example</a>
</p>
<p>
<code id="examplecode" class="examplecode">
CREATE TABLE IF NOT EXISTS `countries` (<br />
    `idCountry` int(5) NOT NULL AUTO_INCREMENT,<br />
    `countryCode` char(2) NOT NULL DEFAULT '',<br />
    `countryName` varchar(80) NOT NULL DEFAULT '',<br />
    PRIMARY KEY (`idCountry`)<br />
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=251;<br /><br />
INSERT INTO `countries` (`countryCode`, `countryName`) VALUES<br />
('AD', 'Andorra'),<br />
('AE', 'United Arab Emirates'),<br />
('AF', 'Afghanistan')<br />
.<br />
.<br />
.
</code>
</p>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-4">
<h3>Columns</h3>
<div class="checkbox">
<label>
<input type="checkbox" class="options" name="options" value="countryCode" checked="checked">
countryCode
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="options" name="options" value="countryName" checked="checked">
countryName
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="options" name="options" value="currencyCode">
currencyCode
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="options" name="options" value="population">
population
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="options" name="options" value="fipsCode">
fipsCode
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="options" name="options" value="isoNumeric">
isoNumeric
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="options" name="options" value="north">
north
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="options" name="options" value="south">
south
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="options" name="options" value="east">
east
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="options" name="options" value="west">
west
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="options" name="options" value="capital">
capital
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="options" name="options" value="continentName">
continentName
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="options" name="options" value="continent">
continent
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="options" name="options" value="areaInSqKm">
areaInSqKm
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="options" name="options" value="languages">
languages
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="options" name="options" value="isoAlpha3">
isoAlpha3
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="options" name="options" value="geonameId">
geonameId
</label>
</div>
</div>
<div class="col-md-4">
<h3>Additional options</h3>
<div class="checkbox">
<label>
<input id="dblookup" type="checkbox" class="dblookup" name="dblookup" value="dblookup">
Language Lookup tables
</label>
</div>
</div>
<div class="col-md-4">
<h3>Output type</h3>
<div class="radio">
<label>
<input type="radio" class="codetype" name="codetype" id="mysqltype" value="mysqltype" checked>
MySQL
</label>
</div>
<div class="radio">
<label>
<input type="radio" class="codetype" name="codetype" id="firebirdtype" value="firebirdtype">
Firebird
</label>
</div>
<div class="radio">
<label>
<input type="radio" class="codetype" name="codetype" id="xmltype" value="xmltype">
XML
</label>
</div>
<div class="radio">
<label>
<input type="radio" class="codetype" name="codetype" id="jsontype" value="jsontype">
JSON
</label>
</div>
<div class="radio">
<label>
<input type="radio" class="codetype" name="codetype" id="csvtype" value="csvtype">
CSV
</label>
</div>
<div class="radio">
<label>
<input type="radio" class="codetype" name="codetype" id="yamltype" value="yamltype">
YAML
</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<p class="text-center">
<button id="generatecode" class="btn btn-primary btn-lg" type="button">Generate</button>
</p>
</div>
<textarea id="generatedcode" class="generatedcode" rows="30"></textarea>
</div>
</div>
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="https://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/functions.js"></script>
</body>
</html>