<?php
require_once('Page.php');
class Shakethemesave extends Page{
	function show(){
        $id=isset($_GET['id'])?intval($_GET['id']):0;
        $this->_load->model('Shake_model');
		$shakethemeinfo=$this->_load->shake_model->getThemeById($id);
		// echo var_export($shakethemeinfo);
		// $themeinfo=array();
		// if($id!=0){
		// 	$themeinfo=array(
		// 		"id"=>$shakethemeinfo['id'],
		// 		"themename"=>$shakethemeinfo['themename'],
		// 		"themedata"=>$shakethemeinfo['themedata']
		// 	);
		// }
		// echo var_export($shakethemeinfo);
		$themeinfojson=empty($shakethemeinfo)?'{}':json_encode($shakethemeinfo);
		$this->assign('themeinfo',$themeinfojson);
		$this->display('templates/shakethemesave.html');
	}
}
$page=new Shakethemesave();
$page->setTitle('摇一摇游戏主题设置');
$page->show();
