Ejemplo n.º 1
0
 function main()
 {
     global $_G;
     if ($_GET['onsubmit'] && check()) {
         foreach ($_GET[ids] as $k => $v) {
             $id = intval($v);
             if ($_GET[del][$k] == 0) {
                 continue;
             }
             if ($_GET['_del_all'] == 1 && $_GET['del'][$k]) {
                 DB::delete(__CLASS__, "id=" . intval($id));
             }
         }
         cpmsg('操作成功', 'success', 'm=' . __CLASS__ . '&a=' . __FUNCTION__);
         return false;
     }
     $size = 30;
     $start = ($_G['page'] - 1) * $size;
     $url = '';
     $and = '';
     if ($_GET['uid']) {
         $uid = intval($_GET[uid]);
         $and .= " AND uid =" . $uid;
         $url .= "&uid=" . $uid;
     }
     if ($_GET['username']) {
         $username = urldecode_utf8(trim($_GET[username]));
         $and .= " AND username ='******'";
         $url .= "&username="******" AND ip ='" . $ip . "'";
         $url .= "&ip=" . $ip;
     }
     if ($_GET['jf_down']) {
         $jf_down = intval($_GET[jf_down]);
         $and .= " AND org_jf >='" . $jf_down . "'";
         $url .= "&jf_down=" . $jf_down;
     }
     if ($_GET['jf_up']) {
         $jf_up = intval($_GET[jf_up]);
         $and .= " AND org_jf <='" . $jf_up . "'";
         $url .= "&jf_up=" . $jf_up;
     }
     if ($_GET[type] && array_key_exists($_GET[type], $_G['setting']['jf_type'])) {
         $type = addslashes(trim($_GET[type]));
         $and .= " AND type='{$type}'";
         $url .= "&type=" . $type;
     }
     $sign_list = DB::fetch_all("SELECT * FROM " . DB::table(__CLASS__) . " where 1 {$and}  ORDER BY id DESC LIMIT {$start},{$size}");
     $count = getcount(__CLASS__, $and);
     $showpage = multi($count, $size, $_G[page], URL . "m=sign&a=main" . $url);
     foreach ($sign_list as $k => $v) {
         $sign_list[$k][username_url] = urlencode_utf8($v[username]);
         $sign_list[$k][dateline] = dgmdate($v[dateline], 'u');
     }
     $this->add(array('count' => $count, 'sign_list' => $sign_list, 'showpage' => $showpage));
     $this->show('sign/main');
 }
Ejemplo n.º 2
0
 function parse($resp)
 {
     if (!$resp->value) {
         return false;
     }
     $resp->value = urldecode_utf8($resp->value);
     $value = $resp->value;
     $value = str_replace(array("[", "]", "\""), '', $value);
     if ($value) {
         $value = explode(',', $value);
     }
     return $value;
 }
Ejemplo n.º 3
0
 function _list()
 {
     global $_G;
     $url = URL . 'm=img&a=list';
     $and = ' `hide` = 0 ';
     $tag = '';
     if ($_GET[tag]) {
         $tag = $_GET['tag'];
         $tag = urldecode_utf8($tag);
         $tag = daddslashes($tag);
         $and .= "AND FIND_IN_SET('" . $tag . "', keywords) ";
         $url .= "&tag=" . urlencode_utf8($tag);
     }
     $img = D(array('and' => $and, 'table' => 'img', 'order' => '`sort` DESC,id DESC', 'key' => 'img_list_' . $tag), array('size' => 10, 'url' => $url));
     $this->add($img);
     seo('值得买 - ' . $_G['setting'][title]);
     $this->show();
 }
Ejemplo n.º 4
0
 function main()
 {
     global $_G;
     if ($_GET['onsubmit'] && check() && $_GET[ids]) {
         $page = $_G[page] > 1 ? '&page=' . $_G[page] : '';
         foreach ($_GET[ids] as $k => $v) {
             if ($_GET[del][$k] == 0) {
                 continue;
             }
             $aid = intval($v);
             $arr = array();
             $arr['start_time'] = dmktime($_GET['start_time'][$k]);
             $arr['end_time'] = dmktime($_GET['end_time'][$k]);
             $arr['sort'] = intval($_GET['sort'][$k]);
             $arr['flag'] = intval($_GET['flag'][$k]);
             if ($_GET['cate'][$k] > 0) {
                 $arr['cate'] = intval($_GET['cate'][$k]);
             }
             $arr['hide'] = intval($_GET['hide'][$k]);
             if ($_GET['cate_in'] != '-1') {
                 $arr['cate'] = intval($_GET['cate_in']);
             }
             if ($_GET['flag_in'] > 0) {
                 $arr['flag'] = intval($_GET['flag_in']);
             }
             if ($_GET['hide_in'] == 1) {
                 $arr['hide'] = 1;
             }
             if ($_GET['check'] == 1) {
                 $arr['check'] = 1;
             }
             if ($_GET['in_fid']) {
                 $arr['fid'] = intval($_GET['in_fid']);
             }
             if ($_GET['start_time_in'] && dmktime($_GET['start_time_in']) > 0) {
                 $arr['start_time'] = dmktime($_GET['start_time_in']);
             }
             if ($_GET['end_time_in'] && dmktime($_GET['end_time_in']) > 0) {
                 $arr['end_time'] = dmktime($_GET['end_time_in']);
             }
             $num_iid = $_GET['num_iid'][$k];
             if ($_GET['_del_all'] == 1 && $_GET['del'][$k]) {
                 api_post(array('a' => 'delete', 'table' => 'goods', 'id' => $num_iid, 'pre_key' => 'num_iid'));
                 DB::delete("goods", "aid=" . intval($aid));
             } else {
                 api_post(array('a' => 'update', 'table' => 'goods', 'data' => $arr, 'pre_key' => 'num_iid', 'id' => $num_iid));
                 DB::update("goods", $arr, "aid=" . $aid);
             }
         }
         $url = '';
         if ($_GET['post'] == 1) {
             $url .= "&post=1";
         }
         $page .= $_GET[cur_fid] > 0 ? '&fid=' . $_GET[cur_fid] : '';
         cpmsg('操作成功', 'success');
         return false;
     }
     if ($_GET[search] == 1 && $_GET['keyword'] && $_GET[search_type]) {
         $keyword = trim($_GET['keyword']);
         $search_type = trim($_GET['search_type']);
         $and .= " AND `" . $search_type . "` LIKE '%" . $keyword . "%'";
         $url .= "&search=1&keyword=" . urlencode_utf8($keyword) . '&search_type=' . $search_type;
     }
     if ($_GET['fid'] && $_GET['fid'] > 0) {
         $fid = intval($_GET['fid']);
         $and .= " AND fid = {$fid} ";
         $url .= "&fid=" . $fid;
     }
     if (isset($_GET['checks'])) {
         $check = intval($_GET['checks']);
         $and .= " AND  post >0  AND `check` =" . $check;
         $url .= "&checks=" . $check;
     }
     if (isset($_GET['post'])) {
         $and .= " AND `post` >0";
         $url .= "&post=1";
     }
     if (isset($_GET['hide'])) {
         $hide = intval($_GET['hide']);
         $and .= " AND `hide` =" . $hide;
         $url .= "&hide=" . $hide;
     }
     if (isset($_GET['flag']) && $_GET['flag'] != '-1') {
         $flag = intval($_GET['flag']);
         $and .= " AND `flag` =" . $flag;
         $url .= "&flag=" . $flag;
     }
     if ($_GET[cate] > 0) {
         $cate = intval($_GET[cate]);
         $and .= " AND `cate` =" . $cate;
         $url .= "&cate=" . $cate;
     }
     if ($_GET[nick]) {
         $nick = urldecode_utf8($_GET[nick]);
         $and .= " AND `nick` ='{$nick}'";
         $url .= "&nick=" . $nick;
     }
     if (isset($_GET[baoyou])) {
         $baoyou = intval($_GET[baoyou]);
         $and .= " AND `baoyou` =" . $baoyou;
         $url .= "&baoyou=" . $baoyou;
     }
     if (isset($_GET[shop_type]) && $_GET['shop_type'] != '-1') {
         $shop_type = intval($_GET[shop_type]);
         $and .= " AND `shop_type` =" . $shop_type;
         $url .= "&shop_type=" . $shop_type;
     }
     if ($_GET[taoke] == 1) {
         $taoke = '-1';
         $and .= " AND `commission` =-1";
         $url .= "&taoke=-1";
     }
     if ($_GET[line] > 0) {
         $line = intval($_GET[line]);
         $time = TIMESTAMP;
         if ($line == 1) {
             $and .= " AND start_time>0  AND start_time > {$time} ";
         } elseif ($line == 2) {
             $and .= " AND end_time>0  AND end_time<" . $time;
         }
         $url .= "&line=" . $line;
     }
     if ($_GET[display] > 0) {
         $time = TIMESTAMP;
         $display = intval($_GET[display]);
         $and .= " AND `hide`=1 OR `check`=0  OR num =0 OR  (start_time>0  AND start_time> {$time} )  OR (end_time>0  AND end_time< {$time} ) ";
         $url .= "&display=" . $display;
     }
     if ($_GET['commission_down']) {
         $commission_down = intval($_GET[commission_down]);
         $and .= " AND bili >=" . $commission_down;
         $url .= "&commission_down=" . $commission_down;
     }
     if ($_GET['commission_up']) {
         $commission_up = intval($_GET[commission_up]);
         $and .= " AND bili <=" . $commission_up;
         $url .= "&commission_up=" . $commission_up;
     }
     if ($_GET['yh_price_down']) {
         $yh_price_down = intval($_GET[yh_price_down]);
         $and .= " AND yh_price >=" . $yh_price_down;
         $url .= "&yh_price_down=" . $yh_price_down;
     }
     if ($_GET['yh_price_up']) {
         $yh_price_up = intval($_GET[yh_price_up]);
         $and .= " AND yh_price <=" . $yh_price_up;
         $url .= "&yh_price_up=" . $yh_price_up;
     }
     $and .= " AND post = 0";
     $rs = D(array('and' => $and, 'all' => true), array('url' => URL . "m=goods&a=main" . $url, 'size' => 40));
     foreach ($rs['goods'] as $k => $v) {
         $rs['goods'][$k][title] = cutstr($v[title], '60', '');
     }
     $rs['url'] = URL . "m=goods&a=main" . $url . '&page=' . $_G['page'];
     $this->add($rs);
     $this->show('goods/main');
 }
Ejemplo n.º 5
0
 function main()
 {
     global $_G;
     if ($_GET['onsubmit'] && check()) {
         foreach ($_GET[ids] as $k => $v) {
             $id = intval($v);
             if ($_GET[del][$k] == 0) {
                 continue;
             }
             if ($_GET['_del_all'] == 1 && $_GET['del'][$k]) {
                 DB::delete(__CLASS__, "id=" . intval($id));
             }
         }
         cpmsg('操作成功', 'success', 'm=' . __CLASS__ . '&a=' . __FUNCTION__);
         return false;
     }
     $url = 'm=' . __CLASS__ . '&a=' . __FUNCTION__;
     $and = '';
     if ($_GET['uid']) {
         $uid = intval($_GET[uid]);
         $and .= " AND uid =" . $uid;
         $url .= "&uid=" . $uid;
     }
     if ($_GET['username']) {
         $username = urldecode_utf8(trim($_GET[username]));
         $and .= " AND username ='******'";
         $url .= "&username="******" AND is_reply =" . $is_reply;
         $url .= "&is_reply=" . $is_reply;
     }
     if ($_GET['type_id']) {
         $type_id = intval($_GET[type_id]);
         $and .= " AND type_id =" . $type_id;
         $url .= "&type_id=" . $type_id;
     }
     if ($_GET['type'] && array_key_exists($_GET['type'], $_G[setting][comment_types])) {
         $type = trim($_GET[type]);
         $and .= " AND type ='{$type}'";
         $url .= "&type=" . $type;
     }
     if ($_GET['reply_id']) {
         $reply_id = intval($_GET[reply_id]);
         $and .= " AND reply_id =" . $reply_id;
         $url .= "&reply_id=" . $reply_id;
     }
     if ($_GET['ip']) {
         $ip = trim($_GET[ip]);
         $and .= " AND ip ='" . $ip . "'";
         $url .= "&ip=" . $ip;
     }
     if ($_GET[type] && array_key_exists($_GET[type], $_G[setting][comment_types])) {
         $type = addslashes(trim($_GET[type]));
         $and .= " AND type='{$type}'";
         $url .= "&type=" . $type;
     }
     $rs = D(array('table' => __CLASS__, 'and' => $and, 'order' => ' id DESC'), array('url' => $url, 'size' => 40));
     $this->add($rs);
     $this->show('comment/main');
 }
Ejemplo n.º 6
0
 function setting()
 {
     global $_G;
     if ($_GET['onsubmit'] && check()) {
         if ($_GET[postdb][siteurl2]) {
             $_GET[postdb][siteurl2] = preg_replace("/\\/\$/", '', $_GET[postdb][siteurl2]);
         }
         insert_setting();
         if ($_FILES[file]) {
             $src = upload();
             if ($src) {
                 set_setting('logo', $src);
                 loadcache('setting', 'update');
             }
         }
         cpmsg('修改成功', 'success', 'm=admin&a=setting');
         return false;
     }
     if ($_G[setting]['wangwang']) {
         foreach ($_G[setting]['wangwang'] as $k => $v) {
             $_G[setting]['wangwang'][$k] = urldecode_utf8($v);
         }
         $_G[setting]['wangwang'] = implode(',', $_G[setting]['wangwang']);
     }
     if ($_G[setting]['qq']) {
         foreach ($_G[setting]['qq'] as $k => $v) {
             $_G[setting]['qq'][$k] = urldecode_utf8($v);
         }
         $_G[setting]['qq'] = implode(',', $_G[setting]['qq']);
     }
     $this->show('admin/setting');
 }
Ejemplo n.º 7
0
 function post_img()
 {
     global $_G, $app;
     if (!$_GET['data']) {
         $this->json(array('msg' => '要同步的数据不能为空', 'code' => 2));
         return false;
     }
     $data = $_GET['data'];
     $arr = json_decode($data, true);
     if (!is_array($arr) || !$arr) {
         $arr = json_decode(urldecode_utf8($data), true);
     }
     if (!is_array($arr) || !$arr) {
         $this->json(array('msg' => '要同步的数据解析失败', 'code' => 3));
         return false;
     }
     $filed = table('img');
     $img = get_filed('img', $arr);
     $img['hide'] = intval($img['hide']);
     $img['sort'] = intval($img['sort']);
     $img['hate'] = intval($img['hate']);
     $img['like'] = intval($img['like']);
     if ($arr['desc']) {
         $img[description] = $arr['desc'];
     }
     $img[message] = trim($img[message]);
     $img['dateline'] = TIMESTAMP;
     foreach ($img as $k1 => $v1) {
         if (!array_key_exists($k1, $filed)) {
             unset($img[$k1]);
         }
         if (is_string($v1)) {
             $img[$k1] = str_replace(array('&yen;', '¥'), array('', ''), $v1);
         }
     }
     if (preg_match("/^[0-9\\.]+\$/is", $img[description])) {
         $img[description] = '';
     }
     if (!$img[description]) {
         if (strpos($img[message], '###{') !== false) {
             $img[description] = preg_replace("/###\\{(.*?)\\}###/is", '', $img[message]);
             $img[description] = cutstr(trim_html($img[description], 1), 250, '');
         }
     }
     $count = getcount('img', "title='" . $img[title] . "'");
     if ($count > 0) {
         $this->json(array('status' => 'error', 'id' => 0, 'msg' => '当前看图购已发布过'));
         return false;
     }
     if (!$img[title]) {
         $this->json(array('status' => 'error', 'id' => 0, 'msg' => '标题不能为空'));
         return false;
     }
     $id = DB::insert('img', $img, true);
     if ($id > 0) {
         $this->json(array('status' => 'success', 'id' => $id));
         return false;
     } else {
         if (defined('ERROR') && ERROR === true) {
             if (DB::error()) {
                 $msg = 'DB Error : ' . DB::error();
             } else {
                 $msg = urlencode_utf8($_G['error_msg']);
             }
             $this->json(array('status' => 'error', 'id' => $return_id, 'msg' => $msg));
             return false;
         } else {
             $this->json(array('status' => 'error', 'id' => $id, 'msg' => '未成功,数据库未报错'));
             return false;
         }
     }
 }
Ejemplo n.º 8
0
 function taobao_login()
 {
     global $_G;
     if (!$_G[setting][taobao_appkey] || !$_G[setting][taobao_appsecret]) {
         msg('抱歉,系统未开启淘宝登录组件', 'error', 'm=member&a=login');
     }
     $callbak_url = $_G[siteurl] . "/index.phpm=member&a=taobao_login";
     if (isset($_GET["state"]) && !empty($_GET["state"])) {
         if ($_GET[error]) {
             $msg = trim_html(urldecode_utf8($_GET[error_description], 1));
             msg('登录失败,错误信息:' . $msg, 'error', 'm=member&a=login');
         }
         if ($_GET["state"] != $_SESSION["tb_state"]) {
             msg('请求非法或超时!', 'error', 'member&a=login');
         }
         $code = trim($_GET["code"]);
         $postfields = array('grant_type' => "authorization_code", 'client_id' => $_G[setting][taobao_appkey], 'client_secret' => $_G[setting][taobao_appsecret], 'code' => $code, 'redirect_uri' => $callbak_url);
         $url = 'https://oauth.taobao.com/token';
         $info = json_decode(fetch($url, $postfields), 1);
         if (!$info[taobao_user_nick] || !$info[taobao_user_id]) {
             msg('获取用户名称或用户ID或失败', 'error', 'm=member&a=login');
         }
         $member = array('username' => urldecode_utf8($info[taobao_user_nick]), 'address' => '', 'content' => $info[taobao_user_id], 'picurl' => '', 'groupid' => 22, 'login_name' => 'taobao', 'login_id' => $info[taobao_user_id]);
         $this->login_callback($member);
     } else {
         $state = TIMESTAMP;
         $_SESSION["tb_state"] = $state;
         $url = "https://oauth.taobao.com/authorize";
         $params = array("response_type" => "code", "client_id" => $_G[setting][taobao_appkey], "redirect_uri" => $callbak_url, "state" => $state);
         foreach ($params as $key => $val) {
             $get[] = $key . "=" . urlencode($val);
         }
         $ret_url = $url . "?" . join("&", $get);
         header("location:" . $ret_url);
     }
 }
Ejemplo n.º 9
0
 function email_check()
 {
     global $_G;
     if (!$_G[uid]) {
         msg('未登录无法进行验证操作', 'error');
     } elseif (!$_G[setting][email][status]) {
         msg('系统未开启发送邮件功能', 'error');
     } else {
         if ($_G[member][email_check] == 1) {
             msg('您当前账号已经通过邮箱验证,无须再次进行验证', 'error');
         } elseif ($_SESSION['verify']) {
             msg('已经向您账户发送了验证邮件,请登录您的邮箱进行验证.', 'error');
         } elseif (!$_GET[email]) {
             msg('邮箱不存在,无法进行验证', 'error');
         }
     }
     $email = urldecode_utf8($_GET[email]);
     if (!is_email($email)) {
         msg('邮箱格式不正确', 'error');
     }
     $p = DB::fetch_first("SELECT * FROM " . DB::table('member') . " WHERE email ='" . $email . "' AND uid != " . $_G[uid]);
     if ($p[uid] > 0) {
         msg('邮箱已被注册', 'error');
     }
     if ($_G[member][email] != $email) {
         update_member(array('email' => $email, 'email_check' => 0), $_G[uid]);
     }
     $rs = send_email($email, 'email_check');
     if ($rs['status'] == 'success') {
         $msg = '我们已向您的邮箱' . $arr['email'] . '发送了一封验证邮件,请在15分钟内查看并验证';
         msg($msg, 'success');
     } else {
         msg($rs[msg], 'error');
     }
 }
Ejemplo n.º 10
0
 public function img_goods($rs)
 {
     global $_G;
     if (!$rs) {
         return '';
     }
     $rs = urldecode_utf8($rs);
     $rs = json_decode($rs, true);
     if (in_array($rs[num_iid], $_G[img_item])) {
         return '';
     }
     $_G[img_item][] = $rs[num_iid];
     $goods = '';
     $rs[id] = 0;
     if (count($rs) == 3) {
         $rs = self::goods_url($rs, 1);
         $goods = '<a href="' . $rs[url] . '"  target="_blank"><img src="' . $rs[picurl] . '" /></a>';
     } elseif (count($rs) > 4) {
         $rs = self::goods_url($rs, 1);
         $rs['yh_price'] = sprintf("%.1f", $rs['yh_price']);
         $rs['yh_price'] = str_replace('.0', '', $rs['yh_price']);
         $rs['price'] = sprintf("%.1f", $rs['price']);
         $rs['price'] = str_replace('.0', '', $rs['price']);
         $goods .= '<div class="img_goods"><a rel="nofollow" href="' . $rs[url] . '" title="' . $rs[title] . '" target="_blank">';
         $goods .= '<img src="' . $rs[picurl] . '_480x480.jpg" alt="' . $rs[title] . '"></a>';
         $goods .= '<ul><span class="tit"><a rel="nofollow" href="' . $rs[url] . '" title="' . $rs[title] . '" target="_blank" >' . $rs[title] . '</a></span>';
         $goods .= '<div class="rr_price"><em>¥</em>' . $rs[yh_price] . ($rs[baoyou] == 1 ? '<span class="by">/包邮</span>' : '') . '</div>';
         $goods .= '<div class="many cl"><del>原价:¥' . $rs[price] . '</del>  <i>立省<em>' . ($rs[price] - $rs[yh_price]) . '</em>元</i><span><b>' . $rs[sum] . '</b>人已买</span></div>';
         $goods .= '<div class="butt_div"><a rel="nofollow" href="' . $rs[url] . '" title="' . $rs[title] . '" target="_blank" class="butt">立即抢购</a></div>';
         $str = '';
         if ($rs[tags]) {
             $kw = make_tags($rs[tags]);
             $str .= '<div class="goods_tags"><span>标<br/>签</span>';
             foreach ($kw as $k1 => $v1) {
                 $str .= '<a href="/index.php?m=img&a=list&tag=' . $k1 . '" target="_blank">' . $v1 . '</a>';
             }
             $str .= '</div>';
         }
         $goods .= $str . '</ul></div>';
     }
     return $goods;
 }
Ejemplo n.º 11
0
function get_keywords($title = '', $content = '')
{
    global $_G;
    return get_keywords3($title);
    if (strlen($content) > 2400) {
        $content = cutstr($content, 800, '');
    }
    $title = urldecode_utf8($title);
    $content = urldecode_utf8($content);
    $org_content = $title . $content;
    $default_kw = '';
    if ($_G['setting'][first_keywords]) {
        $kw = explode(",", $_G['setting'][first_keywords]);
        $default = array();
        foreach ($kw as $k => $v) {
            if (strpos($org_content, $v) !== false) {
                $default[] = $v;
            }
        }
        $default_kw = implode(',', $default);
    }
    $title = rawurlencode(trim_html($title, 1));
    $content = rawurlencode(trim_html($content, 1));
    $charset = strtolower(CHARSET);
    $data = @implode('', file("http://keyword.discuz.com/related_kw.html?ics=utf-8&ocs=utf-8&title={$title}&content={$content}"));
    if ($data) {
        $parser = xml_parser_create();
        xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
        xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
        xml_parse_into_struct($parser, $data, $values, $index);
        xml_parser_free($parser);
        $kws = array();
        foreach ($values as $valuearray) {
            if ($valuearray['tag'] == 'kw' || $valuearray['tag'] == 'ekw') {
                $kws[] = trim($valuearray['value']);
            }
        }
        $return = '';
        if ($kws) {
            foreach ($kws as $kw) {
                $kw = dhtmlspecialchars($kw);
                $return .= $kw . ',';
            }
            $return = dhtmlspecialchars($return);
        }
        $return = substr($return, 0, strlen($return) - 1);
        $return .= "," . $default_kw;
        $return = trim($return, ',');
        if (!$return) {
            return '';
        }
        return $return;
    } else {
        return '';
    }
}
Ejemplo n.º 12
0
 function rss_task()
 {
     global $_G;
     $url = $_G[setting][rss_task];
     if (!$url) {
         msg('站点未开启邮箱订阅功能,无法进行订阅');
     }
     $id = sub_str($url, 'id=', -1);
     if (!$id) {
         msg('抱歉,订阅链无效');
     }
     $email = '';
     if ($_GET['email'] || $_GET['to']) {
         $email = urldecode_utf8($_GET['email'] ? $_GET['email'] : $_GET['to']);
     } elseif ($_G[uid] && $_G[member][email]) {
         $email = $_G[member][email];
     }
     if (!$email) {
         msg('必须填写Email地址才能进行订阅..');
     }
     $this->add(array('email' => $email, 'id' => $id));
     $this->show();
 }