<?php
/**
 * 摇一摇页面
 * PHP version 5.4+
 * 
 * @category Wall
 * 
 * @package Shake
 * 
 * @author fy <jhfangying@qq.com>
 * 
 * @license Copyright (c) 2017 金华迪加网络科技有限公司 版权所有
 * Copyright (c) 2017 金华迪加网络科技有限公司 版权所有
 * 未经许可，任何单位及个人不得做营利性使用
 * 
 * @link link('演示地址','http://xc.taobaodpm.com');
 * */
@header("Content-type: text/html; charset=utf-8");
require_once dirname(__FILE__) . '/../smarty/Smarty.class.php';
require_once dirname(__FILE__) . '/../common/db.class.php';
require_once dirname(__FILE__) . '/../common/session_helper.php';
require_once dirname(__FILE__) . '/../common/function.php';

$style='meepo';
$id=isset($_GET['id'])?intval($_GET['id']):0;
$load->model('Shake_model');
$shakeconfig=$load->shake_model->setCurrentConfig($id);
$themeinfo=array();
if (!empty($shakeconfig)) {
    $themeinfo=$load->shake_model->getThemeById($shakeconfig['themeid']);
}

$smarty = new Smarty;
$smarty->caching = false;
$apppath=str_replace(DIRECTORY_SEPARATOR.'wall', '', dirname(__FILE__));
$smarty->compile_dir 
    = $apppath.DIRECTORY_SEPARATOR.'data'.DIRECTORY_SEPARATOR.
    'templates_c'.DIRECTORY_SEPARATOR;
$smarty->assign('shakeconfig', json_encode($shakeconfig));
$smarty->assign('themeinfo', json_encode($themeinfo));
$smarty->display('themes/'.$style.'/header.html');

// if (empty($themeinfo) || $themeinfo['themedata']['ishorizontal']==1) {
//     $smarty->display('themes/'.$style.'/shake.html');
// } else {
//     $smarty->display('themes/'.$style.'/shake_balloon.html');
// }
$smarty->display('themes/'.$style.'/shake.html');
$smarty->display('themes/'.$style.'/footer.html');

