Пример #1
0
        }
        trbasic(lang('inalbum_add_coids'), '', makecheckbox('channelnew[incoids][]', $coidsarr, empty($channel['incoids']) ? array() : explode(',', $channel['incoids']), 5), '');
        trbasic(lang('setalbum_auto_check'), 'channelnew[inautocheck]', $channel['inautocheck'], 'radio');
        trbasic(lang('albumoneuser'), 'channelnew[oneuser]', $channel['oneuser'], 'radio');
        trbasic(lang('albumonlyone'), 'channelnew[onlyone]', $channel['onlyone'], 'radio');
        trbasic(lang('isonlyloadalbum'), 'channelnew[onlyload]', $channel['onlyload'], 'radio', lang('agonlyload'));
        trbasic(lang('enableinalbumcount'), 'channelnew[statsum]', $channel['statsum'], 'radio');
        trbasic(lang('inalbummaxlimit'), 'channelnew[maxnums]', $channel['maxnums']);
        tabfooter();
        tabheader(lang('commu_sett'));
        $cuidsarr = cuidsarr('answer') + cuidsarr('purchase');
        trbasic(lang('ut_commu_item'), '', empty($cuidsarr[$channel['cuid']]) ? '-' : $cuidsarr[$channel['cuid']], '');
        trbasic(lang('comment_commu_setg'), 'channelnew[comment]', makeoption(array(0 => lang('noset')) + cuidsarr('comment'), $channel['comment']), 'select');
        trbasic(lang('reply_commu_set'), 'channelnew[reply]', makeoption(array(0 => lang('noset')) + cuidsarr('reply'), $channel['reply']), 'select');
        trbasic(lang('offer_commu_set'), 'channelnew[offer]', makeoption(array(0 => lang('noset')) + cuidsarr('offer'), $channel['offer']), 'select');
        trbasic(lang('pickbug_commu_set'), 'channelnew[report]', makeoption(array(0 => lang('noset')) + cuidsarr('report'), $channel['report']), 'select');
        tabfooter('bchanneldetail');
    } else {
        $channelnew['inchids'] = empty($channelnew['inchids']) ? '' : implode(',', array_diff($channelnew['inchids'], array($chid)));
        $channelnew['incoids'] = empty($channelnew['incoids']) ? '' : implode(',', $channelnew['incoids']);
        $channelnew['maxnums'] = max(0, intval($channelnew['maxnums']));
        $db->query("UPDATE {$tblprefix}channels SET \n\t\t\tisalbum='{$channelnew['isalbum']}', \n\t\t\tinchids='{$channelnew['inchids']}',\n\t\t\tincoids='{$channelnew['incoids']}', \n\t\t\tinautocheck='{$channelnew['inautocheck']}', \n\t\t\toneuser='******'oneuser']}',\n\t\t\tonlyone='{$channelnew['onlyone']}',\n\t\t\tonlyload='{$channelnew['onlyload']}',\n\t\t\tstatsum='{$channelnew['statsum']}',\n\t\t\tmaxnums='{$channelnew['maxnums']}',\n\t\t\tcomment='{$channelnew['comment']}', \n\t\t\treply='{$channelnew['reply']}', \n\t\t\toffer='{$channelnew['offer']}', \n\t\t\treport='{$channelnew['report']}'\n\t\t\tWHERE chid='{$chid}'");
        updatecache('channels');
        adminlog(lang('detail_marc_channel'));
        amessage('channelmodifyfinish', "?entry=channels&action=channelalbum&chid={$chid}{$param_suffix}");
    }
} elseif ($action == 'channelother' && $chid) {
    $channel = read_cache('channel', $chid);
    if (!submitcheck('bchanneldetail')) {
        $url_type = 'channeldetail';
        include 'urlsarr.inc.php';
Пример #2
0
<?php

(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
if (empty($commu['uconfig'])) {
    if ($action == 'commudetail') {
        if (empty($submitmode)) {
            load_cache('ofields,commus');
            trbasic(lang('is_allowance_citem'), 'communew[allowance]', $commu['allowance'], 'radio');
            trbasic(lang('operate_permi_set'), 'communew[setting][apmid]', makeoption(pmidsarr('cuadd'), empty($commu['setting']['apmid']) ? 0 : $commu['setting']['apmid']), 'select');
            trbasic(lang('offer_msg_autocheck'), 'communew[setting][autocheck]', isset($commu['setting']['autocheck']) ? $commu['setting']['autocheck'] : 0, 'radio');
            trbasic(lang('offer_msg_ava_days'), 'communew[setting][vdays]', isset($commu['setting']['vdays']) ? $commu['setting']['vdays'] : 0);
            trbasic(lang('purchase_type_set'), 'communew[setting][purchase]', makeoption(array(0 => lang('nopurchse')) + cuidsarr('purchase'), empty($commu['setting']['purchase']) ? 0 : $commu['setting']['purchase']), 'select');
            trbasic(lang('nouservote'), 'communew[setting][nouservote]', isset($commu['setting']['nouservote']) ? $commu['setting']['nouservote'] : 0, 'radio');
            trbasic(lang('repeatvote'), 'communew[setting][repeatvote]', isset($commu['setting']['repeatvote']) ? $commu['setting']['repeatvote'] : 0, 'radio');
            $itemsarr = array();
            foreach ($ucotypes as $k => $v) {
                if ($v['cclass'] == $commu['cclass']) {
                    $itemsarr['uccid' . $k] = $v['cname'];
                }
            }
            foreach ($ofields as $k => $v) {
                $itemsarr[$k] = $v['cname'];
            }
            trbasic(lang('cu_citems') . "<br><input class=\"checkbox\" type=\"checkbox\" name=\"chkall_1\" onclick=\"checkall(this.form,'citemsnew','chkall_1')\">" . lang('selectall'), '', makecheckbox('citemsnew[]', $itemsarr, empty($commu['setting']['citems']) ? array() : explode(',', $commu['setting']['citems']), 5), '');
            trbasic(lang('cu_useredits') . "<br><input class=\"checkbox\" type=\"checkbox\" name=\"chkall_5\" onclick=\"checkall(this.form,'usereditsnew','chkall_5')\">" . lang('selectall'), '', makecheckbox('usereditsnew[]', $itemsarr, empty($commu['setting']['useredits']) ? array() : explode(',', $commu['setting']['useredits']), 5), '');
            tabfooter();
            tabheader(lang('auto_pro_av_price'));
            trbasic(lang('is_create_av_price'), 'communew[setting][average]', isset($commu['setting']['average']) ? $commu['setting']['average'] : 0, 'radio');
            $tablearr = array('main' => lang('common_field'), 'custom' => lang('channel_field'));
            trbasic(lang('av_price_field_type'), 'communew[setting][ptable]', makeradio('communew[setting][ptable]', $tablearr, isset($commu['setting']['ptable']) ? $commu['setting']['ptable'] : 'main'), '');
            trbasic(lang('av_price_field_ename'), 'communew[setting][pename]', isset($commu['setting']['pename']) ? $commu['setting']['pename'] : '');
Пример #3
0
<?php

(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
aheader();
backallow('matype') || amessage('no_apermission');
load_cache('matypes,mtpls,permissions');
sys_cache('fieldwords');
include_once M_ROOT . "./include/fields.fun.php";
if (empty($action)) {
    $action = 'matypesedit';
}
if ($action == 'matypesedit') {
    if (!submitcheck('bmatypesedit') && !submitcheck('bmatypeadd')) {
        $cuidsarr = cuidsarr('answer') + cuidsarr('purchase');
        tabheader(lang('matype'), 'matypesedit', "?entry=matypes&action=matypesedit{$param_suffix}", 10);
        trcategory(array(lang('id'), lang('typename'), lang('order'), lang('delete'), lang('edit')));
        foreach ($matypes as $k => $matype) {
            echo "<tr class=\"txt\">" . "<td class=\"txtC w40\">{$k}</td>\n" . "<td class=\"txtL\"><input type=\"text\" size=\"30\" maxlength=\"30\" name=\"matypesnew[{$k}][cname]\" value=\"{$matype['cname']}\"></td>\n" . "<td class=\"txtC\"><input type=\"text\" size=\"4\" name=\"matypesnew[{$k}][vieworder]\" value=\"{$matype['vieworder']}\"></td>\n" . "<td class=\"txtC w30\"><a href=\"?entry=matypes&action=matypedel&matid={$k}\">" . lang('delete') . "</a></td>\n" . "<td class=\"txtC w30\"><a href=\"?entry=matypes&action=matypedetail&matid={$k}{$param_suffix}\" onclick=\"return floatwin('open_matypesedit',this)\">" . lang('detail') . "</a></td>\n" . "</tr>\n";
        }
        tabfooter('bmatypesedit', lang('modify'));
        tabheader(lang('add_marc_type'), 'matypeadd', '?entry=matypes&action=matypesedit', 2, 0, 1);
        trbasic(lang('matype_name'), 'matypeadd[cname]');
        tabfooter('bmatypeadd', lang('add'));
        $submitstr = '';
        $submitstr .= makesubmitstr('matypeadd[cname]', 1, 0, 0, 50);
        check_submit_func($submitstr);
        a_guide('matypesedit');
    } elseif (submitcheck('bmatypesedit')) {
        if (isset($matypesnew)) {
            foreach ($matypesnew as $k => $v) {
                $v['cname'] = trim(strip_tags($v['cname']));