<?php

/**

 * WDC Like Dislike Component

 * @author Joomla web Developer <contact@adodis.com>

 * @link http://www.joomla-web-developer.com

**/





 // no direct access

defined( '_JEXEC' ) or die( 'Restricted access' );



// This is going to be redone, but for the time being, it's working as it is

jimport('joomla.filesystem.path');

jimport('joomla.filesystem.file');



echo "<b>You have Uninstalled </b>";

$plg_installer = new JInstaller();



$db = JFactory::getDBO();



$db->setQuery("SELECT id FROM #__plugins WHERE `element`='content_vote' AND `folder`='content' LIMIT 1");

$plg_id = $db->loadResult();

	if ($plg_id){

	$db->setQuery("DELETE FROM `#__plugins` WHERE `element`='content_vote'");$db->query();

}

$db->setQuery("SELECT id FROM #__plugins WHERE `element`='likedislike' AND `folder`='editors-xtd' LIMIT 1");

$plg_id1 = $db->loadResult();

	if ($plg_id1){

		   $db->setQuery("DELETE FROM `#__plugins` WHERE `element`='likedislike'");$db->query();

	}



	if(JFile::exists(JPATH_ROOT.DS.'plugins'.DS.'content'.DS.'content_vote.php')){

		JFile::delete(JPATH_ROOT.DS.'plugins'.DS.'content'.DS.'content_vote.php');

	}

	if(JFile::exists(JPATH_ROOT.DS.'plugins'.DS.'content'.DS.'content_vote.xml')){

		JFile::delete(JPATH_ROOT.DS.'plugins'.DS.'content'.DS.'content_vote.xml');

	}

	if(JFolder::exists(JPATH_ROOT.DS.'plugins'.DS.'content'.DS.'wdc_assets')){

		JFolder::delete(JPATH_ROOT.DS.'plugins'.DS.'content'.DS.'wdc_assets');

	}

	if(JFile::exists(JPATH_ROOT.DS.'plugins'.DS.'editors-xtd'.DS.'likedislike.php')){

		JFile::delete(JPATH_ROOT.DS.'plugins'.DS.'editors-xtd'.DS.'likedislike.php');

	}

	if(JFile::exists(JPATH_ROOT.DS.'plugins'.DS.'editors-xtd'.DS.'likedislike_button.jpg')){

		JFile::delete(JPATH_ROOT.DS.'plugins'.DS.'editors-xtd'.DS.'likedislike_button.jpg');

	}

 

?>

<strong style="color:#FF0000;"> WDC Like Dislike</strong>