<?php
error_reporting(E_ERROR | E_WARNING | E_PARSE);
define('IN_HDWIKI', TRUE);
define('HDWIKI_ROOT', '../');
$lang_name=$_COOKIE['lang_name'];
if(isset($_REQUEST['lang'])){
$lang_name = $_REQUEST['lang'];
setcookie('lang_name',$lang_name);
}
if(!file_exists(HDWIKI_ROOT."/lang/$lang_name/install.php")) {
$lang_name='zh';
}
require HDWIKI_ROOT."/lang/$lang_name/install.php";
require HDWIKI_ROOT.'/version.php';
require HDWIKI_ROOT.'/model/base.class.php';
$step = (isset ($_GET['step'])) ? $_GET['step'] : $_POST['step'];
if (file_exists(HDWIKI_ROOT.'/data/install.lock') && $step != '8') {
echo "<font color='red'>{$lang['tipAlreadyInstall']}</font>";
exit();
}
$dbcharset = $lang['commonDBCharset'];
header("Content-Type: text/html; charset={$lang['commonCharset']}");
$installfile = basename(__FILE__);
$configfile = HDWIKI_ROOT.'/config.php';
$logofile = HDWIKI_ROOT.'/style/default/logo.gif';
$sqlfile = HDWIKI_ROOT.'/install/hdwiki.sql';
if (!is_readable($sqlfile)) {
exit ($strDBNoExists);
}
require HDWIKI_ROOT.'/install/install_func.php';
if (''==$step)
$step = 1;
$arrTitle = array (
"",
$lang['commonLicenseInfo'],
$lang['commonSystemCheck'],
$lang['commonDatabaseSetup'],
$lang['commonAdministratorSetup'],
'创建数据表',
$lang['commonInstallComplete']
);
$arrStep = range(0, 5);
$nextStep = $step +1;
$prevStep = $step -1;
if($step==3){
$nextStep=$step;
$prevStep=$step;
}
$nextAccess = 1;
$uploadsDir = HDWIKI_ROOT.'/uploads';
$dataDir = HDWIKI_ROOT.'/data';
$pluginDir =HDWIKI_ROOT.'/plugins';
$site_url="http://".$_SERVER['HTTP_HOST'].substr($_SERVER['PHP_SELF'],0,-20);
//$post['domain']=$site_url;
//$post['step']=$step;
//$postquery = http_build_query($post);
$apiurl='http://localhost/count2/installlog.php';
$isone = false;
$extend = '';
//util::hfopen($apiurl,0,$postquery);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo $lang['commonInstallTitle']?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $lang['commonCharset']?>">
<meta content="noindex, nofollow" name="robots">
<link rel="stylesheet" href="images/install.css" type="text/css" media="screen,projection" />
<script language="JavaScript" type="text/javascript">
function selectlang(lang){
var selectlang = document.getElementById(lang);
var curstep = <?php echo $step?>;
var langvalue = selectlang.options[selectlang.selectedIndex].value;
window.location = "install.php?step="+curstep+"&lang="+langvalue;
}
function checkConfig(E){
if(E.value) E.value = E.value.replace(/[^0-9a-z_]/gi, '');
}
</script>
</head>
<body>
<div id="container">
<div id="header">
<div id="logo"></div>
<div id="topheader">
<p><strong>HDWiki V<?php echo HDWIKI_VERSION?> Release <?php echo HDWIKI_RELEASE?></strong></p>
<p><?php echo $lang['commonSetupLanguage'] ?>
<select id="lang" name="lang" onchange="selectlang('lang');">
<option value="zh"<?php if('zh' == $lang_name) { ?> selected="selected"<?php } ?>> <?php echo $lang['zh']?></option>
</select>
</p>
</div>
</div>
<div id="content-wrap">
<div id="menu">
<ul class="sidemenu">
<li class="navtitle"><?php echo $lang['commonSetupNavigate']?></li>
<?php
$steptotal = count($arrTitle);
for ($i = 1; $i < $steptotal; $i++) {
if ($step >= $arrStep[$i]) {
if($step==$i) {
$href1 = "<li class=\"sidemenubg\">";
$href2 = "</li>";
}else{
$href1 = "<li><a href='$installfile?step=" . $arrStep[$i] . "'>";
$href2 = "</a></li>";
}
} else {
$href1 = "<li><a>";
$href2 = "</a></li>";
}
?>
<?php echo $href1.$i.". ".$arrTitle[$i].$href2?>
<?php } ?>
</ul>
<p class="lbox"> <?php echo $lang['tipLeftHelp']?></p>
</div>
<div id="main">
<?php if($step!=7){?><form name="settingsform" method="post" action="<?php echo $installfile; ?>"><?php }?>
<?php switch ($step) {
case 1 :
if ($msg) {
$str = "<p>" . $msg . "</p>";
}
if ($nextAccess == 1)
$str = "<div id=\"tips\"><div class=\"log\">{$lang['step1ReadLicense']}</div><div class=\"mes\"><div align=\"center\"><textarea style=\"width: 94%; height: 300px;\">" . $lang['step1LicenseInfo'] . "</textarea></div><br /><div align=\"center\"><input type=\"submit\" value=\"{$lang['step1Agree']}\" class=\"inbut1\"> <input type=\"button\" value=\"{$lang['step1Disagree']}\" class=\"inbut\" onclick=\"javascript:window.close();\"></div></div>";
break;
case 2 :
$fileConfigAccess = file_writeable($configfile);
$filelogoAccess=file_writeable($logofile);
$dirUploadsAccess = file_writeable($uploadsDir);
$dirDataAccess = file_writeable($dataDir);
$dirPluginAccess = file_writeable($pluginDir);
if(@ini_get("file_uploads")) {
$max_size = @ini_get(upload_max_filesize);
$curr_upload_status = "<font class=\"s4_color\">{$lang['step2AttachAllowSize']}: $max_size</font>";
} else {
$curr_upload_status = "<font color='red'>{$lang['step2AttachDisabled']}</font>";
$msg .= "<span class='err'>{$lang['step2AttachDisabledTip']}</span><br>";
$nextAccess=0;
$extend .= '{A}'.$lang['step2AttachDisabledTip']."\n";
}
$curr_php_version = PHP_VERSION;
if ($curr_php_version < '4.1.0') {
$curr_php_version = "$curr_php_version <font color='red'>{$lang['step2PHPVersionTooLowTip']}</font>";
$nextAccess = 0;
$extend .= '{B}'.$lang['step2PHPVersionTooLowTip']."\n";
}
if (!function_exists('mysql_connect')) {
$MySQLVersion = "<font color='s3_color'>{$lang['commonUnsupport']}</font>";
$nextAccess = 0;
$extend .= '{C}'.'mysql'.$lang['commonUnsupport']."\n";
} else {
$MySQLVersion = "<font class='s2_color'>{$lang['commonSupport']}</font>";;
}
$curr_disk_space = intval(diskfreespace('.') / (1024 * 1024)).'M';
$os = strtoupper(substr(PHP_OS, 0, 3));
$curOs = PHP_OS;
if ($fileConfigAccess) {
$fileConfigAccessTip = "<font class='s1_color'>{$lang['commonWriteable']}</font>";
}else{
$fileConfigAccessTip = "<font class='s3_color'>{$lang['commonNotWriteable']}</font>";
$nextAccess = 0;
$extend .= '{D}'.'configfile'.$lang['commonWriteable']."\n";
}
if ($filelogoAccess) {
$filelogoAccessTip = "<font class='s1_color'>{$lang['commonWriteable']}</font>";
}else{
$filelogoAccessTip = "<font class='s3_color'>{$lang['commonNotWriteable']}</font>";
$nextAccess = 0;
$extend .= '{E}'.'logofile'.$lang['commonWriteable']."\n";
}
if ($dirUploadsAccess) {
$dirUploadsAccessTip = "<font class='s1_color'>{$lang['commonWriteable']}</font>";
}else{
$dirUploadsAccessTip = "<font class='s3_color'>{$lang['commonNotWriteable']}</font>";
$nextAccess = 0;
$extend .= '{F}'.'logofile'.$lang['commonWriteable']."\n";
}
if ($dirDataAccess ) {
$dirDataAccessTip = "<font class='s1_color'>{$lang['commonWriteable']}</font>";
}else{
$dirDataAccessTip = "<font class='s3_color'>{$lang['commonNotWriteable']}</font>";
$nextAccess = 0;
$extend .= '{G}'.'dirData'.$lang['commonWriteable']."\n";
}
if ($dirPluginAccess ) {
$dirPluginAccessTip = "<font class='s1_color'>{$lang['commonWriteable']}</font>";
}else{
$dirPluginAccessTip = "<font class='s3_color'>{$lang['commonNotWriteable']}</font>";
$nextAccess = 0;
$extend .= '{H}'.'dirPlugin'.$lang['commonWriteable']."\n";
}
$str = $str."<div id=\"tips\">{$lang['step2Tip']}</div>";
$str = $str."<div id=\"wrapper\">
<table class=\"table_nav\">
<tr class=\"nav_bar\">
<td></td>
<td>HDWiki {$lang['commonConfigRequire']}</td>
<td>HDWiki {$lang['commonConfigOptimized']}</td>
<td>{$lang['commonConfigCurrent']}</td>
</tr>
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论

















收起资源包目录





































































































共 1296 条
- 1
- 2
- 3
- 4
- 5
- 6
- 13
资源评论


郭某某某
- 粉丝: 0
- 资源: 29
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


安全验证
文档复制为VIP权益,开通VIP直接复制
