<?php

namespace Admin\Controller;

use Think\Controller;

/**
 * 激活码兑换页面
 */
class JihuomaController extends CheckController {

    public function index() {
        if(IS_POST)
        {
           $id = I('post.id');
            $data['content'] = $_POST['content'];
            if(M('jihuomaduihuan')->where("id=$id")->save($data))
            {
                echo "<script>alert('保存成功')</script>";
            }else
            {
                $this->error("保存失败!");
            }
        }
        
        $list = M('jihuomaduihuan')->find();
        
        $on = I('column');
        $this->assign('list',$list);
        $this->assign("on", $on);
        $this->display();
    }

}
