PHP Classes

File: download.phtml

Recommend this page to a friend!
  Classes of Slava Ivanov   vCard Class   download.phtml   Download  
File: download.phtml
Role: Example script
Content type: text/plain
Description: example application
Class: vCard Class
Class to manipulate with vCard information
Author: By
Last change:
Date: 21 years ago
Size: 2,282 bytes
 

Contents

Class file image Download
<?
session_cache_limiter
("");
session_name("SID");
session_start();
include(
"vcardclass.inc");

$SCRIPT_NAME = "download.phtml";

if (isset(
$_SESSION["vCardinfo"])) {
   
$vcard = new VCARD();
   
$vcard->mailer = "StrongPost vCard";
   
$vcard->setName($_SESSION["vCardinfo"]["lname"], $_SESSION["vCardinfo"]["fname"], $_SESSION["vCardinfo"]["mname"], $_SESSION["vCardinfo"]["prefix"], $_SESSION["vCardinfo"]["suffix"]);
   
$vcard->setNickName($_SESSION["vCardinfo"]["nickname"]);
    if (
$_SESSION["vCardinfo"]["birthday"]) {
       
$arr_date = explode("/", $_SESSION["vCardinfo"]["birthday"]);
        if (
sizeof($arr_date) == 3) $vcard->setBirthDate($arr_date[0], $arr_date[1], $arr_date[2]);
    }
   
$vcard->setEmail($_SESSION["vCardinfo"]["email1"], "");
   
$vcard->setEmail($_SESSION["vCardinfo"]["email2"]);
   
$vcard->setAdr("", $_SESSION["vCardinfo"]["homeextended"], $_SESSION["vCardinfo"]["homestreet"], $_SESSION["vCardinfo"]["homecity"], $_SESSION["vCardinfo"]["homeprov"], $_SESSION["vCardinfo"]["homepostal"], $_SESSION["vCardinfo"]["homecountry"], "HOME");
   
$input = array("HOME", "VOICE");
   
$vcard->setTel($_SESSION["vCardinfo"]["homephone"], $input);
   
$input = array("CELL", "VOICE");
   
$vcard->setTel($_SESSION["vCardinfo"]["cellphone"], $input);
   
$input = array("FAX", "HOME");
   
$vcard->setTel($_SESSION["vCardinfo"]["homefax"], $input);
   
$vcard->setOrg($_SESSION["vCardinfo"]["orgname"], $_SESSION["vCardinfo"]["orgunit"]);
   
$vcard->setTitle($_SESSION["vCardinfo"]["jobtitle"]);
   
$vcard->setUrl($_SESSION["vCardinfo"]["weburl"], "WORK");
   
$vcard->setAdr("", $_SESSION["vCardinfo"]["workextended"], $_SESSION["vCardinfo"]["workstreet"], $_SESSION["vCardinfo"]["workcity"], $_SESSION["vCardinfo"]["workprov"], $_SESSION["vCardinfo"]["workpostal"], $_SESSION["vCardinfo"]["workcountry"], "WORK");
   
$input = array("WORK", "VOICE");
   
$vcard->setTel($_SESSION["vCardinfo"]["workphone"], $input);
   
$input = array("WORK", "FAX");
   
$vcard->setTel($_SESSION["vCardinfo"]["workfax"], $input);
   
$vcard->setTel($_SESSION["vCardinfo"]["workpager"], "PAGER");
   
$vcard->setNote($_SESSION["vCardinfo"]["note"]);
   
$vcard->setKey($_SESSION["vCardinfo"]["keyx509"]);

   
Header("Cache-control: private");
   
Header("Pragma: public");
    echo
$vcard->downloadvCard("2.1");
}

?>