<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Carlos Developer Blog</title>
	<atom:link href="http://www.carlos-alcala.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.carlos-alcala.com</link>
	<description>Just another developer weblog</description>
	<lastBuildDate>Wed, 02 Jun 2010 04:55:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<!-- google ad injected by adsense-optimizer http://www.adsenseoptimizer.de -->
			<div  style="padding:7px; float: right; padding-right: 0; margin: 3px;"><!-- Ad number: 1 --><script type="text/javascript"><!--
    	 
    	google_ad_client = "pub-3924546738683546"; google_alternate_color = "FFFFFF";
		google_ad_width = 468; google_ad_height = 60;
		google_ad_format = "468x60_as"; google_ad_type = "text_image";
		google_ad_channel =""; google_color_border = "336699";
		google_color_link = "0000FF"; google_color_bg = "FFFFFF";
		google_color_text = "000000"; google_color_url = "008000";
		google_ui_features = "rc:0"; //--></script>
		<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>	<item>
		<title>CodeIgniter vCard Library to Export Vcard .VCF files with Zip Support</title>
		<link>http://www.carlos-alcala.com/?p=98</link>
		<comments>http://www.carlos-alcala.com/?p=98#comments</comments>
		<pubDate>Sat, 18 Jul 2009 06:37:27 +0000</pubDate>
		<dc:creator>Carlos</dc:creator>
				<category><![CDATA[codeigniter]]></category>

		<guid isPermaLink="false">http://www.carlos-alcala.com/?p=98</guid>
		<description><![CDATA[The Vcard.php Library Code (applications/library/Vcard.php) :
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350&#60;?php &#160;
if &#40; ! defined&#40;'BASEPATH'&#41;&#41; exit&#40;'No direct script access allowed'&#41;;
/*
/*
&#160;* ---------------------------------------------------------------------------------------------------------------------------
&#160;* &#160;vCard library for Code Igniter applications extended from class_vcard from Troy Wolf [troy@troywolf.com]
&#160;* ---------------------------------------------------------------------------------------------------------------------------
&#160;*/
&#160;
/**
* Codeigniter vCard &#160;library
*/
class Vcard
&#123;
&#160; &#160; /**
&#160; &#160; &#160;* vcard variables
&#160; &#160; &#160;**/
&#160; &#160; protected $ci;

&#160; &#160; protected $log;
&#160; &#160; protected $data; &#160;&#160; &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><!-- google_ad_section_start --><p>The Vcard.php Library Code (applications/library/Vcard.php) :</p>
<div class="codecolorer-container php blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:535px;height:400px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br />83<br />84<br />85<br />86<br />87<br />88<br />89<br />90<br />91<br />92<br />93<br />94<br />95<br />96<br />97<br />98<br />99<br />100<br />101<br />102<br />103<br />104<br />105<br />106<br />107<br />108<br />109<br />110<br />111<br />112<br />113<br />114<br />115<br />116<br />117<br />118<br />119<br />120<br />121<br />122<br />123<br />124<br />125<br />126<br />127<br />128<br />129<br />130<br />131<br />132<br />133<br />134<br />135<br />136<br />137<br />138<br />139<br />140<br />141<br />142<br />143<br />144<br />145<br />146<br />147<br />148<br />149<br />150<br />151<br />152<br />153<br />154<br />155<br />156<br />157<br />158<br />159<br />160<br />161<br />162<br />163<br />164<br />165<br />166<br />167<br />168<br />169<br />170<br />171<br />172<br />173<br />174<br />175<br />176<br />177<br />178<br />179<br />180<br />181<br />182<br />183<br />184<br />185<br />186<br />187<br />188<br />189<br />190<br />191<br />192<br />193<br />194<br />195<br />196<br />197<br />198<br />199<br />200<br />201<br />202<br />203<br />204<br />205<br />206<br />207<br />208<br />209<br />210<br />211<br />212<br />213<br />214<br />215<br />216<br />217<br />218<br />219<br />220<br />221<br />222<br />223<br />224<br />225<br />226<br />227<br />228<br />229<br />230<br />231<br />232<br />233<br />234<br />235<br />236<br />237<br />238<br />239<br />240<br />241<br />242<br />243<br />244<br />245<br />246<br />247<br />248<br />249<br />250<br />251<br />252<br />253<br />254<br />255<br />256<br />257<br />258<br />259<br />260<br />261<br />262<br />263<br />264<br />265<br />266<br />267<br />268<br />269<br />270<br />271<br />272<br />273<br />274<br />275<br />276<br />277<br />278<br />279<br />280<br />281<br />282<br />283<br />284<br />285<br />286<br />287<br />288<br />289<br />290<br />291<br />292<br />293<br />294<br />295<br />296<br />297<br />298<br />299<br />300<br />301<br />302<br />303<br />304<br />305<br />306<br />307<br />308<br />309<br />310<br />311<br />312<br />313<br />314<br />315<br />316<br />317<br />318<br />319<br />320<br />321<br />322<br />323<br />324<br />325<br />326<br />327<br />328<br />329<br />330<br />331<br />332<br />333<br />334<br />335<br />336<br />337<br />338<br />339<br />340<br />341<br />342<br />343<br />344<br />345<br />346<br />347<br />348<br />349<br />350<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span> &nbsp;<br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span> <a href="http://www.php.net/defined"><span style="color: #990000;">defined</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'BASEPATH'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <a href="http://www.php.net/exit"><span style="color: #990000;">exit</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'No direct script access allowed'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">/*<br />
/*<br />
&nbsp;* ---------------------------------------------------------------------------------------------------------------------------<br />
&nbsp;* &nbsp;vCard library for Code Igniter applications extended from class_vcard from Troy Wolf [troy@troywolf.com]<br />
&nbsp;* ---------------------------------------------------------------------------------------------------------------------------<br />
&nbsp;*/</span><br />
&nbsp;<br />
<span style="color: #009933; font-style: italic;">/**<br />
* Codeigniter vCard &nbsp;library<br />
*/</span><br />
<span style="color: #000000; font-weight: bold;">class</span> Vcard<br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #009933; font-style: italic;">/**<br />
&nbsp; &nbsp; &nbsp;* vcard variables<br />
&nbsp; &nbsp; &nbsp;**/</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$ci</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$log</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$data</span><span style="color: #339933;">;</span> &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//array of this vcard's contact data</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$filename</span><span style="color: #339933;">;</span> &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//filename for download file naming</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$class</span><span style="color: #339933;">;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//PUBLIC, PRIVATE, CONFIDENTIAL</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$revision_date</span><span style="color: #339933;">;</span> &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//vCard Date</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$card</span><span style="color: #339933;">;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//vCard String</span><br />
<br />
&nbsp; &nbsp; <span style="color: #009933; font-style: italic;">/**<br />
&nbsp; &nbsp; &nbsp;* __construct<br />
&nbsp; &nbsp; &nbsp;**/</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ci</span> <span style="color: #339933;">=&amp;</span> get_instance<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//$ci-&gt;load-&gt;library('session');</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ci</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">load</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">library</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'zip'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #009933; font-style: italic;">/**<br />
&nbsp; &nbsp; &nbsp;*The Vcards class constructor. You can set some defaults here if desired.<br />
&nbsp; &nbsp; &nbsp;*<br />
&nbsp; &nbsp; &nbsp;*/</span> &nbsp; &nbsp;<br />
&nbsp; <span style="color: #000000; font-weight: bold;">function</span> Vcard<span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">log</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;New vcard() called&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&quot;display_name&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;first_name&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;last_name&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;additional_name&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;name_prefix&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;name_suffix&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;nickname&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;title&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;role&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;department&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;company&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;work_po_box&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;work_extended_address&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;work_address&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;work_city&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;work_state&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;work_postal_code&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;work_country&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;home_po_box&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;home_extended_address&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;home_address&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;home_city&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;home_state&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;home_postal_code&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;home_country&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;office_tel&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;home_tel&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;cell_tel&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;fax_tel&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;pager_tel&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;email1&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;email2&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;url&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;photo&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;birthday&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;timezone&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;sort_string&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;note&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/is_array"><span style="color: #990000;">is_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$item</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$item</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$value</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009933; font-style: italic;">/**<br />
*The Reload method. This metod update the DATA array content.<br />
*<br />
*/</span> &nbsp; &nbsp;<br />
&nbsp; <span style="color: #000000; font-weight: bold;">function</span> reload<span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">log</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;reload() called&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&quot;display_name&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;first_name&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;last_name&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;additional_name&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;name_prefix&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;name_suffix&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;nickname&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;title&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;role&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;department&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;company&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;work_po_box&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;work_extended_address&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;work_address&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;work_city&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;work_state&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;work_postal_code&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;work_country&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;home_po_box&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;home_extended_address&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;home_address&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;home_city&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;home_state&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;home_postal_code&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;home_country&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;office_tel&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;home_tel&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;cell_tel&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;fax_tel&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;pager_tel&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;email1&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;email2&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;url&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;photo&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;birthday&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;timezone&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;sort_string&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;note&quot;</span><span style="color: #339933;">=&gt;</span>null<br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/is_array"><span style="color: #990000;">is_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$item</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$item</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$value</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">build</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009933; font-style: italic;">/**<br />
&nbsp;* Build &nbsp;method checks all the values, builds appropriate defaults for<br />
&nbsp;* missing values, generates the vcard data string<br />
&nbsp;*<br />
&nbsp;* @param <br />
&nbsp;* @return VCF file<br />
&nbsp;*/</span> &nbsp; <br />
&nbsp; <span style="color: #000000; font-weight: bold;">function</span> build<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">log</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;vcard build() called&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">/*<br />
For many of the values, if they are not passed in, we set defaults or <br />
build them based on other values.<br />
*/</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">class</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">class</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;PUBLIC&quot;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'display_name'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'display_name'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/trim"><span style="color: #990000;">trim</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'first_name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'last_name'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'sort_string'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'sort_string'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'last_name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'sort_string'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'sort_string'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'company'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'timezone'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'timezone'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;O&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">revision_date</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">revision_date</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Y-m-d H:i:s'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;BEGIN:VCARD<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;VERSION:3.0<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;CLASS:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">class</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;PRODID:-//Vcard Extended Class from carlos.alcala@upandrunningsoftware.com//NONSGML Version 1//EN<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;REV:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">revision_date</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;FN:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'display_name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;N:&quot;</span><br />
<span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'last_name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;&quot;</span><br />
<span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'first_name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;&quot;</span><br />
<span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'additional_name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;&quot;</span><br />
<span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name_prefix'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;&quot;</span><br />
<span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name_suffix'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'nickname'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;NICKNAME:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'nickname'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;TITLE:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'company'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;ORG:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'company'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'department'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'department'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'work_po_box'</span><span style="color: #009900;">&#93;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">||</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'work_extended_address'</span><span style="color: #009900;">&#93;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">||</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'work_address'</span><span style="color: #009900;">&#93;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">||</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'work_city'</span><span style="color: #009900;">&#93;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">||</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'work_state'</span><span style="color: #009900;">&#93;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">||</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'work_postal_code'</span><span style="color: #009900;">&#93;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">||</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'work_country'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;ADR;TYPE=work:&quot;</span><br />
<span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'work_po_box'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;&quot;</span><br />
<span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'work_extended_address'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'work_address'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'work_city'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'work_state'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'work_postal_code'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'work_country'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_po_box'</span><span style="color: #009900;">&#93;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">||</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_extended_address'</span><span style="color: #009900;">&#93;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">||</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_address'</span><span style="color: #009900;">&#93;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">||</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_city'</span><span style="color: #009900;">&#93;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">||</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_state'</span><span style="color: #009900;">&#93;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">||</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_postal_code'</span><span style="color: #009900;">&#93;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">||</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_country'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;ADR;TYPE=home:&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_po_box'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_extended_address'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_address'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_city'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_state'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_postal_code'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_country'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'email1'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;EMAIL;TYPE=internet,pref:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'email1'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'email2'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;EMAIL;TYPE=internet:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'email2'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'office_tel'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;TEL;TYPE=work,voice:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'office_tel'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_tel'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;TEL;TYPE=home,voice:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_tel'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cell_tel'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;TEL;TYPE=cell,voice:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cell_tel'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'fax_tel'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;TEL;TYPE=work,fax:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'fax_tel'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pager_tel'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;TEL;TYPE=work,pager:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pager_tel'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;URL;TYPE=work:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'birthday'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;BDAY:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'birthday'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'role'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;ROLE:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'role'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'note'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;NOTE:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'note'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;TZ:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'timezone'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;END:VCARD<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #009933; font-style: italic;">/**<br />
&nbsp; &nbsp; &nbsp;* Download method streams the vcard to the browser client.<br />
&nbsp; &nbsp; &nbsp;*<br />
&nbsp; &nbsp; &nbsp;* @param <br />
&nbsp; &nbsp; &nbsp;* @return VCF file<br />
&nbsp; &nbsp; &nbsp;*/</span> &nbsp;<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> download<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">/*$this-&gt;log .= &quot;vcard download() called&lt;br /&gt;&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (!$this-&gt;card) { $this-&gt;build(); }<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (!$this-&gt;filename) { $this-&gt;filename = trim($this-&gt;data['display_name']); }<br />
&nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;filename = str_replace(&quot; &quot;, &quot;_&quot;, $this-&gt;filename);<br />
&nbsp; &nbsp; &nbsp; &nbsp; header(&quot;Content-type: text/directory&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; header(&quot;Content-Disposition: attachment; filename=&quot;.$this-&gt;filename.&quot;.vcf&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; header(&quot;Pragma: public&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; echo $this-&gt;card;<br />
&nbsp; &nbsp; &nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getvcard</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #009933; font-style: italic;">/**<br />
&nbsp; &nbsp; &nbsp;* Zipdownload method. Streams the vcard zipped to the browser client.<br />
&nbsp; &nbsp; &nbsp;*<br />
&nbsp; &nbsp; &nbsp;* @param <br />
&nbsp; &nbsp; &nbsp;* @return VCF file ZIPPED<br />
&nbsp; &nbsp; &nbsp;*/</span> &nbsp;<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> zipdownload<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">log</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;vcard download() called&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">build</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">filename</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">filename</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/trim"><span style="color: #990000;">trim</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'display_name'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">filename</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/str_replace"><span style="color: #990000;">str_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;_&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">filename</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">/*<br />
&nbsp; &nbsp; &nbsp; &nbsp; IM NOT SURE OF THIS COMMENT<br />
&nbsp; &nbsp; &nbsp; &nbsp; header(&quot;Content-type: text/directory&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; header(&quot;Content-Disposition: attachment; filename=&quot;.$this-&gt;filename.&quot;.vcf&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; header(&quot;Pragma: public&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//echo $this-&gt;card; </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$datavcard</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getvcard</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">filename</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;.vcf&quot;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//'mydata1.txt';</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//$datavcard = 'A Data String!';</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ci</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">zip</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add_data</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$name</span><span style="color: #339933;">,</span> <span style="color: #000088;">$datavcard</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Write the zip file to a folder on your server. Name it &quot;my_backup.zip&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ci</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">zip</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">archive</span><span style="color: #009900;">&#40;</span>base_url<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'vcards/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">filename</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'.zip'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Download the file to your desktop. Name it &quot;my_backup.zip&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ci</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">zip</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">download</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">filename</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'.zip'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009933; font-style: italic;">/**<br />
&nbsp; &nbsp; &nbsp;* Get Vcard for Download.<br />
&nbsp; &nbsp; &nbsp;*<br />
&nbsp; &nbsp; &nbsp;* @param <br />
&nbsp; &nbsp; &nbsp;* @return VCF file<br />
&nbsp; &nbsp; &nbsp;*/</span> &nbsp;<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getvcard<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">log</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;vcard download() called&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">build</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">filename</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">filename</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/trim"><span style="color: #990000;">trim</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'display_name'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">filename</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/str_replace"><span style="color: #990000;">str_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;_&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">filename</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/header"><span style="color: #990000;">header</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-type: text/directory&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/header"><span style="color: #990000;">header</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Disposition: attachment; filename=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">filename</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;.vcf&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/header"><span style="color: #990000;">header</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Pragma: public&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//return true;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009933; font-style: italic;">/**<br />
&nbsp; &nbsp; &nbsp;* Get Vcard for Download.<br />
&nbsp; &nbsp; &nbsp;*<br />
&nbsp; &nbsp; &nbsp;* @param <br />
&nbsp; &nbsp; &nbsp;* @return VCF file<br />
&nbsp; &nbsp; &nbsp;*/</span> &nbsp;<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> returnvcard<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">log</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;vcard download() called&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">build</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">filename</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">filename</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/trim"><span style="color: #990000;">trim</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'display_name'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">filename</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/str_replace"><span style="color: #990000;">str_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;_&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">filename</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//header(&quot;Content-type: text/directory&quot;);</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//header(&quot;Content-Disposition: attachment; filename=&quot;.$this-&gt;filename.&quot;.vcf&quot;);</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//header(&quot;Pragma: public&quot;);</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">card</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//return true;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #009933; font-style: italic;">/**<br />
&nbsp; &nbsp; &nbsp;* Zip Download method. Streams the vcard ARRAY zipped to the browser client.<br />
&nbsp; &nbsp; &nbsp;*<br />
&nbsp; &nbsp; &nbsp;* @param <br />
&nbsp; &nbsp; &nbsp;* @return VCF file ZIPPED<br />
&nbsp; &nbsp; &nbsp;*/</span> &nbsp;<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> zipdownloads<span style="color: #009900;">&#40;</span><span style="color: #000088;">$filename</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #000088;">$vcards</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$vcards</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$item</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$key</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$val</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ci</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">zip</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add_data</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$key</span><span style="color: #339933;">,</span> <span style="color: #000088;">$val</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Write the zip file to a folder on your server.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ci</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">zip</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">archive</span><span style="color: #009900;">&#40;</span>base_url<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'vcards/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$filename</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'.zip'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Download the file to your desktop.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ci</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">zip</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">download</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$filename</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'.zip'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; <br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>Then we can use it on a controller function like this:</p>
<div class="codecolorer-container php blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:535px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> linkvcard<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">load</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">library</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'vcard'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$datavcard</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getvcard</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/is_array"><span style="color: #990000;">is_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$datavcard</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span> &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">vcard</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">vcard</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$datavcard</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">vcard</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">vcard</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">vcard</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">zipdownload</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>The vcard function on the controller calls the library Vcard.php and then use the constructor, for that you have to arrange an array of COMMON VALUES for, we can use the Troy example for this:</p>
<div class="codecolorer-container php blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:535px;height:400px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br />83<br />84<br />85<br />86<br />87<br />88<br />89<br />90<br />91<br />92<br />93<br />94<br />95<br />96<br />97<br />98<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> getvcard<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
<span style="color: #666666; font-style: italic;">/*<br />
filename is the name of the .vcf file that will be sent to the user if you<br />
call the download() method. If you leave this blank, the class will <br />
automatically build a filename using the contact's data.<br />
*/</span><br />
<span style="color: #666666; font-style: italic;">#$datavcardfilename = &quot;&quot;;<br />
</span><br />
<span style="color: #666666; font-style: italic;">/*<br />
If you leave this blank, the current timestamp will be used.<br />
*/</span><br />
<span style="color: #666666; font-style: italic;">#$datavcardrevision_date = &quot;&quot;;<br />
</span><br />
<span style="color: #666666; font-style: italic;">/*<br />
Possible values are PUBLIC, PRIVATE, and CONFIDENTIAL. If you leave class<br />
blank, it will default to PUBLIC.<br />
*/</span><br />
<span style="color: #666666; font-style: italic;">#$datavcardclass = &quot;PUBLIC&quot;;<br />
</span><br />
<span style="color: #666666; font-style: italic;">/*<br />
Contact's name data.<br />
If you leave display_name blank, it will be built using the first and last name.<br />
*/</span><br />
<span style="color: #666666; font-style: italic;">#$datavcarddata['display_name'] = &quot;&quot;;<br />
</span><span style="color: #000088;">$datavcarddata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'first_name'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Troy&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$datavcarddata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'last_name'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Wolf&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">#$datavcarddata['additional_name'] = &quot;&quot;; //Middle name<br />
</span><span style="color: #666666; font-style: italic;">#$datavcarddata['name_prefix'] = &quot;&quot;; &nbsp;//Mr. Mrs. Dr.<br />
</span><span style="color: #666666; font-style: italic;">#$datavcarddata['name_suffix'] = &quot;&quot;; //DDS, MD, III, other designations.<br />
</span><span style="color: #000088;">$datavcarddata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'nickname'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;TJ&quot;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">/*<br />
Contact's company, department, title, profession<br />
*/</span><br />
<span style="color: #000088;">$datavcarddata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'company'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;TroyWolf.com&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">#$datavcarddata['department'] = &quot;&quot;;<br />
</span><span style="color: #000088;">$datavcarddata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Web Developer&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">#$datavcarddata['role'] = &quot;&quot;;<br />
</span><br />
<span style="color: #666666; font-style: italic;">/*<br />
Contact's work address<br />
*/</span><br />
<span style="color: #666666; font-style: italic;">#$datavcarddata['work_po_box'] = &quot;&quot;;<br />
</span><span style="color: #666666; font-style: italic;">#$datavcarddata['work_extended_address'] = &quot;&quot;;<br />
</span><span style="color: #000088;">$datavcarddata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'work_address'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;7027 N. Hickory&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$datavcarddata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'work_city'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Kansas City&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$datavcarddata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'work_state'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;MO&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$datavcarddata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'work_postal_code'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;64118&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">#$datavcarddata['work_country'] = &quot;United States of America&quot;;<br />
</span><br />
<span style="color: #666666; font-style: italic;">/*<br />
Contact's home address<br />
*/</span><br />
<span style="color: #666666; font-style: italic;">#$datavcarddata['home_po_box'] = &quot;&quot;;<br />
</span><span style="color: #666666; font-style: italic;">#$datavcarddata['home_extended_address'] = &quot;&quot;;<br />
</span><span style="color: #000088;">$datavcarddata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_address'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;7027 N. Hickory&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$datavcarddata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_city'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Kansas City&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$datavcarddata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_state'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;MO&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$datavcarddata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_postal_code'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;64118&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">#$datavcarddata['home_country'] = &quot;United States of America&quot;;<br />
</span><br />
<span style="color: #666666; font-style: italic;">/*<br />
Contact's telephone numbers.<br />
*/</span><br />
<span style="color: #000088;">$datavcarddata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'office_tel'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">#$datavcarddata['home_tel'] = &quot;&quot;;<br />
</span><span style="color: #000088;">$datavcarddata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cell_tel'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;(816) 739-9653&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$datavcarddata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'fax_tel'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">#$datavcarddata['pager_tel'] = &quot;&quot;;<br />
</span><br />
<span style="color: #666666; font-style: italic;">/*<br />
Contact's email addresses<br />
*/</span><br />
<span style="color: #000088;">$datavcarddata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'email1'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;troy@troywolf.com&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">#$datavcarddata['email2'] = &quot;&quot;;<br />
</span><br />
<span style="color: #666666; font-style: italic;">/*<br />
Contact's website<br />
*/</span><br />
<span style="color: #000088;">$datavcarddata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://www.troywolf.com&quot;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">/*<br />
Some other contact data.<br />
*/</span><br />
<span style="color: #666666; font-style: italic;">#$datavcarddata['photo'] = &quot;&quot;; &nbsp;//Enter a URL.<br />
</span><span style="color: #000088;">$datavcarddata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'birthday'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;1971-08-13&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$datavcarddata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'timezone'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;-06:00&quot;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">/*<br />
If you leave this blank, the class will default to using last_name or company.<br />
*/</span><br />
<span style="color: #666666; font-style: italic;">#$datavcarddata['sort_string'] = &quot;&quot;;<br />
</span><br />
<span style="color: #666666; font-style: italic;">/*<br />
Notes about this contact.<br />
*/</span><br />
<span style="color: #666666; font-style: italic;">#$datavcarddata['note'] = &quot;Troy is an amazing guy!&quot;;<br />
</span><span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>You can customize the $datavcard array to suit your contact information and then passit to the constructor like the function before.</p>
<p>I hope this would be quite enough for this to get work on export vCards.</p>
<p>Thanks for your comments,</p>
<p>Carlos</p>
<p>PS. The Codeigniter Wiki for this library is here: <a href="http://codeigniter.com/wiki/vCard_Library/">vCard Library</a></p>
<!-- google_ad_section_end --><!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://www.carlos-alcala.com/?feed=rss2&amp;p=98</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CodeIgniter + Email + SMTP Custom Config to Gmail Working</title>
		<link>http://www.carlos-alcala.com/?p=84</link>
		<comments>http://www.carlos-alcala.com/?p=84#comments</comments>
		<pubDate>Wed, 15 Jul 2009 21:25:27 +0000</pubDate>
		<dc:creator>Carlos</dc:creator>
				<category><![CDATA[Useful]]></category>
		<category><![CDATA[codeigniter]]></category>

		<guid isPermaLink="false">http://www.carlos-alcala.com/?p=84</guid>
		<description><![CDATA[I was trying to make use of the email library on codeigniter, and found some issues on the Gmail config and authentication errors, then after making my own I have made a custom configuration that works fine.
1. Create this CONSTANTS on config/constanst.php
define('MAIL_PROT', 'smtp');
define('SITE_ADMIN', 'Webmaster');
define('SITE_EMAIL', 'gmail.user@gmail.com');
define('SMTP_HOST', 'ssl://smtp.googlemail.com');
define('SMTP_USER', 'gmail.user@gmail.com');
define('SMTP_PASS', 'somepassword');
define('SMTP_PORT', 465);
define('MAIL_TYPE', 'html');
define('MAIL_CHARSET', 'utf-8');
2. Then create a smtp [...]]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><!-- google_ad_section_start --><p>I was trying to make use of the email library on codeigniter, and found some issues on the Gmail config and authentication errors, then after making my own I have made a custom configuration that works fine.</p>
<p>1. Create this CONSTANTS on config/constanst.php</p>
<pre class="brush:php">define('MAIL_PROT', 'smtp');
define('SITE_ADMIN', 'Webmaster');
define('SITE_EMAIL', 'gmail.user@gmail.com');
define('SMTP_HOST', 'ssl://smtp.googlemail.com');
define('SMTP_USER', 'gmail.user@gmail.com');
define('SMTP_PASS', 'somepassword');
define('SMTP_PORT', 465);
define('MAIL_TYPE', 'html');
define('MAIL_CHARSET', 'utf-8');</pre>
<p>2. Then create a smtp config function on a email_model for example:</p>
<pre class="brush:php">	function smtpconfig()
	{
			$config = array();
			//$config = $this->config->item('email');
			$config = Array(
			    'protocol' => MAIL_PROT,
			    'smtp_host' => SMTP_HOST,
			    'smtp_port' => SMTP_PORT,
			    'smtp_user' => SMTP_USER,
			    'smtp_pass' => SMTP_PASS,
			    'smtp_timeout' => 30,
			    'mailtype'  => MAIL_TYPE
			);
			//var_dump($config);

			$this->load->library('email', $config);
			$this->email->clear();
			$this->email->set_newline("\r\n");
	}</pre>
<p>3. Finally we can use BOTH in a test function like:</p>
<pre class="brush:php">function emailtest()
{
		$this->smtpconfig();
                $this->email->from(SITE_EMAIL, SITE_ADMIN);
		$this->email->to('receiver.user@gmail.com');

		$this->email->subject('CodeIgniter &#038; Gmail Rules !! ');
		$this->email->message('Hello Gmail World');

		if (!$this->email->send())
		    show_error($this->email->print_debugger());
		else
			echo 'Your e-mail has been sent!';
}</pre>
<p>I hope this would be useful.</p>
<p>Thanks for your feedback,</p>
<p>Carlos</p>
<!-- google_ad_section_end --><!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://www.carlos-alcala.com/?feed=rss2&amp;p=84</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>30 HTML Best Practices for Beginners</title>
		<link>http://www.carlos-alcala.com/?p=75</link>
		<comments>http://www.carlos-alcala.com/?p=75#comments</comments>
		<pubDate>Tue, 14 Jul 2009 16:05:01 +0000</pubDate>
		<dc:creator>Carlos</dc:creator>
				<category><![CDATA[Useful]]></category>

		<guid isPermaLink="false">http://www.carlos-alcala.com/?p=75</guid>
		<description><![CDATA[Thanks to Jeffrey Way for this great article, I just want to share to the world (and thanks Peter Hanson for this also)...
30 HTML Best Practices for Beginners
I hope it would be useful for all the Web  developers.
Carlos
]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><!-- google_ad_section_start --><p>Thanks to Jeffrey Way for this great article, I just want to share to the world (and thanks Peter Hanson for this also)...</p>
<div id="attachment_80" class="wp-caption alignleft" style="width: 210px"><a title="30 HTML Best" href="http://net.tutsplus.com/tutorials/html-css-techniques/30-html-best-practices-for-beginners/" target="_blank"><img class="size-full wp-image-80" title="30MUST" src="http://www.carlos-alcala.com/wp-content/uploads/2009/07/30MUST.jpg" alt="30 HTML Best Practices" width="200" height="200" /></a><p class="wp-caption-text">30 HTML Best Practices</p></div>
<p><a title="30 HTML Best Practices" href="http://net.tutsplus.com/tutorials/html-css-techniques/30-html-best-practices-for-beginners/" target="_blank">30 HTML Best Practices for Beginners</a></p>
<p>I hope it would be useful for all the Web  developers.</p>
<p>Carlos</p>
<!-- google_ad_section_end --><!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://www.carlos-alcala.com/?feed=rss2&amp;p=75</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	<!-- google ad injected by adsense-optimizer http://www.adsenseoptimizer.de -->
			<div  style="padding:7px; float: left; padding-left: 0px; margin: 3px;"><!-- Ad number: 2 --><script type="text/javascript"><!--
    	 
    	google_ad_client = "pub-3924546738683546"; google_alternate_color = "FFFFFF";
		google_ad_width = 728; google_ad_height = 90;
		google_ad_format = "728x90_as"; google_ad_type = "text_image";
		google_ad_channel =""; google_color_border = "2186FA";
		google_color_link = "FFFFFF"; google_color_bg = "F7F7F7";
		google_color_text = "000000"; google_color_url = "FFFFFF";
		google_ui_features = "rc:0"; //--></script>
		<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>	<item>
		<title>Codeigniter SimpleXML data parser with Table View</title>
		<link>http://www.carlos-alcala.com/?p=17</link>
		<comments>http://www.carlos-alcala.com/?p=17#comments</comments>
		<pubDate>Wed, 08 Jul 2009 16:20:05 +0000</pubDate>
		<dc:creator>Carlos</dc:creator>
				<category><![CDATA[codeigniter]]></category>

		<guid isPermaLink="false">http://www.carlos-alcala.com/?p=17</guid>
		<description><![CDATA[I read about the SimpleXML library from this blog SimpleXML Library, but this time, I mafe some changes to make the MVC concepts on the table view and xmltest controller best fit. 
First we load the Simplexml library to applications/library on codeigniter:
result="";
	$this->evalCode="";
	$values="";
	$encoding = 'UTF-8';
	$parser = xml_parser_create($encoding);
	xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
	xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
	$ok = xml_parse_into_struct($parser, $data, $values);
	if (!$ok) [...]]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><!-- google_ad_section_start --><p>I read about the SimpleXML library from this blog <a href="http://blog.insicdesigns.com/2009/03/parsing-xml-file-using-codeigniters-simplexml-library/">SimpleXML Library</a>, but this time, I mafe some changes to make the MVC concepts on the table view and xmltest controller best fit. </p>
<p>First we load the Simplexml library to applications/library on codeigniter:</p>
<pre lang="php"><?php

if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Simplexml{

	var $result = array();
	var $ignore_level = 0;
	var $skip_empty_values = false;
	var $php_errormsg;
	var $evalCode="";

	function xml_parse($data){
	$php_errormsg="";
	$this->result="";
	$this->evalCode="";
	$values="";
	$encoding = 'UTF-8';
	$parser = xml_parser_create($encoding);
	xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
	xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
	$ok = xml_parse_into_struct($parser, $data, $values);
	if (!$ok) {
		$errmsg = sprintf("XML parse error %d '%s' at line %d, column %d (byte index %d)",
		xml_get_error_code($parser),
		xml_error_string(xml_get_error_code($parser)),
		xml_get_current_line_number($parser),
		xml_get_current_column_number($parser),
		xml_get_current_byte_index($parser));
	}

	xml_parser_free($parser);
	return $this->xml_reorganize($values);
	}

	function xml_reorganize($array)
	{

		$count = count($array);
		$repeat = $this->xml_tags($array);
		$repeatedone = false;
		$tags = array();
		$k = 0;
		for ($i = 0; $i < $count; $i++) {
			switch ($array[$i]['type']) {
				case 'open':
					array_push($tags, $array[$i]['tag']);
					if ($i > 0 &#038;& ($array[$i]['tag'] == $array[$i-1]['tag']) &#038;& ($array[$i-1]['type'] == 'close'))
					$k++;
					if (isset($array[$i]['value']) &#038;& ($array[$i]['value'] || !$this->skip_empty_values)) {
						array_push($tags, '@content');
						$this->array_insert(count($tags), $tags, $array[$i]['value'], "open");
						array_pop($tags);
					}

					if (in_array($array[$i]['tag'] . $array[$i]['level'], $repeat)) {
						if (($repeatedone == $array[$i]['tag'] . $array[$i]['level']) &#038;& ($repeatedone)) {
							array_push($tags, strval($k++));
						} else {
							$repeatedone = $array[$i]['tag'] . $array[$i]['level'];
							array_push($tags, strval($k));
						}
					}

					if (isset($array[$i]['attributes']) &#038;& $array[$i]['attributes'] &#038;& $array[$i]['level'] != $this->ignore_level) {
						array_push($tags, '@attributes');
						foreach ($array[$i]['attributes'] as $attrkey => $attr) {
							array_push($tags, $attrkey);
							$this->array_insert(count($tags), $tags, $attr, "open");
							array_pop($tags);
						}
						array_pop($tags);
					}
					break;

				case 'close':
					array_pop($tags);
					if (in_array($array[$i]['tag'] . $array[$i]['level'], $repeat)) {
						if ($repeatedone == $array[$i]['tag'] . $array[$i]['level']) {
							array_pop($tags);
						} else {
							$repeatedone = $array[$i + 1]['tag'] . $array[$i + 1]['level'];
							array_pop($tags);
						}
					}
					break;

				case 'complete':
					array_push($tags, $array[$i]['tag']);
					if (in_array($array[$i]['tag'] . $array[$i]['level'], $repeat)) {
						if ($repeatedone == $array[$i]['tag'] . $array[$i]['level'] &#038;& $repeatedone) {
							array_push($tags, strval($k));
						} else {
							$repeatedone = $array[$i]['tag'] . $array[$i]['level'];
							array_push($tags, strval($k));
						}
					}

					if (isset($array[$i]['value']) &#038;& ($array[$i]['value'] || !$this->skip_empty_values)) {
						if (isset($array[$i]['attributes']) &#038;& $array[$i]['attributes']) {
							array_push($tags, '@content');
							$this->array_insert(count($tags), $tags, $array[$i]['value'], "complete");
							array_pop($tags);
						} else {
							$this->array_insert(count($tags), $tags, $array[$i]['value'], "complete");
						}
					}

					if (isset($array[$i]['attributes']) &#038;& $array[$i]['attributes']) {
						array_push($tags, '@attributes');
						foreach ($array[$i]['attributes'] as $attrkey => $attr) {
							array_push($tags, $attrkey);
							$this->array_insert(count($tags), $tags, $attr, "complete");
							array_pop($tags);
						}
						array_pop($tags);
					}

					if (in_array($array[$i]['tag'] . $array[$i]['level'], $repeat)) {
						array_pop($tags);
						$k++;
					}

					array_pop($tags);
					break;
			}
		}
		eval($this->evalCode);
		$last = $this->array_reindex($this->result);
		return $last;
	}	

	function array_insert($level, $tags, $value, $type)
	{
		$temp = '';
		for ($c = $this->ignore_level + 1; $c < $level + 1; $c++) {
			if (isset($tags[$c]) &#038;& (is_numeric(trim($tags[$c])) || trim($tags[$c]))) {
				if (is_numeric($tags[$c])) {
					$temp .= '[' . $tags[$c] . ']';
				} else {
					$temp .= '["' . $tags[$c] . '"]';
				}
			}
		}
		$this->evalCode .= '$this->result' . $temp . "=\"" . addslashes($value) . "\";//(" . $type . ")\n";
		#echo $code. "\n";
	}

	/**
	 * Define the repeated tags in XML file so we can set an index
	 *
	 * @param array $array
	 * @return array
	 */
	function xml_tags($array)
	{	$repeats_temp = array();
	$repeats_count = array();
	$repeats = array();

	if (is_array($array)) {
		$n = count($array) - 1;
		for ($i = 0; $i < $n; $i++) {
			$idn = $array[$i]['tag'].$array[$i]['level'];
			if(in_array($idn,$repeats_temp)){
				$repeats_count[array_search($idn,$repeats_temp)]+=1;
			}else{
				array_push($repeats_temp,$idn);
				$repeats_count[array_search($idn,$repeats_temp)]=1;
			}
		}
	}
	$n = count($repeats_count);
	for($i=0;$i<$n;$i++){
		if($repeats_count[$i]>1){
			array_push($repeats,$repeats_temp[$i]);
		}
	}
	unset($repeats_temp);
	unset($repeats_count);
	return array_unique($repeats);
	}

	/**
	 * Converts Array Variable to Object Variable
	 *
	 * @param array $arg_array
	 * @return $tmp
	 */
	function array2object ($arg_array)
	{

		if (is_array($arg_array)) {
			$keys = array_keys($arg_array);
			if(!is_numeric($keys[0])) $tmp = new Xml;
			foreach ($keys as $key) {
				if (is_numeric($key)) $has_number = true;
				if (is_string($key)) $has_string = true;
			}
			if (isset($has_number) and !isset($has_string)) {
				foreach ($arg_array as $key => $value) {
					$tmp[] = $this->array2object($value);
				}
			} elseif (isset($has_string)) {
				foreach ($arg_array as $key => $value) {
					if (is_string($key))
					$tmp->$key = $this->array2object($value);
				}
			}
		} elseif (is_object($arg_array)) {
			foreach ($arg_array as $key => $value) {
				if (is_array($value) or is_object($value))
				$tmp->$key = $this->array2object($value);
				else
				$tmp->$key = $value;
			}
		} else {
			$tmp = $arg_array;
		}
		return $tmp; //return the object
	}

	/**
	 * Reindexes the whole array with ascending numbers
	 *
	 * @param array $array
	 * @return array
	 */
	function array_reindex($array)
	{
		if (is_array($array)) {
			if(count($array) == 1 &#038;& isset($array[0])) {
			//if(count($array) == 1 &#038;& $array[0]){
				return $this->array_reindex($array[0]);
			}else{
				foreach($array as $keys => $items) {
					if (is_array($items)) {
						if (is_numeric($keys)) {
							$array[$keys] = $this->array_reindex($items);
						} else {
							$array[$keys] = $this->array_reindex(array_merge(array(), $items));
						}
					}
				}
			}
		}
		return $array;
	}
}
?>
</pre>
<p>The XML file:</p>
<pre lang="xml"><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<products xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

	<item>
		<id>1</id>
		<name>iPhone</name>
<price>300</price>
	</item>

	<item>
		<id>2</id>
		<name>iMac</name>
<price>2500</price>
	</item>

	<item>
		<id>3</id>
		<name>MacBook Pro</name>
<price>2000</price>
	</item>

	<item>
		<id>4</id>
		<name>iTouch</name>
<price>150</price>
	</item>

	<item>
		<id>5</id>
		<name>Wii</name>
<price>1250</price>
	</item>

	<item>
		<id>6</id>
		<name>Time Capsule</name>
<price>1000</price>
	</item>

	<item>
		<id>7</id>
		<name>Apple TV</name>
<price>800</price>
	</item>
</products>
</pre>
<p>The xmltest.php controller for codeigniter (<strong>applications/controller/xmltest.php</strong>):</p>
<pre lang="php"><?php

class Xmltest extends Controller {

	function Xmltest()
	{
		parent::Controller();
	}

	function index()
	{
		//load the parser library
		$this->load->library('parser');
		$this->load->library('simplexml');

		$filename = 'myxml.xml';
		$xmlfile="./xml/".$filename;
		$xmlRaw = file_get_contents($xmlfile);
		$data['xmlData'] = $this->simplexml->xml_parse($xmlRaw);
		//$this->parser->parse('xml/table_view', $data);
		echo $this->load->view('xml/table_view', $data, TRUE);
	}
}

/* End of file xmltest.php */
/* Location: ./system/application/controllers/xmltest.php */
</pre>
<p>At last but not least the table view on codeigniter (<strong>applications/views/xml/table_view</strong>) with foreach on xml row items:</p>
<pre lang="php">
<table cellpadding="0" cellspacing="0">
<thead>
<th>
<td>PRODUCT ID</td>
<td>PRODUCT NAME</td>
<td>CATEGORY</td>
<td>PRICE</td>
</th>
</thead>
<tbody>
<?php
	$result = "";
	foreach($xmlData['item'] as $row)
	{
		$result .= '
<tr>';
		foreach($row as $item => $value)
		{
			//could be $value instead of $row[$item], but this show the array manipulation in the foreach
			$result .= '
<td>'.$row[$item].'</td>

';
		}
		$result .= '</tr>

';
	}
	echo $result;
?>
	</tbody>
</table>
</pre>
<p>And the Jquery AddClass for even class on rows:</p>
<pre lang="javascript"><script type="text/javascript"> 
	var $j = jQuery.noConflict();
     $j(document).ready(function(){  

         $j("table tr:nth-child(even)").addClass("even");  

     });  
 </script></pre>
<p>Thanks for your comments, the next wave would be the MySQL insert function on the xmltest controller.</p>
<!-- google_ad_section_end --><!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://www.carlos-alcala.com/?feed=rss2&amp;p=17</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Developer Tools</title>
		<link>http://www.carlos-alcala.com/?p=14</link>
		<comments>http://www.carlos-alcala.com/?p=14#comments</comments>
		<pubDate>Sun, 05 Jul 2009 16:29:48 +0000</pubDate>
		<dc:creator>Carlos</dc:creator>
				<category><![CDATA[Useful]]></category>

		<guid isPermaLink="false">http://www.carlos-alcala.com/?p=14</guid>
		<description><![CDATA[With so many browser out there in the wild, working as a Web Developer certainly is not an easy job these days. Thankfully, over the last years, decent tools have been developed by bright people that make developing and debugging of code easier for the developer. But sometimes, it is not easy to keep track [...]]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><!-- google_ad_section_start --><p>With so many browser out there in the wild, working as a Web Developer certainly is not an easy job these days. Thankfully, over the last years, decent tools have been developed by bright people that make developing and debugging of code easier for the developer. But sometimes, it is not easy to keep track which tools are at a Developer’s disposal (and which are actually usable). The following article seeks to list the best tools available and quickly describing how to activate/install/use them.</p>
<p>Thanks to KlausKomenda.com</p>
<p><a href="http://www.klauskomenda.com/archives/2008/02/16/collection-of-web-developer-tools-per-browser/">http://www.klauskomenda.com/archives/2008/02/16/collection-of-web-developer-tools-per-browser/</a></p>
<!-- google_ad_section_end --><!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://www.carlos-alcala.com/?feed=rss2&amp;p=14</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>send AJAX post parameters data with Jquery UI Dialog</title>
		<link>http://www.carlos-alcala.com/?p=6</link>
		<comments>http://www.carlos-alcala.com/?p=6#comments</comments>
		<pubDate>Sat, 04 Jul 2009 21:53:05 +0000</pubDate>
		<dc:creator>Carlos</dc:creator>
				<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.carlos-alcala.com/?p=6</guid>
		<description><![CDATA[After SEVERAL HOURS of try/catch I finally came with this working example, its working on AJAX POST with new rows appends to the TABLE on the fly (that was my real problem):
The magic came with link this:
remove
remove
remove
This is the final working with AJAX POST and Jquery Dialog:
var $k = jQuery.noConflict();  //this is for NO-CONFLICT [...]]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><!-- google_ad_section_start --><p>After SEVERAL HOURS of try/catch I finally came with this working example, its working on AJAX POST with new rows appends to the TABLE on the fly (that was my real problem):</p>
<p>The magic came with link this:</p>
<pre class="brush:html"><a href="#" onclick="removecompany(this);return false;" id="remove_13">remove</a>
<a href="#" onclick="removecompany(this);return false;" id="remove_14">remove</a>
<a href="#" onclick="removecompany(this);return false;" id="remove_15">remove</a></pre>
<p>This is the final working with AJAX POST and Jquery Dialog:</p>
<pre class="brush:php">var $k = jQuery.noConflict();  //this is for NO-CONFLICT with scriptaculous
     function removecompany(link){
        companyid = link.id.replace('remove_', '');
    $k("#removedialog").dialog({
                        bgiframe: true,
                        resizable: false,
                        height:140,
                        autoOpen:false,
                        modal: true,
                        overlay: {
                                backgroundColor: '#000',
                                opacity: 0.5
                        },
                        buttons: {
                                'Are you sure ?': function() {
                                        $k(this).dialog('close');
                                        alert(companyid);
                                        $k.ajax({
                                              type: "post",
                                          url: "../ra/removecompany.php",
                                          dataType: "json",
                                          data: {
                                                        'companyid' : companyid
                                                },
                                          success: function(data) {
                                                //alert(data);
                                                if(data.success)
                                                {
                                                        //alert('success');
                                                        $k('#companynew'+companyid).remove();
                                                }
                                      }
                                        }); // End ajax method
                                },
                                Cancel: function() {
                                        $k(this).dialog('close');
                                }
                        }
                });
                $k("#removedialog").dialog('open');
                //return false;
     }</pre>
<p>Finally the dialog DIV: </p>
<pre class="brush:html">
<div id="removedialog" title="Remove a Company?">
<span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>
This company will be permanently deleted and cannot be recovered. Are you sure?
</div>
</pre>
<!-- google_ad_section_end --><!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://www.carlos-alcala.com/?feed=rss2&amp;p=6</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Just another Blog site</title>
		<link>http://www.carlos-alcala.com/?p=3</link>
		<comments>http://www.carlos-alcala.com/?p=3#comments</comments>
		<pubDate>Sat, 04 Jul 2009 20:21:51 +0000</pubDate>
		<dc:creator>Carlos</dc:creator>
				<category><![CDATA[welcome]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[feedback]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.carlos-alcala.com/?p=3</guid>
		<description><![CDATA[Welcome to my Site !
My personal Blog Site www.carlos-alcala.com is borning this day, July 4th as an "Blog Independence Day", but ONLY THIS TIME it's just for me,  and to remind every one else my comming soon Birthday on July 6th.
This site porpouse is for my blogging system and "share to the world " over [...]]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><!-- google_ad_section_start --><p>Welcome to my Site !</p>
<p>My personal Blog Site <a class="wpGallery" title="Carlos Alcala Site" href="http://www.carlos-alcala.com" target="_blank">www.carlos-alcala.com</a> is borning this day, July 4th as an "Blog Independence Day", but ONLY THIS TIME it's just for me,  and to remind every one else my comming soon Birthday on July 6th.</p>
<p>This site porpouse is for my blogging system and "share to the world " over software development tips&amp;tricks for PHP, AJAX, Jquery, JSON, CodeIgniter, Drupal and so on.</p>
<p>Thanks for your feedback to make this site better every day!</p>
<p>Sincerely</p>
<p>Carlos Alcala</p>
<!-- google_ad_section_end --><!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://www.carlos-alcala.com/?feed=rss2&amp;p=3</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	<!-- google ad injected by adsense-optimizer http://www.adsenseoptimizer.de -->
			<div  style="padding:7px; display: block; margin-left: auto; margin-right: auto; text-align: center;"><!-- Ad number: 3 --><script type="text/javascript"><!--
    	 
    	google_ad_client = "pub-3924546738683546"; google_alternate_color = "FFFFFF";
		google_ad_width = 468; google_ad_height = 60;
		google_ad_format = "468x60_as"; google_ad_type = "text_image";
		google_ad_channel =""; google_color_border = "336699";
		google_color_link = "0000FF"; google_color_bg = "FFFFFF";
		google_color_text = "000000"; google_color_url = "008000";
		google_ui_features = "rc:0"; //--></script>
		<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>	<item>
		<title>Hello world!</title>
		<link>http://www.carlos-alcala.com/?p=1</link>
		<comments>http://www.carlos-alcala.com/?p=1#comments</comments>
		<pubDate>Thu, 11 Jun 2009 03:26:07 +0000</pubDate>
		<dc:creator>Carlos</dc:creator>
				<category><![CDATA[welcome]]></category>

		<guid isPermaLink="false">http://www.carlos-alcala.com/?p=1</guid>
		<description><![CDATA[Hello Blog World, finally I get my own blog site, enjoy it  !!!
]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><!-- google_ad_section_start --><p>Hello Blog World, finally I get my own blog site, enjoy it  !!!</p>
<!-- google_ad_section_end --><!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://www.carlos-alcala.com/?feed=rss2&amp;p=1</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
