/
index.php
executable file
·269 lines (239 loc) · 7.04 KB
/
index.php
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
<?php
require ("./header.html");
require ("api/get_polls.php");
?>
<script language="javascript">
function checkfrom()
{
var cnt = 0;
// var str="";
var chk=document.getElementsByName("vote[]");
for(var i=0;i<chk.length;i++)
{
if(chk[i].checked)
{
// str+=chk[i].value+",";//得到用逗号分割的字符串
cnt++;
}
}
if(cnt<5)
{
alert("投票人数小于5人,请选择5-10个候选人");
return false;
}
else if(cnt>10)
{
alert("投票人数大于10人,请选择5-10个候选人");
return false;
}
else
return true;
}
// function checkfrom()
// {
// return confirm('提交投票结果?');
// }
</script>
<style>
.get {
background: #1E5B94;
color: #fff;
text-align: center;
padding: 100px 0;
}
.get-title {
font-size: 200%;
border: 2px solid #fff;
padding: 20px;
display: inline-block;
}
.get-btn {
background: #fff;
}
.detail {
background: #fff;
}
.detail-h2 {
text-align: center;
font-size: 150%;
margin: 40px 0;
}
.detail-h3 {
color: #1f8dd6;
}
.detail-p {
color: #7f8c8d;
}
.detail-mb {
margin-bottom: 30px;
}
.hope {
background: #0bb59b;
padding: 50px 0;
}
.hope-img {
text-align: center;
}
.hope-hr {
border-color: #149C88;
}
.hope-title {
font-size: 140%;
}
.about {
background: #fff;
padding: 40px 0;
color: #7f8c8d;
}
.about-color {
color: #34495e;
}
.about-title {
font-size: 180%;
padding: 30px 0 50px 0;
text-align: center;
}
.footer p {
color: #7f8c8d;
margin: 0;
padding: 15px 0;
text-align: center;
background: #2d3e50;
}
</style>
</head>
<body>
<div class="get">
<div class="am-g">
<div class="am-u-lg-12">
<h1 class="get-title">南京邮电大学十佳志愿者评选</h1>
<p>
<p>南京邮电大学2015年度十佳青年志愿者评选,经过校团委评审委员会的层层筛选,最终20位同学入围十佳志愿者网络在线评选。</p>
<p>主办:共青团南京邮电大学委员会</p>
<p>承办:青年志愿者联合会</p>
<p>投票起止日期:2015-12-11 08:00 --- 2015-12-18 08:00</p>
</p>
</div>
</div>
</div>
<div class="detail">
<div class="am-g am-container">
<div class="am-u-lg-12">
<h3 class="detail-h2">规则:每次至少投5-10人,每天每IP限投票一次。</h3>
<form name="voting" action="./vote.php" method="post" onSubmit="return checkfrom()">
<div class="am-g">
<div class="am-u-lg-3 am-u-md-6 am-u-sm-12 detail-mb">
<div data-am-widget="intro"
class="am-intro am-cf am-intro-default"
>
<div class="am-intro-hd">
<h2 class="am-intro-title">1</h2>
<a class="am-intro-more am-intro-more-top " href="/1.php">查看事迹简介</a>
</div>
<div class="am-g am-intro-bd">
<div
class="am-u-lg-12"><img src="/1.jpg" alt="1" /></div>
<div
class="am-u-lg-12"><p><br></p></div>
</div>
<div class="am-intro-more-bottom">
<div><p>实时票数:<?php echo get_polls(1);?><br><input type="checkbox" name="vote[]" onclick="checkit(this)" value="1" >
选择他</p>
</div>
</div>
</div>
</div>
<div class="am-u-lg-3 am-u-md-6 am-u-sm-12 detail-mb">
<div data-am-widget="intro"
class="am-intro am-cf am-intro-default"
>
<div class="am-intro-hd">
<h2 class="am-intro-title">2</h2>
<a class="am-intro-more am-intro-more-top " href="/2.php">查看事迹简介</a>
</div>
<div class="am-g am-intro-bd">
<div
class="am-u-lg-12"><img src="/2.jpg" alt="2" /></div>
<div
class="am-u-lg-12"><p><br>2号候选人:<br></p></div>
</div>
<div class="am-intro-more-bottom">
<div><p>实时票数:<?php echo get_polls(2);?><br><input type="checkbox" name="vote[]" onclick="checkit(this)" value="2" >
选择他</p>
</div>
</div>
</div>
</div>
<div class="am-u-lg-3 am-u-md-6 am-u-sm-12 detail-mb">
<div data-am-widget="intro"
class="am-intro am-cf am-intro-default"
>
<div class="am-intro-hd">
<h2 class="am-intro-title">3</h2>
<a class="am-intro-more am-intro-more-top " href="/3.php">查看事迹简介</a>
</div>
<div class="am-g am-intro-bd">
<div
class="am-u-lg-12"><img src="/3.jpg" alt="3" /></div>
<div
class="am-u-lg-12"><p><br>3号候选人:<br></p></div>
</div>
<div class="am-intro-more-bottom">
<div><p>实时票数:<?php echo get_polls(3);?><br><input type="checkbox" name="vote[]" onclick="checkit(this)" value="3" >
选择他</p>
</div>
</div>
</div>
</div>
</div>
<!-- <header class="am-topbar am-topbar-fixed-top">
<div class="am-container">
<div class="am-topbar-right">
<input type="submit" value="提交投票" class="am-btn am-btn-secondary am-topbar-btn am-btn-sm am-btn-default ">
</div>
</div>
</div>
</div>
</header> -->
<header data-am-widget="header"
class="am-header am-header-default am-header-fixed">
<div class="am-container">
<div class="am-header-left am-header-nav">
<a href="/index.php" class="">
<img class="am-header-icon-custom" src="data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 20"><path d="M10,0l2,2l-8,8l8,8l-2,2L0,10L10,0z" fill="%23fff"/></svg>" alt=""/>
</a>
</div>
<div class="am-header-right am-header-nav">
<input type="submit" value="提交投票" class="am-btn am-btn-secondary am-topbar-btn am-btn-sm am-round ">
</div>
<h1 class="am-header-title">
<img src="head.png" />
</h1>
</div>
</header>
</form>
</div>
</div>
</div>
<div class="amz-toolbar" id="amz-toolbar" style="right: 119.5px;">
<div data-am-widget="gotop" class="am-gotop am-gotop-fixed" >
<a href="#top" title="回到顶部">
<span class="am-gotop-title">回到顶部</span>
<i class="am-gotop-icon am-icon-chevron-up"></i>
</a>
</div>
</div>
<div class="hope">
<div class="am-g am-container">
<div class="am-u-lg-4 am-u-md-6 am-u-sm-12 hope-img">
<img src="assets/i/examples/landing.png" alt="" data-am-scrollspy="{animation:'slide-left', repeat: false}">
<hr class="am-article-divider am-show-sm-only hope-hr">
</div>
<div class="am-u-lg-8 am-u-md-6 am-u-sm-12">
<h2 class="hope-title">更多志愿咨询,请关注微信公众号:南邮青志联(nyqzl_2008)</h2>
</div>
</div>
</div>
<?php
require ("./footer.html");
?>