976 |
977 |
978 |
操作说明
979 | ';
980 | echo CONTEST_DETAIL;
981 | echo '
982 |
983 |
984 |
985 |
986 |
987 | ';
988 | }
989 | // 更新数据库,$flag为真则在线状态,否则离线。
990 | function update_db($flag)
991 | {
992 | if (is_login()) {
993 | // $db = connect_db();
994 | global $db;
995 | if ($flag) {
996 | $sqlcmd = 'update profile set online=' . USER_ONLINE . ',status=' . $_SESSION['User_status'] . ',qmark=' . ($_SESSION['User_qmark'] - 1) . ',qtime=' . $_SESSION['User_qtime'] . ',qans="' . addslashes(serialize($_SESSION['User_qans'])) . '",qid="' . addslashes(serialize($_SESSION['User_qid'])) . '" where id=' . $_SESSION['User_id'];
997 | } else {
998 | $sqlcmd = 'update profile set online=' . USER_OFFLINE . ',status=' . $_SESSION['User_status'] . ',qmark=' . ($_SESSION['User_qmark'] - 1) . ',qtime=' . $_SESSION['User_qtime'] . ',qans="' . addslashes(serialize($_SESSION['User_qans'])) . '",qid="' . addslashes(serialize($_SESSION['User_qid'])) . '" where id=' . $_SESSION['User_id'];
999 | }
1000 | $db->query($sqlcmd);
1001 | }
1002 | }
1003 | // 显示最终答题卡
1004 | function show_ans()
1005 | {
1006 | $open_ans = false;
1007 | if (mktime(23, 59, 59, 4, 12, 2015) - time() >= 0 && is_login() && $_SESSION['User_status'] == USER_SUBMIT) {
1008 | echo '
比赛结束后可查看答题情况!
';
1009 | } else {
1010 | $open_ans = true;
1011 | }
1012 | if (is_login() && $_SESSION['User_status'] == USER_SUBMIT && $open_ans) {
1013 | global $db;
1014 | if (isset($_GET['pqid']) && $_GET['pqid'] >= 1 && $_GET['pqid'] <= QUESTION_COUNT) {
1015 | $question = get_question($_GET['pqid']);
1016 | echo '
1017 |
1018 |
1019 |
1020 |
1021 |
1022 | ';
1023 | echo '
1024 |
1025 |
';
1040 | $sqlcmd = 'select Ans from question where id=' . $_SESSION['User_qid'][$_GET['pqid'] - 1];
1041 | $ans = $db->query($sqlcmd)->fetch_array();
1042 | echo '你的答案:
' . strtoupper($_SESSION['User_qans'][$_GET['pqid'] - 1]) . ' 正确答案:
' . strtoupper($ans[0]) . '';
1043 | echo '
1044 |
1045 |
1046 |
1047 |
1048 |
1049 | ';
1050 | }
1051 | echo '
1052 |
1053 |
1054 |
1055 |
1056 |
最终答题情况,点题号可以查看答案。
1057 |
1058 |
1059 | ';
1060 | for ($j = 0; $j < ceil(QUESTION_COUNT / 10); ++$j) {
1061 | echo '';
1062 | for ($i = 1; $i <= 10; ++$i) {
1063 | if (array_key_exists($j * 10 + $i - 1, $_SESSION['User_qans'])) {
1064 | $sqlcmd = 'select Ans from question where id=' . $_SESSION['User_qid'][$j * 10 + $i - 1];
1065 | $ans = $db->query($sqlcmd)->fetch_array();
1066 | if ($ans[0] == $_SESSION['User_qans'][$j * 10 + $i - 1]) {
1067 | echo '
1068 | ' . ($j * 10 + $i) . ' | ';
1069 | } else {
1070 | echo '
1071 | ' . ($j * 10 + $i) . ' | ';
1072 | }
1073 | } else {
1074 | echo '
1075 | ' . ($j * 10 + $i) . ' |
1076 | ';
1077 | }
1078 | }
1079 | echo '
';
1080 | }
1081 | echo '
1082 |
1083 |
1084 |
1085 |
1086 |
1087 |
1088 | ';
1089 | } elseif (is_login() && $_SESSION['User_status'] != USER_SUBMIT) {
1090 | echo '
尚未提交无法查看答题情况!
';
1091 | }
1092 | }
1093 |
--------------------------------------------------------------------------------
/help.php:
--------------------------------------------------------------------------------
1 |
7 |
10 |
13 |
--------------------------------------------------------------------------------
/img/201503302309.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netcan/baike_contest/633031404239e46b2f7556d80a47af3e3ab49fbd/img/201503302309.png
--------------------------------------------------------------------------------
/img/201503311826.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netcan/baike_contest/633031404239e46b2f7556d80a47af3e3ab49fbd/img/201503311826.gif
--------------------------------------------------------------------------------
/img/201504011815.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netcan/baike_contest/633031404239e46b2f7556d80a47af3e3ab49fbd/img/201504011815.gif
--------------------------------------------------------------------------------
/img/201504012247.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netcan/baike_contest/633031404239e46b2f7556d80a47af3e3ab49fbd/img/201504012247.gif
--------------------------------------------------------------------------------
/img/201504020908.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netcan/baike_contest/633031404239e46b2f7556d80a47af3e3ab49fbd/img/201504020908.gif
--------------------------------------------------------------------------------
/img/201504021419.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netcan/baike_contest/633031404239e46b2f7556d80a47af3e3ab49fbd/img/201504021419.gif
--------------------------------------------------------------------------------
/img/201504021754.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netcan/baike_contest/633031404239e46b2f7556d80a47af3e3ab49fbd/img/201504021754.png
--------------------------------------------------------------------------------
/img/201504041135.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netcan/baike_contest/633031404239e46b2f7556d80a47af3e3ab49fbd/img/201504041135.gif
--------------------------------------------------------------------------------
/img/201504041439.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netcan/baike_contest/633031404239e46b2f7556d80a47af3e3ab49fbd/img/201504041439.gif
--------------------------------------------------------------------------------
/img/Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netcan/baike_contest/633031404239e46b2f7556d80a47af3e3ab49fbd/img/Logo.png
--------------------------------------------------------------------------------
/img/spread.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netcan/baike_contest/633031404239e46b2f7556d80a47af3e3ab49fbd/img/spread.png
--------------------------------------------------------------------------------
/include/common.inc:
--------------------------------------------------------------------------------
1 |
43 |
你想拓展自己的课外知识吗?你想锻炼自己的答题能力吗?你想看到同学们在场上奋力拼搏的飒爽英姿吗?化工与食品加工系创新创业协会第二届百科知识竞赛诚挚邀请您参与!
44 |
45 |
46 | 注意平台开放时间!
47 |
48 |
49 |
50 |
51 | 各位同学请用自己的学号+身份证后六位登陆,登陆后请到个人资料中完善信息!无法登陆请联系我!
52 |
53 |
54 |
55 |
56 | 平台答题时间有限,12分钟(720秒),请注意答题时间!
57 |
58 |
59 |
60 |
61 | 若电脑答题,可采用方向键、WSAD、空格、回车切题,数字键1、2、3、4选择选项A、B、C、D。
62 |
63 |
64 |
65 |
66 | 答题过程中可暂停,或者注销,下次可继续答题!
67 |
68 |
69 |
70 |
71 | 比赛结束后开放个人答题卡,可查看自己做题情况!
72 |
73 |
74 |
75 |
76 |
77 | ');
78 |
79 | ?>
80 |
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
23 | function AddFavorite(sURL, sTitle) {
24 |
25 | sURL = encodeURI(sURL);
26 |
27 | try {
28 |
29 | window.external.addFavorite(sURL, sTitle);
30 |
31 | } catch (e) {
32 |
33 | try {
34 |
35 | window.sidebar.addPanel(sTitle, sURL, "");
36 |
37 | } catch (e) {
38 |
39 | alert("加入收藏失败,请使用Ctrl+D进行添加,或手动在浏览器里进行设置.");
40 |
41 | }
42 |
43 | }
44 |
45 | }
46 |
47 | ';
48 | echo '
平台开放时间:2015/04/11 00:00:00
请到帮助说明查看平台操作方法!
点击下面会徽有惊喜哦~
请将本页收藏!
';
49 | }
50 |
51 | echo '
初赛结束!
请前40名的同学登陆到个人资料中完善信息!
';
52 | ?>
53 |
56 |
--------------------------------------------------------------------------------
/js/bootstrap.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Bootstrap v3.3.4 (http://getbootstrap.com)
3 | * Copyright 2011-2015 Twitter, Inc.
4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5 | */
6 | if(typeof jQuery==="undefined"){throw new Error("Bootstrap's JavaScript requires jQuery")}+function(B){var A=B.fn.jquery.split(" ")[0].split(".");if((A[0]<2&&A[1]<9)||(A[0]==1&&A[1]==9&&A[2]<1)){throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}}(jQuery);+function(B){function A(){var C=document.createElement("bootstrap");var D={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var E in D){if(C.style[E]!==undefined){return{end:D[E]}}}return false}B.fn.emulateTransitionEnd=function(E){var D=false;var F=this;B(this).one("bsTransitionEnd",function(){D=true});var C=function(){if(!D){B(F).trigger(B.support.transition.end)}};setTimeout(C,E);return this};B(function(){B.support.transition=A();if(!B.support.transition){return}B.event.special.bsTransitionEnd={bindType:B.support.transition.end,delegateType:B.support.transition.end,handle:function(C){if(B(C.target).is(this)){return C.handleObj.handler.apply(this,arguments)}}}})}(jQuery);+function(E){var C='[data-dismiss="alert"]';var A=function(F){E(F).on("click",C,this.close)};A.VERSION="3.3.4";A.TRANSITION_DURATION=150;A.prototype.close=function(G){var H=E(this);var I=H.attr("data-target");if(!I){I=H.attr("href");I=I&&I.replace(/.*(?=#[^\s]*$)/,"")}var F=E(I);if(G){G.preventDefault()}if(!F.length){F=H.closest(".alert")}F.trigger(G=E.Event("close.bs.alert"));if(G.isDefaultPrevented()){return}F.removeClass("in");function J(){F.detach().trigger("closed.bs.alert").remove()}E.support.transition&&F.hasClass("fade")?F.one("bsTransitionEnd",J).emulateTransitionEnd(A.TRANSITION_DURATION):J()};function D(F){return this.each(function(){var G=E(this);var H=G.data("bs.alert");if(!H){G.data("bs.alert",(H=new A(this)))}if(typeof F=="string"){H[F].call(G)}})}var B=E.fn.alert;E.fn.alert=D;E.fn.alert.Constructor=A;E.fn.alert.noConflict=function(){E.fn.alert=B;return this};E(document).on("click.bs.alert.data-api",C,A.prototype.close)}(jQuery);+function(D){var A=function(F,E){this.$element=D(F);this.options=D.extend({},A.DEFAULTS,E);this.isLoading=false};A.VERSION="3.3.4";A.DEFAULTS={loadingText:"loading..."};A.prototype.setState=function(I){var E="disabled";var G=this.$element;var H=G.is("input")?"val":"html";var F=G.data();I=I+"Text";if(F.resetText==null){G.data("resetText",G[H]())}setTimeout(D.proxy(function(){G[H](F[I]==null?this.options[I]:F[I]);if(I=="loadingText"){this.isLoading=true;G.addClass(E).attr(E,E)}else{if(this.isLoading){this.isLoading=false;G.removeClass(E).removeAttr(E)}}},this),0)};A.prototype.toggle=function(){var G=true;var E=this.$element.closest('[data-toggle="buttons"]');if(E.length){var F=this.$element.find("input");if(F.prop("type")=="radio"){if(F.prop("checked")&&this.$element.hasClass("active")){G=false}else{E.find(".active").removeClass("active")}}if(G){F.prop("checked",!this.$element.hasClass("active")).trigger("change")}}else{this.$element.attr("aria-pressed",!this.$element.hasClass("active"))}if(G){this.$element.toggleClass("active")}};function C(E){return this.each(function(){var F=D(this);var H=F.data("bs.button");var G=typeof E=="object"&&E;if(!H){F.data("bs.button",(H=new A(this,G)))}if(E=="toggle"){H.toggle()}else{if(E){H.setState(E)}}})}var B=D.fn.button;D.fn.button=C;D.fn.button.Constructor=A;D.fn.button.noConflict=function(){D.fn.button=B;return this};D(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(E){var F=D(E.target);if(!F.hasClass("btn")){F=F.closest(".btn")}C.call(F,"toggle");E.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(E){D(E.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(E.type))})}(jQuery);+function(E){var A=function(G,F){this.$element=E(G);this.$indicators=this.$element.find(".carousel-indicators");this.options=F;this.paused=null;this.sliding=null;this.interval=null;this.$active=null;this.$items=null;this.options.keyboard&&this.$element.on("keydown.bs.carousel",E.proxy(this.keydown,this));this.options.pause=="hover"&&!("ontouchstart" in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",E.proxy(this.pause,this)).on("mouseleave.bs.carousel",E.proxy(this.cycle,this))};A.VERSION="3.3.4";A.TRANSITION_DURATION=600;A.DEFAULTS={interval:5000,pause:"hover",wrap:true,keyboard:true};A.prototype.keydown=function(F){if(/input|textarea/i.test(F.target.tagName)){return}switch(F.which){case 37:this.prev();break;case 39:this.next();break;default:return}F.preventDefault()};A.prototype.cycle=function(F){F||(this.paused=false);this.interval&&clearInterval(this.interval);this.options.interval&&!this.paused&&(this.interval=setInterval(E.proxy(this.next,this),this.options.interval));return this};A.prototype.getItemIndex=function(F){this.$items=F.parent().children(".item");return this.$items.index(F||this.$active)};A.prototype.getItemForDirection=function(K,G){var I=this.getItemIndex(G);var J=(K=="prev"&&I===0)||(K=="next"&&I==(this.$items.length-1));if(J&&!this.options.wrap){return G}var F=K=="prev"?-1:1;var H=(I+F)%this.$items.length;return this.$items.eq(H)};A.prototype.to=function(G){var F=this;var H=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(G>(this.$items.length-1)||G<0){return}if(this.sliding){return this.$element.one("slid.bs.carousel",function(){F.to(G)})}if(H==G){return this.pause().cycle()}return this.slide(G>H?"next":"prev",this.$items.eq(G))};A.prototype.pause=function(F){F||(this.paused=true);if(this.$element.find(".next, .prev").length&&E.support.transition){this.$element.trigger(E.support.transition.end);this.cycle(true)}this.interval=clearInterval(this.interval);return this};A.prototype.next=function(){if(this.sliding){return}return this.slide("next")};A.prototype.prev=function(){if(this.sliding){return}return this.slide("prev")};A.prototype.slide=function(O,P){var J=this.$element.find(".item.active");var K=P||this.getItemForDirection(O,J);var L=this.interval;var G=O=="next"?"left":"right";var M=this;if(K.hasClass("active")){return(this.sliding=false)}var F=K[0];var N=E.Event("slide.bs.carousel",{relatedTarget:F,direction:G});this.$element.trigger(N);if(N.isDefaultPrevented()){return}this.sliding=true;L&&this.pause();if(this.$indicators.length){this.$indicators.find(".active").removeClass("active");var H=E(this.$indicators.children()[this.getItemIndex(K)]);H&&H.addClass("active")}var I=E.Event("slid.bs.carousel",{relatedTarget:F,direction:G});if(E.support.transition&&this.$element.hasClass("slide")){K.addClass(O);K[0].offsetWidth;J.addClass(G);K.addClass(G);J.one("bsTransitionEnd",function(){K.removeClass([O,G].join(" ")).addClass("active");J.removeClass(["active",G].join(" "));M.sliding=false;setTimeout(function(){M.$element.trigger(I)},0)}).emulateTransitionEnd(A.TRANSITION_DURATION)}else{J.removeClass("active");K.addClass("active");this.sliding=false;this.$element.trigger(I)}L&&this.cycle();return this};function D(F){return this.each(function(){var H=E(this);var J=H.data("bs.carousel");var I=E.extend({},A.DEFAULTS,H.data(),typeof F=="object"&&F);var G=typeof F=="string"?F:I.slide;if(!J){H.data("bs.carousel",(J=new A(this,I)))}if(typeof F=="number"){J.to(F)}else{if(G){J[G]()}else{if(I.interval){J.pause().cycle()}}}})}var B=E.fn.carousel;E.fn.carousel=D;E.fn.carousel.Constructor=A;E.fn.carousel.noConflict=function(){E.fn.carousel=B;return this};var C=function(G){var F;var I=E(this);var K=E(I.attr("data-target")||(F=I.attr("href"))&&F.replace(/.*(?=#[^\s]+$)/,""));if(!K.hasClass("carousel")){return}var J=E.extend({},K.data(),I.data());var H=I.attr("data-slide-to");if(H){J.interval=false}D.call(K,J);if(H){K.data("bs.carousel").to(H)}G.preventDefault()};E(document).on("click.bs.carousel.data-api","[data-slide]",C).on("click.bs.carousel.data-api","[data-slide-to]",C);E(window).on("load",function(){E('[data-ride="carousel"]').each(function(){var F=E(this);D.call(F,F.data())})})}(jQuery);+function(E){var B=function(G,F){this.$element=E(G);this.options=E.extend({},B.DEFAULTS,F);this.$trigger=E('[data-toggle="collapse"][href="#'+G.id+'"],[data-toggle="collapse"][data-target="#'+G.id+'"]');this.transitioning=null;if(this.options.parent){this.$parent=this.getParent()}else{this.addAriaAndCollapsedClass(this.$element,this.$trigger)}if(this.options.toggle){this.toggle()}};B.VERSION="3.3.4";B.TRANSITION_DURATION=350;B.DEFAULTS={toggle:true};B.prototype.dimension=function(){var F=this.$element.hasClass("width");return F?"width":"height"};B.prototype.show=function(){if(this.transitioning||this.$element.hasClass("in")){return}var I;var K=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(K&&K.length){I=K.data("bs.collapse");if(I&&I.transitioning){return}}var H=E.Event("show.bs.collapse");this.$element.trigger(H);if(H.isDefaultPrevented()){return}if(K&&K.length){D.call(K,"hide");I||K.data("bs.collapse",null)}var G=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[G](0).attr("aria-expanded",true);this.$trigger.removeClass("collapsed").attr("aria-expanded",true);this.transitioning=1;var J=function(){this.$element.removeClass("collapsing").addClass("collapse in")[G]("");this.transitioning=0;this.$element.trigger("shown.bs.collapse")};if(!E.support.transition){return J.call(this)}var F=E.camelCase(["scroll",G].join("-"));this.$element.one("bsTransitionEnd",E.proxy(J,this)).emulateTransitionEnd(B.TRANSITION_DURATION)[G](this.$element[0][F])};B.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("in")){return}var G=E.Event("hide.bs.collapse");this.$element.trigger(G);if(G.isDefaultPrevented()){return}var F=this.dimension();this.$element[F](this.$element[F]())[0].offsetHeight;this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",false);this.$trigger.addClass("collapsed").attr("aria-expanded",false);this.transitioning=1;var H=function(){this.transitioning=0;this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!E.support.transition){return H.call(this)}this.$element[F](0).one("bsTransitionEnd",E.proxy(H,this)).emulateTransitionEnd(B.TRANSITION_DURATION)};B.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};B.prototype.getParent=function(){return E(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(E.proxy(function(G,H){var F=E(H);this.addAriaAndCollapsedClass(A(F),F)},this)).end()};B.prototype.addAriaAndCollapsedClass=function(G,H){var F=G.hasClass("in");G.attr("aria-expanded",F);H.toggleClass("collapsed",!F).attr("aria-expanded",F)};function A(H){var F;var G=H.attr("data-target")||(F=H.attr("href"))&&F.replace(/.*(?=#[^\s]+$)/,"");return E(G)}function D(F){return this.each(function(){var G=E(this);var I=G.data("bs.collapse");var H=E.extend({},B.DEFAULTS,G.data(),typeof F=="object"&&F);if(!I&&H.toggle&&/show|hide/.test(F)){H.toggle=false}if(!I){G.data("bs.collapse",(I=new B(this,H)))}if(typeof F=="string"){I[F]()}})}var C=E.fn.collapse;E.fn.collapse=D;E.fn.collapse.Constructor=B;E.fn.collapse.noConflict=function(){E.fn.collapse=C;return this};E(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(G){var H=E(this);if(!H.attr("data-target")){G.preventDefault()}var I=A(H);var J=I.data("bs.collapse");var F=J?"toggle":H.data();D.call(I,F)})}(jQuery);+function(F){var E=".dropdown-backdrop";var C='[data-toggle="dropdown"]';var G=function(I){F(I).on("click.bs.dropdown",this.toggle)};G.VERSION="3.3.4";G.prototype.toggle=function(J){var K=F(this);if(K.is(".disabled, :disabled")){return}var I=H(K);var M=I.hasClass("open");D();if(!M){if("ontouchstart" in document.documentElement&&!I.closest(".navbar-nav").length){F('
').insertAfter(F(this)).on("click",D)}var L={relatedTarget:this};I.trigger(J=F.Event("show.bs.dropdown",L));if(J.isDefaultPrevented()){return}K.trigger("focus").attr("aria-expanded","true");I.toggleClass("open").trigger("shown.bs.dropdown",L)}return false};G.prototype.keydown=function(J){if(!/(38|40|27|32)/.test(J.which)||/input|textarea/i.test(J.target.tagName)){return}var K=F(this);J.preventDefault();J.stopPropagation();if(K.is(".disabled, :disabled")){return}var I=H(K);var O=I.hasClass("open");if((!O&&J.which!=27)||(O&&J.which==27)){if(J.which==27){I.find(C).trigger("focus")}return K.trigger("click")}var M=" li:not(.disabled):visible a";var L=I.find('[role="menu"]'+M+', [role="listbox"]'+M);if(!L.length){return}var N=L.index(J.target);if(J.which==38&&N>0){N--}if(J.which==40&&N
').appendTo(this.$body);this.$element.on("click.dismiss.bs.modal",D.proxy(function(J){if(this.ignoreBackdropClick){this.ignoreBackdropClick=false;return}if(J.target!==J.currentTarget){return}this.options.backdrop=="static"?this.$element[0].focus():this.hide()},this));if(I){this.$backdrop[0].offsetWidth}this.$backdrop.addClass("in");if(!E){return}I?this.$backdrop.one("bsTransitionEnd",E).emulateTransitionEnd(A.BACKDROP_TRANSITION_DURATION):E()}else{if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var H=function(){F.removeBackdrop();E&&E()};D.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",H).emulateTransitionEnd(A.BACKDROP_TRANSITION_DURATION):H()}else{if(E){E()}}}};A.prototype.handleUpdate=function(){this.adjustDialog()};A.prototype.adjustDialog=function(){var E=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&E?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!E?this.scrollbarWidth:""})};A.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})};A.prototype.checkScrollbar=function(){var E=window.innerWidth;if(!E){var F=document.documentElement.getBoundingClientRect();E=F.right-Math.abs(F.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:false,container:false,viewport:{selector:"body",padding:0}};A.prototype.init=function(J,F,I){this.enabled=true;this.type=J;this.$element=D(F);this.options=this.getOptions(I);this.$viewport=this.options.viewport&&D(this.options.viewport.selector||this.options.viewport);if(this.$element[0] instanceof document.constructor&&!this.options.selector){throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!")}var K=this.options.trigger.split(" ");for(var H=K.length;H--;){var E=K[H];if(E=="click"){this.$element.on("click."+this.type,this.options.selector,D.proxy(this.toggle,this))}else{if(E!="manual"){var L=E=="hover"?"mouseenter":"focusin";var G=E=="hover"?"mouseleave":"focusout";this.$element.on(L+"."+this.type,this.options.selector,D.proxy(this.enter,this));this.$element.on(G+"."+this.type,this.options.selector,D.proxy(this.leave,this))}}}this.options.selector?(this._options=D.extend({},this.options,{trigger:"manual",selector:""})):this.fixTitle()};A.prototype.getDefaults=function(){return A.DEFAULTS};A.prototype.getOptions=function(E){E=D.extend({},this.getDefaults(),this.$element.data(),E);if(E.delay&&typeof E.delay=="number"){E.delay={show:E.delay,hide:E.delay}}return E};A.prototype.getDelegateOptions=function(){var E={};var F=this.getDefaults();this._options&&D.each(this._options,function(G,H){if(F[G]!=H){E[G]=H}});return E};A.prototype.enter=function(E){var F=E instanceof this.constructor?E:D(E.currentTarget).data("bs."+this.type);if(F&&F.$tip&&F.$tip.is(":visible")){F.hoverState="in";return}if(!F){F=new this.constructor(E.currentTarget,this.getDelegateOptions());D(E.currentTarget).data("bs."+this.type,F)}clearTimeout(F.timeout);F.hoverState="in";if(!F.options.delay||!F.options.delay.show){return F.show()}F.timeout=setTimeout(function(){if(F.hoverState=="in"){F.show()}},F.options.delay.show)};A.prototype.leave=function(E){var F=E instanceof this.constructor?E:D(E.currentTarget).data("bs."+this.type);if(!F){F=new this.constructor(E.currentTarget,this.getDelegateOptions());D(E.currentTarget).data("bs."+this.type,F)}clearTimeout(F.timeout);F.hoverState="out";if(!F.options.delay||!F.options.delay.hide){return F.hide()}F.timeout=setTimeout(function(){if(F.hoverState=="out"){F.hide()}},F.options.delay.hide)};A.prototype.show=function(){var E=D.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(E);var I=D.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(E.isDefaultPrevented()||!I){return}var M=this;var P=this.tip();var J=this.getUID(this.type);this.setContent();P.attr("id",J);this.$element.attr("aria-describedby",J);if(this.options.animation){P.addClass("fade")}var S=typeof this.options.placement=="function"?this.options.placement.call(this,P[0],this.$element[0]):this.options.placement;var F=/\s?auto?\s?/i;var R=F.test(S);if(R){S=S.replace(F,"")||"top"}P.detach().css({top:0,left:0,display:"block"}).addClass(S).data("bs."+this.type,this);this.options.container?P.appendTo(this.options.container):P.insertAfter(this.$element);var O=this.getPosition();var Q=P[0].offsetWidth;var H=P[0].offsetHeight;if(R){var L=S;var G=this.options.container?D(this.options.container):this.$element.parent();var N=this.getPosition(G);S=S=="bottom"&&O.bottom+H>N.bottom?"top":S=="top"&&O.top-H