<?php
// +----------------------------------------------------------------------
// | ThinkGroupon
// +----------------------------------------------------------------------
// | Copyright (c) 2010 http://www.thinkgroupon.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Jeffxie <jeffxie@gmail.com>
// +----------------------------------------------------------------------
class IndexAction extends Action{
    public function index(){
        header("Content-Type:text/html; charset=utf-8");
        echo "<div style='font-weight:normal;color:blue;float:left;width:345px;text-align:center;border:1px solid silver;background:#E8EFFF;padding:8px;font-size:14px;font-family:Tahoma'>^_^ Hello,欢迎使用<span style='font-weight:bold;color:red'>ThinkPHP</span></div>";
    }
    //玩转
    public function tour() {
        $tour = M('Common');
        $tourinfo = $tour->where("classname='tour'")->find();
        $this->assign('tourinfo',$tourinfo);
        $this->display();
    }
    public function faqs() {
        $faqs = M('Common');
        $faqsinfo = $faqs->where("classname='faqs'")->find();
        $this->assign('faqsinfo',$faqsinfo);
        $this->display();
    }
    public function thinkgroupon() {
        $thinkgroupon = M('Common');
        $thinkgrouponinfo = $thinkgroupon->where("classname='thinkgroupon'")->find();
        $this->assign('thinkgrouponinfo',$thinkgrouponinfo);
        $this->display();
    }

    public function subscribe() {
        $subscribe = M('Common');
        $subscribeinfo = $subscribe->where("classname='subscribe'")->find();
        $this->assign('subscribeinfo',$subscribeinfo);
        $this->display();
    }

    public function feed() {
        $feed = M('Common');
        $feedinfo = $feed->where("classname='feed'")->find();
        $this->assign('feedinfo',$feedinfo);
        $this->display();
    }

    public function seller() {
        $seller = M('Common');
        $sellerinfo = $seller->where("classname='seller'")->find();
        $this->assign('sellerinfo',$sellerinfo);
        $this->display();
    }

    public function suggest() {
        $suggest = M('Common');
        $suggestinfo = $suggest->where("classname='suggest'")->find();
        $this->assign('suggestinfo',$suggestinfo);
        $this->display();
    }

    public function contact() {
        $contact = M('Common');
        $contactinfo = $contact->where("classname='contact'")->find();
        $this->assign('contactinfo',$contactinfo);
        $this->display();
    }

    public function us() {
        $us = M('Common');
        $usinfo = $us->where("classname='us'")->find();
        $this->assign('usinfo',$usinfo);
        $this->display();
    }

    public function job() {
        $job = M('Common');
        $jobinfo = $job->where("classname='job'")->find();
        $this->assign('jobinfo',$jobinfo);
        $this->display();
    }

    public function terms() {
        $terms = M('Common');
        $termsinfo = $terms->where("classname='terms'")->find();
        $this->assign('termsinfo',$termsinfo);
        $this->display();
    }

    public function privacy() {
        $privacy = M('Common');
        $privacyinfo = $privacy->where("classname='privacy'")->find();
        $this->assign('privacyinfo',$privacyinfo);
        $this->display();
    }
    public function rss() {
        $rss = M('Rss');
        if($rss->create())
        {
            if($rss->add())
            {
                $this->assign('jumpUrl','/index.php');
                $this->success('订阅成功');
            }
        }
    }

}
?>