Source for file import.php
Documentation is available at import.php
include_once 'include/head.php';
include_once 'include/header.php';
include_once 'include/simulations.php';
<script language="javascript" type="text/javascript">
function checkImportForm()
var form = document.ImportForm;
if (form.mode[0].checked) {
for (var i = 0; i < form.simId.length; i++) {
if (form.simId[i].checked) {
alert('Please pick a file first');
if (form.file.value == '') {
alert('Please pick a file to import');
if (form.format.value == '') {
alert('Please select the format of file first');
var obj = document.getElementById(id);
obj.style.display = 'none';
var obj = document.getElementById(id);
<div class="nav"><a href="index.php">Home</a></div>
<dt><b>Here the options to import the address book:</b></dt>
<dt>1. <i>defs_dir</i>, Definition directory (default is PEAR data directory)</dt>
<dt>2. <i>language</i>, Address book language in code (required only if the format is the selectable fields such as WAB, default is "en" english)</dt>
<form name="ImportForm" method="post" action="action-import.php" enctype="multipart/form-data" target="result" onSubmit="javascript: return checkImportForm();">
<b>What do you want to do?</b><br />
<input name="mode" type="radio" value="sim" id="mode_sim" onClick="if (this.checked) { showElement('sim'); hideElement('own'); }" checked /><label for="mode_sim">Use simulation file</label>
<input name="mode" type="radio" value="own" id="mode_own" onClick="if (this.checked) { showElement('own'); hideElement('sim'); }" /><label for="mode_own">Use my own file</label><br />
<b>Pick a file:</b><br />
foreach ($GLOBALS['_Contact_AddressBook_simulations'] as $key => $value) {
<input type="radio" name="simId" value=" <?php print $key; ?>" id=" <?php print $value['format'] . '_' . $key; ?>" /><label for=" <?php print $value['format'] . '_' . $key; ?>"> <?php print '<b>' . $value['file'] . '</b>, ' . $value['desc']; ?></label><br />
<div id="own" style="display:none;">
<input type="hidden" name="MAX_FILE_SIZE" value="1048576" />
<b>Pick a file:</b><br />
<input name="file" type="file" size="50" />
<b>Select the format of file:</b><br />
<select name="format" id="format">
<option value="" selected="selected">Select ...</option>
<option value="eudora">Eudora</option>
<option value="csv_kmail">KMail (KDE Mailer) CSV</option>
<option value="csv_mozilla">Mozilla/Thunderbird/Netscape CSV</option>
<option value="csv_outlook">Microsoft Outlook CSV</option>
<option value="csv_wab">Microsoft Windows Address Book (WAB)/Outlook Express CSV</option>
<option value="csv_palm">Palm Pilot CSV</option>
<option value="csv_yahoo">Yahoo! Mail Address Book</option>
<option value="csv_gmail">Gmail Address Book</option>
<input name="submit" type="submit" id="submit" value="Import" />
<iframe name="result" style="width:100%; height: 400px" frameborder="1"></iframe>
include_once 'include/footer.php';
Documentation generated on Mon, 11 Mar 2019 15:40:11 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|