<?php
/*
 * 注意：此文件由tpl_engine编译型模板引擎编译生成。
 * 如果您的模板要进行修改，请修改 templates/default/modules/poll/poll_mine.html
 * 如果您的模型要进行修改，请修改 models/modules/poll/poll_mine.php
 *
 * 修改完成之后需要您进入后台重新编译，才会重新生成。
 * 如果您开启了debug模式运行，那么您可以省去上面这一步，但是debug模式每次都会判断程序是否更新，debug模式只适合开发调试。
 * 如果您正式运行此程序时，请切换到service模式运行！
 * 
 * 如有您有问题请到官方论坛（http://tech.jooyea.com/bbs/）提问，谢谢您的支持。
 */
?><?php
	//引入公共模块
	require("foundation/module_poll.php");
	require("foundation/fpages_bar.php");
	
	//引入语言包
	$pol_langpackage=new polllp;
	
	//变量声明区
	$user_id=get_sess_userid();
	$poll_rs=array();
	
	//当前页面参数
	$page_num=trim(get_argg('page'));	
	
	$dbo=new dbex;
	dbtarget('r',$dbServs);
	
	//数据表定义区
	$t_poll=$tablePreStr."poll";
	
	$sql="select * from $t_poll where user_id=$user_id order by dateline desc";
	$dbo->setPages($set_page_data_num,$page_num);//设置分页	
	$poll_rs=$dbo->getRs($sql);
	$page_total=$dbo->totalPage;//分页总数
	$poll_count=$dbo->rowCount;
	//数据显示
	$isset_data="";
	$none_data="content_none";	
	$isNull=0;
	if(empty($poll_rs)){
		$isNull=1;
		$none_data="";
		$isset_data="content_none";
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<script type='text/javascript'>
	parent.guide("poll");
</script>
<link rel="stylesheet" type="text/css" href="skin/<?php echo $skinUrl;?>/css/row_menus.css">
<link rel="stylesheet" type="text/css" href="skin/<?php echo $skinUrl;?>/css/iframe.css">
</head>
<body>

  <div class="main_right_title">
     <span class="main_title_dot5"></span>
     <span class="main_title_txt"><?php echo $pol_langpackage->pol_title;?></span>
  </div>
	<!--按钮控制!-->
	<div id="tabsB">
		<ul>
			<li><a href="?app=poll_list&m=new" title="<?php echo $pol_langpackage->pol_new;?>"><span><?php echo $pol_langpackage->pol_new;?></span></a></li>
			<li><a href="?app=poll_list&m=hot" title="<?php echo $pol_langpackage->pol_hot;?>"><span><?php echo $pol_langpackage->pol_hot;?></span></a></li>
			<li><a href="?app=poll_list&m=reward" title="<?php echo $pol_langpackage->pol_reward;?>"><span><?php echo $pol_langpackage->pol_reward;?></span></a></li>
			<li><a href="?app=poll_mine" title="<?php echo $pol_langpackage->pol_mine;?>" class="nowbutl"><span class="nowbutr"><?php echo $pol_langpackage->pol_mine;?></span></a></li>
		</ul>
			<div class="div_but" onclick="location.href='?app=poll_send'"><?php echo $pol_langpackage->pol_send;?></div>
	</div>
	
	<!--按钮控制!-->
	<div class="container">
		<div class="rs_head" style="margin-left:15px;"><?php echo str_replace("{poll_num}",$poll_count,$pol_langpackage->pol_total_poll);?></div>
	</div>
	
	<?php foreach($poll_rs as $rs){?>
		<dl class='poll_mine_list'>
			<dt><a href='?app=poll_show&p_id=<?php echo $rs["p_id"];?>'><?php echo filt_word($rs['subject']);?></a></dt>
			<dd><?php echo $pol_langpackage->pol_time;?>：<?php echo $rs['dateline'];?></dd>
			<dd><?php echo $pol_langpackage->pol_over_t;?>:  <?php echo $rs['expiration'];?></dd>
			<dd><?php echo $pol_langpackage->pol_v_num;?>:  <?php echo $rs['voternum'];?></dd>
			<dd><?php echo $pol_langpackage->pol_c_num;?>:  <?php echo $rs['comments'];?></dd>
			<div class="go_see"><a href='?app=poll_show&p_id=<?php echo $rs["p_id"];?>'><?php echo $pol_langpackage->pol_go_see;?></a>>></div>
		</dl>
	<?php }?>
	
<?php echo page_show($isNull,$page_num,$page_total);?>

<div class="guide_info <?php echo $none_data;?>">
	<?php echo $pol_langpackage->pol_data_none;?>
</div>

</body>
</html>