- D15748396BC55BEFC5382493A14277183743BDFBDAC539ADF53761FF46F57F90E2EDD86ED3231AFB0D0F6981E51A1BA1F04756C59CCD4CD100EBEBB737D412B8+ 21D106BB4CD0FC4FA5ADBB52A7D10CE57BC8C2C1BD9CB7B47797F337774ACBBE735FD8AA63946ED841D9A05961976A90FE6AFC2ADE47392FE9B2E02730448575mp-wp/wp-admin/includes/file.php(40 . 29)(40 . 6)
21452  *
21453  * @since unknown
21454  *
21455  * @param unknown_type $file
21456  * @return unknown
21457  */
21458 function get_file_description( $file ) {
21459 	global $wp_file_descriptions;
21460 
21461 	if ( isset( $wp_file_descriptions[basename( $file )] ) ) {
21462 		return $wp_file_descriptions[basename( $file )];
21463 	}
21464 	elseif ( file_exists( WP_CONTENT_DIR . $file ) && is_file( WP_CONTENT_DIR . $file ) ) {
21465 		$template_data = implode( '', file( WP_CONTENT_DIR . $file ) );
21466 		if ( preg_match( '|Template Name:(.*)$|mi', $template_data, $name ))
21467 			return $name[1] . ' Page Template';
21468 	}
21469 
21470 	return basename( $file );
21471 }
21472 
21473 /**
21474  * {@internal Missing Short Description}}
21475  *
21476  * @since unknown
21477  *
21478  * @return unknown
21479  */
21480 function get_home_path() {
(84 . 60)(61 . 6)
21482  *
21483  * @since unknown
21484  *
21485  * @param unknown_type $file
21486  * @return unknown
21487  */
21488 function get_real_file_to_edit( $file ) {
21489 	if ('index.php' == $file || '.htaccess' == $file ) {
21490 		$real_file = get_home_path() . $file;
21491 	} else {
21492 		$real_file = WP_CONTENT_DIR . $file;
21493 	}
21494 
21495 	return $real_file;
21496 }
21497 
21498 /**
21499  * {@internal Missing Short Description}}
21500  *
21501  * @since unknown
21502  *
21503  * @param string $folder Optional. Full path to folder
21504  * @param int $levels Optional. Levels of folders to follow, Default: 100 (PHP Loop limit).
21505  * @return bool|array
21506  */
21507 function list_files( $folder = '', $levels = 100 ) {
21508 	if( empty($folder) )
21509 		return false;
21510 
21511 	if( ! $levels )
21512 		return false;
21513 
21514 	$files = array();
21515 	if ( $dir = @opendir( $folder ) ) {
21516 		while (($file = readdir( $dir ) ) !== false ) {
21517 			if ( in_array($file, array('.', '..') ) )
21518 				continue;
21519 			if ( is_dir( $folder . '/' . $file ) ) {
21520 				$files2 = list_files( $folder . '/' . $file, $levels - 1);
21521 				if( $files2 )
21522 					$files = array_merge($files, $files2 );
21523 				else
21524 					$files[] = $folder . '/' . $file . '/';
21525 			} else {
21526 				$files[] = $folder . '/' . $file;
21527 			}
21528 		}
21529 	}
21530 	@closedir( $dir );
21531 	return $files;
21532 }
21533 
21534 /**
21535  * {@internal Missing Short Description}}
21536  *
21537  * @since unknown
21538  *
21539  * @return unknown
21540  */
21541 function get_temp_dir() {
(180 . 35)(103 . 6)
21543  *
21544  * @since unknown
21545  *
21546  * @param unknown_type $file
21547  * @param unknown_type $allowed_files
21548  * @return unknown
21549  */
21550 function validate_file_to_edit( $file, $allowed_files = '' ) {
21551 	$file = stripslashes( $file );
21552 
21553 	$code = validate_file( $file, $allowed_files );
21554 
21555 	if (!$code )
21556 		return $file;
21557 
21558 	switch ( $code ) {
21559 		case 1 :
21560 			wp_die( __('Sorry, can’t edit files with ".." in the name. If you are trying to edit a file in your WordPress home directory, you can just type the name of the file in.' ));
21561 
21562 		case 2 :
21563 			wp_die( __('Sorry, can’t call files with their real path.' ));
21564 
21565 		case 3 :
21566 			wp_die( __('Sorry, that file cannot be edited.' ));
21567 	}
21568 }
21569 
21570 /**
21571  * {@internal Missing Short Description}}
21572  *
21573  * @since unknown
21574  *
21575  * @param array $file Reference to a single element of $_FILES. Call the function once for each uploaded file.
21576  * @param array $overrides Optional. An associative array of names=>values to override default variables with extract( $overrides, EXTR_OVERWRITE ).
21577  * @return array On success, returns an associative array of file attributes. On failure, returns $overrides['upload_error_handler'](&$file, $message ) or array( 'error'=>$message ).
(309 . 461)(203 . 4)
21579 	return $return;
21580 }
21581 
21582 /**
21583  * {@internal Missing Short Description}}
21584  *
21585  * Pass this function an array similar to that of a $_FILES POST array.
21586  *
21587  * @since unknown
21588  *
21589  * @param unknown_type $file
21590  * @param unknown_type $overrides
21591  * @return unknown
21592  */
21593 function wp_handle_sideload( &$file, $overrides = false ) {
21594 	// The default error handler.
21595 	if (! function_exists( 'wp_handle_upload_error' ) ) {
21596 		function wp_handle_upload_error( &$file, $message ) {
21597 			return array( 'error'=>$message );
21598 		}
21599 	}
21600 
21601 	// You may define your own function and pass the name in $overrides['upload_error_handler']
21602 	$upload_error_handler = 'wp_handle_upload_error';
21603 
21604 	// You may define your own function and pass the name in $overrides['unique_filename_callback']
21605 	$unique_filename_callback = null;
21606 
21607 	// $_POST['action'] must be set and its value must equal $overrides['action'] or this:
21608 	$action = 'wp_handle_sideload';
21609 
21610 	// Courtesy of php.net, the strings that describe the error indicated in $_FILES[{form field}]['error'].
21611 	$upload_error_strings = array( false,
21612 		__( "The file exceeds the <code>upload_max_filesize</code> directive in <code>php.ini</code>." ),
21613 		__( "The file exceeds the <em>MAX_FILE_SIZE</em> directive that was specified in the HTML form." ),
21614 		__( "The file was only partially uploaded." ),
21615 		__( "No file was sent." ),
21616 		__( "Missing a temporary folder." ),
21617 		__( "Failed to write file to disk." ));
21618 
21619 	// All tests are on by default. Most can be turned off by $override[{test_name}] = false;
21620 	$test_form = true;
21621 	$test_size = true;
21622 
21623 	// If you override this, you must provide $ext and $type!!!!
21624 	$test_type = true;
21625 	$mimes = false;
21626 
21627 	// Install user overrides. Did we mention that this voids your warranty?
21628 	if ( is_array( $overrides ) )
21629 		extract( $overrides, EXTR_OVERWRITE );
21630 
21631 	// A correct form post will pass this test.
21632 	if ( $test_form && (!isset( $_POST['action'] ) || ($_POST['action'] != $action ) ) )
21633 		return $upload_error_handler( $file, __( 'Invalid form submission.' ));
21634 
21635 	// A successful upload will pass this test. It makes no sense to override this one.
21636 	if ( $file['error'] > 0 )
21637 		return $upload_error_handler( $file, $upload_error_strings[$file['error']] );
21638 
21639 	// A non-empty file will pass this test.
21640 	if ( $test_size && !(filesize($file['tmp_name']) > 0 ) )
21641 		return $upload_error_handler( $file, __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini.' ));
21642 
21643 	// A properly uploaded file will pass this test. There should be no reason to override this one.
21644 	if (! @ is_file( $file['tmp_name'] ) )
21645 		return $upload_error_handler( $file, __( 'Specified file does not exist.' ));
21646 
21647 	// A correct MIME type will pass this test. Override $mimes or use the upload_mimes filter.
21648 	if ( $test_type ) {
21649 		$wp_filetype = wp_check_filetype( $file['name'], $mimes );
21650 
21651 		extract( $wp_filetype );
21652 
21653 		if ( ( !$type || !$ext ) && !current_user_can( 'unfiltered_upload' ) )
21654 			return $upload_error_handler( $file, __( 'File type does not meet security guidelines. Try another.' ));
21655 
21656 		if ( !$ext )
21657 			$ext = ltrim(strrchr($file['name'], '.'), '.');
21658 
21659 		if ( !$type )
21660 			$type = $file['type'];
21661 	}
21662 
21663 	// A writable uploads dir will pass this test. Again, there's no point overriding this one.
21664 	if ( ! ( ( $uploads = wp_upload_dir() ) && false === $uploads['error'] ) )
21665 		return $upload_error_handler( $file, $uploads['error'] );
21666 
21667 	$filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback );
21668 
21669 	// Strip the query strings.
21670 	$filename = str_replace('?','-', $filename);
21671 	$filename = str_replace('&','-', $filename);
21672 
21673 	// Move the file to the uploads dir
21674 	$new_file = $uploads['path'] . "/$filename";
21675 	if ( false === @ rename( $file['tmp_name'], $new_file ) ) {
21676 		return $upload_error_handler( $file, sprintf( __('The uploaded file could not be moved to %s.' ), $uploads['path'] ) );
21677 	}
21678 
21679 	// Set correct file permissions
21680 	$stat = stat( dirname( $new_file ));
21681 	$perms = $stat['mode'] & 0000666;
21682 	@ chmod( $new_file, $perms );
21683 
21684 	// Compute the URL
21685 	$url = $uploads['url'] . "/$filename";
21686 
21687 	$return = apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $type ) );
21688 
21689 	return $return;
21690 }
21691 
21692 /**
21693  * Downloads a url to a local file using the Snoopy HTTP Class.
21694  *
21695  * @since unknown
21696  * @todo Transition over to using the new HTTP Request API (jacob).
21697  *
21698  * @param string $url the URL of the file to download
21699  * @return mixed WP_Error on failure, string Filename on success.
21700  */
21701 function download_url( $url ) {
21702 	//WARNING: The file is not automatically deleted, The script must unlink() the file.
21703 	if ( ! $url )
21704 		return new WP_Error('http_no_url', __('Invalid URL Provided'));
21705 
21706 	$tmpfname = wp_tempnam($url);
21707 	if ( ! $tmpfname )
21708 		return new WP_Error('http_no_file', __('Could not create Temporary file'));
21709 
21710 	$handle = @fopen($tmpfname, 'wb');
21711 	if ( ! $handle )
21712 		return new WP_Error('http_no_file', __('Could not create Temporary file'));
21713 
21714 	$response = wp_remote_get($url, array('timeout' => 30));
21715 
21716 	if ( is_wp_error($response) ) {
21717 		fclose($handle);
21718 		unlink($tmpfname);
21719 		return $response;
21720 	}
21721 
21722 	if ( $response['response']['code'] != '200' ){
21723 		fclose($handle);
21724 		unlink($tmpfname);
21725 		return new WP_Error('http_404', trim($response['response']['message']));
21726 	}
21727 
21728 	fwrite($handle, $response['body']);
21729 	fclose($handle);
21730 
21731 	return $tmpfname;
21732 }
21733 
21734 /**
21735  * {@internal Missing Short Description}}
21736  *
21737  * @since unknown
21738  *
21739  * @param unknown_type $file
21740  * @param unknown_type $to
21741  * @return unknown
21742  */
21743 function unzip_file($file, $to) {
21744 	global $wp_filesystem;
21745 
21746 	if ( ! $wp_filesystem || !is_object($wp_filesystem) )
21747 		return new WP_Error('fs_unavailable', __('Could not access filesystem.'));
21748 
21749 	// Unzip uses a lot of memory
21750 	@ini_set('memory_limit', '256M');
21751 
21752 	$fs =& $wp_filesystem;
21753 
21754 	require_once(ABSPATH . 'wp-admin/includes/class-pclzip.php');
21755 
21756 	$archive = new PclZip($file);
21757 
21758 	// Is the archive valid?
21759 	if ( false == ($archive_files = $archive->extract(PCLZIP_OPT_EXTRACT_AS_STRING)) )
21760 		return new WP_Error('incompatible_archive', __('Incompatible archive'), $archive->errorInfo(true));
21761 
21762 	if ( 0 == count($archive_files) )
21763 		return new WP_Error('empty_archive', __('Empty archive'));
21764 
21765 	$path = explode('/', untrailingslashit($to));
21766 	for ( $i = count($path); $i > 0; $i-- ) { //>0 = first element is empty allways for paths starting with '/'
21767 		$tmppath = implode('/', array_slice($path, 0, $i) );
21768 		if ( $fs->is_dir($tmppath) ) { //Found the highest folder that exists, Create from here(ie +1)
21769 			for ( $i = $i + 1; $i <= count($path); $i++ ) {
21770 				$tmppath = implode('/', array_slice($path, 0, $i) );
21771 				if ( ! $fs->mkdir($tmppath, FS_CHMOD_DIR) )
21772 					return new WP_Error('mkdir_failed', __('Could not create directory'), $tmppath);
21773 			}
21774 			break; //Exit main for loop
21775 		}
21776 	}
21777 
21778 	$to = trailingslashit($to);
21779 	foreach ($archive_files as $file) {
21780 		$path = $file['folder'] ? $file['filename'] : dirname($file['filename']);
21781 		$path = explode('/', $path);
21782 		for ( $i = count($path); $i >= 0; $i-- ) { //>=0 as the first element contains data
21783 			if ( empty($path[$i]) )
21784 				continue;
21785 			$tmppath = $to . implode('/', array_slice($path, 0, $i) );
21786 			if ( $fs->is_dir($tmppath) ) {//Found the highest folder that exists, Create from here
21787 				for ( $i = $i + 1; $i <= count($path); $i++ ) { //< count() no file component please.
21788 					$tmppath = $to . implode('/', array_slice($path, 0, $i) );
21789 					if ( ! $fs->is_dir($tmppath) && ! $fs->mkdir($tmppath, FS_CHMOD_DIR) )
21790 						return new WP_Error('mkdir_failed', __('Could not create directory'), $tmppath);
21791 				}
21792 				break; //Exit main for loop
21793 			}
21794 		}
21795 
21796 		// We've made sure the folders are there, so let's extract the file now:
21797 		if ( ! $file['folder'] ) {
21798 			if ( !$fs->put_contents( $to . $file['filename'], $file['content']) )
21799 				return new WP_Error('copy_failed', __('Could not copy file'), $to . $file['filename']);
21800 			$fs->chmod($to . $file['filename'], FS_CHMOD_FILE);
21801 		}
21802 	}
21803 	return true;
21804 }
21805 
21806 /**
21807  * {@internal Missing Short Description}}
21808  *
21809  * @since unknown
21810  *
21811  * @param unknown_type $from
21812  * @param unknown_type $to
21813  * @return unknown
21814  */
21815 function copy_dir($from, $to) {
21816 	global $wp_filesystem;
21817 
21818 	$dirlist = $wp_filesystem->dirlist($from);
21819 
21820 	$from = trailingslashit($from);
21821 	$to = trailingslashit($to);
21822 
21823 	foreach ( (array) $dirlist as $filename => $fileinfo ) {
21824 		if ( 'f' == $fileinfo['type'] ) {
21825 			if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true) ) {
21826 				// If copy failed, chmod file to 0644 and try again.
21827 				$wp_filesystem->chmod($to . $filename, 0644);
21828 				if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true) )
21829 					return new WP_Error('copy_failed', __('Could not copy file'), $to . $filename);
21830 			}
21831 			$wp_filesystem->chmod($to . $filename, FS_CHMOD_FILE);
21832 		} elseif ( 'd' == $fileinfo['type'] ) {
21833 			if ( !$wp_filesystem->is_dir($to . $filename) ) {
21834 				if ( !$wp_filesystem->mkdir($to . $filename, FS_CHMOD_DIR) )
21835 					return new WP_Error('mkdir_failed', __('Could not create directory'), $to . $filename);
21836 			}
21837 			$result = copy_dir($from . $filename, $to . $filename);
21838 			if ( is_wp_error($result) )
21839 				return $result;
21840 		}
21841 	}
21842 }
21843 
21844 /**
21845  * {@internal Missing Short Description}}
21846  *
21847  * @since unknown
21848  *
21849  * @param unknown_type $args
21850  * @return unknown
21851  */
21852 function WP_Filesystem( $args = false ) {
21853 	global $wp_filesystem;
21854 
21855 	require_once(ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php');
21856 
21857 	$method = get_filesystem_method($args);
21858 
21859 	if ( ! $method )
21860 		return false;
21861 
21862 	$abstraction_file = apply_filters('filesystem_method_file', ABSPATH . 'wp-admin/includes/class-wp-filesystem-' . $method . '.php', $method);
21863 	if( ! file_exists($abstraction_file) )
21864 		return;
21865 
21866 	require_once($abstraction_file);
21867 	$method = "WP_Filesystem_$method";
21868 
21869 	$wp_filesystem = new $method($args);
21870 
21871 	if ( $wp_filesystem->errors->get_error_code() )
21872 		return false;
21873 
21874 	if ( !$wp_filesystem->connect() )
21875 		return false; //There was an erorr connecting to the server.
21876 
21877 	// Set the permission constants if not already set.
21878 	if ( ! defined('FS_CHMOD_DIR') )
21879 		define('FS_CHMOD_DIR', 0755 );
21880 	if ( ! defined('FS_CHMOD_FILE') )
21881 		define('FS_CHMOD_FILE', 0644 );
21882 
21883 	return true;
21884 }
21885 
21886 /**
21887  * {@internal Missing Short Description}}
21888  *
21889  * @since unknown
21890  *
21891  * @param unknown_type $args
21892  * @return unknown
21893  */
21894 function get_filesystem_method($args = array()) {
21895 	$method = false;
21896 	if( function_exists('getmyuid') && function_exists('fileowner') ){
21897 		$temp_file = wp_tempnam();
21898 		if ( getmyuid() == fileowner($temp_file) )
21899 			$method = 'direct';
21900 		unlink($temp_file);
21901 	}
21902 
21903 	if ( ! $method && isset($args['connection_type']) && 'ssh' == $args['connection_type'] && extension_loaded('ssh2') ) $method = 'ssh2';
21904 	if ( ! $method && extension_loaded('ftp') ) $method = 'ftpext';
21905 	if ( ! $method && ( extension_loaded('sockets') || function_exists('fsockopen') ) ) $method = 'ftpsockets'; //Sockets: Socket extension; PHP Mode: FSockopen / fwrite / fread
21906 	return apply_filters('filesystem_method', $method);
21907 }
21908 
21909 /**
21910  * {@internal Missing Short Description}}
21911  *
21912  * @since unknown
21913  *
21914  * @param unknown_type $form_post
21915  * @param unknown_type $type
21916  * @param unknown_type $error
21917  * @return unknown
21918  */
21919 function request_filesystem_credentials($form_post, $type = '', $error = false) {
21920 	$req_cred = apply_filters('request_filesystem_credentials', '', $form_post, $type, $error);
21921 	if ( '' !== $req_cred )
21922 		return $req_cred;
21923 
21924 	if ( empty($type) )
21925 		$type = get_filesystem_method();
21926 
21927 	if ( 'direct' == $type )
21928 		return true;
21929 
21930 	$credentials = get_option('ftp_credentials', array());
21931 	// If defined, set it to that, Else, If POST'd, set it to that, If not, Set it to whatever it previously was(saved details in option)
21932 	$credentials['hostname'] = defined('FTP_HOST') ? FTP_HOST : (!empty($_POST['hostname']) ? $_POST['hostname'] : $credentials['hostname']);
21933 	$credentials['username'] = defined('FTP_USER') ? FTP_USER : (!empty($_POST['username']) ? $_POST['username'] : $credentials['username']);
21934 	$credentials['password'] = defined('FTP_PASS') ? FTP_PASS : (!empty($_POST['password']) ? $_POST['password'] : $credentials['password']);
21935 
21936 	// Check to see if we are setting the public/private keys for ssh
21937 	$credentials['public_key'] = defined('FTP_PUBKEY') ? FTP_PUBKEY : (!empty($_POST['public_key']) ? $_POST['public_key'] : $credentials['public_key']);
21938 	$credentials['private_key'] = defined('FTP_PRIKEY') ? FTP_PRIKEY : (!empty($_POST['private_key']) ? $_POST['private_key'] : $credentials['private_key']);
21939 
21940 	if ( strpos($credentials['hostname'], ':') )
21941 		list( $credentials['hostname'], $credentials['port'] ) = explode(':', $credentials['hostname'], 2);
21942 
21943 	if ( defined('FTP_SSH') || (isset($_POST['connection_type']) && 'ssh' == $_POST['connection_type']) )
21944 		$credentials['connection_type'] = 'ssh';
21945 	else if ( defined('FTP_SSL') || (isset($_POST['connection_type']) && 'ftps' == $_POST['connection_type']) )
21946 		$credentials['connection_type'] = 'ftps';
21947 	else if ( !isset($credentials['connection_type']) || (isset($_POST['connection_type']) && 'ftp' == $_POST['connection_type']) )
21948 		$credentials['connection_type'] = 'ftp';
21949 
21950 	if ( ! $error && !empty($credentials['password']) && !empty($credentials['username']) && !empty($credentials['hostname']) ) {
21951 		$stored_credentials = $credentials;
21952 		unset($stored_credentials['password'], $stored_credentials['private_key'], $stored_credentials['public_key']);
21953 		update_option('ftp_credentials', $stored_credentials);
21954 		return $credentials;
21955 	}
21956 	$hostname = '';
21957 	$username = '';
21958 	$password = '';
21959 	$connection_type = '';
21960 	if ( !empty($credentials) )
21961 		extract($credentials, EXTR_OVERWRITE);
21962 	if ( $error ) {
21963 		$error_string = __('<strong>Error:</strong> There was an error connecting to the server, Please verify the settings are correct.');
21964 		if ( is_wp_error($error) )
21965 			$error_string = $error->get_error_message();
21966 		echo '<div id="message" class="error"><p>' . $error_string . '</p></div>';
21967 	}
21968 ?>
21969 <script type="text/javascript">
21970 <!--
21971 jQuery(function($){
21972 	jQuery("#ssh").click(function () {
21973 		jQuery("#ssh_keys").show();
21974 	});
21975 	jQuery("#ftp, #ftps").click(function () {
21976 		jQuery("#ssh_keys").hide();
21977 	});
21978 });
21979 -->
21980 </script>
21981 <form action="<?php echo $form_post ?>" method="post">
21982 <div class="wrap">
21983 <h2><?php _e('Connection Information') ?></h2>
21984 <p><?php _e('To perform the requested action, connection information is required.') ?></p>
21985 
21986 <table class="form-table">
21987 <tr valign="top">
21988 <th scope="row"><label for="hostname"><?php _e('Hostname') ?></label></th>
21989 <td><input name="hostname" type="text" id="hostname" value="<?php echo attribute_escape($hostname); if ( !empty($port) ) echo ":$port"; ?>"<?php if( defined('FTP_HOST') ) echo ' disabled="disabled"' ?> size="40" /></td>
21990 </tr>
21991 
21992 <tr valign="top">
21993 <th scope="row"><label for="username"><?php _e('Username') ?></label></th>
21994 <td><input name="username" type="text" id="username" value="<?php echo attribute_escape($username) ?>"<?php if( defined('FTP_USER') ) echo ' disabled="disabled"' ?> size="40" /></td>
21995 </tr>
21996 
21997 <tr valign="top">
21998 <th scope="row"><label for="password"><?php _e('Password') ?></label></th>
21999 <td><input name="password" type="password" id="password" value=""<?php if( defined('FTP_PASS') ) echo ' disabled="disabled"' ?> size="40" /><?php if( defined('FTP_PASS') && !empty($password) ) echo '<em>'.__('(Password not shown)').'</em>'; ?></td>
22000 </tr>
22001 
22002 <tr id="ssh_keys" valign="top" style="<?php if ( 'ssh' != $connection_type ) echo 'display:none' ?>">
22003 <th scope="row"><?php _e('Authentication Keys') ?>
22004 <div class="key-labels textright">
22005 <label for="public_key"><?php _e('Public Key:') ?></label ><br />
22006 <label for="private_key"><?php _e('Private Key:') ?></label>
22007 </div></th>
22008 <td><br /><input name="public_key" type="text" id="public_key" value=""<?php if( defined('FTP_PUBKEY') ) echo ' disabled="disabled"' ?> size="40" /><br /><input name="private_key" type="text" id="private_key" value=""<?php if( defined('FTP_PRIKEY') ) echo ' disabled="disabled"' ?> size="40" />
22009 <div><?php _e('Enter the location on the server where the keys are located. If a passphrase is needed, enter that in the password field above.') ?></div></td>
22010 </tr>
22011 
22012 <tr valign="top">
22013 <th scope="row"><?php _e('Connection Type') ?></th>
22014 <td>
22015 <fieldset><legend class="hidden"><?php _e('Connection Type') ?></legend>
22016 <label><input id="ftp" name="connection_type"  type="radio" value="ftp" <?php checked('ftp', $connection_type); if ( defined('FTP_SSL') || defined('FTP_SSH') ) echo ' disabled="disabled"'; ?>/> <?php _e('FTP') ?></label><br />
22017 <label><input id="ftps" name="connection_type" type="radio" value="ftps" <?php checked('ftps', $connection_type); if ( defined('FTP_SSH') || defined('FTP_SSH') ) echo ' disabled="disabled"';  ?>/> <?php _e('FTPS (SSL)') ?></label><br />
22018 <?php if ( extension_loaded('ssh2') ) { ?><label><input id="ssh" name="connection_type" type="radio" value="ssh" <?php checked('ssh', $connection_type);  if ( defined('FTP_SSL') || defined('FTP_SSH') ) echo ' disabled="disabled"'; ?>/> <?php _e('SSH') ?></label><?php } ?>
22019 </fieldset>
22020 </td>
22021 </tr>
22022 </table>
22023 
22024 <?php if ( isset( $_POST['version'] ) ) : ?>
22025 <input type="hidden" name="version" value="<?php echo attribute_escape($_POST['version']) ?>" />
22026 <?php endif; ?>
22027 <?php if ( isset( $_POST['locale'] ) ) : ?>
22028 <input type="hidden" name="locale" value="<?php echo attribute_escape($_POST['locale']) ?>" />
22029 <?php endif; ?>
22030 <p class="submit">
22031 <input id="upgrade" name="upgrade" type="submit" class="button" value="<?php _e('Proceed'); ?>" />
22032 </p>
22033 </div>
22034 </form>
22035 <?php
22036 	return false;
22037 }
22038 
22039 ?>