⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 go-pear.php

📁 php5.0原代码
💻 PHP
📖 第 1 页 / 共 5 页
字号:
	td.package_info_title {	    color: #006600;	    font-weight: bold;	}	th.others {	    color: #006600;	    text-align: left;	}	em {	    font-weight: bold;	    font-style: italic;	}	.green {	    color: #006600;	}	.red {	    color: #006600;	}	span.headline {	    font-family: verdana,arial,helvetica,sans-serif;	    font-size: 125%;	    font-weight: bold;	    color: #ffffff;	}	span.title {	    font-family: verdana,arial,helvetica,sans-serif;	    font-size: 110%;	    font-weight: bold;	    color: #006600;	}	.newsDate {	    font-size: 85%;	    font-style: italic;	    color: #66cc66;	}	.compact {	    font-family: arial, helvetica, sans-serif;	    font-size: 90%;	}	.menuWhite {	    font-family: verdana,arial,helvetica,sans-serif;	    font-size: 75%;	    color: #ffffff;	}	.menuBlack {	    font-family: verdana,arial,helvetica,sans-serif;	    text-decoration: none;	    font-weight: bold;	    font-size: 75%;	    color: #000000;	}	.sidebar {	    font-size: 85%;	}	code, pre, tt {	    font-family: Courier, "Courier New", monospace;	    font-size: 90%;	}	pre.php {	    border-color:       black;	    border-style:       dashed;	    border-width:       1px;	    background-color:   #eeeeee;	    padding:            5px;	}	h1 {	    font-family: verdana,arial,helvetica,sans-serif;	    font-size: 140%;	    font-weight: bold;	    color: #006600;	}	h2 {	    font-family: verdana,arial,helvetica,sans-serif;	    font-size: 125%;	    font-weight: bold;	    color: #006600;	}	h3 {	    font-family: verdana,arial,helvetica,sans-serif;	    font-size: 110%;	    font-weight: bold;	    color: #006600;	}	small {	    font-family: verdana,arial,helvetica,sans-serif;	    font-size: 75%;	}	a.small {	    font-family: verdana,arial,helvetica,sans-serif;	    font-size: 75%;	    text-decoration: none;	}	.tableTitle {	    font-family: verdana,arial,helvetica,sans-serif;	    font-weight: bold;	}	.tableExtras {	    font-family: verdana,arial,helvetica,sans-serif;	    font-size: 85%;	    color: #FFFFFF;	}	input {	    font-family: verdana,arial,helvetica,sans-serif;	}	textarea {	    font-family: verdana,arial,helvetica,sans-serif;	}	input.small, select.small {	    font-family: verdana,arial,helvetica,sans-serif;	    font-size: 75%;	}	textarea.small {	    font-family: verdana,arial,helvetica,sans-serif;	    font-size: 75%;	}	form {	    margin-bottom : 0;	} --> </style> <meta name="description" content="This is the Web Interface of the PEAR Installer" /></head><body   topmargin="0" leftmargin="0"	    marginheight="0" marginwidth="0"        bgcolor="#ffffff"        text="#000000"        link="#006600"        alink="#cccc00"        vlink="#003300"><?php}// }}}// {{{ displayHTMLfunction displayHTML($page = 'Welcome', $data = array()){	global $pfc_packages;    displayHTMLHeader();?><a name="TOP" /></a><table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">  <tr bgcolor="#339900">    <td align="left" width="120">      <img src="<?php echo basename(__FILE__); ?>?action=img&amp;img=pearlogo" width="104" height="50" vspace="2" hspace="5" alt="PEAR">    </td>    <td align="left" valign="middle" width="20">      &nbsp;    </td>    <td align="left" valign="middle">      <span class="Headline">Go-PEAR</span>    </td>  </tr>  <tr bgcolor="#003300"><td colspan="3"></td></tr>  <tr bgcolor="#006600">    <td align="right" valign="top" colspan="3">        <span style="color: #ffffff">Version <?php echo GO_PEAR_VER; ?></span>&nbsp;<br />    </td>  </tr>  <tr bgcolor="#003300"><td colspan="3"></td></tr></table><table cellpadding="0" cellspacing="0" width="100%"> <tr valign="top">  <td bgcolor="#f0f0f0" width="100">   <table width="200" border="0" cellpadding="4" cellspacing="0">    <tr valign="top">     <td style="font-size: 90%" align="left" width="200">       <br><br>       <img src="<?php echo basename(__FILE__); ?>?action=img&amp;img=smallpear" border="0">	   <a href="<?php echo basename(__FILE__); ?>?step=Welcome&restart=1" <?php if ($page == 'Welcome') echo ' class="green"'; ?>>	     Welcome to Go-PEAR	   </a><br/>       <img src="<?php echo basename(__FILE__); ?>?action=img&amp;img=smallpear" border="0">	   <a href="<?php echo basename(__FILE__); ?>?step=config" <?php if ($page == 'config') echo ' class="green"'; ?>>	     Configuration	   </a><br/>       <img src="<?php echo basename(__FILE__); ?>?action=img&amp;img=smallpear" border="0"><?php if ($page == 'install') echo '<span class="green">'; ?> 	     Complete installtion<br/><?php if ($page == 'install') echo '</span>'; ?>     </td>    </tr>   </table>  </td>  <td bgcolor="#cccccc" width="1" background="/gifs/checkerboard.gif"></td>  <td>   <table width="100%" cellpadding="10" cellspacing="0">    <tr>     <td valign="top"><table border="0"><tr>  <td width="20">  </td>  <td><?php	if ($page == 'error') {?>			<span class="title">Error</span><br/>			<br/><?php		$value = $data;		if (preg_match('/ok$/', $value)) {			$value = preg_replace('/(ok)$/', '<span class="green">\1</span>', $value);		}		if (preg_match('/failed$/', $value)) {			$value = preg_replace('/(failed)$/', '<span style="color: #ff0000">\1</span>', $value);		}		if (preg_match('/^install ok:/', $value)) {			$value = preg_replace('/^(install ok:)/', '<span class="green">\1</span>', $value);		}		if (preg_match('/^Warning:/', $value)) {			$value = '<span style="color: #ff0000">'.$value.'</span>';		}		echo nl2br($value);	} elseif ($page == 'Welcome') {?>			<span class="title">Welcome to go-pear <?php echo GO_PEAR_VER; ?>!</span><br/>			<br/>			Go-pear will install the Web Frontend of the PEAR Installer and all the needed <br/>			files. This frontend is your tool for PEAR installation and maintenance.<br/>			<br/>			Go-pear also lets you download and install the PEAR packages bundled<br/>			with PHP: <?php echo implode(', ', $GLOBALS['pfc_packages']); ?>.<br/>			<br/>			<a href="<?php echo basename(__FILE__); ?>?step=config" class="green">Next &gt;&gt;</a><?php	} elseif ($page == 'config') {		if (!empty($GLOBALS['http_proxy'])) {			list($proxy_host, $proxy_port) = explode(':', $GLOBALS['http_proxy']);		} else {			$proxy_host = $proxy_port = '';		}?>			<form action="<?php echo basename(__FILE__);?>?step=install" method="post">			<span class="title">Configuration</span><br/>			<br/>			HTTP proxy (host:port):			<input type="text" name="proxy[host]" value="<?php echo $proxy_host;?>">			<input type="text" name="proxy[port]" value="<?php echo $proxy_port;?>" size="6">			<br/><br/><hr/><br/>			Below is a suggested file layout for your new PEAR installation. <br/>			<br/>			<table border="0">			  <TR>			    <TD valign="top"><img src="<?php echo basename(__FILE__); ?>?action=img&amp;img=note" border="0"></TD>				<TD>		  		  <span class="green">			        <b>Note:</b> Make sure that PHP has the permission to access the specified<br/>			        directories.<br/><br/>			      </span>                </TD>			  </TR>			</table>			<TABLE border="0"><?php	// Display error messages		if (isset($GLOBALS['www_errors']) && sizeof($GLOBALS['www_errors']) ) {		    $www_errors = $GLOBALS['www_errors'];		    echo "<tr><td>";		    echo '<span class="red">ERROR(S):</span>';		    echo "</td></tr>";		    foreach ($www_errors as $n => $var) {		        echo "<tr><td>";		        echo '<span class="red">'.$GLOBALS['config_desc'][$n].': </span>';		        echo "</td><td>";		        echo '<span class="red">'.$www_errors[$n].'</span>';		        echo "<br>\n";		        echo "</td></tr>\n";		    }		}		foreach ($GLOBALS['config_vars'] as $n => $var) {			printf('<tr><td>%d. %s</td><td><input type="text" name="config[%s]" value="%s"></td></tr>',			$n,			$GLOBALS['config_desc'][$var],			$var,			$GLOBALS[$var]);		}?>			</TABLE>			<br/><hr/><br/>			The following PEAR packages are common ones, and can be installed<br/>			by go-pear too: <br/><?php	echo implode(', ', $GLOBALS['pfc_packages']);?>			.<br/>			<input type="checkbox" name="install_pfc" <?php if($GLOBALS['install_pfc']) echo 'checked';?>> Install those too<br/>			<br/><br/>			<table border="0">			  <TR>			    <TD valign="top"><img src="<?php echo basename(__FILE__); ?>?action=img&amp;img=note" border="0"></TD>				<TD>		  		  <span class="green">					  <b>Note:</b> Installation might take some time, because go-pear has to download<br/>					  all needed files from pear.php.net. Just be patient and wait for the next<br/>					  page to load.<br/>			      </span>                </TD>			  </TR>			</table>			<br>			<input type="checkbox" name="BCmode" id="BCmode" checked> Compatibility-Mode for old non-DOM Browsers<br/>			<script type="text/javascript">			<!--				if (document.getElementById('BCmode')) {					document.getElementById('BCmode').checked = 0;				};			// -->			</script><?php		if (WINDOWS && phpversion() == '4.1.1') {?>					<table border="0">					  <TR>					    <TD valign="top"><img src="<?php echo basename(__FILE__); ?>?action=img&amp;img=note" border="0"></TD>						<TD>				  		  <span style="color: #ff0000">							  <b>Warning:</b> Your PHP version (4.1.1) might be imcompatible with go-pear due to a bug<br/>							  in your PHP binary. If the installation crashes you might want to update your PHP version.</br>					      </span>		                </TD>					  </TR>					</table><?php		}?>			<br/>			<input type="submit" value="Install" onClick="javascript: submitButton.value='Downloading and installing ... please wait ...'" name="submitButton">			</form><?php	} elseif ($page == 'install') {?>			<span class="title">Installation Complete - Summary</span><br/><?php		displayHTMLInstallationSummary($data);	} elseif ($page == 'preinstall') {?>			<span class="title">Installation in progress ...</span><br/>			<br/>			<script language="javascript">			<!--				var progress;				var downlodprogress;				progress = 0;				downloadprogress = 0;				function setprogress(value)				{					progress = value;					prog = document.getElementById('installation_progress');					prog.innerHTML = progress + " %";					progress2 = progress / 10;					progress2 = Math.floor(progress2);					for (i=0; i < 10; i++)						document.getElementById('progress_cell_'+i).style.backgroundColor = "#cccccc";					switch(progress2)					{						case 10:							document.getElementById('progress_cell_9').style.backgroundColor = "#006600";						case  9:							document.getElementById('progress_cell_8').style.backgroundColor = "#006600";						case  8:							document.getElementById('progress_cell_7').style.backgroundColor = "#006600";						case  7:							document.getElementById('progress_cell_6').style.backgroundColor = "#006600";						case  6:							document.getElementById('progress_cell_5').style.backgroundColor = "#006600";						case  5:							document.getElementById('progress_cell_4').style.backgroundColor = "#006600";						case  4:							document.getElementById('progress_cell_3').style.backgroundColor = "#006600";						case  3:							document.getElementById('progress_cell_2').style.backgroundColor = "#006600";						case  2:							document.getElementById('progress_cell_1').style.backgroundColor = "#006600";						case  1:							document.getElementById('progress_cell_0').style.backgroundColor = "#006600";					};				}				function addprogress(value)				{					progress += value;					setprogress(progress);				}				function setdownloadfile(value)				{					setdownloadprogress(0);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -