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


PHP getattach函数代码示例

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


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

示例1: elseif

                $post['message'] = $language['post_banned'];
            } elseif ($post['status'] & 1) {
                $post['message'] = $language['post_single_banned'];
            } else {
                $post['message'] = preg_replace("/\\[hide=?\\d*\\](.*?)\\[\\/hide\\]/is", "[b]{$language['post_hidden']}[/b]", $post['message']);
                $post['message'] = discuzcode($post['message'], $post['smileyoff'], $post['bbcodeoff'], $post['htmlon'] & 1, $_G['forum']['allowsmilies'], $_G['forum']['allowbbcode'], $_G['forum']['allowimgcode'], $_G['forum']['allowhtml'], $_G['forum']['jammer']);
            }
            if ($_G['setting']['bannedmessages']) {
                $post['groupid'] = $users[$post['authorid']]['groupid'];
            }
            $postlist[$k] = $post;
        }
    }
    unset($uids, $users);
    if ($_G['group']['allowpostattach'] || $_G['group']['allowpostimage']) {
        $attachlist = getattach(0);
        $attachs = $attachlist['attachs'];
        $imgattachs = $attachlist['imgattachs'];
        unset($attachlist);
    }
    getgpc('infloat') ? include template('forum/post_infloat') : (include template('forum/post'));
} else {
    $modpost = C::m('forum_post', $_G['tid']);
    $bfmethods = $afmethods = array();
    $params = array('subject' => $subject, 'message' => $message, 'special' => $special, 'extramessage' => $extramessage, 'bbcodeoff' => $_GET['bbcodeoff'], 'smileyoff' => $_GET['smileyoff'], 'htmlon' => $_GET['htmlon'], 'parseurloff' => $_GET['parseurloff'], 'usesig' => $_GET['usesig'], 'isanonymous' => $_GET['isanonymous'], 'noticetrimstr' => $_GET['noticetrimstr'], 'noticeauthor' => $_GET['noticeauthor'], 'from' => $_GET['from'], 'sechash' => $_GET['sechash'], 'geoloc' => diconv($_GET['geoloc'], 'UTF-8'));
    if (!empty($_GET['trade']) && $thread['special'] == 2 && $_G['group']['allowposttrade']) {
        $bfmethods[] = array('class' => 'extend_thread_trade', 'method' => 'before_newreply');
    }
    $attentionon = empty($_GET['attention_add']) ? 0 : 1;
    $attentionoff = empty($attention_remove) ? 0 : 1;
    $bfmethods[] = array('class' => 'extend_thread_rushreply', 'method' => 'before_newreply');
开发者ID:lemonstory,项目名称:bbs,代码行数:31,代码来源:post_newreply.php

示例2: showmessage

    } else {
        showmessage('username_nonexistence', '', array(), array('msgtype' => 3));
    }
} elseif ($_GET['action'] == 'attachlist') {
    require_once libfile('function/post');
    loadcache('groupreadaccess');
    $attachlist = getattach($_GET['pid'], intval($_GET['posttime']), $_GET['aids']);
    $attachlist = $attachlist['attachs']['unused'];
    $_G['group']['maxprice'] = isset($_G['setting']['extcredits'][$_G['setting']['creditstrans']]) ? $_G['group']['maxprice'] : 0;
    include template('common/header_ajax');
    include template('forum/ajax_attachlist');
    include template('common/footer_ajax');
    dexit();
} elseif ($_GET['action'] == 'imagelist') {
    require_once libfile('function/post');
    $attachlist = getattach($_GET['pid'], intval($_GET['posttime']), $_GET['aids']);
    $imagelist = $attachlist['imgattachs']['unused'];
    include template('common/header_ajax');
    include template('forum/ajax_imagelist');
    include template('common/footer_ajax');
    dexit();
} elseif ($_GET['action'] == 'get_rushreply_membernum') {
    $tid = intval($_GET['tid']);
    if ($tid) {
        $membernum = C::t('forum_post')->count_author_by_tid($tid);
        showmessage('thread_reshreply_membernum', '', array('membernum' => intval($membernum - 1)), array('alert' => 'info'));
    }
    dexit();
} elseif ($_GET['action'] == 'deleteattach') {
    $count = 0;
    if ($_GET['aids']) {
开发者ID:vanloswang,项目名称:DiscuzX,代码行数:31,代码来源:forum_ajax.php

示例3: str_replace

 if ($isfirstpost && $specialextra) {
     @(include_once DISCUZ_ROOT . './source/plugin/' . $_G['setting']['threadplugins'][$specialextra]['module'] . '.class.php');
     $classname = 'threadplugin_' . $specialextra;
     if (class_exists($classname) && method_exists($threadpluginclass = new $classname(), 'editpost')) {
         $threadplughtml = $threadpluginclass->editpost($_G['fid'], $_G['tid']);
     }
 }
 $postinfo['subject'] = str_replace('"', '"', $postinfo['subject']);
 $postinfo['message'] = dhtmlspecialchars($postinfo['message']);
 $language = lang('forum/misc');
 $postinfo['message'] = preg_replace($postinfo['htmlon'] ? $language['post_edithtml_regexp'] : (!$_G['forum']['allowbbcode'] || $postinfo['bbcodeoff'] ? $language['post_editnobbcode_regexp'] : $language['post_edit_regexp']), '', $postinfo['message']);
 if ($special == 5) {
     $standselected = array($firststand => 'selected="selected"');
 }
 if ($_G['group']['allowpostattach'] || $_G['group']['allowpostimage']) {
     $attachlist = getattach($pid);
     $attachs = $attachlist['attachs'];
     $imgattachs = $attachlist['imgattachs'];
     unset($attachlist);
     $attachfind = $attachreplace = array();
     if (!empty($attachs['used'])) {
         foreach ($attachs['used'] as $attach) {
             if ($attach['isimage']) {
                 $attachfind[] = "/\\[attach\\]{$attach['aid']}\\[\\/attach\\]/i";
                 $attachreplace[] = '[attachimg]' . $attach['aid'] . '[/attachimg]';
             }
         }
     }
     if (!empty($imgattachs['used'])) {
         foreach ($imgattachs['used'] as $attach) {
             $attachfind[] = "/\\[attach\\]{$attach['aid']}\\[\\/attach\\]/i";
开发者ID:kleitz,项目名称:sports,代码行数:31,代码来源:post_editpost.php

示例4: str_replace

     @(include_once DISCUZ_ROOT . './plugins/' . $threadplugins[$specialextra]['module'] . '.class.php');
     $classname = 'threadplugin_' . $specialextra;
     if (method_exists($classname, 'editpost')) {
         $threadpluginclass = new $classname();
         $threadplughtml = $threadpluginclass->editpost($fid, $tid);
     }
 }
 $postinfo['subject'] = str_replace('"', '"', $postinfo['subject']);
 $postinfo['message'] = dhtmlspecialchars($postinfo['message']);
 include_once language('misc');
 $postinfo['message'] = preg_replace($language['post_edit_regexp'], '', $postinfo['message']);
 if ($special == 5) {
     $standselected = array($firststand => 'selected="selected"');
 }
 if ($allowpostattach) {
     $attachlist = getattach();
     $attachs = $attachlist['attachs'];
     $imgattachs = $attachlist['imgattachs'];
     unset($attachlist);
     $attachfind = $attachreplace = array();
     if ($attachs['used']) {
         foreach ($attachs['used'] as $attach) {
             if ($attach['isimage']) {
                 $attachfind[] = "/\\[attach\\]{$attach['aid']}\\[\\/attach\\]/i";
                 $attachreplace[] = '[attachimg]' . $attach['aid'] . '[/attachimg]';
             }
         }
     }
     if ($imgattachs['used']) {
         foreach ($imgattachs['used'] as $attach) {
             $attachfind[] = "/\\[attach\\]{$attach['aid']}\\[\\/attach\\]/i";
开发者ID:lilhorse,项目名称:cocoa,代码行数:31,代码来源:editpost.inc.php

示例5: showmessage

        $inviteuser = DB::fetch($query);
        $inviteuser = $inviteuser['username'];
        showmessage('invite_send', '', array('inviteuser' => $inviteuser, 'bbname' => $_G['setting']['bbname']));
    }
} elseif ($_G['gp_action'] == 'attachlist') {
    require_once libfile('function/post');
    $attachlist = getattach($_G['gp_pid'], intval($_G['gp_posttime']));
    $attachlist = $attachlist['attachs']['unused'];
    $_G['group']['maxprice'] = isset($_G['setting']['extcredits'][$_G['setting']['creditstrans']]) ? $_G['group']['maxprice'] : 0;
    include template('common/header_ajax');
    include template('forum/ajax_attachlist');
    include template('common/footer_ajax');
    dexit();
} elseif ($_G['gp_action'] == 'imagelist') {
    require_once libfile('function/post');
    $attachlist = getattach($_G['gp_pid']);
    $imagelist = $attachlist['imgattachs']['unused'];
    include template('common/header_ajax');
    include template('forum/ajax_imagelist');
    include template('common/footer_ajax');
    dexit();
} elseif ($_G['gp_action'] == 'secondgroup') {
    require_once libfile('function/group');
    $groupselect = get_groupselect($_G['gp_fupid'], $_G['gp_groupid']);
    include template('common/header_ajax');
    include template('forum/ajax_secondgroup');
    include template('common/footer_ajax');
    dexit();
} elseif ($_G['gp_action'] == 'displaysearch_adv') {
    $display = $_G['gp_display'] == 1 ? 1 : '';
    dsetcookie('displaysearch_adv', $display);
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:31,代码来源:forum_ajax.php

示例6: elseif

} elseif ($_G['gp_action'] == 'checkuserexists') {
    $check = DB::result_first("SELECT uid FROM " . DB::table('common_member') . " WHERE username='" . trim($_G['gp_username']) . "'");
    $check ? showmessage('<img src="' . $_G['style']['imgdir'] . '/check_right.gif" width="13" height="13">', '', array(), array('msgtype' => 3)) : showmessage('username_nonexistence', '', array(), array('msgtype' => 3));
} elseif ($_G['gp_action'] == 'attachlist') {
    require_once libfile('function/post');
    loadcache('groupreadaccess');
    $attachlist = getattach($_G['gp_pid'], intval($_G['gp_posttime']), $_G['gp_aids']);
    $attachlist = $attachlist['attachs']['unused'];
    $_G['group']['maxprice'] = isset($_G['setting']['extcredits'][$_G['setting']['creditstrans']]) ? $_G['group']['maxprice'] : 0;
    include template('common/header_ajax');
    include template('forum/ajax_attachlist');
    include template('common/footer_ajax');
    dexit();
} elseif ($_G['gp_action'] == 'imagelist') {
    require_once libfile('function/post');
    $attachlist = getattach($_G['gp_pid'], intval($_G['gp_posttime']), $_G['gp_aids']);
    $imagelist = $attachlist['imgattachs']['unused'];
    include template('common/header_ajax');
    include template('forum/ajax_imagelist');
    include template('common/footer_ajax');
    dexit();
} elseif ($_G['gp_action'] == 'deleteattach') {
    $count = 0;
    if ($_G['gp_aids']) {
        foreach ($_G['gp_aids'] as $aid) {
            $attach = DB::fetch_first("SELECT * FROM " . DB::table(getattachtablebyaid($aid)) . " WHERE aid='{$aid}'");
            if ($attach && ($attach['pid'] && $attach['pid'] == $_G['gp_pid'] && $_G['uid'] == $attach['uid'] || $_G['forum']['ismoderator'] || !$attach['pid'] && $_G['uid'] == $attach['uid'])) {
                DB::delete(getattachtablebyaid($aid), "aid='{$aid}'");
                DB::delete('forum_attachment', "aid='{$aid}'");
                dunlink($attach);
                $count++;
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:forum_ajax.php

示例7: getAttachmentByPids

 public function getAttachmentByPids($pids)
 {
     global $_G;
     if (!is_array($pids)) {
         $pids = explode(',', $pids);
     }
     include_once libfile('function/post');
     $attachment = array();
     foreach ($pids as $pid) {
         $data = getattach($pid);
         $attachment[] = $data['used'];
     }
     return $attachment;
 }
开发者ID:softhui,项目名称:discuz,代码行数:14,代码来源:Storage.php


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