<?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(!$lang_name){
$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();
}
if(!ini_get('short_open_tag')) {
echo "<font color='red'>{$lang['shortOpenTagInvalid']}</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';
$userfaceDir = HDWIKI_ROOT.'/uploads/userface';
$dataDir = HDWIKI_ROOT.'/data';
$pluginDir =HDWIKI_ROOT.'/plugins';
$site_url="http://".$_SERVER['HTTP_HOST'].substr($_SERVER['PHP_SELF'],0,-20);
?>
<!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);
$dirUserfaceAccess = file_writeable($userfaceDir);
$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;
}
$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;
}
if (!function_exists('mysql_connect')) {
$MySQLVersion = "<font color='s3_color'>{$lang['commonUnsupport']}</font>";
$nextAccess = 0;
} 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;
}
if ($filelogoAccess) {
$filelogoAccessTip = "<font class='s1_color'>{$lang['commonWriteable']}</font>";
}else{
$filelogoAccessTip = "<font class='s3_color'>{$lang['commonNotWriteable']}</font>";
$nextAccess = 0;
}
if ($dirUploadsAccess) {
$dirUploadsAccessTip = "<font class='s1_color'>{$lang['commonWriteable']}</font>";
}else{
$dirUploadsAccessTip = "<font class='s3_color'>{$lang['commonNotWriteable']}</font>";
$nextAccess = 0;
}
if ($dirUserfaceAccess) {
$dirUserfaceAccessTip = "<font class='s1_color'>{$lang['commonWriteable']}</font>";
}else{
$dirUserfaceAccessTip = "<font class='s3_color'>{$lang['commonNotWriteable']}</font>";
$nextAccess = 0;
}
if ($dirDataAccess ) {
$dirDataAccessTip = "<font class='s1_color'>{$lang['commonWriteable']}</font>";
}else{
$dirDataAccessTip = "<font class='s3_color'>{$lang['commonNotWriteable']}</font>";
$nextAccess = 0;
}
if ($dirPluginAccess ) {
$dirPluginAccessTip = "<font class='s1_color'>{$lang['commonWriteable']}</font>";
}else{
$dirPluginAccessTip = "<font class='s3_color'>{$lang['commonNotWriteable']}</font>";
$nextAccess = 0;
}
$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>
<tr>
<td>{$lang['commonOS']}</td>
<td>{$lang['commonUnlimited']}</td>
<td class=\"s1_color\">UNIX/Linux/FreeBSD </td>
<td class=\"s4_color\">$curOs</td>
</tr>
<tr>
<td>PHP {$lang['commonVersion']}</td>
<td>4.1.0+ </td>
<td class=\"s1_c
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
互动百科hdwiki5.0-utf-8 (708个子文件)
hdwiki.css 38KB
admin.css 16KB
editor.css 9KB
gray.css 5KB
install.css 5KB
gb_styles.css 2KB
content.css 2KB
common.css 1KB
rss_style.css 1KB
content.css 1KB
install.css 871B
1280483039ysMVbk9b.gif 59KB
image002.gif 58KB
image001.gif 57KB
image005.gif 51KB
1280484381eiJRbLHZ.gif 36KB
image003.gif 36KB
6-2.gif 34KB
1280484396d6hN0GoI.gif 34KB
image004.gif 31KB
login_head.gif 27KB
6-1.gif 22KB
1280484381eiJRbLHZ_s.gif 14KB
1280484396d6hN0GoI_s.gif 12KB
loading.gif 11KB
1280483039ysMVbk9b_s.gif 10KB
1280478734FqlmXXjw.gif 10KB
theme_bg.gif 8KB
indicator.gif 8KB
indicator.gif 8KB
1280478734FqlmXXjw_s.gif 8KB
imgupload.gif 6KB
btn01.gif 6KB
login_bg.gif 5KB
logo.gif 5KB
1280484396d6hN0GoI_140.gif 5KB
logo.gif 5KB
f_1280483039ysMVbk9b_s.gif 5KB
1280484381eiJRbLHZ_140.gif 5KB
f_1280484381eiJRbLHZ_s.gif 4KB
1280483039ysMVbk9b_140.gif 4KB
btnMap.gif 3KB
t_lbox1.gif 3KB
1280478734FqlmXXjw_140.gif 3KB
s_f_1280484381eiJRbLHZ_s.gif 3KB
bg_leftcol.gif 3KB
s_f_1280483039ysMVbk9b_s.gif 3KB
logo_view.gif 3KB
useful_for_me.gif 2KB
reg_01.gif 2KB
reg_03.gif 2KB
nredeem.gif 2KB
loading.gif 2KB
img_sea_bg.gif 2KB
hot.gif 2KB
success.gif 2KB
sea_doc.gif 2KB
reg_02.gif 2KB
usergroupset.gif 1KB
logo.gif 1KB
logo.gif 1KB
logo.gif 1KB
novice.gif 1KB
btn_bg.gif 1KB
menu-box_b.gif 1KB
menu-box_b2.gif 1KB
header_bg.gif 1KB
sea_input_bg.gif 1KB
shine.gif 1KB
inp_btn_bg.gif 1KB
yahoo.gif 1KB
ie.gif 1KB
vivi.gif 1KB
bg_box_hand.gif 1010B
login_btn.gif 999B
hexun.gif 995B
365key.gif 988B
baidu.gif 982B
qq.gif 978B
folder.gif 952B
yesky.gif 936B
dwsct_tit.gif 927B
google.gif 908B
redeem.gif 893B
delicious.gif 873B
nav_li_a.gif 841B
bg_120.gif 794B
map.gif 788B
bg_x.gif 750B
share_bg.gif 737B
nav_li.gif 695B
excellent.gif 676B
zip.gif 648B
redeem_tips.gif 646B
bang_tj.gif 639B
reply.gif 631B
ksh.gif 631B
left_bg.gif 630B
wav.gif 627B
star_level3.gif 627B
共 708 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8
资源评论
- 我真不是大牛2013-10-08最近在做wiki二次开发,正好需要utf-8的源码用来学习,挺好的东西,多些分享。
xiongyiong4
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功