Server IP : 180.180.241.3 / Your IP : 216.73.216.252 Web Server : Microsoft-IIS/7.5 System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/AppServ/www/news/administrator/components/com_youtubegallery/ |
Upload File : |
<?php /** * YouTubeGallery Joomla! 1.5 Native Component * @version 3.8.3 * @author DesignCompass Corp <support@joomlaboat.com> * @link http://www.joomlaboat.com * @GNU General Public License **/ // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); function com_uninstall() { $filestodelete=array(); //Plugin to update $filestodelete[]=JPATH_SITE.DS.'plugins'.DS.'content'.DS.'youtubegallery".php'; $filestodelete[]=JPATH_SITE.DS.'plugins'.DS.'content'.DS.'youtubegallery".xml'; $filestodelete[]=JPATH_SITE.DS.'modules'.DS.'mod_youtubegallery'.DS.'index.html'; $filestodelete[]=JPATH_SITE.DS.'modules'.DS.'mod_youtubegallery'.DS.'mod_youtubegallery.php'; $filestodelete[]=JPATH_SITE.DS.'modules'.DS.'mod_youtubegallery'.DS.'mod_youtubegallery.xml'; $filestodelete[]=JPATH_SITE.DS.'modules'.DS.'mod_youtubegallery'; foreach($filestodelete as $file) { if(file_exists($file)) { if(is_dir($file)) rmdir($file); else unlink($file); } } $db = & JFactory::getDBO(); //ADD PLUGIN $query = 'DELETE FROM #__plugins WHERE `element`="youtubegallery"'; $db->setQuery( $query ); if (!$db->query()) die( $db->stderr()); //Delete module $query = 'SELECT id FROM #__modules WHERE `module`="mod_youtubegallery"'; $db->setQuery( $query ); $rows = $db->loadObjectList(); if(count($rows)>0) { $id=$rows[0]->id; $query ='DELETE FROM `#__modules` WHERE `module`="mod_youtubegallery"'; $db->setQuery( $query ); if (!$db->query()) die( $db->stderr()); $query ='DELETE FROM `#__modules_menu` WHERE `moduleid`='.$id; $db->setQuery( $query ); if (!$db->query()) die( $db->stderr()); } echo '<p>Youtube Gallery has been uninstalled successfully.</p>'; } ?>