<?php
error_reporting(0);
@header('Content-Type: text/html; charset=UTF-8');
$do=isset($_GET['do'])?$_GET['do']:'0';
if(file_exists('install.lock')){
$installed=true;
$do='0';
}
function checkfunc($f,$m = false) {
if (function_exists($f)) {
return '<font color="green">可用</font>';
} else {
if ($m == false) {
return '<font color="black">不支持</font>';
} else {
return '<font color="red">不支持</font>';
}
}
}
function checkclass($f,$m = false) {
if (class_exists($f)) {
return '<font color="green">可用</font>';
} else {
if ($m == false) {
return '<font color="black">不支持</font>';
} else {
return '<font color="red">不支持</font>';
}
}
}
?>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no,minimal-ui">
<title>授权系统</title>
<link href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>
</head>
<body>
<nav class="navbar navbar-fixed-top navbar-default">
<div class="container">
<div class="navbar-header">
<span class="navbar-brand" ><font color=#000000>安装向导-</font></span>
</div>
</div>
</nav>
<div class="container" style="padding-top:60px;">
<div class="col-xs-12 col-sm-8 col-lg-6 center-block" style="float: none;">
<?php if($do=='0'){?>
<div class="panel panel-primary">
<div class="panel-heading" style="background: #000000;">
<h3 class="panel-title" align="center" >授权管理系统</h3>
</div>
<div class="panel-body">
<p><iframe src="../install/readme.txt" style="width:100%;height:465px;"></iframe></p>
<?php if($installed){ ?>
<div class="alert alert-warning">您已经安装过,如需重新安装请删除<font color=red> install/install.lock </font>文件后再安装!</div>
<?php }else{?>
<p align="center" ><a class="btn btn-primary" href="index.php?do=1" style="background: #000000;">开始安装</a></p>
<?php }?>
</div>
</div>
<?php }elseif($do=='1'){?>
<div class="panel panel-primary">
<div class="panel-heading" style="background: #000000;">
<h3 class="panel-title" align="center">环境检查</h3>
</div>
<div class="progress progress-striped">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 10%">
<span class="sr-only">10%</span>
</div>
</div>
<table class="table table-striped">
<thead>
<tr>
<th style="width:20%">函数检测</th>
<th style="width:15%">需求</th>
<th style="width:15%">当前</th>
<th style="width:50%">用途</th>
</tr>
</thead>
<tbody>
<tr>
<td>PHP 5.2+</td>
<td>必须</td>
<td><?php echo phpversion(); ?></td>
<td>PHP版本支持</td>
</tr>
<tr>
<td>curl_exec()</td>
<td>必须</td>
<td><?php echo checkfunc('curl_exec',true); ?></td>
<td>抓取网页</td>
</tr>
<tr>
<td>file_get_contents()</td>
<td>必须</td>
<td><?php echo checkfunc('file_get_contents',true); ?></td>
<td>读取文件</td>
</tr>
</tbody>
</table>
<p><span><a class="btn btn-primary" href="index.php?do=0" style="background: #000000;"><<上一步</a></span>
<span style="float:right"><a class="btn btn-primary" href="index.php?do=2" align="right" style="background: #000000;">下一步>></a></span></p>
</div>
<?php }elseif($do=='2'){?>
<div class="panel panel-primary">
<div class="panel-heading" style="background: #000000;">
<h3 class="panel-title" align="center">数据库配置</h3>
</div>
<div class="progress progress-striped">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 30%">
<span class="sr-only">30%</span>
</div>
</div>
<div class="panel-body">
<?php
if(defined("SAE_ACCESSKEY"))
echo <<<HTML
检测到您使用的是SAE空间,支持一键安装,请点击 <a href="?do=3">下一步</a>
HTML;
else
echo <<<HTML
<form action="?do=3" class="form-sign" method="post">
<label for="name">数据库地址:</label>
<input type="text" class="form-control" name="db_host" value="127.0.0.1">
<label for="name">数据库端口:</label>
<input type="text" class="form-control" name="db_port" value="3306">
<label for="name">数据库用户名:</label>
<input type="text" class="form-control" name="db_user">
<label for="name">数据库密码:</label>
<input type="text" class="form-control" name="db_pwd">
<label for="name">数据库名:</label>
<input type="text" class="form-control" name="db_name">
<br><input type="submit" class="btn btn-primary btn-block" name="submit" value="保存配置" style="background: #000000;">
</form><br/>
(如果已事先填写好config.php相关数据库配置,请 <a href="?do=3&jump=1">点击此处</a> 跳过这一步!)
HTML;
?>
</div>
</div>
<?php }elseif($do=='3'){
?>
<div class="panel panel-primary">
<div class="panel-heading" style="background: #000000;">
<h3 class="panel-title" align="center">保存数据库</h3>
</div>
<div class="progress progress-striped">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 50%">
<span class="sr-only">50%</span>
</div>
</div>
<div class="panel-body">
<?php
require './db.class.php';
if(defined("SAE_ACCESSKEY") || $_GET['jump']==1){
include_once '../config.php';
if(!user||!pwd||!dbname) {
echo '<div class="alert alert-danger">请先填写好数据库并保存后再安装!<hr/><a href="javascript:history.back(-1)"><< 返回上一页</a></div>';
} else {
if(!$con=DB::connect($db_host,$db_user,$db_pwd,$db_name,$db_port)){
if(DB::connect_errno()==2002)
echo '<div class="alert alert-warning">连接数据库失败,数据库地址填写错误!</div>';
elseif(DB::connect_errno()==1045)
echo '<div class="alert alert-warning">连接数据库失败,数据库用户名或密码填写错误!</div>';
elseif(DB::connect_errno()==1049)
echo '<div class="alert alert-warning">连接数据库失败,数据库名不存在!</div>';
else
echo '<div class="alert alert-warning">连接数据库失败,['.DB::connect_errno().']'.DB::connect_error().'</div>';
}else{
echo '<div class="alert alert-success">数据库配置文件保存成功!</div>';
if(DB::query("select * from auth_user where 1")==FALSE)
echo '<p align="right" ><a class="btn btn-primary btn-block" href="?do=4" background="#000000;">创建数据表>></a></p>';
else
echo '<div class="list-group-item list-group-item-info">系统检测到你已安装过授权系统</div>
<div class="list-group-item">
<a href="?do=6" class="btn btn-block btn-info" style="background: #000000;">跳过安装</a>
</div>
<div class="list-group-item">
<a href="?do=4" onclick="if(!confirm(\'全新安装将会清空所有数据,是否继续?\')){return false;}" class="btn btn-block btn-warning" style="background: #000000;">强制全新安装</a>
</div>';
}
}
}else{
$db_host=isset($_POST['db_host'])?$_POST['db_host']:NULL;
$db_port=isset($_POST['db_port'])?$_POST['db_port']:NULL;
$db_user=isset($_POST['db_user'])?$_POST['db_user']:NULL;
$db_pwd=isset($_POST['db_pwd'])?$_POST['db_pwd']:NULL;
$db_name=isset($_POST['db_name'])?$_POST['db_name']:NULL;
if($db_host==null || $db_port==null || $db_user==null || $db_pwd==null || $db_name==null){
echo '<div class="alert alert-danger">保存错误,请确保每项都不为空<hr/><a href="javascript:history.back(-1)"><< 返回上一页</a></div>';
} else {
$config="<?php
/*数据库配置*/
\$dbconfig=array(
'host' => '{$db_host}', //数据库服务器
'port' => {$db_port}, //数据库端口
'user' => '{$db_user}', //数据库用户名
'pwd' => '{$db_pwd}', //数据库密码
'dbname' => '{$db_name}', //数据库名
);
?>";
if(!$con=DB::connect($db_host,$db_
没有合适的资源?快使用搜索试试~ 我知道了~
文案馆头像壁纸小程序源码独立后台
共184个文件
png:115个
js:16个
php:15个
0 下载量 7 浏览量
2023-03-01
09:26:22
上传
评论
收藏 1.35MB ZIP 举报
温馨提示
1、没有开通流量主不需要设置 广告配置 2、把小程序里面的 app.js等文件的域名替换成你的就可以了! 3、注意域名要SSL证书,宝塔用户直接申请!
资源推荐
资源详情
资源评论
收起资源包目录
文案馆头像壁纸小程序源码独立后台 (184个子文件)
987156.gif 15KB
loader.gif 12KB
down.gif 4KB
.htaccess 1B
imglist01.jpg 55KB
imglist04.jpg 41KB
imglist02.jpg 29KB
imglist03.jpg 28KB
imgbg.jpg 27KB
love_share.jpg 25KB
7.js 15KB
2.js 12KB
photo.js 10KB
index.js 7KB
gallery.js 4KB
wallpaper.js 4KB
profile.js 4KB
app.js 3KB
link.js 1KB
4.js 1KB
6.js 1KB
5.js 916B
cu-custom.js 878B
3.js 561B
8.js 248B
1.js 94B
project.config.json 1KB
app.json 1KB
project.private.config.json 453B
sitemap.json 197B
profile.json 182B
wallpaper.json 176B
gallery.json 138B
photo.json 105B
link.json 95B
cu-custom.json 52B
index.json 27B
index.php 12KB
gdlist.php 11KB
function.php 9KB
login.php 6KB
db.class.php 4KB
log.php 4KB
head.php 4KB
config.php 4KB
index.php 3KB
db.class.php 2KB
member.php 1KB
common.php 970B
index.php 799B
api.php 679B
config.php 277B
banner.png 228KB
qltx.png 175KB
shareimg.png 130KB
qingtfx.png 84KB
popbg.png 73KB
lovebg.png 59KB
xzyp.png 23KB
popbg2.png 20KB
mybgimg.png 18KB
plaza_banner.png 18KB
tip.png 17KB
hand.png 15KB
qmnwag.png 14KB
icon64.png 9KB
icon36.png 8KB
tishiImg.png 7KB
avatar_r1.png 6KB
icon52.png 6KB
kong.png 6KB
plazaSpace.png 6KB
icon51.png 6KB
icon50.png 6KB
avatar_l3.png 5KB
plaza_banner_l.png 5KB
icon54.png 5KB
avatar_l2.png 5KB
icon53.png 5KB
avatar_r2.png 5KB
avatar_l1.png 5KB
icon11.png 5KB
icon43.png 4KB
icon37.png 3KB
love.png 3KB
icon63.png 3KB
to.png 3KB
popbtn.png 3KB
plaza_banner_r.png 3KB
icon16.png 2KB
icon19.png 2KB
icon13.png 2KB
loveh.png 2KB
startd.png 2KB
starta.png 2KB
camera1.png 2KB
right.png 2KB
icon56.png 1KB
icon17.png 1KB
icon35.png 1KB
共 184 条
- 1
- 2
资源评论
大山源码
- 粉丝: 41
- 资源: 107
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功