-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathpage.html
240 lines (192 loc) · 7.17 KB
/
page.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
228
229
230
231
232
233
234
235
236
237
238
239
240
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Online vCard Converter</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="keywords" content="vcard,vcf,ldif,ldap,csv,gmail,convert,mac,addresses,contacts,export,import" />
<meta name="description" content="Convert your vCard files to CSV or LDIF in order to import them to Gmail (like A to G) or Outlook" />
<style type="text/css">
body {
margin: 1em;
background: #fff;
font-family:'Lucida Grande', Geneva, Verdana, Arial, Helvetica, sans-serif;
font-size: small;
}
td.cell {
background:#efefef;
padding-right: 0.6em;
}
td.label {
color: #333;
font-weight: bold;
text-align: right;
}
.title {
font-size:20px;
font-weight:bold;
}
.hint {
color: #999999;
}
.error {
color: #cc0000;
}
.disclaimer {
width: 48em;
color: #333;
font-size: 0.9em;
border: 1px solid #cc6;
background: #ffd;
margin-top: 1em;
padding: 1em;
}
.disclaimer h4 {
margin-top: 0;
}
</style>
<script type="text/javascript">
function set_form_fields(elem)
{
var format = elem.options[elem.selectedIndex].value;
var header = elem.form._header;
var delimiter = elem.form._delimiter;
var encoding = elem.form._encoding;
var newlines = elem.form._newlines;
var dn = elem.form._dn;
switch (format)
{
case 'gmail':
encoding.selectedIndex = 0;
newlines.selectedIndex = 0;
case 'ldif':
case 'img':
header.disabled = true;
delimiter.disabled = true;
encoding.disabled = true;
newlines.disabled = true;
dn.disabled = true;
break;
case 'ldap':
header.disabled = true;
delimiter.disabled = true;
encoding.disabled = false;
newlines.disabled = true;
dn.disabled = false;
break;
case 'csv':
header.disabled = false;
delimiter.disabled = false;
encoding.disabled = false;
newlines.disabled = false;
dn.disabled = true;
break;
case 'fritzbox':
encoding.selectedIndex = 1;
delimiter.selectedIndex = 1;
newlines.selectedIndex = 2;
header.checked = true;
header.disabled = true;
delimiter.disabled = true;
encoding.disabled = true;
newlines.disabled = true;
dn.disabled = true;
break;
}
var rootdnrow = document.getElementById('ldaprootdn');
rootdnrow.style.display = dn.disabled ? 'none' : (document.all && !window.opera ? 'block' : 'table-row');
}
</script>
</head>
<body>
<form method="post" action="index.php" enctype="multipart/form-data">
<table border="0" cellspacing="0" cellpadding="0"><tr>
<td width="180" height="90"><img src="vcf2csv_logo.jpg" width="170" height="78" alt="VCard to CSV Logo"></td>
<td class="title">vCard to LDIF/CSV Converter</td>
</tr></table>
<p>Preferred to export Apple's Address Book to Mozilla Thunderbird.<br />
<span class="hint">Simply drag all contacts from the Address Book to your desktop and upload the created vCard file.</span></p>
<?php
if (!empty($GLOBALS['error_msg']))
print '<p class="error">'.$GLOBALS['error_msg']."</p>\n";
?>
<table border="0" cellspacing="1" cellpadding="2"><tr>
<td class="cell label">vCard-File:</td>
<td class="cell"><input type="file" size="30" name="_vcards">
<span class="hint" style="padding-left:1em">(max. <?php echo show_bytes(parse_bytes(ini_get('upload_max_filesize'))); ?>)</span></td>
</tr><tr>
<td class="cell label">Format:</td>
<td class="cell"><select name="_format" onChange="set_form_fields(this)">
<option value="ldif">LDIF (Mozilla Thunderbird)</option>
<option value="ldap">LDIF (Import to LDAP server)</option>
<option value="csv">CSV</option>
<option value="gmail">Gmail (CSV)</option>
<option value="fritzbox">FritzBox (CSV)</option>
<option value="img">Images</option>
</select>
<select name="_delimiter" disabled>
<option value="tab">Tab</option>
<option value=";">Semicolon</option>
<option value=",">Comma</option>
</select>
<input type="checkbox" name="_header" id="checkHeader" value="1" disabled><label for="checkHeader"> Add header line</label></td>
</tr><tr id="ldaprootdn" style="display:none">
<td class="cell label">Root DN:</td>
<td class="cell">
<input type="text" name="_dn" id="dnID" style="width:30em;" disabled>
<label for="accessCode"><br>Use as Root DN LDAP identifier, to add it at the end of the "dn:" LDIF line <br>(for example: dc=Users, dc=nodomain)</label>
<span class="hint" style="padding-left:1em">(max. 255 chars)</span>
</td>
</tr><tr>
<td class="cell label">Encoding:</td>
<td class="cell">
<select name="_encoding" disabled>
<option value="UTF-8" selected>Unicode (UTF-8)</option>
<option value="UTF-16LE">Unicode (UTF-16LE)</option>
<option value="ISO-8859-1">Windows Latin-1 (ISO-8859-1)</option>
<option value="ISO-8859-15">Windows Latin-9 (ISO-8859-15)</option>
<option value="MS-ANSI">Microsoft ANSI (Windows-1252)</option>
<!--<option value="MacRoman">Macintosh (Mac Roman)</option>-->
</select>
<select name="_newlines" disabled>
<option value="lf" selected>Line Feed (Default)</option>
<option value="cr">Carriage Return (old Mac OS)</option>
<option value="crlf">CR-LF (Windows)</option>
</select>
</td>
</tr><tr valign="top">
<td class="cell label">Filter:</td>
<td class="cell">
<input type="checkbox" name="_mailonly" id="checkMailonly" value="1"><label for="checkMailonly"> vCards with e-mail only</label><br />
<input type="checkbox" name="_phoneonly" id="checkPhoneonly" value="1"><label for="checkPhoneonly"> vCards with phone numbers only</label>
</td>
</tr><tr>
<td class="cell label">Modifications:</td>
<td class="cell">
<input type="text" name="_accesscode" id="accessCode" style="width:3em;">
<label for="accessCode">replace this International Access Code with «0»</label>
</td>
</tr><tr>
<td></td>
<td><br><input type="submit" value="convert"></td>
</tr></table>
</form>
<div class="disclaimer">
<h4>How to convert files</h4>
<ol>
<li>Select a file from your computer's local drive for the field "vCard-File"</li>
<li>Choose the desired output format</li>
<li>Click the "convert" button</li>
</ol>
<p>The converted file is automatically downloaded to your computer.
If you're not prompted where to save the file, you'll find it in the "Downloads" folder on your computer.</p>
<h4>Privacy Policy</h4>
<p>This public service is intended to provide simple functions to convert any vCard file into another format.
It was created for personal needs and is now provided on a private and non commercial basis.
The uploaded file will not be stored permanently nor will the converted addresses be kept on the server.</p>
<p>You can also <a href="https://github.com/thomascube/vcfconvert/releases">download</a> the script
and run it locally. All you need is a webserver or a shell with PHP installed. This software is free and open source
and everybody is welcome to help us improving it. Fork us on <a href="https://github.com/thomascube/vcfconvert">github</a>!</p>
<p>For questions about development, privacy or security, please contact tellme@brotherli.ch</p>
</div>
</body>
</html>