<form action="" method="POST" enctype="multipart/form-data">
emails:<textarea cols='35' rows='15' name='address'></textarea>
<br>gile:<input type='file' name='addresses'>
<br>Group:<input type='text' name='grupo'>
<br>
<input type="submit" value="Send!" name="submit">
</form>
<?php
if(!empty($_POST['address']) or !empty($_FILES['addresses']))
{
require("class.import.php");
$import = new Import();
$import->grupo = $_POST["grupo"];
$import->dbtableName = "datatable";
$import->identify();
$resultaqdo = $import->procesar();
if($resultaqdo){
print "
<fieldset style=\"border-color:green;background-color:#C0FFC0;color:black;text-decoration:blink;\">
<legend>Alert!</legend>
Pefect Uploaded... ".count($resultaqdo)." contacto(s).
</fieldset>
";
}else{
print "
<fieldset style=\"border-color:red;background-color:#FF9D9D;color:black;text-decoration:blink;\">
<legend>Alerta!</legend>
Got stock. {$import->show_errors()}
</fieldset>
";
}
}
?>
|