Source for file class.php5.greeting.php
Documentation is available at class.php5.greeting.php
* File contain the greeting class.
* @copyright Copyright (C)2006 Todor Iliev. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License (GPL)
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* To read the license please visit http://www.gnu.org/copyleft/gpl.html
* ----------------------------------------------------------------------
* Original Author of file:
* ----------------------------------------------------------------------
* Tested with IE 6,IE 7, Netscape 7, Opera 9, Firefox 2.0
* This is free software. Use at your own risk.
* Greeting card class for php 5.x
* @author Todor Iliev (TheLordOfWeb) <todor.iliev@viplord.com> <http://viplord.com/>
* @copyright Copyright (C)2006 Todor Iliev . All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* Additional text to card
* Full URL path to card image
public $mTextFont = 'Verdana, Arial, Helvetica, sans-serif';
* type on e-mail( html or plaint)
* @var array(int=>string) $error
* Greeting card constructor
* @param string $mFileName Greeting card(file) path and name
function __construct($fileName) {
* Crete greeting card header
* @return string header on html card content
$header = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
body { background-color:' . $this->mBg . ';}
background-color: #808080;}
$header .= 'font-weight: bold;';
$header .= 'font-style: italic;';
$header .= 'text-decoration: underline;';
* @return string end of HTML content
* Create card with image as HTML
* @return string body without '</body><html>' tags
* Create card with Flash as HTML
* @return string body without '</body><html>' tags
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="300" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">
<param name="movie" value="' . $this->mFileName . '" />
<param name="quality" value="high" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="scale" value="noborder">
<embed src="' . $this->mFileName . '" quality="high" loop="true" width="400" height="300" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
* @return string full greeting card content
* @return boold true on success or false on fail
$headers = "MIME-Version: 1.0\r\n";
$headers .= "X-Mailer: PHP\r\n"; // mailer
$headers .= "X-Priority: 1\r\n"; // 1-Urgent message! 2-very 3-normal
$headers .= "Return-Path: <" . $this->mSendFromMail . ">\r\n"; // Return path for errors
$headers .= "Content-Type: text/html; charset=$charset\r\n";
$headers .= "Content-Transfer-Encoding: 8bit\r\n";
$headers .= "Content-type: text/plain; charset=$charset\r\n";
$headers .= "Content-Transfer-Encoding: 8bit\r\n";
$headers .= "Content-type: text/plain; charset=$charset\r\n";
$headers .= "Content-Transfer-Encoding: 8bit\r\n";
$this->mError[] = "Can't send greeting card";
|