Ejemplo n.º 1
0
         ob_clean();
         mexit($_content);
     }
 } else {
     load_cache('mlfields');
     include_once M_ROOT . "./include/fields.cls.php";
     include_once M_ROOT . "./include/upload.cls.php";
     include_once M_ROOT . "./include/cheader.inc.php";
     include_once M_ROOT . "./include/mcuedit.cls.php";
     $inajax ? aheader() : _header();
     if (!empty($mcommu['setting']['norepeat']) && ($cid = $db->result_one("SELECT cid FROM {$tblprefix}mflinks WHERE mid='{$mid}' AND fromid='{$memberid}' ORDER BY cid"))) {
         mcmessage('dorepeataddflink', axaction(2, M_REFERER));
     }
     $db->query("INSERT INTO {$tblprefix}mflinks SET\n\t\t\tmid='{$mid}',\n\t\t\tmname='" . $actuser->info['mname'] . "',\n\t\t\tfromid='{$memberid}',\n\t\t\tfromname='" . $curuser->info['mname'] . "',\n\t\t\tcreatedate='{$timestamp}'\n\t\t\t");
     if ($cid = $db->insert_id()) {
         $uedit = new cls_mcuedit();
         $uedit->read($cid, 'flink');
         foreach (array('fields') as $var) {
             ${$var} =& $uedit->{$var};
         }
         $c_upload = new cls_upload();
         $fields = fields_order($fields);
         $a_field = new cls_field();
         foreach ($fields as $k => $v) {
             if (!$v['isfunc'] && !$v['isadmin']) {
                 $a_field->init();
                 $a_field->field = $v;
                 if ($curuser->pmbypmids('field', $v['pmid'])) {
                     $a_field->oldvalue = '';
                     $a_field->deal('communew');
                     if (!empty($a_field->error)) {
Ejemplo n.º 2
0
//本页面只是修改回复资料
!defined('M_COM') && exit('No Permission');
load_cache('currencys,mrfields,mchannels');
include_once M_ROOT . "./include/fields.cls.php";
include_once M_ROOT . "./include/upload.cls.php";
include_once M_ROOT . "./include/mcuedit.cls.php";
$cid = empty($cid) ? 0 : max(0, intval($cid));
$cuid = $db->result_one("SELECT cuid FROM {$tblprefix}mreplys WHERE cid='{$cid}'");
if (!$cuid || !($mcommu = read_cache('mcommu', $cuid))) {
    mcmessage('setcommuitem');
}
if (empty($mcommu['umdetail'])) {
    $catalogs =& $acatalogs;
    $amode = empty($amode) ? 0 : 1;
    $uedit = new cls_mcuedit();
    if ($errno = $uedit->read($cid, 'reply')) {
        if ($errno == 1) {
            mcmessage('choosereply');
        }
        if ($errno == 2) {
            mcmessage('choosereplyobject');
        }
        if ($errno == 3) {
            mcmessage('setcommuitem');
        }
    }
    if ($amode) {
        if ($uedit->info['mid'] != $memberid) {
            mcmessage('yntrap');
        }
Ejemplo n.º 3
0
        if (empty($u_operates) || in_array('uclass', $u_operates)) {
            trbasic("<input class=\"checkbox\" type=\"checkbox\" name=\"arcdeal[ucid]\" value=\"1\">&nbsp;" . lang('set') . lang('mycoclass'), 'arcucid', makeoption(array('0' => lang('cancelcoclass')) + $ucidsarr), 'select');
        }
        tabfooter('barcsedit');
        m_guide(@$u_guide);
    } else {
        include M_ROOT . $u_tplname;
    }
} else {
    if (empty($arcdeal)) {
        mcmessage('selectopeitem', M_REFERER);
    }
    if (empty($selectid)) {
        mcmessage('confirmselectcomment', M_REFERER);
    }
    $uedit = new cls_mcuedit();
    foreach ($selectid as $cid) {
        if ($errno = $uedit->read($cid, 'comment')) {
            continue;
        }
        if (!empty($arcdeal['delete'])) {
            $uedit->delete(1);
            continue;
        }
        if (!empty($arcdeal['ucid'])) {
            $uedit->updatefield('ucid', $arcucid);
        }
        $uedit->updatedb();
        $uedit->init();
    }
    mcmessage('commentsetsucceed', "?action=mcomments{$filterstr}&page={$page}");
Ejemplo n.º 4
0
                $uedit->updatefield('checked', 0);
            }
            $uedit->updatedb();
            $uedit->init();
        }
        amessage('commentadminfinish', axaction(6, "?entry={$entry}&action={$action}{$filterstr}&page={$page}"));
    }
} elseif ($action == 'mcommentdetail' && $cid) {
    $cuid = $db->result_one("SELECT cuid FROM {$tblprefix}mcomments WHERE cid='{$cid}'");
    if (!$cuid || !($mcommu = read_cache('mcommu', $cuid))) {
        amessage('setcommuitem');
    }
    if (empty($mcommu['uadetail'])) {
        include_once M_ROOT . "./include/fields.cls.php";
        include_once M_ROOT . "./include/upload.cls.php";
        $uedit = new cls_mcuedit();
        if ($errno = $uedit->read($cid, 'comment')) {
            if ($errno == 1) {
                amessage('choosecomment');
            }
            if ($errno == 2) {
                amessage('choosecommentobject');
            }
            if ($errno == 3) {
                amessage('setcommuitem');
            }
        }
        foreach (array('mcommu', 'fields') as $var) {
            ${$var} =& $uedit->{$var};
        }
        $oldrow =& $uedit->info;
Ejemplo n.º 5
0
            }
            trbasic(lang('choose_item'), '', $soperatestr, '');
        }
        tabfooter('barcsedit');
        m_guide(@$u_guide);
    } else {
        include M_ROOT . $u_tplname;
    }
} else {
    if (empty($arcdeal)) {
        mcmessage('selectopeitem', M_REFERER);
    }
    if (empty($selectid)) {
        mcmessage('confirmselectreply', M_REFERER);
    }
    $uedit = new cls_mcuedit();
    foreach ($selectid as $cid) {
        if ($errno = $uedit->read($cid, 'reply')) {
            continue;
        }
        if (!empty($arcdeal['delete'])) {
            $uedit->delete(1);
            continue;
        }
        if (!empty($arcdeal['uncheck'])) {
            $uedit->updatefield('checked', 0);
        } elseif (!empty($arcdeal['check'])) {
            $uedit->updatefield('checked', 1);
        }
        $uedit->updatedb();
        $uedit->init();