<?php
require_once('Page.php');
class Shakeconfig extends Page{
	function show(){
		$this->_load->model('Shake_model');
		$shake_configs=$this->_load->shake_model->getAllConfig();
		
		$shakethemes=$this->_load->shake_model->getThemes();

		$statustext_arr=array('',"未开始","进行中","结束");
		$winningagaintext_arr=array('',"不能重复获奖","可重复获奖");
		$shakeshowstyletext_arr=array('','昵称','姓名','手机号');
		foreach($shake_configs as $k=>$v){
			$shake_configs[$k]['statustext']=$statustext_arr[$v['status']];
			$shake_configs[$k]['winningagaintext']=$winningagaintext_arr[$v['winningagain']];
			$shake_configs[$k]['showstyletext']=$shakeshowstyletext_arr[$v['showstyle']];
		}
		$this->assign('themes',$shakethemes);
		$this->assign('shake_configs',$shake_configs);
		$this->display('templates/shakeconfig.html');
	}
}
$page=new Shakeconfig();
$page->setTitle('摇一摇游戏设置');
$page->show();
