Exemplo n.º 1
1
                }
            }
            unset($a_field);
            if (empty($fcatalog['nodurat'])) {
                foreach (array('startdate', 'enddate') as $var) {
                    $farchiveadd[$var] = trim($farchiveadd[$var]);
                    $farchiveadd[$var] = !isdate($farchiveadd[$var]) ? 0 : strtotime($farchiveadd[$var]);
                    $sqlcommon .= ",{$var}='" . max(0, intval($farchiveadd[$var])) . "'";
                }
            }
            $db->query("INSERT INTO {$tblprefix}farchives SET " . $sqlcommon);
            if (!($aid = $db->insert_id())) {
                $c_upload->closure(1);
                mcmessage('msgsaveerr', axaction(2, M_REFERER));
            } else {
                $c_upload->closure(1, $aid, 'farchives');
                $sqlcustom = "aid={$aid}" . ($sqlcustom ? ',' . $sqlcustom : '');
                $db->query("INSERT INTO {$tblprefix}farchives_{$chid} SET " . $sqlcustom);
                $aedit = new cls_farcedit();
                $aedit->set_aid($aid);
                $fcatalog['autocheck'] && $aedit->arc_check(1, 0);
                $aedit->updatedb();
                unset($aedit);
            }
            $c_upload->saveuptotal(1);
            mcmessage('freeinfoaddfinish', axaction(10, $forward));
        }
    } else {
        include M_ROOT . $fcatalog['ucadd'];
    }
}
Exemplo n.º 2
0
                 $soperatestr .= "<input class=\"checkbox\" type=\"checkbox\" name=\"arcdeal[{$k}]\" value=\"1\">{$v} &nbsp;";
             }
             trbasic(lang('choose_item'), '', $soperatestr, '');
         }
         tabfooter('barcsedit');
     } else {
         include M_ROOT . $u_tplname;
     }
 } else {
     if (empty($arcdeal)) {
         amessage('selectoperateitem', "?entry=farchives&action=farchivesedit&page={$page}{$filterstr}");
     }
     if (empty($selectid)) {
         amessage('mselectmes', "?entry=farchives&action=farchivesedit&page={$page}{$filterstr}");
     }
     $aedit = new cls_farcedit();
     $arc = new cls_farchive();
     foreach ($selectid as $aid) {
         $aedit->set_aid($aid);
         if (!empty($arcdeal['delete'])) {
             $aedit->arc_delete();
             continue;
         }
         if (!empty($arcdeal['check'])) {
             $aedit->arc_check(1);
         } elseif (!empty($arcdeal['uncheck'])) {
             $aedit->arc_check(0);
         }
         if (!empty($arcdeal['static'])) {
             farc_static($aid);
         } elseif (!empty($arcdeal['unstatic'])) {
Exemplo n.º 3
0
                }
                if (in_array('edit', $u_lists)) {
                    $itemstr .= "<td class=\"item\">{$editstr}</td>\n";
                }
                $itemstr .= "</tr>\n";
            }
            $counts = $db->result_one("SELECT count(*) {$fromsql} {$wheresql}");
            $multi = multi($counts, $mrowpp, $page, "?action=farchives{$filterstr}");
            echo $itemstr;
            tabfooter();
            echo $multi;
            echo "<br><br><input class=\"btn\" type=\"submit\" name=\"barcsedit\" id=\"barcsedit\" value=\"" . lang('delete') . "\">";
            m_guide(@$u_guide);
        } else {
            include M_ROOT . $u_tplname;
        }
    } else {
        if (empty($selectid)) {
            mcmessage('mselectmes', "?action=farchives{$filterstr}&page={$page}");
        }
        $aedit = new cls_farcedit();
        foreach ($selectid as $aid) {
            $aedit->set_aid($aid);
            $aedit->arc_delete(1);
        }
        unset($aedit, $arc);
        mcmessage('messagefinish', "?action=farchives{$filterstr}&page={$page}");
    }
} else {
    include M_ROOT . $u_tplname;
}
Exemplo n.º 4
0
<?php

!defined('M_COM') && exit('No Permission');
load_cache('fcatalogs,fchannels,currencys,');
include_once M_ROOT . "./include/farcedit.cls.php";
$qstatearr = array('new' => lang('nosettle'), 'dealing' => lang('dealing'), 'end' => lang('settled'), 'close' => lang('closed'));
$forward = empty($forward) ? M_REFERER : $forward;
$forwardstr = '&forward=' . urlencode($forward);
$aedit = new cls_farcedit();
$aedit->set_aid($aid);
$aedit->basic_data();
!$aedit->aid && mcmessage('choosemessage');
$chid = $aedit->archive['chid'];
$caid = $aedit->archive['caid'];
if (!($fcatalog = read_cache('fcatalog', $caid)) || !$fcatalog['cumode']) {
    mcmessage('consultchannel');
}
if (!submitcheck('bfconsultadd')) {
    tabheader(lang('consultbasemessage'), 'fconsult', "?action=fconsult&aid={$aid}{$forwardstr}", 2, 1, 0, 1);
    trbasic(lang('consulttitle'), '', $fcatalog['title'] . '&nbsp; -&nbsp; ' . $aedit->archive['subject'] . "&nbsp;&nbsp;<a href=\"?action=farchive&aid=" . $aedit->archive['aid'] . "\" onclick=\"return floatwin('open_consult',this)\">>>" . lang('detail') . "</a>", '');
    trbasic(lang('addtime'), '', date("{$dateformat} {$timeformat}", $aedit->archive['createdate']), '');
    trbasic(lang('qstate'), '', @$qstatearr[$aedit->archive['qstate']], '');
    tabfooter();
    tabheader(lang('consultcommulist'));
    $query = $db->query("SELECT * FROM {$tblprefix}consults WHERE aid='{$aid}' ORDER BY cid");
    while ($item = $db->fetch_array($query)) {
        $cid = $item['cid'];
        trbasic('<b>' . $item['mname'] . '</b>&nbsp; &nbsp; ' . (empty($item['reply']) ? lang('consult') : lang('reply')) . '&nbsp; :<br>' . date("{$dateformat} {$timeformat}", $item['createdate']), '', '<br>' . $item['content'] . '<br>&nbsp;', '');
    }
    tabfooter();
    if ($aedit->archive['qstate'] != 'close') {
Exemplo n.º 5
0
<?php

!defined('M_COM') && exit('No Permission');
load_cache('fcatalogs,fchannels,currencys,');
include_once M_ROOT . "./include/upload.cls.php";
include_once M_ROOT . "./include/fields.cls.php";
include_once M_ROOT . "./include/farcedit.cls.php";
empty($aid) && mcmessage('choosemesid');
$fcaid = $db->result_one("SELECT fcaid FROM {$tblprefix}farchives WHERE aid='{$aid}'");
if (!($fcatalog = read_cache('fcatalog', $fcaid))) {
    mcmessage('choosearctype');
}
if (empty($fcatalog['umdetail'])) {
    $aedit = new cls_farcedit();
    $aedit->set_aid($aid);
    $aedit->detail_data();
    !$aedit->aid && mcmessage('choosemessage');
    $chid = $aedit->channel['chid'];
    $fcatalog =& $aedit->catalog;
    $fields = read_cache('ffields', $chid);
    $forward = empty($forward) ? M_REFERER : $forward;
    $forwardstr = '&forward=' . urlencode($forward);
    if (!submitcheck('bfarchivedetail')) {
        $a_field = new cls_field();
        tabheader($fcatalog['title'] . '-' . lang('content_set'), 'farchivedetail', "?action=farchive&aid={$aid}{$forwardstr}", 2, 1, 1, 1);
        $submitstr = '';
        $subject_table = 'farchives';
        foreach ($fields as $k => $field) {
            if (!$field['isadmin'] && !$field['isfunc']) {
                $a_field->init();
                $a_field->field = $field;