<?php 

/**
 * 名称：友情链接控制器
 * 作者：荷塘月色
 * 邮箱：kujiw@qq.com
 * 说明：
 */

namespace Qiye\Controller;
class LinkController extends ProjectController {

	public function index(){
		if (IS_POST) {
			$this -> ajaxReturn($this -> getData());
		}elseif (IS_GET) {
			$this -> display();
		}
	}

	public function add(){
		if (IS_GET) {
			$this -> display();
		}elseif (IS_POST) {
			$this -> ebAdd();
		}
	}

	public function save(){
		if (IS_GET) {
			$this -> assign(M('Link') -> find(I('id','','intval')));
			$this -> display();
		}elseif (IS_POST) {
			$this -> ebSave();
		}
	}

	public function delete(){
		$this -> ebDelete();
	}

	public function status(){
		$this -> ebStatus();
	}
}