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


PHP checklowerlimit函数代码示例

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


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

示例1: before_newthread

 public function before_newthread($parameters)
 {
     $item_price = floatval($_GET['item_price']);
     $item_credit = intval($_GET['item_credit']);
     $_GET['item_name'] = censor($_GET['item_name']);
     if (!trim($_GET['item_name'])) {
         return $this->showmessage('trade_please_name');
     } elseif ($this->group['maxtradeprice'] && $item_price > 0 && ($this->group['mintradeprice'] > $item_price || $this->group['maxtradeprice'] < $item_price)) {
         return $this->showmessage('trade_price_between', '', array('mintradeprice' => $this->group['mintradeprice'], 'maxtradeprice' => $this->group['maxtradeprice']));
     } elseif ($this->group['maxtradeprice'] && $item_credit > 0 && ($this->group['mintradeprice'] > $item_credit || $this->group['maxtradeprice'] < $item_credit)) {
         return $this->showmessage('trade_credit_between', '', array('mintradeprice' => $this->group['mintradeprice'], 'maxtradeprice' => $this->group['maxtradeprice']));
     } elseif (!$this->group['maxtradeprice'] && $item_price > 0 && $this->group['mintradeprice'] > $item_price) {
         return $this->showmessage('trade_price_more_than', '', array('mintradeprice' => $this->group['mintradeprice']));
     } elseif (!$this->group['maxtradeprice'] && $item_credit > 0 && $this->group['mintradeprice'] > $item_credit) {
         return $this->showmessage('trade_credit_more_than', '', array('mintradeprice' => $this->group['mintradeprice']));
     } elseif ($item_price <= 0 && $item_credit <= 0) {
         return $this->showmessage('trade_pricecredit_need');
     } elseif ($_GET['item_number'] < 1) {
         return $this->showmessage('tread_please_number');
     }
     if (!empty($_FILES['tradeattach']['tmp_name'][0])) {
         $_FILES['attach'] = array_merge_recursive((array) $_FILES['attach'], $_FILES['tradeattach']);
     }
     if (($this->group['allowpostattach'] || $this->group['allowpostimage']) && is_array($_FILES['attach'])) {
         foreach ($_FILES['attach']['name'] as $attachname) {
             if ($attachname != '') {
                 checklowerlimit('postattach', 0, 1, $this->forum['fid']);
                 break;
             }
         }
     }
     $this->trademessage = $parameters['message'];
     $this->param['message'] = '';
 }
开发者ID:tang86,项目名称:discuz-utf8,代码行数:34,代码来源:extend_thread_trade.php

示例2: showmessage

    } else {
        showmessage('postperm_login_nopermission_mobile', NULL, array('referer' => rawurlencode(dreferer())), array('login' => 1));
    }
} elseif (empty($_G['forum']['allowpost'])) {
    if (!$_G['forum']['postperm'] && !$_G['group']['allowpost']) {
        showmessage('postperm_none_nopermission', NULL, array(), array('login' => 1));
    } elseif ($_G['forum']['postperm'] && !forumperm($_G['forum']['postperm'])) {
        showmessagenoperm('postperm', $_G['fid'], $_G['forum']['formulaperm']);
    }
} elseif ($_G['forum']['allowpost'] == -1) {
    showmessage('post_forum_newthread_nopermission', NULL);
}
if (!$_G['uid'] && ($_G['setting']['need_avatar'] || $_G['setting']['need_email'] || $_G['setting']['need_friendnum'])) {
    showmessage('postperm_login_nopermission', NULL, array(), array('login' => 1));
}
checklowerlimit('post', 0, 1, $_G['forum']['fid']);
if (!submitcheck('topicsubmit', 0, $seccodecheck, $secqaacheck)) {
    $savethreads = array();
    $savethreadothers = array();
    $query = DB::query("SELECT dateline, fid, tid, pid, subject FROM " . DB::table(getposttable()) . " WHERE authorid='{$_G['uid']}' AND invisible='-3' AND first='1'");
    while ($savethread = DB::fetch($query)) {
        $savethread['dateline'] = dgmdate($savethread['dateline'], 'u');
        if ($_G['fid'] == $savethread['fid']) {
            $savethreads[] = $savethread;
        } else {
            $savethreadothers[] = $savethread;
        }
    }
    $savethreadcount = count($savethreads);
    $savethreadothercount = count($savethreadothers);
    if ($savethreadothercount) {
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:post_newthread.php

示例3: showmessage

        showmessage('replyperm_none_nopermission', NULL, array(), array('login' => 1));
    } elseif ($_G['forum']['replyperm'] && !forumperm($_G['forum']['replyperm'])) {
        showmessagenoperm('replyperm', $_G['forum']['fid']);
    }
} elseif ($_G['forum']['allowreply'] == -1) {
    showmessage('post_forum_newreply_nopermission', NULL);
}
if (!$_G['uid'] && ($_G['setting']['need_avatar'] || $_G['setting']['need_email'] || $_G['setting']['need_friendnum'])) {
    showmessage('replyperm_login_nopermission', NULL, array(), array('login' => 1));
}
if (empty($thread)) {
    showmessage('thread_nonexistence');
} elseif ($thread['price'] > 0 && $thread['special'] == 0 && !$_G['uid']) {
    showmessage('group_nopermission', NULL, array('grouptitle' => $_G['group']['grouptitle']), array('login' => 1));
}
checklowerlimit('reply');
if ($_G['setting']['commentnumber'] && !empty($_G['gp_comment'])) {
    $posttable = getposttablebytid($_G['tid']);
    if (!submitcheck('commentsubmit', 0, $seccodecheck, $secqaacheck)) {
        showmessage('undefined_action', NULL);
    }
    $post = DB::fetch_first('SELECT * FROM ' . DB::table($posttable) . " WHERE pid='{$_G['gp_pid']}'");
    if (!$post) {
        showmessage('undefined_action', NULL);
    }
    if ($thread['closed'] && !$_G['forum']['ismoderator']) {
        showmessage('post_thread_closed');
    } elseif ($post_autoclose = checkautoclose($thread)) {
        showmessage($post_autoclose, '', array('autoclose' => $_G['forum']['autoclose']));
    } elseif (checkflood()) {
        showmessage('post_flood_ctrl', '', array('floodctrl' => $_G['setting']['floodctrl']));
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:31,代码来源:post_newreply.php

示例4: showmessage

}
if (!$_G['uid'] && !(!$_G['forum']['postperm'] && $_G['group']['allowpost'] || $_G['forum']['postperm'] && forumperm($_G['forum']['postperm']))) {
    showmessage('postperm_login_nopermission', NULL, array(), array('login' => 1));
} elseif (empty($_G['forum']['allowpost'])) {
    if (!$_G['forum']['postperm'] && !$_G['group']['allowpost']) {
        showmessage('postperm_none_nopermission', NULL, array(), array('login' => 1));
    } elseif ($_G['forum']['postperm'] && !forumperm($_G['forum']['postperm'])) {
        showmessagenoperm('postperm', $_G['fid']);
    }
} elseif ($_G['forum']['allowpost'] == -1) {
    showmessage('post_forum_newthread_nopermission', NULL);
}
if (!$_G['uid'] && ($_G['setting']['need_avatar'] || $_G['setting']['need_email'] || $_G['setting']['need_friendnum'])) {
    showmessage('postperm_login_nopermission', NULL, array(), array('login' => 1));
}
checklowerlimit('post');
if (!submitcheck('topicsubmit', 0, $seccodecheck, $secqaacheck)) {
    $isfirstpost = 1;
    $tagoffcheck = '';
    $showthreadsorts = !empty($sortid) || $_G['forum']['threadsorts']['required'];
    if ($special == 2 && $_G['group']['allowposttrade']) {
        $expiration_7days = date('Y-m-d', TIMESTAMP + 86400 * 7);
        $expiration_14days = date('Y-m-d', TIMESTAMP + 86400 * 14);
        $trade['expiration'] = $expiration_month = date('Y-m-d', mktime(0, 0, 0, date('m') + 1, date('d'), date('Y')));
        $expiration_3months = date('Y-m-d', mktime(0, 0, 0, date('m') + 3, date('d'), date('Y')));
        $expiration_halfyear = date('Y-m-d', mktime(0, 0, 0, date('m') + 6, date('d'), date('Y')));
        $expiration_year = date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y') + 1));
    } elseif ($specialextra) {
        $threadpluginclass = null;
        if (isset($_G['setting']['threadplugins'][$specialextra]['module'])) {
            $threadpluginfile = DISCUZ_ROOT . './source/plugin/' . $_G['setting']['threadplugins'][$specialextra]['module'] . '.class.php';
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:31,代码来源:post_newthread.php

示例5: showmessage

            showmessage('this_message_could_not_be_deleted');
        }
    }
} elseif ($_GET['op'] == 'send') {
    $waittime = interval_check('post');
    if ($waittime > 0) {
        showmessage('operating_too_fast', '', 1, array($waittime));
    }
    cknewuser();
    if ($touid) {
        if (isblacklist($touid)) {
            showmessage('is_blacklist');
        }
    }
    if (submitcheck('pmsubmit')) {
        checklowerlimit('sendpm');
        $username = empty($_POST['username']) ? '' : $_POST['username'];
        $message = (!empty($_POST['messageappend']) ? $_POST['messageappend'] . "\n" : '') . trim($_POST['message']);
        if (empty($message)) {
            showmessage('unable_to_send_air_news');
        }
        $message = censor($message);
        loadcache(array('smilies', 'smileytypes'));
        foreach ($_G['cache']['smilies']['replacearray'] as $key => $smiley) {
            $_G['cache']['smilies']['replacearray'][$key] = '[img]' . $_G['siteurl'] . 'static/image/smiley/' . $_G['cache']['smileytypes'][$_G['cache']['smilies']['typearray'][$key]]['directory'] . '/' . $smiley . '[/img]';
        }
        $message = preg_replace($_G['cache']['smilies']['searcharray'], $_G['cache']['smilies']['replacearray'], $message);
        $subject = '';
        $return = 0;
        if ($touid) {
            $return = uc_pm_send($_G['uid'], $touid, $subject, $message, 1, $pmid, 0);
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:31,代码来源:spacecp_pm.php

示例6: str_replace

     $keyword = $keyword != '' ? str_replace('+', ' ', $keyword) : '';
     $index['keywords'] = rawurlencode($index['keywords']);
     $articlelist = array();
     $query = DB::query("SELECT at.*,ac.viewnum, ac.commentnum FROM " . DB::table('portal_article_title') . " at LEFT JOIN " . DB::table('portal_article_count') . " ac ON at.aid=ac.aid WHERE at.aid IN ({$index['ids']}) ORDER BY {$orderby} {$ascdesc} LIMIT {$start_limit}, {$_G['tpp']}");
     while ($article = DB::fetch($query)) {
         $article['dateline'] = dgmdate($article['dateline']);
         $article['pic'] = pic_get($article['pic'], 'portal', $article['thumb'], $article['remote']);
         $article['title'] = bat_highlight($article['title'], $keyword);
         $article['summary'] = bat_highlight($article['summary'], $keyword);
         $articlelist[] = $article;
     }
     $multipage = multi($index['num'], $_G['tpp'], $page, "search.php?mod=portal&searchid={$searchid}&orderby={$orderby}&ascdesc={$ascdesc}&searchsubmit=yes");
     $url_forward = 'search.php?mod=portal&' . $_SERVER['QUERY_STRING'];
     include template('search/portal');
 } else {
     !($_G['group']['exempt'] & 2) && checklowerlimit('search');
     $searchstring = 'portal|title|' . addslashes($srchtxt);
     $searchindex = array('id' => 0, 'dateline' => '0');
     $query = DB::query("SELECT searchid, dateline,\r\n\t\t\t('" . $_G['setting']['search']['portal']['searchctrl'] . "'<>'0' AND " . (empty($_G['uid']) ? "useip='{$_G['clientip']}'" : "uid='{$_G['uid']}'") . " AND {$_G['timestamp']}-dateline<'" . $_G['setting']['search']['portal']['searchctrl'] . "') AS flood,\r\n\t\t\t(searchstring='{$searchstring}' AND expiration>'{$_G['timestamp']}') AS indexvalid\r\n\t\t\tFROM " . DB::table('common_searchindex') . "\r\n\t\t\tWHERE srchmod='{$srchmod}' AND ('" . $_G['setting']['search']['portal']['searchctrl'] . "'<>'0' AND " . (empty($_G['uid']) ? "useip='{$_G['clientip']}'" : "uid='{$_G['uid']}'") . " AND {$_G['timestamp']}-dateline<" . $_G['setting']['search']['portal']['searchctrl'] . ") OR (searchstring='{$searchstring}' AND expiration>'{$_G['timestamp']}')\r\n\t\t\tORDER BY flood");
     while ($index = DB::fetch($query)) {
         if ($index['indexvalid'] && $index['dateline'] > $searchindex['dateline']) {
             $searchindex = array('id' => $index['searchid'], 'dateline' => $index['dateline']);
             break;
         } elseif ($_G['adminid'] != '1' && $index['flood']) {
             showmessage('search_ctrl', 'search.php?mod=portal', array('searchctrl' => $_G['setting']['search']['portal']['searchctrl']));
         }
     }
     if ($searchindex['id']) {
         $searchid = $searchindex['id'];
     } else {
         if (!$srchtxt) {
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:search_portal.php

示例7: getgpc

 $_G['gp_op'] = getgpc('op') && in_array($_G['gp_op'], $oparray) ? $_G['gp_op'] : 'group';
 if (empty($groupmanagers[$_G[uid]]) && !in_array($_G['gp_op'], array('group', 'threadtype', 'demise')) && $_G['adminid'] != 1) {
     showmessage('group_admin_noallowed');
 }
 $page = intval(getgpc('page')) ? intval($_G['gp_page']) : 1;
 $perpage = 54;
 $start = ($page - 1) * $perpage;
 $url = 'forum.php?mod=group&action=manage&op=' . $_G['gp_op'] . '&fid=' . $_G['fid'];
 if ($_G['gp_op'] == 'group') {
     $domainlength = checkperm('domainlength');
     if (submitcheck('groupmanage')) {
         $forumarr = array();
         if (isset($_G['gp_domain']) && $_G['forum']['domain'] != $_G['gp_domain']) {
             $domain = strtolower(trim($_G['gp_domain']));
             if ($_G['setting']['allowgroupdomain'] && !empty($_G['setting']['domain']['root']['group']) && $domainlength) {
                 checklowerlimit('modifydomain');
             }
             if (empty($domainlength) || empty($domain)) {
                 $domain = '';
             } else {
                 require_once libfile('function/domain');
                 if (domaincheck($domain, $_G['setting']['domain']['root']['group'], $domainlength)) {
                     require_once libfile('function/delete');
                     deletedomain($_G['fid'], 'group');
                     DB::insert('common_domain', array('domain' => $domain, 'domainroot' => addslashes($_G['setting']['domain']['root']['group']), 'id' => $_G['fid'], 'idtype' => 'group'));
                 }
             }
             $forumarr['domain'] = $domain;
             updatecreditbyaction('modifydomain');
         }
         if ($_G['gp_name'] && !empty($specialswitch['allowchangename']) || $_G['gp_fup'] && !empty($specialswitch['allowchangetype'])) {
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:forum_group.php

示例8: floor

        if ($tradethread['expiration']) {
            $tradethread['expiration'] = ($tradethread['expiration'] - $timestamp) / 86400;
            if ($tradethread['expiration'] > 0) {
                $tradethread['expirationhour'] = floor(($tradethread['expiration'] - floor($tradethread['expiration'])) * 24);
                $tradethread['expiration'] = floor($tradethread['expiration']);
            } else {
                $tradethread['expiration'] = -1;
            }
        }
        $tradelist[] = $tradethread;
    }
    $multipage = multi($index['threads'], $tpp, $page, "search.php?searchid={$searchid}" . ($orderby ? "&amp;orderby={$orderby}" : '') . "&amp;srchtype=trade&amp;searchsubmit=yes");
    $url_forward = 'search.php?' . $_SERVER['QUERY_STRING'];
    include template('search_trade');
} else {
    checklowerlimit($creditspolicy['search'], -1);
    $srchtxt = isset($srchtxt) ? trim($srchtxt) : '';
    $srchuname = isset($srchuname) ? trim($srchuname) : '';
    $forumsarray = array();
    if (!empty($srchfid)) {
        foreach (is_array($srchfid) ? $srchfid : explode('_', $srchfid) as $forum) {
            if ($forum = intval(trim($forum))) {
                $forumsarray[] = $forum;
            }
        }
    }
    $fids = $comma = '';
    foreach ($_DCACHE['forums'] as $fid => $forum) {
        if ($forum['type'] != 'group' && (!$forum['viewperm'] && $readaccess) || $forum['viewperm'] && forumperm($forum['viewperm'])) {
            if (!$forumsarray || in_array($fid, $forumsarray)) {
                $fids .= "{$comma}'{$fid}'";
开发者ID:jonycookie,项目名称:projectm2,代码行数:31,代码来源:search_trade.inc.php

示例9: elseif

} elseif ($forum['allowpost'] == -1) {
    showmessage('post_forum_newthread_nopermission', NULL, 'HALTED');
}
if ($url && !empty($qihoo['relate']['webnum'])) {
    $from = in_array($from, array('direct', 'iframe')) ? $from : '';
    if ($data = @implode('', file("http://search.qihoo.com/sint/content.html?surl={$url}&md5={$md5}&ocs={$charset}&ics={$charset}&from={$from}"))) {
        preg_match_all("/(\\w+):([^\\>]+)/i", $data, $data);
        if (!$data[2][1]) {
            $subject = trim($data[2][3]);
            $message = !$editormode ? str_replace('[br]', "\n", trim($data[2][4])) : str_replace('[br]', '<br />', trim($data[2][4]));
        } else {
            showmessage('reprint_invalid');
        }
    }
}
checklowerlimit($postcredits);
if (!submitcheck('topicsubmit', 0, $seccodecheck, $secqaacheck)) {
    $modelid = $modelid ? intval($modelid) : '';
    $isfirstpost = 1;
    $tagoffcheck = '';
    $showthreadsorts = !empty($sortid);
    $icons = '';
    if (!$special && is_array($_DCACHE['icons'])) {
        $key = 1;
        foreach ($_DCACHE['icons'] as $id => $icon) {
            $icons .= ' <input class="radio" type="radio" name="iconid" value="' . $id . '" /><img src="images/icons/' . $icon . '" alt="" />';
            $icons .= !(++$key % 10) ? '<br />' : '';
        }
    }
    if ($special == 2 && $allowposttrade) {
        $expiration_7days = date('Y-m-d', $timestamp + 86400 * 7);
开发者ID:lilhorse,项目名称:cocoa,代码行数:31,代码来源:newthread.inc.php

示例10: libfile

require_once libfile('function/post');
$feed = array();
if ($_G['gp_action'] == 'paysucceed') {
    $url = !empty($_G['gp_orderid']) ? 'forum.php?mod=trade&orderid=' . intval($_G['gp_orderid']) : 'home.php?mod=spacecp&ac=credit';
    showmessage('payonline_succeed', $url);
} elseif ($_G['gp_action'] == 'nav') {
    require_once libfile('misc/forumselect', 'include');
    exit;
} elseif ($_G['gp_action'] == 'attachcredit') {
    if ($_G['gp_formhash'] != FORMHASH) {
        showmessage('undefined_action', NULL);
    }
    $aid = intval($_G['gp_aid']);
    $attach = DB::fetch_first("SELECT tid, filename FROM " . DB::table('forum_attachment') . " WHERE aid='{$aid}'");
    $thread = DB::fetch_first("SELECT fid FROM " . DB::table('forum_thread') . " WHERE tid='{$attach['tid']}' AND displayorder>='0'");
    checklowerlimit('getattach');
    $getattachcredits = updatecreditbyaction('getattach', $_G['uid'], array(), '', 1, 1, $thread['fid']);
    $_G['policymsg'] = $p = '';
    if ($getattachcredits['updatecredit']) {
        if ($getattachcredits['updatecredit']) {
            for ($i = 1; $i <= 8; $i++) {
                if ($policy = $getattachcredits['extcredits' . $i]) {
                    $_G['policymsg'] .= $p . ($_G['setting']['extcredits'][$i]['img'] ? $_G['setting']['extcredits'][$i]['img'] . ' ' : '') . $_G['setting']['extcredits'][$i]['title'] . ' ' . $policy . ' ' . $_G['setting']['extcredits'][$i]['unit'];
                    $p = ', ';
                }
            }
        }
    }
    $ck = substr(md5($aid . TIMESTAMP . md5($_G['config']['security']['authkey'])), 0, 8);
    $aidencode = aidencode($aid);
    showmessage('attachment_credit', "forum.php?mod=attachment&aid={$aidencode}&ck={$ck}", array('policymsg' => $_G['policymsg'], 'filename' => $attach['filename']), array('redirectmsg' => 1, 'login' => 1));
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:31,代码来源:forum_misc.php

示例11: elseif

                    $maxheight = $_DTYPE[$optionid]['maxheight'] ? 'height="' . $_DTYPE[$optionid]['maxheight'] . '"' : '';
                    $resultlist[$tid]['option'][] = $optiondata[$optionid] ? "<a href=\"{$optiondata[$optionid]}\" target=\"_blank\"><img src=\"{$value['value']}\"  {$maxwidth} {$maxheight} border=\"0\"></a>" : '';
                } elseif ($_DTYPE[$optionid]['type'] == 'url') {
                    $resultlist[$tid]['option'][] = $optiondata[$optionid] ? "<a href=\"{$value['value']}\" target=\"_blank\">{$value['value']}</a>" : '';
                } else {
                    $resultlist[$tid]['option'][] = $value['value'];
                }
            }
        }
    }
    $colspan = count($optionlist) + 2;
    $multipage = multi($index['threads'], $tpp, $page, "search.php?searchid={$searchid}&srchtype=threadsort&sortid={$index['threadsortid']}&searchsubmit=yes");
    $url_forward = 'search.php?' . $_SERVER['QUERY_STRING'];
    include template('search_sort');
} else {
    !($exempt & 2) && checklowerlimit($creditspolicy['search'], -1);
    $forumsarray = array();
    if (!empty($srchfid)) {
        foreach (is_array($srchfid) ? $srchfid : explode('_', $srchfid) as $forum) {
            if ($forum = intval(trim($forum))) {
                $forumsarray[] = $forum;
            }
        }
    }
    $fids = $comma = '';
    foreach ($_DCACHE['forums'] as $fid => $forum) {
        if ($forum['type'] != 'group' && (!$forum['viewperm'] && $readaccess) || $forum['viewperm'] && forumperm($forum['viewperm'])) {
            if (!$forumsarray || in_array($fid, $forumsarray)) {
                $fids .= "{$comma}'{$fid}'";
                $comma = ',';
            }
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:31,代码来源:search_sort.inc.php

示例12: showmessage

    showmessage('attachment_nonexistence');
}
$query = $db->query("SELECT f.viewperm, f.getattachperm, f.getattachcredits, a.allowgetattach FROM {$tablepre}forumfields f\r\n\t\tLEFT JOIN {$tablepre}access a ON a.uid='{$discuz_uid}' AND a.fid=f.fid\r\n\t\tWHERE f.fid='{$thread['fid']}'");
$forum = $db->fetch_array($query);
if (!$ispaid) {
    if (!$forum['allowgetattach']) {
        if (!$forum['getattachperm'] && !$allowgetattach) {
            showmessage('group_nopermission', NULL, 'NOPERM');
        } elseif ($forum['getattachperm'] && !forumperm($forum['getattachperm']) || $forum['viewperm'] && !forumperm($forum['viewperm'])) {
            showmessage('attachment_forum_nopermission', NULL, 'NOPERM');
        }
    }
}
if (!($isimage = preg_match("/^image\\/.+/", $attach['filetype']))) {
    $getattachcredits = $forum['getattachcredits'] ? unserialize($forum['getattachcredits']) : $creditspolicy['getattach'];
    checklowerlimit($getattachcredits, -1);
}
if (empty($noupdate)) {
    if ($delayviewcount == 2 || $delayviewcount == 3) {
        $logfile = './forumdata/cache/cache_attachviews.log';
        if (substr($timestamp, -1) == '0') {
            require_once DISCUZ_ROOT . './include/misc.func.php';
            updateviews('attachments', 'aid', 'downloads', $logfile);
        }
        if (@($fp = fopen(DISCUZ_ROOT . $logfile, 'a'))) {
            fwrite($fp, "{$aid}\n");
            fclose($fp);
        } elseif ($adminid == 1) {
            showmessage('view_log_invalid');
        }
    } else {
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:attachment.php

示例13: array

     $optiondata = array();
     if ($tradetypes && $typeoption && $checkoption) {
         $optiondata = threadsort_validator($typeoption);
     }
     if (!empty($_FILES['tradeattach']['tmp_name'][0])) {
         $_FILES['attach'] = array_merge_recursive((array) $_FILES['attach'], $_FILES['tradeattach']);
     }
 }
 $attachnum = 0;
 if ($allowpostattach && !empty($_FILES['attach']) && is_array($_FILES['attach'])) {
     foreach ($_FILES['attach']['name'] as $attachname) {
         if ($attachname != '') {
             $attachnum++;
         }
     }
     $attachnum && checklowerlimit($postattachcredits, $attachnum);
 } else {
     $_FILES = array();
 }
 $attachments = $attachnum ? attach_upload() : array();
 $attachment = empty($attachments) ? 0 : ($imageexists ? 2 : 1);
 $subscribed = $thread['subscribed'] && $timestamp - $thread['lastpost'] < 7776000;
 $newsubscribed = !empty($emailnotify) && $discuz_uid;
 if ($subscribed && !$modnewreplies) {
     $db->query("UPDATE {$tablepre}subscriptions SET lastpost='{$timestamp}' WHERE tid='{$tid}' AND uid<>'{$discuz_uid}'", 'UNBUFFERED');
 }
 if ($newsubscribed) {
     $db->query("REPLACE INTO {$tablepre}subscriptions (uid, tid, lastpost, lastnotify)\r\n\t\t\tVALUES ('{$discuz_uid}', '{$tid}', '" . ($modnewreplies ? $thread['lastpost'] : $timestamp) . "', '{$timestamp}')", 'UNBUFFERED');
 }
 $bbcodeoff = checkbbcodes($message, !empty($bbcodeoff));
 $smileyoff = checksmilies($message, !empty($smileyoff));
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:31,代码来源:newreply.inc.php

示例14: elseif

} elseif (!$_G['group']['maxtradeprice'] && $item_price > 0 && $_G['group']['mintradeprice'] > $item_price) {
    showmessage('trade_price_more_than', '', array('mintradeprice' => $_G['group']['mintradeprice']));
} elseif (!$_G['group']['maxtradeprice'] && $item_credit > 0 && $_G['group']['mintradeprice'] > $item_credit) {
    showmessage('trade_credit_more_than', '', array('mintradeprice' => $_G['group']['mintradeprice']));
} elseif ($item_price <= 0 && $item_credit <= 0) {
    showmessage('trade_pricecredit_need');
} elseif ($_G['gp_item_number'] < 1) {
    showmessage('tread_please_number');
}
if (!empty($_FILES['tradeattach']['tmp_name'][0])) {
    $_FILES['attach'] = array_merge_recursive((array) $_FILES['attach'], $_FILES['tradeattach']);
}
if (($_G['group']['allowpostattach'] || $_G['group']['allowpostimage']) && is_array($_FILES['attach'])) {
    foreach ($_FILES['attach']['name'] as $attachname) {
        if ($attachname != '') {
            checklowerlimit('postattach');
            break;
        }
    }
}
$typeid = isset($typeid) ? $typeid : 0;
$displayorder = $modnewthreads ? -2 : ($_G['forum']['ismoderator'] && !empty($_G['gp_sticktopic']) ? 1 : 0);
$digest = $_G['forum']['ismoderator'] && !empty($addtodigest) ? 1 : 0;
$readperm = $_G['group']['allowsetreadperm'] ? $readperm : 0;
$isanonymous = $_G['gp_isanonymous'] && $_G['group']['allowanonymous'] ? 1 : 0;
$author = !$isanonymous ? $_G['username'] : '';
$moderated = $digest || $displayorder > 0 ? 1 : 0;
$posttableid = getposttableid('p');
$isgroup = $_G['forum']['status'] == 3 ? 1 : 0;
DB::query("INSERT INTO " . DB::table('forum_thread') . " (fid, posttableid, readperm, price, typeid, author, authorid, subject, dateline, lastpost, lastposter, displayorder, digest, special, attachment, moderated, replies, status, isgroup)\n\tVALUES ('{$_G['fid']}', '{$posttableid}', '{$readperm}', '{$price}', '{$typeid}', '{$author}', '{$_G['uid']}', '{$subject}', '{$_G['timestamp']}', '{$_G['timestamp']}', '{$author}', '{$displayorder}', '{$digest}', '{$special}', '{$attachment}', '{$moderated}', '1', '{$thread['status']}', '{$isgroup}')");
$tid = DB::insert_id();
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:31,代码来源:post_newtrade.php

示例15: preg_replace

        $postinfo['message'] = preg_replace($attachfind, $attachreplace, $postinfo['message']);
    }
    if ($special == 5) {
        $standselected = array($firststand => 'selected="selected"');
    }
    include template('post');
} else {
    $redirecturl = "viewthread.php?tid={$tid}&page={$page}&extra={$extra}" . ($vid && $isfirstpost ? "&vid={$vid}" : '') . "#pid{$pid}";
    if (empty($delete)) {
        if ($post_invalid = checkpost($isfirstpost && $special)) {
            showmessage($post_invalid);
        }
        if ($allowpostattach && is_array($_FILES['attach'])) {
            foreach ($_FILES['attach']['name'] as $attachname) {
                if ($attachname != '') {
                    checklowerlimit($creditspolicy['postattach']);
                    break;
                }
            }
        }
        if (!$isorigauthor && !$allowanonymous) {
            if ($orig['anonymous'] && !$isanonymous) {
                $isanonymous = 0;
                $authoradd = ', author=\'' . addslashes($orig['author']) . '\'';
                $anonymousadd = ', anonymous=\'0\'';
            } else {
                $isanonymous = $orig['anonymous'];
                $authoradd = $anonymousadd = '';
            }
        } else {
            $authoradd = ', author=\'' . ($isanonymous ? '' : addslashes($orig['author'])) . '\'';
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:31,代码来源:editpost.inc.php


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