├── .gitignore ├── src ├── favicon.ico ├── cache │ ├── favicon.ico │ └── favicon.png ├── assets │ ├── images │ │ ├── logo.png │ │ ├── no.png │ │ ├── banner.jpg │ │ ├── weixin.png │ │ ├── loading.gif │ │ ├── logo-mini.png │ │ ├── default_ico.png │ │ ├── logo_fixed.png │ │ └── pexels-aaron-burden-2449543.jpg │ ├── editor │ │ ├── themes │ │ │ ├── common │ │ │ │ ├── rm.gif │ │ │ │ ├── blank.gif │ │ │ │ ├── flash.gif │ │ │ │ ├── media.gif │ │ │ │ └── loading.gif │ │ │ └── default │ │ │ │ ├── default.png │ │ │ │ ├── background.png │ │ │ │ └── toolbar.space.gif │ │ └── plugins │ │ │ ├── emoticons │ │ │ ├── images │ │ │ │ ├── 0.gif │ │ │ │ ├── 1.gif │ │ │ │ ├── 2.gif │ │ │ │ ├── 3.gif │ │ │ │ ├── 4.gif │ │ │ │ ├── 5.gif │ │ │ │ ├── 6.gif │ │ │ │ ├── 7.gif │ │ │ │ ├── 8.gif │ │ │ │ ├── 9.gif │ │ │ │ ├── 10.gif │ │ │ │ ├── 11.gif │ │ │ │ ├── 12.gif │ │ │ │ ├── 13.gif │ │ │ │ ├── 14.gif │ │ │ │ ├── 15.gif │ │ │ │ ├── 16.gif │ │ │ │ ├── 17.gif │ │ │ │ ├── 18.gif │ │ │ │ ├── 19.gif │ │ │ │ ├── 20.gif │ │ │ │ ├── 21.gif │ │ │ │ ├── 22.gif │ │ │ │ ├── 23.gif │ │ │ │ ├── 24.gif │ │ │ │ ├── 25.gif │ │ │ │ ├── 26.gif │ │ │ │ ├── 27.gif │ │ │ │ ├── 28.gif │ │ │ │ ├── 29.gif │ │ │ │ ├── 30.gif │ │ │ │ ├── 31.gif │ │ │ │ ├── 32.gif │ │ │ │ ├── 33.gif │ │ │ │ ├── 34.gif │ │ │ │ ├── 35.gif │ │ │ │ ├── 36.gif │ │ │ │ ├── 37.gif │ │ │ │ └── static.gif │ │ │ └── emoticons.js │ │ │ ├── image │ │ │ └── images │ │ │ │ ├── refresh.png │ │ │ │ ├── align_left.gif │ │ │ │ ├── align_top.gif │ │ │ │ └── align_right.gif │ │ │ ├── lineheight │ │ │ └── lineheight.js │ │ │ ├── autoheight │ │ │ └── autoheight.js │ │ │ ├── plainpaste │ │ │ └── plainpaste.js │ │ │ ├── code │ │ │ ├── prettify.css │ │ │ └── code.js │ │ │ ├── quickformat │ │ │ └── quickformat.js │ │ │ ├── link │ │ │ └── link.js │ │ │ └── flash │ │ │ └── flash.js │ ├── layer │ │ └── 3.1.1 │ │ │ └── theme │ │ │ └── default │ │ │ ├── icon.png │ │ │ ├── loading-1.gif │ │ │ └── loading-2.gif │ ├── font-awesome │ │ └── 4.7.0 │ │ │ └── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ ├── twitter-bootstrap │ │ └── 3.3.7 │ │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ └── js │ │ │ └── npm.js │ ├── css │ │ ├── admin-index.css │ │ └── admin.css │ └── js │ │ └── admin.js ├── templates │ └── default │ │ └── images │ │ ├── rank_1.png │ │ ├── rank_2.png │ │ ├── rank_3.png │ │ ├── star │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ └── 5.png │ │ └── progressbar.gif ├── config.php ├── home │ ├── sidebar.php │ ├── banner.php │ ├── header.php │ ├── footer.php │ └── statistics.php ├── admin │ ├── footer.php │ ├── head.php │ ├── header.php │ ├── notice_add.php │ ├── apply_ajax.php │ ├── link_add.php │ ├── notice_ajax.php │ ├── notice_edit.php │ ├── link_ajax.php │ ├── link_edit.php │ ├── article_ajax.php │ ├── nav_add.php │ ├── category_add.php │ ├── article_category_add.php │ ├── article_add.php │ ├── category_edit.php │ ├── nav_edit.php │ ├── nav_ajax.php │ ├── article_category_ajax.php │ ├── article_category_edit.php │ ├── account.php │ ├── notice.php │ ├── category_ajax.php │ ├── article_edit.php │ ├── sidebar.php │ ├── navbar.php │ ├── link.php │ ├── category.php │ ├── nav.php │ ├── site_ajax.php │ ├── article_category.php │ ├── article.php │ ├── site_add.php │ ├── site_edit.php │ └── apply_edit.php ├── includes │ ├── autoloader.php │ ├── lib │ │ ├── Cache.php │ │ └── Oauth.php │ ├── lang.class.php │ └── common.php ├── .htaccess ├── api │ ├── like.php │ ├── stat.php │ └── apply.php ├── nginx.conf ├── install │ ├── readme.txt │ └── db.class.php ├── about.php ├── article_list.php ├── article_show.php ├── search.php ├── favicon.php ├── article.php ├── ranking.php └── category.php ├── assets └── WX20240414-172128@2x.png └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | src/cache/favicon/* 2 | src/install/install.lock 3 | -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/favicon.ico -------------------------------------------------------------------------------- /src/cache/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/cache/favicon.ico -------------------------------------------------------------------------------- /src/cache/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/cache/favicon.png -------------------------------------------------------------------------------- /src/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/images/logo.png -------------------------------------------------------------------------------- /src/assets/images/no.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/images/no.png -------------------------------------------------------------------------------- /src/assets/images/banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/images/banner.jpg -------------------------------------------------------------------------------- /src/assets/images/weixin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/images/weixin.png -------------------------------------------------------------------------------- /assets/WX20240414-172128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/assets/WX20240414-172128@2x.png -------------------------------------------------------------------------------- /src/assets/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/images/loading.gif -------------------------------------------------------------------------------- /src/assets/images/logo-mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/images/logo-mini.png -------------------------------------------------------------------------------- /src/assets/images/default_ico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/images/default_ico.png -------------------------------------------------------------------------------- /src/assets/images/logo_fixed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/images/logo_fixed.png -------------------------------------------------------------------------------- /src/assets/editor/themes/common/rm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/themes/common/rm.gif -------------------------------------------------------------------------------- /src/assets/editor/themes/common/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/themes/common/blank.gif -------------------------------------------------------------------------------- /src/assets/editor/themes/common/flash.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/themes/common/flash.gif -------------------------------------------------------------------------------- /src/assets/editor/themes/common/media.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/themes/common/media.gif -------------------------------------------------------------------------------- /src/templates/default/images/rank_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/templates/default/images/rank_1.png -------------------------------------------------------------------------------- /src/templates/default/images/rank_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/templates/default/images/rank_2.png -------------------------------------------------------------------------------- /src/templates/default/images/rank_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/templates/default/images/rank_3.png -------------------------------------------------------------------------------- /src/templates/default/images/star/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/templates/default/images/star/1.png -------------------------------------------------------------------------------- /src/templates/default/images/star/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/templates/default/images/star/2.png -------------------------------------------------------------------------------- /src/templates/default/images/star/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/templates/default/images/star/3.png -------------------------------------------------------------------------------- /src/templates/default/images/star/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/templates/default/images/star/4.png -------------------------------------------------------------------------------- /src/templates/default/images/star/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/templates/default/images/star/5.png -------------------------------------------------------------------------------- /src/assets/editor/themes/common/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/themes/common/loading.gif -------------------------------------------------------------------------------- /src/assets/editor/themes/default/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/themes/default/default.png -------------------------------------------------------------------------------- /src/assets/layer/3.1.1/theme/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/layer/3.1.1/theme/default/icon.png -------------------------------------------------------------------------------- /src/templates/default/images/progressbar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/templates/default/images/progressbar.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/0.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/1.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/2.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/3.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/4.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/5.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/6.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/7.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/8.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/9.gif -------------------------------------------------------------------------------- /src/assets/editor/themes/default/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/themes/default/background.png -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/10.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/11.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/12.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/13.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/14.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/15.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/16.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/17.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/18.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/19.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/20.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/21.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/22.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/23.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/24.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/25.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/26.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/27.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/28.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/29.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/30.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/31.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/32.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/33.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/34.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/35.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/36.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/37.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/image/images/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/image/images/refresh.png -------------------------------------------------------------------------------- /src/assets/editor/themes/default/toolbar.space.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/themes/default/toolbar.space.gif -------------------------------------------------------------------------------- /src/assets/font-awesome/4.7.0/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/font-awesome/4.7.0/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/assets/images/pexels-aaron-burden-2449543.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/images/pexels-aaron-burden-2449543.jpg -------------------------------------------------------------------------------- /src/assets/layer/3.1.1/theme/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/layer/3.1.1/theme/default/loading-1.gif -------------------------------------------------------------------------------- /src/assets/layer/3.1.1/theme/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/layer/3.1.1/theme/default/loading-2.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/images/static.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/emoticons/images/static.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/image/images/align_left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/image/images/align_left.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/image/images/align_top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/image/images/align_top.gif -------------------------------------------------------------------------------- /src/assets/editor/plugins/image/images/align_right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/editor/plugins/image/images/align_right.gif -------------------------------------------------------------------------------- /src/assets/font-awesome/4.7.0/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/font-awesome/4.7.0/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/assets/font-awesome/4.7.0/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/font-awesome/4.7.0/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/assets/font-awesome/4.7.0/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/font-awesome/4.7.0/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/assets/font-awesome/4.7.0/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/font-awesome/4.7.0/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/twitter-bootstrap/3.3.7/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/twitter-bootstrap/3.3.7/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/assets/twitter-bootstrap/3.3.7/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/twitter-bootstrap/3.3.7/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/assets/twitter-bootstrap/3.3.7/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/twitter-bootstrap/3.3.7/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/assets/twitter-bootstrap/3.3.7/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crogram/SiteHub/HEAD/src/assets/twitter-bootstrap/3.3.7/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/config.php: -------------------------------------------------------------------------------- 1 | '' 5 | ); 6 | 7 | /* 数据库配置 */ 8 | $dbconfig = array( 9 | 'host' => '127.0.0.1', // 数据库服务器 10 | 'port' => 3306, // 数据库端口 11 | 'user' => 'root', // 数据库用户名 12 | 'pwd' => 'root', // 数据库密码 13 | 'dbname' => 'sitehub', // 数据库名 14 | 'prefix' => 'sh' // 数据库表前缀 15 | ); -------------------------------------------------------------------------------- /src/home/sidebar.php: -------------------------------------------------------------------------------- 1 | findAll('category', '*', '', 'sid asc'); 5 | ?> 6 | 7 | 13 | -------------------------------------------------------------------------------- /src/admin/footer.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/assets/twitter-bootstrap/3.3.7/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /src/home/banner.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 19 | -------------------------------------------------------------------------------- /src/admin/head.php: -------------------------------------------------------------------------------- 1 | window.location.href='./login.php';"); 4 | } 5 | ?> 6 | 7 | 8 | 9 | 10 | <?php echo $title; ?> - <?php echo $lang->admin->title; ?> 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/home/header.php: -------------------------------------------------------------------------------- 1 | findAll('nav', '*', '', 'nid asc'); 4 | ?> 5 | 6 |
7 |
8 | 9 | 13 | 18 |
19 |
20 | -------------------------------------------------------------------------------- /src/includes/autoloader.php: -------------------------------------------------------------------------------- 1 | ', { 19 | span : '.line-height=' + key 20 | }); 21 | self.updateState(); 22 | self.addBookmark(); 23 | self.hideMenu(); 24 | } 25 | }); 26 | }); 27 | }); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /src/api/like.php: -------------------------------------------------------------------------------- 1 | -1, 'msg' => '缺失ID'))); 10 | } 11 | // 获取点赞者IP 12 | $ip = get_real_ip(); 13 | 14 | // 获取点赞记录 15 | $count = $DB->count('like', array('site_id' => $id, 'like_ip' => $ip)); 16 | // 如果没有记录 17 | if ($count == 0) { 18 | // 更新点赞数量 19 | // $sql = "UPDATE `pre_site` SET `like`=`like`+1 WHERE `id`='$id'"; 20 | // $DB->exec($sql); 21 | $DB->update('site', '`like`=`like`+1', array('id' => $id)); 22 | // 记录点赞id以及ip 23 | $DB->insert('like', array('site_id' => $id, 'like_ip' => $ip)); 24 | // 获取当前点赞数量 25 | $row = $DB->find('site', '`like`', array('id' => $id)); 26 | exit(json_encode(array('code' => 0, 'data' => $row['like'], 'msg' => '点赞成功'))); 27 | } else { 28 | exit(json_encode(array('code' => -1, 'msg' => '已经赞过了'))); 29 | } 30 | -------------------------------------------------------------------------------- /src/assets/css/admin-index.css: -------------------------------------------------------------------------------- 1 | 2 | .huge { 3 | font-size: 40px; 4 | } 5 | .huge .count-all { 6 | font-size: 16px; 7 | } 8 | .panel-green { 9 | border-color: #5cb85c; 10 | } 11 | 12 | .panel-green .panel-heading { 13 | border-color: #5cb85c; 14 | color: #fff; 15 | background-color: #5cb85c; 16 | } 17 | 18 | .panel-green a { 19 | color: #5cb85c; 20 | } 21 | 22 | .panel-green a:hover { 23 | color: #3d8b3d; 24 | } 25 | 26 | .panel-red { 27 | border-color: #d9534f; 28 | } 29 | 30 | .panel-red .panel-heading { 31 | border-color: #d9534f; 32 | color: #fff; 33 | background-color: #d9534f; 34 | } 35 | 36 | .panel-red a { 37 | color: #d9534f; 38 | } 39 | 40 | .panel-red a:hover { 41 | color: #b52b27; 42 | } 43 | 44 | .panel-yellow { 45 | border-color: #f0ad4e; 46 | } 47 | 48 | .panel-yellow .panel-heading { 49 | border-color: #f0ad4e; 50 | color: #fff; 51 | background-color: #f0ad4e; 52 | } 53 | 54 | .panel-yellow a { 55 | color: #f0ad4e; 56 | } 57 | 58 | .panel-yellow a:hover { 59 | color: #df8a13; 60 | } 61 | -------------------------------------------------------------------------------- /src/assets/js/admin.js: -------------------------------------------------------------------------------- 1 | // admin 2 | function logout() { 3 | layer.confirm('确定退出登录 ?', { 4 | icon: 3, 5 | btn: ['确定', '取消'] 6 | }, function () { 7 | var ii = layer.load(2); 8 | $.ajax({ 9 | type: 'POST', 10 | url: 'ajax.php?act=logout', 11 | dataType: 'json', 12 | success: function (data) { 13 | layer.close(ii); 14 | if (data.code == 0) { 15 | layer.msg('退出登录成功', { 16 | time: 500, 17 | end: function () { 18 | window.location.assign('login.php'); 19 | } 20 | }); 21 | } else { 22 | layer.alert(data.msg, { 23 | icon: 2 24 | }); 25 | } 26 | }, 27 | error: function (data) { 28 | layer.close(ii); 29 | layer.msg('服务器错误'); 30 | } 31 | }); 32 | }); 33 | return false; 34 | } 35 | -------------------------------------------------------------------------------- /src/nginx.conf: -------------------------------------------------------------------------------- 1 | rewrite ^/index.html$ /index.php last; 2 | rewrite ^/about.html$ /about.php last; 3 | rewrite ^/search.html$ /search.php last; 4 | rewrite ^/ranking.html$ /ranking.php last; 5 | rewrite ^/apply.html$ /apply.php last; 6 | rewrite ^/404.html$ /404.php last; 7 | rewrite ^/category-([1-9]+[0-9]*).html$ /category.php?id=$1 last; 8 | rewrite ^/category-([a-zA-Z]+).html$ /category.php?alias=$1 last; 9 | rewrite ^/site-([1-9]+[0-9]*).html$ /site.php?id=$1 last; 10 | rewrite ^/article.html$ /article.php last; 11 | rewrite ^/article-list-([1-9]+[0-9]*).html$ /article_list.php?id=$1 last; 12 | rewrite ^/article-([1-9]+[0-9]*).html$ /article_show.php?id=$1 last; 13 | rewrite ^/img/favicon/(.*)$ /favicon.php?url=$1 last; 14 | rewrite ^/img/preview/(.*).png$ /preview.php?url=$1 last; 15 | 16 | location ~ "^/img/favicon/([^/]+)/?.png$" { 17 | try_files /$uri /$uri/ /favicon.php?url=$1; 18 | } 19 | 20 | # location ~ "^/favicon/(.*)" { 21 | # try_files /$uri /$uri/ /favicon.php?url=$1; 22 | # } 23 | 24 | location ~ "^/img/preview/([^/]+)/?.png$" { 25 | try_files /$uri /$uri/ /preview.php?url=$1; 26 | } 27 | -------------------------------------------------------------------------------- /src/assets/editor/plugins/autoheight/autoheight.js: -------------------------------------------------------------------------------- 1 | KindEditor.plugin('autoheight', function(K) { 2 | var self = this; 3 | 4 | if (!self.autoHeightMode) { 5 | return; 6 | } 7 | 8 | var minHeight; 9 | 10 | function hideScroll() { 11 | var edit = self.edit; 12 | var body = edit.doc.body; 13 | edit.iframe[0].scroll = 'no'; 14 | body.style.overflowY = 'hidden'; 15 | } 16 | 17 | function resetHeight() { 18 | var edit = self.edit; 19 | var body = edit.doc.body; 20 | edit.iframe.height(minHeight); 21 | self.resize(null, Math.max((K.IE ? body.scrollHeight : body.offsetHeight) + 76, minHeight)); 22 | } 23 | 24 | function init() { 25 | minHeight = K.removeUnit(self.height); 26 | 27 | self.edit.afterChange(resetHeight); 28 | hideScroll(); 29 | resetHeight(); 30 | } 31 | 32 | if (self.isCreated) { 33 | init(); 34 | } else { 35 | self.afterCreate(init); 36 | } 37 | }); 38 | 39 | /* 40 | * 如何实现真正的自动高度? 41 | * 修改编辑器高度之后,再次获取body内容高度时,最小值只会是当前iframe的设置高度,这样就导致高度只增不减。 42 | * 所以每次获取body内容高度之前,先将iframe的高度重置为最小高度,这样就能获取body的实际高度。 43 | * 由此就实现了真正的自动高度 44 | * 测试:chrome、firefox、IE9、IE8 45 | * */ 46 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Crogram 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/assets/editor/plugins/plainpaste/plainpaste.js: -------------------------------------------------------------------------------- 1 | KindEditor.plugin('plainpaste', function(K) { 2 | var self = this, name = 'plainpaste'; 3 | self.clickToolbar(name, function() { 4 | var lang = self.lang(name + '.'), 5 | html = '
' + 6 | '
' + lang.comment + '
' + 7 | '' + 8 | '
', 9 | dialog = self.createDialog({ 10 | name : name, 11 | width : 450, 12 | title : self.lang(name), 13 | body : html, 14 | yesBtn : { 15 | name : self.lang('yes'), 16 | click : function(e) { 17 | var html = textarea.val(); 18 | html = K.escape(html); 19 | html = html.replace(/ {2}/g, '  '); 20 | if (self.newlineTag == 'p') { 21 | html = html.replace(/^/, '

').replace(/$/, '

').replace(/\n/g, '

'); 22 | } else { 23 | html = html.replace(/\n/g, '
$&'); 24 | } 25 | self.insertHtml(html).hideDialog().focus(); 26 | } 27 | } 28 | }), 29 | textarea = K('textarea', dialog.div); 30 | textarea[0].focus(); 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /src/api/stat.php: -------------------------------------------------------------------------------- 1 | 0, 7 | 'msg' => '网站统计', 8 | 'data' => array( 9 | 'build_time' => $conf['build_time'], 10 | 'category' => $DB->count('category'), 11 | 'site' => $DB->count('site'), 12 | 'apply' => $DB->count('apply', array('reject' => 0)), 13 | 'apply_reject' => $DB->count('apply', array('reject' => 1)), 14 | 'article' => $DB->count('article'), 15 | 'article_category' => $DB->count('article_category'), 16 | 'notice' => $DB->count('notice'), 17 | 'link' => $DB->count('link'), 18 | 'top_hits_day' => $DB->find('site', 'id, name', array('date' => date("Y-m-d", time())), '`hits_day` desc'), 19 | 'top_hits_month' => $DB->find('site', 'id, name', array('datem' => date("Y-m", time())), '`hits_month` desc'), 20 | 'top_hits_total' => $DB->find('site', 'id, name', null, '`hits_total` desc'), 21 | 'top_like' => $DB->find('site', 'id, name', null, '`like` desc'), 22 | ) 23 | ))); 24 | -------------------------------------------------------------------------------- /src/admin/header.php: -------------------------------------------------------------------------------- 1 | window.location.href='./login.php';"); 4 | } 5 | ?> 6 | 7 | 8 | 9 | 10 | <?php echo $title; ?> - <?php echo $lang->admin->title; ?> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |

24 | -------------------------------------------------------------------------------- /src/install/readme.txt: -------------------------------------------------------------------------------- 1 | 欢迎使用 - 程江®网址导航系统 SiteHub v1.0.4 2 | 3 | 本系统采用 PHP + MySQL 技术开发 4 | 拥有独立的安装和后台系统 5 | 后台采用 Bootstrip 框架 6 | 前台使用响应式界面,自适应各种屏幕 7 | 8 | 后台功能: 9 | 10 | 1. 支持修改网站信息 11 | 2. 支持修改管理员信息 12 | 3. 支持修改网站素材,如 logo/favicon 图标/微信二维码 等图片 13 | 4. 支持添加/修改/删除导航 14 | 5. 支持添加/修改/删除分类 15 | 6. 支持添加/修改/删除站点 16 | 7. 支持审核/删除/拒绝站点申请 17 | 8. 支持发布/修改/删除公告 18 | 9. 支持添加/修改/删除友情链接 19 | 20 | 前台特色: 21 | 22 | 1. 所有分类下的站点 23 | 2. 单个分类下的站点 24 | 3. 各站点详情页 25 | 4. 分类滚动定位 26 | 5. 记录各站点浏览数 27 | 6. 点赞功能(单个 IP 单个站点只能点赞一次) 28 | 7. 站点详情页显示站点缩略图 29 | 8. 站点炫酷跳转页 30 | 9. 右下角悬浮按扭(去顶部/QQ/邮箱/微信二维码) 31 | 10. 搜索功能(支持搜索站点名称/站点链接/站点简介) 32 | 11. 访客申请站点收录功能 33 | 12. 关于我们页面 34 | 13. 站点图片懒加载 35 | 14. 分类/站点链接别名 36 | 15. 网站 Favicon 图标接口缓存 37 | 38 | 注意事项: 39 | 40 | 1.本系统采用伪静态,若您的主机不支持伪静态请勿使用 41 | 2.若是Apache服务器端软件,您只需要开启伪静态功能,本系统已经为您配置好了,详见源码程序中的.htaccess 42 | 3.若是Nginx服务器端软件,您只需要按照以下伪静态规则配置伪静态 43 | rewrite ^/index.html$ /index.php; 44 | rewrite ^/about.html$ /about.php; 45 | rewrite ^/search.html$ /search.php; 46 | rewrite ^/apply.html$ /apply.php; 47 | rewrite ^/404.html$ /404.php; 48 | rewrite ^/category-([1-9]+[0-9]*).html$ /category.php?id=$1; 49 | rewrite ^/category-([a-zA-Z]+).html$ /category.php?alias=$1; 50 | rewrite ^/site-([1-9]+[0-9]*).html$ /site.php?id=$1; 51 | rewrite ^/([a-zA-Z]+).html$ /site.php?alias=$1; -------------------------------------------------------------------------------- /src/includes/lib/Cache.php: -------------------------------------------------------------------------------- 1 | getColumn("SELECT v FROM pre_config WHERE k='cache' LIMIT 1"); 16 | return $value; 17 | } 18 | public function save($value) 19 | { 20 | if (is_array($value)) $value = serialize($value); 21 | global $DB; 22 | return $DB->exec("REPLACE INTO pre_config VALUES ('cache', :value)", [':value' => $value]); 23 | } 24 | public function pre_fetch() 25 | { 26 | global $_CACHE; 27 | $_CACHE = array(); 28 | $cache = $this->read(); 29 | $_CACHE = @unserialize($cache); 30 | if (empty($_CACHE['version'])) $_CACHE = $this->update(); 31 | return $_CACHE; 32 | } 33 | public function update() 34 | { 35 | global $DB; 36 | $cache = array(); 37 | $result = $DB->getAll("SELECT * FROM pre_config"); 38 | foreach ($result as $row) { 39 | if ($row['k'] == 'cache') continue; 40 | $cache[$row['k']] = $row['v']; 41 | } 42 | $this->save($cache); 43 | return $cache; 44 | } 45 | public function clear() 46 | { 47 | global $DB; 48 | return $DB->exec("UPDATE pre_config SET v='' WHERE k='cache'"); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/assets/editor/plugins/code/prettify.css: -------------------------------------------------------------------------------- 1 | pre.prettyprint { 2 | border: 0px solid #888; 3 | font-family: Consolas , "Courier New" , Courier , monospace; 4 | font-size: 12px; 5 | overflow: auto; 6 | margin: 5px 0px; 7 | padding: 0px; 8 | line-height: 12pt; 9 | } 10 | .code{ 11 | width: 90%; 12 | border: 1px solid #888; 13 | } 14 | .pln { color: #000 } 15 | @media screen { 16 | .str { color: #080 } 17 | .kwd { color: #008;font-weight: bold;} 18 | .com { color: #800 } 19 | .typ { color: #606 } 20 | .lit { color: #066 } 21 | .pun, .opn, .clo { color: #660 } 22 | .tag { color: #008 } 23 | .atn { color: #606 } 24 | .atv { color: #080 } 25 | .dec, .var { color: #606 } 26 | .fun { color: red } 27 | } 28 | @media print, projection { 29 | .str { color: #060 } 30 | .kwd { color: #006;font-weight: bold } 31 | .com { color: #600;font-style: italic } 32 | .typ { color: #404;font-weight: bold } 33 | .lit { color: #044 } 34 | .pun, .opn, .clo { color: #440 } 35 | .tag { color: #006;font-weight: bold } 36 | .atn { color: #404 } 37 | .atv { color: #060 } 38 | } 39 | ol.linenums { margin-top: 0;margin-bottom: 0;background: #FFFFFF; } /* IE indents via margin-left */ 40 | li.L0, 41 | li.L1, 42 | li.L2, 43 | li.L3, 44 | li.L5, 45 | li.L6, 46 | li.L7, 47 | li.L8 { list-style-type: decimal;color: #bbb;} 48 | li.L1, 49 | li.L3, 50 | li.L5, 51 | li.L7, 52 | li.L9 { list-style-type: decimal;background: #eee; } 53 | .title{ 54 | background-color:#e0e0e0; 55 | padding:2px; 56 | font-weight: bold; 57 | font-style: italic; 58 | } 59 | -------------------------------------------------------------------------------- /src/home/footer.php: -------------------------------------------------------------------------------- 1 | 4 | 26 | 27 | 34 | 35 |
36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/admin/notice_add.php: -------------------------------------------------------------------------------- 1 | 9 |
10 |
15 |
16 |
17 |
18 |
19 | admin->notice_add; ?> 20 | (温馨提示:网站前台只会显示最新的一条公告) 21 |
22 |
23 |
24 |
25 | 内容 26 | 27 |
28 |
29 |
30 | 31 |
32 |
33 |
34 |
35 |
36 |
37 | 38 | 41 | 42 | -------------------------------------------------------------------------------- /src/admin/apply_ajax.php: -------------------------------------------------------------------------------- 1 | window.location.href='./login.php';"); 6 | 7 | $act = _get('act'); 8 | switch ($act) { 9 | case 'reject': 10 | @header('Content-Type: application/json; charset=UTF-8'); 11 | $id = _post('id'); 12 | if (!$id) { 13 | exit('{"code":-1,"msg":"id不能为空!"}'); 14 | } 15 | $result = $DB->update('apply', array('reject' => '1'), array('id' => $id)); 16 | if ($result) { 17 | exit('{"code":0,"msg":"拒绝申请,放进黑名单成功!"}'); 18 | } 19 | exit('{"code":-1,"msg":"拒绝申请失败!"}'); 20 | break; 21 | case 'reset': 22 | @header('Content-Type: application/json; charset=UTF-8'); 23 | $id = _post('id'); 24 | if (!$id) { 25 | exit('{"code":-1,"msg":"id不能为空!"}'); 26 | } 27 | $result = $DB->update('apply', array('reject' => '0'), array('id' => $id)); 28 | if ($result) { 29 | exit('{"code":0,"msg":"恢复审核申请成功!"}'); 30 | } 31 | exit('{"code":-1,"msg":"恢复审核申请失败!"}'); 32 | break; 33 | case 'del': 34 | @header('Content-Type: application/json; charset=UTF-8'); 35 | $id = _post('id'); 36 | if (!$id) { 37 | exit('{"code":-1,"msg":"id不能为空!"}'); 38 | } 39 | $result = $DB->delete('apply', array('id' => $id)); 40 | if ($result) { 41 | exit('{"code":0,"msg":"删除成功!"}'); 42 | } 43 | exit('{"code":-1,"msg":"删除失败!"}'); 44 | break; 45 | default: 46 | exit('{"code":-4,"msg":"No Act"}'); 47 | break; 48 | } 49 | -------------------------------------------------------------------------------- /src/admin/link_add.php: -------------------------------------------------------------------------------- 1 | 9 |
10 |
11 | 16 |
17 |
18 |
19 |
admin->link_add;?>
20 |
21 |
22 |
23 | 名称 24 | 25 |
26 |
27 |
28 | 链接 29 | 30 |
31 |
32 | 33 |
34 |
35 |
36 |
37 |
38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/assets/css/admin.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 51px; 3 | padding-bottom: 20px; 4 | font-size: 14px; 5 | } 6 | 7 | .navbar-brand.logo { 8 | width: 160px; 9 | padding: 4px 15px; 10 | } 11 | 12 | .navbar-brand img { 13 | max-width: 100%; 14 | } 15 | 16 | .page-header { 17 | margin-top: 20px; 18 | } 19 | 20 | .breadcrumb { 21 | border: 1px solid #ddd; 22 | margin-bottom: 10px; 23 | } 24 | 25 | .page-wrapper { 26 | margin-top: 20px; 27 | } 28 | 29 | .panel + .pagination { 30 | margin-top: 0; 31 | } 32 | 33 | .login { 34 | width: 420px; 35 | background: #fff; 36 | padding: 30px; 37 | margin: 10% auto 5%; 38 | box-shadow: 0 0 20px 2px #000; 39 | border-radius: 5px; 40 | } 41 | 42 | @media (max-width: 767px) { 43 | .login { 44 | width: 75%; 45 | max-width: 400px; 46 | margin: 20% auto 5%; 47 | } 48 | } 49 | 50 | .login-heading { 51 | font-size: 28px; 52 | text-align: center; 53 | padding-top: 20px; 54 | } 55 | 56 | .login-body { 57 | padding: 20px 0px; 58 | } 59 | 60 | .login-btn { 61 | margin: 30px 10px 10px; 62 | } 63 | 64 | .head-img { 65 | width: 35px; 66 | height: 35px; 67 | border-radius: 50%; 68 | box-shadow: 0px 0px 6px #448aff; 69 | transition: .5s; 70 | -webkit-transition: .5s; 71 | -moz-transition: .5s; 72 | -o-transition: .5s; 73 | } 74 | 75 | .head-img:hover { 76 | box-shadow: 0px 0px 6px #40c4ff; 77 | transition: .5s; 78 | -webkit-transition: .5s; 79 | -moz-transition: .5s; 80 | -o-transition: .5s; 81 | } 82 | 83 | .head-img img { 84 | width: 100%; 85 | height: 100%; 86 | position: absolute; 87 | } 88 | 89 | .footer { 90 | background: #fff; 91 | box-shadow: 0px -1px 10px #ddd; 92 | } -------------------------------------------------------------------------------- /src/admin/notice_ajax.php: -------------------------------------------------------------------------------- 1 | window.location.href='./login.php';"); 6 | 7 | $act = _get('act'); 8 | switch ($act) { 9 | case 'add': 10 | $content = _post('content'); 11 | if (!$content) { 12 | exit(""); 13 | } 14 | $result = $DB->insert('notice', array('content' => $content)); 15 | echo ""; 16 | break; 17 | case 'edit': 18 | $id = _post('id'); 19 | $row = $DB->find('notice', '*', array('id' => $id)); 20 | if (!$row) { 21 | exit(""); 22 | } 23 | $content = _post('content'); 24 | // 更新分类信息 25 | $update_data = array( 26 | 'id' => $id, 27 | 'content' => $content 28 | ); 29 | $result = $DB->update('notice', $update_data, array('id' => $id)); 30 | echo ""; 31 | break; 32 | case 'del': 33 | @header('Content-Type: application/json; charset=UTF-8'); 34 | $id = _post('id'); 35 | if (!$id) { 36 | exit('{"code":-1,"msg":"ID不能为空!"}'); 37 | } 38 | $result = $DB->delete('notice', array('id' => $id)); 39 | if ($result) { 40 | exit('{"code":0,"msg":"删除成功!"}'); 41 | } 42 | exit('{"code":-1,"msg":"删除失败!"}'); 43 | break; 44 | default: 45 | @header('Content-Type: application/json; charset=UTF-8'); 46 | exit('{"code":-4,"msg":"No Act"}'); 47 | break; 48 | } 49 | -------------------------------------------------------------------------------- /src/api/apply.php: -------------------------------------------------------------------------------- 1 | count('site', array('url' => $url)); 21 | if ($site_has) { 22 | exit('{"code":-1,"msg":"该站点已经存在,请勿重复提交!"}'); 23 | } 24 | $apply_has = $DB->count('apply', array('url' => $url)); 25 | if ($apply_has) { 26 | exit('{"code":-1,"msg":"该站点已提交过,请勿重复提交!"}'); 27 | } 28 | if (!$name) { 29 | exit('{"code":-1,"msg":"网站名称不能为空!"}'); 30 | } 31 | if (!$catename) { 32 | exit('{"code":-1,"msg":"网站分类不能为空!"}'); 33 | } 34 | if (!$introduce) { 35 | exit('{"code":-1,"msg":"网站简介不能为空!"}'); 36 | } 37 | // 插入数据 38 | $insert_data = array( 39 | 'name' => $name, 40 | 'catename' => $catename, 41 | 'url' => $url, 42 | 'keywords' => $keywords, 43 | 'introduce' => $introduce, 44 | ); 45 | $result = $DB->insert('apply', $insert_data); 46 | if ($result) { 47 | exit('{"code":0,"msg":"提交成功,请耐心等待审核!"}'); 48 | } 49 | exit('{"code":-1,"msg":"提交失败,请重试!"}'); 50 | break; 51 | default: 52 | exit('{"code":-4,"msg":"No Act"}'); 53 | break; 54 | } 55 | -------------------------------------------------------------------------------- /src/assets/editor/plugins/code/code.js: -------------------------------------------------------------------------------- 1 | KindEditor.plugin('code', function(K) { 2 | var self = this, name = 'code'; 3 | self.clickToolbar(name, function() { 4 | var lang = self.lang(name + '.'), 5 | html = ['
', 6 | '
', 7 | '', 23 | '
', 24 | '', 25 | '
'].join(''), 26 | dialog = self.createDialog({ 27 | name : name, 28 | width : 450, 29 | title : self.lang(name), 30 | body : html, 31 | yesBtn : { 32 | name : self.lang('yes'), 33 | click : function(e) { 34 | var type = K('.ke-code-type', dialog.div).val(), 35 | code = textarea.val(), 36 | cls = type === '' ? '' : ' lang-' + type, 37 | html = '
\n' + K.escape(code) + '
'; 38 | if (K.trim(code) === '') { 39 | alert(lang.pleaseInput); 40 | textarea[0].focus(); 41 | return; 42 | } 43 | self.insertHtml(html).hideDialog().focus(); 44 | } 45 | } 46 | }), 47 | textarea = K('textarea', dialog.div); 48 | textarea[0].focus(); 49 | }); 50 | }); 51 | -------------------------------------------------------------------------------- /src/assets/editor/plugins/quickformat/quickformat.js: -------------------------------------------------------------------------------- 1 | KindEditor.plugin('quickformat', function(K) { 2 | var self = this, name = 'quickformat', 3 | blockMap = K.toMap('blockquote,center,div,h1,h2,h3,h4,h5,h6,p'); 4 | function getFirstChild(knode) { 5 | var child = knode.first(); 6 | while (child && child.first()) { 7 | child = child.first(); 8 | } 9 | return child; 10 | } 11 | self.clickToolbar(name, function() { 12 | self.focus(); 13 | var doc = self.edit.doc, 14 | range = self.cmd.range, 15 | child = K(doc.body).first(), next, 16 | nodeList = [], subList = [], 17 | bookmark = range.createBookmark(true); 18 | while(child) { 19 | next = child.next(); 20 | var firstChild = getFirstChild(child); 21 | if (!firstChild || firstChild.name != 'img') { 22 | if (blockMap[child.name]) { 23 | child.html(child.html().replace(/^(\s| | )+/ig, '')); 24 | child.css('text-indent', '2em'); 25 | } else { 26 | subList.push(child); 27 | } 28 | if (!next || (blockMap[next.name] || blockMap[child.name] && !blockMap[next.name])) { 29 | if (subList.length > 0) { 30 | nodeList.push(subList); 31 | } 32 | subList = []; 33 | } 34 | } 35 | child = next; 36 | } 37 | K.each(nodeList, function(i, subList) { 38 | var wrapper = K('

', doc); 39 | subList[0].before(wrapper); 40 | K.each(subList, function(i, knode) { 41 | wrapper.append(knode); 42 | }); 43 | }); 44 | range.moveToBookmark(bookmark); 45 | self.addBookmark(); 46 | }); 47 | }); 48 | 49 | /** 50 | -------------------------- 51 | abcd
52 | 1234
53 | 54 | to 55 | 56 |

57 | abcd
58 | 1234
59 |

60 | 61 | -------------------------- 62 | 63 |   abcd1233 64 |

1234

65 | 66 | to 67 | 68 |

abcd1233

69 |

1234

70 | 71 | -------------------------- 72 | */ -------------------------------------------------------------------------------- /src/assets/editor/plugins/link/link.js: -------------------------------------------------------------------------------- 1 | KindEditor.plugin('link', function(K) { 2 | var self = this, name = 'link'; 3 | self.plugin.link = { 4 | edit : function() { 5 | var lang = self.lang(name + '.'), 6 | html = '
' + 7 | //url 8 | '
' + 9 | '' + 10 | '
' + 11 | //type 12 | '
' + 13 | '' + 14 | '' + 15 | '
' + 16 | '
', 17 | dialog = self.createDialog({ 18 | name : name, 19 | width : 450, 20 | title : self.lang(name), 21 | body : html, 22 | yesBtn : { 23 | name : self.lang('yes'), 24 | click : function(e) { 25 | var url = K.trim(urlBox.val()); 26 | if (url == 'http://' || K.invalidUrl(url)) { 27 | alert(self.lang('invalidUrl')); 28 | urlBox[0].focus(); 29 | return; 30 | } 31 | self.exec('createlink', url, typeBox.val()).hideDialog().focus(); 32 | } 33 | } 34 | }), 35 | div = dialog.div, 36 | urlBox = K('input[name="url"]', div), 37 | typeBox = K('select[name="type"]', div); 38 | urlBox.val('http://'); 39 | typeBox[0].options[0] = new Option(lang.newWindow, '_blank'); 40 | typeBox[0].options[1] = new Option(lang.selfWindow, ''); 41 | self.cmd.selection(); 42 | var a = self.plugin.getSelectedLink(); 43 | if (a) { 44 | self.cmd.range.selectNode(a[0]); 45 | self.cmd.select(); 46 | urlBox.val(a.attr('data-ke-src')); 47 | typeBox.val(a.attr('target')); 48 | } 49 | urlBox[0].focus(); 50 | urlBox[0].select(); 51 | }, 52 | 'delete' : function() { 53 | self.exec('unlink', null); 54 | } 55 | }; 56 | self.clickToolbar(name, self.plugin.link.edit); 57 | }); 58 | -------------------------------------------------------------------------------- /src/admin/notice_edit.php: -------------------------------------------------------------------------------- 1 | window.location.href="./notice.php";'); 12 | }; 13 | $row = $DB->find('notice', '*', array('id' => $id)); 14 | if (empty($row)) { 15 | exit(''); 16 | }; 17 | ?> 18 |
19 |
24 |
25 |
26 |
27 |
28 | admin->notice_edit; ?> 29 | (温馨提示:网站前台只会显示最新的一条公告) 30 |
31 |
32 |
33 | 34 |
35 | 内容 36 | 37 |
38 |
39 | 40 |
41 |
42 |
43 |
44 |
45 | 46 | 49 | 50 | -------------------------------------------------------------------------------- /src/home/statistics.php: -------------------------------------------------------------------------------- 1 | count('category'); 4 | $count_site = $DB->count('site'); 5 | $count_apply = $DB->count('apply', array('reject' => 0)); 6 | $count_apply_reject = $DB->count('apply', array('reject' => 1)); 7 | $count_article = $DB->count('article'); 8 | $count_article_category = $DB->count('article_category'); 9 | $count_notice = $DB->count('notice'); 10 | $count_link = $DB->count('link'); 11 | $top_hits_day = $DB->find('site','id, name', array('date' => date("Y-m-d", time())), '`hits_day` desc'); 12 | $top_hits_month = $DB->find('site','id, name', array('datem' => date("Y-m", time())), '`hits_month` desc'); 13 | $top_hits_total = $DB->find('site','id, name', null, '`hits_total` desc'); 14 | $top_like = $DB->find('site','id, name', null, '`like` desc'); 15 | ?> 16 |

已开设分类:

17 |

已收录站点:

18 |

最高日览站:" target="_blank">

19 |

最高月览站:" target="_blank">

20 |

最高总览站:" target="_blank">

21 |

最高点赞站:" target="_blank">

22 |

正申请站点:

23 |

已拒绝站点:

24 |

文章的分类:

25 |

已发布文章:

26 |

已发布公告:

27 |

已交换友链:

28 |

本站已稳定运行了 天。

34 | -------------------------------------------------------------------------------- /src/admin/link_ajax.php: -------------------------------------------------------------------------------- 1 | window.location.href='./login.php';"); 6 | 7 | $act = _get('act'); 8 | switch ($act) { 9 | case 'add': 10 | $name = _post('name'); 11 | $url = _post('url'); 12 | if (!$name) { 13 | exit(""); 14 | } 15 | if (!$url) { 16 | exit(""); 17 | } 18 | // 数据 19 | $_data = array( 20 | 'name' => $name, 21 | 'url' => $url 22 | ); 23 | $result = $DB->insert('link', $_data); 24 | echo ""; 25 | break; 26 | case 'edit': 27 | $id = _post('id'); 28 | $row = $DB->find('link', '*', array('id' => $id)); 29 | if (!$row) { 30 | exit(""); 31 | } 32 | $name = _post('name'); 33 | $url = _post('url'); 34 | if (!$name) { 35 | exit(""); 36 | } 37 | if (!$url) { 38 | exit(""); 39 | } 40 | // 更新 41 | $_data = array( 42 | 'name' => $name, 43 | 'url' => $url 44 | ); 45 | $result = $DB->update('link', $_data, array('id' => $id)); 46 | echo ""; 47 | break; 48 | case 'del': 49 | @header('Content-Type: application/json; charset=UTF-8'); 50 | $id = _post('id'); 51 | if (!$id) { 52 | exit('{"code":-1,"msg":"ID不能为空!"}'); 53 | } 54 | $result = $DB->delete('link', array('id' => $id)); 55 | if ($result) { 56 | exit('{"code":0,"msg":"删除成功!"}'); 57 | } 58 | exit('{"code":-1,"msg":"删除失败!"}'); 59 | break; 60 | default: 61 | @header('Content-Type: application/json; charset=UTF-8'); 62 | exit('{"code":-4,"msg":"No Act"}'); 63 | break; 64 | } 65 | -------------------------------------------------------------------------------- /src/includes/lang.class.php: -------------------------------------------------------------------------------- 1 | app = new stdClass; 5 | $lang->index = new stdClass; 6 | $lang->admin = new stdClass; 7 | 8 | // 综合--开始 9 | $lang->app->name = 'SiteHub'; 10 | // 综合--结束 11 | 12 | // 前台--开始 13 | $lang->index->index = '网站导航'; 14 | $lang->index->about = '关于我们'; 15 | $lang->index->article = '文章资讯'; 16 | $lang->index->notice = '本站公告'; 17 | $lang->index->search = '搜索结果'; 18 | $lang->index->apply = '申请收录'; 19 | $lang->index->ranking = '排行榜'; 20 | $lang->index->nofound = '404'; 21 | $lang->index->logout = '退出登录'; 22 | $lang->index->home = '网站首页'; 23 | // 前台--结束 24 | 25 | // 后台--开始 26 | $lang->admin->login = '后台登录'; 27 | $lang->admin->title = '管理中心'; 28 | $lang->admin->index = '后台首页'; 29 | $lang->admin->nav = '系统导航'; 30 | $lang->admin->nav_list = '导航列表'; 31 | $lang->admin->nav_add = '添加导航'; 32 | $lang->admin->nav_edit = '修改导航'; 33 | $lang->admin->link = '友情链接'; 34 | $lang->admin->link_list = '友链列表'; 35 | $lang->admin->link_add = '添加友链'; 36 | $lang->admin->link_edit = '修改友链信息'; 37 | $lang->admin->category = '站点分类'; 38 | $lang->admin->category_list = '分类列表'; 39 | $lang->admin->category_add = '添加分类'; 40 | $lang->admin->category_edit = '修改分类信息'; 41 | $lang->admin->site = '站点收录'; 42 | $lang->admin->site_list = '站点列表'; 43 | $lang->admin->site_add = '添加站点'; 44 | $lang->admin->site_edit = '修改站点信息'; 45 | $lang->admin->apply = '站点审核'; 46 | $lang->admin->apply_list = '审核列表'; 47 | $lang->admin->apply_edit = '审核站点编辑'; 48 | $lang->admin->apply_reject = '拒绝站点'; 49 | $lang->admin->apply_reject_list = '拒绝列表'; 50 | $lang->admin->article_category = '文章分类'; 51 | $lang->admin->article_category_list = '分类列表'; 52 | $lang->admin->article_category_add = '添加文章分类'; 53 | $lang->admin->article_category_edit = '修改分类信息'; 54 | $lang->admin->article = '文章资讯'; 55 | $lang->admin->article_list = '文章列表'; 56 | $lang->admin->article_add = '添加文章'; 57 | $lang->admin->article_edit = '修改文章信息'; 58 | $lang->admin->notice = '网站公告'; 59 | $lang->admin->notice_list = '公告列表'; 60 | $lang->admin->notice_add = '发布公告'; 61 | $lang->admin->notice_edit = '修改公告内容'; 62 | $lang->admin->settings = '系统设置'; 63 | $lang->admin->settings_material = '素材设置'; 64 | $lang->admin->user = '账号信息'; 65 | $lang->admin->logout = '退出登录'; 66 | 67 | $lang->admin->favicon = '本站 favicon 图标'; 68 | $lang->admin->logo = '主LOGO'; 69 | $lang->admin->logo_fixed = '辅LOGO'; 70 | $lang->admin->default_ico = '站点默认 ico 图标'; 71 | $lang->admin->loading = 'loading图'; 72 | $lang->admin->weixin = '微信二维码'; 73 | $lang->admin->banner = '顶栏大背景图'; 74 | // 后台--结束 75 | -------------------------------------------------------------------------------- /src/includes/lib/Oauth.php: -------------------------------------------------------------------------------- 1 | apiurl = $apiurl . 'connect.php'; 19 | $this->appid = $appid; 20 | $this->appkey = $appkey; 21 | $this->callback = $site_url . 'login.php'; 22 | } 23 | 24 | //获取登录跳转url 25 | public function login($type) 26 | { 27 | 28 | //-------生成唯一随机串防CSRF攻击 29 | $state = md5(uniqid(rand(), TRUE)); 30 | $_SESSION['Oauth_state'] = $state; 31 | 32 | //-------构造请求参数列表 33 | $keysArr = array( 34 | "act" => "login", 35 | "appid" => $this->appid, 36 | "appkey" => $this->appkey, 37 | "type" => $type, 38 | "redirect_uri" => $this->callback, 39 | "state" => $state 40 | ); 41 | $login_url = $this->apiurl . '?' . http_build_query($keysArr); 42 | $response = get_curl($login_url); 43 | $arr = json_decode($response, true); 44 | return $arr; 45 | } 46 | 47 | //登录成功返回网站 48 | public function callback() 49 | { 50 | //-------请求参数列表 51 | $keysArr = array( 52 | "act" => "callback", 53 | "appid" => $this->appid, 54 | "appkey" => $this->appkey, 55 | "code" => $_GET['code'] 56 | ); 57 | 58 | //------构造请求access_token的url 59 | $token_url = $this->apiurl . '?' . http_build_query($keysArr); 60 | $response = get_curl($token_url); 61 | 62 | $arr = json_decode($response, true); 63 | return $arr; 64 | } 65 | 66 | //查询用户信息 67 | public function query($type, $social_uid) 68 | { 69 | //-------请求参数列表 70 | $keysArr = array( 71 | "act" => "query", 72 | "appid" => $this->appid, 73 | "appkey" => $this->appkey, 74 | "type" => $type, 75 | "social_uid" => $social_uid 76 | ); 77 | 78 | //------构造请求access_token的url 79 | $token_url = $this->apiurl . '?' . http_build_query($keysArr); 80 | $response = get_curl($token_url); 81 | 82 | $arr = json_decode($response, true); 83 | return $arr; 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/admin/link_edit.php: -------------------------------------------------------------------------------- 1 | window.location.href="link.php";'); 13 | }; 14 | $link_item = $DB->find('link', '*', array('id' => $id)); 15 | 16 | if (empty($link_item)) { 17 | exit(''); 18 | }; 19 | ?> 20 |
21 |
22 | 27 |
28 |
29 |
30 |
admin->link_edit; ?>
31 |
32 |
33 | 34 |
35 | 友链ID 36 |
37 |
38 |
39 |
40 | 名称 41 | 42 |
43 |
44 |
45 | 链接 46 | 47 |
48 |
49 | 50 |
51 |
52 |
53 |
54 |
55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/admin/article_ajax.php: -------------------------------------------------------------------------------- 1 | window.location.href='./login.php';"); 6 | 7 | $act = _get('act'); 8 | switch ($act) { 9 | case 'add': 10 | $name = _post('name'); 11 | $catename = _post('catename'); 12 | $introduce = _post('introduce'); 13 | $tui = _post('tui'); 14 | if (empty($name)) { 15 | exit(""); 16 | } 17 | if (empty($catename)) { 18 | exit(""); 19 | } 20 | $result = $DB->insert('article', array( 21 | 'name' => $name, 22 | 'catename' => $catename, 23 | 'introduce' => $introduce, 24 | 'hits_total' => 0, 25 | 'tui' => $tui, 26 | 'time' => date("Y-m-d H:i:s"), 27 | )); 28 | echo ""; 29 | break; 30 | case 'edit': 31 | $id = _post('id'); 32 | $name = _post('name'); 33 | $catename = _post('catename'); 34 | $introduce = _post('introduce'); 35 | $tui = _post('tui'); 36 | $time = date("Y-m-d H:i:s"); 37 | if (empty($id)) { 38 | exit(""); 39 | } 40 | if (empty($name)) { 41 | exit(""); 42 | } 43 | if (empty($catename)) { 44 | exit(""); 45 | } 46 | $result = $DB->update('article', array( 47 | 'name' => $name, 48 | 'catename' => $catename, 49 | 'introduce' => $introduce, 50 | 'tui' => $tui, 51 | 'time' => date("Y-m-d H:i:s"), 52 | ), array('id' => $id)); 53 | echo ""; 54 | break; 55 | case 'del': 56 | @header('Content-Type: application/json; charset=UTF-8'); 57 | $id = _post('id'); 58 | if (!$id) { 59 | exit('{"code":-1,"msg":"id不能为空!"}'); 60 | } 61 | $result = $DB->delete('article', array('id' => $id)); 62 | if ($result) { 63 | exit('{"code":0,"msg":"删除成功!"}'); 64 | } 65 | exit('{"code":-1,"msg":"删除失败!"}'); 66 | break; 67 | default: 68 | exit('{"code":-4,"msg":"No Act"}'); 69 | break; 70 | } -------------------------------------------------------------------------------- /src/admin/nav_add.php: -------------------------------------------------------------------------------- 1 | 9 |
10 |
11 | 16 |
17 |
18 |
19 |
admin->nav_add; ?>
20 |
21 | 24 |
25 |
26 | 序号 27 | 28 |
29 |
30 |
31 | 图标 32 | 33 |
34 |
35 |
36 | 名称 37 | 38 |
39 |
40 |
41 | 链接 42 | 43 |
44 |
45 |
46 | 47 |
48 |
49 |
50 |
51 |
52 |
53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/admin/category_add.php: -------------------------------------------------------------------------------- 1 | 9 |
10 |
11 | 16 |
17 |
18 |
19 |
admin->category_add; ?>
20 |
21 | 24 |
25 |
26 | 序号 27 | 28 |
29 |
30 |
31 | 图标 32 | 33 |
34 |
35 |
36 | 名称 37 | 38 |
39 |
40 |
41 | 别名 42 | 43 |
44 |
45 |
46 | 47 |
48 |
49 |
50 |
51 |
52 |
53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/admin/article_category_add.php: -------------------------------------------------------------------------------- 1 | 9 |
10 |
11 | 17 |
18 |
19 |
20 |
admin->article_category_add; ?>
21 |
22 | 25 |
26 |
27 | 序号 28 | 29 |
30 |
31 |
32 | 图标 33 | 34 |
35 |
36 |
37 | 名称 38 | 39 |
40 |
41 |
42 | 别名 43 | 44 |
45 |
46 | 47 |
48 |
49 |
50 |
51 |
52 | 53 | 56 | 57 | -------------------------------------------------------------------------------- /src/about.php: -------------------------------------------------------------------------------- 1 | index->about . '-' . $conf['title']; 5 | ?> 6 | 7 | 8 | 9 | 10 | 11 | 12 | <?php echo $page_title; ?> 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 | 31 | 导航首页 »  32 | 关于本站 33 |
34 |
35 |
本站简介
36 |
37 |
38 |

本站名称:

39 |

本站标题:

40 |

站关键词:

41 |

本站描述:

42 |

本站域名:

43 |
44 |
45 |
46 |
47 |
网站统计
48 |
49 |
50 | 51 |
52 |
53 |
54 |
55 |
联系方式
56 |
57 |
58 |

QQ:

59 |

邮箱:

60 |
61 |
62 |
63 |
64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /src/admin/article_add.php: -------------------------------------------------------------------------------- 1 | findAll('article_category', '', '', 'sid asc'); 9 | ?> 10 | 11 |
12 |
13 | 18 |
19 |
20 |
21 |
22 | admin->article_add;?> 23 |
24 |
25 |
26 |
27 | 名称 28 | 29 |
30 |
31 |
32 | 推荐 33 | 34 |
35 |
36 |
37 | 分类 38 | 44 |
45 |
46 |
47 | 文章内容 48 | 49 |
50 |
51 | 52 |
53 |
54 |
55 |
56 |
57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/article_list.php: -------------------------------------------------------------------------------- 1 | window.location.href="../404.html";'); 9 | }; 10 | $article_cate = $DB->find('article_category', 'id,catename', array('id' => $id)); 11 | if (empty($article_cate)) { 12 | exit(''); 13 | }; 14 | $page_title = $article_cate['catename'] . ' - 文章列表 -' . $conf['title']; 15 | // 该分类下的文章列表 16 | $article_list = $DB->findAll('article', 'id,name,time', array('catename' => $article_cate['catename']), 'id desc', 30); 17 | ?> 18 | 19 | 20 | 21 | 22 | 23 | 24 | <?php echo $page_title; ?> 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
40 |
41 | 42 | 导航首页 »  43 | index->article; ?> »  44 | 45 |
46 |
47 | 48 |
49 |
50 |
51 |
52 | 62 |
63 |
64 |
65 |
66 |
67 |
68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /src/admin/category_edit.php: -------------------------------------------------------------------------------- 1 | window.location.href="./category.php";'); 12 | }; 13 | $row = $DB->find('category', '*', array('id' => $id)); 14 | 15 | if (empty($row)) { 16 | exit(''); 17 | }; 18 | ?> 19 |
20 |
21 | 26 |
27 |
28 |
29 |
admin->category_edit; ?>
30 |
31 | 34 |
35 | 36 |
37 | 序号 38 | 39 |
40 |
41 |
42 | 图标 43 | 44 |
45 |
46 |
47 | 名称 48 | 49 |
50 |
51 |
52 | 别名 53 | 54 |
55 |
56 | 57 |
58 |
59 |
60 |
61 |
62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/article_show.php: -------------------------------------------------------------------------------- 1 | window.location.href="../404.html";'); 8 | }; 9 | $article_item = $DB->find('article', '*', array('id' => $id)); 10 | if (empty($article_item)) { 11 | exit(''); 12 | }; 13 | require('./includes/lang.class.php'); 14 | // 更新文章阅读量 15 | $update_data = array('hits_total' => $article_item['hits_total'] + 1); 16 | $DB->update('article', $update_data, array('id' => $id)); 17 | // 显示最新阅读量 18 | $article_item['hits_total'] = $update_data['hits_total']; 19 | // 文章分类列表 20 | $article_cate = $DB->find('article_category', '*', array('catename' => $article_item['catename'])); 21 | if (empty($article_cate['alias'])) { 22 | $article_cate_url = "article-list-{$article_cate['id']}.html"; 23 | } else { 24 | $article_cate_url = "article-list-{$article_cate['alias']}.html"; 25 | }; 26 | $page_title = $article_item['name'] . '-' . $conf['title']; 27 | ?> 28 | 29 | 30 | 31 | 32 | 33 | 34 | <?php echo $page_title; ?> 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 |
50 |
51 | 52 | 导航首页 »  53 | index->article; ?> »  54 | 55 |
56 |
57 |
58 |
59 |
60 |

61 |         已浏览 62 |
63 |

64 | 65 |

66 |
67 |
68 |
69 |
70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /src/admin/nav_edit.php: -------------------------------------------------------------------------------- 1 | window.location.href="./nav.php";'); 12 | }; 13 | $nav_item = $DB->find('nav', '*', array('id' => $id)); 14 | 15 | if (empty($nav_item)) { 16 | exit(''); 17 | }; 18 | ?> 19 | 20 |
21 |
22 | 27 |
28 |
29 |
30 |
admin->nav_edit; ?>
31 |
32 | 35 |
36 | 37 |
38 | 序号 39 | 40 |
41 |
42 |
43 | 图标 44 | 45 |
46 |
47 |
48 | 名称 49 | 50 |
51 |
52 |
53 | 链接 54 | 55 |
56 |
57 | 58 |
59 |
60 |
61 |
62 |
63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /src/admin/nav_ajax.php: -------------------------------------------------------------------------------- 1 | window.location.href='./login.php';"); 6 | 7 | $act = _get('act'); 8 | switch ($act) { 9 | case 'add': 10 | $nid = _post('nid'); 11 | $icon = _post('icon'); 12 | $name = _post('name'); 13 | $url = _post('url'); 14 | if (!$nid) { 15 | exit(""); 16 | } 17 | if (!$icon) { 18 | exit(""); 19 | } 20 | if (!$name) { 21 | exit(""); 22 | } 23 | if (!$name) { 24 | exit(""); 25 | } 26 | if (!$url) { 27 | exit(""); 28 | } 29 | // 数据 30 | $_data = array( 31 | 'nid' => $nid, 32 | 'icon' => $icon, 33 | 'name' => $name, 34 | 'url' => $url 35 | ); 36 | $result = $DB->insert('nav', $_data); 37 | echo ""; 38 | break; 39 | case 'edit': 40 | $id = _post('id'); 41 | $row = $DB->find('nav', '*', array('id' => $id)); 42 | if (!$row) { 43 | exit(""); 44 | } 45 | $nid = _post('nid'); 46 | $icon = _post('icon'); 47 | $name = _post('name'); 48 | $url = _post('url'); 49 | if (!$nid) { 50 | exit(""); 51 | } 52 | if (!$icon) { 53 | exit(""); 54 | } 55 | if (!$name) { 56 | exit(""); 57 | } 58 | if (!$name) { 59 | exit(""); 60 | } 61 | if (!$url) { 62 | exit(""); 63 | } 64 | // 更新 65 | $_data = array( 66 | 'nid' => $nid, 67 | 'icon' => $icon, 68 | 'name' => $name, 69 | 'url' => $url 70 | ); 71 | $result = $DB->update('nav', $_data, array('id' => $id)); 72 | echo ""; 73 | break; 74 | case 'del': 75 | @header('Content-Type: application/json; charset=UTF-8'); 76 | $id = _post('id'); 77 | if (!$id) { 78 | exit('{"code":-1,"msg":"ID不能为空!"}'); 79 | } 80 | $result = $DB->delete('nav', array('id' => $id)); 81 | if ($result) { 82 | exit('{"code":0,"msg":"删除成功!"}'); 83 | } 84 | exit('{"code":-1,"msg":"删除失败!"}'); 85 | break; 86 | default: 87 | @header('Content-Type: application/json; charset=UTF-8'); 88 | exit('{"code":-4,"msg":"No Act"}'); 89 | break; 90 | } 91 | -------------------------------------------------------------------------------- /src/admin/article_category_ajax.php: -------------------------------------------------------------------------------- 1 | window.location.href='./login.php';"); 6 | 7 | $act = _get('act'); 8 | switch ($act) { 9 | case 'add': 10 | $sid = _post('sid'); 11 | $icon = _post('icon'); 12 | $catename = _post('catename'); 13 | $alias = _post('alias'); 14 | $count_article_category = $DB->count('article_category', array('catename' => $catename)); 15 | if ($count_article_category) { 16 | exit(""); 17 | } 18 | if ($alias) { 19 | $count_alias = $DB->count('article_category', array('alias' => $alias)); 20 | if ($count_alias) { 21 | exit(""); 22 | } 23 | } 24 | $result = $DB->insert('article_category', array( 25 | 'sid' => $sid, 26 | 'icon' => $icon, 27 | 'catename' => $catename, 28 | 'alias' => $alias 29 | )); 30 | echo ""; 31 | break; 32 | case 'edit': 33 | $id = _post('id'); 34 | $sid = _post('sid'); 35 | $icon = _post('icon'); 36 | $catename = _post('catename'); 37 | $alias = _post('alias'); 38 | $row = $DB->find('article_category', '*', array('id' => $id)); 39 | if (!$row) { 40 | exit(""); 41 | } 42 | if ($alias) { 43 | $count_alias = $DB->count('article_category', "`alias`='$alias' AND `id`<>$id"); 44 | if ($count_alias) { 45 | exit(""); 46 | } 47 | } 48 | // 更新分类信息 49 | $update_data = array( 50 | 'sid' => $sid, 51 | 'icon' => $icon, 52 | 'catename' => $catename, 53 | 'alias' => $alias 54 | ); 55 | $result = $DB->update('article_category', $update_data, array('id' => $id)); 56 | if ($row['catename'] != $catename) { 57 | // 分类名称有变更:更新文章表中的分类名 58 | $result = $DB->update('article', array('catename' => $catename), array('catename' => $row['catename'])); 59 | } 60 | echo ""; 61 | break; 62 | case 'del': 63 | @header('Content-Type: application/json; charset=UTF-8'); 64 | $id = _post('id'); 65 | if (!$id) { 66 | exit('{"code":-1,"msg":"ID不能为空!"}'); 67 | } 68 | $row = $DB->count('article_category', array('id' => $id)); 69 | if (!$row) { 70 | exit('{"code":-1,"msg":"分类不存在!"}'); 71 | } 72 | $result = $DB->delete('article_category', array('id' => $id)); 73 | if ($result) { 74 | exit('{"code":0,"msg":"删除成功!"}'); 75 | } 76 | exit('{"code":-1,"msg":"分类不存在!"}'); 77 | break; 78 | default: 79 | @header('Content-Type: application/json; charset=UTF-8'); 80 | exit('{"code":-4,"msg":"No Act"}'); 81 | break; 82 | } 83 | -------------------------------------------------------------------------------- /src/admin/article_category_edit.php: -------------------------------------------------------------------------------- 1 | window.location.href="article_category.php";'); 12 | }; 13 | $row = $DB->find('article_category', '*', array('id' => $id)); 14 | 15 | if (empty($row)) { 16 | exit(''); 17 | }; 18 | ?> 19 |
20 |
21 | 27 |
28 |
29 |
30 |
admin->article_category_edit;?>
31 |
32 | 35 |
36 | 37 |
38 | 序号 39 | 40 |
41 |
42 |
43 | 图标 44 | 45 |
46 |
47 |
48 | 名称 49 | 50 |
51 |
52 |
53 | 别名 54 | 55 |
56 |
57 |
58 | 59 |
60 |
61 |
62 |
63 |
64 |
65 | 66 | 69 | 70 | -------------------------------------------------------------------------------- /src/admin/account.php: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 |
12 | 16 |
17 | 18 |
19 |
20 |
21 |
22 |
admin->user; ?>
23 |
24 |
25 |
26 | 管理员账号 27 | 28 |
29 |
30 |
31 | 管理员密码 32 | 33 |

34 |
35 | 新的密码 36 | 37 |

38 |
39 | 重输密码 40 | 41 |

42 | 43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | 51 | 52 | 84 | 85 | -------------------------------------------------------------------------------- /src/admin/notice.php: -------------------------------------------------------------------------------- 1 | count('notice'); 13 | $notice_list = $DB->findAll('notice', '*', null, 'id desc', "$page_offset,$page_size"); 14 | ?> 15 |
16 |
20 |
21 |
22 |
23 | admin->notice_add; ?> 24 |
25 |
26 |
27 |
28 | admin->notice_list; ?> 29 | 条公告 30 | admin->notice_add; ?> 31 |
32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 49 | 50 | 51 | 52 |
ID内容操作
46 | 修改 47 | 删除 48 |
53 |
54 | 55 |
56 |
57 | 58 | 59 | 91 | 92 | -------------------------------------------------------------------------------- /src/admin/category_ajax.php: -------------------------------------------------------------------------------- 1 | window.location.href='./login.php';"); 6 | 7 | $act = _get('act'); 8 | switch ($act) { 9 | case 'add': 10 | $sid = _post('sid'); 11 | $icon = _post('icon'); 12 | $catename = _post('catename'); 13 | $alias = _post('alias'); 14 | 15 | if (!$sid) { 16 | exit(""); 17 | } 18 | if (!$icon) { 19 | exit(""); 20 | } 21 | if (!$catename) { 22 | exit(""); 23 | } 24 | $count_category = $DB->count('category', array('catename' => $catename)); 25 | if ($count_category) { 26 | exit(""); 27 | } 28 | if ($alias) { 29 | $count_alias = $DB->count('category', array('alias' => $alias)); 30 | if ($count_alias) { 31 | exit(""); 32 | } 33 | } 34 | $result = $DB->insert('category', array( 35 | 'sid' => $sid, 36 | 'icon' => $icon, 37 | 'catename' => $catename, 38 | 'alias' => $alias 39 | )); 40 | echo ""; 41 | break; 42 | case 'edit': 43 | $id = _post('id'); 44 | $row = $DB->find('category', '*', array('id' => $id)); 45 | if (!$row) { 46 | exit(""); 47 | } 48 | $sid = _post('sid'); 49 | $icon = _post('icon'); 50 | $catename = _post('catename'); 51 | $alias = _post('alias'); 52 | 53 | if (!$sid) { 54 | exit(""); 55 | } 56 | if (!$icon) { 57 | exit(""); 58 | } 59 | if (!$catename) { 60 | exit(""); 61 | } 62 | $count_category = $DB->count('category', "`catename`='$catename' AND `id`<>$id"); 63 | if ($count_category) { 64 | exit(""); 65 | } 66 | if ($alias) { 67 | $count_alias = $DB->count('category', "`alias`='$alias' AND `id`<>$id"); 68 | if ($count_alias) { 69 | exit(""); 70 | } 71 | } 72 | // 更新 73 | $_data = array( 74 | 'sid' => $sid, 75 | 'icon' => $icon, 76 | 'catename' => $catename, 77 | 'alias' => $alias 78 | ); 79 | $result = $DB->update('category', $_data, array('id' => $id)); 80 | echo ""; 81 | break; 82 | case 'del': 83 | @header('Content-Type: application/json; charset=UTF-8'); 84 | $id = _post('id'); 85 | if (!$id) { 86 | exit('{"code":-1,"msg":"id不能为空!"}'); 87 | } 88 | $result = $DB->delete('category', array('id' => $id)); 89 | if ($result) { 90 | exit('{"code":0,"msg":"删除成功!"}'); 91 | } 92 | exit('{"code":-1,"msg":"删除失败!"}'); 93 | break; 94 | default: 95 | @header('Content-Type: application/json; charset=UTF-8'); 96 | exit('{"code":-4,"msg":"No Act"}'); 97 | break; 98 | } 99 | -------------------------------------------------------------------------------- /src/admin/article_edit.php: -------------------------------------------------------------------------------- 1 | window.location.href="article.php";'); 12 | }; 13 | $item = $DB->find('article', '*', array('id' => $id)); 14 | if (empty($item)) { 15 | exit(''); 16 | }; 17 | $cate_list = $DB->findAll('article_category', '', '', 'sid asc'); 18 | ?> 19 |
20 |
21 | 26 |
27 |
28 |
29 |
30 | admin->article_edit;?> 31 |
32 |
33 | 36 |
37 | 38 |
39 | 名称 40 | 41 |
42 |
43 |
44 | 推荐 45 | 46 |
47 |
48 |
49 | 分类 50 | 57 |
58 |
59 |
60 | 文章内容 61 | 62 |
63 |
64 | 65 |
66 |
67 |
68 |
69 |
70 | 71 | 72 | 73 | 76 | 77 | -------------------------------------------------------------------------------- /src/search.php: -------------------------------------------------------------------------------- 1 | window.location.href="index.html";'); 8 | }; 9 | 10 | $results = $DB->getAll("SELECT * FROM `pre_site` WHERE `name` LIKE '%$keyword%' OR `url` LIKE '%$keyword%' OR `introduce` LIKE '%$keyword%' order by `lid` ASC"); 11 | $count = count($results); 12 | $site_list_rank = $DB->findAll('site', '*', null, 'hits_total desc', 10); 13 | $page_title = '站内搜索 -' . $conf['title']; 14 | ?> 15 | 16 | 17 | 18 | 19 | 20 | 21 | <?php echo $page_title; ?> 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
38 |
39 |
40 | 41 | 导航首页 »  42 | 搜索 的结果 43 |
44 |
45 |
搜索 的结果
46 |
47 | 48 |

暂无搜索结果,请尝试更换关键词重新搜索!

49 | 50 | " target="_blank" class="item" data-id=""> 51 | 52 | 53 | 54 | 56 |
57 |
58 |
59 |
60 |
61 |
分类总TOP10
62 |
63 |
64 | $rs) { ?> 65 | " data-id=""> 66 | 67 | 68 | 69 | 70 | 71 | 72 |
73 |
74 |
75 |
76 |
77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /src/install/db.class.php: -------------------------------------------------------------------------------- 1 | setDefaultIcon($defaultIco); 29 | 30 | /** 31 | * 检测URL参数 32 | */ 33 | $url = $_GET['url']; 34 | $url = trim(htmlspecialchars($url)); 35 | 36 | /* 37 | * 格式化 URL, 并尝试读取缓存 38 | */ 39 | $formatUrl = $favicon->formatUrl($url); 40 | 41 | if ($expire == 0) { 42 | $favicon->getFavicon($formatUrl, false); 43 | @header("Cache-Control: public, max-age={$expire}"); 44 | @header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); 45 | exit; 46 | } else { 47 | $defaultMD5 = md5(file_get_contents($defaultIco)); 48 | 49 | $data = Cache::get($formatUrl, $defaultMD5, $expire); 50 | if ($data !== NULL) { 51 | foreach ($favicon->getHeader() as $header) { 52 | @header($header); 53 | } 54 | @header("Cache-Control: public, max-age={$expire}"); 55 | // 缓存文件的修改时间 56 | $file = CACHE_ROOT . '/' . parse_url($formatUrl)['host'] . '.txt'; 57 | @header("Last-Modified: " . gmdate("D, d M Y H:i:s", filemtime($file)) . " GMT"); 58 | echo $data; 59 | exit; 60 | } 61 | 62 | /** 63 | * 缓存中没有指定的内容时, 重新获取内容并缓存起来 64 | */ 65 | $content = $favicon->getFavicon($formatUrl, TRUE); 66 | 67 | if (md5($content) == $defaultMD5) { 68 | $expire = 43200; // 如果返回默认图标,设置过期时间为12小时。Cache::get 方法中需同时修改 69 | } 70 | 71 | Cache::set($formatUrl, $content, $expire); 72 | 73 | foreach ($favicon->getHeader() as $header) { 74 | @header($header); 75 | } 76 | @header("Cache-Control: public, max-age={$expire}"); 77 | @header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); 78 | 79 | echo $content; 80 | exit; 81 | } 82 | 83 | 84 | /** 85 | * 缓存类 86 | */ 87 | class Cache 88 | { 89 | /** 90 | * 获取缓存的值, 不存在时返回 null 91 | * 92 | * @param $key 93 | * @param $default 默认图片 94 | * @param $expire 过期时间 95 | * @return string 96 | */ 97 | public static function get($key, $default, $expire) 98 | { 99 | //$f = md5( strtolower( $key ) ); 100 | $f = parse_url($key)['host']; 101 | 102 | $file = CACHE_ROOT . '/' . $f . '.txt'; 103 | 104 | if (is_file($file)) { 105 | $data = file_get_contents($file); 106 | if (md5($data) == $default) { 107 | $expire = 43200; //如果返回默认图标,过期时间为12小时。 108 | } 109 | if ((time() - filemtime($file)) > $expire) { 110 | return null; 111 | } else { 112 | return $data; 113 | } 114 | } else { 115 | return null; 116 | } 117 | } 118 | 119 | /** 120 | * 设置缓存 121 | * 122 | * @param $key 123 | * @param $value 124 | * @param $expire 过期时间 125 | */ 126 | public static function set($key, $value, $expire) 127 | { 128 | //$f = md5( strtolower( $key ) ); 129 | $f = parse_url($key)['host']; 130 | 131 | $file = CACHE_ROOT . '/' . $f . '.txt'; 132 | 133 | //如果缓存目录不存在则创建 134 | if (!is_dir(CACHE_ROOT)) mkdir(CACHE_ROOT, 0777, true) or die('创建缓存目录失败!'); 135 | 136 | if (!is_file($file) || (time() - filemtime($file)) > $expire) { 137 | $imgdata = fopen($file, "w") or die("Unable to open file!"); //w 重写 a追加 138 | fwrite($imgdata, $value); 139 | fclose($imgdata); 140 | } 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /src/includes/common.php: -------------------------------------------------------------------------------- 1 | 为了您站点安全,在您完成如下操作之前系统不会工作。

为什么必须建立 install.lock 文件?

它是安装保护文件,如果检测不到它,就会认为站点还没安装,此时任何人都可以安装/重装此网站。

'); 30 | exit; 31 | } 32 | 33 | if (!file_exists(ROOT . '/config.php')) { 34 | // 没有配置文件 35 | sysmsg('

系统配置文件 config.php 丢失!

点击此处 运行安装程序。', '站点提示信息', 1); 36 | } 37 | 38 | // 配置文件 39 | require ROOT . '/config.php'; 40 | if (isset($app_config['subpath']) && !empty($app_config['subpath'])) { 41 | // 程序安装在子路径,移除URL中的子路径 42 | $site_path = str_replace($app_config['subpath'], '', $site_path); 43 | } 44 | 45 | $site_url = $site_http . $site_path; 46 | 47 | if (!isset($dbconfig) || !$dbconfig['user'] || !$dbconfig['pwd'] || !$dbconfig['dbname']) // 检测安装1 48 | { 49 | sysmsg('

系统配置文件 config.php 异常!

点击此处 运行安装程序。', '站点提示信息', 1); 50 | } 51 | 52 | include_once(SYSTEM_ROOT . '/autoloader.php'); 53 | Autoloader::register(); 54 | $DB = new \lib\PdoHelper($dbconfig); 55 | if ($DB->query("select * from pre_config where 1") == FALSE) // 检测安装2 56 | { 57 | echo '你还没安装!点此安装'; 58 | exit(); 59 | } 60 | 61 | $conf = getAllSetting(); 62 | define('SYS_KEY', $conf['sys_key']); 63 | 64 | $site_cdnpublic = $site_http . '/assets/'; 65 | $password_hash = '!@#%!s!0'; 66 | $admin_islogin = 0; 67 | 68 | if (isset($_COOKIE["admin_token"])) { 69 | $token = authcode(daddslashes($_COOKIE['admin_token']), 'DECODE', SYS_KEY); 70 | list($user, $sid) = explode("\t", $token); 71 | $session = md5($conf['admin_user'] . $conf['admin_pwd'] . $password_hash); 72 | if ($session == $sid) { 73 | $admin_islogin = 1; 74 | } 75 | } 76 | 77 | if (defined('IN_ADMIN')) return; 78 | 79 | if (isset($conf['blackip'])) { 80 | $denyip = explode('|', $conf['blackip']); 81 | $clientip = $_SERVER['REMOTE_ADDR']; 82 | if (in_array($clientip, $denyip) && !$admin_islogin) { 83 | header("HTTP/1.1 403 Forbidden"); 84 | exit; 85 | } 86 | } 87 | 88 | $user_islogin = 0; 89 | if (isset($_COOKIE["user_token"])) { 90 | $token = authcode(daddslashes($_COOKIE['user_token']), 'DECODE', SYS_KEY); 91 | if ($token) { 92 | list($uid, $sid, $expiretime) = explode("\t", $token); 93 | if ($userrow = $DB->getRow("SELECT * FROM pre_user WHERE uid='" . intval($uid) . "' LIMIT 1")) { 94 | $session = md5($userrow['type'] . $userrow['openid'] . $password_hash); 95 | if ($session === $sid && $expiretime > time()) { 96 | if ($userrow['enable'] == 1) { 97 | $user_islogin = 1; 98 | } else { 99 | $_SESSION['user_block'] = true; 100 | } 101 | } 102 | } 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /src/admin/sidebar.php: -------------------------------------------------------------------------------- 1 |
2 | 10 | 39 |
40 |
41 | -------------------------------------------------------------------------------- /src/admin/navbar.php: -------------------------------------------------------------------------------- 1 |
2 | 52 |
53 | 54 |
55 |
56 | -------------------------------------------------------------------------------- /src/admin/link.php: -------------------------------------------------------------------------------- 1 | count('link'); 14 | $link_list = $DB->findAll('link', '*', null, 'id asc', "$page_offset,$page_size"); 15 | ?> 16 |
17 |
18 | 22 |
23 |
24 | 27 |
28 |
29 |
30 | admin->link_add; ?> 31 | admin->link_list;?> 32 | (共 个) 33 |
34 |
35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 54 | 55 | 56 | 57 |
ID名称链接操作
51 | 修改 52 | 删除 53 |
58 |
59 |
60 | 61 |
62 |
63 | 64 | 65 | 66 | 98 | 99 | -------------------------------------------------------------------------------- /src/assets/editor/plugins/emoticons/emoticons.js: -------------------------------------------------------------------------------- 1 | KindEditor.plugin('emoticons', function(K) { 2 | var self = this, name = 'emoticons', 3 | path = (self.emoticonsPath || self.pluginsPath + 'emoticons/images/'), 4 | allowPreview = self.allowPreviewEmoticons === undefined ? true : self.allowPreviewEmoticons, 5 | currentPageNum = 1; 6 | self.clickToolbar(name, function() { 7 | var rows = 5, cols = 8, total = 38, startNum = 0, 8 | cells = rows * cols, pages = Math.ceil(total / cells), 9 | colsHalf = Math.floor(cols / 2), 10 | wrapperDiv = K('
'), 11 | elements = [], 12 | menu = self.createMenu({ 13 | name : name, 14 | beforeRemove : function() { 15 | removeEvent(); 16 | } 17 | }); 18 | menu.div.append(wrapperDiv); 19 | var previewDiv, previewImg; 20 | if (allowPreview) { 21 | previewDiv = K('
').css('right', 0); 22 | previewImg = K(''); 23 | wrapperDiv.append(previewDiv); 24 | previewDiv.append(previewImg); 25 | } 26 | function bindCellEvent(cell, j, num) { 27 | if (previewDiv) { 28 | cell.mouseover(function() { 29 | if (j > colsHalf) { 30 | previewDiv.css('left', 0); 31 | previewDiv.css('right', ''); 32 | } else { 33 | previewDiv.css('left', ''); 34 | previewDiv.css('right', 0); 35 | } 36 | previewImg.attr('src', path + num + '.gif'); 37 | K(this).addClass('ke-on'); 38 | }); 39 | } else { 40 | cell.mouseover(function() { 41 | K(this).addClass('ke-on'); 42 | }); 43 | } 44 | cell.mouseout(function() { 45 | K(this).removeClass('ke-on'); 46 | }); 47 | cell.click(function(e) { 48 | self.insertHtml('').hideMenu().focus(); 49 | e.stop(); 50 | }); 51 | } 52 | function createEmoticonsTable(pageNum, parentDiv) { 53 | var table = document.createElement('table'); 54 | parentDiv.append(table); 55 | if (previewDiv) { 56 | K(table).mouseover(function() { 57 | previewDiv.show('block'); 58 | }); 59 | K(table).mouseout(function() { 60 | previewDiv.hide(); 61 | }); 62 | elements.push(K(table)); 63 | } 64 | table.className = 'ke-table'; 65 | table.cellPadding = 0; 66 | table.cellSpacing = 0; 67 | table.border = 0; 68 | var num = (pageNum - 1) * cells + startNum; 69 | for (var i = 0; i < rows; i++) { 70 | var row = table.insertRow(i); 71 | for (var j = 0; j < cols; j++) { 72 | var cell = K(row.insertCell(j)); 73 | cell.addClass('ke-cell'); 74 | if (i * cols + j < total) { 75 | bindCellEvent(cell, j, num); 76 | } 77 | var span = K('') 78 | .css('background-position', '-' + (24 * num) + 'px 0px') 79 | .css('background-image', 'url(' + path + 'static.gif)'); 80 | cell.append(span); 81 | elements.push(cell); 82 | num++; 83 | } 84 | } 85 | return table; 86 | } 87 | var table = createEmoticonsTable(currentPageNum, wrapperDiv); 88 | function removeEvent() { 89 | K.each(elements, function() { 90 | this.unbind(); 91 | }); 92 | } 93 | var pageDiv; 94 | function bindPageEvent(el, pageNum) { 95 | el.click(function(e) { 96 | removeEvent(); 97 | table.parentNode.removeChild(table); 98 | pageDiv.remove(); 99 | table = createEmoticonsTable(pageNum, wrapperDiv); 100 | createPageTable(pageNum); 101 | currentPageNum = pageNum; 102 | e.stop(); 103 | }); 104 | } 105 | function createPageTable(currentPageNum) { 106 | if (pages <= 1) { 107 | return; 108 | } 109 | pageDiv = K('
'); 110 | wrapperDiv.append(pageDiv); 111 | for (var pageNum = 1; pageNum <= pages; pageNum++) { 112 | if (currentPageNum !== pageNum) { 113 | var a = K('[' + pageNum + ']'); 114 | bindPageEvent(a, pageNum); 115 | pageDiv.append(a); 116 | elements.push(a); 117 | } else { 118 | pageDiv.append(K('@[' + pageNum + ']')); 119 | } 120 | pageDiv.append(K('@ ')); 121 | } 122 | } 123 | createPageTable(currentPageNum); 124 | }); 125 | }); 126 | -------------------------------------------------------------------------------- /src/article.php: -------------------------------------------------------------------------------- 1 | index->article . '-' . $conf['title']; 7 | $row_article_cate = $DB->findAll('article_category', 'id,icon,catename', '', 'sid asc'); 8 | $row_article_suggest = $DB->findAll('article', '*', 'tui=1', 'time desc', 4); 9 | // $sql = `SELECT s.catename AS category, 10 | // JSON_ARRAYAGG( 11 | // JSON_OBJECT('id', a.id, 'name', a.name, 'introduce', a.introduce, 'hits_total', a.hits_total, 'tui', a.tui, 'time', a.time) 12 | // ) AS articles 13 | // FROM pre_article_category s 14 | // LEFT JOIN pre_article a ON s.catename = a.catename 15 | // GROUP BY s.catename`; 16 | // $row_article = $DB->query($sql); 17 | // print($row_article); 18 | // exit; 19 | ?> 20 | 21 | 22 | 23 | 24 | 25 | 26 | <?php echo $page_title; ?> 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
40 |
41 | 42 | 导航首页 »  43 | index->article; ?> 44 |
45 |
46 |
推荐文章
47 |
48 |
49 | 57 |
58 |
59 |
60 | 61 | 62 |
63 |
64 | 65 | 66 |
67 |
68 | findAll('article', '*', array('catename' => $row['catename']), 'time desc', 4); 70 | foreach ($row_article as $rows) { 71 | preg_match_all("|]+src=\"([^>\"]+)\"?[^>]*>|is", $rows['introduce'], $img); 72 | $imgsrc = !empty($img[1]) ? $img[1][0] : ''; 73 | if (!$imgsrc) $imgsrc = 'assets/images/no.png'; ?> 74 | 75 |
76 |
77 |
78 |
79 | 80 | 81 |
82 |
83 |
84 | 85 |
86 |
87 | 88 |
89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /src/admin/category.php: -------------------------------------------------------------------------------- 1 | count('category'); 13 | $cate_list = $DB->findAll('category', '*', null, 'sid asc', "$page_offset,$page_size"); 14 | ?> 15 |
16 |
20 |
21 |
22 | 25 |
26 |
27 |
28 | admin->category_list; ?> 29 | 个分类 30 | admin->category_add; ?> 31 |
32 |
33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 56 | 57 | 58 | 59 |
ID排序图标名称别名操作
53 | 修改 54 | 删除 55 |
60 |
61 |
62 | 63 |
64 |
65 | 66 | 67 | 68 | 100 | 101 | -------------------------------------------------------------------------------- /src/admin/nav.php: -------------------------------------------------------------------------------- 1 | count('nav'); 13 | $nav_list = $DB->findAll('nav', '*', null, 'nid asc', "$page_offset,$page_size"); 14 | ?> 15 |
16 |
17 | 21 |
22 |
23 |
24 | admin->nav_add; ?> 25 |
26 |
27 |
28 |
29 | admin->nav_list; ?> 30 | 个导航 31 | admin->nav_add; ?> 32 |
33 |
34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 56 | 57 | 58 | 59 |
序号图标名称链接操作
52 | 查看 53 | 修改 54 | 删除 55 |
60 |
61 |
62 | 63 | 64 |
65 |
66 | 67 | 68 | 69 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /src/ranking.php: -------------------------------------------------------------------------------- 1 | index->ranking . '-' . $conf['title']; 7 | $rank_day = $DB->findAll('site','id,name,alias,img,hits_day', array('date' => date("Y-m-d",time())), 'hits_day desc', 20); 8 | $rank_month = $DB->findAll('site','id,name,alias,img,hits_month', array('datem' => date("Y-m",time())), 'hits_month desc', 20); 9 | $rank_total = $DB->findAll('site','id,name,alias,img,hits_total', null, 'hits_total desc', 20); 10 | ?> 11 | 12 | 13 | 14 | 15 | 16 | <?php echo $page_title; ?> 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 | 34 | 导航首页 »  35 | index->ranking; ?> 36 |
37 |
38 |
39 |
40 |
Day日浏览榜
41 | 53 |
54 |
55 | 56 |
57 |
58 |
Month月浏览榜
59 | 71 |
72 |
73 | 74 |
75 |
76 |
Total总浏览榜
77 | 88 |
89 |
90 |
91 |
92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /src/admin/site_ajax.php: -------------------------------------------------------------------------------- 1 | window.location.href='./login.php';"); 6 | 7 | $act = _get('act'); 8 | switch ($act) { 9 | case 'add': 10 | // 添加站点 11 | $lid = _post('lid'); 12 | $tui = _post('tui'); 13 | $star = _post('star'); 14 | $name = _post('name'); 15 | $img = _post('img'); 16 | $catename = _post('catename'); 17 | $url = _post('url'); 18 | $alias = _post('alias', ''); 19 | $keywords = _post('keywords', ''); 20 | $introduce = _post('introduce', ''); 21 | $time = date("Y-m-d H:i:s"); 22 | $date = date("Y-m-d"); 23 | $datem = date("Y-m"); 24 | if ($alias) { 25 | $count_alias = $DB->count('site', array('alias' => $alias)); 26 | if ($count_alias) { 27 | exit(""); 28 | } 29 | } 30 | $count_url = $DB->count('site', array('url' => $url)); 31 | if ($count_url) { 32 | exit(""); 33 | } 34 | // 插入数据 35 | $insert_data = array( 36 | 'lid' => $lid, 37 | 'tui' => $tui, 38 | 'star' => $star, 39 | 'name' => $name, 40 | 'img' => $img, 41 | 'catename' => $catename, 42 | 'url' => $url, 43 | 'alias' => $alias, 44 | 'keywords' => $keywords, 45 | 'introduce' => $introduce, 46 | 'time' => $time, 47 | 'date' => $date, 48 | 'datem' => $datem, 49 | ); 50 | // print_r($insert_data);exit; 51 | $result = $DB->insert('site', $insert_data); 52 | if ($result) { 53 | // 删除申请记录 54 | $apply_id = _post('apply_id'); 55 | if ($apply_id) { 56 | $DB->delete('apply', array('id' => $apply_id)); 57 | } 58 | exit(""); 59 | } 60 | exit(""); 61 | break; 62 | case 'edit': 63 | $id = _post('id'); 64 | $lid = _post('lid'); 65 | $tui = _post('tui'); 66 | $star = _post('star'); 67 | $name = _post('name'); 68 | $img = _post('img'); 69 | $catename = _post('catename'); 70 | $url = _post('url'); 71 | $alias = _post('alias', ''); 72 | $keywords = _post('keywords', ''); 73 | $introduce = _post('introduce', ''); 74 | $time = date("Y-m-d H:i:s"); 75 | 76 | if ($alias) { 77 | $count_alias = $DB->count('site', "`alias`='$alias' AND `id`<>$id"); 78 | if ($count_alias) { 79 | exit(""); 80 | } 81 | } 82 | $count_url = $DB->count('site', "`url`='$url' AND `id`<>$id"); 83 | if ($count_url) { 84 | exit(""); 85 | } 86 | // 更新数据 87 | $result = $DB->update('site', array( 88 | 'lid' => $lid, 89 | 'tui' => $tui, 90 | 'star' => $star, 91 | 'name' => $name, 92 | 'img' => $img, 93 | 'catename' => $catename, 94 | 'url' => $url, 95 | 'alias' => $alias, 96 | 'keywords' => $keywords, 97 | 'introduce' => $introduce, 98 | 'time' => $time 99 | ), array('id' => $id)); 100 | echo ""; 101 | break; 102 | case 'del': 103 | @header('Content-Type: application/json; charset=UTF-8'); 104 | $id = _post('id'); 105 | if (!$id) { 106 | exit('{"code":-1,"msg":"ID不能为空!"}'); 107 | } 108 | $result = $DB->delete('site', array('id' => $id)); 109 | if ($result) { 110 | exit('{"code":0,"msg":"删除成功!"}'); 111 | } 112 | exit('{"code":-1,"msg":"删除失败!"}'); 113 | break; 114 | default: 115 | @header('Content-Type: application/json; charset=UTF-8'); 116 | exit('{"code":-4,"msg":"No Act"}'); 117 | break; 118 | } 119 | -------------------------------------------------------------------------------- /src/admin/article_category.php: -------------------------------------------------------------------------------- 1 | count('article_category'); 13 | $article_cate_list = $DB->findAll('article_category', '*', null, 'sid asc', "$page_offset,$page_size"); 14 | ?> 15 |
16 |
17 | 22 |
23 |
24 | 27 |
28 |
29 |
30 | admin->article_category_add; ?> 31 | admin->article_category_list; ?> 32 | 个分类 33 |
34 |
35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 56 | 57 | 58 | 59 |
序号图标名称别名操作
53 | 修改 54 | 删除 55 |
60 |
61 |
62 | 63 |
64 |
65 | 66 | 67 | 99 | 100 | -------------------------------------------------------------------------------- /src/admin/article.php: -------------------------------------------------------------------------------- 1 | count('article'); 13 | $article_list = $DB->findAll('article', '*', null, 'id desc', "$page_offset,$page_size"); 14 | ?> 15 |
16 |
17 | 21 |
22 |
23 | 26 |
27 |
28 |
29 | admin->article_add; ?> 30 | admin->article_list; ?> 31 | 篇文章 32 |
33 |
34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 54 | 55 | 60 | 61 | 62 | 63 |
序号名称分类推荐浏览操作
52 | 是" : "否"; ?> 53 | 56 | 查看 57 | 修改 58 | 删除 59 |
64 |
65 |
66 | 67 |
68 |
69 | 70 | 71 | 72 | 104 | 105 | -------------------------------------------------------------------------------- /src/admin/site_add.php: -------------------------------------------------------------------------------- 1 | findAll('category', 'catename', null, 'sid asc'); 9 | ?> 10 |
11 |
16 |
17 |
18 |
19 |
admin->site_add; ?>
20 |
21 | 24 |
25 |
26 | 序号 27 | 28 |
29 |
30 |
31 | 推荐 32 | 33 |
34 |
35 |
36 | 星级 37 | 38 |
39 |
40 |
41 | 名称 42 | 43 |
44 |
45 |
46 | 图片 47 | 48 |
49 |
50 |
51 | 分类 52 | 58 |
59 |
60 |
61 | 链接 62 | 63 |
64 |
65 |
66 | 别名 67 | 68 |
69 |
70 |
71 | 关键词 72 | 73 |
74 |
75 |
76 | 简介 77 | 78 |
79 |
80 |
81 | 82 |
83 |
84 |
85 |
86 |
87 |
88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/category.php: -------------------------------------------------------------------------------- 1 | window.location.href="../404.html";'); 7 | }; 8 | 9 | if (empty($alias)) { 10 | $cate_item = $DB->find('category', '*', array('id' => $id)); 11 | } else { 12 | $cate_item = $DB->find('category', '*', array('alias' => $alias)); 13 | } 14 | if (empty($cate_item)) { 15 | exit(''); 16 | }; 17 | 18 | require('./includes/lang.class.php'); 19 | $site_list = $DB->findAll('site', '*', array('catename' => $cate_item['catename']), 'lid asc'); 20 | $cate_list = $DB->findAll('category', '*', '', 'sid asc'); 21 | $site_list_rank = $DB->findAll('site', '*', null, 'hits_total desc', 10); 22 | $page_title = $cate_item['catename'] . '- 分类列表 - ' . $conf['title']; 23 | ?> 24 | 25 | 26 | 27 | 28 | 29 | 30 | <?php echo $page_title; ?> 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 50 | 51 |
52 |
53 |
54 | 55 | 导航首页 »  56 |
57 |
58 |
59 | 60 |
61 | 73 |
74 |
75 |
76 |
77 |
分类总TOP10
78 |
79 | 92 |
93 |
94 |
95 |
96 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /src/assets/editor/plugins/flash/flash.js: -------------------------------------------------------------------------------- 1 | KindEditor.plugin('flash', function(K) { 2 | var self = this, name = 'flash', lang = self.lang(name + '.'), 3 | allowFlashUpload = K.undef(self.allowFlashUpload, true), 4 | allowFileManager = K.undef(self.allowFileManager, false), 5 | formatUploadUrl = K.undef(self.formatUploadUrl, true), 6 | extraParams = K.undef(self.extraFileUploadParams, {}), 7 | filePostName = K.undef(self.filePostName, 'imgFile'), 8 | uploadJson = K.undef(self.uploadJson, self.basePath + 'php/upload_json.php'); 9 | self.plugin.flash = { 10 | edit : function() { 11 | var html = [ 12 | '
', 13 | //url 14 | '
', 15 | '', 16 | '  ', 17 | '  ', 18 | '', 19 | '', 20 | '', 21 | '
', 22 | //width 23 | '
', 24 | '', 25 | ' ', 26 | '
', 27 | //height 28 | '
', 29 | '', 30 | ' ', 31 | '
', 32 | '
' 33 | ].join(''); 34 | var dialog = self.createDialog({ 35 | name : name, 36 | width : 450, 37 | title : self.lang(name), 38 | body : html, 39 | yesBtn : { 40 | name : self.lang('yes'), 41 | click : function(e) { 42 | var url = K.trim(urlBox.val()), 43 | width = widthBox.val(), 44 | height = heightBox.val(); 45 | if (url == 'http://' || K.invalidUrl(url)) { 46 | alert(self.lang('invalidUrl')); 47 | urlBox[0].focus(); 48 | return; 49 | } 50 | if (!/^\d*$/.test(width)) { 51 | alert(self.lang('invalidWidth')); 52 | widthBox[0].focus(); 53 | return; 54 | } 55 | if (!/^\d*$/.test(height)) { 56 | alert(self.lang('invalidHeight')); 57 | heightBox[0].focus(); 58 | return; 59 | } 60 | var html = K.mediaImg(self.themesPath + 'common/blank.gif', { 61 | src : url, 62 | type : K.mediaType('.swf'), 63 | width : width, 64 | height : height, 65 | quality : 'high' 66 | }); 67 | self.insertHtml(html).hideDialog().focus(); 68 | } 69 | } 70 | }), 71 | div = dialog.div, 72 | urlBox = K('[name="url"]', div), 73 | viewServerBtn = K('[name="viewServer"]', div), 74 | widthBox = K('[name="width"]', div), 75 | heightBox = K('[name="height"]', div); 76 | urlBox.val('http://'); 77 | 78 | if (allowFlashUpload) { 79 | var uploadbutton = K.uploadbutton({ 80 | button : K('.ke-upload-button', div)[0], 81 | fieldName : filePostName, 82 | extraParams : extraParams, 83 | url : K.addParam(uploadJson, 'dir=flash'), 84 | afterUpload : function(data) { 85 | dialog.hideLoading(); 86 | if (data.error === 0) { 87 | var url = data.url; 88 | if (formatUploadUrl) { 89 | url = K.formatUrl(url, 'absolute'); 90 | } 91 | urlBox.val(url); 92 | if (self.afterUpload) { 93 | self.afterUpload.call(self, url, data, name); 94 | } 95 | alert(self.lang('uploadSuccess')); 96 | } else { 97 | alert(data.message); 98 | } 99 | }, 100 | afterError : function(html) { 101 | dialog.hideLoading(); 102 | self.errorDialog(html); 103 | } 104 | }); 105 | uploadbutton.fileBox.change(function(e) { 106 | dialog.showLoading(self.lang('uploadLoading')); 107 | uploadbutton.submit(); 108 | }); 109 | } else { 110 | K('.ke-upload-button', div).hide(); 111 | } 112 | 113 | if (allowFileManager) { 114 | viewServerBtn.click(function(e) { 115 | self.loadPlugin('filemanager', function() { 116 | self.plugin.filemanagerDialog({ 117 | viewType : 'LIST', 118 | dirName : 'flash', 119 | clickFn : function(url, title) { 120 | if (self.dialogs.length > 1) { 121 | K('[name="url"]', div).val(url); 122 | if (self.afterSelectFile) { 123 | self.afterSelectFile.call(self, url); 124 | } 125 | self.hideDialog(); 126 | } 127 | } 128 | }); 129 | }); 130 | }); 131 | } else { 132 | viewServerBtn.hide(); 133 | } 134 | 135 | var img = self.plugin.getSelectedFlash(); 136 | if (img) { 137 | var attrs = K.mediaAttrs(img.attr('data-ke-tag')); 138 | urlBox.val(attrs.src); 139 | widthBox.val(K.removeUnit(img.css('width')) || attrs.width || 0); 140 | heightBox.val(K.removeUnit(img.css('height')) || attrs.height || 0); 141 | } 142 | urlBox[0].focus(); 143 | urlBox[0].select(); 144 | }, 145 | 'delete' : function() { 146 | self.plugin.getSelectedFlash().remove(); 147 | // [IE] 删除图片后立即点击图片按钮出错 148 | self.addBookmark(); 149 | } 150 | }; 151 | self.clickToolbar(name, self.plugin.flash.edit); 152 | }); 153 | -------------------------------------------------------------------------------- /src/admin/site_edit.php: -------------------------------------------------------------------------------- 1 | window.location.href="./site.php";'); 12 | }; 13 | $row = $DB->find('site', '*', array('id' => $id)); 14 | if (empty($row)) { 15 | exit(''); 16 | }; 17 | 18 | $cate_list = $DB->findAll('category', 'catename', null, 'sid asc'); 19 | ?> 20 |
21 |
26 |
27 |
28 |
29 |
admin->site_edit; ?>
30 |
31 | 34 |
35 | 36 |
37 | 序号 38 | 39 |
40 |
41 |
42 | 推荐 43 | 44 |
45 |
46 |
47 | 星级 48 | 49 |
50 |
51 |
52 | 名称 53 | 54 |
55 |
56 |
57 | 图片 58 | 59 |
60 |
61 |
62 | 分类 63 | 70 |
71 |
72 |
73 | 链接 74 | 75 |
76 |
77 |
78 | 别名 79 | 80 |
81 |
82 |
83 | 关键词 84 | 85 |
86 |
87 |
88 | 简介 89 | 90 |
91 |
92 | 93 |
94 |
95 |
96 |
97 |
98 | 99 | 102 | 103 | -------------------------------------------------------------------------------- /src/admin/apply_edit.php: -------------------------------------------------------------------------------- 1 | window.location.href="apply.php";'); 12 | }; 13 | $apply_item = $DB->find('apply', '*', array('id' => $id)); 14 | 15 | if (empty($apply_item)) { 16 | exit(''); 17 | }; 18 | $cate_list = $DB->findAll('category', 'catename', null, 'sid asc'); 19 | ?> 20 | 21 |
22 |
23 | 29 |
30 |
31 |
32 |
admin->apply_edit;?>
33 |
34 | 37 |
38 | 39 |
40 | 序号 41 | 42 |
43 |
44 |
45 | 推荐 46 | 47 |
48 |
49 |
50 | 星级 51 | 52 |
53 |
54 |
55 | 名称 56 | 57 |
58 |
59 |
60 | 图标 61 | 62 |
63 |
64 |
65 | 分类 66 | 73 |
74 |
75 |
76 | 链接 77 | 78 |
79 |
80 |
81 | 别名 82 | 83 |
84 |
85 |
86 | 关键词 87 | 88 |
89 |
90 |
91 | 简介 92 | 93 |
94 |
95 | 96 |
97 |
98 |
99 |
100 |
101 | 102 | 103 | --------------------------------------------------------------------------------