<?php

namespace Act\Lib;

use Dever;

class Contact
{
    # 新增
    public function add($username, $mobile, $email, $content, $xuqiu = 1)
    {
        $where = array();

        $where['username'] = $username;
        $where['email'] = $email;
        $where['mobile'] = $mobile;
        $where['content'] = $content;
        $where['xuqiu'] = $xuqiu;

        $info = Dever::db('act/contact')->one($where);

        if (!$info) {
        	Dever::db('act/contact')->insert($where);
        }

        return true;
    }
}