Beispiel #1
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('conoffer', M_REFERER);
     }
     $uedit = new cls_cuedit();
     foreach ($selectid as $cid) {
         if ($errno = $uedit->read($cid, 'reply')) {
             continue;
         }
         if (!empty($arcdeal['delete'])) {
             $uedit->delete(0);
             continue;
         }
         if (!empty($arcdeal['check'])) {
             $uedit->updatefield('checked', 1);
         } elseif (!empty($arcdeal['uncheck'])) {
             $uedit->updatefield('checked', 0);
         }
         $uedit->updatedb();
         $uedit->init();
Beispiel #2
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) && empty($itemsnew)) {
         mcmessage('selectopeitem', M_REFERER);
     }
     if (empty($selectid)) {
         mcmessage('conoffer', M_REFERER);
     }
     $uedit = new cls_cuedit();
     foreach ($selectid as $cid) {
         if ($errno = $uedit->read($cid, 'offer')) {
             continue;
         }
         if (!empty($arcdeal['delete'])) {
             $uedit->delete(1);
             continue;
         }
         if ($curuser->pmbypmids('cuadd', $uedit->commu['setting']['apmid'])) {
             if (!empty($arcdeal['readd'])) {
                 $uedit->updatefield('refreshdate', $timestamp);
                 $uedit->updatefield('enddate', empty($uedit->commu['setting']['vdays']) ? 0 : $timestamp + 86400 * $uedit->commu['setting']['vdays']);
             }
             if (isset($itemsnew[$cid]['oprice'])) {
                 //更新报价算一次重发
Beispiel #3
0
            }
            adminlog(lang('commentsetsucceed'), lang('commentsetsucceed'));
            amessage('contentsetsucceed', "?entry=comments&action=commentsedit{$param_suffix}&page={$page}{$filterstr}");
        }
    } else {
        include M_ROOT . $u_tplname;
    }
} elseif ($action == 'commentdetail') {
    $cid = empty($cid) ? 0 : max(0, intval($cid));
    $cuid = $db->result_one("SELECT cuid FROM {$tblprefix}comments WHERE cid='{$cid}'");
    if (!($commu = read_cache('commu', $cuid))) {
        amessage('setcommuitem');
    }
    if (empty($commu['uadetail'])) {
        load_cache('cfields,ucotypes');
        $uedit = new cls_cuedit();
        if ($errno = $uedit->read($cid, 'comment')) {
            if ($errno == 1) {
                amessage('choosecomment');
            }
            if ($errno == 2) {
                amessage('choosecommentobject');
            }
            if ($errno == 3) {
                amessage('setcommuitem');
            }
        }
        foreach (array('aid', 'commu', 'citems', 'fields') as $var) {
            ${$var} =& $uedit->{$var};
        }
        $oldrow =& $uedit->info;
Beispiel #4
0
     $maxfloorid = 0;
 }
 $maxfloorid++;
 $quoteids = '';
 if ($qtid && ($r = $db->fetch_one("SELECT quoteids FROM {$tblprefix}replys WHERE aid='{$aid}' AND cid='{$qtid}'"))) {
     $quoteids = ($r['quoteids'] ? $r['quoteids'] . ',' : '') . $qtid;
 }
 $db->query("INSERT INTO {$tblprefix}replys SET\n\t\t\taid='{$aid}',\n\t\t\tcuid='{$commu['cuid']}',\n\t\t\tmid='{$memberid}',\n\t\t\tmname='" . $curuser->info['mname'] . "',\n\t\t\tchecked='" . ($commu['setting']['autocheck'] ? 1 : 0) . "',\n\t\t\tfloorid = '{$maxfloorid}',\n\t\t\tquoteids = '{$quoteids}',\n\t\t\tcreatedate='{$timestamp}'\n\t\t\t");
 if ($cid = $db->insert_id()) {
     if ($commu['allowance']) {
         $curuser->updatefield('cuaddmonth', $curuser->info['cuaddmonth'] + 1, 'main');
     }
     //限额文档统计
     $curuser->basedeal('reply', 1, 1, 1);
     $aedit->arc_nums('replys', 1, 1);
     $uedit = new cls_cuedit();
     $uedit->read($cid, 'reply');
     foreach (array('citems', 'fields') as $var) {
         ${$var} =& $uedit->{$var};
     }
     $c_upload = new cls_upload();
     $fields = fields_order($fields);
     $a_field = new cls_field();
     foreach ($ucotypes as $k => $v) {
         if (isset($communew['uccid' . $k])) {
             if (in_array('uccid' . $k, $citems) && $v['umode'] != 2) {
                 if ($v['notblank'] && empty($communew['uccid' . $k])) {
                     $uedit->delete();
                     mcmessage('notnull', axaction(2, M_REFERER), $v['cname']);
                 }
                 $uedit->updatefield('uccid' . $k, $communew['uccid' . $k]);
Beispiel #5
0
            }
            adminlog(lang('replysetsucceed'), lang('replysetsucceed'));
            amessage('contentsetsucceed', "?entry=replys&action=replysedit{$param_suffix}&page={$page}{$filterstr}");
        }
    } else {
        include M_ROOT . $u_tplname;
    }
} elseif ($action == 'replydetail') {
    $cid = empty($cid) ? 0 : max(0, intval($cid));
    $cuid = $db->result_one("SELECT cuid FROM {$tblprefix}replys WHERE cid='{$cid}'");
    if (!($commu = read_cache('commu', $cuid))) {
        amessage('setcommuitem');
    }
    if (empty($commu['uadetail'])) {
        load_cache('rfields,ucotypes');
        $uedit = new cls_cuedit();
        if ($errno = $uedit->read($cid, 'reply')) {
            if ($errno == 1) {
                amessage('choosereply');
            }
            if ($errno == 2) {
                amessage('choosereplyobject');
            }
            if ($errno == 3) {
                amessage('setcommuitem');
            }
        }
        foreach (array('aid', 'commu', 'citems', 'fields') as $var) {
            ${$var} =& $uedit->{$var};
        }
        $oldrow =& $uedit->info;
Beispiel #6
0
                    $itemstr .= "<td class=\"item\">{$updatedatestr}</td>\n";
                }
                $itemstr .= "<td class=\"item\">{$adminstr}</td>\n";
                $itemstr .= "</tr>\n";
            }
            $counts = $db->result_one("SELECT count(*) {$fromsql} {$wheresql}");
            $multi = multi($counts, $mrowpp, $page, "?action=comments{$filterstr}");
            echo $itemstr;
            tabfooter();
            echo $multi;
            echo '<br><br>' . strbutton('barcsedit', 'delete');
            m_guide(@$u_guide);
        } else {
            include M_ROOT . $u_tplname;
        }
    } else {
        if (empty($selectid)) {
            mcmessage('conoffer', M_REFERER);
        }
        $uedit = new cls_cuedit();
        foreach ($selectid as $cid) {
            if ($errno = $uedit->read($cid, 'comment')) {
                continue;
            }
            $uedit->delete(1);
        }
        mcmessage('commentsetsucceed', "?action=comments{$filterstr}&page={$page}");
    }
} else {
    include M_ROOT . $u_tplname;
}
Beispiel #7
0
     $u_onlyview = empty($u_url['onlyview']) ? 0 : 1;
     $u_mtitle = $u_url['mtitle'];
     $u_guide = $u_url['guide'];
     $vars = array('lists');
     foreach ($vars as $var) {
         if (!empty($u_url['setting'][$var])) {
             ${'u_' . $var} = explode(',', $u_url['setting'][$var]);
         }
     }
 }
 if (empty($u_tplname) || !empty($u_onlyview)) {
     include_once M_ROOT . "./include/fields.cls.php";
     include_once M_ROOT . "./include/upload.cls.php";
     include_once M_ROOT . "./include/cuedit.cls.php";
     $catalogs =& $acatalogs;
     $uedit = new cls_cuedit();
     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['a_mid'] != $memberid) {
             mcmessage('younoreplypermi');
         }
Beispiel #8
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('conoffer', M_REFERER);
    }
    $uedit = new cls_cuedit();
    foreach ($selectid as $cid) {
        if ($errno = $uedit->read($cid, 'reply')) {
            continue;
        }
        if (!empty($arcdeal['delete'])) {
            $uedit->delete(1);
            continue;
        }
        if ($curuser->pmbypmids('cuadd', $uedit->commu['setting']['apmid'])) {
            if (!empty($arcdeal['readd']) && !empty($uedit->commu['setting']['repeat']) && (empty($uedit->commu['setting']['repeattime']) || $uedit->info['refreshdate'] - $timestamp > 60 * $uedit->commu['setting']['repeattime'])) {
                $uedit->updatefield('refreshdate', $timestamp);
            }
        }
        if (!empty($arcdeal['ucid'])) {
            $uedit->updatefield('ucid', $arcucid);
Beispiel #9
-1
     $u_onlyview = empty($u_url['onlyview']) ? 0 : 1;
     $u_mtitle = $u_url['mtitle'];
     $u_guide = $u_url['guide'];
     $vars = array('lists');
     foreach ($vars as $var) {
         if (!empty($u_url['setting'][$var])) {
             ${'u_' . $var} = explode(',', $u_url['setting'][$var]);
         }
     }
 }
 if (empty($u_tplname) || !empty($u_onlyview)) {
     include_once M_ROOT . "./include/fields.cls.php";
     include_once M_ROOT . "./include/upload.cls.php";
     include_once M_ROOT . "./include/cuedit.cls.php";
     $catalogs =& $acatalogs;
     $uedit = new cls_cuedit();
     if ($errno = $uedit->read($cid, 'offer')) {
         if ($errno == 1) {
             mcmessage('chooseoffer');
         }
         if ($errno == 2) {
             mcmessage('chooseproduct');
         }
         if ($errno == 3) {
             mcmessage('setcommuitem');
         }
     }
     if ($uedit->info['mid'] != $memberid) {
         mcmessage('pcyo');
     }
     foreach (array('aid', 'commu', 'citems', 'fields', 'useredits') as $var) {