\n"; exit(); } else { $pass = md5( $pass ); } $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 = '$usrname'" . "\n AND u.password = '$pass'" . "\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; $my->usertype = $grp->name; if ( strcmp( $my->password, $pass ) || !$acl->acl_check( 'administration', 'login', 'users', $my->usertype ) ) { mosErrorAlert("Incorrect Username, Password, or Access Level. Please try again", "document.location.href='index.php'"); } session_name( md5( $mosConfig_live_site ) ); session_start(); // construct Session ID $logintime = time(); $session_id = md5( $my->id . $my->username . $my->usertype . $logintime ); // add Session ID entry to DB $query = "INSERT INTO #__session" . "\n SET time = '$logintime', session_id = '$session_id', userid = $my->id, usertype = '$my->usertype', username = '$my->username'" ; $database->setQuery( $query ); if (!$database->query()) { echo $database->stderr(); } // check if site designated as a production site // for a demo site allow multiple logins with same user account if ( $_VERSION->SITE == 1 ) { // delete other open admin sessions for same account $query = "DELETE FROM #__session" . "\n WHERE userid = $my->id" . "\n AND username = '$my->username'" . "\n AND usertype = '$my->usertype'" . "\n AND session_id != '$session_id'" // this ensures that frontend sessions are not purged . "\n AND guest = 1" . "\n AND gid = 0" ; $database->setQuery( $query ); if (!$database->query()) { echo $database->stderr(); } } $_SESSION['session_id'] = $session_id; $_SESSION['session_user_id'] = $my->id; $_SESSION['session_username'] = $my->username; $_SESSION['session_usertype'] = $my->usertype; $_SESSION['session_gid'] = $my->gid; $_SESSION['session_logintime'] = $logintime; $_SESSION['session_user_params'] = $my->params; $_SESSION['session_userstate'] = array(); session_write_close(); $expired = 'index2.php'; // check if site designated as a production site // for a demo site disallow expired page functionality if ( $_VERSION->SITE == 1 && @$mosConfig_admin_expired === '1' ) { $file = $mainframe->getPath( 'com_xml', 'com_users' ); $params =& new mosParameters( $my->params, $file, 'component' ); $now = time(); // expired page functionality handling $expired = $params->def( 'expired', '' ); $expired_time = $params->def( 'expired_time', '' ); // if now expired link set or expired time is more than half the admin session life set, simply load normal admin homepage $checktime = ( $mosConfig_session_life_admin ? $mosConfig_session_life_admin : 1800 ) / 2; if (!$expired || ( ( $now - $expired_time ) > $checktime ) ) { $expired = 'index2.php'; } // link must also be a Joomla link to stop malicious redirection if ( strpos( $expired, 'index2.php?option=com_' ) !== 0 ) { $expired = 'index2.php'; } // clear any existing expired page data $params->set( 'expired', '' ); $params->set( 'expired_time', '' ); // param handling if (is_array( $params->toArray() )) { $txt = array(); foreach ( $params->toArray() as $k=>$v) { $txt[] = "$k=$v"; } $saveparams = implode( "\n", $txt ); } // save cleared expired page info to user data $query = "UPDATE #__users" . "\n SET params = '$saveparams'" . "\n WHERE id = $my->id" . "\n AND username = '$my->username'" . "\n AND usertype = '$my->usertype'" ; $database->setQuery( $query ); $database->query(); } // check if auto_purge value set if ( $my->cfg_name == 'auto_purge' ) { $purge = $my->cfg_value; } else { // if no value set, default is 7 days $purge = 7; } // calculation of past date $past = date( 'Y-m-d H:i:s', time() - $purge * 60 * 60 * 24 ); // if purge value is not 0, then allow purging of old messages if ($purge != 0) { // purge old messages at day set in message configuration $query = "DELETE FROM #__messages" . "\n WHERE date_time < '$past'" . "\n AND user_id_to = $my->id" ; $database->setQuery( $query ); if (!$database->query()) { echo $database->stderr(); } } /** cannot using mosredirect as this stuffs up the cookie in IIS */ // redirects page to admin homepage by default or expired page echo "\n"; exit(); } else { mosErrorAlert("Incorrect Username, Password. Please try again", "document.location.href='index.php?mosmsg=Incorrect Username, Password. Please try again'"); } } else { initGzip(); $path = $mosConfig_absolute_path . '/administrator/templates/' . $mainframe->getTemplate() . '/login.php'; require_once( $path ); doGzip(); } ?>

= 40101) { require_once('./libraries/mysql_charsets.lib.php'); echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'db_collation', NULL, NULL, TRUE, 5); } ?>

' . ($cfg['ErrorIconic'] ? '' : '') . '' . $strNoPrivileges .''; } // end create db form or message ?> ','s_status.png',$strMySQLShowStatus,'') : $str_normal_list); ?> ','s_vars.png',$strMySQLShowVars,'') : $str_normal_list); ?>   ','s_process.png',$strMySQLShowProcess,'') : $str_normal_list); ?>   = 40100) { echo "\n"; ?> ','s_asci.png',$strCharsetsAndCollations,'') : $str_normal_list); ?>   ','s_reload.png',$strReloadMySQL,'') : $str_normal_list); ?>   ','s_rights.png',$strPrivileges,'') : $str_normal_list); ?>   0) { ?> ','s_tbl.png',$strBinaryLog,'') : $str_normal_list); ?>   ','s_db.png',$strDatabases,'') : $str_normal_list); ?> ','b_export.png',$strExport,'') : $str_normal_list); ?> ','s_passwd.png',$strChangePassword,'') : $str_normal_list); ?> ' . ($cfg['ReplaceHelpImg'] ? 'Info' : '(*)') . '' : ''; echo "\n"; ?> ','s_loggoff.png',$strChangePassword,'') : $str_normal_list); ?>   0) echo "\n"; ?>   ','s_lang.png','Language','') : $str_normal_list); ?> = 40100) { echo ' ' . "\n" . ' ' . "\n" .' ' . ($str_iconic_list != '' ? sprintf($str_iconic_list,'','s_asci.png',$strMySQLCharset,'') : $str_normal_list) . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" .' ' . ($str_iconic_list != '' ? sprintf($str_iconic_list,'','s_asci.png',$strMySQLCharset,'') : $str_normal_list) . "\n" . ' ' . "\n" . ' ' . "\n"; } echo "\n"; // added by Michael Keck // ThemeManager if available if (isset($available_themes_choices) && $available_themes_choices > 1) { $theme_selected = FALSE; $theme_preview_path= './themes.php'; $theme_preview_href = ''; ?> ') : $str_normal_list) . "\n"; ?> ','b_docs.png',$strPmaDocumentation,'') : $str_normal_list); ?> ','php_sym.png',$strShowPHPInfo,'') : $str_normal_list); ?> ','b_home.png',$strHomepageOfficial,'') : $str_normal_list); ?> '; ?>
>  phpMyAdmin
Language '; }else{ echo '(*)'; } ?>:
:
' . "\n" . ' ' . $strMySQLCharset . ': ' . ' ' . ' ' . $mysql_charsets_descriptions[$mysql_charset_map[strtolower($charset)]] . "\n" . ' (' . $mysql_charset_map[strtolower($charset)] . ')' . "\n" . ' ' . "\n" . '
' . "\n" . '
' . "\n" . PMA_generate_common_hidden_inputs(NULL, NULL, 4, 'collation_connection') . ' ' . "\n" . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'collation_connection', 'select_collation_connection', $collation_connection, TRUE, 4, TRUE) . ' ' . "\n" // put the doc link in the form so that it appears on the same line . PMA_showMySQLDocu('MySQL_Database_Administration', 'Charset-connection') . "\n" . '
' . "\n" . '
:' . "\n"; ?>
[ChangeLog]    [CVS]    [Lists]

' . $strPmaUriError . '' . "\n"; } /** * Warning if using the default MySQL privileged account * modified: 2004-05-05 mkkeck */ if ($server != 0 && $cfg['Server']['user'] == 'root' && $cfg['Server']['password'] == '') { echo '
' . $strInsecureMySQL . '
' . "\n"; } /** * Warning for PHP 4.2.3 * modified: 2004-05-05 mkkeck */ if (PMA_PHP_INT_VERSION == 40203 && @extension_loaded('mbstring')) { echo '
' . $strPHP40203 . '
' . "\n"; } /** * Nijel: As we try to hadle charsets by ourself, mbstring overloads just * break it, see bug 1063821. */ if (@extension_loaded('mbstring') && @ini_get('mbstring.func_overload') > 1) { echo '
' . $strMbOverloadWarning . '
' . "\n"; } /** * Nijel: mbstring is used for handling multibyte inside parser, so it is good * to tell user something might be broken without it, see bug #1063149. */ if ($GLOBALS['using_mb_charset'] && !@extension_loaded('mbstring')) { echo '
' . $strMbExtensionMissing . '
' . "\n"; } /** * Warning for old PHP version * modified: 2004-05-05 mkkeck */ if (PMA_PHP_INT_VERSION < 40100) { echo '
' . sprintf($strUpgrade, 'PHP', '4.1.0') . '
' . "\n"; } /** * Warning for old MySQL version * modified: 2004-05-05 mkkeck */ // not yet defined before the server choice if (defined('PMA_MYSQL_INT_VERSION') && PMA_MYSQL_INT_VERSION < 32332) { echo '
' . sprintf($strUpgrade, 'MySQL', '3.23.32') . '
' . "\n"; } /** * Displays the footer */ echo "\n"; require_once('./footer.inc.php'); ?>