<?php
require_once('Page.php');
class Shuqianconfig extends Page{
	function show(){
		require_once(dirname(__FILE__) .DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'models'.DIRECTORY_SEPARATOR.'shuqian_model.php');
		$shuqian_model=new Shuqian_model();
		$shuqian_config=$shuqian_model->getAllConfig();
		$statustext_arr=array('',"未开始","进行中","结束");
		$winningagaintext_arr=array('',"不能重复获奖","可重复获奖");
		$shuqianshowstyletext_arr=array('','昵称','姓名','手机号');
		foreach($shuqian_config as $k=>$v){
			$shuqian_config[$k]['statustext']=$statustext_arr[$v['status']];
			$shuqian_config[$k]['winningagaintext']=$winningagaintext_arr[$v['winningagain']];
			$shuqian_config[$k]['showstyletext']=$shuqianshowstyletext_arr[$v['showstyle']];
		}
		$this->assign('shuqian_config',$shuqian_config);
		$this->display('templates/shuqianconfig.html');
	}
}
$page=new Shuqianconfig();
$page->setTitle('数钱游戏设置');
$page->show();
