Exemple #1
0
$JSecureConfig = $this->JSecureConfig;
$document =& JFactory::getDocument();
$document->addScript(JURI::base() . "components/com_jsecure/js/adminid.js");
jimport('joomla.environment.browser');
$doc =& JFactory::getDocument();
$app =& JFactory::getApplication();
$browser =& JBrowser::getInstance();
$browserType = $browser->getBrowser();
$browserVersion = $browser->getMajor();
if ($browserType == 'msie' && ($browserVersion = 7)) {
    $document->addScript(JURI::base() . "components/com_jsecure/js/tabs.js");
}
?>

<?php 
if (!jsecureControllerjsecure::isMasterLogged() and $JSecureConfig->enableMasterPassword == '1' and $JSecureConfig->include_adminid == '1') {
    JError::raiseWarning(404, JText::_('NOT_AUTHERIZED'));
    $link = "index.php?option=com_jsecure";
    $app->redirect($link);
    //$controller    = new jsecureControllerjsecure();
    //$controller->execute('auth');
} else {
    ?>
<form action="index.php?option=com_jsecure" method="post" name="adminForm" onsubmit="return submitbutton();">
<fieldset class="adminform">
<legend><?php 
    echo JText::_('SUPER_ADMIN_ID');
    ?>
</legend>
	<table class="admintable">
  <?php 
Exemple #2
0
 * login page without appropriate access key.
 *
 * @author      $Author: Ajay Lulia $
 * @copyright   Joomla Service Provider - 2012
 * @package     jSecure3.0
 * @license     http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @version     $Id: default.php  $
 */
defined('_JEXEC') or die('Restricted access');
$document =& JFactory::getDocument();
$basepath = JPATH_ADMINISTRATOR . '/components/com_jsecure';
$configFile = $basepath . '/params.php';
require_once $configFile;
$app =& JFactory::getApplication();
$JSecureConfig = new JSecureConfig();
if (!jsecureControllerjsecure::isMasterLogged() and $JSecureConfig->enableMasterPassword == '1' and $JSecureConfig->include_directorylisting == '1') {
    JError::raiseWarning(404, JText::_('NOT_AUTHERIZED'));
    $link = "index.php?option=com_jsecure";
    $app->redirect($link);
} else {
    ?>

	<form action="index.php" method="post" name="adminForm">
	

		<?php 
    /*
    
    CONFIGURATION
    =============
    Edit the variables in this section to make the script work as
JSubMenuHelper::addEntry(JText::_('EMAIL_MASTER'), 'index.php?option=com_jsecure&task=mastermail',false);
JSubMenuHelper::addEntry(JText::_('LOG'), 'index.php?option=com_jsecure&task=keeplog',false);
JSubMenuHelper::addEntry(JText::_('LOGIN_CONTROL'), 'index.php?option=com_jsecure&task=logincontrol',false);
JSubMenuHelper::addEntry(JText::_('SUPER_ADMIN_ID'), 'index.php?option=com_jsecure&task=adminid',false);
JSubMenuHelper::addEntry(JText::_('META_TAG_CONTROL'), 'index.php?option=com_jsecure&task=metatags',false);
JSubMenuHelper::addEntry(JText::_('ADMIN_PASSWORD_PROT'), 'index.php?option=com_jsecure&task=pwdprotect',false);
JSubMenuHelper::addEntry(JText::_('COM_JSECURE_LOG'), 'index.php?option=com_jsecure&task=log',false);
JSubMenuHelper::addEntry(JText::_('COM_JSECURE_DIRECTORIES'), 'index.php?option=com_jsecure&task=directory',false);
JSubMenuHelper::addEntry(JText::_('COM_JSECURE_HELP'), 'index.php?option=com_jsecure&task=help',false);*/
// Require the base controller
require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'controller.php';
if (!JFactory::getUser()->authorise('core.manage', 'com_jsecure')) {
    return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
$document =& JFactory::getDocument();
$document->addStyleSheet(JURI::base() . "components/com_jsecure/css/jsecure.css");
$task = JRequest::getCmd('task');
// Create the controller
$controller = new jsecureControllerjsecure();
// Perform the Request task
if (!jsecureControllerjsecure::isMasterLogged()) {
    if (JRequest::getCmd('task') == 'login') {
        $controller->execute('login');
    } else {
        $controller->execute($task);
    }
} else {
    $controller->execute($task);
}
// Redirect if set by the controller
$controller->redirect();
Exemple #4
0
 * login page without appropriate access key.
 *
 * @author      $Author: Ajay Lulia $
 * @copyright   Joomla Service Provider - 2010
 * @package     jSecure2.0.1
 * @license     http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @version     $Id: admin.jsecure.php  $
 */
// no direct access
defined('_JEXEC') or die('Restricted Access');
// Require the base controller
require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'controller.php';
//require_once (JPATH_COMPONENT_ADMINISTRATOR.DS.'models/auth.php');
$document =& JFactory::getDocument();
$document->addStyleSheet(JURI::base() . "components/com_jsecure/css/jsecure.css");
// Create the controller
$controller = new jsecureControllerjsecure();
// Perform the Request task
//$controller->execute(JRequest::getCmd('task'));
//echo jsecureControllerjsecure::isMasterLogged();exit;
if (!jsecureControllerjsecure::isMasterLogged()) {
    if (JRequest::getCmd('task') == 'login') {
        $controller->execute('login');
    } else {
        $controller->execute('auth');
    }
} else {
    $controller->execute(JRequest::getCmd('task'));
}
// Redirect if set by the controller
$controller->redirect();
Exemple #5
0
	  return true;
  else
	  return false;
<?php 
} else {
    ?>
	alert("Please enter master password");
	return false;
<?php 
}
?>
	  
}
</script>
<?php 
if ($JSecureConfig->enableMasterPassword == '1' and !jsecureControllerjsecure::isMasterLogged()) {
    ?>
<form action="index.php" method="post" name="adminForm" autocomplete="off" class="masterpassfrm">
	<table class="adminlist" cellspacing="0" style="border-spacing:0">
		<tr>
			<td width="105"><?php 
    echo JText::_('MASTER_PASSWORD');
    ?>
</td>
			<td><input type="password" name="master_password" class="textarea" value="" size="50" /></td>
		</tr>
		<tr>
        	<td></td>
			<td><input type="submit" name="" value="<?php 
    echo JText::_('JSECURE_LOGIN');
    ?>