├── .gitignore
├── Src
├── caozha-comment
│ ├── face
│ │ ├── 10.gif
│ │ ├── 11.gif
│ │ ├── 12.gif
│ │ ├── 18.gif
│ │ ├── 2.gif
│ │ ├── 21.gif
│ │ ├── 24.gif
│ │ ├── 25.gif
│ │ ├── 28.gif
│ │ ├── 29.gif
│ │ ├── 30.gif
│ │ ├── 31.gif
│ │ ├── 35.gif
│ │ ├── 36.gif
│ │ ├── 40.gif
│ │ ├── 41.gif
│ │ ├── 42.gif
│ │ ├── 43.gif
│ │ ├── 44.gif
│ │ ├── 45.gif
│ │ ├── 47.gif
│ │ ├── 48.gif
│ │ ├── 49.gif
│ │ ├── 50.gif
│ │ ├── 51.gif
│ │ ├── 52.gif
│ │ ├── 53.gif
│ │ ├── 55.gif
│ │ ├── 56.gif
│ │ ├── 57.gif
│ │ ├── 58.gif
│ │ ├── 59.gif
│ │ ├── 64.gif
│ │ ├── 67.gif
│ │ ├── 72.gif
│ │ ├── 74.gif
│ │ ├── 75.gif
│ │ ├── 77.gif
│ │ ├── 78.gif
│ │ ├── 79.gif
│ │ ├── 8.gif
│ │ ├── 84.gif
│ │ ├── 85.gif
│ │ ├── 90.gif
│ │ ├── bs.gif
│ │ ├── bz.gif
│ │ ├── cj.gif
│ │ ├── cy.gif
│ │ ├── gz.gif
│ │ ├── hq.gif
│ │ ├── hx.gif
│ │ ├── ka.gif
│ │ ├── ng.gif
│ │ ├── q.gif
│ │ ├── sa.gif
│ │ ├── se.gif
│ │ ├── tx.gif
│ │ ├── wx.gif
│ │ ├── xk.gif
│ │ ├── y.gif
│ │ ├── zm.gif
│ │ ├── 102.gif
│ │ ├── 105.gif
│ │ ├── 125.gif
│ │ ├── 126.gif
│ │ ├── cool.gif
│ │ ├── han.gif
│ │ ├── hanx.gif
│ │ ├── lei.gif
│ │ ├── tux.gif
│ │ ├── xyx.gif
│ │ └── shuai.gif
│ ├── php
│ │ ├── font
│ │ │ └── t1.ttf
│ │ ├── api.php
│ │ ├── config.php
│ │ ├── captcha.php
│ │ ├── common.php
│ │ ├── template.php
│ │ ├── cache.php
│ │ └── class.php
│ ├── assets
│ │ ├── loading.gif
│ │ ├── nouserpic.gif
│ │ ├── userpic
│ │ │ ├── 1.gif
│ │ │ ├── 10.gif
│ │ │ ├── 11.gif
│ │ │ ├── 12.gif
│ │ │ ├── 13.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
│ │ │ ├── 6.gif
│ │ │ ├── 7.gif
│ │ │ ├── 8.gif
│ │ │ └── 9.gif
│ │ ├── fonts
│ │ │ ├── iconfont.eot
│ │ │ ├── iconfont.ttf
│ │ │ ├── iconfont.woff
│ │ │ ├── caozha
│ │ │ │ ├── iconfont.eot
│ │ │ │ ├── iconfont.ttf
│ │ │ │ ├── iconfont.woff
│ │ │ │ ├── iconfont.woff2
│ │ │ │ ├── iconfont.json
│ │ │ │ ├── iconfont.css
│ │ │ │ ├── demo.css
│ │ │ │ ├── demo_index.html
│ │ │ │ ├── iconfont.svg
│ │ │ │ └── iconfont.js
│ │ │ └── iconfont.svg
│ │ ├── laypage
│ │ │ ├── laypage.css
│ │ │ └── laypage.js
│ │ ├── style-bak.css
│ │ ├── style.css
│ │ └── caozha.js
│ └── api.js
├── readme.txt
├── index.php
└── LICENSE
├── .gitattributes
├── readme.txt
├── README.md
├── Database
└── caozha_comment.sql
└── LICENSE
/.gitignore:
--------------------------------------------------------------------------------
1 | /.idea
2 | /.bak
3 | /.vscode
4 | /.image
5 | /Src/runtime/
6 | /install.lock
7 |
--------------------------------------------------------------------------------
/Src/caozha-comment/face/10.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/10.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/11.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/11.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/12.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/12.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/18.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/18.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/2.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/21.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/21.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/24.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/24.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/25.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/25.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/28.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/28.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/29.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/29.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/30.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/30.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/31.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/31.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/35.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/35.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/36.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/36.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/40.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/40.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/41.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/41.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/42.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/42.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/43.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/43.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/44.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/44.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/45.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/45.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/47.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/47.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/48.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/48.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/49.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/49.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/50.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/50.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/51.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/51.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/52.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/52.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/53.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/53.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/55.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/55.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/56.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/56.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/57.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/57.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/58.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/58.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/59.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/59.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/64.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/64.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/67.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/67.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/72.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/72.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/74.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/74.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/75.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/75.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/77.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/77.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/78.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/78.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/79.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/79.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/8.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/8.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/84.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/84.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/85.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/85.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/90.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/90.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/bs.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/bs.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/bz.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/bz.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/cj.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/cj.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/cy.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/cy.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/gz.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/gz.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/hq.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/hq.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/hx.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/hx.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/ka.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/ka.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/ng.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/ng.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/q.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/q.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/sa.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/sa.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/se.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/se.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/tx.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/tx.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/wx.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/wx.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/xk.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/xk.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/y.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/y.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/zm.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/zm.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/102.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/102.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/105.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/105.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/125.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/125.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/126.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/126.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/cool.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/cool.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/han.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/han.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/hanx.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/hanx.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/lei.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/lei.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/tux.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/tux.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/xyx.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/xyx.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/face/shuai.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/face/shuai.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/php/font/t1.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/php/font/t1.ttf
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/loading.gif
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.js linguist-language=php
2 | *.css linguist-language=php
3 | *.html linguist-language=php
4 | *.php linguist-language=php
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/nouserpic.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/nouserpic.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/1.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/10.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/10.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/11.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/11.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/12.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/12.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/13.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/13.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/14.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/14.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/15.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/15.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/16.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/17.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/17.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/18.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/18.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/19.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/19.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/2.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/20.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/20.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/21.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/21.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/22.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/22.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/23.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/23.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/24.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/24.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/25.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/25.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/26.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/26.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/27.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/27.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/28.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/28.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/29.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/29.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/3.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/30.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/30.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/31.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/31.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/32.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/32.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/33.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/33.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/34.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/34.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/35.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/35.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/36.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/36.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/37.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/37.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/38.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/38.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/39.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/39.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/4.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/4.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/40.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/40.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/41.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/41.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/42.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/42.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/43.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/43.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/44.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/44.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/45.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/45.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/46.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/46.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/47.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/47.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/48.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/48.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/49.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/49.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/5.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/5.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/50.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/50.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/6.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/6.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/7.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/7.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/8.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/8.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/userpic/9.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/userpic/9.gif
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/fonts/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/fonts/iconfont.eot
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/fonts/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/fonts/iconfont.ttf
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/fonts/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/fonts/iconfont.woff
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/fonts/caozha/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/fonts/caozha/iconfont.eot
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/fonts/caozha/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/fonts/caozha/iconfont.ttf
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/fonts/caozha/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/fonts/caozha/iconfont.woff
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/fonts/caozha/iconfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengcao/caozha-comment/HEAD/Src/caozha-comment/assets/fonts/caozha/iconfont.woff2
--------------------------------------------------------------------------------
/Src/caozha-comment/php/api.php:
--------------------------------------------------------------------------------
1 | $action();
16 | }
--------------------------------------------------------------------------------
/Src/readme.txt:
--------------------------------------------------------------------------------
1 | caozha-comment(原生PHP评论系统)
2 |
3 | caozha-comment,一个功能强大的评论系统,采用原生PHP编写,不依赖任何框架,特点:易上手,零门槛,界面清爽极简,极便于二次开发。
4 |
5 | 可以自动适配电脑、平板和手机等不同客户端。
6 |
7 | 演示地址
8 |
9 | http://caozha.com/git/demo/caozha-admin/public/index/comment/index
10 |
11 | 其他版本
12 |
13 | 1、此为原生PHP编写的评论系统,如需要thinkphp版本的评论系统,请移步:caozha-tp-comment。
14 |
15 | 2、此源码不含后台,如需要后台,请参考:caozha-admin,内有评论的完整后台示例。
16 |
17 | 安装使用
18 |
19 | 快速安装
20 |
21 | 1、PHP版本必须5.0及以上。(已在PHP5和PHP7上测试通过)
22 |
23 | 2、上传目录/Src/内所有源码到服务器。
24 |
25 | 3、将/Database/目录里的.sql文件导入到MYSQL数据库。
26 |
27 | 4、修改评论配置文件\Src\caozha-comment\php\config.php:
28 |
29 | (a)参数$mysql_config为配置您的数据库信息。
30 |
31 | (b)参数$cmt_config为评论系统基础配置参数,可以设置评论每页的数量、验证码、缓存、是否需要审核、是否允许发图片、滚动自动加载、屏蔽词等等。
32 |
33 | (c)参数$cmt_faces为表情包配置,可以把不需要的表情注释掉即可。
34 |
35 | 评论引入设置:
36 |
37 | 参考示例文件:\Src\index.php
38 |
39 | 打开此文件,参照,可以为每篇文章或者需要评论的模块添加唯一ID:
40 |
41 | 上面的data-cmtid是评论标识符ID,data-catid是评论标识符分类ID,这两个参数是用来区分文章等评论的,一般情况下使用data-cmtid就足够了。
42 |
43 | 特别鸣谢:
44 |
45 | caozha-comment使用了以下开源代码:lgyPl,特别致谢!
46 |
47 | 赞助支持:
48 |
49 | 支持本程序,请到Gitee和GitHub给我们点Star!
50 |
51 | Gitee:https://gitee.com/caozha/caozha-comment
52 |
53 | GitHub:https://github.com/cao-zha/caozha-comment
54 |
55 | 关于开发者
56 |
57 | 开发:草札 www.caozha.com
58 |
59 | 鸣谢:品络 www.pinluo.com 穷店 www.qiongdian.com
--------------------------------------------------------------------------------
/readme.txt:
--------------------------------------------------------------------------------
1 | caozha-comment(原生PHP评论系统)
2 |
3 | caozha-comment,一个功能强大的评论系统,采用原生PHP编写,不依赖任何框架,特点:易上手,零门槛,界面清爽极简,极便于二次开发。
4 |
5 | 可以自动适配电脑、平板和手机等不同客户端。
6 |
7 | 演示地址
8 |
9 | http://caozha.com/git/demo/caozha-admin/public/index/comment/index
10 |
11 | 其他版本
12 |
13 | 1、此为原生PHP编写的评论系统,如需要thinkphp版本的评论系统,请移步:caozha-tp-comment。
14 |
15 | 2、此源码不含后台,如需要后台,请参考:caozha-admin,内有评论的完整后台示例。
16 |
17 | 安装使用
18 |
19 | 快速安装
20 |
21 | 1、PHP版本必须5.0及以上。(已在PHP5和PHP7上测试通过)
22 |
23 | 2、上传目录/Src/内所有源码到服务器。
24 |
25 | 3、将/Database/目录里的.sql文件导入到MYSQL数据库。
26 |
27 | 4、修改评论配置文件\Src\caozha-comment\php\config.php:
28 |
29 | (a)参数$mysql_config为配置您的数据库信息。
30 |
31 | (b)参数$cmt_config为评论系统基础配置参数,可以设置评论每页的数量、验证码、缓存、是否需要审核、是否允许发图片、滚动自动加载、屏蔽词等等。
32 |
33 | (c)参数$cmt_faces为表情包配置,可以把不需要的表情注释掉即可。
34 |
35 | 评论引入设置:
36 |
37 | 参考示例文件:\Src\index.php
38 |
39 | 打开此文件,参照,可以为每篇文章或者需要评论的模块添加唯一ID:
40 |
41 | 上面的data-cmtid是评论标识符ID,data-catid是评论标识符分类ID,这两个参数是用来区分文章等评论的,一般情况下使用data-cmtid就足够了。
42 |
43 | 特别鸣谢:
44 |
45 | caozha-comment使用了以下开源代码:lgyPl,特别致谢!
46 |
47 | 赞助支持:
48 |
49 | 支持本程序,请到Gitee和GitHub给我们点Star!
50 |
51 | Gitee:https://gitee.com/caozha/caozha-comment
52 |
53 | GitHub:https://github.com/cao-zha/caozha-comment
54 |
55 | 关于开发者
56 |
57 | 开发:草札 www.caozha.com
58 |
59 | 鸣谢:品络 www.pinluo.com 穷店 www.qiongdian.com
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/laypage/laypage.css:
--------------------------------------------------------------------------------
1 | /*!
2 | laypage默认样式
3 | */.laypage_main a,.laypage_main input,.laypage_main span{height:26px;line-height:26px}.laypage_main button,.laypage_main input,.laypageskin_default a{border:1px solid #ccc;background-color:#fff}.laypage_main{font-size:0;clear:both;color:#666}.laypage_main *{display:inline-block;vertical-align:top;font-size:12px}.laypage_main a{text-decoration:none;color:#666}.laypage_main a,.laypage_main span{margin:0 3px 6px;padding:0 10px}.laypage_main input{width:40px;margin:0 5px;padding:0 5px}.laypage_main button{height:28px;line-height:28px;margin-left:5px;padding:0 10px;color:#666}.laypageskin_default span{height:28px;line-height:28px;color:#999}.laypageskin_default .laypage_curr{font-weight:700;color:#666}.laypageskin_molv a,.laypageskin_molv span{padding:0 12px;border-radius:2px}.laypageskin_molv a{background-color:#f1eff0}.laypageskin_molv .laypage_curr{background-color:#00AA91;color:#fff}.laypageskin_molv input{height:24px;line-height:24px}.laypageskin_molv button{height:26px;line-height:26px}.laypageskin_yahei{color:#333}.laypageskin_yahei a,.laypageskin_yahei span{padding:0 13px;border-radius:2px;color:#333}.laypageskin_yahei .laypage_curr{background-color:#333;color:#fff}.laypageskin_flow{text-align:center}.laypageskin_flow .page_nomore{color:#999}
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/fonts/caozha/iconfont.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "1873164",
3 | "name": "评论项目",
4 | "font_family": "caozha-iconfont",
5 | "css_prefix_text": "caozha-",
6 | "description": "",
7 | "glyphs": [
8 | {
9 | "icon_id": "1223264",
10 | "name": "good",
11 | "font_class": "good1",
12 | "unicode": "e699",
13 | "unicode_decimal": 59033
14 | },
15 | {
16 | "icon_id": "1228667",
17 | "name": "bad",
18 | "font_class": "bad1",
19 | "unicode": "e6c3",
20 | "unicode_decimal": 59075
21 | },
22 | {
23 | "icon_id": "1232437",
24 | "name": "赞",
25 | "font_class": "zan",
26 | "unicode": "e726",
27 | "unicode_decimal": 59174
28 | },
29 | {
30 | "icon_id": "7766753",
31 | "name": "icon_likegood",
32 | "font_class": "icon_likegood",
33 | "unicode": "eb97",
34 | "unicode_decimal": 60311
35 | },
36 | {
37 | "icon_id": "11372651",
38 | "name": "点赞",
39 | "font_class": "dianzan",
40 | "unicode": "e8ad",
41 | "unicode_decimal": 59565
42 | },
43 | {
44 | "icon_id": "11488053",
45 | "name": "good",
46 | "font_class": "good",
47 | "unicode": "e753",
48 | "unicode_decimal": 59219
49 | },
50 | {
51 | "icon_id": "11487986",
52 | "name": "bad",
53 | "font_class": "bad",
54 | "unicode": "e745",
55 | "unicode_decimal": 59205
56 | }
57 | ]
58 | }
59 |
--------------------------------------------------------------------------------
/Src/index.php:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
16 | 评论 - =get_cz_name()?> =get_cz_version()?>
17 |
18 |
19 |
20 |
21 |
22 |
29 |
30 |
" data-scrollload="=$cmt_config["is_scroll_load"]?>" data-scrollbottom="=$cmt_config["bottom_scroll_load"]?>" data-showhot="=$cmt_config["cmt_hot"]?>" data-hotpagesize="=$cmt_config["cmt_hot"]?>">
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # caozha-comment(原生PHP评论系统)
2 |
3 | caozha-comment,一个功能强大的评论系统,采用原生PHP编写,不依赖任何框架,特点:易上手,零门槛,界面清爽极简,极便于二次开发。
4 |
5 | 可以自动适配电脑、平板和手机等不同客户端。
6 |
7 | ### 演示地址
8 |
9 | [电脑版:http://gb.hyywx.com/app/156.html](http://gb.hyywx.com/app/156.html)
10 |
11 | [手机版:http://mgb.hyywx.com/app/156.html](http://mgb.hyywx.com/app/156.html)
12 |
13 |
14 | ### 其他版本
15 |
16 | 1、此为原生PHP编写的评论系统,如需要thinkphp版本的评论系统,请移步:[caozha-tp-comment](http://gitee.com/dengzhenhua/caozha-tp-comment)。
17 |
18 | 2、此源码不含后台,如需要后台,请参考:[caozha-admin](http://gitee.com/dengzhenhua/caozha-admin),内有评论的完整后台示例。
19 |
20 |
21 | ### 安装使用
22 |
23 | **快速安装**
24 |
25 | 1、PHP版本必须5.0及以上。(已在PHP5和PHP7上测试通过)
26 |
27 | 2、上传目录/Src/内所有源码到服务器。
28 |
29 | 3、将/Database/目录里的.sql文件导入到MYSQL数据库。
30 |
31 | 4、修改评论配置文件\Src\caozha-comment\php\config.php:
32 |
33 | (a)参数$mysql_config为配置您的数据库信息。
34 |
35 | (b)参数$cmt_config为评论系统基础配置参数,可以设置评论每页的数量、验证码、缓存、是否需要审核、是否允许发图片、滚动自动加载、屏蔽词等等。
36 |
37 | (c)参数$cmt_faces为表情包配置,可以把不需要的表情注释掉即可。
38 |
39 |
40 | **评论引入设置:**
41 |
42 | **参考示例文件:\Src\index.php**
43 |
44 | 打开此文件,参照,可以为每篇文章或者需要评论的模块添加唯一ID:
45 |
46 |
47 |
48 | 上面的data-cmtid是评论标识符ID,data-catid是评论标识符分类ID,这两个参数是用来区分文章等评论的,一般情况下使用data-cmtid就足够了。
49 |
50 |
51 | ### 更新方法
52 |
53 | **1.0.0升级到1.0.1的方法:**
54 |
55 | 1、执行下面MYSQL命令:
56 |
57 | ALTER TABLE `cz_comment` CHANGE `addtime` `addtime` DATETIME NULL DEFAULT NULL COMMENT '评论时间';
58 |
59 |
60 | 2、将1.0.1版/SRC/目录的源文件覆盖旧版本,注意修改数据库配置。
61 |
62 |
63 | ### 更新说明
64 |
65 | **版本1.0.1,主要更新:**
66 |
67 | 兼容了MySQL5.6及以下数据库,在MySQL5.5/5.6上测试,可以正常导入和使用。但为了获取更高的性能,依然建议您使用更高版本的MySQL数据库。
68 |
69 | **版本1.0.2,主要更新:**
70 |
71 | 更新一个css文件,修复当手机访问时不显示“提交”按钮的问题。
72 |
73 |
74 | ### 特别鸣谢
75 |
76 | caozha-comment使用了以下开源代码:lgyPl,特别致谢!
77 |
78 |
79 | ### 赞助支持:
80 |
81 | 支持本程序,请到Gitee和GitHub给我们点Star!
82 |
83 | Gitee:https://gitee.com/dengzhenhua/caozha-comment
84 |
85 | GitHub:https://github.com/dengcao/caozha-comment
86 |
87 | ### 关于
88 |
89 | 开发:[邓草博客 blog.5300.cn](http://blog.5300.cn)
90 |
91 | 赞助:[品络互联 www.pinluo.com](http://www.pinluo.com) [AI工具箱 5300.cn](http://5300.cn) [汉语言文学网 hyywx.com](http://hyywx.com) [雄马 xiongma.cn](http://xiongma.cn) [优惠券 tm.gs](http://tm.gs)
92 |
93 |
94 | ### 界面预览
95 |
96 |
97 | **评论界面(PC):**
98 |
99 | 
100 |
101 | 
102 |
103 |
104 |
105 |
106 | **评论界面(手机):**
107 |
108 | 
109 |
110 |
111 | 
112 |
113 |
114 | **评论可设置项**
115 |
116 | 
117 |
--------------------------------------------------------------------------------
/Src/caozha-comment/api.js:
--------------------------------------------------------------------------------
1 | try {
2 | extendRoot
3 | } catch (e) {
4 | var js = document.scripts;
5 | extendRoot = js[js.length - 1].src.substring(0, js[js.length - 1].src.lastIndexOf("/") + 1)
6 | }
7 |
8 | function includeFile(file, callback) {
9 | if (callback == 'css') {
10 | var fileref = document.createElement('link');
11 | fileref.setAttribute("rel", "stylesheet");
12 | fileref.setAttribute("type", "text/css");
13 | fileref.setAttribute("href", file)
14 | } else {
15 | var fileref = document.createElement('script');
16 | fileref.setAttribute('src', file);
17 | fileref.setAttribute('type', 'text/javascript');
18 | fileref.onload = fileref.onreadystatechange = function () {
19 | if (!this.readyState || this.readyState === 'loaded' || this.readyState === 'complete') {
20 | if (callback && typeof callback === "function") {
21 | callback()
22 | }
23 | fileref.onload = fileref.onreadystatechange = null
24 | }
25 | }
26 | }
27 | if (typeof fileref != "undefined") {
28 | document.getElementsByTagName("head")[0].appendChild(fileref)
29 | }
30 | }
31 |
32 | function withjQuery(callback) {
33 | if (!(window.jQuery)) {
34 | var js = document.createElement('script');
35 | js.setAttribute('src', extendRoot + '/assets/jquery.min.js');
36 | js.setAttribute('type', 'text/javascript');
37 | js.onload = js.onreadystatechange = function () {
38 | if (!this.readyState || this.readyState === 'loaded' || this.readyState === 'complete') {
39 | if (callback && typeof callback === "function") {
40 | callback()
41 | }
42 | js.onload = js.onreadystatechange = null
43 | }
44 | };
45 | document.getElementsByTagName('head')[0].appendChild(js)
46 | } else {
47 | if (callback && typeof callback === "function") {
48 | callback()
49 | }
50 | }
51 | }
52 |
53 | withjQuery(function () {
54 | $(function () {
55 | includeFile(extendRoot + 'assets/hd.js?v=1', function () {
56 | includeFile(extendRoot + 'assets/caozha.js?v=1', function () {
57 | includeFile(extendRoot + 'assets/style.css', 'css');
58 | var params = {
59 | scrollload: '',
60 | scroll: '',
61 | scrollbottom: '',
62 | pagination: '',
63 | pageline: '',
64 | pagefirst: '',
65 | pagelast: '',
66 | pageskip: '',
67 | pagesize: '',
68 | showhot: '',
69 | hotpagesize: '',
70 | catid: '',
71 | cmtid: '',
72 | };
73 | for (var i in params) {
74 | params[i] = $('.pl-520am').data(i)
75 | }
76 | try {
77 | caozha.init($.extend({}, caozhaConfig, params))
78 | } catch (e) {
79 | caozha.init(params)
80 | }
81 | })
82 | })
83 | })
84 | });
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/fonts/caozha/iconfont.css:
--------------------------------------------------------------------------------
1 | @font-face {font-family: "caozha-iconfont";
2 | src: url('iconfont.eot?t=1591691139200'); /* IE9 */
3 | src: url('iconfont.eot?t=1591691139200#iefix') format('embedded-opentype'), /* IE6-IE8 */
4 | url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAckAAsAAAAADWwAAAbWAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDdAqMSIl0ATYCJAMgCxIABCAFhUEHYxs9CyMRdnuQkpD9RYJt7OjRF4pxE6dSreAImKW+HD+1OZ09IeVe7yfc9N/lsCVB2gWpISsfKiKpb87MPGxeNoe60JkIMhHhmxO0zUMfUzQlbUaDYBI2VtbCQulrgICBs+AOwObG5pojFD7CPLudJ4t2pbTPeWDt9z/HUi8TsP61nVNVLzKB1s/bIxJ3PJCdLQAHNqCRD2WP8LraC6MawPsBAkBSC4Na/phEeHg9gmbvxOcQORx4IUxEZBYQ5wagD/hEaT1xA8Bm7evRLyYRAIGfgX+QaVy/sO9KPxdj7n9OQzAHXH4+ALjtCoABhAHgyV9JBgphoxAGIz91eYYBgEz4jhi8K313/r3hfd773h92fi7+/39PXzCgVL1AznUkYEIC/FL/eAV4Aw3YMTahHlVKEoDAu/MSQID3BgnA4H2eBAjB+94yCMKHnSABfPC5WDXnDCJsKwPgD4iMphuwaQGMP0NPJ2C48nQIGfm64AAkFLZpaV5eWn9doIqn8hFfYjhZ2AIE10pJLW3Kwcoiu4LeHelGyKxAVacSDtzwr3DwzyOHkJiaKcGX3Zmn3YGGH8xtllY5sgFwjjSGMcEmFxAPnj7G4twhAFXejLec9kPFOcT67YoQZ0pUDHJIrKXE5dQwIqu6NMkwVgZSvcJJJ+AYZG0ptCO9sc6VccqVj6WL7YcYsn9xlaHoUtyRqD5kkYG0WjkbRRFkofbDWZTiy/f9BtebBoBtRxyNqWa//tXG5oNym43pYy2l+ltsttIppK2x2dzU0J85Bg9MXqcYYXMRmVlb6EdZWoHgWmxVZFcMMrcpx4qLlYOLkdlOkofOadz96s8lMMWMqoSpCHP0ITjb5BIVdfBuAMcMKDmip5tO+WJ3f7c70ensw/WZ7Q50u/oVOqLAwbZcidMfuONP1DrzxJfdsf2rXSlN5LjGnf41fawdYbXIzTaqPhWOOLrJXpFKtFHGy+7I+/2rj8+32OQHz/r3oSzBraoB1haGxm63svz4mJ47aXShlWGC9qSdSWvRE+LBIyXrpR3KFEXTLcXKw+fV7QiEFpd3eAVpwumUlx4dh0liZGGRQhGyL+Ncht2AxQORmSH72koY63NiqixX9otU/SelMeqeL7AkzpO+RRCQ00UqCSDYPyBKgyOMvXPZvoGRCrrvk749H+ue8wYas9ZEjE5iWVlfTbQa/GhxVsysq17xCiHRvn2OdRLMXI4866ZH9g3MZY29IwCro3R/9iDUYlnngBzB1nRZnITX87k65sVJT670V1mOZypFP8n4TVdfGYtXlHljQqDIuxozi5XQfqCO1vSVsWxSxOg12QON+LkOEs/ekOWPOKq7kvHQfnEtXR+fc37pMNm8mqfyZ9TQ4qHUM/lTah45981WkSpEP58L1SPvUdzD5RvB1MlxdmFi3ugoBWF45+ehH0A/3lbt/clfumuXVlzdt4e/ZPdujb4NzF6mWC5YJ9QLOSSHTBXu0KNK4iV58R+tEMtov+cS4kzkc+uelEmTeDyJTnxaF7cncBB0E+6+GIr8OsRk2uPjR04duk+wLl80Zs5prq9InD513miRaU9NLPli3vC44drOopnbhhFdZqOCDK9smPpeNW0ryaYMZYlkNlmEmSHbBj/VmmbmCTNQVhaq9IwtmNLn+3/GPncNDBB3do1p1WyIlHset5tVoBjj+1v/mRt1psL0VJkh9habZP1C3kYqJ9oiIM/BfznSjx4dVFKljh8wvHdIj1We5i05fmuvdTvbgWVsrK3MIZwZi+i74pyYcdOCBvVQA2h/THsTtnJbFOSFpJxL+9LI67uXAwEAwP8X1oJZjfXbSon/WHvy9kx7O1eNQwEA8CZcDLmUZ+p+8GLE263DpWm/mtoCFzzmT1iJ8f/3FKRvBCIEiK08L5M8BHA0joN3ioLSQ6jG6i0pYodEhu22OQIAKcwCOBsj3p7laZLHbgqASMktIAjpAZMKRfKwKcBH6QQCUn2AFGr0xZT2NsFQtAOAELUMELXrQJD4CJja7wgeNTnwnaco0Ako7ANI/TLXpBj6f06FvEEFYoRIUq7F7s1BcppCbjnX90TTprwi+nt91herOqIcPNslyzfMscr/hLozftNo0BVlcA15GKYpQVFRjLKxw6YpLo6jqRNtSdnsIEcFcY0irABhlI5IJKd3bhyMxpFJqI1vhbV9QkYrvU2lijcE6PiFKrXouzXAY3PjI2+GPE2/bWhb6xi+RvBpIHWtkAy4pvOhFAsEFPReMSQ1bGGKXOHCwfF0XINdvilbJiuQHv8cFyRFMyzmxD+R8laCy/nlxPPzMOZ/aZQglduqiOc3/cqmW4bbZzMAAA==') format('woff2'),
5 | url('iconfont.woff?t=1591691139200') format('woff'),
6 | url('iconfont.ttf?t=1591691139200') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
7 | url('iconfont.svg?t=1591691139200#caozha-iconfont') format('svg'); /* iOS 4.1- */
8 | }
9 |
10 | .caozha-iconfont {
11 | font-family: "caozha-iconfont" !important;
12 | font-size: 16px;
13 | font-style: normal;
14 | -webkit-font-smoothing: antialiased;
15 | -moz-osx-font-smoothing: grayscale;
16 | }
17 |
18 | .caozha-good1:before {
19 | content: "\e699";
20 | }
21 |
22 | .caozha-bad1:before {
23 | content: "\e6c3";
24 | }
25 |
26 | .caozha-zan:before {
27 | content: "\e726";
28 | }
29 |
30 | .caozha-icon_likegood:before {
31 | content: "\eb97";
32 | }
33 |
34 | .caozha-dianzan:before {
35 | content: "\e8ad";
36 | }
37 |
38 | .caozha-good:before {
39 | content: "\e753";
40 | }
41 |
42 | .caozha-bad:before {
43 | content: "\e745";
44 | }
45 |
46 |
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/laypage/laypage.js:
--------------------------------------------------------------------------------
1 | /*! layPage-v1.3.0 分页组件 License MIT http://laypage.layui.com/ By 贤心 */
2 | ;!function(){"use strict";function a(d){var e="laypagecss";a.dir="dir"in a?a.dir:f.getpath+"/skin/laypage.css",new f(d),a.dir&&!b[c](e)&&f.use(a.dir,e)}a.v="1.3";var b=document,c="getElementById",d="getElementsByTagName",e=0,f=function(a){var b=this,c=b.config=a||{};c.item=e++,b.render(!0)};f.on=function(a,b,c){return a.attachEvent?a.attachEvent("on"+b,function(){c.call(a,window.even)}):a.addEventListener(b,c,!1),f},f.getpath=function(){var a=document.scripts,b=a[a.length-1].src;return b.substring(0,b.lastIndexOf("/")+1)}(),f.use=function(c,e){var f=b.createElement("link");f.type="text/css",f.rel="stylesheet",f.href=a.dir,e&&(f.id=e),b[d]("head")[0].appendChild(f),f=null},f.prototype.type=function(){var a=this.config;return"object"==typeof a.cont?void 0===a.cont.length?2:3:void 0},f.prototype.view=function(){var b=this,c=b.config,d=[],e={};if(c.pages=0|c.pages,c.curr=0|c.curr||1,c.groups="groups"in c?0|c.groups:5,c.first="first"in c?c.first:"首页",c.last="last"in c?c.last:"尾页",c.prev="prev"in c?c.prev:"上一页",c.next="next"in c?c.next:"下一页",c.pages<=1)return"";for(c.groups>c.pages&&(c.groups=c.pages),e.index=Math.ceil((c.curr+(c.groups>1&&c.groups!==c.pages?1:0))/(0===c.groups?1:c.groups)),c.curr>1&&c.prev&&d.push(''+c.prev+""),e.index>1&&c.first&&0!==c.groups&&d.push(''+c.first+"…"),e.poor=Math.floor((c.groups-1)/2),e.start=e.index>1?c.curr-e.poor:1,e.end=e.index>1?function(){var a=c.curr+(c.groups-e.poor-1);return a>c.pages?c.pages:a}():c.groups,e.end-e.start"+e.start+""):d.push(''+e.start+"");return c.pages>c.groups&&e.end…'+c.last+""),e.flow=!c.prev&&0===c.groups,(c.curr!==c.pages&&c.next||e.flow)&&d.push(function(){return e.flow&&c.curr===c.pages?''+c.next+"":''+c.next+""}()),''+d.join("")+function(){return c.skip?'':""}()+"
"},f.prototype.jump=function(a){if(a){for(var b=this,c=b.config,e=a.children,g=a[d]("button")[0],h=a[d]("input")[0],i=0,j=e.length;j>i;i++)"a"===e[i].nodeName.toLowerCase()&&f.on(e[i],"click",function(){var a=0|this.getAttribute("data-page");c.curr=a,b.render()});g&&f.on(g,"click",function(){var a=0|h.value.replace(/\s|\D/g,"");a&&a<=c.pages&&(c.curr=a,b.render())})}},f.prototype.render=function(a){var d=this,e=d.config,f=d.type(),g=d.view();2===f?e.cont.innerHTML=g:3===f?e.cont.html(g):b[c](e.cont).innerHTML=g,e.jump&&e.jump(e,a),d.jump(b[c]("laypage_"+e.item)),e.hash&&!a&&(location.hash="!"+e.hash+"="+e.curr)},"function"==typeof define?define(function(){return a}):"undefined"!=typeof exports?module.exports=a:window.laypage=a}();
--------------------------------------------------------------------------------
/Src/caozha-comment/php/config.php:
--------------------------------------------------------------------------------
1 | 0,//评论列表缓存时间,0为不启用缓存,缓存单位:秒,比如缓存1小时可设置:3600
14 | "cmt_pagesize" => 5,//每页显示评论数量
15 | "cmt_hot" => 3,//显示热门评论数量,为0时不显示热门评论
16 | "is_captcha" => true,//评论是否启用验证码
17 | "is_check" => false,//评论是否需要审核
18 | "is_face" => true,//评论是否启用聊天表情
19 | "is_img" => true,//评论是否允许发图片
20 | "is_br" => true,//评论内容是否转换换行符
21 | "is_like" => true,//评论是否可以点赞
22 | "is_bad" => true,//评论是否可以踩
23 | "is_reply" => true,//评论是否可以回复
24 | "is_scroll_load" => 1,//是否滚动加载评论,1为滚动加载,0为不滚动加载
25 | "bottom_scroll_load" => 50,//底部触发距离,默认是:50
26 | "bad_word" => "操|你妈|吃屎|你全家|fuck|艹|垃圾|傻逼",//要屏蔽的违规关键词,包含此词将不允许提交。多个词中间用|分隔
27 | "default_cmtname"=>"匿名游客",//设置默认用户名,当评论者为游客时启用
28 | );
29 |
30 |
31 | //MySQL配置
32 | $mysql_config=array(
33 | "username" => "root",//数据库用户名
34 | "password" => "root",//数据库密码
35 | "dbname" => "caozha_comment",//数据库名称
36 | "host" => "localhost",//主机
37 | "port" => 3306,//端口
38 | "prefix" => "cz_",//表前缀
39 | );
40 |
41 |
42 | //评论的表情包
43 | $cmt_faces = array(
44 | array("微笑", "wx.gif"),
45 | array("鄙视", "bs.gif"),
46 | array("闭嘴", "bz.gif"),
47 | array("吃惊", "cj.gif"),
48 | array("酷", "cool.gif"),
49 | array("呲牙", "cy.gif"),
50 | array("鼓掌", "gz.gif"),
51 | array("流汗", "han.gif"),
52 | array("哈欠", "hq.gif"),
53 | array("害羞", "hx.gif"),
54 | array("可爱", "ka.gif"),
55 | array("泪", "lei.gif"),
56 | array("难过", "ng.gif"),
57 | //array("高手", "q.gif"),
58 | array("示爱", "sa.gif"),
59 | array("衰", "shuai.gif"),
60 | array("憨笑", "hanx.gif"),
61 | array("吐血", "tux.gif"),
62 | array("偷笑", "tx.gif"),
63 | array("斜眼笑", "xyx.gif"),
64 | array("笑哭", "xk.gif"),
65 | array("色", "se.gif"),
66 | array("晕", "y.gif"),
67 | array("折磨", "zm.gif"),
68 | array("坏笑", "67.gif"),
69 | array("撇嘴", "2.gif"),
70 | array("睡", "8.gif"),
71 | array("尴尬", "10.gif"),
72 | array("发怒", "11.gif"),
73 | array("调皮", "12.gif"),
74 | array("吐", "18.gif"),
75 | array("白眼", "21.gif"),
76 | array("困", "24.gif"),
77 | array("惊恐", "25.gif"),
78 | array("大兵", "28.gif"),
79 | array("奋斗", "29.gif"),
80 | array("疑问", "30.gif"),
81 | array("嘘", "31.gif"),
82 | array("敲打", "35.gif"),
83 | array("再见", "36.gif"),
84 | array("猪头", "40.gif"),
85 | array("抱抱", "41.gif"),
86 | array("蛋糕", "42.gif"),
87 | //array("闪电", "43.gif"),
88 | array("炸弹", "44.gif"),
89 | //array("刀", "45.gif"),
90 | array("便便", "47.gif"),
91 | array("咖啡", "48.gif"),
92 | array("饭", "49.gif"),
93 | array("玫瑰", "50.gif"),
94 | array("凋谢", "51.gif"),
95 | array("爱心", "52.gif"),
96 | array("心碎", "53.gif"),
97 | //array("太阳", "55.gif"),
98 | //array("月亮", "56.gif"),
99 | array("强", "57.gif"),
100 | array("弱", "58.gif"),
101 | array("握手", "59.gif"),
102 | array("抠鼻", "64.gif"),
103 | array("委屈", "72.gif"),
104 | array("阴险", "74.gif"),
105 | array("亲亲", "75.gif"),
106 | array("可怜", "77.gif"),
107 | array("菜刀", "78.gif"),
108 | array("啤酒", "79.gif"),
109 | array("抱拳", "84.gif"),
110 | array("勾引", "85.gif"),
111 | //array("OK", "90.gif"),
112 | array("蜡烛", "102.gif"),
113 | array("鞭炮", "126.gif"),
114 | array("红包", "105.gif"),
115 | array("福", "125.gif"),
116 | );
117 |
118 |
119 | $caozha_static = get_cz_path()."caozha-comment/"; //评论安装目录,一般无需修改
--------------------------------------------------------------------------------
/Src/caozha-comment/php/captcha.php:
--------------------------------------------------------------------------------
1 | =0 ) {
46 | imagesetpixel ($distortion_im, (int)($i+10+sin($j/$im_y*2*M_PI-M_PI*0.1)*4) , $j , $rgb);
47 | }
48 | }
49 | }
50 | //加入干扰象素;
51 | $count = 1800;//干扰像素的数量
52 | for($i=0; $i<$count; $i++){
53 | $randcolor = ImageColorallocate($distortion_im,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255));
54 | imagesetpixel($distortion_im, mt_rand()%$im_x , mt_rand()%$im_y , $randcolor);
55 | }
56 |
57 | $rand = mt_rand(5,30);
58 | $rand1 = mt_rand(15,25);
59 | $rand2 = mt_rand(5,10);
60 | for ($yy=$rand; $yy<=+$rand+2; $yy++){
61 | for ($px=-80;$px<=80;$px=$px+0.1)
62 | {
63 | $x=$px/$rand1;
64 | if ($x!=0)
65 | {
66 | $y=sin($x);
67 | }
68 | $py=$y*$rand2;
69 |
70 | imagesetpixel($distortion_im, $px+80, $py+$yy, $text_c);
71 | }
72 | }
73 |
74 | //设置文件头;
75 | Header("Content-type: image/JPEG");
76 |
77 | //以PNG格式将图像输出到浏览器或文件;
78 | ImagePNG($distortion_im);
79 |
80 | //销毁一图像,释放与image关联的内存;
81 | ImageDestroy($distortion_im);
82 | ImageDestroy($im);
83 | }
84 |
85 | function make_rand($length="32"){//验证码文字生成函数
86 | $str="0123456789";
87 | $result="";
88 | for($i=0;$i<$length;$i++){
89 | $num[$i]=rand(0,8);
90 | $result.=$str[$num[$i]];
91 | }
92 | return $result;
93 | }
94 |
95 |
96 |
97 | // 获得任意位数的随机码
98 | function get_randnum($len=4,$ext_num_type=4) {
99 |
100 | $an1 = 'abcdefghijkmnpqrstwxy';
101 |
102 | $an2 = 'ABCDEFGHJKLMNPQRSWXY';
103 |
104 | $an3 = '234567';
105 | $randnum="";
106 |
107 | if ($ext_num_type == '') {
108 | $str = $an1.$an2.$an3;
109 | }elseif ($ext_num_type == 1){
110 | $str = $an1;
111 | }elseif ($ext_num_type == 2){
112 | $str = $an2;
113 | }elseif ($ext_num_type == 3){
114 | $str = $an3;
115 | }elseif ($ext_num_type == 4){
116 | $str = $an2.$an3;
117 | }elseif ($ext_num_type == 5){
118 | $str = $an1.$an3;
119 | }elseif ($ext_num_type == 6){
120 | $str = $an1.$an2;
121 | }
122 |
123 | for ($i = 0; $i < $len; $i++) {
124 |
125 | $start = rand(1,strlen($str) - 1);
126 |
127 | $randnum .= substr($str,$start,1);
128 |
129 | }
130 | return($randnum);
131 | }
132 |
133 |
134 | //输出调用
135 | $checkcode = get_randnum(4);//make_rand(4);
136 | $checkcode_md5=md5("caozha_".strtolower($checkcode)."po-E$*5p98&$#o2");
137 | header('P3P: CP=CAO PSA OUR');
138 | $_SESSION["user_captcha"]=$checkcode_md5;
139 | getAuthImage($checkcode);
--------------------------------------------------------------------------------
/Database/caozha_comment.sql:
--------------------------------------------------------------------------------
1 | -- phpMyAdmin SQL Dump
2 | -- version 4.8.5
3 | -- https://www.phpmyadmin.net/
4 | --
5 | -- 主机: localhost
6 | -- 生成日期: 2020-07-08 14:06:23
7 | -- 服务器版本: 5.7.26
8 | -- PHP 版本: 7.3.4
9 |
10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
11 | SET AUTOCOMMIT = 0;
12 | START TRANSACTION;
13 | SET time_zone = "+00:00";
14 |
15 |
16 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
17 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
18 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
19 | /*!40101 SET NAMES utf8mb4 */;
20 |
21 | --
22 | -- 数据库: `caozha_comment`
23 | --
24 |
25 | -- --------------------------------------------------------
26 |
27 | --
28 | -- 表的结构 `cz_comment`
29 | --
30 |
31 | CREATE TABLE `cz_comment` (
32 | `id` int(11) NOT NULL,
33 | `cmtname` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '评论者昵称',
34 | `userid` int(11) DEFAULT '0' COMMENT '用户ID,0为游客',
35 | `userpic` int(4) DEFAULT NULL COMMENT '游客用户的头像',
36 | `cmtip` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '评论IP',
37 | `addtime` datetime DEFAULT NULL COMMENT '评论时间',
38 | `cmtid` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '评论ID,标识符,用于关联',
39 | `catid` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '评论分类ID,标识符,用于关联',
40 | `parentid` int(11) DEFAULT '0' COMMENT '父ID',
41 | `arrparentid` text COLLATE utf8mb4_unicode_ci COMMENT '所有父ID,多个中间按顺序用逗号,分隔',
42 | `cmtcontent` text COLLATE utf8mb4_unicode_ci COMMENT '评论内容',
43 | `like_num` int(11) DEFAULT '0' COMMENT '点赞次数',
44 | `bad_num` int(11) DEFAULT '0' COMMENT '被踩次数',
45 | `ischeck` tinyint(1) DEFAULT '0' COMMENT '是否审核通过,1=通过',
46 | `ishot` tinyint(1) DEFAULT '0' COMMENT '是否热门评论,1=热门'
47 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
48 |
49 | --
50 | -- 转存表中的数据 `cz_comment`
51 | --
52 |
53 | INSERT INTO `cz_comment` (`id`, `cmtname`, `userid`, `userpic`, `cmtip`, `addtime`, `cmtid`, `catid`, `parentid`, `arrparentid`, `cmtcontent`, `like_num`, `bad_num`, `ischeck`, `ishot`) VALUES
54 | (1, '草札', 0, 24, '127.0.0.1', '2020-06-05 19:01:20', 'act_1', '0', 0, NULL, '这篇文章不错啊,很精彩!', 43, 8, 1, 1),
55 | (2, '张峰', 0, 15, '127.0.0.1', '2020-06-05 19:01:20', 'act_1', '0', 0, NULL, '使用有什么诀窍吗?', 2, 0, 1, 1),
56 | (3, '小林', 0, 16, '127.0.0.1', '2020-06-05 19:17:26', 'act_1', '0', 1, '1', '对啊,我也觉得还是不错的![/呲牙]', 0, 1, 1, 0),
57 | (4, '李露', 0, 22, '127.0.0.1', '2020-06-05 19:17:26', 'act_1', '0', 3, '1,3', '你懂个什么啊![/憨笑]', 1, 0, 1, 0),
58 | (5, '大黄', 0, 33, '127.0.0.1', '2020-06-09 02:29:54', 'act_1', '0', 0, '', '[/哈欠]有点困了', 2, 0, 1, 0),
59 | (6, '测试', 0, 31, '127.0.0.1', '2020-06-09 02:31:13', 'act_1', '0', 5, '5', '[/斜眼笑]那可以去睡了', 0, 1, 1, 0),
60 | (7, '阿达', 0, 17, '127.0.0.1', '2020-06-09 02:49:56', 'act_1', '0', 0, '', '[/酷]大家好', 2, 1, 1, 0),
61 | (8, '', 0, 25, '127.0.0.1', '2020-06-09 11:33:57', 'act_1', '0', 6, '5,6', '睡得比狗晚,起得比鸡早[/偷笑]', 0, 1, 1, 0),
62 | (9, '', 0, 10, '127.0.0.1', '2020-06-09 16:53:33', 'act_1', '0', 0, '', '[/斜眼笑]', 0, 1, 1, 0),
63 | (10, '', 0, 3, '127.0.0.1', '2020-06-09 17:10:58', 'act_1', '0', 0, '', '你好啊[/酷]', 1, 0, 1, 0),
64 | (11, '', 0, 41, '127.0.0.1', '2020-06-09 17:14:22', 'act_1', '0', 0, '', '[img]https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1332800745,3820435792&fm=11&gp=0.jpg[/img]测试提交图片', 0, 1, 1, 0),
65 | (12, '', 0, 28, '127.0.0.1', '2020-06-09 18:25:13', 'act_1', '0', 0, '', '[/呲牙]测试提交脚本。百度网链接\ndocument.write(\\\'\\\');\n', 1, 0, 1, 0),
66 | (13, '大宝', 0, 39, '127.0.0.1', '2020-06-10 17:11:09', 'act_1', '0', 0, '', '[/哈欠]下午好!', 1, 0, 1, 0),
67 | (14, '', 0, 14, '127.0.0.1', '2020-06-10 23:42:20', 'act_1', '0', 0, '', '测试换行。\r\n大家晚上好啊!\r\n[/调皮]', 1, 0, 1, 0),
68 | (16, '菲尔丁', 0, 37, '127.0.0.1', '2020-06-11 12:01:07', 'act_1', '0', 0, '', '如果你把金钱当成上帝,它便会像魔鬼一样折磨你。', 1, 0, 1, 0),
69 | (17, '', 0, 1, '127.0.0.1', '2020-06-11 14:33:22', 'act_1', '0', 0, '', '每个人心里都有一团火,路过的人只能看到烟。但是我觉得总会有一个人看到这团火,然后走过来,陪我一起。', 1, 0, 1, 0);
70 |
71 | --
72 | -- 转储表的索引
73 | --
74 |
75 | --
76 | -- 表的索引 `cz_comment`
77 | --
78 | ALTER TABLE `cz_comment`
79 | ADD PRIMARY KEY (`id`);
80 |
81 | --
82 | -- 在导出的表使用AUTO_INCREMENT
83 | --
84 |
85 | --
86 | -- 使用表AUTO_INCREMENT `cz_comment`
87 | --
88 | ALTER TABLE `cz_comment`
89 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;
90 | COMMIT;
91 |
92 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
93 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
94 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
95 |
--------------------------------------------------------------------------------
/Src/caozha-comment/php/common.php:
--------------------------------------------------------------------------------
1 | $v) {
39 | $arr[$k] = filter_sql($v);
40 | }
41 | } else {
42 | $arr = filter_sql($arr);
43 | }
44 | return $arr;
45 | }
46 |
47 | /**
48 | * 模拟mysql_result函数
49 | * @return string
50 | */
51 | function mysqli_result($res, $row, $field=0) {
52 | $res->data_seek($row);
53 | $datarow = $res->fetch_array();
54 | return $datarow[$field];
55 | }
56 |
57 | /**
58 | * 检测验证码是否正确
59 | * @return string
60 | */
61 | function captcha_check($captcha){
62 | if($captcha && $_SESSION["user_captcha"]){
63 | if(md5("caozha_".strtolower($captcha)."po-E$*5p98&$#o2")==$_SESSION["user_captcha"]){
64 | return true;
65 | }else{
66 | return false;
67 | }
68 | }else{
69 | return false;
70 | }
71 | }
72 |
73 | /**
74 | * 输出JSON
75 | * @return string
76 | */
77 | function json($value){
78 | header('Content-Type:application/json; charset=utf-8');
79 | if(is_array($value) || is_object($value)){
80 | echo json_encode($value);
81 | }else{
82 | echo $value;
83 | }
84 | exit();
85 | }
86 |
87 | /**
88 | * 获取客户端IP
89 | * @return string
90 | */
91 | function getip() { //获取客户端IP
92 | if ( isset($_SERVER[ "HTTP_CDN_SRC_IP" ]) ) { //获取网宿CDN真实客户IP
93 | return replace_ip( $_SERVER[ "HTTP_CDN_SRC_IP" ] );
94 | }
95 | if ( isset($_SERVER[ "HTTP_X_FORWARDED_FOR" ]) ) { //获取网宿、阿里云真实客户IP,参考:https://help.aliyun.com/knowledge_detail/40535.html
96 | return replace_ip( $_SERVER[ "HTTP_X_FORWARDED_FOR" ] );
97 | }
98 | if ( isset($_SERVER[ "HTTP_CLIENT_IP" ]) ) {
99 | return $_SERVER[ "HTTP_CLIENT_IP" ];
100 | }
101 | if ( isset($_SERVER[ "HTTP_X_FORWARDED" ]) ) {
102 | return $_SERVER[ "HTTP_X_FORWARDED" ];
103 | }
104 | if ( isset($_SERVER[ "HTTP_FORWARDED_FOR" ]) ) {
105 | return $_SERVER[ "HTTP_FORWARDED_FOR" ];
106 | }
107 | if ( isset($_SERVER[ "HTTP_FORWARDED" ]) ) {
108 | return $_SERVER[ "HTTP_FORWARDED" ];
109 | }
110 | $httpip = $_SERVER[ 'REMOTE_ADDR' ];
111 | if ( !preg_match( "/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/", $httpip ) ) {
112 | $httpip = "127.0.0.1";
113 | }
114 | return $httpip;
115 | }
116 |
117 | /**
118 | * 拆分代理IP
119 | * @return string
120 | */
121 | function replace_ip($ip)
122 | {
123 |
124 | if (!$ip) {
125 | return "";
126 | }
127 |
128 | $httpip_array = explode(",", $ip);
129 |
130 | if ($httpip_array[0]) {
131 |
132 | return $httpip_array[0];
133 |
134 | } else {
135 |
136 | return $ip;
137 |
138 | }
139 |
140 | }
141 |
142 | /**
143 | * 系统基础配置
144 | */
145 | $GLOBALS["caozha_common_config"] = array(
146 | "name" => "caozha-comment",
147 | "version" => "1.0.0"
148 | );
149 |
150 | /**
151 | * 获取网站的安装目录,格式如:/public/或/
152 | * @return string
153 | */
154 | function get_cz_path(){
155 | return substr($_SERVER['PHP_SELF'],0,strrpos($_SERVER['PHP_SELF'], '/')+1);
156 | }
157 |
158 | /**
159 | * 获取草札后台框架的名字
160 | * @return string
161 | */
162 | function get_cz_name(){
163 | global $caozha_common_config;
164 | return $caozha_common_config["name"];
165 | }
166 |
167 | /**
168 | * 获取草札后台框架的版本号
169 | * @return string
170 | */
171 | function get_cz_version(){
172 | global $caozha_common_config;
173 | return $caozha_common_config["version"];
174 | }
--------------------------------------------------------------------------------
/Src/caozha-comment/php/template.php:
--------------------------------------------------------------------------------
1 |
14 |
44 |
66 |
67 |
69 |
70 |
71 |
72 |
73 |
87 |
88 |
89 | cmt_faces as $vo){
91 | echo '
!['.$vo[0].']('.$this->cmt_url.'face/'.$vo[1].')
';
92 | }
93 | ?>
94 |
95 |
99 |
100 |
101 |
102 |
103 | 请先说点什么
104 |
105 |
109 |
110 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/Src/caozha-comment/php/cache.php:
--------------------------------------------------------------------------------
1 | cache_dir = $cache_dir;
26 | if (!is_dir($cache_dir)) {
27 | $make_dir_result = mkdir($cache_dir, 0755, true);
28 | if ($make_dir_result === false) throw new Exception('Cannot create the cache directory');
29 | }
30 | }
31 |
32 |
33 | /**
34 | * 根据key获取值,会判断是否过期
35 | * @param $key
36 | * @return mixed
37 | */
38 | public function get($key)
39 | {
40 | $cache_data = $this->getItem($key);
41 | if ($cache_data === false || !is_array($cache_data)) return false;
42 |
43 | return $cache_data['data'];
44 | }
45 |
46 | /**
47 | * 添加或覆盖一个key
48 | * @param $key
49 | * @param $value
50 | * @param $expire
51 | * @return mixed
52 | */
53 | public function set($key, $value, $expire = 0)
54 | {
55 | return $this->setItem($key, $value, time(), $expire);
56 | }
57 |
58 | /**
59 | * 设置包含元数据的信息
60 | * @param $key
61 | * @param $value
62 | * @param $time
63 | * @param $expire
64 | * @return bool
65 | */
66 | private function setItem($key, $value, $time, $expire)
67 | {
68 | $cache_file = $this->createCacheFile($key);
69 | if ($cache_file === false) return false;
70 |
71 | $cache_data = array('data' => $value, 'time' => $time, 'expire' => $expire);
72 | $cache_data = json_encode($cache_data);
73 |
74 | $put_result = file_put_contents($cache_file, $cache_data);
75 | if ($put_result === false) return false;
76 |
77 | return true;
78 | }
79 |
80 | /**
81 | * 创建缓存文件
82 | * @param $key
83 | * @return bool|string
84 | */
85 | private function createCacheFile($key)
86 | {
87 | $cache_file = $this->path($key);
88 | if (!file_exists($cache_file)) {
89 | $directory = dirname($cache_file);
90 | if (!is_dir($directory)) {
91 | $make_dir_result = mkdir($directory, 0755, true);
92 | if ($make_dir_result === false) return false;
93 | }
94 | $create_result = touch($cache_file);
95 | if ($create_result === false) return false;
96 | }
97 |
98 | return $cache_file;
99 | }
100 |
101 | /**
102 | * 判断Key是否存在
103 | * @param $key
104 | * @return mixed
105 | */
106 | public function has($key)
107 | {
108 | $value = $this->get($key);
109 | if ($value === false) return false;
110 |
111 | return true;
112 | }
113 |
114 | /**
115 | * 加法递增
116 | * @param $key
117 | * @param int $value
118 | * @return mixed
119 | */
120 | public function increment($key, $value = 1)
121 | {
122 | $item = $this->getItem($key);
123 | if ($item === false) {
124 | $set_result = $this->set($key, $value);
125 | if ($set_result === false) return false;
126 | return $value;
127 | }
128 |
129 | $check_expire = $this->checkExpire($item);
130 | if ($check_expire === false) return false;
131 |
132 | $item['data'] += $value;
133 |
134 | $result = $this->setItem($key, $item['data'], $item['time'], $item['expire']);
135 | if ($result === false) return false;
136 |
137 | return $item['data'];
138 | }
139 |
140 | /**
141 | * 减法递增
142 | * @param $key
143 | * @param int $value
144 | * @return mixed
145 | */
146 | public function decrement($key, $value = 1)
147 | {
148 | $item = $this->getItem($key);
149 | if ($item === false) {
150 | $value = 0 - $value;
151 | $set_result = $this->set($key, $value);
152 | if ($set_result === false) return false;
153 | return $value;
154 | }
155 |
156 | $check_expire = $this->checkExpire($item);
157 | if ($check_expire === false) return false;
158 |
159 | $item['data'] -= $value;
160 |
161 | $result = $this->setItem($key, $item['data'], $item['time'], $item['expire']);
162 | if ($result === false) return false;
163 |
164 | return $item['data'];
165 | }
166 |
167 | /**
168 | * 删除一个key,同时会删除缓存文件
169 | * @param $key
170 | * @return mixed
171 | */
172 | public function delete($key)
173 | {
174 | $cache_file = $this->path($key);
175 | if (file_exists($cache_file)) {
176 | $unlink_result = unlink($cache_file);
177 | if ($unlink_result === false) return false;
178 | }
179 |
180 | return true;
181 | }
182 |
183 | /**
184 | * 清除所有缓存
185 | * @return mixed
186 | */
187 | public function flush()
188 | {
189 | return $this->delTree($this->cache_dir);
190 | }
191 |
192 | /**
193 | * 递归删除目录
194 | * @param $dir
195 | * @return bool
196 | */
197 | function delTree($dir)
198 | {
199 | $files = array_diff(scandir($dir), array('.', '..'));
200 | foreach ($files as $file) {
201 | (is_dir("$dir/$file")) ? $this->delTree("$dir/$file") : unlink("$dir/$file");
202 | }
203 | return rmdir($dir);
204 | }
205 |
206 | /**
207 | * 根据key获取缓存文件路径
208 | *
209 | * @param string $key
210 | * @return string
211 | */
212 | protected function path($key)
213 | {
214 | $parts = array_slice(str_split($hash = md5($key), 2), 0, 2);
215 | return $this->cache_dir . '/' . implode('/', $parts) . '/' . $hash;
216 | }
217 |
218 | /**
219 | * 获取含有元数据的信息
220 | * @param $key
221 | * @return bool|mixed|string
222 | */
223 | protected function getItem($key)
224 | {
225 | $cache_file = $this->path($key);
226 | if (!file_exists($cache_file) || !is_readable($cache_file)) {
227 | return false;
228 | }
229 |
230 | $cache_data = file_get_contents($cache_file);
231 | if (empty($cache_data)) return false;
232 | $cache_data = json_decode($cache_data, true);
233 | if ($cache_data) {
234 | $check_expire = $this->checkExpire($cache_data);
235 | if ($check_expire === false) {
236 | $this->delete($key);
237 | return false;
238 | }
239 | }
240 |
241 | return $cache_data;
242 | }
243 |
244 | /**
245 | * 检查key是否过期
246 | * @param $cache_data
247 | * @return bool
248 | */
249 | protected function checkExpire($cache_data)
250 | {
251 | $time = time();
252 | $is_expire = intval($cache_data['expire']) !== 0 && (intval($cache_data['time']) + intval($cache_data['expire']) < $time);
253 | if ($is_expire) return false;
254 |
255 | return true;
256 | }
257 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | 木兰宽松许可证, 第2版
2 |
3 | 木兰宽松许可证, 第2版
4 | 2020年1月 http://license.coscl.org.cn/MulanPSL2
5 |
6 |
7 | 您对“软件”的复制、使用、修改及分发受木兰宽松许可证,第2版(“本许可证”)的如下条款的约束:
8 |
9 | 0. 定义
10 |
11 | “软件”是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。
12 |
13 | “贡献”是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。
14 |
15 | “贡献者”是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。
16 |
17 | “法人实体”是指提交贡献的机构及其“关联实体”。
18 |
19 | “关联实体”是指,对“本许可证”下的行为方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。
20 |
21 | 1. 授予版权许可
22 |
23 | 每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。
24 |
25 | 2. 授予专利许可
26 |
27 | 每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“关联实体”直接或间接地,就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。
28 |
29 | 3. 无商标许可
30 |
31 | “本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。
32 |
33 | 4. 分发限制
34 |
35 | 您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。
36 |
37 | 5. 免责声明与责任限制
38 |
39 | “软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。
40 |
41 | 6. 语言
42 | “本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。
43 |
44 | 条款结束
45 |
46 | 如何将木兰宽松许可证,第2版,应用到您的软件
47 |
48 | 如果您希望将木兰宽松许可证,第2版,应用到您的新软件,为了方便接收者查阅,建议您完成如下三步:
49 |
50 | 1, 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字;
51 |
52 | 2, 请您在软件包的一级目录下创建以“LICENSE”为名的文件,将整个许可证文本放入该文件中;
53 |
54 | 3, 请将如下声明文本放入每个源文件的头部注释中。
55 |
56 | Copyright (c) [Year] [name of copyright holder]
57 | [Software Name] is licensed under Mulan PSL v2.
58 | You can use this software according to the terms and conditions of the Mulan PSL v2.
59 | You may obtain a copy of Mulan PSL v2 at:
60 | http://license.coscl.org.cn/MulanPSL2
61 | THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
62 | See the Mulan PSL v2 for more details.
63 |
64 |
65 | Mulan Permissive Software License,Version 2
66 |
67 | Mulan Permissive Software License,Version 2 (Mulan PSL v2)
68 | January 2020 http://license.coscl.org.cn/MulanPSL2
69 |
70 | Your reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v2 (this License) with the following terms and conditions:
71 |
72 | 0. Definition
73 |
74 | Software means the program and related documents which are licensed under this License and comprise all Contribution(s).
75 |
76 | Contribution means the copyrightable work licensed by a particular Contributor under this License.
77 |
78 | Contributor means the Individual or Legal Entity who licenses its copyrightable work under this License.
79 |
80 | Legal Entity means the entity making a Contribution and all its Affiliates.
81 |
82 | Affiliates means entities that control, are controlled by, or are under common control with the acting entity under this License, ‘control’ means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity.
83 |
84 | 1. Grant of Copyright License
85 |
86 | Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not.
87 |
88 | 2. Grant of Patent License
89 |
90 | Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed. The patent license shall not apply to any modification of the Contribution, and any other combination which includes the Contribution. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken.
91 |
92 | 3. No Trademark License
93 |
94 | No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in Section 4.
95 |
96 | 4. Distribution Restriction
97 |
98 | You may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software.
99 |
100 | 5. Disclaimer of Warranty and Limitation of Liability
101 |
102 | THE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO MATTER HOW IT’S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
103 |
104 | 6. Language
105 |
106 | THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL.
107 |
108 | END OF THE TERMS AND CONDITIONS
109 |
110 | How to Apply the Mulan Permissive Software License,Version 2 (Mulan PSL v2) to Your Software
111 |
112 | To apply the Mulan PSL v2 to your work, for easy identification by recipients, you are suggested to complete following three steps:
113 |
114 | i Fill in the blanks in following statement, including insert your software name, the year of the first publication of your software, and your name identified as the copyright owner;
115 |
116 | ii Create a file named “LICENSE” which contains the whole context of this License in the first directory of your software package;
117 |
118 | iii Attach the statement to the appropriate annotated syntax at the beginning of each source file.
119 |
120 |
121 | Copyright (c) [Year] [name of copyright holder]
122 | [Software Name] is licensed under Mulan PSL v2.
123 | You can use this software according to the terms and conditions of the Mulan PSL v2.
124 | You may obtain a copy of Mulan PSL v2 at:
125 | http://license.coscl.org.cn/MulanPSL2
126 | THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
127 | See the Mulan PSL v2 for more details.
128 |
--------------------------------------------------------------------------------
/Src/LICENSE:
--------------------------------------------------------------------------------
1 | 木兰宽松许可证, 第2版
2 |
3 | 木兰宽松许可证, 第2版
4 | 2020年1月 http://license.coscl.org.cn/MulanPSL2
5 |
6 |
7 | 您对“软件”的复制、使用、修改及分发受木兰宽松许可证,第2版(“本许可证”)的如下条款的约束:
8 |
9 | 0. 定义
10 |
11 | “软件”是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。
12 |
13 | “贡献”是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。
14 |
15 | “贡献者”是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。
16 |
17 | “法人实体”是指提交贡献的机构及其“关联实体”。
18 |
19 | “关联实体”是指,对“本许可证”下的行为方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。
20 |
21 | 1. 授予版权许可
22 |
23 | 每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。
24 |
25 | 2. 授予专利许可
26 |
27 | 每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“关联实体”直接或间接地,就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。
28 |
29 | 3. 无商标许可
30 |
31 | “本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。
32 |
33 | 4. 分发限制
34 |
35 | 您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。
36 |
37 | 5. 免责声明与责任限制
38 |
39 | “软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。
40 |
41 | 6. 语言
42 | “本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。
43 |
44 | 条款结束
45 |
46 | 如何将木兰宽松许可证,第2版,应用到您的软件
47 |
48 | 如果您希望将木兰宽松许可证,第2版,应用到您的新软件,为了方便接收者查阅,建议您完成如下三步:
49 |
50 | 1, 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字;
51 |
52 | 2, 请您在软件包的一级目录下创建以“LICENSE”为名的文件,将整个许可证文本放入该文件中;
53 |
54 | 3, 请将如下声明文本放入每个源文件的头部注释中。
55 |
56 | Copyright (c) [Year] [name of copyright holder]
57 | [Software Name] is licensed under Mulan PSL v2.
58 | You can use this software according to the terms and conditions of the Mulan PSL v2.
59 | You may obtain a copy of Mulan PSL v2 at:
60 | http://license.coscl.org.cn/MulanPSL2
61 | THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
62 | See the Mulan PSL v2 for more details.
63 |
64 |
65 | Mulan Permissive Software License,Version 2
66 |
67 | Mulan Permissive Software License,Version 2 (Mulan PSL v2)
68 | January 2020 http://license.coscl.org.cn/MulanPSL2
69 |
70 | Your reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v2 (this License) with the following terms and conditions:
71 |
72 | 0. Definition
73 |
74 | Software means the program and related documents which are licensed under this License and comprise all Contribution(s).
75 |
76 | Contribution means the copyrightable work licensed by a particular Contributor under this License.
77 |
78 | Contributor means the Individual or Legal Entity who licenses its copyrightable work under this License.
79 |
80 | Legal Entity means the entity making a Contribution and all its Affiliates.
81 |
82 | Affiliates means entities that control, are controlled by, or are under common control with the acting entity under this License, ‘control’ means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity.
83 |
84 | 1. Grant of Copyright License
85 |
86 | Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not.
87 |
88 | 2. Grant of Patent License
89 |
90 | Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed. The patent license shall not apply to any modification of the Contribution, and any other combination which includes the Contribution. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken.
91 |
92 | 3. No Trademark License
93 |
94 | No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in Section 4.
95 |
96 | 4. Distribution Restriction
97 |
98 | You may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software.
99 |
100 | 5. Disclaimer of Warranty and Limitation of Liability
101 |
102 | THE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO MATTER HOW IT’S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
103 |
104 | 6. Language
105 |
106 | THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL.
107 |
108 | END OF THE TERMS AND CONDITIONS
109 |
110 | How to Apply the Mulan Permissive Software License,Version 2 (Mulan PSL v2) to Your Software
111 |
112 | To apply the Mulan PSL v2 to your work, for easy identification by recipients, you are suggested to complete following three steps:
113 |
114 | i Fill in the blanks in following statement, including insert your software name, the year of the first publication of your software, and your name identified as the copyright owner;
115 |
116 | ii Create a file named “LICENSE” which contains the whole context of this License in the first directory of your software package;
117 |
118 | iii Attach the statement to the appropriate annotated syntax at the beginning of each source file.
119 |
120 |
121 | Copyright (c) [Year] [name of copyright holder]
122 | [Software Name] is licensed under Mulan PSL v2.
123 | You can use this software according to the terms and conditions of the Mulan PSL v2.
124 | You may obtain a copy of Mulan PSL v2 at:
125 | http://license.coscl.org.cn/MulanPSL2
126 | THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
127 | See the Mulan PSL v2 for more details.
128 |
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/style-bak.css:
--------------------------------------------------------------------------------
1 | @import url("fonts/caozha/iconfont.css");
2 | @font-face { font-family: 'iconfont'; src: url('fonts/iconfont.eot'); src: url('fonts/iconfont.eot?#iefix') format('embedded-opentype'), url('fonts/iconfont.woff') format('woff'), url('fonts/iconfont.woff') format('woff'), url('font/siconfont.ttf') format('truetype'), url('fonts/iconfont.svg#iconfont') format('svg');}
3 | .iconfont { font-family: "iconfont"!important; font-size: 16px; font-style: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale }
4 | .icon-tupian:before { content: "\e610" }
5 | .icon-zanzan-copy:before { content: "\e618" }
6 | .icon-liuyan1:before { content: "\e61c" }
7 | .icon-gerengongzuoshi:before { content: "\e613" }
8 | .icon-biaoqing:before { content: "\e60a" }
9 | .pl-520am { font-size: 14px; color: #333 }
10 | .pl-520am i, .pl-520am em { font-style: normal }
11 | .pl-520am img { width: auto; margin: 0 auto }
12 | .pl-520am a { color: #999; text-decoration: none; font-size: 12px; font-weight: 500 }
13 | .pl-clr { clear: both }
14 | .pl-fr {}
15 | .pl-header { font-size: 14px; margin: 30px 0 }
16 | .pl-header em { color: #f90; font-family: Arial; margin-right: 2px }
17 | .pl-userinfo {
18 | display: none;
19 | }
20 | .pl-area { padding: 0 0 0 60px; margin-top: 15px }
21 | #pl-userpic { width: 42px }
22 | .pl-area-userpic { margin-left: -60px; float: left }
23 | .pl-area-userpic img { width: 42px; height: 42px; border-radius: 100% }
24 | .pl-area-post { float: right; width: 100%; }
25 | .pl-post { border-radius: 4px; background: #f7f7f7; padding: 10px; box-shadow: inset 2px 2px 6px rgba(0,0,0,.08) }
26 | .pl-textarea { position: relative; overflow: hidden; padding: 8px 18px }
27 | .pl-post-word { border: none; background: none; outline: none; width: 100%; display: block; height: 80px; line-height: 22px; font-size: 14px; background-attachment: scroll; resize: none; padding: 0 }
28 | textarea.pl-post-word::-webkit-input-placeholder {
29 | color:#666!important
30 | }
31 | textarea.pl-post-word:-moz-placeholder {
32 | color:#666!important
33 | }
34 | textarea.pl-post-word::-moz-placeholder {
35 | color:#666!important
36 | }
37 | textarea.pl-post-word:-ms-textarea-placeholder {
38 | color:#666!important
39 | }
40 | .pl-icon { background-image: url('./icon.png'); background-repeat: no-repeat; display: inline-block }
41 | .pl-tools { overflow: hidden }
42 | .pl-tools ul, .pl-tools ul li { list-style: none; padding: 0; margin: 0 }
43 | .pl-tools ul li { float: left; padding: 0 0 0 16px; cursor: pointer; margin: 8px 0 0 0 }
44 | .icon-face { font-size: 20px; color: #f7d262 }
45 | .icon-face:hover { color: #f3c445 }
46 | .icon-img { font-size: 18px; color: #7bcfdc; margin: 1px 0 0 8px }
47 | .icon-img:hover { color: #71BAC6 }
48 | .pl-tools ul li.pl-tools-lastchild { border: 0; float: right; position: relative; height: 40px!important; min-width: 100px; margin: 0!important }
49 | .pl-tools-lastchild button {border: 0;background: #1487f4;background: linear-gradient(to right, #1487f4 0, rgb(9, 118, 220) 100%);height: 100%;width: 100%;outline: none;color: #fff;border-radius: 20px;font-size: 14px;font-weight: normal;cursor: pointer;padding: 0;}
50 | .pl-tools-lastchild button:hover, .pl-tools-lastchild button[disabled] { opacity: 0.8 }
51 | .pl-tools ul li.username { height: 19px; width: 140px; float: right; background: #e8e8e8; border-radius: 20px; padding: 10px 16px 11px; margin: 0; box-shadow: inset 2px 2px 6px rgba(0,0,0,.08); cursor: default }
52 | .pl-tools ul li.username i { float: left; color: #bbb; font-size: 18px; margin: 0 8px 0 0; line-height: 1.2 }
53 | .pl-tools ul li.username input { color: #999; float: left; background: none; font-size: 13px; width: 80%; height: 20px; line-height: 20px; padding: 0; margin: 0; border: none; outline: none; }
54 | .pl-showinfo { padding: 8px; text-align: center; background-color: rgb(254,242,225); color: rgb(238,84,42); margin-top: 10px; display: none }
55 | .pl-show-list { position: relative }
56 | .pl-show-list-loading { top: 0; left: 0; background: rgba(0,0,0,.1) url(loading.gif) no-repeat center; position: absolute; height: 100%; width: 100% }
57 | .pl-show-hot-list { display: none }
58 | .pl-title { margin-top: 20px; background-color: transparent; border-bottom: 2px solid rgb(136,171,195); padding-bottom: 10px; font-size: 16px }
59 | .buttonGray { outline: none; display: block; border-radius: 3px; color: #555; font-size: 14px; height: 42px; line-height: 42px; margin: 20px 0px; text-align: center; width: 100%; display: none; background: #eee }
60 | .ecomment { margin: 0; padding: 0; word-wrap: break-word }
61 | .ecomment { margin-bottom: 12px; overflow: hidden; background: #fdfdfd; padding: 12px 16px; border-radius: 3px; border: 1px solid #eee; box-shadow: 1px 1px 4px #ddd; box-shadow: 1px 1px 5px #f7f7f7 }
62 | .ecomment .ecomment:nth-child(odd) { background: #fff }
63 | .ecommentauthor { float: left; color: #999; display: block; width: 100%; margin: 0 0 8px 0; font-size: 12px }
64 | .ecommentauthor i { float: right; font-style: normal }
65 | .ecommenttext { clear: left; margin: 0; padding: 0 }
66 | .pl-show-box { margin: 30px 0; clear: both; border-bottom: 1px solid #f1f1f1; padding-bottom: 20px }
67 | .pl-show-title { margin-bottom: 10px }
68 | .pl-show-title span { color: #444; font-size: 14px; font-weight: 700 }
69 | .pl-show-title span.pl-show-time { color: #aaa; font-size: 12px; font-weight: 500 }
70 | .pl-show-saytext { line-height: 26px; font-size: 14px; word-wrap: break-word; color: #555 }
71 | .pl-show-saytext img { width: 24px; margin: 0 2px -6px 2px; display: inline-block; border: none }
72 | .pl-show-saytext img.pic { display: block; max-width: 300px; width: auto; margin: 12px 0 0 0 }
73 | .pl-show-tools {text-align: right;font-size: 12px;line-height: 12px;}
74 | .pl-show-tools i { margin: 0 4px 0 0 }
75 | .pl-show-tools a { position: relative!important }
76 | .icon-good { font-size: 15px }
77 | .icon-bad { width: 18px; height: 20px; background-position: -97px -18px }
78 | .icon-good:hover { background-position: -122px 6px }
79 | .icon-bad:hover { background-position: -122px -18px }
80 | .pl-reply { margin-left: 12px }
81 | .pl-post-reply { margin-top: 5px }
82 | .ShowPlKey { position: relative; top: -4px; line-height: normal }
83 | .ShowPlKey input { outline: none; float: left; border: 1px solid #ddd; height: 24px; padding: 0; margin: -1px 0 0; border-radius: 2px; text-indent: 6px; font-size: 12px; vertical-align: middle }
84 | .ShowPlKey img { height: 24px; width: 62px; float: left; margin: 0 0 0 4px; border-radius: 2px; vertical-align: middle }
85 | .pl-post { position: relative }
86 | .pl-face-box, .pl-img-box { position: absolute; max-width: 282px; height: auto; background: #fff; left: 0px; display: none; z-index: 3; border-top: 1px solid #eee; border-left: 1px solid #eee; box-shadow: 2px 3px 10px rgba(0,0,0,0.2); border-radius: 3px }
87 | .pl-face-box li {display: inline-block;padding: 11px;float: left;border-right: 1px solid #eee;border-bottom: 1px solid #eee;}
88 | .pl-face-box li img { width: 24px; height: 24px }
89 | .pl-img-box { left: 40px; z-index: 2 }
90 | .pl-img-box-before, .pl-face-box-before { display: none }
91 | .pl-img-file { padding: 12px }
92 | .pl-img-file input { outline: none; border: 1px solid #ccc; padding: 5px; width: 150px }
93 | .pl-img-file button { border: none; border-radius: 0; border: 1px solid #ccc; background: none; padding: 5px 15px; outline: none; cursor: pointer }
94 | #pl-pagination { text-align: center; margin-top: 30px }
95 | .pl-null { padding: 10px 0 }
96 | .pl-loading { display: inline-block; position: relative; height: 15px; width: 15px; background: url(loading.gif) no-repeat center; background-size: 100%; top: 2px; margin-right: 5px }
97 | /*i.iconfont.icon-good {*/
98 | /* display: none;*/
99 | /*}*/
100 | .pl-show-tools .caozha-bad1{margin-left: 12px;}
101 | /*.pl-show-tools span {*/
102 | /* display: none;*/
103 | /*}*/
104 | /*i.iconfont.icon-img {*/
105 | /* display: none;*/
106 | /*}*/
107 | @media (max-width:600px) {
108 | .pl-show-box { background: #F6F6F6; border: none; padding: 12px; margin: 0 0 12px }
109 | .pinglun { margin: 0 10px }
110 | .pl-area-userpic { margin: 0 }
111 | .pl-area-post { border: #eee 1px solid; width: auto; float: none; border-radius: 3px; }
112 | .pl-show-title { margin: 0 0 10px 56px }
113 | .pl-show-title span { display: block; margin: 4px 0 }
114 | .ecomment { padding: 12px }
115 | .pl-tools ul li { padding: 0 0 0 10px }
116 | .pl-tools ul li:nth-child(2) { display: none }
117 | .pl-tools ul li.username { width: 116px; padding: 8px 16px }
118 | .pl-tools ul li.username input { width: 70% }
119 | .icon-face { color: #999 }
120 | .pl-tools ul li.pl-tools-lastchild { height: 35px!important; min-width: 80px }
121 | .pl-post { box-shadow: 0 0 6px rgba(0,0,0,.06); border-radius: 0; background: #fdfdfd }
122 | .pl-textarea { padding: 4px 2px }
123 | .pl-header { font-size: 12px; margin: 14px 0; text-align: center }
124 | .buttonGray { margin: 0 auto; background: #999; color: #fff; width: 95% }
125 | }
126 | @media (max-width:320px) {
127 | .pl-tools ul li { margin: 4px 0 0 0 }
128 | .pl-tools ul li.username i { font-size: 14px }
129 | }
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/style.css:
--------------------------------------------------------------------------------
1 | @import url("fonts/caozha/iconfont.css");
2 | @font-face { font-family: 'iconfont'; src: url('fonts/iconfont.eot'); src: url('fonts/iconfont.eot?#iefix') format('embedded-opentype'), url('fonts/iconfont.woff') format('woff'), url('fonts/iconfont.woff') format('woff'), url('font/siconfont.ttf') format('truetype'), url('fonts/iconfont.svg#iconfont') format('svg');}
3 | .iconfont { font-family: "iconfont"!important; font-size: 16px; font-style: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale }
4 | .icon-tupian:before { content: "\e610" }
5 | .icon-zanzan-copy:before { content: "\e618" }
6 | .icon-liuyan1:before { content: "\e61c" }
7 | .icon-gerengongzuoshi:before { content: "\e613" }
8 | .icon-biaoqing:before { content: "\e60a" }
9 | .pl-520am { font-size: 14px; color: #333 }
10 | .pl-520am i, .pl-520am em { font-style: normal }
11 | .pl-520am img { width: auto; margin: 0 auto }
12 | .pl-520am a { color: #999; text-decoration: none; font-size: 12px; font-weight: 500 }
13 | .pl-clr { clear: both }
14 | .pl-fr {}
15 | .pl-header { font-size: 14px; margin: 30px 0 }
16 | .pl-header em { color: #f90; font-family: Arial; margin-right: 2px }
17 | .pl-userinfo {
18 | display: none;
19 | }
20 | .pl-area { padding: 0 0 0 60px; margin-top: 15px }
21 | #pl-userpic { width: 42px }
22 | .pl-area-userpic { margin-left: -60px; float: left }
23 | .pl-area-userpic img { width: 42px; height: 42px; border-radius: 100% }
24 | .pl-area-post { float: right; width: 100%; }
25 | .pl-post { border-radius: 4px; background: #f7f7f7; padding: 10px; box-shadow: inset 2px 2px 6px rgba(0,0,0,.08) }
26 | .pl-textarea { position: relative; overflow: hidden; padding: 8px 18px }
27 | .pl-post-word { border: none; background: none; outline: none; width: 100%; display: block; height: 80px; line-height: 22px; font-size: 14px; background-attachment: scroll; resize: none; padding: 0 }
28 | textarea.pl-post-word::-webkit-input-placeholder {
29 | color:#666!important
30 | }
31 | textarea.pl-post-word:-moz-placeholder {
32 | color:#666!important
33 | }
34 | textarea.pl-post-word::-moz-placeholder {
35 | color:#666!important
36 | }
37 | textarea.pl-post-word:-ms-textarea-placeholder {
38 | color:#666!important
39 | }
40 | .pl-icon { background-image: url('./icon.png'); background-repeat: no-repeat; display: inline-block }
41 | .pl-tools { overflow: hidden }
42 | .pl-tools ul, .pl-tools ul li { list-style: none; padding: 0; margin: 0 }
43 | .pl-tools ul li { float: left; padding: 0 0 0 16px; cursor: pointer; margin: 8px 0 0 0 }
44 | .icon-face { font-size: 20px; color: #f7d262 }
45 | .icon-face:hover { color: #f3c445 }
46 | .icon-img { font-size: 18px; color: #7bcfdc; margin: 1px 0 0 8px }
47 | .icon-img:hover { color: #71BAC6 }
48 | .pl-tools ul li.pl-tools-lastchild { border: 0; float: right; position: relative; height: 40px!important; min-width: 100px; margin: 0!important }
49 | .pl-tools-lastchild button {border: 0;background: #1487f4;background: linear-gradient(to right, #1487f4 0, rgb(9, 118, 220) 100%);height: 100%;width: 100%;outline: none;color: #fff;border-radius: 20px;font-size: 14px;font-weight: normal;cursor: pointer;padding: 0;}
50 | .pl-tools-lastchild button:hover, .pl-tools-lastchild button[disabled] { opacity: 0.8 }
51 | .pl-tools ul li.username { height: 19px; width: 140px; float: right; background: #e8e8e8; border-radius: 20px; padding: 10px 16px 11px; margin: 0; box-shadow: inset 2px 2px 6px rgba(0,0,0,.08); cursor: default }
52 | .pl-tools ul li.username i { float: left; color: #bbb; font-size: 18px; margin: 0 8px 0 0; line-height: 1.2 }
53 | .pl-tools ul li.username input { color: #999; float: left; background: none; font-size: 13px; width: 80%; height: 20px; line-height: 20px; padding: 0; margin: 0; border: none; outline: none; }
54 | .pl-showinfo { padding: 8px; text-align: center; background-color: rgb(254,242,225); color: rgb(238,84,42); margin-top: 10px; display: none }
55 | .pl-show-list { position: relative }
56 | .pl-show-list-loading { top: 0; left: 0; background: rgba(0,0,0,.1) url(loading.gif) no-repeat center; position: absolute; height: 100%; width: 100% }
57 | .pl-show-hot-list { display: none }
58 | .pl-title { margin-top: 20px; background-color: transparent; border-bottom: 2px solid rgb(136,171,195); padding-bottom: 10px; font-size: 16px }
59 | .buttonGray { outline: none; display: block; border-radius: 3px; color: #555; font-size: 14px; height: 42px; line-height: 42px; margin: 20px 0px; text-align: center; width: 100%; display: none; background: #eee }
60 | .ecomment { margin: 0; padding: 0; word-wrap: break-word }
61 | .ecomment { margin-bottom: 12px; overflow: hidden; background: #fdfdfd; padding: 12px 16px; border-radius: 3px; border: 1px solid #eee; box-shadow: 1px 1px 4px #ddd; box-shadow: 1px 1px 5px #f7f7f7 }
62 | .ecomment .ecomment:nth-child(odd) { background: #fff }
63 | .ecommentauthor { float: left; color: #999; display: block; width: 100%; margin: 0 0 8px 0; font-size: 12px }
64 | .ecommentauthor i { float: right; font-style: normal }
65 | .ecommenttext { clear: left; margin: 0; padding: 0 }
66 | .pl-show-box { margin: 30px 0; clear: both; border-bottom: 1px solid #f1f1f1; padding-bottom: 20px }
67 | .pl-show-title { margin-bottom: 10px }
68 | .pl-show-title span { color: #444; font-size: 14px; font-weight: 700 }
69 | .pl-show-title span.pl-show-time { color: #aaa; font-size: 12px; font-weight: 500 }
70 | .pl-show-saytext { line-height: 26px; font-size: 14px; word-wrap: break-word; color: #555 }
71 | .pl-show-saytext img { width: 24px; margin: 0 2px -6px 2px; display: inline-block; border: none }
72 | .pl-show-saytext img.pic { display: block; max-width: 300px; width: auto; margin: 12px 0 0 0 }
73 | .pl-show-tools {text-align: right;font-size: 12px;line-height: 12px;}
74 | .pl-show-tools i { margin: 0 4px 0 0 }
75 | .pl-show-tools a { position: relative!important }
76 | .icon-good { font-size: 15px }
77 | .icon-bad { width: 18px; height: 20px; background-position: -97px -18px }
78 | .icon-good:hover { background-position: -122px 6px }
79 | .icon-bad:hover { background-position: -122px -18px }
80 | .pl-reply { margin-left: 12px }
81 | .pl-post-reply { margin-top: 5px }
82 | .ShowPlKey { position: relative; top: -4px; line-height: normal }
83 | .ShowPlKey input { outline: none; float: left; border: 1px solid #ddd; height: 24px; padding: 0; margin: -1px 0 0; border-radius: 2px; text-indent: 6px; font-size: 12px; vertical-align: middle }
84 | .ShowPlKey img { height: 24px; width: 62px; float: left; margin: 0 0 0 4px; border-radius: 2px; vertical-align: middle }
85 | .pl-post { position: relative }
86 | .pl-face-box, .pl-img-box { position: absolute; max-width: 282px; height: auto; background: #fff; left: 0px; display: none; z-index: 3; border-top: 1px solid #eee; border-left: 1px solid #eee; box-shadow: 2px 3px 10px rgba(0,0,0,0.2); border-radius: 3px }
87 | .pl-face-box li {display: inline-block;padding: 11px;float: left;border-right: 1px solid #eee;border-bottom: 1px solid #eee;}
88 | .pl-face-box li img { width: 24px; height: 24px }
89 | .pl-img-box { left: 40px; z-index: 2 }
90 | .pl-img-box-before, .pl-face-box-before { display: none }
91 | .pl-img-file { padding: 12px }
92 | .pl-img-file input { outline: none; border: 1px solid #ccc; padding: 5px; width: 150px }
93 | .pl-img-file button { border: none; border-radius: 0; border: 1px solid #ccc; background: none; padding: 5px 15px; outline: none; cursor: pointer }
94 | #pl-pagination { text-align: center; margin-top: 30px }
95 | .pl-null { padding: 10px 0 }
96 | .pl-loading { display: inline-block; position: relative; height: 15px; width: 15px; background: url(loading.gif) no-repeat center; background-size: 100%; top: 2px; margin-right: 5px }
97 | /*i.iconfont.icon-good {*/
98 | /* display: none;*/
99 | /*}*/
100 | .pl-show-tools .caozha-bad1{margin-left: 12px;}
101 | /*.pl-show-tools span {*/
102 | /* display: none;*/
103 | /*}*/
104 | /*i.iconfont.icon-img {*/
105 | /* display: none;*/
106 | /*}*/
107 | @media (max-width:600px) {
108 | .pl-show-box { background: #F6F6F6; border: none; padding: 12px; margin: 0 0 12px }
109 | .pinglun { margin: 0 10px }
110 | .pl-area-userpic { margin: 0 }
111 | .pl-area-post { border: #eee 1px solid; width: auto; float: none; border-radius: 3px; }
112 | .pl-show-title { margin: 0 0 10px 56px }
113 | .pl-show-title span { display: block; margin: 4px 0 }
114 | .ecomment { padding: 12px }
115 | .pl-tools ul li { padding: 0 0 0 10px }
116 | .pl-tools ul li:nth-child(2) { /*display: none*/ }
117 | .pl-tools ul li.username { width: 116px; padding: 8px 16px }
118 | .pl-tools ul li.username input { width: 70% }
119 | .icon-face { color: #999 }
120 | .pl-tools ul li.pl-tools-lastchild { height: 35px!important; min-width: 80px }
121 | .pl-post { box-shadow: 0 0 6px rgba(0,0,0,.06); border-radius: 0; background: #fdfdfd }
122 | .pl-textarea { padding: 4px 2px }
123 | .pl-header { font-size: 12px; margin: 14px 0; text-align: center }
124 | .buttonGray { margin: 0 auto; background: #999; color: #fff; width: 95% }
125 | }
126 | @media (max-width:320px) {
127 | .pl-tools ul li { margin: 4px 0 0 0 }
128 | .pl-tools ul li.username i { font-size: 14px }
129 | }
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/fonts/iconfont.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
49 |
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/fonts/caozha/demo.css:
--------------------------------------------------------------------------------
1 | /* Logo 字体 */
2 | @font-face {
3 | font-family: "iconfont logo";
4 | src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
5 | src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
6 | url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
7 | url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
8 | url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
9 | }
10 |
11 | .logo {
12 | font-family: "iconfont logo";
13 | font-size: 160px;
14 | font-style: normal;
15 | -webkit-font-smoothing: antialiased;
16 | -moz-osx-font-smoothing: grayscale;
17 | }
18 |
19 | /* tabs */
20 | .nav-tabs {
21 | position: relative;
22 | }
23 |
24 | .nav-tabs .nav-more {
25 | position: absolute;
26 | right: 0;
27 | bottom: 0;
28 | height: 42px;
29 | line-height: 42px;
30 | color: #666;
31 | }
32 |
33 | #tabs {
34 | border-bottom: 1px solid #eee;
35 | }
36 |
37 | #tabs li {
38 | cursor: pointer;
39 | width: 100px;
40 | height: 40px;
41 | line-height: 40px;
42 | text-align: center;
43 | font-size: 16px;
44 | border-bottom: 2px solid transparent;
45 | position: relative;
46 | z-index: 1;
47 | margin-bottom: -1px;
48 | color: #666;
49 | }
50 |
51 |
52 | #tabs .active {
53 | border-bottom-color: #f00;
54 | color: #222;
55 | }
56 |
57 | .tab-container .content {
58 | display: none;
59 | }
60 |
61 | /* 页面布局 */
62 | .main {
63 | padding: 30px 100px;
64 | width: 960px;
65 | margin: 0 auto;
66 | }
67 |
68 | .main .logo {
69 | color: #333;
70 | text-align: left;
71 | margin-bottom: 30px;
72 | line-height: 1;
73 | height: 110px;
74 | margin-top: -50px;
75 | overflow: hidden;
76 | *zoom: 1;
77 | }
78 |
79 | .main .logo a {
80 | font-size: 160px;
81 | color: #333;
82 | }
83 |
84 | .helps {
85 | margin-top: 40px;
86 | }
87 |
88 | .helps pre {
89 | padding: 20px;
90 | margin: 10px 0;
91 | border: solid 1px #e7e1cd;
92 | background-color: #fffdef;
93 | overflow: auto;
94 | }
95 |
96 | .icon_lists {
97 | width: 100% !important;
98 | overflow: hidden;
99 | *zoom: 1;
100 | }
101 |
102 | .icon_lists li {
103 | width: 100px;
104 | margin-bottom: 10px;
105 | margin-right: 20px;
106 | text-align: center;
107 | list-style: none !important;
108 | cursor: default;
109 | }
110 |
111 | .icon_lists li .code-name {
112 | line-height: 1.2;
113 | }
114 |
115 | .icon_lists .icon {
116 | display: block;
117 | height: 100px;
118 | line-height: 100px;
119 | font-size: 42px;
120 | margin: 10px auto;
121 | color: #333;
122 | -webkit-transition: font-size 0.25s linear, width 0.25s linear;
123 | -moz-transition: font-size 0.25s linear, width 0.25s linear;
124 | transition: font-size 0.25s linear, width 0.25s linear;
125 | }
126 |
127 | .icon_lists .icon:hover {
128 | font-size: 100px;
129 | }
130 |
131 | .icon_lists .svg-icon {
132 | /* 通过设置 font-size 来改变图标大小 */
133 | width: 1em;
134 | /* 图标和文字相邻时,垂直对齐 */
135 | vertical-align: -0.15em;
136 | /* 通过设置 color 来改变 SVG 的颜色/fill */
137 | fill: currentColor;
138 | /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
139 | normalize.css 中也包含这行 */
140 | overflow: hidden;
141 | }
142 |
143 | .icon_lists li .name,
144 | .icon_lists li .code-name {
145 | color: #666;
146 | }
147 |
148 | /* markdown 样式 */
149 | .markdown {
150 | color: #666;
151 | font-size: 14px;
152 | line-height: 1.8;
153 | }
154 |
155 | .highlight {
156 | line-height: 1.5;
157 | }
158 |
159 | .markdown img {
160 | vertical-align: middle;
161 | max-width: 100%;
162 | }
163 |
164 | .markdown h1 {
165 | color: #404040;
166 | font-weight: 500;
167 | line-height: 40px;
168 | margin-bottom: 24px;
169 | }
170 |
171 | .markdown h2,
172 | .markdown h3,
173 | .markdown h4,
174 | .markdown h5,
175 | .markdown h6 {
176 | color: #404040;
177 | margin: 1.6em 0 0.6em 0;
178 | font-weight: 500;
179 | clear: both;
180 | }
181 |
182 | .markdown h1 {
183 | font-size: 28px;
184 | }
185 |
186 | .markdown h2 {
187 | font-size: 22px;
188 | }
189 |
190 | .markdown h3 {
191 | font-size: 16px;
192 | }
193 |
194 | .markdown h4 {
195 | font-size: 14px;
196 | }
197 |
198 | .markdown h5 {
199 | font-size: 12px;
200 | }
201 |
202 | .markdown h6 {
203 | font-size: 12px;
204 | }
205 |
206 | .markdown hr {
207 | height: 1px;
208 | border: 0;
209 | background: #e9e9e9;
210 | margin: 16px 0;
211 | clear: both;
212 | }
213 |
214 | .markdown p {
215 | margin: 1em 0;
216 | }
217 |
218 | .markdown>p,
219 | .markdown>blockquote,
220 | .markdown>.highlight,
221 | .markdown>ol,
222 | .markdown>ul {
223 | width: 80%;
224 | }
225 |
226 | .markdown ul>li {
227 | list-style: circle;
228 | }
229 |
230 | .markdown>ul li,
231 | .markdown blockquote ul>li {
232 | margin-left: 20px;
233 | padding-left: 4px;
234 | }
235 |
236 | .markdown>ul li p,
237 | .markdown>ol li p {
238 | margin: 0.6em 0;
239 | }
240 |
241 | .markdown ol>li {
242 | list-style: decimal;
243 | }
244 |
245 | .markdown>ol li,
246 | .markdown blockquote ol>li {
247 | margin-left: 20px;
248 | padding-left: 4px;
249 | }
250 |
251 | .markdown code {
252 | margin: 0 3px;
253 | padding: 0 5px;
254 | background: #eee;
255 | border-radius: 3px;
256 | }
257 |
258 | .markdown strong,
259 | .markdown b {
260 | font-weight: 600;
261 | }
262 |
263 | .markdown>table {
264 | border-collapse: collapse;
265 | border-spacing: 0px;
266 | empty-cells: show;
267 | border: 1px solid #e9e9e9;
268 | width: 95%;
269 | margin-bottom: 24px;
270 | }
271 |
272 | .markdown>table th {
273 | white-space: nowrap;
274 | color: #333;
275 | font-weight: 600;
276 | }
277 |
278 | .markdown>table th,
279 | .markdown>table td {
280 | border: 1px solid #e9e9e9;
281 | padding: 8px 16px;
282 | text-align: left;
283 | }
284 |
285 | .markdown>table th {
286 | background: #F7F7F7;
287 | }
288 |
289 | .markdown blockquote {
290 | font-size: 90%;
291 | color: #999;
292 | border-left: 4px solid #e9e9e9;
293 | padding-left: 0.8em;
294 | margin: 1em 0;
295 | }
296 |
297 | .markdown blockquote p {
298 | margin: 0;
299 | }
300 |
301 | .markdown .anchor {
302 | opacity: 0;
303 | transition: opacity 0.3s ease;
304 | margin-left: 8px;
305 | }
306 |
307 | .markdown .waiting {
308 | color: #ccc;
309 | }
310 |
311 | .markdown h1:hover .anchor,
312 | .markdown h2:hover .anchor,
313 | .markdown h3:hover .anchor,
314 | .markdown h4:hover .anchor,
315 | .markdown h5:hover .anchor,
316 | .markdown h6:hover .anchor {
317 | opacity: 1;
318 | display: inline-block;
319 | }
320 |
321 | .markdown>br,
322 | .markdown>p>br {
323 | clear: both;
324 | }
325 |
326 |
327 | .hljs {
328 | display: block;
329 | background: white;
330 | padding: 0.5em;
331 | color: #333333;
332 | overflow-x: auto;
333 | }
334 |
335 | .hljs-comment,
336 | .hljs-meta {
337 | color: #969896;
338 | }
339 |
340 | .hljs-string,
341 | .hljs-variable,
342 | .hljs-template-variable,
343 | .hljs-strong,
344 | .hljs-emphasis,
345 | .hljs-quote {
346 | color: #df5000;
347 | }
348 |
349 | .hljs-keyword,
350 | .hljs-selector-tag,
351 | .hljs-type {
352 | color: #a71d5d;
353 | }
354 |
355 | .hljs-literal,
356 | .hljs-symbol,
357 | .hljs-bullet,
358 | .hljs-attribute {
359 | color: #0086b3;
360 | }
361 |
362 | .hljs-section,
363 | .hljs-name {
364 | color: #63a35c;
365 | }
366 |
367 | .hljs-tag {
368 | color: #333333;
369 | }
370 |
371 | .hljs-title,
372 | .hljs-attr,
373 | .hljs-selector-id,
374 | .hljs-selector-class,
375 | .hljs-selector-attr,
376 | .hljs-selector-pseudo {
377 | color: #795da3;
378 | }
379 |
380 | .hljs-addition {
381 | color: #55a532;
382 | background-color: #eaffea;
383 | }
384 |
385 | .hljs-deletion {
386 | color: #bd2c00;
387 | background-color: #ffecec;
388 | }
389 |
390 | .hljs-link {
391 | text-decoration: underline;
392 | }
393 |
394 | /* 代码高亮 */
395 | /* PrismJS 1.15.0
396 | https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
397 | /**
398 | * prism.js default theme for JavaScript, CSS and HTML
399 | * Based on dabblet (http://dabblet.com)
400 | * @author Lea Verou
401 | */
402 | code[class*="language-"],
403 | pre[class*="language-"] {
404 | color: black;
405 | background: none;
406 | text-shadow: 0 1px white;
407 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
408 | text-align: left;
409 | white-space: pre;
410 | word-spacing: normal;
411 | word-break: normal;
412 | word-wrap: normal;
413 | line-height: 1.5;
414 |
415 | -moz-tab-size: 4;
416 | -o-tab-size: 4;
417 | tab-size: 4;
418 |
419 | -webkit-hyphens: none;
420 | -moz-hyphens: none;
421 | -ms-hyphens: none;
422 | hyphens: none;
423 | }
424 |
425 | pre[class*="language-"]::-moz-selection,
426 | pre[class*="language-"] ::-moz-selection,
427 | code[class*="language-"]::-moz-selection,
428 | code[class*="language-"] ::-moz-selection {
429 | text-shadow: none;
430 | background: #b3d4fc;
431 | }
432 |
433 | pre[class*="language-"]::selection,
434 | pre[class*="language-"] ::selection,
435 | code[class*="language-"]::selection,
436 | code[class*="language-"] ::selection {
437 | text-shadow: none;
438 | background: #b3d4fc;
439 | }
440 |
441 | @media print {
442 |
443 | code[class*="language-"],
444 | pre[class*="language-"] {
445 | text-shadow: none;
446 | }
447 | }
448 |
449 | /* Code blocks */
450 | pre[class*="language-"] {
451 | padding: 1em;
452 | margin: .5em 0;
453 | overflow: auto;
454 | }
455 |
456 | :not(pre)>code[class*="language-"],
457 | pre[class*="language-"] {
458 | background: #f5f2f0;
459 | }
460 |
461 | /* Inline code */
462 | :not(pre)>code[class*="language-"] {
463 | padding: .1em;
464 | border-radius: .3em;
465 | white-space: normal;
466 | }
467 |
468 | .token.comment,
469 | .token.prolog,
470 | .token.doctype,
471 | .token.cdata {
472 | color: slategray;
473 | }
474 |
475 | .token.punctuation {
476 | color: #999;
477 | }
478 |
479 | .namespace {
480 | opacity: .7;
481 | }
482 |
483 | .token.property,
484 | .token.tag,
485 | .token.boolean,
486 | .token.number,
487 | .token.constant,
488 | .token.symbol,
489 | .token.deleted {
490 | color: #905;
491 | }
492 |
493 | .token.selector,
494 | .token.attr-name,
495 | .token.string,
496 | .token.char,
497 | .token.builtin,
498 | .token.inserted {
499 | color: #690;
500 | }
501 |
502 | .token.operator,
503 | .token.entity,
504 | .token.url,
505 | .language-css .token.string,
506 | .style .token.string {
507 | color: #9a6e3a;
508 | background: hsla(0, 0%, 100%, .5);
509 | }
510 |
511 | .token.atrule,
512 | .token.attr-value,
513 | .token.keyword {
514 | color: #07a;
515 | }
516 |
517 | .token.function,
518 | .token.class-name {
519 | color: #DD4A68;
520 | }
521 |
522 | .token.regex,
523 | .token.important,
524 | .token.variable {
525 | color: #e90;
526 | }
527 |
528 | .token.important,
529 | .token.bold {
530 | font-weight: bold;
531 | }
532 |
533 | .token.italic {
534 | font-style: italic;
535 | }
536 |
537 | .token.entity {
538 | cursor: help;
539 | }
540 |
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/fonts/caozha/demo_index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IconFont Demo
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | - Unicode
22 | - Font class
23 | - Symbol
24 |
25 |
26 |
查看项目
27 |
28 |
29 |
30 |
31 |
32 |
33 | -
34 |
35 |
good
36 | 
37 |
38 |
39 | -
40 |
41 |
bad
42 | 
43 |
44 |
45 | -
46 |
47 |
赞
48 | 
49 |
50 |
51 | -
52 |
53 |
icon_likegood
54 | 
55 |
56 |
57 | -
58 |
59 |
点赞
60 | 
61 |
62 |
63 | -
64 |
65 |
good
66 | 
67 |
68 |
69 | -
70 |
71 |
bad
72 | 
73 |
74 |
75 |
76 |
77 |
Unicode 引用
78 |
79 |
80 |
Unicode 是字体在网页端最原始的应用方式,特点是:
81 |
82 | - 兼容性最好,支持 IE6+,及所有现代浏览器。
83 | - 支持按字体的方式去动态调整图标大小,颜色等等。
84 | - 但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。
85 |
86 |
87 | 注意:新版 iconfont 支持多色图标,这些多色图标在 Unicode 模式下将不能使用,如果有需求建议使用symbol 的引用方式
88 |
89 |
Unicode 使用步骤如下:
90 |
第一步:拷贝项目下面生成的 @font-face
91 |
@font-face {
93 | font-family: 'caozha-iconfont';
94 | src: url('iconfont.eot');
95 | src: url('iconfont.eot?#iefix') format('embedded-opentype'),
96 | url('iconfont.woff2') format('woff2'),
97 | url('iconfont.woff') format('woff'),
98 | url('iconfont.ttf') format('truetype'),
99 | url('iconfont.svg#caozha-iconfont') format('svg');
100 | }
101 |
102 |
第二步:定义使用 iconfont 的样式
103 |
.caozha-iconfont {
105 | font-family: "caozha-iconfont" !important;
106 | font-size: 16px;
107 | font-style: normal;
108 | -webkit-font-smoothing: antialiased;
109 | -moz-osx-font-smoothing: grayscale;
110 | }
111 |
112 |
第三步:挑选相应图标并获取字体编码,应用于页面
113 |
114 | <span class="caozha-iconfont">3</span>
116 |
117 |
118 | "caozha-iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。
119 |
120 |
121 |
122 |
123 |
189 |
190 |
font-class 引用
191 |
192 |
193 |
font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。
194 |
与 Unicode 使用方式相比,具有如下特点:
195 |
196 | - 兼容性良好,支持 IE8+,及所有现代浏览器。
197 | - 相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。
198 | - 因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。
199 | - 不过因为本质上还是使用的字体,所以多色图标还是不支持的。
200 |
201 |
使用步骤如下:
202 |
第一步:引入项目下面生成的 fontclass 代码:
203 |
<link rel="stylesheet" href="./iconfont.css">
204 |
205 |
第二步:挑选相应图标并获取类名,应用于页面:
206 |
<span class="caozha-iconfont caozha-xxx"></span>
207 |
208 |
209 | "
210 | caozha-iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。
211 |
212 |
213 |
214 |
215 |
216 |
217 | -
218 |
221 |
good
222 | #caozha-good1
223 |
224 |
225 | -
226 |
229 |
bad
230 | #caozha-bad1
231 |
232 |
233 | -
234 |
237 |
赞
238 | #caozha-zan
239 |
240 |
241 | -
242 |
245 |
icon_likegood
246 | #caozha-icon_likegood
247 |
248 |
249 | -
250 |
253 |
点赞
254 | #caozha-dianzan
255 |
256 |
257 | -
258 |
261 |
good
262 | #caozha-good
263 |
264 |
265 | -
266 |
269 |
bad
270 | #caozha-bad
271 |
272 |
273 |
274 |
275 |
Symbol 引用
276 |
277 |
278 |
这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇文章
279 | 这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:
280 |
281 | - 支持多色图标了,不再受单色限制。
282 | - 通过一些技巧,支持像字体那样,通过
font-size, color 来调整样式。
283 | - 兼容性较差,支持 IE9+,及现代浏览器。
284 | - 浏览器渲染 SVG 的性能一般,还不如 png。
285 |
286 |
使用步骤如下:
287 |
第一步:引入项目下面生成的 symbol 代码:
288 |
<script src="./iconfont.js"></script>
289 |
290 |
第二步:加入通用 CSS 代码(引入一次就行):
291 |
<style>
292 | .icon {
293 | width: 1em;
294 | height: 1em;
295 | vertical-align: -0.15em;
296 | fill: currentColor;
297 | overflow: hidden;
298 | }
299 | </style>
300 |
301 |
第三步:挑选相应图标并获取类名,应用于页面:
302 |
<svg class="icon" aria-hidden="true">
303 | <use xlink:href="#icon-xxx"></use>
304 | </svg>
305 |
306 |
307 |
308 |
309 |
310 |
311 |
330 |
331 |
332 |
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/fonts/caozha/iconfont.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
48 |
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/fonts/caozha/iconfont.js:
--------------------------------------------------------------------------------
1 | !function(c){var t,e,a,l,o,n,i,d='',h=(t=document.getElementsByTagName("script"))[t.length-1].getAttribute("data-injectcss");if(h&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function s(){n||(n=!0,l())}e=function(){var c,t,e,a,l,o=document.createElement("div");o.innerHTML=d,d=null,(c=o.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",t=c,(e=document.body).firstChild?(a=t,(l=e.firstChild).parentNode.insertBefore(a,l)):e.appendChild(t))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(e,0):(a=function(){document.removeEventListener("DOMContentLoaded",a,!1),e()},document.addEventListener("DOMContentLoaded",a,!1)):document.attachEvent&&(l=e,o=c.document,n=!1,(i=function(){try{o.documentElement.doScroll("left")}catch(c){return void setTimeout(i,50)}s()})(),o.onreadystatechange=function(){"complete"==o.readyState&&(o.onreadystatechange=null,s())})}(window);
--------------------------------------------------------------------------------
/Src/caozha-comment/assets/caozha.js:
--------------------------------------------------------------------------------
1 | window.caozha={
2 | config:{
3 | sever:extendRoot, //插件目录
4 | loading:'',
5 | hasmore:0,
6 | commentonload:0,
7 | scrollloadInit:0,
8 | paginationInit:0,
9 | user:'',
10 | commentIndex:1,
11 | commentQuery:'all',
12 | mycity:'',
13 | scrollload:0, //是否支持滚动加载
14 | scroll:0, //是否支持滚动加载
15 | scrollbottom:50,//底部触发距离
16 | pagination:0,
17 | pageline:5,//分页模式连续分页数
18 | pagefirst:false,//分页模式显示首页
19 | pagelast:false,//分页模式显示尾页
20 | pageskip:0,//分页模式显示跳页
21 | pagesize:20,
22 | showhot:1,
23 | hotpagesize:10,
24 | catid:0,
25 | cmtid:0
26 | },
27 | init:function(options){
28 | var def=$.extend({},this.config,options);
29 | var that = this;
30 | caozha.config = def;
31 | that.xhr({
32 | api:cz_cmt_template,//加载模板
33 | dataType:'html'
34 | },function(html){
35 | $('.pl-520am').html(html);
36 | that.getNewsComment();
37 | that.config.showhot?that.getNewsHotComment():null;
38 | });
39 |
40 | //this.checkUser();
41 | },
42 | mScroll:function(id){
43 | $("html,body").stop(true);
44 | $("html,body").animate({scrollTop: $("#"+id).offset().top}, 500);
45 | },
46 | checkUser:function(showInfo){
47 | this.xhr({
48 | api:cz_cmt_userinfo,
49 | method:'post'
50 | },function(json){
51 | if(json.err_msg=='success'){
52 | caozha.config.user = json.data;
53 | var havamsg = '';
54 | if(json.data.havemsg==1){
55 | havamsg = '';
56 | }
57 | $('.showUserPic').html(havamsg+'
');
58 | }else{
59 | showInfo?caozha.show(json.info):null;
60 | }
61 | });
62 | },
63 | xhr:function(query,callback,type){
64 | var api =query.api;
65 | var params = query.data || {};
66 | var method=query.method || 'get';
67 | var dataType=query.dataType || 'json';
68 | params.appkey = this.config['appkey'];
69 | //var url = query.url || caozha.config.sever+api+'.php?ajax=1&_t='+Date.parse(new Date());
70 | var url = query.url || api+'&ajax=1&_t='+Date.parse(new Date());
71 | $.ajax({
72 | url:url,
73 | data:params,
74 | dataType:dataType,
75 | method:method,
76 | type:method,
77 | success:function(data){
78 | typeof(callback === 'function') ? callback(data) : null;
79 | },
80 | error:function(XMLHttpRequest, textStatus, errorThrown){
81 | if(textStatus=='error'){
82 | caozha.show('连接失败,请检查您的网络!');
83 | }
84 | }
85 | });
86 |
87 | },
88 | show:function(text,time,callback){
89 |
90 | layer.msg(text,{time:1000},function(){
91 | if(callback){
92 | typeof(callback === 'function') ? callback() : null;
93 | }
94 | });
95 | },
96 | showLoading:function(){
97 | this.config.loading=layer.open({type: 2});
98 | },
99 | hideLoading:function(){
100 | layer.close(this.config.loading);
101 | },
102 | formToJson:function(id){
103 | $.fn.serializeObject = function()
104 | {
105 | var o = {};
106 | var a = this.serializeArray();
107 | $.each(a, function() {
108 | if (o[this.name]) {
109 | if (!o[this.name].push) {
110 | o[this.name] = [o[this.name]];
111 | }
112 | o[this.name].push(this.value || '');
113 | } else {
114 | o[this.name] = this.value || '';
115 | }
116 | });
117 | return o;
118 | };
119 | return json = $(id).serializeObject();
120 | },
121 | trim:function(str){
122 | if(str){
123 | str = str.replace(/<[^>]+>/g,""); //去除html标签
124 | str = str.replace(/(^\s+)|(\s+$)/g,"");//去除空格
125 | str = str.replace(/[ ]/g,"");//去除回车
126 | return str = str.replace(/[\r\n]/g,"");//去除空格
127 | }
128 | return false;
129 | },
130 | show:function(info,time,callback){
131 | var that = $('.pl-showinfo');
132 | if($('.pl-showinfo-reply').length>0){
133 | that = $('.pl-showinfo-reply');
134 | }
135 | that.html(info).stop().fadeIn();
136 | setTimeout(function(){
137 | that.fadeOut();
138 | if(callback&&typeof(callback)=='function'){
139 | callback();
140 | }
141 | },time || 3000);
142 | },
143 | tm:function(id,data){
144 | var compiledTemplate = Handlebars.compile($('#'+id).html());
145 |
146 | var html = compiledTemplate(data);
147 | return html;
148 | },
149 | showPickFace:function(evt,reply){
150 | evt.stopPropagation?evt.stopPropagation():evt.cancelBubble=true;
151 | var obj = reply?'#pl-face-box-reply':'#pl-face-box';
152 | if($(obj).is(':hidden')){
153 | $('.pl-face-box').hide();
154 | $(obj).fadeIn();
155 | $('.pl-face-box-before').on('click',function(){
156 | $(obj).fadeOut();
157 | });
158 | $('.pl-img-box').hide();
159 | }else{
160 | $(obj).fadeOut();
161 | }
162 | },
163 | showPickImg:function(evt,reply){
164 | evt.stopPropagation?evt.stopPropagation():evt.cancelBubble=true;
165 | var obj = reply?'#pl-img-box-reply':'#pl-img-box';
166 | if($(obj).is(':hidden')){
167 | $('.pl-img-box').hide();
168 | $(obj).fadeIn();
169 | $('.pl-face-box').hide();
170 | $('.pl-img-box-before').on('click',function(){
171 | $(obj).fadeOut();
172 | });
173 | }else{
174 | $(obj).fadeOut();
175 | }
176 | $('.pl-img-file input').on('click',function(evt){
177 | evt.stopPropagation?evt.stopPropagation():evt.cancelBubble=true;
178 | });
179 | $(obj).find('button').off('click').on('click',function(evt){
180 | var src = $(obj).find('input').val();
181 | if(!src)return;
182 | var tag='[img]'+src+'[/img]';
183 | caozha.addplface(tag,reply);
184 | $(obj).find('input').val('');
185 | });
186 | },
187 | addplface:function(tag,reply) {
188 | var myField;
189 | var id =reply ? 'pl-520am-f-saytext-reply' : 'pl-520am-f-saytext';
190 | if (document.getElementById(id) && document.getElementById(id).type == 'textarea') {
191 | myField = document.getElementById(id);
192 | }
193 | else {
194 | return false;
195 | }
196 | if (document.selection) {
197 | myField.focus();
198 | sel = document.selection.createRange();
199 | sel.text = tag;
200 | myField.focus();
201 | }
202 | else if (myField.selectionStart || myField.selectionStart == '0') {
203 | var startPos = myField.selectionStart;
204 | var endPos = myField.selectionEnd;
205 | var cursorPos = endPos;
206 | myField.value = myField.value.substring(0, startPos)
207 | + tag
208 | + myField.value.substring(endPos, myField.value.length);
209 | cursorPos += tag.length;
210 | myField.focus();
211 | myField.selectionStart = cursorPos;
212 | myField.selectionEnd = cursorPos;
213 | }
214 | else {
215 | myField.value += tag;
216 | myField.focus();
217 | }
218 | $('.pl-face-box').hide();
219 |
220 | },
221 | updateKey:function(){
222 | var src = $('img[name="plKeyImg"]').attr('src');
223 | $('img[name="plKeyImg"]').attr('src',src+'&t='+Math.random());
224 | },
225 | showReply:function(plid,username){
226 | var obj = $('#pl-show-box-'+plid).find('.pl-show-replay');
227 | var output=caozha.tm('PlReplyTemplate',{plid:plid,username:username});
228 | if(obj.find('.pl-post').length>0){
229 | obj.empty();
230 | }else{
231 | $('.pl-show-replay').empty();
232 | obj.html(output);
233 | caozha.updateKey();
234 | }
235 | },
236 | doForPl:function(plid,dopl,that){
237 | var obj=$('#pl-'+dopl+'-'+plid);
238 | var num = Number(obj.text())+1;
239 | this.xhr({
240 | api: cz_cmt_dolike,
241 | data:{enews:'DoForPl',plid:plid,dopl:dopl,cmtid:this.config.cmtid,catid:this.config.catid},
242 | method:'post'
243 | },function(json){
244 |
245 | if(json.err_msg=='success'){
246 | obj.text(num);
247 | $(that).append('+1');
248 | $('.pl-plusone').animate({top:'-20px','opacity':0},800,function(){
249 | $('.pl-plusone').remove();
250 |
251 | });
252 |
253 | }else{
254 | $('#pl-err-info-'+plid).html(json.info).fadeIn();
255 | setTimeout(function(){
256 | $('#pl-err-info-'+plid).fadeOut();
257 | },1000)
258 | }
259 | });
260 | },
261 | submitComment:function(obj,repid){
262 | var saytext=$('#pl-520am-f-saytext');
263 | var that = $('.pl-520am');
264 | var catid=that.data('catid');
265 | var cmtid=that.data('cmtid');
266 | var key=$('#pl-key');
267 | var username=$("#pl-username");
268 | if(repid){
269 | saytext = $('#pl-520am-f-saytext-reply');
270 | key=$('#pl-key-reply');
271 | username=$("#pl-username-reply");
272 | }else{
273 | $('.pl-show-replay').empty();
274 | }
275 | if(saytext.val()==''){
276 | caozha.show('未输入评论内容');
277 | return;
278 | }
279 | if(key.val()!=undefined&&key.val()==''){
280 | caozha.show('请输入验证码');
281 | return;
282 | }
283 | $(obj).attr('disabled',true).html('
');
284 | var post = {
285 | repid:repid,
286 | cmtid:caozha.config.cmtid,
287 | catid:caozha.config.catid,
288 | saytext:saytext.val(),
289 | key:key.val(),
290 | username:username.val(),
291 | enews:'AddPl'
292 | }
293 | caozha.xhr({
294 | api: cz_cmt_doaction,
295 | data:post,
296 | method:'post'
297 | },function(json){
298 | $(obj).removeAttr('disabled',false).html('发 布');
299 | if(json.err_msg=='success'){
300 | caozha.show(json.info,'',function(){
301 | $('.pl-show-replay').empty();
302 | });
303 | saytext.val('');
304 | key.val('');
305 | caozha.getNewsComment(1);
306 | caozha.updateKey();
307 |
308 | }else{
309 | caozha.show(json.info);
310 | }
311 | });
312 | }
313 | ,getNewsHotComment:function(){
314 | caozha.xhr({
315 | api: cz_cmt_list,
316 | data:{cmtid:this.config.cmtid,catid:this.config.catid,pageSize:this.config.hotpagesize,query:'hot'},
317 | method:'post'
318 | },function(json){
319 | if(json.err_msg == 'success') {
320 |
321 |
322 | if(json.total>0){
323 | var output=caozha.tm('NewsCommentTemplate',{data:json.data});
324 | $('#pl-show-hot').html(output);
325 | $('.pl-show-hot-list').fadeIn();
326 | }
327 |
328 |
329 | }else {
330 |
331 | }
332 | });
333 |
334 | },getNewsComment:function(reply,obj,type){
335 | $('.newscommentText').removeAttr('disabled');
336 | var cmtid=$('body').attr('data-cmtid');
337 | var catid=$('body').attr('data-catid');
338 | caozha.config.commentQuery = type?type:'all';
339 | var info = type=='hot'?'暂无热门评论':'暂无评论';
340 | $('.showNewsCommenetArea').removeAttr('id').attr('id','show-'+caozha.config.commentQuery);
341 | if(obj)$(obj).attr('disabled',true).html('载入中,请稍后...');
342 |
343 | if(reply&&!caozha.config.pagination){
344 | caozha.config.commentIndex = 1;
345 | $('.showNewsCommenetArea').html('');
346 | $('.showAllComment').removeAttr('disabled').hide().html('查看更多');
347 | }
348 | caozha.xhr({
349 | api: cz_cmt_list,
350 | data:{cmtid:this.config.cmtid,catid:this.config.catid,pageSize:this.config.pagesize,pageIndex:this.config.commentIndex,query:this.config.commentQuery},
351 | method:'post'
352 | },function(json){
353 | if(obj)$(obj).removeAttr('disabled').html('查看更多');
354 | caozha.config.commentonload = 0 ;//解除锁定
355 | caozha.config.hasmore = json.hasmore; //是否有下一页
356 | if (json.err_msg == 'success') {
357 | var output=caozha.tm('NewsCommentTemplate',{data:json.data});
358 |
359 | /*--设置翻页--*/
360 | if(caozha.config.pagination){ //分页模式
361 | $('#pl-show-'+caozha.config.commentQuery).html(output);
362 | $('.pl-show-list-loading').remove();
363 | if(!caozha.config.paginationInit){
364 | includeFile(extendRoot+'assets/laypage/laypage.js',function(){
365 | laypage.dir = extendRoot+'assets/laypage/laypage.css';
366 | laypage({
367 | cont: 'pl-pagination',
368 | pages: json.pageTotal,
369 | first: caozha.config.pagefirst,
370 | last: caozha.config.pagelast,
371 | groups:caozha.config.pageline,
372 | skip:caozha.config.pageskip,
373 | jump: function(obj, first){
374 | var curr = obj.curr;
375 | if(caozha.config.paginationInit){
376 | caozha.config.commentIndex = curr;
377 | $('.pl-show-list-loading').remove();
378 | $('#pl-show-'+caozha.config.commentQuery).append('');
379 | caozha.getNewsComment(0);
380 | caozha.mScroll('pl-start');
381 | }
382 | }
383 | });
384 | caozha.config.paginationInit=1;
385 | });
386 | }
387 |
388 | }else{ //追加模式
389 | if(json.pageTotal>1){
390 | caozha.setScrollLoad();
391 | }
392 | if(json.hasmore){
393 | caozha.config.commentIndex++;
394 | }else{
395 | if(obj)$(obj).attr('disabled',true).html('已加载完毕')
396 | }
397 | $('.NewsComment_loading').remove();
398 | if(reply){
399 | $('#pl-show-'+caozha.config.commentQuery).empty();
400 | }
401 | if(json.total==0){
402 | $('.showNewsCommenetArea').html(''+info+'
');
403 | }
404 | $('#pl-show-'+caozha.config.commentQuery).append(output);
405 | }
406 | /*--end--*/
407 | $('#pl-totalnum').text(json.total);
408 | $('#pl-joinnum').text(json.onclick);
409 | }else {
410 |
411 | }
412 | });
413 | },
414 | setScrollLoad:function(){
415 | $('.showAllComment').show();
416 | if(caozha.config.scrollload&&!caozha.config.scrollloadInit){
417 | caozha.config.scrollloadInit=1; //已初始化滚动加载;
418 | window.onscroll = function(){
419 | var scrollTop = document.body.scrollTop;
420 | var bot = caozha.config.scrollbottom; //bot是底部距离的高度
421 | if ((bot + $(window).scrollTop()) >= ($(document).height() - $(window).height())) {
422 | if(caozha.config.commentonload||!caozha.config.hasmore)return;
423 | caozha.config.commentonload=1;
424 | caozha.getNewsComment(0,'.showAllComment');
425 | }
426 | }
427 | }
428 |
429 | }
430 |
431 | }
432 | window.onclick=function(){
433 | $('.pl-face-box,.pl-img-box').hide();
434 | }
435 |
--------------------------------------------------------------------------------
/Src/caozha-comment/php/class.php:
--------------------------------------------------------------------------------
1 | cmt_config=$cmt_config;
21 | $this->cmt_url=str_ireplace("/php/","/",get_cz_path());
22 | $this->cmt_faces = $cmt_faces;
23 | }
24 |
25 | function __destruct() {}
26 |
27 | /**
28 | * 建立mysqli数据库连接
29 | */
30 | public function mysqli_conn(){
31 | global $mysql_config;
32 | $this->conn = mysqli_connect($mysql_config["host"],$mysql_config["username"],$mysql_config["password"],$mysql_config["dbname"],$mysql_config["port"]) or die("数据库连接错误");
33 | mysqli_set_charset($this->conn,'utf8');
34 | }
35 |
36 | /**
37 | * 关闭连接
38 | */
39 | public function mysqli_close(){
40 | mysqli_close($this->conn);
41 | }
42 |
43 | public function template()
44 | {//评论模板
45 | include "template.php";
46 | }
47 |
48 | public function captcha()
49 | {
50 | include "captcha.php";
51 | }
52 |
53 |
54 | public function get_list(){//评论列表,JSON
55 |
56 | global $mysql_config;
57 | $action = filter_sql_arr($_POST);//过滤注入
58 |
59 | if ($this->cmt_config['cache_time'] > 0) {//开启缓存
60 | $cache_name = md5(implode("-", $action));
61 | include "cache.php";
62 | $cache=new FileCache("cache");
63 | $list_cache = $cache->get($cache_name);//优先从缓存读取
64 | if ($list_cache) {
65 | return json($list_cache);
66 | }
67 | }
68 |
69 | $this->mysqli_conn();
70 |
71 | $page = isset($action["pageIndex"]) ? $action["pageIndex"] : 1;
72 | if (!is_numeric($page)) {
73 | $page = 1;
74 | }
75 | $limit = $action["pageSize"];
76 | if (!is_numeric($limit)) {
77 | $limit = $this->cmt_config['cmt_pagesize'];//默认显示数目
78 | }
79 | $query = $action["query"];//all,hot
80 | $cmtid = $action["cmtid"];
81 | $catid = $action["catid"];
82 |
83 | $limit_sql=" limit ".($limit*($page-1)).",".$limit;
84 | $list_data = array();
85 |
86 | if ($query == "hot") {//获取热门评论
87 | $sql="select * from `".$mysql_config["prefix"]."comment` where cmtid='".$cmtid."' and catid='".$catid."' and ischeck=1 and ishot=1 order by addtime desc ";
88 | $sql_query=mysqli_query($this->conn,$sql.$limit_sql);
89 | while($comment_list=mysqli_fetch_array($sql_query)){
90 | $list_data[] = $comment_list;
91 | }
92 | } else {
93 | $sql="select * from `".$mysql_config["prefix"]."comment` where cmtid='".$cmtid."' and catid='".$catid."' and ischeck=1 order by addtime desc ";
94 | $sql_query=mysqli_query($this->conn,$sql.$limit_sql);
95 | while($comment_list=mysqli_fetch_array($sql_query)){
96 | $list_data[] = $comment_list;
97 | }
98 | }
99 |
100 | $total = mysqli_result(mysqli_query($this->conn,str_ireplace("*"," count(*) as total ",$sql)),0,'total'); //查询出结果的数量
101 | $like_num = mysqli_result(mysqli_query($this->conn,"SELECT SUM( `like_num`) as total FROM `".$mysql_config["prefix"]."comment` where cmtid='".$cmtid."' and catid='".$catid."' and ischeck=1"),0,'total'); //获取点赞的总数
102 | $bad_num = mysqli_result(mysqli_query($this->conn,"SELECT SUM( `bad_num`) as total FROM `".$mysql_config["prefix"]."comment` where cmtid='".$cmtid."' and catid='".$catid."' and ischeck=1"),0,'total'); //获取踩的总数
103 | $join_num = $like_num + $bad_num;
104 |
105 |
106 | $comments = array();
107 |
108 | if (!empty($list_data)) {
109 | foreach ($list_data as $r) {
110 |
111 | $saytext = trim($r['cmtcontent']);
112 | if ($this->cmt_config['is_br']) {
113 | $saytext = nl2br($saytext);
114 | }
115 | $arrparentid = trim($r['arrparentid']);
116 |
117 | $parent_context = "";//初始化,获取父评论的内容
118 | if ($arrparentid) {
119 | $parentid_arr = explode(",", $arrparentid);
120 | foreach ($parentid_arr as $p_value) {
121 |
122 | $p_sql="select * from `".$mysql_config["prefix"]."comment` where id=".$p_value;
123 | $p_query=mysqli_query($this->conn,$p_sql);
124 | $p_comment=array();
125 | while($p_c=mysqli_fetch_array($p_query)){
126 | $p_comment=$p_c;
127 | }
128 |
129 | if (empty($p_comment)) {
130 | $parent_context = '';
131 | } else {
132 | $parent_cmtname=$p_comment["cmtname"];
133 | if(!$parent_cmtname){$parent_cmtname=$this->cmt_config['default_cmtname'];}
134 | if ($p_comment["ischeck"] == 1) {
135 | $parent_context = '';
136 | } else {
137 | $parent_context = '';
138 | }
139 |
140 | }
141 | }
142 | }
143 |
144 | $saytext = $this->face_replace($parent_context . $saytext);//解析表情
145 | $saytext = $this->img_replace($saytext);//解析图片
146 |
147 | if ($r['userid'] > 0) {//当评论者是网站会员时
148 | //自己写逻辑,下面是示例代码
149 | // $member = MemberModel::where("userid", "=", $r['userid'])->findOrEmpty();
150 | // if ($member->isEmpty()) {
151 | // $is_member = 0;
152 | // } else {
153 | // $is_member = 1;
154 | // $userpic = $member->avatar;
155 | // //$plusername = $member->nickname;
156 | // }
157 | } else {
158 | $is_member = 0;
159 | }
160 |
161 | if ($is_member != 1) {
162 | $userpic = $this->cmt_url . 'assets/userpic/' . $r['userpic'] . '.gif';
163 | }
164 |
165 | $plusername = $r['cmtname'];
166 | if (!$plusername) {
167 | $plusername = $this->cmt_config['default_cmtname'];
168 | }
169 |
170 | $comments[] = array(
171 | "plid" => $r['id'],
172 | "userpic" => $userpic,
173 | "plusername" => $plusername,
174 | "formattime" => $this->lgy_tranTime(strtotime($r['addtime'])),
175 | "saytext" => $saytext,
176 | "zcnum" => $r['like_num'],
177 | "fdnum" => $r['bad_num'],
178 | );
179 | }
180 | }
181 |
182 | $pageTotal = ceil($total / $limit); //总页数
183 | if ($page < $pageTotal) {//判断是否有下一页
184 | $hasmore = 1;
185 | } else {
186 | $hasmore = 0;
187 | }
188 |
189 |
190 | $list_arr = array(
191 | "err_msg" => "success",
192 | "data" => $comments,
193 | "total" => $total,//总记录数
194 | "pageTotal" => $pageTotal, //总页数
195 | "pageSize" => $limit,
196 | "pageIndex" => $page,
197 | "cmtid" => $cmtid,
198 | "catid" => $catid,
199 | "onclick" => ($join_num + $total),//评论参与人数
200 | "hasmore" => $hasmore,//是否有下一页
201 | "info" => "读取信息评论成功!",
202 | );
203 |
204 | if ($this->cmt_config['cache_time'] > 0) {//开启缓存
205 | $cache->set($cache_name, $list_arr, $this->cmt_config['cache_time']);//缓存评论列表
206 | }
207 | $this->mysqli_close();
208 | return json($list_arr);
209 | }
210 |
211 | public function face_replace($saytext)
212 | {//替换表情标签
213 | if ($saytext) {
214 | preg_match_all("/\[\/(.*?)\]/isu", $saytext, $matches, PREG_PATTERN_ORDER);
215 | foreach ($matches[1] as $faces) {
216 | $view_face = $this->view_face($faces);
217 | if (count($view_face) > 0) {
218 | $face_tag = "[/" . $view_face[0] . "]";
219 | $saytext = str_ireplace($face_tag, "
cmt_url . "face/" . $view_face[1] . "\" border=\"0\">", $saytext);
220 | }
221 | }
222 | }
223 | return $saytext;
224 | }
225 |
226 | //解释图片标签
227 | public function img_replace($text)
228 | {
229 | $preg_str = "/\[img\](.+?)\[\/img\]/isu";
230 | $text = preg_replace($preg_str, "
", $text);
231 | return $text;
232 | }
233 |
234 | public function lgy_tranTime($time)
235 | {//格式化时间
236 | $minute = date("H:i", $time);
237 | $hour = date("H:i", $time);
238 | $alltime = date("Y年m月d日 H:i", $time);
239 | $time = time() - $time;
240 | if ($time < 60) {
241 | $str = ' 刚刚 ';
242 | } elseif ($time < 60 * 60) {
243 | $min = floor($time / 60);
244 | $str = $min . '分钟前 ';
245 | } elseif ($time < 60 * 60 * 24) {
246 | $h = floor($time / (60 * 60));
247 | $str = $h . '小时前 ';
248 | } elseif ($time < 60 * 60 * 24 * 3) {
249 | $d = floor($time / (60 * 60 * 24));
250 | if ($d = 1)
251 | $str = '昨天 ' . $minute;
252 | else
253 | $str = $alltime;
254 | } else {
255 | $str = $alltime;
256 | }
257 | return $str;
258 | }
259 |
260 | public function view_face($str)
261 | {//获取对应的表情数组
262 | $cmt_faces = $this->cmt_faces;
263 | foreach ($cmt_faces as $faces) {
264 | if (trim($faces[0]) == trim($str)) {
265 | return $faces;
266 | }
267 | }
268 | return array();
269 | }
270 |
271 | public function dolike()//点赞或踩
272 | {
273 | global $mysql_config;
274 |
275 | $action_data = filter_sql_arr($_POST);//过滤注入
276 | $action_data["catid"] = isset($action_data["catid"]) ? $action_data["catid"] : 0;
277 | $action_data["cmtid"] = isset($action_data["cmtid"]) ? $action_data["cmtid"] : "";//评论的标识符ID
278 | $action_data["plid"] = isset($action_data["plid"]) ? $action_data["plid"] : 0;//评论的标识符ID
279 | $action_data["dopl"] = isset($action_data["dopl"]) ? trim($action_data["dopl"]) : 1;//点赞操作,1=点赞,0=踩
280 | $result = "?catid=" . $action_data["catid"] . "&cmtid=" . $action_data["cmtid"];
281 |
282 | if (!$action_data["cmtid"]) {
283 | return json(array("err_msg" => "fail", "result" => $result, "info" => "标识符cmtid不能为空"));
284 | }
285 | if (empty($action_data["catid"]) && $action_data["catid"] != 0) {
286 | return json(array("err_msg" => "fail", "result" => $result, "info" => "标识符catid不能为空"));
287 | }
288 | if (!is_numeric($action_data["plid"])) {
289 | return json(array("err_msg" => "fail", "result" => $result, "info" => "评论ID不能为空"));
290 | }
291 |
292 | $dolike = $_COOKIE["dolike"];
293 | if ($dolike) {
294 | $like_arr = explode(",", $dolike);
295 | if (in_array($action_data["plid"], $like_arr)) {
296 | return json(array("err_msg" => "fail", "result" => $result, "info" => "请不要重复操作"));
297 | } else {
298 | setcookie("dolike", $dolike . "," . $action_data["plid"], time()+intval(60 * 60 * 24 * 30));//30天内不允许重复点赞
299 | }
300 | } else {
301 | setcookie("dolike", $action_data["plid"], time()+intval(60 * 60 * 24 * 30));//30天内不允许重复点赞
302 | }
303 |
304 | $this->mysqli_conn();
305 |
306 | $list_data = array();
307 | $sql="select * from `".$mysql_config["prefix"]."comment` where id='".$action_data["plid"]."' and cmtid='".$action_data["cmtid"]."' and catid='".$action_data["catid"]."' and ischeck=1 order by addtime desc ";
308 | $sql_query=mysqli_query($this->conn,$sql);
309 | while($comment_list=mysqli_fetch_array($sql_query)){
310 | $list_data[] = $comment_list;
311 | }
312 |
313 | if (empty($list_data)) {
314 | return json(array("err_msg" => "fail", "result" => $result, "info" => "评论不存在或未审核"));
315 | } else {
316 | if ($action_data["dopl"] == 1) {
317 | mysqli_query($this->conn,"update `".$mysql_config["prefix"]."comment` set `like_num`=`like_num`+1 WHERE id=".$action_data["plid"]);
318 | $this->mysqli_close();
319 | return json(array("err_msg" => "success", "result" => $result, "info" => "点赞成功"));
320 | } elseif ($action_data["dopl"] == 0) {
321 | mysqli_query($this->conn,"update `".$mysql_config["prefix"]."comment` set `bad_num`=`bad_num`+1 WHERE id=".$action_data["plid"]);
322 | $this->mysqli_close();
323 | return json(array("err_msg" => "success", "result" => $result, "info" => "踩成功"));
324 | } else {
325 | return json(array("err_msg" => "fail", "result" => $result, "info" => "未定义操作"));
326 | }
327 |
328 | }
329 |
330 | }
331 |
332 | public function doaction()//发布评论
333 | {
334 | session_start();
335 |
336 | global $mysql_config;
337 | $action_data = filter_sql_arr($_POST);//过滤注入
338 | $action_data["catid"] = isset($action_data["catid"]) ? $action_data["catid"] : 0;
339 | $action_data["cmtid"] = isset($action_data["cmtid"]) ? $action_data["cmtid"] : "";//评论的标识符cmtid
340 | $action_data["saytext"] = isset($action_data["saytext"]) ? strip_tags($action_data["saytext"]) : "";//评论内容
341 | $action_data["username"] = isset($action_data["username"]) ? $action_data["username"] : "";//用户名
342 | $action_data["repid"] = isset($action_data["repid"]) ? $action_data["repid"] : 0;//回复ID
343 | $result = "?catid=" . $action_data["catid"] . "&cmtid=" . $action_data["cmtid"];
344 |
345 | if (!$action_data["cmtid"]) {
346 | return json(array("err_msg" => "fail", "result" => $result, "info" => "标识符cmtid不能为空"));
347 | }
348 | if (empty($action_data["catid"]) && $action_data["catid"] != 0) {
349 | return json(array("err_msg" => "fail", "result" => $result, "info" => "标识符catid不能为空"));
350 | }
351 | if (mb_strlen($action_data["username"]) > 12) {
352 | return json(array("err_msg" => "fail", "result" => $result, "info" => "昵称不能超过12个字"));
353 | }
354 | if (!$action_data["saytext"]) {
355 | return json(array("err_msg" => "fail", "result" => $result, "info" => "评论内容不能为空"));
356 | }else{
357 | if($this->check_bad_word($action_data["saytext"])){
358 | return json(array("err_msg" => "fail", "result" => $result, "info" => "评论内容含有违规词,请修改后再提交"));
359 | }
360 | }
361 |
362 | // 检测输入的验证码是否正确
363 | if ($this->cmt_config['is_captcha']) {
364 | $captcha = $action_data["key"];
365 | if (!$captcha) {
366 | return json(array("err_msg" => "fail", "result" => $result, "info" => "请输入验证码。"));
367 | } elseif (!captcha_check($captcha)) {
368 | // 验证失败
369 | return json(array("err_msg" => "fail", "result" => $result, "info" => "验证码错误,请刷新验证码后重新输入。"));
370 | }
371 | }
372 |
373 | $this->mysqli_conn();
374 |
375 | $userid = 0;//会员ID,可以自己做判断是否登录,此处略
376 | if ($userid > 0) {//当为会员时
377 | //自己写逻辑
378 | $cmtname = "";
379 | } else {
380 | $cmtname = $action_data["username"];
381 | }
382 |
383 | $parentid = $action_data["repid"];//回复的评论ID
384 | if ($parentid > 0) {
385 |
386 | $list_data = array();
387 | $sql="select * from `".$mysql_config["prefix"]."comment` where id=".$parentid;
388 | $sql_query=mysqli_query($this->conn,$sql);
389 | while($comment_list=mysqli_fetch_array($sql_query)){
390 | $list_data = $comment_list;
391 | }
392 |
393 | if (empty($list_data)) {
394 | $parentid = 0;
395 | $arrparentid = "";
396 | } else {
397 | $parentid = $list_data["id"];
398 | if (trim($list_data["parentid"]) != "0") {
399 | $arrparentid = $list_data["arrparentid"] . "," . $parentid;
400 | } else {
401 | $arrparentid = $parentid;
402 | }
403 | }
404 | } else {
405 | $parentid = 0;
406 | $arrparentid = "";
407 | }
408 |
409 | if ($this->cmt_config['is_check']) {//评论需要审核
410 | $ischeck = 0;
411 | $info = "提交成功,但需要审核通过后才能正常显示。";
412 | } else {
413 | $ischeck = 1;
414 | $info = "提交成功";
415 | }
416 |
417 | $insert_data = array(
418 | "cmtname" => $cmtname,
419 | "userid" => $userid,
420 | "userpic" => mt_rand(1, 50),
421 | "cmtip" => getip(),
422 | "cmtid" => $action_data["cmtid"],
423 | "catid" => $action_data["catid"],
424 | "parentid" => $parentid,
425 | "arrparentid" => $arrparentid,
426 | "cmtcontent" => $action_data["saytext"],
427 | "ischeck" => $ischeck,
428 | "addtime"=>date("Y-m-d H:i:s",time()),
429 | );
430 |
431 | $insert_keys = "`".implode("`,`", array_keys($insert_data))."`";
432 | $insert_value = "'".implode("','",array_values($insert_data))."'";
433 | $this->conn->query("insert into `".$mysql_config["prefix"]."comment` (".$insert_keys.") values(".$insert_value.")");
434 | $comment_id=$this->conn->insert_id;
435 | if ($comment_id > 0) {
436 | include "cache.php";
437 | $cache=new FileCache("cache");
438 | $cache->flush();//清除缓存
439 | $list = array("err_msg" => "success", "result" => $result, "info" => $info);
440 | } else {
441 | $list = array("err_msg" => "fail", "result" => $result, "info" => $info);
442 | }
443 |
444 | $this->mysqli_close();
445 |
446 | return json($list);
447 | }
448 |
449 |
450 | /**
451 | * 检测是否包含违规词
452 | */
453 | public function check_bad_word($str)
454 | {
455 | $bad_word_arr=explode("|",$this->cmt_config["bad_word"]);
456 | foreach ($bad_word_arr as $value){
457 | if(strpos($str,$value) !== false){
458 | return true;
459 | }
460 | }
461 | return false;
462 | }
463 |
464 | }
--------------------------------------------------------------------------------