index.php
1.23 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
<?php
require('../../class/connect.php');
require('../../data/dbcache/class.php');
require('../../class/db_sql.php');
$link=db_connect();
$empire=new mysqlquery();
$editor=1;
$classid=(int)$_GET['classid'];
$id=(int)$_GET['id'];
if(empty($id)||empty($classid)||!$class_r[$classid]['tbname']||InfoIsInTable($class_r[$classid]['tbname']))
{
printerror("NotVote","history.go(-1)",9);
}
$infor=$empire->fetch1("select id,classid,title,isurl,titleurl from {$dbtbpre}ecms_".$class_r[$classid]['tbname']." where id='$id' limit 1");
if(empty($infor['id'])||$infor['classid']!=$classid)
{
printerror("NotVote","history.go(-1)",9);
}
$pubid=ReturnInfoPubid($classid,$id);
$r=$empire->fetch1("select id,title,votetext,voteclass,votenum from {$dbtbpre}enewsinfovote where pubid='$pubid' limit 1");
if(empty($r['id'])||empty($r['votetext']))
{
printerror("NotVote","history.go(-1)",9);
}
if(empty($r['title']))
{
$r['title']=$infor['title'];
}
$r_exp="\r\n";
$f_exp="::::::";
if($r['voteclass'])
{
$voteclass="多選";
}
else
{
$voteclass="單選";
}
$titleurl=sys_ReturnBqTitleLink($infor);
$infor[title]=stripSlashes($infor[title]);
//導入模板
require(ECMS_PATH.'e/template/public/vote.php');
db_close();
$empire=null;
?>