<?php
define('CURSCRIPT', 'survey');
require_once './engine/common.inc.php';
$siteheadtitle=implode(' ',array($surveyname="投票中心",$sitename,$sitekeywords));

$survey_mulit=array('单选','多选');
$survey_result=array('不可见','可见');
$pagerecords=20;
$curpage=isset($page)?$page:1;
$startrecord=($curpage-1)*$pagerecords;
$totalrecord=$db->result($db->query("SELECT count(*) FROM g_surveys"),0);
$q = $db->query("SELECT * FROM g_surveys order by survey_ord desc LIMIT $startrecord , $pagerecords");
	$key = 0;
	while($surveydisplay=$db->fetch_array($q)){
		$surveydisplays[$key]=$surveydisplay;
		$key++;
	}
$multipage=multi($totalrecord, $pagerecords, $curpage, "surveydisplay.php");
include($templatedir."surveydisplay.tpl.php");