19 include_once (
"FDL/Class.Dir.php");
20 include_once (
"FDL/Class.UsercardVcard.php");
21 include_once (
"GENERIC/generic_util.php");
36 if (isset($_FILES[
"vcardfile"])) {
38 $vcardfile = $_FILES[
"vcardfile"][
"tmp_name"];
42 if (!$vcard_import->Open($vcardfile))
$action->exitError(_(
"no vcard file specified"));
48 while ($vcard_import->Read($tvalue)) {
50 if (count($tvalue) > 0) {
54 if (!
$doc)
$action->exitError(sprintf(_(
"no privilege to create this kind (%d) of document") ,
"USER"));
58 $doc->setvalue(
"US_PRIVCARD", $privacity);
60 while (list($k, $v) = each($tvalue)) {
61 $doc->setvalue($k, $v);
66 if (is_array($category)) {
69 while (list($k, $v) = each($category)) {
72 $catg->AddFile(
$doc->id);
81 "title" =>
$doc->title
90 "title" =>
$doc->title
93 while (list($k, $v) = each(
$ldoc)) {
104 if (count(
$ldoc) == 0) {
108 "title" =>
$doc->title
118 $vcard_import->Close();
120 $action->lay->SetBlockData(
"ADDED", $tabadd);
121 $action->lay->SetBlockData(
"DELETED", $tabdel);