Location: PHPKode > projects > Anahita Social Engine > admin/socialengine.php
<?php
/**
* @version		1.0.0
* @package		Anahita SocialEngine
* @copyright	Copyright (C) 2007 - 2009 rmd Studio Inc. and Peerglobe Technology Inc. All rights reserved.
* @license		GNU GPLv2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
* @link 		http://www.anahitapolis.com
*/


//enable the plugins
// Check if Koowa is active

if ( //!JPluginHelper::isEnabled('system','koowa') ||
	!JPluginHelper::isEnabled('system','socialengine') || !JPluginHelper::isEnabled('user','socialengine') ) {
		
	$query   = "SELECT * FROM #__plugins WHERE ( folder = 'system' OR folder = 'user' ) AND element IN ('socialengine')";
	$db	   	 = JFactory::getDBO();
	$db->setQuery($query);
	$objects = $db->loadObjectList();
	if ( count($objects) != 2 ) {
	    JError::raiseWarning(0, JText::_("Please install Social Engine System and User plugin and enable it."));
	    return;			
	}
	foreach($objects as &$object) {	
	
		$object->published = 1;
		$db->updateObject('#__plugins',$object,'id');
	}
	
	global $mainframe;

	$mainframe->redirect('index.php?option=com_socialengine');
}




if(!defined('KOOWA')) {
    JError::raiseWarning(0, JText::_("Koowa wasn't found. Please install the Koowa plugin and enable it."));
    return;
}

// Require the defines
KLoader::load('admin::com.socialengine.defines');

//conver the viewer into the person
AnModelAnahita::getSessionViewer();

// Create the controller dispatcher
KFactory::get('admin::com.socialengine.dispatcher')->dispatch( KRequest::get('get.view', 'cmd', 'dashboard') );
Return current item: Anahita Social Engine