<?php
/**
* +------------------------------------------------------------------------
* | 程序名称:贤诚建站系统
* +------------------------------------------------------------------------
* | Copyright www.mydecms.com All rights reserved.
* +------------------------------------------------------------------------
* | Author: 小贤 <e-mail:admin@mydecms.com> <QQ:306282268>
* +------------------------------------------------------------------------
* | 声明:本程序禁止未经作者商业授权之前用于商业用途,违者追究法律责任
* | 如需要用于商业用途,请联系程序作者小贤<QQ:306282268>购买程序商业授权
* +------------------------------------------------------------------------
* | 文件说明:程序安装控制器
* +------------------------------------------------------------------------
**/
class indexControl extends mydecmsClass {
public $db;//数据库链接
public $conf;//配置信息
public $config;//程序设置对象
public $template = "template/";//模板目录
public $control="index";
public $action = "index";//默认调用方法
/**
* 程序安装首页
**/
public function index()
{
if(!is_writable(MYDECMS_PATH)){
$this -> errlog("程序根目录没有写入文件权限,程序因此无法安装,请手动增加权限后再刷新本页");
}
if(!file_exists(MYDECMS_PATH.$this->template."/index.php")){
exit("没有找到对应的模板文件");
}
include MYDECMS_PATH.$this->template."/index.php";
exit();
}
/**
* 删除安装包文件
**/
public function del(){
$this -> delDir(MYDECMS_PATH);
exit('安装包文件删除完毕');
}
/**
* 第一步
**/
public function first(){
$yes = isset($_GET['yes']) ? $_GET['yes'] : "";
if($yes==''){
header("HTTP/1.1 301 Moved Permanently");
header("Location: ./index.php?c=index&a=index");
exit();
}
if(!file_exists(MYDECMS_PATH.$this->template."/first.php")){
exit("没有找到对应的模板文件");
}
include MYDECMS_PATH.$this->template."/first.php";
}
/**
* 第二步
**/
public function second(){
$mysqlhost = $this -> p("mysqlhost","localhost","2");
$mysqluser = $this -> p("mysqluser","root","2");
$mysqlpass = $this -> p("mysqlpass","","2");
$mysqldb = $this -> p("mysqldb","","2");
$mysqldbqz = $this -> p("mysqldbqz","mydecms_","2");
$admindir = $this -> p("admindir","","2");
$webadmin = $this -> p("webadmin","","2");
$webpass = $this -> p("webpass","","2");
$webname = $this -> p("webname","","2");
if($mysqldb == ""){
$this -> errlog("数据库表不能为空");
}
if($webadmin == ""){
$this -> errlog("网站管理员账号不能为空");
}
if($webpass == ""){
$this -> errlog("网站管理员密码不能为空");
}
if($webname == ""){
$this -> errlog("网站名称不能为空");
}
$conf = array(
"dbtype" => "mysql", //数据库类型
"host" => $mysqlhost, //数据库访问地址
"user" => $mysqluser, //数据库访问用户名
"pass" => $mysqlpass, //数据库访问密码
"dbname" => $mysqldb, //数据库名
"prefix" => $mysqldbqz, //表前缀
"charset"=> "utf8", //编码
"port" => "3306" //数据库连接端口
);
$url = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"];
$url = dirname($url);
if($url !='') $url = substr($url,0,strpos($url,"/install"));
$this -> db = new mydecmsMysql($conf);
$this -> db -> query("drop table if exists {$conf['prefix']}adminmenu");
$this -> db -> query("drop table if exists {$conf['prefix']}article");
$this -> db -> query("drop table if exists {$conf['prefix']}cachearticle");
$this -> db -> query("drop table if exists {$conf['prefix']}category");
$this -> db -> query("drop table if exists {$conf['prefix']}control");
$this -> db -> query("drop table if exists {$conf['prefix']}friendlink");
$this -> db -> query("drop table if exists {$conf['prefix']}glspider");
$this -> db -> query("drop table if exists {$conf['prefix']}group");
$this -> db -> query("drop table if exists {$conf['prefix']}menu");
$this -> db -> query("drop table if exists {$conf['prefix']}method");
$this -> db -> query("drop table if exists {$conf['prefix']}role");
$this -> db -> query("drop table if exists {$conf['prefix']}spiderlogs");
$this -> db -> query("drop table if exists {$conf['prefix']}system");
$this -> db -> query("drop table if exists {$conf['prefix']}tag");
$this -> db -> query("drop table if exists {$conf['prefix']}tplfile");
$this -> db -> query("drop table if exists {$conf['prefix']}tplsubject");
$this -> db -> query("drop table if exists {$conf['prefix']}user");
$this -> db -> query("drop table if exists {$conf['prefix']}user_action_logs");
$this -> db -> query("drop table if exists {$conf['prefix']}user_login_logs");
$this -> db -> query("CREATE TABLE IF NOT EXISTS `{$conf['prefix']}adminmenu` ( `id` int(11) NOT NULL AUTO_INCREMENT, `cid` int(10) NOT NULL, `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `url` varchar(250) COLLATE utf8_unicode_ci DEFAULT NULL, `img` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `type` int(10) NOT NULL DEFAULT '1', `sort` int(10) NOT NULL DEFAULT '11',PRIMARY KEY (`id`), KEY `name` (`name`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 COMMENT='后台权限菜单'");
$this -> db -> query("CREATE TABLE IF NOT EXISTS `{$conf['prefix']}article` ( `id` int(10) NOT NULL AUTO_INCREMENT, `cid` int(10) NOT NULL, `title` varchar(160) COLLATE utf8_unicode_ci NOT NULL, `keyword` varchar(160) COLLATE utf8_unicode_ci DEFAULT NULL, `desc` varchar(250) COLLATE utf8_unicode_ci DEFAULT NULL, `img` varchar(250) COLLATE utf8_unicode_ci DEFAULT NULL, `content` longtext COLLATE utf8_unicode_ci NOT NULL, `tpl` varchar(1600) COLLATE utf8_unicode_ci DEFAULT NULL, `userid` int(10) NOT NULL, `date` int(11) NOT NULL, `type` int(10) NOT NULL DEFAULT '1', `tags` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,PRIMARY KEY (`id`), UNIQUE KEY `title` (`title`), KEY `cid` (`cid`), KEY `type` (`type`), KEY `date` (`date`), KEY `userid` (`userid`), KEY `tags` (`tags`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 COMMENT='文章表'");
$this -> db -> query("CREATE TABLE IF NOT EXISTS `{$conf['prefix']}cachearticle` ( `id` int(10) NOT NULL AUTO_INCREMENT, `aid` int(10) NOT NULL, `ids` text COLLATE utf8_unicode_ci, `date` int(11) NOT NULL, `views` int(10) NOT NULL DEFAULT '0',PRIMARY KEY (`id`), UNIQUE KEY `aid` (`aid`), KEY `views` (`views`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 COMMENT='相关文章缓存表'");
$this -> db -> query("CREATE TABLE IF NOT EXISTS `{$conf['prefix']}category` ( `id` int(10) NOT NULL AUTO_INCREMENT, `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `urlname` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `cid` int(10) NOT NULL DEFAULT '0', `fids` text COLLATE utf8_unicode_ci, `zids` text COLLATE utf8_unicode_ci, `tpl` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, `title` text COLLATE utf8_unicode_ci, `keyword` varchar(160) COLLATE utf8_unicode_ci DEFAULT NULL, `desc` varchar(250) COLLATE utf8_unicode_ci DEFAULT NULL, `type` int(10) NOT NULL DEFAULT '1', `sort` int(10) NOT NULL DEFAULT '1000',PRIMARY KEY (`id`),UNIQUE KEY `urlname` (`urlname`),KEY `name` (`name`),KEY `cid` (`cid`),KEY `type` (`type`),KEY `sort` (`sort`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 COMMENT='文章分类'");
$this -> db -> query("CREATE TABLE IF NOT EXISTS `{$conf['prefix']}control` ( `id` int(10) NOT NU
没有合适的资源?快使用搜索试试~ 我知道了~
基于PHP的贤诚建站系统(开源文章管理系统) php版.zip
共518个文件
gif:121个
png:113个
php:105个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 120 浏览量
2023-08-28
23:50:09
上传
评论
收藏 4.28MB ZIP 举报
温馨提示
基于PHP的贤诚建站系统(开源文章管理系统) php版.zip
资源推荐
资源详情
资源评论
收起资源包目录
基于PHP的贤诚建站系统(开源文章管理系统) php版.zip (518个子文件)
ueditor.css 44KB
ueditor.min.css 34KB
layui.css 31KB
video-js.css 21KB
image.css 19KB
video.css 15KB
attachment.css 15KB
layer.css 14KB
video-js.min.css 11KB
index.css 9KB
laydate.css 8KB
layui.mobile.css 8KB
shCoreDefault.css 7KB
shCoreDefault.css 7KB
mydecms.css 6KB
mydecms.m.css 5KB
mydecms.css 4KB
scrawl.css 4KB
codemirror.css 3KB
charts.css 3KB
background.css 2KB
emotion.css 2KB
dialogbase.css 2KB
music.css 2KB
mydecms.css 1KB
edittable.css 1KB
code.css 1KB
template.css 1KB
webuploader.css 515B
help.css 395B
iframe.css 42B
iconfont.eot 52KB
vjs.eot 3KB
wface.gif 49KB
jxface2.gif 40KB
yface.gif 28KB
bface.gif 27KB
icons.gif 20KB
file-icons.gif 20KB
file-icons.gif 20KB
tface.gif 19KB
fface.gif 18KB
59.gif 10KB
22.gif 10KB
cface.gif 8KB
24.gif 8KB
13.gif 7KB
16.gif 7KB
39.gif 6KB
64.gif 6KB
63.gif 6KB
50.gif 6KB
loading-0.gif 6KB
4.gif 6KB
1.gif 5KB
42.gif 5KB
71.gif 5KB
21.gif 5KB
20.gif 5KB
29.gif 5KB
70.gif 4KB
5.gif 4KB
17.gif 4KB
27.gif 4KB
9.gif 4KB
44.gif 4KB
11.gif 4KB
8.gif 4KB
3.gif 4KB
23.gif 4KB
icons-all.gif 4KB
34.gif 4KB
41.gif 4KB
38.gif 4KB
65.gif 3KB
32.gif 3KB
45.gif 3KB
7.gif 3KB
12.gif 3KB
26.gif 3KB
60.gif 3KB
2.gif 3KB
40.gif 3KB
25.gif 3KB
19.gif 3KB
66.gif 3KB
18.gif 3KB
46.gif 3KB
10.gif 3KB
28.gif 3KB
51.gif 3KB
57.gif 3KB
67.gif 3KB
0.gif 3KB
48.gif 3KB
43.gif 3KB
30.gif 2KB
61.gif 2KB
33.gif 2KB
69.gif 2KB
共 518 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
毕业_设计
- 粉丝: 1947
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功