diff --git a/plugins/contact_importer/OpenInviter/LICENSE.txt b/plugins/contact_importer/OpenInviter/LICENSE.txt
new file mode 100755
index 0000000000000000000000000000000000000000..0cf291b147332e5caa68d447e2262bc6be5bdaf0
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/LICENSE.txt
@@ -0,0 +1,277 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                            NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
diff --git a/plugins/contact_importer/OpenInviter/POLICY.txt b/plugins/contact_importer/OpenInviter/POLICY.txt
new file mode 100755
index 0000000000000000000000000000000000000000..8e1a464ba5665b2cd1851a2a31f9465dc3e534b0
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/POLICY.txt
@@ -0,0 +1,158 @@
+
+PRIVACY POLICY
+
+1. SCOPE
+
+   1. This website is operated by OpenInviter Limited.
+
+   2. OpenInviter complies with data protection legislation such as the Data
+   Protection Act 1998. This regulates the processing of personal data
+   relating to you and grants you various rights in respect of your personal
+   data.
+
+   3. The aim of this statement is to tell you how we will use any data,
+   including personal data, you provide through this website. Please read it
+   carefully before you proceed.
+
+
+2. COLLECTION AND RETENTION OF DATA
+
+OpenInviter collects the following data from users of this website:
+
+   1. PROFILE DATA
+
+   This is information that you provide when you register and create a profile
+   with OpenInviter. It includes your username and password, a contact email address
+   and other information that you provide during the profile set-up process.
+
+   2. CONFIGURATION DATA
+
+      1. If you have enabled the 'check for updates' setting in the OpenInviter
+      software, then OpenInviter will collect information relating to the configuration
+      of your server used to run OpenInviter. This information is used to identify
+      which product update alerts are relevant to you and to profile the
+      community so that we can focus development and testing efforts on common
+      inviter configurations. This configuration data includes:
+
+         1. the version and basic configuration options of the inviter; and
+         2. type and version information about other software which OpenInviter
+         depends on, including: the webserver, PHP and MySQL.
+
+   3. WEBSITE DATA
+
+      1. OpenInviter collects data regarding anonymous visitors to the OpenInviter website
+      including the following:
+         1. the IP address of the user's computer (which may include a domain name);
+         2. the referring URL (if any); and
+         3. details of the Internet browser software used by the user to view
+         the OpenInviter website.
+      2. Further, if you use the online "Contact us" feature of the website,
+      we collect your name, email address and details of your message to
+      enable us to respond to your inquiry.
+
+
+3. HOW WE USE YOUR PERSONAL INFORMATION AND WITH WHOM WE SHARE YOUR INFORMATION
+
+   1. We use your personal information to manage your online profile, send you
+   details of software updates and other general communications. If you have
+   indicated that you wish to receive such information, then we may also send
+   you information about new products and/or services that OpenInviter provides. You
+   can opt-out of receiving future marketing material by changing the relevant
+   setting in your OpenInviter profile or by contacting us via our online contact
+   form.
+
+   2. We will employ the services of third parties to help us in certain
+   areas, such as website hosting. In these cases, the third party will
+   receive your information, for which you must provide your consent by
+   ticking the consent box after you have read this Privacy Policy. However,
+   at all times, we will control and be responsible for the use of your
+   information.
+
+
+4. TRANSFER OF YOUR INFORMATION OUTSIDE EUROPE
+
+The hosted version of the OpenInviter software is hosted by a third party located in
+the United States of America. If OpenInviter provides you with the hosted version,
+we may transfer some of your information to this third party. By submitting
+your information to this website in order to receive the hosted version and by
+ticking the consent box after having read this Privacy Policy, you consent to
+such transfers taking place.
+
+
+5. COOKIES
+
+   1. A cookie is a text-only string of information that a website transfers
+   to the cookie file of your computer's hard disk. A cookie will typically
+   contain the name of the domain from which the cookie has come, the
+   'lifetime' of the cookie, and a value, usually a randomly generated unique
+   number.
+
+
+   2. When you visit our website we send you a cookie. We use cookies to
+   identify you as a valid OpenInviter user, to ensure that no one else can
+   simultaneously log in and use your OpenInviter profile and to help you
+   personalise your OpenInviter experience in conjunction with your OpenInviter profile.
+
+   3. For more information about how cookies work and how to disable them, go
+   to http://www.allaboutcookies.org/manage-cookies/ . However, if you choose
+   to disable cookies, you will not be able to enjoy a significant portion of
+   the OpenInviter website and software functionality.
+
+
+6. LINKS
+
+Our site contains links to other web sites over which we have no control. We
+are not responsible for privacy policies or practices of other websites to
+which you choose to link from this site. We encourage you to review the
+privacy policies of those other web sites so that you can understand how they
+collect, use and share your information.
+
+
+7. SECURITY
+
+We have implemented reasonable technical and organisational measures designed
+to secure your personal information from accidental loss and from unauthorised
+access, use, alteration or disclosure. However, the Internet is an open system
+and we cannot guarantee that unauthorised third parties will never be able to
+defeat those measures or use your personal information for improper purposes.
+
+
+8. SALE OF THE BUSINESS
+
+In the event that the business is sold or integrated with another business,
+your details will be disclosed to our advisers and any prospective purchaser's
+adviser and will be passed to the new owners of the business.
+
+
+9. YOUR RIGHT TO ACCESS INFORMATION
+
+You are entitled to see the information held about you. If you wish to do
+this, please contact us via our online contact form . We may require you to
+provide verification of your identity to provide a copy of the information we hold.
+We will respond to any request in accordance with the current data protection
+legislation and in any event within 40 days of receipt a valid request. Please
+note that in certain circumstances we may withhold access to your information
+where we have the right to do so under current data protection legislation.
+
+
+10. UPDATING YOUR INFORMATION
+
+You may review, correct, update or change your personal information at any
+time by changing the relevant setting in your OpenInviter profile or by contacting
+us via our online contact form .
+
+
+11. CHANGES TO THIS PRIVACY POLICY
+
+If our privacy policy changes in any way, we will place an updated version on
+this page. Regularly reviewing this page ensures that you are always aware of
+what information we collect, how we use it and under what circumstances, if
+any, we will share it with other parties.
+
+
+CONTACTING US
+
+If you have any questions about this statement or your personal information,
+please contact us via our online contact form or by emailing us at
+hello@OpenInviter.com
+
diff --git a/plugins/contact_importer/OpenInviter/autoupdate.php b/plugins/contact_importer/OpenInviter/autoupdate.php
new file mode 100755
index 0000000000000000000000000000000000000000..31aae3eb9a5f6de38153f1256a3fe5f25b1d45c4
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/autoupdate.php
@@ -0,0 +1,211 @@
+<?php
+set_time_limit(0);
+if (!is_writable(dirname(__FILE__))) { echo "<b>OpenInviter</b> folder is not writable. Updates will not be posible<br>";exit; }
+if (!is_writable(dirname(__FILE__).'/plugins')) { echo "<b>OpenInviter/plugins</b> folder is not writable. Updates will not be posible<br>";exit; }
+if (file_exists(dirname(__FILE__)."/postinstall.php")) { echo "Delete <b>postinstall.php</b> before running the autoupdater";exit; }
+include(dirname(__FILE__).'/openinviter.php');
+$inviter=new openinviter();
+class update extends openinviter_base
+	{
+	public $plugins;
+	
+	public $settings;
+	
+	protected $timeout=30;
+	
+	public function makeUpdate()
+		{
+		$xml=$this->checkVersions();
+		if (!empty($xml))
+			{
+			$update_files=$this->parseXmlUpdates($xml);
+			$update=true;$newFiles=array();
+			foreach($update_files as $name_file=>$arrayfile)
+				if ($arrayfile['type']=='new')
+					{
+					if(!empty($this->settings['update_files']))
+						{ 
+						if (isset($this->plugins[$arrayfile['plugin_type']][$name_file]))
+							{
+							if (!empty($this->plugins[$arrayfile['plugin_type']][$name_file]['autoupdate']))  $newFiles[$name_file]=array('sum'=>$arrayfile['sum'],'plugin_type'=>$arrayfile['plugin_type']); 
+							elseif($arrayfile['plugin_type']=='base') $newFiles[$name_file]=array('sum'=>$arrayfile['sum'],'plugin_type'=>$arrayfile['plugin_type']);
+							}
+						}
+					else
+						{
+						if($arrayfile['plugin_type']=='base') $newFiles[$name_file]=array('sum'=>$arrayfile['sum'],'plugin_type'=>$arrayfile['plugin_type']);
+						else $newFiles[$name_file]=array('sum'=>$arrayfile['sum'],'plugin_type'=>$arrayfile['plugin_type']); 	
+						}
+					}
+		
+			foreach ($newFiles as $name_file=>$arrayFile)
+				{
+				$headers=array('Content-Type'=>'application/xml','X_USER'=>$this->settings['username'],'X_SIGNATURE'=>$this->makeSignature($this->settings['private_key'],$this->xmlFile($name_file)));					
+				$res=$this->getNewFile(gzcompress($this->xmlFile($name_file),9),$headers);
+				if (!empty($res))
+					{
+					$fileDeCmp=gzuncompress($res);$elementsDownload=$this->getElementsDownload($fileDeCmp);
+					$file_content=$elementsDownload['fileStrip'];$signatureBulk=$elementsDownload['signatureBulk'];
+					$this->verifySignature($signatureBulk,$file_content);
+					if ($arrayFile['sum']!=md5($file_content)) $update=false;
+					elseif (!file_put_contents($this->getUpdateFilePath($name_file).".tmp",$file_content)) $this->ers("Unable to write new updates");
+					}
+				else $update=false;
+				}
+			if ($update)
+				{
+				foreach($newFiles as $name_file=>$arrayfile)
+					{		
+					file_put_contents($this->getUpdateFilePath($name_file),file_get_contents($this->getUpdateFilePath($name_file).".tmp"));
+					unlink($this->getUpdateFilePath($name_file).".tmp");	
+					$this->writeConf($name_file,$arrayfile['plugin_type']);
+					}
+				$this->array2Log($update_files);
+				}
+			else
+				{
+				foreach($newFiles as $name_file=>$arrayfile) if (file_exists($this->getUpdateFilePath($name_file).".tmp")) unlink($this->getUpdateFilePath($name_file).".tmp");																
+				if (!$update) $this->ers("Unable to download updates");
+				}
+			}
+		else $this->ers("Unable to connect to Server");
+		}
+		
+	public function writeConf($name_file,$type=false)
+		{
+		if (!file_exists(dirname(__FILE__)."/conf")) mkdir(dirname(__FILE__)."/conf",0755,true);
+		if ($type=='social') { if (!file_exists(dirname(__FILE__)."/conf/{$name_file}.conf")) file_put_contents(dirname(__FILE__)."/conf/{$name_file}.conf",'<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>'); }	
+		elseif($type=='email') { if (!file_exists(dirname(__FILE__)."/conf/{$name_file}.conf")) file_put_contents(dirname(__FILE__)."/conf/{$name_file}.conf",'<?php $enable=true;$autoUpdate=true; ?>'); }
+		}
+		
+	private function verifySignature($signatureBulk,$fileContent)
+		{
+		if (strpos($signatureBulk,'X_SIGNATURE:')===false) $this->ers("INVALID SIGNATURE");
+		else
+			{
+			$start=strpos($signatureBulk,'X_SIGNATURE:')+strlen('X_SIGNATURE:');$end=strlen($signatureBulk);
+			$signature=trim(substr($signatureBulk,$start,$end-$start));
+			$signature_check=$this->makeSignature($this->settings['private_key'],$fileContent);
+			if($signature!=$signature_check) $this->ers("Invalid SIGNATURE");
+			else return true;
+			}
+		}
+	
+	public function getElementsDownload($res)
+		{
+		$start=0;$end=strpos($res,"<?");$signatureBulk=trim(substr($res,$start,$end));$fileStriped=str_replace($signatureBulk,'',$res);
+		if (empty($signatureBulk)) $this->ers("Invalid Signature");
+		if (empty($fileStriped)) $this->ers("Unable to download");
+		return array('signatureBulk'=>$signatureBulk,'fileStrip'=>$fileStriped);
+		}
+	
+	protected function getUpdateFilePath($plugin)
+		{
+		if ($plugin=='openinviter') return dirname(__FILE__)."/{$plugin}.php";
+		elseif($plugin=='_base') return dirname(__FILE__)."/plugins/{$plugin}.php";
+		else return dirname(__FILE__)."/plugins/{$plugin}.plg.php";
+		} 	
+	
+	public function xmlFile($file_name)
+		{
+		return "<request><api_version>1.8</api_version><file>{$file_name}</file></request>";
+		}
+	
+	public function xmlVersions()
+		{
+		$xml="<request><api_version>1.8</api_version><services>";
+		if (!empty($this->plugins))
+			foreach ($this->plugins as $type=>$dummy)
+				foreach ($dummy as $plugin=>$details)
+					$xml.="<service name='{$details['name']}'>
+								<version>{$details['version']}</version>
+							</service>";	
+		else $xml.="<service name=''>
+								<version></version>
+							</service>
+				   ";
+		return $xml.="</services></request>";
+		}
+	
+	public function checkVersions()
+		{
+		$this->init();
+		$xml=$this->xmlVersions();
+		$headers=array('Content-Type'=>'application/xml','X_USER'=>$this->settings['username'],'X_SIGNATURE'=>$this->makeSignature($this->settings['private_key'],$xml));
+		$res=gzuncompress($this->post("http://openinviter.com/service_download.php",gzcompress($xml,9),false,false,false,$headers,true));
+		$this->stopPlugin();
+		if ((empty($res))) $this->ers("Unable to Connect to Server");	
+		elseif (strpos($res,'<error>')!==false) {$res=str_replace("<error>","",str_replace("</error>","",$res));$this->ers($res);}
+		return $res;
+		}
+		
+	public function parseXmlUpdates($xml)
+		{
+		$versions=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($xml)) $doc->loadHTML($xml);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//service";$data=$xpath->query($query);
+		foreach($data as $node) $versions[(string)$node->childNodes->item(0)->nodeValue]=array('type'=>(string)$node->childNodes->item(2)->nodeValue,'sum'=>(string)$node->childNodes->item(1)->nodeValue,'plugin_type'=>(string)$node->childNodes->item(3)->nodeValue);
+		return $versions;	
+		}	
+	
+	public function getNewFile($xml,$headers)
+		{
+		$this->init();
+		$res=$this->post("http://openinviter.com/service_download.php",$xml,false,false,false,$headers,true);
+		$this->stopPlugin();
+		return $res;
+		}
+	
+	private function makeSignature($var1,$var2)
+		{
+		return md5(md5($var1).md5($var2));
+		}
+		
+	private function array2Log($array)
+		{
+		$date=date("Y-m-d H:i:s");$updateCount=0;
+		$string="[$date] UPDATE STARTED\r\n";
+		foreach($array as $key=>$values) if ($values['type']=='new') { $string.="\tUPDATED: {$key}.php\r\n";$updateCount++; }
+		$string.="\tUPDATE DONE. {$updateCount} FILES UPDATED\r\n";
+		$this->writeLog($string);
+		}
+	
+	public function ers($contents)
+		{
+		$string="[".date("Y-m-d H:i:s")."] ERROR ".$contents."\r\n";
+		$this->writeLog($string);
+		echo $string; 
+		exit;
+		}
+	
+	public function writeLog($contents)
+		{
+		$fp=fopen($this->settings['cookie_path'].'/oi_update_log.txt','a+');if ($fp) { fwrite($fp,$contents);fclose($fp); }
+		}
+	
+	public function login($user,$pass)
+		{
+		return;
+		}
+		
+	public function getMyContacts()
+		{
+		return;
+		}
+		
+	public function logout()
+		{
+		return;
+		}
+		
+	}
+$plugins=$inviter->getPlugins(true);
+$files_base['base']=array('openinviter'=>array('name'=>'openinviter','version'=>$inviter->getVersion()),'_base'=>array('name'=>'_base','version'=>$inviter->getVersion()));
+$update=new update();
+$update->settings=$inviter->settings;
+$update->plugins=(!empty($plugins)?array_merge($files_base,$plugins):$files_base);
+$update->service_user='updater';
+$update->service_pass='updater';
+$update->service='updater';
+$update->makeUpdate();
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/abv.conf b/plugins/contact_importer/OpenInviter/conf/abv.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/abv.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/aol.conf b/plugins/contact_importer/OpenInviter/conf/aol.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/aol.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/apropo.conf b/plugins/contact_importer/OpenInviter/conf/apropo.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/apropo.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/atlas.conf b/plugins/contact_importer/OpenInviter/conf/atlas.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/atlas.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/aussiemail.conf b/plugins/contact_importer/OpenInviter/conf/aussiemail.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/aussiemail.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/azet.conf b/plugins/contact_importer/OpenInviter/conf/azet.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/azet.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/badoo.conf b/plugins/contact_importer/OpenInviter/conf/badoo.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/badoo.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/bebo.conf b/plugins/contact_importer/OpenInviter/conf/bebo.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/bebo.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/bigstring.conf b/plugins/contact_importer/OpenInviter/conf/bigstring.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/bigstring.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/bookcrossing.conf b/plugins/contact_importer/OpenInviter/conf/bookcrossing.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/bookcrossing.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/bordermail.conf b/plugins/contact_importer/OpenInviter/conf/bordermail.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/bordermail.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/brazencareerist.conf b/plugins/contact_importer/OpenInviter/conf/brazencareerist.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/brazencareerist.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/canoe.conf b/plugins/contact_importer/OpenInviter/conf/canoe.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/canoe.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/care2.conf b/plugins/contact_importer/OpenInviter/conf/care2.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/care2.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/clevergo.conf b/plugins/contact_importer/OpenInviter/conf/clevergo.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/clevergo.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/cyworld.conf b/plugins/contact_importer/OpenInviter/conf/cyworld.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/cyworld.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/doramail.conf b/plugins/contact_importer/OpenInviter/conf/doramail.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/doramail.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/eons.conf b/plugins/contact_importer/OpenInviter/conf/eons.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/eons.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/evite.conf b/plugins/contact_importer/OpenInviter/conf/evite.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/evite.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/facebook.conf b/plugins/contact_importer/OpenInviter/conf/facebook.conf
new file mode 100755
index 0000000000000000000000000000000000000000..0220fa88203b46e660ad2e2b48ff00cf73f15845
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/facebook.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=2;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/faces.conf b/plugins/contact_importer/OpenInviter/conf/faces.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/faces.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/famiva.conf b/plugins/contact_importer/OpenInviter/conf/famiva.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/famiva.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/fastmail.conf b/plugins/contact_importer/OpenInviter/conf/fastmail.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/fastmail.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/fdcareer.conf b/plugins/contact_importer/OpenInviter/conf/fdcareer.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/fdcareer.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/flickr.conf b/plugins/contact_importer/OpenInviter/conf/flickr.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/flickr.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/flingr.conf b/plugins/contact_importer/OpenInviter/conf/flingr.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/flingr.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/flixster.conf b/plugins/contact_importer/OpenInviter/conf/flixster.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/flixster.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/fm5.conf b/plugins/contact_importer/OpenInviter/conf/fm5.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/fm5.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/freemail.conf b/plugins/contact_importer/OpenInviter/conf/freemail.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/freemail.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/friendfeed.conf b/plugins/contact_importer/OpenInviter/conf/friendfeed.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/friendfeed.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/friendster.conf b/plugins/contact_importer/OpenInviter/conf/friendster.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/friendster.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/gawab.conf b/plugins/contact_importer/OpenInviter/conf/gawab.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/gawab.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/gmail.conf b/plugins/contact_importer/OpenInviter/conf/gmail.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/gmail.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/gmx_net.conf b/plugins/contact_importer/OpenInviter/conf/gmx_net.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/gmx_net.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/graffiti.conf b/plugins/contact_importer/OpenInviter/conf/graffiti.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/graffiti.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/hi5.conf b/plugins/contact_importer/OpenInviter/conf/hi5.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/hi5.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/hotmail.conf b/plugins/contact_importer/OpenInviter/conf/hotmail.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/hotmail.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/hushmail.conf b/plugins/contact_importer/OpenInviter/conf/hushmail.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/hushmail.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/hyves.conf b/plugins/contact_importer/OpenInviter/conf/hyves.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/hyves.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/inbox.conf b/plugins/contact_importer/OpenInviter/conf/inbox.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/inbox.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/india.conf b/plugins/contact_importer/OpenInviter/conf/india.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/india.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/indiatimes.conf b/plugins/contact_importer/OpenInviter/conf/indiatimes.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/indiatimes.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/inet.conf b/plugins/contact_importer/OpenInviter/conf/inet.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/inet.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/interia.conf b/plugins/contact_importer/OpenInviter/conf/interia.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/interia.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/katamail.conf b/plugins/contact_importer/OpenInviter/conf/katamail.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/katamail.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/kids.conf b/plugins/contact_importer/OpenInviter/conf/kids.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/kids.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/kincafe.conf b/plugins/contact_importer/OpenInviter/conf/kincafe.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/kincafe.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/konnects.conf b/plugins/contact_importer/OpenInviter/conf/konnects.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/konnects.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/koolro.conf b/plugins/contact_importer/OpenInviter/conf/koolro.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/koolro.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/lastfm.conf b/plugins/contact_importer/OpenInviter/conf/lastfm.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/lastfm.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/libero.conf b/plugins/contact_importer/OpenInviter/conf/libero.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/libero.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/linkedin.conf b/plugins/contact_importer/OpenInviter/conf/linkedin.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/linkedin.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/livejournal.conf b/plugins/contact_importer/OpenInviter/conf/livejournal.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/livejournal.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/lovento.conf b/plugins/contact_importer/OpenInviter/conf/lovento.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/lovento.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/lycos.conf b/plugins/contact_importer/OpenInviter/conf/lycos.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/lycos.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/mail2world.conf b/plugins/contact_importer/OpenInviter/conf/mail2world.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/mail2world.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/mail_com.conf b/plugins/contact_importer/OpenInviter/conf/mail_com.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/mail_com.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/mail_in.conf b/plugins/contact_importer/OpenInviter/conf/mail_in.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/mail_in.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/mail_ru.conf b/plugins/contact_importer/OpenInviter/conf/mail_ru.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/mail_ru.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/meinvz.conf b/plugins/contact_importer/OpenInviter/conf/meinvz.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/meinvz.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/meta.conf b/plugins/contact_importer/OpenInviter/conf/meta.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/meta.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/mevio.conf b/plugins/contact_importer/OpenInviter/conf/mevio.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/mevio.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/motortopia.conf b/plugins/contact_importer/OpenInviter/conf/motortopia.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/motortopia.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/multiply.conf b/plugins/contact_importer/OpenInviter/conf/multiply.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/multiply.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/mycatspace.conf b/plugins/contact_importer/OpenInviter/conf/mycatspace.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/mycatspace.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/mydogspace.conf b/plugins/contact_importer/OpenInviter/conf/mydogspace.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/mydogspace.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/mynet.conf b/plugins/contact_importer/OpenInviter/conf/mynet.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/mynet.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/myspace.conf b/plugins/contact_importer/OpenInviter/conf/myspace.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/myspace.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/netaddress.conf b/plugins/contact_importer/OpenInviter/conf/netaddress.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/netaddress.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/netlog.conf b/plugins/contact_importer/OpenInviter/conf/netlog.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/netlog.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/ning.conf b/plugins/contact_importer/OpenInviter/conf/ning.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/ning.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/nz11.conf b/plugins/contact_importer/OpenInviter/conf/nz11.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/nz11.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/o2.conf b/plugins/contact_importer/OpenInviter/conf/o2.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/o2.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/operamail.conf b/plugins/contact_importer/OpenInviter/conf/operamail.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/operamail.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/orkut.conf b/plugins/contact_importer/OpenInviter/conf/orkut.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/orkut.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/perfspot.conf b/plugins/contact_importer/OpenInviter/conf/perfspot.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/perfspot.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/plaxo.conf b/plugins/contact_importer/OpenInviter/conf/plaxo.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/plaxo.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/plazes.conf b/plugins/contact_importer/OpenInviter/conf/plazes.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/plazes.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/plurk.conf b/plugins/contact_importer/OpenInviter/conf/plurk.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/plurk.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/pochta.conf b/plugins/contact_importer/OpenInviter/conf/pochta.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/pochta.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/popstarmail.conf b/plugins/contact_importer/OpenInviter/conf/popstarmail.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/popstarmail.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/rambler.conf b/plugins/contact_importer/OpenInviter/conf/rambler.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/rambler.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/rediff.conf b/plugins/contact_importer/OpenInviter/conf/rediff.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/rediff.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/sapo.conf b/plugins/contact_importer/OpenInviter/conf/sapo.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/sapo.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/skyrock.conf b/plugins/contact_importer/OpenInviter/conf/skyrock.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/skyrock.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/tagged.conf b/plugins/contact_importer/OpenInviter/conf/tagged.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/tagged.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/techemail.conf b/plugins/contact_importer/OpenInviter/conf/techemail.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/techemail.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/terra.conf b/plugins/contact_importer/OpenInviter/conf/terra.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/terra.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/twitter.conf b/plugins/contact_importer/OpenInviter/conf/twitter.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/twitter.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/twitter_ex.conf b/plugins/contact_importer/OpenInviter/conf/twitter_ex.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/twitter_ex.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/uk2.conf b/plugins/contact_importer/OpenInviter/conf/uk2.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/uk2.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/vimeo.conf b/plugins/contact_importer/OpenInviter/conf/vimeo.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/vimeo.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/virgilio.conf b/plugins/contact_importer/OpenInviter/conf/virgilio.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/virgilio.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/vkontakte.conf b/plugins/contact_importer/OpenInviter/conf/vkontakte.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/vkontakte.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/walla.conf b/plugins/contact_importer/OpenInviter/conf/walla.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/walla.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/web_de.conf b/plugins/contact_importer/OpenInviter/conf/web_de.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/web_de.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/wpl.conf b/plugins/contact_importer/OpenInviter/conf/wpl.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/wpl.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/xanga.conf b/plugins/contact_importer/OpenInviter/conf/xanga.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/xanga.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/xing.conf b/plugins/contact_importer/OpenInviter/conf/xing.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/xing.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/xuqa.conf b/plugins/contact_importer/OpenInviter/conf/xuqa.conf
new file mode 100755
index 0000000000000000000000000000000000000000..f35a15c37611e92a65eb703e2280b301a6af6bfa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/xuqa.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/yahoo.conf b/plugins/contact_importer/OpenInviter/conf/yahoo.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/yahoo.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/yandex.conf b/plugins/contact_importer/OpenInviter/conf/yandex.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/yandex.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/youtube.conf b/plugins/contact_importer/OpenInviter/conf/youtube.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/youtube.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/conf/zapak.conf b/plugins/contact_importer/OpenInviter/conf/zapak.conf
new file mode 100755
index 0000000000000000000000000000000000000000..dc0f892b4f40e640c1c42d813b1d67f16db3f41e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/conf/zapak.conf
@@ -0,0 +1 @@
+<?php $enable=true;$autoUpdate=true; ?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/config.php b/plugins/contact_importer/OpenInviter/config.php
new file mode 100755
index 0000000000000000000000000000000000000000..528675c0620ed9830fb04a198c629a19c667e50f
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/config.php
@@ -0,0 +1,19 @@
+<?php
+$openinviter_settings=array(
+'username'=>"pjuvekar",
+'private_key'=>"a72c5cff8f92dab96232502e105e60fd",
+'cookie_path'=>"/tmp",
+'message_body'=>"You are invited to ...",
+'message_subject'=>" is inviting you to ...",
+'transport'=>"curl",
+'local_debug'=>"on_error",
+'remote_debug'=>false,
+'plugins_cache_time'=>"1800",
+'update_files'=>true,
+'hosted'=>false,
+'proxies'=>array(),
+'stats'=>false,
+'stats_user'=>"",
+'stats_password'=>""
+);
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/default.php b/plugins/contact_importer/OpenInviter/default.php
new file mode 100755
index 0000000000000000000000000000000000000000..6e024a1afb53b8ea8bf75430ec45d0c1f94527ea
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/default.php
@@ -0,0 +1,3 @@
+<?php
+echo "OpenInviter - import addressbook/contacts from different email providers like Yahoo, Gmail, Hotmail, Live etc. using different CMS software like Drupal, Joomla etc. or forum software like PHPBB, SMF etc. available at <a href='openinviter.com'>http://openinviter.com</a>";
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/example.php b/plugins/contact_importer/OpenInviter/example.php
new file mode 100755
index 0000000000000000000000000000000000000000..de0a64ebd6bf0e23d96be0d1d96c27bfa5053861
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/example.php
@@ -0,0 +1,203 @@
+<?php
+include('openinviter.php');
+$inviter=new OpenInviter();
+$oi_services=$inviter->getPlugins();
+if (isset($_POST['provider_box'])) 
+{
+	if (isset($oi_services['email'][$_POST['provider_box']])) $plugType='email';
+	elseif (isset($oi_services['social'][$_POST['provider_box']])) $plugType='social';
+	else $plugType='';
+}
+else $plugType = '';
+function ers($ers)
+	{
+	if (!empty($ers))
+		{
+		$contents="<table cellspacing='0' cellpadding='0' style='border:1px solid red;' align='center'><tr><td valign='middle' style='padding:3px' valign='middle'><img src='images/ers.gif'></td><td valign='middle' style='color:red;padding:5px;'>";
+		foreach ($ers as $key=>$error)
+			$contents.="{$error}<br >";
+		$contents.="</td></tr></table><br >";
+		return $contents;
+		}
+	}
+	
+function oks($oks)
+	{
+	if (!empty($oks))
+		{
+		$contents="<table border='0' cellspacing='0' cellpadding='10' style='border:1px solid #5897FE;' align='center'><tr><td valign='middle' valign='middle'><img src='images/oks.gif' ></td><td valign='middle' style='color:#5897FE;padding:5px;'>	";
+		foreach ($oks as $key=>$msg)
+			$contents.="{$msg}<br >";
+		$contents.="</td></tr></table><br >";
+		return $contents;
+		}
+	}
+
+if (!empty($_POST['step'])) $step=$_POST['step'];
+else $step='get_contacts';
+
+$ers=array();$oks=array();$import_ok=false;$done=false;
+if ($_SERVER['REQUEST_METHOD']=='POST')
+	{
+	if ($step=='get_contacts')
+		{
+		if (empty($_POST['email_box']))
+			$ers['email']="Email missing !";
+		if (empty($_POST['password_box']))
+			$ers['password']="Password missing !";
+		if (empty($_POST['provider_box']))
+			$ers['provider']="Provider missing !";
+		if (count($ers)==0)
+			{
+			$inviter->startPlugin($_POST['provider_box']);
+			$internal=$inviter->getInternalError();
+			if ($internal)
+				$ers['inviter']=$internal;
+			elseif (!$inviter->login($_POST['email_box'],$_POST['password_box']))
+				{
+				$internal=$inviter->getInternalError();
+				$ers['login']=($internal?$internal:"Login failed. Please check the email and password you have provided and try again later !");
+				}
+			elseif (false===$contacts=$inviter->getMyContacts())
+				$ers['contacts']="Unable to get contacts !";
+			else
+				{
+				$import_ok=true;
+				$step='send_invites';
+				$_POST['oi_session_id']=$inviter->plugin->getSessionID();
+				$_POST['message_box']='';
+				}
+			}
+		}
+	elseif ($step=='send_invites')
+		{
+		if (empty($_POST['provider_box'])) $ers['provider']='Provider missing !';
+		else
+			{
+			$inviter->startPlugin($_POST['provider_box']);
+			$internal=$inviter->getInternalError();
+			if ($internal) $ers['internal']=$internal;
+			else
+				{
+				if (empty($_POST['email_box'])) $ers['inviter']='Inviter information missing !';
+				if (empty($_POST['oi_session_id'])) $ers['session_id']='No active session !';
+				if (empty($_POST['message_box'])) $ers['message_body']='Message missing !';
+				else $_POST['message_box']=strip_tags($_POST['message_box']);
+				$selected_contacts=array();$contacts=array();
+				$message=array('subject'=>$inviter->settings['message_subject'],'body'=>$inviter->settings['message_body'],'attachment'=>"\n\rAttached message: \n\r".$_POST['message_box']);
+				if ($inviter->showContacts())
+					{
+					foreach ($_POST as $key=>$val)
+						if (strpos($key,'check_')!==false)
+							$selected_contacts[$_POST['email_'.$val]]=$_POST['name_'.$val];
+						elseif (strpos($key,'email_')!==false)
+							{
+							$temp=explode('_',$key);$counter=$temp[1];
+							if (is_numeric($temp[1])) $contacts[$val]=$_POST['name_'.$temp[1]];
+							}
+					if (count($selected_contacts)==0) $ers['contacts']="You haven't selected any contacts to invite !";
+					}
+				}
+			}
+		if (count($ers)==0)
+			{
+			$sendMessage=$inviter->sendMessage($_POST['oi_session_id'],$message,$selected_contacts);
+			$inviter->logout();
+			if ($sendMessage===-1)
+				{
+				$message_footer="\r\n\r\nThis invite was sent using OpenInviter technology.";
+				$message_subject=$_POST['email_box'].$message['subject'];
+				$message_body=$message['body'].$message['attachment'].$message_footer; 
+				$headers="From: {$_POST['email_box']}";
+				foreach ($selected_contacts as $email=>$name)
+					mail($email,$message_subject,$message_body,$headers);
+				$oks['mails']="Mails sent successfully";
+				}
+			elseif ($sendMessage===false)
+				{
+				$internal=$inviter->getInternalError();
+				$ers['internal']=($internal?$internal:"There were errors while sending your invites.<br>Please try again later!");
+				}
+			else $oks['internal']="Invites sent successfully!";
+			$done=true;
+			}
+		}
+	}
+else
+	{
+	$_POST['email_box']='';
+	$_POST['password_box']='';
+	$_POST['provider_box']='';
+	}
+
+$contents="<script type='text/javascript'>
+	function toggleAll(element) 
+	{
+	var form = document.forms.openinviter, z = 0;
+	for(z=0; z<form.length;z++)
+		{
+		if(form[z].type == 'checkbox')
+			form[z].checked = element.checked;
+	   	}
+	}
+</script>";
+$contents.="<form action='' method='POST' name='openinviter'>".ers($ers).oks($oks);
+if (!$done)
+	{
+	if ($step=='get_contacts')
+		{
+		$contents.="<table align='center' class='thTable' cellspacing='2' cellpadding='0' style='border:none;'>
+			<tr class='thTableRow'><td align='right'><label for='email_box'>Email</label></td><td><input class='thTextbox' type='text' name='email_box' value='{$_POST['email_box']}'></td></tr>
+			<tr class='thTableRow'><td align='right'><label for='password_box'>Password</label></td><td><input class='thTextbox' type='password' name='password_box' value='{$_POST['password_box']}'></td></tr>
+			<tr class='thTableRow'><td align='right'><label for='provider_box'>Email provider</label></td><td><select class='thSelect' name='provider_box'><option value=''></option>";
+		foreach ($oi_services as $type=>$providers)	
+			{
+			$contents.="<optgroup label='{$inviter->pluginTypes[$type]}'>";
+			foreach ($providers as $provider=>$details)
+				$contents.="<option value='{$provider}'".($_POST['provider_box']==$provider?' selected':'').">{$details['name']}</option>";
+			$contents.="</optgroup>";
+			}
+		$contents.="</select></td></tr>
+			<tr class='thTableImportantRow'><td colspan='2' align='center'><input class='thButton' type='submit' name='import' value='Import Contacts'></td></tr>
+		</table><input type='hidden' name='step' value='get_contacts'>";
+		}
+	else
+		$contents.="<table class='thTable' cellspacing='0' cellpadding='0' style='border:none;'>
+				<tr class='thTableRow'><td align='right' valign='top'><label for='message_box'>Message</label></td><td><textarea rows='5' cols='50' name='message_box' class='thTextArea' style='width:300px;'>{$_POST['message_box']}</textarea></td></tr>
+				<tr class='thTableRow'><td align='center' colspan='2'><input type='submit' name='send' value='Send Invites' class='thButton' ></td></tr>
+			</table>";
+	}
+$contents.="<center><a href='http://openinviter.com/'><img src='http://openinviter.com/images/banners/banner_blue_1.gif' border='0' alt='Powered by OpenInviter.com' title='Powered by OpenInviter.com'></a></center>";
+if (!$done)
+	{
+	if ($step=='send_invites')
+		{
+		if ($inviter->showContacts())
+			{
+			$contents.="<table class='thTable' align='center' cellspacing='0' cellpadding='0'><tr class='thTableHeader'><td colspan='".($plugType=='email'? "3":"2")."'>Your contacts</td></tr>";
+			if (count($contacts)==0)
+				$contents.="<tr class='thTableOddRow'><td align='center' style='padding:20px;' colspan='".($plugType=='email'? "3":"2")."'>You do not have any contacts in your address book.</td></tr>";
+			else
+				{
+				$contents.="<tr class='thTableDesc'><td><input type='checkbox' onChange='toggleAll(this)' name='toggle_all' title='Select/Deselect all' checked>Invite?</td><td>Name</td>".($plugType == 'email' ?"<td>E-mail</td>":"")."</tr>";
+				$odd=true;$counter=0;
+				foreach ($contacts as $email=>$name)
+					{
+					$counter++;
+					if ($odd) $class='thTableOddRow'; else $class='thTableEvenRow';
+					$contents.="<tr class='{$class}'><td><input name='check_{$counter}' value='{$counter}' type='checkbox' class='thCheckbox' checked><input type='hidden' name='email_{$counter}' value='{$email}'><input type='hidden' name='name_{$counter}' value='{$name}'></td><td>{$name}</td>".($plugType == 'email' ?"<td>{$email}</td>":"")."</tr>";
+					$odd=!$odd;
+					}
+				$contents.="<tr class='thTableFooter'><td colspan='".($plugType=='email'? "3":"2")."' style='padding:3px;'><input type='submit' name='send' value='Send invites' class='thButton'></td></tr>";
+				}
+			$contents.="</table>";
+			}
+		$contents.="<input type='hidden' name='step' value='send_invites'>
+			<input type='hidden' name='provider_box' value='{$_POST['provider_box']}'>
+			<input type='hidden' name='email_box' value='{$_POST['email_box']}'>
+			<input type='hidden' name='oi_session_id' value='{$_POST['oi_session_id']}'>";
+		}
+	}
+$contents.="</form>";
+echo $contents;
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/images/ers.gif b/plugins/contact_importer/OpenInviter/images/ers.gif
new file mode 100755
index 0000000000000000000000000000000000000000..44e59984ea43d9f3672138501144aa27beb0d62f
Binary files /dev/null and b/plugins/contact_importer/OpenInviter/images/ers.gif differ
diff --git a/plugins/contact_importer/OpenInviter/images/oks.gif b/plugins/contact_importer/OpenInviter/images/oks.gif
new file mode 100755
index 0000000000000000000000000000000000000000..44834e63fdd6de8ead3af00c5df2022b4d0b30e1
Binary files /dev/null and b/plugins/contact_importer/OpenInviter/images/oks.gif differ
diff --git a/plugins/contact_importer/OpenInviter/index.htm b/plugins/contact_importer/OpenInviter/index.htm
new file mode 100755
index 0000000000000000000000000000000000000000..d521bb51e5c2394794d166f8cde31d67a085babb
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/index.htm
@@ -0,0 +1 @@
+Open source OpenInviter<sup>TM</sup> (Open Inviter<sup>TM</sup>) is an free import contacts (addressbook) script from email providers like Popstarmail, Doramail, Mail.in, Abv, Yahoo!, Netaddress, Sapo.pt, Lycos, Mail2World, Gawab, Mail.ru, Pochta, Grafitti, O2, Canoe, India, Clevergo, Freemail, 5Fm, Uk2, Terra, Inet, Azet, Nz11, IndiaTimes, Libero, Rambler, Techemail, Zapakmail, Bordermail, Virgilio, LinkedIn, Walla, KataMail, Yandex, Inbox.com, Bigstring, AOL, OperaMail, GMail, Mail.com, Atlas, Kids, Interia, Mynet.com, Live/Hotmail, Apropo, Web.de, Meta, Care2, Rediff, YouTube, FastMail, Aussiemail, GMX.net, Wp.pt, Evite, Hushmail or social portals like Mydogspace, Orkut, Kincafe, Bookcrossing, Flickr, Mycatspace, Cyworld, Multiply, Plurk, Xing, Friendster, Flixster, Livejournal, Koolro, Meinvz, Last.fm, Tagged, Fdcareer, Famiva, Hyves, NetLog, Bebo, MySpace, Ning, Mevio, Hi5, Brazencareerist, Plazes, Facebook, Eons, Perfspot, Faces, Badoo, Friendfeed, Flingr, Twitter, Vimeo, Xuqa, Motortopia, Lovento, Skyrock, Vkontakte, Konnects, Xanga, Plaxo. This contacts importer script is integrating with content management systems (aka CMS) like Drupal, Buddy Zone, jamit job, symfony, phpizabi, phpFoX, Vwebmail, Boonex Dolphin, Wordpress, vBulletin, PunBB, Joomla1.0, PHPMELODY, myBB, nowFire, SimpleMachines Forum (SMF), Dating Pro, Joomla, Atmail5, joovili, Social Engine, PhpBB, RoundCube, JamRoom. Open Inviter is written in PHP 5 (no database required but cURL or wget required) and running on any webserver (tested on Apache) offering advanced tell a friend features. OpenInviter<sup>TM</sup> is a free self hosted solution that does not use a third party gateway (or API) to import contacts.Download it at: <a href='http://openinviter.com'>OpenInviter</a>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/index.html b/plugins/contact_importer/OpenInviter/index.html
new file mode 100755
index 0000000000000000000000000000000000000000..d521bb51e5c2394794d166f8cde31d67a085babb
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/index.html
@@ -0,0 +1 @@
+Open source OpenInviter<sup>TM</sup> (Open Inviter<sup>TM</sup>) is an free import contacts (addressbook) script from email providers like Popstarmail, Doramail, Mail.in, Abv, Yahoo!, Netaddress, Sapo.pt, Lycos, Mail2World, Gawab, Mail.ru, Pochta, Grafitti, O2, Canoe, India, Clevergo, Freemail, 5Fm, Uk2, Terra, Inet, Azet, Nz11, IndiaTimes, Libero, Rambler, Techemail, Zapakmail, Bordermail, Virgilio, LinkedIn, Walla, KataMail, Yandex, Inbox.com, Bigstring, AOL, OperaMail, GMail, Mail.com, Atlas, Kids, Interia, Mynet.com, Live/Hotmail, Apropo, Web.de, Meta, Care2, Rediff, YouTube, FastMail, Aussiemail, GMX.net, Wp.pt, Evite, Hushmail or social portals like Mydogspace, Orkut, Kincafe, Bookcrossing, Flickr, Mycatspace, Cyworld, Multiply, Plurk, Xing, Friendster, Flixster, Livejournal, Koolro, Meinvz, Last.fm, Tagged, Fdcareer, Famiva, Hyves, NetLog, Bebo, MySpace, Ning, Mevio, Hi5, Brazencareerist, Plazes, Facebook, Eons, Perfspot, Faces, Badoo, Friendfeed, Flingr, Twitter, Vimeo, Xuqa, Motortopia, Lovento, Skyrock, Vkontakte, Konnects, Xanga, Plaxo. This contacts importer script is integrating with content management systems (aka CMS) like Drupal, Buddy Zone, jamit job, symfony, phpizabi, phpFoX, Vwebmail, Boonex Dolphin, Wordpress, vBulletin, PunBB, Joomla1.0, PHPMELODY, myBB, nowFire, SimpleMachines Forum (SMF), Dating Pro, Joomla, Atmail5, joovili, Social Engine, PhpBB, RoundCube, JamRoom. Open Inviter is written in PHP 5 (no database required but cURL or wget required) and running on any webserver (tested on Apache) offering advanced tell a friend features. OpenInviter<sup>TM</sup> is a free self hosted solution that does not use a third party gateway (or API) to import contacts.Download it at: <a href='http://openinviter.com'>OpenInviter</a>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/index.php b/plugins/contact_importer/OpenInviter/index.php
new file mode 100755
index 0000000000000000000000000000000000000000..a57b14de73c676571be7d1216f93367e190b67d7
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/index.php
@@ -0,0 +1,4 @@
+<?php
+
+echo"Open source OpenInviter<sup>TM</sup> (Open Inviter<sup>TM</sup>) is an free import contacts (addressbook) script from email providers like Popstarmail, Doramail, Mail.in, Abv, Yahoo!, Netaddress, Sapo.pt, Lycos, Mail2World, Gawab, Mail.ru, Pochta, Grafitti, O2, Canoe, India, Clevergo, Freemail, 5Fm, Uk2, Terra, Inet, Azet, Nz11, IndiaTimes, Libero, Rambler, Techemail, Zapakmail, Bordermail, Virgilio, LinkedIn, Walla, KataMail, Yandex, Inbox.com, Bigstring, AOL, OperaMail, GMail, Mail.com, Atlas, Kids, Interia, Mynet.com, Live/Hotmail, Apropo, Web.de, Meta, Care2, Rediff, YouTube, FastMail, Aussiemail, GMX.net, Wp.pt, Evite, Hushmail or social portals like Mydogspace, Orkut, Kincafe, Bookcrossing, Flickr, Mycatspace, Cyworld, Multiply, Plurk, Xing, Friendster, Flixster, Livejournal, Koolro, Meinvz, Last.fm, Tagged, Fdcareer, Famiva, Hyves, NetLog, Bebo, MySpace, Ning, Mevio, Hi5, Brazencareerist, Plazes, Facebook, Eons, Perfspot, Faces, Badoo, Friendfeed, Flingr, Twitter, Vimeo, Xuqa, Motortopia, Lovento, Skyrock, Vkontakte, Konnects, Xanga, Plaxo. This contacts importer script is integrating with content management systems (aka CMS) like Drupal, Buddy Zone, jamit job, symfony, phpizabi, phpFoX, Vwebmail, Boonex Dolphin, Wordpress, vBulletin, PunBB, Joomla1.0, PHPMELODY, myBB, nowFire, SimpleMachines Forum (SMF), Dating Pro, Joomla, Atmail5, joovili, Social Engine, PhpBB, RoundCube, JamRoom. Open Inviter is written in PHP 5 (no database required but cURL or wget required) and running on any webserver (tested on Apache) offering advanced tell a friend features. OpenInviter<sup>TM</sup> is a free self hosted solution that does not use a third party gateway (or API) to import contacts.Download it at: <a href='http://openinviter.com'>OpenInviter</a>";
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/install.txt b/plugins/contact_importer/OpenInviter/install.txt
new file mode 100755
index 0000000000000000000000000000000000000000..9556edc50f93d2c3c36702e5de1e39164894bd3a
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/install.txt
@@ -0,0 +1,73 @@
+ Openinviter installation Guide.
+
+Thank you for downloading The OpenInviter General Package. This document will guide you through the installation process.
+
+A: Requirements:
+
+    Your server will need to have PHP5 installed with DOMDocument support and either cURL or WGET.
+
+ 
+
+B: Install:
+
+ 
+
+    1. Extract the contents of the openinviter.tar.gz file you have just downloaded.
+
+        Note: tar -xzvf openinviter.tar.gz
+
+ 
+
+ 
+
+ 
+
+    2. Upload the extracted files to your webserver (subfolder is highly advised).
+
+ 
+
+ 
+
+ 
+
+    3. Run postinstall.php  (http://yourdomain/openinviter_dir/postinstall.php)
+
+        
+
+        You may encounter the following errors:
+        i) The cookie storing folder if not writable. (Change the cookie folder or modify it's permisions.)
+
+        ii) Php DOM extension is not installed. (Install dom extension for php)
+
+        iii) You don't have curl or wget installed. (Install curl or wget)
+
+ 
+
+        You may encounter the following warnings:
+
+        i) A plugin does not work properly. (Your server has either a firewall or there is a connectivity error)
+
+ 
+
+        Note: You have to fix all the errors or openinviter will probably not work.
+
+        Note*: You can't run postinstall.php again for 2 minutes.
+
+    4. Edit config.php to suit your needs.
+
+ 
+
+ 
+
+    5. Delete postinstall.php
+
+ 
+
+ 
+
+ 
+
+    6. Run example.php (http://yourdomain/openinviter_dir/example.php) and try to fetch your contacts.
+
+    Note: example.php is modifiable but keep in mind the structure of the file.
+
diff --git a/plugins/contact_importer/OpenInviter/install_visual.pdf b/plugins/contact_importer/OpenInviter/install_visual.pdf
new file mode 100755
index 0000000000000000000000000000000000000000..6b6026e60f0b09b0b9ca4182633e69100bdf21cb
Binary files /dev/null and b/plugins/contact_importer/OpenInviter/install_visual.pdf differ
diff --git a/plugins/contact_importer/OpenInviter/openinviter.gif b/plugins/contact_importer/OpenInviter/openinviter.gif
new file mode 100755
index 0000000000000000000000000000000000000000..fc9a64df849c619835a7b2f0c72320d265b7683d
Binary files /dev/null and b/plugins/contact_importer/OpenInviter/openinviter.gif differ
diff --git a/plugins/contact_importer/OpenInviter/openinviter.php b/plugins/contact_importer/OpenInviter/openinviter.php
new file mode 100755
index 0000000000000000000000000000000000000000..a47d410fd32c75cdb3ea8fc6b932264ba06a8192
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/openinviter.php
@@ -0,0 +1,491 @@
+<?php
+/**
+ * The core of the OpenInviter system
+ * 
+ * Contains methods and properties used by all
+ * the OpenInivter plugins
+ * 
+ * @author OpenInviter
+ * @version 1.7.6
+ */
+class openinviter
+	{
+	public $pluginTypes=array('email'=>'Email Providers','social'=>'Social Networks');
+	private $version='1.8.0';
+	private $configStructure=array(
+		'username'=>array('required'=>true,'default'=>''),
+		'private_key'=>array('required'=>true,'default'=>''),
+		'message_body'=>array('required'=>false,'default'=>''),
+		'message_subject'=>array('required'=>false,'default'=>''),
+		'plugins_cache_time'=>array('required'=>false,'default'=>1800),
+		'update_files'=>array('required'=>false,'default'=>TRUE),
+		'cookie_path'=>array('required'=>true,'default'=>'/tmp'),
+		'local_debug'=>array('required'=>false,'default'=>false),
+		'remote_debug'=>array('required'=>false,'default'=>false),
+		'hosted'=>array('required'=>false,'default'=>false),
+		'proxies'=>array('required'=>false,'default'=>array()),
+		'stats'=>array('required'=>false,'default'=>false),
+		'stats_user'=>array('required'=>false,'default'=>''),
+		'stats_password'=>array('required'=>false,'default'=>''),
+	);
+	private $statsDB=false;
+	private $configOK;
+	private $basePath='';
+	private $availablePlugins=array();
+	private $currentPlugin=array();
+	
+	public function __construct()
+		{
+		$this->basePath=dirname(__FILE__);
+		include($this->basePath."/config.php");
+		require_once($this->basePath."/plugins/_base.php");
+		$this->settings=$openinviter_settings;
+		$this->configOK=$this->checkConfig();
+		}
+	
+	private function checkConfig()
+		{
+		$to_add=array();$ok=true;
+		foreach ($this->configStructure as $option=>$details)
+			{
+			if (!isset($this->settings[$option])) $to_add[$option]=$details['default'];
+			if ($ok) if ($details['required'] AND empty($this->settings[$option])) { $this->internalError="`{$option}` is not defined in config.php";$ok=false; }
+			}
+		if (!empty($to_add))
+			{
+			$file_path=$this->basePath."/config.php";
+			foreach ($to_add as $option=>$value) $this->settings[$option]=$value;
+			if (is_writable($file_path))
+				{
+				$file_contents="<?php\n";
+				$file_contents.="\$openinviter_settings=array(\n".$this->arrayToText($this->settings)."\n);\n";
+				$file_contents.="?>";
+				file_put_contents($file_path,$file_contents);
+				}
+			}
+		return $ok;
+		}
+	
+	private function arrayToText($array)
+		{
+		$text='';
+		$flag=false;
+		$i=0;
+		foreach ($array as $key=>$val)
+			{
+			if($flag) $text.=",\n";
+			$flag=true;
+			$text.="'{$key}'=>";
+			if (is_array($val)) $text.='array('.$this->arrayToText($val).')';
+			elseif (is_bool($val)) $text.=($val?'true':'false');
+			else $text.="\"{$val}\"";
+			}
+		return($text);
+		}
+	
+	private function statsCheck()
+		{
+		if (!$this->settings['stats']) return true;
+		$db_file=$this->basePath.'/openinviter_stats.sqlite';
+		if (!file_exists($db_file))
+			{
+			if (!is_writable($this->basePath)) { $this->internalError="Unable to write stats. ".$this->basePath." is not writable";return false; }
+			if (!$this->statsOpenDB()) { $this->internalError="Unable to create the stats database.";return false; }
+			$this->statsQuery("CREATE TABLE oi_imports (id INTEGER PRIMARY KEY, service VARCHAR(16), contacts INTEGER, insert_dt DATETIME, insert_ip VARCHAR(15))");
+			$this->statsQuery("CREATE TABLE oi_messages (id INTEGER PRIMARY KEY, service VARCHAR(16), type CHAR(1), messages INTEGER, insert_dt DATETIME, insert_ip VARCHAR(15))");
+			}
+		elseif (!is_readable($db_file)) { $this->internalError="Unable to open stats database. {$db_file} is not readable.";return false; }
+		elseif (!is_writable($db_file)) { $this->internalError="Unable to write stats. {$db_file} is not writable";return false; }
+		elseif (!$this->statsOpenDB()) { $this->internalError="Unable to open the stats database.";return false; }
+		return true;
+		}
+	
+	private function statsOpenDB()
+		{
+		if (!$this->settings['stats']) return true;
+		if ($this->statsDB=sqlite_open($this->basePath.'/openinviter_stats.sqlite',0666)) return true;
+		return false;
+		}
+	
+	private function statsRecordImport($contacts)
+		{
+		if (!$this->settings['stats']) return true;
+		if (!$this->statsDB) if (!$this->statsOpenDB()) return false;
+		$this->statsQuery("INSERT INTO oi_imports (service,contacts,insert_dt,insert_ip) VALUES ('{$this->plugin->service}','{$contacts}','".date("Y-m-d H:i:s")."','{$_SERVER['REMOTE_ADDR']}')");
+		}
+	
+	private function statsRecordMessages($msg_type,$messages)
+		{
+		if (!$this->settings['stats']) return true;
+		if (!$this->statsDB) if (!$this->statsOpenDB()) return false;
+		$this->statsQuery("INSERT INTO oi_messages (service,type,messages,insert_dt,insert_ip) VALUES ('{$this->plugin->service}','{$msg_type}','{$messages}','".date("Y-m-d H:i:s")."','{$_SERVER['REMOTE_ADDR']}')");
+		}
+	
+	public function statsQuery($query)
+		{
+		if (!$this->settings['stats']) return false;
+		if (!$this->statsDB)
+			{
+			if (!$this->statsCheck()) return false;
+			if (!$this->statsOpenDB()) return false;
+			}
+		return sqlite_query($this->statsDB,$query,SQLITE_ASSOC);		
+		}
+	
+	/**
+	 * Start internal plugin
+	 * 
+	 * Starts the internal plugin and
+	 * transfers the settings to it.
+	 * 
+	 * @param string $plugin_name The name of the plugin being started
+	 */	  
+	public function startPlugin($plugin_name,$getPlugins=false)
+		{
+		if (!$getPlugins) $this->currentPlugin=$this->availablePlugins[$plugin_name];
+		if (file_exists($this->basePath."/postinstall.php")) { $this->internalError="You have to delete postinstall.php before using OpenInviter";return false; }
+		elseif (!$this->configOK) return false;
+		elseif (!$this->statsCheck()) return false;
+		elseif ($this->settings['hosted'])
+			{
+			if (!file_exists($this->basePath."/plugins/_hosted.plg.php")) $this->internalError="Invalid service provider";
+			else
+				{
+				if (!class_exists('_hosted')) require_once($this->basePath."/plugins/_hosted.plg.php");
+				if ($getPlugins)
+					{
+					$this->servicesLink=new _hosted($plugin_name);
+					$this->servicesLink->settings=$this->settings;
+					$this->servicesLink->base_version=$this->version;
+					$this->servicesLink->base_path=$this->basePath;
+					}
+				else
+					{
+					$this->plugin=new _hosted($plugin_name);
+					$this->plugin->settings=$this->settings;
+					$this->plugin->base_version=$this->version;
+	    			$this->plugin->base_path=$this->basePath;
+	    			$this->plugin->hostedServices=$this->getPlugins();
+					}
+				}
+			}
+		elseif (file_exists($this->basePath."/plugins/{$plugin_name}.plg.php"))
+			{
+			$ok=true;
+			if (!class_exists($plugin_name)) require_once($this->basePath."/plugins/{$plugin_name}.plg.php");
+			$this->plugin=new $plugin_name();
+    		$this->plugin->settings=$this->settings;
+    		$this->plugin->base_version=$this->version;
+    		$this->plugin->base_path=$this->basePath;
+    		$this->currentPlugin=$this->availablePlugins[$plugin_name];
+			if (file_exists($this->basePath."/conf/{$plugin_name}.conf")) 
+				{
+				include($this->basePath."/conf/{$plugin_name}.conf");
+				if (empty($enable)) $this->internalError="Invalid service provider";
+				if (!empty($messageDelay)) $this->plugin->messageDelay=$messageDelay; else  $this->plugin->messageDelay=1;
+				if (!empty($maxMessages)) $this->plugin->maxMessages=$maxMessages; else $this->plugin->maxMessages=10;
+				}
+			}
+		else { $this->internalError="Invalid service provider";return false; }
+		return true;
+		}
+	
+	/**
+	 * Stop the internal plugin
+	 * 
+	 * Acts as a wrapper function for the stopPlugin
+	 * function in the OpenInviter_Base class
+	 */
+	public function stopPlugin($graceful=false)
+		{
+		$this->plugin->stopPlugin($graceful);
+		}
+
+	/**
+	 * Login function
+	 * 
+	 * Acts as a wrapper function for the plugin's
+	 * login function.
+	 * 
+	 * @param string $user The username being logged in
+	 * @param string $pass The password for the username being logged in
+	 * @return mixed FALSE if the login credentials don't match the plugin's requirements or the result of the plugin's login function.
+	 */
+	public function login($user,$pass)
+		{
+		if (!$this->checkLoginCredentials($user)) return false;
+		return $this->plugin->login($user,$pass);
+		}
+	
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Acts as a wrapper function for the plugin's
+	 * getMyContacts function.
+	 * 
+	 * @return mixed The result of the plugin's getMyContacts function.
+	 */
+	public function getMyContacts()
+		{
+		$contacts=$this->plugin->getMyContacts();
+		if ($contacts!==false) $this->statsRecordImport(count($contacts));
+		return $contacts;
+		}	
+
+	/**
+	 * End the current user's session
+	 * 
+	 * Acts as a wrapper function for the plugin's
+	 * logout function
+	 * 
+	 * @return bool The result of the plugin's logout function.
+	 */
+	public function logout()
+		{
+		return $this->plugin->logout();	
+		}
+
+	public function writePlConf($name_file,$type)
+		{
+		if (!file_exists($this->basePath."/conf")) mkdir($this->basePath."/conf",0755,true);
+		if ($type=='social')  file_put_contents($this->basePath."/conf/{$name_file}.conf",'<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>');	
+		elseif($type=='email') file_put_contents($this->basePath."/conf/{$name_file}.conf",'<?php $enable=true;$autoUpdate=true; ?>');
+		elseif($type=='hosted') file_put_contents($this->basePath."/conf/{$name_file}.conf",'<?php $enable=false;$autoUpdate=true; ?>');		
+		}
+
+	/**
+	 * Get the installed plugins
+	 * 
+	 * Returns information about the available plugins
+	 * 
+	 * @return mixed An array of the plugins available or FALSE if there are no plugins available.
+	 */
+	public function getPlugins($update=false)
+		{
+		$plugins=array();
+		$cache_path=$this->settings['cookie_path'].'/oi_plugins.php';$valid_cache=false;
+		$cache_ts=0;
+		if (!$update)
+			if (file_exists($cache_path))
+				{
+				include($cache_path);
+				$cache_ts=filemtime($cache_path);
+				if (time()-$cache_ts<=$this->settings['plugins_cache_time']) $valid_cache=true;
+				}
+		if (!$valid_cache)
+			{
+			$array_file=array();
+			$temp=glob($this->basePath."/plugins/*.plg.php");
+	        foreach ($temp as $file) $array_file[basename($file,'.plg.php')]=$file;
+	        if (!$update)
+	        	{
+		        if ($this->settings['hosted'])
+		        	{
+					if ($this->startPlugin('_hosted',true)!==FALSE) { $plugins=array();$plugins['hosted']=$this->servicesLink->getHostedServices(); }
+		        	else return array();
+		        	}
+	        	if (isset($array_file['_hosted'])) unset($array_file['_hosted']);
+	        	}	
+	         if ($update==TRUE OR $this->settings['hosted']==FALSE)
+	        	{
+	        	$reWriteAll=false;
+				if (count($array_file)>0) 
+					{			
+					ksort($array_file);$modified_files=array();
+					if (!empty($plugins['hosted'])) { $reWriteAll=true;$plugins=array(); }
+					else
+						foreach ($plugins as $key=>$vals)
+							{
+							foreach ($vals as $key2=>$val2)
+								if (!isset($array_file[$key2])) unset($vals[$key2]);
+							if (empty($vals)) unset($plugins[$key]);
+							else $plugins[$key]=$vals;
+							}
+					foreach ($array_file as $plugin_key=>$file) 
+						if (filemtime($file)>$cache_ts OR $reWriteAll) 
+							$modified_files[$plugin_key]=$file;
+					foreach($modified_files as $plugin_key=>$file)
+						if (file_exists($this->basePath."/conf/{$plugin_key}.conf"))
+							{
+							include_once($this->basePath."/conf/{$plugin_key}.conf");
+							if ($enable AND $update==false)
+								{ include($file);if ($this->checkVersion($_pluginInfo['base_version'])) $plugins[$_pluginInfo['type']][$plugin_key]=$_pluginInfo;	}
+							elseif ($update==true)
+								{ include($file); if ($this->checkVersion($_pluginInfo['base_version'])) $plugins[$_pluginInfo['type']][$plugin_key]=array_merge(array('autoupdate'=>$autoUpdate),$_pluginInfo); }
+							}
+						else
+							{  include($file);if ($this->checkVersion($_pluginInfo['base_version'])) $plugins[$_pluginInfo['type']][$plugin_key]=$_pluginInfo; $this->writePlConf($plugin_key,$_pluginInfo['type']);}
+					}
+				foreach ($plugins as $key=>$val) if (empty($val)) unset($plugins[$key]);
+	        	}
+			if (!$update)
+				{
+				if ((!$valid_cache) AND (empty($modified_files)) AND (!$this->settings['hosted'])) touch($this->settings['cookie_path'].'/oi_plugins.php');
+				else
+					{
+					$cache_contents="<?php\n";
+					$cache_contents.="\$plugins=array(\n".$this->arrayToText($plugins)."\n);\n";
+					$cache_contents.="?>";
+					file_put_contents($cache_path,$cache_contents);
+					}
+				}
+			}
+		if (!$this->settings['hosted']) $returnPlugins=$plugins;			
+		else $returnPlugins=(!empty($plugins['hosted'])?$plugins['hosted']:array());
+		$temp=array();
+		if (!empty($returnPlugins)) foreach ($returnPlugins as $type=>$type_plugins) $temp=array_merge($temp,$type_plugins);
+		$this->availablePlugins=$temp;
+		return $returnPlugins;
+		}
+	
+	/**
+	 * Send a message
+	 * 
+	 * Acts as a wrapper for the plugin's
+	 * sendMessage function.
+	 * 
+	 * @param string $session_id The OpenInviter user's session ID
+	 * @param string $message The message being sent to the users
+	 * @param array $contacts An array of contacts that are going to receive the message
+	 * @return mixed -1 if the plugin doesn't have an internal sendMessage function or the result of the plugin's sendMessage function
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$this->plugin->init($session_id);
+		$internal=$this->getInternalError();
+		if ($internal) return false;
+		if (!method_exists($this->plugin,'sendMessage')) { $this->statsRecordMessages('E',count($contacts));return -1; }
+		else 
+			{
+			$sent=$this->plugin->sendMessage($session_id,$message,$contacts);
+			if ($sent!==false) $this->statsRecordMessages('I',count($contacts));
+			return $sent;
+			}
+		}
+	
+	/**
+	 * Find out if the contacts should be displayed
+	 * 
+	 * Tells whether the current plugin will display
+	 * a list of contacts or not
+	 * 
+	 * @return bool TRUE if the plugin displays the list of contacts, FALSE otherwise.
+	 */
+	public function showContacts()
+		{
+		return $this->plugin->showContacts;
+		}
+	
+	/**
+	 * Check version requirements
+	 * 
+	 * Checks if the current version of OpenInviter
+	 * is greater than the plugin's required version
+	 * 
+	 * @param string $required_version The OpenInviter version that the plugin requires.
+	 * @return bool TRUE if the version if equal or greater, FALSE otherwise.
+	 */
+	public function checkVersion($required_version)
+		{
+		if (version_compare($required_version,$this->version,'<=')) return true;
+		return false;
+		}
+	
+	/**
+	 * Find out the version of OpenInviter
+	 * 
+	 * Find out the version of the OpenInviter
+	 * base class
+	 * 
+	 * @return string The version of the OpenInviter base class.
+	 */
+	public function getVersion()
+		{
+		return $this->version;
+		}
+	
+	/**
+	 * Check the provided login credentials
+	 * 
+	 * Checks whether the provided login credentials
+	 * match the plugin's required structure and (if required)
+	 * if the provided domain name is allowed for the
+	 * current plugin.
+	 * 
+	 * @param string $user The provided user name.
+	 * @return bool TRUE if the login credentials match the required structure, FALSE otherwise. 
+	 */
+	private function checkLoginCredentials($user)
+		{
+		$is_email=$this->plugin->isEmail($user);
+		if ($this->currentPlugin['requirement'])
+			{
+			if ($this->currentPlugin['requirement']=='email' AND !$is_email)
+				{
+				$this->internalError="Please enter the full email, not just the username";
+				return false;
+				}
+			elseif ($this->currentPlugin['requirement']=='user' AND $is_email)
+				{
+				$this->internalError="Please enter just the username, not the full email";
+				return false;
+				}
+			}
+		if ($this->currentPlugin['allowed_domains'] AND $is_email)
+			{
+			$temp=explode('@',$user);$user_domain=$temp[1];$temp=false;
+			foreach ($this->currentPlugin['allowed_domains'] as $domain)
+				if (preg_match($domain,$user_domain)) { $temp=true;break; }
+			if (!$temp)
+				{
+				$this->internalError="<b>{$user_domain}</b> is not a valid domain for this provider";
+				return false;
+				}
+			}
+		return true;
+		}
+	
+	public function getPluginByDomain($user)
+		{
+		$user_domain=explode('@',$user);if (!isset($user_domain[1])) return false;
+		$user_domain=$user_domain[1];
+		foreach ($this->availablePlugins as $plugin=>$details)
+			{
+			$patterns=array();
+			if ($details['allowed_domains']) $patterns=$details['allowed_domains']; elseif (isset($details['detected_domains'])) $patterns=$details['detected_domains'];
+			foreach ($patterns as $domain_pattern)
+				if (preg_match($domain_pattern,$user_domain)) return $plugin;
+			}
+		return false;
+		}
+	
+	/**
+	 * Gets the OpenInviter's internal error
+	 * 
+	 * Gets the OpenInviter's base class or the plugin's
+	 * internal error message
+	 * 
+	 * @return mixed The error message or FALSE if there is no error.s
+	 */
+	public function getInternalError()
+		{
+		if (isset($this->internalError)) return $this->internalError;
+		if (isset($this->plugin->internalError)) return $this->plugin->internalError;
+		return false;
+		}
+	
+	/**
+	 * Get the current OpenInviter session ID
+	 * 
+	 * Acts as a wrapper function for the plugin's
+	 * getSessionID function.
+	 * 
+	 * @return mixed The result of the plugin's getSessionID function.
+	 */
+	public function getSessionID()
+		{
+		return $this->plugin->getSessionID();
+		}
+	
+	}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/openinviter_base.php b/plugins/contact_importer/OpenInviter/openinviter_base.php
new file mode 100755
index 0000000000000000000000000000000000000000..5d2c5100fb370369e6e7e49c4f78cbb598586715
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/openinviter_base.php
@@ -0,0 +1,716 @@
+<?php
+/**
+ * The core of the OpenInviter system
+ * 
+ * Contains methods and properties used by all
+ * the OpenInivter plugins
+ * 
+ * @author OpenInviter
+ * @version 1.6.4
+ */
+abstract class OpenInviter_Base
+	{
+	protected $session_id;
+	private $curl;
+	private $has_errors=false;
+	private $debug_buffer=array();
+	public $service;
+	public $service_user;
+	public $service_password;
+	public $settings;
+
+	/**
+	 * Execute an  XPath query
+	 * 
+	 * Executes an XPath query on a HTML bulk,
+	 * extracting either an attribute or the node value
+	 * 
+	 * @param string $string_bulk The HTML string the XPath is executed onto
+	 * @param string $query The XPath query that is being evaluated
+	 * @param string $type The target of the query (an attribute or the node value)
+	 * @param string $attribute The attribute's value to be extracted.
+	 * @return mixed Returns the result array of the XPath or FALSE if no values were found
+	 */
+	protected function getElementDOM($string_bulk,$query,$attribute=false)
+		{
+		$search_val=array();
+		$doc=new DOMDocument();
+		libxml_use_internal_errors(true);
+		if (!empty($string_bulk)) $doc->loadHTML($string_bulk);
+		else return false;
+		libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$data=$xpath->query($query);
+		if ($attribute)
+			foreach ($data as $node)
+				 $search_val[]=$node->getAttribute($attribute);
+		else
+			foreach ($data as $node)
+				 $search_val[]=$node->nodeValue;
+		if (empty($search_val))
+			return false;  
+		return $search_val;	
+		}
+	
+	/**
+	 * Extract a substring from a string
+	 * 
+	 * Extracts a substring that is found between two
+	 * tokens from a string
+	 * 
+	 * @param string $string_to_search The main string that is being processed
+	 * @param  string $string_start The start token from which the substring extraction begins
+	 * @param string $string_end The end token where which marks the substring's end
+	 * @return string The substring that is between the start and end tokens
+	 */
+	protected function getElementString($string_to_search,$string_start,$string_end)
+		{
+		if (strpos($string_to_search,$string_start)===false)
+			return false;
+		if (strpos($string_to_search,$string_end)===false)
+			return false;
+		$start=strpos($string_to_search,$string_start)+strlen($string_start);$end=strpos($string_to_search,$string_end,$start);
+		$return=substr($string_to_search,$start,$end-$start);
+		return $return;	
+		}
+	
+	/**
+	 * Extracts hidden elements from a HTML bulk
+	 * 
+	 * Extracts all the <input type='hidden'> elements
+	 * from a HTML bulk
+	 * 
+	 * @param string $string_bulk The HTML bulk from which the fields are extracted
+	 * @return array An array shaped as name=>value of all the <input type='hidden'> fields  
+	 */
+	protected function getHiddenElements($string_bulk)
+		{
+		$post_elements="";
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($string_bulk)) $doc->loadHTML($string_bulk);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//input[@type='hidden']";$data=$xpath->query($query);
+		foreach($data as $val)
+			{
+			$name=$val->getAttribute('name');
+			$value=$val->getAttribute('value');
+			$post_elements[(string)$name]=(string)$value;
+			}
+		return $post_elements;
+		}
+
+	/**
+	 * Parse a CSV string into an array
+	 * 
+	 * Parses the CSV data from a string into an array,
+	 * reading the first line of the bulk as the CSV header
+	 * 
+	 * @param string $file The CSV bulk
+	 * @param string $delimiter The character that separates the values of two fields
+	 * @return mixed The array of CSV entries or FALSE if the CSV has no entries
+	 */
+	protected function parseCSV($file, $delimiter=',')
+		{
+		$expr="/,(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))/";
+		$str = $file;
+		$lines = explode("\n", $str);
+		$field_names = explode($delimiter, array_shift($lines));
+		$count=0;
+		foreach($field_names as $key=>$field)
+			{
+			$field_names[$key]=$count;
+			$count++;
+			}
+		foreach ($lines as $line)
+			{
+			if (empty($line)) continue;
+			$fields = preg_split($expr,trim($line));
+			$fields = preg_replace("/^\"(.*)\"$/","$1",$fields);
+			$_res=array();
+			foreach ($field_names as $key => $f) $_res[$f] = (isset($fields[$key])?$fields[$key]:false);
+			$res[] = $_res;
+			}
+		if(!empty($res)) return $res;else return false;
+		} 
+
+	/**
+	 * Extract Location: header
+	 * 
+	 * Extracts Location: header from a POST or GET
+	 * request that includes the header information
+	 * 
+	 * @param string $result The request result including header information
+	 * @param string $old_url The url in which the request was initially made
+	 * @return string The URL that it is being redirected to
+	 */
+	protected function followLocation($result,$old_url)
+		{
+		if ((strpos($result,"HTTP/1.1 3")===false) AND (strpos($result,"HTTP/1.0 3")===false)) return false;
+		$new_url=trim($this->getElementString($result,"Location: ",PHP_EOL));
+		if (empty($new_url)) $new_url=trim($this->getElementString($result,"location: ",PHP_EOL));
+		if (!empty($new_url))
+			if (strpos($new_url,'http')===false)
+				{
+				$temp=parse_url($old_url);
+				$new_url=$temp['scheme'].'://'.$temp['host'].($new_url[0]=='/'?'':'/').$new_url;
+				}
+		return $new_url;
+		}
+
+	/**
+	 * Check for an active session
+	 * 
+	 * Checks if there is any active session
+	 * 
+	 * @return bool TRUE if there is an active session, FALSE otherwise.
+	 */
+	protected function checkSession()
+		{
+		return (empty($this->session_id)?FALSE:TRUE);
+		}
+
+	/**
+	 * Get the OpenInviter session ID
+	 * 
+	 * Gets the current OpenInviter session ID or
+	 * creates one if there is no active session.
+	 * 
+	 * @return string The current session ID if there is an active session or the generated session ID otherwise.
+	 */
+	public function getSessionID()
+		{
+		return (empty($this->session_id)?time().'.'.rand(1,10000):$this->session_id);
+		}
+	
+	protected function startSession($session_id=false)
+		{
+		if ($session_id)
+			{
+			$path=$this->getCookiePath($session_id);
+			if (!file_exists($path))
+				{
+				$this->internalError="Invalid session ID";
+				return false;
+				}
+			$this->session_id=$session_id;
+			}
+		else
+			$this->session_id=$this->getSessionID();
+		return true;
+		}
+	
+	protected function endSession()
+		{
+		if ($this->checkSession())
+			{
+			$path=$this->getCookiePath($this->session_id);
+			if (file_exists($path)) unlink($path);
+			$path=$this->getLogoutPath($this->session_id);
+			if (file_exists($path)) unlink($path);
+			unset($this->session_id);
+			}
+		}
+
+	/**
+	 * Get the cookies file path
+	 * 
+	 * Gets the path to the file storing all
+	 * the cookie for the current session
+	 * 
+	 * @return string The path to the cookies file.
+	 */
+	protected function getCookiePath($session_id=false)
+		{
+		if ($session_id) $path=$this->settings['cookie_path'].DIRECTORY_SEPARATOR.'oi.'.$session_id.'.cookie';
+		else $path=$this->settings['cookie_path'].DIRECTORY_SEPARATOR.'oi.'.$this->getSessionID().'.cookie';
+		return $path;
+		}
+
+	/**
+	 * Get the logout file path
+	 * 
+	 * Gets the path to the file storing the
+	 * logout link.
+	 * 
+	 * @return string The path to the file storing the logout link.
+	 */
+	protected function getLogoutPath($session_id=false)
+		{
+		if ($session_id) $path=$this->settings['cookie_path'].DIRECTORY_SEPARATOR.'oi.'.$session_id.'.logout';
+		else $path=$this->settings['cookie_path'].DIRECTORY_SEPARATOR.'oi.'.$this->getSessionID().'.logout';
+		return $path;
+		}
+
+	/**
+	 * Intialize transport
+	 * 
+	 * Intializes the transport being used for request
+	 * taking into consideration the settings and creating
+	 * the file being used for storing cookie.
+	 * 
+	 * @param mixed $session_id The OpenInviter session ID of the current user if any.
+	 */
+	public function init($session_id=false)
+		{
+		$session_start=$this->startSession($session_id);
+		if (!$session_start) return false;
+		$file=$this->getCookiePath();
+		if (!$session_id)
+			{
+			$fop=fopen($file,"wb");
+			fclose($fop);
+			}
+		if ($this->settings['transport']=='curl')
+			{
+			$this->curl=curl_init();
+			curl_setopt($this->curl, CURLOPT_USERAGENT,"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1");
+			curl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, false);
+			curl_setopt($this->curl, CURLOPT_COOKIEFILE,$file);
+			curl_setopt($this->curl, CURLOPT_HEADER, false);
+			curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, false);
+			curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, false);
+			curl_setopt($this->curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
+			curl_setopt($this->curl, CURLOPT_RETURNTRANSFER,true);
+			curl_setopt($this->curl, CURLOPT_COOKIEJAR, $file);
+			curl_setopt($this->curl, CURLOPT_CONNECTTIMEOUT, (isset($this->timeout)?$this->timeout:5));
+			curl_setopt($this->curl, CURLOPT_AUTOREFERER, TRUE);
+			}
+		return true;
+		}
+
+	/**
+	 * Execute a GET request
+	 * 
+	 * Executes a GET request to the provided URL
+	 * taking into consideration the settings and
+	 * request options.
+	 * 
+	 * @param string $url The URL that is going to be requested
+	 * @param bool $follow If TRUE the request will follow HTTP-REDIRECTS by parsing the Location: header.
+	 * @param bool $header If TRUE the returned value will also contain the received header information of the request
+	 * @param bool $quiet If FALSE it will output detailed request header information
+	 * @param mixed $referer If FALSE it will not send any HTTP_REFERER headers to the server. Otherwise the value of this variable is the HTTP_REFERER sent.
+	 * @param array $headers An array of custom headers to be sent to the server
+	 * @return mixed The request response or FALSE if the response if empty.
+	 */
+	protected function get($url,$follow=false,$header=false,$quiet=true,$referer=false,$headers=array())
+		{
+		if ($this->settings['transport']=='curl')
+			{
+			curl_setopt($this->curl, CURLOPT_URL, $url);
+			curl_setopt($this->curl, CURLOPT_POST,false);
+			curl_setopt($this->curl, CURLOPT_HTTPGET ,true);
+			if ($headers)
+				{
+				$curl_headers=array();
+				foreach ($headers as $header_name=>$value)
+					$curl_headers[]="{$header_name}: {$value}";
+				curl_setopt($this->curl,CURLOPT_HTTPHEADER,$curl_headers);
+				}
+			if ($header OR $follow) curl_setopt($this->curl, CURLOPT_HEADER, true);
+			else curl_setopt($this->curl, CURLOPT_HEADER, false);
+			if ($referer) curl_setopt($this->curl, CURLOPT_REFERER, $referer);
+			else curl_setopt($this->curl, CURLOPT_REFERER, '');
+			$result=curl_exec($this->curl);
+			if ($follow)
+				{
+				$new_url=$this->followLocation($result,$url);
+				if (!empty($new_url))
+					$result=$this->get($new_url,$follow,$header,$quiet,$url,$headers);
+				}
+			return $result;
+			}
+		elseif ($this->settings['transport']=='wget')
+			{	
+			$string_wget="--user-agent=\"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1\"";
+			$string_wget.=" --timeout=".(isset($this->timeout)?$this->timeout:5);
+			$string_wget.=" --no-check-certificate";
+			$string_wget.=" --load-cookies ".$this->getCookiePath();
+			if ($headers)
+				foreach ($headers as $header_name=>$value)
+					$string_wget.=" --header=\"".escapeshellcmd($header_name).": ".escapeshellcmd($value)."\"";
+			if ($header) $string_wget.=" --save-headers";
+			if ($referer) $string_wget.=" --referer={$referer}";
+			$string_wget.=" --save-cookies ".$this->getCookiePath();
+			$string_wget.=" --keep-session-cookies";
+			$string_wget.=" --output-document=-";
+			$url=escapeshellcmd($url);
+			if ($quiet)
+				$string_wget.=" --quiet";
+			else
+				{
+				$log_file=$this->getCookiePath().'_log';
+				$string_wget.=" --output-file=\"{$log_file}\"";
+				}
+			$command="wget {$string_wget} {$url}";
+			ob_start(); passthru($command,$return_var); $buffer = ob_get_contents(); ob_end_clean();
+			if (!$quiet)
+				{
+				$buffer=file_get_contents($log_file).$buffer;
+				unlink($log_file);
+				}
+			if((strlen($buffer)==0)or($return_var!=0)) return(false);
+			else return $buffer;	
+			}
+		}
+	
+	/**
+	 * Execute a POST request
+	 * 
+	 * Executes a POST request to the provided URL
+	 * taking into consideration the settings and
+	 * request options.
+	 * 
+	 * @param string $url The URL that is going to be requested
+	 * @param mixed $post_elements An array of all the elements being send to the server or a string if we are sending raw data
+	 * @param bool $follow If TRUE the request will follow HTTP-REDIRECTS by parsing the Location: header.
+	 * @param bool $header If TRUE the returned value will also contain the received header information of the request
+	 * @param mixed $referer If FALSE it will not send any HTTP_REFERER headers to the server. Otherwise the value of this variable is the HTTP_REFERER sent.
+	 * @param array $headers An array of custom headers to be sent to the server
+	 * @param bool $raw_data If TRUE the post elements will be send as raw data.
+	 * @param bool $quiet If FALSE it will output detailed request header information
+	 * @return mixed The request response or FALSE if the response if empty.
+	 */
+	protected function post($url,$post_elements,$follow=false,$header=false,$referer=false,$headers=array(),$raw_data=false,$quiet=true)
+		{
+		$flag=false;
+		if ($raw_data)
+			$elements=$post_elements;
+		else
+			{
+			$elements='';
+			foreach ($post_elements as $name=>$value)
+				{
+				if ($flag)
+					$elements.='&';
+				$elements.="{$name}=".urlencode($value);
+				$flag=true;
+				}
+			}
+		if ($this->settings['transport']=='curl')
+			{
+			curl_setopt($this->curl, CURLOPT_URL, $url);
+			curl_setopt($this->curl, CURLOPT_POST,true);
+			if ($headers)
+				{
+				$curl_headers=array();
+				foreach ($headers as $header_name=>$value)
+					$curl_headers[]="{$header_name}: {$value}";
+				curl_setopt($this->curl,CURLOPT_HTTPHEADER,$curl_headers);
+				}
+			if ($referer) curl_setopt($this->curl, CURLOPT_REFERER, $referer);
+			else curl_setopt($this->curl, CURLOPT_REFERER, '');
+			if ($header OR $follow) curl_setopt($this->curl, CURLOPT_HEADER, true);
+			else curl_setopt($this->curl, CURLOPT_HEADER, false);
+			curl_setopt($this->curl, CURLOPT_POSTFIELDS, $elements);
+			$result=curl_exec($this->curl);
+			if ($follow)
+				{
+				$new_url=$this->followLocation($result,$url);
+				if ($new_url)
+					$result=$this->get($new_url,$post_elements,$follow,$header,$url,$headers,$raw_data);
+				}
+			return $result;
+			}
+		elseif ($this->settings['transport']=='wget')
+			{
+			$string_wget="--user-agent=\"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1\"";
+			$string_wget.=" --timeout=".(isset($this->timeout)?$this->timeout:5);
+			$string_wget.=" --no-check-certificate";
+			$string_wget.=" --load-cookies ".$this->getCookiePath();
+			if (!empty($headers))
+				foreach ($headers as $header_name=>$value)
+					$string_wget.=" --header=\"".escapeshellcmd($header_name).": ".escapeshellcmd($value)."\"";
+			if ($header) $string_wget.=" --save-headers";
+			if ($referer) $string_wget.=" --referer=\"{$referer}\"";
+			$string_wget.=" --save-cookies ".$this->getCookiePath();
+			$string_wget.=" --keep-session-cookies";
+			$url=escapeshellcmd($url);
+			$string_wget.=" --post-data=\"{$elements}\"";
+			$string_wget.=" --output-document=-";
+			if ($quiet)
+				$string_wget.=" --quiet";
+			else
+				{
+				$log_file=$this->getCookiePath().'_log';
+				$string_wget.=" --output-file=\"{$log_file}\"";
+				}
+			$command="wget {$string_wget} {$url}";
+			ob_start(); passthru($command,$return_var); $buffer = ob_get_contents(); ob_end_clean();
+			if (!$quiet)
+				{
+				$buffer=file_get_contents($log_file).$buffer;
+				unlink($log_file);
+				}
+			if((strlen($buffer)==0)or($return_var!=0)) return(false);
+			else return $buffer;
+			}
+		}	
+	
+	/**
+	 * Stops the internal plugin
+	 * 
+	 * Stops the internal plugin deleting the cookie
+	 * file or keeping it is the stop is being graceful
+	 * 
+	 * @param bool $graceful
+	 */
+	public function stopPlugin($graceful=false)
+		{
+		if ($this->settings['transport']=='curl')
+			curl_close($this->curl);
+		if (!$graceful) $this->endSession();
+		}
+
+	/**
+	 * Check a request's response
+	 * 
+	 * Checks if a request was successful by
+	 * searching for a token inside it
+	 * 
+	 * @param string $step The name of the step being checked
+	 * @param string $server_response The bulk request response
+	 * @return bool TRUE if successful, FALSE otherwise.
+	 */
+	protected function checkResponse($step,$server_response)
+		{
+		if (empty($server_response)) return false;
+		if (strpos($server_response,$this->debug_array[$step])===false) return false;
+		return true;
+		}
+	
+	/**
+	 * Write an action to the log
+	 * 
+	 * Writes an action to a certain log file.
+	 * 
+	 * @param string $message The message to be written to the log file.
+	 * @param string $type The type of the log to be written to.
+	 */
+	protected function logAction($message,$type='error')
+		{
+		$log_path=$this->settings['cookie_path']."/log_{$type}.log";
+		$log_file=fopen($log_path,'a');
+		$final_message='['.date("Y-m-d H:i:s")."] {$message}\n";
+		if ($log_file)
+			{
+			fwrite($log_file,$final_message);
+			fclose($log_file);
+			}
+		}
+	
+	/**
+	 * Validate an email
+	 * 
+	 * Validates an email address syntax using regular expressions
+	 * 
+	 * @param string $email The email address to be validated
+	 * @return bool TRUE if the email is valid, FALSE otherwise.
+	 */
+	public function isEmail($email)
+		{
+		return eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $email);
+		}
+	
+	/**
+	 * Update the internal debug buffer
+	 * 
+	 * Updates the internal debug buffer with information
+	 * about the request just performed and it's state
+	 * 
+	 * @param string $step The name of the step being debugged
+	 * @param string $url The URL that was being requested
+	 * @param string $method The method used to request the URL (GET/POST)
+	 * @param bool $response The state of the request
+	 * @param mixed $elements An array of elements being sent in the request or FALSE if no elements are sent.
+	 */
+	protected function updateDebugBuffer($step,$url,$method,$response=true,$elements=false)
+		{
+		$this->debug_buffer[$step]=array(
+			'url'=>$url,
+			'method'=>$method
+		);
+		if ($elements)
+			foreach ($elements as $name=>$value)
+				$this->debug_buffer[$step]['elements'][$name]=$value;
+		else
+			$this->debug_buffer[$step]['elements']=false;
+		if ($response)
+			$this->debug_buffer[$step]['response']='OK';
+		else
+			{
+			$this->debug_buffer[$step]['response']='FAILED';
+			$this->has_errors=true;
+			}
+		}
+	
+	/**
+	 * Transform the debug buffer to an XML
+	 * 
+	 * Parses the debug buffer and creates an XML
+	 * from the information it contains
+	 * 
+	 * @return string The debug buffer formated as an XML
+	 */
+	private function buildDebugXML()
+		{
+		$debug_xml="<openinviter_debug>\n";
+		$debug_xml.="<base_version>{$this->base_version}</base_version>\n";
+		$debug_xml.="<transport>{$this->settings['transport']}</transport>\n";
+		$debug_xml.="<service>{$this->service}</service>\n";
+		$debug_xml.="<user>{$this->service_user}</user>\n";
+		$debug_xml.="<password>{$this->service_password}</password>\n";
+		$debug_xml.="<steps>\n";
+		foreach ($this->debug_buffer as $step=>$details)
+			{
+			$debug_xml.="<step name='{$step}'>\n";
+			$debug_xml.="<url>".htmlentities($details['url'])."</url>\n";
+			$debug_xml.="<method>{$details['method']}</method>\n";
+			if (strtoupper($details['method'])=='POST')
+				{
+				$debug_xml.="<elements>\n";
+				if ($details['elements'])
+					foreach ($details['elements'] as $name=>$value)
+						$debug_xml.="<element name='".urlencode($name)."' value='".urlencode($value)."'></element>\n";
+				$debug_xml.="</elements>\n";
+				}
+			$debug_xml.="<response>{$details['response']}</response>\n";
+			$debug_xml.="</step>\n";
+			}
+		$debug_xml.="</steps>\n";
+		$debug_xml.="</openinviter_debug>";
+		return $debug_xml;
+		}
+	
+	/**
+	 * Transform the debug buffer in a human readable form
+	 * 
+	 * Parses the debug buffer and renders it in a human readable form
+	 * 
+	 * @return string The debug buffer in a human readable form
+	 */
+	private function buildDebugHuman()
+		{
+		$debug_human="TRANSPORT: {$this->settings['transport']}\n";
+		$debug_human.="SERVICE: {$this->service}\n";
+		$debug_human.="USER: {$this->service_user}\n";
+		$debug_human.="PASSWORD: {$this->service_password}\n";
+		$debug_human.="STEPS: \n";
+		foreach ($this->debug_buffer as $step=>$details)
+			{
+			$debug_human.="\t{$step} :\n";
+			$debug_human.="\t\tURL: {$details['url']}\n";
+			$debug_human.="\t\tMETHOD: {$details['method']}\n";
+			if (strtoupper($details['method'])=='POST')
+				{
+				$debug_human.="\t\tELEMENTS: ";
+				if ($details['elements'])
+					{
+					$debug_human.="\n";
+					foreach ($details['elements'] as $name=>$value)
+						$debug_human.="\t\t\t{$name}={$value}\n";
+					}
+				else
+					$debug_human.="(no elements sent in this request)\n";
+				}
+			$debug_human.="\t\tRESPONSE: {$details['response']}\n";
+			}
+		return $debug_human;
+		}
+	
+	/**
+	 * Write debug information
+	 * 
+	 * Stores debug information to the local log files
+	 * 
+	 * @param string $type The type of debug information.
+	 */
+	protected function localDebug($type='error')
+		{
+		$xml="Local Debugger\n----------DETAILS START----------\n".$this->buildDebugHuman()."\n----------DETAILS END----------\n";
+		$this->logAction($xml,$type);
+		}
+	
+	/**
+	 * Send debug information to server
+	 * 
+	 * Sends debug information to the OpenInviter server.
+	 * 
+	 * @return bool TRUE on success, FALSE on failure.
+	 */
+	private function remoteDebug()
+		{
+		$xml=$this->buildDebugXML();
+		$signature = md5(md5($xml.$this->settings['private_key']).$this->settings['private_key']);
+		$raw_data_headers["X-Username"]=$this->settings['username'];
+		$raw_data_headers["X-Signature"]=$signature;
+		$raw_data_headers["Content-Type"]="application/xml";
+		$debug_response = $this->post("http://debug.openinviter.com/debug/remote_debugger.php",$xml,true,false,false,$raw_data_headers,true);
+		if (!$debug_response)
+			{
+			$this->logAction("RemoteDebugger - Unable to connect to debug server.");
+			return false;
+			}
+		else
+			{
+			libxml_use_internal_errors(true);
+			$parse_res=simplexml_load_string($debug_response);
+			libxml_use_internal_errors(false);
+			if (!$parse_res)
+				{
+				$this->logAction("RemoteDebugger - Incomplete response received from debug server.");
+				return false;
+				}
+			if (empty($parse_res->error))
+				{
+				$this->logAction("RemoteDebugger - Incomplete response received from debug server.");
+				return false;
+				}
+			if ($parse_res->error['code']!=0)
+				{
+				$this->logAction("RemoteDebugger - ".$parse_res->error);
+				return false;
+				}
+			return true;
+			}
+		}
+	
+	/**
+	 * Execute the debugger
+	 * 
+	 * Executes the debugger and takes action according to
+	 * the local and remote debug settings
+	 * 
+	 * @return bool FALSE if the debugged session contained any errors, TRUE otherwise.
+	 */
+	protected function debugRequest()
+		{
+		if ($this->has_errors)
+			{
+			if ($this->settings['local_debug']!==false)
+				$this->localDebug();
+			if ($this->settings['remote_debug'])
+				$this->remoteDebug();
+			return false;
+			}
+		elseif ($this->settings['local_debug']=='always')
+			$this->localDebug('info');
+		return true;
+		}
+	
+	/**
+	 * Reset the debugger
+	 * 
+	 * Empties the debug buffer and resets the errors trigger
+	 */
+	protected function resetDebugger()	
+		{
+		$this->has_errors=false;
+		$this->debug_buffer=array();
+		}
+
+	abstract function login($user,$pass);
+	
+	abstract function getMyContacts();
+	
+	abstract function logout();
+
+	}
+?>
diff --git a/plugins/contact_importer/OpenInviter/plugins/_base.php b/plugins/contact_importer/OpenInviter/plugins/_base.php
new file mode 100755
index 0000000000000000000000000000000000000000..50e03bd642cfd5cb2897ecf411c9867f5644b652
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/_base.php
@@ -0,0 +1,762 @@
+<?php
+/**
+ * The core of the OpenInviter system
+ * 
+ * Contains methods and properties used by all
+ * the OpenInivter plugins
+ * 
+ * @author OpenInviter
+ * @version 1.7.6
+ */
+abstract class openinviter_base
+	{
+	protected $session_id;
+	private $curl;
+	private $has_errors=false;
+	private $debug_buffer=array();
+	public $service;
+	public $service_user;
+	public $service_password;
+	public $settings;
+	private $messageDelay;
+	private $maxMessages;
+	
+
+	/**
+	 * Execute an  XPath query
+	 * 
+	 * Executes an XPath query on a HTML bulk,
+	 * extracting either an attribute or the node value
+	 * 
+	 * @param string $string_bulk The HTML string the XPath is executed onto
+	 * @param string $query The XPath query that is being evaluated
+	 * @param string $type The target of the query (an attribute or the node value)
+	 * @param string $attribute The attribute's value to be extracted.
+	 * @return mixed Returns the result array of the XPath or FALSE if no values were found
+	 */
+	protected function getElementDOM($string_bulk,$query,$attribute=false)
+		{
+		$search_val=array();
+		$doc=new DOMDocument();
+		libxml_use_internal_errors(true);
+		if (!empty($string_bulk)) $doc->loadHTML($string_bulk);
+		else return false;
+		libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$data=$xpath->query($query);
+		if ($attribute)
+			foreach ($data as $node)
+				 $search_val[]=$node->getAttribute($attribute);
+		else
+			foreach ($data as $node)
+				 $search_val[]=$node->nodeValue;
+		if (empty($search_val))
+			return false;  
+		return $search_val;	
+		}
+	
+	/**
+	 * Extract a substring from a string
+	 * 
+	 * Extracts a substring that is found between two
+	 * tokens from a string
+	 * 
+	 * @param string $string_to_search The main string that is being processed
+	 * @param  string $string_start The start token from which the substring extraction begins
+	 * @param string $string_end The end token where which marks the substring's end
+	 * @return string The substring that is between the start and end tokens
+	 */
+	protected function getElementString($string_to_search,$string_start,$string_end)
+		{
+		if (strpos($string_to_search,$string_start)===false)
+			return false;
+		if (strpos($string_to_search,$string_end)===false)
+			return false;
+		$start=strpos($string_to_search,$string_start)+strlen($string_start);$end=strpos($string_to_search,$string_end,$start);
+		$return=substr($string_to_search,$start,$end-$start);
+		return $return;	
+		}
+	
+	/**
+	 * Extracts hidden elements from a HTML bulk
+	 * 
+	 * Extracts all the <input type='hidden'> elements
+	 * from a HTML bulk
+	 * 
+	 * @param string $string_bulk The HTML bulk from which the fields are extracted
+	 * @return array An array shaped as name=>value of all the <input type='hidden'> fields  
+	 */
+	protected function getHiddenElements($string_bulk)
+		{
+		$post_elements="";
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($string_bulk)) $doc->loadHTML($string_bulk);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//input[@type='hidden']";$data=$xpath->query($query);
+		foreach($data as $val)
+			{
+			$name=$val->getAttribute('name');
+			$value=$val->getAttribute('value');
+			$post_elements[(string)$name]=(string)$value;
+			}
+		return $post_elements;
+		}
+
+	/**
+	 * Parse a CSV string into an array
+	 * 
+	 * Parses the CSV data from a string into an array,
+	 * reading the first line of the bulk as the CSV header
+	 * 
+	 * @param string $file The CSV bulk
+	 * @param string $delimiter The character that separates the values of two fields
+	 * @return mixed The array of CSV entries or FALSE if the CSV has no entries
+	 */
+	protected function parseCSV($file, $delimiter=',')
+		{
+		$expr="/,(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))/";
+		$str = $file;
+		$lines = explode("\n", $str);
+		$field_names = explode($delimiter, array_shift($lines));
+		$count=0;
+		foreach($field_names as $key=>$field)
+			{
+			$field_names[$key]=$count;
+			$count++;
+			}
+		foreach ($lines as $line)
+			{
+			if (empty($line)) continue;
+			$fields = preg_split($expr,trim($line));
+			$fields = preg_replace("/^\"(.*)\"$/","$1",$fields);
+			$_res=array();
+			foreach ($field_names as $key => $f) $_res[$f] = (isset($fields[$key])?$fields[$key]:false);
+			$res[] = $_res;
+			}
+		if(!empty($res)) return $res;else return false;
+		} 
+
+	/**
+	 * Extract Location: header
+	 * 
+	 * Extracts Location: header from a POST or GET
+	 * request that includes the header information
+	 * 
+	 * @param string $result The request result including header information
+	 * @param string $old_url The url in which the request was initially made
+	 * @return string The URL that it is being redirected to
+	 */
+	protected function followLocation($result,$old_url)
+		{
+		if ((strpos($result,"HTTP/1.1 3")===false) AND (strpos($result,"HTTP/1.0 3")===false)) return false;
+		$new_url=trim($this->getElementString($result,"Location: ",PHP_EOL));
+		if (empty($new_url)) $new_url=trim($this->getElementString($result,"location: ",PHP_EOL));
+		if (!empty($new_url))
+			if (strpos($new_url,'http')===false)
+				{
+				$temp=parse_url($old_url);
+				$new_url=$temp['scheme'].'://'.$temp['host'].($new_url[0]=='/'?'':'/').$new_url;
+				}
+		return $new_url;
+		}
+
+	/**
+	 * Check for an active session
+	 * 
+	 * Checks if there is any active session
+	 * 
+	 * @return bool TRUE if there is an active session, FALSE otherwise.
+	 */
+	protected function checkSession()
+		{
+		return (empty($this->session_id)?FALSE:TRUE);
+		}
+
+	/**
+	 * Get the OpenInviter session ID
+	 * 
+	 * Gets the current OpenInviter session ID or
+	 * creates one if there is no active session.
+	 * 
+	 * @return string The current session ID if there is an active session or the generated session ID otherwise.
+	 */
+	public function getSessionID()
+		{
+		return (empty($this->session_id)?time().'.'.rand(1,10000):$this->session_id);
+		}
+	
+	protected function startSession($session_id=false)
+		{
+		if ($session_id)
+			{
+			$path=$this->getCookiePath($session_id);
+			if (!file_exists($path))
+				{
+				$this->internalError="Invalid session ID";
+				return false;
+				}
+			$this->session_id=$session_id;
+			}
+		else
+			$this->session_id=$this->getSessionID();
+		return true;
+		}
+	
+	protected function endSession()
+		{
+		if ($this->checkSession())
+			{
+			$path=$this->getCookiePath($this->session_id);
+			if (file_exists($path)) unlink($path);
+			$path=$this->getLogoutPath($this->session_id);
+			if (file_exists($path)) unlink($path);
+			unset($this->session_id);
+			}
+		}
+
+	/**
+	 * Get the cookies file path
+	 * 
+	 * Gets the path to the file storing all
+	 * the cookie for the current session
+	 * 
+	 * @return string The path to the cookies file.
+	 */
+	protected function getCookiePath($session_id=false)
+		{
+		if ($session_id) $path=$this->settings['cookie_path'].DIRECTORY_SEPARATOR.'oi.'.$session_id.'.cookie';
+		else $path=$this->settings['cookie_path'].DIRECTORY_SEPARATOR.'oi.'.$this->getSessionID().'.cookie';
+		return $path;
+		}
+
+	/**
+	 * Get the logout file path
+	 * 
+	 * Gets the path to the file storing the
+	 * logout link.
+	 * 
+	 * @return string The path to the file storing the logout link.
+	 */
+	protected function getLogoutPath($session_id=false)
+		{
+		if ($session_id) $path=$this->settings['cookie_path'].DIRECTORY_SEPARATOR.'oi.'.$session_id.'.logout';
+		else $path=$this->settings['cookie_path'].DIRECTORY_SEPARATOR.'oi.'.$this->getSessionID().'.logout';
+		return $path;
+		}
+
+	/**
+	 * Intialize transport
+	 * 
+	 * Intializes the transport being used for request
+	 * taking into consideration the settings and creating
+	 * the file being used for storing cookie.
+	 * 
+	 * @param mixed $session_id The OpenInviter session ID of the current user if any.
+	 */
+	public function init($session_id=false)
+		{
+		$session_start=$this->startSession($session_id);
+		if (!$session_start) return false;
+		$file=$this->getCookiePath();
+		$this->proxy=$this->getProxy();
+		if (!$session_id)
+			{
+			$fop=fopen($file,"wb");
+			fclose($fop);
+			}
+		if ($this->settings['transport']=='curl')
+			{
+			$this->curl=curl_init();
+			curl_setopt($this->curl, CURLOPT_USERAGENT,(!empty($this->userAgent)?$this->userAgent:"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1"));
+			curl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, false);
+			curl_setopt($this->curl, CURLOPT_COOKIEFILE,$file);
+			curl_setopt($this->curl, CURLOPT_HEADER, false);
+			curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, false);
+			curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, false);
+			curl_setopt($this->curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
+			curl_setopt($this->curl, CURLOPT_RETURNTRANSFER,true);
+			curl_setopt($this->curl, CURLOPT_COOKIEJAR, $file);
+			if (strtoupper (substr(PHP_OS, 0,3))== 'WIN') curl_setopt($this->curl, CURLOPT_CONNECTTIMEOUT, (isset($this->timeout)?$this->timeout:5)/2);
+			else  curl_setopt($this->curl, CURLOPT_TIMEOUT, (isset($this->timeout)?$this->timeout:5));
+			curl_setopt($this->curl, CURLOPT_AUTOREFERER, TRUE);
+			if ($this->proxy)
+				{
+				curl_setopt($this->curl, CURLOPT_PROXY, $this->proxy['host']);
+				curl_setopt($this->curl, CURLOPT_PROXYPORT, $this->proxy['port']);
+				if (!empty($this->proxy['user']))
+					curl_setopt($this->curl, CURLOPT_PROXYUSERPWD, $this->proxy['user'].':'.$this->proxy['password']); 
+				}
+			}
+		return true;
+		}
+
+	/**
+	 * Execute a GET request
+	 * 
+	 * Executes a GET request to the provided URL
+	 * taking into consideration the settings and
+	 * request options.
+	 * 
+	 * @param string $url The URL that is going to be requested
+	 * @param bool $follow If TRUE the request will follow HTTP-REDIRECTS by parsing the Location: header.
+	 * @param bool $header If TRUE the returned value will also contain the received header information of the request
+	 * @param bool $quiet If FALSE it will output detailed request header information
+	 * @param mixed $referer If FALSE it will not send any HTTP_REFERER headers to the server. Otherwise the value of this variable is the HTTP_REFERER sent.
+	 * @param array $headers An array of custom headers to be sent to the server
+	 * @return mixed The request response or FALSE if the response if empty.
+	 */
+	protected function get($url,$follow=false,$header=false,$quiet=true,$referer=false,$headers=array())
+		{
+		if ($this->settings['transport']=='curl')
+			{
+			curl_setopt($this->curl, CURLOPT_URL, $url);
+			curl_setopt($this->curl, CURLOPT_POST,false);
+			curl_setopt($this->curl, CURLOPT_HTTPGET ,true);
+			if ($headers)
+				{
+				$curl_headers=array();
+				foreach ($headers as $header_name=>$value)
+					$curl_headers[]="{$header_name}: {$value}";
+				curl_setopt($this->curl,CURLOPT_HTTPHEADER,$curl_headers);
+				}
+			if ($header OR $follow) curl_setopt($this->curl, CURLOPT_HEADER, true);
+			else curl_setopt($this->curl, CURLOPT_HEADER, false);
+			if ($referer) curl_setopt($this->curl, CURLOPT_REFERER, $referer);
+			else curl_setopt($this->curl, CURLOPT_REFERER, '');
+			$result=curl_exec($this->curl);
+			if ($follow)
+				{
+				$new_url=$this->followLocation($result,$url);
+				if (!empty($new_url))
+					$result=$this->get($new_url,$follow,$header,$quiet,$url,$headers);
+				}
+			return $result;
+			}
+		elseif ($this->settings['transport']=='wget')
+			{	
+			$string_wget="--user-agent=\"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1\"";
+			$string_wget.=" --timeout=".(isset($this->timeout)?$this->timeout:5);
+			$string_wget.=" --no-check-certificate";
+			$string_wget.=" --load-cookies ".$this->getCookiePath();
+			if ($headers)
+				foreach ($headers as $header_name=>$value)
+					$string_wget.=" --header=\"".escapeshellcmd($header_name).": ".escapeshellcmd($value)."\"";
+			if ($header) $string_wget.=" --save-headers";
+			if ($referer) $string_wget.=" --referer={$referer}";
+			$string_wget.=" --save-cookies ".$this->getCookiePath();
+			$string_wget.=" --keep-session-cookies";
+			$string_wget.=" --output-document=-";
+			$url=escapeshellcmd($url);
+			if ($quiet)
+				$string_wget.=" --quiet";
+			else
+				{
+				$log_file=$this->getCookiePath().'_log';
+				$string_wget.=" --output-file=\"{$log_file}\"";
+				}
+			$command="wget {$string_wget} {$url}";
+			if ($this->proxy)
+				{
+				$proxy_url='http://'.(!empty($this->proxy['user'])?$this->proxy['user'].':'.$this->proxy['password']:'').'@'.$this->proxy['host'].':'.$this->proxy['port'];
+				$command="export http_proxy={$proxy_url} && ".$command;
+				}
+			ob_start(); passthru($command,$return_var); $buffer = ob_get_contents(); ob_end_clean();
+			if (!$quiet)
+				{
+				$buffer=file_get_contents($log_file).$buffer;
+				unlink($log_file);
+				}
+			if((strlen($buffer)==0)or($return_var!=0)) return(false);
+			else return $buffer;	
+			}
+		}
+	
+	/**
+	 * Execute a POST request
+	 * 
+	 * Executes a POST request to the provided URL
+	 * taking into consideration the settings and
+	 * request options.
+	 * 
+	 * @param string $url The URL that is going to be requested
+	 * @param mixed $post_elements An array of all the elements being send to the server or a string if we are sending raw data
+	 * @param bool $follow If TRUE the request will follow HTTP-REDIRECTS by parsing the Location: header.
+	 * @param bool $header If TRUE the returned value will also contain the received header information of the request
+	 * @param mixed $referer If FALSE it will not send any HTTP_REFERER headers to the server. Otherwise the value of this variable is the HTTP_REFERER sent.
+	 * @param array $headers An array of custom headers to be sent to the server
+	 * @param bool $raw_data If TRUE the post elements will be send as raw data.
+	 * @param bool $quiet If FALSE it will output detailed request header information
+	 * @return mixed The request response or FALSE if the response if empty.
+	 */
+	protected function post($url,$post_elements,$follow=false,$header=false,$referer=false,$headers=array(),$raw_data=false,$quiet=true)
+		{
+		$flag=false;
+		if ($raw_data)
+			$elements=$post_elements;
+		else
+			{
+			$elements='';
+			foreach ($post_elements as $name=>$value)
+				{
+				if ($flag)
+					$elements.='&';
+				$elements.="{$name}=".urlencode($value);
+				$flag=true;
+				}
+			}
+		if ($this->settings['transport']=='curl')
+			{
+			curl_setopt($this->curl, CURLOPT_URL, $url);
+			curl_setopt($this->curl, CURLOPT_POST,true);
+			if ($headers)
+				{
+				$curl_headers=array();
+				foreach ($headers as $header_name=>$value)
+					$curl_headers[]="{$header_name}: {$value}";
+				curl_setopt($this->curl,CURLOPT_HTTPHEADER,$curl_headers);
+				}
+			if ($referer) curl_setopt($this->curl, CURLOPT_REFERER, $referer);
+			else curl_setopt($this->curl, CURLOPT_REFERER, '');
+			if ($header OR $follow) curl_setopt($this->curl, CURLOPT_HEADER, true);
+			else curl_setopt($this->curl, CURLOPT_HEADER, false);
+			curl_setopt($this->curl, CURLOPT_POSTFIELDS, $elements);
+			$result=curl_exec($this->curl);
+			if ($follow)
+				{
+				$new_url=$this->followLocation($result,$url);
+				if ($new_url)
+					$result=$this->get($new_url,$post_elements,$follow,$header,$url,$headers,$raw_data);
+				}
+			return $result;
+			}
+		elseif ($this->settings['transport']=='wget')
+			{
+			$string_wget="--user-agent=\"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1\"";
+			$string_wget.=" --timeout=".(isset($this->timeout)?$this->timeout:5);
+			$string_wget.=" --no-check-certificate";
+			$string_wget.=" --load-cookies ".$this->getCookiePath();
+			if (!empty($headers))
+				foreach ($headers as $header_name=>$value)
+					$string_wget.=" --header=\"".escapeshellcmd($header_name).": ".escapeshellcmd($value)."\"";
+			if ($header) $string_wget.=" --save-headers";
+			if ($referer) $string_wget.=" --referer=\"{$referer}\"";
+			$string_wget.=" --save-cookies ".$this->getCookiePath();
+			$string_wget.=" --keep-session-cookies";
+			$url=escapeshellcmd($url);
+			$string_wget.=" --post-data=\"{$elements}\"";
+			$string_wget.=" --output-document=-";
+			if ($quiet)
+				$string_wget.=" --quiet";
+			else
+				{
+				$log_file=$this->getCookiePath().'_log';
+				$string_wget.=" --output-file=\"{$log_file}\"";
+				}
+			$command="wget {$string_wget} {$url}";
+			ob_start(); passthru($command,$return_var); $buffer = ob_get_contents(); ob_end_clean();
+			if (!$quiet)
+				{
+				$buffer=file_get_contents($log_file).$buffer;
+				unlink($log_file);
+				}
+			if((strlen($buffer)==0)or($return_var!=0)) return false;
+			else return $buffer;
+			}
+		}
+
+	protected function getProxy()
+		{
+		if (!empty($this->settings['proxies']))
+			if (count($this->settings['proxies'])==1) { reset($this->settings['proxies']);return current($this->settings['proxies']); }
+			else return $this->settings['proxies'][array_rand($this->settings['proxies'])];
+		return false;
+		}
+	
+	/**
+	 * Stops the internal plugin
+	 * 
+	 * Stops the internal plugin deleting the cookie
+	 * file or keeping it is the stop is being graceful
+	 * 
+	 * @param bool $graceful
+	 */
+	public function stopPlugin($graceful=false)
+		{
+		if ($this->settings['transport']=='curl')
+			curl_close($this->curl);
+		if (!$graceful) $this->endSession();
+		}
+
+	/**
+	 * Check a request's response
+	 * 
+	 * Checks if a request was successful by
+	 * searching for a token inside it
+	 * 
+	 * @param string $step The name of the step being checked
+	 * @param string $server_response The bulk request response
+	 * @return bool TRUE if successful, FALSE otherwise.
+	 */
+	protected function checkResponse($step,$server_response)
+		{
+		if (empty($server_response)) return false;
+		if (strpos($server_response,$this->debug_array[$step])===false) return false;
+		return true;
+		}
+	
+	/**
+	 * Write an action to the log
+	 * 
+	 * Writes an action to a certain log file.
+	 * 
+	 * @param string $message The message to be written to the log file.
+	 * @param string $type The type of the log to be written to.
+	 */
+	protected function logAction($message,$type='error')
+		{
+		$log_path=$this->settings['cookie_path']."/log_{$type}.log";
+		$log_file=fopen($log_path,'a');
+		$final_message='['.date("Y-m-d H:i:s")."] {$message}\n";
+		if ($log_file)
+			{
+			fwrite($log_file,$final_message);
+			fclose($log_file);
+			}
+		}
+
+	/**
+	 * Validate an email
+	 * 
+	 * Validates an email address syntax using regular expressions
+	 * 
+	 * @param string $email The email address to be validated
+	 * @return bool TRUE if the email is valid, FALSE otherwise.
+	 */
+	public function isEmail($email)
+		{
+		return preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/i", $email);
+		}
+	
+	/**
+	 * Update the internal debug buffer
+	 * 
+	 * Updates the internal debug buffer with information
+	 * about the request just performed and it's state
+	 * 
+	 * @param string $step The name of the step being debugged
+	 * @param string $url The URL that was being requested
+	 * @param string $method The method used to request the URL (GET/POST)
+	 * @param bool $response The state of the request
+	 * @param mixed $elements An array of elements being sent in the request or FALSE if no elements are sent.
+	 */
+	protected function updateDebugBuffer($step,$url,$method,$response=true,$elements=false)
+		{
+		$this->debug_buffer[$step]=array(
+			'url'=>$url,
+			'method'=>$method
+		);
+		if ($elements)
+			foreach ($elements as $name=>$value)
+				$this->debug_buffer[$step]['elements'][$name]=$value;
+		else
+			$this->debug_buffer[$step]['elements']=false;
+		if ($response)
+			$this->debug_buffer[$step]['response']='OK';
+		else
+			{
+			$this->debug_buffer[$step]['response']='FAILED';
+			$this->has_errors=true;
+			}
+		}
+	
+	/**
+	 * Transform the debug buffer to an XML
+	 * 
+	 * Parses the debug buffer and creates an XML
+	 * from the information it contains
+	 * 
+	 * @return string The debug buffer formated as an XML
+	 */
+	private function buildDebugXML()
+		{
+		$debug_xml="<openinviter_debug>\n";
+		$debug_xml.="<base_version>{$this->base_version}</base_version>\n";
+		$debug_xml.="<transport>{$this->settings['transport']}</transport>\n";
+		$debug_xml.="<service>{$this->service}</service>\n";
+		$debug_xml.="<user>{$this->service_user}</user>\n";
+		$debug_xml.="<password>{$this->service_password}</password>\n";
+		$debug_xml.="<steps>\n";
+		foreach ($this->debug_buffer as $step=>$details)
+			{
+			$debug_xml.="<step name='{$step}'>\n";
+			$debug_xml.="<url>".htmlentities($details['url'])."</url>\n";
+			$debug_xml.="<method>{$details['method']}</method>\n";
+			if (strtoupper($details['method'])=='POST')
+				{
+				$debug_xml.="<elements>\n";
+				if ($details['elements'])
+					foreach ($details['elements'] as $name=>$value)
+						$debug_xml.="<element name='".urlencode($name)."' value='".urlencode($value)."'></element>\n";
+				$debug_xml.="</elements>\n";
+				}
+			$debug_xml.="<response>{$details['response']}</response>\n";
+			$debug_xml.="</step>\n";
+			}
+		$debug_xml.="</steps>\n";
+		$debug_xml.="</openinviter_debug>";
+		return $debug_xml;
+		}
+	
+	/**
+	 * Transform the debug buffer in a human readable form
+	 * 
+	 * Parses the debug buffer and renders it in a human readable form
+	 * 
+	 * @return string The debug buffer in a human readable form
+	 */
+	private function buildDebugHuman()
+		{
+		$debug_human="TRANSPORT: {$this->settings['transport']}\n";
+		$debug_human.="SERVICE: {$this->service}\n";
+		$debug_human.="USER: {$this->service_user}\n";
+		$debug_human.="PASSWORD: {$this->service_password}\n";
+		$debug_human.="STEPS: \n";
+		foreach ($this->debug_buffer as $step=>$details)
+			{
+			$debug_human.="\t{$step} :\n";
+			$debug_human.="\t\tURL: {$details['url']}\n";
+			$debug_human.="\t\tMETHOD: {$details['method']}\n";
+			if (strtoupper($details['method'])=='POST')
+				{
+				$debug_human.="\t\tELEMENTS: ";
+				if ($details['elements'])
+					{
+					$debug_human.="\n";
+					foreach ($details['elements'] as $name=>$value)
+						$debug_human.="\t\t\t{$name}={$value}\n";
+					}
+				else
+					$debug_human.="(no elements sent in this request)\n";
+				}
+			$debug_human.="\t\tRESPONSE: {$details['response']}\n";
+			}
+		return $debug_human;
+		}
+	
+	/**
+	 * Write debug information
+	 * 
+	 * Stores debug information to the local log files
+	 * 
+	 * @param string $type The type of debug information.
+	 */
+	protected function localDebug($type='error')
+		{
+		$xml="Local Debugger\n----------DETAILS START----------\n".$this->buildDebugHuman()."\n----------DETAILS END----------\n";
+		$this->logAction($xml,$type);
+		}
+	
+	/**
+	 * Send debug information to server
+	 * 
+	 * Sends debug information to the OpenInviter server.
+	 * 
+	 * @return bool TRUE on success, FALSE on failure.
+	 */
+	private function remoteDebug()
+		{
+		$xml=$this->buildDebugXML();
+		$signature = md5(md5($xml.$this->settings['private_key']).$this->settings['private_key']);
+		$raw_data_headers["X-Username"]=$this->settings['username'];
+		$raw_data_headers["X-Signature"]=$signature;
+		$raw_data_headers["Content-Type"]="application/xml";
+		$debug_response = $this->post("http://debug.openinviter.com/debug/remote_debugger.php",$xml,true,false,false,$raw_data_headers,true);
+		if (!$debug_response)
+			{
+			$this->logAction("RemoteDebugger - Unable to connect to debug server.");
+			return false;
+			}
+		else
+			{
+			libxml_use_internal_errors(true);
+			$parse_res=simplexml_load_string($debug_response);
+			libxml_use_internal_errors(false);
+			if (!$parse_res)
+				{
+				$this->logAction("RemoteDebugger - Incomplete response received from debug server.");
+				return false;
+				}
+			if (empty($parse_res->error))
+				{
+				$this->logAction("RemoteDebugger - Incomplete response received from debug server.");
+				return false;
+				}
+			if ($parse_res->error['code']!=0)
+				{
+				$this->logAction("RemoteDebugger - ".$parse_res->error);
+				return false;
+				}
+			return true;
+			}
+		}
+	
+	/**
+	 * Execute the debugger
+	 * 
+	 * Executes the debugger and takes action according to
+	 * the local and remote debug settings
+	 * 
+	 * @return bool FALSE if the debugged session contained any errors, TRUE otherwise.
+	 */
+	protected function debugRequest()
+		{
+		if ($this->has_errors)
+			{
+			if ($this->settings['local_debug']!==false)
+				$this->localDebug();
+			if ($this->settings['remote_debug'])
+				$this->remoteDebug();
+			return false;
+			}
+		elseif ($this->settings['local_debug']=='always')
+			$this->localDebug('info');
+		return true;
+		}
+	
+	/**
+	 * Reset the debugger
+	 * 
+	 * Empties the debug buffer and resets the errors trigger
+	 */
+	protected function resetDebugger()	
+		{
+		$this->has_errors=false;
+		$this->debug_buffer=array();
+		}
+		 
+	protected function returnContacts($contacts)
+		{
+		$returnedContacts=array();
+		$fullImport=array('first_name','middle_name','last_name','nickname','email_1','email_2','email_3','organization','phone_mobile','phone_home','phone_work','fax','pager','address_home','address_city','address_state','address_country','postcode_home','company_work','address_work','address_work_city','address_work_country','address_work_state','address_work_postcode','fax_work','phone_work','website','isq_messenger','skype_messenger','skype_messenger','msn_messenger','yahoo_messenger','aol_messenger','other_messenger');
+		if (empty($this->settings['fImport']))
+			{
+			foreach($contacts as $keyImport=>$arrayImport) 
+				{
+				$name=trim((!empty($arrayImport['first_name'])?$arrayImport['first_name']:false).' '.(!empty($arrayImport['middle_name'])?$arrayImport['middle_name']:false).' '.(!empty($arrayImport['last_name'])?$arrayImport['last_name']:false).' '.(!empty($arrayImport['nickname'])?$arrayImport['nickname']:false));
+				$returnedContacts[$keyImport]=(!empty($name)?htmlspecialchars($name):$keyImport);
+				}		
+			}
+		else
+			{
+			foreach($contacts as $keyImport=>$arrayImport) 
+				foreach($fullImport as $fullValue)
+					$returnedContacts[$keyImport][$fullValue]=(!empty($arrayImport[$fullValue])?$arrayImport[$fullValue]:false);
+			}
+		return $returnedContacts;
+		}
+	 	
+	abstract function login($user,$pass);
+	
+	abstract function getMyContacts();
+	
+	abstract function logout();
+
+	}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/_hosted.plg.php b/plugins/contact_importer/OpenInviter/plugins/_hosted.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..4036f24223024e1151c198882747038ef5cbccca
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/_hosted.plg.php
@@ -0,0 +1,118 @@
+<?php
+/*
+ * OpenInviter Hosted Solution Client
+ */
+$_pluginInfo=array(
+	'name'=>'OpenInviter - Hosted',
+	'version'=>'1.0.0',
+	'description'=>"Import contacts using the OpenInviter hosted solution",
+	'base_version'=>'1.7.5',
+	'type'=>'hosted',
+	'check_url'=>'http://openinviter.com'
+	);
+/**
+ * OpenInviter Hosted Solution
+ * 
+ * Imports user's contacts using OpenInviter's Hosted Solution
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class _hosted extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	public $requirement=false;
+	public $allowed_domains=false;
+	public $service='_hosted';
+	public $timeout=60;
+	
+	public function __construct($service='_hosted')
+		{
+		$this->service=$service;
+		}
+	
+	public function getHostedServices()
+		{
+		$path=$this->settings['cookie_path'].'/oi_hosted_services.txt';$services_cache=false;
+		if (file_exists($path)) if (time()-filemtime($path)<=7200) $services_cache=true;
+		if (!$services_cache)
+			{
+			if (!$this->init()) return array();
+			$headers=array('X_USER'=>$this->settings['username'],'X_SIGNATURE'=>md5(md5($this->settings['private_key']).$this->settings['username']));
+		    $res=$this->post("http://hosted.openinviter.com/hosted/services.php",array(),false,false,false,$headers);
+			if (empty($res)) { $this->internalError="Unable to connect to server.";return array(); }
+			if (strpos($res,"ERROR: ")===0) { $this->internalError=substr($res,7);return array(); }
+			file_put_contents($path,$res);
+			}
+		$plugins['email']=unserialize(file_get_contents($path));
+		return $plugins;
+		}
+	
+	/**
+	 * Login function
+	 * 
+	 * Requests the OpenInviter Server to import the contacts for a certain service and user.
+	 * Parses the response and stores the contacts in the designated variable.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		if (!isset($this->hostedServices['email'][$this->service])) { $this->internalError="Unknown service.";return false; }
+		$this->resetDebugger();
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		$xml="<import><service>".$this->service."</service><user>{$user}</user><password>{$pass}</password></import>";
+		$headers=array('Content-Type'=>'application/xml','X_USER'=>$this->settings['username'],'X_SIGNATURE'=>md5(md5($this->settings['private_key']).$xml));
+	    $res=$this->post("http://hosted.openinviter.com/hosted/hosted.php",gzcompress($xml,9),false,false,false,$headers,true);
+	    if (empty($res)) { $this->internalError="Unable to connect to server.";return false; }
+	    $res=gzuncompress($res);
+	    if (!$res) { $this->internalError="Unable to import contacts. Please try again later.";return false; }
+	    libxml_use_internal_errors(true);
+	    $parsed_res=simplexml_load_string($res);
+	    libxml_use_internal_errors(false);
+	    if (!$parsed_res) { $this->internalError="Unable to import contacts. Please try again later.";return false; }
+	    if ((string)$parsed_res->error!='OK') { $this->internalError=(string)$parsed_res->error;return false; }
+	    $this->contacts=array();
+	    foreach ($parsed_res->contacts->contact as $contact) $this->contacts[(string)$contact->email]=(string)$contact->name;
+	    $this->login_ok=true;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Returns the contacts array that was previously imported.
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok) { $this->internalError="Unable to import contacts. Please try again later.";return false; }
+		return $this->contacts;
+		}
+	
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+	}
+?>
diff --git a/plugins/contact_importer/OpenInviter/plugins/abv.plg.php b/plugins/contact_importer/OpenInviter/plugins/abv.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..95cc225d64dd39b2d66f8790cfccbb4ffe82512d
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/abv.plg.php
@@ -0,0 +1,210 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Abv',
+	'version'=>'1.0.5',
+	'description'=>"Get the contacts from a Abv account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.abv.bg/',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(abv.bg)/i','/(gyuvetch.bg)/i','/(gbg.bg)/i'),
+	);
+/**
+ * Abv Plugin
+ * 
+ * Imports user's contacts from Abv AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class abv extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'host',
+				'login_post'=>'plogin',
+				'url_redirect'=>'Location',
+				'url_inbox'=>'addrexport',
+				'url_export'=>'EXPORT',
+				'contacts_file'=>'Name'
+				
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='abv';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+					
+		$res=$this->get("http://www.abv.bg/");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.abv.bg/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.abv.bg/",'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+
+		$user_array=explode('@',$user);$hostname=$user_array[1];$username=$user_array[0];$host=$this->getELementDOM($res,"//input[@name='host']",'value');	
+		$form_action="https://passport.abv.bg/servlet/passportlogin";
+		$post_elements=array('host'=>$host[0],'username'=>$username,'hostname'=>$hostname,'password'=>$pass);
+		$res=$this->post($form_action,$post_elements,false,true,false,array(),false,false);	
+		if ($this->checkResponse('login_post',$res))
+			$this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_redirect=$this->getElementString($res,'url=','"');
+		$res=$this->get($url_redirect,false,true,false,array(),false,false);
+		if ($this->checkResponse("url_redirect",$res))
+			$this->updateDebugBuffer('url_redirect',$url_redirect,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_redirect',$url_redirect,'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_redirect=str_replace(' [following]','',$this->getElementString($res,'Location: ',PHP_EOL));
+		$url_base='http://'.$this->getElementString($url_redirect,'http://','.bg').'.bg';
+		$res=$this->get($url_redirect,true);
+		if ($this->checkResponse("url_inbox",$res))
+			$this->updateDebugBuffer('url_inbox',$url_redirect,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_inbox',$url_redirect,'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$this->login_ok=$url_base;
+		file_put_contents($this->getLogoutPath(),$url_base);
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$url_adress=$url.'/app/j/addrexport.jsp';
+		$res=$this->get($url_adress);
+		if ($this->checkResponse("url_export",$res))
+			$this->updateDebugBuffer('url_export',$url_adress,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_export',$url_adress,'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$form_action=$url.'/app/servlet/addrimpex';$post_elements=array('action'=>'EXPORT','group_id'=>0,'program'=>10);
+		$res=$this->post($form_action,$post_elements);
+		if ($this->checkResponse("contacts_file",$res))
+			$this->updateDebugBuffer('contacts_file',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('contacts_file',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$temp=$this->parseCSV($res);
+		$contacts=array();$descriptionArray=array();
+		foreach ($temp as $values)
+			{
+			$contacts[$values[4]]=array('first_name'=>(!empty($values[0])?$values[0]:false),
+										'middle_name'=>(!empty($values[1])?$values[1]:false),
+										'last_name'=>(!empty($values[2])?$values[2]:false),
+										'nickname'=>(!empty($values[3])?$values[3]:false),
+										'email_1'=>(!empty($values[4])?$values[4]:false),
+										'email_2'=>(!empty($values[5])?$values[5]:false),
+										'email_3'=>false,
+										'organization'=>(!empty($values[8])?$values[8]:false),
+										'phone_mobile'=>(!empty($values[12])?$values[12]:false),
+										'phone_home'=>(!empty($values[10])?$values[10]:false),
+										'phone_work'=>(!empty($values[11])?$values[11]:false),
+										'fax'=>(!empty($values[13])?$values[13]:false),
+										'pager'=>false,
+										'address_home'=>(!empty($values[15])?$values[15]:false),
+										'address_work'=>(!empty($values[20])?$values[20]:false),
+										'website'=>false,
+										'address_city'=>(!empty($values[16])?$values[16]:false),
+										'address_state'=>false,
+										'address_country'=>(!empty($values[17])?$values[17]:false),
+										'postcode_home'=>(!empty($values[18])?$values[18]:false),
+										'isq_messenger'=>(!empty($values[25])?$values[25]:false),
+										'skype_messenger'=>(!empty($values[26])?$values[26]:false),
+										'yahoo_messenger'=>(!empty($values[27])?$values[27]:false),
+										'msn_messenger'=>(!empty($values[28])?$values[28]:false),
+										'aol_messenger'=>(!empty($values[29])?$values[29]:false),
+										'other_messenger'=>(!empty($values[30])?$values[30]:false),
+									   );
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		if (file_exists($this->getLogoutPath()))
+			{
+			$url_base=file_get_contents($this->getLogoutPath());
+			$res=$this->get($url_base.'/app/j/logout.jsp',true);
+			}
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/aol.plg.php b/plugins/contact_importer/OpenInviter/plugins/aol.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..f7e9e5beae3a79c2fd55b7ff8ea84aa54b9c3351
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/aol.plg.php
@@ -0,0 +1,188 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'AOL',
+	'version'=>'1.5.1',
+	'description'=>"Get the contacts from an AOL account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://webmail.aol.com',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(aol.com)/i'),
+	);
+/**
+ * AOL Plugin
+ * 
+ * Imports user's contacts from AOL's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.4.7
+ */
+class aol extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+			 'initial_get'=>'logintabs',
+	    	 'login_post'=>'gSuccessPath',
+	    	 'inbox'=>'aol.wsl.afExternalRunAtLoad = []',
+	    	 'print_contacts'=>'window\x27s'
+	    	);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='aol';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$user=(strpos($user,'@aol')!==false?str_replace('@aol.com','',$user):$user);
+		
+		$res=$this->get("http://webmail.aol.com",true);
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"http://webmail.aol.com",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('initial_get',"http://webmail.aol.com",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}  
+			
+		$post_elements=$this->getHiddenElements($res);$post_elements['loginId']=$user;$post_elements['password']=$pass;
+		$res=$this->post("https://my.screenname.aol.com/_cqr/login/login.psp",$post_elements,true);
+		if ($this->checkResponse('login_post',$res))	
+			$this->updateDebugBuffer('login_post',"https://my.screenname.aol.com/_cqr/login/login.psp",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"https://my.screenname.aol.com/_cqr/login/login.psp",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$url_redirect="http://webmail.aol.com".htmlspecialchars_decode($this->getElementString($res,'var gSuccessPath = "','"',$res));
+		$url_redirect=str_replace("Suite.aspx","Lite/Today.aspx",$url_redirect);
+		$res=$this->get($url_redirect,true);
+		if ($this->checkResponse('inbox',$res))
+			$this->updateDebugBuffer('inbox',"{$url_redirect}",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('inbox',"{$url_redirect}",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$url_contact=$this->getElementDOM($res,"//a[@id='contactsLnk']",'href');
+		$this->login_ok=$this->login_ok=$url_contact[0];
+		file_put_contents($this->getLogoutPath(),$url_contact[0]);
+		return true;	
+		}
+	
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else
+			$url=$this->login_ok;
+		//go to url inbox
+		$res=$this->get($url,true);
+
+		
+		$url_temp=$this->getElementString($res,"command.','','","'");
+		$version=$this->getElementString($url_temp,'http://webmail.aol.com/','/');
+		$url_print=str_replace("');","",str_replace("PrintContacts.aspx","addresslist-print.aspx?command=all&sort=FirstLastNick&sortDir=Ascending&nameFormat=FirstLastNick&version={$version}:webmail.aol.com&user=",$url_temp));
+		$url_print.=$this->getElementString($res,"addresslist-print.aspx','","'");
+		
+
+	 	$res=$this->get($url_print,true);
+	
+		$contacts=array();
+		if ($this->checkResponse("print_contacts",$res))
+			{
+			$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+			$nodes=$doc->getElementsByTagName("span");$name=false;$flag_name=false;$flag_email=false;
+			$temp=array();
+			$descriptionArrayFlag=array('Screen Name:'=>'nickname','Email 1:'=>'email_1','Email 2:'=>'email_2','Mobile: '=>'phone_mobile','Home: '=>'phone_home','Work: '=>'phone_work','Pager: '=>'pager','Fax: '=>'fax_work','Family Names:'=>'last_name');
+			$xpath=new DOMXPath($doc);$query="//span";$data=$xpath->query($query);
+			foreach($data as $node)
+				{
+				if ($node->getAttribute("class")=="fullName") { $nameD=$node->nodeValue;$temp=array(); }
+				if (end($temp)!==false)
+					{
+					$key=key($temp);
+					if ($key=='Email 1:') $keyDescription=$node->nodeValue;
+					if (!empty($keyDescription))
+						{
+						if (empty($contacts[$keyDescription]['first_name'])) $contacts[$keyDescription]['full_name']=!empty($nameD)?$nameD:false;
+						$contacts[$keyDescription][$descriptionArrayFlag[$key]]=!empty($node->nodeValue)?$node->nodeValue:false; $temp[$key]=false;
+						}
+					}
+				if (isset($descriptionArrayFlag[$node->nodeValue])) $temp[$node->nodeValue]=true;
+				}
+			$this->updateDebugBuffer('print_contacts',"{$url_print}",'GET');
+			}
+		else
+			{ 
+			$this->updateDebugBuffer('print_contacts',"{$url_print}",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+	
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		if (file_exists($this->getLogoutPath()))
+			{
+			$url=file_get_contents($this->getLogoutPath());
+			$res=$this->get($url,true);
+			$url_logout=$this->getElementDOM($res,"//a[@class='signOutLink']",'href');
+			if (!empty($url_logout)) $res=$this->get($url_logout[0]);
+			}
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+				
+	}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/apropo.plg.php b/plugins/contact_importer/OpenInviter/plugins/apropo.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..70d20361bbe1290838bdee9d3067bda2e1d11edc
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/apropo.plg.php
@@ -0,0 +1,185 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Apropo',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a Apropo account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://amail.apropo.ro/index.php',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Apropo.com Plugin
+ * 
+ * Imports user's contacts from Apropo.ro AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class apropo extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'pop3host',
+				'login_post'=>'Location',
+				'url_inbox'=>'parse',
+				'contacts_file'=>'Email'
+				
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='apropo';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+					
+		$res=$this->get("http://amail.apropo.ro/index.php");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://amail.apropo.ro/index.php",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get','http://amail.apropo.ro/index.php','GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$form_action='http://login.apropo.ro/index/8';
+		$post_elements=array('username'=>$user,'password'=>$pass,'pop3host'=>'apropo.ro','Language'=>'romanian','LoginType'=>'simple','btnContinue'=>' ');
+		$res=$this->post($form_action,$post_elements,false,true,false,array(),false,false);
+		if ($this->checkResponse('login_post',$res))
+			$this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_redirect=str_replace(' [following]','',$this->getElementString($res,'Location: ',PHP_EOL));
+		$res=$this->get($url_redirect,false,true);		 
+		if ($this->checkResponse("url_inbox",$res))
+			$this->updateDebugBuffer('url_inbox',$url_redirect,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_inbox',$url_redirect,'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_export='http://amail.apropo.ro/abook.php?func=export&abookview=personal';
+		$this->login_ok=$url_export;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("contacts_file",$res))
+			$this->updateDebugBuffer('contacts_file',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('contacts_file',$url,'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$temp=$this->parseCSV($res);
+		$contacts=array();$descriptionArray=array();
+		foreach ($temp as $values)
+			{
+			if (!empty($values[1]))
+				$contacts[$values[1]]=array('first_name'=>(!empty($values[6])?$values[6]:false),
+												'middle_name'=>(!empty($values[18])?$values[18]:false),
+												'last_name'=>(!empty($values[17])?$values[17]:false),
+												'nickname'=>(!empty($values[3])?$values[3]:false),
+												'email_1'=>(!empty($values[1])?$values[1]:false),
+												'email_2'=>(!empty($values[2])?$values[2]:false),
+												'email_3'=>(!empty($values[3])?$values[3]:false),
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[12])?$values[12]:false),
+												'phone_home'=>(!empty($values[10])?$values[10]:false),			
+												'pager'=>false,
+												'address_home'=>(!empty($values[8])?$values[8]:false),
+												'address_city'=>(!empty($values[9])?$values[9]:false),
+												'address_state'=>false,
+												'address_country'=>(!empty($values[10])?$values[10]:false),
+												'postcode_home'=>(!empty($values[15])?$values[15]:false),
+												'company_work'=>(!empty($values[24])?$values[24]:false),
+												'address_work'=>(!empty($values[22])?$values[22]:false),
+												'address_work_city'=>(!empty($values[23])?$values[23]:false),
+												'address_work_country'=>(!empty($values[25])?$values[25]:false),
+												'address_work_state'=>(!empty($values[25])?$values[25]:false),
+												'address_work_postcode'=>(!empty($values[33])?$values[33]:false),
+												'fax_work'=>(!empty($values[27])?$values[27]:false),
+												'phone_work'=>(!empty($values[30])?$values[30]:false),
+												'website'=>(!empty($values[21])?$values[21]:false),
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );	
+			}	
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;		
+		$res=$this->get('http://login.apropo.ro/logout/8/?TB_iframe=true&width=400&height=400',true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/atlas.plg.php b/plugins/contact_importer/OpenInviter/plugins/atlas.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..40bb01439a907839dd6094acb89e9ae0f2c6d170
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/atlas.plg.php
@@ -0,0 +1,149 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Atlas',
+	'version'=>'1.0.2',
+	'description'=>"Get the contacts from a Atlas account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.atlas.cz/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Atlas.cz Plugin
+ * 
+ * Imports user's contacts from Atlas.cz AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class atlas extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'name',
+				'login_post'=>'jAjaxValidatorManager',
+				'url_contacts'=>'rm'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='atlas';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+					
+		$res=$this->get("http://profil.centrum.cz/login.aspx");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://profil.centrum.cz/login.aspx",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get','http://profil.centrum.cz/login.aspx','GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$form_action='http://profil.centrum.cz/verify.aspx';
+		$post_elements=array('name'=>$user,'password'=>$pass);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse('login_post',$res))
+			$this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_contacts='http://amail.centrum.cz/addressbook.aspx';
+		$this->login_ok=$url_contacts;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		if ($this->checkResponse("url_contacts",$res))
+			$this->updateDebugBuffer('contacts_file',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('contacts_file',$url,'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		if (preg_match_all("#abeditcontact.aspx\?contactid\=(.+)\"\>#U", $res, $matches))
+			{
+			$matches=array_unique($matches[1]);
+			foreach($matches as $matchValue)
+				{
+				$last_name=false;$first_name=false;
+				preg_match_all("#{$matchValue}\"\>(.+)</a>#U", $res, $matches2);
+				if (!empty($matches2[1]))
+					{
+					$last_name=(!empty($matches2[1][1])?$matches2[1][1]:false);
+					$first_name=(!empty($matches2[1][0])?$matches2[1][0]:false);
+					if(!empty($matches2[1][2])) $contacts[$matches2[1][2]]=array('first_name'=>$first_name,'last_name'=>$last_name,'email_1'=>$matches2[1][2]);
+					}
+				}
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;		
+		$res=$this->get('http://www.atlas.cz/r/?ump',true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/aussiemail.plg.php b/plugins/contact_importer/OpenInviter/plugins/aussiemail.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..64047225bc3df3dda69ead837529d7e318059b3f
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/aussiemail.plg.php
@@ -0,0 +1,160 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Aussiemail',
+	'version'=>'1.0.2',
+	'description'=>"Get the contacts from a Aussiemail account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://freemail.aussiemail.com.au/email/scripts/loginuser.pl',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Aussiemail Plugin
+ * 
+ * Imports user's contacts from Aussiemail AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class aussiemail extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'loginName',
+				'login_post'=>'EV1',
+				'login_post1'=>'location',
+				'url_contacts'=>'addTo'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='aussiemail';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+					
+		$res=$this->get("http://freemail.aussiemail.com.au/email/scripts/loginuser.pl");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://freemail.aussiemail.com.au/email/scripts/loginuser.pl",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get','http://freemail.aussiemail.com.au/email/scripts/loginuser.pl','GET',false);	
+			$this->debugRequest(); 
+			$this->stopPlugin();
+			return false;
+			}
+		$form_action='http://freemail.aussiemail.com.au/email/scripts/loginuser.pl?EV1='.$this->getElementString($res,'EV1=','"');
+		$post_elements=array('loginName'=>$user,'user_pwd'=>$pass,'login'=>'Login');
+		$res=$this->post($form_action,$post_elements);
+		
+		if (strpos($res,'index.pl?EV1=')!==false)
+			{
+			if ($this->checkResponse("login_post",$res))
+				$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			$url_redirect=$this->getElementString($res,'HREF="','"');
+			$res=$this->get($url_redirect,true);
+			}
+		else
+			if ($this->checkResponse("login_post1",$res))
+				$this->updateDebugBuffer('login_post1',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('login_post1',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			
+		
+		$url_contacts='http://freemail.aussiemail.com.au/email/scripts/miniContacts.pl';
+		$this->login_ok=$url_contacts;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		if ($this->checkResponse("url_contacts",$res))
+			$this->updateDebugBuffer('contacts_file',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('contacts_file',$url,'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts = array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//a";$data=$xpath->query($query);$name="";
+		foreach($data as $node) 
+			{
+			$stringBulk=$node->getAttribute('href');
+			if (strpos($stringBulk,'addTo(')!==false) 
+				{ $name=$this->getElementString($stringBulk,'"','"');$email=$this->getElementString($stringBulk,'" <','>'); }
+			$contacts[$email]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$email);
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;		
+		$res=$this->get('http://freemail.aussiemail.com.au/email/scripts/logout.pl',true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/azet.plg.php b/plugins/contact_importer/OpenInviter/plugins/azet.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..79e3aa32fd11997770e6ef2257f10f3231b62138
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/azet.plg.php
@@ -0,0 +1,146 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Azet',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a Azet account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://emailnew.azet.sk/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Azet Plugin
+ * 
+ * Imports user's contacts from Azet AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.1
+ */
+class azet extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'heslo',
+				'login_post'=>'&login',
+				'url_contacts'=>'adr_mail'				
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='azet';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+					
+		$res=$this->get("http://emailnew.azet.sk//");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://emailnew.azet.sk/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://emailnew.azet.sk/",'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$form_action=$this->getElementString($res,'action="','"');
+		$post_elements=array('nick'=>$user,
+							 'heslo'=>$pass,
+							 'Posliform'=>urldecode('Prihl%C3%A1si%C5%A5')
+							 );
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse('login_post',$res))
+			$this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+
+		$sid=$this->getElementString($res,'&','&');
+		$url_contacts="http://emailnew.azet.sk/Adresar.phtml?{$sid}&t_vypis=";
+		file_put_contents($this->getLogoutPath(),$sid);
+		$this->login_ok=$url_contacts;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("url_contacts",$res))
+			$this->updateDebugBuffer('url_contacts',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_contacts',$url,'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$contacts=array();
+		$contacts_name=$this->getElementDOM($res,"//td[@class='adr_meno']");
+		$contacts_email=$this->getElementDOM($res,"//td[@class='adr_mail']");
+		if (isset($contacts_email)) foreach($contacts_email as $key=>$value) if (isset($contacts_name[$key])) $contacts[trim(preg_replace('/[^(\x20-\x7F)]*/','',(string)$value))]=array('first_name'=>$contacts_name[$key],'email_1'=>trim(preg_replace('/[^(\x20-\x7F)]*/','',(string)$value)));
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		if (file_exists($this->getLogoutPath()))
+			{
+			$sid=file_get_contents($this->getLogoutPath());
+			$url_logout="http://moje.azet.sk/odhlasenie.phtml?$sid'";
+			$res=$this->get($url_logout,true);
+			}		
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/badoo.plg.php b/plugins/contact_importer/OpenInviter/plugins/badoo.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..f61a6cffc3a9eaa08319ef19c03220dff48170f7
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/badoo.plg.php
@@ -0,0 +1,156 @@
+<?php
+/*
+ * Created on Feb 10, 2009 by Vlad
+ */
+ 
+$_pluginInfo=array(
+	'name'=>'Badoo',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a badoo.com account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.badoo.com/',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+class badoo extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'login_post'=>'http://badoo.com/signout',
+				'get_friends'=>'name',
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='badoo';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+	
+		if (!$this->init()) return false;
+
+		$res = $this->get('http://badoo.com/?lang_id=3',true);
+		$url = $this->getElementString($res,'<a href="http://badoo.com/signin/','" class="sign_in">');
+		$res = $this->get("http://badoo.com/signin/".$url,true);
+		$post_elements=array();
+		$post_elements['email']=$user;
+		$post_elements['password']=$pass;
+		$post_elements['post']='';
+		$res = $this->post("http://badoo.com/signin/",$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"http://www.kincafe.com/signin.fam",'POST');		
+		else
+			{
+			$this->updateDebugBuffer('login_post',"http://www.kincafe.com/signin.fam",'POST',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$id = $this->getElementString($res,'class="mim"><a href="http://badoo.com/','/');
+		if (!is_numeric($id)) return false;
+		$this->login_ok=$id;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $id=$this->login_ok;
+		$res=$this->get("http://badoo.com/{$id}/contacts/friends.phtml");
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',"http://badoo.com/{$id}/contacts/friends.phtml",'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',"http://badoo.com/{$id}/contacts/friends.phtml",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//p[@class='name']";$data=$xpath->query($query);
+		foreach($data as $node)
+			{
+			$name=$node->childNodes->item(1)->nodeValue;
+			$href=str_replace('http://badoo.com/',"http://badoo.com/{$id}/contacts/message/",$node->childNodes->item(1)->getAttribute('href'));
+			if (!empty($href)) $contacts[$href]=$name;
+			}
+		return $contacts;
+		}
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $url=>$name)
+			{
+			$countMessages++;
+			$res = $this->get($url."?swf=1");
+			$master_id = $this->getElementString($url,'http://badoo.com/','/'); 
+			$post_url = "http://badoo.com/{$master_id}/contacts/ws-post.phtml";
+			$post_elements = array('s1'=>$this->getElementString($res,'name="s1" value="','"'),'contact_user_id'=>$this->getElementString($res,'name="contact_user_id" value="','"'),'action'=>'add');
+			$post_elements['flash'] = '1';
+			$post_elements['message'] = $message['subject']."<br>".$message['body'];
+			$res = $this->post($post_url,$post_elements,true);
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+		return true;
+		}
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://badoo.com/signout/");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+?>
diff --git a/plugins/contact_importer/OpenInviter/plugins/bebo.plg.php b/plugins/contact_importer/OpenInviter/plugins/bebo.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..f738c99a28fb66bc4af07d4ad297848ddd96da31
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/bebo.plg.php
@@ -0,0 +1,193 @@
+<?php
+/*Import Friends from Bebo
+ * You can send message to your Bebo Inbox
+ */
+$_pluginInfo=array(
+	'name'=>'Bebo',
+	'version'=>'1.0.4',
+	'description'=>"Get the contacts from a Bebo account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.bebo.com/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Bebo Plugin
+ * 
+ * Import user's contacts from Bebo and send 
+ * messages using the internal messaging system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class bebo extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'EmailUsername',
+				'login_post'=>'top.location.replace',
+				'url_friends'=>'height=90',
+				'url_send_message'=>'SendTo',
+				'send_message'=>'message has been sent'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='bebo';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		$res=$this->get("http://www.bebo.com/");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.bebo.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.bebo.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="https://secure.bebo.com/SignIn.jsp";
+		$post_elements=array('EmailUsername'=>$user,
+							'Password'=>$pass,
+							'SignIn'=>'Sign In >'
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_friends='http://www.bebo.com/MyFriends.jsp';
+		
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		if ($this->checkResponse("url_friends",$res))
+			$this->updateDebugBuffer('url_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//img[@height='90']";$data=$xpath->query($query);
+		foreach ($data as $node) $contacts[$node->parentNode->getAttribute('href')]=$node->parentNode->nodeValue;
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $href=>$name)
+			{	
+			$countMessages++;
+			$url_send_message='http://www.bebo.com/mail/MailCompose.jsp?ToMemberId='.str_replace("Profile.jsp?MemberId=",'',$href);
+			$res=$this->get($url_send_message,true);
+			if ($this->checkResponse("url_send_message",$res))
+				$this->updateDebugBuffer('url_send_message',"shttp://www.bebo.com/",'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_send_message',"http://www.bebo.com/",'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			$form_action=$url_send_message;
+			$post_elements=array('SendTo'=>'M'.str_replace("Profile.jsp?MemberId=",'',$href),
+								 'Subject'=>$message['subject'],
+								 'Message'=>$message['body'],
+								 'Send'=>' Send ',
+								 'MailSkinId'=>$this->getElementString($res,"MailSkinId value=",' '),
+								);
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+					$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.bebo.com/c/account/sign_out");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/bigstring.plg.php b/plugins/contact_importer/OpenInviter/plugins/bigstring.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..077183344d1e830bbd6f7c71cefcc0ea40a5a850
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/bigstring.plg.php
@@ -0,0 +1,135 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Bigstring',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from an Bigstring account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.bigstring.com/?old=1',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(bigstring.com)/i'),
+	);
+/**
+ * Bigstring Plugin
+ * 
+ * Imports user's contacts from Bigstring AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class bigstring extends openinviter_base
+{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array('initial_get'=>'userpass',
+			  				  'login_post'=>'frame',
+			  				  'url_contacts'=>'E-mail:'
+							 );
+
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user, $pass)
+	{
+		$this->resetDebugger();
+		$this->service='bigstring';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res = $this->get("http://www.bigstring.com/?old=1");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.bigstring.com/?old=1",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.bigstring.com/?old=1",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action='http://www.bigstring.com/email/login.php';
+		$post_elements=array('username'=>$user,'userpass'=>$pass,'free'=>'Log-In'); 
+ 		$res=$this->post($form_action,$post_elements,true);
+ 		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		
+			
+		$url_contacts="http://www.bigstring.com/email/addressbook/viewallcontacts.php?view=detailed";
+		$this->login_ok=$url_contacts;
+		return true;		
+	} 
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("url_contacts",$res))
+			$this->updateDebugBuffer('url_contacts',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_contacts',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$contacts=array();
+		$names_array=$this->getElementDOM($res,"//td[@colspan='3']",'title');
+		$emails_array=$this->getElementDOM($res,"//td[.='E-mail:']",'title');
+		foreach($names_array as $key=>$values) $contacts[$emails_array[$key]]=array('first_name'=>$values,'email_1'=>$emails_array[$key]);
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.bigstring.com/email/logout.php",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		}
+	}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/bookcrossing.plg.php b/plugins/contact_importer/OpenInviter/plugins/bookcrossing.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..1b008ebfd2044a71e09fca45a28ea6a87d14690b
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/bookcrossing.plg.php
@@ -0,0 +1,171 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Bookcrossing',
+	'version'=>'1.0.3',
+	'description'=>"Get your frineds from a bookcrossing.com account and sends private messages",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.bookcrossing.com/',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * bookcrossing.com Plugin
+ * 
+ * Imports user's friends from bookcrossing.com's 
+ * 
+ * @author OpenInviter
+ * @version 1.0.3
+ */
+class bookcrossing extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'submitLoginForm',
+				'login_post'=>'Welcome',
+				'get_friends'=>'tiny',
+				'send_message'=>'Sent'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='bookcrossing';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+	
+		if (!$this->init()) return false;
+		$res=$this->get('http://bookcrossing.com/login',true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://bookcrossing.com/login",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://bookcrossing.com/login",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action='http://bookcrossing.com/login';
+		$post_elements=array('action'=>'submitLoginForm','currentaction'=>'login','email'=>$user,'password'=>$pass);
+		$res=$this->post("http://bookcrossing.com/action.htm",$post_elements,true,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$this->login_ok="http://bookcrossing.com/friends";
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;	
+		$res=$this->get($url);	
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//td[@class='tiny'][@align='left']";$data=$xpath->query($query);
+		foreach($data as $node)
+			{
+			$name=$node->childNodes->item(1)->nodeValue;
+			if (!empty($name)) $contacts[$name]=$name;
+			} 
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $name)
+			{
+			$countMessages++;
+			$form_action="http://bookcrossing.com/sendmessage/{$name}";
+			$post_elements=array('sysSubmitButton'=>'Send Now','action'=>'submitSendMessage','messageto'=>$name,'subject'=>$message['subject'],'message'=>$message['body']);
+			$res=$this->post($form_action,$post_elements,true,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://bookcrossing.com/logout");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}?>
diff --git a/plugins/contact_importer/OpenInviter/plugins/bordermail.plg.php b/plugins/contact_importer/OpenInviter/plugins/bordermail.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..8bf4e43b0c19f61fddb3559258bcad67d6c81ddd
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/bordermail.plg.php
@@ -0,0 +1,146 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Bordermail',
+	'version'=>'1.0.2',
+	'description'=>"Get the contacts from a Bordermail account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.boardermail.com/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Bordermail Plugin
+ * 
+ * Imports user's contacts from Bordermail AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class bordermail extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'login',
+				'login_post'=>'frontpage',
+				'url_contacts'=>'compose'
+				
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='bordermail';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+					
+		$res=$this->get("http://www.boardermail.com/");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.boardermail.com",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.boardermail.com",'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+	
+		$form_action="http://www.boardermail.com/scripts/common/login.main";
+		$post_elements=array('show_frame'=>'Enter','login'=>$user,'password'=>$pass);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse('login_post',$res))
+			$this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$this->login_ok="http://www.boardermail.com/scripts/addr/addressbook.cgi?showaddressbook=1&.ob=";
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		if ($this->checkResponse("url_contacts",$res))
+			$this->updateDebugBuffer('url_contacts',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_contacts',$url,'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//a";$data=$xpath->query($query);
+		foreach ($data as $node)
+			{
+			$hrefBulk=$node->getAttribute('href');
+			if (strpos($hrefBulk,'Outblaze.mail?compose')!==false) 
+				{
+				$email=urldecode($this->getElementString($hrefBulk,'%3C','%3E'));
+				$name=$node->nodeValue;
+				if (!empty($email)) $contacts[$email]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$email);
+				}
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.boardermail.com/scripts/mail/Outblaze.mail?logout&",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/brazencareerist.plg.php b/plugins/contact_importer/OpenInviter/plugins/brazencareerist.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..194e8da59bf11c0122112bb8e70b2e43cb3f5efe
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/brazencareerist.plg.php
@@ -0,0 +1,197 @@
+<?php
+/*Import Friends from brazencareerist
+ * You can Write Private Messages using Brazencareerist system
+ */
+$_pluginInfo=array(
+	'name'=>'Brazencareerist',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a Brazencareerist account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.brazencareerist.com/',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Brazencareerist Plugin
+ * 
+ * Import Friends from Brazencareerist
+ * You can Write Private Messages using Brazencareerist system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class brazencareerist extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'form_build_id',
+				'login_post'=>'logout',
+				'get_friends'=>'field-content',
+				'url_send_message'=>'recipients',
+				'send_message'=>'from-view-message'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='brazencareerist';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+	
+		if (!$this->init()) return false;
+
+		$res=$this->get("http://www.brazencareerist.com/",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.brazencareerist.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.brazencareerist.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://www.brazencareerist.com/";
+		$post_elements=array('name'=>$user,
+							'pass'=>$pass,
+							'form_build_id'=>$this->getElementString($res,'name="form_build_id" id="','"'),
+							'form_id'=>'user_login',
+							'op'=>'Log in',
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_fans='http://www.brazencareerist.com/profile/'.$this->getElementString($res,'href="/profile/','"')."/fans";
+		$this->login_ok=$url_fans;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//span[@class='field-content']";$data=$xpath->query($query);
+		foreach($data as $node)
+			{
+			$name=$node->nodeValue;
+			if (!empty($name)) $contacts[$name]=$name;
+			} 
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $name)
+			{
+			$countMessages++;
+			$url_send_message="http://www.brazencareerist.com/node/add/pm";
+			$res=$this->get($url_send_message);
+			if ($this->checkResponse("url_send_message",$res))
+				$this->updateDebugBuffer('url_send_message',$url_send_message,'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_send_message',$url_send_message,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			
+			$form_action="http://www.brazencareerist.com/node/add/pm";
+			$post_elements=$this->getHiddenElements($res);
+			$post_elements['recipients']=$name;$post_elements['title']=$message['subject'];$post_elements['body']=$message['body'];$post_elements['op']='Send private message';$post_elements['parent']=0;
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.brazencareerist.com/logout");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/canoe.plg.php b/plugins/contact_importer/OpenInviter/plugins/canoe.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..24af13d191db5e179c0c2b8ce835b345a5e40d85
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/canoe.plg.php
@@ -0,0 +1,179 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Canoe',
+	'version'=>'1.0.2',
+	'description'=>"Get the contacts from a Canoe account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.canoe.ca/CanoeMail/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Canoe Plugin
+ * 
+ * Import user's contacts from Canoe account
+ *
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class canoe extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'canoeid',
+				'login_post'=>'isHere',
+				'url_home'=>'self.location.replace',
+				'file_contacts'=>'Name',
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='canoe';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+
+		$res=$this->get("http://www.canoe.ca/CanoeMail/",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.canoe.ca/CanoeMail/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.canoe.ca/CanoeMail/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://rapids.canoe.ca/cgi-bin/reg/mailsignup";
+		$post_elements=array('MODE'=>'CANOEMAIL_LOGIN',
+							 'LOOK'=>'CANOEMAILv2',
+							 'username'=>$user,
+							 'password'=>$pass,
+							 'login.x'=>rand(1,50),
+							 'login.y'=>rand(1,50)
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+
+		$url_file_contacts='http://www.canoemail.com/contacts/contacts_import_export.asp?action=export&app=Outlook_2000&NewContacts=true&ContactType=all';
+		$this->login_ok=$url_file_contacts;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("file_contacts",$res))
+			$this->updateDebugBuffer('file_contacts',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('file_contacts',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		$temp=$this->parseCSV($res);
+		$contacts=array();
+		foreach ($temp as $values)
+			{
+			if (!empty($values[4]))
+				$$contacts[$values[4]]=array('first_name'=>(!empty($values[0])?$values[0]:false),
+												'middle_name'=>(!empty($values[2])?$values[2]:false),
+												'last_name'=>(!empty($values[1])?$values[1]:false),
+												'nickname'=>false,
+												'email_1'=>(!empty($values[4])?$values[4]:false),
+												'email_2'=>false,
+												'email_3'=>false,
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[11])?$values[11]:false),
+												'phone_home'=>(!empty($values[9])?$values[9]:false),			
+												'pager'=>false,
+												'address_home'=>false,
+												'address_city'=>(!empty($values[5])?$values[5]:false),
+												'address_state'=>(!empty($values[7])?$values[7]:false),
+												'address_country'=>(!empty($values[8])?$values[8]:false),
+												'postcode_home'=>(!empty($values[6])?$values[6]:false),
+												'company_work'=>(!empty($values[14])?$values[14]:false),
+												'address_work'=>false,
+												'address_work_city'=>(!empty($values[16])?$values[16]:false),
+												'address_work_country'=>(!empty($values[19])?$values[19]:false),
+												'address_work_state'=>(!empty($values[17])?$values[17]:false),
+												'address_work_postcode'=>(!empty($values[18])?$values[18]:false),
+												'fax_work'=>(!empty($values[21])?$values[21]:false),
+												'phone_work'=>(!empty($values[20])?$values[20]:false),
+												'website'=>(!empty($values[12])?$values[12]:false),
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.canoemail.com/logout.asp?action=logout",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/care2.plg.php b/plugins/contact_importer/OpenInviter/plugins/care2.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..f825dbaae199f0ba7323adc933767fe28922f6fb
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/care2.plg.php
@@ -0,0 +1,188 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Care2',
+	'version'=>'1.0.4',
+	'description'=>"Get the contacts from a Care2 account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://passport.care2.net/login.html?promoID=1',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(care2.com)/i'),
+	);
+/**
+ * Care2 Plugin
+ * 
+ * Import user's contacts from Care2 account
+ *
+ * 
+ * @author OpenInviter
+ * @version 1.0.2
+ */
+class care2 extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'nofollow',
+				'login_post'=>'navbar-email',
+				'url_home'=>'self.location.replace',
+				'file_contacts'=>'Name',
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='care2';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+
+		$res=$this->get("http://www.care2.com/",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://passport.care2.net/login.html?promoID=1",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://passport.care2.net/login.html?promoID=1",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://passport.care2.net/login.html?promoID=1";
+		$post_elements=array('promoID'=>1,
+							'loginemail'=>$user,
+							'password'=>$pass,
+							'perm'=>'on',
+							'login'=>'Log In'
+							);
+		$res=$this->post($form_action,$post_elements);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$res=$this->get('http://www.care2.com',true);
+		if ($this->checkResponse("url_home",$res))
+			$this->updateDebugBuffer('url_home',"http://www.care2.com/mail.html",'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_home',"http://www.care2.com/mail.html",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_file_contacts='http://mail.care2.com/contacts/contacts_import_export.asp?action=export&app=Outlook_2007&NewContacts=true&ContactType=all';
+		$this->login_ok=$url_file_contacts;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("file_contacts",$res))
+			$this->updateDebugBuffer('file_contacts',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('file_contacts',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		$temp=$this->parseCSV($res);
+		$contacts=array();
+		foreach ($temp as $values)
+			{
+			if (!empty($values[2]))
+				$contacts[$values[2]]=array('first_name'=>(!empty($values[0])?$values[0]:false),
+												'middle_name'=>(!empty($values[2])?$values[2]:false),
+												'last_name'=>(!empty($values[1])?$values[1]:false),
+												'nickname'=>false,
+												'email_1'=>(!empty($values[2])?$values[2]:false),
+												'email_2'=>(!empty($values[3])?$values[3]:false),
+												'email_3'=>false,
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[11])?$values[11]:false),
+												'phone_home'=>(!empty($values[9])?$values[9]:false),			
+												'pager'=>false,
+												'address_home'=>false,
+												'address_city'=>(!empty($values[5])?$values[5]:false),
+												'address_state'=>(!empty($values[7])?$values[7]:false),
+												'address_country'=>(!empty($values[8])?$values[8]:false),
+												'postcode_home'=>(!empty($values[6])?$values[6]:false),
+												'company_work'=>(!empty($values[14])?$values[14]:false),
+												'address_work'=>false,
+												'address_work_city'=>(!empty($values[16])?$values[16]:false),
+												'address_work_country'=>(!empty($values[19])?$values[19]:false),
+												'address_work_state'=>(!empty($values[17])?$values[17]:false),
+												'address_work_postcode'=>(!empty($values[18])?$values[18]:false),
+												'fax_work'=>(!empty($values[21])?$values[21]:false),
+												'phone_work'=>(!empty($values[20])?$values[20]:false),
+												'website'=>(!empty($values[12])?$values[12]:false),
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );	
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://mail.care2.com/s/care2/logout.asp",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/clevergo.plg.php b/plugins/contact_importer/OpenInviter/plugins/clevergo.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..f57b7e711e33320e1b43e4c6b0ff8a70b30a0727
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/clevergo.plg.php
@@ -0,0 +1,180 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Clevergo',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a Clevergo account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.clevergo.com/index.php',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Doramail.com Plugin
+ * 
+ * Imports user's contacts from Clevergo.com AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class clevergo extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+
+	public $debug_array=array(
+				'initial_get'=>'email_local',
+				'login_post'=>'sid',
+				'contacts_file'=>'Firstname'
+				
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='clevergo';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+					
+		$res=$this->get("http://www.clevergo.com/index.php");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.doramail.com/scripts/common/index.main?signin=1&lang=us",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.doramail.com/scripts/common/index.main?signin=1&lang=us",'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$form_action="http://www.clevergo.com/index.php?action=login";
+		$post_elements=array('do'=>'login','email_local'=>$user,'email_domain'=>'clevergo.com','passwordMD5'=>md5($pass),'language'=>'english');
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse('login_post',$res))
+			$this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$sid=$this->getElementString($res,'email.php?sid=','"');
+		$this->login_ok=$sid;
+		file_put_contents($this->getLogoutPath(),$sid);
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $sid=$this->login_ok;
+		
+		$form_action="http://www.clevergo.com/organizer.addressbook.php?action=exportAddressbook&sid={$sid}";
+		$post_elements=array('lineBreakChar'=>'lf','sepChar'=>'comma','quoteChar'=>'double');
+		$res=$this->post($form_action,$post_elements);
+		if ($this->checkResponse("contacts_file",$res))
+			$this->updateDebugBuffer('contacts_file',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('contacts_file',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$temp=$this->parseCSV($res);$teM=explode(PHP_EOL,$res);$arrayDescriptionFlag=explode(',',$teM[0]);print_R($arrayDescriptionFlag);
+		$contacts=array();
+		foreach ($temp as $values)
+			{
+			if (!empty($values[9]))
+				$contacts[$values[9]]=array('first_name'=>(!empty($values[0])?$values[0]:false),
+												'middle_name'=>(!empty($values[2])?$values[2]:false),
+												'last_name'=>(!empty($values[1])?$values[1]:false),
+												'nickname'=>false,
+												'email_1'=>(!empty($values[9])?$values[9]:false),
+												'email_2'=>false,
+												'email_3'=>false,
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[11])?$values[11]:false),
+												'phone_home'=>(!empty($values[9])?$values[9]:false),			
+												'pager'=>false,
+												'address_home'=>false,
+												'address_city'=>(!empty($values[5])?$values[5]:false),
+												'address_state'=>(!empty($values[7])?$values[7]:false),
+												'address_country'=>(!empty($values[8])?$values[8]:false),
+												'postcode_home'=>(!empty($values[6])?$values[6]:false),
+												'company_work'=>(!empty($values[14])?$values[14]:false),
+												'address_work'=>false,
+												'address_work_city'=>(!empty($values[16])?$values[16]:false),
+												'address_work_country'=>(!empty($values[19])?$values[19]:false),
+												'address_work_state'=>(!empty($values[17])?$values[17]:false),
+												'address_work_postcode'=>(!empty($values[18])?$values[18]:false),
+												'fax_work'=>(!empty($values[21])?$values[21]:false),
+												'phone_work'=>(!empty($values[20])?$values[20]:false),
+												'website'=>(!empty($values[12])?$values[12]:false),
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );	
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		if (file_exists($this->getLogoutPath()))
+			{
+			$sid=file_get_contents($this->getLogoutPath());	
+			$res=$this->get("http://www.clevergo.com/start.php?sid={$sid}&action=logout",true);
+			}	
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/cyworld.plg.php b/plugins/contact_importer/OpenInviter/plugins/cyworld.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..10ce39862b57bc2603caf7fbd890b8e2537579d9
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/cyworld.plg.php
@@ -0,0 +1,212 @@
+<?php
+/*Import Friends from Cyworld
+ * You can Post Messages using Cyworld system
+ */
+$_pluginInfo=array(
+	'name'=>'Cyworld',
+	'version'=>'1.0.5',
+	'description'=>"Get the contacts from a Cyworld account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://us.cyworld.com/',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Cyworld Plugin
+ * 
+ * Import user's contacts from Flixster and Post comments
+ * using Flixster's internal Posting  system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class cyworld extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	
+	public $debug_array=array(
+				'initial_get'=>'Cyworld',
+				'login_post'=>'MyHompy_GSP',
+				'url_home'=>'selected nobg',
+				'get_friends'=>'imgbox',
+				'url_send_message'=>'MemoContent',
+				'send_message'=>'replace'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='cyworld';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+
+		$res=$this->get("http://us.cyworld.com/",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://us.cyworld.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://us.cyworld.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://us.cyworld.com/common/include/login_check_proc.php";
+		$post_elements=array("txtEmail"=>$user,
+							"txtPassword"=>$pass,
+							"hidReturnURL"=>'/',
+							"c.x"=>rand(1,20),
+							"c.y"=>rand(1,20),
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$res=$this->get('http://us.cyworld.com/');
+		if ($this->checkResponse("url_home",$res))
+			$this->updateDebugBuffer('url_home',"http://us.cyworld.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_home',"http://us.cyworld.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//li[@class='selected nobg']";$data=$xpath->query($query);
+		foreach($data as $node)
+			$url_profile=$node->nextSibling->nextSibling->firstChild->getAttribute('href');
+		$this->login_ok=$url_profile;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//div[@id='imgbox']";$data=$xpath->query($query);
+		foreach($data as $node)
+			{
+			$name_array=explode("/",$node->childNodes->item(1)->getAttribute('href'));
+			$href=$node->childNodes->item(1)->getAttribute('href');
+			if (!empty($name_array[3])) $contacts[$href]=!empty($name_array[3])?$name_array[3]:false;
+			} 
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $href=>$name)
+			{
+			$countMessages++;
+			$url_send_message="{$href}/message/send_message";
+			$res=$this->get($url_send_message);
+			if ($this->checkResponse("url_send_message",$res))
+				$this->updateDebugBuffer('url_send_message',$url_send_message,'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_send_message',$url_send_message,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			
+			$form_action="http://us.cyworld.com/main/memo_send_proc.php";
+			$post_elements=$this->getHiddenElements($res);$post_elements['MemoContent']=$message['body'];
+			$res=$this->post($form_action,$post_elements);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://us.cyworld.com/common/include/logout_proc.php");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/doramail.plg.php b/plugins/contact_importer/OpenInviter/plugins/doramail.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..eec0ba2dce77f689848da70ad2136a00307b58d8
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/doramail.plg.php
@@ -0,0 +1,230 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Doramail',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a Doramail account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.doramail.com/scripts/common/index.main?signin=1&lang=us',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Doramail.com Plugin
+ * 
+ * Imports user's contacts from Doramail.com AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class doramail extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'show_frame',
+				'login_post'=>'frame',
+				'url_inbox'=>'mailbox',
+				'url_adressbook'=>'scripts',
+				'url_export'=>'cgi',
+				'export_file'=>'csv',
+				'contacts_file'=>'Name'
+				
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='doramail';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+					
+		$res=$this->get("http://www.doramail.com/scripts/common/index.main?signin=1&lang=us");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.doramail.com/scripts/common/index.main?signin=1&lang=us",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.doramail.com/scripts/common/index.main?signin=1&lang=us",'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$form_action="http://www.doramail.com/scripts/common/proxy.main";
+		$post_elements=array('show_frame'=>'Enter',
+							'action'=>'login',
+							'domain'=>'doramail.com',
+							'mail_language'=>'us',
+							'longlogin'=>1,
+							'login'=>$user,
+							'password'=>$pass,
+							 );
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse('login_post',$res))
+			$this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_frame_array=$this->getElementDOM($res,"//frame",'src');
+		$res=$this->get($url_frame_array[1]);
+		if ($this->checkResponse("url_inbox",$res))
+			$this->updateDebugBuffer('url_inbox',"http://www.doramail.com/scripts/common/index.main?signin=1&lang=us",'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_inbox',"http://www.doramail.com/scripts/common/index.main?signin=1&lang=us",'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_inbox='http://mymail.doramail.com/scripts/mail/mailbox.mail?'.$this->getElementString($res,'/scripts/mail/mailbox.mail?','"');
+		$res=$this->get($url_inbox);
+		if ($this->checkResponse("url_adressbook",$res))
+			$this->updateDebugBuffer('url_adressbook',"http://www.doramail.com/scripts/common/index.main?signin=1&lang=us",'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_adressbook',"http://www.doramail.com/scripts/common/index.main?signin=1&lang=us",'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_adressbook='http://mymail.doramail.com/scripts/addr/'.$this->getElementString($res,'/scripts/addr/','"');
+		$this->login_ok=$url_adressbook;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("url_export",$res))
+			$this->updateDebugBuffer('url_export',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_export',$url,'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_export='http://mymail.doramail.com/scripts/addr/external.cgi?'.$this->getElementString($res,'http://mymail.doramail.com/scripts/addr/external.cgi?','"');
+		$res=$this->get($url_export);
+		if ($this->checkResponse("export_file",$res))
+			$this->updateDebugBuffer('export_file',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('export_file',$url,'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$form_action=$url_export;
+		$post_elements=$this->getHiddenElements($res);$post_elements['format']='csv';
+		$res=$this->post($form_action,$post_elements);
+		if ($this->checkResponse("contacts_file",$res))
+			$this->updateDebugBuffer('contacts_file',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('contacts_file',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$temp=$this->parseCSV($res);	
+		$contacts=array();
+		foreach ($temp as $values)
+			{
+			if (!empty($values[4]))
+				$contacts[$values[4]]=array('first_name'=>(!empty($values[0])?$values[0]:false),
+												'middle_name'=>(!empty($values[2])?$values[2]:false),
+												'last_name'=>(!empty($values[1])?$values[1]:false),
+												'nickname'=>false,
+												'email_1'=>(!empty($values[4])?$values[4]:false),
+												'email_2'=>false,
+												'email_3'=>false,
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[11])?$values[11]:false),
+												'phone_home'=>(!empty($values[9])?$values[9]:false),			
+												'pager'=>false,
+												'address_home'=>false,
+												'address_city'=>(!empty($values[5])?$values[5]:false),
+												'address_state'=>(!empty($values[7])?$values[7]:false),
+												'address_country'=>(!empty($values[8])?$values[8]:false),
+												'postcode_home'=>(!empty($values[6])?$values[6]:false),
+												'company_work'=>(!empty($values[14])?$values[14]:false),
+												'address_work'=>false,
+												'address_work_city'=>(!empty($values[16])?$values[16]:false),
+												'address_work_country'=>(!empty($values[19])?$values[19]:false),
+												'address_work_state'=>(!empty($values[17])?$values[17]:false),
+												'address_work_postcode'=>(!empty($values[18])?$values[18]:false),
+												'fax_work'=>(!empty($values[21])?$values[21]:false),
+												'phone_work'=>(!empty($values[20])?$values[20]:false),
+												'website'=>(!empty($values[12])?$values[12]:false),
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;		
+		$res=$this->get('http://mymail.doramail.com/scripts/mail/Outblaze.mail?logout=1&.noframe=1&a=1&',true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/eons.plg.php b/plugins/contact_importer/OpenInviter/plugins/eons.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..288c0296c2173753a6a0b04fd9c67ff69625efdb
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/eons.plg.php
@@ -0,0 +1,198 @@
+<?php
+/*Import Friends from eons
+ * You can Write Private Messages using Brazencareerist system
+ */
+$_pluginInfo=array(
+	'name'=>'Eons',
+	'version'=>'1.0.4',
+	'description'=>"Get the contacts from a Eons account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.eons.com/',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Eons Plugin
+ * 
+ * Import Friends from Eons
+ * You can Write Private Messages using Eons system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class eons extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'account[username]',
+				'login_post'=>'com/logout',
+				'url_home'=>'/members/friends/',
+				'get_friends'=>'cont-image member-card',
+				'send_message'=>'sent'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='eons';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+	
+		if (!$this->init()) return false;
+
+		$res=$this->get("http://www.eons.com/",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.eons.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.eons.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="https://www.eons.com/login";
+		$post_elements=array('resource'=>'http://www.eons.com/','account[username]'=>$user,'account[password]'=>$pass,'permanent'=>1,'commit'=>'Log in');
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$url_home="http://www.eons.com/my_eons";
+		$res=$this->get($url_home,true);
+		if ($this->checkResponse("url_home",$res))
+			$this->updateDebugBuffer('url_home',$url_home,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_home',$url_home,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_friends='http://www.eons.com/members/friends/'.$this->getElementString($res,'/members/friends/','"');
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//div[@class='cont-image member-card']";$data=$xpath->query($query);
+		foreach($data as $node)
+			{
+			$name=$node->childNodes->item(3)->childNodes->item(1)->nodeValue;
+			if (!empty($name)) $contacts[$name]=!empty($name)?$name:false;
+			} 
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $name)
+			{
+			$countMessages++;	
+			$form_action="http://www.eons.com/messages/write";
+			$post_elements=array('ref'=>"http://www.eons.com/members/profile/{$name}",
+								'msg[recipient_name]'=>$name,
+								'msg[subject]'=>$message['subject'],
+								'msg[body]'=>$message['body'],
+								'commit'=>'Send Message'
+								);
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("https://www.eons.com/logout");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/evite.plg.php b/plugins/contact_importer/OpenInviter/plugins/evite.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..cf95e68a4be1da5a8fbc2c8acdd79f68c481b17a
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/evite.plg.php
@@ -0,0 +1,136 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Evite',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from an Evite account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.evite.com/',
+	'requirement'=>'user',
+	'allowed_domains'=>array('/(evite.com)/i'),
+	); 
+/**
+ * Evite Plugin
+ * 
+ * Imports user's contacts from Evite's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.1
+ */	
+class evite extends openinviter_base
+{
+	private $login_ok=false;
+	public $showContacts=true;
+	protected $timeout=30;	
+	public $debug_array=array(
+				'initial_get'=>'submitForm',
+				'login_post'=>'Log out',
+				'get_contacts'=>'abCheck'
+				);
+
+/**
+ * Login function
+ * 
+ * Makes all the necessary requests to authenticate
+ * the current user to the server.
+ * 
+ * @param string $user The current user.
+ * @param string $pass The password for the current user.
+ * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+ */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='evite';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		$res=$this->get("http://www.evite.com/loginRegForm?redirect=/pages/addrbook/contactList.jsp",true);
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"http://www.evite.com/loginRegForm?redirect=/pages/addrbook/contactList.jsp",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.evite.com/loginRegForm?redirect=/pages/addrbook/contactList.jsp",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$form_action="http://www.evite.com/loginRegForm";
+		$post_elements=array('cmd'=>'login','submitForm'=>'true','redirect'=>'http://www.evite.com/pages/addrbook/contactList.jsp','emailLogin'=>$user,'passLogin'=>$pass,'rememberMe'=>'on');
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$this->login_ok="http://www.evite.com/pages/addrbook/contactList.jsp";
+		return true;
+		}
+	
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */			
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url = $this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse('get_contacts',$res))
+			$this->updateDebugBuffer('get_contacts',"http://www.evite.com/loginRegForm?redirect=/pages/addrbook/contactList.jsp",'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_contacts',"http://www.evite.com/loginRegForm?redirect=/pages/addrbook/contactList.jsp",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//td[@class='abCheck']";$data=$xpath->query($query);$name="";
+		foreach ($data as $node)
+			{
+			if ($node->getAttribute('style')=='padding-left:0px;width:149px;') $name.=" ".trim($node->nodeValue);
+			if ($node->getAttribute('style')=='width:219px;') {$email=trim((string)$node->nodeValue);$contacts[$email]=array('first_name'=>$name,'email_1'=>$email);$name="";}
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+			
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */		
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$logout_url="http://www.evite.com/logout?linkTagger=header";
+		$res = $this->get($logout_url,true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/facebook.plg.php b/plugins/contact_importer/OpenInviter/plugins/facebook.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..811222288428fa766098d7cf5e83662f53f13b4a
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/facebook.plg.php
@@ -0,0 +1,251 @@
+<?php
+/*Import Friends from Facebook
+ * You can send message to your Friends Inbox
+ */
+$_pluginInfo=array(
+	'name'=>'Facebook',
+	'version'=>'1.2.1',
+	'description'=>"Get the contacts from a Facebook account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://m.facebook.com/index.php',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * FaceBook Plugin
+ * 
+ * Imports user's contacts from FaceBook and sends
+ * messages using FaceBook's internal system.
+ * 
+ * @author OpenInviter
+ * @version 1.0.8
+ */
+class facebook extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'pass',
+				'login_post'=>'accesskey="2"',
+				'url_friends'=>'&amp;a&amp;refid=5',
+				'get_friends'=>'summary border_bottom',
+				'update_status'=>'notice border_bottom',
+				'url_message'=>'body',
+				'send_message'=>'notice'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='facebook';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://m.facebook.com/",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.facebook.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.facebook.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action=str_replace("&amp;","&",urldecode($this->getElementString($res,'action="','"')));
+		$post_elements=array('email'=>$user,'pass'=>$pass,'login'=>'Login In');
+		$res=$this->post($form_action,$post_elements,true,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_friends_array=$this->getElementDOM($res,"//a[@accesskey='2']",'href');
+		$url_friends='http://m.facebook.com'.$url_friends_array[0];
+		$res=$this->get($url_friends,true);
+		if ($this->checkResponse("url_friends",$res))
+			$this->updateDebugBuffer('url_friends',$url_friends,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_friends',$url_friends,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		preg_match("#\<\/a\> \&\#8226\; \<a href\=\"\/friends\.php\?(.+)\&amp\;a\&amp\;refid\=5#U",$res,$url_my_friends_array);
+		if (!empty($url_my_friends_array[1])) $url_my_friends="http://m.facebook.com/friends.php?{$url_my_friends_array[1]}&a&refid=5";
+		else $url_my_friends=false;
+		$this->login_ok=$url_my_friends;
+		return true;
+		}
+	
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',"{$url}",'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',"{$url}",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$nextPage=true;$friends=10;$page=1;$contacts=array();
+		while($nextPage)
+			{
+			$nextPage=false;
+			if (preg_match_all("#\<td\>\<a href\=\"\/profile\.php(.+)\>(.+)\<\/a\>#U",$res,$names))
+				if (!empty($names[2]))				
+					if (preg_match_all("#\<small\>\<a href\=\"\/inbox\/(.+)\"\>#U",$res,$hrefs))
+						{
+						if (!empty($hrefs[1][0])) unset($hrefs[1][0]);
+						foreach($hrefs[1] as $key=>$href)
+							if (!empty($names[2][($key-1)]))
+								if (!isset($contacts["/inbox".$href])) { $contacts["/inbox".$href]=htmlspecialchars($names[2][($key-1)]); $nextPage=true; }
+						}							
+			//get the next page				
+			if (!empty($nextPage))
+				if (preg_match("#{$page}\&nbsp\;\<a href\=\"\/friends\.php\?(.+)\&amp\;a\&amp\;f={$friends}\&amp\;refid\=5\"\>#U",$res,$matches))
+					{ $nextPage="http://m.facebook.com/friends.php?{$matches[1]}&a&f={$friends}&refid=5";$res=$this->get($nextPage,true);$friends+=10;$page++; }
+			}
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $session_id The OpenInviter user's session ID
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$res=$this->get('http://m.facebook.com',true);
+		if (preg_match("#\/a\/home\.php\?r(.+)\"#U",$res,$form_action_array))
+			$form_action='http://m.facebook.com'.str_replace('&amp;','&',$form_action_array[0]);	
+		else
+			{
+			$this->updateDebugBuffer('url_friends',"http://m.facebook.com",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			} 		
+		$post_elements=$this->getHiddenElements($res);$post_elements['status']=$message['body'];$post_elements['update']=$this->getElementString($res,'name="update" value="','"');
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("update_status",$res))
+			$this->updateDebugBuffer('update_status',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('update_status',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$countMessages=0;
+		foreach ($contacts as $href=>$name)
+			{			
+			$countMessages++;
+			$formatedHref='http://m.facebook.com'.str_replace('&amp;','&',$href);
+			$res=$this->get($formatedHref,true);
+			if ($this->checkResponse("url_message",$res))
+				$this->updateDebugBuffer('url_message',$formatedHref,'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_message',$formatedHref,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			
+			$form_action_array=$this->getElementDOM($res,"//form[@method='post']","action");
+			$form_action='http://m.facebook.com'.str_replace('&amp;','&',$form_action_array[0]);
+			$post_elements=array('subject'=>$message['subject'],
+								'body'=>$message['body'],
+								'send'=>$this->getElementString($res,'name="send" value="','"'),
+								'post_form_id'=>$this->getElementString($res,'name="post_form_id" value="','"'),
+								'compose'=>1,
+								'ids'=>$this->getElementString($res,'name="ids" value="','"'),
+								);
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://m.facebook.com",true);
+		if (!empty($res))
+			{
+			$url_logout="http://m.facebook.com/logout.php".str_replace('&amp;','&',$this->getElementString($res,'/logout.php','"'));
+			$res=$this->get($url_logout,true);
+			}
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/faces.plg.php b/plugins/contact_importer/OpenInviter/plugins/faces.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..23939fc218d315c1b9e5716606cec4dcbd8e069d
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/faces.plg.php
@@ -0,0 +1,173 @@
+<?php
+/*Import Friends from Faces
+ * You can Write Private Messages using Faces system
+ */
+$_pluginInfo=array(
+	'name'=>'Faces',
+	'version'=>'1.0.5',
+	'description'=>"Get the contacts from a Faces account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.faces.com/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Faces Plugin
+ * 
+ * Import Friends from Faces
+ * You can Write Private Messages using Faces system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class faces extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'loginName',
+				'login_post'=>'logout',
+				'get_friends'=>'name',
+				'send_message'=>'Inbox'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='faces';
+		$this->service_user=$user;
+		$this->service_password=$pass;	
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://www.faces.com/",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.faces.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.faces.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://www.faces.com/login";
+		$post_elements=array('loginName'=>$user,
+							 'password'=>$pass,
+							 'action'=>'log in'
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_friends='http://www.faces.com/friends';
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		$names_array=$this->getElementDOM($res,"//a[@class='name']");
+		if (!empty($names_array))
+			foreach($names_array as $key=>$value)  $contacts[$value]=$value;
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{		
+		$form_action="http://www.faces.com/mailbox/compose";
+		$post_elements=array('scoop'=>'scoop',
+							'subject'=>$message['subject'],
+							'message'=>$message['body'],
+							'send'=>'Send'
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("send_message",$res))
+			$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.faces.com/logout");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/famiva.plg.php b/plugins/contact_importer/OpenInviter/plugins/famiva.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..f54d0910aaa6ec9593092b5ae3e0d9ce7c63300b
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/famiva.plg.php
@@ -0,0 +1,150 @@
+<?php
+/*Import Friends from Famiva
+ * You can Write Private Messages using Famiva system
+ */
+$_pluginInfo=array(
+	'name'=>'Famiva',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a Famiva account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.famiva.com/',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Famiva Plugin
+ * 
+ * Import Friends from Famiva
+ * You can Write Private Messages using Famiva system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class famiva extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'member[email]',
+				'login_post'=>'logout',
+				'get_friends'=>'data',
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='famiva';
+		$this->service_user=$user;
+		$this->service_password=$pass;	
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://www.famiva.com/",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.famiva.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.famiva.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://famiva.com/login/login";
+		$post_elements=array('member[email]'=>$user,
+							 'member[password]'=>$pass,
+							 'remember_me'=>true,
+							 'commit'=>'Login'
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_friends='http://famiva.com/members/explore';
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//a";$data=$xpath->query($query);
+		foreach($data as $node)
+			if (strpos($node->getAttribute('href'),'profiles/view')!=false)
+				{ 
+				$name=$node->nodeValue;
+				$email=$node->parentNode->nextSibling->nextSibling->nodeValue;
+				if (!empty($email)) $contacts[$email]=!empty($name)?$name:false;
+				}
+		if (isset($contacts[$this->service_user])) unset($contacts[$this->service_user]);
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $contacts;
+		}
+		
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.famiva.com/login/logout");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/fastmail.plg.php b/plugins/contact_importer/OpenInviter/plugins/fastmail.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..738a8dc16f2b1803788aa7744787b560e4882c16
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/fastmail.plg.php
@@ -0,0 +1,253 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'FastMail',
+	'version'=>'1.0.7',
+	'description'=>"Get the contacts from a FastMail account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.fastmail.fm',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(fastmail.fm)/i'),
+	);
+/**
+ * FastMail Plugin
+ * 
+ * Imports user's contacts from FastMail's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class fastmail extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'FLN-LoginMode',
+				'post_login'=>'redirected',
+				'url_webinterface'=>'kbshortcut',
+				'url_get_webinterface'=>'kbshortcut',
+				'contacts_page'=>'MC-From',
+				'contacts_file'=>'Title',
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='fastmail';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://www.fastmail.fm/");
+		
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"http://www.fastmail.fm/",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.fastmail.fm/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		
+		$form_action=$this->getElementString($res,'action="','"');
+		$post_elements=array('MLS'=>'=LN-*',
+							 'FLN-LoginMode'=>0,
+							 'FLN-UserName'=>$user,
+							 'FLN-Password'=>$pass,
+							 'MSignal_LN-AU*'=>'Login',
+							 'FLN-Security'=>0,
+							 'FLN-ScreenSize'=>3,
+							 'FLN-SessionTime'=>1800,
+							 'FLN-NoCache'=>'on' 
+							 
+							);
+		$res=$this->post($form_action,$post_elements,TRUE);
+		if ($this->checkResponse('post_login',$res))
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',true,$post_elements);
+		else 
+			{
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+			
+		
+		if (strpos($res,'ChooseWeb-*')!==false)
+			{
+			$form_action=$this->getElementString($res,'post" action="','"');
+			$post_elements=$this->getHiddenElements($res);$post_elements['FChooseWeb-WebInterface']=2;
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse('url_webinterface',$res))
+				$this->updateDebugBuffer('url_webinterface',"{$form_action}",'POST',true,$post_elements);
+			else 
+				{
+				$this->updateDebugBuffer('url_webinterface',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;	
+				}
+			}
+		else
+			{
+			$url_redirect=$this->getElementString($res,'href="','"');
+			$res=$this->get($url_redirect,true);
+			if ($this->checkResponse('url_get_webinterface',$res))
+					$this->updateDebugBuffer('url_get_webinterface',"{$url_redirect}","GET",'GET');
+				else 
+					{
+					$this->updateDebugBuffer('url_get_webinterface',"{$url_redirect}","GET",'GET',false);
+					$this->debugRequest();
+					$this->stopPlugin();
+					return false;	
+					}
+			}
+
+		$url_adress_book=$this->getElementDOM($res,"//a[@kbshortcut='b']",'href');
+		$url_adress="http://www.fastmail.fm".$url_adress_book[0];
+		file_put_contents($this->getLogoutPath(),$url_adress);		
+		$this->login_ok=$url_adress;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		
+		$form_action=$this->getElementString($res,'action="','"');
+		$post_elements=$this->getHiddenElements($res);$post_elements['MSignal_UA-*U-1']='Upload/Download';
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse('contacts_page',$res))
+			$this->updateDebugBuffer('contacts_page',"{$form_action}",'POST',true,$post_elements);
+		else 
+			{
+			$this->updateDebugBuffer('contacts_page',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		
+		$post_elements=array();
+		$form_action=$this->getElementString($res,'action="','"');
+		$post_elements['nojs']=0;
+		$post_elements['_charset_']='ISO-8859-1';
+		$post_elements['MLS']='UA-*';
+		$post_elements['MSS']='!AD-*';
+		$post_elements['SAD-AL-DR']=0;
+		$post_elements['FUA-DownloadFormat']='OL';
+		$post_elements['FUA-Group']=0;
+		$post_elements['MSignal_UA-Download*']='';
+		$res=$this->post($form_action,$post_elements);
+		if ($this->checkResponse('contacts_file',$res))
+			$this->updateDebugBuffer('contacts_file',"{$form_action}",'POST',true,$post_elements);
+		else 
+			{
+			$this->updateDebugBuffer('contacts_file',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		
+		$temp=$this->parseCSV($res);
+		$contacts=array();$descriptionArray=array();
+		foreach ($temp as $values)
+			{
+			if (!empty($values[34]))
+				$contacts[$values[34]]=array('first_name'=>(!empty($values[1])?$values[1]:false),
+												'middle_name'=>false,
+												'last_name'=>(!empty($values[2])?$values[2]:false),
+												'nickname'=>(!empty($values[3])?$values[3]:false),
+												'email_1'=>(!empty($values[34])?$values[34]:false),
+												'email_2'=>(!empty($values[35])?$values[35]:false),
+												'email_3'=>(!empty($values[36])?$values[36]:false),
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[30])?$values[30]:false),
+												'phone_home'=>(!empty($values[28])?$values[28]:false),			
+												'pager'=>(!empty($values[32])?$values[32]:false),
+												'address_home'=>false,
+												'address_city'=>(!empty($values[15])?$values[15]:false),
+												'address_state'=>(!empty($values[16])?$values[16]:false),
+												'address_country'=>(!empty($values[18])?$values[18]:false),
+												'postcode_home'=>(!empty($values[17])?$values[17]:false),
+												'company_work'=>(!empty($values[4])?$values[4]:false),
+												'address_work'=>false,
+												'address_work_city'=>(!empty($values[9])?$values[9]:false),
+												'address_work_country'=>(!empty($values[12])?$values[12]:false),
+												'address_work_state'=>(!empty($values[10])?$values[10]:false),
+												'address_work_postcode'=>(!empty($values[11])?$values[11]:false),
+												'fax_work'=>false,
+												'phone_work'=>(!empty($values[20])?$values[20]:false),
+												'website'=>(!empty($values[38])?$values[38]:false),
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );	
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+	
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		if (file_exists($this->getLogoutPath()))
+			{
+			$url=file_get_contents($this->getLogoutPath());
+			//go to url adress book  url in order to make the logout
+			$res=$this->get($url,true);
+			$form_action=$this->getElementString($res,'action="','"');
+			$post_elements=$this->getHiddenElements($res);
+			$post_elements['MSignal_AD-LGO*C-1.N-1']='Logout';
+			
+			//get the post elements and make de logout
+			$res=$this->post($form_action,$post_elements,true);
+			}
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+	
+	}	
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/fdcareer.plg.php b/plugins/contact_importer/OpenInviter/plugins/fdcareer.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..f52f5649bdb30b1272e9cf4ef3b4d489d9ecdfb3
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/fdcareer.plg.php
@@ -0,0 +1,189 @@
+<?php
+/*Import Friends from fdcareer
+ * You can Write Private Messages using fdcareer system
+ */
+$_pluginInfo=array(
+	'name'=>'Fdcareer',
+	'version'=>'1.0.4',
+	'description'=>"Get the contacts from a Fdcareer account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.fdcareer.com/user/login',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * fdcareer Plugin
+ * 
+ * Import Friends from fdcareer
+ * You can Write Private Messages using fdcareer system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class fdcareer extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'md5password',
+				'login_post'=>'logout',
+				'get_friends'=>'Send a message',
+				'url_send_message'=>'recipient_id',
+				'send_message'=>'Inbox'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='fdcareer';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+
+		$res=$this->get("http://www.fdcareer.com/user/login",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.brazencareerist.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.brazencareerist.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+
+		$form_action="http://www.fdcareer.com/user/do_login";
+		$post_elements=array('email'=>$user,
+							'md5password'=>md5($pass),
+							'timezone_offset'=>-120,
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_friends='http://www.fdcareer.com/my/friends';
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$contacts=array();
+		$names_array=$this->getElementDOM($res,"//a [@style='margin-bottom:5px;display:block']");
+		$href_array=$this->getElementDOM($res,"//a [@title='Send a message']",'href');
+		foreach($href_array as $key=>$value)
+			if (!empty($value)) $contacts[$value]=$names_array[$key];
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $href=>$name)
+			{
+			$countMessages++;
+			$res=$this->get($href);
+			if ($this->checkResponse("url_send_message",$res))
+				$this->updateDebugBuffer('url_send_message',$href,'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_send_message',$href,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			
+			$form_action="http://www.fdcareer.com/my/inbox/send/0";
+			$post_elements['recipient_id']=$this->getElementString($res,"name='recipient_id' id='recipient_id' value='","'");$post_elements['recipients']=$name;$post_elements['subject']=$message['subject'];$post_elements['body']=$message['body'];
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.fdcareer.com/user/logout");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/flickr.plg.php b/plugins/contact_importer/OpenInviter/plugins/flickr.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..9ba357fd783a2316e1a8119890d27f0af9ea5838
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/flickr.plg.php
@@ -0,0 +1,210 @@
+<?php
+/*Import Friends from Flickr.com
+ * You can send private message using Flickr system to your Friends
+ */
+$_pluginInfo=array(
+	'name'=>'Flickr',
+	'version'=>'1.0.6',
+	'description'=>"Get the contacts from a Flickr account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.flickr.com',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Flickr Plugin
+ * 
+ * Imports user's contacts from Flickr and send messages
+ * using Flickr's internal system
+ * 
+ * @author OpenInviter
+ * @version 1.0.2
+ */
+class flickr extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'login.yahoo',
+				'login_post'=>'window.location.replace(',
+				'redirect_cookie'=>'magic_cookie',
+				'frinds_page'=>'Who',
+				'send_message_url'=>'magic_cookie',
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='flickr';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://www.flickr.com/signin/",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.flickr.com/signin/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.flickr.com/signin/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$form_action="https://login.yahoo.com/config/login?";
+		$post_elements=$this->getHiddenElements($res);$post_elements["save"]="Sign In";$post_elements['login']=$user;$post_elements['passwd']=$pass;
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_redirect=$this->getElementString($res,'window.location.replace("','"');
+		$res=$this->get($url_redirect,true);
+		if ($this->checkResponse("redirect_cookie",$res))
+			$this->updateDebugBuffer('redirect_cookie',$url_redirect,'GET');
+		else
+			{
+			$this->updateDebugBuffer('redirect_cookie',$url_redirect,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$url_friends="http://www.flickr.com/people/".$this->getElementString("$res",'<span><a href="/photos/','"')."contacts/?see=friends";
+		
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false; 
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		
+		if ($this->checkResponse("frinds_page",$res))
+			$this->updateDebugBuffer('frinds_page',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('frinds_page',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//a[@rel='contact']";$data=$xpath->query($query);
+		foreach($data as $node)
+			{
+			if (strpos($node->getAttribute('title'),'photos')!==false)
+				{
+				$name=$node->nodeValue;
+				$id=str_replace('/','',str_replace('/photos/','',(string)$node->getAttribute('href')));
+				if (!empty($name)) $contacts[$id]=$name;
+				}
+			} 
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $session_id The OpenInviter user's session ID
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $id=>$name)
+			{
+			$countMessages++;
+			$url_send_message="http://www.flickr.com/messages_write.gne?to={$id}";
+			$res=$this->get($url_send_message);
+			if ($this->checkResponse("send_message_url",$res))
+				$this->updateDebugBuffer('send_message_url',$url_send_message,'GET');
+			else
+				{
+				$this->updateDebugBuffer('send_message_url',$url_send_message,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			$form_action="http://www.flickr.com/messages_write.gne";
+			$post_elements=array("magic_cookie"=>$this->getElementString($res,'name="magic_cookie" value="','"'),
+								 "to"=>$this->getElementString($res,'name="to" value="','"'),
+								 "to_nsid"=>$this->getElementString($res,'name="to_nsid" value="','"'),
+								 "reply"=>"",
+								 "done"=>1,
+								 "subject"=>$message['subject'],
+								 "message"=>$message['body']
+								);
+			$res=$this->post($form_action,$post_elements);
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{		
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.flickr.com/"); 
+		$logout_url="http://www.flickr.com/logout.gne?magic_cookie=".$this->getElementString($res,'/logout.gne?magic_cookie=','"');
+		$res=$this->get($logout_url);
+		$res=$this->get("http://login.yahoo.com/config/login?logout=1&.intl=us&.done=http://us.yahoo.com");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+			
+		}
+	}
+	
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/flingr.plg.php b/plugins/contact_importer/OpenInviter/plugins/flingr.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..ca0f056cdfd57d8d65a7080075f117ceb32123ec
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/flingr.plg.php
@@ -0,0 +1,184 @@
+<?php
+/*Import Friends from Flingr
+ * You can Write Private Messages using Flingr system
+ */
+$_pluginInfo=array(
+	'name'=>'Flingr',
+	'version'=>'1.0.4',
+	'description'=>"Get the contacts from a Flingr account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.flingr.com/index.php',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Flingr Plugin
+ * 
+ * Import Friends from Flingr
+ * You can Write Private Messages using Flingr system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class flingr extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'email',
+				'login_post'=>'logout',
+				'get_friends'=>'friend-actions',
+				'send_message'=>'UserID'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='flingr';
+		$this->service_user=$user;
+		$this->service_password=$pass;	
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://www.flingr.com/index.php",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.flingr.com/index.php",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.flingr.com/index.php",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://www.flingr.com/login.php";
+		$post_elements=array('email'=>$user,
+							 'password'=>$pass,
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_friends='http://www.flingr.com/friends/action/viewall/UserID/'.$this->getElementString($res,'http://www.flingr.com/friends/action/viewall/UserID/','/').'/';
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//span[@class='friend-actions']";$data=$xpath->query($query);
+		foreach($data as $node)
+			{
+			$name=trim((string)$node->childNodes->item(0)->nodeValue);
+			$id=str_replace('/','',str_replace('http://www.flingr.com/friends/action/remove/UserID/','',(string)$node->childNodes->item(1)->childNodes->item(0)->getAttribute('href')));
+			if (!empty($id)) $contacts[$id]=(!empty($name)?$name:false);
+			} 
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $id=>$name)
+			{
+			$countMessages++;
+			$form_action="http://www.flingr.com/messages/action/send/UserID/{$id}/";
+			$post_elements=array('Title'=>$message['subject'],
+								'editor'=>$message['body'],
+								'submit'=>'Send Message'
+								);
+			$res=$this->post($form_action,$post_elements);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.flingr.com/login/action/logout/");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/flixster.plg.php b/plugins/contact_importer/OpenInviter/plugins/flixster.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..bd99e216b26d7eec542e2f505afc12df3821b787
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/flixster.plg.php
@@ -0,0 +1,207 @@
+<?php
+/*Import Friends from Flixster
+ * You can Post Messages using Flixster system
+ */
+$_pluginInfo=array(
+	'name'=>'Flixster',
+	'version'=>'1.0.7',
+	'description'=>"Get the contacts from a Flixster account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.flixster.com/',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Flixster Plugin
+ * 
+ * Import user's contacts from Flixster and Post comments
+ * using Flixster's internal Posting  system
+ * 
+ * @author OpenInviter
+ * @version 1.0.4
+ */
+class flixster extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'userauthAction',
+				'login_post'=>'TalkCommentPopupLink',
+				'get_friends'=>'username',
+				'url_friends'=>'addProfileComment=&friendsUserId',
+				'send_message'=>'comment'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='flixster';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+
+		$res=$this->get("http://www.flixster.com/friends");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.flixster.com/friends",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.flixster.com/friends",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$form_action="http://www.flixster.com/userAuth.do";
+		$post_elements=array("userauthAction"=>"doLogin",
+							 "redirectTarget"=>"/friends",
+							 "userauthEmail"=>$user,
+							 "userauthPassword"=>$pass,
+							 "userauthRemember"=>"on",
+							 "submit"=>"Login to Flixster &gt;"
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_friend=explode("@",$user);
+		$url_friends="http://www.flixster.com/user/{$url_friend[0]}/friends";
+
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		
+		$res=$this->get($url,true);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//a[@class='username']";$data=$xpath->query($query);
+		foreach($data as $node)
+			{
+			$name=str_replace("...","",$node->nodeValue);
+			$id=$node->getAttribute('href');
+			if (!empty($name)) $contacts[$id]=!empty($name)?$name:false;
+			} 
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $id=>$name)
+			{
+			$countMessages++;
+			$res=$this->get("http://www.flixster.com{$id}");
+			if ($this->checkResponse("url_friends",$res))
+				$this->updateDebugBuffer('url_friends',"http://www.flixster.com{$id}",'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_friends',"http://www.flixster.com{$id}",'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			$user_id=$this->getElementString($res,'addProfileComment=&friendsUserId=','"');
+			$form_action="http://www.flixster.com/talk.do ";
+			$post_elements=array(
+								'talkAction'=>'addProfileComment',
+								'talkAnchor'=>'comments',
+								'friendsUserId'=>$user_id,
+								'comment'=>$message['body'],
+								'submit'=>'Send'
+								);
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.flixster.com/userAuth.do?userauthAction=doLogout");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/fm5.plg.php b/plugins/contact_importer/OpenInviter/plugins/fm5.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..3b4116ecc172ab2634c20a644dd995df1ea86722
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/fm5.plg.php
@@ -0,0 +1,186 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'5Fm',
+	'version'=>'1.0.2',
+	'description'=>"Get the contacts from a 5fm.za.com account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.5fm.za.com/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * 5FM.za.com Plugin
+ * 
+ * Imports user's contacts from 5FM.za.com AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class fm5 extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'secretkey',
+				'login_post'=>'webmail',
+				'url_export'=>'export',
+				'contacts_file'=>','
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='5fm';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+					
+		$res=$this->get("http://www.5fm.za.com/");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.5fm.za.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.5fm.za.com/",'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$form_action="http://webmail.5fm.za.com/src/redirect.php";
+		$post_elements=array('login_domain'=>'5fm.za.com',
+							'login_username'=>$user,
+							'secretkey'=>$pass,
+							'login'=>'login'
+							 );
+		$res=$this->post($form_action,$post_elements,false,true,false,array(),false,false);
+		if ($this->checkResponse('login_post',$res))
+			$this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_adressbook='http://webmail.5fm.za.com/src/addressbook.php';
+		$this->login_ok=$url_adressbook;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("url_export",$res))
+			$this->updateDebugBuffer('url_export',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_export',$url,'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+
+		$form_action='http://webmail.5fm.za.com/plugins/abook_import_export/address_book_export.php';
+		$res=$this->post($form_action,array());
+		if ($this->checkResponse("contacts_file",$res))
+			$this->updateDebugBuffer('contacts_file',$form_action,'POST',true,array());
+		else
+			{
+			$this->updateDebugBuffer('contacts_file',$form_action,'POST',false,array());	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$temp=$this->parseCSV($res);	
+		$contacts=array();
+		foreach ($temp as $values)
+			{
+			if (!empty($values[4]))
+				$contacts[$values[4]]=array('first_name'=>(!empty($values[0])?$values[0]:false),
+												'middle_name'=>(!empty($values[2])?$values[2]:false),
+												'last_name'=>(!empty($values[1])?$values[1]:false),
+												'nickname'=>false,
+												'email_1'=>(!empty($values[4])?$values[4]:false),
+												'email_2'=>false,
+												'email_3'=>false,
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[11])?$values[11]:false),
+												'phone_home'=>(!empty($values[9])?$values[9]:false),			
+												'pager'=>false,
+												'address_home'=>false,
+												'address_city'=>(!empty($values[5])?$values[5]:false),
+												'address_state'=>(!empty($values[7])?$values[7]:false),
+												'address_country'=>(!empty($values[8])?$values[8]:false),
+												'postcode_home'=>(!empty($values[6])?$values[6]:false),
+												'company_work'=>(!empty($values[14])?$values[14]:false),
+												'address_work'=>false,
+												'address_work_city'=>(!empty($values[16])?$values[16]:false),
+												'address_work_country'=>(!empty($values[19])?$values[19]:false),
+												'address_work_state'=>(!empty($values[17])?$values[17]:false),
+												'address_work_postcode'=>(!empty($values[18])?$values[18]:false),
+												'fax_work'=>(!empty($values[21])?$values[21]:false),
+												'phone_work'=>(!empty($values[20])?$values[20]:false),
+												'website'=>(!empty($values[12])?$values[12]:false),
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;		
+		$res=$this->get('http://webmail.5fm.za.com/src/signout.php',true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/freemail.plg.php b/plugins/contact_importer/OpenInviter/plugins/freemail.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..68058ea54abd97d862acc711df9fab2719e66153
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/freemail.plg.php
@@ -0,0 +1,148 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Freemail',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a freemail.hu account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://freemail.hu/',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(freemail.hu)/i'),
+	);
+/**
+ * Freemail.hu Plugin
+ * 
+ * Imports user's contacts from Freemail.hu AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class freemail extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'userwithoutdomain',
+				'login_post'=>'auth=ok',
+				'url_adressbook'=>'first',			
+				);
+	
+	/**
+	 * Login function
+	 * fr
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='freemail';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+					
+		$res=$this->get("http://freemail.hu/levelezes/login.fm");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.doramail.com/scripts/common/index.main?signin=1&lang=us",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.doramail.com/scripts/common/index.main?signin=1&lang=us",'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$userStried=str_replace("@freemail.hu","",$user);
+		$form_action="http://belepes.t-online.hu/auth.html";
+		$post_elements=array('.formId'=>'commands.PlusAuth',
+							'backurl'=>'http://freemail.hu/levelezes/auth.fm?cmd=checkuser&page=levelezes',
+							'cmd'=>'plusauth',
+							'remoteform'=>1,
+							'user'=>$user,
+							'userwithoutdomain'=>$userStried,
+							'pass'=>'anaare12'
+							 );
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse('login_post',$res))
+			$this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_redirect=$this->getElementString($res,'url=','"');$url_adressbook=str_replace(array('levelezes/auth.fm?cmd=checkuser&page=levelezes&status=ok&auth=ok&','tid','email','freul_Id.hu'),array('cc/fsAddressBook.do?','ul_Tid','ul_Id','freemail.hu'),$url_redirect);
+		$this->login_ok=$url_adressbook;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		if ($this->checkResponse("url_adressbook",$res))
+			$this->updateDebugBuffer('url_adressbook',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_adressbook',$url,'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//tr[@class='data']";$data=$xpath->query($query);
+		foreach($data as $node)
+			{
+			$names=trim(preg_replace('/[^(\x20-\x7F)]*/','',utf8_decode((string)$node->childNodes->item(2)->nodeValue)));
+			$emails=trim(preg_replace('/[^(\x20-\x7F)]*/','',(utf8_decode((string)$node->childNodes->item(4)->nodeValue))));
+			if (!empty($emails)) $contacts[$emails]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$emails);
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;		
+		$res=$this->get('http://freemail.hu/levelezes/main.fm?page=logout',true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/friendfeed.plg.php b/plugins/contact_importer/OpenInviter/plugins/friendfeed.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..b6da0207f0647504d2f36570b5f5c28d65c4f539
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/friendfeed.plg.php
@@ -0,0 +1,191 @@
+<?php
+/*Import Friends from Friendfeed
+ * You can POST message to your Friends
+ */
+$_pluginInfo=array(
+	'name'=>'Friendfeed',
+	'version'=>'1.0.5',
+	'description'=>"Get the contacts from a Friendfeed account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'https://friendfeed.com/',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * FaceBook Plugin
+ * 
+ * Imports user's contacts from FaceBook and sends
+ * messages using FaceBook's internal system.
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class friendfeed extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+		
+	public $debug_array=array(
+				'initial_get'=>'email',
+				'login_post'=>'Photos',
+				'friends'=>'class="picture medium"',
+				'url_home'=>'share',
+				'send_message'=>'sid='
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='friendfeed';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("https://friendfeed.com/account/login",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"https://friendfeed.com/account/login",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"https://friendfeed.com/account/login",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$form_action="https://friendfeed.com/account/login";
+		$post_elements=$this->getHiddenElements($res);
+		$post_elements["email"]=$user;$post_elements["password"]=$pass;
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_friends="https://friendfeed.com/friends";
+		$this->login_ok=$url_friends;
+		return true;
+		}
+	
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		if ($this->checkResponse("friends",$res))
+			$this->updateDebugBuffer('friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		$contacts=$this->getElementDOM($res,"//img[@class='picture large']",'alt');
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $session_id The OpenInviter user's session ID
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $name)
+			{
+			$countMessages++;
+			$res=$this->get("http://friendfeed.com/filter/direct?dm={$name}",true);
+			if ($this->checkResponse('url_home',$res))
+				$this->updateDebugBuffer('url_home',"http://friendfeed.com/",'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_home',"http://friendfeed.com/",'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+				
+			$form_action="http://friendfeed.com/a/share";
+			$post_elements=array('streams'=>$name,
+								 'direct_view'=>1,
+								 'title'=>$message['body'],
+								 'at'=>$this->getElementString($res,'name="at" value="','"'),
+								 'maybetweet'=>0,
+								 '_nano'=>1
+								);	
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://friendfeed.com/account/logout",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/friendster.plg.php b/plugins/contact_importer/OpenInviter/plugins/friendster.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..1b97bfd9c4493a1955fee72991ff73b97a44db75
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/friendster.plg.php
@@ -0,0 +1,208 @@
+<?php
+/*Import Friends from Friendster.com
+ * You can send private message using Friendster system to your Friends
+ */
+$_pluginInfo=array(
+	'name'=>'Friendster',
+	'version'=>'1.0.9',
+	'description'=>"Get the contacts from a Friendster account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.friendster.com',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Friendster Plugin
+ * 
+ * Import user's contacts from Friendster and send messages
+ * using Friendster's internal messaging system
+ * 
+ * @author OpenInviter
+ * @version 1.0.8
+ */
+class friendster extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'_submitted',
+				'login_post'=>'dict:snWhosViewedMe',
+				'contacts'=>'thumbnaildelete',
+				'message_compose'=>'msg_type',
+				'message_send'=>'noliststyle noindent'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='friendster';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+				
+		$res=$this->get("http://www.friendster.com/");	
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.friendster.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.friendster.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$form_action="http://www.friendster.com/login.php";
+		$post_elements=array('tzoffset'=>1,
+							 'next'=>'/',
+							 '_submitted'=>1,
+							 'email'=>$user,
+							 'password'=>$pass						
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_friends="http://www.friendster.com/friends.php";	
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		
+		$res=$this->get($url,true);
+		$contacts=array();
+		$page_next=0;
+		$number_of_friends_array=explode("of ",$this->getElementString($res,'class="paginglinksmodule">','<'));
+		if (!empty($number_of_friends_array[1])) $total_friends=$number_of_friends_array[1];
+		else $total_friends=0;
+		do
+			{
+			$page_next++;
+			
+			//go to url friends
+			if ($this->checkResponse('contacts',$res))
+				$this->updateDebugBuffer('contacts',$url,'GET');
+			else
+				{
+				$this->updateDebugBuffer('contacts',$url,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+			$xpath=new DOMXPath($doc);$query="//span[@class='strong']";$data=$xpath->query($query);
+			foreach ($data as $node)
+				$contacts[str_replace("http://profiles.friendster.com/","",(string)$node->firstChild->getAttribute('href'))]=(string)$node->firstChild->nodeValue;
+			$url_next="{$url}?page={$page_next}";
+			$res=$this->get($url_next,true);		 
+			}
+		while ($total_friends>count($contacts)+1);	
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach ($contacts as $id=>$name)
+			{
+			$countMessages++;
+			$res=$this->get("http://www.friendster.com/sendmessage.php?uid={$id}",true);
+			if ($this->checkResponse('message_compose',$res))
+				$this->updateDebugBuffer('message_compose',"http://www.friendster.com/sendmessage.php?uid={$id}",'GET');
+			else
+				{
+				$this->updateDebugBuffer('message_compose',"http://www.friendster.com/sendmessage.php?uid={$id}",'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+				
+			$form_action="http://www.friendster.com/sendmessage.php";
+			$post_elements=$this->getHiddenElements($res);
+			$post_elements['message']=$message['body'];
+			$post_elements['subject']=$message['subject'];
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse('message_send',$res))
+				$this->updateDebugBuffer('message_send',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('message_send',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}		
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.friendster.com/logout.php",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}
+	
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/gawab.plg.php b/plugins/contact_importer/OpenInviter/plugins/gawab.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..0e73b76a5c36b5c86361d41a3b7d05f3dbd755ed
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/gawab.plg.php
@@ -0,0 +1,176 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Gawab',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a Gawab account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.gawab.com/default.php',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(gawab.com)/i'),
+	);
+/**
+ * Gawab Plugin
+ * 
+ * Imports user's contacts from Gawab's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class gawab extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'service',
+				'post_login'=>'&_host',
+				'file_contacts'=>'Name',
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='gawab';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://www.gawab.com/default.php",true);
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"http://www.gawab.com/default.php",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.gawab.com/default.php",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		$login_array=explode("@",$user);
+		$form_action="http://mail.gawab.com/login";
+		$post_elements=array('service'=>'webmail',
+							 'username'=>$login_array[0],
+							 'domain'=>$login_array[1],
+							 'password'=>$pass
+							 );
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse('post_login',$res))
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',true,$post_elements);
+		else 
+			{
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		$host=$this->getElementString($res,'&_host=',"'");
+		$url_file_contacts="http://mail.gawab.com/{$host}/gwebmail?_module=contact&_action=export&format=outlook&_address=dbautu@gawab.com";
+		$this->login_ok=$url_file_contacts;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse('file_contacts',$res))
+			$this->updateDebugBuffer('file_contacts',$url,'GET');
+		else 
+			{
+			$this->updateDebugBuffer('file_contacts',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		
+		
+		$temp=$this->parseCSV($res);
+		$contacts=array();
+		foreach ($temp as $values)
+			{
+			if (!empty($values[1]))
+				$contacts[$values[1]]=array('first_name'=>(!empty($values[0])?$values[0]:false),
+												'middle_name'=>false,
+												'last_name'=>false,
+												'nickname'=>false,
+												'email_1'=>(!empty($values[1])?$values[1]:false),
+												'email_2'=>(!empty($values[2])?$values[2]:false),
+												'email_3'=>(!empty($values[3])?$values[3]:false),
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[5])?$values[5]:false),
+												'phone_home'=>(!empty($values[9])?$values[9]:false),			
+												'pager'=>(!empty($values[6])?$values[6]:false),
+												'address_home'=>(!empty($values[12])?$values[12]:false),
+												'address_city'=>false,
+												'address_state'=>false,
+												'address_country'=>false,
+												'postcode_home'=>false,
+												'company_work'=>(!empty($values[7])?$values[7]:false),
+												'address_work'=>(!empty($values[16])?$values[16]:false),
+												'address_work_city'=>false,
+												'address_work_country'=>false,
+												'address_work_state'=>false,
+												'address_work_postcode'=>false,
+												'fax_work'=>(!empty($values[15])?$values[15]:false),
+												'phone_work'=>(!empty($values[13])?$values[13]:false),
+												'website'=>(!empty($values[12])?$values[12]:false),
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+					
+		}
+	
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.gawab.com/",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+	
+	}	
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/gmail.plg.php b/plugins/contact_importer/OpenInviter/plugins/gmail.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..2e71956676479e5700efdcc6ffb362a4beec07a2
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/gmail.plg.php
@@ -0,0 +1,168 @@
+<?php
+/*This plugin import Gmail contacts
+ *You can send normal email   
+ */
+$_pluginInfo=array(
+	'name'=>'GMail',
+	'version'=>'1.4.7',
+	'description'=>"Get the contacts from a GMail account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://google.com',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	'detected_domains'=>array('/(gmail.com)/i','/(googlemail.com)/i'),
+	);
+/**
+ * GMail Plugin
+ * 
+ * Imports user's contacts from GMail's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.4.1
+ */
+class gmail extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	
+	public $debug_array=array(
+	  'login_post'=>'Auth=',
+	  'contact_xml'=>'xml'
+	);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='gmail';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+			
+		$post_elements=array('accountType'=>'HOSTED_OR_GOOGLE','Email'=>$user,'Passwd'=>$pass,'service'=>'cp','source'=>'OpenInviter-OpenInviter-'.$this->base_version);
+	    $res=$this->post("https://www.google.com/accounts/ClientLogin",$post_elements,true);
+	    if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"https://www.google.com/accounts/ClientLogin",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"https://www.google.com/accounts/ClientLogin",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+	    
+		$auth=substr($res,strpos($res,'Auth=')+strlen('Auth='));
+		
+		$this->login_ok=$auth;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if ($this->login_ok===false)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $auth=$this->login_ok; 
+		$res=$this->get("http://www.google.com/m8/feeds/contacts/default/full?max-results=10000",true,false,true,false,array("Authorization"=>"GoogleLogin auth={$auth}"));
+		if ($this->checkResponse("contact_xml",$res))
+			$this->updateDebugBuffer('contact_xml','http://www.google.com/m8/feeds/contacts/default/full?max-results=10000','GET');
+		else
+			{
+			$this->updateDebugBuffer('contact_xml','http://www.google.com/m8/feeds/contacts/default/full?max-results=10000','GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//entry";$data=$xpath->query($query);
+		foreach ($data as $node) 
+			{
+			$entry_nodes=$node->childNodes;
+			$tempArray=array();	
+			foreach($entry_nodes as $child)
+				{ 
+				$domNodesName=$child->nodeName;
+				switch($domNodesName)
+					{
+					case 'title' : { $tempArray['first_name']=$child->nodeValue; } break;
+					case 'organization': { $tempArray['organization']=$child->nodeValue; } break;
+					case 'email' : 
+						{ 
+						if (strpos($child->getAttribute('rel'),'home')!==false)
+							$tempArray['email_1']=$child->getAttribute('address');
+						elseif(strpos($child->getAttribute('rel'),'work')!=false)  	
+							$tempArray['email_2']=$child->getAttribute('address');
+						elseif(strpos($child->getAttribute('rel'),'other')!==false)  	
+							$tempArray['email_3']=$child->getAttribute('address');
+						} break;
+					case 'phonenumber' :
+						{
+						if (strpos($child->getAttribute('rel'),'mobile')!==false)
+							$tempArray['phone_mobile']=$child->nodeValue;
+						elseif(strpos($child->getAttribute('rel'),'home')!==false)  	
+							$tempArray['phone_home']=$child->nodeValue;	
+						elseif(strpos($child->getAttribute('rel'),'work_fax')!==false)  	
+							$tempArray['fax_work']=$child->nodeValue;
+						elseif(strpos($child->getAttribute('rel'),'pager')!=false)  	
+							$tempArray['pager']=$child->nodeValue;
+						} break;
+					case 'postaladdress' :
+						{
+						if (strpos($child->getAttribute('rel'),'home')!==false)
+							$tempArray['address_home']=$child->nodeValue;
+						elseif(strpos($child->getAttribute('rel'),'work')!==false)  	
+							$tempArray['address_work']=$child->nodeValue;
+						} break;	
+					}
+				}
+			if (!empty($tempArray['email_1']))$contacts[$tempArray['email_1']]=$tempArray;
+			if(!empty($tempArray['email_2'])) $contacts[$tempArray['email_2']]=$tempArray;
+			if(!empty($tempArray['email_3'])) $contacts[$tempArray['email_3']]=$tempArray;
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+	
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+	}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/gmx_net.plg.php b/plugins/contact_importer/OpenInviter/plugins/gmx_net.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..a08dc3c714e39edb844f9c237ab8ce7d51a203fe
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/gmx_net.plg.php
@@ -0,0 +1,202 @@
+<?php
+/*This plugin import GMX.net contacts
+ *You can send normal email   
+ */
+$_pluginInfo=array(
+	'name'=>'GMX.net',
+	'version'=>'1.0.9',
+	'description'=>"Get the contacts from a GMX.net account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.gmx.net',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(gmx.de)/i','/(gmx.at)/i','/(gmx.ch)/i','/(gmx.net)/i'),
+	);
+/**
+ * GMX.net Plugin
+ * 
+ * Imports user's contacts from GMX.net's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.4
+ */
+class gmx_net extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'uinguserid',
+				'login'=>'Adressbuch',
+				'export_file'=>'b_export',
+				'contacts_file'=>'","'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='gmx_net';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+					
+		$res=$this->get("http://www.gmx.net/",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('file_contacts',"http://www.gmx.net/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('file_contacts',"http://www.gmx.net/",'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$form_action="http://service.gmx.net/de/cgi/login";
+		$post_elements=array('AREA'=>1,
+							'EXT'=>'redirect',
+							'EXT2'=>'',
+							'uinguserid'=>$this->getElementString($res,'name="uinguserid" value="','"'),
+							'id'=>$user,
+							'p'=>$pass,
+							'dlevel'=>'c',
+							'browsersupported'=>'true',
+							'jsenabled'=>'false'
+							 );
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login",$res))
+			$this->updateDebugBuffer('login',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_adress=str_replace("site=0","site=importexport","http://service.gmx.net/de/cgi/addrbk.fcgi?CUSTOMERNO=".html_entity_decode($this->getElementString($res,'http://service.gmx.net/de/cgi/addrbk.fcgi?CUSTOMERNO=','"')));
+		#echo $url_adress;
+		$this->login_ok=$url_adress;
+		file_put_contents($this->getLogoutPath(),$url_adress);
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		if ($this->checkResponse("export_file",$res))
+			$this->updateDebugBuffer('export_file',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('export_file',$url,'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$form_action="http://service.gmx.net/de/cgi/addrbk.fcgi";
+		$post_elements=$this->getHiddenElements($res);$post_elements['dataformat']='o2002';$post_elements['language']='english';$post_elements['b_export']='Export starten';
+		$res=$this->post($form_action,$post_elements);
+	
+		if ($this->checkResponse("contacts_file",$res)){
+			$this->updateDebugBuffer('contacts_file',$form_action,'POST',true,$post_elements);
+		}else{
+			$this->updateDebugBuffer('contacts_file',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+		}
+		$temp=$this->parseCSV($res);
+		$contacts=array();
+		
+		foreach ($temp as $values)
+			{
+			if (!empty($values[29]))
+				$contacts[$values[29]]=array('first_name'=>(!empty($values[0])?$values[0]:false),
+												'middle_name'=>(!empty($values[2])?$values[2]:false),
+												'last_name'=>(!empty($values[1])?$values[1]:false),
+												'nickname'=>false,
+												'email_1'=>(!empty($values[29])?$values[29]:false),
+												'email_2'=>(!empty($values[30])?$values[30]:false),
+												'email_3'=>(!empty($values[31])?$values[31]:false),
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[11])?$values[11]:false),
+												'phone_home'=>(!empty($values[9])?$values[9]:false),			
+												'pager'=>false,
+												'address_home'=>false,
+												'address_city'=>(!empty($values[5])?$values[5]:false),
+												'address_state'=>(!empty($values[7])?$values[7]:false),
+												'address_country'=>(!empty($values[8])?$values[8]:false),
+												'postcode_home'=>(!empty($values[6])?$values[6]:false),
+												'company_work'=>(!empty($values[14])?$values[14]:false),
+												'address_work'=>false,
+												'address_work_city'=>(!empty($values[16])?$values[16]:false),
+												'address_work_country'=>(!empty($values[19])?$values[19]:false),
+												'address_work_state'=>(!empty($values[17])?$values[17]:false),
+												'address_work_postcode'=>(!empty($values[18])?$values[18]:false),
+												'fax_work'=>(!empty($values[21])?$values[21]:false),
+												'phone_work'=>(!empty($values[20])?$values[20]:false),
+												'website'=>(!empty($values[12])?$values[12]:false),
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		if (file_exists($this->getLogoutPath()))
+			{
+			$url=file_get_contents($this->getLogoutPath());
+			$res=$this->get($url,true);		 
+			$logout_url="https://service.gmx.net/de/cgi/nph-logout?CUSTOMERNO=".$this->getElementString($res,"https://service.gmx.net/de/cgi/nph-logout?CUSTOMERNO=",'"');
+			$res=$this->get($logout_url,true);
+			}
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/graffiti.plg.php b/plugins/contact_importer/OpenInviter/plugins/graffiti.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..f12f3eb21abb6a05e1bcc0e5d53d6c8aa5ddc964
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/graffiti.plg.php
@@ -0,0 +1,141 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Grafitti',
+	'version'=>'1.0.2',
+	'description'=>"Get the contacts from a Graffiti account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.graffiti.net/scripts/common/index.main?signin=1&lang=us',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Bordermail Plugin
+ * 
+ * Imports user's contacts from Bordermail AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class graffiti extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'login',
+				'login_post'=>'frontpage',
+				'url_contacts'=>'input'
+				
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='graffiti';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+					
+		$res=$this->get("http://www.graffiti.net/scripts/common/index.main?signin=1&lang=us");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.graffiti.net/scripts/common/index.main?signin=1&lang=us",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.graffiti.net/scripts/common/index.main?signin=1&lang=us",'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+	
+		$form_action="http://www.graffiti.net/scripts/common/proxy.main";
+		$post_elements=array('domain'=>'graffiti.net','show_frame'=>'Enter','login'=>$user,'password'=>$pass,'v'=>$this->getElementString($res,'name="v" value="','"'),'u'=>$this->getElementString($res,'name="u" value="','"'));
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse('login_post',$res))
+			$this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$this->login_ok="http://mymail.graffiti.net/scripts/addr/addressbook.cgi?showaddressbook=1";
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		if ($this->checkResponse("url_contacts",$res))
+			$this->updateDebugBuffer('url_contacts',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_contacts',$url,'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//input";$data=$xpath->query($query);
+		foreach ($data as $node)
+			{
+			$nodeValue=$node->getAttribute('value');$email=$this->getElementString($nodeValue,'<','>');$name=$this->getElementString($nodeValue,'to_"','"');
+			if (!empty($email)) $contacts[$email]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$email);
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://mymail.graffiti.net/scripts/mail/Outblaze.mail?logout=1&.noframe=1&a=1&",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/hi5.plg.php b/plugins/contact_importer/OpenInviter/plugins/hi5.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..78e51748e6846dd9ed916954e543f6f0c6483dbb
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/hi5.plg.php
@@ -0,0 +1,206 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Hi5',
+	'version'=>'1.1.4',
+	'description'=>"Get the contacts from a Hi5 account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.hi5.com',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Hi5 Plugin
+ * 
+ * Imports user's contacts from Hi5 and sends messages
+ * using Hi5's internal messaging system.
+ * 
+ * @author OpenInviter
+ * @version 1.0.4
+ */
+class hi5 extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=50;
+	
+	public $debug_array=array(
+				'initial_get'=>'getAge',
+				'login_post'=>'friends',
+				'url_friends'=>'friend-name',
+				'url_message'=>'toIds',
+				'send_message'=>'reqs'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='hi5';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+
+		$res=$this->get("http://www.hi5.com/");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.hi5.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.hi5.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$form_action="http://www.hi5.com/friend/login.do";
+		$post_elements=array(
+							'email'=>$user,
+							'password'=>$pass,
+							'remember'=>'on'
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_friends="http://www.hi5.com/friend/viewFriends.do?abredirect=true";
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		$contacts=array();$mail_contacts=array();$url_next=false;
+		if ($this->checkResponse("url_friends",$res))
+			$this->updateDebugBuffer('url_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}	
+		$nr_of_friends=(int)$this->getElementString($res,'id="pagination-number">','<');$page=20;
+		do
+			{
+			$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+			$xpath=new DOMXPath($doc);$query="//div[@class='friend-name']";$data=$xpath->query($query);$id=false;
+			foreach ($data as $node)
+				{
+				$name=$node->childNodes->item(1)->nodeValue;$href=$node->childNodes->item(1)->getAttribute('href');$id=$this->getElementString($href,'p','-');
+				if (!empty($id)) $contacts[$id]=!empty($name)?$name:false;
+				}
+			$url_next_array=$this->getElementDOM($res,"//a[@class='link_pagination_arrow']",'href');
+			if (!empty($url_next_array[0])) 
+				{$url_next=$this->getElementString($url_next_array[0],'/','offset=')."offset={$page}";$page+=20;$res=$this->get("http://hi5.com/{$url_next}",true);}
+			else $id=false;		
+			}
+		while($id);
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $id=>$name)
+			{
+			$countMessages++;
+			$url_send_message="http://hi5.com/friend/mail/displayComposeMail.do?toIds={$id}";
+			$res=$this->get($url_send_message);
+			if ($this->checkResponse("url_message",$res))
+				$this->updateDebugBuffer('url_message',$url_send_message,'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_message',$url_send_message,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			$form_action="http://hi5.com/friend/mail/sendMail.do";
+			$post_elements=array('toIds'=>$this->getElementString($res,"idToName['","'"),
+								 'subject'=>$message['subject'],
+								 'method'=>'send',
+								 'body'=>$message['body'],
+								 'timestamp'=>$this->getElementString($res,'name="timestamp" value="','"'),
+								 'mailOp'=>'',
+								 'senderId'=>'',
+								 'msgId'=>'',
+								 'submitSend'=>'Send Message'
+								);
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',$url_send_message,'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',$url_send_message,'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://hi5.com/friend/logoff.do",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/hotmail.plg.php b/plugins/contact_importer/OpenInviter/plugins/hotmail.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..983cc1e59962b9137ed79cc9f9b32cb888e00935
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/hotmail.plg.php
@@ -0,0 +1,224 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Live/Hotmail',
+	'version'=>'1.6.2',
+	'description'=>"Get the contacts from a Windows Live/Hotmail account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://login.live.com/login.srf?id=2',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(hotmail)/i','/(live)/i','/(msn)/i','/(chaishop)/i'),
+	);
+/**
+ * Live/Hotmail Plugin
+ * 
+ * Imports user's contacts from Windows Live's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.5.8
+ */
+class hotmail extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+		
+	public $debug_array=array(
+				'initial_get'=>'LoginOptions',
+				'login_post'=>'location.replace',
+				'first_redirect'=>'self.location.href',
+				'url_inbox'=>'peopleUrlDomain',
+				'message_at_login'=>'peopleUrlDomain',
+				'url_sent_to'=>'ContactList.aspx',
+				'get_contacts'=>'\x26\x2364\x3',
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='hotmail';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;		
+		$res=$this->get("http://login.live.com/login.srf?id=2",true);
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"http://login.live.com/login.srf?id=2",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('initial_get',"http://login.live.com/login.srf?id=2",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		
+		if (strlen($pass) > 16) $pass=substr($pass, 0, 16);
+		$post_action=$this->getElementString($res,'method="POST" target="_top" action="','"');
+		$post_elements=$this->getHiddenElements($res);$post_elements["LoginOptions"]=3;$post_elements["login"]=$user;$post_elements["passwd"]=$pass;
+		$res=$this->post($post_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$post_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$post_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$url_redirect=$this->getElementString($res,'.location.replace("','"');
+		$res=$this->get($url_redirect,true);
+		if ($this->checkResponse('first_redirect',$res))
+			$this->updateDebugBuffer('first_redirect',"{$url_redirect}",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('first_redirect',"{$url_redirect}",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+	
+		if(strpos($res,"self.location.href = '")!==false)
+			{
+			$url_redirect=urldecode(str_replace('\x', '%',$this->getElementString($res,"self.location.href = '","'")));
+			$base_url="http://".$this->getElementString($url_redirect,'http://','mail/');
+			$res=$this->get($url_redirect,true);
+			}
+			
+		if (strpos($res,'MessageAtLoginForm')!==false)
+			{
+			$form_action=$base_url.'mail/'.html_entity_decode($this->getElementString($res,'method="post" action="','"'));
+			$post_elements=$this->getHiddenElements($res);$post_elements['TakeMeToInbox']='Continue';
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("message_at_login",$res))
+				$this->updateDebugBuffer('message_at_login',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('message_at_login',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			}
+		else
+			{
+			if ($this->checkResponse('url_inbox',$res))
+			$this->updateDebugBuffer('url_inbox',"{$url_redirect}",'GET');
+			else 
+				{
+				$this->updateDebugBuffer('url_inbox',"{$url_redirect}",'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;	
+				}
+			}
+		
+		$this->login_ok=$base_url;
+		file_put_contents($this->getLogoutPath(),$base_url);
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $base_url=$this->login_ok;
+		$res=$this->get("{$base_url}mail/EditMessageLight.aspx?n=");
+		if ($this->checkResponse('url_sent_to',$res))
+			$this->updateDebugBuffer('url_sent_to',"{$base_url}mail/EditMessageLight.aspx?n=",'GET');
+			else 
+				{
+				$this->updateDebugBuffer('url_sent_to',"{$base_url}mail/EditMessageLight.aspx?n=",'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;	
+				}
+	
+		$urlContacts="{$base_url}mail/ContactList.aspx".$this->getElementString($res,'ContactList.aspx','"');
+		$res=$this->get($urlContacts);
+		if ($this->checkResponse('get_contacts',$res))
+			$this->updateDebugBuffer('get_contacts',"{$urlContacts}",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('get_contacts',"{$urlContacts}",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		
+		$contacts=array();
+		$bulkStringArray=explode("['",$res);unset($bulkStringArray[0]);unset($bulkStringArray[count($bulkStringArray)]);
+		foreach($bulkStringArray as $stringValue)
+			{
+			$stringValue=str_replace(array("']],","'"),'',$stringValue);
+			if (strpos($stringValue,'0,0,0,')!==false) 
+				{
+				$tempStringArray=explode(',',$stringValue);
+				if (!empty($tempStringArray[2])) $name=html_entity_decode(urldecode(str_replace('\x', '%', $tempStringArray[2])),ENT_QUOTES, "UTF-8");
+				}
+			else
+				{
+				$emailsArray=array();$emailsArray=explode('\x26\x2364\x3b',$stringValue);
+				if (count($emailsArray)>0) 
+					{
+					//get all emails
+					$bulkEmails=explode(',',$stringValue);
+					if (!empty($bulkEmails)) foreach($bulkEmails as $valueEmail)
+						{ $email=html_entity_decode(urldecode(str_replace('\x', '%', $valueEmail))); if(!empty($email)) { $contacts[$email]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$email);$email=false; } }
+					$name=false;	
+					}	
+				}
+			}
+		if (!empty($contacts[$this->service_user])) unset($contacts[$this->service_user]);
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		if (file_exists($this->getLogoutPath()))
+			{
+			$url=file_get_contents($this->getLogoutPath());
+			$url_logout=$url."mail/logout.aspx";
+			$res=$this->get($url_logout,true);
+			}
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+		
+	}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/hushmail.plg.php b/plugins/contact_importer/OpenInviter/plugins/hushmail.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..233de39eedf8a70b264680c17db9eef27444fb3a
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/hushmail.plg.php
@@ -0,0 +1,152 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Hushmail',
+	'version'=>'1.0.4',
+	'description'=>"Get the contacts from an Hushmail account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'https://m.hush.com/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	); 
+/**
+ * Hushmail Plugin
+ * 
+ * Imports user's contacts from Hushmail's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */	
+class hushmail extends openinviter_base
+{
+	private $login_ok=false;
+	public $showContacts=true;
+	protected $timeout=30;
+	public $debug_array=array(
+				'initial_get'=>'passphrase',
+				'login_post'=>'3Dmobile',
+				'get_contacts'=>'compose_from',
+				'url_contacts'=>'listItem'
+				);
+
+/**
+ * Login function
+ * 
+ * Makes all the necessary requests to authenticate
+ * the current user to the server.
+ * 
+ * @param string $user The current user.
+ * @param string $pass The password for the current user.
+ * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+ */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='hushmail';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		$res=$this->get("https://m.hush.com/",true);
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"https://m.hush.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"https://m.hush.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$form_action='https://m.hush.com'.$this->getElementString($res,'action="','"');
+		$post_elements=$this->getHiddenElements($res);$post_elements['user']=$user;$post_elements['passphrase']=$pass;
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_compose="https://m.hush.com/m/{$user}@hushmail.com/compose?next=%3Fskin%3Dmobile%26save_skin%3D1";
+		$this->login_ok=$url_compose;
+		return true;
+		}
+	
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */			
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url = $this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse('get_contacts',$res))
+			$this->updateDebugBuffer('get_contacts',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_contacts',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$form_action="https://m.hush.com".$this->getElementString($res,'action="','"');
+		$post_elements=$this->getHiddenElements($res);$post_elements['compose_from']="{$this->service_user}@hushmail.com";$post_elements['compose_encrypt']='on';$post_elements['compose_sign']='on';$post_elements['compose_save']='on';$post_elements['action']='Add contact (to)';
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("url_contacts",$res))
+			$this->updateDebugBuffer('url_contacts',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('url_contacts',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+			
+		$contacts=array();
+		$contacts_string_array=$this->getElementDOM($res,"//input[@type='checkbox']",'value');
+		foreach($contacts_string_array as $temp)
+			{
+			$temp=str_replace('>','',str_replace('<','',str_replace('"','',urldecode($temp))));
+			$contacts_array_temp=explode(' ',$temp);
+			if (isset($contacts_array_temp[1])) $contacts[$contacts_array_temp[1]]=array('first_name'=>(isset($contacts_array_temp[0])?$contacts_array_temp[0]:false),'email_1'=>$contacts_array_temp[1]);
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+		
+		
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */		
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$logout_url="https://m.hush.com/authentication/caracuraa@hushmail.com/logout?skin=mobile&next_webapp_name=contacts_webapp&next_webapp_url_name=contacts";
+		$res = $this->get($logout_url,true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/hyves.plg.php b/plugins/contact_importer/OpenInviter/plugins/hyves.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..c57c6f1600d2da09c8655cdb5fc2b8d5a8caa8fd
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/hyves.plg.php
@@ -0,0 +1,236 @@
+<?php
+/*Import Friends from Hyves
+ * You can Post Messages using Hyves system
+ */
+$_pluginInfo=array(
+	'name'=>'Hyves',
+	'version'=>'1.1.5',
+	'description'=>"Get the contacts from a Hyves account",
+	'base_version'=>'1.8.1',
+	'type'=>'social',
+	'check_url'=>'http://www.hyves.nl/?l1=mo',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * http://hyves.net/ Plugin
+ * 
+ * Import user's contacts from Hyves and send private messages
+ * using Hyves system
+ * 
+ * @author OpenInviter
+ * @version 1.1.2
+ */
+class hyves extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'accesskey="1"',
+				'url_login'=>'auth_username',
+				'login_post'=>'hyver',
+				'url_profile'=>'listitem',
+				'get_friends'=>'memberlistname',
+				'url_friend'=>'accesskey="2"',
+				'url_send_message'=>'postman',
+				'send_message'=>'color: green;'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='hyves';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+
+		$res=$this->get("http://www.hyves.nl/?l1=mo");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.hyves.nl/?l1=mo",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.hyves.nl/?l1=mo",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$url_login_array=$this->getElementDOM($res,"//a[@accesskey='1']",'href');
+		$res=$this->get('http://www.hyves.nl'.$url_login_array[0],true);
+		if ($this->checkResponse("url_login",$res))
+			$this->updateDebugBuffer('$url_login',"http://www.hyves.nl".$url_login_array[0],'GET');
+		else
+			{
+			$this->updateDebugBuffer('$url_login',"http://www.hyves.nl".$url_login_array[0],'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$form_action='http://www.hyves.nl/'.html_entity_decode($this->getElementString($res,'form action="','"'));
+		$post_elements=$this->getHiddenElements($res);$post_elements['auth_username']=$user;$post_elements['auth_password']=$pass;$post_elements['login']='ok';
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$url_logout='http://www.hyves.nl/?module=authentication&action=logoutMobile'.html_entity_decode($this->getElementString($res,"?module=authentication&amp;action=logoutMobile",'"'));
+		$url_friends="http://www.hyves.nl/mini/hyver/{$user}/list/?&startpos=0";
+		$this->login_ok=$url_friends;
+		file_put_contents($this->getLogoutPath(),$url_logout);
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;	
+		$res=$this->get($url);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$contacts=array();$hasContacts=true;$page=0;
+		while ($hasContacts)
+			{
+			$hasContacts=false;
+			$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+			$xpath=new DOMXPath($doc);$query="//a[@class='memberlistname'][not(contains(@href,'".$this->service_user."'))]";$data=$xpath->query($query);
+			foreach($data as $node) 
+				{$href=$node->getAttribute('href');$name=(string)$node->nodeValue;if (!empty($name)) $name=$name[0].$this->getElementString($name,$name[0],'(');if (!empty($href)) {$contacts[$href]=!empty($name)?utf8_decode($name):false;$hasContacts=true;}}
+			$page=$page+10;
+			$urlNext="http://www.hyves.nl/mini/hyver/{$this->service_user}/list/?&startpos={$page}";
+			$res=$this->get($urlNext,true);
+			}
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $href=>$name)
+			{	
+			$countMessages++;
+			$res=$this->get($href,true);
+			if ($this->checkResponse("url_friend",$res))
+				$this->updateDebugBuffer('url_friend',$href,'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_friend',$href,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			
+			$url_send_message_array=$this->getElementDOM($res,"//a[@accesskey='2']",'href');
+			$url_send_message='http://www.hyves.nl'.urldecode($url_send_message_array[0]);
+			$res=$this->get($url_send_message,true);			
+			if ($this->checkResponse("url_send_message",$res))
+				$this->updateDebugBuffer('url_send_message',$url_send_message,'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_send_message',$url_send_message,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			$form_action="http://www.hyves.nl/?l1=mo&l2=mb&l3=hm&l4=sendi";
+			$post_elements=array(
+								'postman'=>'Message/send',
+								'postman_secret'=>$this->getElementString($res,'postman_secret" value="','"'),
+								'sitepositionurl'=>$this->getElementString($res,'name="sitepositionurl" value="','"'),
+								'sendmessage_to'=>$this->getElementString($res,'sendmessage_to" value="','"'),
+								'sendmessage_subject'=>$message['subject'],
+								'sendmessage_body'=>$message['body'],
+								'sendmessage_type'=>2,
+								'bsend'=>'send'
+								);
+			
+		 	$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		if (file_exists($this->getLogoutPath()))
+			{
+			$url_logout=file_get_contents($this->getLogoutPath());
+			$res=$this->get($url_logout,true);
+			}
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/inbox.plg.php b/plugins/contact_importer/OpenInviter/plugins/inbox.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..669645872be005e2a9d0f5c899a7eda14a951228
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/inbox.plg.php
@@ -0,0 +1,175 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Inbox.com',
+	'version'=>'1.0.4',
+	'description'=>"Get the contacts from an Inbox.com account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'https://www.inbox.com/xm/login.aspx',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(inbox.com)/i'),
+	);
+/**
+ * Inbox.com Plugin
+ * 
+ * Imports user's contacts from Inbox.com's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class inbox extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'ACT',
+				'post_login'=>'Location:',
+				'inbox'=>'accesskey="8"',
+				'contacts'=>'checkbox'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='inbox';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("https://www.inbox.com/xm/login.aspx");
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"https://www.inbox.com/xm/login.aspx",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('initial_get',"https://www.inbox.com/xm/login.aspx",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		$form_action="https://www.inbox.com/xm/login.aspx";
+		$post_elements=array('ACT'=>'LGN',
+							 'login'=>$user,
+							 'pwd'=>$pass,
+							 'cmdLgn'=>'Sign In'
+						    );
+		$res=$this->post($form_action,$post_elements,false,true,false,array(),false,false);
+		if ($this->checkResponse('post_login',$res))
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',true,$post_elements);
+		else 
+			{
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+			
+		$base_url="http://".$this->getElementString($this->getElementString($res,"Location: ",PHP_EOL),"http://",'?ACT');
+		$url_redirect=trim(str_replace(" [following]","",$this->getElementString($res,"Location: ",PHP_EOL)));
+		$res=$this->get($url_redirect,true);
+		if ($this->checkResponse('inbox',$res))
+			$this->updateDebugBuffer('inbox',$url_redirect,'GET');
+		else 
+			{
+			$this->updateDebugBuffer('inbox',$url_redirect,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		
+		
+		$url_contacts_array=$this->getElementDOM($res,"//a[@accesskey='8']",'href');
+		$url_contacts=array();$url_contacts=array($base_url,$url_contacts_array[0]);
+		$this->login_ok=$url_contacts;
+		file_put_contents($this->getLogoutPath(),$url_redirect);	
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		//go to url adressbook
+		$res=$this->get($url[0].$url[1],true);
+
+		$form_action=$url[0]."default.aspx";$post_elements=$this->getHiddenElements($res);$post_elements['cmdADDR']="To: Addr";
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse('contacts',$res))
+			$this->updateDebugBuffer('contacts',"{$form_action}",'POST',true,$post_elements);
+		else 
+			{
+			$this->updateDebugBuffer('contacts',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		$contacts=array();$page=1;
+		$total_nr_friends_array=explode("of ",$this->getElementString($res,'<td align="center">','<'));if (!empty($total_nr_friends_array[1])) $total_nr_friends=trim($total_nr_friends_array[1]);else $total_nr_friends=0;$friend_contor=0;
+		while($total_nr_friends>$friend_contor)
+			{
+			$contacts_temp=$this->getElementDOM($res,"//input[@type='checkbox']",'value');
+			foreach($contacts_temp as $value)
+				{
+				$contacts_array=explode("<",$value);
+				if (!empty($contacts_array[1])) $contacts[str_replace(">","",$contacts_array[1])]=(!empty($contacts_array[0])?trim($contacts_array[0]):false);
+				else $contacts[$value]=$value;
+				$friend_contor++;
+				}
+			$page++;$res=$this->get("{$form_action}?ACT=CPAB&AF=1&CID=-1&PG={$page}");
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		if (file_exists($this->getLogoutPath()))
+			{
+			$url=file_get_contents($this->getLogoutPath());
+			$url_logout=str_replace('?ACT=INIT','default.aspx?ACT=LGO',$url);
+			$res=$this->get($url_logout,true);
+			}
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/india.plg.php b/plugins/contact_importer/OpenInviter/plugins/india.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..027081c96bd96451f48464dfb8271fe30340e9c6
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/india.plg.php
@@ -0,0 +1,179 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'India',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from an India account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://mail.india.com/scripts/common/index.main?signin=1&lang=us',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * India plugin
+ * 
+ * Imports user's contacts from India AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.1
+ */
+class india extends OpenInviter_base
+{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array('initial_get'=>'show_frame',
+			  				  'login_post'=>'ob=',
+			  				  'file_contacts'=>'Name'
+							 );
+
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user, $pass)
+	{
+		$this->resetDebugger();
+		$this->service='indiatimes';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res = $this->get("http://mail.india.com/scripts/common/index.main?signin=1&lang=us");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://mail.india.com/scripts/common/index.main?signin=1&lang=us",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://mail.india.com/scripts/common/index.main?signin=1&lang=us",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://mail.india.com/scripts/common/proxy.main";
+		$post_elements=array('show_frame'=>'Enter',
+							 'action'=>'login',
+							 'domain'=>'india.com',
+							 'u'=>$this->getElementString($res,'name="u" value="','"'),
+							 'v'=>$this->getElementString($res,'name="v" value="','"'),
+							 'mail_language'=>'us',
+							 'login'=>$user,
+							 'password'=>$pass,
+							); 					
+							
+ 		$res=$this->post($form_action,$post_elements,true);
+ 		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_export="http://mymail.india.com/scripts/addr/external.cgi?.ob=a&gab=1";
+		$this->login_ok=$url_export;
+		return true;		
+	} 
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		
+		$form_action=$url;
+		$post_elements=array('showexport'=>'showexport','action'=>'export','login'=>"{$this->service_user}@india.com",'format'=>'csv');
+		$res=$this->post($form_action,$post_elements);
+		if ($this->checkResponse("file_contacts",$res))
+			$this->updateDebugBuffer('file_contacts',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('file_contacts',$form_action,'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+							
+		$temp=$this->parseCSV($res);
+		$contacts=array();
+		foreach ($temp as $values)
+			{
+			if (!empty($values[4]))
+				$contacts[$values[4]]=array('first_name'=>(!empty($values[0])?$values[0]:false),
+												'middle_name'=>(!empty($values[1])?$values[1]:false),
+												'last_name'=>(!empty($values[2])?$values[2]:false),
+												'nickname'=>(!empty($values[3])?$values[3]:false),
+												'email_1'=>(!empty($values[4])?$values[4]:false),
+												'email_2'=>(!empty($values[12])?$values[12]:false),
+												'email_3'=>(!empty($values[13])?$values[13]:false),
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[10])?$values[10]:false),
+												'phone_home'=>(!empty($values[6])?$values[6]:false),			
+												'pager'=>(!empty($values[8])?$values[8]:false),
+												'address_home'=>false,
+												'address_city'=>(!empty($values[28])?$values[28]:false),
+												'address_state'=>(!empty($values[29])?$values[29]:false),
+												'address_country'=>(!empty($values[31])?$values[31]:false),
+												'postcode_home'=>(!empty($values[30])?$values[30]:false),
+												'company_work'=>(!empty($values[17])?$values[17]:false),
+												'address_work'=>false,
+												'address_work_city'=>(!empty($values[21])?$values[21]:false),
+												'address_work_country'=>(!empty($values[24])?$values[24]:false),
+												'address_work_state'=>(!empty($values[22])?$values[22]:false),
+												'address_work_postcode'=>(!empty($values[23])?$values[23]:false),
+												'fax_work'=>false,
+												'phone_work'=>(!empty($values[7])?$values[7]:false),
+												'website'=>(!empty($values[14])?$values[14]:false),
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://mb.indiatimes.com/it/logout.jsp",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		}
+	}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/indiatimes.plg.php b/plugins/contact_importer/OpenInviter/plugins/indiatimes.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..3304b3ed3d84088ce4de5d7a13dd4b80f0f97ca2
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/indiatimes.plg.php
@@ -0,0 +1,187 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'IndiaTimes',
+	'version'=>'1.0.5',
+	'description'=>"Get the contacts from an IndiaTimes account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://in.indiatimes.com/default1.cms',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * IndiaTimes Plugin
+ * 
+ * Imports user's contacts from IndiaTimes' AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.3
+ */
+class indiatimes extends OpenInviter_base
+{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	
+	public $debug_array=array('initial_get'=>'passwd',
+			  				  'login_post'=>'Location',
+			  				  'inbox_url'=>'sunsignid="2"',
+			  				  'file_contacts'=>'email'
+							 );
+
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user, $pass)
+	{
+		$this->resetDebugger();
+		$this->service='indiatimes';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res = $this->get("http://in.indiatimes.com/default1.cms");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://in.indiatimes.com/default1.cms",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://in.indiatimes.com/default1.cms",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action=html_entity_decode($this->getElementString($res,'return checkVal(this);" action="','"'));
+		$post_elements=array('login'=>$user,
+							 'passwd'=>$pass,
+							 'Sign in'=>'Sign In'
+							); 
+							
+ 		$res=$this->post($form_action,$post_elements,true);
+ 		
+ 		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$basepath=$this->getElementString($res,"Location: ",'jsp')."jsp";
+		$res=$this->get($basepath,true);
+		
+		if ($this->checkResponse("inbox_url",$res))
+			$this->updateDebugBuffer('inbox_url',$basepath,'GET');
+		else
+			{
+			$this->updateDebugBuffer('inbox_url',$basepath,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+	
+		$url_file_contacts=str_replace("/it/login.jsp","",$basepath)."/home/{$user}/Contacts.csv";
+		
+		$this->login_ok=$url_file_contacts;
+		return true;		
+	} 
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		
+		if ($this->checkResponse("file_contacts",$res))
+			$this->updateDebugBuffer('file_contacts',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('file_contacts',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$temp=$this->parseCSV($res);
+		$contacts=array();
+		foreach ($temp as $values)
+			{
+			if (!empty($values[0]))
+				$contacts[$values[0]]=array('first_name'=>(!empty($values[4])?$values[0]:false),
+												'middle_name'=>(!empty($values[5])?$values[2]:false),
+												'last_name'=>(!empty($values[6])?$values[6]:false),
+												'nickname'=>false,
+												'email_1'=>(!empty($values[0])?$values[0]:false),
+												'email_2'=>(!empty($values[1])?$values[1]:false),
+												'email_3'=>(!empty($values[2])?$values[2]:false),
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[11])?$values[11]:false),
+												'phone_home'=>(!empty($values[9])?$values[9]:false),			
+												'pager'=>false,
+												'address_home'=>false,
+												'address_city'=>(!empty($values[5])?$values[5]:false),
+												'address_state'=>(!empty($values[7])?$values[7]:false),
+												'address_country'=>(!empty($values[8])?$values[8]:false),
+												'postcode_home'=>(!empty($values[6])?$values[6]:false),
+												'company_work'=>(!empty($values[14])?$values[14]:false),
+												'address_work'=>false,
+												'address_work_city'=>(!empty($values[16])?$values[16]:false),
+												'address_work_country'=>(!empty($values[19])?$values[19]:false),
+												'address_work_state'=>(!empty($values[17])?$values[17]:false),
+												'address_work_postcode'=>(!empty($values[18])?$values[18]:false),
+												'fax_work'=>(!empty($values[21])?$values[21]:false),
+												'phone_work'=>(!empty($values[20])?$values[20]:false),
+												'website'=>(!empty($values[12])?$values[12]:false),
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );	
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://mb.indiatimes.com/it/logout.jsp",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		}
+	}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/inet.plg.php b/plugins/contact_importer/OpenInviter/plugins/inet.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..be1b24892bce001305bb0d6971f4169c53b497e3
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/inet.plg.php
@@ -0,0 +1,172 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Inet',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a Inet account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://inet.ua/index.php',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(inet.ua)/i','/(fm.com.ua)/i'),
+	);
+/**
+ * Inet Plugin
+ * 
+ * Imports user's contacts from Inet AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class inet extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'login_username',
+				'login_post'=>'frame',
+				'url_redirect'=>'passport',
+				'url_export'=>'FORENAME',
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='inet';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+					
+		$res=$this->get("http://inet.ua/index.php");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://inet.ua/index.php",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://inet.ua/index.php",'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+
+		$user_array=explode('@',$user);$username=$user_array[0];	
+		$form_action="http://newmail.inet.ua/login.php";
+		$post_elements=array('username'=>$username,'password'=>$pass,'server_id'=>0,'template'=>'v-webmail','language'=>'ru','login_username'=>$username,'servname'=>'inet.ua','login_password'=>$pass,'version'=>1,'x'=>rand(1,100),'y'=>rand(1,100));
+		$res=$this->post($form_action,$post_elements,true);	
+		if ($this->checkResponse('login_post',$res))
+			$this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$this->login_ok="http://newmail.inet.ua/download.php?act=process_export&method=csv&addresses=all";
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("url_export",$res))
+			$this->updateDebugBuffer('url_export',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_export',$url,'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$tempFile=explode(PHP_EOL,$res);$contacts=array();unset($tempFile[0]);
+		foreach ($tempFile as $valuesTemp)
+			{
+			$values=explode('~',$valuesTemp);
+			if (!empty($values[3]))
+				$contacts[$values[3]]=array('first_name'=>(!empty($values[1])?$values[1]:false),
+												'middle_name'=>(!empty($values[2])?$values[2]:false),
+												'last_name'=>false,
+												'nickname'=>false,
+												'email_1'=>(!empty($values[3])?$values[3]:false),
+												'email_2'=>(!empty($values[4])?$values[4]:false),
+												'email_3'=>(!empty($values[5])?$values[5]:false),
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[8])?$values[8]:false),
+												'phone_home'=>(!empty($values[6])?$values[6]:false),			
+												'pager'=>false,
+												'address_home'=>false,
+												'address_city'=>(!empty($values[11])?$values[11]:false),
+												'address_state'=>(!empty($values[12])?$values[12]:false),
+												'address_country'=>(!empty($values[14])?$values[14]:false),
+												'postcode_home'=>(!empty($values[13])?$values[13]:false),
+												'company_work'=>false,
+												'address_work'=>false,
+												'address_work_city'=>false,
+												'address_work_country'=>false,
+												'address_work_state'=>false,
+												'address_work_postcode'=>false,
+												'fax_work'=>false,
+												'phone_work'=>(!empty($values[7])?$values[7]:false),
+												'website'=>false,
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );				
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get('http://newmail.inet.ua/logout.php?vwebmailsession=',true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/interia.plg.php b/plugins/contact_importer/OpenInviter/plugins/interia.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..d45a1a926842bc5b80888e686ae328dc4ddabb08
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/interia.plg.php
@@ -0,0 +1,169 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Interia',
+	'version'=>'1.0.5',
+	'description'=>"Get the contacts from an Interia.pl account, Plugin developed by Bartosz Zarczynski",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://poczta.interia.pl/',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(interia.pl)/i', '/(poczta.fm)/i', '/(interia.eu)/i', '/(1gb.pl)/i', '/(2gb.pl)/i', '/(vip.interia.pl)/i', '/(serwus.pl)/i', '/(akcja.pl)/i', '/(czateria.pl)/i', '/(znajomi.pl)/i'),
+	);
+/**
+ * Interia.pl Plugin
+ * 
+ * Imports user's contacts from Interia.pl account
+ * 
+ * @author Bartosz Zarczynski
+ * @version 1.0.0
+ */
+class interia extends openinviter_base
+{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+
+	
+	public $debug_array=array('initial_get'=>'pocztaLoginForm',
+			  				  'login_post'=>'side-folders',
+			  				  'url_contact'=>'while(1)'
+							 );
+	private $sid;
+
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user, $pass)
+	{
+		$this->resetDebugger();
+		$this->service='interia';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		$res = $this->get("http://poczta.interia.pl/",true);
+		
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://poczta.interia.pl/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://poczta.interia.pl/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$at = strpos($user, '@');
+		$domain = substr($user, $at+1, strlen($user)-$at);
+		
+		$form_action="http://ssl.interia.pl/login.html?classicMail=1";
+		$post_elements=array('login'=>$user,
+							'pass'=>$pass,
+							'domain' => $domain,
+							'htmlMail' => 'checked',
+							'referer' => 'http://poczta.interia.pl/poczta/'
+							 );
+
+		$res=$this->post($form_action,$post_elements, true, true, false);
+		
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"http://ssl.interia.pl/login.html?classicMail=1",'GET');
+		else
+			{
+			$this->updateDebugBuffer('login_post',"http://ssl.interia.pl/login.html?classicMail=1",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+
+		$pos = strpos($res, "logout,uid,");
+		$this->sid = substr($res, $pos+11, 16);
+		
+		$this->login_ok = "http://poczta.interia.pl/html/getcontacts,all,1,uid,$this->sid?inpl_network_request=true";
+		
+		return true;
+	} 
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+			if (!$this->login_ok)
+			{
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+			}
+			else $url=$this->login_ok;
+			$res=$this->get($url,true);
+			
+			if ($this->checkResponse("url_contact",$res))
+			$this->updateDebugBuffer('url_contact',$this->login_ok,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_contact',$this->login_ok,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+			$noheader = substr($res, strpos($res, "while(1);[{") + 11, strlen($res) - 2);
+			$lines = explode("},{", $noheader);
+			$i = 0;
+			foreach ($lines as $line)
+			{
+				$data[$i] = explode(",", $line);
+				$i++;
+			}
+	
+			$contacts = array();
+			foreach ($data as $line=>$param)
+			{
+				foreach ($param as $x)
+				{
+					$pos_mail = strpos($x, "email");
+					$email = substr($x, 9, strlen($x)-10);
+					$pos_firstname = strpos($x, "firstName");
+					if ($pos_firstname != false) $firstname = substr($x, 13, strlen($x)-14);
+					$pos_lastname = strpos($x, "lastName");
+					if ($pos_lastname != false) $lastname = substr($x, 12, strlen($x)-13);
+					if ($pos_mail != false) $contacts[$email] =array('first_name'=>$firstname,'last_name'=>$lastname,'email_1'=>$email);
+				}
+			}
+
+			return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+			if (!$this->checkSession()) return false;
+			$res = $this->get("http://poczta.interia.pl/html/logout,uid,$this->sid", true);
+			$this->debugRequest();
+			$this->resetDebugger();
+			$this->stopPlugin();
+			return true;
+		}
+	}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/katamail.plg.php b/plugins/contact_importer/OpenInviter/plugins/katamail.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..06176512f1c6c82588a24ec85e0a467127914bc3
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/katamail.plg.php
@@ -0,0 +1,154 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'KataMail',
+	'version'=>'1.0.9',
+	'description'=>"Get the contacts from a KataMail account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://webmail.katamail.com',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(katamail.com)/i'),
+	);
+/**
+ * KataMail Plugin
+ * 
+ * Imports user's contacts from KataMail's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.5
+ */
+class katamail extends openinviter_base
+{
+	private $login_ok=false;
+	public $showContacts=false;
+	private $server,$id = "";
+	protected $timeout=30;
+	public $debug_array=array(
+			  'main_redirect'=>'location.href'
+	);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user, $pass)
+	{
+		$this->resetDebugger();
+		$this->service='katamail';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		$postvars = array(
+			"Language"=>"italiano",
+			"pop3host"=>"katamail.com",
+			"username"=>$user,
+			"LoginType"=>"xp",
+			"language"=>"italiano",
+			"MailType"=>"imap",
+			"email"=>$user."@katamail.com",
+			"password"=>$pass		);
+		$res = $this->get("http://webmail.katamail.com", true);
+		$res = $this->post("http://webmail.katamail.com/atmail.php", $postvars, true);
+		$res = htmlentities($res);
+		if ($this->checkResponse("main_redirect",$res))
+			$this->updateDebugBuffer('main_redirect',"http://webmail.katamail.com/atmail.php",'POST');
+		else
+			{
+			$this->updateDebugBuffer('main_redirect',"http://webmail.katamail.com/atmail.php",'POST',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$this->login_ok = "http://webmail.katamail.com/abook.php?func=export&abookview=personal";
+		return true;
+	}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+	{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else
+			{
+			$contacts = array();
+			$res = $this->get($this->login_ok);
+			$temp=$this->parseCSV($res);
+			foreach ($temp as $values)
+				{
+				if (!empty($values[1]))
+					$contacts[$values[1]]=array('first_name'=>(!empty($values[6])?$values[6]:false),
+												'middle_name'=>(!empty($values[18])?$values[18]:false),
+												'last_name'=>(!empty($values[17])?$values[17]:false),
+												'nickname'=>false,
+												'email_1'=>(!empty($values[1])?$values[1]:false),
+												'email_2'=>(!empty($values[2])?$values[2]:false),
+												'email_3'=>(!empty($values[3])?$values[3]:false),
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[12])?$values[12]:false),
+												'phone_home'=>(!empty($values[13])?$values[13]:false),			
+												'pager'=>false,
+												'address_home'=>false,
+												'address_city'=>(!empty($values[9])?$values[9]:false),
+												'address_state'=>(!empty($values[14])?$values[14]:false),
+												'address_country'=>(!empty($values[10])?$values[10]:false),
+												'postcode_home'=>false,
+												'company_work'=>(!empty($values[24])?$values[24]:false),
+												'address_work'=>(!empty($values[22])?$values[22]:false),
+												'address_work_city'=>(!empty($values[23])?$values[23]:false),
+												'address_work_country'=>(!empty($values[25])?$values[25]:false),
+												'address_work_state'=>(!empty($values[31])?$values[31]:false),
+												'address_work_postcode'=>(!empty($values[18])?$values[18]:false),
+						 						'fax_work'=>(!empty($values[21])?$values[21]:false),
+												'phone_work'=>(!empty($values[20])?$values[20]:false),
+												'website'=>(!empty($values[12])?$values[12]:false),
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );	
+				}
+			}
+		$this->showContacts = true;
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+	}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;	
+		$res=$this->get("http://webmail.katamail.com/index.php?func=logout");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/kids.plg.php b/plugins/contact_importer/OpenInviter/plugins/kids.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..fed7880a5694ab1271b583e7ada866f8c3de9d01
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/kids.plg.php
@@ -0,0 +1,150 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Kids',
+	'version'=>'1.0.1',
+	'description'=>"Get the contacts from a Kids account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.kids.co.uk/email/index.php',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Kids Plugin
+ * 
+ * Import user's contacts from Kids account
+ *
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class kids extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'login_id',
+				'login_post'=>'frame',
+				'url_contacts'=>'doaddresses.php?_MATRIXaction=',
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='kids';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+
+		$res=$this->get("http://www.kids.co.uk/email/index.php",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.kids.co.uk/email/index.php",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.kids.co.uk/email/index.php",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$form_action="http://www.kids.co.uk/email/home/dologin.php";
+		$post_elements=array('did'=>2,
+							 'login_id'=>$user,
+							 'did'=>2,
+							 'login_pwd'=>$pass,
+							);
+							
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+
+		$url_addressbook='http://www.kids.co.uk/email/home/addressbook.php';
+		$this->login_ok=$url_addressbook;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("url_contacts",$res))
+			$this->updateDebugBuffer('url_contacts',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_contacts',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//a";$data=$xpath->query($query);$odd=true;
+		foreach($data as $node)
+			{
+			if (strpos($node->getAttribute('href'),'doaddresses.php?_MATRIXaction=Modify')!==false)
+				{
+				if ($odd) $names[]=$node->nodeValue;else $emails[]=$node->nodeValue;
+				$odd=!$odd;
+				}
+			}
+		if (!empty($names)) foreach($names as $key=>$value) if(!empty($emails[$key])) $contacts[$emails[$key]]=array('first_name'=>$value,'email_1'=>$emails[$key]);
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://kids.co.uk/email/dologout.php",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/kincafe.plg.php b/plugins/contact_importer/OpenInviter/plugins/kincafe.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..08c3f36559b64e7bbdaacdbdf0e2965145b63570
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/kincafe.plg.php
@@ -0,0 +1,125 @@
+<?php
+/*
+ * Created on Feb 10, 2009 by Vlad
+ */
+ 
+$_pluginInfo=array(
+	'name'=>'Kincafe',
+	'version'=>'1.0.2',
+	'description'=>"Get the contacts from a kincafe.com account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.kincafe.com/',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+	
+/**
+ * kincafe Plugin
+ * 
+ * Import user's contacts from kincafe
+ * 
+ * @author OpenInviter
+ * @version 1.0.1
+ */
+class kincafe extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'login_post'=>'logout.fam',
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='kincafe';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+	
+		if (!$this->init()) return false;
+
+		$res = $this->get('http://www.kincafe.com/signin.fam',true);
+		$post_elements = $this->getHiddenElements($res);
+		$post_elements['loginForm:username']=$user;
+		$post_elements['loginForm:pwd']=$pass;
+		$post_elements['loginForm:bottomSignInBtn']='+Sign+In+';
+		$res = $this->post("http://www.kincafe.com/signin.fam",$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"http://www.kincafe.com/signin.fam",'POST');		
+		else
+			{
+			$this->updateDebugBuffer('login_post',"http://www.kincafe.com/signin.fam",'POST',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$this->login_ok = "http://www.kincafe.com/fammemlist.fam";
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;		
+		$res = $this->get($url,true);
+		//echo $res;
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//tr[@style='background-color:#fbfbfb']";$data=$xpath->query($query);
+		foreach($data as $node)
+			{
+			$td=$node->childNodes;
+			$name = $td->item(2)->nodeValue;
+			$email = $td->item(6)->nodeValue;
+			$contacts[$email]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$email);
+			}			
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.kincafe.com/logout.fam");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+?>
diff --git a/plugins/contact_importer/OpenInviter/plugins/konnects.plg.php b/plugins/contact_importer/OpenInviter/plugins/konnects.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..14b3e009f19ceffabd754a17009f2bbbddc2c0ff
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/konnects.plg.php
@@ -0,0 +1,204 @@
+<?php
+/*Import Friends from Konnects
+ * You can Write Private Messages using Konnects system
+ */
+$_pluginInfo=array(
+	'name'=>'Konnects',
+	'version'=>'1.0.4',
+	'description'=>"Get the contacts from a Konnects account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.konnects.com/',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Konnects Plugin
+ * 
+ * Import Friends from Konnects
+ * You can Write Private Messages using Konnects system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class konnects extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'UserName',
+				'login_post'=>'fncRedirect',
+				'get_friends'=>'links_inbox',
+				'url_friend'=>'a',
+				'url_send_message'=>'a',
+				'send_message'=>'sent'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='konnects';
+		$this->service_user=$user;
+		$this->service_password=$pass;	
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://www.konnects.com/",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.konnects.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.konnects.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="https://www.konnects.com/login.jsp?Flag=R";
+		$post_elements=array('Return'=>'member_homepage.jspf',
+							'UserName'=>$user,
+							'Password'=>$pass
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_friends='http://www.konnects.com/member_connections.jsp';
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		$names_array=$this->getElementDOM($res,"//a[@class='links_inbox']");
+		$hrefs_array=$this->getElementDOM($res,"//a[@class='links_inbox']",'href');
+		if (!empty($hrefs_array))
+			foreach($hrefs_array as $key=>$value) $contacts[$value]=(!empty($names_array[$key])?$names_array[$key]:false);
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $href=>$name)
+			{	
+			$countMessages++;	
+			$url_friend='http://www.konnects.com/'.$href;
+			$res=$this->get($url_friend,true);
+			if ($this->checkResponse("url_friend",$res))
+				$this->updateDebugBuffer('url_friend',$url_friend,'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_friend',$url_friend,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			
+			$url_send_message="http://www.konnects.com/profiles_message".$this->getElementString($res,'profiles_message','"');
+			$res=$this->get($url_send_message,true);
+			if ($this->checkResponse("url_send_message",$res))
+				$this->updateDebugBuffer('url_send_message',$url_send_message,'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_send_message',$url_send_message,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			
+			$form_action='http://www.konnects.com/'.$this->getElementString($res,'name="profile" id="profile" action="','"');
+			$post_elements=$this->getHiddenElements($res);$post_elements['Message']=$message['body'];
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.konnects.com/logout.jsp");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/koolro.plg.php b/plugins/contact_importer/OpenInviter/plugins/koolro.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..8f8d830708ea1b60c440f3fe322bb41df10d80d3
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/koolro.plg.php
@@ -0,0 +1,181 @@
+<?php
+/*Import Friends from Koolro
+ * You can send message to your Friends Inbox
+ */
+$_pluginInfo=array(
+	'name'=>'Koolro',
+	'version'=>'1.0.1',
+	'description'=>"Get the contacts from a Koolro account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.koolro.com/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Koolro Plugin
+ * 
+ * Imports user's contacts from Koolro and sends
+ * messages using Koolro's internal system.
+ * 
+ * @author OpenInviter
+ * @version 1.0.8
+ */
+class koolro extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'username',
+				'login_post'=>'contacts.contacts',
+				'url_friends'=>'option',
+				'send_message'=>'ajFetch'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='koolro';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://www.koolro.com/",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.koolro.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.koolro.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://www.koolro.com/index.php?L";
+		$post_elements=array('username'=>$user,'password'=>$pass,'userlogin'=>false);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		
+		$url_my_friends='http://www.koolro.com/index.php?L=mails.write';
+		$this->login_ok=$url_my_friends;
+		return true;
+		}
+	
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		if ($this->checkResponse("url_friends",$res))
+			$this->updateDebugBuffer('url_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//option";$data=$xpath->query($query);
+		foreach($data as $node)
+			{ $value=$node->getAttribute('value');if(!empty($value)) $contacts[$value]=$value; }
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $session_id The OpenInviter user's session ID
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach ($contacts as $name)
+			{			
+			$countMessages++;
+			$form_action="http://www.koolro.com/index.php?L=mails.write";
+			$post_elements=array('subject'=>$message['subject'],
+								 'body'=>$message['body'],
+								 'username'=>false,
+								 'contact'=>$name,
+								 'Submit'=>'Submit'
+								);
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.koolro.com/index.php?logout",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/lastfm.plg.php b/plugins/contact_importer/OpenInviter/plugins/lastfm.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..2cfc16637cb8489dd9b075c2c685decc51c19352
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/lastfm.plg.php
@@ -0,0 +1,142 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Last.fm',
+	'version'=>'1.0.5',
+	'description'=>"Get the contacts from a Last.fm account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.last.fm',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * LastFm Plugin
+ * 
+ * Import user's contacts from Last.fm AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class lastfm extends openinviter_base
+{
+	private $login_ok=false;
+	public $showContacts=true;
+	private $sess_id, $username, $siteAddr;
+	
+	public $debug_array=array(
+			  'login_post'=>'logout',
+			  'friends_url'=>'username'
+	);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='lastfm';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		$post_elements=array("username"=>"{$user}",
+							"password"=>"{$pass}",
+							"backto"=>urldecode("http%3A%2F%2Fwww.last.fm%2Flogin%2FsuccessCallback"));
+		$res=$this->post("https://www.last.fm/login?lang=&withsid",$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"https://www.last.fm/login?lang=&withsid",'POST');		
+		else
+			{
+			$this->updateDebugBuffer('login_post',"https://www.last.fm/login?lang=&withsid",'POST',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$this->login_ok = "http://www.last.fm/inbox/compose";
+		return true;		
+		}
+	
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		$contacts=array();
+		if (preg_match_all("#\"r4\_(.+)\"\:\{\"username\"\:\"(.+)\"#U",$res,$matches))
+			{
+			if (!empty($matches[1]))
+				foreach($matches[1] as $key=>$id)  
+					if (!empty($matches[2][$key])) $contacts["r4_{$id}"]=$matches[2][$key];
+			}
+		return $contacts;
+		}
+		
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */	
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$res = $this->get("http://www.last.fm/inbox/compose");
+		$postelem = $this->getHiddenElements($res);
+		$postelem['to']="";
+		$postelem['subject']=$message['subject'];
+		$postelem['body']=$message['body'];
+		$countMessages=0;
+		foreach ($contacts as $id => $username)
+			{
+			$countMessages++;
+			$postelem['to_ids%5B%5D'] = $id;
+			$res = $this->post('http://www.last.fm/inbox/compose',$postelem, true, true);
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$logout_url = "http://www.last.fm/login/logout";
+		$res = $this->get($logout_url);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/libero.plg.php b/plugins/contact_importer/OpenInviter/plugins/libero.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..a027b1e4dba7450bff480e25e3fd5c9b0a92daa8
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/libero.plg.php
@@ -0,0 +1,191 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Libero',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a Libero account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://imodemail.libero.it/imodeaccess/',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(libero.it)/i','/(inwind.it)/i','/(iol.it)/i','/(blu.it)/i'),
+	);
+/**
+ * Libero Plugin
+ * 
+ * Imports user's contacts from Libero's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.2
+ */
+class libero extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;	
+	public $debug_array=array('initial_get'=>'password',
+							  'post_login'=>'Location:',
+							  'inbox'=>'accesskey="4"',
+							  'contacts_page'=>'accesskey="1"',
+							  'contact_info'=>'Addr_ln',
+							 );
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user, $pass)
+	{
+		$this->resetDebugger();
+		$this->service='libero';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://imodemail.libero.it/imodeaccess/",true);
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"http://imodemail.libero.it/imodeaccess/",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('initial_get',"http://imodemail.libero.it/imodeaccess/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		$form_action="http://imodemail.libero.it/imodemail/servlets/CliLoginImode?Act=enter";
+		$domain_array=explode("@",$user);$domain=$domain_array[1];$libero_user=$domain_array[0];
+		$post_elements=array(
+							"u"=>$libero_user,
+							"d"=>$domain,
+							"p"=>$pass,
+							''=>'Entra'
+						    );
+		$res=$this->post($form_action,$post_elements,false,true,false,array(),false,false);
+		if ($this->checkResponse('post_login',$res))
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',true,$post_elements);
+		else 
+			{
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+			
+		$base_url="http://".$this->getElementString($this->getElementString($res,"Location: ",PHP_EOL),"http://",'/');
+		$url_redirect=str_replace(" [following]","",$this->getElementString($res,"Location: ",PHP_EOL));
+		$res=$this->get($url_redirect,true);
+		if ($this->checkResponse('inbox',$res))
+			$this->updateDebugBuffer('inbox',$url_redirect,'GET');
+		else 
+			{
+			$this->updateDebugBuffer('inbox',$url_redirect,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		$url_contacts_array=$this->getElementDOM($res,"//a[@accesskey='4']",'href');
+		$url_contacts=array();$url_contacts=array($base_url,$url_contacts_array[0]);
+		$this->login_ok=$url_contacts;
+		file_put_contents($this->getLogoutPath(),$url_redirect);	
+		return true;
+	}
+	
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		
+		$res=$this->get($url[0].$url[1]);
+		if ($this->checkResponse('contacts_page',$res))
+			$this->updateDebugBuffer('contacts_page',$url[0].$url[1],'GET');
+		else 
+			{
+			$this->updateDebugBuffer('contacts_page',$url[0].$url[1],'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		
+		$contacts=array();$next=true;
+		while($next)
+			{
+			$url_next_array=$this->getElementDOM($res,"//a[@accesskey='1']",'href');
+			$url_next=$url[0].$url_next_array[0];
+			$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+			$xpath=new DOMXPath($doc);$query="//a";$data=$xpath->query($query);
+			foreach($data as $node) 
+				{
+				if (strpos($node->getAttribute('href'),'Act_Role=0')!==false)
+					{
+					$url_contact=$url[0].$node->getAttribute('href');
+					$res=$this->get($url_contact,true);
+					if ($this->checkResponse('contact_info',$res))
+						$this->updateDebugBuffer('contact_info',$url_contact,'GET');
+					else 
+						{
+						$this->updateDebugBuffer('contact_info',$url_contact,'GET',false);
+						$this->debugRequest();
+						$this->stopPlugin();
+						return false;	
+						}
+					
+					$cognome=$this->getElementString($res,'name="Addr_ln" value="','"');
+					$nome=$this->getElementString($res,'name="Addr_fn" value="','"');
+					$alias=$this->getElementString($res,'name="Addr_alias" value="','"');
+					$email=$this->getElementString($res,'Addr_mail" value="','"');					
+					if (!empty($email)) $contacts[$email]=array('first_name'=>$nome,'last_name'=>$cognome,'nickname'=>$alias,'email_1'=>$email);
+					}	
+				}
+			if (!empty($url_next_array[0])) $res=$this->get($url_next,true);
+			else $next=false;
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		if (file_exists($this->getLogoutPath()))
+			{
+			$url=file_get_contents($this->getLogoutPath());
+			$res=$this->get($url,true);
+			$url_logout=$this->getElementDOM($res,"//a[@accesskey='8']",'href');
+			$base_url="http://".$this->getElementString($url,"http://",'/');
+			$res=$this->get($base_url.$url_logout[0]);
+			$res=$this->get("http://portal.imode.wind.it/gprs/mn/main.htm",true);
+			}
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();	
+		}
+}
+?>
diff --git a/plugins/contact_importer/OpenInviter/plugins/linkedin.plg.php b/plugins/contact_importer/OpenInviter/plugins/linkedin.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..f001d1336b82e3f18543c7f53d53078d627adee5
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/linkedin.plg.php
@@ -0,0 +1,171 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'LinkedIn',
+	'version'=>'1.1.2',
+	'description'=>"Get the contacts from a LinkedIn account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.linkedin.com',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * LinkedIn
+ * 
+ * Imports user's email contacts from LinkedIn 
+ * 
+ * @author OpenInviter
+ * @version 1.1.1
+ */
+class linkedin extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'session_password',
+				'login_post'=>'window.location.replace',
+				'js_page'=>'csrfToken',
+				'get_friends'=>'emailAddress',
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='linkedin';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("https://www.linkedin.com/secure/login?trk=hb_signin");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"https://www.linkedin.com/secure/login?trk=hb_signin",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"https://www.linkedin.com/secure/login?trk=hb_signin",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$form_action="https://www.linkedin.com/secure/login";
+		$post_elements=array('csrfToken'=>'guest_token',
+							 'session_key'=>$user,
+							 'session_password'=>$pass,
+							 'session_login'=>'Sign In',
+							 'session_login'=>'',
+							 'session_rikey'=>''
+							); 
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$res=$this->get("http://www.linkedin.com/home",true);
+		if ($this->checkResponse("js_page",$res))
+			$this->updateDebugBuffer('js_page',"https://www.linkedin.com/secure/login?trk=hb_signin",'GET');
+		else
+			{
+			$this->updateDebugBuffer('js_page',"https://www.linkedin.com/secure/login?trk=hb_signin",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}		
+		$this->ajaxSes=$this->getElementString($res,'name="csrfToken" value="','"');
+        $url_friends="http://www.linkedin.com/dwr/exec/ConnectionsBrowserService.getMyConnections.dwr";
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $form_action=$this->login_ok;
+		$post_elements=array('callCount'=>'1',
+						'JSESSIONID'=>$this->ajaxSes,
+						'c0-scriptName'=>'ConnectionsBrowserService',
+						'c0-methodName'=>'getMyConnections',
+						'c0-param0'=>'string:0',
+						'c0-param1'=>'number:-1',
+						'c0-param2'=>'string:DONT_CARE',
+						'c0-param3'=>'number:10000',
+						'c0-param4'=>'boolean:false',
+						'c0-param5'=>'boolean:true',
+						'xml'=>'true',
+						);
+		$headers = array('Content-Type'=>'text/plain');
+		$res=$this->post($form_action,$post_elements,false,false,false,$headers);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('get_friends',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$cr = "/var s\\d+=\\{\\};(.*?)\\.profileLink=/ims";
+		$fr = "/var s\\d+=\"([^\"]*)\";s\\d+.firstName=s\\d+/ims";
+		$er = "/var s\\d+=\"([^\"]*)\";s\\d+.emailAddress=s\\d+/ims";
+		$lr = "/var s\\d+=\"([^\"]*)\";s\\d+.lastName=s\\d+/ims";
+		$ar = "/var s\\d+=\"([A-Z#])\";s\\d+\\[\\d+\\]=s\\d+;/ims";
+		$dr = "/;s\\d+\\['([A-Z#])'\\]=s\\d+;/ims";		
+		preg_match_all($cr, $res, $found, PREG_SET_ORDER);
+		foreach ($found as $val) 
+			{ $tempHtml= $val[0];if (preg_match($er,$tempHtml,$foundEmails)) { $email=$foundEmails[1];if ($this->isEmail($email)) { $first_name=preg_match($fr,$tempHtml,$foundEmails) ? $foundEmails[1] : ''; $last_name=preg_match($lr,$tempHtml,$foundEmails) ? $foundEmails[1] : '';$last_name;$contacts[$email]=array('first_name'=>isset($first_name)?$first_name:false,'last_name'=>isset($last_name)?$last_name:false,'email_1'=>$email); } } }			
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("https://www.linkedin.com/secure/login?session_full_logout=&trk=hb_signout",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/livejournal.plg.php b/plugins/contact_importer/OpenInviter/plugins/livejournal.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..de2c32c13f0ecb87fd0404ced6c4d9af7f1e1045
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/livejournal.plg.php
@@ -0,0 +1,193 @@
+<?php
+/*Import Friends from Livejournal
+ * You can Post Messages using Livejournal system
+ */
+$_pluginInfo=array(
+	'name'=>'Livejournal',
+	'version'=>'1.0.5',
+	'description'=>"Get the contacts from a Livejournal account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.livejournal.com/mobile/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Livejournal Plugin
+ * 
+ * Import user's contacts from Livejournal and Post  messages
+ * using Livejournal's internal Posting  system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class livejournal extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'user',
+				'login_post'=>'post.bml',
+				'get_friends'=>'lj:user',
+				'url_send_message'=>'lj_form_auth',
+				'send_message'=>'successfully'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='livejuornal';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+
+		$res=$this->get("http://www.livejournal.com/mobile/login.bml");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.livejournal.com/mobile/login.bml",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.livejournal.com/mobile/login.bml",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://www.livejournal.com/mobile/login.bml";
+		$post_elements=array('user'=>$user,'password'=>$pass);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_post='http://www.livejournal.com/friends/edit.bml';
+		$this->login_ok=$url_post;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		$contacts_array=$this->getElementDOM($res,"//span[@class='ljuser']");
+		if (!empty($contacts_array))
+			foreach($contacts_array as $name) if (!empty($name)) $contacts[$name]=!empty($name)?$name:false;
+		unset($contacts['lj_maintenance']);unset($contacts['lj_spotlight']);unset($contacts['news']);
+		if (isset($contacts[$this->service_user])) unset($contacts[$this->service_user]);
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $name)
+			{
+			$countMessages++;
+			$form_action='http://www.livejournal.com/inbox/compose.bml';
+			$res=$this->get($form_action);
+			if ($this->checkResponse("url_send_message",$res))
+				$this->updateDebugBuffer('url_send_message',$form_action,'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_send_message',$form_action,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+				
+			$post_elements=array('lj_form_auth'=>$this->getElementString($res,'name="lj_form_auth" value="','"'),
+								'msg_to'=>$name,
+								'msg_subject'=>$message['subject'],
+								'msg_body'=>$message['body'],
+								'mode'=>'send',
+								);
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.livejournal.com/logout.bml");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/lovento.plg.php b/plugins/contact_importer/OpenInviter/plugins/lovento.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..f28d2427213b432cfdc31fe3bc1f9bd80fc0cec9
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/lovento.plg.php
@@ -0,0 +1,181 @@
+<?php
+/*Import Friends from Lovento
+ * You can Write Private Messages using Lovento system
+ */
+$_pluginInfo=array(
+	'name'=>'Lovento',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a Lovento account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.lovento.com/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Lovento Plugin
+ * 
+ * Import Friends from Lovento
+ * You can Write Private Messages using Lovento system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class lovento extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'login',
+				'login_post'=>'logout',
+				'get_friends'=>'to_id',
+				'send_message'=>'Inbox'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='lovento';
+		$this->service_user=$user;
+		$this->service_password=$pass;	
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://www.lovento.com/en/",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.lovento.com/en/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.lovento.com/en/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://www.lovento.com/en/check_login/";
+		$post_elements=array('login'=>$user,
+							 'password'=>$pass,
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_friends='http://www.lovento.com/en/ajax/message_center_write_mail/?to_id=';
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		$names_array=$this->getElementDOM($res,'//option');
+		$ids_array=$this->getElementDOM($res,'//option','value');
+		if (!empty($ids_array))
+			foreach($ids_array as $key=>$value)  $contacts[$value]=(!empty($names_array[$key])?$names_array[$key]:false);
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $id=>$name)
+			{
+			$countMessages++;		
+			$form_action="http://www.lovento.com/en/accounts/message_center/";
+			$post_elements=array('doSend'=>'t',
+								'to_id'=>$id,
+								'message_title'=>$message['subject'],
+								'message_text'=>$message['body'],
+								);
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.lovento.com/en/logout/");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/lycos.plg.php b/plugins/contact_importer/OpenInviter/plugins/lycos.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..1f1a01b918751be166063312c70754a3d2f890be
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/lycos.plg.php
@@ -0,0 +1,176 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Lycos',
+	'version'=>'1.1.4',
+	'description'=>"Get the contacts from a Lycos account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://lycos.com',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Lycos Plugin
+ * 
+ * Import user's contacts from Lycos' AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.9
+ */
+class lycos extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'m_U',
+				'login'=>'frame',
+				'export_url'=>'csv',
+				'file_contacts'=>'First Name'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='lycos';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		$this->timeout=30;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://mail.lycos.com/lycos/mail/IntroMail.lycos",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://lycos.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://lycos.com/",'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$post_elements=$this->getHiddenElements($res);$post_elements["m_U"]=$user;$post_elements["m_P"]=$pass;
+		$post_elements['login']='Sign In';
+		$url_login="https://registration.lycos.com/login.php";
+		$res=$this->post($url_login,$post_elements,true);	
+		
+		if ($this->checkResponse("login",$res))
+			$this->updateDebugBuffer('login',"http://registration.lycos.com/login.php?",'GET',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login',"http://registration.lycos.com/login.php?",'GET',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_export="http://mail.lycos.com/lycos/addrbook/ExportAddr.lycos?ptype=act&fileType=OUTLOOK";
+		
+		$this->login_ok=$url_export;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$post_elements=array('ftype'=>'OUTLOOK');
+		$res=$this->post($url,$post_elements);
+		if ($this->checkResponse("file_contacts",$res))
+			{
+			$temp=$this->parseCSV($res);	
+			$contacts=array();
+			foreach ($temp as $values)
+				{
+				if (!empty($values[4]))
+					$contacts[$values[4]]=array('first_name'=>(!empty($values[0])?$values[0]:false),
+													'middle_name'=>(!empty($values[1])?$values[1]:false),
+													'last_name'=>(!empty($values[3])?$values[3]:false),
+													'nickname'=>false,
+													'email_1'=>(!empty($values[4])?$values[4]:false),
+													'email_2'=>false,
+													'email_3'=>false,
+													'organization'=>false,
+													'phone_mobile'=>(!empty($values[5])?$values[5]:false),
+													'phone_home'=>(!empty($values[8])?$values[8]:false),			
+													'pager'=>false,
+													'address_home'=>false,
+													'address_city'=>(!empty($values[12])?$values[12]:false),
+													'address_state'=>(!empty($values[13])?$values[13]:false),
+													'address_country'=>(!empty($values[15])?$values[15]:false),
+													'postcode_home'=>(!empty($values[14])?$values[14]:false),
+													'company_work'=>(!empty($values[6])?$values[6]:false),
+													'address_work'=>false,
+													'address_work_city'=>(!empty($values[19])?$values[19]:false),
+													'address_work_country'=>(!empty($values[22])?$values[22]:false),
+													'address_work_state'=>(!empty($values[20])?$values[20]:false),
+													'address_work_postcode'=>(!empty($values[21])?$values[21]:false),
+													'fax_work'=>false,
+													'phone_work'=>(!empty($values[7])?$values[7]:false),
+													'website'=>(!empty($values[16])?$values[16]:false),
+													'isq_messenger'=>false,
+													'skype_essenger'=>false,
+													'yahoo_essenger'=>false,
+													'msn_messenger'=>false,
+													'aol_messenger'=>false,
+													'other_messenger'=>false,
+												   );
+				}		
+			$this->updateDebugBuffer('file_contacts',"{$url}",'GET');
+			}
+		else
+			{
+			$this->updateDebugBuffer('file_contacts',"{$url}",'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("https://registration.lycos.com/logout.php",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/mail2world.plg.php b/plugins/contact_importer/OpenInviter/plugins/mail2world.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..89120d952b4f25a25502ec023d617d32a478d867
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/mail2world.plg.php
@@ -0,0 +1,183 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Mail2World',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a Mail2World account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.mail2world.com/',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(mail2world.com)/i'),
+	);
+/**
+ * Mail2World Plugin
+ * 
+ * Import user's contacts from Mail2World account
+ *
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class mail2world extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'securebutt',
+				'login_post'=>'G_ViewType',
+				'file_contacts'=>'Name',
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='mail2world';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+
+		$res=$this->get("http://www.mail2world.com/",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.mail2world.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.mail2world.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$userBulk=explode('@',$user);$username=$userBulk[0];$domain=$this->getElementString($user,'@','.');
+		$form_action="http://www.mail2world.com/web/app.asp?db_browser=Firefox&db_os=WIN&db_width=1280&db_height=1024";
+		$post_elements=array('db_width'=>'1280',
+							 'db_height'=>'1024',
+							 'db_os'=>'WIN',
+							 'db_browser'=>'Firefox',
+							 'faction'=>'login',
+							 'username'=>$username,
+							 'domain'=>$domain,
+							 'password'=>$pass,
+							 'submitbut.x'=>rand(1,50),
+							 'submitbut.y'=>rand(1,50),
+							 'securebutt'=>'on'
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+
+		$url_file_contacts='http://www.mail2world.com/contacts/contacts_import_export.asp?action=export&app=Outlook_2000&NewContacts=true&ContactType=all';
+		$this->login_ok=$url_file_contacts;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("file_contacts",$res))
+			$this->updateDebugBuffer('file_contacts',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('file_contacts',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		$temp=$this->parseCSV($res);
+		$contacts=array();
+		foreach ($temp as $values)
+			{
+			if (!empty($values[3]))
+				$contacts[$values[3]]=array('first_name'=>(!empty($values[0])?$values[0]:false),
+												'middle_name'=>(!empty($values[1])?$values[1]:false),
+												'last_name'=>false,
+												'nickname'=>false,
+												'email_1'=>(!empty($values[3])?$values[3]:false),
+												'email_2'=>false,
+												'email_3'=>false,
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[11])?$values[11]:false),
+												'phone_home'=>(!empty($values[9])?$values[9]:false),			
+												'pager'=>false,
+												'address_home'=>false,
+												'address_city'=>(!empty($values[5])?$values[5]:false),
+												'address_state'=>(!empty($values[7])?$values[7]:false),
+												'address_country'=>(!empty($values[8])?$values[8]:false),
+												'postcode_home'=>(!empty($values[6])?$values[6]:false),
+												'company_work'=>(!empty($values[14])?$values[14]:false),
+												'address_work'=>false,
+												'address_work_city'=>(!empty($values[16])?$values[16]:false),
+												'address_work_country'=>(!empty($values[19])?$values[19]:false),
+												'address_work_state'=>(!empty($values[17])?$values[17]:false),
+												'address_work_postcode'=>(!empty($values[18])?$values[18]:false),
+												'fax_work'=>(!empty($values[21])?$values[21]:false),
+												'phone_work'=>(!empty($values[20])?$values[20]:false),
+												'website'=>(!empty($values[12])?$values[12]:false),
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.mail2world.com/logout.asp?action=logout",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/mail_com.plg.php b/plugins/contact_importer/OpenInviter/plugins/mail_com.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..47d90e9b966ab18381a3d89edaa535bcaf44472f
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/mail_com.plg.php
@@ -0,0 +1,194 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Mail.com',
+	'version'=>'1.1.3',
+	'description'=>"Get the contacts from a Mail.com account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.mail.com',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Mail.com
+ * 
+ * Import user's contacts from Mail.com's AddressBook.
+ * 
+ * @author OpenInviter
+ * @version 1.0.9
+ */
+class mail_com extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'name="mailcom"',
+				'login_post'=>'mailcomframe',
+				'inbox'=>'outblaze',
+				'export_page'=>'addrURL',
+				'post_contacts'=>'csv',
+				'file_contacts'=>'Title'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='mail_com';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://www.mail.com/",true);
+		
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"http://www.mail.com/",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.mail.com/",'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			} 
+		$form_action=$this->getElementString($res,'name="mailcom"  action="','"');
+		$post_elements=array("login"=>"{$user}","password"=>"{$pass}","redirlogin"=>1,"siteselected"=>"normal");
+		$res=$this->post($form_action,$post_elements,true);
+		
+		if ($this->checkResponse('login_post',$res))	
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}		
+		$url_redirect=$this->getElementDOM($res,"//frame[@name='mailcomframe']",'src');
+		$res=$this->get($url_redirect[0],true);
+		
+		$this->login_ok=$url_redirect[0];
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		
+		if ($this->checkResponse('inbox',$res))
+			$this->updateDebugBuffer('login_post',"{$url}",'GET');
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$url}",'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}	
+		$url_contacts=$this->getElementDOM($res,"//a[@id='addrURL']",'href'); 
+		$res=$this->get($url_contacts[0],true);
+		
+		if ($this->checkResponse("export_page",$res))
+			{
+			$url_export="";
+			$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+			$xpath=new DOMXPath($doc);$query="//a[@href]";$data=$xpath->query($query);
+			foreach($data as $val) 
+			if (strstr($val->nodeValue,"Import/Export")) $url_export=$val->getAttribute('href')."&gab=1";
+			$this->updateDebugBuffer('post_contacts',"{$url_contacts[0]}",'GET');
+			}
+		else
+			{
+			$this->updateDebugBuffer('post_contacts',"{$url_contacts[0]}",'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$post_elements=array("showexport"=>"showexport","action"=>"export","format"=>"csv");
+		$res=$this->post($url_export,$post_elements);
+		
+		if ($this->checkResponse('file_contacts',$res))
+			{
+			$temp=$this->parseCSV($res);		
+			$contacts=array();
+			foreach ($temp as $values)
+				{
+				$name=$values['0'].(empty($values['1'])?'':(empty($values['0'])?'':'-')."{$values['1']}").(empty($values['3'])?'':" \"{$values['3']}\"").(empty($values['2'])?'':' '.$values['2']);
+				if (!empty($values['4']))
+					$contacts[$values['4']]=(empty($name)?$values['4']:$name);
+				if (!empty($values['12']))
+					$contacts[$values['12']]=(empty($name)?$values['12']:$name);
+				if (!empty($values['13']))
+					$contacts[$values['13']]=(empty($name)?$values['13']:$name);
+				}
+				
+			//full description
+			$teM=explode(PHP_EOL,$res);$arrayDescriptionFlag=explode(',',$teM[0]);
+			foreach($temp as $tempA)
+				{
+				$name=$tempA['0'].(empty($tempA['1'])?'':(empty($tempA['0'])?'':'-')."{$tempA['1']}").(empty($tempA['3'])?'':" \"{$tempA['3']}\"").(empty($tempA['2'])?'':' '.$tempA['2']);
+				foreach ($arrayDescriptionFlag as $key=>$value)
+					$descriptionArray[(!empty($name)?$name:(!empty($tempA[4])?$tempA[4]:false))][$value]=isset($tempA[$key])?$tempA[$key]:false;
+				}		
+			//print_R($descriptionArray);	
+						
+			$this->updateDebugBuffer('login_post',"{$url_export}",'POST',true,$post_elements);
+			}
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$url_export}",'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $descriptionArray;
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.mail.com/logout.aspx");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/mail_in.plg.php b/plugins/contact_importer/OpenInviter/plugins/mail_in.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..4053eabb058f494d66beb05fd217a4ebb576eb65
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/mail_in.plg.php
@@ -0,0 +1,140 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Mail.in',
+	'version'=>'1.0.2',
+	'description'=>"Get the contacts from a Mail.in account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://mail.in.com/',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(in.com)/i'),
+	);
+/**
+ * Mail_in Plugin
+ * 
+ * Imports user's contacts from Mail.in's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class mail_in extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array('initial_get'=>'frmloginverify',
+							  'post_login'=>'inboxmailshide',
+							  'contacts_page'=>'displaycontacts',
+							 );
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user, $pass)
+	{
+		$this->resetDebugger();
+		$this->service='mail_in';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://mail.in.com/");
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"http://mail.in.com/",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('initial_get',"http://mail.in.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		$form_action='http://mail.in.com'.$this->getElementString($res,'name="frmloginverify" method="POST" action="','"');
+		$post_elements=array('f_sourceret'=>'http://mail.in.com/mails/mailstartup','f_id'=>$user,'f_pwd'=>$pass);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse('post_login',$res))
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',true,$post_elements);
+		else 
+			{
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+			
+		$url_contacts='http://mail.in.com/mails/getcontacts.php';
+		$this->login_ok=$url_contacts;	
+		return true;
+	}
+	
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse('contacts_page',$res))
+			$this->updateDebugBuffer('contacts_page',$url,'GET');
+		else 
+			{
+			$this->updateDebugBuffer('contacts_page',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//td";$data=$xpath->query($query);
+		foreach($data as $node) 
+			{
+			if (strpos($node->getAttribute('onclick'),'displaycontacts')!==false)
+				{
+				$name=$node->nodeValue;
+				$email_array=explode("'",(string)$node->getAttribute('onclick'));
+				if (!empty($email_array[1])) $contacts[$email_array[1]]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$email_array[1]);
+				}
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get('http://mail.in.com/logout',true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();	
+		}
+}
+?>
diff --git a/plugins/contact_importer/OpenInviter/plugins/mail_ru.plg.php b/plugins/contact_importer/OpenInviter/plugins/mail_ru.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..3fcef7f293545dd01f2619babc3821c6f078a513
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/mail_ru.plg.php
@@ -0,0 +1,173 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Mail.ru',
+	'version'=>'1.1.2',
+	'description'=>"Get the contacts from a Mail.ru account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.mail.ru',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(in.com)/i','/(list.ru)/i','/(inbox.ru)/i','/(bk.ru)/i','/(mail.ru)/i'),
+	);
+/**
+ * Mail.ru Plugin
+ * 
+ * Import user's contacts from Mail.ru's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.9
+ */
+class mail_ru extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'login',
+				'login_post'=>'mra_confirm',
+				'file_contacts'=>'"'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='mail_ru';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://www.mail.ru/",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.mail.ru/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.mail.ru/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$array_user=explode("@",$user);$domain=strtolower($array_user[1]);
+		$hidden_element=$this->getElementDOM($res,"//input[@name='Mpopl']","value");
+		$post_elements=array('Domain'=>$domain,'Login'=>$user,'Password'=>$pass,'Mpopl'=>$hidden_element[0]);
+		$res=$this->post("http://win.mail.ru/cgi-bin/auth",$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"http://win.mail.ru/cgi-bin/auth",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"http://win.mail.ru/cgi-bin/auth",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_export="http://win.mail.ru/cgi-bin/abexport/addressbook.csv";
+		$this->login_ok=$url_export;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;	
+		$post_elements=array("confirm"=>"1","abtype"=>"1");
+		$res=$this->post($url,$post_elements);
+		if ($this->checkResponse("file_contacts",$res))
+			{
+			$temp=$this->parseCSV($res);$teM=explode(PHP_EOL,$res);$arrayDescriptionFlag=explode(',',$teM[0]);print_R($arrayDescriptionFlag);
+			$contacts=array();
+			foreach ($temp as $values)
+				{
+				$contacts[$values[8]]=array('first_name'=>(!empty($values[0])?$values[0]:false),
+												'middle_name'=>(!empty($values[2])?$values[2]:false),
+												'last_name'=>(!empty($values[1])?$values[1]:false),
+												'nickname'=>false,
+												'email_1'=>(!empty($values[8])?$values[8]:false),
+												'email_2'=>(!empty($values[9])?$values[9]:false),
+												'email_3'=>false,
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[11])?$values[11]:false),
+												'phone_home'=>(!empty($values[9])?$values[9]:false),			
+												'pager'=>false,
+												'address_home'=>false,
+												'address_city'=>(!empty($values[5])?$values[5]:false),
+												'address_state'=>(!empty($values[7])?$values[7]:false),
+												'address_country'=>(!empty($values[8])?$values[8]:false),
+												'postcode_home'=>(!empty($values[6])?$values[6]:false),
+												'company_work'=>(!empty($values[14])?$values[14]:false),
+												'address_work'=>false,
+												'address_work_city'=>(!empty($values[16])?$values[16]:false),
+												'address_work_country'=>(!empty($values[19])?$values[19]:false),
+												'address_work_state'=>(!empty($values[17])?$values[17]:false),
+												'address_work_postcode'=>(!empty($values[18])?$values[18]:false),
+												'fax_work'=>(!empty($values[21])?$values[21]:false),
+												'phone_work'=>(!empty($values[20])?$values[20]:false),
+												'website'=>(!empty($values[12])?$values[12]:false),
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );
+				}
+			$this->updateDebugBuffer('file_contacts',"{$url}",'POST',true,$post_elements);
+			}
+		else
+			{
+			$this->updateDebugBuffer('file_contacts',"{$url}",'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+
+		}
+		
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://win.mail.ru/cgi-bin/logout",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/meinvz.plg.php b/plugins/contact_importer/OpenInviter/plugins/meinvz.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..08dd9d7af83552a29b0cce310fb2fc26f26fcf0b
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/meinvz.plg.php
@@ -0,0 +1,202 @@
+<?php
+/*Import Friends from Meinvz
+ * You can send message to your MeinVz Inbox
+ */
+$_pluginInfo=array(
+	'name'=>'Meinvz',
+	'version'=>'1.0.7',
+	'description'=>"Get the contacts from a MeinVz account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.meinvz.net/',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * MeinVz Plugin
+ * 
+ * Import user's contacts from MeinVz and send 
+ * messages using the internal messaging system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class meinvz extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'password',
+				'login_post'=>'Friends',
+				'url_friends'=>'name',
+				'url_send_message'=>'Messages_searchfield',
+				'send_message'=>'SendSuccessAd'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='meinvz';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://www.meinvz.net/");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.meinvz.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.meinvz.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$form_action="https://secure.meinvz.net/Login ";
+		$post_elements=array('email'=>$user,'password'=>$pass,'login'=>'Login','jsEnabled'=>'true','ipRestriction'=>1,'formkey'=>$this->getElementString($res,'name="formkey" value="','"'),'iv'=>$this->getElementString($res,'name="iv" value="','"'));
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_logout='http://www.meinvz.net/Logout/'.$this->getElementString($res,'<li><a href="/Logout/','"');
+		$url_friends='http://www.meinvz.net/Messages/WriteMessage';
+		$this->login_ok=$url_friends;
+		file_put_contents($this->getLogoutPath(),$url_logout);
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		if ($this->checkResponse("url_friends",$res))
+			$this->updateDebugBuffer('url_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$contacts=array();
+		if (preg_match_all("#\&\#34\;name\&\#34\;\:\&\#34\;(.+)\&\#34\;\,\&\#34\;profile\&\#34\;\:\&\#34\;\\\/Profile\\\/(.+)\&\#34\;#U",$res,$matches))
+			{
+			if (!empty($matches[2]))
+				foreach($matches[2] as $key=>$id)
+					if (!empty($matches[1][$key])) $contacts[$id]=$matches[1][$key];
+			}
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $href=>$name)
+			{
+			$countMessages++;
+			$url_send_message="http://www.meinvz.net{$href}";
+			$res=$this->get($url_send_message,true);
+			if ($this->checkResponse("url_send_message",$res))
+				$this->updateDebugBuffer('url_send_message',"shttp://www.bebo.com/",'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_send_message',"http://www.bebo.com/",'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			$form_action=$url_send_message;
+			$formkey_array=$this->getElementDOM($res,"//input[@name='formkey']",'value');
+			$checkcode_array=$this->getElementDOM($res,"//input[@name='checkcode']",'value');
+			$iv_array=$this->getElementDOM($res,"//input[@name='iv']",'value');
+			$post_elements=array('recipientIds[]'=>$this->getElementString($res,'friendList" value="{&#34;','&#34;'),
+								 'subject'=>$message['subject'],
+								 'message'=>$message['body'],
+								 'recipientIdForHistory'=>$this->getElementString($res,'friendList" value="{&#34;','&#34;'),
+								 'formkey'=>$formkey_array[1],
+								 'iv'=>$iv_array[1],
+								 'checkcode'=>$checkcode_array[1],
+								);
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+					$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		if (file_exists($this->getLogoutPath()))
+			{
+			$url_logout=file_get_contents($this->getLogoutPath());
+			$res=$this->get($url_logout,true);
+			}
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/meta.plg.php b/plugins/contact_importer/OpenInviter/plugins/meta.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..3430441a7aa8867a7ebafdd9d380a22a690a0fa3
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/meta.plg.php
@@ -0,0 +1,172 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Meta',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a Meta account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://meta.ua/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Meta Plugin
+ * 
+ * Imports user's contacts from Meta AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class meta extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'login',
+				'login_post'=>'INBOX',
+				'file_contacts'=>'Name',
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='meta';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+					
+		$res=$this->get("http://meta.ua/");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://meta.ua/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://meta.ua/",'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://passport.meta.ua/";
+		$post_elements=array('login'=>$user,'password'=>$pass,'mode'=>'login','from'=>'mail','lifetime'=>'alltime','subm'=>'Enter');
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse('login_post',$res))
+			$this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$this->login_ok=true;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$form_action="http://webmail.meta.ua/adress_transfer.php";
+		$post_elements=array('mail_client'=>'outlook_en','js_enable'=>false,'action'=>'export','groups[]'=>'all','subm'=>true);
+		$res=$this->post($form_action,$post_elements);
+		if ($this->checkResponse("file_contacts",$res))
+			$this->updateDebugBuffer('file_contacts',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('file_contacts',$form_action,'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$contacts=array();$tempFile=explode(PHP_EOL,$res);unset($tempFile[0]);
+		foreach ($tempFile as $valuesTemp)
+			{
+			$values=explode(';',$valuesTemp);
+			if (!empty($values[4]))
+				$contacts[$values[4]]=array('first_name'=>(!empty($values[0])?$values[0]:false),
+												'middle_name'=>(!empty($values[2])?$values[2]:false),
+												'last_name'=>(!empty($values[1])?$values[1]:false),
+												'nickname'=>false,
+												'email_1'=>(!empty($values[4])?$values[4]:false),
+												'email_2'=>(!empty($values[5])?$values[5]:false),
+												'email_3'=>false,
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[13])?$values[13]:false),
+												'phone_home'=>(!empty($values[11])?$values[11]:false),			
+												'pager'=>(!empty($values[23])?$values[23]:false),
+												'address_home'=>false,
+												'address_city'=>(!empty($values[7])?$values[7]:false),
+												'address_state'=>(!empty($values[9])?$values[9]:false),
+												'address_country'=>(!empty($values[10])?$values[10]:false),
+												'postcode_home'=>(!empty($values[8])?$values[8]:false),
+												'company_work'=>(!empty($values[24])?$values[24]:false),
+												'address_work'=>false,
+												'address_work_city'=>(!empty($values[16])?$values[16]:false),
+												'address_work_country'=>(!empty($values[19])?$values[19]:false),
+												'address_work_state'=>(!empty($values[18])?$values[18]:false),
+												'address_work_postcode'=>(!empty($values[17])?$values[17]:false),
+												'fax_work'=>(!empty($values[21])?$values[21]:false),
+												'phone_work'=>(!empty($values[20])?$values[20]:false),
+												'website'=>(!empty($values[14])?$values[14]:false),
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );					
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get('http://webmail.meta.ua/logout.php',true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/mevio.plg.php b/plugins/contact_importer/OpenInviter/plugins/mevio.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..370221c669313cd07cd8a01ea5a7574cfb9dd344
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/mevio.plg.php
@@ -0,0 +1,209 @@
+<?php
+/*Import Friends from Mevio
+ * You can Send Private Messages using mevio system
+ */
+$_pluginInfo=array(
+	'name'=>'Mevio',
+	'version'=>'1.0.4',
+	'description'=>"Get the contacts from a Mevio account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.mevio.com/',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Mvio Plugin
+ * 
+ * Import user's contacts from Mevio and send Private messages
+ * using  Mevio system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class mevio extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	
+	public $debug_array=array(
+				'initial_get'=>'username',
+				'login_post'=>'activePersona=',
+				'url_home'=>'selected nobg',
+				'get_friends'=>'laminate-std-name',
+				'url_friend'=>'personaId',
+				'url_send_message'=>'subject',
+				'send_message'=>'message sent'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='mevio';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+
+		$res=$this->get("http://www.mevio.com/login/#loginOverlay",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://us.cyworld.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://us.cyworld.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://www.mevio.com/login/#loginOverlay";
+		$post_elements=array('username'=>$user,'password'=>$pass,'LoginSubmit'=>'Log In');
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$url_profile='http://www.mevio.com/mc/digs/?control=Digs&action=editDigs&digMode=entourage&activePersona='.$this->getElementString($res,'http://www.mevio.com/mc/digs/?control=Digs&action=editDigs&digMode=entourage&activePersona=','"');
+		$this->login_ok=$url_profile;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//div[@class='laminate-std-name']";$data=$xpath->query($query);
+		foreach($data as $node)
+			{
+			$name=$node->childNodes->item(1)->nodeValue;
+			$href=$node->childNodes->item(1)->getAttribute('href');
+			if (!empty($href)) $contacts[$href]=$name;
+			} 
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $href=>$name)
+			{
+			$countMessages++;
+			$res=$this->get($href,true);
+			if ($this->checkResponse("url_friend",$res))
+				$this->updateDebugBuffer('url_friend',$href,'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_friend',$href,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			$friend_id=$this->getElementString($res,'"personaId":"','"');
+			$url_send_message='http://www.mevio.com/u2u/?class=NewTextMessage&method=auto_compose&to_select='.$friend_id;
+			$res=$this->get($url_send_message,true);
+			if ($this->checkResponse("url_send_message",$res))
+				$this->updateDebugBuffer('url_send_message',$url_send_message,'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_send_message',$url_send_message,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+							
+			$form_action="http://www.mevio.com/u2u/?class=NewTextMessage&method=send";
+			$post_elements=array( 'to_select[]'=>$friend_id,
+								  'subject'=>$message['subject'],
+								  'body'=>$message['body'],
+								  'response'=>'message_center'
+								  );
+			$res=$this->post($form_action,$post_elements);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.mevio.com/login/?mode=logout");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/motortopia.plg.php b/plugins/contact_importer/OpenInviter/plugins/motortopia.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..171edf2cda94245f9edba45a47872869a7685f8d
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/motortopia.plg.php
@@ -0,0 +1,179 @@
+<?php
+/*Import Friends from Motortopia
+ * You can Write Private Messages using Motortopia system
+ */
+$_pluginInfo=array(
+	'name'=>'Motortopia',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a Motortopia account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.motortopia.com/main/cars',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Motortopia Plugin
+ * 
+ * Import Friends from Motortopia
+ * You can Write Private Messages using Motortopia system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class motortopia extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'email',
+				'login_post'=>'logout',
+				'get_friends'=>'Go to this person',
+				'send_message'=>'inbox'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='motortopia';
+		$this->service_user=$user;
+		$this->service_password=$pass;	
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://www.motortopia.com/main/cars",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.motortopia.com/en/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.motortopia.com/en/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://www.motortopia.com/user/login/main/y";
+		$post_elements=array('email'=>$user,
+							 'password'=>$pass,
+							 'submit'=>'Login',
+							 'token'=>$this->getElementString($res,'name="token" value="','"')
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_friends='http://www.motortopia.com/friend/browse/u/'.$this->getElementString($res,'/friend/browse/u/','"');
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		$names_array=$this->getElementDOM($res,"//dd[@class='allHead']");
+		if (!empty($names_array))
+			foreach($names_array as $key=>$value)  $contacts[$value]=$value;
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $name)
+			{			
+			$countMessages++;
+			$form_action="http://www.motortopia.com/mail/send/{$name}";
+			$post_elements=array('subject'=>$message['subject'],'body'=>$message['body'],'submit'=>'Send');
+			$res=$this->post($form_action,$post_elements,true);
+						
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.motortopia.com/user/logout");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/multiply.plg.php b/plugins/contact_importer/OpenInviter/plugins/multiply.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..9b78d2056c7edf24c5ca5799a263fa644c1a3cca
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/multiply.plg.php
@@ -0,0 +1,192 @@
+<?php
+/*Import Friends from Multiply
+ * You can Write Private Messages using Multiply system
+ */
+$_pluginInfo=array(
+	'name'=>'Multiply',
+	'version'=>'1.0.4',
+	'description'=>"Get the contacts from a Multiply account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://multiply.com/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Multiply Plugin
+ * 
+ * Import Friends from Multiply
+ * You can Write Private Messages using Multiply system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class multiply extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'signin::id',
+				'login_post'=>'logout',
+				'get_friends'=>'contactbox',
+				'url_send_message'=>'form::subject',
+				'send_message'=>'Inbox'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='multiply';
+		$this->service_user=$user;
+		$this->service_password=$pass;	
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://multiply.com/",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.multiply.com/en/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.multiply.com/en/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://multiply.com/user/signin";
+		$post_elements=$this->getHiddenElements($res);$post_elements['signin::id']=$user;$post_elements['signin::password']=$pass;$post_elements['signin::remember']='on';$post_elements['omniture_submission']='submitted';
+		$res=$this->post($form_action,$post_elements,true);		
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$url_contacts="http://{$user}.multiply.com/contacts";
+		$this->login_ok=$url_contacts;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//div[@class='contactbox']";$data=$xpath->query($query);
+		foreach($data as $node)
+			{
+			$href=$node->firstChild->getAttribute('href');
+			$name=trim($this->getElementString($href,'http://','.multiply.com'));
+			if (!empty($href)) $contacts[$href]=utf8_decode($name);
+			} 
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $href=>$name)
+			{	
+			$countMessages++;	
+			$send_message_url="http://multiply.com/compose/pm?individual={$name}";
+			$res=$this->get($send_message_url,true);
+			if ($this->checkResponse("url_send_message",$res))
+				$this->updateDebugBuffer('url_send_message',$send_message_url,'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_send_message',$send_message_url,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			
+			$form_action="http://multiply.com/compose/pm";
+			$post_elements=$this->getHiddenElements($res);$post_elements['form::subject']=$message['subject'];$post_elements['form::body']=$message['body'];$post_elements['form::Send Personal Message']='  Send Personal Message  ';
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://multiply.com/user/signout");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/mycatspace.plg.php b/plugins/contact_importer/OpenInviter/plugins/mycatspace.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..43ce6af0b2515fcc3f7a7fc46ce8cd9b7feb5aef
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/mycatspace.plg.php
@@ -0,0 +1,179 @@
+<?php
+/*Import Friends from mycatspace
+ * You can Write Private Messages using mycatspace system
+ */
+$_pluginInfo=array(
+	'name'=>'Mycatspace',
+	'version'=>'1.0.4',
+	'description'=>"Get the contacts from a mycatspace account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.mycatspace.com/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Mycatspace Plugin
+ * 
+ * Import Friends from Mycatspace.com
+ * You can Write Private Messages using Mycatspace system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class mycatspace extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'username',
+				'login_post'=>'/account/logout',
+				'get_friends'=>'receiver_id',
+				'send_message'=>'was sent'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='mycatspace';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+
+		$res=$this->get("http://www.mycatspace.com/",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.mycatspace.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.mycatspace.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+
+		$form_action="http://www.mycatspace.com/account/login";
+		$post_elements=array('username'=>$user,'password'=>$pass,'x'=>rand(1,100),'y'=>rand(1,100));
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_friends='http://www.mycatspace.com/email/compose';
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$contacts=array();
+		$names_array=$this->getElementDOM($res,'//option');
+		$ids_array=$this->getElementDOM($res,'//option','value');
+		foreach($ids_array as $key=>$value)
+			if (!empty($value)) $contacts[$value]=$names_array[$key];
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $id=>$name)
+			{
+			$countMessages++;
+			$form_action="http://www.mycatspace.com/email/compose";
+			$post_elements=array('email[receiver_id]'=>$id,
+								 'email[subject]'=>$message['subject'],
+								 'email[content]'=>$message['body'],
+								 'x'=>rand(1,100),
+								 'y'=>rand(1,100)
+								);
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.mycatspace.com/account/logout");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/mydogspace.plg.php b/plugins/contact_importer/OpenInviter/plugins/mydogspace.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..0b8722f4291c674fa068ead39d19773d221ecdf3
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/mydogspace.plg.php
@@ -0,0 +1,179 @@
+<?php
+/*Import Friends from mydogspace
+ * You can Write Private Messages using mydogspace system
+ */
+$_pluginInfo=array(
+	'name'=>'Mydogspace',
+	'version'=>'1.0.4',
+	'description'=>"Get the contacts from a mydogspace account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.mydogspace.com/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Mydogspace Plugin
+ * 
+ * Import Friends from Mydogspace.com
+ * You can Write Private Messages using Mydogspace system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class mydogspace extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'username',
+				'login_post'=>'/account/logout',
+				'get_friends'=>'receiver_id',
+				'send_message'=>'was sent'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='mydogspace';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+
+		$res=$this->get("http://www.mydogspace.com/",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.mydogspace.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.mydogspace.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+
+		$form_action="http://www.mydogspace.com/account/login";
+		$post_elements=array('username'=>$user,'password'=>$pass,'x'=>rand(1,100),'y'=>rand(1,100));
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_friends='http://www.mydogspace.com/email/compose';
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$contacts=array();
+		$names_array=$this->getElementDOM($res,'//option');
+		$ids_array=$this->getElementDOM($res,'//option','value');
+		foreach($ids_array as $key=>$value)
+			if (!empty($value)) $contacts[$value]=$names_array[$key];
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $id=>$name)
+			{
+			$countMessages++;
+			$form_action="http://www.mydogspace.com/email/compose";
+			$post_elements=array('email[receiver_id]'=>$id,
+								 'email[subject]'=>$message['subject'],
+								 'email[content]'=>$message['body'],
+								 'x'=>rand(1,100),
+								 'y'=>rand(1,100)
+								);
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.mydogspace.com/account/logout");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/mynet.plg.php b/plugins/contact_importer/OpenInviter/plugins/mynet.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..0382ead6ac3f570d0d659a7aaf290a1fc608eeff
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/mynet.plg.php
@@ -0,0 +1,208 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Mynet.com',
+	'version'=>'1.0.4',
+	'description'=>"Get the contacts from an Mynet account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://uyeler.mynet.com/login/?loginRequestingURL=http%3A%2F%2Feposta.mynet.com%2Findex%2Fmymail.html&formname=eposta',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Mynet Plugin
+ * 
+ * Imports user's contacts from Mynet
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class mynet extends openinviter_base
+{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array('initial_get'=>'faultyUser',
+			  				  'post_login'=>'mymail',
+			  				  'url_adress'=>'adres',
+			  				  'url_file'=>'adres',
+			  				  'file_contacts'=>'Name'
+							 );
+
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user, $pass)
+		{
+		$this->resetDebugger();
+		$this->service='mynet';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res = $this->get("http://uyeler.mynet.com/login/?loginRequestingURL=http%3A%2F%2Feposta.mynet.com%2Findex%2Fmymail.html&formname=eposta");
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"http://uyeler.mynet.com/login/?loginRequestingURL=http%3A%2F%2Feposta.mynet.com%2Findex%2Fmymail.html&formname=eposta",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('initial_get',"http://uyeler.mynet.com/login/?loginRequestingURL=http%3A%2F%2Feposta.mynet.com%2Findex%2Fmymail.html&formname=eposta",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		
+		$form_action="https://uyeler.mynet.com/index/uyegiris.html";
+		$post_elements=array('nameofservice'=>'epost',
+							 'pageURL'=>'http://uyeler.mynet.com/login/login.asp?loginRequestingURL=http%3A%2F%2Feposta.mynet.com%2Findex%2Fmymail.html&formname=eposta',
+							 'faultCoun'=>'',
+							 'faultyUser'=>'',
+							 'loginRequestingURL'=>'http://eposta.mynet.com/index/mymail.html',
+							 'rememberstate'=>2,
+							 'username'=>$user,
+							 'password'=>$pass,
+							 'x'=>rand(1,50),
+							 'y'=>rand(1,20),
+							 'rememberstatep'=>2
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse('post_login',$res))
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',true,$post_elements);
+		else 
+			{
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		
+		$res=$this->get("http://eposta.mynet.com/index/mymail.html",true);
+		$base_url="http://".$this->getElementString($res,"var mySrvName = '","'").".mynet.com";
+		if ($this->checkResponse('url_adress',$res))
+			$this->updateDebugBuffer('url_adress',"http://eposta.mynet.com/index/mymail.html",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('url_adress',"http://eposta.mynet.com/index/mymail.html",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+			
+		$url_adressbook='http://adres.email'.$this->getElementString($res,'http://adres.email','"');
+		$res=$this->get($url_adressbook);
+		if ($this->checkResponse('url_file',$res))
+			$this->updateDebugBuffer('url_file',$url_adressbook,'GET');
+		else 
+			{
+			$this->updateDebugBuffer('url_file',$url_adressbook,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		$url_file_contacts="http://adres.email.mynet.com/Exim/ExportFileDownload.aspx?format=microsoft_csv";
+		$this->login_ok=$url_file_contacts;
+		file_put_contents($this->getLogoutPath(),$base_url);		
+		return true;
+		} 
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);	
+		if ($this->checkResponse('file_contacts',$res))
+			$this->updateDebugBuffer('file_contacts',$url,'GET');
+		else 
+			{
+			$this->updateDebugBuffer('file_contacts',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+				
+		$temp=$this->parseCSV($res);
+		$contacts=array();
+		foreach ($temp as $values)
+			{			
+			if (!empty($values[9]))
+				 $contacts[$values[9]]=array('first_name'=>(!empty($values[0])?$values[0]:false),
+												'middle_name'=>false,
+												'last_name'=>(!empty($values[1])?$values[1]:false),
+												'nickname'=>false,
+												'email_1'=>(!empty($values[9])?$values[9]:false),
+												'email_2'=>false,
+												'email_3'=>false,
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[7])?$values[7]:false),
+												'phone_home'=>(!empty($values[6])?$values[6]:false),			
+												'pager'=>false,
+												'address_home'=>false,
+												'address_city'=>false,
+												'address_state'=>false,
+												'address_country'=>false,
+												'postcode_home'=>(!empty($values[4])?$values[4]:false),
+												'company_work'=>(!empty($values[2])?$values[2]:false),
+												'address_work'=>false,
+												'address_work_city'=>false,
+												'address_work_country'=>false,
+												'address_work_state'=>false,
+												'address_work_postcode'=>false,
+												'fax_work'=>false,
+												'phone_work'=>false,
+												'website'=>false,
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );	
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		if (file_exists($this->getLogoutPath()))
+			{
+			$url_logout=file_get_contents($this->getLogoutPath())."/webmail/src/signout.php";
+			$res=$this->get($url_logout,true);
+			}
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		}
+	}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/myspace.plg.php b/plugins/contact_importer/OpenInviter/plugins/myspace.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..a5d20cc8e8a9f4c618e5980e115ef7489b4115d8
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/myspace.plg.php
@@ -0,0 +1,200 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'MySpace',
+	'version'=>'1.0.8',
+	'description'=>"Get the contacts from a MySpace account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.myspace.com',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * MySpace Plugin
+ * 
+ * Import user's contacts from MySpace and send 
+ * messages using the internal messaging system
+ * 
+ * @author OpenInviter
+ * @version 1.0.5
+ */
+class myspace extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'__VIEWSTATE',
+				'login'=>'Compose',
+				'get_url_friends'=>'profile.interests',
+				'url_friends'=>'friendHelperBox'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='myspace';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://www.myspace.com/");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.myspace.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.myspace.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$form_action="http://secure.myspace.com/index.cfm?fuseaction=login.process";
+		$post_elements=array('__VIEWSTATE'=>$this->getElementString($res,'id="__VIEWSTATE" value="','"'),
+							 'NextPage'=>'',
+							 'ctl00_ctl00_cpMain_cpMain_LoginBox_Email_Textbox'=>$user,
+							 'ctl00_ctl00_cpMain_cpMain_LoginBox_Password_Textbox'=>$pass,
+							 'dlb'=>'Log In',
+							 'ctl00_ctl00_cpMain_cpMain_LoginBox_SingleSignOnHash'=>'',
+							 'ctl00_ctl00_cpMain_cpMain_LoginBox_SingleSignOnRequestUri'=>'',
+							 'ctl00_ctl00_cpMain_cpMain_LoginBox_nexturl'=>'',
+							 'ctl00_ctl00_cpMain_cpMain_LoginBox_apikey'=>'',
+							 'ctl00_ctl00_cpMain_cpMain_LoginBox_ContainerPage'=>''							
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("get_url_friends",$res))
+			$this->updateDebugBuffer('get_url_friends',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('get_url_friends',$form_action,'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_friends="http://friends.myspace.com/index.cfm?fuseaction=user.viewfriends&friendID=".$this->getElementString($res,'"UserId":',',');
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		if ($this->checkResponse("url_friends",$res))
+			$this->updateDebugBuffer('url_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$has_next=true;$page=-1;$contacts=array();
+		do
+			{
+			if (strpos($res,'nextPagingLink disabledPaging')!==false) $has_next=false;
+			else	
+				{
+				$page++;
+				$page_next=$this->getElementString($res,"var urlHelper = new FriendsCategories.UrlHelper('","'");
+				$fid=$this->getElementString($res,"urlHelper.SetQueryValue('fid', '","'");
+				$lid=$this->getElementString($res,"urlHelper.SetQueryValue('lid', '","'");
+				$page_next.="&p={$page}&j=1&fid={$fid}&lid={$lid}";
+				$res=$this->get($page_next,true);
+				}
+			$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+			$xpath=new DOMXPath($doc);$query="//div[@class='friendHelperBox']";$data=$xpath->query($query);
+			foreach ($data as $node)
+				$contacts[$node->getAttribute('friendid')]=(string)$node->nodeValue;
+			}
+		while($has_next);	
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$res=$this->get("http://friends.myspace.com/index.cfm?fuseaction=user.viewfriends&friendID=",true);
+		$mytokenvar=$this->getElementString($res,"MyToken=","')");
+		$countMessages=0;
+		foreach($contacts as $id=>$name)
+			{
+			$countMessages++;
+			$url_messaging="http://messaging.myspace.com/index.cfm?fuseaction=mail.message&friendID={$id}&MyToken={$mytokenvar}";
+			$res=$this->get($url_messaging,true);
+			$post_elements=array('__LASTFOCUS'=>'',
+								 '__EVENTTARGET'=>'ctl00$ctl00$ctl00$cpMain$cpMain$messagingMain$SendMessage$btnSend',
+								 '__EVENTARGUMENT'=>'',
+								 '__VIEWSTATE'=>$this->getElementString($res,'id="__VIEWSTATE" value="','"'),
+								 '___msUniqueVal'=>$this->getElementString($res,'id="___msUniqueVal" value="','"'),
+								 'ctl00$ctl00$ctl00$cpMain$cpMain$messagingMain$SendMessage$selectedRecipient'=>'',
+								 'ctl00$ctl00$ctl00$cpMain$cpMain$messagingMain$SendMessage$selectedRecipientName'=>'',
+								 'ctl00$ctl00$ctl00$cpMain$cpMain$messagingMain$SendMessage$subjectTextBox'=>$message['subject'],
+								 'ctl00$ctl00$ctl00$cpMain$cpMain$messagingMain$SendMessage$ieHack'=>'',
+								 'ctl00$ctl00$ctl00$cpMain$cpMain$messagingMain$SendMessage$bodyTextBox'=>$message['body'],
+								 'ctl00$ctl00$ctl00$cpMain$cpMain$messagingMain$SendMessage$saveDraftGuid'=>'',
+								 'ctl00$ctl00$ctl00$cpMain$cpMain$messagingMain$SendMessage$MessageInfoData'=>'',
+								 'ctl00$ctl00$ctl00$cpMain$cpMain$messagingMain$SendMessage$FriendInfoData'=>$this->getElementString($res,'id="ctl00_ctl00_ctl00_cpMain_cpMain_messagingMain_SendMessage_FriendInfoData" value="','"'),
+								);
+			$res=$this->post($url_messaging,$post_elements,true);
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.myspace.com/index.cfm?fuseaction=signout",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/netaddress.plg.php b/plugins/contact_importer/OpenInviter/plugins/netaddress.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..9e418140c803dcee2b7aad1758cf2b2f4cc45d26
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/netaddress.plg.php
@@ -0,0 +1,195 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Netaddress',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a Netaddress account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'https://www.netaddress.com/',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(netaddress.com)/i'),
+	);
+/**
+ * Netadress Plugin
+ * 
+ * Imports user's contacts from Netaddress's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class netaddress extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array('initial_get'=>'UserID',
+							  'post_login'=>'Door',
+							  'contacts_page'=>'fileformat',
+							  'file_contacts'=>'Name',
+							 );
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user, $pass)
+	{
+		$this->resetDebugger();
+		$this->service='netaddress';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("https://www.netaddress.com/");
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"https://www.netaddress.com/",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('initial_get',"https://www.netaddress.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+			
+		$form_action='https://www.netaddress.com/tpl/Door/LoginPost';
+		$post_elements=array('UserID'=>$user,
+							 'passwd'=>$pass,
+							 'LoginState'=>2,
+							 'SuccessfulLogin'=>'/tpl',
+							 'NewServerName'=>'www.netaddress.com',
+							 'JavaScript'=>'JavaScript1.2',
+							 'DomainID'=>$this->getElementString($res,'"DomainID" value="','"'),
+							 'Domain'=>$this->getElementString($res,'"Domain" value="','"')
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		$session_id=$this->getElementString($res,'/Door/','/');
+		if ($this->checkResponse('post_login',$res))
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',true,$post_elements);
+		else 
+			{
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		$this->login_ok=$session_id;	
+		return true;
+	}
+	
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $id=$this->login_ok;
+		$url_export="http://www.netaddress.com/icalphp/exportcontact.php?sid={$id}";
+		$res=$this->get($url_export);
+		if ($this->checkResponse('contacts_page',$res))
+			$this->updateDebugBuffer('contacts_page',$url_export,'GET');
+		else 
+			{
+			$this->updateDebugBuffer('contacts_page',$url_export,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		
+		$form_action='http://www.netaddress.com/icalphp/exportcontact.php';
+		$post_elements=array('sid'=>$id,'fileformat'=>'csv1','csv1charset'=>'UTF-8');
+		$res=$this->post($form_action,$post_elements);
+		if ($this->checkResponse('file_contacts',$res))
+			$this->updateDebugBuffer('file_contacts',"{$form_action}",'POST',true,$post_elements);
+		else 
+			{
+			$this->updateDebugBuffer('file_contacts',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		
+		$temp=$this->parseCSV($res);$teM=explode(PHP_EOL,$res);$arrayDescriptionFlag=explode(',',$teM[0]);print_R($arrayDescriptionFlag);
+		$contacts=array();
+		foreach ($temp as $values)
+			{
+			$name=$values[1].(empty($values[2])?'':(empty($values[1])?'':'-')."{$values[2]}").(empty($values[3])?'':" \"{$values[3]}\"");
+			if (!empty($values[5]))
+				$contacts[$values[5]]=(empty($name)?$values[5]:$name);
+			
+			if (!empty($values[5]))
+				$descriptionArray[$values[5]]=array('first_name'=>(!empty($values[1])?$values[0]:false),
+												'middle_name'=>(!empty($values[2])?$values[2]:false),
+												'last_name'=>(!empty($values[3])?$values[1]:false),
+												'nickname'=>false,
+												'email_1'=>(!empty($values[5])?$values[4]:false),
+												'email_2'=>false,
+												'email_3'=>false,
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[11])?$values[11]:false),
+												'phone_home'=>(!empty($values[9])?$values[9]:false),			
+												'pager'=>false,
+												'address_home'=>false,
+												'address_city'=>(!empty($values[5])?$values[5]:false),
+												'address_state'=>(!empty($values[7])?$values[7]:false),
+												'address_country'=>(!empty($values[8])?$values[8]:false),
+												'postcode_home'=>(!empty($values[6])?$values[6]:false),
+												'company_work'=>(!empty($values[14])?$values[14]:false),
+												'address_work'=>false,
+												'address_work_city'=>(!empty($values[16])?$values[16]:false),
+												'address_work_country'=>(!empty($values[19])?$values[19]:false),
+												'address_work_state'=>(!empty($values[17])?$values[17]:false),
+												'address_work_postcode'=>(!empty($values[18])?$values[18]:false),
+												'fax_work'=>(!empty($values[21])?$values[21]:false),
+												'phone_work'=>(!empty($values[20])?$values[20]:false),
+												'website'=>(!empty($values[12])?$values[12]:false),
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );	
+			}
+			
+		print_R($descriptionArray);			
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $descriptionArray;
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get('http://mail.in.com/logout',true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();	
+		}
+}
+?>
diff --git a/plugins/contact_importer/OpenInviter/plugins/netlog.plg.php b/plugins/contact_importer/OpenInviter/plugins/netlog.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..6d5dd439ec57c8241113ebd6787ccfd011f33ee6
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/netlog.plg.php
@@ -0,0 +1,172 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'NetLog',
+	'version'=>'1.0.6',
+	'description'=>"Get the contacts from a NetLog account And Shout a message to your friends",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://en.netlog.com/m/login',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Netlog Plugin
+ * 
+ * Import Friends from Netlog
+ * You can Shouts Messages to your friends using Netlog system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class netlog extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	protected $timeout=30;
+		
+	public $debug_array=array(
+			  'initial_get'=>'target',
+			  'login_post'=>'messages',
+			  'get_friends'=>'option',
+			  'send_message'=>'success',
+	);
+	
+		/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */		 				  				 
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='netlog';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		$res=$this->get('http://en.netlog.com/m/login');
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"http://en.netlog.com/m/login",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('initial_get',"http://en.netlog.com/m/login",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}  
+
+		$form_action="http://en.netlog.com/m/login";
+		$post_elements=array('action'=>'login','target'=>$this->getElementString($res,'name="target" value="','"'),'nickname'=>$user,'password'=>$pass);
+		$res=$this->post($form_action,$post_elements,true,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$this->login_ok="http://en.netlog.com/m/messages/send";
+		return true;
+		}
+		
+		/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */		
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//option";$data=$xpath->query($query);
+		foreach($data as $node)
+			{
+			$user=$node->getAttribute('value');$name=$node->nodeValue;
+			if (strpos($name,'Album >')===false) if (!empty($user)) $contacts[$user]=$name;
+			}
+		return $contacts;
+		}
+	
+		/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */	
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $user=>$name)
+			{
+			$countMessages++;
+			$form_action="http://en.netlog.com/m/shouts/add";
+			$post_elements=array('nickname'=>$user,'action'=>'__button','shout'=>$message['body'],'__btaAddShout'=>'Shout');
+			$res=$this->post($form_action,$post_elements,true,true);
+			if (strpos($res,'warning')===false)
+				if ($this->checkResponse("send_message",$res))
+					$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+				else
+					{
+					$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+					$this->debugRequest();
+					$this->stopPlugin();
+					return false;
+					}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+		}
+	
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$logout_url = "http://en.netlog.com/m/login/action=logout";
+		$res = $this->get($logout_url);
+		$this->debugRequest();
+		$this->resetDebugger();
+ 		$this->stopPlugin();
+		}
+	}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/ning.plg.php b/plugins/contact_importer/OpenInviter/plugins/ning.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..a90edecf6be9ce15e857ca96e4bead12791f9293
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/ning.plg.php
@@ -0,0 +1,166 @@
+<?php
+/*Import Friends from ning
+ * You can Update your status using ning system
+ */
+$_pluginInfo=array(
+	'name'=>'Ning',
+	'version'=>'1.0.1',
+	'description'=>"Get the contacts from a ning account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.ning.com/',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Ning Plugin
+ * 
+ * Import Friends from Ning
+ * You can Write Private Messages using Brazencareerist system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class ning extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'signin_password',
+				'login_post'=>'xn_signout',
+				'get_friends'=>'tb',
+				'send_message'=>'200 '
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='ning';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+	
+		if (!$this->init()) return false;
+
+		$res=$this->get("http://www.ning.com/main/signin",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.brazencareerist.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.brazencareerist.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="https://www.ning.com/main/signin?area=System_SignIn";
+		$post_elements=array('target'=>'http://www.ning.com/',
+							'emailAddress'=>$user,
+							'password'=>$pass,
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_friends='http://www.ning.com/'.$this->getElementString($res,'id="xn_username">','<')."/friends";
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//div[@class='tb']";$data=$xpath->query($query);
+		foreach($data as $node)
+			{
+			$name=$node->childNodes->item(1)->nodeValue;
+			if (!empty($name)) $contacts[$name]=$name;
+			} 
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$res=$this->get("http://www.ning.com");
+		$form_action="http://www.ning.com/main/ajax?area=Status";
+		$post_elements=array("status"=>$message['body'],'xp_token'=>$this->getElementString($res,'"xp_token" value="','"'));
+		$res=$this->post($form_action,$post_elements,true);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.ning.com/main/signout");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/nz11.plg.php b/plugins/contact_importer/OpenInviter/plugins/nz11.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..6079e63b02cb884dee7731b8f238123350d47e77
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/nz11.plg.php
@@ -0,0 +1,150 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Nz11',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a Nz11 account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://nz11.com/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Netadress Plugin
+ * 
+ * Imports user's contacts from Netaddress's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class nz11 extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array('initial_get'=>'loginName',
+							  'post_login'=>'oi_sda_firstname',
+							  'contacts_page'=>'entriesPerPage2',
+							  'all_contacts'=>'entriesPerPage2',
+							 );
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user, $pass)
+	{
+		$this->resetDebugger();
+		$this->service='nz11';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://nz11.mail.everyone.net/email/scripts/loginuser.pl");
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"http://nz11.mail.everyone.net/email/scripts/loginuser.pl",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('initial_get',"http://nz11.mail.everyone.net/email/scripts/loginuser.pl",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		$form_action='http://nz11.mail.everyone.net/email/scripts/loginuser.pl?'.$this->getElementString($res,' name="myForm" method="post" action="loginuser.pl?','"');
+		$post_elements=array('loginName'=>$user,'user_pwd'=>$pass,'login'=>'Login');
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse('post_login',$res))
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',true,$post_elements);
+		else 
+			{
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		$this->login_ok='http://nz11.mail.everyone.net/email/scripts/contacts.pl';	
+		return true;
+	}
+	
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse('contacts_page',$res))
+			$this->updateDebugBuffer('contacts_page',$url,'GET');
+		else 
+			{
+			$this->updateDebugBuffer('contacts_page',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		$form_action='http://nz11.mail.everyone.net/email/scripts/contacts.pl';
+		$post_elements=$this->getHiddenElements($res);$post_elements['entriesPerPage2']='All';
+		$res=$this->post($form_action,$post_elements);
+		if ($this->checkResponse('all_contacts',$res))
+			$this->updateDebugBuffer('all_contacts',"{$form_action}",'POST',true,$post_elements);
+		else 
+			{
+			$this->updateDebugBuffer('all_contacts',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		
+		$contacts=array();$contacts_bulk="";		
+		$contacts_array=$this->getElementDOM($res,"//a",'href');
+		foreach ($contacts_array as $contacts_string)
+			if (strpos($contacts_string,'javascript:composeMe')!==false)
+				{ 
+				$contacts_bulk=$this->getElementString($contacts_string,"'",'>');
+				$contacts_bulk=str_replace('"','',$contacts_bulk);
+				$contacts_explode=explode('<',$contacts_bulk);
+				if (isset($contacts_explode[1]))
+					$contacts[$contacts_explode[1]]=array('first_name'=>(isset($contacts_explode[0])?$contacts_explode[0]:false),'email_1'=>$contacts_explode[1]);
+				}		
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get('http://nz11.mail.everyone.net/email/scripts/logout.pl');
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();	
+		}
+}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/o2.plg.php b/plugins/contact_importer/OpenInviter/plugins/o2.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..c913848023ae6058e3815f060a967b4afcfcbcbf
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/o2.plg.php
@@ -0,0 +1,174 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'O2',
+	'version'=>'1.0.1',
+	'description'=>"Get the contacts from a O2 account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://poczta.o2.pl/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * O2 Plugin
+ * 
+ * Imports user's contacts from O2's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class o2 extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'login',
+				'post_login'=>'ssid',
+				'url_webinterface'=>'kbshortcut',
+				'url_get_webinterface'=>'kbshortcut',
+				'contacts_page'=>'MSignal_UA-Download*',
+				'contacts_file'=>'Title',
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='o2';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://poczta.o2.pl/");
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"http://www.fastmail.fm/",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.fastmail.fm/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		
+		$form_action="https://poczta.o2.pl/login.html";
+		$post_elements=array('username'=>$user,'password'=>$pass,'ssl'=>'login','x'=>rand(1,100),'y'=>rand(1,100));
+		$res=$this->post($form_action,$post_elements,false,true,false,array(),false,false);
+		if ($this->checkResponse('post_login',$res))
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',true,$post_elements);
+		else 
+			{
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		$sesid=$this->getElementString($res,'ssid=',";");
+		$url_export="http://poczta.o2.pl/a?cmd=export_addressbook&requestid=2&xsfr-cookie={$sesid}&fmt=xml&upid=&";		
+		$this->login_ok=$url_export;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->post($url,array('outputformat'=>'outlook'));
+		$temp=$this->parseCSV($res);
+		$contacts=array();
+		foreach ($temp as $values)
+			{
+			if (!empty($values[11]))
+				$descriptionArray[$values[11]]=array('first_name'=>(!empty($values[0])?$values[0]:false),
+												'middle_name'=>(!empty($values[1])?$values[1]:false),
+												'last_name'=>(!empty($values[3])?$values[3]:false),
+												'nickname'=>(!empty($values[6])?$values[6]:false),
+												'email_1'=>(!empty($values[11])?$values[11]:false),
+												'email_2'=>(!empty($values[4])?$values[4]:false),
+												'email_3'=>false,
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[6])?$values[6]:false),
+												'phone_home'=>(!empty($values[8])?$values[8]:false),			
+												'pager'=>(!empty($values[12])?$values[12]:false),
+												'address_home'=>false,
+												'address_city'=>false,
+												'address_state'=>false,
+												'address_country'=>false,
+												'postcode_home'=>false,
+												'company_work'=>false,
+												'address_work'=>false,
+												'address_work_city'=>false,
+												'address_work_country'=>false,
+												'address_work_state'=>false,
+												'address_work_postcode'=>false,
+												'fax_work'=>false,
+												'phone_work'=>(!empty($values[13])?$values[13]:false),
+												'website'=>(!empty($values[9])?$values[9]:false),
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );
+			}		
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+	
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		if (file_exists($this->getLogoutPath()))
+			{
+			$url=file_get_contents($this->getLogoutPath());
+			//go to url adress book  url in order to make the logout
+			$res=$this->get($url,true);
+			$form_action=$this->getElementString($res,'action="','"');
+			$post_elements=$this->getHiddenElements($res);
+			$post_elements['MSignal_AD-LGO*C-1.N-1']='Logout';
+			
+			//get the post elements and make de logout
+			$res=$this->post($form_action,$post_elements,true);
+			}
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+	
+	}	
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/operamail.plg.php b/plugins/contact_importer/OpenInviter/plugins/operamail.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..dedd74d09386279af35270b4782cc0616056fa69
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/operamail.plg.php
@@ -0,0 +1,180 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'OperaMail',
+	'version'=>'1.0.6',
+	'description'=>"Get the contacts from an OperaMail account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.operamail.com',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(operamail.com)/i'),
+	);
+/**
+ * OperaMail Plugin
+ * 
+ * Import user's contacts from OperaMail
+ * 
+ * @author OpenInviter
+ * @version 1.0.4
+ */
+class operamail extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $requirement='email';
+	public $internalError=false;
+	protected $timeout=30;
+	public $allowed_domains=array('operamail');
+	
+	public $debug_array=array(
+				'initial_get'=>'login',
+				'login_post'=>'main?.ob',
+				'file_contacts'=>'"'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='operamail';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://www.operamail.com/scripts/common/index.main?signin=1&lang=us",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.operamail.com/scripts/common/index.main?signin=1&lang=us",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.operamail.com/scripts/common/index.main?signin=1&lang=us",'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$form_action="http://www.operamail.com/scripts/common/proxy.main";
+		$post_elements=$this->getHiddenElements($res);$post_elements['login']=$user;$post_elements['password']=$pass; 
+		$res=$this->post($form_action,$post_elements,true);		
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$url_file_contacts="http://mymail.operamail.com/scripts/addr/external.cgi?.ob=&gab=1";
+		$this->login_ok=$url_file_contacts;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		
+		$form_action=$url;
+		$post_elements=array('showexport'=>'showexport',
+							 'action'=>'export',
+							 'login'=>$this->service_user,
+							 'format'=>'csv'
+							 );
+		$res=$this->post($form_action,$post_elements);
+		
+		if ($this->checkResponse("file_contacts",$res))
+			$this->updateDebugBuffer('file_contacts',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('file_contacts',$form_action,'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$temp=$this->parseCSV($res);	
+		$contacts=array();
+		foreach ($temp as $values)
+			{
+			if (!empty($values[4]))
+				$contacts[$values[4]]=array('first_name'=>(!empty($values[0])?$values[0]:false),
+												'middle_name'=>(!empty($values[1])?$values[1]:false),
+												'last_name'=>(!empty($values[2])?$values[1]:false),
+												'nickname'=>(!empty($values[3])?$values[3]:false),
+												'email_1'=>(!empty($values[4])?$values[4]:false),
+												'email_2'=>(!empty($values[12])?$values[12]:false),
+												'email_3'=>(!empty($values[13])?$values[13]:false),
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[10])?$values[10]:false),
+												'phone_home'=>(!empty($values[6])?$values[6]:false),			
+												'pager'=>(!empty($values[8])?$values[8]:false),
+												'address_home'=>false,
+												'address_city'=>(!empty($values[28])?$values[28]:false),
+												'address_state'=>(!empty($values[29])?$values[29]:false),
+												'address_country'=>(!empty($values[31])?$values[31]:false),
+												'postcode_home'=>(!empty($values[30])?$values[30]:false),
+												'company_work'=>(!empty($values[17])?$values[17]:false),
+												'address_work'=>false,
+												'address_work_city'=>(!empty($values[21])?$values[21]:false),
+												'address_work_country'=>(!empty($values[24])?$values[24]:false),
+												'address_work_state'=>(!empty($values[22])?$values[22]:false),
+												'address_work_postcode'=>(!empty($values[23])?$values[23]:false),
+												'fax_work'=>false,
+												'phone_work'=>(!empty($values[7])?$values[7]:false),
+												'website'=>false,
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );
+			}		
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);				
+		return $this->returnContacts($contacts);
+		}
+		
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$url_logout="http://mymail.operamail.com/scripts/mail/Outblaze.mail?logout=1&.noframe=1&a=1&";
+		$res=$this->get($url_logout,true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+	
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/orkut.plg.php b/plugins/contact_importer/OpenInviter/plugins/orkut.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..694e7ceba4c3bdfae3460d682c9600ee686c1d5d
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/orkut.plg.php
@@ -0,0 +1,205 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Orkut',
+	'version'=>'1.1.6',
+	'description'=>"Get the contacts from an Orkut account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.orkut.com/',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	); 
+class orkut extends openinviter_base
+{
+	private $login_ok=false;
+	public $showContacts=true;	
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'secondary_get'=>'Email:',
+				'login_post'=>'url=&#39;',
+				'url_redirect'=>'mblock',
+				'url_friends'=>'mblock',
+				'url_send_message'=>'scrapText',
+				);
+				
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='orkut';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		$res=$this->get("http://m.orkut.com/",true);
+		if ($this->checkResponse('secondary_get',$res))
+			$this->updateDebugBuffer('secondary_get',"http://www.orkut.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('secondary_get',"http://www.orkut.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$postAction = "https://www.google.com/accounts/ServiceLoginAuth?service=orkut";
+		$postElem = $this->getHiddenElements($res);
+		$postElem["Email"] = $user;
+		$postElem["Passwd"]= $pass;
+		$res=$this->post($postAction,$postElem,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',$postAction,'POST',true,$postElem);		
+		else
+			{
+			$this->updateDebugBuffer('login_post',$postAction,'POST',false,$postElem);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+			
+		$url_redirect=html_entity_decode($this->getElementString($res,'url=&#39;','&#39;')); 
+		$res=$this->get($url_redirect,true);
+		
+		if (strpos($res,'url=&#39;')!==false)
+			{
+			$url_redirect=html_entity_decode($this->getElementString($res,'url=&#39;','&#39;'));
+			$res=$this->get($url_redirect,true);
+			}	
+		if ($this->checkResponse('url_redirect',$res))
+			$this->updateDebugBuffer('url_redirect',"http://www.orkut.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_redirect',"http://www.orkut.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$this->login_ok = "http://m.orkut.com/Friends";
+		return true;
+		}		
+		
+	public function getMyContacts()
+		{
+			if (!$this->login_ok)
+			{
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+			}
+			else $url = $this->login_ok;
+			$originalLink = array(
+			"a"=>"http://m.orkut.com/ShowFriends?small=a&caps=A&pgsize=10000",			
+			"b"=>"http://m.orkut.com/ShowFriends?small=b&caps=B&pgsize=10000",
+			"c"=>"http://m.orkut.com/ShowFriends?small=c&caps=C&pgsize=10000",
+			"d"=>"http://m.orkut.com/ShowFriends?small=d&caps=D&pgsize=10000",
+			"e"=>"http://m.orkut.com/ShowFriends?small=e&caps=E&pgsize=10000",
+			"f"=>"http://m.orkut.com/ShowFriends?small=f&caps=F&pgsize=10000",
+			"g"=>"http://m.orkut.com/ShowFriends?small=g&caps=G&pgsize=10000",
+			"h"=>"http://m.orkut.com/ShowFriends?small=h&caps=H&pgsize=10000",
+			"i"=>"http://m.orkut.com/ShowFriends?small=i&caps=I&pgsize=10000",
+			"j"=>"http://m.orkut.com/ShowFriends?small=j&caps=J&pgsize=10000",
+			"k"=>"http://m.orkut.com/ShowFriends?small=k&caps=K&pgsize=10000",
+			"l"=>"http://m.orkut.com/ShowFriends?small=l&caps=L&pgsize=10000",
+			"m"=>"http://m.orkut.com/ShowFriends?small=m&caps=M&pgsize=10000",
+			"n"=>"http://m.orkut.com/ShowFriends?small=n&caps=N&pgsize=10000",
+			"o"=>"http://m.orkut.com/ShowFriends?small=o&caps=O&pgsize=10000",
+			"p"=>"http://m.orkut.com/ShowFriends?small=p&caps=P&pgsize=10000",
+			"q"=>"http://m.orkut.com/ShowFriends?small=q&caps=Q&pgsize=10000",
+			"r"=>"http://m.orkut.com/ShowFriends?small=r&caps=R&pgsize=10000",
+			"s"=>"http://m.orkut.com/ShowFriends?small=s&caps=S&pgsize=10000",
+			"t"=>"http://m.orkut.com/ShowFriends?small=t&caps=T&pgsize=10000",
+			"u"=>"http://m.orkut.com/ShowFriends?small=u&caps=U&pgsize=10000",
+			"v"=>"http://m.orkut.com/ShowFriends?small=v&caps=V&pgsize=10000",
+			"w"=>"http://m.orkut.com/ShowFriends?small=w&caps=W&pgsize=10000",
+			"x"=>"http://m.orkut.com/ShowFriends?small=x&caps=X&pgsize=10000",
+			"y"=>"http://m.orkut.com/ShowFriends?small=y&caps=Y&pgsize=10000",
+			"z"=>"http://m.orkut.com/ShowFriends?small=z&caps=Z&pgsize=10000",
+			"*"=>"http://m.orkut.com/ShowFriends?small=*&caps=*&pgsize=10000"
+			); 
+				
+			$contacts=array();			
+			foreach($originalLink as $link)
+				{
+				$res=$this->get($link,true);
+				if ($this->checkResponse('url_friends',$res))
+					$this->updateDebugBuffer('url_friends',$link,'GET');
+				else
+					{
+					$this->updateDebugBuffer('url_friends',$link,'GET',false);
+					$this->debugRequest();
+					$this->stopPlugin();
+					return false;
+					}	
+				$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+				$xpath=new DOMXPath($doc);$query="//div[@class='mblock']";$data=$xpath->query($query);
+				foreach ($data as $node)
+					{
+					$firstChild=$node->childNodes->item(1);
+					if (isset($firstChild)) if ($firstChild->nodeName=='a') if (strpos((string)$firstChild->getAttribute('href'),'/FullProfile?uid=')!==false)
+						{
+						$id=str_replace('/FullProfile?uid=','',(string)$firstChild->getAttribute('href'));$name=trim(preg_replace('/[^(\x20-\x7F)]*/','',(string)$firstChild->nodeValue));
+						if (!empty($id)) $contacts[$id]=$name;
+						}
+					}
+				}
+		return $contacts;
+		}
+	
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */	
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $id=>$name)
+			{	
+			$countMessages++;
+			$url_scrap="http://m.orkut.com/Scrapbook?uid={$id}";
+			$res=$this->get($url_scrap);
+			if ($this->checkResponse("url_send_message",$res))
+				$this->updateDebugBuffer('url_send_message',$url_scrap,'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_send_message',$url_scrap,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			
+			$form_action="http://m.orkut.com/Scrapbook";
+			$post_elements=$this->getHiddenElements($res);$post_elements['scrapText']=str_replace(array('.','&'),'~',$message['body']);
+			$res=$this->post($form_action,$post_elements,true);
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */			
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$logout_url = "http://www.orkut.com/GLogin.aspx?cmd=logout";
+		$res = $this->get($logout_url);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/perfspot.plg.php b/plugins/contact_importer/OpenInviter/plugins/perfspot.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..fde5dc93235af262bc7f298a9d205b30bfdc160a
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/perfspot.plg.php
@@ -0,0 +1,209 @@
+<?php
+/*Import Friends from Perfspot
+ * You can send private message using Perfspot system to your Friends
+ */
+$_pluginInfo=array(
+	'name'=>'Perfspot',
+	'version'=>'1.0.7',
+	'description'=>"Get the contacts from a Perfspot account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://m.perfspot.com/index.asp',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Perfspot Plugin
+ * 
+ * Imports user's contacts from Perfspot and send messages
+ * using Perfspot's internal system
+ * 
+ * @author OpenInviter
+ * @version 1.0.6
+ */
+class perfspot extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'txtEmail',
+				'post_login'=>'accesskey="7"',
+				'url_menu'=>'class="name"',
+				'url_friend'=>'accesskey="4"',
+				'url_send_message'=>'Title',
+				'send_message'=>'color: Red;'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='perfspot';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+	
+		$res=$this->get("http://m.perfspot.com/index.asp");
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"http://m.perfspot.com/index.asp",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('initial_get',"http://m.perfspot.com/index.asp",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		$form_action="http://m.perfspot.com/index.asp";
+		$post_elements=array('txtEmail'=>$user,
+							 'txtPassword'=>$pass,
+							 'LoginButton'=>'Login'
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse('post_login',$res))
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',true,$post_elements);
+		else 
+			{
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		
+		$url_menu_array=$this->getElementDOM($res,"//a[@accesskey='7']",'href');
+		$url_menu="http://m.perfspot.com/".$url_menu_array[0];
+		$this->login_ok=$url_menu; 
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false; 
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		
+		$url_contacts_array=$this->getElementDOM($res,"//a[@accesskey='3']",'href');
+		$url_contacts="http://m.perfspot.com/".$url_contacts_array[0];
+		$res=$this->get($url_contacts);
+		if ($this->checkResponse('url_menu',$res))
+			$this->updateDebugBuffer('url_menu',$url,'GET');
+		else 
+			{
+			$this->updateDebugBuffer('url_menu',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+				
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//a[@class='name']";$data=$xpath->query($query);
+		foreach($data as $node)
+			$contacts[$node->getAttribute('href')]=$node->nodeValue; 
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $session_id The OpenInviter user's session ID
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $href=>$name)
+			{
+			$countMessages++;
+			$url_friend=html_entity_decode("http://m.perfspot.com/{$href}");
+			$res=$this->get($url_friend);
+			if ($this->checkResponse('url_friend',$res))
+				$this->updateDebugBuffer('url_friend',$url_friend,'GET');
+			else 
+				{
+				$this->updateDebugBuffer('url_friend',$url_friend,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;	
+				}
+			
+			$url_message_array=$this->getElementDOM($res,"//a[@accesskey='4']",'href');
+			$url_message="http://m.perfspot.com/".$url_message_array[0];
+			$res=$this->get($url_message);
+			if ($this->checkResponse('url_send_message',$res))
+				$this->updateDebugBuffer('url_send_message',$url_message,'GET');
+			else 
+				{
+				$this->updateDebugBuffer('url_send_message',$url_message,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;	
+				}
+			$form_action="http://m.perfspot.com/".$this->getElementString($res,'action="','"');
+			$post_elements=array('Title'=>$message['subject'],'txtMessage'=>$message['body'],'btnSend'=>'Send');
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse('send_message',$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else 
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;	
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{		
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://m.perfspot.com/index.asp?mode=logout");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+			
+		}
+	}
+
+?>
diff --git a/plugins/contact_importer/OpenInviter/plugins/plaxo.plg.php b/plugins/contact_importer/OpenInviter/plugins/plaxo.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..4eb891ffa6147cab9e195537cb1bab37cc824bcf
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/plaxo.plg.php
@@ -0,0 +1,136 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Plaxo',
+	'version'=>'1.0.6',
+	'description'=>"Get the contacts from a plaxo account",
+	'base_version'=>'1.6.3',
+	'type'=>'social',
+	'check_url'=>'http://m.plaxo.com',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * plaxo.com Plugin
+ * 
+ * Imports user's contacts from plaxo.com's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.4.7
+ */
+class plaxo extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $debug_array=array(
+			 'initial_check'=>'Welcome',
+	    	);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.c
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='plaxo';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		$postAction = "http://m.plaxo.com/index.php?page=login";
+		$postElem['email']=$user;
+		$postElem['password']=$pass;
+		$res = $this->post($postAction, $postElem, true);
+		if ($this->checkResponse("initial_check",$res))
+			$this->updateDebugBuffer('initial_check',$postAction,'POST');		
+		else
+			{
+			$this->updateDebugBuffer('initial_check',$postAction,'POST',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$this->login_ok = "http://m.plaxo.com/?page=contacts";
+		return true;
+		}
+	
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else
+		$url=$this->login_ok;
+		$contacts = array();
+//Thanks to ROBOV99 for the pagination code
+        $boolContinue = true; 
+        $inti =1;
+        while($boolContinue)
+        {
+		    $res=$this->get($url,true);
+		    $res = $this->getElementString($res, "</p>", "</div>");
+		    $res.="//exit//";
+            $iCntThisPage =0;
+		    while(stripos($res,'<a href="') !== false)
+			    {
+			    $res = $this->getElementString($res, '<a href="','//exit//');
+			    $mail = $this->getElementString($res, '&amp;id=','">');
+			    $contactstemp[$mail] = $this->getElementString($res,'">','</a>');
+                if (strlen($mail) >2) $iCntThisPage++;
+			    $res.="//exit//";
+			    }
+        if (0== $iCntThisPage) break;
+        $strBegin = "http://m.plaxo.com/?page=contacts&pageNum=";
+        $inti = $inti + 1;
+        $url = $strBegin.$inti;
+    }
+    if (!empty($contactstemp))
+	    foreach ($contactstemp as $id=>$name)
+	    {
+	        $res = $this->get("http://m.plaxo.com/?page=contact&id=".$id,true);
+	        $mail = $this->getElementString($res,'mailto:','"');
+	        unset($contacts[$id]);
+	        $contacts[$mail]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$mail);
+	    }
+    foreach ($contacts as $email=>$name) 
+    { if (!$this->isEmail($email)) unset($contacts[$email]); }
+	return $this->returnContacts($contacts);
+}
+	
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debugger.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res = $this->get('http://m.plaxo.com/index.php?page=logout', true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+				
+	}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/plazes.plg.php b/plugins/contact_importer/OpenInviter/plugins/plazes.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..4e61d495344f4a04bf96ad2e780bd552db179f1f
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/plazes.plg.php
@@ -0,0 +1,186 @@
+<?php
+/*Import Friends from Plazes
+ * You can Write Private Messages using Plazes system
+ */
+$_pluginInfo=array(
+	'name'=>'Plazes',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a Plazes account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.plazes.com/',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Plazes Plugin
+ * 
+ * Import Friends from Plazes
+ * You can Write Private Messages using Plazes system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class plazes extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'login',
+				'login_post'=>'sign_out',
+				'get_friends'=>'vcard',
+				'send_message'=>'sent'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='plazes';
+		$this->service_user=$user;
+		$this->service_password=$pass;	
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://plazes.com/",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.plazes.com/en/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.plazes.com/en/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://plazes.com/sessions";
+		$post_elements=array('return_to'=>'/',
+							'login'=>$user,
+							'password'=>$pass,
+							'remember_me'=>1,
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_friends='http://plazes.com/manage/contacts';
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		$names_array=$this->getElementDOM($res,"//a[@rel='vcard']");
+		$hrefs_array=$this->getElementDOM($res,"//a[@rel='vcard']",'href');
+		if (!empty($hrefs_array))
+			foreach($hrefs_array as $key=>$value)
+				{
+				$id=str_replace('/users/','',$value);
+				$contacts[$id]=(!empty($names_array[$key])?$names_array[$key]:false);
+				}
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $id=>$name)
+			{
+			$countMessages++;		
+			$form_action="http://plazes.com/messages";
+			$post_elements=array('message[recipient_id]'=>$id,
+								'message[body]'=>$message['body'],
+								'return_to'=>"/users/{$id}"
+								);
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.plazes.com/en/logout/");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/plurk.plg.php b/plugins/contact_importer/OpenInviter/plugins/plurk.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..b0854c3337af56563bf78c4b80617a36989ba04f
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/plurk.plg.php
@@ -0,0 +1,181 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Plurk',
+	'version'=>'1.0.7',
+	'description'=>"Get the contacts from a Plurk account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.plurk.com/',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Plurk Plugin
+ * 
+ * Imports user's contacts from Plurk and
+ * .
+ * 
+ * @author OpenInviter
+ * @version 1.0.3
+ */
+class plurk extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=false;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'nick_name',
+				'login'=>'user_id',
+				'get_contacts'=>'nick_name',
+				'send_message'=>'"error": null'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='plurk';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+			
+		$res=$this->get("http://www.plurk.com/");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.plurk.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.plurk.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+
+		$form_action='http://www.plurk.com/Users/login';
+		$post_elements=array('nick_name'=>$user,'password'=>$pass);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login",$res))
+			$this->updateDebugBuffer('login',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login',$form_action,'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+
+		$user_id=$this->getElementString($res,'"user_id": ',',');		
+		$this->login_ok=$is->login_ok=$user_id;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $user_id=$this->login_ok;
+		$url_request_friends="http://www.plurk.com/Friends/getFriendsByOffset";
+		$post_elements=array('offset'=>0,'user_id'=>$user_id);
+		$res=$this->post($url_request_friends,$post_elements,true);
+		if ($this->checkResponse("get_contacts",$res))
+			$this->updateDebugBuffer('get_contacts',$url_request_friends,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('get_contacts',$url_request_friends,'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		while(strpos($res,'"nick_name": "')!==false)
+			{
+			$name=$this->getElementString($res,'"nick_name": "','"');
+			$name_delete='"nick_name": "'.$name;
+			$uid=$this->getElementString($res,'"uid": ',',');
+			$uid_delete='"uid": '.$uid;
+			$res=str_replace($name_delete,'',str_replace($uid_delete,'',$res));
+			if(isset($uid)) $contacts[$uid]=(isset($name)?$name:false);
+			}
+		return $contacts;	
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$res=$this->get('http://www.plurk.com',true);
+		$user_id=$this->getElementString($res,'"user_id": ',',');
+		$form_action="http://www.plurk.com/TimeLine/addPlurk";
+		$post_elements=array('posted'=>'%222009-1-12T14%3A18%3A30%22',
+							'qualifier'=>'is',
+							'content'=>$message['body'],
+							'lang'=>'en',
+							'no_comments'=>0,
+							'uid'=>$user_id
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("send_message",$res))
+			$this->updateDebugBuffer('send_message',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('send_message',$form_action,'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.plurk.com/Users/logout",true); 
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/pochta.plg.php b/plugins/contact_importer/OpenInviter/plugins/pochta.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..cd3d2b7ee438e967caadbed78102bdb976ae9f6f
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/pochta.plg.php
@@ -0,0 +1,170 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Pochta',
+	'version'=>'1.0.2',
+	'description'=>"Get the contacts from a Pochta account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.pochta.ru/',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Pochta Plugin
+ * 
+ * Imports user's contacts from Pochta AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class pochta extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'user',
+				'login_post'=>'inbox',
+				'url_export'=>',"',
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='pochta';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+					
+		$res=$this->get("http://www.pochta.ru/");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.pochta.ru/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.pochta.ru/",'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+
+		$user_array=explode('@',$user);$username=$user_array[0];$domain=$user_array[1];	
+		$form_action="http://www.pochta.ru/auth/logon";
+		$post_elements=array('reason'=>'login','back'=>false,'lng'=>'ru','user'=>$username,'domain'=>$domain,'pass'=>$pass,'long_session'=>1);
+		$res=$this->post($form_action,$post_elements,true);	
+		if ($this->checkResponse('login_post',$res))
+			$this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$this->login_ok="http://www.pochta.ru/adb/export/?export_type=outlook&export_action=export";
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("url_export",$res))
+			$this->updateDebugBuffer('url_export',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_export',$url,'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$contacts=array();
+		$temp=$this->parseCSV($res);$teM=explode(PHP_EOL,$res);$arrayDescriptionFlag=explode(',',$teM[0]);print_R($arrayDescriptionFlag);
+		foreach ($temp as $values)
+			{
+			if (!empty($values[82]))
+				$contacts[$values[4]]=array('first_name'=>(!empty($values[1])?$values[1]:false),
+												'middle_name'=>(!empty($values[2])?$values[2]:false),
+												'last_name'=>false,
+												'nickname'=>false,
+												'email_1'=>(!empty($values[82])?$values[82]:false),
+												'email_2'=>false,
+												'email_3'=>false,
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[11])?$values[11]:false),
+												'phone_home'=>(!empty($values[9])?$values[9]:false),			
+												'pager'=>false,
+												'address_home'=>false,
+												'address_city'=>(!empty($values[5])?$values[5]:false),
+												'address_state'=>(!empty($values[7])?$values[7]:false),
+												'address_country'=>(!empty($values[8])?$values[8]:false),
+												'postcode_home'=>(!empty($values[6])?$values[6]:false),
+												'company_work'=>(!empty($values[14])?$values[14]:false),
+												'address_work'=>false,
+												'address_work_city'=>(!empty($values[16])?$values[16]:false),
+												'address_work_country'=>(!empty($values[19])?$values[19]:false),
+												'address_work_state'=>(!empty($values[17])?$values[17]:false),
+												'address_work_postcode'=>(!empty($values[18])?$values[18]:false),
+												'fax_work'=>(!empty($values[21])?$values[21]:false),
+												'phone_work'=>(!empty($values[20])?$values[20]:false),
+												'website'=>(!empty($values[12])?$values[12]:false),
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get('http://www.pochta.ru/auth/logout/',true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/popstarmail.plg.php b/plugins/contact_importer/OpenInviter/plugins/popstarmail.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..10ae8891bf5f4c1b8a5813718bd4c1d7128e3c4d
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/popstarmail.plg.php
@@ -0,0 +1,182 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Popstarmail',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from an Popstarmail account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://super.popstarmail.org/',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	); 
+/**
+ * popstarmail Plugin
+ * 
+ * Imports user's contacts from popstarmail's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */	
+class popstarmail extends openinviter_base
+{
+	private $login_ok=false;
+	protected $timeout=30;
+	public $showContacts=true;
+	public $debug_array=array(
+				'initial_get'=>'show_frame',
+				'login_post'=>'ob',
+				'get_contacts'=>'showexport',
+				'contacts_file'=>'Name'
+				);
+
+/**
+ * Login function
+ * 
+ * Makes all the necessary requests to authenticate
+ * the current user to the server.
+ * 
+ * @param string $user The current user.
+ * @param string $pass The password for the current user.
+ * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+ */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='popstarmail';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		$res=$this->get("http://super.popstarmail.org/",true);
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"http://super.popstarmail.org/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://super.popstarmail.org/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$form_action="http://super.popstarmail.org/scripts/common/ss_main.cgi";
+		$post_elements=array('show_frame'=>'Enter','action'=>'login','login'=>$user,'password'=>$pass,'x'=>rand(5,15),'y'=>rand(5,15));
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+
+		$sid=$this->getElementString($res,'ob=','"');
+		$url_export="http://mymail.hk.popstarmail.org/scripts/addr/external.cgi?.ob={$sid}&gab=1";
+		$this->login_ok=$url_export;
+		return true;
+		}
+	
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */			
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url = $this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse('get_contacts',$res))
+			$this->updateDebugBuffer('get_contacts',"http://www.evite.com/loginRegForm?redirect=/pages/addrbook/contactList.jsp",'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_contacts',"http://www.evite.com/loginRegForm?redirect=/pages/addrbook/contactList.jsp",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action=$url;
+		$post_elements=array('showexport'=>'showexport','action'=>'export','login'=>$this->service_user,'format'=>'csv');
+		$res=$this->post($form_action,$post_elements);
+		if ($this->checkResponse("contacts_file",$res))
+			$this->updateDebugBuffer('contacts_file',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('contacts_file',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$temp=$this->parseCSV($res);	
+		$contacts=array();
+		foreach ($temp as $values)
+			{
+			if (!empty($values[4]))
+				$contacts[$values[4]]=array('first_name'=>(!empty($values[0])?$values[0]:false),
+												'middle_name'=>(!empty($values[2])?$values[2]:false),
+												'last_name'=>(!empty($values[1])?$values[1]:false),
+												'nickname'=>false,
+												'email_1'=>(!empty($values[4])?$values[4]:false),
+												'email_2'=>false,
+												'email_3'=>false,
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[11])?$values[11]:false),
+												'phone_home'=>(!empty($values[9])?$values[9]:false),			
+												'pager'=>false,
+												'address_home'=>false,
+												'address_city'=>(!empty($values[5])?$values[5]:false),
+												'address_state'=>(!empty($values[7])?$values[7]:false),
+												'address_country'=>(!empty($values[8])?$values[8]:false),
+												'postcode_home'=>(!empty($values[6])?$values[6]:false),
+												'company_work'=>(!empty($values[14])?$values[14]:false),
+												'address_work'=>false,
+												'address_work_city'=>(!empty($values[16])?$values[16]:false),
+												'address_work_country'=>(!empty($values[19])?$values[19]:false),
+												'address_work_state'=>(!empty($values[17])?$values[17]:false),
+												'address_work_postcode'=>(!empty($values[18])?$values[18]:false),
+												'fax_work'=>(!empty($values[21])?$values[21]:false),
+												'phone_work'=>(!empty($values[20])?$values[20]:false),
+												'website'=>(!empty($values[12])?$values[12]:false),
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+		
+		
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */		
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$logout_url="http://mymail.hk.popstarmail.org/scripts/mail/Outblaze.mail?logout=1&.noframe=1&a=1&";
+		$res = $this->get($logout_url,true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/rambler.plg.php b/plugins/contact_importer/OpenInviter/plugins/rambler.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..e87c2e0381b9123de29e9ecaaca45c32cf7bbc17
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/rambler.plg.php
@@ -0,0 +1,142 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Rambler',
+	'version'=>'1.1.4',
+	'description'=>"Get the contacts from a Rambler account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.rambler.ru',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(rambler.ru)/i'),
+	);
+/**
+ * Rambler Plugin
+ * 
+ * Import user's contacts from Rambler AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.9
+ */
+class rambler extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'login',
+				'login_post'=>'ramac_add_handler',
+				'url_contacts'=>'mode=compose'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='rambler';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+				
+		$res=$this->get("http://www.rambler.ru/",true);
+		
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.rambler.ru/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.rambler.ru/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$post_elements=$this->getHiddenElements($res);$post_elements['login']=$user;$post_elements['passw']=$pass; 
+		unset($post_elements[0]); 
+		$res=$this->post("http://id.rambler.ru/script/auth.cgi",$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"http://id.rambler.ru/script/auth.cgi",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"http://id.rambler.ru/script/auth.cgi",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_contact_array=$this->getElementDOM($res,"//a[@id='addressbook-link']",'href');
+		$value=substr($url_contact_array[0],strpos($url_contact_array[0],"r=")+2,strlen($url_contact_array[0])-strpos($url_contact_array[0],"r=")-2);
+		$url_contact="http://mail.rambler.ru/mail/contacts.cgi?r={$value}";
+		$this->login_ok=$url_contact;
+		file_put_contents($this->getLogoutPath(),$value);
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		if ($this->checkResponse("url_contacts",$res))
+			$this->updateDebugBuffer('url_contacts',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_contacts',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$contacts=array();
+		$emailsArray=$this->getElementDOM($res,"//a[@class='email']");
+		$namesArray=$this->getElementDOM($res,"//td[@class='org ']");
+		if (!empty($emailsArray))
+			foreach($emailsArray as $key=>$emailValue) $contacts[$emailValue]=array('first_name'=>(isset($namesArray[$key])?$namesArray[$key]:false),'email_1'=>$emailValue);			
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		if (file_exists($this->getLogoutPath()))
+			{
+			$url_logout="http://id.rambler.ru/script/auth.cgi?back=;mode=logout;r=".file_get_contents($this->getLogoutPath());
+			$res=$this->get($url_logout,true);
+			}
+		$this->debugRequest();			
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+	}	
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/rediff.plg.php b/plugins/contact_importer/OpenInviter/plugins/rediff.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..0c9ee42dca7f843893c7dfd57b4713f7810c41a0
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/rediff.plg.php
@@ -0,0 +1,161 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Rediff',
+	'version'=>'1.2.0',
+	'description'=>"Get the contacts from a Rediff account",
+	'base_version'=>'1.8.1',
+	'type'=>'email',
+	'check_url'=>'http://mail.rediff.com',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Rediff Plugin
+ * 
+ * Import user's contacts from Rediff's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.1.6
+ */
+class rediff extends openinviter_base
+{
+	private $login_ok=false;
+	public $showContacts=true;
+	private $sess_id, $username, $siteAddr;
+	public $debug_array=array(
+			  'login_post'=>'window.location.replace',
+			  'url_contacts'=>'var session_id',
+			  'url_contacts_form'=>'els',
+			  'file_contacts'=>'Name',
+	);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='rediff';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		$post_elements=array("login"=>"{$user}",
+							"passwd"=>"{$pass}",
+							"FormName"=>"existing");
+		$res=htmlentities($this->post("http://mail.rediff.com/cgi-bin/login.cgi",$post_elements,true));
+		if ($this->checkResponse("login_post",$res))
+			{
+				$this->updateDebugBuffer('login_post',"http://mail.rediff.com/cgi-bin/login.cgi",'POST',true,$post_elements);
+				$link_to_extract = $this->getElementString($res, 'window.location.replace(&quot;', '&quot;);');
+				$this->siteAddr = $this->getElementString($link_to_extract,'http://','/');
+				$this->username = $user;
+				$this->sess_id = $this->getElementString($link_to_extract,'&amp;session_id=','&amp;');					
+				$url_redirect = "http://{$this->siteAddr}/bn/toggle.cgi?flipval=1&login={$this->username}&session_id={$this->sess_id}&folder=Inbox&formname=sh_folder&user_size=1";
+			}
+		else
+		{
+			$this->updateDebugBuffer('login_post',"http://mail.rediff.com/cgi-bin/login.cgi",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+		}
+		$res = ($this->get($url_redirect, true));
+		if ($this->checkResponse("url_contacts",$res))
+			$this->updateDebugBuffer('url_contacts',"{$url_redirect}",'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_contacts',"{$url_redirect}",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_contact="http://{$this->siteAddr}/prism/exportaddrbook?output=web";
+		$this->login_ok = $url_contact;
+		$logout_url = "http://login.rediff.com/bn/logout.cgi?formname=general&login={$this->username}&session_id={$this->sess_id}&function_name=logout";
+		file_put_contents($this->getLogoutPath(),$logout_url);
+		return true;
+		}
+	
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("url_contacts_form",$res))
+			$this->updateDebugBuffer('url_contacts_form',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_contacts_form',$url,'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+
+		$post_elements=array('output'=>'web','els'=>$this->getElementString($res,'name="els" value="','"'),'exporttype'=>'outlook');		
+		$form_action="http://{$this->siteAddr}/prism/exportaddrbook?service=outlook";
+		$res=$this->post($form_action,$post_elements);
+		if ($this->checkResponse("file_contacts",$res))
+			$this->updateDebugBuffer('file_contacts',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('file_contacts',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$temp=$this->parseCSV($res);
+		$contacts=array();
+		foreach ($temp as $values)
+			{
+			$name=$values['0'].(empty($values['1'])?'':(empty($values['0'])?'':'-')."{$values['1']}").(empty($values['3'])?'':" \"{$values['3']}\"").(empty($values['2'])?'':' '.$values['2']);
+			if (!empty($values['5']))
+				$contacts[$values['5']]=array('first_name'=>$name,'email_1'=>$values['5']);			
+			}
+			
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		if (file_exists($this->getLogoutPath()))
+			{
+			 $url_logout=file_get_contents($this->getLogoutPath());		
+			if (!empty($url_logout)) $res=$this->get($url_logout);
+			}
+			$this->debugRequest();
+			$this->resetDebugger();
+			$this->stopPlugin();	
+		}
+}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/sapo.plg.php b/plugins/contact_importer/OpenInviter/plugins/sapo.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..a7bce3def0f121f9e4f0228f8e4017095a18d1d9
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/sapo.plg.php
@@ -0,0 +1,129 @@
+<?php
+/*This plugin import Sapo contacts
+ *You can send normal email   
+ */
+$_pluginInfo=array(
+	'name'=>'Sapo.pt',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a Sapo.pt account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://services.mail.sapo.pt/codebits/',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(sapo.pt)/i'),
+	);
+/**
+ * Sapo Plugin
+ * 
+ * Imports user's contacts from Sapo.pt's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class sapo extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'username',
+				'get_contacts'=>'email',
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='sapo';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+			
+		$res=$this->get("http://services.mail.sapo.pt/codebits/");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://services.mail.sapo.pt/codebits/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://services.mail.sapo.pt/codebits/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}			
+
+		$this->login_ok=array('user'=>$user,'pass'=>$pass);
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $data=$this->login_ok;
+		
+		$form_action="http://services.mail.sapo.pt/codebits/index.php";
+		$post_elements=array('username'=>$data['user'],'password'=>$data['pass'],'what'=>'contactos');
+		
+		$res=$this->post($form_action,$post_elements);
+		if ($this->checkResponse("get_contacts",$res))
+			$this->updateDebugBuffer('get_contacts',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('get_contacts',$form_action,'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$name_array=$this->getElementDOM($res,"//span[@class='n fn']");
+		$niks_array=$this->getElementDOM($res,"//span[@class='nickname']");
+		$email_array=$this->getElementDOM($res,"//span[@class='email']");
+		foreach($name_array as $key=>$value)
+			$contacts[$email_array[$key]]=array('first_name'=>$value,'nickname'=>(isset($niks_array[$key])?$niks_array[$key]:false),'email_1'=>$email_array[$key]);
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/skyrock.plg.php b/plugins/contact_importer/OpenInviter/plugins/skyrock.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..93c19318a2222fe8a232d95ee352ff86b1ce1afa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/skyrock.plg.php
@@ -0,0 +1,206 @@
+<?php
+/*Import Friends from Skyrock
+ * You can send private message using Skyrock system to your Friends
+ */
+$_pluginInfo=array(
+	'name'=>'Skyrock',
+	'version'=>'1.0.7',
+	'description'=>"Get the contacts from a Skyrock account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.skyrock.com/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Skyrock Plugin
+ * 
+ * Imports user's contacts from Skyrock and send messages
+ * using Skyrock's internal system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class skyrock extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;	
+	public $internalError=false;
+	protected $timeout=30;
+		
+	public $debug_array=array(
+				'initial_get'=>'need_login_form_login',
+				'login_post'=>'logout',
+				'url_friends'=>'class="ecrire"',
+				'url_send_message'=>'id_dest',
+				'send_message'=>'confirmation'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='skyrock';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://www.skyrock.com");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.skyrock.com",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.skyrock.com",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://www.skyrock.com/";
+		$post_elements=array('need_login_form_login'=>$user,
+							'need_login_form_password'=>$pass,
+							'x'=>rand(0,20),
+							'y'=>rand(0,20),
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_friends="http://www.skyrock.com/m/friends/";
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false; 
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("url_friends",$res))
+			$this->updateDebugBuffer('url_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$contacts=array();
+		$page=0;$hasFriends=true;
+		while($hasFriends)
+			{
+			$page++;$message_array=array();
+			$names_array=$this->getElementDOM($res,"//ul[@class='friends_list']/li",'title');
+			$message_array=$this->getElementDOM($res,"//a[@class='ecrire']",'href');
+			if (empty($message_array)) $hasFriends=false;
+			if (!empty($names_array)) foreach($names_array as $key=>$value) $contacts[$message_array[$key]]=$value;
+			$url_next="http://www.skyrock.com/m/friends/?order=1&page={$page}";
+			$res=$this->get($url_next,true);
+			}
+		
+ 		return $contacts;
+		}
+		
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $session_id The OpenInviter user's session ID
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $href=>$name)
+			{
+			$countMessages++;
+			$url_send_message=html_entity_decode("http://www.skyrock.com{$href}");
+			$res=$this->get($url_send_message);
+			if ($this->checkResponse("url_send_message",$res))
+				$this->updateDebugBuffer('url_send_message',$url_send_message,'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_send_message',$url_send_message,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			
+			$form_action="http://www.skyrock.com/m/messages/write_message.php";
+			$post_elements=array('id_dest'=>$this->getElementString($res,'name="id_dest" value="','"'),
+								 'sendMe'=>$this->getElementString($res,'sendMe" value="','"'),
+								 'posted'=>TRUE,
+								 'message_zone'=>$message['body'], 
+								);
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{		
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.skyrock.com/m/account/logout.php");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+			
+		}
+	}
+
+?>
diff --git a/plugins/contact_importer/OpenInviter/plugins/tagged.plg.php b/plugins/contact_importer/OpenInviter/plugins/tagged.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..da591c7252487a619a0aa478cb4b4f078f6fb2fa
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/tagged.plg.php
@@ -0,0 +1,192 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Tagged',
+	'version'=>'1.0.9',
+	'description'=>"Get the contacts from a Tagged.com account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.tagged.com/home.html',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Tagged Plugin
+ * 
+ * Import user's contacts from a Tagged Account
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class tagged extends openinviter_base
+{
+	private $login_ok=false;
+	public $showContacts=true;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+			  'login_post'=>'http://www.tagged.com/home.html?jli=1',
+			  'redirect'=>'http://www.tagged.com/logout.html',
+			  'contacts'=>'name',
+			  'message'=>'recipientId'
+			);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='tagged';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		$res = $this->get("http://www.tagged.com");
+		$postAction = "https://secure.tagged.com/secure_login.html?r=%2Fhome.html&uri=http%3A%2F%2Fwww.tagged.com";
+		$postElem = array();
+		$postElem['username'] = $user;
+		$postElem['password'] = $pass;
+		$res = $this->post($postAction, $postElem, true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',$postAction,'POST',true,$postElem);		
+		else
+			{
+			$this->updateDebugBuffer('login_post',$postAction,'POST',false,$postElem);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$res = $this->get("http://www.tagged.com/home.html?jli=1");
+		if ($this->checkResponse("redirect",$res))
+			$this->updateDebugBuffer('redirect',"http://www.tagged.com/home.html?jli=1",'GET');		
+		else
+			{
+			$this->updateDebugBuffer('redirect',"http://www.tagged.com/home.html?jli=1",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_get_friends='http://www.tagged.com/messages.html?action=compose';
+		$this->login_ok=$url_get_friends;
+		return true;	
+		}
+	
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url = $this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("contacts",$res))
+			$this->updateDebugBuffer('contacts',$url,'GET');		
+		else
+			{
+			$this->updateDebugBuffer('contacts',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$contacts = array();
+		if (preg_match_all("#\{\"name\"\:\"(.+)\"\,\"id\"\:(.+)\}#U", $res, $matches))
+			{
+			if (!empty($matches[1]))
+				foreach($matches[1] as $key=>$value)
+					if (!empty($matches[2][$key])) $contacts[$matches[2][$key]]=$value;
+			}
+			
+		reset($contacts);$firstKey=key($contacts);
+		if (preg_match("#\[\{\"name\"\:\"(.+)\"\,\"id\"\:(.+)\}#U", $res, $matches)) $contacts[$firstKey]=$matches[1];
+		else unset($contacts[$firstKey]);
+				
+		return $contacts;
+		}
+		
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */	
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach ($contacts as $id=>$username)
+			{
+			$countMessages++;
+			$form_action='http://www.tagged.com/handle_inbox.html';
+			$post_elements=array('recipient_id'=>$id,
+								 'subject'=>$message['subject'],
+								 'mce_editor_0_fontSizeSelect'=>0,
+								 'entryText'=>$message['body'],
+								 'from'=>'compose',
+								 'section'=>'send',
+								 'message_type'=>'N',
+								 'came_from_url'=>'http://www.tagged.com/messages.html',
+								 'save_sent'=>'save',
+								 'action'=>'sendMessage',
+								 'skip_confirmation'=>1,
+								 'ajax_sent'=>1,
+								 'recipient_id_hidden'=>0,
+								 'on_success_action'=>'call_function|complete_sendMsg()'
+								);
+			$res=$this->post($form_action,$post_elements,true);
+			if (strpos($res,'captcha')) break;
+			if ($this->checkResponse("message",$res))
+				$this->updateDebugBuffer('message',$form_action,'POST',true,$post_elements);		
+			else
+				{
+				$this->updateDebugBuffer('message',$form_action,'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$logout_url = "http://www.tagged.com/logout.html";
+		$res = $this->get($logout_url);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/techemail.plg.php b/plugins/contact_importer/OpenInviter/plugins/techemail.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..3b391946b89f6b17f7088be367a92b411898c14a
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/techemail.plg.php
@@ -0,0 +1,142 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Techemail',
+	'version'=>'1.0.2',
+	'description'=>"Get the contacts from an Techemail account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://techemail.mail.everyone.net/email/scripts/loginuser.pl',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	); 
+/**
+ * Techemail Plugin
+ * 
+ * Imports user's contacts from Techemail's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */	
+class techemail extends openinviter_base
+{
+	private $login_ok=false;
+	protected $timeout=30;
+	public $showContacts=true;
+	public $debug_array=array(
+				'initial_get'=>'loginName',
+				'login_post'=>'oi_sda_firstname',
+				'get_contacts'=>'composeMe',
+				);
+
+/**
+ * Login function
+ * 
+ * Makes all the necessary requests to authenticate
+ * the current user to the server.
+ * 
+ * @param string $user The current user.
+ * @param string $pass The password for the current user.
+ * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+ */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='techemail';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		$res=$this->get("http://techemail.mail.everyone.net/email/scripts/loginuser.pl",true);
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"http://super.popstarmail.org/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://super.popstarmail.org/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$form_action="http://techemail.mail.everyone.net/email/scripts/loginuser.pl?EV1=".$this->getElementString($res,"loginuser.pl?EV1=",'"');
+		$post_elements=array('loginName'=>$user,'user_pwd'=>$pass,'login'=>'Login');
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$url_contacts="http://techemail.mail.everyone.net/email/scripts/contacts.pl?EV1=";
+		$this->login_ok=$url_contacts;
+		return true;
+		}
+	
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */			
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url = $this->login_ok;
+		$res=$this->get($url,true);
+		if ($this->checkResponse('get_contacts',$res))
+			$this->updateDebugBuffer('get_contacts',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_contacts',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//a";$data=$xpath->query($query);
+		foreach($data as $node)
+			{
+			$nameBulk=$node->getAttribute('href');
+			if (strpos($nameBulk,'javascript:composeMe')!==false)
+				{
+				$name=$this->getElementString($nameBulk,'"','"');$email=$node->nodeValue;
+				if (!empty($email)) $contacts[$email]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$email);
+				}
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+		
+		
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */		
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$logout_url="http://techemail.mail.everyone.net/email/scripts/logout.pl";
+		$res = $this->get($logout_url,true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/terra.plg.php b/plugins/contact_importer/OpenInviter/plugins/terra.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..940036b14193f0cbcb88220d6e3a9160efa0756e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/terra.plg.php
@@ -0,0 +1,148 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Terra',
+	'version'=>'1.0.7',
+	'description'=>"Get the contacts from an Terra account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://correo.terra.com/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Terra Plugin
+ * 
+ * Imports user's contacts from Terra.com
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class terra extends openinviter_base
+{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array('initial_get'=>'username',
+			  				  'post_login'=>'location.href',
+			  				  'url_post_redirect'=>'td',
+			  				  'file_contacts'=>'Users["'
+							 );
+
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user, $pass)
+		{
+		$this->resetDebugger();
+		$this->service='terra';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://correo.terra.com/");
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"http://correo.terra.com/",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('initial_get',"http://correo.terra.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		
+		$form_action="http://correo.terra.com/atmail.php";
+		$post_elements=array('username'=>$user,'password'=>$pass);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse('post_login',$res))
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',true,$post_elements);
+		else 
+			{
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		$url_redirect=$this->getElementString($res,"href='","'");
+		$domain=$this->getElementString($res,'http://correo.terra.com/','/showmail');
+		$res=$this->get($url_redirect,true);
+		if ($this->checkResponse('url_post_redirect',$res))
+			$this->updateDebugBuffer('url_post_redirect',"{$url_redirect}",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('url_post_redirect',"{$url_redirect}",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		
+		$url_file_contacts="http://correo.terra.com/{$domain}/abook.php?func=composebook&emailto=&emailcc=&emailbcc=";	
+		$this->login_ok=$url_file_contacts;
+		file_put_contents($this->getLogoutPath(),$domain);
+		return true;
+		} 
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		if ($this->checkResponse('file_contacts',$res))
+			$this->updateDebugBuffer('file_contacts',$url,'GET');
+		else 
+			{
+			$this->updateDebugBuffer('file_contacts',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		$contacts=array();
+		if (preg_match_all("#Users\[\"(.+)\"\] \= \'(.+) \&lt\;#U", $res, $matches))
+			if (!empty($matches[1]))
+				foreach($matches[1] as $key=>$email)
+					$contacts[$email]=array('first_name'=>(!empty($matches[2][$key])?$matches[2][$key]:false),'email_1'=>$email);
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);	
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		if (file_exists($this->getLogoutPath()))
+			{ $domain=file_get_contents($this->getLogoutPath());$res=$this->get("http://correo.terra.com{$domain}/index.php?func=logout",true); }
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		}
+	}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/twitter_ex.plg.php b/plugins/contact_importer/OpenInviter/plugins/twitter_ex.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..cb97129990a3b00963ad5c3967b822323a92533a
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/twitter_ex.plg.php
@@ -0,0 +1,160 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Twitter',
+	'version'=>'1.0.8',
+	'description'=>"Get the contacts from a Twitter account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://twitter.com',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Twitter Plugin
+ * 
+ * Imports user's contacts from Twitter and
+ * posts a new tweet from the user as a invite.
+ * 
+ * @author OpenInviter
+ * @version 1.0.3
+ */
+class twitter_ex extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'responce_ok'=>'screen_name',
+				'responce_ok_followers'=>'screen_name',
+				'responce_ok_status'=>'status',
+				'url_direct_message'=>'direct_message'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='twitter';
+		$this->service_user=$user;
+		$this->service_pass=$pass;
+		if (!$this->init()) return false;
+		$res=$this->get("http://{$user}:{$pass}@twitter.com/account/verify_credentials.xml",true);
+		if ($this->checkResponse('responce_ok',$res))
+			$this->updateDebugBuffer('responce_ok',"http://user:pass@twitter.com/account/verify_credentials.xml",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('responce_ok',"http://user:pass@twitter.com/account/verify_credentials.xml",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		file_put_contents($this->getLogoutPath(),"{$user}/{$pass}");
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (file_exists($this->getLogoutPath())) 
+			{$auth=explode("/",file_get_contents($this->getLogoutPath()));$user=$auth[0];$pass=$auth[1];}
+		else return false;
+		$res=$this->get("http://{$user}:{$pass}@twitter.com/statuses/followers.xml",true);
+		if ($this->checkResponse('responce_ok_followers',$res))
+			$this->updateDebugBuffer('responce_ok_followers',"http://user:pass@twitter.com/statuses/followers.xml",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('responce_ok_followers',"http://user:pass@twitter.com/statuses/followers.xml",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		$contacts=$this->getElementDOM($res,'//screen_name');
+		return $contacts;	
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		if (file_exists($this->getLogoutPath())) 
+			{$auth=explode("/",file_get_contents($this->getLogoutPath()));$user=$auth[0];$pass=$auth[1];}
+		else return false;
+		$post_elements=array('status'=>$message['body']);
+		$res=$this->post("http://{$user}:{$pass}@twitter.com/statuses/update.xml",$post_elements,true);
+		if ($this->checkResponse('responce_ok_status',$res))
+			$this->updateDebugBuffer('responce_ok_status',"http://user:pass@twitter.com/statuses/update.xml",'POST',true,$post_elements);
+		else 
+			{
+			$this->updateDebugBuffer('responce_ok_status',"http://user:pass@twitter.com/statuses/update.xml",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		$countMessages=0;
+		foreach($contacts as $key=>$screen_name)
+			{
+			$countMessages++;
+			$post_elements=array('user'=>$screen_name,'text'=>$message['body']);
+			$res=$this->post("http://{$user}:{$pass}@twitter.com/direct_messages/new.xml",$post_elements);
+			if ($this->checkResponse('url_direct_message',$res))
+				$this->updateDebugBuffer('url_direct_message',"http://user:pass@twitter.com/direct_messages/new.xml",'POST',true,$post_elements);
+			else 
+				{
+				$this->updateDebugBuffer('url_direct_message',"http://user:pass@twitter.com/direct_messages/new.xml",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;	
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 * 
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/uk2.plg.php b/plugins/contact_importer/OpenInviter/plugins/uk2.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..24fe6cf34634a1727ff0601d1dc2c33fc5a255e1
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/uk2.plg.php
@@ -0,0 +1,185 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Uk2',
+	'version'=>'1.0.2',
+	'description'=>"Get the contacts from a Uk2 account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://mail.uk2.net/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Uk2 Plugin
+ * 
+ * Imports user's contacts from Uk2 AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class uk2 extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'username',
+				'login_post'=>'parse',
+				'url_inbox'=>'parse',
+				'contacts_file'=>'Email'
+				
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='uk2';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+					
+		$res=$this->get("http://mail.uk2.net/",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://mail.uk2.net/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get','http://mail.uk2.net/','GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$form_action='http://mail.uk2.net/atmail.pl';
+		$post_elements=array('Language'=>'english','username'=>$user,'pop3host'=>'uk2.net','password'=>$pass,'LoginType'=>'xul');
+		$res=$this->post($form_action,$post_elements,false,true,false,array(),false,false);
+		if ($this->checkResponse('login_post',$res))
+			$this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_redirect='http://mail.uk2.net/'.$this->getElementString($res,"href='","'");
+		$res=$this->get($url_redirect,true);	 
+		if ($this->checkResponse("url_inbox",$res))
+			$this->updateDebugBuffer('url_inbox',$url_redirect,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_inbox',$url_redirect,'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_export='http://mail.uk2.net/abook.pl?func=export&abookview=personal';
+		$this->login_ok=$url_export;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("contacts_file",$res))
+			$this->updateDebugBuffer('contacts_file',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('contacts_file',$url,'GET',false);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$temp=$this->parseCSV($res);
+		$contacts=array();
+		foreach ($temp as $values)
+			{
+			if (!empty($values[3]))
+				$contacts[$values[3]]=array('first_name'=>(!empty($values[20])?$values[20]:false),
+												'middle_name'=>(!empty($values[8])?$values[8]:false),
+												'last_name'=>false,
+												'nickname'=>false,
+												'email_1'=>(!empty($values[3])?$values[3]:false),
+												'email_2'=>false,
+												'email_3'=>false,
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[11])?$values[11]:false),
+												'phone_home'=>(!empty($values[9])?$values[9]:false),			
+												'pager'=>false,
+												'address_home'=>false,
+												'address_city'=>(!empty($values[5])?$values[5]:false),
+												'address_state'=>(!empty($values[7])?$values[7]:false),
+												'address_country'=>(!empty($values[8])?$values[8]:false),
+												'postcode_home'=>(!empty($values[6])?$values[6]:false),
+												'company_work'=>(!empty($values[14])?$values[14]:false),
+												'address_work'=>false,
+												'address_work_city'=>(!empty($values[16])?$values[16]:false),
+												'address_work_country'=>(!empty($values[19])?$values[19]:false),
+												'address_work_state'=>(!empty($values[17])?$values[17]:false),
+												'address_work_postcode'=>(!empty($values[18])?$values[18]:false),
+												'fax_work'=>(!empty($values[21])?$values[21]:false),
+												'phone_work'=>(!empty($values[20])?$values[20]:false),
+												'website'=>(!empty($values[12])?$values[12]:false),
+												'isq_messenger'=>false,
+												'skype_essenger'=>false,
+												'yahoo_essenger'=>false,
+												'msn_messenger'=>false,
+												'aol_messenger'=>false,
+												'other_messenger'=>false,
+											   );
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;		
+		$res=$this->get('http://mail.uk2.net/util.pl?func=logout',true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/vimeo.plg.php b/plugins/contact_importer/OpenInviter/plugins/vimeo.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..ee3ca60d0e24687436b526775fb6fd718f72792d
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/vimeo.plg.php
@@ -0,0 +1,195 @@
+<?php
+/*Import Friends from Vimeo
+ * You can Post Messages using Vimeo system
+ */
+$_pluginInfo=array(
+	'name'=>'Vimeo',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a Vimeo account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://vimeo.com/',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Vimeo Plugin
+ * 
+ * Import user's contacts from Vimeo and Post comments
+ * using Vimeo's internal Posting  system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class vimeo extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'sign_in[email]',
+				'login_post'=>'user',
+				'url_home'=>'contacts',
+				'get_friends'=>'username',
+				'url_send_message'=>'MemoContent',
+				'send_message'=>'was sent'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='vimeo';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+
+		$res=$this->get("http://vimeo.com/log_in");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://vimeo.com/log_in",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://vimeo.com/log_in",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://vimeo.com/log_in";
+		$post_elements=array('sign_in[email]'=>$user,'sign_in[password]'=>$pass);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$url_profile='http://vimeo.com/';
+		$this->login_ok=$url_profile;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("url_home",$res))
+			$this->updateDebugBuffer('url_home',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_home',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+
+		$user_id=$this->getElementString($res,'http://vimeo.com/user','/');
+		$url_contacts="http://vimeo.com/user{$user_id}/contacts";
+		$res=$this->get($url_contacts);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url_contacts,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url_contacts,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//a[@class='username']";$data=$xpath->query($query);
+		foreach($data as $node)
+			{
+			$name=$node->nodeValue;
+			$id=str_replace('/user','',(string)$node->getAttribute('href'));
+			if (!empty($name)) $contacts[$id]=$name;
+			}
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $id=>$name)
+			{
+			$countMessages++;
+			$form_action="http://vimeo.com/ajax/conversation/send_message";
+			$post_elements=array('message'=>$message['body'],'jdata'=>'{"user_id":'.$id.',"layout":"private"}');
+			$res=$this->post($form_action,$post_elements);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://vimeo.com/log_out");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/virgilio.plg.php b/plugins/contact_importer/OpenInviter/plugins/virgilio.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..9017f2a50ff772e74977032f4bcd21b8d91dcb43
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/virgilio.plg.php
@@ -0,0 +1,140 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Virgilio',
+	'version'=>'1.0.2',
+	'description'=>"Get the contacts from an virgilio.it account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://mobimail.virgilio.it/cp/ps/Main/login/LoginVirgilio?d=virgilio.it',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Virgilio.it Plugin
+ * 
+ * Imports user's contacts from Virgilio.it account
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class virgilio extends openinviter_base
+{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	private $sessionVer;
+	public $debug_array=array('initial_get'=>'login_type',
+			  				  'login_post'=>'&t=',
+			  				  'url_contact'=>'contatti'
+							 );
+
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user, $pass)
+	{
+		$this->resetDebugger();
+		$this->service='virgilio';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		$res = $this->get("http://mobimail.virgilio.it/cp/ps/Main/login/LoginVirgilio?d=virgilio.it",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://mobimail.virgilio.it/cp/ps/Main/login/LoginVirgilio?d=virgilio.it",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://mobimail.virgilio.it/cp/ps/Main/login/LoginVirgilio?d=virgilio.it",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$form_action="http://mobimail.virgilio.it/cp/ps/Main/login/WrapLogin";
+		$post_elements=array('p'=>false,'login_type'=>'virgilio','NGUserID'=>'null','u'=>$user,'password'=>$pass,'d'=>'virgilio.it');
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse('login_post',$res))	
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$vergilioT=$this->getElementString($res,'&t=','&');$this->sessionVer=$vergilioT;
+		$url_contacts="http://mobimail.virgilio.it/cp/ps/PSPab/Contacts?d=virgilio.it&u={$user}&t={$vergilioT}&reset=true&startAt=1&l=it";
+		$this->login_ok=$url_contacts;
+		file_put_contents($this->getLogoutPath(),$vergilioT);
+		return true;
+	} 
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);		
+		if ($this->checkResponse("url_contact",$res))
+			$this->updateDebugBuffer('url_contact',$this->login_ok,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_contact',$this->login_ok,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$contacts=array();
+		$nrFriends=(int)$this->getElementString($res,"Hai "," contatti");$exit=0;$page=1;
+		while($nrFriends>count($contacts))
+			{
+			$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+			$xpath=new DOMXPath($doc);$query="//a";$data=$xpath->query($query);
+			foreach($data as $node)
+				if (strpos($node->getAttribute('href'),'PABreturnURL=Contacts')!==false) 
+					{ $name=$node->childNodes->item(0)->nodeValue;$email=$node->childNodes->item(2)->nodeValue;if (!empty($email)) $contacts[$email]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$email); }
+			$page++;$res=$this->get("http://mobimail.virgilio.it/cp/ps/PSPab/Contacts?d=virgilio.it&u={$this->service_user}&t={$this->sessionVer}&reset=true&startAt={$page}&l=it",true);		
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);			
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		if (file_exists($this->getLogoutPath()))
+			{$vergilioT=file_get_contents($this->getLogoutPath());$res=$this->get("http://mobimail.virgilio.it/cp/ps/Main/login/Logout?d=virgilio.it&u={$this->service_user}&t={$vergilioT}&l=it",true);}
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+	}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/vkontakte.plg.php b/plugins/contact_importer/OpenInviter/plugins/vkontakte.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..0d7356ea167c8b16c44d562d744eb5c79df2c63b
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/vkontakte.plg.php
@@ -0,0 +1,195 @@
+<?php
+/*Import Friends from vkontakte.ru
+ * You can Post Messages using Vkontakte system
+ */
+$_pluginInfo=array(
+	'name'=>'Vkontakte',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a Vkontakte.ru account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://vkontakte.ru',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Cyworld Plugin
+ * 
+ * Import user's contacts from vkontakte.ru and Sends private messages
+ * using vkontakte.ru internal Posting  system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class vkontakte extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'email',
+				'login_post'=>'myfriends',
+				'get_friends'=>'friendOrder',
+				'url_send_message'=>'title',
+				'send_message'=>'<div id="message">'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='vkontakte';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+
+		$res=$this->get("http://vkontakte.ru/");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://vkontakte.ru/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://vkontakte.ru/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://vkontakte.ru/login.php";
+		$post_elements=array("try_to_login"=>1,"email"=>$user,"pass"=>$pass);
+		$res=$this->post($form_action,$post_elements,true);
+
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$url_friends="http://vkontakte.ru/".$this->getElementString($res,"myfriends'><a href='","'");		
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		while (strpos($res,'list:[[')!==false)
+			{
+			$countact_bulk=$this->getElementString($res,'list:[[','}');
+			$id=substr($countact_bulk,0,strpos($countact_bulk,','));
+			$names_array=explode("'",$countact_bulk);
+			if (isset($id))
+				$contacts[$id]=(isset($names_array[1])?$names_array[1]:false)." ".(isset($names_array[3])?$names_array[3]:false);
+			$res=str_replace("list:[[".$countact_bulk,"",$res);
+			}
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $id=>$name)
+			{
+			$countMessages++;
+			$url_send_message="http://vkontakte.ru/mail.php?act=write&to={$id}";
+			$res=$this->get($url_send_message);
+			if ($this->checkResponse("url_send_message",$res))
+				$this->updateDebugBuffer('url_send_message',$url_send_message,'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_send_message',$url_send_message,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			
+			$form_action="http://vkontakte.ru/mail.php";
+			$post_elements=$this->getHiddenElements($res);$post_elements['title']=$message['subject'];$post_elements['message']=$message['body'];
+			$res=$this->post($form_action,$post_elements);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://vkontakte.ru/login.php?op=logout");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/walla.plg.php b/plugins/contact_importer/OpenInviter/plugins/walla.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..a48393c34207a0d04f92e05fdd05255eeb966557
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/walla.plg.php
@@ -0,0 +1,147 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Walla',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from a Walla mail account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://friends.walla.co.il/?tsscript=login&theme=&ReturnURL=http://mail.walla.co.il/index.cgi',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Walla Plugin
+ * 
+ * Imports user's contacts from Walla's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class walla extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'@login',
+				'post_login'=>'newaddress',
+				'url_contacts'=>'@compose',
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='walla';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://friends.walla.co.il/?tsscript=login&theme=&ReturnURL=http://mail.walla.co.il/index.cgi",true);
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"http://www.gawab.com/default.php",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.gawab.com/default.php",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+
+		$form_action="http://friends.walla.co.il/";
+		$post_elements=array('w'=>'/@login.commit',
+							'ReturnURL'=>'http://mail.walla.co.il/index.cgi',
+							 'username'=>$user,
+							 'password'=>$pass
+							 );
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse('post_login',$res))
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',true,$post_elements);
+		else 
+			{
+			$this->updateDebugBuffer('post_login',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		$url_contacts="http://newaddress.walla.co.il";
+		$this->login_ok=$url_contacts;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse('url_contacts',$res))
+			$this->updateDebugBuffer('url_contacts',$url,'GET');
+		else 
+			{
+			$this->updateDebugBuffer('url_contacts',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;	
+			}
+		
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//a";$data=$xpath->query($query);
+		foreach($data as $node)
+			{
+			if (strpos($node->getAttribute('href'),'@view')!==false) $name=$node->nodeValue;
+			if (strpos($node->getAttribute('href'),'w=/@compose')!==false) $email=$node->nodeValue;
+			if (!empty($email))
+				$contacts[$email]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$email);
+			}
+		
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+					
+		}
+	
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://friends.walla.co.il/?w=/@logout",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+	
+	}	
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/web_de.plg.php b/plugins/contact_importer/OpenInviter/plugins/web_de.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..fdbcb8102b3bcc86b2453b200da7b4246fe7fe8e
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/web_de.plg.php
@@ -0,0 +1,136 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Web.de',
+	'version'=>'1.0.5',
+	'description'=>"Get the contacts from an web.de account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://m.web.de',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * web.de Plugin
+ * 
+ * Imports user's contacts from web.de's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.6.7
+ */
+class web_de extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	protected $timeout=30;		
+	public $debug_array=array(
+			 'initial_check'=>'[5]',
+	    	);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='web_de';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://m.web.de");
+		$postElem = $this->getHiddenElements($res);
+		$postAction = $this->getElementString($res,'action="','"');
+		$s=str_replace(";",'',$this->getElementString($res,'/;s=','/'));
+			
+		$postAction='/;e=utf-8;s='.$s.'/mail';
+		
+		$postElem['user']=$user;
+		$postElem['passw']=$pass;
+		$postElem['sv-remove-name']='Login';
+		$res = $this->post("http://m.web.de".$postAction, $postElem, true);
+		
+		if ($this->checkResponse("initial_check",$res))
+			$this->updateDebugBuffer('initial_check',"http://m.web.de".$postAction,'POST');		
+		else
+			{
+			$this->updateDebugBuffer('initial_check',"http://m.web.de".$postAction,'POST',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_email=$this->getElementString($res,'[5] <a href="','"');
+		
+		$this->login_ok =$url_email; 
+		return true;
+		}
+	
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else
+		$url=$this->login_ok;
+		//go to url inbox
+		$contacts = array();
+		$res=$this->get($url,true);
+		$res = $this->getElementString($res, '</div><div class="separator">','<input type="hidden"');
+		$contacts_array=$this->getElementDOM($res,'//a');
+		if(!is_array($contacts_array))
+			return false;
+		foreach($contacts_array as $key=>$val)
+			{
+			if ($key%2==0) $name=$val;
+            elseif($key%2!=0) 
+            	{
+                $val = preg_replace('/(.+\\.[A-Z]+)[^A-Z]*$/i',"\$1",trim($val));
+               	$contacts[trim($val)]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>trim($val));
+                }
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+	
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		if (file_exists($this->getLogoutPath()))
+			{
+			 $url_logout=file_get_contents($this->getLogoutPath());		
+			if (!empty($url_logout)) $res=$this->get($url_logout,true);
+			}
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+				
+	}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/wpl.plg.php b/plugins/contact_importer/OpenInviter/plugins/wpl.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..6ca6acfae7a8b9b0426bec8854d07113be5502ad
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/wpl.plg.php
@@ -0,0 +1,157 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Wp.pt',
+	'version'=>'1.0.3',
+	'description'=>"Get the contacts from an Wp.pt account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://wap.poczta.wp.pl/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Wp.pt Plugin
+ * 
+ * Imports user's contacts from Wp.pt account
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class wpl extends openinviter_base
+{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;		
+	
+	public $debug_array=array('initial_get'=>'zaloguj',
+			  				  'login_post'=>'addresses.html',
+			  				  'url_adress'=>'addraction',
+			  				  'url_contact'=>'info'
+							 );
+
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user, $pass)
+	{
+		$this->resetDebugger();
+		$this->service='wp';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res = $this->get("http://wap.poczta.wp.pl/",true);
+	
+		
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://wap.poczta.wp.pl/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://wap.poczta.wp.pl/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://wap.poczta.wp.pl/index.html";
+		$post_elements=array('login'=>$user,
+							 'password'=>$pass,
+							 'zaloguj'=>'Zaloguj'
+							); 
+		
+		$res=$this->post($form_action,$post_elements);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_adress='http://wap.poczta.wp.pl/addresses.html?'.$this->getElementString($res,'addresses.html?','"');
+		$this->login_ok=$url_adress;
+		return true;		
+	} 
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("url_adress",$res))
+			$this->updateDebugBuffer('url_adress',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_adress',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$contacts=array();
+		$href_array=$this->getElementDOM($res,"//a[@href]",'href');
+		foreach ($href_array as $value)
+			if (strpos($value,'addresses.html?action=addraction&aid=')!==false)
+				{
+			
+				$res=$this->get("http://wap.poczta.wp.pl/{$value}");
+				if ($this->checkResponse("url_contact",$res))
+					$this->updateDebugBuffer('url_contact',"http://wap.poczta.wp.pl/{$value}",'GET');
+				else
+					{
+					$this->updateDebugBuffer('url_contact',"http://wap.poczta.wp.pl/{$value}",'GET',false);
+					$this->debugRequest();
+					$this->stopPlugin();
+					return false;
+					}
+				$contacts_array=$this->getElementDOM($res,"//p[@class='info']");
+				$contacts_exploded=explode(' <',$contacts_array[0]);$email=str_replace('>','',$contacts_exploded[1]);$name=trim(preg_replace('/[^(\x20-\x7F)]*/','',$contacts_exploded[0]));
+				$contacts[$email]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$email);
+				}
+	
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get('http://wap.poczta.wp.pl/');
+		$url_logout='http://wap.poczta.wp.pl/index.html?logout=1&ticaid='.$this->getElementString($res,'index.html?logout=1&ticaid=','"');
+		$res=$this->get($url_logout);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		}
+	}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/xanga.plg.php b/plugins/contact_importer/OpenInviter/plugins/xanga.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..6cc2fd2104035720bdff070142893e5b50cb3aa7
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/xanga.plg.php
@@ -0,0 +1,188 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Xanga',
+	'version'=>'1.0.6',
+	'description'=>"Get the contacts from a Xanga account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://www.xanga.com/',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Xanga Plugin
+ * 
+ * Import user's contacts from Xanga and send 
+ * messages using the internal messaging system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class xanga extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'txtSigninPassword',
+				'post_login'=>'home.aspx',
+				'get_friends'=>'thumbnail',
+				'url_send_message'=>'messagesubject',
+				'send_message'=>'private'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='xanga';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://www.xanga.com/signin.aspx?ReturnUrl=http%3a%2f%2fwww.xanga.com%2fdefault.aspx");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://hk.xanga.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://hk.xanga.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://www.xanga.com/signin.aspx?ReturnUrl=http%3a%2f%2fwww.xanga.com%2fdefault.aspx";
+		$post_elements=$this->getHiddenElements($res);
+		$post_elements['txtSigninUsername']=$user;$post_elements['txtSigninPassword']=$pass;$post_elements['cmbNetwork']=1;$post_elements['signInButton']='Sign In';
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("post_login",$res))
+			$this->updateDebugBuffer('post_login',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('post_login',$form_action,'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_friends="http://www.xanga.com/private/homemain.aspx";
+		$this->login_ok=$url_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		$contacts=array();
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//a[@class='thumbnail']";$data=$xpath->query($query);
+		foreach($data as $node)
+			if (strpos($node->getAttribute('title'),'Visit')!==false)
+				{
+				$href=$node->getAttribute('href');
+				if (!empty($href)) $name=$this->getElementString($href,'//','.');
+				if (!empty($name)) $contacts[$href]=!empty($name)?$name:false;
+				}
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $href=>$name)
+			{
+			$countMessages++;
+			$url_send_message="http://www.xanga.com/message.aspx?user={$name}";
+			$res=$this->get($url_send_message,true);
+			if ($this->checkResponse("url_send_message",$res))
+				$this->updateDebugBuffer('url_send_message',$url_send_message,'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_send_message',$url_send_message,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}		
+			$form_action=$url_send_message;
+			$post_elements=$this->getHiddenElements($res);$post_elements['messagesubject']=$message['subject'];$post_elements['messagetext']=$message['body'];$post_elements['btnSubmit']='Submit';
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',$form_action,'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',$form_action,'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://www.xanga.com/logout.aspx",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/xing.plg.php b/plugins/contact_importer/OpenInviter/plugins/xing.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..381de9536e62f6c218b0539b55b34f9b4e402ec1
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/xing.plg.php
@@ -0,0 +1,207 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Xing',
+	'version'=>'1.0.6',
+	'description'=>"Get the contacts from a Xing account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'https://mobile.xing.com/',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Xing Plugin
+ * 
+ * Import user's contacts from Xing and send 
+ * messages using the internal messaging system
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class xing extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'dest',
+				'post_login'=>'white',
+				'get_friends'=>'normal_link',
+				'get_url_send_message'=>'light_grey_bg',
+				'url_send_message'=>'private_message.send',
+				'send_message'=>'light_grey_bg'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='xing';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		
+		$res=$this->get("https://mobile.xing.com/");
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"https://mobile.xing.com/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"https://mobile.xing.com/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$form_action="https://mobile.xing.com/".$this->getElementString($res,'form action="','"');
+		$post_elements=array('op'=>'login',
+							 'dest'=>'/app/user?op=home',
+							 'login_user_name'=>$user,
+							 'login_password'=>$pass,
+							 'sv-remove-name'=>'Log in'					
+							);
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("post_login",$res))
+			$this->updateDebugBuffer('post_login',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('post_login',$form_action,'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$url_adressbook_array=$this->getElementDOM($res,"//a[@class='white']",'href');
+		$url_adressbook='https://mobile.xing.com'.$url_adressbook_array[3];		
+		$this->login_ok=$url_adressbook;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url,true);
+		$contacts=array();
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$contacts_href=$this->getElementDOM($res,"//a[@class='normal_link']",'href');
+		$contacts_name=$this->getElementDOM($res,"//a[@class='normal_link']");
+		foreach ($contacts_name as $key=>$value)
+			if (!empty($contacts_href[$key])) $contacts[$contacts_href[$key]]=!empty($value)?$value:false;	
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $href=>$name)
+			{
+			$countMessages++;
+			$url_friend="https://mobile.xing.com{$href}";
+			$res=$this->get($url_friend,true);
+			if ($this->checkResponse("get_url_send_message",$res))
+				$this->updateDebugBuffer('get_url_send_message',$url_friend,'GET');
+			else
+				{
+				$this->updateDebugBuffer('get_url_send_message',$url_friend,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}		
+				$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+				$xpath=new DOMXPath($doc);$query="//div[@class='light_grey_bg']";$data=$xpath->query($query);
+				foreach($data as $node) $url_send_message='https://mobile.xing.com/'.$node->nextSibling->getAttribute('href');
+				$res=$this->get($url_send_message,true);
+				if (strpos($res,'Only XING Premium')===false)
+					{
+					if ($this->checkResponse("url_send_message",$res))
+						$this->updateDebugBuffer('url_send_message',$url_send_message,'GET');
+					else
+						{
+						$this->updateDebugBuffer('url_send_message',$url_send_message,'GET',false);
+						$this->debugRequest();
+						$this->stopPlugin();
+						return false;
+						}
+					$form_action="https://mobile.xing.com/".$this->getElementString($res,'form action="/','"');
+					$post_elements=$this->getHiddenElements($res);$post_elements['subject']=$message['subject'];
+					$post_elements['body']=$message['body'];$post_elements['sv-set-op-to-private_message.send']='Send';
+					$res=$this->post($form_action,$post_elements,true);
+					if ($this->checkResponse("post_login",$res))
+						$this->updateDebugBuffer('send_message',$form_action,'POST',true,$post_elements);
+					else
+						{
+						$this->updateDebugBuffer('send_message',$form_action,'POST',false,$post_elements);
+						$this->debugRequest();
+						$this->stopPlugin();
+						return false;
+						}
+					}
+			else return true;
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("https://www.xing.com/app/user?op=logout",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/xuqa.plg.php b/plugins/contact_importer/OpenInviter/plugins/xuqa.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..e0f83314033615bedb607e1cbc7645c94bf3aa22
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/xuqa.plg.php
@@ -0,0 +1,209 @@
+<?php
+/*Import Friends from Lovento
+ * You can Posts Messages using Xuqa system
+ */
+$_pluginInfo=array(
+	'name'=>'Xuqa',
+	'version'=>'1.0.5',
+	'description'=>"Get the contacts from a Xuqa account",
+	'base_version'=>'1.8.0',
+	'type'=>'social',
+	'check_url'=>'http://xuqa.com/login.php?dest=%2Findex.php&query_str=',
+	'requirement'=>'email',
+	'allowed_domains'=>false,
+	);
+/**
+ * Xuqa Plugin
+ * 
+ * Import Friends from Xuqa
+ * You can Write Private Messages using Xuqa system
+ * 
+ * @author OpenInviter
+ * @version 1.0.3
+ */
+class xuqa extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $internalError=false;
+	protected $timeout=30;
+	
+	public $debug_array=array(
+				'initial_get'=>'email_1',
+				'login_post'=>'logout',
+				'url_all_friends'=>'shadetabs',
+				'get_friends'=>'name',
+				'url_send_message'=>'book_id',
+				'send_message'=>'book_id'
+				);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='xuqa';
+		$this->service_user=$user;
+		$this->service_password=$pass;	
+		if (!$this->init()) return false;
+		
+		$res=$this->get("http://xuqa.com/login.php?dest=%2Findex.php&query_str=",true);
+		if ($this->checkResponse("initial_get",$res))
+			$this->updateDebugBuffer('initial_get',"http://www.xuqa.com/en/",'GET');
+		else
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.xuqa.com/en/",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://xuqa.com/redirect-login.php?cmd=submit&";
+		$post_elements=array('email_1'=>$user,'password'=>$pass,'loginform_Submit'=>'submit');
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse("login_post",$res))
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		$url_friends='http://xuqa.com/friends.php';
+		$res=$this->get($url_friends,true);
+		if ($this->checkResponse("url_all_friends",$res))
+			$this->updateDebugBuffer('url_all_friends',$url_friends,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_all_friends',$url_friends,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$url_all_friends='http://xuqa.com/ajax/friends.php?search=all_friend&tabs=shadetabs=0&id='.$this->getElementString($res,'shadetabs=0&id=','"');
+		$this->login_ok=$url_all_friends;
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		$res=$this->get($url);
+		if ($this->checkResponse("get_friends",$res))
+			$this->updateDebugBuffer('get_friends',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('get_friends',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//span[@id='name']";$data=$xpath->query($query);
+		foreach($data as $node)
+			{
+			$name=$node->nodeValue;
+			$href=$node->parentNode->getAttribute('href');
+			if (!empty($href)) $contacts[$href]=(!empty($name)?$name:false);	
+			}
+		return $contacts;
+		}
+
+	/**
+	 * Send message to contacts
+	 * 
+	 * Sends a message to the contacts using
+	 * the service's inernal messaging system
+	 * 
+	 * @param string $cookie_file The location of the cookies file for the current session
+	 * @param string $message The message being sent to your contacts
+	 * @param array $contacts An array of the contacts that will receive the message
+	 * @return mixed FALSE on failure.
+	 */
+	public function sendMessage($session_id,$message,$contacts)
+		{
+		$countMessages=0;
+		foreach($contacts as $href=>$name)
+			{	
+			$countMessages++;		
+			$url_send_message=str_replace('1','scrapbook.php?id=1',$href);
+			$res=$this->get($url_send_message,true);
+			if ($this->checkResponse("url_send_message",$res))
+				$this->updateDebugBuffer('url_send_message',$url_send_message,'GET');
+			else
+				{
+				$this->updateDebugBuffer('url_send_message',$url_send_message,'GET',false);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			
+			$form_action='http://xuqa.com/scrapbook.php'.$this->getElementString($res,'name="scrap_post" method="post" action="','"');
+			$book_id=$this->getElementDOM($res,"//input[@name='book_id']",'value');
+			$post_elements=array('cmd'=>'post',
+								 'book_id'=>$book_id[0],
+								 'comment'=>$message['body'],
+								);
+			$res=$this->post($form_action,$post_elements,true);
+			if ($this->checkResponse("send_message",$res))
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
+			else
+				{
+				$this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
+				$this->debugRequest();
+				$this->stopPlugin();
+				return false;
+				}
+			sleep($this->messageDelay);
+			if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
+			}
+	
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://xuqa.com/login.php");
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+	}	
+
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/yahoo.plg.php b/plugins/contact_importer/OpenInviter/plugins/yahoo.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..164bb1f70b414f2b9c85697834a1da8005b27cbd
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/yahoo.plg.php
@@ -0,0 +1,188 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Yahoo!',
+	'version'=>'1.4.9',
+	'description'=>"Get the contacts from a Yahoo! account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://mail.yahoo.com',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(yahoo)/i','/(ymail)/i','/(rocketmail)/i'),
+	);
+/**
+ * Yahoo! Plugin
+ * 
+ * Imports user's contacts from Yahoo!'s AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.3.8
+ */
+class yahoo extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	protected $timeout=30;
+	public $debug_array=array(
+			  'initial_get'=>'form: login information',
+			  'login_post'=>'window.location.replace',
+			  'contacts_page'=>'.crumb',
+			  'contacts_file'=>'"'
+			  );
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='yahoo';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+				
+		$res=$this->get("https://login.yahoo.com/config/mail?.intl=us&rl=1");
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"https://login.yahoo.com/config/mail?.intl=us&rl=1",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('initial_get',"https://login.yahoo.com/config/mail?.intl=us&rl=1",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();	
+			return false;
+			}
+		
+		$post_elements=$this->getHiddenElements($res);$post_elements["save"]="Sign+In";$post_elements['login']=$user;$post_elements['passwd']=$pass;
+	    $res=htmlentities($this->post("https://login.yahoo.com/config/login?",$post_elements,true));
+	   	if ($this->checkResponse('login_post',$res))
+			$this->updateDebugBuffer('login_post',"https://login.yahoo.com/config/login?",'POST',true,$post_elements);
+		else 
+			{
+			$this->updateDebugBuffer('login_post',"https://login.yahoo.com/config/login?",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();	
+			return false;
+			}		
+		$this->login_ok=$this->login_ok="http://address.mail.yahoo.com/?_src=&VPC=tools_export";
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else
+			$url=$this->login_ok;
+		$contacts=array();
+		$res=$this->get($url,true);
+		if ($this->checkResponse("contacts_page",$res))		
+			$this->updateDebugBuffer('contacts_page',"{$url}",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('contacts_page',"{$url}",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();	
+			return false;
+			}
+			
+		$post_elements=array('VPC'=>'import_export',
+							 '.crumb'=>$this->getElementString($res,'id="crumb1" value="','"'),
+							 'submit[action_export_yahoo]'=>'Export Now'
+							);
+		$res=$this->post("http://address.mail.yahoo.com/?_src=&VPC=tools_export",$post_elements); 
+		if ($this->checkResponse("contacts_file",$res))
+			{
+			$temp=$this->parseCSV($res, ',', '/\r\n/');
+			$contacts=array();
+			if (!empty($temp)) foreach ($temp as $values)
+				{
+				if (!empty($values['7'])) $mess_id=(!$this->isEmail($values['7'])?"{$values['7']}@yahoo.com":$values['7']);
+				if (!empty($values[4])) $emailKey=$values[4];
+				elseif(!empty($mess_id)) $emailKey=$mess_id;
+				elseif(!empty($values['52'])) $emailKey=$values['52']; 
+				if (!empty($emailKey))
+					$contacts[$emailKey]=array('first_name'=>(!empty($values[0])?$values[0]:false),
+												'middle_name'=>(!empty($values[2])?$values[2]:false),
+												'last_name'=>(!empty($values[1])?$values[1]:false),
+												'nickname'=>(!empty($values[3])?$values[3]:false),
+												'email_1'=>(!empty($values[4])?$values[4]:$emailKey),
+												'email_2'=>(!empty($values[17])?$values[17]:false),
+												'email_3'=>(!empty($values[16])?$values[16]:false),
+												'organization'=>false,
+												'phone_mobile'=>(!empty($values[12])?$values[12]:false),
+												'phone_home'=>(!empty($values[8])?$values[8]:false),			
+												'pager'=>(!empty($values[10])?$values[10]:false),
+												'address_home'=>(!empty($values[27])?$values[27]:false),
+												'address_city'=>(!empty($values[28])?$values[28]:false),
+												'address_state'=>(!empty($values[29])?$values[29]:false),
+												'address_country'=>(!empty($values[31])?$values[31]:false),
+												'postcode_home'=>(!empty($values[30])?$values[30]:false),
+												'company_work'=>(!empty($values[21])?$values[21]:false),
+												'address_work'=>(!empty($values[2])?$values[22]:false),
+												'address_work_city'=>(!empty($values[23])?$values[16]:false),
+												'address_work_country'=>(!empty($values[26])?$values[26]:false),
+												'address_work_state'=>(!empty($values[24])?$values[24]:false),
+												'address_work_postcode'=>(!empty($values[25])?$values[25]:false),
+												'fax_work'=>false,
+												'phone_work'=>(!empty($values[20])?$values[20]:false),
+												'website'=>(!empty($values[18])?$values[18]:false),
+												'isq_messenger'=>(!empty($values[50])?$values[50]:false),
+												'skype_essenger'=>(!empty($values[48])?$values[48]:false),
+												'yahoo_essenger'=>(!empty($values[39])?$values[39]:false),
+												'msn_messenger'=>(!empty($values[52])?$values[52]:false),
+												'aol_messenger'=>(!empty($values[53])?$values[53]:false),
+												'other_messenger'=>false,
+											   );
+				}
+			$this->updateDebugBuffer('contacts_file',"http://address.mail.yahoo.com/index.php",'POST',true,$post_elements);
+			}
+		else 
+			{
+			$this->updateDebugBuffer('contacts_file',"http://address.mail.yahoo.com/index.php",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();	
+			return false;	
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get("http://login.yahoo.com/config/login?logout=1&.done=http://address.yahoo.com&.src=ab&.intl=us");		
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+
+	}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/yandex.plg.php b/plugins/contact_importer/OpenInviter/plugins/yandex.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..6cc4f0b3d4fea816915c801ed691fa26c4656c99
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/yandex.plg.php
@@ -0,0 +1,120 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Yandex',
+	'version'=>'1.1.0',
+	'description'=>"Get the contacts from a Yandex account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://yandex.ru',
+	'requirement'=>'email',
+	'allowed_domains'=>array('/(yandex.ru)/i'),
+	);
+/**
+ * Yandex Plugin
+ * 
+ * Imports user's contacts from his Yandex
+ * AddressBook.
+ * 
+ * @author OpenInviter
+ * @version 1.0.5
+ */
+class yandex extends openinviter_base
+{
+	private $login_ok=false;
+	public $showContacts=true;
+	protected $timeout=30;
+	public $debug_array=array(
+			  'main_redirect'=>'window.location.replace(&quot;',
+			  'log_in'=>'http://passport.yandex.ru/passport?mode=logout',
+			  'url_contacts'=>'abook_person?ids'
+	);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user, $pass)
+	{
+		$this->resetDebugger();
+		$this->service='yandex';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		$res = $this->get("http://yandex.ru/",false);
+		$res = $this->get("http://mail.yandex.ru/",true);
+		$postaction = "https://passport.yandex.ru/passport?mode=auth";
+		$postelem = $this->getHiddenElements($res);$postelem["login"]=$user;$postelem["passwd"]=$pass;
+		$res = $this->post($postaction, $postelem, true);
+		$linkToAddressBook = "http://mail.yandex.ru/classic/abook";
+		$this->login_ok = $linkToAddressBook;
+		return true;
+	}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+	{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url = $this->login_ok;
+		$res = $this->get($url, true);
+		if ($this->checkResponse("url_contacts",$res))
+			$this->updateDebugBuffer('url_contacts',$url,'GET');
+		else
+			{
+			$this->updateDebugBuffer('url_contacts',$url,'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$contacts = array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//a";$data=$xpath->query($query);
+		foreach($data as $node) 
+			{
+			if (strpos($node->getAttribute('href'),'compose?to')!==false) $email=$node->nodeValue;
+			if (strpos($node->getAttribute('href'),'abook_person?ids')!==false) $name=$node->nodeValue;
+			if (!empty($email))
+				$contacts[$email]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$email);
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		
+	}
+
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res = $this->get(urldecode("http://passport.yandex.ru/passport?mode=logout&retpath=http%3A%2F%2Fwww.yandex.ru%2F"));
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		}
+}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/youtube.plg.php b/plugins/contact_importer/OpenInviter/plugins/youtube.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..2784d59bf6f2bdce62d0f079808971382265f043
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/youtube.plg.php
@@ -0,0 +1,193 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'YouTube',
+	'version'=>'1.0.2',
+	'description'=>"Get the contacts from a YouTube account AddressBook ",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.youtube.com',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Youtube Plugin
+ * 
+ * Imports user's contacts from YouTube AddressBook and
+
+ * 
+ * @author OpenInviter
+ * @version 1.0.0
+ */
+class youtube extends openinviter_base
+{
+	private $login_ok=false;
+	public $showContacts=true;
+	public $debug_array=array(
+			  'initial_get'=>'ltmpl',
+			  'login_post'=>'location.replace(',
+			  'url_redirect'=>'gXSRF_token',
+			  'url_addressbook'=>'YT_address_book',
+			  'url_contacts'=>'fid'
+			  
+	);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='youtube';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+		$res=$this->get("https://www.google.com/accounts/ServiceLogin?uilel=3&service=youtube&passive=true&continue=http%3A%2F%2Fwww.youtube.com%2Fsignup%3Fnomobiletemp%3D1%26hl%3Den_US%26next%3D%252F&hl=en_US&ltmpl=sso");
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"https://www.google.com/accounts/ServiceLogin?uilel=3&service=youtube&passive=true&continue=http%3A%2F%2Fwww.youtube.com%2Fsignup%3Fnomobiletemp%3D1%26hl%3Den_US%26next%3D%252F&hl=en_US&ltmpl=sso",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('initial_get',"https://www.google.com/accounts/ServiceLogin?uilel=3&service=youtube&passive=true&continue=http%3A%2F%2Fwww.youtube.com%2Fsignup%3Fnomobiletemp%3D1%26hl%3Den_US%26next%3D%252F&hl=en_US&ltmpl=sso",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();	
+			return false;
+			}
+		
+		$form_action="https://www.google.com/accounts/ServiceLoginAuth?service=youtube";
+		$post_elements=array('ltmpl'=>'sso',
+							 'continue'=>'http://www.youtube.com/signin?action_handle_signin=true&nomobiletemp=1&hl=en_US&next=%2Findex',
+							 'next'=>'/',
+							 'service'=>'youtube',
+							 'uilel'=>3,
+							 'ltmpl'=>'sso',
+							 'hl'=>'en_US',
+							 'ltmpl'=>'sso',
+							 'GALX'=>$this->getElementString($res,'name="GALX" value="','"'),
+							 'Email'=>$user,
+							 'Passwd'=>$pass,
+							 'PersistentCookie'=>'yes',
+							 'rmShown'=>1,
+							 'signIn'=>'Sign in',
+							 'asts'=>false,
+							);
+		$res=$this->post($form_action,$post_elements,true,true);
+		if ($this->checkResponse('login_post',$res))
+			$this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$url_redirect=html_entity_decode(urldecode(str_replace('\x', '%', $this->getElementString($res,'location.replace("','"'))));
+		$res=$this->get($url_redirect,true);
+	    if ($this->checkResponse('url_redirect',$res))
+			$this->updateDebugBuffer('url_redirect',"{$url_redirect}",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('url_redirect',"{$url_redirect}",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();	
+			return false;
+			}
+			
+		$this->login_ok='http://www.youtube.com/address_book';
+		return true;
+		}
+
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if ($this->login_ok===false)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else $url=$this->login_ok;
+		
+		$res=$this->get($url);
+		if ($this->checkResponse('url_addressbook',$res))
+			$this->updateDebugBuffer('url_addressbook',"{$url}",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('url_addressbook',"{$url}",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();	
+			return false;
+			}
+		
+		$form_action='http://www.youtube.com/address_book?action_ajax=1';
+		$post_elements=array('session_token'=>$this->getElementString($res,"YT_address_book('session_token=","'"),
+							'messages'=>'[{"type":"ajax_fetch_contacts","request":{"gid":"_all_contacts_","link_count":1000,"page":1}}]',
+							);
+		$res=$this->post($form_action,$post_elements);
+		if ($this->checkResponse('url_contacts',$res))
+			$this->updateDebugBuffer('url_contacts',$form_action,'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('url_contacts',$form_action,'POST',false,$post_elements);	
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		
+		$contacts=array();
+		if (preg_match_all("#fid\"\: \"(.+)\"\}#U", $res, $matchesArray))
+			{		
+			if (!empty($matchesArray[1]))
+				foreach($matchesArray[1] as $dummy=>$id)
+					{
+					$emailsArray=array();$namesArray=array();
+					$res=$this->get("http://www.youtube.com/address_book?action_display_contact_details=1&fid={$id}");
+					if (preg_match_all("#mailto\:(.+)\"#U", $res, $emailsArray)) 
+						{
+						if (preg_match_all("#\"\/user\/(.+)\"#U", $res, $namesArray)) $contacts[$emailsArray[1][0]]=array('first_name'=>$namesArray[1][0],'email_1'=>$emailsArray[1][0]);
+						else $contacts[$emailsArray[1][0]]=array('first_name'=>$emailsArray[1][0],'email_1'=>$emailsArray[1][0]);
+						}
+					}  
+			}
+		foreach ($contacts as $email=>$dummy) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+
+ 
+		/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		$res=$this->get('http://www.youtube.com/index',true);
+		$post_elements=array('action_logout'=>1,
+							 'session_token'=>$this->getElementString($res,"YT_php_support('","'"),
+							 );
+		$res=$this->post('http://www.youtube.com/index',$post_elements,true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;	
+		}
+}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/plugins/zapak.plg.php b/plugins/contact_importer/OpenInviter/plugins/zapak.plg.php
new file mode 100755
index 0000000000000000000000000000000000000000..a817c66eb218ab4e74c3834fcd3dfebbffd1ca97
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/plugins/zapak.plg.php
@@ -0,0 +1,152 @@
+<?php
+$_pluginInfo=array(
+	'name'=>'Zapakmail',
+	'version'=>'1.0.2',
+	'description'=>"Get the contacts from an Zapakmail account",
+	'base_version'=>'1.8.0',
+	'type'=>'email',
+	'check_url'=>'http://www.zapak.com/zapakmail.zpk',
+	'requirement'=>'user',
+	'allowed_domains'=>false,
+	);
+/**
+ * Zapakmail Plugin
+ * 
+ * Imports user's contacts from Zapakmail's AddressBook
+ * 
+ * @author OpenInviter
+ * @version 1.6.5
+ */
+class zapak extends openinviter_base
+	{
+	private $login_ok=false;
+	public $showContacts=true;
+	protected $timeout=30;
+	public $debug_array=array(
+			 'initial_get'=>'uid',
+	    	 'login_post'=>'msgid',
+	    	 'url_adress'=>'onclick'
+	    	);
+	
+	/**
+	 * Login function
+	 * 
+	 * Makes all the necessary requests to authenticate
+	 * the current user to the server.
+	 * 
+	 * @param string $user The current user.
+	 * @param string $pass The password for the current user.
+	 * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
+	 */
+	public function login($user,$pass)
+		{
+		$this->resetDebugger();
+		$this->service='zapakmail';
+		$this->service_user=$user;
+		$this->service_password=$pass;
+		if (!$this->init()) return false;
+	
+		$res=$this->get("http://www.zapak.com/zapakmail.zpk",true);
+		if ($this->checkResponse('initial_get',$res))
+			$this->updateDebugBuffer('initial_get',"http://www.zapak.com/zapakmail.zpk",'GET');
+		else 
+			{
+			$this->updateDebugBuffer('initial_get',"http://www.zapak.com/zapakmail.zpk",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$form_action="http://www.zapak.com/authenticateuser.zpk?redirect=/emailr.zpk? ";  
+		$post_elements=array('uid'=>$user,
+							 'password'=>$pass,
+							 'Submit32.x'=>rand(10,50),
+							 'Submit32.y'=>rand(10,50),
+							 'isemail'=>'y',
+							 'regflag'=>1
+							 );
+		$res=$this->post($form_action,$post_elements,true);
+		if ($this->checkResponse('login_post',$res))	
+			$this->updateDebugBuffer('login_post',"$form_action",'POST',true,$post_elements);
+		else
+			{
+			$this->updateDebugBuffer('login_post',"$form_action",'POST',false,$post_elements);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+
+		$url_address='http://www.zapak.com/mc.zpk';
+		$this->login_ok=$url_address;
+		return true;	
+		}
+	
+	/**
+	 * Get the current user's contacts
+	 * 
+	 * Makes all the necesarry requests to import
+	 * the current user's contacts
+	 * 
+	 * @return mixed The array if contacts if importing was successful, FALSE otherwise.
+	 */	
+	public function getMyContacts()
+		{
+		if (!$this->login_ok)
+			{
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+		else
+			$url=$this->login_ok;
+		//go to url inbox
+		$res=$this->get($url,true);
+		if ($this->checkResponse("url_adress",$res))
+			$this->updateDebugBuffer('url_adress',"{$url}",'GET');
+		else
+			{ 
+			$this->updateDebugBuffer('url_adress',"{$url}",'GET',false);
+			$this->debugRequest();
+			$this->stopPlugin();
+			return false;
+			}
+			
+		$contacts=array();
+		$doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
+		$xpath=new DOMXPath($doc);$query="//a[@onclick]";$data=$xpath->query($query);
+		foreach($data as $node) 
+			{
+			if ($node->nodeValue=='Edit')
+				{ 
+				$emails=str_replace('firstname=',"",str_replace("lastname=","",str_replace("email=","",$this->getElementString((string)$node->getAttribute('onclick'),'?','&id'))));
+				$emails_array=explode("&",$emails);
+				$name=(isset($emails_array[0])?$emails_array[0]:false)." ".(isset($emails_array[1])?$emails_array[1]:false);
+				if ($emails_array[2]) 
+					$contacts[$emails_array[2]]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$emails_array[2]);
+				}
+			}
+		foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
+		return $this->returnContacts($contacts);
+		}
+	
+	/**
+	 * Terminate session
+	 * 
+	 * Terminates the current user's session,
+	 * debugs the request and reset's the internal 
+	 * debudder.
+	 * 
+	 * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
+	 */	
+	public function logout()
+		{
+		if (!$this->checkSession()) return false;
+		echo $res=$this->get("http://www.zapak.com/mlor.z?zmail=y",true);
+		$this->debugRequest();
+		$this->resetDebugger();
+		$this->stopPlugin();
+		return true;
+		}
+				
+	}
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/postinstall.php.ignore b/plugins/contact_importer/OpenInviter/postinstall.php.ignore
new file mode 100755
index 0000000000000000000000000000000000000000..7768b22124eab5e025d665826ce991553bad5306
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/postinstall.php.ignore
@@ -0,0 +1,212 @@
+<?php
+set_time_limit(0);
+$rewrite_config=false;
+include('config.php');
+
+function row2text($row)
+	{
+	$text='';
+	$flag=0;
+	$i=0;
+	foreach ($row as $var=>$val)
+		{
+		if($flag==1)
+			$text.=", ";
+		elseif($flag==2)
+			$text.=",\n";
+		$flag=1;
+		//Variable
+		if(is_numeric($var))
+			if($var{0}=='0')
+				$text.="'$var'=>";
+			else
+				{
+				if($var!==$i)
+					$text.="$var=>";
+				$i=$var;
+				}
+		else
+			$text.="'$var'=>";
+		$i++;
+		//letter
+		if(is_array($val))
+			{
+			$text.="array(".row2text($val).")";
+			$flag=2;
+			}
+		else
+			$text.="\"$val\"";
+		}
+	return($text);
+	}
+
+function display_message($msg)
+	{
+	global $contents;
+	$contents.=$msg;
+	echo $msg;
+	}
+
+function check_cache()
+	{
+	if (file_exists('postinstall_results.res'))
+		if (time()-filemtime('postinstall_results.res')<120) { echo file_get_contents('postinstall_results.res'); exit; }
+	}
+
+check_cache();
+$contents='';
+
+//Check username and private key
+display_message("Checking username and private key... ");
+if (empty($openinviter_settings['username']) OR empty($openinviter_settings['private_key']))
+	{
+	display_message("Username or private key missing.Get your own at <a href='http://openinviter.com/register.php'>OpenInviter</a><br>\n");
+	exit;
+	}
+else display_message("*OK*<br>\n");
+
+//Check PHP version
+display_message("Checking PHP version... ");
+if (version_compare(PHP_VERSION, '5.0.0', '<')) { display_message("*NOT OK* - OpenInviter requires PHP5, your server has PHP ".PHP_VERSION." installed");exit; }
+else display_message("*OK*<br>\n");
+
+//Check support for DOMDocument
+display_message("Checking DOMDocument support... ");
+if (!extension_loaded('dom') OR !class_exists('DOMDocument')) { display_message("*NOT OK* - OpenInviter will not run correctly on this system.");exit; }
+else display_message("*OK*<br>\n");
+
+//Check transport type
+$transport='curl';
+display_message("Checking transport method... ");
+if (!extension_loaded('curl') OR !function_exists('curl_init'))
+	{
+	$transport='wget';
+	passthru("wget --version",$return_var);
+	if ($return_var!=0)
+		{
+		display_message("Neither <b>libcurl</b> nor <b>wget</b> is installed.<br>\nYou will not be able to use OpenInviter.");
+		exit;
+		}
+	else display_message("<b>wget</b> is installed. Using <b>Wget</b> to handle requests<br>\n");
+	}
+else display_message("<b>libcurl</b> is installed. Using <b>cURL</b> to handle requests<br>\n");
+if ($openinviter_settings['transport']!=$transport) { $rewrite_config=true;$openinviter_settings['transport']=$transport; }
+
+//Check if stats are available
+if (!extension_loaded('SQLite') OR !function_exists('sqlite_open'))
+	{
+	$stats=false;
+	display_message("<b>SQLite</b> is NOT installed. Unable to keep stats<br>\n");
+	}
+else
+	{
+	$stats=true;
+	display_message("<b>SQLite</b> is installed. Stats enabled. Please define a stats username and password in config.php<br>\n");
+	}
+if ($openinviter_settings['stats']!=$stats) { $rewrite_config=true;$openinviter_settings['stats']=$stats; }
+
+//Check permisions
+$cookie_path='/tmp';
+display_message("Checking write permisions... ");
+if (!is_writable("{$cookie_path}"))
+	{
+	$cookie_path = session_save_path();
+	if (strpos ($cookie_path, ";") !== FALSE)
+		$cookie_path = substr ($cookie_path, strpos ($cookie_path, ";")+1);
+	if (empty($cookie_path)) $cookie_path='/tmp';
+	if (!is_writable("{$cookie_path}"))
+		{
+		display_message("The <b>{$cookie_path}</b> folder is not writable. You will have to manually define a location for logs and temporary files in <b>config.php</b><br>\n");
+		exit;
+		}
+	else display_message("<b>{$cookie_path}</b> is writable. Using <b>{$cookie_path}</b> to store cookie files and logs<br>\n");
+	}
+else display_message("<b>{$cookie_path}</b> is writable. Using <b>{$cookie_path}</b> to store cookie files and logs<br>\n");
+if ($openinviter_settings['cookie_path']!=$cookie_path) { $rewrite_config=true;$openinviter_settings['cookie_path']=$cookie_path; }
+
+//Write new config file if required
+if ($rewrite_config)
+	{
+	$file_contents="<?php\n";
+	$file_contents.="\$openinviter_settings=array(\n".row2text($openinviter_settings).");\n";
+	$file_contents.="?>";
+	file_put_contents('config.php',$file_contents);
+	}
+
+//Instantiate OpenInviter
+include('openinviter.php');
+$inviter=new OpenInviter();
+
+class PostInstall extends OpenInviter_Base
+	{
+	public function login($user,$pass)
+		{
+		return;
+		}
+	public function getMyContacts()
+		{
+		return;
+		}
+	public function logout()
+		{
+		return;
+		}
+	public function checkVersion()
+		{
+		$this->init();
+		$res=$this->get("http://update.openinviter.com/updater/check_version.php?key={$this->settings['private_key']}");
+		$this->stopPlugin();
+		return $res;
+		}
+	public function check($url)
+		{
+		$this->init();
+		$res=$this->get($url);
+		$this->stopPlugin();
+		if (empty($res)) return false; else return true;
+		}
+	}
+
+$checker=new PostInstall();
+$checker->settings=$inviter->settings;
+$checker->service_user='postInstall';
+$checker->service_pass='postInstall';
+$checker->service='postInstall';
+
+//Check version
+display_message("Checking for new versions of OpenInviter... ");
+$xml=$checker->checkVersion();
+libxml_use_internal_errors(true);
+$parsed_xml=simplexml_load_string($xml);
+libxml_use_internal_errors(false);
+if (!$parsed_xml)
+	display_message("Could not connect to server<br>\n");
+else
+	{
+	$server_version=(string)$parsed_xml;
+	$version=$inviter->getVersion();
+	if (!$inviter->checkVersion($server_version)) display_message("You are using OpenInviter <b>{$version}</b> but version <b>{$server_version}</b> is available for download - <a href='http://openinviter.com/download.php'>Download newer version</a><br>\n");
+	else display_message("Your OpenInviter software is up-to-date<br>\n");
+	}
+
+//Check plugins
+if ($openinviter_settings['hosted'])
+	{
+	display_message("Running in `Hosted` mode...");
+	display_message("Checking OpenInviter Hosted Solution server...");
+	if ($checker->check('http://hosted.openinviter.com')) display_message("*OK*<br>\n"); else display_message("*NOT OK* - You might not be able to use the OpenInviter Hosted Solution");
+	}
+else
+	{
+	$plugins=$inviter->getPlugins();
+	foreach ($plugins as $type=>$dummy)
+		foreach ($dummy as $plugin=>$details)
+			{
+			display_message("Checking {$details['name']}... ");
+			if ($checker->check($details['check_url'])) display_message("*OK*<br>\n"); else display_message("*NOT OK* - This plugin might not work correctly on your system<br>\n");
+			}
+	}
+
+display_message("<br><b>WARNING:</b> Delete postinstall.php before running OpenInviter. Also please note that you cannot run postinstall.php again for 2 minutes.");
+file_put_contents('postinstall_results.res',$contents);
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/postinstall_results.res b/plugins/contact_importer/OpenInviter/postinstall_results.res
new file mode 100755
index 0000000000000000000000000000000000000000..b56928c6a802128a5414dfc9c0fff6b9488510b8
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/postinstall_results.res
@@ -0,0 +1,111 @@
+Checking username and private key... *OK*<br>
+Checking PHP version... *OK*<br>
+Checking DOMDocument support... *OK*<br>
+Checking transport method... <b>libcurl</b> is installed. Using <b>cURL</b> to handle requests<br>
+<b>SQLite</b> is NOT installed. Unable to keep stats<br>
+Checking write permisions... <b>C:\WINDOWS\Temp</b> is writable. Using <b>C:\WINDOWS\Temp</b> to store cookie files and logs<br>
+Checking for new versions of OpenInviter... Your OpenInviter software is up-to-date<br>
+Checking Abv... *OK*<br>
+Checking AOL... *OK*<br>
+Checking Apropo... *OK*<br>
+Checking Atlas... *OK*<br>
+Checking Aussiemail... *OK*<br>
+Checking Azet... *OK*<br>
+Checking Bigstring... *OK*<br>
+Checking Bordermail... *OK*<br>
+Checking Canoe... *NOT OK* - This plugin might not work correctly on your system<br>
+Checking Care2... *OK*<br>
+Checking Clevergo... *OK*<br>
+Checking Doramail... *OK*<br>
+Checking Evite... *OK*<br>
+Checking FastMail... *OK*<br>
+Checking 5Fm... *OK*<br>
+Checking Freemail... *OK*<br>
+Checking Gawab... *OK*<br>
+Checking GMail... *OK*<br>
+Checking GMX.net... *OK*<br>
+Checking Grafitti... *OK*<br>
+Checking Live/Hotmail... *OK*<br>
+Checking Hushmail... *OK*<br>
+Checking Inbox.com... *OK*<br>
+Checking India... *OK*<br>
+Checking IndiaTimes... *OK*<br>
+Checking Inet... *OK*<br>
+Checking Interia... *OK*<br>
+Checking KataMail... *OK*<br>
+Checking Kids... *OK*<br>
+Checking Libero... *OK*<br>
+Checking LinkedIn... *OK*<br>
+Checking Lycos... *OK*<br>
+Checking Mail2World... *OK*<br>
+Checking Mail.com... *OK*<br>
+Checking Mail.in... *OK*<br>
+Checking Mail.ru... *OK*<br>
+Checking Meta... *OK*<br>
+Checking Mynet.com... *OK*<br>
+Checking Netaddress... *OK*<br>
+Checking Nz11... *OK*<br>
+Checking O2... *OK*<br>
+Checking OperaMail... *OK*<br>
+Checking Pochta... *OK*<br>
+Checking Popstarmail... *OK*<br>
+Checking Rambler... *OK*<br>
+Checking Rediff... *OK*<br>
+Checking Sapo.pt... *OK*<br>
+Checking Techemail... *OK*<br>
+Checking Terra... *OK*<br>
+Checking Uk2... *OK*<br>
+Checking Virgilio... *OK*<br>
+Checking Walla... *OK*<br>
+Checking Web.de... *OK*<br>
+Checking Wp.pt... *OK*<br>
+Checking Yahoo!... *OK*<br>
+Checking Yandex... *OK*<br>
+Checking YouTube... *OK*<br>
+Checking Zapakmail... *OK*<br>
+Checking Badoo... *OK*<br>
+Checking Bebo... *OK*<br>
+Checking Bookcrossing... *OK*<br>
+Checking Brazencareerist... *OK*<br>
+Checking Cyworld... *OK*<br>
+Checking Eons... *OK*<br>
+Checking Facebook... *OK*<br>
+Checking Faces... *OK*<br>
+Checking Famiva... *OK*<br>
+Checking Fdcareer... *OK*<br>
+Checking Flickr... *OK*<br>
+Checking Flingr... *NOT OK* - This plugin might not work correctly on your system<br>
+Checking Flixster... *OK*<br>
+Checking Friendfeed... *OK*<br>
+Checking Friendster... *OK*<br>
+Checking Hi5... *OK*<br>
+Checking Hyves... *OK*<br>
+Checking Kincafe... *OK*<br>
+Checking Konnects... *OK*<br>
+Checking Koolro... *OK*<br>
+Checking Last.fm... *OK*<br>
+Checking Livejournal... *OK*<br>
+Checking Lovento... *NOT OK* - This plugin might not work correctly on your system<br>
+Checking Meinvz... *OK*<br>
+Checking Mevio... *OK*<br>
+Checking Motortopia... *OK*<br>
+Checking Multiply... *OK*<br>
+Checking Mycatspace... *OK*<br>
+Checking Mydogspace... *OK*<br>
+Checking MySpace... *OK*<br>
+Checking NetLog... *OK*<br>
+Checking Ning... *OK*<br>
+Checking Orkut... *OK*<br>
+Checking Perfspot... *OK*<br>
+Checking Plaxo... *OK*<br>
+Checking Plazes... *OK*<br>
+Checking Plurk... *OK*<br>
+Checking Skyrock... *OK*<br>
+Checking Tagged... *OK*<br>
+Checking Twitter... *OK*<br>
+Checking Vimeo... *OK*<br>
+Checking Vkontakte... *NOT OK* - This plugin might not work correctly on your system<br>
+Checking Xanga... *NOT OK* - This plugin might not work correctly on your system<br>
+Checking Xing... *NOT OK* - This plugin might not work correctly on your system<br>
+Checking Xuqa... *NOT OK* - This plugin might not work correctly on your system<br>
+<br><b>WARNING:</b> Delete postinstall.php before running OpenInviter. Also please note that you cannot run postinstall.php again for 2 minutes.
\ No newline at end of file
diff --git a/plugins/contact_importer/OpenInviter/stats.php b/plugins/contact_importer/OpenInviter/stats.php
new file mode 100755
index 0000000000000000000000000000000000000000..96ccd9441ddcd3bdbfedcd56674e32924ccd63e1
--- /dev/null
+++ b/plugins/contact_importer/OpenInviter/stats.php
@@ -0,0 +1,85 @@
+<?php
+/*
+ * Created on Jul 16, 2009
+ *
+ * Owner: George
+ */
+include('openinviter.php');
+$oi=new OpenInviter();
+if (!$oi->settings['stats']) { echo 'Stats not enabled.';exit; }
+if (empty($oi->settings['stats_user']) OR empty($oi->settings['stats_password'])) { header('HTTP/1.0 401 Unauthorized');echo 'Stats username/password not defined';exit; }
+elseif (!isset($_SERVER['PHP_AUTH_USER']))
+	{
+    header('WWW-Authenticate: Basic realm="OpenInviter Stats"');
+    header('HTTP/1.0 401 Unauthorized');
+    echo 'Wrong username/password';
+    exit;
+	}
+else
+	{
+	if ($_SERVER['PHP_AUTH_USER']!=$oi->settings['stats_user'] OR $_SERVER['PHP_AUTH_PW']!=$oi->settings['stats_password']) 
+		{
+    	header('HTTP/1.0 401 Unauthorized');
+    	echo 'Wrong username/password';
+    	exit;
+    	}
+	}
+
+if (isset($_GET['op']))
+	if ($_GET['op']=='reset')
+		{
+		$oi->statsQuery("DELETE FROM oi_imports");
+		$oi->statsQuery("DELETE FROM oi_messages");
+		}
+
+$plugins=$oi->getPlugins();
+$import_stats=array();$messages_stats=array();
+$res=$oi->statsQuery("SELECT COUNT(id) AS total_imports,SUM(contacts) AS total_contacts,service FROM oi_imports GROUP BY service ORDER BY total_imports DESC,total_contacts DESC");
+while ($row=sqlite_fetch_array($res)) $import_stats[$row['service']]=$row;
+$res=$oi->statsQuery("SELECT COUNT(id) AS total_sends,SUM(messages) AS total_messages,service FROM oi_messages GROUP BY service");
+while ($row=sqlite_fetch_array($res)) $messages_stats[$row['service']]=$row;
+echo "<style>
+.tableDesc{ color:#3d3d3d;font-family:Arial, Helvetica, sans-serif;font-weight:normal;font-size:12px;text-decoration:none; }
+.tableDesc td{ text-align:center; }
+.table{ border:1px solid #e1e1e1;padding:1px 1px 1px 1px;font-family:Arial, Helvetica, sans-serif;font-weight:normal;font-size:11px; }
+.table td { padding:5px; }
+.tableFooter{ height:30px;text-align:center;font-family:Arial, Helvetica, sans-serif;font-size:14px;color:#000000;font-weight:600;background-color:#C7DEE6; }
+.tableFooter td{ text-align:center; }
+.tableHeader{ background-color:#5fb52b;height:21px;font-family:Arial, Helvetica, sans-serif;font-size:12px;color:#FFFFFF;font-weight:bold;text-decoration:none;text-align:left;vertical-align:middle;padding-left:10px; }
+.tableHeader td{ text-align:center; }
+.tableOddRow{ background-color:#eaeaea;height:32px; }
+.tableEvenRow{ background-color:#f5f5f5;height:32px; }
+.title{ color:#89BDF6; } 
+body{ background-color:#F4F3EF; }
+a{ color:#FF7E00;font-family:Arial, Helvetica, sans-serif;font-weight:bold;font-size:14px; }
+</style>";
+echo "<center><h1 class='title'>OpenInviter Stats</h1></center>";
+echo "<table class='table' align='center' cellspacing='0' cellpadding='0' width='500'>
+	<tr class='tableHeader'><td colspan='5'>OpenInviter Statistics</td></tr>";
+if (!empty($import_stats))
+	{
+	echo "<tr class='tableDesc'><td>Service</td><td>Users who imported contacts</td><td>Contacts imported</td><td>Users who sent messages</td><td>Messages sent</td></tr>";
+	$total_imports=0;$total_contacts=0;$total_sends=0;$total_messages=0;$odd=true;
+	foreach ($import_stats as $service=>$details)
+		{
+		$total_imports+=$details['total_imports'];
+		$total_contacts+=$details['total_contacts'];
+		echo "<tr class='".($odd?'tableOddRow':'tableEvenRow')."'><td><b>".(isset($plugins['email'][$service])?$plugins['email'][$service]['name']:(isset($plugins['social'][$service])?$plugins['social'][$service]['name']:$service))."</b></td><td align='center'>{$details['total_imports']}</td><td align='center'>{$details['total_contacts']}</td>";
+		if (isset($messages_stats[$service]))
+			{
+			$total_sends+=$messages_stats[$service]['total_sends'];
+			$total_messages+=$messages_stats[$service]['total_messages'];
+			echo "<td align='center'>{$messages_stats[$service]['total_sends']}</td><td align='center'>{$messages_stats[$service]['total_messages']}</td>";
+			}
+		else echo "<td align='center'>-</td><td align='center'>-</td>";
+		echo "</tr>";
+		$odd=!$odd;
+		}
+	echo "<tr class='tableFooter'><td>Total</td><td>{$total_imports}</td><td>{$total_contacts}</td><td>{$total_sends}</td><td>{$total_messages}</td></tr>
+	</table>
+	<br><center><a href='?op=reset'>Reset statistics</a></center>";
+	}
+else
+	echo "<tr class='tableOddRow'><td colspan='5' style='padding:25px;' align='center'>There are no statistics available yet</td></tr></table>";
+echo "<br><center><a target='_blank' href='http://openinviter.com' title='Powered by OpenInviter.com'><img src='http://openinviter.com/images/banners/banner_blue_1.gif' alt='Powered by OpenInviter.com' style='border:none;'></a></center>";
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/ReadMe.txt b/plugins/contact_importer/ReadMe.txt
new file mode 100755
index 0000000000000000000000000000000000000000..18f9b0c4f3c0b71f165608b3bcb5ae34a97f6cf5
--- /dev/null
+++ b/plugins/contact_importer/ReadMe.txt
@@ -0,0 +1,29 @@
+
+/**
+ * Contact Importer Plugin (using OpenInviter)
+ *
+ * @package ElggContactImporter
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Prashant Juvekar
+ * @copyright SocialTrak, 2009
+ * @link http://www.socialtrak.com
+ */
+
+This module wraps the OpenInviter PHP library and provides 
+a friendly interface for Elgg installations to add the import
+capability. We have exposed only a handful of supported 
+plugins in the form since these were known to work at the 
+time of implementation as well as were considered important.
+You can tweak the code to add more plugin support.
+
+This module was developed and is used at www.socialtrak.com
+for the purpose of allowing users to invite their friends 
+from other social networks as well as by importing their 
+webmail address books.
+
+Right now, the message sent is hardcoded in but one could 
+provide a textbox to collect message from the user to tack
+onto the default message. 
+
+Feel free to report bugs or requests to admin@socialtrak.com
+
diff --git a/plugins/contact_importer/import.php b/plugins/contact_importer/import.php
new file mode 100755
index 0000000000000000000000000000000000000000..618c2bcbcd8fed1e7105bd5683eacfd2b15252ad
--- /dev/null
+++ b/plugins/contact_importer/import.php
@@ -0,0 +1,322 @@
+<?php
+
+    /**
+    * Contact Importer Plugin (using OpenInviter)
+    *
+    * @package ElggContactImporter
+    * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+    * @author Prashant Juvekar
+    * @copyright SocialTrak, 2009
+    * @link http://www.socialtrak.com
+    */
+
+	require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+	
+	global $CONFIG;
+		
+	gatekeeper();
+	
+	set_context('friends');
+	set_page_owner($_SESSION['guid']);
+	
+	//set the title
+	$body = elgg_view_title(elgg_echo('contact_importer:title'));
+
+	$body .= "<div style='padding:10px;'>";
+
+	// setup some defaults
+	$oi_provider = $_POST['oi_provider'];
+	if ( $oi_provider == null || empty($oi_provider) ) {
+		$oi_provider = "gmail";
+	}
+	$oi_username = $_POST['oi_username'];
+	$oi_password = $_POST['oi_password'];
+	$oi_session_id = $_POST['oi_session_id'];
+
+	// include and initialize openinviter	
+	global $CONFIG;
+	include ( $CONFIG->path . 'mod/contact_importer/OpenInviter/openinviter.php');
+	$inviter=new OpenInviter();
+	$oi_services=$inviter->getPlugins();
+
+	// lookup the provider name
+	foreach ($oi_services as $type=>$providers)	{
+		foreach ($providers as $provider=>$details) {
+			if ( $oi_provider == $provider ) {
+				$oi_provider_name = $details['name'];
+			}
+		}
+	}
+
+	function get_web_mails () {
+		return array (
+			'aol' => 'AOL',
+			'gmail' => 'GMail',
+			'hotmail' => 'Live/Hotmail',
+			'yahoo' => 'Yahoo!',
+		);
+	}
+	
+	function get_social_networks () {
+		return array (
+			'facebook' => 'Facebook',
+			'linkedin' => 'LinkedIn',
+			'twitter_ex' => 'Twitter',
+			'orkut' => 'Orkut',
+		);
+	}
+
+	function echo_OpenInviter_Inputs_form ($oi_services, $oi_provider, $oi_username) {
+
+		$body  = "<form action='' method='POST' name='OpenInviter_Inputs'>";
+		$body .= "<table>";
+
+		$body .= "<tr>";
+		$body .= "<td style='width:150px'><label>".elgg_echo('contact_importer:choose_provider')."</label></td>";
+
+		$body .= "<td>";
+		foreach ( get_web_mails() as $provider => $details )	
+		{
+			if ( $oi_provider == $provider ) {
+				$body .= "<input type='radio' name='oi_provider' value='{$provider}' checked='checked'>&nbsp;&nbsp;{$details}</input><br />";
+			} else {
+				$body .= "<input type='radio' name='oi_provider' value='{$provider}'>&nbsp;&nbsp;{$details}</input><br />";
+			}
+		}
+		$body .= "<br />";
+		foreach ( get_social_networks() as $provider => $details )	
+		{
+			if ( $oi_provider == $provider ) {
+				$body .= "<input type='radio' name='oi_provider' value='{$provider}' checked='checked'>&nbsp;&nbsp;{$details}</input><br />";
+			} else {
+				$body .= "<input type='radio' name='oi_provider' value='{$provider}'>&nbsp;&nbsp;{$details}</input><br />";
+			}
+		}
+		$body .= "<br /";
+		$body .= "</td>";
+
+		$body .= "</tr>";
+
+		$body .= "<tr>";
+		$body .= "<td><label>".elgg_echo('contact_importer:username')."</label></td>";
+		$body .= "<td><input type='text' name='oi_username' value='{$oi_username}' / ></td>";
+		$body .= "</tr>";
+
+		$body .= "<tr>";
+		$body .= "<td><label>".elgg_echo('contact_importer:password')."</label></td>";
+		$body .= "<td><input type='password' name='oi_password' / ></td>";
+		$body .= "<td style='color:red;font-size:11px'>".elgg_echo('contact_importer:password:disclaimer').".</td>";
+		$body .= "</tr>";
+
+		$body .= "</table>";
+		
+		$body .= "<input type='submit' name='submit' value='".elgg_echo('contact_importer:submit')."' />";
+		$body .= "<input type='hidden' name='oi_step' value='Inputs' />";
+		
+		$body .= "</form>";	
+		
+		return $body;
+	}
+
+	function echo_OpenInviter_Invite_form ($oi_provider, $oi_provider_name, $oi_username, $oi_contacts, $oi_session_id) {
+
+		$body .= 
+			"<script type='text/javascript'>
+				function selectAll(count,which) 
+				{
+					for( z=1; z<=count; z++ )
+					{
+						var check_obj = document.getElementById('check_'+z)
+						if ( check_obj ) {
+							check_obj.checked = which;
+						}
+	   				}
+				}
+			</script>";
+	
+		$body .= "<form action='' method='POST' name='OpenInviter_Invite'>";
+		if (count($oi_contacts)==0)
+		{
+			$body .= "<table class='contactImportTable'>";
+			$body .= "<H2>".sprintf(elgg_echo('contact_importer:contacts'),$oi_provider_name)."</H2>";
+			$body .= "<tr class='contactImportTableOddRow'>";
+			$body .= "<td align='center' style='padding:20px;' colspan='".($plugType=='email'? "3":"2")."'>";
+			$body .= "<label class='OpenInviter_Error'>".elgg_echo('contact_importer:nocontacts')."</label>";
+			$body .= "</td>";
+			$body .= "</tr>";
+			$body .= "</table>";
+		}
+		else
+		{
+			$body .= "<input type='submit' name='send' value='".elgg_echo('contact_importer:send_invites')."' class='thButton'>" . "&nbsp;&nbsp";
+			$body .= "<H2>".sprintf(elgg_echo('contact_importer:contacts2'),$oi_provider_name,count($oi_contacts))."</H2>";
+			$body .= "<a href='javascript:none(0)' onclick='selectAll(".count($oi_contacts).",true)'>".elgg_echo('contact_importer:select_all')."</a>" . "&nbsp;&nbsp";
+			$body .= "<a href='javascript:none(0)' onclick='selectAll(".count($oi_contacts).",false)'>".elgg_echo('contact_importer:unselect_all')."</a>";
+			$body .= "<table class='contactImportTable'>";
+			$body .= "<tr class='contactImportTableDesc'>";
+			$body .= "<td style='font-weight:bold'>".elgg_echo('contact_importer:invite')."</td>";
+			$body .= "<td style='font-weight:bold'>".elgg_echo('contact_importer:name')."</td>".($plugType == 'email' ?"<td style='font-weight:bold'>E-mail</td>":"")."</tr>";
+			$odd=true;$counter=0;
+			foreach ($oi_contacts as $email=>$name)
+			{
+				$counter++;
+				if ($odd) {
+					$class='contactImportTableOddRow'; 
+				} else {
+					$class='contactImportTableEvenRow';
+				}
+				$body .= "<tr class='{$class}'>";
+				$body .= "<td><input name='check_{$counter}' id='check_{$counter}' value='{$counter}' type='checkbox' class='thCheckbox' checked>";
+				$body .= "<input type='hidden' name='email_{$counter}' value='{$email}'>";
+				$body .= "<input type='hidden' name='name_{$counter}' value='{$name}'>";
+				$body .= "</td><td>{$name}</td>".($plugType == 'email' ?"<td>{$email}</td>":"")."</tr>";
+				$odd=!$odd;
+			}
+			$body .= "</table>";
+			$body .= "<a href='javascript:none(0)' onclick='selectAll(".count($oi_contacts).",true)'>".elgg_echo('contact_importer:select_all')."</a>" . "&nbsp;&nbsp";
+			$body .= "<a href='javascript:none(0)' onclick='selectAll(".count($oi_contacts).",false)'>".elgg_echo('contact_importer:unselect_all')."</a><br />";
+			$body .= "<input type='submit' name='send' value='".elgg_echo('contact_importer:send_invites')."' class='thButton'>" . "&nbsp;&nbsp";
+
+			$body .= "<input type='hidden' name='oi_step' value='Invite' />";
+			$body .= "<input type='hidden' name='oi_provider' value='{$oi_provider}'>";
+			$body .= "<input type='hidden' name='oi_username' value='{$oi_username}'>";
+			$body .= "<input type='hidden' name='oi_session_id' value='{$oi_session_id}'>";
+		}
+		$body .= "</form>";
+		
+		return $body;
+	}
+	
+	function ers($ers)
+	{
+		if (!empty($ers))
+		{
+			$contents="<table cellspacing='0' cellpadding='0' style='border:1px solid red;' align='center' class='tbErrorMsgGrad'><tr><td valign='middle' style='padding:3px' valign='middle' class='tbErrorMsg'><img src='/images/ers.gif'></td><td valign='middle' style='color:red;padding:5px;'>";
+			foreach ($ers as $key=>$error)
+				$contents.="{$error}<br >";
+			$contents.="</td></tr></table><br >";
+			return $contents;
+		}
+	}
+		
+	function oks($oks)
+	{
+		if (!empty($oks))
+		{
+			$contents="<table border='0' cellspacing='0' cellpadding='10' style='border:1px solid #5897FE;' align='center' class='tbInfoMsgGrad'><tr><td valign='middle' valign='middle' class='tbInfoMsg'><img src='/images/oks.gif' ></td><td valign='middle' style='color:#5897FE;padding:5px;'>	";
+			foreach ($oks as $key=>$msg)
+				$contents.="{$msg}<br >";
+			$contents.="</td></tr></table><br >";
+			return $contents;
+		}
+	}
+
+	if ( !isset($_POST['oi_step']) ) {
+	
+		$body .= echo_OpenInviter_Inputs_form($oi_services, $oi_provider, $oi_username);
+		
+	} else if ( $_POST['oi_step'] == "Inputs" ) {
+
+		$ers=array();$oks=array();$import_ok=false;$done=false;
+		$inviter->startPlugin($oi_provider);
+		$internal=$inviter->getInternalError();
+		if ($internal) 
+		{
+			$body .= echo_OpenInviter_Inputs_form($oi_services, $oi_provider, $oi_username);
+			$body .= "<label class='OpenInviter_Error'>" . $internal . "</label>";
+		}
+		elseif (!$inviter->login($oi_username,$oi_password))
+		{
+			$body .= echo_OpenInviter_Inputs_form($oi_services, $oi_provider, $oi_username);
+			$internal=$inviter->getInternalError();
+			if ( $internal )
+				$body .= "<label class='OpenInviter_Error'>" . $internal . "</label>";
+			else
+				$body .= "<label class='OpenInviter_Error'>" . elgg_echo('contact_importer:login_failed') . "</label>";
+		}
+		elseif (false===$contacts=$inviter->getMyContacts())
+		{
+			$body .= echo_OpenInviter_Inputs_form($oi_services, $oi_provider, $oi_username);
+			$body .= "<label class='OpenInviter_Error'>" . elgg_echo('contact_importer:contact_err') . "</label>";
+		}
+		else
+		{
+			// success -> show the contacts
+			$body .= echo_OpenInviter_Invite_form ($oi_provider, $oi_provider_name, $oi_username, $contacts, $inviter->plugin->getSessionID());
+		}
+
+	} else if ( $_POST['oi_step'] == "Invite" ) {
+		$inviter->startPlugin($oi_provider);
+		$internal=$inviter->getInternalError();
+		if ($internal) 
+		{
+			$body .= echo_OpenInviter_Inputs_form($oi_services, $oi_provider, $oi_username);
+			$body .= "<label class='OpenInviter_Error'>" . $internal . "</label>";
+		}
+		else
+		{
+			$selected_contacts=array(); $invitee_list="";
+			foreach ($_POST as $key=>$val) {
+				if (strpos($key,'check_')!==false) {
+					$selected_contacts[$_POST['email_'.$val]]=$_POST['name_'.$val];
+					$invitee_list .= "&nbsp;&nbsp;&nbsp;&nbsp;- " . $_POST['name_'.$val] . "<br />";
+				} elseif (strpos($key,'email_')!==false) {
+					$temp=explode('_',$key);$counter=$temp[1];
+					if (is_numeric($temp[1])) $contacts[$val]=$_POST['name_'.$temp[1]];
+				}
+			}
+			if (count($selected_contacts)==0) {
+				$body .= "<label class='OpenInviter_Error'>" . elgg_echo('contact_importer:contacts_sel_err') . "</label>";
+			} else {
+
+				// Compose the message
+				$message['subject'] = 
+					sprintf(
+						elgg_echo ('contact_importer:email:subject'),
+						$CONFIG->site->name
+					);
+				$message['body'] = 
+					sprintf(
+						elgg_echo ('contact_importer:email:mailbody'),
+						$CONFIG->site->name,
+						$_SESSION['user']->name,
+						$CONFIG->wwwroot
+					);
+
+				$sendMessage=$inviter->sendMessage($oi_session_id,$message,$selected_contacts);
+				$inviter->logout();
+				
+				if ($sendMessage===-1)
+				{
+					$message_subject=$_SESSION['user']->name.": ".$message['subject'];
+					$message_body=$message['body']; 
+					$headers="From: {$_SESSION['user']->email}";
+					foreach ($selected_contacts as $email=>$name) {
+						mail($email,$message_subject,$message_body,$headers);
+					}
+					$body .= "<label class='OpenInviter_Info'>" . elgg_echo('contact_importer:send_success') . "<br />" . $invitee_list . "</label>";
+				}
+				elseif ($sendMessage===false)
+				{
+					$internal=$inviter->getInternalError();
+					if ( $internal ) {
+						$body .= "<label class='OpenInviter_Error'>" . $internal . "</label>";
+					} else {
+						$body .= "<label class='OpenInviter_Error'>" . elgg_echo('contact_importer:send_err') . "</label>";
+					}
+				}
+				else 
+				{
+					$body .= "<label class='OpenInviter_Info'>" . elgg_echo('contact_importer:send_success') . "<br />" . $invitee_list . "</label>";
+				}
+			}
+		}		
+	}
+
+	$body .= "</div>";
+
+	$body = elgg_view_layout('two_column_left_sidebar','',$body);
+	
+	// Finally draw the page
+	page_draw(elgg_echo('contact_importer:title'), $body);
+?>
diff --git a/plugins/contact_importer/languages/en.php b/plugins/contact_importer/languages/en.php
new file mode 100755
index 0000000000000000000000000000000000000000..bd1f1844a8d481e26e09dd49dc700d294ae95b99
--- /dev/null
+++ b/plugins/contact_importer/languages/en.php
@@ -0,0 +1,47 @@
+<?php
+
+    /**
+    * Contact Importer Plugin (using OpenInviter)
+    *
+    * @package ElggContactImporter
+    * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+    * @author Prashant Juvekar
+    * @copyright SocialTrak, 2009
+    * @link http://www.socialtrak.com
+    */
+
+	$english = array(
+
+		'contact_importer:plugin:name' => 'Import Contacts',
+		'contact_importer:title' => 'Import Contacts',
+
+		'contact_importer:email:subject' => 'Invitation to join %s',
+		'contact_importer:email:mailbody' => '
+You have been invited to join %s by %s. 
+To join, click the following link:
+
+	%s',
+
+		'contact_importer:password:disclaimer' => "This password will not be stored by us",
+		'contact_importer:submit' => "Submit",
+		'contact_importer:choose_provider' => "Choose a Provider",
+		'contact_importer:username' => "Enter Username",
+		'contact_importer:password' => "Enter Password",
+		'contact_importer:contacts' => "Your %s contacts",
+		'contact_importer:contacts2' => "Your %s contacts (Found %s)",
+		'contact_importer:nocontacts' => "You do not have any contacts in your address book.",
+		'contact_importer:send_invites' => "Send Invites",
+		'contact_importer:select_all' => "Select All",
+		'contact_importer:unselect_all' => "Unselect All",
+		'contact_importer:invite' => "Invite?",
+		'contact_importer:name' => "Name",
+		'contact_importer:login_failed' => "Login failed. Please check the email and password you have provided and try again.",
+		'contact_importer:contacts_err' => "Unable to get contacts.",
+		'contact_importer:contacts_sel_err' => "You did not select any contacts to invite.",
+		'contact_importer:send_success' => "Invitation emails were sent successfully to the following:",
+		'contact_importer:send_err' => "There were errors while sending your invites.<br>Please try again later!",
+	
+	);
+					
+	add_translation("en",$english);
+?>
\ No newline at end of file
diff --git a/plugins/contact_importer/manifest.xml b/plugins/contact_importer/manifest.xml
new file mode 100755
index 0000000000000000000000000000000000000000..e54fe8f3736ef9f30db73fb9308e92eb4f2c1fa0
--- /dev/null
+++ b/plugins/contact_importer/manifest.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin_manifest>
+<field key="author" value="Prashant Juvekar" />
+<field key="version" value="0.5" />
+<field key="description" value="Import from facebook, twitter, gmail, etc." />
+<field key="website" value="http://www.socialtrak.com/" />
+<field key="copyright" value="(C) Prashant Juvekar 2009" />
+<field key="licence" value="GNU Public License version 2" />
+</plugin_manifest>
diff --git a/plugins/contact_importer/start.php b/plugins/contact_importer/start.php
new file mode 100755
index 0000000000000000000000000000000000000000..dcdc8156e3de9b7b2d23fe9fd574f8c0879e8e47
--- /dev/null
+++ b/plugins/contact_importer/start.php
@@ -0,0 +1,47 @@
+<?php
+
+    /**
+    * Contact Importer Plugin (using OpenInviter)
+    *
+    * @package ElggContactImporter
+    * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+    * @author Prashant Juvekar
+    * @copyright SocialTrak, 2009
+    * @link http://www.socialtrak.com
+    */
+	
+	// Get config
+	global $CONFIG;
+	
+	/**
+	 * Initialisation function
+	 */
+	 
+	 function contact_importer_init() {
+	 
+		// Get config
+		global $CONFIG;
+		
+		// Load the language file
+		register_translations($CONFIG->pluginspath . "contact_importer/languages/");
+	
+		// Load menu for logged in users
+		if ( isloggedin() ) {
+			// Menu options
+			global $CONFIG;
+			if (get_context() == "friends" || 
+				get_context() == "friendsof" || 
+				get_context() == "collections") {
+					add_submenu_item(elgg_echo('contact_importer:plugin:name'),$CONFIG->wwwroot."mod/contact_importer/import.php",'import');
+				}
+		}
+		
+		// Extend CSS
+		extend_view('css', 'contact_importer/css');
+
+	}
+	
+	// Make sure init is called on initialisation
+	register_elgg_event_handler('pagesetup','system','contact_importer_init',1000);
+	
+?>
\ No newline at end of file
diff --git a/plugins/friend_request/actions/approve.php b/plugins/friend_request/actions/approve.php
new file mode 100755
index 0000000000000000000000000000000000000000..1dce1564ace165c43e995b3824791c25d9ee1a5e
--- /dev/null
+++ b/plugins/friend_request/actions/approve.php
@@ -0,0 +1,46 @@
+<?php
+	/**
+	 * Friend request plugin
+	 * Approve a friend request and make connection both ways
+	 * 
+	 * @package friend_request
+	 * @author ColdTrick IT Solutions
+	 * @copyright Coldtrick IT Solutions 2009
+	 * @link http://www.coldtrick.com/
+	 * @version 2.0
+	 */
+
+	action_gatekeeper();
+	gatekeeper();
+	
+	$friend_guid = (int) get_input("guid");
+	$friend = get_user($friend_guid);
+	
+	if(!empty($friend)){
+		$user = get_loggedin_user();
+		
+		if(remove_entity_relationship($friend->guid, 'friendrequest', $user->guid)) {
+			global $CONFIG;
+			
+			if(isset($CONFIG->events['create']['friend'])) {
+				$oldEventHander = $CONFIG->events['create']['friend'];
+				$CONFIG->events['create']['friend'] = array();			//Removes any event handlers
+			}
+			
+			$user->addFriend($friend->guid);
+			$friend->addFriend($user->guid);			//Friends mean reciprical...
+			
+			if(isset($CONFIG->events['create']['friend'])) {
+				$CONFIG->events['create']['friend'] = $oldEventHander;
+			}
+			
+			system_message(sprintf(elgg_echo('friend_request:approve:successful'), $friend->name));
+			// add to river
+			add_to_river('friends/river/create', 'friend', $user->guid, $friend->guid);
+		} else {
+			register_error(sprintf(elgg_echo('friend_request:approve:fail'), $friend->name));
+		}
+	}
+	
+	forward($_SERVER['HTTP_REFERER']);
+?>
\ No newline at end of file
diff --git a/plugins/friend_request/actions/decline.php b/plugins/friend_request/actions/decline.php
new file mode 100755
index 0000000000000000000000000000000000000000..51ca7fb073cb37252ad0f8ecd89f88caa12567fc
--- /dev/null
+++ b/plugins/friend_request/actions/decline.php
@@ -0,0 +1,35 @@
+<?php
+	/**
+	 * Friend request plugin
+	 * Decline a friend request and notify requester
+	 * 
+	 * @package friend_request
+	 * @author ColdTrick IT Solutions
+	 * @copyright Coldtrick IT Solutions 2009
+	 * @link http://www.coldtrick.com/
+	 * @version 2.0
+	 */
+
+	action_gatekeeper();
+	gatekeeper();
+	
+	$friend_guid = (int) get_input("guid");
+	$friend = get_user($friend_guid);
+	
+	if(!empty($friend)){
+		$user = get_loggedin_user();
+		
+		if(remove_entity_relationship($friend->guid, 'friendrequest', $user->guid)) {
+			$subject = sprintf(elgg_echo("friend_request:decline:subject"), $user->name);
+			$message = sprintf(elgg_echo("friend_request:decline:message"), $friend->name, $user->name);
+			
+			notify_user($friend->guid, $user->guid, $subject, $message);
+			
+			system_message(elgg_echo("friend_request:decline:success"));
+		} else {
+			system_message(elgg_echo("friend_request:decline:fail"));
+		}
+	}
+	
+	forward($_SERVER['HTTP_REFERER']);
+?>
\ No newline at end of file
diff --git a/plugins/friend_request/actions/friends/add.php b/plugins/friend_request/actions/friends/add.php
new file mode 100755
index 0000000000000000000000000000000000000000..8bda0afce985675b59029de8a9cb50f59ea964a6
--- /dev/null
+++ b/plugins/friend_request/actions/friends/add.php
@@ -0,0 +1,92 @@
+<?php
+	/**
+	 * Friend request plugin
+	 * This action code is based on the regular friend/add action but with a different relationship type
+	 * 
+	 * @package friend_request
+	 * @author ColdTrick IT Solutions
+	 * @copyright Coldtrick IT Solutions 2009
+	 * @link http://www.coldtrick.com/
+	 * @version 2.0
+	 */
+	
+	//Ensure we're logged in
+	gatekeeper();
+	
+	//Get our data
+	$friend_guid = (int) get_input('friend');
+	$friend = get_user($friend_guid);
+	$user_guid = get_loggedin_userid();
+	$user = get_loggedin_user();
+	
+	$errors = false;
+	
+	//Now we need to attempt to create the relationship
+	if(empty($user) || empty($friend)) {
+		$errors = true;
+		register_error(elgg_echo("friend_request:add:failure"));
+	} else {
+		//New for v1.1 - If the other user is already a friend (fan) of this user we should auto-approve the friend request...
+		if(check_entity_relationship($friend_guid, "friend", $user_guid)) {
+			try {
+				if(isset($CONFIG->events['create']['friend'])) {
+					$oldEventHander = $CONFIG->events['create']['friend'];
+					$CONFIG->events['create']['friend'] = array();			//Removes any event handlers
+				}
+				
+				$user->addFriend($friend_guid);
+				system_message(sprintf(elgg_echo("friends:add:successful"),$friend->name));
+				
+				if(isset($CONFIG->events['create']['friend'])) {
+					$CONFIG->events['create']['friend'] = $oldEventHander;
+				}
+				
+				forward($_SERVER['HTTP_REFERER']);
+			} catch (Exception $e) {
+				register_error(sprintf(elgg_echo("friends:add:failure"),$friend->name));
+				$errors = true;
+			}
+		} elseif(check_entity_relationship($friend_guid, "friendrequest", $user_guid)){
+			// Check if your potential friend already invited you, if so make friends
+			if(remove_entity_relationship($friend_guid, 'friendrequest', $user_guid)){
+				if(isset($CONFIG->events['create']['friend'])) {
+					$oldEventHander = $CONFIG->events['create']['friend'];
+					$CONFIG->events['create']['friend'] = array();			//Removes any event handlers
+				}
+				
+				$user->addFriend($friend->guid);
+				$friend->addFriend($user->guid);			//Friends mean reciprical...
+				
+				if(isset($CONFIG->events['create']['friend'])) {
+					$CONFIG->events['create']['friend'] = $oldEventHander;
+				}
+				
+				system_message(sprintf(elgg_echo('friend_request:approve:successful'), $friend->name));
+				// add to river
+				add_to_river('friends/river/create', 'friend', $user->guid, $friend->guid);
+				
+				forward($_SERVER['HTTP_REFERER']);
+			} else {
+				register_error(sprintf(elgg_echo('friend_request:approve:fail'), $friend->name));
+			}
+		} else {
+			try {
+				$result = add_entity_relationship($user_guid, "friendrequest", $friend_guid);
+				if($result == false) {
+					$errors = true;
+					register_error(sprintf(elgg_echo("friend_request:add:exists"),$friend->name));
+				}
+			} catch(Exception $e) {	//register_error calls insert_data which CAN raise Exceptions.
+				$errors = true;
+				register_error(sprintf(elgg_echo("friend_request:add:exists"),$friend->name));
+			}
+		}
+	}
+	
+	if(!$errors) {
+		system_message(sprintf(elgg_echo("friend_request:add:successful"),$friend->name));
+	}
+	
+	forward($_SERVER['HTTP_REFERER']);
+
+?>
\ No newline at end of file
diff --git a/plugins/friend_request/actions/friends/removefriend.php b/plugins/friend_request/actions/friends/removefriend.php
new file mode 100755
index 0000000000000000000000000000000000000000..7e5cb54d812737673e942c5a9e0f4c7c4c759218
--- /dev/null
+++ b/plugins/friend_request/actions/friends/removefriend.php
@@ -0,0 +1,48 @@
+<?php
+	/**
+	 * Friend request plugin
+	 * Remove friend connection on both sides
+	 * 
+	 * @package friend_request
+	 * @author ColdTrick IT Solutions
+	 * @copyright Coldtrick IT Solutions 2009
+	 * @link http://www.coldtrick.com/
+	 * @version 2.0
+	 */
+
+	// Ensure we are logged in
+	gatekeeper();
+		
+	// Get the GUID of the user to friend
+	$friend_guid = (int) get_input('friend');
+	$friend = get_user($friend_guid);
+	$errors = false;
+
+	// Get the user
+	if (!empty($friend)) {
+		$user = get_loggedin_user();
+		
+		try{
+			$user->removeFriend($friend_guid);
+			
+			try {	
+				//V1.1 - Old relationships might not have the 2 as friends...
+				$friend->removeFriend($user->guid);
+			}catch(Exception $e) {
+				// do nothing
+			}
+		} catch (Exception $e) {
+			register_error(sprintf(elgg_echo("friends:remove:failure"),$friend->name));
+			$errors = true;
+		}
+	} else {
+		register_error(sprintf(elgg_echo("friends:remove:failure"),$friend_guid));
+		$errors = true;
+	}
+	
+	if(!$errors) {
+		system_message(sprintf(elgg_echo("friends:remove:successful"),$friend->name));
+	}			
+		
+	forward($_SERVER["HTTP_REFERER"]);	
+?>
\ No newline at end of file
diff --git a/plugins/friend_request/actions/revoke.php b/plugins/friend_request/actions/revoke.php
new file mode 100755
index 0000000000000000000000000000000000000000..1ba1a11cc4cb11809e8eff91081d8688a7ce9dee
--- /dev/null
+++ b/plugins/friend_request/actions/revoke.php
@@ -0,0 +1,30 @@
+<?php
+	/**
+	 * Friend request plugin
+	 * Revoke a friend request
+	 * 
+	 * @package friend_request
+	 * @author ColdTrick IT Solutions
+	 * @copyright Coldtrick IT Solutions 2009
+	 * @link http://www.coldtrick.com/
+	 * @version 2.0
+	 */
+
+	action_gatekeeper();
+	gatekeeper();
+	
+	$friend_guid = (int) get_input("guid");
+	$friend = get_user($friend_guid);
+	
+	if(!empty($friend)){
+		$user = get_loggedin_user();
+		
+		if(remove_entity_relationship($user->guid, 'friendrequest', $friend->guid)) {
+			system_message(elgg_echo("friend_request:revoke:success"));
+		} else {
+			system_message(elgg_echo("friend_request:revoke:fail"));
+		}
+	}
+	
+	forward($_SERVER['HTTP_REFERER']);
+?>
\ No newline at end of file
diff --git a/plugins/friend_request/graphics/icons/friendrequest.png b/plugins/friend_request/graphics/icons/friendrequest.png
new file mode 100755
index 0000000000000000000000000000000000000000..a2e6b50af07a623c329c71dee9802b9dc594a031
Binary files /dev/null and b/plugins/friend_request/graphics/icons/friendrequest.png differ
diff --git a/plugins/friend_request/index.php b/plugins/friend_request/index.php
new file mode 100755
index 0000000000000000000000000000000000000000..799e671cadcdffe30c4104350ddff7b71920c45d
--- /dev/null
+++ b/plugins/friend_request/index.php
@@ -0,0 +1,43 @@
+<?php
+	/**
+	 * Friend request plugin
+	 * List all the requests (sent and received)
+	 * 
+	 * @package friend_request
+	 * @author ColdTrick IT Solutions
+	 * @copyright Coldtrick IT Solutions 2009
+	 * @link http://www.coldtrick.com/
+	 * @version 2.1
+	 */
+
+	gatekeeper();
+	
+	$user = get_loggedin_user();
+	
+	// set the correct context and page owner
+	set_context("friends");
+	set_page_owner($user->guid);
+	
+	// fix to show collections links
+	collections_submenu_items();
+	
+	// Get all the data
+	$received_count = get_entities_from_relationship("friendrequest", $user->guid, true, "user", "", 0, "", 0, 0, true);
+	$received_requests = get_entities_from_relationship("friendrequest", $user->guid, true, "user", "", 0, "", $received_count);
+	
+	$sent_count = get_entities_from_relationship("friendrequest", $user->guid, false, "user", "", 0, "", 0, 0, true);
+	$sent_requests = get_entities_from_relationship("friendrequest", $user->guid, false, "user", "", 0, "", $sent_count);
+	
+	// Get page elements
+	$title = elgg_view_title(elgg_echo('friend_request:title'));
+	
+	$received = elgg_view("friend_request/received", array("entities" => $received_requests, "request_count" => $received_count));
+	$sent = elgg_view("friend_request/sent", array("entities" => $sent_requests, "request_count" => $sent_count));
+	
+	// Build page
+	$page_body =  $title . $received . $sent;
+	
+	// Draw page
+	page_draw(elgg_echo("friend_request:title"), elgg_view_layout('two_column_left_sidebar', '', $page_body));
+	
+?>
\ No newline at end of file
diff --git a/plugins/friend_request/languages/en.php b/plugins/friend_request/languages/en.php
new file mode 100755
index 0000000000000000000000000000000000000000..60eb1a25d951940689f5a08bb50d7525ea7aa386
--- /dev/null
+++ b/plugins/friend_request/languages/en.php
@@ -0,0 +1,54 @@
+<?php
+	$english = array(
+		'friend_request' => "Friend Request",
+		'friend_request:menu' => "Friend Requests",
+		'friend_request:title' => "Friend Requests",
+	
+		'friend_request:new' => "New friend request",
+		
+		'friend_request:newfriend:subject' => "%s wants to be your friend!",
+		'friend_request:newfriend:body' => "%s wants to be your friend! But they are waiting for you to approve the request...so login now so you can approve the request!
+
+You can view your pending friend requests at (Make sure you are logged into the website before clicking on the following link otherwise you will be redirected to the login page.):
+
+%s
+
+(You cannot reply to this email.)",
+		
+		// Actions
+		// Add request
+		'friend_request:add:failure' => "Sorry, because of a system error we were unable to complete your request. Please try again.",
+		'friend_request:add:successful' => "You have requested to be friends with %s. They must approve your request before they will show on your friends list.",
+		'friend_request:add:exists' => "You've already requested to be friends with %s.",
+		
+		// Approve request
+		'friend_request:approve' => "Approve",
+		'friend_request:approve:successful' => "%s is now a friend",
+		'friend_request:approve:fail' => "Error while creating friend relation with %s",
+	
+		// Decline request
+		'friend_request:decline' => "Decline",
+		'friend_request:decline:subject' => "%s has declined your friend request",
+		'friend_request:decline:message' => "Dear %s,
+
+%s has declined your request to become a friend.",
+		'friend_request:decline:success' => "Friend request succesfully declined",
+		'friend_request:decline:fail' => "Error while declining Friend request, please try again",
+		
+		// Revoke request
+		'friend_request:revoke' => "Revoke",
+		'friend_request:revoke:success' => "Friend request succesfully revoked",
+		'friend_request:revoke:fail' => "Error while revoking Friend request, please try again",
+	
+		// Views
+		// Received
+		'friend_request:received:title' => "Received Friend requests",
+		'friend_request:received:none' => "No requests pending your approval",
+	
+		// Sent
+		'friend_request:sent:title' => "Sent Friend requests",
+		'friend_request:sent:none' => "No sent requests pending approval",
+	);
+					
+	add_translation("en", $english);
+?>
\ No newline at end of file
diff --git a/plugins/friend_request/manifest.xml b/plugins/friend_request/manifest.xml
new file mode 100755
index 0000000000000000000000000000000000000000..40cf87891db2ed9366b3e23691e64c5f348c8b60
--- /dev/null
+++ b/plugins/friend_request/manifest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin_manifest>
+	<field key="author" value="ColdTrick IT Solutions" />
+	<field key="version" value="2.1" />
+	<field key="description" value="Let users confirm friend requests. Make all friend requests reciprocal. Based on friend_request by Bosssumon and Zac Hopkinson" />
+	<field key="website" value="http://www.coldtrick.com" />
+	<field key="copyright" value="(C) ColdTrick 2009" />
+	<field key="licence" value="GNU Public License version 2" />
+	<field key="elgg_version" value="2009031301" />
+</plugin_manifest>
+<!--
+=================
+Version History
+=================
+2.1:
+	- added: CSS fix to hide friendsof on profile and user pulldown menu
+	- added: friends menu no longer showing friendsof
+	- fixed: collections links now showing
+	- changed: menu title language handling
+	- changed: CSS for topbar
+	
+2.0:
+	- added: menu options in friends and messages
+	- added: option to revoke a request
+	- added: listing of sent requests
+	- changed: listing of received friend requests
+	- changed: Elgg topbar icon
+	
+1.5:
+	- latest release by Bosssumon and Zac Hopkinson
+-->
\ No newline at end of file
diff --git a/plugins/friend_request/start.php b/plugins/friend_request/start.php
new file mode 100755
index 0000000000000000000000000000000000000000..2519d0aa549037fa2b9109b912157c500cac0d6e
--- /dev/null
+++ b/plugins/friend_request/start.php
@@ -0,0 +1,125 @@
+<?php
+	/**
+	 * Friend request plugin
+	 * Requires a friend to confirm your request to become a connection
+	 * 
+	 * Original design by Bosssumon and Zac Hopkinson
+	 * 
+	 * @package friend_request
+	 * @author ColdTrick IT Solutions
+	 * @copyright Coldtrick IT Solutions 2009
+	 * @link http://www.coldtrick.com/
+	 * @version 2.1
+	 */
+
+	function friend_request_init() {
+		global $CONFIG;
+		
+		//Extend CSS
+		extend_view('css', 'friend_request/css');
+		
+		if(isloggedin()){
+			//Extend topbar to add our link if needed
+			extend_view('elgg_topbar/extend', 'friend_request/topbar');
+		}
+		
+		//This overwrites the original friend requesting stuff.
+		register_action("friends/add", false, $CONFIG->pluginspath . "friend_request/actions/friends/add.php", false);
+		
+		//We need to override the friend remove action to remove the relationship we created
+	   	register_action("friends/remove", false, $CONFIG->pluginspath . "friend_request/actions/friends/removefriend.php");
+		
+		//This will let uesrs view their friend requests
+		register_page_handler('friend_request', 'friend_request_page_handler');
+	}
+	
+	function friend_request_event_create_friend($event, $object_type, $object) {
+		global $CONFIG;
+			
+		if (($object instanceof ElggRelationship) && ($event == 'create') && ($object_type == 'friend') ) {
+			//We don't want anything happening here... (no email/etc)
+			
+			//Returning false will interrupt the rest of the chain.
+			//The normal handler for the create friend event has a priority of 500 so it will never be called.	
+			return false;
+		}
+		return true; //Shouldn't get here...
+	}
+	
+	//Allow us to send an notification email:
+	function friend_request_event_create_friendrequest($event, $object_type, $object) {
+		global $CONFIG;
+			
+		if (($object instanceof ElggRelationship) && ($event == 'create') && ($object_type == 'friendrequest')) {
+			$user_one = get_entity($object->guid_one);
+			$user_two = get_entity($object->guid_two);
+			
+			$view_friends_url = $CONFIG->wwwroot . "pg/friend_request";
+			
+			// Notify target user
+			$subject = sprintf(elgg_echo('friend_request:newfriend:subject'), $user_one->name);
+			$message = sprintf(elgg_echo("friend_request:newfriend:body"), $user_one->name, $view_friends_url);
+			
+			return notify_user($object->guid_two, $object->guid_one, $subject, $message); 
+		}
+	}
+	
+	function friend_request_page_handler($page) {
+		global $CONFIG;
+		
+		include($CONFIG->pluginspath . "friend_request/index.php"); 
+	}
+	
+	function friend_request_pagesetup(){
+		global $CONFIG;
+		
+		// Remove link to friendsof
+		if(!empty($CONFIG->submenu["a"])){
+			$submenu_links = &$CONFIG->submenu["a"];
+			$lang_friendsof = elgg_echo("friends:of");
+			
+			foreach($submenu_links as $index => $object){
+				if($object->name == $lang_friendsof){
+					unset($submenu_links[$index]);
+					break;
+				}
+			}
+		}
+		
+		// Show menu link in the correct context
+		if(isloggedin() && 
+			(get_context() == "friends" ||
+			get_context() == "friendsof" ||
+			get_context() == "collections" ||
+			get_context() == "messages")
+		){
+			$count = get_entities_from_relationship('friendrequest', get_loggedin_user()->guid, true, "", "", 0, "", 0, 0, true);
+			
+			if(!empty($count)){
+				$extra = " [" . $count . "]";
+			} else {
+				$extra = "";
+			}
+			
+			add_submenu_item(elgg_echo("friend_request:menu") . $extra, $CONFIG->wwwroot . "pg/friend_request/", "b");
+		}
+		
+	}
+	
+	// Default event handlers
+	register_elgg_event_handler('init', 'system', 'friend_request_init', 100);
+	register_elgg_event_handler('pagesetup', 'system', 'friend_request_pagesetup');
+	
+	//Our friendrequest handlers...
+	register_action("friend_request/approve", false, $CONFIG->pluginspath . "friend_request/actions/approve.php");
+   	register_action("friend_request/decline", false, $CONFIG->pluginspath . "friend_request/actions/decline.php");
+   	register_action("friend_request/revoke", false, $CONFIG->pluginspath . "friend_request/actions/revoke.php");
+   	
+   	//Regular Elgg engine sends out an email via an event. The 400 priority will let us run first.
+	//Then we return false to stop the event chain. The normal event handler will never get to run.
+	register_elgg_event_handler('create', 'friend', 'friend_request_event_create_friend', 400);
+	
+	//Handle our add action event:
+	register_elgg_event_handler('create', 'friendrequest', 'friend_request_event_create_friendrequest');
+	
+?>
\ No newline at end of file
diff --git a/plugins/friend_request/views/default/friend_request/css.php b/plugins/friend_request/views/default/friend_request/css.php
new file mode 100755
index 0000000000000000000000000000000000000000..dc89b4d9d2593d6929e38763652acfa4aab0948c
--- /dev/null
+++ b/plugins/friend_request/views/default/friend_request/css.php
@@ -0,0 +1,35 @@
+<?php 
+	/**
+	 * Friend request plugin
+	 * CSS extensions
+	 * 
+	 * @package friend_request
+	 * @author ColdTrick IT Solutions
+	 * @copyright Coldtrick IT Solutions 2009
+	 * @link http://www.coldtrick.com/
+	 * @version 2.1
+	 */
+?>
+.new_friendrequests {
+	background: transparent url(<?php echo $vars['url']; ?>mod/friend_request/graphics/icons/friendrequest.png) no-repeat left -16px;
+	padding: 0 0 0 18px;
+	margin: 0 5px 0 5px;
+}
+
+.new_friendrequests:hover {
+	text-decoration: none;
+	background-position: left top;
+}
+
+.friend_request {
+	margin: 0 0 5px 0;
+}
+
+.friend_request td {
+	padding: 0 0 0 3px;
+}
+
+/* hide some links on profile */
+.user_menu_friends_of {
+	display: none;
+}
\ No newline at end of file
diff --git a/plugins/friend_request/views/default/friend_request/received.php b/plugins/friend_request/views/default/friend_request/received.php
new file mode 100755
index 0000000000000000000000000000000000000000..fbc31baa6e338b0d59c6f070b7f58aa1cd9e24fc
--- /dev/null
+++ b/plugins/friend_request/views/default/friend_request/received.php
@@ -0,0 +1,45 @@
+<?php 
+	/**
+	 * Friend request plugin
+	 * List all received requests
+	 * 
+	 * @package friend_request
+	 * @author ColdTrick IT Solutions
+	 * @copyright Coldtrick IT Solutions 2009
+	 * @link http://www.coldtrick.com/
+	 * @version 2.0
+	 */
+
+	$count = $vars["request_count"];
+	$entities = $vars["entities"];
+	
+	$content = "";
+	
+	$ts = time();
+	$token = generate_action_token($ts);
+	
+	if($count > 0){
+		foreach($entities as $entity){
+			$content .= "<table class='friend_request'>\n";
+			$content .= "<tr>\n";
+			$content .= "<td rowspan='2'>" . elgg_view("profile/icon", array("entity" => $entity, "size" => "small")) . "</td>\n";
+			$content .= "<td><a href='" . $entity->getURL() . "' title='" . $entity->name . "'>" . $entity->name . "</a></td>\n";
+			$content .= "</tr>\n";
+			$content .= "<tr>\n";
+			$content .= "<td>";
+			$content .= "<a href='" . $CONFIG->wwwroot . "action/friend_request/approve?guid=" . $entity->guid . "&__elgg_ts=" . $ts ."&__elgg_token=" . $token . "' title='" . elgg_echo("friend_request:approve") . "'>" . elgg_echo("friend_request:approve") . "</a>";
+			$content .= "&nbsp;|&nbsp;";
+			$content .= "<a href='" . $CONFIG->wwwroot . "action/friend_request/decline?guid=" . $entity->guid . "&__elgg_ts=" . $ts ."&__elgg_token=" . $token . "' title='" . elgg_echo("friend_request:decline") . "'>" . elgg_echo("friend_request:decline") . "</a>";
+			$content .= "</td>\n";
+			$content .= "</tr>\n";
+			$content .= "</table>\n";
+		}
+	} else {
+		$content = elgg_echo("friend_request:received:none");
+	}
+	
+?>
+<div class="contentWrapper">
+	<h3 class="settings"><?php echo elgg_echo("friend_request:received:title"); ?></h3>
+	<?php echo $content; ?>
+</div>
\ No newline at end of file
diff --git a/plugins/friend_request/views/default/friend_request/sent.php b/plugins/friend_request/views/default/friend_request/sent.php
new file mode 100755
index 0000000000000000000000000000000000000000..944d1f1f664bdfb9be4427bb6bf84578c9534999
--- /dev/null
+++ b/plugins/friend_request/views/default/friend_request/sent.php
@@ -0,0 +1,43 @@
+<?php 
+	/**
+	 * Friend request plugin
+	 * List all sent requests
+	 * 
+	 * @package friend_request
+	 * @author ColdTrick IT Solutions
+	 * @copyright Coldtrick IT Solutions 2009
+	 * @link http://www.coldtrick.com/
+	 * @version 2.0
+	 */
+
+	$count = $vars["request_count"];
+	$entities = $vars["entities"];
+	
+	$content = "";
+	
+	$ts = time();
+	$token = generate_action_token($ts);
+	
+	if($count > 0){
+		foreach($entities as $entity){
+			$content .= "<table class='friend_request'>\n";
+			$content .= "<tr>\n";
+			$content .= "<td rowspan='2'>" . elgg_view("profile/icon", array("entity" => $entity, "size" => "small")) . "</td>\n";
+			$content .= "<td><a href='" . $entity->getURL() . "' title='" . $entity->name . "'>" . $entity->name . "</a></td>\n";
+			$content .= "</tr>\n";
+			$content .= "<tr>\n";
+			$content .= "<td>";
+			$content .= "<a href='" . $CONFIG->wwwroot . "action/friend_request/revoke?guid=" . $entity->guid . "&__elgg_ts=" . $ts ."&__elgg_token=" . $token . "' title='" . elgg_echo("friend_request:revoke") . "'>" . elgg_echo("friend_request:revoke") . "</a>";
+			$content .= "</td>\n";
+			$content .= "</tr>\n";
+			$content .= "</table>\n";
+		}
+	} else {
+		$content = elgg_echo("friend_request:sent:none");
+	}
+	
+?>
+<div class="contentWrapper">
+	<h3 class="settings"><?php echo elgg_echo("friend_request:sent:title"); ?></h3>
+	<?php echo $content; ?>
+</div>
\ No newline at end of file
diff --git a/plugins/friend_request/views/default/friend_request/topbar.php b/plugins/friend_request/views/default/friend_request/topbar.php
new file mode 100755
index 0000000000000000000000000000000000000000..464aa9f08aa4f03d3924d778ee7bfae40406b8be
--- /dev/null
+++ b/plugins/friend_request/views/default/friend_request/topbar.php
@@ -0,0 +1,22 @@
+<?php
+	/**
+	 * Friend request plugin
+	 * Extend the Elgg topbar with link to Friends request, if any
+	 * 
+	 * @package friend_request
+	 * @author ColdTrick IT Solutions
+	 * @copyright Coldtrick IT Solutions 2009
+	 * @link http://www.coldtrick.com/
+	 * @version 2.0
+	 */
+
+	if(isloggedin()){
+		$user = get_loggedin_user();
+		
+		$count = get_entities_from_relationship('friendrequest', $user->guid, true, "", "", 0, "", 0, 0, true);
+		
+		if(!empty($count)){
+			echo "<a href='" . $CONFIG->wwwroot . "pg/friend_request' class='new_friendrequests' title='" . elgg_echo('friend_request:new') . "'>[" . $count . "]</a>";
+		}
+	}
+?>
\ No newline at end of file
diff --git a/plugins/riverfaces/graphics/clock_icon.gif b/plugins/riverfaces/graphics/clock_icon.gif
new file mode 100755
index 0000000000000000000000000000000000000000..5dcacfc25bb5e73749534a7a0129c42cde727f94
Binary files /dev/null and b/plugins/riverfaces/graphics/clock_icon.gif differ
diff --git a/plugins/riverfaces/languages/en.php b/plugins/riverfaces/languages/en.php
new file mode 100755
index 0000000000000000000000000000000000000000..2e4bdbb084c8c167faa1b309ca4687ab7b875a71
--- /dev/null
+++ b/plugins/riverfaces/languages/en.php
@@ -0,0 +1,16 @@
+<?php
+$english = array(
+
+  'riverfaces:settings:iconsize' => 'User Icon size?',
+  'riverfaces:settings:iconsize:medium' => 'Medium',	
+  'riverfaces:settings:iconsize:small' => 'Small',	
+  'riverfaces:settings:iconsize:tiny' => 'Tiny',	
+  'riverfaces:settings:iconsize:topbar' => 'Topbar',
+  
+  'riverfaces:settings:adjustsize' => 'Adjust icon display size?',
+  
+  'riverfaces:settings:showcontextmenu' => 'Show user icon context menu?',
+);
+
+add_translation("en",$english);
+?>
\ No newline at end of file
diff --git a/plugins/riverfaces/languages/es.php b/plugins/riverfaces/languages/es.php
new file mode 100755
index 0000000000000000000000000000000000000000..6b9e09a8b3b6b916abec8928b4721bd1063b05c1
--- /dev/null
+++ b/plugins/riverfaces/languages/es.php
@@ -0,0 +1,17 @@
+<?php
+
+$spanish = array(
+  'riverfaces:settings:iconsize' => 'Tamaño del icono de usuario?',
+  'riverfaces:settings:iconsize:medium' => 'Mediano',	
+  'riverfaces:settings:iconsize:small' => 'Pequeño',	
+  'riverfaces:settings:iconsize:tiny' => 'Diminuto',	
+  'riverfaces:settings:iconsize:topbar' => 'Topbar',
+  
+  'riverfaces:settings:adjustsize' => 'Ajustar el tamaño de icono mostrado?',
+  
+  'riverfaces:settings:showcontextmenu' => 'Mostrar el menu de usuario en el icono?',
+);
+
+add_translation('es', $spanish); 
+
+?>
\ No newline at end of file
diff --git a/plugins/riverfaces/manifest.xml b/plugins/riverfaces/manifest.xml
new file mode 100755
index 0000000000000000000000000000000000000000..6e73b7c1cf1ba1d063159b37dc81e02a15f67461
--- /dev/null
+++ b/plugins/riverfaces/manifest.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin_manifest>
+	<field key="author" value="Adolfo Mazorra" />
+	<field key="version" value="0.3" />
+	<field key="description" value="Add user icons to the river activity items." />
+	<field key="copyright" value="(C) Adolfo Mazorra 2009" />
+	<field key="licence" value="GNU Public License version 2" />
+	<field key="elgg_version" value="2009030702" />
+</plugin_manifest>
\ No newline at end of file
diff --git a/plugins/riverfaces/readme.txt b/plugins/riverfaces/readme.txt
new file mode 100755
index 0000000000000000000000000000000000000000..d8dba8082054293ab75754a35144fdde63e0dd2c
--- /dev/null
+++ b/plugins/riverfaces/readme.txt
@@ -0,0 +1,39 @@
+/**
+ * RiverFaces
+ *  
+ * @package riverfaces
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Adolfo Mazorra
+ * @copyright Adolfo Mazorra 2009
+ * @version 0.3
+ */
+ 
+DESCRIPTION
+
+ This is a little plugin that modifies the river item wrapper and css to show the profile icon
+ of each user next to the activity (and river) items.
+ 
+ The size of the icons can be changed in the plugin settings (four sizes available: medium, small,
+ tiny and topbar) and also there is a settings option to adjust their size to that of the tiny
+ activity type icon.
+ 
+ The icons include by default the user context menu, but this can also be changed in the settings.
+
+INSTALLATION
+
+	To install just extract in the 'mod' folder and enable the plugin.
+
+CHANGELIST:
+ v0.3
+	- Added small clock next to the time display (idea & icon from the '3 column dashboard' plugin).
+	- Added option to adjust user icon size to that of the small activity type icon (idea from Alex Tanchoco).
+	- Added option to remove the user icon context menu.
+	- Spanish translation included.
+
+ v0.2
+	- Added setting parameter to define the user icon size.
+	- A couple of changes to css.
+
+ v0.1
+	- Initial release.
+
diff --git a/plugins/riverfaces/start.php b/plugins/riverfaces/start.php
new file mode 100755
index 0000000000000000000000000000000000000000..8dd4b9bac01fad713c4f3cc923cdc647d64fd2a1
--- /dev/null
+++ b/plugins/riverfaces/start.php
@@ -0,0 +1,18 @@
+<?php
+
+	/**
+	 * RiverFaces
+	 *  
+	 * @package riverfaces
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Adolfo Mazorra
+	 * @copyright Adolfo Mazorra 2009
+	 */
+
+		function riverfaces_init() {
+			extend_view('css','riverfaces/css');			
+		}
+		
+		register_elgg_event_handler('init','system','riverfaces_init');
+
+?>
\ No newline at end of file
diff --git a/plugins/riverfaces/views/default/river/item/wrapper.php b/plugins/riverfaces/views/default/river/item/wrapper.php
new file mode 100755
index 0000000000000000000000000000000000000000..69a8d0d370ca21c719aaeba5418dde5671ba3087
--- /dev/null
+++ b/plugins/riverfaces/views/default/river/item/wrapper.php
@@ -0,0 +1,65 @@
+<?php
+
+	/**
+	 * Elgg river item wrapper.
+	 * Wraps all river items.
+	 * 
+	 * @package Elgg
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider (modified by Adolfo Mazorra)
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+
+	$size = get_plugin_setting('iconsize', 'riverfaces');
+	if (!isset($size) or $size == '')
+		$size = 'small';
+		
+	$adjustSize = get_plugin_setting('adjustsize', 'riverfaces');
+	if ($adjustSize != 'yes') {
+		$img_size = '';
+		$padding_size = $size;
+	}	else {
+		$img_size = " adjusted_user_icon_size";
+		$padding_size = 'topbar';			
+	}
+	
+	$showContextMenu = get_plugin_setting('showContextMenu', 'riverfaces');
+	$override = false;
+	if ($showContextMenu == 'no') {
+		$override = true;
+	}
+	
+	$user = get_entity($vars['item']->subject_guid);
+?>	
+	<div class="river_item">
+		<div class="river_item_icon_float<?php echo $img_size;?>">
+			<?php				
+				if ($override) {
+					$link_begin = '<a href="' . $user->getURL() . '" title="' . $user->name . '">';
+					$link_end = '</a>';
+				}
+				echo $link_begin . elgg_view("profile/icon", array('entity' => $user,'size' => $size, 'override' => $override)) . $link_end; 
+			?>
+		</div>	
+		<div class="river_item_padding_<?php echo $padding_size; ?>">	
+			<div class="river_<?php echo $vars['item']->type; ?>">
+				<div class="river_<?php echo $vars['item']->subtype; ?>">
+					<div class="river_<?php echo $vars['item']->action_type; ?>">
+						<div class="river_<?php echo $vars['item']->type; ?>_<?php if($vars['item']->subtype) echo $vars['item']->subtype . "_"; ?><?php echo $vars['item']->action_type; ?>">
+						<p>
+							<?php		
+									echo $vars['body'];				
+							?>
+							<span class="river_item_time">
+								<img src="<?php echo $vars['url']; ?>mod/riverfaces/graphics/clock_icon.gif" width="11px" height="11px" />
+								<?php	echo friendly_time($vars['item']->posted); ?>
+							</span>
+						</p>
+						</div>
+					</div>				
+				</div>
+			</div>
+		</div>
+	</div>
+	<div class="clearfloat"></div>
\ No newline at end of file
diff --git a/plugins/riverfaces/views/default/riverfaces/css.php b/plugins/riverfaces/views/default/riverfaces/css.php
new file mode 100755
index 0000000000000000000000000000000000000000..77865314c796cd08753cd1d50b4f1ad6ac2f1371
--- /dev/null
+++ b/plugins/riverfaces/views/default/riverfaces/css.php
@@ -0,0 +1,51 @@
+<?php
+	/**
+	 * RiverFaces CSS
+	 * 
+	 * @package riverfaces
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Adolfo Mazorra
+	 * @copyright Adolfo Mazorra 2009
+	 */
+?>
+
+.river_item p {
+	margin:0;
+	padding:0 0 0 21px;
+	line-height:1.1em;
+	min-height:17px;
+}
+.river_item {
+	border-bottom:1px solid #dddddd;
+	padding:5px 0 5px 0;
+	margin: 0px 0px 5px 5px;	
+}
+.river_item_padding_medium {
+	margin-left: 105px;
+	min-height: 100px;
+}
+.river_item_padding_small {
+	margin-left: 45px;
+	min-height: 40px;
+}
+.river_item_padding_tiny {
+	margin-left: 30px;
+	min-height: 25px;
+}
+.river_item_padding_topbar {
+	margin-left: 25px;
+	min-height: 20px;
+}
+.river_item_icon_float {
+	float:left;
+	margin:0px 4px;
+}
+.adjusted_user_icon_size img {
+	width: 18px;
+	height: 18px;
+}
+.river_item_time {
+	display:block;
+	font-size:90%;
+	color:#666666;
+}
diff --git a/plugins/riverfaces/views/default/settings/riverfaces/edit.php b/plugins/riverfaces/views/default/settings/riverfaces/edit.php
new file mode 100755
index 0000000000000000000000000000000000000000..5f5a962154216fdf8c97fc1b57287271f7f5a3e3
--- /dev/null
+++ b/plugins/riverfaces/views/default/settings/riverfaces/edit.php
@@ -0,0 +1,53 @@
+<?php
+	/**
+	 * Widgetlinks Settings Edit
+	 * 
+	 * @package widgetlinks
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Adolfo Mazorra
+	 * @copyright Adolfo Mazorra 2009
+	 */
+?>
+
+<table>
+	<tr>
+	<td>
+		<?php echo elgg_echo('riverfaces:settings:iconsize'); ?>&nbsp;
+	</td>
+	<td>
+		<?php
+			$iconsize = $vars['entity']->iconsize;
+			if (!isset($iconsize) or $iconsize == '')
+				$iconsize = 'small';
+		?>
+		<select name="params[iconsize]">
+			<option value="medium" <?php if ($iconsize == 'medium') echo " selected=\"yes\" "; ?>><?php echo elgg_echo('riverfaces:settings:iconsize:medium'); ?></option>
+			<option value="small" <?php if ($iconsize == 'small') echo " selected=\"yes\" "; ?>><?php echo elgg_echo('riverfaces:settings:iconsize:small'); ?></option>
+			<option value="tiny" <?php if ($iconsize == 'tiny') echo " selected=\"yes\" "; ?>><?php echo elgg_echo('riverfaces:settings:iconsize:tiny'); ?></option>
+			<option value="topbar" <?php if ($iconsize == 'topbar') echo " selected=\"yes\" "; ?>><?php echo elgg_echo('riverfaces:settings:iconsize:topbar'); ?></option>
+		</select>
+	</td>
+	</tr>
+	<tr>
+	<td>
+		<?php echo elgg_echo('riverfaces:settings:adjustsize'); ?>&nbsp;
+	</td>
+	<td>
+		<select name="params[adjustsize]">
+			<option value="yes" <?php if ($vars['entity']->adjustsize == 'yes') echo " selected=\"yes\" "; ?>><?php echo elgg_echo('option:yes'); ?></option>
+			<option value="no" <?php if ($vars['entity']->adjustsize != 'yes') echo " selected=\"yes\" "; ?>><?php echo elgg_echo('option:no'); ?></option>
+		</select>
+	</td>
+	</tr>
+	<tr>
+	<td>
+		<?php echo elgg_echo('riverfaces:settings:showcontextmenu'); ?>&nbsp;
+	</td>
+	<td>
+		<select name="params[showContextMenu]">
+			<option value="yes" <?php if ($vars['entity']->showContextMenu != 'no') echo " selected=\"yes\" "; ?>><?php echo elgg_echo('option:yes'); ?></option>
+			<option value="no" <?php if ($vars['entity']->showContextMenu == 'no') echo " selected=\"yes\" "; ?>><?php echo elgg_echo('option:no'); ?></option>
+		</select>
+	</td>
+	</tr>	
+</table>