begin of thinksaas 3.68

Signed-off-by: kevin <kevin@lmve.net>
This commit is contained in:
2023-06-22 13:33:25 +08:00
commit 963ec1b2ea
2746 changed files with 331806 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
<?php
defined('IN_TS') or die('Access Denied.');
//判断目录可写
$f_cache = iswriteable('cache');
$f_data = iswriteable('data');
$f_uploadfile = iswriteable('uploadfile');
$f_tslogs = iswriteable('tslogs');
$f_upgrade = iswriteable('upgrade');
#检测必要组件
#$e_mysql = 0;
$e_dom = 0;
$e_mbstring = 0;
$e_gd = 0;
$e_mysqli = 0;
$e_openssl = 0;
$e_session = 0;
$e_SimpleXML = 0;
#$e_mcrypt = 0;
$e_json = 0;
$e_iconv = 0;
$e_fileinfo = 0;
$e_curl = 0;
if(extension_loaded('dom')) $e_dom=1;#dom
if(extension_loaded('mbstring')) $e_mbstring=1;#mbstring
if(extension_loaded('gd')) $e_gd=1;#gd
#if(extension_loaded('mysql')) $e_mysql=1;#mysql
if(extension_loaded('mysqli')) $e_mysqli=1;#mysqli
if(extension_loaded('openssl')) $e_openssl=1;#openssl
if(extension_loaded('session')) $e_session=1;#session
if(extension_loaded('SimpleXML')) $e_SimpleXML=1;#SimpleXML
#if(extension_loaded('mcrypt')) $e_mcrypt=1;#mcrypt
if(extension_loaded('json')) $e_json=1;#json
if(extension_loaded('iconv')) $e_iconv=1;#iconv
if(extension_loaded('Fileinfo')) $e_fileinfo=1;#Fileinfo
if(extension_loaded('curl')) $e_curl=1;#curl
include 'install/html/index.html';
+6
View File
@@ -0,0 +1,6 @@
<?php
defined('IN_TS') or die('Access Denied.');
$site_url = getHttpUrl();
include 'install/html/next.html';
+133
View File
@@ -0,0 +1,133 @@
<?php
defined ( 'IN_TS' ) or die ( 'Access Denied.' );
$host = trim ( $_POST ['host'] );
$port = trim ( $_POST ['port'] );
$user = trim ( $_POST ['user'] );
$pwd = trim ( $_POST ['pwd'] );
$name = trim ( $_POST ['name'] );
$pre = trim ( $_POST ['pre'] );
$select_sql = trim ( $_POST ['sql'] );
define('dbprefix', $pre);
if(!function_exists('mysqli_connect') && $select_sql=='mysqli') qiMsg('PHP环境未安装MySQLi函数库!');
$arrdb = array (
'host' => $host,
'port' => $port,
'user' => $user,
'pwd' => $pwd,
'name' => $name,
'pre' => $pre
);
// 网站信息
$site_title = trim ( $_POST ['site_title'] );
$site_subtitle = trim ( $_POST ['site_subtitle'] );
$site_url = trim ( $_POST ['site_url'] );
$site_pkey = trim ( $_POST ['site_pkey'] );#网站私钥
// 用户信息
$email = trim ( $_POST ['email'] );
$password = trim ( $_POST ['password'] );
$username = trim ( $_POST ['username'] );
if (! preg_match ( "/^[\w_]+_$/", $pre ))
qiMsg ( "数据表前缀不符合(例如:ts_)" );
if ($site_title == '' || $site_subtitle == '' || $site_url == '')
qiMsg ( "网站信息不能为空!" );
if ($email == '' || $password == '' || $username == '')
qiMsg ( "用户信息不能为空!" );
if (valid_email ( $email ) == false)
qiMsg ( "Email输入有误!" );
include 'thinksaas/'.$select_sql.'.php';
$db = new MySql ( $arrdb );
$mysql_version = $db->getMysqlVersion();
if(substr($mysql_version, 0, 3)<5.5){
qiMsg('MySQL数据库版本过低,请升级MySQL到5.4以上版本,建议5.5或者5.6');
}
include 'thinksaas/tsApp.php';
// MySQL数据库缓存
include 'thinksaas/tsMySqlCache.php';
$tsMySqlCache = new tsMySqlCache ( $db );
if ($db) {
$sql = file_get_contents ( 'install/install.sql' );
$sql = str_replace ( 'ts_', $pre, $sql );
$array_sql = preg_split ( "/;[\r\n]/", $sql );
foreach ( $array_sql as $sql ) {
$sql = trim ( $sql );
if ($sql) {
if (strstr ( $sql, 'CREATE TABLE' )) {
preg_match ( '/CREATE TABLE ([^ ]*)/', $sql, $matches );
$ret = $db->query ( $sql );
} else {
$ret = $db->query ( $sql );
}
}
}
// 存入管理员数据
$salt = md5 ( rand () );
$userid = $db->query ( "insert into " . $pre . "user (`pwd` , `salt`,`email`,`phone`) values ('" . md5 ( $salt . $password ) . "', '$salt' ,'$email','$email');" );
$db->query ( "insert into " . $pre . "user_info (`userid`,`ugid`,`username`,`email`,`phone`,`isadmin`,`isverify`,`isverifyphone`,`isrenzheng`,`addtime`,`uptime`) values ('$userid',1,'$username','$email','$email','1','1','1','1','" . time () . "','" . time () . "')" );
// 更改网站信息
$db->query ( "update " . $pre . "system_options set `optionvalue`='$site_title' where `optionname`='site_title'" );
$db->query ( "update " . $pre . "system_options set `optionvalue`='$site_subtitle' where `optionname`='site_subtitle'" );
$db->query ( "update " . $pre . "system_options set `optionvalue`='$site_url' where `optionname`='site_url'" );
$db->query ( "update " . $pre . "system_options set `optionvalue`='$site_url' where `optionname`='link_url'" );
$db->query ( "update " . $pre . "system_options set `optionvalue`='$site_pkey' where `optionname`='site_pkey'" );
$arrOptions = $db->fetch_all_assoc ( "select * from " . $pre . "system_options" );
foreach ( $arrOptions as $item ) {
$arrOption [$item ['optionname']] = $item ['optionvalue'];
}
fileWrite ( 'system_options.php', 'data', $arrOption );
$GLOBALS['tsMySqlCache']->set ( 'system_options', $arrOption );
//读取数据库cache表,并生成本地文件
$arrCache = $db->fetch_all_assoc("select * from " . $pre . "cache");
foreach($arrCache as $key=>$item){
fileWrite ( $item['cachename'].'.php', 'data', $tsMySqlCache -> get($item['cachename']) );
}
// 生成配置文件
$fp = fopen ( THINKDATA . '/config.inc.php', 'w' );
if (! is_writable ( THINKDATA . '/config.inc.php' ))
qiMsg ( "配置文件(data/config.inc.php)不可写。如果您使用的是Unix/Linux主机,请修改该文件的权限为777。如果您使用的是Windows主机,请联系管理员,将此文件设为everyone可写" );
$config = "<?php\n" . " /*\n" . " *数据库配置\n" . " */\n" . " \n" . " \$TS_DB['sql']='" . $select_sql . "';\n" . " \$TS_DB['host']='" . $host . "';\n" . " \$TS_DB['port']='" . $port . "';\n" . " \$TS_DB['user']='" . $user . "';\n" . " \$TS_DB['pwd']='" . $pwd . "';\n" . " \$TS_DB['name']='" . $name . "';\n" . " \$TS_DB['pre']='" . $pre . "';\n" . " define('dbprefix','" . $pre . "');\n";
$fw = fwrite ( $fp, $config );
// 清空SESSION
unset ( $_SESSION ['tsuser'] );
session_destroy ();
setcookie ( "ts_email", '', time () + 3600, '/' );
setcookie ( "ts_autologin", '', time () + 3600, '/' );
include 'install/html/result.html';
} else {
include 'install/html/error.html';
}
+156
View File
@@ -0,0 +1,156 @@
{include file='header.html'}
<style>
.main{
background: none repeat scroll 0 0 #FFFFFF;
border: 1px solid #DFDFDF;
border-radius: 11px 11px 11px 11px;
color: #333333;
font-family: "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
margin: 2em auto;
padding: 1em 2em;
width: 700px;
}
p, li, dd, dt {
font-size: 12px;
line-height: 18px;
padding-bottom: 2px;
}
.step {
margin: 20px 0 15px;
}
.step, th {
padding: 0;
text-align: left;
}
.submit input, .button, .button-secondary {
-moz-box-sizing: content-box;
border: 1px solid #BBBBBB;
border-radius: 15px 15px 15px 15px;
color: #464646;
cursor: pointer;
font-family: "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
font-size: 14px !important;
line-height: 16px;
padding: 6px 12px;
text-decoration: none;
}
.button:hover, .button-secondary:hover, .submit input:hover {
border-color: #666666;
color: #000000;
}
.button, .submit input, .button-secondary {
background:#F2F2F2;
}
.button:active, .submit input:active, .button-secondary:active {
background: #EEEEEE;
}
.form-table {
border-collapse: collapse;
margin-top: 1em;
width: 100%;
}
.form-table td {
border-bottom: 8px solid #FFFFFF;
font-size: 12px;
margin-bottom: 9px;
padding: 10px;
}
.form-table th {
border-bottom: 8px solid #FFFFFF;
font-size: 13px;
padding: 16px 10px 10px;
text-align: left;
vertical-align: top;
width: 130px;
}
.form-table tr {
background: none repeat scroll 0 0 #F3F3F3;
}
.form-table code {
font-size: 18px;
line-height: 18px;
}
.form-table p {
font-size: 11px;
margin: 4px 0 0;
}
.form-table input {
font-size: 15px;
line-height: 20px;
padding: 2px;
}
.form-table th p {
font-weight: normal;
}
#error-page {
margin-top: 50px;
}
#error-page p {
font-size: 12px;
line-height: 18px;
margin: 25px 0 20px;
}
#error-page code, .code {
font-family: Consolas,Monaco,Courier,monospace;
}
#pass-strength-result {
background-color: #EEEEEE;
border-color: #DDDDDD !important;
border-style: solid;
border-width: 1px;
display: none;
margin: 5px 5px 5px 1px;
padding: 5px;
text-align: center;
width: 200px;
}
#pass-strength-result.bad {
background-color: #FFB78C;
border-color: #FF853C !important;
}
#pass-strength-result.good {
background-color: #FFEC8B;
border-color: #FFCC00 !important;
}
#pass-strength-result.short {
background-color: #FFA0A0;
border-color: #F04040 !important;
}
#pass-strength-result.strong {
background-color: #C3FF88;
border-color: #8DFF1C !important;
}
.message {
background-color: #FFFFE0;
border: 1px solid #E6DB55;
margin: 5px 0 15px;
padding: 0.3em 0.6em;
}
</style>
<!--main-->
<div class="midder">
<div class="main">
<p>
</p><h1>数据库连接错误</h1>
<p>您在 <code>config.inc.php</code> 文件中提供的数据库用户名和密码可能不正确,或者无法连接到 <code>localhost</code> 上数据库服务器,这意味着您的主机数据库服务器已停止工作。</p>
<ul>
<li>您确认您提供的用户名和密码正确么?</li>
<li>您确认您提供的主机名正确么?</li>
<li>您确认数据库服务器正常运行么?</li>
</ul>
<p>如果您无法确定这些问题,请联系您的主机管理员。如果您仍需帮助,请访问 <a href="http://www.thinksaas.cn">ThinkSAAS新社区</a></p>
<p class="step"><a class="button" onclick="javascript:history.go(-1);return false;" href="#">重试</a></p><p></p>
</div>
</div>
{include file='footer.html'}
+6
View File
@@ -0,0 +1,6 @@
<div class="footer">
Powered by <a href="<?php echo $TS_CF['info']['url']; ?>"><?php echo $TS_CF['info']['name']; ?></a>
<?php echo $TS_CF['info']['version']; ?> <?php echo $TS_CF['info']['year'].'-'.date('Y'); ?>
</div>
</body>
</html>
+21
View File
@@ -0,0 +1,21 @@
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="save" content="history" />
<title><?php echo $title; ?></title>
<link rel="stylesheet" href="public/bootstrap/css/bootstrap.min.css">
<link type="text/css" rel="stylesheet" href="install/skin/style.css" />
<script src="public/js/jquery.min.js" type="text/javascript"></script>
<script src="public/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<!--header-->
<div class="header p-2">
<div class="container clearfix">
<div class="float-left"><a href="index.php"><img src="install/skin/logo.gif" alt="ThinkSAAS安装程序" /></a></div>
<div class="float-right pt-3 text-white">
ThinkSAAS 安装程序 <?php echo $TS_CF['info']['version']; ?>
</div>
</div>
</div>
+170
View File
@@ -0,0 +1,170 @@
<?php include 'header.html'; ?>
<style>
.step {
margin: 20px 0 15px;
}
.step, th {
padding: 0;
text-align: left;
}
.submit input, .button, .button-secondary {
-moz-box-sizing: content-box;
border: 1px solid #BBBBBB;
border-radius: 15px 15px 15px 15px;
color: #464646;
cursor: pointer;
font-family: "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
font-size: 14px !important;
line-height: 16px;
padding: 6px 12px;
text-decoration: none;
}
.button:hover, .button-secondary:hover, .submit input:hover {
border-color: #666666;
color: #000000;
}
.button, .submit input, .button-secondary {
background:#F2F2F2;
}
.button:active, .submit input:active, .button-secondary:active {
background: #EEEEEE;
}
</style>
<!--main-->
<div class="container mt-3 mb-3">
<div class="card">
<div class="card-body">
<div id="notice" class="alert alert-danger" style="display: none;">
重要:ThinkSAAS已经有最新版本发布,<a target="_blank" href="https://www.thinksaas.cn/service/down/">点击去下载</a>
</div>
<p>欢迎使用 ThinkSAAS!在您开始使用前,ThinkSAAS 需要一些MySQL的数据库的信息。下列信息将会被问到,请作好准备。</p>
<ol>
<li>MySQL数据库<span style="color:#FF2F2F;font-size: 12px;">(强烈要求采用mysql5.5或者以上的版本,建议采用mysql5.5/5.6/5.7</span></li>
<li>数据库名</li>
<li>数据库用户用户名</li>
<li>数据库用户密码</li>
<li>数据库主机</li>
<li>表名前缀(若您希望在一个数据表中安装多个 ThinkSAAS)</li>
</ol>
<p>大多数的互联网主机服务提供商都向您提供了数据库的信息。若您不知道这些信息,您需要先询问好,再进行安装。若您已准备好 …</p>
<p style="font-weight: bold;">1、PHP环境必要组件检测</p>
<table class="table table-bordered table-sm">
<thead class="thead-light">
<tr><th>PHP组件</th><th>检测结果</th></tr>
</thead>
<tbody>
<tr><td>dom <span class="text-danger fs12">*必须</span></td><td><?php if($e_dom){echo '<span style="color:green;">支持</span>';}else{echo '<span style="color:red;">不支持</span>';}?></td></tr>
<tr><td>mbstring <span class="text-danger fs12">*必须</span></td><td><?php if($e_mbstring){echo '<span style="color:green;">支持</span>';}else{echo '<span style="color:red;">不支持</span>';}?></td></tr>
<tr><td>gd <span class="text-danger fs12">*必须</span></td><td><?php if($e_gd){echo '<span style="color:green;">支持</span>';}else{echo '<span style="color:red;">不支持</span>';}?></td></tr>
<!--
<tr><td>mysql</td><td><?php if($e_mysql){echo '<span style="color:green;">支持</span>';}else{echo '<span style="color:red;">不支持</span>';}?> (php7版本请忽略此项)</td></tr>
-->
<tr><td>mysqli <span class="text-danger fs12">*必须</span></td><td><?php if($e_mysqli){echo '<span style="color:green;">支持</span>';}else{echo '<span style="color:red;">不支持</span>';}?></td></tr>
<tr><td>openssl <span class="text-danger fs12">*必须</span></td><td><?php if($e_openssl){echo '<span style="color:green;">支持</span>';}else{echo '<span style="color:red;">不支持</span>';}?></td></tr>
<tr><td>session <span class="text-danger fs12">*必须</span></td><td><?php if($e_session){echo '<span style="color:green;">支持</span>';}else{echo '<span style="color:red;">不支持</span>';}?></td></tr>
<tr><td>SimpleXML <span class="text-danger fs12">*必须</span></td><td><?php if($e_SimpleXML){echo '<span style="color:green;">支持</span>';}else{echo '<span style="color:red;">不支持</span>';}?></td></tr>
<!--
<tr><td>mcrypt</td><td><?php if($e_mcrypt){echo '<span style="color:green;">支持</span>';}else{echo '<span style="color:red;">不支持</span>';}?></td></tr>
-->
<tr><td>json <span class="text-danger fs12">*必须</span></td><td><?php if($e_json){echo '<span style="color:green;">支持</span>';}else{echo '<span style="color:red;">不支持</span>';}?></td></tr>
<tr><td>iconv <span class="text-danger fs12">*必须</span></td><td><?php if($e_iconv){echo '<span style="color:green;">支持</span>';}else{echo '<span style="color:red;">不支持</span>';}?></td></tr>
<tr><td>Fileinfo <span class="text-danger fs12">*必须</span></td><td><?php if($e_fileinfo){echo '<span style="color:green;">支持</span>';}else{echo '<span style="color:red;">不支持</span>';}?></td></tr>
<tr><td>curl <span class="text-danger fs12">*必须</span></td><td><?php if($e_curl){echo '<span style="color:green;">支持</span>';}else{echo '<span style="color:red;">不支持</span>';}?></td></tr>
</tbody>
</table>
<p style="font-weight: bold;">2、检测必要目录可写权限</p>
<table class="table table-bordered table-sm">
<thead class="thead-light">
<tr>
<th>目录权限</th>
<th>检测结果</th>
</tr>
</thead>
<tbody>
<tr><td>cache</td><td>
<?php if($f_cache){echo '可写';}else{echo '不可写';} ?>
</td></tr>
<tr><td>data</td><td>
<?php if($f_data){echo '可写';}else{echo '不可写';}?>
</td></tr>
<tr><td>uploadfile</td><td>
<?php if($f_uploadfile){echo '可写';}else{echo '不可写';} ?>
</td></tr>
<tr><td>tslogs</td><td>
<?php if($f_tslogs){echo '可写';}else{echo '不可写';} ?>
</td></tr>
<tr><td>upgrade</td><td>
<?php if($f_upgrade){echo '可写';}else{echo '不可写';} ?>
</td></tr>
</tbody>
</table>
<p>请安装必须的PHP组件;请将不可写的目录设置为可写(777)权限。</p>
<?php if($e_dom==0 || $e_mbstring==0 || $e_gd==0 || $e_mysqli==0 || $e_openssl==0 || $e_session==0 || $e_SimpleXML==0 || $e_json==0 || $e_iconv==0 || $e_fileinfo==0 || $e_curl==0 || $f_cache==0 || $f_data==0 || $f_uploadfile==0 || $f_tslogs==0 || $f_upgrade==0){ ?>
<p><a class="button" href="index.php">设置完毕,点击刷新</a></p>
<?php }else{ ?>
<p class="step"><a class="button" href="index.php?install=next">点击开始安装!</a></p>
<?php } ?>
</div>
</div>
</div>
<script>
//新版本检测
var theAuthUrl = getLocation();
$(document).ready(function(){
$.getJSON("https://www.thinksaas.cn/index.php?app=upcenter&ac=find&url="+theAuthUrl+"&version=<?php echo $TS_CF['info']['version'];?>&callback=?",
function(data){
if(data){
$("#notice").show();
}
});
});
function getLocation(){
var arr = document.domain.split('.');
if(arr.length === 2){
return document.domain;
}
if(arr.length > 2 && arr[0] !== 'www'){
return arr.slice(1).join('.')
}
return arr.slice(1).join('.')
}
</script>
<?php include 'footer.html'; ?>
+262
View File
@@ -0,0 +1,262 @@
<?php include 'header.html'; ?>
<style>
p, li, dd, dt {
font-size: 12px;
line-height: 18px;
padding-bottom: 2px;
}
.step {
margin: 20px 0 15px;
}
.step, th {
padding: 0;
text-align: left;
}
.submit input, .button, .button-secondary {
-moz-box-sizing: content-box;
border: 1px solid #BBBBBB;
border-radius: 15px 15px 15px 15px;
color: #464646;
cursor: pointer;
font-family: "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
font-size: 14px !important;
line-height: 16px;
padding: 6px 12px;
text-decoration: none;
}
.button:hover, .button-secondary:hover, .submit input:hover {
border-color: #666666;
color: #000000;
}
.button, .submit input, .button-secondary {
background:#F2F2F2;
}
.button:active, .submit input:active, .button-secondary:active {
background: #EEEEEE;
}
.form-table {
border-collapse: collapse;
margin-top: 1em;
width: 100%;
}
.form-table td {
border-bottom: 8px solid #FFFFFF;
font-size: 12px;
margin-bottom: 9px;
padding: 10px;
}
.form-table th {
border-bottom: 8px solid #FFFFFF;
font-size: 13px;
padding: 16px 10px 10px;
text-align: left;
vertical-align: top;
width: 130px;
}
.form-table tr {
background: none repeat scroll 0 0 #F3F3F3;
}
.form-table code {
font-size: 18px;
line-height: 18px;
}
.form-table p {
font-size: 11px;
margin: 4px 0 0;
}
.form-table input {
font-size: 15px;
line-height: 20px;
padding: 2px;
}
.form-table th p {
font-weight: normal;
}
#error-page {
margin-top: 50px;
}
#error-page p {
font-size: 12px;
line-height: 18px;
margin: 25px 0 20px;
}
#error-page code, .code {
font-family: Consolas,Monaco,Courier,monospace;
}
#pass-strength-result {
background-color: #EEEEEE;
border-color: #DDDDDD !important;
border-style: solid;
border-width: 1px;
display: none;
margin: 5px 5px 5px 1px;
padding: 5px;
text-align: center;
width: 200px;
}
#pass-strength-result.bad {
background-color: #FFB78C;
border-color: #FF853C !important;
}
#pass-strength-result.good {
background-color: #FFEC8B;
border-color: #FFCC00 !important;
}
#pass-strength-result.short {
background-color: #FFA0A0;
border-color: #F04040 !important;
}
#pass-strength-result.strong {
background-color: #C3FF88;
border-color: #8DFF1C !important;
}
.message {
background-color: #FFFFE0;
border: 1px solid #E6DB55;
margin: 5px 0 15px;
padding: 0.3em 0.6em;
}
</style>
<!--main-->
<div class="container mt-3 mb-3">
<div class="card">
<div class="card-body">
<form action="index.php?install=result" method="post">
<p>请在下方输入数据库相关信息。若您不清楚,请咨询主机提供商。</p>
<table class="form-table">
<tbody><tr>
<th scope="row"><label for="dbname">数据库名</label></th>
<td><input type="text" value="thinksaas" size="25" id="dbname" name="name"></td>
<td>您希望 ThinkSAAS 使用哪个数据库运行?</td>
</tr>
<tr>
<th scope="row"><label for="uname">用户名</label></th>
<td><input type="text" value="root" size="25" id="uname" name="user"></td>
<td>您的 MySQL 用户名</td>
</tr>
<tr>
<th scope="row"><label for="pwd">密码</label></th>
<td><input type="text" value="123456" size="25" id="pwd" name="pwd"></td>
<td>... 以及 MySQL 密码。</td>
</tr>
<tr>
<th scope="row"><label for="dbhost">数据库主机</label></th>
<td><input type="text" value="localhost" size="25" id="dbhost" name="host"></td>
<td>通常情况下,应填写 <code>localhost</code>,若测试连接失败,请联系主机提供商咨询。</td>
</tr>
<tr>
<th scope="row"><label for="dbport">端口</label></th>
<td><input type="text" value="3306" size="25" id="dbport" name="port"></td>
<td>默认3306</td>
</tr>
<tr>
<th scope="row"><label for="prefix">表名前缀</label></th>
<td><input type="text" size="25" value="ts_" id="prefix" name="pre"></td>
<td>若您希望在一个数据库中存放多个 ThinkSAAS 的数据,请修改本项以做区分。</td>
</tr>
</tbody></table>
<p>请在下面输入网站信息</p>
<table class="form-table">
<tbody>
<tr>
<th scope="row"><label for="site_title">网站标题:</label></th>
<td><input type="text" value="ThinkSAAS" size="25" name="site_title"></td>
<td>也是你的网站名称</td>
</tr>
<tr>
<th scope="row"><label for="site_subtitle">网站副标题:</label></th>
<td><input type="text" value="又一个ThinkSAAS社区" size="25" name="site_subtitle"></td>
<td>用于首页副标题,紧跟网站标题之后</td>
</tr>
<tr>
<th scope="row"><label for="site_url">网站URL</label></th>
<td><input id="site-url" type="text" value="<?php echo $site_url; ?>" size="25" name="site_url"></td>
<td>正确填写,http://开头,/结尾 <span style="color:#ff0000;font-size: 12px;">(如果是https开头,请手动改成https)</span></td>
</tr>
</tbody>
</table>
<p>请在下面输入管理员信息</p>
<table class="form-table">
<tbody>
<tr>
<th scope="row"><label for="email">登录Email</label></th>
<td><input type="text" value="admin@admin.com" size="25" name="email"></td>
<td>你用来登录和最高管理的账户</td>
</tr>
<tr>
<th scope="row"><label for="password">登录密码:</label></th>
<td><input type="text" value="123456" size="25" name="password"></td>
<td>您的登录密码</td>
</tr>
<tr>
<th scope="row"><label for="username">用户名:</label></th>
<td><input type="text" value="admin" size="25" name="username"></td>
<td>你的用户名</td>
</tr>
</tbody>
</table>
<p>选择数据库链接方式</p>
<table class="form-table">
<tbody>
<tr>
<th scope="row"><label for="sql">选择连接方式:</label></th>
<td><select name="sql">
<option value="mysqli">MySQLi</option>
<!--
<option value="pdo_mysql">PDO_MySQL</option>
-->
</select></td>
<td><!--选择pdo_mysql需要php支持pdo_mysql扩展--></td>
</tr>
</tbody>
</table>
<p class="step">
<input type="hidden" name="site_pkey" value="<?php echo md5(rand()); ?>" />
<input type="submit" class="button" value="提交" name="submit">
</p>
</form>
</div>
</div>
</div>
<script>
var curWwwPath=window.document.location.href;
var pathName=window.document.location.pathname;
var pos=curWwwPath.indexOf(pathName);
var localhostPaht=curWwwPath.substring(0,pos)+pathName.replace('index.php', '');
var inputUrl = document.getElementById("site-url")
inputUrl.value = localhostPaht;
</script>
<?php include 'footer.html'; ?>
+159
View File
@@ -0,0 +1,159 @@
<?php include 'header.html'; ?>
<style>
h1 {
clear: both;
color: #666666;
font: 24px Georgia,"Times New Roman",Times,serif;
margin: 5px 0 0 -4px;
padding: 0 0 7px;
}
p, li, dd, dt {
font-size: 12px;
line-height: 18px;
padding-bottom: 2px;
}
.step {
margin: 20px 0 15px;
}
.step, th {
padding: 0;
text-align: left;
}
.submit input, .button, .button-secondary {
-moz-box-sizing: content-box;
border: 1px solid #BBBBBB;
border-radius: 15px 15px 15px 15px;
color: #464646;
cursor: pointer;
font-family: "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
font-size: 14px !important;
line-height: 16px;
padding: 6px 12px;
text-decoration: none;
}
.button:hover, .button-secondary:hover, .submit input:hover {
border-color: #666666;
color: #000000;
}
.button, .submit input, .button-secondary {
background:#F2F2F2;
}
.button:active, .submit input:active, .button-secondary:active {
background: #EEEEEE;
}
.form-table {
border-collapse: collapse;
margin-top: 1em;
width: 100%;
}
.form-table td {
border-bottom: 8px solid #FFFFFF;
font-size: 12px;
margin-bottom: 9px;
padding: 10px;
}
.form-table th {
border-bottom: 8px solid #FFFFFF;
font-size: 13px;
padding: 16px 10px 10px;
text-align: left;
vertical-align: top;
width: 130px;
}
.form-table tr {
background: none repeat scroll 0 0 #F3F3F3;
}
.form-table code {
font-size: 18px;
line-height: 18px;
}
.form-table p {
font-size: 11px;
margin: 4px 0 0;
}
.form-table input {
font-size: 15px;
line-height: 20px;
padding: 2px;
}
.form-table th p {
font-weight: normal;
}
#error-page {
margin-top: 50px;
}
#error-page p {
font-size: 12px;
line-height: 18px;
margin: 25px 0 20px;
}
#error-page code, .code {
font-family: Consolas,Monaco,Courier,monospace;
}
#pass-strength-result {
background-color: #EEEEEE;
border-color: #DDDDDD !important;
border-style: solid;
border-width: 1px;
display: none;
margin: 5px 5px 5px 1px;
padding: 5px;
text-align: center;
width: 200px;
}
#pass-strength-result.bad {
background-color: #FFB78C;
border-color: #FF853C !important;
}
#pass-strength-result.good {
background-color: #FFEC8B;
border-color: #FFCC00 !important;
}
#pass-strength-result.short {
background-color: #FFA0A0;
border-color: #F04040 !important;
}
#pass-strength-result.strong {
background-color: #C3FF88;
border-color: #8DFF1C !important;
}
.message {
background-color: #FFFFE0;
border: 1px solid #E6DB55;
margin: 5px 0 15px;
padding: 0.3em 0.6em;
}
</style>
<!--main-->
<div class="container mt-3 mb-3">
<div class="card">
<div class="card-body">
<h1>完成!</h1>
<hr />
<p>ThinkSAAS 安装完成。您是否还沉浸在愉悦的安装过程中?很遗憾,一切皆已完成! :)</p>
<table class="form-table">
<tbody><tr>
<th>登录Email</th>
<td><code><?php echo $email;?> </code></td>
</tr>
<tr>
<th>登录密码:</th>
<td><code><?php echo $password; ?></code></td>
</tr>
</tbody></table>
<p class="step"><a class="button" href="index.php">进入前台</a> <a class="button" href="index.php?app=user&ac=system">进入后台</a></p>
</div>
</div>
</div>
<?php include 'footer.html'; ?>
+16
View File
@@ -0,0 +1,16 @@
<?php
defined('IN_TS') or die('Access Denied.');
/*
*ThinkSAAS 安装程序
* @copyright (c) 2010-3000 ThinkSAAS All Rights Reserved
* @code by QiuJun
* @Email:thinksaas@qq.com
*/
//安装文件的IMGCSS文件
$skins = 'data/install/skins/';
//进入正题
$title = 'ThinkSAAS安装程序';
require_once 'action/'.$install.'.php';
+1285
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

+20
View File
@@ -0,0 +1,20 @@
/**框架CSS**/
h2{font-size:14px;padding:5px;margin:0px;}
a {color:#336699;text-decoration:none;}
/*头部*/
.header{background:#3A81C0;width:100%;overflow:hidden;}
.header .head{width:960px;height:60px;margin:0 auto;overflow:hidden;}
.header .head .logo{float:left;margin:10px 0 0 0;color:#FFFFFF;}
.header .head .menu{float:right;margin:20px 0 0 0;color:#FFFFFF;}
/*中部*/
.midder{width:960px;margin:0 auto;overflow:hidden;}
/*底部*/
.footer{background:#F0F0F0;padding:10px 0;text-align:center;color:#999999;}
.fs12{font-size: 12px;}