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


PHP multi_str函数代码示例

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


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

示例1: caccsql

function caccsql($fname, $ids, $smode = 0)
{
    if (!$ids || !$fname) {
        return '';
    }
    if (!is_array($ids)) {
        $ids = array($ids);
    }
    return $fname . ' ' . multi_str($ids);
}
开发者ID:polarlight1989,项目名称:08cms,代码行数:10,代码来源:plus.fun.php

示例2: cn_statsum

function cn_statsum()
{
    //暂时不处理层的关系//需要更新缓存
    global $db, $tblprefix, $timestamp, $cotypestats, $cnodestatcircle, $cotypes, $subsites, $acatalogs;
    $cachetimefile = M_ROOT . './dynamic/stats/cotypesum_time.cac';
    if (empty($cotypestats) || $timestamp - @filemtime($cachetimefile) < $cnodestatcircle * 3600) {
        return;
    }
    $statarr = array_filter(explode(',', $cotypestats));
    if (!$statarr) {
        return;
    }
    @set_time_limit(1000);
    @ignore_user_abort(TRUE);
    load_cache('cotypes,acatalogs');
    if (in_array('ca', $statarr)) {
        $query = $db->query("SELECT caid,COUNT(aid) AS archives,SUM(clicks) AS clicks FROM {$tblprefix}archives GROUP BY caid");
        while ($item = $db->fetch_array($query)) {
            $db->query("UPDATE {$tblprefix}catalogs SET archives='{$item['archives']}',clicks='{$item['clicks']}' WHERE caid='{$item['caid']}'", 'UNBUFFERED');
        }
        foreach ($acatalogs as $k1 => $v1) {
            $ids = cnsonids($k1, $acatalogs);
            if (count($ids) > 1) {
                $row = $db->fetch_one("SELECT SUM(archives) AS archives,SUM(clicks) AS clicks FROM {$tblprefix}catalogs WHERE caid " . multi_str($ids));
                $db->query("UPDATE {$tblprefix}catalogs SET archives='{$row['archives']}',clicks='{$row['clicks']}' WHERE caid='{$k1}'", 'UNBUFFERED');
            }
        }
        $sids = array_keys($subsites);
        $sids[] = 0;
        foreach ($sids as $v) {
            updatecache('catalogs', '', $v);
        }
    }
    foreach ($cotypes as $k => $v) {
        if (!$v['self_reg'] && in_array($k, $statarr)) {
            $coclasses = read_cache('coclasses', $k);
            foreach ($coclasses as $k1 => $v1) {
                if ($cnsql = cnsql($k, $k1, '')) {
                    $row = $db->fetch_one("SELECT COUNT(aid) AS archives,SUM(clicks) AS clicks FROM {$tblprefix}archives WHERE {$cnsql}");
                    $db->query("UPDATE {$tblprefix}coclass SET archives='{$row['archives']}',clicks='{$row['clicks']}' WHERE ccid='{$k1}'", 'UNBUFFERED');
                }
            }
            foreach ($coclasses as $k1 => $v1) {
                $ids = cnsonids($k1, $coclasses);
                if (count($ids) > 1 && ($cnsql = cnsql($k, $ids, ''))) {
                    $row = $db->fetch_one("SELECT SUM(archives) AS archives,SUM(clicks) AS clicks FROM {$tblprefix}coclass WHERE {$cnsql}");
                    $db->query("UPDATE {$tblprefix}coclass SET archives='{$row['archives']}',clicks='{$row['clicks']}' WHERE ccid='{$k1}'", 'UNBUFFERED');
                }
            }
            updatecache('coclasses', $k);
        }
    }
    unset($coclasses);
    if (@($fp = fopen($cachetimefile, 'w'))) {
        fclose($fp);
    }
    return;
}
开发者ID:polarlight1989,项目名称:08cms,代码行数:58,代码来源:counter.fun.php

示例3: array

     $selectid = array();
     $npage = empty($npage) ? 1 : $npage;
     if (empty($pages)) {
         $counts = $db->result_one("SELECT count(*) FROM {$tblprefix}purchases cu LEFT JOIN {$tblprefix}archives a ON (a.aid=cu.aid) {$wheresql}");
         $pages = @ceil($counts / $atpp);
     }
     if ($npage <= $pages) {
         $fromstr = empty($fromid) ? "" : "cid<{$fromid}";
         $nwheresql = !$wheresql ? $fromstr ? "WHERE {$fromstr}" : "" : $wheresql . ($fromstr ? " AND " : "") . $fromstr;
         $query = $db->query("SELECT cid FROM {$tblprefix}purchases cu LEFT JOIN {$tblprefix}archives a ON (a.aid=cu.aid) {$nwheresql} ORDER BY cu.cid DESC LIMIT 0,{$atpp}");
         while ($item = $db->fetch_array($query)) {
             $selectid[] = $item['cid'];
         }
     }
 }
 $db->query("DELETE FROM {$tblprefix}purchases WHERE cid " . multi_str($selectid) . " AND oid=0", 'SILENT');
 if (!empty($select_all)) {
     $npage++;
     if ($npage <= $pages) {
         $fromid = min($selectid);
         $transtr = '';
         $transtr .= "&select_all=1";
         $transtr .= "&pages={$pages}";
         $transtr .= "&npage={$npage}";
         $transtr .= "&barcsedit=1";
         $transtr .= "&fromid={$fromid}";
         amessage('operating', "?entry=purchases&action=purchasesedit{$param_suffix}&page={$page}{$filterstr}{$transtr}", $pages, $npage, "<a href=\"?entry=purchases&action=purchasesedit{$param_suffix}&page={$page}{$filterstr}\">", '</a>');
     }
 }
 adminlog(lang('gooliadm'), lang('goolisdmope'));
 amessage('goolisopefin', "?entry=purchases&action=purchasesedit{$param_suffix}&page={$page}{$filterstr}");
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:purchases.inc.php

示例4: empty

 $keyword = empty($keyword) ? '' : $keyword;
 $qstate = empty($qstate) ? '' : trim($qstate);
 $wheresql = '';
 $fromsql = "FROM {$tblprefix}farchives";
 //栏目范围
 if (!empty($fcaid)) {
     if (!in_array(-1, $a_fcaids) && !in_array($fcaid, $a_fcaids)) {
         $no_list = 1;
     } else {
         $wheresql .= ($wheresql ? ' AND ' : '') . "fcaid='{$fcaid}'";
     }
 } elseif (!in_array(-1, $a_fcaids)) {
     if (!$a_fcaids) {
         $nolist = 1;
     } else {
         $wheresql .= ($wheresql ? ' AND ' : '') . "fcaid " . multi_str($a_fcaids);
     }
 }
 //审核状态范围
 if ($checked != -1) {
     if ($u_checked != -1 && $checked != $u_checked) {
         $no_list = true;
     } else {
         $wheresql .= ($wheresql ? ' AND ' : '') . "checked='{$checked}'";
     }
 } elseif ($u_checked != -1) {
     $wheresql .= ($wheresql ? ' AND ' : '') . "checked='{$u_checked}'";
 }
 //有效期状态范围
 if ($valid != -1) {
     if ($u_valid != -1 && $valid != $u_valid) {
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:farchives.inc.php

示例5: count

         $itemstr .= "<tr class=\"txt\">\n" . "<td class=\"txtC w50\"><input class=\"checkbox\" type=\"checkbox\" name=\"delete[{$row['trid']}]\" value=\"{$row['trid']}\"></td>\n" . "<td class=\"txtL\">{$row['mname']}</td>\n" . "<td class=\"txtC\">" . $mchannels[$row['fromid']]['cname'] . "</td>\n" . "<td class=\"txtC\">" . $mchannels[$row['toid']]['cname'] . "</td>\n" . "<td class=\"txtC w50\">{$checkstr}</td>\n" . "<td class=\"txtC w70\">{$createdatestr}</td>\n" . "<td class=\"txtC w30\">{$detailstr}</td>\n" . "</tr>\n";
     }
     $counts = $db->result_one("SELECT count(*) FROM {$tblprefix}mtrans {$wheresql}");
     $multi = multi($counts, $atpp, $page, "?entry=mtrans&action=mtransedit{$filterstr}");
     tabheader(lang('memchanaltli'), '', '', 8);
     trcategory(array("<input class=\"checkbox\" type=\"checkbox\" name=\"chkdel\" onclick=\"checkall(this.form,'delete','chkdel')\">" . lang('del'), lang('member_cname'), lang('sourcechannel'), lang('targetchannel'), "<input class=\"checkbox\" type=\"checkbox\" name=\"chkcheck\" onclick=\"checkall(this.form,'checkid','chkcheck')\">" . lang('check'), lang('add_date'), lang('detail')));
     echo $itemstr;
     tabfooter();
     echo $multi;
     echo "<input class=\"button\" type=\"submit\" name=\"bmtransedit\" value=\"" . lang('submit') . "\">";
 } else {
     if (empty($delete) && empty($checkid)) {
         amessage('selectaltrec', "?entry=mtrans&action=mtransedit&page={$page}{$filterstr}");
     }
     if (!empty($delete)) {
         $db->query("DELETE FROM {$tblprefix}mtrans WHERE trid " . multi_str($delete));
     }
     if (!empty($checkid)) {
         $actuser = new cls_userinfo();
         foreach ($checkid as $trid) {
             //?????????????????????????????????????????
             if (empty($delete) || !in_array($trid, $delete)) {
                 if ($minfos = $db->fetch_one("SELECT * FROM {$tblprefix}mtrans WHERE trid='{$trid}' AND checked='0'")) {
                     $minfos = array_merge($minfos, $minfos['contentarr'] ? unserialize($minfos['contentarr']) : array());
                     unset($minfos['contentarr']);
                     $actuser->activeuser($minfos['mid'], 2);
                     $omchid = $minfos['fromid'];
                     $mchid = $minfos['toid'];
                     $mchannel = $mchannels[$mchid];
                     foreach (array('additems') as $var) {
                         ${$var} = $mchannel[$var] ? explode(',', $mchannel[$var]) : array();
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:mtrans.inc.php

示例6: multi_str

     $query = $db->query("SELECT aid,mid FROM {$tblprefix}comments WHERE cid " . multi_str($selectid));
     while ($row = $db->fetch_array($query)) {
         $aedit->set_aid($row['aid']);
         $aedit->arc_nums('comments', -1, 1);
         $aedit->init();
         $actuser->activeuser($row['mid']);
         $actuser->basedeal('comment', 0, 1, 1);
         $actuser->init();
     }
     $db->query("DELETE FROM {$tblprefix}comments WHERE cid " . multi_str($selectid), 'UNBUFFERED');
 } else {
     if (!empty($arcdeal['check'])) {
         $db->query("UPDATE {$tblprefix}comments SET checked='1' WHERE cid " . multi_str($selectid));
     }
     if (!empty($arcdeal['uncheck'])) {
         $db->query("UPDATE {$tblprefix}comments SET checked='0' WHERE cid " . multi_str($selectid));
     }
 }
 if (!empty($select_all)) {
     $npage++;
     if ($npage <= $pages) {
         $fromid = min($selectid);
         $transtr = '';
         $transtr .= "&select_all=1";
         $transtr .= "&pages={$pages}";
         $transtr .= "&npage={$npage}";
         $transtr .= "&barcsedit=1";
         $transtr .= "&fromid={$fromid}";
         amessage('operating', "?entry=comments&action=commentsedit&page={$page}{$param_suffix}{$filterstr}{$transtr}{$parastr}&dealstr={$dealstr}", $pages, $npage, "<a href=\"?entry=comments&action=commentsedit&page={$page}{$param_suffix}{$filterstr}\">", '</a>');
     }
 }
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:comments.inc.php

示例7: array

 //已经在合辑中的内容不再列出
 //栏目范围
 $caids = array(-1);
 if (!empty($caid)) {
     $caids = cnsonids($caid, $catalogs);
     $wheresql .= " AND a.caid " . multi_str($caids);
 }
 //子站范围
 if ($nsid != -1) {
     if (!empty($u_sids) && !in_array($nsid, $u_sids)) {
         $no_list = true;
     } else {
         $wheresql .= " AND a.sid='{$nsid}'";
     }
 } elseif (!empty($u_sids)) {
     $wheresql .= " AND a.sid " . multi_str($u_sids);
 }
 //搜索关键词处理
 $keyword && ($wheresql .= " AND (a.mname LIKE '%" . str_replace(array(' ', '*'), '%', addcslashes($keyword, '%_')) . "%' OR a.subject LIKE '%" . str_replace(array(' ', '*'), '%', addcslashes($keyword, '%_')) . "%')");
 $filterstr = '';
 foreach (array('nimuid', 'caid', 'chid', 'keyword') as $k) {
     ${$k} && ($filterstr .= "&{$k}=" . rawurlencode(stripslashes(${$k})));
 }
 foreach (array('nsid') as $k) {
     ${$k} != -1 && ($filterstr .= "&{$k}=" . ${$k});
 }
 $wheresql = empty($no_list) ? $wheresql : 'WHERE 1=0';
 //echo $wheresql;
 if (!submitcheck('bloadold')) {
     if (empty($u_tplname)) {
         //需要归入的合辑管理区***********************************************************
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:loadold.inc.php

示例8: unset

         $gather->gather_guid($guid, 0);
     }
     unset($gather);
 } elseif ($arcdeal == 'output') {
     $progress = new Progress();
     $c_upload = new cls_upload();
     $gather = new cls_gather();
     $gather->set_mission($gsid);
     foreach ($selectid as $guid) {
         $gather->output_guid($guid);
     }
     unset($gather);
 } elseif ($arcdeal == 'abover') {
     $gmissions[$gsid]['sonid'] && $db->query("UPDATE {$tblprefix}gurls SET abover='{$arcabover}' WHERE guid " . multi_str($selectid), 'UNBUFFERED');
 } elseif ($arcdeal == 'regather') {
     $db->query("UPDATE {$tblprefix}gurls SET gatherdate=0,outputdate=0 WHERE guid " . multi_str($selectid), 'UNBUFFERED');
 }
 empty($progress) || $progress->hide();
 if (!empty($select_all)) {
     $npage++;
     if ($npage <= $pages) {
         $fromid = min($selectid);
         $transtr = '';
         $transtr .= "&select_all=1";
         $transtr .= "&pages={$pages}";
         $transtr .= "&npage={$npage}";
         $transtr .= "&barcsedit=1";
         $transtr .= "&fromid={$fromid}";
         amessage(lang('operating') . "<br>" . lang('all') . " {$pages} " . lang('page0') . "," . lang('dealing') . " {$npage} " . lang('page0') . "<br><br>\n\t\t\t\t<a href=\"?entry=gmissions&action=contentsoption&gsid={$gsid}{$filterstr}{$param_suffix}\">>>" . lang('pause') . "</a>", "?entry=gmissions&action=contentsoption&gsid={$gsid}&page={$page}{$filterstr}{$transtr}{$parastr}&arcdeal={$arcdeal}{$param_suffix}", 200);
     }
 }
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:gmissions.inc.php

示例9: elseif

 if ($mchid) {
     if (!empty($u_mchids) && !in_array($mchid, $u_mchids)) {
         $no_list = true;
     } else {
         $wheresql .= ($wheresql ? ' AND ' : '') . "m.mchid='{$mchid}'";
     }
 } elseif (!empty($u_mchids)) {
     $wheresql .= ($wheresql ? ' AND ' : '') . "m.mchid " . multi_str($u_mchids);
 }
 if ($cuid) {
     if (!empty($u_cuids) && !in_array($cuid, $u_cuids)) {
         $no_list = true;
     }
     $wheresql .= ($wheresql ? ' AND ' : '') . "cu.cuid ='{$cuid}'";
 } elseif (!empty($u_cuids)) {
     $wheresql .= ($wheresql ? ' AND ' : '') . "cu.cuid " . multi_str($u_cuids);
 }
 //审核状态范围
 if ($checked != -1) {
     if ($u_checked != -1 && $checked != $u_checked) {
         $no_list = true;
     } else {
         $wheresql .= ($wheresql ? ' AND ' : '') . "cu.checked='{$checked}'";
     }
 } elseif ($u_checked != -1) {
     $wheresql .= ($wheresql ? ' AND ' : '') . "cu.checked='{$u_checked}'";
 }
 //搜索关键词处理
 $keyword && ($wheresql .= ($wheresql ? ' AND ' : '') . "cu.mname LIKE '%" . str_replace(array(' ', '*'), '%', addcslashes($keyword, '%_')) . "%'");
 $filterstr = '';
 foreach (array('nauid', 'mchid', 'cuid', 'keyword') as $k) {
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:mcomments.inc.php

示例10: in_array

     $caids = in_array(-1, $caids) ? $a_caids : array_intersect($caids, $a_caids);
 }
 if (!$caids) {
     $no_list = true;
 } elseif (!in_array(-1, $caids) && ($cnsql = cnsql(0, $caids, 'a.'))) {
     $wheresql .= " AND {$cnsql}";
 }
 //模型范围
 if ($chid) {
     if (!empty($u_chids) && !in_array($chid, $u_chids)) {
         $no_list = true;
     } else {
         $wheresql .= " AND a.chid='{$chid}'";
     }
 } elseif (!empty($u_chids)) {
     $wheresql .= " AND a.chid " . multi_str($u_chids);
 }
 //状态范围
 if ($status != -1) {
     switch ($status) {
         case '0':
             $wheresql .= " AND a.checked=1";
             break;
         case '1':
             $wheresql .= " AND a.checked=0 AND s.overupdate=0";
             break;
         case '2':
             $wheresql .= " AND s.overupdate!=0";
             break;
     }
 }
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:arcs.php

示例11: foreach

    $no_list = 1;
}
$filterstr = '';
foreach (array('chid', 'nchid', 'isopen', 'keyword', 'field_id', 'show_id', 'win_id') as $k) {
    ${$k} && ($filterstr .= "&{$k}=" . rawurlencode(stripslashes(${$k})));
}
$wheresql = "WHERE checked=1 AND abover=0";
$fromsql = "FROM {$tblprefix}archives";
if ($nchid) {
    if (!in_array($nchid, $nchids)) {
        $no_list = 1;
    } else {
        $wheresql .= " AND chid={$nchid}";
    }
} else {
    $wheresql .= " AND chid " . multi_str($nchids);
}
if (!$isopen) {
    if ($memberid) {
        $wheresql .= " AND mid='{$memberid}'";
    } else {
        $no_list = 1;
    }
}
$keyword && ($wheresql .= " AND (mname LIKE '%" . str_replace(array(' ', '*'), '%', addcslashes($keyword, '%_')) . "%' OR subject LIKE '%" . str_replace(array(' ', '*'), '%', addcslashes($keyword, '%_')) . "%')");
$wheresql = empty($no_list) ? $wheresql : 'WHERE 1=0';
echo form_str('choosealbum', "?win_id={$win_id}&field_id={$field_id}&show_id={$show_id}&page={$page}");
tabheader_e();
echo "<tr><td colspan=\"2\" class=\"txt txtleft\">";
echo lang('keyword') . "&nbsp; <input class=\"text\" name=\"keyword\" type=\"text\" value=\"{$keyword}\" size=\"8\" style=\"vertical-align: middle;\">&nbsp; ";
$chidsarr = array('0' => lang('all_channel'));
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:albums.php

示例12: empty

 $staticmode = empty($staticmode) ? 0 : max(0, intval($staticmode));
 $numperpic = empty($numperpic) ? 20 : min(500, max(20, intval($numperpic)));
 $caid = max(0, intval(@$caid));
 $mainline = max(0, intval(@$mainline));
 $cnlevel = max(0, intval(@$cnlevel));
 if (!isset($ptypestr)) {
     $ptypes = empty($ptypes) ? array() : $ptypes;
     $ptypestr = implode(',', $ptypes);
 } else {
     $ptypes = explode(',', $ptypestr);
 }
 $fromsql = "FROM {$tblprefix}cnodes";
 $wheresql = "WHERE sid={$sid} AND inconfig=1";
 $mainline && ($wheresql .= " AND mainline='{$mainline}'");
 $cnlevel && ($wheresql .= " AND cnlevel='{$cnlevel}'");
 $caid && ($wheresql .= " AND caid " . multi_str(cnsonids($caid, $catalogs)));
 $filterstr = '';
 foreach (array('staticmode', 'ptypestr', 'numperpic', 'caid', 'mainline', 'cnlevel') as $k) {
     $filterstr .= "&{$k}=" . rawurlencode(${$k});
 }
 if (!submitcheck('bcnodes')) {
     url_nav(lang('staticadmin'), $urlsarr, 'cnodes');
     tabheader(lang('crecatcnodpagsta'), 'archives', "?entry={$entry}&action={$action}{$param_suffix}");
     trbasic(lang('stacremo'), '', makeradio('staticmode', array('0' => lang('pascresta'), '1' => lang('actcresta'), '2' => lang('repstaurl')), $staticmode), '');
     $ptypearr = array();
     for ($i = 0; $i <= $cn_max_addno; $i++) {
         $ptypearr[$i] = $i ? lang('addp') . $i : lang('index');
     }
     trbasic(lang('choatpaty'), '', makecheckbox('ptypes[]', $ptypearr, $ptypes), '');
     trbasic(lang('numperpic20_500'), 'numperpic', $numperpic);
     tabfooter();
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:static.inc.php

示例13: while

 }
 while ($item = $db->fetch_array($query)) {
     $items[$item['ufid']] = $item;
 }
 $actuser = new cls_userinfo();
 foreach ($items as $item) {
     $actuser->activeuser($item['mid']);
     if ($item['thumbed']) {
         $actuser->updateuptotal(ceil(@filesize(local_file($item['url']) . '.s.jpg') / 1024), 'reduce');
         @unlink(local_file($item['url']) . '.s.jpg');
     }
     $actuser->updateuptotal(ceil($item['size'] / 1024), 'reduce', '1');
     @unlink(local_file($item['url']));
     $actuser->init();
 }
 $db->query("DELETE FROM {$tblprefix}userfiles WHERE ufid " . multi_str(array_keys($items)), 'UNBUFFERED');
 unset($actuser);
 if (!empty($select_all)) {
     $npage++;
     if ($npage <= $pages) {
         $fromid = min(array_keys($items));
         $transtr = '';
         $transtr .= "&select_all=1";
         $transtr .= "&pages={$pages}";
         $transtr .= "&npage={$npage}";
         $transtr .= "&buserfilesedit=1";
         $transtr .= "&fromid={$fromid}";
         amessage('operating', "?entry=userfiles&action=userfilesedit&page={$page}{$filterstr}{$transtr}", $pages, $npage, "<a href=\"?entry=userfiles&action=userfilesedit&page={$page}{$filterstr}\">", '</a>');
     }
 }
 adminlog(lang('uploadattadm'), lang('attalistdeloper'));
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:userfiles.inc.php

示例14: trbasic

    trbasic(lang('pmtonames'), 'pmnew[tonames]', empty($tonames) ? '' : $tonames, 'btext');
    trbasic(lang('pmcontent'), 'pmnew[content]', '', 'btextarea');
    $submitstr = '';
    $submitstr .= makesubmitstr('pmnew[title]', 1, 0, 0, 80);
    $submitstr .= makesubmitstr('pmnew[tonames]', 1, 0, 0, 100);
    $submitstr .= makesubmitstr('pmnew[content]', 1, 0, 0, 1000);
    $submitstr .= tr_regcode('pm');
    tabfooter('bpmsend');
    check_submit_func($submitstr);
} else {
    if (!regcode_pass('pm', empty($regcode) ? '' : trim($regcode))) {
        mcmessage('regcodeerror', M_REFERER);
    }
    $pmnew['title'] = trim($pmnew['title']);
    $pmnew['tonames'] = trim($pmnew['tonames']);
    $pmnew['content'] = trim($pmnew['content']);
    if (empty($pmnew['title']) || empty($pmnew['content']) || empty($pmnew['tonames'])) {
        mcmessage('pmdatamissing', M_REFERER);
    }
    $tonames = array_filter(explode(',', $pmnew['tonames']));
    if ($tonames) {
        $query = $db->query("SELECT mid FROM {$tblprefix}members WHERE mname " . multi_str($tonames) . " ORDER BY mid");
        $sqlstr = '';
        while ($user = $db->fetch_array($query)) {
            //收信数量限制分析
            $sqlstr .= ($sqlstr ? ',' : '') . "('{$pmnew['title']}','{$pmnew['content']}','{$user['mid']}','{$memberid}','" . $curuser->info['mname'] . "','{$timestamp}')";
        }
        $sqlstr && $db->query("INSERT INTO {$tblprefix}pms (title,content,toid,fromid,fromuser,pmdate) VALUES {$sqlstr}");
    }
    mcmessage('pmsendfinish', '?action=pmsend');
}
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:pmsend.inc.php

示例15: multi_str

     $midarr && $db->query("DELETE FROM {$tblprefix}members WHERE mid " . multi_str($midarr), 'UNBUFFERED');
     $midarr && $db->query("DELETE FROM {$tblprefix}members_sub WHERE mid " . multi_str($midarr), 'UNBUFFERED');
     foreach ($mchannels as $k => $v) {
         $midarr && $db->query("DELETE FROM {$tblprefix}members_{$k} WHERE mid " . multi_str($midarr), 'UNBUFFERED');
     }
 } else {
     if (!empty($arcdeal['check'])) {
         $db->query("UPDATE {$tblprefix}members SET checked='1' WHERE mid " . multi_str($selectid) . ($backamember ? '' : " AND grouptype2=0"));
     } elseif (!empty($arcdeal['uncheck'])) {
         $db->query("UPDATE {$tblprefix}members SET checked='0' WHERE mid " . multi_str($selectid) . " AND isfounder != 1" . ($backamember ? '' : " AND grouptype2=0"));
     }
     if (!empty($arcdeal['arcallowance'])) {
         $db->query("UPDATE {$tblprefix}members SET arcallowance='" . max(0, intval($arcarcallowance)) . "' WHERE mid " . multi_str($selectid));
     }
     if (!empty($arcdeal['cuallowance'])) {
         $db->query("UPDATE {$tblprefix}members SET cuallowance='" . max(0, intval($arccuallowance)) . "' WHERE mid " . multi_str($selectid));
     }
     $actuser = new cls_userinfo();
     foreach ($selectid as $id) {
         $actuser->activeuser($id);
         foreach ($grouptypes as $k => $v) {
             if ($v['mode'] < 2 && !empty($arcdeal['gtid' . $k]) && ($backamember || $k != 2)) {
                 $actuser->handgrouptype($k, ${"arcugid{$k}"}, -1);
             }
         }
         $actuser->updatedb();
         $actuser->init();
     }
     unset($actuser);
 }
 if (!empty($select_all)) {
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:members.inc.php


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