Esempio n. 1
0
    if (isset($wec)) {
        send_weixin($username, $subject);
    }
    if (isset($eml) || isset($sms)) {
        $user = userinfo($username);
        if (isset($eml)) {
            send_mail($user['email'], $subject, $body);
        }
        if (isset($sms)) {
            send_sms($user['mobile'], $subject . $DT['sms_sign']);
        }
    }
}
$menus = array(array('发表帖子', '?moduleid=' . $moduleid . '&gid=' . $gid . '&action=add'), array('帖子列表', '?moduleid=' . $moduleid . '&gid=' . $gid), array('待审核', '?moduleid=' . $moduleid . '&gid=' . $gid . '&action=check'), array('未通过', '?moduleid=' . $moduleid . '&gid=' . $gid . '&action=reject'), array('回收站', '?moduleid=' . $moduleid . '&gid=' . $gid . '&action=recycle'), array('移动帖子', '?moduleid=' . $moduleid . '&gid=' . $gid . '&action=move'));
require MD_ROOT . '/club.class.php';
$do = new club($moduleid);
if (in_array($action, array('add', 'edit'))) {
    $FD = cache_read('fields-' . substr($table, strlen($DT_PRE)) . '.php');
    if ($FD) {
        require DT_ROOT . '/include/fields.func.php';
    }
    isset($post_fields) or $post_fields = array();
    $CP = $MOD['cat_property'];
    if ($CP) {
        require DT_ROOT . '/include/property.func.php';
    }
    isset($post_ppt) or $post_ppt = array();
}
if ($_catids || $_areaids) {
    require DT_ROOT . '/admin/admin_check.inc.php';
}
Esempio n. 2
0
            }
            if ($fromtime) {
                $condition .= " AND edittime>={$fromtime}";
            }
            if ($totime) {
                $condition .= " AND edittime<={$totime}";
            }
            if ($level) {
                $condition .= " AND level={$level}";
            }
            if ($pptsql) {
                $condition .= $pptsql;
            }
            //PPT
            require MD_ROOT . '/club.class.php';
            $do = new club($moduleid);
            $tags = $do->get_list($condition, $MOD['order'], $DT['cache_search'] ? 'CACHE' : '');
            if ($tags && $kw) {
                foreach ($tags as $k => $v) {
                    $tags[$k]['title'] = str_replace($kw, '<span class="highlight">' . $kw . '</span>', $v['title']);
                }
                if ($page == 1) {
                    keyword($kw, $items, $moduleid);
                }
            }
            $showpage = 1;
            $datetype = 5;
        }
    }
}
$action or $action = 'post';
Esempio n. 3
0
         }
         $db->query("UPDATE {$table} SET level={$level} WHERE itemid={$tid}");
         if ($message) {
             send_message($T['username'], lang($L['manage_msg_title'], array($L['my_manage_type_post'], dsubstr($T['title'], 20, '...'), $level ? $L['my_manage_type_level'] : $L['my_manage_type_level_cancel'])), lang($L['manage_msg_content'], array($MOD['linkurl'] . $T['linkurl'], nl2br($reason), $_username)));
         }
         $title = addslashes($T['title']);
         $db->query("INSERT INTO {$table}_manage (gid,tid,username,addtime,typeid,title,content,reason,message) VALUES ('{$gid}','{$tid}','{$_username}','{$DT_TIME}','3','{$title}','{$content}','{$reason}','{$message}')");
         if ($MOD['show_html']) {
             tohtml('show', $module, "itemid={$tid}");
         }
     }
     dmsg($level ? $L['post_success_level'] : $L['post_cancel_level'], $forward);
     break;
 case 'post':
     require MD_ROOT . '/club.class.php';
     $do = new club($moduleid);
     $sfields = $L['my_fields_post'];
     $dfields = array('keyword', 'title', 'username');
     isset($fields) && isset($dfields[$fields]) or $fields = 0;
     $level = isset($level) ? intval($level) : 0;
     $style = isset($style) ? intval($style) : 0;
     $ontop = isset($ontop) ? intval($ontop) : 0;
     $thumb = isset($thumb) ? intval($thumb) : 0;
     $guest = isset($guest) ? intval($guest) : 0;
     $fields_select = dselect($sfields, 'fields', '', $fields);
     $condition = "gid={$gid} AND status=3";
     if ($keyword) {
         $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'";
     }
     if ($itemid) {
         $condition .= " AND itemid={$itemid}";
Esempio n. 4
0
     $all ? msg('帖子生成成功', $this_forward) : dmsg('帖子生成成功', $this_forward);
 }
 $catid = isset($catid) ? intval($catid) : '';
 $sql = $catid ? " AND catid={$catid}" : '';
 if (!isset($fid)) {
     $r = $db->get_one("SELECT min(itemid) AS fid FROM {$table} WHERE status>2 {$sql}");
     $fid = $r['fid'] ? $r['fid'] : 0;
 }
 isset($sid) or $sid = $fid;
 if (!isset($tid)) {
     $r = $db->get_one("SELECT max(itemid) AS tid FROM {$table} WHERE status>2 {$sql}");
     $tid = $r['tid'] ? $r['tid'] : 0;
 }
 if ($update) {
     require MD_ROOT . '/club.class.php';
     $do = new club($moduleid);
 }
 isset($num) or $num = 100;
 if ($fid <= $tid) {
     $result = $db->query("SELECT itemid FROM {$table} WHERE status>2 AND itemid>={$fid} {$sql} ORDER BY itemid LIMIT 0,{$num} ");
     if ($db->affected_rows($result)) {
         while ($r = $db->fetch_array($result)) {
             $itemid = $r['itemid'];
             if ($update) {
                 $do->update($itemid);
             } else {
                 $bfid = $fid;
                 $fid = 0;
                 tohtml('show', $module);
                 $fid = $bfid;
             }
Esempio n. 5
0
     $need_captcha = 1;
 }
 if (isset($_POST['ok'])) {
     $captcha = isset($captcha) ? convert(input_trim($captcha), 'UTF-8', DT_CHARSET) : '';
     $msg = captcha($captcha, $need_captcha, true);
     if ($msg) {
         exit('captcha');
     }
     $post = array();
     $post['gid'] = $GRP['itemid'];
     $post['catid'] = $GRP['catid'];
     $post['title'] = isset($title) ? convert(input_trim($title), 'UTF-8', DT_CHARSET) : '';
     $post['content'] = isset($content) ? convert(input_trim(nl2br($content)), 'UTF-8', DT_CHARSET) : '';
     require DT_ROOT . '/include/post.func.php';
     require MD_ROOT . '/club.class.php';
     $do = new club($moduleid);
     if ($do->pass($post)) {
         $post['addtime'] = $post['level'] = $post['fee'] = 0;
         $post['style'] = $post['template'] = $post['note'] = $post['thumb'] = $post['filepath'] = '';
         $need_check = $MOD['check_add'] == 2 ? $MG['check'] : $MOD['check_add'];
         $post['status'] = get_status(3, $need_check);
         $post['hits'] = 0;
         $post['username'] = $_username;
         $post['areaid'] = $cityid;
         $do->add($post);
         if ($MOD['show_html'] && $post['status'] > 2) {
             $do->tohtml($do->itemid);
         }
         exit($post['status'] == 3 ? 'ok|' . $do->itemid : 'check');
     }
     exit('ko');
Esempio n. 6
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
require DT_ROOT . '/module/' . $module . '/common.inc.php';
require DT_ROOT . '/include/post.func.php';
include load($module . '.lang');
include load('my.lang');
isset($job) && check_name($job) or $job = '';
if (in_array($job, array('group', 'reply', 'join', 'fans', 'manage'))) {
    require MD_ROOT . '/my_' . $job . '.inc.php';
} else {
    $job = '';
    $MG['club_limit'] > -1 or dalert(lang('message->without_permission_and_upgrade'), 'goback');
    require MD_ROOT . '/club.class.php';
    $do = new club($moduleid);
    if (in_array($action, array('add', 'edit'))) {
        $FD = cache_read('fields-' . substr($table, strlen($DT_PRE)) . '.php');
        if ($FD) {
            require DT_ROOT . '/include/fields.func.php';
        }
        isset($post_fields) or $post_fields = array();
        $CP = $MOD['cat_property'];
        if ($CP) {
            require DT_ROOT . '/include/property.func.php';
        }
        isset($post_ppt) or $post_ppt = array();
    }
    $sql = $_userid ? "username='******'" : "ip='{$DT_IP}'";
    $limit_used = $limit_free = $need_password = $need_captcha = $need_question = $fee_add = 0;
    if (in_array($action, array('', 'add'))) {
        $r = $db->get_one("SELECT COUNT(*) AS num FROM {$table} WHERE {$sql} AND status>1");