├── HPAdmin ├── __init__.py ├── admin.py ├── apps.py ├── ccode.py ├── models.py ├── plugins.py ├── redis_data.py ├── templates │ ├── ADbanner.html │ ├── ADbullhorn.html │ ├── ADcase.html │ ├── ADchartdata.html │ ├── ADchartdatas.html │ ├── ADdomanage.html │ ├── ADindex.html │ ├── ADlogin.html │ ├── ADmenumanage.html │ ├── ADmessage.html │ ├── ADmovie.html │ ├── ADnews.html │ ├── ADoperationlog.html │ └── ADusermanage.html ├── tests.py └── views.py ├── HomePage ├── __init__.py ├── admin.py ├── apps.py ├── models.py ├── templates │ ├── about.html │ ├── case.html │ ├── index.html │ ├── information.html │ └── news.html ├── tests.py └── views.py ├── README.md ├── delpyc.bat ├── homepage.sql ├── kindeditor ├── __init__.py ├── admin.py ├── apps.py ├── models.py ├── templates │ ├── jedate.html │ ├── kindeditor.html │ └── testviews.html ├── tests.py └── views.py ├── manage.py ├── myapp ├── __init__.py ├── settings.py ├── urls.py └── wsgi.py ├── static ├── css │ ├── bootstrap-theme.css │ ├── bootstrap-theme.css.map │ ├── bootstrap-theme.min.css │ ├── bootstrap-theme.min.css.map │ ├── bootstrap.css │ ├── bootstrap.css.map │ ├── bootstrap.min.css │ ├── bootstrap.min.css.map │ ├── jedate.css │ └── style.css ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── img │ ├── 1.jpg │ ├── 2.jpg │ ├── 3.jpg │ ├── 4.jpg │ ├── Thumbs.db │ ├── bg.jpg │ ├── case1.jpg │ ├── case2.jpg │ ├── case3.jpg │ ├── case4.jpg │ ├── info1.jpg │ ├── info2.jpg │ ├── info3.jpg │ ├── loding.gif │ ├── movie1.jpg │ ├── tab1-1.png │ ├── tab1-2.png │ ├── tab1-3.png │ ├── tab1-4.png │ ├── tab2.png │ ├── tab3.png │ └── welcome.gif ├── js │ ├── Chart.js │ ├── bootstrap-collapse.js │ ├── bootstrap-treeview.js │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── jquery-1.7.2.js │ ├── jquery-3.1.1.min.js │ ├── jquery.jedate.js │ ├── jquery.min.js │ ├── main.js │ ├── map.js │ └── npm.js └── kindeditor │ ├── kindeditor-all-min.js │ ├── kindeditor-all.js │ ├── lang │ ├── ar.js │ ├── en.js │ ├── ko.js │ ├── ru.js │ ├── zh-CN.js │ └── zh-TW.js │ ├── license.txt │ ├── plugins │ ├── anchor │ │ └── anchor.js │ ├── autoheight │ │ └── autoheight.js │ ├── baidumap │ │ ├── baidumap.js │ │ ├── index.html │ │ └── map.html │ ├── clearhtml │ │ └── clearhtml.js │ ├── code │ │ ├── code.js │ │ ├── prettify.css │ │ └── prettify.js │ ├── emoticons │ │ ├── emoticons.js │ │ └── images │ │ │ ├── 0.gif │ │ │ ├── 1.gif │ │ │ ├── 10.gif │ │ │ ├── 100.gif │ │ │ ├── 101.gif │ │ │ ├── 102.gif │ │ │ ├── 103.gif │ │ │ ├── 104.gif │ │ │ ├── 105.gif │ │ │ ├── 106.gif │ │ │ ├── 107.gif │ │ │ ├── 108.gif │ │ │ ├── 109.gif │ │ │ ├── 11.gif │ │ │ ├── 110.gif │ │ │ ├── 111.gif │ │ │ ├── 112.gif │ │ │ ├── 113.gif │ │ │ ├── 114.gif │ │ │ ├── 115.gif │ │ │ ├── 116.gif │ │ │ ├── 117.gif │ │ │ ├── 118.gif │ │ │ ├── 119.gif │ │ │ ├── 12.gif │ │ │ ├── 120.gif │ │ │ ├── 121.gif │ │ │ ├── 122.gif │ │ │ ├── 123.gif │ │ │ ├── 124.gif │ │ │ ├── 125.gif │ │ │ ├── 126.gif │ │ │ ├── 127.gif │ │ │ ├── 128.gif │ │ │ ├── 129.gif │ │ │ ├── 13.gif │ │ │ ├── 130.gif │ │ │ ├── 131.gif │ │ │ ├── 132.gif │ │ │ ├── 133.gif │ │ │ ├── 134.gif │ │ │ ├── 14.gif │ │ │ ├── 15.gif │ │ │ ├── 16.gif │ │ │ ├── 17.gif │ │ │ ├── 18.gif │ │ │ ├── 19.gif │ │ │ ├── 2.gif │ │ │ ├── 20.gif │ │ │ ├── 21.gif │ │ │ ├── 22.gif │ │ │ ├── 23.gif │ │ │ ├── 24.gif │ │ │ ├── 25.gif │ │ │ ├── 26.gif │ │ │ ├── 27.gif │ │ │ ├── 28.gif │ │ │ ├── 29.gif │ │ │ ├── 3.gif │ │ │ ├── 30.gif │ │ │ ├── 31.gif │ │ │ ├── 32.gif │ │ │ ├── 33.gif │ │ │ ├── 34.gif │ │ │ ├── 35.gif │ │ │ ├── 36.gif │ │ │ ├── 37.gif │ │ │ ├── 38.gif │ │ │ ├── 39.gif │ │ │ ├── 4.gif │ │ │ ├── 40.gif │ │ │ ├── 41.gif │ │ │ ├── 42.gif │ │ │ ├── 43.gif │ │ │ ├── 44.gif │ │ │ ├── 45.gif │ │ │ ├── 46.gif │ │ │ ├── 47.gif │ │ │ ├── 48.gif │ │ │ ├── 49.gif │ │ │ ├── 5.gif │ │ │ ├── 50.gif │ │ │ ├── 51.gif │ │ │ ├── 52.gif │ │ │ ├── 53.gif │ │ │ ├── 54.gif │ │ │ ├── 55.gif │ │ │ ├── 56.gif │ │ │ ├── 57.gif │ │ │ ├── 58.gif │ │ │ ├── 59.gif │ │ │ ├── 6.gif │ │ │ ├── 60.gif │ │ │ ├── 61.gif │ │ │ ├── 62.gif │ │ │ ├── 63.gif │ │ │ ├── 64.gif │ │ │ ├── 65.gif │ │ │ ├── 66.gif │ │ │ ├── 67.gif │ │ │ ├── 68.gif │ │ │ ├── 69.gif │ │ │ ├── 7.gif │ │ │ ├── 70.gif │ │ │ ├── 71.gif │ │ │ ├── 72.gif │ │ │ ├── 73.gif │ │ │ ├── 74.gif │ │ │ ├── 75.gif │ │ │ ├── 76.gif │ │ │ ├── 77.gif │ │ │ ├── 78.gif │ │ │ ├── 79.gif │ │ │ ├── 8.gif │ │ │ ├── 80.gif │ │ │ ├── 81.gif │ │ │ ├── 82.gif │ │ │ ├── 83.gif │ │ │ ├── 84.gif │ │ │ ├── 85.gif │ │ │ ├── 86.gif │ │ │ ├── 87.gif │ │ │ ├── 88.gif │ │ │ ├── 89.gif │ │ │ ├── 9.gif │ │ │ ├── 90.gif │ │ │ ├── 91.gif │ │ │ ├── 92.gif │ │ │ ├── 93.gif │ │ │ ├── 94.gif │ │ │ ├── 95.gif │ │ │ ├── 96.gif │ │ │ ├── 97.gif │ │ │ ├── 98.gif │ │ │ ├── 99.gif │ │ │ └── static.gif │ ├── filemanager │ │ ├── filemanager.js │ │ └── images │ │ │ ├── file-16.gif │ │ │ ├── file-64.gif │ │ │ ├── folder-16.gif │ │ │ ├── folder-64.gif │ │ │ └── go-up.gif │ ├── fixtoolbar │ │ └── fixtoolbar.js │ ├── flash │ │ └── flash.js │ ├── image │ │ ├── image.js │ │ └── images │ │ │ ├── align_left.gif │ │ │ ├── align_right.gif │ │ │ ├── align_top.gif │ │ │ └── refresh.png │ ├── insertfile │ │ └── insertfile.js │ ├── lineheight │ │ └── lineheight.js │ ├── link │ │ └── link.js │ ├── map │ │ ├── map.html │ │ └── map.js │ ├── media │ │ └── media.js │ ├── multiimage │ │ ├── images │ │ │ ├── image.png │ │ │ ├── select-files-en.png │ │ │ ├── select-files-zh-CN.png │ │ │ └── swfupload.swf │ │ └── multiimage.js │ ├── pagebreak │ │ └── pagebreak.js │ ├── plainpaste │ │ └── plainpaste.js │ ├── preview │ │ └── preview.js │ ├── quickformat │ │ └── quickformat.js │ ├── table │ │ └── table.js │ ├── template │ │ ├── html │ │ │ ├── 1.html │ │ │ ├── 2.html │ │ │ └── 3.html │ │ └── template.js │ └── wordpaste │ │ └── wordpaste.js │ └── themes │ ├── common │ ├── anchor.gif │ ├── blank.gif │ ├── flash.gif │ ├── loading.gif │ ├── media.gif │ └── rm.gif │ ├── default │ ├── background.png │ ├── default.css │ └── default.png │ ├── qq │ ├── editor.gif │ └── qq.css │ └── simple │ └── simple.css ├── 后台模块.png ├── 留言模块.png └── 首页.png /HPAdmin/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/HPAdmin/__init__.py -------------------------------------------------------------------------------- /HPAdmin/admin.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.contrib import admin 5 | 6 | # Register your models here. 7 | -------------------------------------------------------------------------------- /HPAdmin/apps.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.apps import AppConfig 5 | 6 | 7 | class HpadminConfig(AppConfig): 8 | name = 'HPAdmin' 9 | -------------------------------------------------------------------------------- /HPAdmin/ccode.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | from PIL import Image, ImageDraw, ImageFont, ImageFilter 3 | import random,time 4 | 5 | # img 存储过程 6 | def SaveImg(upimg): 7 | photoname = 'static/upload/%s.%s' % (str(time.time()).split('.')[0], str(upimg).decode('utf-8').split('.')[-1]) 8 | img = Image.open(upimg) 9 | img.save(photoname) 10 | img = '/' + photoname 11 | return img 12 | 13 | class Picture(object): 14 | def __init__(self, text_str, size, background): 15 | ''' 16 | text_str: 验证码显示的字符组成的字符串 17 | size: 图片大小 18 | background: 背景颜色 19 | ''' 20 | self.text_list = list(text_str) 21 | self.size = size 22 | self.background = background 23 | 24 | def create_pic(self): 25 | ''' 26 | 创建一张图片 27 | ''' 28 | self.width, self.height = self.size 29 | self.img = Image.new("RGB", self.size, self.background) 30 | # 实例化画笔 31 | self.draw = ImageDraw.Draw(self.img) 32 | 33 | def create_point(self, num, color): 34 | ''' 35 | num: 画点的数量 36 | color: 点的颜色 37 | 功能:画点 38 | ''' 39 | for i in range(num): 40 | self.draw.point( 41 | (random.randint(0, self.width), random.randint(0, self.height)), 42 | fill=color 43 | ) 44 | 45 | def create_line(self, num, color): 46 | ''' 47 | num: 线条的数量 48 | color: 线条的颜色 49 | 功能:画线条 50 | ''' 51 | for i in range(num): 52 | self.draw.line( 53 | [ 54 | (random.randint(0, self.width), random.randint(0, self.height)), 55 | (random.randint(0, self.width), random.randint(0, self.height)) 56 | ], 57 | fill=color 58 | ) 59 | 60 | def create_text(self, font_type, font_size, font_color, font_num, start_xy): 61 | ''' 62 | font_type: 字体 63 | font_size: 文字大小 64 | font_color: 文字颜色 65 | font_num: 文字数量 66 | start_xy: 第一个字左上角坐标,元组类型,如 (5,5) 67 | 功能: 画文字 68 | ''' 69 | font = ImageFont.truetype(font_type, font_size) 70 | self.strs = random.sample(self.text_list, font_num) 71 | self.draw.text(start_xy, " ".join(self.strs), font=font, fill=font_color) 72 | 73 | def opera(self): 74 | ''' 75 | 功能:给画出来的线条,文字,扭曲一下,缩放一下,位移一下,滤镜一下。 76 | 就是让它看起来有点歪,有点扭。 77 | ''' 78 | params = [ 79 | 1 - float(random.randint(1, 2)) / 100, 80 | 0, 81 | 0, 82 | 0, 83 | 1 - float(random.randint(1, 10)) / 100, 84 | float(random.randint(1, 2)) / 500, 85 | 0.001, 86 | float(random.randint(1, 2)) / 500 87 | ] 88 | self.img = self.img.transform(self.size, Image.PERSPECTIVE, params) 89 | self.img = self.img.filter(ImageFilter.EDGE_ENHANCE_MORE) 90 | 91 | 92 | # if __name__ == "__main__": 93 | def ccode(): 94 | strings = "abcdefghjkmnpqrstwxyz23456789ABCDEFGHJKLMNPQRSTWXYZ" 95 | size = (150, 50) 96 | background = 'white' 97 | pic = Picture(strings, size, background) 98 | pic.create_pic() 99 | pic.create_point(500, (220, 220, 220)) 100 | pic.create_line(30, (220, 220, 220)) 101 | pic.create_text("simsun.ttc", 24, (0, 0, 205), 5, (7, 7)) 102 | pic.opera() 103 | # pic.img.show() 104 | img,strs=pic.img,''.join(pic.strs) 105 | return img,strs 106 | -------------------------------------------------------------------------------- /HPAdmin/models.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | from django.db import models 4 | 5 | 6 | class IndexBanerInfo(models.Model): 7 | img = models.ImageField() 8 | a = models.CharField(max_length=100) 9 | title = models.CharField(max_length=100) 10 | p = models.CharField(max_length=100) 11 | status = models.SmallIntegerField(null=True) 12 | 13 | class IndexMovieInfo(models.Model): 14 | img = models.ImageField() 15 | a = models.CharField(max_length=100) 16 | title = models.CharField(max_length=100) 17 | 18 | class IndexBullhornInfo(models.Model): 19 | img = models.ImageField() 20 | title = models.CharField(max_length=100) 21 | content = models.CharField(max_length=5000) 22 | publisher = models.CharField(max_length=30) 23 | times = models.CharField(max_length=20) 24 | a_link = models.CharField(max_length=100) 25 | sort_id = models.SmallIntegerField(null=True) 26 | hot_id = models.SmallIntegerField(null=True) 27 | 28 | class IndexCaseInfo(models.Model): 29 | img = models.ImageField() 30 | title = models.CharField(max_length=100) 31 | content = models.CharField(max_length=5000) 32 | a_link = models.CharField(max_length=100) 33 | 34 | 35 | class UserManage(models.Model): 36 | username = models.CharField(max_length=30) 37 | password = models.CharField(max_length=30,default="123456") 38 | email = models.CharField(max_length=50) 39 | phone = models.CharField(max_length=20) 40 | status = models.SmallIntegerField(null=True) 41 | DoManage = models.ForeignKey('DoManage', null=True) 42 | 43 | class DoManage(models.Model): 44 | username = models.CharField(max_length=30) 45 | createtime = models.DateTimeField(auto_now_add=True) 46 | uptime = models.DateTimeField(auto_now=True) 47 | Permissions = models.CharField(max_length=50, null=True) 48 | 49 | class MenuTree(models.Model): 50 | title = models.CharField(max_length=30) 51 | url = models.CharField(max_length=50) 52 | 53 | class Permissions(models.Model): 54 | title = models.CharField(max_length=30) 55 | url = models.CharField(max_length=50) 56 | MenuTree = models.ForeignKey('MenuTree', null=True) 57 | 58 | class UserRole(models.Model): 59 | UserManage = models.ForeignKey("UserManage", null=True) 60 | DoManage = models.ForeignKey("DoManage", null=True) 61 | 62 | class MessageNum(models.Model): 63 | MessageNum = models.IntegerField() 64 | createtime = models.DateTimeField(auto_now_add=True) 65 | 66 | class News(models.Model): 67 | title = models.CharField(max_length=30) 68 | content = models.TextField(blank = True, null = True) 69 | author = models.CharField(max_length=30) 70 | uptime = models.CharField(max_length=30) 71 | createtime = models.DateTimeField(auto_now_add=True) -------------------------------------------------------------------------------- /HPAdmin/plugins.py: -------------------------------------------------------------------------------- 1 | # -*- coding: UTF-8 -*- 2 | 3 | # 页码数据计算,start,end,page 4 | def PageSEP(page): 5 | if not page: 6 | page = 1 7 | else: 8 | page = int(page) 9 | start = (page - 1) * 5 10 | end = start + 5 11 | return start,end,page 12 | 13 | 14 | # 页码显示规则 15 | def PageNum(page,pagecount,apiname): 16 | page = int(page) 17 | # 计算数据总页数 18 | pagenum = 0 19 | if pagecount: 20 | pagenum=pagecount 21 | else: 22 | pagenum=1 23 | temp = divmod(pagenum,5) 24 | if temp[1]==0: 25 | all_pagenum = temp[0] 26 | else: 27 | all_pagenum = temp[0]+1 28 | all_pagenum = int(all_pagenum) 29 | # 计算页码,选中页面标记且居中处理 30 | if all_pagenum<7: 31 | startpg = 1 32 | endpg = all_pagenum 33 | if all_pagenum>=7: 34 | if page<4: 35 | startpg = 1 36 | endpg = 7 37 | if page>=4: 38 | if (page+3)>all_pagenum: 39 | startpg = all_pagenum-6 40 | endpg = all_pagenum 41 | else: 42 | startpg = page-3 43 | endpg = page+3 44 | pgup = int(page - 1) 45 | pgdn = int(page + 1) 46 | if pgup<=0: 47 | pgup = 1 48 | if pgdn>=all_pagenum: 49 | pgdn = all_pagenum 50 | # 增加页面标签 51 | pagedata = '' 52 | for i in range(startpg,endpg+1): 53 | if page == i: 54 | pagedata += ('
  • %s
  • ' % (i, i)) 55 | else: 56 | pagedata += ('
  • %s
  • ' % (i, i)) 57 | data = '
  • «
  • %s
  • »
  • '%(pgdn) 58 | return data 59 | 60 | 61 | # csv 操作 62 | import csv 63 | from django.http import HttpResponse 64 | 65 | def copycsv(data): 66 | 67 | response = HttpResponse(content_type='text/csv') 68 | response['Content-Disposition'] = 'attachment; filename="order-export.csv"' 69 | 70 | # csvfile = open('order-export.csv', 'wb') 71 | # writer = csv.writer(csvfile) 72 | writer = csv.writer(response) 73 | writer.writerow(['ID'.decode('utf-8').encode('GB2312'), '用户名'.decode('utf-8').encode('GB2312'), '电话'.decode('utf-8').encode('GB2312'), '邮箱'.decode('utf-8').encode('GB2312'), '留言内容'.decode('utf-8').encode('GB2312'), '时间'.decode('utf-8').encode('GB2312')]) 74 | 75 | # data = [ (),()] 76 | writer.writerows(data) 77 | # csvfile.close() 78 | 79 | return response 80 | 81 | -------------------------------------------------------------------------------- /HPAdmin/redis_data.py: -------------------------------------------------------------------------------- 1 | # -*- coding: UTF-8 -*- 2 | import time 3 | import threading 4 | import json 5 | import redis 6 | from HPAdmin import models 7 | r = redis.Redis(host='192.168.31.250', port=6379,db=0) 8 | 9 | def moviedata(): 10 | data = models.IndexMovieInfo.objects.all() 11 | list = [] 12 | for i in data: 13 | a = {str("id"): str(i.id), str("img"): str(i.img), str("a"): str(i.a),str("title"): str(i.title.encode("utf-8"))} 14 | list.append(a) 15 | r.set("movie", json.dumps(list, encoding="UTF-8", ensure_ascii=False)) 16 | 17 | def bannerdata(): 18 | data = models.IndexBanerInfo.objects.filter(status=1) 19 | list = [] 20 | for i in data: 21 | a = {str("id"): str(i.id), str("img"): str(i.img), str("a"): str(i.a),str("title"): str(i.title.encode("utf-8"))} 22 | list.append(a) 23 | r.set("banner", json.dumps(list, encoding="UTF-8", ensure_ascii=False)) 24 | 25 | def informationdata(): 26 | data = models.IndexBullhornInfo.objects.all().order_by("-id") 27 | list = [] 28 | for i in data: 29 | a = {str("id"): str(i.id), str("img"): str(i.img),str("title"): str(i.title.encode("utf-8")),str("content"): str(i.content.encode("utf-8")),str("publisher"): str(i.publisher),str("times"): str(i.times),str("a_link"): str(i.a_link)} 30 | list.append(a) 31 | r.set("information", json.dumps(list, encoding="UTF-8", ensure_ascii=False)) 32 | 33 | def informationhotdata(): 34 | data = models.IndexBullhornInfo.objects.filter(hot_id=1).order_by("-id") 35 | list = [] 36 | for i in data: 37 | a = {str("id"): str(i.id), str("img"): str(i.img),str("title"): str(i.title.encode("utf-8")),str("content"): str(i.content.encode("utf-8")),str("publisher"): str(i.publisher),str("times"): str(i.times),str("a_link"): str(i.a_link)} 38 | list.append(a) 39 | r.set("informationhot", json.dumps(list, encoding="UTF-8", ensure_ascii=False)) 40 | 41 | def caseinfo(): 42 | data = models.IndexCaseInfo.objects.all() 43 | list = [] 44 | for i in data: 45 | a = {str("id"): str(i.id), str("img"): str(i.img),str("title"): str(i.title.encode("utf-8")),str("content"): str(i.content.encode("utf-8")),str("a_link"): str(i.a_link)} 46 | list.append(a) 47 | r.set("case", json.dumps(list, encoding="UTF-8", ensure_ascii=False)) 48 | 49 | def whiletask(): 50 | while True: 51 | time.sleep(60) 52 | moviedata() 53 | bannerdata() 54 | informationdata() 55 | informationhotdata() 56 | caseinfo() 57 | 58 | def TimedTask(): 59 | t = threading.Thread(target=whiletask, args=()) 60 | t.setDaemon(True) 61 | t.start() 62 | 63 | # TimedTask() -------------------------------------------------------------------------------- /HPAdmin/templates/ADchartdata.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 总览图表统计 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

    总览图表统计

    14 |
    15 | 16 |
    17 | 18 |
    19 | {# {% csrf_token %}#} 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 |

    总览曲线统计图

    59 |
    60 |
    61 |
    62 |
    63 |
    64 | 65 | 66 | 67 | 68 | 69 | 70 | 109 | 110 | 129 | 130 | 154 | {% include 'jedate.html' %} 155 | 156 | 157 | -------------------------------------------------------------------------------- /HPAdmin/templates/ADchartdatas.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 单日图表统计 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
    14 |

    单日图表统计

    15 |
    16 | 17 |
    18 | 19 |
    20 | {# {% csrf_token %}#} 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 | 105 | 106 | 107 | {% include 'jedate.html' %} 108 | 109 | 110 | -------------------------------------------------------------------------------- /HPAdmin/templates/ADlogin.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 网站管理后台登陆 6 | 7 | 8 | 9 | 21 | 22 | 23 | 24 | 25 | 26 |
    27 |

    网站管理后台登陆

    28 | {#
    #} 29 | {% csrf_token %} 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 | 128 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /HPAdmin/templates/ADmessage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 留言管理 6 | 7 | 8 | 9 | 10 | 11 | 12 | 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 | {% if ret.data %} 39 | {% for i in ret.data %} 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | {% endfor%} 51 | {% else %} 52 | 53 | {% endif %} 54 | 55 | 56 | 57 |
    ID用户名电话邮箱留言内容时间操作
    {{ i.id}}{{ i.name }}{{ i.phone }}{{ i.email }}{{ i.content }}{{ i.createtime|date:"Y-m-d H:i:s" }}删除
    暂无数据
    58 | 59 |
    60 |
      61 | {{ ret.page| safe }} 62 |
    63 |
    64 | 65 |
    66 | 67 | 68 | 91 | 92 | 93 | 94 | 167 | 168 | 169 | 170 | 171 | -------------------------------------------------------------------------------- /HPAdmin/templates/ADoperationlog.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 操作日志 6 | 7 | 27 | 28 | 29 | 30 | 31 |
    Loading pages...
    32 | 33 | -------------------------------------------------------------------------------- /HPAdmin/tests.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.test import TestCase 5 | 6 | # Create your tests here. 7 | -------------------------------------------------------------------------------- /HomePage/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/HomePage/__init__.py -------------------------------------------------------------------------------- /HomePage/admin.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.contrib import admin 5 | 6 | # Register your models here. 7 | -------------------------------------------------------------------------------- /HomePage/apps.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.apps import AppConfig 5 | 6 | 7 | class HomepageConfig(AppConfig): 8 | name = 'HomePage' 9 | -------------------------------------------------------------------------------- /HomePage/models.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | from django.db import models 4 | 5 | # Create your models here. 6 | 7 | class MessageManage(models.Model): 8 | name = models.CharField(max_length=10) 9 | phone = models.CharField(max_length=20) 10 | email = models.CharField(max_length=30) 11 | content = models.CharField(max_length=300) 12 | createtime = models.DateTimeField(auto_now_add=True) 13 | 14 | 15 | class CollectInfo(models.Model): 16 | ip = models.CharField(max_length=20) 17 | path = models.CharField(max_length=30) 18 | createtime = models.DateTimeField(auto_now_add=True) -------------------------------------------------------------------------------- /HomePage/templates/case.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 案例 7 | 8 | 9 | 10 | 11 | 12 | 32 | 33 | 34 |
    35 |
    36 |
    37 |

    案例

    38 |

    和各大明星企业有着紧密合作...

    39 |
    40 |
    41 |
    42 | 43 |
    44 |
    45 |
    46 | {#
    #} 47 | {#
    #} 48 | {# #} 49 | {#
    #} 50 | {#

    中国移动通信

    #} 51 | {#

    参与了本机构的总裁管理培训课程,学员反馈意见良好。

    #} 52 | {#
    #} 53 | {#
    #} 54 | {#
    #} 55 | {% for info in data %} 56 | 67 | {% endfor %} 68 | 69 |
    70 |
    71 |
    72 | 73 | 79 | 80 | 81 | 82 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /HomePage/templates/information.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 资讯 7 | 8 | 9 | 10 | 11 | 12 | 32 | 33 |
    34 |
    35 |
    36 |

    资讯

    37 |

    企业内训的最新动态、资源等...

    38 |
    39 |
    40 |
    41 | 42 |
    43 |
    44 |
    45 |
    46 |
    47 | {#
    #} 48 | {#
    #} 49 | {# #} 50 | {#
    #} 51 | {#
    #} 52 | {#

    广电总局发布TVOS2.0 华为阿里参与研发

    #} 53 | {# #} 54 | {#

    admin 15 / 10 / 11

    #} 55 | {#
    #} 56 | {#
    #} 57 | {% for info in common %} 58 | 70 | {% endfor %} 71 |
    72 |
    73 | 74 | 103 |
    104 |
    105 |
    106 | 107 | 108 | 114 | 115 | 116 | 117 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /HomePage/templates/news.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 新闻栏目 7 | 8 | 9 | 10 | 11 | 12 | 32 | 33 |
    34 |
    35 |
    36 |

    新闻资讯

    37 |

    企业内训的最新动态、资源等...

    38 |
    39 |
    40 |
    41 | 42 |
    43 |
    44 |
    45 |
    46 |
    47 |
    48 |
    49 |
    50 |
    51 |

    {{ data.title }}

    52 |

    发布时间:{{ data.uptime }} | 作者:{{ data.author }}

    53 | {{ data.content|safe }} 54 |
    55 |
    56 |
    57 |
    58 |
    59 | 60 | 89 | 90 | 91 | 92 |
    93 |
    94 |
    95 | 96 | 102 | 103 | 104 | 105 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /HomePage/tests.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.test import TestCase 5 | 6 | # Create your tests here. 7 | -------------------------------------------------------------------------------- /HomePage/views.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | from django.shortcuts import render 4 | from django.http import HttpResponse 5 | from HPAdmin.redis_data import * 6 | from HomePage.models import MessageManage,CollectInfo 7 | from django.http import HttpResponseRedirect 8 | 9 | 10 | def index(request): 11 | collectinfo(request) 12 | ret = {'movie':models.IndexMovieInfo.objects.all(),'banner':models.IndexBanerInfo.objects.filter(status=1)} 13 | # redis缓存 14 | # ret = {'movie':json.loads(str(r.get("movie"))),'banner':json.loads(str(r.get("banner")))} 15 | return render(request, 'index.html', ret) 16 | 17 | def information(request): 18 | collectinfo(request) 19 | ret = {'common': models.IndexBullhornInfo.objects.all().order_by("-id"), 'hot': models.IndexBullhornInfo.objects.filter(hot_id=1).order_by("-id")} 20 | # redis缓存 21 | # ret = {'common': json.loads(str(r.get("information"))), 'hot': json.loads(str(r.get("informationhot")))} 22 | return render(request, 'information.html', ret) 23 | 24 | def case(request): 25 | collectinfo(request) 26 | ret = {'data': models.IndexCaseInfo.objects.all()} 27 | # redis缓存 28 | # ret = {'data': json.loads(str(r.get("case")))} 29 | return render(request, 'case.html', ret) 30 | 31 | def about(request): 32 | collectinfo(request) 33 | if request.method == "GET": 34 | return render(request, 'about.html') 35 | if request.method == "POST": 36 | name = request.POST.get("name") 37 | phone = request.POST.get("phone") 38 | email = request.POST.get("email") 39 | code = request.POST.get("code") 40 | content = request.POST.get("content") 41 | try: 42 | if code.lower() != request.session.get('validate', 'error').lower(): 43 | return HttpResponse(json.dumps({"error": '验证码错误,请重新输入!'})) 44 | if name and phone and email and content: 45 | MessageManage(name=name, phone=phone, email=email,content=content).save() 46 | request.session['validate'] = None 47 | return HttpResponse(json.dumps({"success": '提交成功!'})) 48 | else: 49 | return HttpResponse(json.dumps({"error": '缺少字段,请填写完整!'})) 50 | except: 51 | return HttpResponse(json.dumps({"error": '非法字符,系统错误!'})) 52 | 53 | def news(request,page): 54 | collectinfo(request) 55 | if page: 56 | page = int(page) 57 | try: 58 | ret = {'data': models.News.objects.filter(id=page)[0],'hot': models.IndexBullhornInfo.objects.filter(hot_id=1).order_by("-id")} 59 | return render(request, 'news.html', ret) 60 | # redis缓存 61 | # ret = {'data': json.loads(str(r.get("news")))} 62 | except: 63 | return HttpResponseRedirect('/') 64 | else: 65 | return HttpResponseRedirect('/') 66 | 67 | # 统计用户信息 68 | def collectinfo(request): 69 | if request.META.has_key('HTTP_X_FORWARDED_FOR'): 70 | ip = request.META['HTTP_X_FORWARDED_FOR'] 71 | else: 72 | ip = request.META['REMOTE_ADDR'] 73 | path = request.path 74 | if "news" in path: 75 | path = "/news" 76 | CollectInfo(ip=ip, path=path).save() -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HomePage 2 | 3 | 4 | Python开发管理后台+Bootstrap响应式官网首页 5 | 6 | 后端:Python Django 7 | 8 | 前端:Bootstrap 9 | 10 | 数据库:MySQL、Redis 11 | 12 | 服务端:Centos、Nginx、uWSGI、Supervisord 13 | 14 | 15 | # 计划前端实现功能: 16 | 17 | 1.首页:响应式导航条、轮播图、基本内容、Footer区块 18 | 19 | 2.资讯内容:响应式资讯内容管理、热门资讯 20 | 21 | 3.新闻模块:标题、作者、内容、日期,热门资讯 22 | 23 | 4.案例:合作相关展示页面 24 | 25 | 5.关于:Ajax留言板块,百度地图API,常见板式 26 | 27 | 6.页面访问次数、IP统计数据收集统计分析 28 | 29 | 30 | # 计划后端实现功能: 31 | 32 | 1.首页内容管理:Banner轮播图管理,包括:图片管理、超链接配置、标题、内容、启用停用 33 | 34 | 2.首页资源、资讯、案例:资讯管理、热门资讯管理等 35 | 36 | 3.新闻:集成KindEditor富文本编辑插件,编辑、修改回调等 37 | 38 | 4.用户管理、角色权限管理、菜单管理:实现增删改查、菜单路径配置、修改回调、用户权限分配等功能 39 | 40 | 5.留言管理:基本管理查看功能,新增留言条数显示 41 | 42 | 6.图标统计模块:按时间段统计页面访问次数,独立IP访问页面数,单日数据分析,分别生成柱状图、饼图、曲线图 43 | 44 | 45 | # 项目部署调试篇 46 | 47 | 1.本地调试:根目录运行>python manage.py runserver 0.0.0.0:8080 48 | 49 | 2.服务器部署篇: 50 | 51 | ## 运行环境:Centos、Nginx、uWSGI、Supervisord、Redis、Mysql 52 | 53 | 备注:Linux环境下需要手动下载并配置字体库,绝对文件路径 54 | 55 | 56 | Nginx.conf: 57 | 58 | 59 | server { 60 | listen 88; 61 | server_name localhost; 62 | location / { 63 | include /usr/local/nginx/conf/uwsgi_params; 64 | uwsgi_pass 127.0.0.1:8000; 65 | } 66 | location /static { 67 | alias /var/www/HomePage/static; 68 | } 69 | } 70 | 71 | 72 | 73 | uWSGI.ini: 74 | 75 | 76 | [uwsgi] 77 | #http = 127.0.0.1:8000 78 | socket = 127.0.0.1:8000 79 | chdir = /var/www/HomePage 80 | module = myapp.wsgi 81 | master = true 82 | processes = 2 83 | threads = 2 84 | max-requests = 6000 85 | chmod-socket = 664 86 | vacuum = true 87 | 88 | 89 | supervisord.conf: 90 | 91 | 92 | [program:HomePage] 93 | directory = /var/www/HomePage 94 | command = uwsgi --ini uwsgi.ini 95 | 96 | 97 | 98 | 99 | 100 | ## 想做就做呗,╮(╯▽╰)╭     !!! 101 | 102 | -------------------------------------------------------------------------------- /delpyc.bat: -------------------------------------------------------------------------------- 1 | del HomePage\*.pyc 2 | del HomePage\migrations\*.pyc 3 | del HPAdmin\*.pyc 4 | del HPAdmin\migrations\*.pyc 5 | del kindeditor\*.pyc 6 | del kindeditor\migrations\*.pyc 7 | del myapp\*.pyc 8 | 9 | -------------------------------------------------------------------------------- /kindeditor/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/kindeditor/__init__.py -------------------------------------------------------------------------------- /kindeditor/admin.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.contrib import admin 5 | 6 | # Register your models here. 7 | -------------------------------------------------------------------------------- /kindeditor/apps.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.apps import AppConfig 5 | 6 | 7 | class KindeditorConfig(AppConfig): 8 | name = 'kindeditor' 9 | -------------------------------------------------------------------------------- /kindeditor/models.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | from django.db import models 4 | 5 | # Create your models here. 6 | 7 | class KindEditor(models.Model): 8 | title = models.CharField(max_length=50) 9 | content = models.CharField(max_length=5000) -------------------------------------------------------------------------------- /kindeditor/templates/jedate.html: -------------------------------------------------------------------------------- 1 | 2 | {##} 3 | 4 | -------------------------------------------------------------------------------- /kindeditor/templates/kindeditor.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 49 | 50 | 51 | {# #} 52 | {#
    #} 53 | {# {% csrf_token %}#} 54 | {# #} 55 | {# #} 56 | {#
    #} 57 | {# (提交: Ctrl + Enter)#} 58 | {#
    #} 59 | 60 | -------------------------------------------------------------------------------- /kindeditor/templates/testviews.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | {{ ret.data }} 9 |

    文章标题{{ ret.data.title }}

    10 |
    11 | 文章内容:{{ ret.data.content|safe }} 12 |
    13 | 14 | -------------------------------------------------------------------------------- /kindeditor/tests.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.test import TestCase 5 | 6 | # Create your tests here. 7 | -------------------------------------------------------------------------------- /kindeditor/views.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | from django.shortcuts import render 4 | from django.http import HttpResponse 5 | from django.conf import settings 6 | from django.views.decorators.csrf import csrf_exempt 7 | import os 8 | import uuid 9 | import json 10 | import datetime as dt 11 | from kindeditor.models import KindEditor 12 | 13 | 14 | # Create your views here. 15 | def uptest(request): 16 | if request.method == "GET": 17 | return render(request, 'test.html') 18 | if request.method == "POST": 19 | title = request.POST.get('title', '') 20 | content = request.POST.get('content', '') 21 | KindEditor(title=title, content=content).save() 22 | return render(request, 'kindeditor.html') 23 | 24 | def testviews(request): 25 | if request.method == "GET": 26 | data = KindEditor.objects.all()[0] 27 | ret = {"data":data} 28 | return render(request, 'testviews.html',{"ret":ret}) 29 | 30 | 31 | @csrf_exempt 32 | def upload_image(request, dir_name): 33 | ################## 34 | # kindeditor图片上传返回数据格式说明: 35 | # {"error": 1, "message": "出错信息"} 36 | # {"error": 0, "url": "图片地址"} 37 | ################## 38 | result = {"error": 1, "message": "上传出错"} 39 | files = request.FILES.get("imgFile", None) 40 | if files: 41 | result =image_upload(files, dir_name) 42 | return HttpResponse(json.dumps(result), content_type="application/json") 43 | 44 | #目录创建 45 | def upload_generation_dir(dir_name): 46 | today = dt.datetime.today() 47 | dir_name = dir_name + '/%d/%d/' %(today.year,today.month) 48 | if not os.path.exists(settings.MEDIA_ROOT): 49 | os.makedirs(settings.MEDIA_ROOT) 50 | return dir_name 51 | 52 | # 图片上传 53 | def image_upload(files, dir_name): 54 | #允许上传文件类型 55 | allow_suffix =['jpg', 'png', 'jpeg', 'gif', 'bmp'] 56 | file_suffix = files.name.split(".")[-1] 57 | if file_suffix not in allow_suffix: 58 | return {"error": 1, "message": "图片格式不正确"} 59 | relative_path_file = upload_generation_dir(dir_name) 60 | path=os.path.join(settings.MEDIA_ROOT, relative_path_file) 61 | print path 62 | if not os.path.exists(path): #如果目录不存在创建目录 63 | os.makedirs(path) 64 | file_name=str(uuid.uuid1())+"."+file_suffix 65 | path_file=os.path.join(path, file_name) 66 | file_url = settings.MEDIA_URL + relative_path_file + file_name 67 | open(path_file, 'wb').write(files.file.read()) 68 | return {"error": 0, "url": file_url} -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myapp.settings") 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError: 10 | # The above import may fail for some other reason. Ensure that the 11 | # issue is really that Django is missing to avoid masking other 12 | # exceptions on Python 2. 13 | try: 14 | import django 15 | except ImportError: 16 | raise ImportError( 17 | "Couldn't import Django. Are you sure it's installed and " 18 | "available on your PYTHONPATH environment variable? Did you " 19 | "forget to activate a virtual environment?" 20 | ) 21 | raise 22 | execute_from_command_line(sys.argv) 23 | -------------------------------------------------------------------------------- /myapp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/myapp/__init__.py -------------------------------------------------------------------------------- /myapp/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for myapp project. 3 | 4 | Generated by 'django-admin startproject' using Django 1.11.5. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.11/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/1.11/ref/settings/ 11 | """ 12 | import os 13 | 14 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 15 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 16 | 17 | 18 | # Quick-start development settings - unsuitable for production 19 | # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ 20 | 21 | # SECURITY WARNING: keep the secret key used in production secret! 22 | SECRET_KEY = '1z^47ahh=bjd62p9xq!ys079z7vz6js($ir*k$*fnc%+)&%x@6' 23 | 24 | # SECURITY WARNING: don't run with debug turned on in production! 25 | DEBUG = True 26 | 27 | ALLOWED_HOSTS = [] 28 | 29 | 30 | # Application definition 31 | 32 | INSTALLED_APPS = [ 33 | 'django.contrib.admin', 34 | 'django.contrib.auth', 35 | 'django.contrib.contenttypes', 36 | 'django.contrib.sessions', 37 | 'django.contrib.messages', 38 | 'django.contrib.staticfiles', 39 | 'HomePage', 40 | 'HPAdmin', 41 | 'kindeditor', 42 | ] 43 | 44 | MIDDLEWARE = [ 45 | 'django.middleware.security.SecurityMiddleware', 46 | 'django.contrib.sessions.middleware.SessionMiddleware', 47 | 'django.middleware.common.CommonMiddleware', 48 | 'django.middleware.csrf.CsrfViewMiddleware', 49 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 50 | 'django.contrib.messages.middleware.MessageMiddleware', 51 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 52 | ] 53 | 54 | ROOT_URLCONF = 'myapp.urls' 55 | 56 | TEMPLATES = [ 57 | { 58 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 59 | 'DIRS': ["templates"], 60 | 'APP_DIRS': True, 61 | 'OPTIONS': { 62 | 'context_processors': [ 63 | 'django.template.context_processors.debug', 64 | 'django.template.context_processors.request', 65 | 'django.contrib.auth.context_processors.auth', 66 | 'django.contrib.messages.context_processors.messages', 67 | ], 68 | }, 69 | }, 70 | ] 71 | 72 | WSGI_APPLICATION = 'myapp.wsgi.application' 73 | 74 | 75 | # Database 76 | # https://docs.djangoproject.com/en/1.11/ref/settings/#databases 77 | 78 | DATABASES = { 79 | 'default': { 80 | 'ENGINE': 'django.db.backends.mysql', 81 | 'NAME': 'homepage', 82 | 'USER': 'root', 83 | 'PASSWORD':'', 84 | 'HOST': '127.0.0.1', 85 | 'PORT': '3306', 86 | } 87 | } 88 | 89 | 90 | # Password validation 91 | # https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators 92 | 93 | AUTH_PASSWORD_VALIDATORS = [ 94 | { 95 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 96 | }, 97 | { 98 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 99 | }, 100 | { 101 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 102 | }, 103 | { 104 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 105 | }, 106 | ] 107 | 108 | 109 | # Internationalization 110 | # https://docs.djangoproject.com/en/1.11/topics/i18n/ 111 | 112 | LANGUAGE_CODE = 'en-us' 113 | 114 | # UTC > Asia/Shanghai 115 | TIME_ZONE = 'Asia/Shanghai' 116 | 117 | USE_I18N = True 118 | 119 | USE_L10N = True 120 | 121 | # True Flase 122 | USE_TZ = False 123 | 124 | 125 | # Static files (CSS, JavaScript, Images) 126 | # https://docs.djangoproject.com/en/1.11/howto/static-files/ 127 | STATICFILES_DIRS = (os.path.join(BASE_DIR, "static"),) 128 | STATIC_URL = '/static/' 129 | 130 | 131 | MEDIA_URL = '/static/upload/' 132 | MEDIA_ROOT = os.path.join(BASE_DIR,'static/upload') 133 | -------------------------------------------------------------------------------- /myapp/urls.py: -------------------------------------------------------------------------------- 1 | """myapp URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/1.11/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.conf.urls import url, include 14 | 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) 15 | """ 16 | from django.conf.urls import url 17 | from django.contrib import admin 18 | from HPAdmin.views import * 19 | from HomePage.views import * 20 | from kindeditor.views import * 21 | 22 | 23 | urlpatterns = [ 24 | url(r'^admin/', admin.site.urls), 25 | url(r'^$', index), 26 | url(r'^index$', index), 27 | url(r'^information$', information), 28 | url(r'^case$', case), 29 | url(r'^about$', about), 30 | 31 | url(r'^news/(\d*)', news), 32 | url(r'^uptest$', uptest), 33 | url(r'^testviews$', testviews), 34 | url(r'^kindeditor/uploads/(?P[^/]+)$', upload_image, name='upload_image'), 35 | 36 | url(r'^admins$', adminlogin), 37 | url(r'^admins/manage$', adminmanage), 38 | url(r'^admins/logout$', adminlogout), 39 | url(r'^admins/banner/(\d*)', adminbanner), 40 | url(r'^admins/movie/(\d*)', adminmovie), 41 | url(r'^admins/bullhorn/(\d*)', adminbullhorn), 42 | url(r'^admins/case/(\d*)', admincase), 43 | url(r'^admins/news/(\d*)', adminnews), 44 | url(r'^validate/$', validate, name='validate'), 45 | url(r'^admins/usermanage/(\d*)$', adminusermanage), 46 | url(r'^admins/domanage/(\d*)$', admindomanage), 47 | url(r'^admins/menumanage$', adminmenumanage), 48 | url(r'^admins/operationlog/(\d*)$', adminoperationlog), 49 | url(r'^admins/message/(\d*)$', adminmessage), 50 | url(r'^admins/chartdata$', adminchartdata), 51 | url(r'^admins/chartdatas$', adminchartdatas), 52 | ] 53 | -------------------------------------------------------------------------------- /myapp/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for myapp project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myapp.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /static/css/style.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | body { 3 | font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei UI", "Microsoft YaHei", SimHei, "\5B8B\4F53", simsun, sans-serif; 4 | } 5 | a:focus { 6 | outline: none; 7 | } 8 | 9 | #sever-prev{ 10 | left: 0px; 11 | background: None; 12 | } 13 | 14 | #sever-next{ 15 | right: 0px; 16 | background: None; 17 | } 18 | 19 | .navbar{ 20 | background: azure; 21 | } 22 | 23 | .list-group a { 24 | color: #0059b2; 25 | } 26 | #myCarousel { 27 | margin:50px 0 30px 0; 28 | } 29 | 30 | .carousel-inner .item img { 31 | margin: 0 auto; 32 | width: 100%; 33 | } 34 | 35 | .carousel-control{ 36 | font-size: 100px; 37 | } 38 | 39 | .tab-h2 { 40 | font-size: 20px; 41 | color: #0059B2; 42 | text-align: center; 43 | letter-spacing: 1px; 44 | } 45 | .tab-p { 46 | font-size: 15px; 47 | color: #999; 48 | text-align: center; 49 | letter-spacing: 1px; 50 | margin: 20px 0 40px 0; 51 | } 52 | .tab1,.tab2,.tab3 { 53 | margin: 30px 0; 54 | color: #666; 55 | } 56 | .tab1 .media-heading { 57 | margin: 5px 0 20px 0; 58 | } 59 | .tab1 .text-muted { 60 | color: #999; 61 | text-decoration: line-through; 62 | } 63 | .tab1 .col { 64 | padding: 20px; 65 | } 66 | .tab2 { 67 | background: #eee; 68 | padding: 60px 20px; 69 | text-align: center; 70 | } 71 | .tab2 img { 72 | width: 40%; 73 | height: 40%; 74 | } 75 | .tab3 { 76 | padding: 40px 0; 77 | text-align: center; 78 | } 79 | .tab3 img { 80 | width: 65%; 81 | height: 65%; 82 | } 83 | .text h3 { 84 | font-size: 20px; 85 | } 86 | .text p { 87 | font-size: 14px; 88 | } 89 | 90 | .jumbotron { 91 | margin: 50px 0 0 0; 92 | padding: 60px 0; 93 | background: #ccc url(../img/bg.jpg); 94 | color: #ccc; 95 | } 96 | .jumbotron h1 { 97 | font-size: 26px; 98 | padding: 0 0 0 20px; 99 | } 100 | .jumbotron h4 { 101 | font-size: 16px; 102 | padding: 0 0 0 20px; 103 | } 104 | #information { 105 | padding: 40px 0; 106 | background: #eee; 107 | } 108 | .info-left { 109 | 110 | } 111 | .info-right { 112 | background-color: #fff; 113 | box-shadow: 2px 2px 3px #ccc; 114 | } 115 | .info-right blockquote { 116 | padding: 0; 117 | margin: 0; 118 | } 119 | .info-right h2 { 120 | font-size: 20px; 121 | padding: 5px; 122 | } 123 | .info-right h4 { 124 | line-height: 1.6; 125 | } 126 | .info-content { 127 | background-color: #fff; 128 | box-shadow: 2px 2px 3px #ccc; 129 | margin: 0 0 20px 0; 130 | } 131 | .info-content img { 132 | margin: 12px 0; 133 | } 134 | .info-content h4 { 135 | font-size: 14px; 136 | padding: 2px 0 0 0; 137 | } 138 | .info-content p { 139 | line-height: 1.6; 140 | color: #666; 141 | } 142 | #case { 143 | padding: 40px 0; 144 | text-align: center; 145 | background-color: #eee; 146 | } 147 | #case h4 { 148 | color: #666; 149 | } 150 | #case p { 151 | color: #666; 152 | line-height: 1.6; 153 | } 154 | #case .col { 155 | margin: 0 0 20px 0; 156 | } 157 | #about { 158 | padding: 40px 15px; 159 | background-color: #eee; 160 | } 161 | #about .about { 162 | background-color: #fff; 163 | box-shadow: 2px 2px 3px #ccc; 164 | padding-bottom: 20px; 165 | } 166 | #about h3 { 167 | margin: 0 0 10px 0; 168 | padding: 20px 0; 169 | border-bottom: 1px solid #eee; 170 | font-size: 18px; 171 | } 172 | #about p { 173 | line-height: 2; 174 | font-size: 13px; 175 | } 176 | #footer { 177 | padding: 20px; 178 | text-align: center; 179 | background-color: #666; 180 | border-top: 1px solid #ccc; 181 | color: #ccc; 182 | } 183 | 184 | /* 小屏幕(平板,大于等于 768px) */ 185 | @media (min-width: 768px) { 186 | .tab-h2 { 187 | font-size: 26px; 188 | } 189 | .tab-p { 190 | font-size: 16px; 191 | } 192 | .text h3 { 193 | font-size: 22px; 194 | } 195 | .text p { 196 | font-size: 15px; 197 | } 198 | .tab2-text { 199 | float: left; 200 | } 201 | .tab2-img { 202 | float: right; 203 | } 204 | .info-content h4 { 205 | font-size: 16px; 206 | } 207 | .jumbotron h1 { 208 | font-size: 30px; 209 | } 210 | .jumbotron h4 { 211 | font-size: 16px; 212 | } 213 | #about h3 { 214 | font-size: 19px; 215 | } 216 | #about p { 217 | font-size: 14px; 218 | } 219 | } 220 | 221 | /* 中等屏幕(桌面显示器,大于等于 992px) */ 222 | @media (min-width: 992px) { 223 | .tab-h2 { 224 | font-size: 28px; 225 | } 226 | .tab-p { 227 | font-size: 17px; 228 | } 229 | .text h3 { 230 | font-size: 24px; 231 | } 232 | .text p { 233 | font-size: 16px; 234 | } 235 | .tab2-text { 236 | float: left; 237 | } 238 | .tab2-img { 239 | float: right; 240 | } 241 | .info-content h4 { 242 | font-size: 18px; 243 | overflow: hidden; 244 | white-space: nowrap; 245 | text-overflow: ellipsis; 246 | } 247 | .info-right h4 { 248 | font-size: 14px; 249 | } 250 | .jumbotron h1 { 251 | font-size: 33px; 252 | } 253 | .jumbotron h4 { 254 | font-size: 17px; 255 | } 256 | #about h3 { 257 | font-size: 20px; 258 | } 259 | #about p { 260 | font-size: 15px; 261 | } 262 | } 263 | 264 | /* 大屏幕(大桌面显示器,大于等于 1200px) */ 265 | @media (min-width: 1200px) { 266 | .tab-h2 { 267 | font-size: 30px; 268 | } 269 | .tab-p { 270 | font-size: 18px; 271 | } 272 | .text h2 { 273 | font-size: 26px; 274 | } 275 | .text p { 276 | font-size: 18px; 277 | } 278 | .tab2-text { 279 | float: left; 280 | } 281 | .tab2-img { 282 | float: right; 283 | } 284 | .info-content h4 { 285 | font-size: 20px; 286 | overflow: hidden; 287 | white-space: nowrap; 288 | text-overflow: ellipsis; 289 | } 290 | .info-right h4 { 291 | font-size: 16px; 292 | } 293 | .jumbotron h1 { 294 | font-size: 36px; 295 | } 296 | .jumbotron h4 { 297 | font-size: 18px; 298 | } 299 | #about h3 { 300 | font-size: 22px; 301 | } 302 | #about p { 303 | font-size: 16px; 304 | } 305 | } -------------------------------------------------------------------------------- /static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /static/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /static/img/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/1.jpg -------------------------------------------------------------------------------- /static/img/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/2.jpg -------------------------------------------------------------------------------- /static/img/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/3.jpg -------------------------------------------------------------------------------- /static/img/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/4.jpg -------------------------------------------------------------------------------- /static/img/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/Thumbs.db -------------------------------------------------------------------------------- /static/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/bg.jpg -------------------------------------------------------------------------------- /static/img/case1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/case1.jpg -------------------------------------------------------------------------------- /static/img/case2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/case2.jpg -------------------------------------------------------------------------------- /static/img/case3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/case3.jpg -------------------------------------------------------------------------------- /static/img/case4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/case4.jpg -------------------------------------------------------------------------------- /static/img/info1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/info1.jpg -------------------------------------------------------------------------------- /static/img/info2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/info2.jpg -------------------------------------------------------------------------------- /static/img/info3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/info3.jpg -------------------------------------------------------------------------------- /static/img/loding.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/loding.gif -------------------------------------------------------------------------------- /static/img/movie1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/movie1.jpg -------------------------------------------------------------------------------- /static/img/tab1-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/tab1-1.png -------------------------------------------------------------------------------- /static/img/tab1-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/tab1-2.png -------------------------------------------------------------------------------- /static/img/tab1-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/tab1-3.png -------------------------------------------------------------------------------- /static/img/tab1-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/tab1-4.png -------------------------------------------------------------------------------- /static/img/tab2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/tab2.png -------------------------------------------------------------------------------- /static/img/tab3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/tab3.png -------------------------------------------------------------------------------- /static/img/welcome.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/img/welcome.gif -------------------------------------------------------------------------------- /static/js/bootstrap-collapse.js: -------------------------------------------------------------------------------- 1 | /* ============================================================= 2 | * bootstrap-collapse.js v2.0.1 3 | * http://twitter.github.com/bootstrap/javascript.html#collapse 4 | * ============================================================= 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ============================================================ */ 19 | 20 | !function( $ ){ 21 | 22 | "use strict" 23 | 24 | var Collapse = function ( element, options ) { 25 | this.$element = $(element) 26 | this.options = $.extend({}, $.fn.collapse.defaults, options) 27 | 28 | if (this.options["parent"]) { 29 | this.$parent = $(this.options["parent"]) 30 | } 31 | 32 | this.options.toggle && this.toggle() 33 | } 34 | 35 | Collapse.prototype = { 36 | 37 | constructor: Collapse 38 | 39 | , dimension: function () { 40 | var hasWidth = this.$element.hasClass('width') 41 | return hasWidth ? 'width' : 'height' 42 | } 43 | 44 | , show: function () { 45 | var dimension = this.dimension() 46 | , scroll = $.camelCase(['scroll', dimension].join('-')) 47 | , actives = this.$parent && this.$parent.find('.in') 48 | , hasData 49 | 50 | if (actives && actives.length) { 51 | hasData = actives.data('collapse') 52 | actives.collapse('hide') 53 | hasData || actives.data('collapse', null) 54 | } 55 | 56 | this.$element[dimension](0) 57 | this.transition('addClass', 'show', 'shown') 58 | this.$element[dimension](this.$element[0][scroll]) 59 | 60 | } 61 | 62 | , hide: function () { 63 | var dimension = this.dimension() 64 | this.reset(this.$element[dimension]()) 65 | this.transition('removeClass', 'hide', 'hidden') 66 | this.$element[dimension](0) 67 | } 68 | 69 | , reset: function ( size ) { 70 | var dimension = this.dimension() 71 | 72 | this.$element 73 | .removeClass('collapse') 74 | [dimension](size || 'auto') 75 | [0].offsetWidth 76 | 77 | this.$element.addClass('collapse') 78 | } 79 | 80 | , transition: function ( method, startEvent, completeEvent ) { 81 | var that = this 82 | , complete = function () { 83 | if (startEvent == 'show') that.reset() 84 | that.$element.trigger(completeEvent) 85 | } 86 | 87 | this.$element 88 | .trigger(startEvent) 89 | [method]('in') 90 | 91 | $.support.transition && this.$element.hasClass('collapse') ? 92 | this.$element.one($.support.transition.end, complete) : 93 | complete() 94 | } 95 | 96 | , toggle: function () { 97 | this[this.$element.hasClass('in') ? 'hide' : 'show']() 98 | } 99 | 100 | } 101 | 102 | /* COLLAPSIBLE PLUGIN DEFINITION 103 | * ============================== */ 104 | 105 | $.fn.collapse = function ( option ) { 106 | return this.each(function () { 107 | var $this = $(this) 108 | , data = $this.data('collapse') 109 | , options = typeof option == 'object' && option 110 | if (!data) $this.data('collapse', (data = new Collapse(this, options))) 111 | if (typeof option == 'string') data[option]() 112 | }) 113 | } 114 | 115 | $.fn.collapse.defaults = { 116 | toggle: true 117 | } 118 | 119 | $.fn.collapse.Constructor = Collapse 120 | 121 | 122 | /* COLLAPSIBLE DATA-API 123 | * ==================== */ 124 | 125 | $(function () { 126 | $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) { 127 | var $this = $(this), href 128 | , target = $this.attr('data-target') 129 | || e.preventDefault() 130 | || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 131 | , option = $(target).data('collapse') ? 'toggle' : $this.data() 132 | $(target).collapse(option) 133 | }) 134 | }) 135 | 136 | }( window.jQuery ); -------------------------------------------------------------------------------- /static/js/main.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Anonymous on 2017/9/26. 3 | */ 4 | 5 | $('.userinfo').click(function () { 6 | $("#myModal").modal(); 7 | }); 8 | 9 | $('.xiugai').click(function () { 10 | $("#UPPassWord").modal(); 11 | }); 12 | 13 | // ifame框架打开页面 14 | var openpage = function (href) { 15 | $(".addpage").empty(); 16 | var html = '' 17 | $(".addpage").append(html); 18 | var ifm= document.getElementById("iframe-page-content"); 19 | ifm.height=document.documentElement.clientHeight+220; 20 | } 21 | 22 | //加载ifame框架 23 | $(".addmeu").click(function(){ 24 | var href= $(this).attr("data-href"); 25 | openpage(href); 26 | }); 27 | 28 | // 图片预览,鼠标移上时触发弹出提示框,开启html 为true的话,data-content里就能放html代码了 29 | $("[data-toggle='popover']").popover({ 30 | trigger : 'hover', 31 | html:true, 32 | }); 33 | 34 | // 修改Banner操作 35 | $(".upbanneredit").click(function () { 36 | $("#upBanner").modal(); 37 | $(".alert-warning").remove() 38 | var upid= $(this).attr("id"); 39 | var img= $(this).attr("data-img"); 40 | var title= $(this).attr("data-title"); 41 | var a= $(this).attr("data-a"); 42 | var p= $(this).attr("data-p"); 43 | xupstatus = $(this).attr("data-status"); 44 | var status = xupstatus; 45 | $("#upid").val(upid); 46 | $("#uptitle").val(title); 47 | $("#uplink").val(a); 48 | $("#upcontent").val(p); 49 | $("#upstatus").val(status); 50 | $(".upimg").empty(); 51 | $(".upimg").append(''); 52 | }); 53 | 54 | 55 | 56 | var statuscount = $("#statuscount").attr("value"); 57 | 58 | // 新增,不允许提交大于4个启用状态的Banner图 59 | $('.checkstatus').click(function () { 60 | var status = document.getElementById("status").value; 61 | if ((parseInt(statuscount)+parseInt(status))>4){ 62 | $(".alert-warning").remove() 63 | $("#status").after('
    ×警告!Banner最多设置4个启用
    '); 64 | return false; 65 | } 66 | }); 67 | 68 | // 修改,不允许提交大于4个启用状态的Banner图 69 | $('.checkupstatus').click(function () { 70 | if (xupstatus==1){ 71 | }else { 72 | var upstatus = document.getElementById("upstatus").value; 73 | if ((parseInt(statuscount)+parseInt(upstatus))>4){ 74 | $(".alert-warning").remove() 75 | $("#upstatus").after('
    ×警告!Banner最多设置4个启用
    '); 76 | return false; 77 | } 78 | } 79 | }); 80 | 81 | 82 | // 修改电影弹窗操作 83 | $(".uptitleedit").click(function () { 84 | $("#UPmyModal").modal(); 85 | var upid= $(this).attr("id"); 86 | var img= $(this).attr("data-img"); 87 | var title= $(this).attr("data-title"); 88 | var content= $(this).attr("data-content"); 89 | var link= $(this).attr("data-link"); 90 | var a= $(this).attr("data-a"); 91 | $("#upid").val(upid); 92 | $("#uptitle").val(title); 93 | $("#upcontent").val(content); 94 | $("#uplink").val(a); 95 | $("#uplinks").val(link); 96 | $(".upimg").empty(); 97 | $(".upimg").append(''); 98 | }); 99 | 100 | 101 | // 修改资讯操作 102 | $(".UPbullhorn").click(function () { 103 | $("#UPbullhorn").modal(); 104 | var upid= $(this).attr("id"); 105 | var img= $(this).attr("data-img"); 106 | var title= $(this).attr("data-title"); 107 | var content= $(this).attr("data-content"); 108 | var publisher= $(this).attr("data-publisher"); 109 | var times= $(this).attr("data-times"); 110 | var a_link= $(this).attr("data-a_link"); 111 | var hot_id= $(this).attr("data-hot_id"); 112 | $("#upid").val(upid); 113 | $("#uptitle").val(title); 114 | $("#upcontent").val(content); 115 | $("#uplink").val(a_link); 116 | $("#uppublisher").val(publisher); 117 | $("#uptimes").val(times); 118 | $("#uphot_id").val(hot_id); 119 | $(".upimg").empty(); 120 | $(".upimg").append(''); 121 | }); 122 | 123 | // 删除Banner、电影操作 124 | $(".delid").click(function () { 125 | $("#delcfmModel").modal(); 126 | var delid= $(this).attr("id"); 127 | $("#delid").val(delid); 128 | }); 129 | 130 | 131 | 132 | // 修改用户信息操作 133 | $(".upusermanage").click(function () { 134 | var upid= $(this).attr("id"); 135 | var username= $(this).attr("data-username"); 136 | var email= $(this).attr("data-email"); 137 | var phone= $(this).attr("data-phone"); 138 | var role= $(this).attr("data-role"); 139 | $("#upid").val(upid); 140 | $("#upusername").val(username); 141 | $("#upemail").val(email); 142 | $("#upphone").val(phone); 143 | $("#uprole").val(role); 144 | $("#UPmyModal").modal(); 145 | }); 146 | 147 | 148 | // 启用操作 149 | $(".enable").click(function () { 150 | $("#delcfmModel").modal(); 151 | var delid= $(this).attr("id"); 152 | $('#uesrstaus').empty().append('启用') 153 | $("#delid").val(delid); 154 | $("#deluesrstaus").attr("value","1"); 155 | }); 156 | 157 | 158 | // 停用操作 159 | $(".disable").click(function () { 160 | $("#delcfmModel").modal(); 161 | var delid= $(this).attr("id"); 162 | $('#uesrstaus').empty().append('停用') 163 | $("#delid").val(delid); 164 | $("#deluesrstaus").attr("value","0"); 165 | }); 166 | 167 | // 修改新闻操作 168 | $(".upnews").click(function () { 169 | var upid= $(this).attr("id"); 170 | var uptitle= $(this).attr("data-title"); 171 | var upauthor= $(this).attr("data-author"); 172 | var uptime= $(this).attr("data-uptime"); 173 | 174 | $.ajax({ 175 | type: "GET", 176 | url: "admins/news", 177 | dataType:'json', 178 | data:{"queryid":upid}, 179 | success: function(data){ 180 | if (data["success"]) { 181 | callbackeditor.html(data["success"]); 182 | } 183 | }, 184 | error: function (data) { 185 | $(".alert-warning").remove(); 186 | $(".error").append('
    × 警告!您的网络连接有问题。
    '); 187 | } 188 | }); 189 | 190 | 191 | $("#upid").val(upid); 192 | $("#uptitle").val(uptitle); 193 | $("#upauthor").val(upauthor); 194 | $("#upselecttime").val(uptime); 195 | $("#UPmyModal").modal(); 196 | }); 197 | 198 | 199 | 200 | -------------------------------------------------------------------------------- /static/js/map.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Anonymous on 2017/11/15. 3 | */ 4 | 5 | //创建和初始化地图函数: 6 | function initMap(){ 7 | createMap();//创建地图 8 | setMapEvent();//设置地图事件 9 | addMapControl();//向地图添加控件 10 | addMapOverlay();//向地图添加覆盖物 11 | } 12 | function createMap(){ 13 | map = new BMap.Map("map"); 14 | map.centerAndZoom(new BMap.Point(104.082769,30.546855),13); 15 | } 16 | function setMapEvent(){ 17 | map.enableScrollWheelZoom(); 18 | map.enableKeyboard(); 19 | map.enableDragging(); 20 | map.enableDoubleClickZoom() 21 | } 22 | function addClickHandler(target,window){ 23 | target.addEventListener("click",function(){ 24 | target.openInfoWindow(window); 25 | }); 26 | } 27 | function addMapOverlay(){ 28 | var markers = [ 29 | {content:"Hello,I'am Benjamin.",title:"天府软件园",imageOffset: {width:0,height:3},position:{lat:30.552795,lng:104.078098}} 30 | ]; 31 | for(var index = 0; index < markers.length; index++ ){ 32 | var point = new BMap.Point(markers[index].position.lng,markers[index].position.lat); 33 | var marker = new BMap.Marker(point,{icon:new BMap.Icon("http://api.map.baidu.com/lbsapi/createmap/images/icon.png",new BMap.Size(20,25),{ 34 | imageOffset: new BMap.Size(markers[index].imageOffset.width,markers[index].imageOffset.height) 35 | })}); 36 | var label = new BMap.Label(markers[index].title,{offset: new BMap.Size(25,5)}); 37 | var opts = { 38 | width: 200, 39 | title: markers[index].title, 40 | enableMessage: false 41 | }; 42 | var infoWindow = new BMap.InfoWindow(markers[index].content,opts); 43 | marker.setLabel(label); 44 | addClickHandler(marker,infoWindow); 45 | map.addOverlay(marker); 46 | }; 47 | } 48 | //向地图添加控件 49 | function addMapControl(){ 50 | var scaleControl = new BMap.ScaleControl({anchor:BMAP_ANCHOR_BOTTOM_LEFT}); 51 | scaleControl.setUnit(BMAP_UNIT_IMPERIAL); 52 | map.addControl(scaleControl); 53 | var navControl = new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_LEFT,type:1}); 54 | map.addControl(navControl); 55 | var overviewControl = new BMap.OverviewMapControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,isOpen:true}); 56 | map.addControl(overviewControl); 57 | } 58 | var map; 59 | initMap(); -------------------------------------------------------------------------------- /static/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') -------------------------------------------------------------------------------- /static/kindeditor/plugins/anchor/anchor.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('anchor', function(K) { 11 | var self = this, name = 'anchor', lang = self.lang(name + '.'); 12 | self.plugin.anchor = { 13 | edit : function() { 14 | var html = ['
    ', 15 | '
    ', 16 | '', 17 | '', 18 | '
    ', 19 | '
    '].join(''); 20 | var dialog = self.createDialog({ 21 | name : name, 22 | width : 300, 23 | title : self.lang(name), 24 | body : html, 25 | yesBtn : { 26 | name : self.lang('yes'), 27 | click : function(e) { 28 | self.insertHtml('').hideDialog().focus(); 29 | } 30 | } 31 | }); 32 | var div = dialog.div, 33 | nameBox = K('input[name="name"]', div); 34 | var img = self.plugin.getSelectedAnchor(); 35 | if (img) { 36 | nameBox.val(unescape(img.attr('data-ke-name'))); 37 | } 38 | nameBox[0].focus(); 39 | nameBox[0].select(); 40 | }, 41 | 'delete' : function() { 42 | self.plugin.getSelectedAnchor().remove(); 43 | } 44 | }; 45 | self.clickToolbar(name, self.plugin.anchor.edit); 46 | }); 47 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/autoheight/autoheight.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('autoheight', function(K) { 11 | var self = this; 12 | 13 | if (!self.autoHeightMode) { 14 | return; 15 | } 16 | 17 | var minHeight; 18 | 19 | function hideScroll() { 20 | var edit = self.edit; 21 | var body = edit.doc.body; 22 | edit.iframe[0].scroll = 'no'; 23 | body.style.overflowY = 'hidden'; 24 | } 25 | 26 | function resetHeight() { 27 | var edit = self.edit; 28 | var body = edit.doc.body; 29 | edit.iframe.height(minHeight); 30 | self.resize(null, Math.max((K.IE ? body.scrollHeight : body.offsetHeight) + 76, minHeight)); 31 | } 32 | 33 | function init() { 34 | minHeight = K.removeUnit(self.height); 35 | 36 | self.edit.afterChange(resetHeight); 37 | hideScroll(); 38 | resetHeight(); 39 | } 40 | 41 | if (self.isCreated) { 42 | init(); 43 | } else { 44 | self.afterCreate(init); 45 | } 46 | }); 47 | 48 | /* 49 | * 如何实现真正的自动高度? 50 | * 修改编辑器高度之后,再次获取body内容高度时,最小值只会是当前iframe的设置高度,这样就导致高度只增不减。 51 | * 所以每次获取body内容高度之前,先将iframe的高度重置为最小高度,这样就能获取body的实际高度。 52 | * 由此就实现了真正的自动高度 53 | * 测试:chrome、firefox、IE9、IE8 54 | * */ 55 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/baidumap/baidumap.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | // Baidu Maps: http://dev.baidu.com/wiki/map/index.php?title=%E9%A6%96%E9%A1%B5 11 | 12 | KindEditor.plugin('baidumap', function(K) { 13 | var self = this, name = 'baidumap', lang = self.lang(name + '.'); 14 | var mapWidth = K.undef(self.mapWidth, 558); 15 | var mapHeight = K.undef(self.mapHeight, 360); 16 | self.clickToolbar(name, function() { 17 | var html = ['
    ', 18 | '
    ', 19 | // left start 20 | '
    ', 21 | lang.address + ' ', 22 | '', 23 | '', 24 | '', 25 | '
    ', 26 | // right start 27 | '
    ', 28 | ' ', 29 | '
    ', 30 | '
    ', 31 | '
    ', 32 | '
    ', 33 | '
    '].join(''); 34 | var dialog = self.createDialog({ 35 | name : name, 36 | width : mapWidth + 42, 37 | title : self.lang(name), 38 | body : html, 39 | yesBtn : { 40 | name : self.lang('yes'), 41 | click : function(e) { 42 | var map = win.map; 43 | var centerObj = map.getCenter(); 44 | var center = centerObj.lng + ',' + centerObj.lat; 45 | var zoom = map.getZoom(); 46 | var url = [checkbox[0].checked ? self.pluginsPath + 'baidumap/index.html' : 'http://api.map.baidu.com/staticimage', 47 | '?center=' + encodeURIComponent(center), 48 | '&zoom=' + encodeURIComponent(zoom), 49 | '&width=' + mapWidth, 50 | '&height=' + mapHeight, 51 | '&markers=' + encodeURIComponent(center), 52 | '&markerStyles=' + encodeURIComponent('l,A')].join(''); 53 | if (checkbox[0].checked) { 54 | self.insertHtml(''); 55 | } else { 56 | self.exec('insertimage', url); 57 | } 58 | self.hideDialog().focus(); 59 | } 60 | }, 61 | beforeRemove : function() { 62 | searchBtn.remove(); 63 | if (doc) { 64 | doc.write(''); 65 | } 66 | iframe.remove(); 67 | } 68 | }); 69 | var div = dialog.div, 70 | addressBox = K('[name="address"]', div), 71 | searchBtn = K('[name="searchBtn"]', div), 72 | checkbox = K('[name="insertDynamicMap"]', dialog.div), 73 | win, doc; 74 | var iframe = K(''); 75 | function ready() { 76 | win = iframe[0].contentWindow; 77 | doc = K.iframeDoc(iframe); 78 | } 79 | iframe.bind('load', function() { 80 | iframe.unbind('load'); 81 | if (K.IE) { 82 | ready(); 83 | } else { 84 | setTimeout(ready, 0); 85 | } 86 | }); 87 | K('.ke-map', div).replaceWith(iframe); 88 | // search map 89 | searchBtn.click(function() { 90 | win.search(addressBox.val()); 91 | }); 92 | }); 93 | }); 94 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/baidumap/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 百度地图API自定义地图 8 | 9 | 14 | 15 | 16 | 17 | 18 | 19 |
    20 | 21 | 83 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/baidumap/map.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Baidu Maps 6 | 10 | 11 | 39 | 40 | 41 |
    42 | 43 | 44 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/clearhtml/clearhtml.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('clearhtml', function(K) { 11 | var self = this, name = 'clearhtml'; 12 | self.clickToolbar(name, function() { 13 | self.focus(); 14 | var html = self.html(); 15 | html = html.replace(/(]*>)([\s\S]*?)(<\/script>)/ig, ''); 16 | html = html.replace(/(]*>)([\s\S]*?)(<\/style>)/ig, ''); 17 | html = K.formatHtml(html, { 18 | a : ['href', 'target'], 19 | embed : ['src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'], 20 | img : ['src', 'width', 'height', 'border', 'alt', 'title', '.width', '.height'], 21 | table : ['border'], 22 | 'td,th' : ['rowspan', 'colspan'], 23 | 'div,hr,br,tbody,tr,p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6' : [] 24 | }); 25 | self.html(html); 26 | self.cmd.selection(true); 27 | self.addBookmark(); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/code/code.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | // google code prettify: http://google-code-prettify.googlecode.com/ 11 | // http://google-code-prettify.googlecode.com/ 12 | 13 | KindEditor.plugin('code', function(K) { 14 | var self = this, name = 'code'; 15 | self.clickToolbar(name, function() { 16 | var lang = self.lang(name + '.'), 17 | html = ['
    ', 18 | '
    ', 19 | '', 35 | '
    ', 36 | '', 37 | '
    '].join(''), 38 | dialog = self.createDialog({ 39 | name : name, 40 | width : 450, 41 | title : self.lang(name), 42 | body : html, 43 | yesBtn : { 44 | name : self.lang('yes'), 45 | click : function(e) { 46 | var type = K('.ke-code-type', dialog.div).val(), 47 | code = textarea.val(), 48 | cls = type === '' ? '' : ' lang-' + type, 49 | html = '
    \n' + K.escape(code) + '
    '; 50 | if (K.trim(code) === '') { 51 | alert(lang.pleaseInput); 52 | textarea[0].focus(); 53 | return; 54 | } 55 | self.insertHtml(html).hideDialog().focus(); 56 | } 57 | } 58 | }), 59 | textarea = K('textarea', dialog.div); 60 | textarea[0].focus(); 61 | }); 62 | }); 63 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/code/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} 2 | 3 | pre.prettyprint { 4 | border: 0; 5 | border-left: 3px solid rgb(204, 204, 204); 6 | margin-left: 2em; 7 | padding: 0.5em; 8 | font-size: 110%; 9 | display: block; 10 | font-family: "Consolas", "Monaco", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; 11 | margin: 1em 0px; 12 | white-space: pre; 13 | } 14 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/emoticons.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('emoticons', function(K) { 11 | var self = this, name = 'emoticons', 12 | path = (self.emoticonsPath || self.pluginsPath + 'emoticons/images/'), 13 | allowPreview = self.allowPreviewEmoticons === undefined ? true : self.allowPreviewEmoticons, 14 | currentPageNum = 1; 15 | self.clickToolbar(name, function() { 16 | var rows = 5, cols = 9, total = 135, startNum = 0, 17 | cells = rows * cols, pages = Math.ceil(total / cells), 18 | colsHalf = Math.floor(cols / 2), 19 | wrapperDiv = K('
    '), 20 | elements = [], 21 | menu = self.createMenu({ 22 | name : name, 23 | beforeRemove : function() { 24 | removeEvent(); 25 | } 26 | }); 27 | menu.div.append(wrapperDiv); 28 | var previewDiv, previewImg; 29 | if (allowPreview) { 30 | previewDiv = K('
    ').css('right', 0); 31 | previewImg = K(''); 32 | wrapperDiv.append(previewDiv); 33 | previewDiv.append(previewImg); 34 | } 35 | function bindCellEvent(cell, j, num) { 36 | if (previewDiv) { 37 | cell.mouseover(function() { 38 | if (j > colsHalf) { 39 | previewDiv.css('left', 0); 40 | previewDiv.css('right', ''); 41 | } else { 42 | previewDiv.css('left', ''); 43 | previewDiv.css('right', 0); 44 | } 45 | previewImg.attr('src', path + num + '.gif'); 46 | K(this).addClass('ke-on'); 47 | }); 48 | } else { 49 | cell.mouseover(function() { 50 | K(this).addClass('ke-on'); 51 | }); 52 | } 53 | cell.mouseout(function() { 54 | K(this).removeClass('ke-on'); 55 | }); 56 | cell.click(function(e) { 57 | self.insertHtml('').hideMenu().focus(); 58 | e.stop(); 59 | }); 60 | } 61 | function createEmoticonsTable(pageNum, parentDiv) { 62 | var table = document.createElement('table'); 63 | parentDiv.append(table); 64 | if (previewDiv) { 65 | K(table).mouseover(function() { 66 | previewDiv.show('block'); 67 | }); 68 | K(table).mouseout(function() { 69 | previewDiv.hide(); 70 | }); 71 | elements.push(K(table)); 72 | } 73 | table.className = 'ke-table'; 74 | table.cellPadding = 0; 75 | table.cellSpacing = 0; 76 | table.border = 0; 77 | var num = (pageNum - 1) * cells + startNum; 78 | for (var i = 0; i < rows; i++) { 79 | var row = table.insertRow(i); 80 | for (var j = 0; j < cols; j++) { 81 | var cell = K(row.insertCell(j)); 82 | cell.addClass('ke-cell'); 83 | bindCellEvent(cell, j, num); 84 | var span = K('') 85 | .css('background-position', '-' + (24 * num) + 'px 0px') 86 | .css('background-image', 'url(' + path + 'static.gif)'); 87 | cell.append(span); 88 | elements.push(cell); 89 | num++; 90 | } 91 | } 92 | return table; 93 | } 94 | var table = createEmoticonsTable(currentPageNum, wrapperDiv); 95 | function removeEvent() { 96 | K.each(elements, function() { 97 | this.unbind(); 98 | }); 99 | } 100 | var pageDiv; 101 | function bindPageEvent(el, pageNum) { 102 | el.click(function(e) { 103 | removeEvent(); 104 | table.parentNode.removeChild(table); 105 | pageDiv.remove(); 106 | table = createEmoticonsTable(pageNum, wrapperDiv); 107 | createPageTable(pageNum); 108 | currentPageNum = pageNum; 109 | e.stop(); 110 | }); 111 | } 112 | function createPageTable(currentPageNum) { 113 | pageDiv = K('
    '); 114 | wrapperDiv.append(pageDiv); 115 | for (var pageNum = 1; pageNum <= pages; pageNum++) { 116 | if (currentPageNum !== pageNum) { 117 | var a = K('
    [' + pageNum + ']'); 118 | bindPageEvent(a, pageNum); 119 | pageDiv.append(a); 120 | elements.push(a); 121 | } else { 122 | pageDiv.append(K('@[' + pageNum + ']')); 123 | } 124 | pageDiv.append(K('@ ')); 125 | } 126 | } 127 | createPageTable(currentPageNum); 128 | }); 129 | }); 130 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/0.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/1.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/10.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/100.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/100.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/101.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/101.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/102.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/102.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/103.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/103.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/104.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/104.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/105.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/105.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/106.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/106.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/107.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/107.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/108.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/108.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/109.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/109.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/11.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/110.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/110.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/111.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/111.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/112.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/112.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/113.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/113.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/114.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/114.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/115.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/115.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/116.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/116.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/117.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/117.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/118.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/118.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/119.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/119.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/12.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/120.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/120.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/121.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/121.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/122.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/122.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/123.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/123.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/124.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/124.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/125.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/125.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/126.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/126.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/127.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/127.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/128.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/128.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/129.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/129.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/13.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/130.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/130.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/131.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/131.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/132.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/132.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/133.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/133.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/134.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/134.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/14.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/15.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/16.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/17.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/18.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/19.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/2.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/20.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/21.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/22.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/23.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/24.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/25.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/26.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/27.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/28.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/29.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/3.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/30.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/31.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/32.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/33.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/34.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/35.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/36.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/37.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/38.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/39.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/4.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/40.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/41.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/42.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/43.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/44.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/45.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/46.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/47.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/48.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/49.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/5.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/50.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/51.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/52.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/53.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/54.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/55.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/56.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/57.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/58.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/59.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/6.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/60.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/61.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/62.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/63.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/64.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/65.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/66.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/67.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/68.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/69.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/7.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/70.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/71.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/72.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/72.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/73.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/73.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/74.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/74.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/75.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/75.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/76.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/76.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/77.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/77.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/78.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/78.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/79.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/79.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/8.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/80.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/80.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/81.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/81.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/82.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/82.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/83.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/83.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/84.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/84.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/85.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/85.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/86.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/86.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/87.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/87.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/88.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/88.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/89.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/89.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/9.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/90.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/90.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/91.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/91.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/92.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/92.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/93.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/93.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/94.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/94.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/95.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/95.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/96.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/96.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/97.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/97.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/98.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/98.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/99.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/99.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/static.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/emoticons/images/static.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/filemanager/images/file-16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/filemanager/images/file-16.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/filemanager/images/file-64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/filemanager/images/file-64.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/filemanager/images/folder-16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/filemanager/images/folder-16.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/filemanager/images/folder-64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/filemanager/images/folder-64.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/filemanager/images/go-up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/filemanager/images/go-up.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/fixtoolbar/fixtoolbar.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by chenyihong on 14/12/4. 3 | */ 4 | 5 | KindEditor.plugin('fixtoolbar', function (K) { 6 | var self = this; 7 | if (!self.fixToolBar) { 8 | return; 9 | } 10 | 11 | function init() { 12 | var toolbar = K('.ke-toolbar'); 13 | var originY = toolbar.pos().y; 14 | K(window).bind('scroll', function () { 15 | if (toolbar.css('position') == 'fixed') { 16 | if(document.body.scrollTop - originY < 0){ 17 | toolbar.css('position', 'static'); 18 | toolbar.css('top', 'auto'); 19 | } 20 | } else { 21 | if (toolbar.pos().y - document.body.scrollTop < 0) { 22 | toolbar.css('position', 'fixed'); 23 | toolbar.css('top', 0); 24 | } 25 | } 26 | }); 27 | } 28 | 29 | if (self.isCreated) { 30 | init(); 31 | } else { 32 | self.afterCreate(init); 33 | } 34 | 35 | }); 36 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/flash/flash.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('flash', function(K) { 11 | var self = this, name = 'flash', lang = self.lang(name + '.'), 12 | allowFlashUpload = K.undef(self.allowFlashUpload, true), 13 | allowFileManager = K.undef(self.allowFileManager, false), 14 | formatUploadUrl = K.undef(self.formatUploadUrl, true), 15 | extraParams = K.undef(self.extraFileUploadParams, {}), 16 | filePostName = K.undef(self.filePostName, 'imgFile'), 17 | uploadJson = K.undef(self.uploadJson, self.basePath + 'php/upload_json.php'); 18 | self.plugin.flash = { 19 | edit : function() { 20 | var html = [ 21 | '
    ', 22 | //url 23 | '
    ', 24 | '', 25 | '  ', 26 | '  ', 27 | '', 28 | '', 29 | '', 30 | '
    ', 31 | //width 32 | '
    ', 33 | '', 34 | ' ', 35 | '
    ', 36 | //height 37 | '
    ', 38 | '', 39 | ' ', 40 | '
    ', 41 | '
    ' 42 | ].join(''); 43 | var dialog = self.createDialog({ 44 | name : name, 45 | width : 450, 46 | title : self.lang(name), 47 | body : html, 48 | yesBtn : { 49 | name : self.lang('yes'), 50 | click : function(e) { 51 | var url = K.trim(urlBox.val()), 52 | width = widthBox.val(), 53 | height = heightBox.val(); 54 | if (url == 'http://' || K.invalidUrl(url)) { 55 | alert(self.lang('invalidUrl')); 56 | urlBox[0].focus(); 57 | return; 58 | } 59 | if (!/^\d*$/.test(width)) { 60 | alert(self.lang('invalidWidth')); 61 | widthBox[0].focus(); 62 | return; 63 | } 64 | if (!/^\d*$/.test(height)) { 65 | alert(self.lang('invalidHeight')); 66 | heightBox[0].focus(); 67 | return; 68 | } 69 | var html = K.mediaImg(self.themesPath + 'common/blank.gif', { 70 | src : url, 71 | type : K.mediaType('.swf'), 72 | width : width, 73 | height : height, 74 | quality : 'high' 75 | }); 76 | self.insertHtml(html).hideDialog().focus(); 77 | } 78 | } 79 | }), 80 | div = dialog.div, 81 | urlBox = K('[name="url"]', div), 82 | viewServerBtn = K('[name="viewServer"]', div), 83 | widthBox = K('[name="width"]', div), 84 | heightBox = K('[name="height"]', div); 85 | urlBox.val('http://'); 86 | 87 | if (allowFlashUpload) { 88 | var uploadbutton = K.uploadbutton({ 89 | button : K('.ke-upload-button', div)[0], 90 | fieldName : filePostName, 91 | extraParams : extraParams, 92 | url : K.addParam(uploadJson, 'dir=flash'), 93 | afterUpload : function(data) { 94 | dialog.hideLoading(); 95 | if (data.error === 0) { 96 | var url = data.url; 97 | if (formatUploadUrl) { 98 | url = K.formatUrl(url, 'absolute'); 99 | } 100 | urlBox.val(url); 101 | if (self.afterUpload) { 102 | self.afterUpload.call(self, url, data, name); 103 | } 104 | alert(self.lang('uploadSuccess')); 105 | } else { 106 | alert(data.message); 107 | } 108 | }, 109 | afterError : function(html) { 110 | dialog.hideLoading(); 111 | self.errorDialog(html); 112 | } 113 | }); 114 | uploadbutton.fileBox.change(function(e) { 115 | dialog.showLoading(self.lang('uploadLoading')); 116 | uploadbutton.submit(); 117 | }); 118 | } else { 119 | K('.ke-upload-button', div).hide(); 120 | } 121 | 122 | if (allowFileManager) { 123 | viewServerBtn.click(function(e) { 124 | self.loadPlugin('filemanager', function() { 125 | self.plugin.filemanagerDialog({ 126 | viewType : 'LIST', 127 | dirName : 'flash', 128 | clickFn : function(url, title) { 129 | if (self.dialogs.length > 1) { 130 | K('[name="url"]', div).val(url); 131 | if (self.afterSelectFile) { 132 | self.afterSelectFile.call(self, url); 133 | } 134 | self.hideDialog(); 135 | } 136 | } 137 | }); 138 | }); 139 | }); 140 | } else { 141 | viewServerBtn.hide(); 142 | } 143 | 144 | var img = self.plugin.getSelectedFlash(); 145 | if (img) { 146 | var attrs = K.mediaAttrs(img.attr('data-ke-tag')); 147 | urlBox.val(attrs.src); 148 | widthBox.val(K.removeUnit(img.css('width')) || attrs.width || 0); 149 | heightBox.val(K.removeUnit(img.css('height')) || attrs.height || 0); 150 | } 151 | urlBox[0].focus(); 152 | urlBox[0].select(); 153 | }, 154 | 'delete' : function() { 155 | self.plugin.getSelectedFlash().remove(); 156 | // [IE] 删除图片后立即点击图片按钮出错 157 | self.addBookmark(); 158 | } 159 | }; 160 | self.clickToolbar(name, self.plugin.flash.edit); 161 | }); 162 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/image/images/align_left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/image/images/align_left.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/image/images/align_right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/image/images/align_right.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/image/images/align_top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/image/images/align_top.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/image/images/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/image/images/refresh.png -------------------------------------------------------------------------------- /static/kindeditor/plugins/insertfile/insertfile.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('insertfile', function(K) { 11 | var self = this, name = 'insertfile', 12 | allowFileUpload = K.undef(self.allowFileUpload, true), 13 | allowFileManager = K.undef(self.allowFileManager, false), 14 | formatUploadUrl = K.undef(self.formatUploadUrl, true), 15 | uploadJson = K.undef(self.uploadJson, self.basePath + 'php/upload_json.php'), 16 | extraParams = K.undef(self.extraFileUploadParams, {}), 17 | filePostName = K.undef(self.filePostName, 'imgFile'), 18 | lang = self.lang(name + '.'); 19 | self.plugin.fileDialog = function(options) { 20 | var fileUrl = K.undef(options.fileUrl, 'http://'), 21 | fileTitle = K.undef(options.fileTitle, ''), 22 | clickFn = options.clickFn; 23 | var html = [ 24 | '
    ', 25 | '
    ', 26 | '', 27 | '  ', 28 | '  ', 29 | '', 30 | '', 31 | '', 32 | '
    ', 33 | //title 34 | '
    ', 35 | '', 36 | '
    ', 37 | '
    ', 38 | //form end 39 | '', 40 | '
    ' 41 | ].join(''); 42 | var dialog = self.createDialog({ 43 | name : name, 44 | width : 450, 45 | title : self.lang(name), 46 | body : html, 47 | yesBtn : { 48 | name : self.lang('yes'), 49 | click : function(e) { 50 | var url = K.trim(urlBox.val()), 51 | title = titleBox.val(); 52 | if (url == 'http://' || K.invalidUrl(url)) { 53 | alert(self.lang('invalidUrl')); 54 | urlBox[0].focus(); 55 | return; 56 | } 57 | if (K.trim(title) === '') { 58 | title = url; 59 | } 60 | clickFn.call(self, url, title); 61 | } 62 | } 63 | }), 64 | div = dialog.div; 65 | 66 | var urlBox = K('[name="url"]', div), 67 | viewServerBtn = K('[name="viewServer"]', div), 68 | titleBox = K('[name="title"]', div); 69 | 70 | if (allowFileUpload) { 71 | var uploadbutton = K.uploadbutton({ 72 | button : K('.ke-upload-button', div)[0], 73 | fieldName : filePostName, 74 | url : K.addParam(uploadJson, 'dir=file'), 75 | extraParams : extraParams, 76 | afterUpload : function(data) { 77 | dialog.hideLoading(); 78 | if (data.error === 0) { 79 | var url = data.url; 80 | if (formatUploadUrl) { 81 | url = K.formatUrl(url, 'absolute'); 82 | } 83 | urlBox.val(url); 84 | if (self.afterUpload) { 85 | self.afterUpload.call(self, url, data, name); 86 | } 87 | alert(self.lang('uploadSuccess')); 88 | } else { 89 | alert(data.message); 90 | } 91 | }, 92 | afterError : function(html) { 93 | dialog.hideLoading(); 94 | self.errorDialog(html); 95 | } 96 | }); 97 | uploadbutton.fileBox.change(function(e) { 98 | dialog.showLoading(self.lang('uploadLoading')); 99 | uploadbutton.submit(); 100 | }); 101 | } else { 102 | K('.ke-upload-button', div).hide(); 103 | } 104 | if (allowFileManager) { 105 | viewServerBtn.click(function(e) { 106 | self.loadPlugin('filemanager', function() { 107 | self.plugin.filemanagerDialog({ 108 | viewType : 'LIST', 109 | dirName : 'file', 110 | clickFn : function(url, title) { 111 | if (self.dialogs.length > 1) { 112 | K('[name="url"]', div).val(url); 113 | if (self.afterSelectFile) { 114 | self.afterSelectFile.call(self, url); 115 | } 116 | self.hideDialog(); 117 | } 118 | } 119 | }); 120 | }); 121 | }); 122 | } else { 123 | viewServerBtn.hide(); 124 | } 125 | urlBox.val(fileUrl); 126 | titleBox.val(fileTitle); 127 | urlBox[0].focus(); 128 | urlBox[0].select(); 129 | }; 130 | self.clickToolbar(name, function() { 131 | self.plugin.fileDialog({ 132 | clickFn : function(url, title) { 133 | var html = '' + title + ''; 134 | self.insertHtml(html).hideDialog().focus(); 135 | } 136 | }); 137 | }); 138 | }); 139 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/lineheight/lineheight.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('lineheight', function(K) { 11 | var self = this, name = 'lineheight', lang = self.lang(name + '.'); 12 | self.clickToolbar(name, function() { 13 | var curVal = '', commonNode = self.cmd.commonNode({'*' : '.line-height'}); 14 | if (commonNode) { 15 | curVal = commonNode.css('line-height'); 16 | } 17 | var menu = self.createMenu({ 18 | name : name, 19 | width : 150 20 | }); 21 | K.each(lang.lineHeight, function(i, row) { 22 | K.each(row, function(key, val) { 23 | menu.addItem({ 24 | title : val, 25 | checked : curVal === key, 26 | click : function() { 27 | self.cmd.toggle('', { 28 | span : '.line-height=' + key 29 | }); 30 | self.updateState(); 31 | self.addBookmark(); 32 | self.hideMenu(); 33 | } 34 | }); 35 | }); 36 | }); 37 | }); 38 | }); 39 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/link/link.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('link', function(K) { 11 | var self = this, name = 'link'; 12 | self.plugin.link = { 13 | edit : function() { 14 | var lang = self.lang(name + '.'), 15 | html = '
    ' + 16 | //url 17 | '
    ' + 18 | '' + 19 | '
    ' + 20 | //type 21 | '
    ' + 22 | '' + 23 | '' + 24 | '
    ' + 25 | '
    ', 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 url = K.trim(urlBox.val()); 35 | if (url == 'http://' || K.invalidUrl(url)) { 36 | alert(self.lang('invalidUrl')); 37 | urlBox[0].focus(); 38 | return; 39 | } 40 | self.exec('createlink', url, typeBox.val()).hideDialog().focus(); 41 | } 42 | } 43 | }), 44 | div = dialog.div, 45 | urlBox = K('input[name="url"]', div), 46 | typeBox = K('select[name="type"]', div); 47 | urlBox.val('http://'); 48 | typeBox[0].options[0] = new Option(lang.newWindow, '_blank'); 49 | typeBox[0].options[1] = new Option(lang.selfWindow, ''); 50 | self.cmd.selection(); 51 | var a = self.plugin.getSelectedLink(); 52 | if (a) { 53 | self.cmd.range.selectNode(a[0]); 54 | self.cmd.select(); 55 | urlBox.val(a.attr('data-ke-src')); 56 | typeBox.val(a.attr('target')); 57 | } 58 | urlBox[0].focus(); 59 | urlBox[0].select(); 60 | }, 61 | 'delete' : function() { 62 | self.exec('unlink', null); 63 | } 64 | }; 65 | self.clickToolbar(name, self.plugin.link.edit); 66 | }); 67 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/map/map.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 53 | 54 | 55 |
    56 | 57 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/map/map.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | // Google Maps: http://code.google.com/apis/maps/index.html 11 | 12 | KindEditor.plugin('map', function(K) { 13 | var self = this, name = 'map', lang = self.lang(name + '.'); 14 | self.clickToolbar(name, function() { 15 | var html = ['
    ', 16 | '
    ', 17 | lang.address + ' ', 18 | '', 19 | '', 20 | '', 21 | '
    ', 22 | '
    ', 23 | '
    '].join(''); 24 | var dialog = self.createDialog({ 25 | name : name, 26 | width : 600, 27 | title : self.lang(name), 28 | body : html, 29 | yesBtn : { 30 | name : self.lang('yes'), 31 | click : function(e) { 32 | var geocoder = win.geocoder, 33 | map = win.map, 34 | center = map.getCenter().lat() + ',' + map.getCenter().lng(), 35 | zoom = map.getZoom(), 36 | maptype = map.getMapTypeId(), 37 | url = 'http://maps.googleapis.com/maps/api/staticmap'; 38 | url += '?center=' + encodeURIComponent(center); 39 | url += '&zoom=' + encodeURIComponent(zoom); 40 | url += '&size=558x360'; 41 | url += '&maptype=' + encodeURIComponent(maptype); 42 | url += '&markers=' + encodeURIComponent(center); 43 | url += '&language=' + self.langType; 44 | url += '&sensor=false'; 45 | self.exec('insertimage', url).hideDialog().focus(); 46 | } 47 | }, 48 | beforeRemove : function() { 49 | searchBtn.remove(); 50 | if (doc) { 51 | doc.write(''); 52 | } 53 | iframe.remove(); 54 | } 55 | }); 56 | var div = dialog.div, 57 | addressBox = K('[name="address"]', div), 58 | searchBtn = K('[name="searchBtn"]', div), 59 | win, doc; 60 | var iframeHtml = ['', 61 | '', 62 | '', 67 | '', 68 | '', 110 | '', 111 | '', 112 | '
    ', 113 | ''].join('\n'); 114 | // TODO:用doc.write(iframeHtml)方式加载时,在IE6上第一次加载报错,暂时使用src方式 115 | var iframe = K(''); 116 | function ready() { 117 | win = iframe[0].contentWindow; 118 | doc = K.iframeDoc(iframe); 119 | //doc.open(); 120 | //doc.write(iframeHtml); 121 | //doc.close(); 122 | } 123 | iframe.bind('load', function() { 124 | iframe.unbind('load'); 125 | if (K.IE) { 126 | ready(); 127 | } else { 128 | setTimeout(ready, 0); 129 | } 130 | }); 131 | K('.ke-map', div).replaceWith(iframe); 132 | // search map 133 | searchBtn.click(function() { 134 | win.search(addressBox.val()); 135 | }); 136 | }); 137 | }); 138 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/media/media.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('media', function(K) { 11 | var self = this, name = 'media', lang = self.lang(name + '.'), 12 | allowMediaUpload = K.undef(self.allowMediaUpload, true), 13 | allowFileManager = K.undef(self.allowFileManager, false), 14 | formatUploadUrl = K.undef(self.formatUploadUrl, true), 15 | extraParams = K.undef(self.extraFileUploadParams, {}), 16 | filePostName = K.undef(self.filePostName, 'imgFile'), 17 | uploadJson = K.undef(self.uploadJson, self.basePath + 'php/upload_json.php'); 18 | self.plugin.media = { 19 | edit : function() { 20 | var html = [ 21 | '
    ', 22 | //url 23 | '
    ', 24 | '', 25 | '  ', 26 | '  ', 27 | '', 28 | '', 29 | '', 30 | '
    ', 31 | //width 32 | '
    ', 33 | '', 34 | '', 35 | '
    ', 36 | //height 37 | '
    ', 38 | '', 39 | '', 40 | '
    ', 41 | //autostart 42 | '
    ', 43 | '', 44 | ' ', 45 | '
    ', 46 | '
    ' 47 | ].join(''); 48 | var dialog = self.createDialog({ 49 | name : name, 50 | width : 450, 51 | height : 230, 52 | title : self.lang(name), 53 | body : html, 54 | yesBtn : { 55 | name : self.lang('yes'), 56 | click : function(e) { 57 | var url = K.trim(urlBox.val()), 58 | width = widthBox.val(), 59 | height = heightBox.val(); 60 | if (url == 'http://' || K.invalidUrl(url)) { 61 | alert(self.lang('invalidUrl')); 62 | urlBox[0].focus(); 63 | return; 64 | } 65 | if (!/^\d*$/.test(width)) { 66 | alert(self.lang('invalidWidth')); 67 | widthBox[0].focus(); 68 | return; 69 | } 70 | if (!/^\d*$/.test(height)) { 71 | alert(self.lang('invalidHeight')); 72 | heightBox[0].focus(); 73 | return; 74 | } 75 | var html = K.mediaImg(self.themesPath + 'common/blank.gif', { 76 | src : url, 77 | type : K.mediaType(url), 78 | width : width, 79 | height : height, 80 | autostart : autostartBox[0].checked ? 'true' : 'false', 81 | loop : 'true' 82 | }); 83 | self.insertHtml(html).hideDialog().focus(); 84 | } 85 | } 86 | }), 87 | div = dialog.div, 88 | urlBox = K('[name="url"]', div), 89 | viewServerBtn = K('[name="viewServer"]', div), 90 | widthBox = K('[name="width"]', div), 91 | heightBox = K('[name="height"]', div), 92 | autostartBox = K('[name="autostart"]', div); 93 | urlBox.val('http://'); 94 | 95 | if (allowMediaUpload) { 96 | var uploadbutton = K.uploadbutton({ 97 | button : K('.ke-upload-button', div)[0], 98 | fieldName : filePostName, 99 | extraParams : extraParams, 100 | url : K.addParam(uploadJson, 'dir=media'), 101 | afterUpload : function(data) { 102 | dialog.hideLoading(); 103 | if (data.error === 0) { 104 | var url = data.url; 105 | if (formatUploadUrl) { 106 | url = K.formatUrl(url, 'absolute'); 107 | } 108 | urlBox.val(url); 109 | if (self.afterUpload) { 110 | self.afterUpload.call(self, url, data, name); 111 | } 112 | alert(self.lang('uploadSuccess')); 113 | } else { 114 | alert(data.message); 115 | } 116 | }, 117 | afterError : function(html) { 118 | dialog.hideLoading(); 119 | self.errorDialog(html); 120 | } 121 | }); 122 | uploadbutton.fileBox.change(function(e) { 123 | dialog.showLoading(self.lang('uploadLoading')); 124 | uploadbutton.submit(); 125 | }); 126 | } else { 127 | K('.ke-upload-button', div).hide(); 128 | } 129 | 130 | if (allowFileManager) { 131 | viewServerBtn.click(function(e) { 132 | self.loadPlugin('filemanager', function() { 133 | self.plugin.filemanagerDialog({ 134 | viewType : 'LIST', 135 | dirName : 'media', 136 | clickFn : function(url, title) { 137 | if (self.dialogs.length > 1) { 138 | K('[name="url"]', div).val(url); 139 | if (self.afterSelectFile) { 140 | self.afterSelectFile.call(self, url); 141 | } 142 | self.hideDialog(); 143 | } 144 | } 145 | }); 146 | }); 147 | }); 148 | } else { 149 | viewServerBtn.hide(); 150 | } 151 | 152 | var img = self.plugin.getSelectedMedia(); 153 | if (img) { 154 | var attrs = K.mediaAttrs(img.attr('data-ke-tag')); 155 | urlBox.val(attrs.src); 156 | widthBox.val(K.removeUnit(img.css('width')) || attrs.width || 0); 157 | heightBox.val(K.removeUnit(img.css('height')) || attrs.height || 0); 158 | autostartBox[0].checked = (attrs.autostart === 'true'); 159 | } 160 | urlBox[0].focus(); 161 | urlBox[0].select(); 162 | }, 163 | 'delete' : function() { 164 | self.plugin.getSelectedMedia().remove(); 165 | // [IE] 删除图片后立即点击图片按钮出错 166 | self.addBookmark(); 167 | } 168 | }; 169 | self.clickToolbar(name, self.plugin.media.edit); 170 | }); 171 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/multiimage/images/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/multiimage/images/image.png -------------------------------------------------------------------------------- /static/kindeditor/plugins/multiimage/images/select-files-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/multiimage/images/select-files-en.png -------------------------------------------------------------------------------- /static/kindeditor/plugins/multiimage/images/select-files-zh-CN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/multiimage/images/select-files-zh-CN.png -------------------------------------------------------------------------------- /static/kindeditor/plugins/multiimage/images/swfupload.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/plugins/multiimage/images/swfupload.swf -------------------------------------------------------------------------------- /static/kindeditor/plugins/pagebreak/pagebreak.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('pagebreak', function(K) { 11 | var self = this; 12 | var name = 'pagebreak'; 13 | var pagebreakHtml = K.undef(self.pagebreakHtml, '
    '); 14 | 15 | self.clickToolbar(name, function() { 16 | var cmd = self.cmd, range = cmd.range; 17 | self.focus(); 18 | var tail = self.newlineTag == 'br' || K.WEBKIT ? '' : ''; 19 | self.insertHtml(pagebreakHtml + tail); 20 | if (tail !== '') { 21 | var p = K('#__kindeditor_tail_tag__', self.edit.doc); 22 | range.selectNodeContents(p[0]); 23 | p.removeAttr('id'); 24 | cmd.select(); 25 | } 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/plainpaste/plainpaste.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('plainpaste', function(K) { 11 | var self = this, name = 'plainpaste'; 12 | self.clickToolbar(name, function() { 13 | var lang = self.lang(name + '.'), 14 | html = '
    ' + 15 | '
    ' + lang.comment + '
    ' + 16 | '' + 17 | '
    ', 18 | dialog = self.createDialog({ 19 | name : name, 20 | width : 450, 21 | title : self.lang(name), 22 | body : html, 23 | yesBtn : { 24 | name : self.lang('yes'), 25 | click : function(e) { 26 | var html = textarea.val(); 27 | html = K.escape(html); 28 | html = html.replace(/ {2}/g, '  '); 29 | if (self.newlineTag == 'p') { 30 | html = html.replace(/^/, '

    ').replace(/$/, '

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

    '); 31 | } else { 32 | html = html.replace(/\n/g, '
    $&'); 33 | } 34 | self.insertHtml(html).hideDialog().focus(); 35 | } 36 | } 37 | }), 38 | textarea = K('textarea', dialog.div); 39 | textarea[0].focus(); 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/preview/preview.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('preview', function(K) { 11 | var self = this, name = 'preview', undefined; 12 | self.clickToolbar(name, function() { 13 | var lang = self.lang(name + '.'), 14 | html = '

    ' + 15 | '' + 16 | '
    ', 17 | dialog = self.createDialog({ 18 | name : name, 19 | width : 750, 20 | title : self.lang(name), 21 | body : html 22 | }), 23 | iframe = K('iframe', dialog.div), 24 | doc = K.iframeDoc(iframe); 25 | doc.open(); 26 | doc.write(self.fullHtml()); 27 | doc.close(); 28 | K(doc.body).css('background-color', '#FFF'); 29 | iframe[0].contentWindow.focus(); 30 | }); 31 | }); 32 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/quickformat/quickformat.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('quickformat', function(K) { 11 | var self = this, name = 'quickformat', 12 | blockMap = K.toMap('blockquote,center,div,h1,h2,h3,h4,h5,h6,p'); 13 | function getFirstChild(knode) { 14 | var child = knode.first(); 15 | while (child && child.first()) { 16 | child = child.first(); 17 | } 18 | return child; 19 | } 20 | self.clickToolbar(name, function() { 21 | self.focus(); 22 | var doc = self.edit.doc, 23 | range = self.cmd.range, 24 | child = K(doc.body).first(), next, 25 | nodeList = [], subList = [], 26 | bookmark = range.createBookmark(true); 27 | while(child) { 28 | next = child.next(); 29 | var firstChild = getFirstChild(child); 30 | if (!firstChild || firstChild.name != 'img') { 31 | if (blockMap[child.name]) { 32 | child.html(child.html().replace(/^(\s| | )+/ig, '')); 33 | child.css('text-indent', '2em'); 34 | } else { 35 | subList.push(child); 36 | } 37 | if (!next || (blockMap[next.name] || blockMap[child.name] && !blockMap[next.name])) { 38 | if (subList.length > 0) { 39 | nodeList.push(subList); 40 | } 41 | subList = []; 42 | } 43 | } 44 | child = next; 45 | } 46 | K.each(nodeList, function(i, subList) { 47 | var wrapper = K('

    ', doc); 48 | subList[0].before(wrapper); 49 | K.each(subList, function(i, knode) { 50 | wrapper.append(knode); 51 | }); 52 | }); 53 | range.moveToBookmark(bookmark); 54 | self.addBookmark(); 55 | }); 56 | }); 57 | 58 | /** 59 | -------------------------- 60 | abcd
    61 | 1234
    62 | 63 | to 64 | 65 |

    66 | abcd
    67 | 1234
    68 |

    69 | 70 | -------------------------- 71 | 72 |   abcd1233 73 |

    1234

    74 | 75 | to 76 | 77 |

    abcd1233

    78 |

    1234

    79 | 80 | -------------------------- 81 | */ -------------------------------------------------------------------------------- /static/kindeditor/plugins/template/html/1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

    8 | 在此处输入标题 9 |

    10 |

    11 | 在此处输入内容 12 |

    13 | 14 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/template/html/2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

    8 | 标题 9 |

    10 | 11 | 12 | 13 | 16 | 19 | 20 | 21 | 24 | 27 | 28 | 29 | 32 | 35 | 36 | 37 |
    14 |

    标题1

    15 |
    17 |

    标题1

    18 |
    22 | 内容1 23 | 25 | 内容2 26 |
    30 | 内容3 31 | 33 | 内容4 34 |
    38 |

    39 | 表格说明 40 |

    41 | 42 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/template/html/3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

    8 | 在此处输入内容 9 |

    10 |
      11 |
    1. 12 | 描述1 13 |
    2. 14 |
    3. 15 | 描述2 16 |
    4. 17 |
    5. 18 | 描述3 19 |
    6. 20 |
    21 |

    22 | 在此处输入内容 23 |

    24 |
      25 |
    • 26 | 描述1 27 |
    • 28 |
    • 29 | 描述2 30 |
    • 31 |
    • 32 | 描述3 33 |
    • 34 |
    35 | 36 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/template/template.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('template', function(K) { 11 | var self = this, name = 'template', lang = self.lang(name + '.'), 12 | htmlPath = self.pluginsPath + name + '/html/'; 13 | function getFilePath(fileName) { 14 | return htmlPath + fileName + '?ver=' + encodeURIComponent(K.DEBUG ? K.TIME : K.VERSION); 15 | } 16 | self.clickToolbar(name, function() { 17 | var lang = self.lang(name + '.'), 18 | arr = ['
    ', 19 | '
    ', 20 | // left start 21 | '
    ', 22 | lang. selectTemplate + '
    ', 28 | // right start 29 | '
    ', 30 | ' ', 31 | '
    ', 32 | '
    ', 33 | '
    ', 34 | '', 35 | '
    '].join(''); 36 | var dialog = self.createDialog({ 37 | name : name, 38 | width : 500, 39 | title : self.lang(name), 40 | body : html, 41 | yesBtn : { 42 | name : self.lang('yes'), 43 | click : function(e) { 44 | var doc = K.iframeDoc(iframe); 45 | self[checkbox[0].checked ? 'html' : 'insertHtml'](doc.body.innerHTML).hideDialog().focus(); 46 | } 47 | } 48 | }); 49 | var selectBox = K('select', dialog.div), 50 | checkbox = K('[name="replaceFlag"]', dialog.div), 51 | iframe = K('iframe', dialog.div); 52 | checkbox[0].checked = true; 53 | iframe.attr('src', getFilePath(selectBox.val())); 54 | selectBox.change(function() { 55 | iframe.attr('src', getFilePath(this.value)); 56 | }); 57 | }); 58 | }); 59 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/wordpaste/wordpaste.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('wordpaste', function(K) { 11 | var self = this, name = 'wordpaste'; 12 | self.clickToolbar(name, function() { 13 | var lang = self.lang(name + '.'), 14 | html = '
    ' + 15 | '
    ' + lang.comment + '
    ' + 16 | '' + 17 | '
    ', 18 | dialog = self.createDialog({ 19 | name : name, 20 | width : 450, 21 | title : self.lang(name), 22 | body : html, 23 | yesBtn : { 24 | name : self.lang('yes'), 25 | click : function(e) { 26 | var str = doc.body.innerHTML; 27 | str = K.clearMsWord(str, self.filterMode ? self.htmlTags : K.options.htmlTags); 28 | self.insertHtml(str).hideDialog().focus(); 29 | } 30 | } 31 | }), 32 | div = dialog.div, 33 | iframe = K('iframe', div), 34 | doc = K.iframeDoc(iframe); 35 | if (!K.IE) { 36 | doc.designMode = 'on'; 37 | } 38 | doc.open(); 39 | doc.write('WordPaste'); 40 | doc.write(''); 41 | if (!K.IE) { 42 | doc.write('
    '); 43 | } 44 | doc.write(''); 45 | doc.close(); 46 | if (K.IE) { 47 | doc.body.contentEditable = 'true'; 48 | } 49 | iframe[0].contentWindow.focus(); 50 | }); 51 | }); 52 | -------------------------------------------------------------------------------- /static/kindeditor/themes/common/anchor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/themes/common/anchor.gif -------------------------------------------------------------------------------- /static/kindeditor/themes/common/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/themes/common/blank.gif -------------------------------------------------------------------------------- /static/kindeditor/themes/common/flash.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/themes/common/flash.gif -------------------------------------------------------------------------------- /static/kindeditor/themes/common/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/themes/common/loading.gif -------------------------------------------------------------------------------- /static/kindeditor/themes/common/media.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/themes/common/media.gif -------------------------------------------------------------------------------- /static/kindeditor/themes/common/rm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/themes/common/rm.gif -------------------------------------------------------------------------------- /static/kindeditor/themes/default/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/themes/default/background.png -------------------------------------------------------------------------------- /static/kindeditor/themes/default/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/themes/default/default.png -------------------------------------------------------------------------------- /static/kindeditor/themes/qq/editor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/static/kindeditor/themes/qq/editor.gif -------------------------------------------------------------------------------- /static/kindeditor/themes/qq/qq.css: -------------------------------------------------------------------------------- 1 | /* container */ 2 | .ke-container-qq { 3 | display: block; 4 | border: 1px solid #c3c3c3; 5 | background-color: #FFF; 6 | overflow: hidden; 7 | margin: 0; 8 | padding: 0; 9 | } 10 | /* toolbar */ 11 | .ke-container-qq .ke-toolbar { 12 | border-bottom: 1px solid #c3c3c3; 13 | background-color: #FFFFFF; 14 | padding: 2px 5px; 15 | text-align: left; 16 | overflow: hidden; 17 | zoom: 1; 18 | } 19 | .ke-toolbar-icon-url { 20 | background-image: url(editor.gif); 21 | width:18px; 22 | *xwidth:20px; 23 | height:18px; 24 | *xheight:20px; 25 | } 26 | .ke-icon-checked{ 27 | background-image: url(../default/default.png); 28 | width:16px; 29 | height:16px; 30 | } 31 | .ke-container-qq .ke-icon-bold{ 32 | background-position: 4px 1px; 33 | } 34 | .ke-container-qq .ke-icon-italic{ 35 | background-position: -27px 1px; 36 | } 37 | .ke-container-qq .ke-icon-italic{ 38 | background-position: -28px 1px; 39 | } 40 | .ke-container-qq .ke-icon-underline{ 41 | background-position: -60px 1px; 42 | } 43 | .ke-container-qq .ke-icon-fontname{ 44 | background-position: -95px 1px; 45 | } 46 | .ke-container-qq .ke-icon-fontsize{ 47 | background-position: -128px 1px; 48 | } 49 | .ke-container-qq .ke-icon-forecolor{ 50 | background-position: -159px 1px; 51 | } 52 | .ke-container-qq .ke-icon-hilitecolor{ 53 | background-position: -190px 1px; 54 | } 55 | .ke-container-qq .ke-icon-plug-align{ 56 | background-position: -223px 1px; 57 | } 58 | .plug-align-justifyleft{ 59 | background-position: -350px 1px; 60 | } 61 | .plug-align-justifycenter{ 62 | background-position: -382px 1px; 63 | } 64 | .plug-align-justifyright{ 65 | background-position: -414px 1px; 66 | } 67 | .plug-order-insertorderedlist{ 68 | background-position: -446px 1px; 69 | } 70 | .plug-order-insertunorderedlist{ 71 | background-position: -477px 1px; 72 | } 73 | .plug-indent-indent{ 74 | background-position: -513px 1px; 75 | } 76 | .plug-indent-outdent{ 77 | background-position: -545px 1px; 78 | } 79 | .ke-container-qq .ke-icon-plug-order{ 80 | background-position: -255px 1px; 81 | } 82 | .ke-container-qq .ke-icon-plug-indent{ 83 | background-position: -287px 1px; 84 | } 85 | .ke-container-qq .ke-icon-link{ 86 | background-position: -319px 1px; 87 | } 88 | 89 | .ke-container-qq .ke-toolbar .ke-outline { 90 | cursor: default; 91 | padding:0px; 92 | border:1px solid #fff; 93 | } 94 | .ke-container-qq .ke-toolbar .ke-on { 95 | border-left:1px solid white; 96 | border-top:1px solid white; 97 | border-right:1px solid gray; 98 | border-bottom:1px solid gray; 99 | background-color: #FFFFFF; 100 | } 101 | .ke-container-qq .ke-toolbar .ke-selected { 102 | border-left:1px solid gray; 103 | border-top:1px solid gray; 104 | border-right:1px solid white; 105 | border-bottom:1px solid white; 106 | background-color: #FFFFFF; 107 | } 108 | .ke-container-qq .ke-toolbar .ke-disabled { 109 | cursor: default; 110 | } 111 | 112 | .ke-colorpicker-qq{ 113 | background:#fff; 114 | } 115 | /* statusbar */ 116 | .ke-container-qq .ke-statusbar { 117 | display:none; 118 | } 119 | /* menu */ 120 | .ke-menu-qq { 121 | border:1px solid #a6a6a6; 122 | position:absolute; 123 | background:#fff; 124 | -moz-box-shadow:2px 2px 4px #DDDDDD; 125 | z-index:999; 126 | left:-400px; 127 | top:-386px; 128 | right:218px; 129 | width:130px; 130 | } 131 | .ke-menu-qq .ke-menu-item { 132 | padding:0px; 133 | background:#fff; 134 | } 135 | .ke-menu-qq .ke-menu-item-on { 136 | border:1px solid #000080;background:#FFEEC2;color:#036; 137 | } 138 | .ke-menu-qq .ke-toolbar .ke-selected { 139 | border:1px solid #9a9afb; 140 | } 141 | .ke-menu-qq .ke-menu-item-left{ 142 | width:auto; 143 | } 144 | -------------------------------------------------------------------------------- /static/kindeditor/themes/simple/simple.css: -------------------------------------------------------------------------------- 1 | /* container */ 2 | .ke-container-simple { 3 | display: block; 4 | border: 1px solid #CCC; 5 | background-color: #FFF; 6 | overflow: hidden; 7 | } 8 | /* toolbar */ 9 | .ke-container-simple .ke-toolbar { 10 | border-bottom: 1px solid #CCC; 11 | background-color: #FFF; 12 | padding: 2px 5px; 13 | overflow: hidden; 14 | } 15 | .ke-container-simple .ke-toolbar .ke-outline { 16 | border: 1px solid #FFF; 17 | background-color: transparent; 18 | margin: 1px; 19 | padding: 1px 2px; 20 | font-size: 0; 21 | line-height: 0; 22 | overflow: hidden; 23 | cursor: pointer; 24 | } 25 | .ke-container-simple .ke-toolbar .ke-on { 26 | border: 1px solid #5690D2; 27 | } 28 | .ke-container-simple .ke-toolbar .ke-selected { 29 | border: 1px solid #5690D2; 30 | background-color: #E9EFF6; 31 | } 32 | .ke-container-simple .ke-toolbar .ke-disabled { 33 | cursor: default; 34 | } 35 | /* statusbar */ 36 | .ke-container-simple .ke-statusbar { 37 | position: relative; 38 | background-color: #FFF; 39 | border-top: 1px solid #CCCCCC; 40 | font-size: 0; 41 | line-height: 0; 42 | *height: 12px; 43 | overflow: hidden; 44 | text-align: center; 45 | cursor: s-resize; 46 | } 47 | /* menu */ 48 | .ke-menu-simple { 49 | border: 1px solid #A0A0A0; 50 | background-color: #FFF; 51 | color: #222222; 52 | padding: 2px; 53 | font-family: "sans serif",tahoma,verdana,helvetica; 54 | font-size: 12px; 55 | text-align: left; 56 | overflow: hidden; 57 | } 58 | .ke-menu-simple .ke-menu-item { 59 | border: 1px solid #FFF; 60 | background-color: #FFF; 61 | color: #222222; 62 | height: 24px; 63 | overflow: hidden; 64 | cursor: pointer; 65 | } 66 | .ke-menu-simple .ke-menu-item-on { 67 | border: 1px solid #5690D2; 68 | background-color: #FFF; 69 | } 70 | /* colorpicker */ 71 | .ke-colorpicker-simple { 72 | border: 1px solid #A0A0A0; 73 | background-color: #FEFEFE; 74 | color: #222222; 75 | padding: 2px; 76 | } 77 | .ke-colorpicker-simple .ke-colorpicker-cell { 78 | font-size: 0; 79 | line-height: 0; 80 | border: 1px solid #FEFEFE; 81 | cursor: pointer; 82 | margin:3px; 83 | padding:0; 84 | } 85 | .ke-colorpicker-simple .ke-colorpicker-cell-top { 86 | font-family: "sans serif",tahoma,verdana,helvetica; 87 | font-size: 12px; 88 | line-height: 24px; 89 | border: 1px solid #FEFEFE; 90 | cursor: pointer; 91 | margin:0; 92 | padding:0; 93 | text-align: center; 94 | } 95 | .ke-colorpicker-simple .ke-colorpicker-cell-on { 96 | border: 1px solid #5690D2; 97 | } 98 | .ke-colorpicker-simple .ke-colorpicker-cell-selected { 99 | border: 1px solid #2446AB; 100 | } 101 | -------------------------------------------------------------------------------- /后台模块.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/后台模块.png -------------------------------------------------------------------------------- /留言模块.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/留言模块.png -------------------------------------------------------------------------------- /首页.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Github-Benjamin/HomePage/f0098a2f96972cfee47189728c7668bcae11476b/首页.png --------------------------------------------------------------------------------