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

📄 index.php

📁 Try2php整站系统(Try2php CMS)Try2php整站系统(Try2php CMS)
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?
if (!file_exists('install.lock'))
{
$act=$_GET[act];
$step=$_GET[step];
$view=$_GET[view];
if ($view=="")
{
if ($act=="") {$StepDo[0]='step_doing'; $j=0; $NextAct="requirement";}
else if ($act=="requirement") {$StepDo[1]='step_doing'; $j=1; $NextAct="CheckDIR";}
else if ($act=="CheckDIR") {$StepDo[2]='step_doing'; $j=2; $NextAct="SetDBInfo";}
else if ($act=="SetDBInfo") {$StepDo[3]='step_doing'; $j=3; $NextAct="AddDBTable";}
else if ($act=="AddDBTable") {$StepDo[4]='step_doing'; $j=4; $NextAct="SetManager";}
else if ($act=="SetManager") {$StepDo[5]='step_doing'; $j=5; $NextAct="Finish";}
else if ($act=="Finish") {$StepDo[6]='step_doing'; $j=6; $NextAct="";}
?>
<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
		<title>欢迎进入Try2php CMS安装程序</title>
		<style type='text/css' media='all'>
			@import url('install.css');
		td{font-family:arial,sans-serif;}
.almost_half_cell {width:49%}
</style>
		<script type='text/javascript'>
			//<![CDATA[
		  		if (top.location != self.location) { top.location = self.location }
				var use_enhanced_js = 1;
			//]]>
		</script>
		<script type="text/javascript" src='ips_xmlhttprequest.js'></script>
	</head>
	<body>
		<p> </p>
		<p> </p>
		<p> </p>
		<form id='install-form' action='index.php?act=<?=$NextAct?>' method='post'>
		<input type='hidden' name='saved_data' value='b%3A0%3B'>

		<div id='ipswrapper'>
		    <div class='main_shell'>

		 	    <h1><img src='images/package_icon.gif' align='absmiddle' /> 
				欢迎进入Try2php CMS安装程序</h1>
		 	    <div class='content_shell'>
		 	        <div class='package'>
		 	            <div>
		 	                <div class='install_info'>
		 	                    <h3>安装步骤</h3>
 <ul id='progress'>
<?


for ($i=0;$i<$j;$i++) $StepDo[$i]="step_done";
for ($i=$j+1;$i<7;$i++) $StepDo[$i]="step_notdone";
?>
<li class='<?=$StepDo[0]?>'>许可协议</li>
<li class='<?=$StepDo[1]?>'>系统需求</li>
<li class='<?=$StepDo[2]?>'>检查目录权限</li>
<li class='<?=$StepDo[3]?>'>设置数据库信息</li>
<li class='<?=$StepDo[4]?>'>建立系统数据表</li>
<li class='<?=$StepDo[5]?>'>设置初始管理员</li>
<li class='<?=$StepDo[6]?>'>安装完成</li>    		 	                </ul>
    		 	            </div>

    		 	            <div class='content_wrap'>
    		 	                <div style='border-bottom: 1px solid #939393; padding-bottom: 4px;'>
    		 	                    <div class='float_img'>
    		 	                        <img src='images/box.gif' />
    		 	                    </div>

    		 	                    <div style='vertical-align: middle'>
    		 	                        <h2>Try2php CMS 安装程序</h2>
    		 	                        <strong>1.00</strong>
    		 	                    </div>
    		 	                </div>
    		 	                <div style='clear:both'></div>

        		 	                    		 	            <div>
<?
if ($act=="" and $step=="")
{
?>
<div style='float: left; margin-right: 7px; margin-left: 5px;'>
<img src='images/wizard.gif' align='absmiddle' />
</div>
<div>
欢迎进入Try2php CMS安装程序. 此向导会引导您完成整个安装过程.请先阅读用户许可协议,阅读完成请选择"我同意上述许可协议".</div>
</div>
<table border="0" width="98%">
	<tr>
		<td>
		 <div class='eula'>
		<p align="center"><b><font size="3">
		Try2php CMS最终用户许可协议</font></b></p>
		<p align="left">重要须知--请认真阅读:<br>
		<br>
		1 程序版权声明:<br>
		<br>
		1.1 “Try2php CMS”是由Try2实验室独立开发的基于PHP+Mysql+AJAX技术构建的整站程序。<br>
		1.2 “Try2php整站程序”为本程序的中文名称,“Try2php CMS”为本程序的英文名称。<br>
		1.3&nbsp;“Try2实验室”是指:主页为“<a target="_blank" href="http://try2.org">try2.org</a>”的
		技术团队。<p align="left">

		2&nbsp; “Try2php CMS”授权范围:<br>
		<br>
		2.1 Try2实验室公开发布“Try2php CMS”程序源码,Try2实验室授权任何通过正当途径获得源码的网络用户个体或团体在遵循使用条例的情况下使用本程序。
		 <p align="left">3. “Try2php CMS”使用条例<p align="left">3.1 
		使用时希望您能保留“Try2php CMS”首页版本信息,保证版本信息的完整性,如不保留版本信息我们将不能保证您能正常使用后台的版本更新程序。 <br>3.2 
		除3.1规定外您可以免费的无限制的使用“Try2php CMS”。<p align="left">4 “Try2php CMS”程序修改及程序传播协议:<p align="left">
		4.1 如您对“Try2php CMS”进行了修改(包括优化和美化)并准备发布,那么请您注明原程序的版本号,并且说明文档内需保留程序版权属于Try2实验室的说明。
		程序发布的名称必须遵循“Try2php CMS xxx修改版”的格式,(“xxx”为修改者个人或团体的名称)。<br>4.2 
		请不要将“Try2php CMS”以任何形式出售,只可以根据用户协议进行免费的传播,否则Try2实验室将追究传播者责任。<br> 
		4.3 除Try2实验室公告声明没有资格使用的个体或团体以外,任何个人或团体都有权利下载,并且在遵循用户协议的前提下使用、修改或传播“Try2php CMS”。<br>
		4.4 若您修改并发布了“Try2php CMS”的修改版,您没有更多的义务,但希望您能够对互联网的技术和资源共享出一份力。<p align="left">
		<br>
		5 Try2实验室对于“Try2php CMS”的权利和义务<br>
		<br>
		5.1 Try2实验室有权利对程序的任何部分进行修改和删除。“任何部分”包括程序源码、更新程序服务端源码、说明文档、使用手册和用户协议等。<br>
		5.2 Try2实验室保留停止更新“Try2php CMS”的权利。<br>
		5.3 Try2实验室保留停止公开“Try2php CMS”源代码的权利。<br>
		5.4 Try2实验室保留商业化发行“Try2php CMS”的权利。<br>
		5.5 理论上Try2实验室对于免费的“Try2php 
		CMS”没有任何义务。但Try2实验室声明,在Try2实验室公开声明停止更新“Try2php CMS”之前有义务尽力修补更新“Try2php 
		CMS”的每一个已知的安全漏洞。<br>
		<br>
		6 其他条款<br>
		<br>
		6.1 本协议所规定的任何条款的部分或全部无效者,不影响其它条款的效力。<br>
		6.2 
		本协议的解释、效力及纠纷的解决,适用于中华人民共和国法律。若用户和Try2实验室之间发生任何纠纷或争议,首先应友好协商解决,协商不成的,用户在此完全同意将纠纷或争议提交Try2实验室所在地法院管辖。<br>
		<br>
		Try2实验室保留对本协议的最终解释权。<br>
		<br></div><hr>
		<input type='checkbox' name='Agree' id='Agree'><label for='Agree'>我同意上述许可协议</label>
<?
}
else if ($act=="requirement")
{?>
<div style='float: left; margin-right: 7px; margin-left: 5px;'>
<img src='images/wizard.gif' align='absmiddle' />
</div>
<div>
在点击下一步之前,确认您的php和mysql版本是否符合要求,并确认您的指定目录权限是否符合要求。</div>
</div>
<br>
<table border="0" width="98%">
	<tr>
		<td>
<div id='warn-message' style='display:none;'><center><div id='warn-message-content'></div></center></div>

<fieldset>
	<legend><font size="2">系统需求</font></legend>
		<b>PHP:</b> PHP5或更高版本
		<br>
		<b>Mysql:</b> Mysql5或更高版本
		<br>
		您需要建立一个默认字符集为"utf8_general_ci"的数据库,并且需要您拥有一个对于此数据库拥有完全操作权限的Mysql用户。
		<br>
		<b>需要将以下目录权限设为777:</b><br>
		1. /<br>
		2. /install<br>
		3. /uploads<br>
		4. /admin<br><br>
		<b><a href='index.php?view=phpinfo' target=_blank><font color=blue>点击此处查看我的服务器信息</font></b><br>
</fieldset>
</div>
</div>
<?
}
else if ($act=="CheckDIR")
{?>
<div style='float: left; margin-right: 7px; margin-left: 5px;'>
<img src='images/wizard.gif' align='absmiddle' />
</div>
<div>
此页面列出了指定的目录权限信息检查结果,如出现红色字则表示不符合安装要求,请重新设置权限,然后点击重新检查。</div>
</div>
<br>
<table border="0" width="100%">
	<tr>
		<td>
<div id='warn-message' style='display:none;'><center><div id='warn-message-content'></div></center></div>
<fieldset>
	<legend><font size="2">检查目录权限</font></legend>
<?	function file_perms($file, $octal = false)
	{
	    if(!file_exists($file)) return false;
	    $perms = fileperms($file);
	    $cut = $octal ? 2 : 3;
	    return substr(decoct($perms), $cut);
	}
	$SecNum[1]=file_perms('../',true);
	$SecNum[2]=file_perms('../install',true);
	$SecNum[3]=file_perms('../uploads',true);
	$SecNum[4]=file_perms('../admin',true);
	
	for ($i=1;$i<5;$i++)
	{
		if ($SecNum[$i]!="777")
		{
			$SecNum[$i]="<font color=red>".$SecNum[$i]."</font>";
			$SecError='1';
		}
	}
	echo "<br><p>1. / 目录权限检查..................................................................................权限:".$SecNum[1]."</p>";
	echo "<p>2. /install 目录权限检查.........................................................................权限:".$SecNum[2]."</p>";
	echo "<p>3. /uploads 目录权限检查.....................................................................权限:".$SecNum[3]."</p>";
	echo "<p>4. /admin 目录权限检查........................................................................权限:".$SecNum[4]."</p>";
	if ($SecError=='1')
	echo "<font color=red>请将您的目录权限设置正确,然后点击此按钮</font><input type=button onclick=window.location='index.php?act=CheckDIR' class='nav_button' value='重新检查'><br><br>";
	else echo "<br><br>";
?>
</fieldset>
</div>
</div>
<?}
else if ($act=="SetDBInfo")
{?>
<div style='float: left; margin-right: 7px; margin-left: 5px;'>
<img src='images/wizard.gif' align='absmiddle' />
</div>
<div>
如果您不清楚以下任何一个设定,请咨询您的服务器提供商,您必须先建立一个数据库,然后进行安装.</div>
</div>
<br>
<table border="0" width="100%" id="table1">
	<tr>
		<td>
<div id='warn-message' style='display:none;'><center><div id='warn-message-content'></div></center></div>
<fieldset>
	<legend><font size="2">检查目录权限</font></legend>
<table style='width: 100%; border: 0px; padding:0px' cellspacing='0'>
<tr><td width='30%' class='title'>主 机:</td><td width='70%' class='content'><input type=text name='SQLHost' class='sql_form' value='localhost'></td></tr>
<tr><td width='30%' class='title'>数据库名:</td><td width='70%' class='content'><input type=text name='DataBase' class='sql_form'></td></tr>
<tr><td width='30%' class='title'>Mysql用户名:</td><td width='70%' class='content'><input type=text name='SQLUser' class='sql_form'></td></tr>
<tr><td width='30%' class='title'>Mysql密 &nbsp; 码:</td><td width='70%' class='content'><input type=password name='SQLpwd' class='sql_form'></td></tr>
<tr><td width='30%' class='title'>数据库表名前缀:</td><td width='70%' class='content'><input type=text name='SQLPrefix' class='sql_form' value='tpc_'></td></tr>
<tr><td width='30%' class='title'></td><td width='70%' class='content'>数据库表名前缀只可以是字母与下划线的组合。</td></tr>
</table>
</fieldset>
</div>
</div>
<?
}
else if ($act=="AddDBTable")
{
	$SQLHost=$_POST[SQLHost];
	$DataBase=$_POST[DataBase];
	$SQLUser=$_POST[SQLUser];
	$SQLpwd=$_POST[SQLpwd];
	$SQLPrefix=$_POST[SQLPrefix];
	
	$dbcon="<?if ($"."IncludeDBCON!='true'){include('sqlfiltrate.php');}include('main/vsn.php');$"."connect = @mysql_connect('".$SQLHost."','".$SQLUser."','".$SQLpwd."');mysql_select_db('".$DataBase."',$"."connect);$"."prefix='".$SQLPrefix."';$"."SysVersion=$"."MyVersion.' '.$"."MyVersion1.' '.$"."MyVersion2;?>";

?>
<div style='float: left; margin-right: 7px; margin-left: 5px;'>
<img src='images/wizard.gif' align='absmiddle' />
</div>
<div>

⌨️ 快捷键说明

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