: $http_host = explode(':', $_SERVER['HTTP_HOST'] ); if( (!empty( $_SERVER['HTTPS'] ) && strtolower( $_SERVER['HTTPS'] ) != 'off' || isset( $http_host[1] ) && $http_host[1] == 443) && substr( $mosConfig_live_site, 0, 8 ) != 'https://' ) { $mosConfig_live_site = 'https://'.substr( $mosConfig_live_site, 7 ); } require_once( '../includes/joomla.php' ); include_once ( $mosConfig_absolute_path . '/language/'. $mosConfig_lang .'.php' ); //Installation sub folder check, removed for work with SVN if (file_exists( '../installation/index.php' ) && $_VERSION->SVN == 0) { define( '_INSTALL_CHECK', 1 ); include ($mosConfig_absolute_path .'/offline.php'); exit(); } $option = strtolower( strval( mosGetParam( $_REQUEST, 'option', NULL ) ) ); // mainframe is an API workhorse, lots of 'core' interaction routines $mainframe = new mosMainFrame( $database, $option, '..', true ); if (isset( $_POST['submit'] )) { $usrname = stripslashes( mosGetParam( $_POST, 'usrname', NULL ) ); $pass = stripslashes( mosGetParam( $_POST, 'pass', NULL ) ); if($pass == NULL) { echo "\n"; exit(); } $query = "SELECT COUNT(*)" . "\n FROM #__users" . "\n WHERE (" // Administrators . "\n gid = 24" // Super Administrators . "\n OR gid = 25" . "\n )" ; $database->setQuery( $query ); $count = intval( $database->loadResult() ); if ($count < 1) { mosErrorAlert( _LOGIN_NOADMINS ); } $my = null; $query = "SELECT u.*, m.*" . "\n FROM #__users AS u" . "\n LEFT JOIN #__messages_cfg AS m ON u.id = m.user_id AND m.cfg_name = 'auto_purge'" . "\n WHERE u.username = " . $database->Quote( $usrname ) . "\n AND u.block = 0" ; $database->setQuery( $query ); $database->loadObject( $my ); /** find the user group (or groups in the future) */ if (@$my->id) { $grp = $acl->getAroGroup( $my->id ); $my->gid = $grp->group_id;