当前位置: 首页>>代码示例>>PHP>>正文


PHP GetTtable函数代码示例

本文整理汇总了PHP中GetTtable函数的典型用法代码示例。如果您正苦于以下问题:PHP GetTtable函数的具体用法?PHP GetTtable怎么用?PHP GetTtable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GetTtable函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: execute

 function execute(&$postdata)
 {
     global $timestamp, $db_ptable, $onlineip;
     $this->setPostData($postdata);
     $pwSQL = pwSqlSingle(array('fid' => $this->data['fid'], 'icon' => $this->data['icon'], 'author' => $this->data['author'], 'authorid' => $this->data['authorid'], 'subject' => $this->data['title'], 'ifcheck' => $this->data['ifcheck'], 'type' => $this->data['w_type'], 'postdate' => $timestamp, 'lastpost' => $timestamp, 'lastposter' => $this->data['lastposter'], 'hits' => 1, 'replies' => 0, 'topped' => $this->data['topped'], 'digest' => $this->data['digest'], 'special ' => $this->data['special'], 'state' => 0, 'ifupload' => $this->data['ifupload'], 'ifmail' => $this->data['ifmail'], 'anonymous' => $this->data['anonymous'], 'ptable' => $db_ptable, 'ifmagic' => $this->data['ifmagic'], 'ifhide' => $this->data['hideatt'], 'tpcstatus' => $this->data['tpcstatus'], 'modelid' => $this->data['modelid']));
     $this->db->update("INSERT INTO pw_threads SET {$pwSQL}");
     $this->tid = $this->db->insert_id();
     # memcache refresh
     $threadList = L::loadClass("threadlist");
     $threadList->updateThreadIdsByForumId($this->data['fid'], $this->tid);
     $pw_tmsgs = GetTtable($this->tid);
     if (is_object($postdata->tag)) {
         $postdata->tag->insert($this->tid);
         $this->data['tags'] .= "\t" . $postdata->tag->relate($this->data['title'], $this->data['content']);
     }
     if (is_object($this->att) && ($aids = $this->att->getAids())) {
         $this->att->pw_attachs->updateById($aids, array('tid' => $this->tid));
     }
     $ipTable = L::loadClass('IPTable');
     $pwSQL = pwSqlSingle(array('tid' => $this->tid, 'aid' => $this->data['aid'], 'userip' => $onlineip, 'ifsign' => $this->data['ifsign'], 'buy' => '', 'ipfrom' => $ipTable->getIpFrom($onlineip), 'tags' => $this->data['tags'], 'ifconvert' => $this->data['convert'], 'ifwordsfb' => $this->data['ifwordsfb'], 'content' => $this->data['content'], 'magic' => $this->data['magic']));
     $this->db->update("INSERT INTO {$pw_tmsgs} SET {$pwSQL}");
     if ($this->data['digest']) {
         $this->db->update("UPDATE pw_memberdata SET digests=digests+1 WHERE uid=" . pwEscape($this->data['authorid']));
         $this->post->user['digests']++;
     }
     $this->post->updateUserInfo($this->type, $this->creditSet(), $this->data['content']);
     $this->afterpost();
 }
开发者ID:adi00,项目名称:wumaproject,代码行数:28,代码来源:topicpost.class.php

示例2: getDescripByTid

function getDescripByTid($tid)
{
    global $db;
    $tid = (int) $tid;
    if (!$tid) {
        return '';
    }
    $table = GetTtable($tid);
    $content = $db->get_value("SELECT content FROM {$table} WHERE tid=" . S::sqlEscape($tid));
    $content = preg_replace("/<((style|script).*?)>(.*?)<(\\/\\1.*?)>/si", "", $content);
    $content = strip_tags(stripWindCode($content));
    $content = trim($content);
    return substrs($content, 200);
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:14,代码来源:functions.php

示例3: update_markinfo

function update_markinfo($fid, $tid, $pid)
{
    global $db;
    $perpage = 10;
    $pid = intval($pid);
    $creditnames = pwCreditNames();
    $whereStr = " fid=" . S::sqlEscape($fid) . " AND tid=" . S::sqlEscape($tid) . " AND pid=" . S::sqlEscape($pid) . " AND ifhide=0 ";
    $count = 0;
    $creditCount = array();
    $query = $db->query("SELECT COUNT(*) AS count,name,SUM(point) AS sum FROM pw_pinglog WHERE {$whereStr} GROUP BY name");
    while ($rt = $db->fetch_array($query)) {
        $count += $rt['count'];
        if (isset($creditnames[$rt['name']])) {
            $creditCount[$rt['name']] += $rt['sum'];
        } elseif (in_array($rt['name'], $creditnames)) {
            $key = array_search($rt['name'], $creditnames);
            $creditCount[$key] += $rt['sum'];
        }
    }
    $markInfo = '';
    if ($count) {
        $query = $db->query("SELECT id FROM pw_pinglog WHERE {$whereStr} ORDER BY id DESC LIMIT 0,{$perpage}");
        $ids = array();
        while ($rt = $db->fetch_array($query)) {
            $ids[] = $rt['id'];
        }
        $markInfo = $count . ":" . implode(",", $ids);
        if ($creditCount) {
            $tmp = array();
            foreach ($creditCount as $key => $value) {
                $tmp[] = $key . '=' . $value;
            }
            $markInfo .= ':' . implode(',', $tmp);
        }
    }
    if ($pid == 0) {
        //* $db->update("UPDATE $pw_tmsgs SET ifmark=" . S::sqlEscape($markInfo) . " WHERE tid=" . S::sqlEscape($tid));
        $pw_tmsgs = GetTtable($tid);
        pwQuery::update($pw_tmsgs, 'tid=:tid', array($tid), array('ifmark' => $markInfo));
    } else {
        $db->update("UPDATE " . GetPtable("N", $tid) . " SET ifmark=" . S::sqlEscape($markInfo) . " WHERE pid=" . S::sqlEscape($pid));
    }
    return $markInfo;
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:44,代码来源:pingfunc.php

示例4: getThreadDataWithTmsgs

 function getThreadDataWithTmsgs($query)
 {
     $threads = $tmsgsTables = array();
     while ($rt = $GLOBALS['db']->fetch_array($query)) {
         $threads[$rt['tid']] = $rt;
         $tmsgsTableName = GetTtable($rt['tid']);
         $tmsgsTables[$tmsgsTableName][] = $rt['tid'];
     }
     if (!S::isArray($threads)) {
         return array();
     }
     foreach ($tmsgsTables as $tableName => $tids) {
         $tmsgsQuery = $GLOBALS['db']->query("SELECT * FROM " . S::sqlMetaData($tableName) . " WHERE tid IN(" . S::sqlImplode($tids) . ")");
         while ($rt = $GLOBALS['db']->fetch_array($tmsgsQuery)) {
             $rt['threadurl'] = $GLOBALS['db_bbsurl'] . '/read.php?tid=' . $rt['tid'];
             $rt['forumurl'] = $GLOBALS['db_bbsurl'] . '/thread.php?fid=' . $threads[$rt['tid']]['fid'];
             $threads[$rt['tid']] = array_merge($threads[$rt['tid']], $rt);
         }
     }
     return $threads;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:21,代码来源:ver.common.thread.php

示例5: getsBythreadIds

 function getsBythreadIds($threadIds)
 {
     $threadIds = is_array($threadIds) ? $threadIds : explode(",", $threadIds);
     foreach ($threadIds as $threadId) {
         $table = GetTtable($threadId);
         $tables[$table][] = $threadId;
     }
     $threads = array();
     foreach ($tables as $table => $tids) {
         $t = $this->_getsBythreadIds($tids, $table);
         $threads = $threads + $t;
     }
     $tmp = array();
     foreach ($threads as $t) {
         $tmp[$t['tid']] = $t;
     }
     $result = array();
     foreach ($threadIds as $threadId) {
         isset($tmp[$threadId]) ? $result[] = $tmp[$threadId] : '';
     }
     return $result;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:22,代码来源:search_threadsdb.class.php

示例6: update_markinfo

function update_markinfo($fid, $tid, $pid)
{
    global $db;
    $perpage = 10;
    $pid = intval($pid);
    $whereStr = " fid=" . pwEscape($fid) . " AND tid=" . pwEscape($tid) . " AND pid=" . pwEscape($pid) . " AND ifhide=0 ";
    $count = $db->get_value("SELECT COUNT(*) FROM pw_pinglog WHERE {$whereStr} ");
    $markInfo = "";
    if ($count) {
        $query = $db->query("SELECT id FROM pw_pinglog WHERE {$whereStr} ORDER BY pingdate DESC LIMIT 0,{$perpage}");
        $ids = array();
        while ($rt = $db->fetch_array($query)) {
            $ids[] = $rt['id'];
        }
        $markInfo = $count . ":" . implode(",", $ids);
    }
    if ($pid == 0) {
        $pw_tmsgs = GetTtable($tid);
        $db->update("UPDATE {$pw_tmsgs} SET ifmark=" . pwEscape($markInfo) . " WHERE tid=" . pwEscape($tid));
    } else {
        $db->update("UPDATE " . GetPtable("N", $tid) . " SET ifmark=" . pwEscape($markInfo) . " WHERE pid=" . pwEscape($pid));
    }
    return $markInfo;
}
开发者ID:adi00,项目名称:wumaproject,代码行数:24,代码来源:pingfunc.php

示例7: getColonyThread

 function getColonyThread($tid)
 {
     $pw_tmsgs = GetTtable($tid);
     $rt = $this->_db->get_one("SELECT a.cyid,t.tid,t.subject,t.fid,t.ptable,tm.content,c.cname FROM pw_argument a left join pw_threads t ON a.tid=t.tid LEFT JOIN {$pw_tmsgs} tm ON t.tid=tm.tid LEFT JOIN pw_colonys c ON a.cyid=c.id WHERE a.tid=" . pwEscape($tid));
     return $rt ? array('content' => substrs(stripWindCode($rt['content']), 125), 'type' => 40, 'objectid' => $rt['tid'], 'extra' => array('title' => $rt['subject'], 'cyid' => $rt['cyid'], 'cname' => $rt['cname'])) : array();
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:6,代码来源:weibo.php

示例8: overprintThread

 function overprintThread($tid, $related)
 {
     $pw_tmsgs = GetTtable($tid);
     //* return $this->_db->update("UPDATE $pw_tmsgs SET overprint=" . S::sqlEscape($related) . " WHERE tid=" . S::sqlEscape($tid) . " LIMIT 1");
     return pwQuery::update($pw_tmsgs, 'tid=:tid', array($tid), array('overprint' => $related));
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:6,代码来源:overprint.class.php

示例9: _getThread

 function _getThread($tid, $isDetailed = false)
 {
     if ($isDetailed) {
         $pw_tmsgs = GetTtable($tid);
         return $GLOBALS['db']->get_one("SELECT t.*,m.uid,m.icon,m.groupid,m.userstatus,tm.* FROM pw_threads t LEFT JOIN pw_members m ON t.authorid=m.uid LEFT JOIN {$pw_tmsgs} tm ON t.tid=tm.tid WHERE t.tid=" . S::sqlEscape($tid) . " AND t.ifcheck = 1 AND t.fid != 0");
     } else {
         return $GLOBALS['db']->get_one("SELECT * FROM pw_threads WHERE tid=" . S::sqlEscape($tid) . " AND ifcheck = 1 AND fid != 0");
     }
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:9,代码来源:ver.customized.post.php

示例10: PrintEot

if (empty($action)) {
    include PrintEot('attachrenew');
    exit;
} elseif ('delete' == $action) {
    S::gp(array('step'));
    $step = $step ? (int) $step : 0;
    $prenum = 10000;
    $attachDB = L::loadDB('attachs', 'forum');
    $attachs = $attachDB->groupByTidAndPid($step, $prenum);
    $tTables = $pTables = array();
    foreach ($attachs as $key => $value) {
        if ($value['pid']) {
            $pTable = GetPtable('N', $value['tid']);
            $pTables[$pTable][] = $value['pid'];
        } else {
            $tTable = GetTtable($value['tid']);
            $tTables[$tTable][] = $value['tid'];
        }
    }
    foreach ($tTables as $table => $value) {
        $db->update("UPDATE {$table} SET aid=1 WHERE tid IN (" . S::sqlImplode($value) . ")");
    }
    foreach ($pTables as $table => $value) {
        $db->update("UPDATE {$table} SET aid=1 WHERE pid IN (" . S::sqlImplode($value) . ")");
    }
    $maxAid = $attachDB->getTableStructs('Auto_increment');
    if ($maxAid > ($step + 1) * $prenum) {
        $step++;
        adminmsg('attach_renew_wait', EncodeUrl("{$basename}&action={$action}&step={$step}"), 1);
    } else {
        adminmsg('attach_renew');
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:attachrenew.php

示例11: delforum

function delforum($fid)
{
    global $db, $db_guestdir, $db_guestthread, $db_guestread;
    $foruminfo = $db->get_one("SELECT fid,fup,forumadmin FROM pw_forums WHERE fid=" . S::sqlEscape($fid));
    //$db->update("DELETE FROM pw_forums WHERE fid=".S::sqlEscape($fid));
    pwQuery::delete('pw_forums', 'fid=:fid', array($fid));
    //* $db->update("DELETE FROM pw_forumdata WHERE fid=".S::sqlEscape($fid));
    pwQuery::delete('pw_forumdata', 'fid=:fid', array($fid));
    $db->update("DELETE FROM pw_forumsextra WHERE fid=" . S::sqlEscape($fid));
    $db->update("DELETE FROM pw_permission WHERE fid>'0' AND fid=" . S::sqlEscape($fid));
    if ($foruminfo['forumadmin']) {
        $userService = L::loadClass('UserService', 'user');
        /* @var $userService PW_UserService */
        $forumadmin = explode(",", $foruminfo['forumadmin']);
        foreach ($forumadmin as $key => $value) {
            if ($value) {
                $gid = $userService->getByUserName($value);
                if ($gid['groupid'] == 5 && !ifadmin($value)) {
                    $userService->update($gid['uid'], array('groupid' => -1));
                    admincheck($gid['uid'], $value, $gid['groupid'], '', 'delete');
                }
            }
        }
    }
    if ($db_guestthread || $db_guestread) {
        require_once R_P . 'require/guestfunc.php';
        $db_guestthread && deldir(D_P . "{$db_guestdir}/T_{$fid}");
    }
    //* P_unlink(D_P."data/forums/fid_{$fid}.php");
    pwCache::deleteData(D_P . "data/forums/fid_{$fid}.php");
    require_once R_P . 'require/functions.php';
    require_once R_P . 'require/updateforum.php';
    $pw_attachs = L::loadDB('attachs', 'forum');
    $ttable_a = $ptable_a = array();
    $query = $db->query("SELECT tid,replies,ptable FROM pw_threads WHERE fid=" . S::sqlEscape($fid));
    while ($tpc = $db->fetch_array($query)) {
        $tid = $tpc['tid'];
        $ttable_a[GetTtable($tid)][] = $tid;
        $ptable_a[$tpc['ptable']] = 1;
        $db_guestread && clearguestcache($tid, $tpc['replies']);
        if ($attachdb = $pw_attachs->getByTid($tid)) {
            delete_att($attachdb);
        }
    }
    pwFtpClose($GLOBALS['ftp']);
    foreach ($ttable_a as $pw_tmsgs => $val) {
        //* $val = S::sqlImplode($val,false);
        //* $db->update("DELETE FROM $pw_tmsgs WHERE tid IN($val)");
        pwQuery::delete($pw_tmsgs, 'tid IN(:tid)', array($val));
    }
    # $db->update("DELETE FROM pw_threads WHERE fid=".S::sqlEscape($fid));
    # ThreadManager
    //* $threadManager = L::loadClass("threadmanager", 'forum');
    //* $threadManager->deleteByForumId($fid);
    $threadService = L::loadclass('threads', 'forum');
    $threadService->deleteByForumId($fid);
    //* Perf::gatherInfo('changeThreadWithForumIds', array('fid'=>$fid));
    foreach ($ptable_a as $key => $val) {
        $pw_posts = GetPtable($key);
        //$db->update("DELETE FROM $pw_posts WHERE fid=".S::sqlEscape($fid));
        pwQuery::delete($pw_posts, 'fid=:fid', array($fid));
    }
    updateforum($foruminfo['fup']);
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:64,代码来源:setforum.php

示例12: recycle

function recycle($ids)
{
    global $db, $fid;
    $delids = array();
    foreach ($ids as $key => $value) {
        if (is_numeric($value)) {
            $delids[] = $value;
        }
    }
    if ($delids) {
        $delids = pwImplode($delids);
    } else {
        Showmsg('forumcp_recycle_nodata');
    }
    $query = $db->query("SELECT r.*,t.special,t.ifshield,t.ifupload,t.ptable,t.replies,t.fid AS ckfid FROM pw_recycle r LEFT JOIN pw_threads t ON r.tid=t.tid WHERE r.tid IN ({$delids}) AND r.pid='0' AND r.fid=" . pwEscape($fid));
    $taid_a = $ttable_a = $ptable_a = array();
    $delids = $pollids = $actids = $delaids = $rewids = $ids = array();
    while (@extract($db->fetch_array($query))) {
        $ids[] = $tid;
        ($ifshield != '2' || $replies == '0' || $ckfid == '0') && ($delids[] = $tid);
        $special == 1 && ($pollids[] = $tid);
        $special == 2 && ($actids[] = $tid);
        $special == 3 && ($rewids[] = $tid);
        if ($ifshield != '2' || $replies == '0' || $ckfid == '0') {
            $ptable_a[$ptable] = 1;
            $ttable_a[GetTtable($tid)][] = $tid;
        }
        if ($ifupload) {
            $taid_a[GetTtable($tid)][] = $tid;
            if ($ifshield != '2' || $replies == '0' || $ckfid == '0') {
                $pw_posts = GetPtable($ptable);
                $query2 = $db->query("SELECT aid FROM {$pw_posts} WHERE tid=" . pwEscape($tid) . " AND aid!=''");
                while (@extract($db->fetch_array($query2))) {
                    if (!$aid) {
                        continue;
                    }
                    $attachs = unserialize(stripslashes($aid));
                    foreach ($attachs as $key => $value) {
                        is_numeric($key) && ($delaids[] = $key);
                        pwDelatt($value['attachurl'], $GLOBALS['db_ifftp']);
                        $value['ifthumb'] && pwDelatt("thumb/{$value['attachurl']}", $GLOBALS['db_ifftp']);
                    }
                }
            }
        }
    }
    foreach ($taid_a as $pw_tmsgs => $value) {
        $value = pwImplode($value);
        $query = $db->query("SELECT aid FROM {$pw_tmsgs} WHERE tid IN({$value}) AND aid!=''");
        while (@extract($db->fetch_array($query))) {
            if (!$aid) {
                continue;
            }
            $attachs = unserialize(stripslashes($aid));
            foreach ($attachs as $key => $value) {
                is_numeric($key) && ($delaids[] = $key);
                pwDelatt($value['attachurl'], $GLOBALS['db_ifftp']);
                $value['ifthumb'] && pwDelatt("thumb/{$value['attachurl']}", $GLOBALS['db_ifftp']);
            }
        }
    }
    if ($pollids) {
        $pollids = pwImplode($pollids);
        $db->update("DELETE FROM pw_polls WHERE tid IN({$pollids})");
    }
    if ($actids) {
        $actids = pwImplode($actids);
        $db->update("DELETE FROM pw_activity WHERE tid IN({$actids})");
        $db->update("DELETE FROM pw_actmember WHERE actid IN({$actids})");
    }
    if ($rewids) {
        $rewids = pwImplode($rewids);
        $db->update("DELETE FROM pw_reward WHERE tid IN({$rewids})");
    }
    if ($delaids) {
        $pw_attachs = L::loadDB('attachs');
        $pw_attachs->delete($delaids);
    }
    $delids = pwImplode($delids);
    if ($delids) {
        # $db->update("DELETE FROM pw_threads	WHERE tid IN($delids)");
        # ThreadManager
        $threadManager = L::loadClass("threadmanager");
        $threadManager->deleteByThreadIds($fid, $delids);
    }
    foreach ($ttable_a as $pw_tmsgs => $val) {
        $val = pwImplode($val);
        $db->update("DELETE FROM {$pw_tmsgs} WHERE tid IN({$val})");
    }
    foreach ($ptable_a as $key => $val) {
        $pw_posts = GetPtable($key);
        $db->update("DELETE FROM {$pw_posts} WHERE tid IN({$delids})");
    }
    delete_tag($delids);
    if ($ids) {
        $ids = pwImplode($ids);
        $db->update("DELETE FROM pw_recycle WHERE tid IN ({$ids})");
    }
    pwFtpClose($GLOBALS['ftp']);
}
开发者ID:adi00,项目名称:wumaproject,代码行数:100,代码来源:forumcp.php

示例13: AND

     $sql = "WHERE r.pid='0' AND (t.fid='0' OR t.ifshield='2')";
 }
 $query = $db->query("SELECT r.*,t.special,t.ifshield,t.ifupload,t.ptable,t.replies,t.fid,t.postdate AS ckfid FROM pw_recycle r LEFT JOIN pw_threads t ON r.tid=t.tid {$sql} LIMIT 100");
 while (@extract($db->fetch_array($query))) {
     $goon = 1;
     $ids[] = $tid;
     ($ifshield != '2' || $replies == '0' || $ckfid == '0') && ($delids[] = $tid);
     $special == 1 && ($pollids[] = $tid);
     $special == 2 && ($actids[] = $tid);
     $special == 3 && ($rewids[] = $tid);
     if ($ifshield != '2' || $replies == '0' || $ckfid == '0') {
         $ptable_a[$ptable] = 1;
         $ttable_a[GetTtable($tid)][] = $tid;
     }
     if ($ifupload) {
         $taid_a[GetTtable($tid)][] = $tid;
         $_tids[$tid] = $tid;
         $_pids[0] = 0;
         if ($ifshield != '2' || $replies == '0' || $ckfid == '0') {
             $pw_posts = GetPtable($ptable);
             $query2 = $db->query("SELECT pid FROM {$pw_posts} WHERE tid=" . S::sqlEscape($tid, false) . " AND aid!=''");
             while ($pid2 = $db->fetch_array($query2)) {
                 $_pids[$pid2['pid']] = $pid2['pid'];
             }
         }
     }
 }
 if ($pollids) {
     $pollids = S::sqlImplode($pollids, false);
     $db->update("DELETE FROM pw_polls WHERE tid IN({$pollids})");
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:recycle.php

示例14: scanThreads

 /**
  * @desc 扫描主题表
  */
 function scanThreads()
 {
     # 获取主题信息,判断是否重复记录
     $sql = " SELECT t.tid, t.subject, t.ifcheck, t.postdate, t.author, f.id, f.state " . " FROM {$this->table} AS t LEFT JOIN pw_filter AS f ON t.tid = f.tid" . " WHERE t.tid>" . S::sqlEscape($this->table_progress[$this->table]) . " AND t.fid =" . S::sqlEscape($this->fid) . " GROUP BY t.tid ORDER BY t.tid ASC LIMIT " . $this->pagesize;
     $query = $this->db->query($sql);
     $num = 0;
     while ($thread = $this->db->fetch_array($query)) {
         # 获取帖子内容
         $pw_tmsgs = GetTtable($thread['tid']);
         $sql = " SELECT content FROM {$pw_tmsgs} WHERE tid=" . S::sqlEscape($thread['tid']);
         $thread['content'] = $this->db->get_value($sql);
         # 扫描进度
         $this->progress++;
         $this->objid = $thread['tid'];
         # 帖子内容
         $content = $thread['subject'] . $thread['content'];
         # 过滤敏感词
         $result = $this->filter->paraseContent($content, $this->skip, $this->convert);
         # 处理扫描结果
         if (is_array($result)) {
             $word = $this->getWordString($result[1]);
             $score = round($result[0], 2);
             if ($this->dispose && $score > 0 && $thread['ifcheck']) {
                 # 更改审核状态
                 //$sql = "UPDATE pw_threads SET ifcheck=0 WHERE tid = " .S::sqlEscape($thread['tid']);
                 pwQuery::update('pw_threads', 'tid=:tid', array($thread['tid']), array('ifcheck' => 0));
                 $num++;
                 # 更新版块信息
                 $this->updateCache();
                 # 发消息通知
                 $msg = array('subject' => $thread['subject'], 'tid' => $thread['tid'], 'fid' => $this->fid);
                 $this->sendMsg($thread['author'], $msg, 't');
             }
             if (!$thread['id']) {
                 # 如果不重复,扫描到的结果+1
                 $this->result++;
                 $compart = $insertString ? ',' : '';
                 # 处理数据
                 $insertString .= $compart . "( " . S::sqlEscape($thread['tid']) . ", " . S::sqlEscape($word) . ", " . S::sqlEscape($thread['postdate']) . ")";
             } elseif ($thread['state']) {
                 # 如果是已经审核通过的再次被扫到,扫描到的结果+1
                 $this->result++;
                 # 处理数据
                 $value = array('state' => 0, 'filter' => $word, 'created_at' => $thread['postdate']);
                 $value = S::sqlSingle($value);
                 # 更新记录
                 $sql = "UPDATE pw_filter SET {$value} WHERE pid=0 AND tid = " . S::sqlEscape($thread['tid']);
                 $this->db->update($sql);
             }
         }
     }
     # 插入记录
     if ($insertString) {
         $insertSql = "INSERT INTO pw_filter (tid, filter, created_at) VALUES " . $insertString;
         $this->db->update($insertSql);
     }
     if ($this->dispose && $num) {
         $this->updateCache($num);
     }
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:63,代码来源:wordscan.class.php

示例15: ajax_footer

     ajax_footer();
 } elseif ($step == 2) {
     S::gp(array('to_id', 'to_threadcate', 'to_subtype', 'tidarray'));
     if ($forum[$to_id]['type'] == 'category') {
         Showmsg('mawhole_error');
     }
     pwCache::getData(D_P . 'data/forums/fid_' . $to_id . '.php');
     if ($foruminfo['t_type'] == 2 && !$to_threadcate) {
         Showmsg('请选择主题分类后发布');
     }
     $mids = $ttable_a = $ptable_a = array();
     if (is_array($tidarray)) {
         foreach ($tidarray as $key => $value) {
             if (is_numeric($value)) {
                 $mids[] = $value;
                 $ttable_a[GetTtable($value)][] = $value;
             }
         }
     }
     !$mids && Showmsg('mawhole_nodata');
     $pw_attachs = L::loadDB('attachs', 'forum');
     $pw_attachs->updateByTid($mids, array('fid' => $to_id));
     //* $threads = L::loadClass('Threads', 'forum');
     //* $threads->delThreads($mids);
     Perf::gatherInfo('changeThreadWithThreadIds', array('tid' => $mids));
     //$mids = S::sqlImplode($mids);
     $updatetop = $todaypost = $topic_all = $replies_all = 0;
     $cy_tids = array();
     $query = $db->query("SELECT tid,fid as tfid,author,postdate,subject,replies,topped,ptable,ifcheck,tpcstatus,modelid,special,specialsort FROM pw_threads WHERE tid IN(" . S::sqlImplode($mids) . ")");
     $mgdate = get_date($timestamp, 'Y-m-d');
     //语言文件中用
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:tpccheck.php


注:本文中的GetTtable函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。