<?php
define( '_JEXEC', 1 );
chdir("../../../../");
getcwd();
define('JPATH_BASE', getcwd() );
define('DS', DIRECTORY_SEPARATOR);
require_once( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once( JPATH_BASE .DS.'includes'.DS.'framework.php' );
global $mainframe;
jimport("joomla.user.helper");
jimport("joomla.utilities.utility");
jimport('joomla.mail.helper');
$mainframe =& JFactory::getApplication('administrator');
$lang = JFactory::getLanguage();
$lang->load('com_ccnewsletter',JPATH_BASE.DS."administrator");
$db = JFactory::getDBO();
$strtmp="";

$sql = "SELECT count(*) FROM #__ccnewsletter_subscribers WHERE enabled=1";
$db->setQuery($sql);
$rowenable = $db->loadResult();

$sql = "SELECT count(*) FROM #__ccnewsletter_subscribers WHERE enabled=0";
$db->setQuery($sql);
$rowdisable= $db->loadResult();


$strtmp=$rowenable+$rowdisable;
$strtmp.=" ".JText::_('CC_STATISTIC_TOTAL_TXT').",".$rowenable." ".JText::_('CC_STATISTIC_ENABLE_TXT').",".$rowdisable." ".JText::_('CC_STATISTIC_DESABLE_TXT');
echo $strtmp;
?>