├── images
├── icon.png
├── favo_bg.ico
├── info_bg.ico
├── loading.gif
├── nav_bg.png
├── top_bg.png
├── top_ico.png
├── Numbers
│ ├── 0.gif
│ ├── 1.gif
│ ├── 2.gif
│ ├── 3.gif
│ ├── 4.gif
│ ├── 5.gif
│ ├── 6.gif
│ ├── 7.gif
│ ├── 8.gif
│ ├── 9.gif
│ └── colon.gif
├── black_bg.png
├── close_btn.png
├── favo_link.png
├── input_bg.png
├── links_bg.ico
├── search_bg.png
├── site_logo.png
├── story_bg.jpg
├── trend_bg.png
├── admin_logo.png
├── advance_bg.png
├── author_icon.png
├── banner
│ ├── next.png
│ ├── prev.png
│ ├── banner1.png
│ ├── banner2.png
│ ├── banner3.png
│ └── banner4.png
├── bannertxt_bg.png
├── content_bg.png
├── input_big_bg.png
├── login_douban.png
├── order_pages.png
├── search_btn.png
├── summary_bg.png
├── float_link_bg.png
├── input_small_bg.png
├── nicEditorIcons.gif
├── text_hover_bg.png
├── text_title_bg.png
└── validator_default.png
├── README.md
├── css
├── about_us.css
├── jquery.idcode.css
├── enroll.css
├── account.css
├── common.css
└── index.css
├── js
├── jquery.cookie.js
├── base64.js
├── jquery.idcode.js
├── about_us.js
├── md5.js
├── jpages.js
├── admin.js
├── account.js
├── index.js
└── nicEdit.js
├── about_us.html
├── admin.html
├── account.html
├── enroll.html
└── index.html
/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/icon.png
--------------------------------------------------------------------------------
/images/favo_bg.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/favo_bg.ico
--------------------------------------------------------------------------------
/images/info_bg.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/info_bg.ico
--------------------------------------------------------------------------------
/images/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/loading.gif
--------------------------------------------------------------------------------
/images/nav_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/nav_bg.png
--------------------------------------------------------------------------------
/images/top_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/top_bg.png
--------------------------------------------------------------------------------
/images/top_ico.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/top_ico.png
--------------------------------------------------------------------------------
/images/Numbers/0.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/Numbers/0.gif
--------------------------------------------------------------------------------
/images/Numbers/1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/Numbers/1.gif
--------------------------------------------------------------------------------
/images/Numbers/2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/Numbers/2.gif
--------------------------------------------------------------------------------
/images/Numbers/3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/Numbers/3.gif
--------------------------------------------------------------------------------
/images/Numbers/4.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/Numbers/4.gif
--------------------------------------------------------------------------------
/images/Numbers/5.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/Numbers/5.gif
--------------------------------------------------------------------------------
/images/Numbers/6.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/Numbers/6.gif
--------------------------------------------------------------------------------
/images/Numbers/7.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/Numbers/7.gif
--------------------------------------------------------------------------------
/images/Numbers/8.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/Numbers/8.gif
--------------------------------------------------------------------------------
/images/Numbers/9.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/Numbers/9.gif
--------------------------------------------------------------------------------
/images/black_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/black_bg.png
--------------------------------------------------------------------------------
/images/close_btn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/close_btn.png
--------------------------------------------------------------------------------
/images/favo_link.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/favo_link.png
--------------------------------------------------------------------------------
/images/input_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/input_bg.png
--------------------------------------------------------------------------------
/images/links_bg.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/links_bg.ico
--------------------------------------------------------------------------------
/images/search_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/search_bg.png
--------------------------------------------------------------------------------
/images/site_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/site_logo.png
--------------------------------------------------------------------------------
/images/story_bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/story_bg.jpg
--------------------------------------------------------------------------------
/images/trend_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/trend_bg.png
--------------------------------------------------------------------------------
/images/admin_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/admin_logo.png
--------------------------------------------------------------------------------
/images/advance_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/advance_bg.png
--------------------------------------------------------------------------------
/images/author_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/author_icon.png
--------------------------------------------------------------------------------
/images/banner/next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/banner/next.png
--------------------------------------------------------------------------------
/images/banner/prev.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/banner/prev.png
--------------------------------------------------------------------------------
/images/bannertxt_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/bannertxt_bg.png
--------------------------------------------------------------------------------
/images/content_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/content_bg.png
--------------------------------------------------------------------------------
/images/input_big_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/input_big_bg.png
--------------------------------------------------------------------------------
/images/login_douban.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/login_douban.png
--------------------------------------------------------------------------------
/images/order_pages.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/order_pages.png
--------------------------------------------------------------------------------
/images/search_btn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/search_btn.png
--------------------------------------------------------------------------------
/images/summary_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/summary_bg.png
--------------------------------------------------------------------------------
/images/Numbers/colon.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/Numbers/colon.gif
--------------------------------------------------------------------------------
/images/banner/banner1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/banner/banner1.png
--------------------------------------------------------------------------------
/images/banner/banner2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/banner/banner2.png
--------------------------------------------------------------------------------
/images/banner/banner3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/banner/banner3.png
--------------------------------------------------------------------------------
/images/banner/banner4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/banner/banner4.png
--------------------------------------------------------------------------------
/images/float_link_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/float_link_bg.png
--------------------------------------------------------------------------------
/images/input_small_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/input_small_bg.png
--------------------------------------------------------------------------------
/images/nicEditorIcons.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/nicEditorIcons.gif
--------------------------------------------------------------------------------
/images/text_hover_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/text_hover_bg.png
--------------------------------------------------------------------------------
/images/text_title_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/text_title_bg.png
--------------------------------------------------------------------------------
/images/validator_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luckykun/WebFilm/HEAD/images/validator_default.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # WebFilm
2 |
3 | 毕业设计,css+jq写的web电影院网站。调用豆瓣电影接口,实现电影院的通用功能。
4 |
5 | 在线预览地址: http://www.jzkjarson.com/WebFilm/index.html
6 |
--------------------------------------------------------------------------------
/css/about_us.css:
--------------------------------------------------------------------------------
1 | .iw_poi_title {color:#CC5522;font-size:14px;font-weight:bold;overflow:hidden;padding-right:13px;white-space:nowrap}
2 | .iw_poi_content {font:12px arial,sans-serif;overflow:visible;padding-top:4px;white-space:-moz-pre-wrap;word-wrap:break-word}
3 | #dituContent{width:958px;height:380px;border:#ccc solid 1px;margin-top:6px;qi}
4 | .basic_info, .detial_info, .service_info{width:960px;min-height: 180px;margin:0 auto;background:#fff;padding-bottom:30px;}
5 | .basic_info h2, .detial_info h2, .service_info h2{height:40px;background:#afabab;padding-left:20px;width:940px;font-size:16px;line-height:40px;}
6 | .basic_area p, .service_area p, .detail_area p{padding:6px 20px 0;width:920px;min-height:22px;line-height:22px;margin-top:3px;}
--------------------------------------------------------------------------------
/css/jquery.idcode.css:
--------------------------------------------------------------------------------
1 | @charset "utf-8";
2 | /* track base Css */
3 |
4 | #ehong-code-input{
5 | width:42px;
6 | letter-spacing:2px;
7 | margin:0px 8px 0px 0px;
8 | }
9 | .ehong-idcode-val{
10 | position:relative;
11 | padding:1px 4px 1px 4px;
12 | top:0px;
13 | *top:-3px;
14 | letter-spacing:4px;
15 | display:inline;
16 | cursor:pointer;
17 | font-size:16px;
18 | font-family:"Courier New", Courier, monospace;
19 | text-decoration:none;
20 | font-weight:bold;
21 | }
22 | .ehong-idcode-val0{
23 | border:solid 1px #A4CDED;
24 | background-color:#ECFAFB;
25 | }
26 |
27 | .ehong-idcode-val1{
28 | border:solid 1px #A4CDED;
29 | background-color:#FCEFCF;
30 | }
31 | .ehong-idcode-val2{
32 | border:solid 1px #6C9;
33 | background-color:#D0F0DF;
34 | }
35 | .ehong-idcode-val3{
36 | border:solid 1px #6C9;
37 | background-color:#DCDDD8;
38 | }
39 | .ehong-idcode-val4{
40 | border:solid 1px #6C9;
41 | background-color:#F1DEFF;
42 | }
43 | .ehong-idcode-val5{
44 | border:solid 1px #6C9;
45 | background-color:#ACE1F1;
46 | }
47 | .ehong-code-val-tip{
48 | font-size:12px;
49 | color:#1098EC;
50 | top:0px;
51 | *top:-3px;
52 | position:relative;
53 | margin:0px 0px 0px 4px;
54 | cursor:pointer;
55 | }
56 |
--------------------------------------------------------------------------------
/css/enroll.css:
--------------------------------------------------------------------------------
1 | html,body,div,ul,li,p,span,h1,h2,h3,h4,table,tr,td,th{margin:0px;padding:0px;color:#343637;}
2 | input,img,table,tr,td{border:0px;}
3 | input,textarea{outline-style:none;}
4 | li{list-style: none;}
5 | a{text-decoration:none;}
6 | a:hover{text-decoration: underline;}
7 | body{font:14px 'Microsoft YaHei';}
8 | /* @font-face{
9 | font-family: 'FZLanTYJW_Xian';
10 | src:url('../fonts/FZLanTYJW_Xian.TTF');
11 | } */
12 |
13 | #main{background:url(../images/story_bg.jpg) center 0;min-height:600px;width:100%;}
14 | #wrap{background:url(../images/black_bg.png) center 0;min-height:600px;width:100%;}
15 | .enroll_wrap{width:500px;height:440px;background:#fff;opacity:0.9;filter:alpha(opacity=90);position:fixed;top:0;left:0;bottom:0;right:0;margin:auto;border-radius:8px;}
16 | .enroll_wrap h2{width:500px;height:40px;font-size:30px;line-height:40px;margin-top:20px;color:#fff;text-shadow:-4px -4px 12px #f6323d, -4px -4px 12px #f6323d,4px -4px 12px #f6323d, 4px 4px 12px #f6323d;text-align:center;}
17 | .enroll_wrap h4{width:464px;height:20px;font-size:16px;color:#f6323d;text-align:right;margin-top:6px;padding-right:30px;}
18 | .form_content p{width:410px;height:30px;line-height:30px;margin:0 0 0 90px;margin-top:12px;}
19 | p.l_username{margin-top:20px;}
20 | .form_content p input{width:190px;height:30px;background:url(../images/input_big_bg.png) no-repeat;padding-left:6px;margin-left:8px;word-spacing:2px;}
21 | .form_content p.l_idcode input{background:url(../images/input_small_bg.png) no-repeat;width:68px;}
22 | #idcode{position:relative;top:-2px;right:-4px;}
23 | .enroll_btn{width:80px;height:30px;text-align:center;line-height:28px;background:#33cad8;color:#fff;border-radius:2px;font-size:14px;font-family:'微软雅黑';margin-left:162px;margin-top:20px;cursor:pointer;}
24 | .enroll_btn:hover{background:#0a9cb2;border-radius:2px;}
25 | .login_link{width:130px;height:20px;cursor:pointer;font-size:12px;margin-left:10px;}
26 | .login_link a{color:#0a9cb2;}
27 | span.info{display:inline-block;font-size:12px;position:relative;top:-2px;}
28 | span.success{display:inline-block;width:16px;height:16px;background:url(../images/validator_default.png) -16px 0 no-repeat;vertical-align:middle;}
29 | span.error{display:inline-block;width:16px;height:16px;background:url(../images/validator_default.png) 0 0 no-repeat;vertical-align:middle;}
30 |
31 | .showmsg{display:none;position:fixed;padding:10px 0px;border:4px solid #ffc600;background-color:#fff;font-size:16px;line-height:24px;z-index:100;top:0;left:1.5%;bottom:18%;right:0;margin:auto;height:24px;width:230px;text-align:center;color:#df4252;}
32 | .showmsg a{color:#ff4e00;text-decoration:underline;}
--------------------------------------------------------------------------------
/js/jquery.cookie.js:
--------------------------------------------------------------------------------
1 |
2 | (function (factory) {
3 | if (typeof define === 'function' && define.amd) {
4 | // AMD
5 | define(['jquery'], factory);
6 | } else if (typeof exports === 'object') {
7 | // CommonJS
8 | factory(require('jquery'));
9 | } else {
10 | // Browser globals
11 | factory(jQuery);
12 | }
13 | }(function ($) {
14 |
15 | var pluses = /\+/g;
16 |
17 | function encode(s) {
18 | return config.raw ? s : encodeURIComponent(s);
19 | }
20 |
21 | function decode(s) {
22 | return config.raw ? s : decodeURIComponent(s);
23 | }
24 |
25 | function stringifyCookieValue(value) {
26 | return encode(config.json ? JSON.stringify(value) : String(value));
27 | }
28 |
29 | function parseCookieValue(s) {
30 | if (s.indexOf('"') === 0) {
31 | // This is a quoted cookie as according to RFC2068, unescape...
32 | s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
33 | }
34 |
35 | try {
36 | // Replace server-side written pluses with spaces.
37 | // If we can't decode the cookie, ignore it, it's unusable.
38 | // If we can't parse the cookie, ignore it, it's unusable.
39 | s = decodeURIComponent(s.replace(pluses, ' '));
40 | return config.json ? JSON.parse(s) : s;
41 | } catch(e) {}
42 | }
43 |
44 | function read(s, converter) {
45 | var value = config.raw ? s : parseCookieValue(s);
46 | return $.isFunction(converter) ? converter(value) : value;
47 | }
48 |
49 | var config = $.cookie = function (key, value, options) {
50 |
51 | // Write
52 |
53 | if (arguments.length > 1 && !$.isFunction(value)) {
54 | options = $.extend({}, config.defaults, options);
55 |
56 | if (typeof options.expires === 'number') {
57 | var days = options.expires, t = options.expires = new Date();
58 | t.setTime(+t + days * 864e+5);
59 | }
60 |
61 | return (document.cookie = [
62 | encode(key), '=', stringifyCookieValue(value),
63 | options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
64 | options.path ? '; path=' + options.path : '',
65 | options.domain ? '; domain=' + options.domain : '',
66 | options.secure ? '; secure' : ''
67 | ].join(''));
68 | }
69 |
70 | // Read
71 |
72 | var result = key ? undefined : {};
73 |
74 | // To prevent the for loop in the first place assign an empty array
75 | // in case there are no cookies at all. Also prevents odd result when
76 | // calling $.cookie().
77 | var cookies = document.cookie ? document.cookie.split('; ') : [];
78 |
79 | for (var i = 0, l = cookies.length; i < l; i++) {
80 | var parts = cookies[i].split('=');
81 | var name = decode(parts.shift());
82 | var cookie = parts.join('=');
83 |
84 | if (key && key === name) {
85 | // If second argument (value) is a function it's a converter...
86 | result = read(cookie, value);
87 | break;
88 | }
89 |
90 | // Prevent storing a cookie that we couldn't decode.
91 | if (!key && (cookie = read(cookie)) !== undefined) {
92 | result[name] = cookie;
93 | }
94 | }
95 |
96 | return result;
97 | };
98 |
99 | config.defaults = {};
100 |
101 | $.removeCookie = function (key, options) {
102 | if ($.cookie(key) === undefined) {
103 | return false;
104 | }
105 |
106 | // Must not alter options, thus extending a fresh object...
107 | $.cookie(key, '', $.extend({}, options, { expires: -1 }));
108 | return !$.cookie(key);
109 | };
110 |
111 | }));
--------------------------------------------------------------------------------
/css/account.css:
--------------------------------------------------------------------------------
1 | .owner_area{width:960px;background:#fff;margin:0 auto;}
2 | .login_now{width:130px;height:30px;text-align:center;line-height:30px;font-size:16px;background:#0e6488;border-radius:4px;color:#fff;margin-top:150px;cursor:pointer;margin-left:310px;}
3 | .login_now:hover{font-size:18px;color:red;line-height:28px;}
4 | .owner_title{width:950px;height:20px;text-align:right;padding:10px 0;background:rgb(226,192,68);color:#fff;padding-right:10px;}
5 | .owner_title span{padding:0 4px;margin-right:4px;color:#fff;}
6 | .owner_title .login_out{margin-left:6px;color:#0e6488;cursor:pointer;}
7 | .owner_title .login_out:hover{text-decoration:underline;}
8 | .left_link{width:180px;background:rgb(226,192,68);float:left;}
9 | .left_link li{width:138px;height:40px;line-height:40px;padding-left:42px;cursor:pointer;font-size:14px;}
10 | .left_link li.active, .left_link li:hover{background-color:rgb(229,198,87);color:#fff;}
11 | li.favo_li{background:url(../images/favo_bg.ico) 10px center no-repeat;}
12 | li.info_li{background:url(../images/info_bg.ico) 10px center no-repeat;}
13 | li.trend_li{background:url(../images/trend_bg.png) 10px center no-repeat;}
14 | li.links_li{background:url(../images/links_bg.ico) 10px center no-repeat;}
15 | .right_content{width:780px;float:left;background:#fff;}
16 |
17 | /* 喜欢看的电影区域 */
18 | .area_1, .area_2, .area_3, .area_4{width:752px;min-height:100px;padding-left:14px;float:left;padding-right:14px;}
19 | .one_movie{width:250px;height:170px;float:left;margin-bottom:20px;}
20 | .one_movie .movie_pic{width:100px;height:140px;float:left;margin-top:14px;overflow:hidden;margin-right:10px;}
21 | .one_movie .movie_pic a{display:inline-block;width:98px;height:138px;border:1px solid #343637;}
22 | .one_movie .movie_detail{width:140px;height:170px;float:left;}
23 | .movie_detail h2{font-weight:normal;color:#2aa2db;margin-top:16px;}
24 | #m_contry{font-size:14px;color:#343637;}
25 | .movie_detail p{height:20px;line-height:20px;margin-top:6px;font-weight:bold;}
26 | .movie_detail p span{font-weight:normal;padding-left:4px;}
27 | #db_point{color:red;}
28 |
29 | /* 个人资料区域 */
30 | .area_2, .area_3{display:none;position:relative;}
31 | .area_2 p{height:30px;line-height:30px;margin-top:20px;}
32 | .area_2 p input{border:1px solid #666;height:20px;line-height:20px;width:150px;padding-left:4px;}
33 | .area_2 .ziliao_area input{display:none;}
34 | .area_2 p textarea{resize: none;width:150px;height:40px;border:1px solid #666;position:relative;left:-4px;vertical-align:top;bottom:-4px;padding-left:4px;display:none;}
35 | .ziliao_area, .pwd_area{width:356px;min-height:100px;float:left;margin-top:30px;padding-left:10px;margin-bottom:20px;}
36 | .pwd_area{display:none;margin-left:20px;}
37 | p.line_area{width:752px;height:1px;background:#e7e8e9;margin-top:40px;}
38 | p.change_pwd, p.save_pwd, p.change_info, p.save_info, p.cancel_info, p.cancel_pwd{width:64px;height:22px;line-height:22px;text-align:center;border-radius:20px;background:#e7e8e9;border:1px solid #666;cursor:pointer;position:absolute;}
39 | p.change_pwd, p.save_pwd{right:540px;top:8px;}
40 | p.change_info, p.save_info{left:90px;top:8px;}
41 | p.cancel_info{left:132px;bottom:14px;display:none}
42 | p.cancel_pwd{right:190px;bottom:75px;}
43 | p.change_pwd:hover, p.save_pwd:hover, p.change_info:hover, p.save_info:hover, p.cancel_info:hover, p.cancel_pwd:hover{background:#faae2a;color:#fff;border-color:#e18f01;}
44 | .news_pwd input{position:relative;left:-2px;}
45 |
46 | /* 友情链接 */
47 | .area_4{display:none;padding-top:60px;}
48 | .area_4 p{width:600px;height:50px;float:left;line-height:50px;font-size:15px;font-weight:bold;margin-left:80px;}
49 | .area_4 p a{padding:16px 10px;margin:5px 10px;font-weight:normal;color:#343637;}
50 | .area_4 p a:hover{background:#d0cccc;color:#ff8f00;border-radius:5px;text-decoration:none;}
51 |
52 | .u_desc span.info{position:relative;left:-5px;}
53 | span.info{display:inline-block;font-size:12px;position:relative;top:-2px;}
54 | span.success{display:inline-block;width:16px;height:16px;background:url(../images/validator_default.png) -16px 0 no-repeat;vertical-align:middle;}
55 | span.error{display:inline-block;width:16px;height:16px;background:url(../images/validator_default.png) 0 0 no-repeat;vertical-align:middle;}
56 | .clearfix{clear:both;}
57 | div.showmsg{width:200px;bottom:0;}
58 |
--------------------------------------------------------------------------------
/js/base64.js:
--------------------------------------------------------------------------------
1 | function Base64() {
2 |
3 | // private property
4 | _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
5 |
6 | // public method for encoding
7 | this.encode = function (input) {
8 | var output = "";
9 | var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
10 | var i = 0;
11 | input = _utf8_encode(input);
12 | while (i < input.length) {
13 | chr1 = input.charCodeAt(i++);
14 | chr2 = input.charCodeAt(i++);
15 | chr3 = input.charCodeAt(i++);
16 | enc1 = chr1 >> 2;
17 | enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
18 | enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
19 | enc4 = chr3 & 63;
20 | if (isNaN(chr2)) {
21 | enc3 = enc4 = 64;
22 | } else if (isNaN(chr3)) {
23 | enc4 = 64;
24 | }
25 | output = output +
26 | _keyStr.charAt(enc1) + _keyStr.charAt(enc2) +
27 | _keyStr.charAt(enc3) + _keyStr.charAt(enc4);
28 | }
29 | return output;
30 | }
31 |
32 | // public method for decoding
33 | this.decode = function (input) {
34 | var output = "";
35 | var chr1, chr2, chr3;
36 | var enc1, enc2, enc3, enc4;
37 | var i = 0;
38 | input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
39 | while (i < input.length) {
40 | enc1 = _keyStr.indexOf(input.charAt(i++));
41 | enc2 = _keyStr.indexOf(input.charAt(i++));
42 | enc3 = _keyStr.indexOf(input.charAt(i++));
43 | enc4 = _keyStr.indexOf(input.charAt(i++));
44 | chr1 = (enc1 << 2) | (enc2 >> 4);
45 | chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
46 | chr3 = ((enc3 & 3) << 6) | enc4;
47 | output = output + String.fromCharCode(chr1);
48 | if (enc3 != 64) {
49 | output = output + String.fromCharCode(chr2);
50 | }
51 | if (enc4 != 64) {
52 | output = output + String.fromCharCode(chr3);
53 | }
54 | }
55 | output = _utf8_decode(output);
56 | return output;
57 | }
58 |
59 | // private method for UTF-8 encoding
60 | _utf8_encode = function (string) {
61 | string = string.replace(/\r\n/g,"\n");
62 | var utftext = "";
63 | for (var n = 0; n < string.length; n++) {
64 | var c = string.charCodeAt(n);
65 | if (c < 128) {
66 | utftext += String.fromCharCode(c);
67 | } else if((c > 127) && (c < 2048)) {
68 | utftext += String.fromCharCode((c >> 6) | 192);
69 | utftext += String.fromCharCode((c & 63) | 128);
70 | } else {
71 | utftext += String.fromCharCode((c >> 12) | 224);
72 | utftext += String.fromCharCode(((c >> 6) & 63) | 128);
73 | utftext += String.fromCharCode((c & 63) | 128);
74 | }
75 |
76 | }
77 | return utftext;
78 | }
79 |
80 | // private method for UTF-8 decoding
81 | _utf8_decode = function (utftext) {
82 | var string = "";
83 | var i = 0;
84 | var c = c1 = c2 = 0;
85 | while ( i < utftext.length ) {
86 | c = utftext.charCodeAt(i);
87 | if (c < 128) {
88 | string += String.fromCharCode(c);
89 | i++;
90 | } else if((c > 191) && (c < 224)) {
91 | c2 = utftext.charCodeAt(i+1);
92 | string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
93 | i += 2;
94 | } else {
95 | c2 = utftext.charCodeAt(i+1);
96 | c3 = utftext.charCodeAt(i+2);
97 | string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
98 | i += 3;
99 | }
100 | }
101 | return string;
102 | }
103 | }
--------------------------------------------------------------------------------
/js/jquery.idcode.js:
--------------------------------------------------------------------------------
1 | /**
2 | * idcode 1.0 - validate user.
3 | * Version 1.0
4 | * @requires jQuery v1.2
5 | * author ehong[idehong@gmail.com]
6 | **/
7 |
8 | /**
9 | * @example: $.idcode.setCode();
10 | * @desc: Make a validate code append to the element that id is idcode.
11 | *
12 | * @example $.idcode.validateCode();
13 | * @desc return true if user input value equal idcode.
14 | **/
15 |
16 | (function($){
17 | var settings = {
18 | e : 'idcode',
19 | codeType : { name : 'follow', len: 4},
20 | codeTip : '换一张',
21 | inputID : 'Txtidcode'//输入验证码的input的id值
22 | };
23 |
24 | var _set = {
25 | storeLable : 'codeval',
26 | store : '#ehong-code-input',
27 | codeval : '#ehong-code'
28 | }
29 | $.idcode = {
30 | getCode:function(option){
31 | _commSetting(option);
32 | return _storeData(_set.storeLable, null);
33 | },
34 | setCode:function(option){
35 | _commSetting(option);
36 | _setCodeStyle("#"+settings.e, settings.codeType.name, settings.codeType.len);
37 |
38 | },
39 | validateCode:function(option){
40 | _commSetting(option);
41 | var inputV;
42 | if(settings.inputID){
43 | inputV=$('#' + settings.inputID).val();
44 | }else{
45 | inputV=$(_set.store).val();
46 | }
47 |
48 | if(inputV == _storeData(_set.storeLable, null)){
49 | return true;
50 | }else{
51 | _setCodeStyle("#"+settings.e, settings.codeType.name, settings.codeType.len);
52 | return false;
53 | }
54 | }
55 | };
56 |
57 | function _commSetting(option){
58 | $.extend(settings, option);
59 | }
60 |
61 | function _storeData(dataLabel, data){
62 | var store = $(_set.codeval).get(0);
63 | if(data){
64 | $.data(store, dataLabel, data);
65 | }else{
66 | return $.data(store, dataLabel);
67 | }
68 | }
69 |
70 | function _setCodeStyle(eid, codeType, codeLength){
71 | var codeObj = _createCode(settings.codeType.name, settings.codeType.len);
72 | var randNum = Math.floor(Math.random()*6);
73 | var htmlCode=''
74 | if(!settings.inputID){
75 | htmlCode=' ';
76 | }
77 | htmlCode+='
' + _setStyle(codeObj) + '
' + ''+ settings.codeTip +' ';
80 | $(eid).html(htmlCode);
81 | _storeData(_set.storeLable, codeObj);
82 | }
83 |
84 | function _setStyle(codeObj){
85 | var fnCodeObj = new Array();
86 | var col = new Array('#BF0C43', '#E69A2A','#707F02','#18975F','#BC3087','#73C841','#780320','#90719B','#1F72D8','#D6A03C','#6B486E','#243F5F','#16BDB5');
87 | var charIndex;
88 | for(var i=0;i' + codeObj.charAt(i) + '');
91 | }
92 | return fnCodeObj.join('');
93 | }
94 | function _createCode(codeType, codeLength){
95 | var codeObj;
96 | if(codeType=='follow'){
97 | codeObj = _createCodeFollow(codeLength);
98 | }else if(codeType=='calc'){
99 | codeObj = _createCodeCalc(codeLength);
100 | }else{
101 | codeObj="";
102 | }
103 | return codeObj;
104 | }
105 |
106 | function _createCodeCalc(codeLength){
107 | var code1, code2, codeResult;
108 | var selectChar = new Array('0','1','2','3','4','5','6','7','8','9');
109 | var charIndex;
110 | for(var i=0;i" + json.title + ""+json.content+"
");
118 | return iw;
119 | }
120 | //创建一个Icon
121 | function createIcon(json){
122 | var icon = new BMap.Icon("http://app.baidu.com/map/images/us_mk_icon.png", new BMap.Size(json.w,json.h),{imageOffset: new BMap.Size(-json.l,-json.t),infoWindowOffset:new BMap.Size(json.lb+5,1),offset:new BMap.Size(json.x,json.h)})
123 | return icon;
124 | }
125 | initMap();//创建和初始化地图
126 | }
127 |
128 |
129 | about.app = {};
130 | about.app.changeNav=function(){//切换到航事件
131 | $(".nav_index").click(function(){
132 | window.location.href="index.html?lable=index";
133 | });
134 | $(".nav_news").click(function(){
135 | window.location.href="index.html?lable=news";
136 | });
137 | $(".nav_movies").click(function(){
138 | window.location.href="index.html?lable=movies";
139 | });
140 | }
--------------------------------------------------------------------------------
/about_us.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | jarson影院-影院介绍
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
Contact us:
30 |
18513032662
31 |
1031356013
32 |
33 |
34 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
基本信息
65 |
66 |
地址: 四川省成都市西南航空港开发区学府路一段24号
67 |
电话: 18513032662,18200390386
68 |
乘车: 学府路一段站: 160,306,846; 信息工程学院站: 121,304,804,806,816,846; 常乐小区: 160,306,804,806,816,846
69 |
地图: 如下
70 |
71 |
72 |
73 |
74 |
详细介绍
75 |
76 |
耀莱成龙国际影城是耀莱集团独家拥有的成龙品牌,覆盖了北京、广州、江苏、沈阳、郑州、西安、烟台、云南、河南等各大主要城市。2013年正式登陆成都,给您带来前所未有的观影体验和五星级服务享受。 耀莱成龙国际影城成都双流店拥有顶级的影城放映设备,采用了美国的科视2K数字放映机,座位全部采用最新的豪华航空座椅,并采用无遮挡设计,为残疾人提供了无阻碍通道。恒温的中央空调系统,进口的放映和音响系统,超大无缝荧幕给观众提供最舒适的国际一流观影环境。影城位于成都市双流县西航岗街道机场路与锦华路交叉口东南角北华联商场五层,拥有8个观影影厅(包括一个情侣厅,6个3D厅),共1250个座位。影院拥有专业管理团队、终极式服务,将用全新的经营理念、现代化全方位的管理模式,终极式服务,让顾客享受最舒适尊贵的接待与服务。
77 |
耀莱成龙国际影城是耀莱集团独家拥有的成龙品牌,覆盖了北京、广州、江苏、沈阳、郑州、西安、烟台、云南、河南等各大主要城市。2013年正式登陆成都,给您带来前所未有的观影体验和五星级服务享受。 耀莱成龙国际影城成都双流店拥有顶级的影城放映设备,采用了美国的科视2K数字放映机,座位全部采用最新的豪华航空座椅,并采用无遮挡设计,为残疾人提供了无阻碍通道。恒温的中央空调系统,进口的放映和音响系统,超大无缝荧幕给观众提供最舒适的国际一流观影环境。影城位于成都市双流县西航岗街道机场路与锦华路交叉口东南角北华联商场五层,拥有8个观影影厅(包括一个情侣厅,6个3D厅),共1250个座位。影院拥有专业管理团队、终极式服务,将用全新的经营理念、现代化全方位的管理模式,终极式服务,让顾客享受最舒适尊贵的接待与服务。
78 |
79 |
80 |
81 |
设备设施
82 |
83 |
营业时间: 9:30----23:30
84 |
影厅介绍: 影院拥有影厅8个
85 |
放映设备: 支持胶片 / 数字 / 3D放映
86 |
停车设施: 地下二层
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
105 |
106 |
107 |
112 |
113 |
130 |
131 |
132 |
133 |
--------------------------------------------------------------------------------
/admin.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | jarson影院-后台管理
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
57 |
58 |
59 |
60 |
61 |
欢迎登陆影院后台
62 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | 添加新闻
77 | 用户管理
78 | 添加管理员
79 |
80 |
85 |
86 |
87 |
新闻标题:
88 |
发布时间:
89 |
新闻内容:
90 |
91 |
保存新闻
92 |
93 |
94 |
95 |
96 |
97 | 用户名称
98 | 用户密码
99 | 用户电话
100 | 用户邮箱
101 | 用户简介
102 | 喜欢电影ID
103 | 操作
104 |
105 |
106 |
107 |
108 |
109 |
110 |
添加用户
111 |
112 |
113 |
管理员名称:
114 |
管理员密码:
115 |
确认此密码:
116 |
添加 取消
117 |
118 |
119 |
120 |
121 |
122 |
127 |
128 |
129 |
130 |
131 |
132 |
--------------------------------------------------------------------------------
/account.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | jarson影院-个人空间
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
Contact us:
26 |
18513032662
27 |
1031356013
28 |
29 |
30 |
54 |
55 |
56 |
57 |
58 |
59 |
登陆之后更精彩哟^_^
60 |
61 | 喜欢看的电影
62 | 查看个人资料
63 | 本周访问趋势
64 | 作者友情链接
65 |
66 |
67 |
68 |
78 |
79 |
80 |
81 |
82 |
修改资料
83 |
修改密码
84 |
昵 称:
85 |
手 机:
86 |
邮 箱:
87 |
个人简介:
88 |
取消修改
89 |
90 |
91 |
92 |
旧 密 码:
93 |
新 密 码:
94 |
确认密码:
95 |
取消修改
96 |
97 |
98 |
99 |
102 |
119 |
120 |
121 |
122 |
123 |
133 |
134 |
135 |
140 |
141 |
142 |
143 |
欢迎登陆个人空间
144 |
155 |
156 |
157 |
158 |
185 |
186 |
--------------------------------------------------------------------------------
/enroll.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | jarson影院-注册账号
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
欢迎注册影院会员
21 |
———注册会员享受更多优惠活动
22 |
49 |
50 |
51 |
52 |
53 |
201 |
--------------------------------------------------------------------------------
/js/md5.js:
--------------------------------------------------------------------------------
1 | var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */
2 | var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */
3 | var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */
4 |
5 | /*
6 | * These are the functions you'll usually want to call
7 | * They take string arguments and return either hex or base-64 encoded strings
8 | */
9 | function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));}
10 | function b64_md5(s){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));}
11 | function str_md5(s){ return binl2str(core_md5(str2binl(s), s.length * chrsz));}
12 | function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); }
13 | function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); }
14 | function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); }
15 |
16 | /*
17 | * Perform a simple self-test to see if the VM is working
18 | */
19 | function md5_vm_test()
20 | {
21 | return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72";
22 | }
23 |
24 | /*
25 | * Calculate the MD5 of an array of little-endian words, and a bit length
26 | */
27 | function core_md5(x, len)
28 | {
29 | /* append padding */
30 | x[len >> 5] |= 0x80 << ((len) % 32);
31 | x[(((len + 64) >>> 9) << 4) + 14] = len;
32 |
33 | var a = 1732584193;
34 | var b = -271733879;
35 | var c = -1732584194;
36 | var d = 271733878;
37 |
38 | for(var i = 0; i < x.length; i += 16)
39 | {
40 | var olda = a;
41 | var oldb = b;
42 | var oldc = c;
43 | var oldd = d;
44 |
45 | a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
46 | d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
47 | c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);
48 | b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
49 | a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
50 | d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);
51 | c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
52 | b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
53 | a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);
54 | d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
55 | c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
56 | b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
57 | a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);
58 | d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
59 | c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
60 | b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);
61 |
62 | a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
63 | d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
64 | c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);
65 | b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
66 | a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
67 | d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);
68 | c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
69 | b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
70 | a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);
71 | d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
72 | c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
73 | b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);
74 | a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
75 | d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
76 | c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);
77 | b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);
78 |
79 | a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
80 | d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
81 | c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);
82 | b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
83 | a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
84 | d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);
85 | c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
86 | b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
87 | a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);
88 | d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
89 | c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
90 | b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);
91 | a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
92 | d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
93 | c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);
94 | b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);
95 |
96 | a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
97 | d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);
98 | c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
99 | b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
100 | a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);
101 | d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
102 | c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
103 | b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
104 | a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);
105 | d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
106 | c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
107 | b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);
108 | a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
109 | d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
110 | c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);
111 | b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);
112 |
113 | a = safe_add(a, olda);
114 | b = safe_add(b, oldb);
115 | c = safe_add(c, oldc);
116 | d = safe_add(d, oldd);
117 | }
118 | return Array(a, b, c, d);
119 |
120 | }
121 |
122 | /*
123 | * These functions implement the four basic operations the algorithm uses.
124 | */
125 | function md5_cmn(q, a, b, x, s, t)
126 | {
127 | return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
128 | }
129 | function md5_ff(a, b, c, d, x, s, t)
130 | {
131 | return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
132 | }
133 | function md5_gg(a, b, c, d, x, s, t)
134 | {
135 | return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
136 | }
137 | function md5_hh(a, b, c, d, x, s, t)
138 | {
139 | return md5_cmn(b ^ c ^ d, a, b, x, s, t);
140 | }
141 | function md5_ii(a, b, c, d, x, s, t)
142 | {
143 | return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
144 | }
145 |
146 | /*
147 | * Calculate the HMAC-MD5, of a key and some data
148 | */
149 | function core_hmac_md5(key, data)
150 | {
151 | var bkey = str2binl(key);
152 | if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz);
153 |
154 | var ipad = Array(16), opad = Array(16);
155 | for(var i = 0; i < 16; i++)
156 | {
157 | ipad[i] = bkey[i] ^ 0x36363636;
158 | opad[i] = bkey[i] ^ 0x5C5C5C5C;
159 | }
160 |
161 | var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz);
162 | return core_md5(opad.concat(hash), 512 + 128);
163 | }
164 |
165 | /*
166 | * Add integers, wrapping at 2^32. This uses 16-bit operations internally
167 | * to work around bugs in some JS interpreters.
168 | */
169 | function safe_add(x, y)
170 | {
171 | var lsw = (x & 0xFFFF) + (y & 0xFFFF);
172 | var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
173 | return (msw << 16) | (lsw & 0xFFFF);
174 | }
175 |
176 | /*
177 | * Bitwise rotate a 32-bit number to the left.
178 | */
179 | function bit_rol(num, cnt)
180 | {
181 | return (num << cnt) | (num >>> (32 - cnt));
182 | }
183 |
184 | /*
185 | * Convert a string to an array of little-endian words
186 | * If chrsz is ASCII, characters >255 have their hi-byte silently ignored.
187 | */
188 | function str2binl(str)
189 | {
190 | var bin = Array();
191 | var mask = (1 << chrsz) - 1;
192 | for(var i = 0; i < str.length * chrsz; i += chrsz)
193 | bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32);
194 | return bin;
195 | }
196 |
197 | /*
198 | * Convert an array of little-endian words to a string
199 | */
200 | function binl2str(bin)
201 | {
202 | var str = "";
203 | var mask = (1 << chrsz) - 1;
204 | for(var i = 0; i < bin.length * 32; i += chrsz)
205 | str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask);
206 | return str;
207 | }
208 |
209 | /*
210 | * Convert an array of little-endian words to a hex string.
211 | */
212 | function binl2hex(binarray)
213 | {
214 | var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
215 | var str = "";
216 | for(var i = 0; i < binarray.length * 4; i++)
217 | {
218 | str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) +
219 | hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF);
220 | }
221 | return str;
222 | }
223 |
224 | /*
225 | * Convert an array of little-endian words to a base-64 string
226 | */
227 | function binl2b64(binarray)
228 | {
229 | var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
230 | var str = "";
231 | for(var i = 0; i < binarray.length * 4; i += 3)
232 | {
233 | var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16)
234 | | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 )
235 | | ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF);
236 | for(var j = 0; j < 4; j++)
237 | {
238 | if(i * 8 + j * 6 > binarray.length * 32) str += b64pad;
239 | else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F);
240 | }
241 | }
242 | return str;
243 | }
244 |
--------------------------------------------------------------------------------
/css/index.css:
--------------------------------------------------------------------------------
1 |
2 | .red{color:red;}
3 |
4 |
5 | /* border:1px solid red; */
6 | /* 主要内容区域 */
7 | #content{width:100%;min-height:560px;background:url(../images/content_bg.png) repeat-x;background-color:#000;}
8 | #banner_area{width:960px;height:360px;margin:0 auto;}
9 | .banner_pic{width:640px;height:360px;float:left;position:relative;}
10 | .prev_bg, .next_bg {position: absolute;top: 0px;height:360px;width: 320px;z-index: 4;}
11 | .prev_bg { left:0;}
12 | .next_bg { right:0;}
13 | .prev_link, .next_link {position: absolute;height: 150px;width: 75px;margin-top:105px;z-index: 5;display: none;}
14 | .prev_link {background: url(../images/banner/prev.png) no-repeat;left: 0px;}
15 | .next_link {background: url(../images/banner/next.png) no-repeat;right: 0px;}
16 | .banner_pic ul {position: absolute;top: 0;left: 0;z-index: 1;}
17 | .banner_pic li {position: absolute;top: 0;left:0;opacity:0;filter:alpha(opacity=0);}
18 | .banner_pic h2 {position:absolute;left:0;bottom:4px;font-size:20px;font-weight: bold;color:#ffc600;z-index:10;width:156px;height:38px;background:#000;opacity:0.7;filter:alpha(opacity=70);line-height:38px;padding-left:24px;}
19 | .banner_pic p {position:absolute;left: 180px;bottom:4px;font-size:14px;color: #ffcccc;line-height:38px; width: 460px;height:38px;z-index:10;background:#000;opacity:0.7;filter:alpha(opacity=70);}
20 |
21 | .banner_text{width:320px;height:360px;float:right;overflow:hidden;}
22 | .text_title{width:250px;height:50px;border-left:2px solid black;background:url(../images/text_title_bg.png) 0 no-repeat;font-size:24px;color:#ff8f00; font-style: italic;line-height:48px;padding-left:68px;}
23 | .text_bg{width:318px;height:310px;border-left:2px solid black;background:url(../images/bannertxt_bg.png) repeat-y;}
24 | .text_content{width:260px;height:270px;overflow:hidden;height:286px;position:relative;right:-30px;bottom:-10px;padding:0 4px;cursor:default;}
25 | .text1{position:absolute;top:0px;left:0;width:260px;min-height:100px;}
26 | .text2{position:absolute;top:390px;left:0;width:260px;min-height:100px;}
27 | .text1 h2, .text2 h2{color:#fff;padding-left:4px;font-weight:normal;text-shadow:-2px -2px 8px #008fd9, -2px -2px 8px #008fd9,2px -2px 8px #008fd9, 2px 2px 8px #008fd9;margin:10px 0;}
28 | .text1 p, .text2 p{color:#ffc600;font-size:14px;margin-top:6px;}
29 | p.last_p{margin-top:0;}
30 | h2.six_month{margin-top:20px;}
31 |
32 | #index_content, #news_content, #movies_content{width:960px;margin:0 auto;}
33 | /* 首页样式开始 */
34 | #index_content{min-height:513px;display:block;position:relative;}
35 | .left_nav{width:318px;height:513px;float:left;background:#034b6b;}
36 | .left_nav .playing, .left_nav .coming{width:250px;height:50px;background:url(../images/text_title_bg.png) 0 no-repeat;font-size:24px;color:#ff8f00; font-style: italic;line-height:48px;padding-left:68px;cursor:pointer;}
37 | .left_nav p.active{color:red;opacity:0.8;background:url(../images/text_hover_bg.png) 0 no-repeat;}
38 | .author_info{width:310px;height:150px;margin:100px 0 0 8px;}
39 | .author_info a{color:#ff8f00;}
40 | .blog_info, .douban_info{width:280px;height:29px;line-height:29px;padding-left:34px;margin-bottom:10px;}
41 | .blog_info{background:url(../images/author_icon.png) 0 -53px no-repeat;}
42 | .weibo_info{background:url(../images/author_icon.png) 0 0 no-repeat;width:280px;height:24px;line-height:24px;padding-left:34px;margin-bottom:10px;}
43 | .douban_info{background:url(../images/author_icon.png) 0 -24px no-repeat;}
44 |
45 | .right_movie_info{width:642px;background:#fff;float:left;min-height:513px;}
46 | .playing_info{width:642px;display:block;}
47 | .playing_movie, .coming_movie{width:602px;height:170px;padding-left:40px;border-bottom:1px dashed #343637;}
48 | .playing_movie .movie_pic, .coming_movie .movie_pic{width:100px;height:140px;float:left;margin-top:14px;overflow:hidden;border:1px solid #333;display:block;}
49 | .playing_movie .movie_detail, .coming_movie .movie_detail{width:480px;height:130px;float:right;margin-top:16px;position:relative;}
50 | .playing_movie .movie_detail h2, .coming_movie .movie_detail h2{font-weight:normal;color:#2aa2db;}
51 | .playing_movie .movie_detail h2 span{color:red;}
52 | .playing_movie .movie_detail span.douban_average{font-size:12px;color:#343637;margin-left:10px;}
53 | .playing_movie .movie_detail h4, .coming_movie .movie_detail h4{font-size:14px;color:#343637;margin-top:7px;}
54 | .playing_movie .movie_detail h4 span, .coming_movie .movie_detail h4 span{margin-right:40px;font-weight:normal;padding-left:2px;}
55 | .playing_movie .play_time{margin-top:8px;width:480px;height:20px;overflow:hidden;}
56 | .playing_movie .play_time span{background:#dde0e1;margin-right:10px;padding:0 1px;}
57 | .playing_movie .movie_intro, .coming_movie .movie_intro{position:absolute;right:10px;top:0px;width:70px;height:30px;line-height:30px;background:#dde0e1;text-align:center;cursor:default;}
58 | .coming_movie .movie_advance{width:44px;height:30px;background:url(../images/advance_bg.png) no-repeat;padding-left:26px;position:absolute;right:90px;top:0;line-height:30px;cursor:pointer;}
59 | .playing_movie .movie_summa, .coming_movie .movie_summa{position:absolute;width:260px;min-height:100px;right:10px;top:54px;z-index:10;background-color:#d0cccc;line-height:20px;text-indent:26px;display:none;padding:4px 6px;cursor:default;}
60 | .playing_movie .summary_bg, .coming_movie .summary_bg{position:absolute;right:10px;top:30px;display:none;}
61 |
62 | .coming_info{width:642px;display:none;}
63 | .coming_movie .movie_detail h2 span{font-size:14px;margin-left:6px;}
64 | .coming_movie a.favo_link{width:20px;height:20px;display:block;position:absolute;top:6px;left:350px;background:url(../images/favo_link.png) 0 0 no-repeat;}
65 | .coming_movie a.favo_link:hover, .coming_movie a.favo_linked{background:url(../images/favo_link.png) 0 -20px no-repeat;width:20px;height:20px;display:block;position:absolute;top:6px;left:350px;}
66 | .coming_movie .favo_add{position:absolute;top:2px;left:374px;color:red;opacity:0;}
67 | .coming_movie .text_favorite{height:20px;line-height:20px;position:absolute;top:6px;left:200px;}
68 | .coming_movie .text_favorite span{font-size:16px;color:red;}
69 |
70 | /* 最新动态样式开始 */
71 | #news_content{background:#fff;min-height:100px;display:none;}
72 | ul.news_lists{width:318px;min-height:70px;float:left;background:#034b6b;}
73 | .news_lists li a{color:#fff;padding-left:10px;display:inline-block;}
74 | .news_lists li span{color:#fff;display:inline-block;float:right;padding-right:10px;}
75 | .news_lists li{width:318px;height:30px;line-height:30px;border-bottom:1px dashed #343637;}
76 | .news_lists li.li_head, .news_lists li.li_head:hover{width:250px;height:50px;background:url(../images/text_title_bg.png) 0 no-repeat;font-size:24px;color:#ff8f00; font-style: italic;line-height:48px;padding-left:68px;cursor:default;border-bottom:none;margin-bottom:10px;}
77 | .news_lists li:hover, .news_lists li:hover a, .news_lists li:hover span{color:#ff8f00;background:#0e6488;cursor:pointer;text-decoration:none;}
78 | .news_lists li.linked, .news_lists li.linked a, .news_lists li.linked span{color:#ff8f00;background:#0e6488;cursor:pointer;text-decoration:none;}
79 | .news_wrap{width:602px;min-height:257px;float:left;background:#fff;padding-bottom:0px;padding:20px;}
80 | .news_wrap h2{width:602px;height:40px;line-height:40px;text-align:center;}
81 | .news_wrap h4{width:132px;height:26px;line-height:26px;margin-left:316px;margin-bottom:20px;}
82 | .news_wrap div{margin-top:10px;}
83 | /* .news_wrap div, .news_wrap p{width:560px;padding:16px 40px 0 40px;line-height:30px;text-indent:20px;} */
84 | .news_wrap img{width:300px;height:426px;margin:0 auto;display:block;margin-top:20px;}
85 |
86 | /* 电影仓库样式开始 */
87 | #movies_content{background:#fff;min-height:300px;padding:20px 10px 30px 10px;width:940px;display:none;}
88 | #movie_area p.img{width:960px;height:32px;margin-top:200px;text-align:center;}
89 | .category{margin-bottom:20px;width:650px;height:20px;float:left;}
90 | .category strong{color:red;float:left;}
91 | .cate_contry, .cate_story{float:left;margin-left:20px;color:#ff8f00;}
92 | .category span, .all_movie{display:inline-block;width:36px;height:20px;line-height:20px;cursor:pointer;border-radius:2px;text-align:center;}
93 | .category span.selected, .category span:hover, .all_movie:hover, .selected{background:#d0cccc;color:#ff8f00;border-radius:4px;}
94 | .search{width:211px;height:28px;float:right;margin-left:8px;}
95 | .search input[type="text"]{width:161px;height:28px;line-height:28px;padding-left: 10px;background:url(../images/search_bg.png) no-repeat;position:relative;top:-9px;}
96 | .search .search_link{width:30px;height:26px;background:url(../images/search_btn.png) 0 0;position:relative;top:-2px;left:-4px;cursor:pointer;}
97 | .search .search_link:hover{background-position:0 -26px;}
98 | .movie_area{width:960px;min-height:300px;float:left;background:#fff;margin-left:-10px;}
99 | .one_movie{width:100px;height:180px;float:left;margin:10px 0 20px 50px;}
100 | .one_movie .one_pic{width:100px;height:140px;overflow:hidden;}
101 | .one_movie a{display:inline-block;width:98px;height:138px;border:1px solid #343637;}
102 | .one_movie .one_title{width:100px;height:20px;line-height:20px;margin-top:12px;text-align:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;}
103 | #pages_area{width:700px;height:30px;clear:both;color:#1e1e1e;text-align:center;margin:40px auto 0;}
104 |
105 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | jarson影院首页
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
Contact me:
54 |
18513032662
55 |
1031356013
56 |
57 |
58 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 | 木星上行
95 | 讲述未来世界,拥有狼基因的赏金猎人奉命追杀与宇宙女王相同基因......
96 |
97 |
98 |
99 | 超能陆战队
100 | 主要讲述充气机器人大白与天才少年小宏联手菜鸟小伙伴组建超能陆战......
101 |
102 |
103 |
104 | 帕丁顿熊
105 | 讲述了这只喜欢吃果酱的小熊从暗无天日的秘鲁抵达伦敦迷路后,与人......
106 |
107 |
108 |
109 | 狼图腾
110 | 是一部以狼为叙述主体的小说,讲述了上个世纪六七十年代一位知青在......
111 |
112 |
113 |
114 |
115 |
优惠活动
116 |
117 |
118 |
119 |
影院公告
120 |
1.金卡:充值200 元,25元2D/3D通看,购买单品享受9.5 折!
121 |
2.钻卡:充值500 元,20元2D/3D通看,购买单品享受9.0 折!
122 |
3.会员观看每日17点 前的场次参加幸运大转盘抽奖,均有机会获得免费 观影资格!
123 |
124 |
6月活动详情
125 |
1.金卡会员充1000元送300 元,(每月30,分10月送达)。
126 |
2.钻卡会员充2000元送1000 元,(每月100,分10月送达)。
127 |
3.本月每周三:
128 |
观影低至15 元,全天同通看,卖场商品全部8.8 折!
129 |
130 |
131 |
影院公告
132 |
1.金卡:充值200 元,25元2D/3D通看,购买单品享受9.5 折!
133 |
2.钻卡:充值500 元,20元2D/3D通看,购买单品享受9.0 折!
134 |
3.会员观看每日17点 前的场次参加幸运大转盘抽奖,均有机会获得免费 观影资格!
135 |
136 |
6月活动详情
137 |
1.金卡会员充1000元送300 元,(每月30,分10月送达)。
138 |
2.钻卡会员充2000元送1000 元,(每月100,分10月送达)。
139 |
3.本月每周三:
140 |
观影低至15 元,全天同通看,卖场商品全部8.8 折!
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
正在热映
151 |
即将上映
152 |
158 |
159 |
160 |
161 |
"+" 搏击迷城豆瓣评分: 4.6 国家:中国大陆 类型: 动作 导演:陈丽英 主演: 陈伟霆 / 赵柯 / 李菲儿 / 渡边奈绪子 / 斯琴高娃 6:45 8:00 9:45 12:10 15:30 16:40 18:10 20:35
剧情简介
生长于内蒙古大草原的年轻摔跤手——娜仁(赵柯 饰),应邀前往日本表演摔跤。临行前,金月婆婆(斯琴高娃 饰)托她寻找离别十多年的孙子赤那思(陈伟霆 饰)。
162 | 摔跤会主持人波士,永远戴着小丑面具,表现狂妄自大。摔跤会中,娜仁结识了被丈夫一度离弃的真和子(渡边奈绪子 饰),以及来自香港,与父亲冲突而离家出走的月月(李菲儿 饰)。波士诱使她们答应组队应战另一支凶猛的女子自由摔跤队。娜仁找到今月婆婆的孙子,他改名成若男,从事足疗按摩。出乎意料,若男拒绝一起回大草原的请求。波士和经纪人小百合利欲熏心,在娜仁事先不知的情形下,临时将比赛改为泥浆摔跤。娜仁忍辱参赛。随后发现波士的真实身份正是温纯的若男,也即五年前被迫退出相扑界的赤那思。愤恨之余,娜仁决心以爱唤醒童年伙伴的良知,找回迷失的自我.......
163 |
164 |
165 |
末日崩塌(美国) 年份:2015 类型:动作/冒险/灾难 导演:布拉德·佩顿 主演: 道恩·强森 / 卡拉·古奇诺 / 亚历珊德拉·达达里奥 / 艾恩·格拉法德 剧情简介
收藏成功
雷·盖恩斯(道恩·强森 Dwayne Johnson 饰)正驱车前往旧金山,随着一声巨响,周围的树木与电线杆变得七扭八歪,紧急刹车查看状况的盖恩斯被眼前的景象“惊呆了”:公路被一条深不见底的裂隙截断,甚至错位,加油站被裂成两半隔着“峡谷”遥遥相对。随着这场超级地震毫无预 兆的来袭,整个城市浓烟滚滚、火光冲天,高楼大厦相继倒塌,到处都是惊慌失措的市民。更要命的是,如此强烈的地震...
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
选择分类:
185 |
国家: 中国 美国 韩国 日本 泰国
186 |
剧情: 喜剧 爱情 惊悚 战争 历史 家庭 动作
187 |
188 |
全部
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
212 |
213 |
218 |
219 |
244 |
245 |
--------------------------------------------------------------------------------
/js/jpages.js:
--------------------------------------------------------------------------------
1 | /**
2 | * jQuery jPages v0.7
3 | * Client side pagination with jQuery
4 | * http://luis-almeida.github.com/jPages
5 | *
6 | * Licensed under the MIT license.
7 | * Copyright 2012 Luís Almeida
8 | * https://github.com/luis-almeida
9 | */
10 |
11 | ;(function($,window,document,undefined){var name="jPages",instance=null,defaults={containerID:"",first:false,previous:"← previous",next:"next →",last:false,links:"numeric",startPage:1,perPage:10,midRange:5,startRange:1,endRange:1,keyBrowse:false,scrollBrowse:false,pause:0,clickStop:false,delay:50,direction:"forward",animation:"",fallback:400,minHeight:true,callback:undefined};function Plugin(element,options){this.options=$.extend({},defaults,options);this._container=$("#"+this.options.containerID);if(!this._container.length)return;this.jQwindow=$(window);this.jQdocument=$(document);this._holder=$(element);this._nav={};this._first=$(this.options.first);this._previous=$(this.options.previous);this._next=$(this.options.next);this._last=$(this.options.last);this._items=this._container.children(":visible");this._itemsShowing=$([]);this._itemsHiding=$([]);this._numPages=Math.ceil(this._items.length/this.options.perPage);this._currentPageNum=this.options.startPage;this._clicked=false;this._cssAnimSupport=this.getCSSAnimationSupport();this.init();}Plugin.prototype={constructor:Plugin,getCSSAnimationSupport:function(){var animation=false,animationstring='animation',keyframeprefix='',domPrefixes='Webkit Moz O ms Khtml'.split(' '),pfx='',elm=this._container.get(0);if(elm.style.animationName)animation=true;if(animation===false){for(var i=0;i";$(requiredStyles).appendTo("head");if(this._cssAnimSupport&&this.options.animation.length)this._items.addClass("animated jp-hidden");else this._items.hide();},setNav:function(){var navhtml=this.writeNav();this._holder.each(this.bind(function(index,element){var holder=$(element);holder.html(navhtml);this.cacheNavElements(holder,index);this.bindNavHandlers(index);this.disableNavSelection(element);},this));if(this.options.keyBrowse)this.bindNavKeyBrowse();if(this.options.scrollBrowse)this.bindNavScrollBrowse();},writeNav:function(){var i=1,navhtml;navhtml=this.writeBtn("first")+this.writeBtn("previous");for(;i<=this._numPages;i++){if(i===1&&this.options.startRange===0)navhtml+="... ";if(i>this.options.startRange&&i<=this._numPages-this.options.endRange)navhtml+="";else
12 | navhtml+=" ";switch(this.options.links){case"numeric":navhtml+=i;break;case"blank":break;case"title":var title=this._items.eq(i-1).attr("data-title");navhtml+=title!==undefined?title:"";break;}navhtml+=" ";if(i===this.options.startRange||i===this._numPages-this.options.endRange)navhtml+="... ";}navhtml+=this.writeBtn("next")+this.writeBtn("last")+"";return navhtml;},writeBtn:function(which){return this.options[which]!==false&&!$(this["_"+which]).length?""+this.options[which]+" ":"";},cacheNavElements:function(holder,index){this._nav[index]={};this._nav[index].holder=holder;this._nav[index].first=this._first.length?this._first:this._nav[index].holder.find("a.jp-first");this._nav[index].previous=this._previous.length?this._previous:this._nav[index].holder.find("a.jp-previous");this._nav[index].next=this._next.length?this._next:this._nav[index].holder.find("a.jp-next");this._nav[index].last=this._last.length?this._last:this._nav[index].holder.find("a.jp-last");this._nav[index].fstBreak=this._nav[index].holder.find("span:first");this._nav[index].lstBreak=this._nav[index].holder.find("span:last");this._nav[index].pages=this._nav[index].holder.find("a").not(".jp-first, .jp-previous, .jp-next, .jp-last");this._nav[index].permPages=this._nav[index].pages.slice(0,this.options.startRange).add(this._nav[index].pages.slice(this._numPages-this.options.endRange,this._numPages));this._nav[index].pagesShowing=$([]);this._nav[index].currentPage=$([]);},bindNavHandlers:function(index){var nav=this._nav[index];nav.holder.bind("click.jPages",this.bind(function(evt){var newPage=this.getNewPage(nav,$(evt.target));if(this.validNewPage(newPage)){this._clicked=true;this.paginate(newPage);}evt.preventDefault();},this));if(this._first.length){this._first.bind("click.jPages",this.bind(function(){if(this.validNewPage(1)){this._clicked=true;this.paginate(1);}},this));}if(this._previous.length){this._previous.bind("click.jPages",this.bind(function(){var newPage=this._currentPageNum-1;if(this.validNewPage(newPage)){this._clicked=true;this.paginate(newPage);}},this));}if(this._next.length){this._next.bind("click.jPages",this.bind(function(){var newPage=this._currentPageNum+1;if(this.validNewPage(newPage)){this._clicked=true;this.paginate(newPage);}},this));}if(this._last.length){this._last.bind("click.jPages",this.bind(function(){if(this.validNewPage(this._numPages)){this._clicked=true;this.paginate(this._numPages);}},this));}},disableNavSelection:function(element){if(typeof element.onselectstart!="undefined")element.onselectstart=function(){return false;};else if(typeof element.style.MozUserSelect!="undefined")element.style.MozUserSelect="none";else
13 | element.onmousedown=function(){return false;};},bindNavKeyBrowse:function(){this.jQdocument.bind("keydown.jPages",this.bind(function(evt){var target=evt.target.nodeName.toLowerCase();if(this.elemScrolledIntoView()&&target!=="input"&&target!="textarea"){var newPage=this._currentPageNum;if(evt.which==37)newPage=this._currentPageNum-1;if(evt.which==39)newPage=this._currentPageNum+1;if(this.validNewPage(newPage)){this._clicked=true;this.paginate(newPage);}}},this));},elemScrolledIntoView:function(){var docViewTop,docViewBottom,elemTop,elemBottom;docViewTop=this.jQwindow.scrollTop();docViewBottom=docViewTop+this.jQwindow.height();elemTop=this._container.offset().top;elemBottom=elemTop+this._container.height();return((elemBottom>=docViewTop)&&(elemTop<=docViewBottom));},bindNavScrollBrowse:function(){this._container.bind("mousewheel.jPages DOMMouseScroll.jPages",this.bind(function(evt){var newPage=(evt.originalEvent.wheelDelta||-evt.originalEvent.detail)>0?(this._currentPageNum-1):(this._currentPageNum+1);if(this.validNewPage(newPage)){this._clicked=true;this.paginate(newPage);}evt.preventDefault();return false;},this));},getNewPage:function(nav,target){if(target.is(nav.currentPage))return this._currentPageNum;if(target.is(nav.pages))return nav.pages.index(target)+1;if(target.is(nav.first))return 1;if(target.is(nav.last))return this._numPages;if(target.is(nav.previous))return nav.pages.index(nav.currentPage);if(target.is(nav.next))return nav.pages.index(nav.currentPage)+2;},validNewPage:function(newPage){return newPage!==this._currentPageNum&&newPage>0&&newPage<=this._numPages;},paginate:function(page){var itemRange,pageInterval;itemRange=this.updateItems(page);pageInterval=this.updatePages(page);this._currentPageNum=page;if($.isFunction(this.options.callback))this.callback(page,itemRange,pageInterval);this.updatePause();},updateItems:function(page){var range=this.getItemRange(page);this._itemsHiding=this._itemsShowing;this._itemsShowing=this._items.slice(range.start,range.end);if(this._cssAnimSupport&&this.options.animation.length)this.cssAnimations(page);else this.jQAnimations(page);return range;},getItemRange:function(page){var range={};range.start=(page-1)*this.options.perPage;range.end=range.start+this.options.perPage;if(range.end>this._items.length)range.end=this._items.length;return range;},cssAnimations:function(page){clearInterval(this._delay);this._itemsHiding.removeClass(this.options.animation+" jp-invisible").addClass("jp-hidden");this._itemsShowing.removeClass("jp-hidden").addClass("jp-invisible");this._itemsOriented=this.getDirectedItems(page);this._index=0;this._delay=setInterval(this.bind(function(){if(this._index===this._itemsOriented.length)clearInterval(this._delay);else{this._itemsOriented.eq(this._index).removeClass("jp-invisible").addClass(this.options.animation);}this._index=this._index+1;},this),this.options.delay);},jQAnimations:function(page){clearInterval(this._delay);this._itemsHiding.addClass("jp-hidden");this._itemsShowing.fadeTo(0,0).removeClass("jp-hidden");this._itemsOriented=this.getDirectedItems(page);this._index=0;this._delay=setInterval(this.bind(function(){if(this._index===this._itemsOriented.length)clearInterval(this._delay);else{this._itemsOriented.eq(this._index).fadeTo(this.options.fallback,1);}this._index=this._index+1;},this),this.options.delay);},getDirectedItems:function(page){var itemsToShow;switch(this.options.direction){case"backwards":itemsToShow=$(this._itemsShowing.get().reverse());break;case"random":itemsToShow=$(this._itemsShowing.get().sort(function(){return(Math.round(Math.random())-0.5);}));break;case"auto":itemsToShow=page>=this._currentPageNum?this._itemsShowing:$(this._itemsShowing.get().reverse());break;default:itemsToShow=this._itemsShowing;}return itemsToShow;},updatePages:function(page){var interval,index,nav;interval=this.getInterval(page);for(index in this._nav){if(this._nav.hasOwnProperty(index)){nav=this._nav[index];this.updateBtns(nav,page);this.updateCurrentPage(nav,page);this.updatePagesShowing(nav,interval);this.updateBreaks(nav,interval);}}return interval;},getInterval:function(page){var neHalf,upperLimit,start,end;neHalf=Math.ceil(this.options.midRange/2);upperLimit=this._numPages-this.options.midRange;start=page>neHalf?Math.max(Math.min(page-neHalf,upperLimit),0):0;end=page>neHalf?Math.min(page+neHalf-(this.options.midRange%2>0?1:0),this._numPages):Math.min(this.options.midRange,this._numPages);return{start:start,end:end};},updateBtns:function(nav,page){if(page===1){nav.first.addClass("jp-disabled");nav.previous.addClass("jp-disabled");}if(page===this._numPages){nav.next.addClass("jp-disabled");nav.last.addClass("jp-disabled");}if(this._currentPageNum===1&&page>1){nav.first.removeClass("jp-disabled");nav.previous.removeClass("jp-disabled");}if(this._currentPageNum===this._numPages&&pagethis.options.startRange||(this.options.startRange===0&&interval.start>0))nav.fstBreak.removeClass("jp-hidden");else nav.fstBreak.addClass("jp-hidden");if(interval.end1){clearTimeout(this._pause);if(this.options.clickStop&&this._clicked)return;else{this._pause=setTimeout(this.bind(function(){this.paginate(this._currentPageNum!==this._numPages?this._currentPageNum+1:1);},this),this.options.pause);}}},setMinHeight:function(){if(this.options.minHeight&&!this._container.is("table, tbody")){setTimeout(this.bind(function(){this._container.css({"min-height":this._container.css("height")});},this),1000);}},bind:function(fn,me){return function(){return fn.apply(me,arguments);};},destroy:function(){this.jQdocument.unbind("keydown.jPages");this._container.unbind("mousewheel.jPages DOMMouseScroll.jPages");if(this.options.minHeight)this._container.css("min-height","");if(this._cssAnimSupport&&this.options.animation.length)this._items.removeClass("animated jp-hidden jp-invisible "+this.options.animation);else this._items.removeClass("jp-hidden").fadeTo(0,1);this._holder.unbind("click.jPages").empty();}};$.fn[name]=function(arg){var type=$.type(arg);if(type==="object"){if(this.length&&!$.data(this,name)){instance=new Plugin(this,arg);this.each(function(){$.data(this,name,instance);});}return this;}if(type==="string"&&arg==="destroy"){instance.destroy();this.each(function(){$.removeData(this,name);});return this;}if(type==='number'&&arg%1===0){if(instance.validNewPage(arg))instance.paginate(arg);return this;}return this;};})(jQuery,window,document);
14 |
--------------------------------------------------------------------------------
/js/admin.js:
--------------------------------------------------------------------------------
1 | window.onload=function(){
2 | admin.app.init();
3 | }
4 |
5 | var admin={};
6 |
7 | admin.tools={};
8 | admin.tools.showmsg=function(txt,t){//显示提示信息的函数,txt是内容,t是显示时间
9 | $("body").append("" + txt + "
");//在body后面插入showmsg的div
10 | $(".showmsg").fadeIn().delay(t*1000).fadeOut(200,function(){
11 | $(".showmsg").remove();//用完之后删掉此div
12 | });
13 | }
14 |
15 | admin.tools.changeNav = function(){
16 | $(".top_nav li").each(function(i){
17 | $(this).click(function(){
18 | $(".top_nav li").removeClass('active');
19 | $(this).addClass('active');
20 | $('.content').css('display','none');
21 | $(".content"+(i+1)).css('display','block');
22 | });
23 | });
24 | }
25 |
26 | admin.tools.saveNews=function(){//存入新闻动态
27 | AV.initialize("9ovy0ez2i1odrxhz6n78l8s1v6jtzgvlluu35qewd6c9tjhv", "2o2ypw6wrt6skzqqcoei7pg0m63by0jee4cbfsk3t2rvor2j");
28 | var news_title = $("#news_title").val();
29 | var news_time = $("#news_time").val();
30 | var news_content = $(".nicEdit-main").html();
31 | var News = AV.Object.extend("News");//创建_News类,相当于是一个表
32 | var news = new News();
33 | if(news_title !='' && news_content !=' '){
34 | news.save({
35 | news_title:news_title,
36 | news_time:news_time,
37 | news_content:news_content
38 | }, {
39 | success: function() {
40 | admin.tools.showmsg('添加成功,快去刷新看看。',2);
41 | $("#news_title").val('');
42 | $(".nicEdit-main").html('');
43 | },
44 | error:function(){
45 | admin.tools.showmsg('添加失败!请检查网络!',2);
46 | }
47 | });
48 | }else{
49 | admin.tools.showmsg('请检查名称和内容!',2);
50 | }
51 | }
52 |
53 | admin.tools.bindContent_1=function(){
54 | String.prototype.replaceAll=function (AFindText,ARepText){
55 | var raRegExp=new RegExp(AFindText,"g");
56 | return this.replace(raRegExp,ARepText);
57 | };
58 | var nowTime =new Date();
59 |
60 | var year = nowTime.getFullYear();
61 | var month = (nowTime.getMonth()+1) >=10 ? (nowTime.getMonth()+1) : '0'+(nowTime.getMonth()+1);
62 | var day = nowTime.getDate() >= 10 ? nowTime.getDate() : '0'+nowTime.getDate();
63 | var hour = nowTime.getHours() >= 10 ? nowTime.getHours() : '0'+nowTime.getHours();
64 | var min = nowTime.getMinutes() >=10 ? nowTime.getMinutes() : '0'+nowTime.getMinutes();
65 | var news_time = year + '-' + month + '-' + day +' ' + hour + ':' + min;
66 |
67 | $("#news_time").val(news_time);
68 | $("#news_time").click(function(){
69 | admin.tools.showmsg('发布时间不能修改!',1);
70 | });
71 | $(".news_submit").click(function(){
72 | admin.tools.saveNews();
73 | });
74 | }
75 |
76 | admin.tools.bindContent_2 =function(){
77 | AV.initialize("9ovy0ez2i1odrxhz6n78l8s1v6jtzgvlluu35qewd6c9tjhv", "2o2ypw6wrt6skzqqcoei7pg0m63by0jee4cbfsk3t2rvor2j");
78 | function loadUserTable(){
79 | AV.Query.doCloudQuery('select * from Users', {
80 | success: function(d){
81 | var results =d.results;
82 | var user_html='';
83 | var user_name='',user_email='',user_phone='',user_desc='',user_favoId='',user_id='',user_pwd='';
84 | for(var i =0;i编辑 删除 ';
99 | $(".users_table tbody").append(user_html);
100 | }
101 | $(".users_table tbody").find("tr:odd").css("background-color", "#e0e3e4");
102 | },
103 | error: function(error){
104 | console.log(error);
105 | }
106 | });
107 | }
108 |
109 | loadUserTable();
110 | $('.users_table').delegate('.btn_edit','click',function(){
111 | $(this).parent().parent().find('input').css({'border':'1px solid #bbbec0','background-color':'#fff'}).removeAttr('disabled');
112 | $(this).removeClass('btn_edit').addClass('btn_save').text('保存');
113 | }).delegate('.btn_save','click',function(){
114 | var parent = $(this).parent().parent();
115 | var id = parent.attr('user_id');
116 | var txtname = parent.find('.name').val();
117 | var txtphone = parent.find('.phone').val();
118 | var txtemail = parent.find('.email').val();
119 | var txtdesc = parent.find('.desc').val();
120 | var txtfavoid = parent.find('.favoId').val();
121 | var txtpwd = parent.find('.password').val();
122 | txtpwd = hex_md5(txtpwd);
123 | if(txtname == '' || txtphone=='' || txtemail=='' || txtdesc=='' || txtfavoid=='' || txtpwd==''){
124 | admin.tools.showmsg('所有项均不能为空哟!',1);
125 | }else{
126 | var Users = AV.Object.extend("Users");//获取Uses表
127 | AV.Query.doCloudQuery('select objectId from Users where user_id='+id, {
128 | success: function(msg){
129 | var objectid =msg.results[0].id;
130 | var query = new AV.Query(Users);
131 | query.get(objectid, {
132 | success: function(user) {
133 | user.save({
134 | user_name:txtname,
135 | user_phone:txtphone,
136 | user_email:txtemail,
137 | user_desc:txtdesc,
138 | favo_movieID:txtfavoid,
139 | user_password:txtpwd
140 | });
141 | parent.find('input').css({'border':'none','background':'none'}).attr('disabled','disabled');
142 | admin.tools.showmsg('恭喜你,保存成功!',2);
143 | $('.users_table tbody').html('');
144 | loadUserTable();
145 | },
146 | error:function(error){
147 | console.log("Error:"+error.description);
148 | }
149 | });
150 | },
151 | error: function(error){
152 | console.dir(error);
153 | }
154 | });
155 | }
156 | }).delegate('.btn_del','click',function(){
157 | var parent = $(this).parent().parent();
158 | var id = parseInt(parent.attr('user_id'));
159 | var Users = AV.Object.extend("Users");//获取Uses表
160 | var query = new AV.Query(Users);
161 | query.equalTo("user_id", id);
162 | query.destroyAll({
163 | success: function(){
164 | admin.tools.showmsg('删除成功!',2);
165 | parent.remove();
166 | },
167 | error: function(err){
168 | console.error(err);
169 | }
170 | });
171 | }).delegate('.btn_confrim','click',function(){
172 | var parent = $(this).parent().parent();
173 | var txtname = parent.find('.name').val();
174 | var txtphone = parent.find('.phone').val();
175 | var txtemail = parent.find('.email').val();
176 | var txtdesc = parent.find('.desc').val();
177 | var txtfavoid = parent.find('.favoId').val();
178 | var txtpwd = parent.find('.password').val();
179 | txtpwd = hex_md5(txtpwd);
180 | if(txtname == '' || txtphone=='' || txtemail=='' || txtdesc=='' || txtfavoid=='' || txtpwd==''){
181 | admin.tools.showmsg('所有项均不能为空哟!',1);
182 | }else{
183 | var Users = AV.Object.extend("Users");//获取Uses表
184 | var users = new Users();
185 | AV.Query.doCloudQuery('select * from Users', {
186 | success: function(d){
187 | var len =1;
188 | if(d.results !=null){
189 | var len = d.results.length+1;
190 | }
191 | users.save({
192 | user_name:txtname,
193 | user_phone:txtphone,
194 | user_email:txtemail,
195 | user_desc:txtdesc,
196 | favo_movieID:txtfavoid,
197 | user_password:txtpwd,
198 | user_id:len
199 | }, {
200 | success: function(rsp) {
201 | admin.tools.showmsg('恭喜你,添加成功!',2);
202 | $('.users_table tbody').html('');
203 | loadUserTable();
204 | $('.btn_cancel').removeClass('btn_cancel').addClass('btn_add').text('添加用户');
205 | },
206 | error:function(error){
207 | console.log("Error:"+error.description);
208 | }
209 | });
210 | },
211 | error: function(error){
212 | console.log(error.description);
213 | }
214 | });
215 | }
216 | });
217 | $('.content2').delegate('.btn_add','click',function(){
218 | var add_html = '确定 ';
219 | $(".users_table tbody").append(add_html);
220 | $('.add_tr input').css({'border':'1px solid #bbbec0','background-color':'#fff'});
221 | $(this).removeClass('btn_add').addClass('btn_cancel').text('取消添加');
222 | }).delegate('.btn_cancel','click',function(){
223 | $('.add_tr').remove();
224 | $(this).removeClass('btn_cancel').addClass('btn_add').text('添加用户');
225 | })
226 | }
227 |
228 | admin.tools.bindContent_3 =function(){
229 | function showmsg(txt,t){//显示提示信息的函数,txt是内容,t是显示时间
230 | $("body").append("" + txt + "
");//在body后面插入showmsg的div
231 | $(".showmsg").fadeIn().delay(t*1000).fadeOut(200,function(){
232 | $(".showmsg").remove();//用完之后删掉此div
233 | });
234 | }
235 | $('.admin_yes').click(function(){
236 | var admin_name = $("#admin_name").val();
237 | var admin_pwd = $("#admin_pwd").val();
238 | var admin_pwd2 = $("#admin_pwd2").val();
239 | if(admin_name == '' || admin_pwd == '' || admin_pwd2 == ''){
240 | showmsg('每一项都不能为空哟!',2);
241 | }else{
242 | if(admin_pwd == admin_pwd2){
243 | AV.initialize("9ovy0ez2i1odrxhz6n78l8s1v6jtzgvlluu35qewd6c9tjhv", "2o2ypw6wrt6skzqqcoei7pg0m63by0jee4cbfsk3t2rvor2j");
244 | var Admin = AV.Object.extend("Admin");//获取Uses表
245 | var admin = new Admin();
246 | admin_pwd = hex_md5(admin_pwd);
247 | admin.save({
248 | ad_name: admin_name,
249 | ad_password: admin_pwd
250 | }, {
251 | success: function(rsp) {//注册信息成功存入数据库
252 | showmsg('成功加入管理员账户。',2);
253 | $('.content3 input').val('');
254 | },
255 | error:function(error){
256 | console.log("Error:"+error.description);
257 | }
258 | });
259 | }
260 | else{
261 | showmsg('确认密码与密码不一致!',2);
262 | }
263 | }
264 | });
265 | $('.admin_no').click(function(){
266 | $('.content3 input').val('');
267 | });
268 |
269 | }
270 |
271 | admin.tools.isLogin=function(){
272 | if(!$.cookie("ad_name") || $.cookie("ad_name") == 'null'){//如果当前没有用户登录
273 | $(".login_area").css("display","block");
274 | $(".whole_bg").css("display","block");
275 | }
276 | else{
277 | $("#txtAname").text($.cookie("ad_name"));
278 | $("#txtAname").attr('title', $.cookie("ad_name"));
279 | $(".login_area").fadeOut();
280 | $('.whole_bg').fadeOut();
281 | }
282 | }
283 |
284 | admin.app={};
285 | admin.app.init=function(){
286 | admin.tools.isLogin();//判断是否登陆
287 | $('.btn_login').click(function(){
288 | AV.initialize("9ovy0ez2i1odrxhz6n78l8s1v6jtzgvlluu35qewd6c9tjhv", "2o2ypw6wrt6skzqqcoei7pg0m63by0jee4cbfsk3t2rvor2j");//链接数据库
289 | var in_username =$(".p_user input").val();
290 | var in_password =$(".p_password input").val();
291 | in_password =hex_md5(in_password);
292 | if(in_username.length==0 || in_password.length==0){
293 | admin.tools.showmsg("输入信息不能为空!",1);
294 | }
295 | else{
296 | AV.Query.doCloudQuery('select * from Admin', {//获取Admin表格中的数据
297 | success: function(d){
298 | var results =d.results;
299 | var usernameArr =[],passwordArr=[];
300 | $.each(results,function(i){
301 | usernameArr.push(results[i]._serverData.ad_name);//获取所有用户名
302 | passwordArr.push(results[i]._serverData.ad_password);
303 | });
304 | var flag= $.inArray(in_username,usernameArr);//判断用户名(若有返回数组下标)
305 | var date = new Date();
306 | date.setTime(date.getTime() + (30 * 60 * 1000));//30分钟过期
307 | if(flag != -1){//usernameArr数组存在输入的名字
308 | if(in_password == passwordArr[flag]){//对应密码也正确
309 | $.cookie("ad_name",usernameArr[flag],{path:"/",expires:date,domain:'www.jzkjarson.com'});
310 | $("#txtAname").text(usernameArr[flag]);
311 | $("#txtAname").attr('title',usernameArr[flag]);
312 | $('.left_login input').val('');
313 | admin.tools.showmsg("欢迎进入后台管理系统!",1);
314 | $(".login_area").fadeOut();
315 | $('.whole_bg').fadeOut();
316 | }else{
317 | admin.tools.showmsg("输入密码不正确,请检查!",1);
318 | }
319 | }
320 | else{
321 | admin.tools.showmsg("输入用户不存在,请检查!",1);
322 | }
323 | },
324 | error: function(error){
325 | console.log(error.description);
326 | }
327 | });
328 | }
329 | });
330 |
331 | $('.login_out').click(function(){
332 | var date = new Date();
333 | date.setTime(date.getTime() + (30 * 60 * 1000));//30分钟过期
334 | $.cookie("ad_name",null,{path:"/",expires:date,domain:'www.jzkjarson.com'});//退出登录,删除cookie
335 | $("#txtAname").text('');
336 | admin.tools.showmsg("您已经成功退出系统!",1);
337 | setTimeout(function(){
338 | $(".login_area").fadeIn();
339 | $('.whole_bg').fadeIn();
340 | },1000);
341 | });
342 |
343 | admin.tools.changeNav();
344 | admin.tools.bindContent_1();
345 | admin.tools.bindContent_2();
346 | admin.tools.bindContent_3();
347 | }
348 |
--------------------------------------------------------------------------------
/js/account.js:
--------------------------------------------------------------------------------
1 | window.onload=function(){
2 | account.app.isLogin();//判断是否已经有账户登录
3 | account.app.changeNav();
4 | account.app.showtime();
5 | account.app.bindAccountEvent();
6 | }
7 |
8 | var account={
9 | apikey:'0065ba4916e7596001312edb44b60c20',
10 | secret:'46189a38878e00c9',
11 | callbackurl:'http://www.jzkjarson.com/WebFilm/account.html'
12 | };
13 | account.tools={};
14 |
15 | account.tools.loadLoginSuccess =function(index){//登陆成功,加载内容
16 | /*$(".owner_title").html('^_^欢迎您,'+$.cookie("name")+' 退出登录 ');
17 | $(".login_area input").val('');
18 | $(".login_area").fadeOut('slow');
19 | $(".whole_bg").fadeOut('slow');
20 | account.tools.clickEventOwn();*/
21 | account.tools.showmsg("恭喜您,登陆成功!",1);
22 | setTimeout(function(){
23 | window.location.href=account.callbackurl;
24 | },1500);
25 | }
26 |
27 | account.tools.loadfavoMovie=function(m_id){//加载一个喜欢的电影
28 | $.ajax({
29 | url: "https://api.douban.com/v2/movie/subject/"+m_id,
30 | data: $.extend({
31 | id: '12345',
32 | _ : Math.floor(Date.parse(new Date())/100000)
33 | }, {
34 | 'dpc': 1
35 | }),
36 | cache: false,
37 | dataType: "jsonp",
38 | success: function(rsp) {
39 | var m_href,m_pic,m_name,m_average,m_contry,m_director,m_type;
40 | var area1_html='';
41 | m_pic =rsp.images.medium;
42 | m_href =rsp.alt;
43 | m_name =rsp.title;
44 | m_average =rsp.rating.average;
45 | m_contry=rsp.countries.toString().split(',').join('/');
46 | m_director=rsp.directors[0].name;
47 | m_type=rsp.genres.toString().split(',').join('/');
48 |
49 | area1_html=''+m_name+' 国家:'+m_contry+'
导演:'+m_director+'
类型:'+m_type+'
豆瓣评分:'+m_average+'
';
50 | $(".area_1").append(area1_html);
51 | }
52 | });
53 | }
54 | account.tools.loadArea1=function(id){
55 | AV.initialize("9ovy0ez2i1odrxhz6n78l8s1v6jtzgvlluu35qewd6c9tjhv", "2o2ypw6wrt6skzqqcoei7pg0m63by0jee4cbfsk3t2rvor2j");//链接数据库
56 | AV.Query.doCloudQuery('select favo_movieID from Users where user_id='+id, {
57 | success: function(d){
58 | var results =d.results;
59 | var movieIdStr =results[0]._serverData.favo_movieID;
60 | var movieIdArr =[];
61 | if(movieIdStr.indexOf(',')!=-1){
62 | movieIdArr = movieIdStr.split(',');
63 | }
64 | movieIdArr.push(movieIdStr);//获取电影id的数组
65 |
66 | for(var i=0;i< movieIdArr.length;i++){
67 | var movieid=movieIdArr[i];
68 | account.tools.loadfavoMovie(movieid);
69 | }
70 | $(".area_1").append('
');
71 | },
72 | error: function(error){
73 | //查询失败,查看 error
74 | console.log(error);
75 | }
76 | });
77 | }
78 |
79 | account.tools.loadArea2 =function(id){
80 | if(!$.cookie("name") || $.cookie("name") == 'null'){//没有用户登录
81 | return false;
82 | }
83 | else{
84 | AV.initialize("9ovy0ez2i1odrxhz6n78l8s1v6jtzgvlluu35qewd6c9tjhv", "2o2ypw6wrt6skzqqcoei7pg0m63by0jee4cbfsk3t2rvor2j");
85 | AV.Query.doCloudQuery('select * from Users where user_id='+id, {
86 | success: function(d){
87 | var results =d.results;
88 | var name = results[0]._serverData.user_name;
89 | var phone = results[0]._serverData.user_phone;
90 | var email = results[0]._serverData.user_email;
91 | var desc = results[0]._serverData.user_desc;
92 |
93 | $(".u_name span").text(name);
94 | $(".u_phone span").text(phone);
95 | $(".u_email span").text(email);
96 | $(".u_desc span").text(desc);
97 | },
98 | error: function(error){
99 | //查询失败,查看 error
100 | console.log(error);
101 | }
102 | });
103 | }
104 | }
105 |
106 | account.tools.loadArea3 =function(){
107 | String.prototype.replaceAll=function (AFindText,ARepText){ //给string类扩展全部替换的方法;
108 | raRegExp=new RegExp(AFindText,"g");
109 | return this.replace(raRegExp,ARepText);
110 | }
111 | var XlabelArr =[];//横坐标显示的数组
112 | var flagArr =[];//用于判断哪一天的毫秒数
113 | var YcountArr =[147,345,179,180,0];//访问次数
114 | var daytime =24*60*60*1000;
115 | var nowtime = new Date();
116 | var today_start =new Date(nowtime.getFullYear() + '/' + (nowtime.getMonth()+1) +'/'+ nowtime.getDate()).getTime();//今日凌晨的毫秒数
117 | var today_end = today_start+daytime;
118 | for(var i =4;i>=0;i--){
119 | var dateLabel = new Date(today_start-(i*daytime));
120 | dateLabel = dateLabel.toLocaleDateString().replaceAll('/','-');
121 | XlabelArr.push(dateLabel);
122 | }
123 | for(var i=5;i>=0;i--){
124 | var flagtime = today_end -(i*daytime);
125 | flagArr.push(flagtime);
126 | }
127 | for(var i =0;i<=4;i++){
128 | if(nowtime.getTime() >= flagArr[i] && nowtime.getTime() < flagArr[i+1]){//判断属于哪一天的访问量
129 | var index = i;
130 | var storage = window.localStorage;
131 | if(!storage.pagecount){
132 | storage.pagecount = 0;
133 | }
134 | storage.pagecount = parseInt(storage.pagecount)+1;
135 | YcountArr[index] = parseInt(storage.pagecount);
136 | }
137 | }
138 | $("#container").highcharts({// 图表展示容器的id名称
139 | chart: {
140 | type:'column'//图表展示的类型,默认是line,线性,还有cloumn,列形。
141 | },
142 | title: {
143 | text:'jfiojggjierj',style:{color:'#fff'}//图表的名称
144 | },
145 | xAxis: {
146 | categories:XlabelArr//图表的x坐标的字段
147 | },
148 | yAxis: {
149 | title:{
150 | text:'单位(个)'//图表y轴的提示信息(解释信息,单位等等)
151 | }
152 | },
153 | series: [{ //制定数据列
154 | name: $.cookie('name'), //数据列名
155 | data: YcountArr //数据值
156 | }]
157 | });
158 | }
159 |
160 | account.tools.loadArea4 =function(){
161 |
162 | }
163 |
164 | account.tools.clickEventOwn=function(){//绑定个人空间页面的所有事件
165 | $(".owner_area").delegate('.login_out','click',function(){//"退出登录"按钮事件
166 | var date = new Date();
167 | date.setTime(date.getTime() + (30 * 60 * 1000));//30分钟过期
168 | $.cookie("name",null,{path:"/",expires:date,domain:'www.jzkjarson.com'});//退出登录,删除cookie
169 | account.tools.showmsg("您已成功退出登录!",1);
170 | setTimeout(function(){
171 | $(".right_content").html("立即登录
");
172 | $(".owner_title").html("登陆之后更精彩哟^_^");
173 | },1500);
174 | account.tools.loginAreaClick();
175 | });
176 | //绑定页面其他事件
177 | }
178 |
179 | account.tools.loginAreaClick=function(){
180 | $(".owner_area").delegate('.login_now','click',function(){//立即登录按钮事件
181 | $(".login_area").fadeIn('slow');
182 | $(".whole_bg").fadeIn('slow');
183 | $('.login_now').css("display","none");
184 | $(".close_btn").bind('click',function(){//登录窗口点击关闭按钮
185 | $(".login_area").fadeOut('slow');
186 | $(".whole_bg").fadeOut('slow');
187 | account.tools.showmsg("对不起!你没有成功登陆!",1);
188 | setTimeout(function(){
189 | $(".right_content").html("立即登录
");
190 | },1500);
191 | });
192 | });
193 |
194 | $(".login_area").delegate(".btn_login",'click',function(){//登陆事件
195 | AV.initialize("9ovy0ez2i1odrxhz6n78l8s1v6jtzgvlluu35qewd6c9tjhv", "2o2ypw6wrt6skzqqcoei7pg0m63by0jee4cbfsk3t2rvor2j");//链接数据库
196 | var in_username =$(".p_user input").val();
197 | var in_password =$(".p_password input").val();
198 | in_password =hex_md5(in_password);
199 | if(in_username.length==0 || in_password.length==0){
200 | account.tools.showmsg("输入信息不能为空!",2);
201 | }
202 | else{
203 | AV.Query.doCloudQuery('select * from Users', {//获取users表格中的数据
204 | success: function(d){
205 | var results =d.results;
206 | var usernameArr =[],userphoneArr=[],passwordArr=[],useridArr=[];
207 | $.each(results,function(i){
208 | usernameArr.push(results[i]._serverData.user_name);//获取所有用户名
209 | userphoneArr.push(results[i]._serverData.user_phone);
210 | passwordArr.push(results[i]._serverData.user_password);
211 | useridArr.push(results[i]._serverData.user_id);//获取id
212 | });
213 | var flag1= $.inArray(in_username,usernameArr);//判断用户名(若有返回数组下标)
214 | var flag2= $.inArray(in_username,userphoneArr);//判断用户名(可以为手机)
215 | var date = new Date();
216 | date.setTime(date.getTime() + (30 * 60 * 1000));//30分钟过期
217 | if(flag1 != -1){//usernameArr数组存在输入的名字
218 | if(in_password == passwordArr[flag1]){//对应密码也正确
219 | $.cookie("userid",useridArr[flag1],{path:"/",expires:date,domain:'www.jzkjarson.com'});//登陆成功,用户名存入cookie
220 | $.cookie("name",usernameArr[flag1],{path:"/",expires:date,domain:'www.jzkjarson.com'});
221 | $.cookie("password",in_password,{path:"/",expires:date,domain:'www.jzkjarson.com'});
222 | $("#txt_name").text(usernameArr[flag1]);
223 | account.tools.loadLoginSuccess(flag1+1);
224 | }else{
225 | account.tools.showmsg("输入密码不正确,请检查!",2);
226 | }
227 | }
228 | else if(flag2 != -1){//usernameArr不存在,但是phoneArr里存在用户名
229 | if(in_password == passwordArr[flag2]){//对应密码也正确
230 | $.cookie("name",usernameArr[flag1],{path:"/",expires:date,domain:'www.jzkjarson.com'});//登陆成功,用户名存入cookie
231 | $.cookie("password",in_password,{path:"/",expires:date,domain:'www.jzkjarson.com'});//登陆成功,用户密码存入cookie
232 | $("#txt_name").text(usernameArr[flag2]);
233 | account.tools.loadLoginSuccess(flag2+1);
234 | }else{
235 | account.tools.showmsg("输入密码不正确,请检查!",2);
236 | }
237 | }
238 | else{
239 | account.tools.showmsg("输入用户不存在,请检查!",2);
240 | }
241 | },
242 | error: function(error){
243 | console.log(error.description);
244 | }
245 | });
246 | }
247 | });
248 | }
249 |
250 | account.tools.showmsg=function(txt,t){//显示提示信息的函数,txt是内容,t是显示时间
251 | $("body").append("" + txt + "
");//在body后面插入showmsg的div
252 | $(".showmsg").fadeIn().delay(t*1000).fadeOut(200,function(){
253 | $(".showmsg").remove();//用完之后删掉此div
254 | });
255 | }
256 |
257 |
258 | account.app={}
259 | account.app.changeNav=function(){//切换到航事件
260 | $(".nav_index").click(function(){
261 | window.location.href="index.html?lable=index";
262 | });
263 | $(".nav_news").click(function(){
264 | window.location.href="index.html?lable=news";
265 | });
266 | $(".nav_movies").click(function(){
267 | window.location.href="index.html?lable=movies";
268 | });
269 | }
270 |
271 | account.app.showtime=function(){//动态显示时间函数
272 | displaytime();
273 | setInterval(displaytime,1000);
274 | function displaytime(){
275 | var Numbers = [];
276 | for(var i=0;i<10;i++){
277 | Numbers[i] = new Image();
278 | Numbers[i].src= "images/Numbers/" + i + ".gif"; //把Numbers数组里存放1——9的图片;
279 | }
280 | var Now = new Date();
281 | var time = [];
282 | var hrs = Now.getHours();
283 | hrs=(hrs<10 ? '0' : '') + hrs;//hrs存放的是小时数(两位);
284 | time[0]= hrs.charAt(0);//time数组的第一位存放hrs的第一个字符;
285 | time[1] = hrs.charAt(1);//time数组的第二位存放hrs的第二个字符;
286 | var mins = Now.getMinutes();
287 | mins = (mins < 10 ? '0' : '') + mins;
288 | time[2] = mins.charAt(0);
289 | time[3] = mins.charAt(1);
290 | var secs = Now.getSeconds();
291 | secs = (secs <10 ? '0' : '')+ secs;
292 | time[4] = secs.charAt(0);
293 | time[5] = secs.charAt(1);
294 | for(var i = 0; i< time.length;i++){
295 | var number= document.getElementById('d'+i);
296 | number.src=Numbers[time[i]].src;
297 | number.alt=time[i];
298 | }
299 | }
300 | }
301 |
302 | var count1,count2,count3,count4,count5;
303 | account.app.isLogin=function(){
304 | if(!$.cookie("name") || $.cookie("name") == 'null'){//如果当前没有用户登录
305 | $(".login_area").css("display","block");
306 | $(".whole_bg").css("display","block");
307 | $(".close_btn").bind('click',function(){//登录窗口点击关闭按钮
308 | $(".login_area").fadeOut('slow');
309 | $(".whole_bg").fadeOut('slow');
310 | account.tools.showmsg("对不起!你没有成功登陆!",1);
311 | setTimeout(function(){
312 | $(".right_content").html("立即登录
");
313 | },1500);
314 | });
315 | account.tools.loginAreaClick();
316 | }
317 | else{
318 | $(".owner_title").html('^_^欢迎您,'+$.cookie("name")+' 退出登录 ');
319 | var user_id =$.cookie("userid");
320 | account.tools.clickEventOwn();//登陆成功,绑定页面事件;
321 | account.tools.loadArea1(user_id);//填充喜欢的电影
322 | account.tools.loadArea2(user_id);//填充个人资料
323 | account.tools.loadArea3();
324 | }
325 | }
326 | account.app.bindAccountEvent=function(){//绑定个人空间的所有事件
327 | $(".left_link li").each(function(i){//左边导航按钮
328 | $(this).click(function(){
329 | $(".left_link li").removeClass("active");
330 | $(this).addClass("active");
331 | for(var j=1;j<5;j++){
332 | $(".area_"+j).css("display","none");
333 | }
334 | $(".area_"+(i+1)).css("display","block");
335 | if(i == 2){$("#container").css('display','block');}
336 | });
337 | });
338 | var name=/^[a-zA-Z0-9]+$/;//用户名仅支持字数数字;
339 | var phone =/^1[3|4|5|8][0-9]\d{4,8}$/;
340 | var email =/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
341 | var password = /^[\w]{6,14}$/;//6-12位密码,只能是字母加数字;
342 | var date = new Date();
343 | date.setTime(date.getTime() + (30 * 60 * 1000));//10分钟过期
344 |
345 | function addspan(obj,txt,flag){
346 | obj.parent().find("span.info").remove();
347 | var html_span =" "+txt+" ";
348 | obj.parent().append(html_span);
349 | }
350 | $(".area_2").delegate(".change_info","click",function(){//修改信息
351 | $(".ziliao_area span").css("display","none");
352 | $("p.cancel_info").css("display","block");
353 | $(".ziliao_area input").css("display","inline-block");
354 | $(".ziliao_area textarea").css("display","inline-block");
355 | $(".u_name input").val($(".u_name span:first").text());
356 | $(".u_phone input").val($(".u_phone span:first").text());
357 | $(".u_email input").val($(".u_email span:first").text());
358 | $(".u_desc textarea").val($(".u_desc span:first").text());
359 | $(this).removeClass("change_info").addClass("save_info").text("保存资料");
360 | }).delegate(".cancel_info","click",function(){//取消修改
361 | $(".ziliao_area span").css("display","inline-block");
362 | $(".ziliao_area input").val('');
363 | $(".ziliao_area span.info").css("display","none");
364 | $(".ziliao_area span.success").css("display","none");
365 | $(".ziliao_area span.error").css("display","none");
366 | $(".ziliao_area input").css("display","none");
367 | $(".ziliao_area textarea").css("display","none");
368 | $(".save_info").removeClass("save_info").addClass("change_info").text("修改资料");
369 | $(this).css("display","none");
370 | }).delegate(".save_info","click",function(){//保存信息
371 | var u_name =$(".u_name input").val();
372 | var u_phone =$(".u_phone input").val();
373 | var u_email =$(".u_email input").val();
374 | var u_desc =$(".u_desc textarea").val();
375 | var txt1='',txt2='',txt3='',txt4='',flag1='',flag2='',flag3='',flag4='';
376 | if(u_name.length == 0){//判断用户名
377 | txt1 ="用户名不能为空!";
378 | flag1='error';
379 | }else if(name.test(u_name)){
380 | txt1 ="新用户名可用。";
381 | flag1='success';
382 | }else{
383 | txt1 ="仅支持字母和数字。";
384 | flag1='error';
385 | }
386 | if(u_phone.length == 0){//判断手机号
387 | txt2 ="手机号不能为空!";
388 | flag2='error';
389 | }else if(phone.test(u_phone)){
390 | txt2 ="新手机号可用。";
391 | flag2='success';
392 | }else{
393 | txt2 ="手机号格式不对吧?";
394 | flag2='error';
395 | }
396 | if(u_email.length == 0){//判断邮箱
397 | txt3 ="邮箱地址不能为空!";
398 | flag3='error';
399 | }else if(email.test(u_email)){
400 | txt3 ="新邮箱地址可用。";
401 | flag3='success';
402 | }else{
403 | txt3 ="邮箱格式不对吧?";
404 | flag3='error';
405 | }
406 | if(u_desc.length == 0){//判断个人简介部分
407 | txt4="你没有填写简介。";
408 | flag4 ='success';
409 | }else if(u_desc.replace(/[^\x00-\xff]/g,"**").length>=60){
410 | txt4="内容不能超30字。";
411 | flag4 ='error';
412 | }else{
413 | txt4="简介写的不错哟!";
414 | flag4 ='success';
415 | }
416 | addspan($(".u_name input"),txt1,flag1);
417 | addspan($(".u_phone input"),txt2,flag2);
418 | addspan($(".u_email input"),txt3,flag3);
419 | addspan($(".u_desc textarea"),txt4,flag4);
420 | if($(".ziliao_area").find("span.error").length == 0){//找不到error标签
421 | AV.initialize("9ovy0ez2i1odrxhz6n78l8s1v6jtzgvlluu35qewd6c9tjhv", "2o2ypw6wrt6skzqqcoei7pg0m63by0jee4cbfsk3t2rvor2j");
422 | var id =$.cookie("userid");
423 | var txtname =$(".u_name input").val();
424 | var txtphone =$(".u_phone input").val();
425 | var txtemail =$(".u_email input").val();
426 | var txtdesc =$(".u_desc textarea").val();
427 |
428 | var Users = AV.Object.extend("Users");//获取Uses表
429 | AV.Query.doCloudQuery('select objectId from Users where user_id='+id, {
430 | success: function(msg){
431 | var objectid =msg.results[0].id;
432 | var query = new AV.Query(Users);
433 | query.get(objectid, {
434 | success: function(user) {
435 | user.save({
436 | user_name:txtname,
437 | user_phone:txtphone,
438 | user_email:txtemail,
439 | user_desc:txtdesc
440 | });
441 | $(".ziliao_area span").css("display","inline-block");
442 | $(".ziliao_area span.info").css("display","none");
443 | $(".ziliao_area span.success").css("display","none");
444 | $(".ziliao_area span.error").css("display","none");
445 | $(".ziliao_area input").css("display","none");
446 | $(".ziliao_area textarea").css("display","none");
447 | $("p.cancel_info").hide();
448 | $(".u_name span").text(txtname);
449 | $(".u_phone span").text(txtphone);
450 | $(".u_email span").text(txtemail);
451 | $(".u_desc span").text(txtdesc);
452 | $('.save_info').removeClass("save_info").addClass("change_info").text("修改资料");
453 | $.cookie("name",txtname,{path:"/",expires:date,domain:'www.jzkjarson.com'});
454 | $("#txt_name").text(txtname);
455 | account.tools.showmsg("保存资料成功!",2);
456 | },
457 | error:function(error){
458 | showmsg("Error:"+error.description);
459 | }
460 | });
461 | },
462 | error: function(error){
463 | console.dir(error);
464 | }
465 | });
466 | }
467 | }).delegate(".change_pwd","click",function(){//修改密码
468 | $(".pwd_area").css("display","block");
469 | $(".pwd_area input").val('');
470 | $(this).removeClass("change_pwd").addClass("save_pwd").text("保存密码");
471 | }).delegate(".cancel_pwd","click",function(){//取消修改
472 | $(".pwd_area").css("display","none");
473 | $(".save_pwd").removeClass("save_pwd").addClass("change_pwd").text("修改密码");
474 | }).delegate(".save_pwd","click",function(){//保存密码
475 | var old_pwd =$(".old_pwd input").val();
476 | old_pwd = hex_md5(old_pwd);
477 | var new_pwd =$(".new_pwd input").val();
478 | var confirm_pwd =$(".confirm_pwd input").val();
479 | var txt1='',txt2='',txt3='',flag1='',flag2='',flag3='';
480 | if(old_pwd.length == 0){//判断旧密码
481 | txt1 ="旧密码不能为空!";
482 | flag1='error';
483 | }else if($.cookie("password") == old_pwd){
484 | txt1 ="旧密码填写正确。";
485 | flag1='success';
486 | }else{
487 | txt1 ="旧密码填写错误!";
488 | flag1='error';
489 | }
490 | if(new_pwd.length == 0){//判断输入的新密码
491 | txt2 ="手机号不能为空!";
492 | flag2='error';
493 | }else if(password.test(new_pwd)){
494 | txt2 ="清牢记新密码。";
495 | flag2='success';
496 | }else{
497 | txt2 ="6-12位字母和数字!";
498 | flag2='error';
499 | }
500 | if(confirm_pwd.length == 0){//确认新密码
501 | txt3 ="确认密码不能为空!";
502 | flag3='error';
503 | }else if(confirm_pwd == new_pwd){
504 | txt3 ="两次输入一致。";
505 | flag3='success';
506 | }else{
507 | txt3 ="两次输入不一致!";
508 | flag3='error';
509 | }
510 | addspan($(".old_pwd input"),txt1,flag1);
511 | addspan($(".new_pwd input"),txt2,flag2);
512 | addspan($(".confirm_pwd input"),txt3,flag3);
513 | if($(".pwd_area").find("span.error").length == 0){//找不到error标签
514 | AV.initialize("9ovy0ez2i1odrxhz6n78l8s1v6jtzgvlluu35qewd6c9tjhv", "2o2ypw6wrt6skzqqcoei7pg0m63by0jee4cbfsk3t2rvor2j");
515 | var id =$.cookie("userid");
516 | var Users = AV.Object.extend("Users");//获取Uses表
517 | AV.Query.doCloudQuery('select objectId from Users where user_id='+id, {
518 | success: function(msg){
519 | var objectid =msg.results[0].id;
520 | var query = new AV.Query(Users);
521 | query.get(objectid, {
522 | success: function(user) {
523 | user.save({
524 | user_password:hex_md5(new_pwd)
525 | });
526 | $(".pwd_area span.info").css("display","none");
527 | $(".pwd_area span.success").css("display","none");
528 | $(".pwd_area span.error").css("display","none");
529 | $(".pwd_area").css("display","none");
530 | $(".save_pwd").removeClass("save_pwd").addClass("change_pwd").text("修改密码");
531 | $.cookie("password",new_pwd,{path:"/",expires:date,domain:'www.jzkjarson.com'});
532 | account.tools.showmsg("密码修改成功!清牢记!",2);
533 | },
534 | error:function(error){
535 | showmsg("Error:"+error.description);
536 | }
537 | });
538 | },
539 | error: function(error){
540 | console.dir(error);
541 | }
542 | });
543 | }
544 | }).delegate("input","focus",function(){
545 | $(this).css({"border-color":"blue","box-shadow":'0 0 5px blue'});
546 | }).delegate("input","blur",function(){
547 | $(this).css({"border-color":"#666","box-shadow":"none"});
548 | }).delegate("textarea","focus",function(){
549 | $(this).css({"border-color":"blue","box-shadow":'0 0 5px blue'});
550 | }).delegate("textarea","blur",function(){
551 | $(this).css({"border-color":"#666","box-shadow":"none"});
552 | });
553 | }
--------------------------------------------------------------------------------
/js/index.js:
--------------------------------------------------------------------------------
1 | window.onload = function(){
2 | film.ui.showtime();//显示时间
3 | film.ui.Tobanner();//图片轮播
4 | film.ui.slideTop();//优惠活动向上滑动
5 | film.ui.changeNav();//顶部导航+index页面按钮点击事件
6 | film.ui.getindexMovie();//加载‘正在热映’和即将上映的电影
7 | film.ui.loadNews();//获取最新动态列表
8 | }
9 |
10 | var film ={};
11 | film.tools={};
12 | film.tools.getStyle = function(obj,attr) {
13 | if(obj.currentStyle){
14 | return obj.currentStyle[attr];
15 | }
16 | else{
17 | return getComputedStyle(obj,false)[attr];
18 | }
19 | }
20 | film.tools.fadeIn = function(obj){ /*淡入函数,显示当前图片*/
21 | var iCur = film.tools.getStyle(obj,'opacity');
22 | if(iCur==1){
23 | return false;
24 | }
25 | var value = 0;
26 | clearInterval(obj.finishtimer);
27 | obj.finishtimer = setInterval(function() {
28 | var ispeed = 5;
29 | if (value == 100) {
30 | clearInterval(obj.finishtimer);
31 | }
32 | else {
33 | value = value + ispeed;
34 | obj.style.opacity = value/100;
35 | obj.style.filter = 'alpha(opacity='+value+')';
36 | }
37 | }, 30);
38 | }
39 | film.tools.fadeOut = function(obj) {/*淡出函数,隐藏其它函数*/
40 | var iCur = film.tools.getStyle(obj,'opacity');
41 | if(iCur==0){
42 | return false;
43 | }
44 | var value = 100;
45 | clearInterval(obj.finishtimer);
46 | obj.finishtimer = setInterval(function() {
47 | var ispeed = -5;
48 | if (value == 0) {
49 | clearInterval(obj.finishtimer);
50 | }
51 | else {
52 | value = value + ispeed;
53 | obj.style.opacity = value/100;
54 | obj.style.filter = 'alpha(opacity='+value+')';
55 | }
56 | }, 30);
57 | }
58 | film.tools.showmsg=function(txt,t){//显示提示信息的函数,txt是内容,t是显示时间
59 | $("body").append("" + txt + "
");//在body后面插入showmsg的div
60 | $(".showmsg").fadeIn().delay(t*1000).fadeOut(200,function(){
61 | $(".showmsg").remove();//用完之后删掉此div
62 | });
63 | }
64 |
65 | film.tools.loadplaying=function(index){//获取一个电影的信息(正在热映)
66 | $.ajax({
67 | url: "https://api.douban.com/v2/movie/subject/"+index,
68 | data: $.extend({
69 | id: '12345',
70 | _ : Math.floor(Date.parse(new Date())/100000)
71 | }, {
72 | 'dpc': 1
73 | }),
74 | cache: false,
75 | dataType: "jsonp",
76 | success: function(d) {
77 | var playing_html='';
78 | var img_path='',movie_name='',douban_average='',movie_contry='';
79 | var movie_type='',movie_director='',movie_casts='',movie_timeArr=[],movie_summa='';
80 |
81 | img_path =d.images.medium;//赋值电影图片
82 | movie_name =d.title;//赋值电影名字
83 | douban_average=d.rating.average;//赋值豆瓣评分
84 | movie_contry=d.countries.toString().split(',').join('/');
85 | movie_type=d.genres.toString().split(',').join('/');
86 | var directors_len=d.directors.length;
87 | if(directors_len==1){
88 | movie_director=d.directors[0].name;//设置电影导演
89 | }
90 | else{
91 | for(var i=1;i"+""+movie_name+"豆瓣评分: "+douban_average+" 国家:"+movie_contry+" 类型:"+movie_type+" 导演:"+movie_director+" 主演:"+movie_casts+" "+movie_time+"
剧情简介
"+text_summary+"
";
121 | $(".playing_info").append(playing_html);
122 | }
123 | });
124 | }
125 |
126 | film.tools.loadcoming =function(index){
127 | $.ajax({
128 | url: "https://api.douban.com/v2/movie/subject/"+index,
129 | data: $.extend({
130 | id: '12345',
131 | _ : Math.floor(Date.parse(new Date())/100000)
132 | }, {
133 | 'dpc': 1
134 | }),
135 | cache: false,
136 | dataType: "jsonp",
137 | success: function(d) {
138 | var coming_html='';
139 | var img_link='',img_path='',movie_name='',movie_contry='',movie_year='';
140 | var movie_type='',movie_director='',movie_casts='',movie_summa='';
141 |
142 | img_link =d.alt;
143 | img_path =d.images.medium;
144 | movie_name =d.title;
145 | movie_year = d.year;
146 | movie_contry=d.countries.toString().split(',').join('/');
147 | movie_type=d.genres.toString().split(',').join('/');
148 | movie_summa =d.summary;
149 | var directors_len=d.directors.length;
150 | if(directors_len==1){
151 | movie_director=d.directors[0].name;//设置电影导演
152 | }
153 | else{
154 | for(var i=1;i'+movie_name+'('+movie_contry+') 年份:'+movie_year+' 类型:'+movie_type+' 导演:'+movie_director+' 主演:'+movie_casts+' 剧情简介
收藏成功
'+movie_summa+'
';
197 | $(".coming_info").append(coming_html);
198 | }
199 | }
200 | });
201 | }
202 |
203 | film.ui={};
204 | film.ui.showtime=function(){//动态显示时间函数
205 | displaytime();
206 | setInterval(displaytime,1000);
207 | function displaytime(){
208 | var Numbers = [];
209 | for(var i=0;i<10;i++){
210 | Numbers[i] = new Image();
211 | Numbers[i].src= "images/Numbers/" + i + ".gif"; //把Numbers数组里存放1——9的图片;
212 | }
213 | var Now = new Date();
214 | var time = [];
215 | var hrs = Now.getHours();
216 | hrs=(hrs<10 ? '0' : '') + hrs;//hrs存放的是小时数(两位);
217 | time[0]= hrs.charAt(0);//time数组的第一位存放hrs的第一个字符;
218 | time[1] = hrs.charAt(1);//time数组的第二位存放hrs的第二个字符;
219 | var mins = Now.getMinutes();
220 | mins = (mins < 10 ? '0' : '') + mins;
221 | time[2] = mins.charAt(0);
222 | time[3] = mins.charAt(1);
223 | var secs = Now.getSeconds();
224 | secs = (secs <10 ? '0' : '')+ secs;
225 | time[4] = secs.charAt(0);
226 | time[5] = secs.charAt(1);
227 | for(var i = 0; i< time.length;i++){
228 | var number= document.getElementById('d'+i);
229 | number.src=Numbers[time[i]].src;
230 | number.alt=time[i];
231 | }
232 | }
233 | }
234 |
235 | film.ui.Tobanner=function(){//图片自动轮播函数
236 | var lists =$(".banner_pic ul li");
237 | var iNow = 0;
238 | var finishtimer = setInterval(pictureNext, 4000);
239 | function pictureNext(){/*顺序轮播的函数(从左到右)*/
240 | if (iNow == lists.length-1){
241 | iNow = 0;
242 | }
243 | else{
244 | iNow++;
245 | }
246 | for(var i= 0;i< lists.length;i++){
247 | film.tools.fadeOut(lists[i]); /*隐藏不是当前的其他图片*/
248 | }
249 | film.tools.fadeIn(lists[iNow]);/* 显示当前的图片*/
250 | }
251 | function picturePrev(){/*顺序轮播的函数(从左到右)*/
252 | if (iNow == 0){
253 | iNow = lists.length-1;
254 | }
255 | else{
256 | iNow --;
257 | }
258 | for(var i= 0;i< lists.length;i++){
259 | film.tools.fadeOut(lists[i]); /*隐藏不是当前的其他图片*/
260 | }
261 | film.tools.fadeIn(lists[iNow]);/* 显示当前的图片*/
262 | }
263 | $(".banner_pic").delegate(".prev","mouseover",function(){
264 | $(".prev_link").css("display","block");
265 | clearInterval(finishtimer);
266 | });
267 | $(".banner_pic").delegate(".prev","mouseout",function(){
268 | $(".prev_link").css("display","none");
269 | finishtimer=setInterval(pictureNext, 4000);
270 | });
271 | $(".banner_pic").delegate(".next","mouseover",function(){
272 | $(".next_link").css("display","block");
273 | clearInterval(finishtimer);
274 | });
275 | $(".banner_pic").delegate(".next","mouseout",function(){
276 | $(".next_link").css("display","none");
277 | finishtimer=setInterval(pictureNext, 4000);
278 | });
279 | $(".prev_link").click(function(){
280 | picturePrev();
281 | });
282 | $(".next_link").click(function(){
283 | pictureNext();
284 | });//图片滚动区域函数
285 | }
286 |
287 | film.ui.slideTop=function(){
288 | var finishtimer =setInterval(changetext,40);
289 | $(".text_content").mouseover(function(){
290 | clearInterval(finishtimer);
291 | });
292 | $(".text_content").mouseout(function(){
293 | finishtimer =setInterval(changetext,40);
294 | });
295 | function changetext(){
296 | var ispeed =-1;
297 | var txttop1 =parseInt($('.text1').css('top'));
298 | var txttop2 =parseInt($('.text2').css('top'));
299 | if(txttop1 == -385){
300 | txttop1 =395;
301 | }
302 | if(txttop2 == -385){
303 | txttop2=395;
304 | }
305 | txttop1=txttop1+ispeed;
306 | txttop2=txttop2+ispeed;
307 | $('.text1').css('top',txttop1+'px');
308 | $('.text2').css('top',txttop2+'px');
309 | }
310 | }
311 |
312 | film.ui.changeNav=function(){/*切换顶部导航事件*/
313 | film.ui.clickEventIndex();/*绑定首页的按钮点击事件*/
314 | $(".nav_index").click(function(){
315 | window.location.href="index.html?lable=index";
316 | });
317 | $(".nav_news").click(function(){
318 | window.location.href="index.html?lable=news";
319 | });
320 | $(".nav_movies").click(function(){
321 | window.location.href="index.html?lable=movies";
322 | });
323 | var href=window.location.href;//获取浏览器地址
324 | if(href.indexOf('?')==-1){//不存在?标志,属于index页面
325 | $("#index_content").css("display","block");
326 | $("#news_content").css("display","none");
327 | $("#movies_content").css("display","none");
328 | $(".nav_area a").removeClass("active");
329 | $("a.nav_index").addClass("active");
330 | }else{
331 | var lable=href.split('?')[1].split('=')[1];
332 | if(lable=='index'){
333 | $("#index_content").css("display","block");
334 | $("#news_content").css("display","none");
335 | $("#movies_content").css("display","none");
336 | $(".nav_area a").removeClass("active");
337 | $("a.nav_index").addClass("active");
338 | }
339 | else if(lable=='news'){
340 | $("#index_content").css("display","none");
341 | $("#news_content").css("display","block");
342 | $("#movies_content").css("display","none");
343 | $(".nav_area a").removeClass("active");
344 | $("a.nav_news").addClass("active");
345 | document.title = 'jarson影院- 新闻动态';
346 | }
347 | else if(lable=='movies'){
348 | $("#index_content").css("display","none");
349 | $("#news_content").css("display","none");
350 | $("#movies_content").css("display","block");
351 | $(".nav_area a").removeClass("active");
352 | $("a.nav_movies").addClass("active");
353 | document.title = 'jarson影院-电影仓库'
354 | film.ui.chooseCate();//电影加载和分类事件
355 | }
356 | }
357 |
358 | }
359 |
360 | film.ui.clickEventIndex=function(){/*绑定首页的按钮点击事件*/
361 | $(".playing").click(function(){//点击正在上映按钮
362 | $(".playing_info").css("display","block");
363 | $(".coming_info").css("display","none");
364 | $(this).addClass("active");
365 | $(".coming").removeClass("active");
366 | });
367 | $(".coming").click(function(){//点击即将上映按钮
368 | $(".coming_info").css("display","block");
369 | $(".playing_info").css("display","none");
370 | $(this).addClass("active");
371 | $(".playing").removeClass("active");
372 | });
373 | $(".coming_info").delegate("a.favo_link","click",function(){//点赞按钮点击事件
374 | var me =$(this);
375 | if(!$.cookie("name") || $.cookie("name") == 'null'){//没有用户登录
376 | film.tools.showmsg("请先去个人空间登陆!",2);
377 | }
378 | else{//收藏成功,电影id存入数据库
379 | AV.initialize("9ovy0ez2i1odrxhz6n78l8s1v6jtzgvlluu35qewd6c9tjhv", "2o2ypw6wrt6skzqqcoei7pg0m63by0jee4cbfsk3t2rvor2j");
380 | var id =$.cookie("userid");
381 | var Users = AV.Object.extend("Users");//获取Uses表
382 | AV.Query.doCloudQuery('select objectId,favo_movieID from Users where user_id='+id, {
383 | success: function(msg){
384 | var objectid = msg.results[0].id;
385 | var favoIDstr = msg.results[0]._serverData.favo_movieID;
386 | var favo_id = me.parent().find('.h2_title').attr('movieid');
387 | favoIDstr = favoIDstr+',' +favo_id;
388 | var query = new AV.Query(Users);
389 | query.get(objectid, {
390 | success: function(user) {
391 | user.save({
392 | favo_movieID:favoIDstr
393 | });
394 | me.next().animate({top:'-16px',opacity:'1'}).delay(500).fadeOut();
395 | me.addClass('favo_linked').removeClass('favo_link');
396 | },
397 | error:function(error){
398 | console.log("Error:"+error.description);
399 | }
400 | });
401 | }
402 | });
403 | }
404 | });
405 | $(".coming_info").delegate("a.favo_linked","click",function(){//点赞按钮点击事件
406 | film.tools.showmsg("你已经收藏过了^_^",2);
407 | });
408 | $(".right_movie_info").delegate('.movie_intro','mouseover',function(){//绑定剧情简介显示事件
409 | $(this).parent().find(".movie_summa").css("display","block");
410 | $(this).parent().find(".summary_bg").css("display","block");
411 | });
412 | $(".right_movie_info").delegate('.movie_summa','mouseover',function(){
413 | $(this).parent().find(".movie_summa").css("display","block");
414 | $(this).parent().find(".summary_bg").css("display","block");
415 | });
416 | $(".right_movie_info").delegate('.summary_bg','mouseover',function(){
417 | $(this).parent().find(".movie_summa").css("display","block");
418 | $(this).parent().find(".summary_bg").css("display","block");
419 | });
420 | $(".right_movie_info").delegate('.movie_intro','mouseout',function(){
421 | $(this).parent().find(".movie_summa").css("display","none");
422 | $(this).parent().find(".summary_bg").css("display","none");
423 | });
424 | $(".right_movie_info").delegate('.movie_summa','mouseout',function(){
425 | $(this).parent().find(".movie_summa").css("display","none");
426 | $(this).parent().find(".summary_bg").css("display","none");
427 | });
428 | $(".right_movie_info").delegate('.summary_bg','mouseout',function(){
429 | $(this).parent().find(".movie_summa").css("display","none");
430 | $(this).parent().find(".summary_bg").css("display","none");
431 | });
432 | $(".close_btn").bind('click',function(){//登录窗口点击关闭按钮
433 | $(".login_area").fadeOut('slow');
434 | $(".whole_bg").fadeOut('slow');
435 | });
436 | }
437 |
438 | film.ui.loadNews=function(){//获取News表的数据
439 | AV.initialize("9ovy0ez2i1odrxhz6n78l8s1v6jtzgvlluu35qewd6c9tjhv", "2o2ypw6wrt6skzqqcoei7pg0m63by0jee4cbfsk3t2rvor2j");//链接数据库
440 | AV.Query.doCloudQuery('select count(*), * from News', {
441 | success: function(d){
442 | var results = d.results;
443 | var link_html ='最新动态 ';
444 | $(".news_lists").html(link_html);
445 | var content_html='';
446 | for(var i=0;i"+txt_time+" ";
450 | $(".news_lists").append(links_html);//填充完左边的动态导航项
451 | }
452 | $(".news_lists li:eq(1)").addClass("linked");
453 | $(".news_wrap").html(""+results[0]._serverData.news_title+" "+results[0]._serverData.news_time+" "+results[0]._serverData.news_content);
454 | $(".news_lists li").each(function(i){
455 | $(this).click(function(){//点击列表事件
456 | $(".news_lists li").removeClass("linked");
457 | $(this).addClass("linked");
458 | var txt_title =results[i-1]._serverData.news_title;
459 | var txt_time =results[i-1]._serverData.news_time;
460 | var txt_content =results[i-1]._serverData.news_content;
461 | content_html= ""+txt_title+" "+txt_time+" "+txt_content;
462 | $(".news_wrap").html(content_html);
463 | });
464 | });
465 | },
466 | error: function(error){
467 | console.log(error.description);
468 | }
469 | });
470 | }
471 |
472 |
473 | film.ui.getindexMovie=function(){
474 | film.tools.loadplaying(10741834);
475 | film.tools.loadplaying(26101065);
476 | film.tools.loadplaying(6846893);//
477 | film.tools.loadplaying(25972353);
478 | film.tools.loadplaying(24875534);//
479 | film.tools.loadplaying(26259634);//
480 | film.tools.loadplaying(24737155);//
481 | film.tools.loadplaying(24987018);
482 | film.tools.loadplaying(20427364);
483 | film.tools.loadplaying(6875611);
484 | film.tools.loadplaying(25718082);
485 | film.tools.loadplaying(20514902);
486 |
487 | setTimeout(function(){//加载即将上映
488 | film.tools.loadcoming(26323678);//
489 | film.tools.loadcoming(10741643);
490 | film.tools.loadcoming(26280556);
491 | film.tools.loadcoming(26335743);
492 | film.tools.loadcoming(19971593);
493 | film.tools.loadcoming(6873042);//
494 | film.tools.loadcoming(3680627);
495 | film.tools.loadcoming(25932073);
496 | film.tools.loadcoming(26348959);//
497 | film.tools.loadcoming(26339762);
498 | film.tools.loadcoming(26378829);//
499 | film.tools.loadcoming(26381387);
500 | film.tools.loadcoming(26220733);
501 | film.tools.loadcoming(25786077);
502 | film.tools.loadcoming(26345722);
503 | film.tools.loadcoming(10440138);
504 | },3000);
505 | }
506 |
507 | film.ui.getmoviesArea=function(url){//url为请求地址;
508 | $.ajax({
509 | url: url,
510 | data: $.extend({
511 | id: '12345',
512 | _ : Math.floor(Date.parse(new Date())/100000)
513 | }, {
514 | 'dpc': 1
515 | }),
516 | cache: false,
517 | dataType: "jsonp",
518 | success: function(d) {
519 | var results =d.subjects;
520 | var movie_pic,movie_title,movie_href;
521 | var movie_html='',len,num;
522 | if(d.total == 0){
523 | $(".movie_area").html(d.title);
524 | }
525 | else{
526 | if(d.count>d.total){//获取到的个数小于默认个数
527 | len=d.total;
528 | num=d.total;
529 | $("#pages_area").css("display","none");
530 | }
531 | else{
532 | len=d.count;
533 | num=30;//设置每页默认显示30条;
534 | }
535 | for(var i=0;i
"+movie_title+"
";
540 | }
541 | $(".movie_area").html(movie_html);
542 | }
543 | $(function(){
544 | $("#pages_area").jPages({
545 | containerID:'movie_area',
546 | first:'首页',
547 | last:'尾页',
548 | previous:'上一页',
549 | next:'下一页',
550 | perPage:num,
551 | startPage:1,
552 | midRange:5
553 | });
554 | });
555 | }
556 | });
557 | }
558 |
559 | film.ui.chooseCate=function(){//选择分类函数
560 | film.ui.getmoviesArea("https://api.douban.com/v2/movie/top250?count=250");//首先加载出一些电影
561 | $(".cate_contry span").click(function(){
562 | $("#movie_area").html('
');
563 | var tag_info1=$(this).text();
564 | $(".all_movie").removeClass("selected");
565 | $(".cate_contry span").removeClass("selected");
566 | $(this).addClass("selected");
567 | if($(".cate_story span.selected").length!=0){//剧情类别已经选择过
568 | var tag_info2=$(".cate_story span.selected").text();
569 | var url_link='https://api.douban.com/v2/movie/search?tag='+tag_info1+tag_info2;
570 | film.ui.getmoviesArea(url_link);
571 | }
572 | else{
573 | var url_link='https://api.douban.com/v2/movie/search?tag='+tag_info1;
574 | film.ui.getmoviesArea(url_link);
575 | }
576 | });
577 | $(".cate_story span").click(function(){
578 | $("#movie_area").html('
');
579 | var tag_info2=$(this).text();
580 | $(".all_movie").removeClass("selected");
581 | $(".cate_story span").removeClass("selected");
582 | $(this).addClass("selected");
583 | if($(".cate_contry span.selected").length!=0){//国家类别已经选择过
584 | var tag_info1=$(".cate_contry span.selected").text();
585 | var url_link='https://api.douban.com/v2/movie/search?tag='+tag_info1+tag_info2;
586 | film.ui.getmoviesArea(url_link);
587 | }
588 | else{
589 | var url_link='https://api.douban.com/v2/movie/search?tag='+tag_info2;
590 | film.ui.getmoviesArea(url_link);
591 | }
592 | });
593 | $(".search_link").click(function(){
594 | $(".category span").removeClass("selected");
595 | $(".all_movie").removeClass("selected");
596 | var url_link ='https://api.douban.com/v2/movie/search?q='+$(".txt_input").val();
597 | $("#movie_area").html('
');
598 | film.ui.getmoviesArea(url_link);
599 | });
600 | $(".all_movie").click(function(){
601 | $(".category span").removeClass("selected");
602 | $(this).addClass("selected");
603 | $("#movie_area").html('
');
604 | film.ui.getmoviesArea('https://api.douban.com/v2/movie/top250?count=250');
605 | });
606 | }
607 |
608 |
609 |
610 |
611 |
--------------------------------------------------------------------------------
/js/nicEdit.js:
--------------------------------------------------------------------------------
1 | /* NicEdit - Micro Inline WYSIWYG
2 | * Copyright 2007-2008 Brian Kirchoff
3 | *
4 | * NicEdit is distributed under the terms of the MIT license
5 | * For more information visit http://nicedit.com/
6 | * Do not remove this copyright message
7 | */
8 | var bkExtend=function(){var A=arguments;if(A.length==1){A=[this,A[0]]}for(var B in A[1]){A[0][B]=A[1][B]}return A[0]};function bkClass(){}bkClass.prototype.construct=function(){};bkClass.extend=function(C){var A=function(){if(arguments[0]!==bkClass){return this.construct.apply(this,arguments)}};var B=new this(bkClass);bkExtend(B,C);A.prototype=B;A.extend=this.extend;return A};var bkElement=bkClass.extend({construct:function(B,A){if(typeof (B)=="string"){B=(A||document).createElement(B)}B=$BK(B);return B},appendTo:function(A){A.appendChild(this);return this},appendBefore:function(A){A.parentNode.insertBefore(this,A);return this},addEvent:function(B,A){bkLib.addEvent(this,B,A);return this},setContent:function(A){this.innerHTML=A;return this},pos:function(){var C=curtop=0;var B=obj=this;if(obj.offsetParent){do{C+=obj.offsetLeft;curtop+=obj.offsetTop}while(obj=obj.offsetParent)}var A=(!window.opera)?parseInt(this.getStyle("border-width")||this.style.border)||0:0;return[C+A,curtop+A+this.offsetHeight]},noSelect:function(){bkLib.noSelect(this);return this},parentTag:function(A){var B=this;do{if(B&&B.nodeName&&B.nodeName.toUpperCase()==A){return B}B=B.parentNode}while(B);return false},hasClass:function(A){return this.className.match(new RegExp("(\\s|^)nicEdit-"+A+"(\\s|$)"))},addClass:function(A){if(!this.hasClass(A)){this.className+=" nicEdit-"+A}return this},removeClass:function(A){if(this.hasClass(A)){this.className=this.className.replace(new RegExp("(\\s|^)nicEdit-"+A+"(\\s|$)")," ")}return this},setStyle:function(A){var B=this.style;for(var C in A){switch(C){case"float":B.cssFloat=B.styleFloat=A[C];break;case"opacity":B.opacity=A[C];B.filter="alpha(opacity="+Math.round(A[C]*100)+")";break;case"className":this.className=A[C];break;default:B[C]=A[C]}}return this},getStyle:function(A,C){var B=(!C)?document.defaultView:C;if(this.nodeType==1){return(B&&B.getComputedStyle)?B.getComputedStyle(this,null).getPropertyValue(A):this.currentStyle[bkLib.camelize(A)]}},remove:function(){this.parentNode.removeChild(this);return this},setAttributes:function(A){for(var B in A){this[B]=A[B]}return this}});var bkLib={isMSIE:(navigator.appVersion.indexOf("MSIE")!=-1),addEvent:function(C,B,A){(C.addEventListener)?C.addEventListener(B,A,false):C.attachEvent("on"+B,A)},toArray:function(C){var B=C.length,A=new Array(B);while(B--){A[B]=C[B]}return A},noSelect:function(B){if(B.setAttribute&&B.nodeName.toLowerCase()!="input"&&B.nodeName.toLowerCase()!="textarea"){B.setAttribute("unselectable","on")}for(var A=0;A.nicEdit-main p { margin: 0; }