<?php (!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission'); if (!submitcheck('bmtagadd') && !submitcheck('bmtagsdetail') && !submitcheck('bmtagcode')) { templatebox(lang('tagtemplate'), 'mtagnew[template]', empty($mtag['template']) ? '' : $mtag['template'], 10, 110); trbasic(lang('arr_pre'), 'mtagnew[setting][val]', empty($mtag['setting']['val']) ? 'v' : $mtag['setting']['val'], 'text', lang('agarr_pre')); tabfooter(); tabheader(lang('filter0_set')); $sourcearr = array('0' => lang('nolimitcatas'), '1' => lang('handpoint'), '2' => lang('activecatas'), '3' => lang('nearofactive')); sourcemodule(lang('catalog_attr') . " <input class=\"checkbox\" type=\"checkbox\" name=\"mtagnew[setting][caidson]\" value=\"1\"" . (empty($mtag['setting']['caidson']) ? "" : " checked") . ">" . lang('include_son'), 'mtagnew[setting][casource]', $sourcearr, empty($mtag['setting']['casource']) ? '0' : $mtag['setting']['casource'], '1', 'mtagnew[setting][caids][]', caidsarr($catalogs), empty($mtag['setting']['caids']) ? array() : explode(',', $mtag['setting']['caids'])); foreach ($cotypes as $k => $cotype) { sourcemodule("{$cotype['cname']}" . lang('attr') . " <input class=\"checkbox\" type=\"checkbox\" name=\"mtagnew[setting][ccidson{$k}]\" value=\"1\"" . (empty($mtag['setting']['ccidson' . $k]) ? "" : " checked") . ">" . lang('include_son'), "mtagnew[setting][cosource{$k}]", $sourcearr, empty($mtag['setting']['cosource' . $k]) ? '0' : $mtag['setting']['cosource' . $k], '1', "mtagnew[setting][ccids{$k}][]", ccidsarr($k), empty($mtag['setting']['ccids' . $k]) ? array() : explode(',', $mtag['setting']['ccids' . $k])); } $chsourcearr = array('0' => lang('nolimitchannel'), '1' => lang('handpoint')); sourcemodule(lang('chid_attr'), 'mtagnew[setting][chsource]', $chsourcearr, empty($mtag['setting']['chsource']) ? '' : $mtag['setting']['chsource'], '1', 'mtagnew[setting][chids][]', chidsarr(1), !empty($mtag['setting']['chids']) ? explode(',', $mtag['setting']['chids']) : array()); tabfooter(); tabheader(lang('adv_options') . " <input class=\"checkbox\" type=\"checkbox\" name=\"viewdetail\" value=\"1\" onclick=\"alterview('advancedfilter')\">" . lang('view')); echo "<tbody id=\"advancedfilter\" style=\"display: none;\">"; trbasic(lang('only_valid_period'), 'mtagnew[setting][validperiod]', empty($mtag['setting']['validperiod']) ? 0 : $mtag['setting']['validperiod'], 'radio'); trbasic(lang('view_ch_field'), 'mtagnew[setting][detail]', empty($mtag['setting']['detail']) ? 0 : $mtag['setting']['detail'], 'radio', lang('agtagdetail_yes')); trbasic(lang('view_plus_stat'), 'mtagnew[setting][rec]', empty($mtag['setting']['rec']) ? 0 : $mtag['setting']['rec'], 'radio', lang('agtagrec')); trbasic(lang('nocp'), 'mtagnew[setting][nocp]', empty($mtag['setting']['nocp']) ? 0 : $mtag['setting']['nocp'], 'radio', lang('agnocp')); trbasic(lang('tagjspick'), 'mtagnew[setting][js]', empty($mtag['setting']['js']) ? 0 : $mtag['setting']['js'], 'radio'); trbasic(lang('clicks_gt'), 'mtagnew[setting][clicks]', !isset($mtag['setting']['clicks']) ? '' : $mtag['setting']['clicks']); trbasic(lang('comments_gt'), 'mtagnew[setting][comments]', !isset($mtag['setting']['comments']) ? '' : $mtag['setting']['comments']); trbasic(lang('indays'), 'mtagnew[setting][indays]', !isset($mtag['setting']['indays']) ? '' : $mtag['setting']['indays']); trbasic(lang('outdays'), 'mtagnew[setting][outdays]', !isset($mtag['setting']['outdays']) ? '' : $mtag['setting']['outdays']); trbasic(lang('favorite_pics_gt'), 'mtagnew[setting][favorites]', !isset($mtag['setting']['favorites']) ? '' : $mtag['setting']['favorites']); trbasic(lang('praise_pics_gt'), 'mtagnew[setting][praises]', !isset($mtag['setting']['praises']) ? '' : $mtag['setting']['praises']); trbasic(lang('debase_pics_gt'), 'mtagnew[setting][debases]', !isset($mtag['setting']['debases']) ? '' : $mtag['setting']['debases']); trbasic(lang('goods_orders_amount_gt'), 'mtagnew[setting][orders]', !isset($mtag['setting']['orders']) ? '' : $mtag['setting']['orders']);
echo lang('keyword') . " <input class=\"text\" name=\"keyword\" type=\"text\" value=\"{$keyword}\" size=\"8\" style=\"vertical-align: middle;\"> "; echo "<select name=\"caid\">" . makeoption(array('0' => lang('catalog_attr')) + caidsarr($catalogs), $caid) . "</select> "; echo "<select name=\"cnlevel\">" . makeoption(array('0' => lang('cnodelevelnum'), '1' => lang('acrossleve1'), '2' => lang('acrossleve2'), '3' => lang('acrossleve3'), '4' => lang('acrossleve4')), $cnlevel) . "</select> "; echo strbutton('bfilter', 'filter0') . viewcheck('viewdetail', $viewdetail, 'tbodyfilter'); echo "</td></tr>"; echo "<tbody id=\"tbodyfilter\" style=\"display: " . (empty($viewdetail) ? 'none' : '') . "\">"; $mainlinearr = array('-1' => lang('nolimit'), '0' => lang('catalog')); foreach ($cotypes as $k => $v) { if ($v['sortable']) { $mainlinearr[$k] = $v['cname']; } } trbasic(lang('mainline'), '', makeradio('mainline', $mainlinearr, $mainline), ''); foreach ($cotypes as $k => $v) { if ($v['sortable']) { trbasic("{$v['cname']}", "ccid{$k}", makeoption(array('0' => lang('nolimit')) + ccidsarr($k), ${"ccid{$k}"}), 'select'); } } trbasic(lang('is_outconfig_cnode'), '', makeradio('inconfig', array('-1' => lang('nolimit'), '0' => lang('outconfig_cnode'), '1' => lang('inconfig_cnode')), $inconfig), ''); echo "</tbody>"; tabfooter(); tabheader(lang('catas_cnode_list') . " <input class=\"checkbox\" type=\"checkbox\" name=\"select_all\" value=\"1\"> " . lang('selectallpage'), '', '', 12); $cy_arr = array("<input class=\"checkbox\" type=\"checkbox\" name=\"chkall\" onclick=\"checkall(this.form, 'selectid', 'chkall')\">", array(lang('cnode_name'), 'txtL'), array(lang('cnode_alias'), 'txtL'), lang('outconfig'), array(lang('catalog_attr'), 'txtL'), array(lang('look'), 'txtL')); for ($i = 0; $i <= min($cn_max_addno, 2); $i++) { $cy_arr[] = $i ? lang('addp') . $i . lang('template') : lang('index_tpl'); } $cy_arr[] = lang('detail'); trcategory($cy_arr); $pagetmp = $page; do { $query = $db->query("SELECT * {$fromsql} {$wheresql} ORDER BY cnid ASC LIMIT " . ($pagetmp - 1) * $atpp . ",{$atpp}");
if (!$chid || !$cotype['chids'] || !in_array($chid, explode(',', $cotype['chids']))) { ${"ccid{$coid}"} = !empty(${"ccid{$coid}"}) ? ${"ccid{$coid}"} : 0; } } $searchmodearr = array('subject' => lang('title'), 'keywords' => lang('keyword'), 'mname' => lang('member')); $caidsarr = array('0' => lang('all_catalog')) + caidsarr(); $orderbyarr = array('createdate' => lang('add_time'), 'clicks' => lang('clicks'), 'comments' => lang('comments')); tabheader(lang('seaparset'), 'search', "?entry=searchs&action=searchdetail&chid={$chid}"); trbasic(lang('achannel'), '', $chid ? $channels[$chid]['cname'] : lang('all_channel'), ''); trbasic(lang('searchmode1'), 'searchmode', makeoption($searchmodearr, $searchmode), 'select'); trbasic(lang('search_keyword'), 'searchword', $searchword); trbasic(lang('be_catalog'), 'caid', makeoption($caidsarr, $caid), 'select'); foreach ($cotypes as $coid => $cotype) { if (!$chid || !$cotype['chids'] || !in_array($chid, explode(',', $cotype['chids']))) { $ccidsarr = array('0' => lang('nolimit')); $ccidsarr = $ccidsarr + ccidsarr($coid); trbasic("{$cotype['cname']}", "ccid{$coid}", makeoption($ccidsarr, ${"ccid{$coid}"}), 'select'); } } if ($chid) { $a_field = new cls_field(); $fields = read_cache('fields', $chid); foreach ($fields as $k => $field) { if ($field['available'] && $field['issearch']) { $a_field->init(); $a_field->field = read_cache('field', $chid, $k); $a_field->trsearch(); } } unset($a_field); }
if ($cotype['sortable']) { sourcemodule($cotype['cname'], "mtagnew[setting][cosource{$k}]", $sourcearr, empty($mtag['setting']['cosource' . $k]) ? '0' : $mtag['setting']['cosource' . $k], '1', "mtagnew[setting][ccids{$k}][]", ccidsarr($k), empty($mtag['setting']['ccids' . $k]) ? array() : explode(',', $mtag['setting']['ccids' . $k]), '25%', $mtag['setting']['listby'] == "co{$k}", $caco_same_fix . "co{$k}"); } } $createurl = " >><a href=\"?entry=liststr&tclass=catalogs\" target=\"_blank\">" . lang('create_str') . "</a>"; $isfuncstr = "<br><input class=\"checkbox\" type=\"checkbox\" id=\"mtagnew[setting][isfunc]\" name=\"mtagnew[setting][isfunc]\"" . (empty($mtag['setting']['isfunc']) ? '' : ' checked') . ">" . lang('fromfunc'); trbasic(lang('customsql') . $createurl . $isfuncstr, 'mtagnew[setting][wherestr]', empty($mtag['setting']['wherestr']) ? '' : stripslashes($mtag['setting']['wherestr']), 'textarea'); tabfooter(); tabheader(lang('catas_attr') . '(' . lang('nolist_item_available') . ')'); $inheritarr = array('0' => lang('norelated'), 'active' => lang('active_catalog')); $inheritarr = $inheritarr + caidsarr($catalogs); trbasic(lang('catalog'), 'mtagnew[setting][cainherit]', makeoption($inheritarr, empty($mtag['setting']['cainherit']) ? '0' : $mtag['setting']['cainherit']), 'select', '', '25%', $mtag['setting']['listby'] != 'ca', $caco_diff_fix . 'ca'); foreach ($cotypes as $k => $cotype) { if ($cotype['sortable']) { $inheritarr = array('0' => lang('norelated'), 'active' => lang('active_coclass')); $inheritarr = $inheritarr + ccidsarr($k); trbasic("{$cotype['cname']}", "mtagnew[setting][coinherit{$k}]", makeoption($inheritarr, empty($mtag['setting']['coinherit' . $k]) ? '0' : $mtag['setting']['coinherit' . $k]), 'select', '', '25%', $mtag['setting']['listby'] != "co{$k}", $caco_diff_fix . "co{$k}"); } } tabfooter(); tabheader(lang('adv_options') . " <input class=\"checkbox\" type=\"checkbox\" name=\"viewdetail\" value=\"1\" onclick=\"alterview('advancedfilter')\">" . lang('view')); echo "<tbody id=\"advancedfilter\" style=\"display: none;\">"; trbasic(lang('startno'), 'mtagnew[setting][startno]', empty($mtag['setting']['startno']) ? '' : $mtag['setting']['startno'], 'text', lang('agstartno')); $urlmodearr = array('0' => lang('default'), 'caid' => lang('catalog')); foreach ($cotypes as $k => $cotype) { if ($cotype['sortable']) { $urlmodearr['ccid' . $k] = $cotype['cname']; } } trbasic(lang('urlmode'), 'mtagnew[setting][urlmode]', makeoption($urlmodearr, empty($mtag['setting']['urlmode']) ? '0' : $mtag['setting']['urlmode']), 'select'); $createurl = " >><a href=\"?entry=liststr&tclass=catalogs\" target=\"_blank\">" . lang('create_str') . "</a>";
empty($chids) && amessage('nobaidunews', '?entry=sitemaps&action=sitemapsedit'); } else { $chids = chidsarr(); } if (!submitcheck('bsitemapdetail')) { tabheader(lang('sitemapsetting'), 'sitemapdetail', '?entry=sitemaps&action=sitemapdetail&ename=' . $ename); trbasic(lang('sitemapcname'), '', $sitemap['cname'], ''); trbasic(lang('dynapickurl'), '', $cms_abs . $sitemap['d_url'], ''); trbasic(lang('xmlpickurl'), '', $cms_abs . $sitemap['xml_url'], ''); trbasic(lang('isenable'), 'sitemapnew[available]', isset($sitemap['available']) ? $sitemap['available'] : 0, 'radio'); trbasic(lang('upperiodhours'), 'sitemapnew[setting][life]', empty($sitemap['setting']['life']) ? '' : $sitemap['setting']['life']); trbasic(lang('limitdayarchive'), 'sitemapnew[setting][indays]', empty($sitemap['setting']['indays']) ? '' : $sitemap['setting']['indays']); $sourcearr = array('0' => lang('nolimitcatas'), '1' => lang('handpoint')); sourcemodule(lang('cataloglimi'), 'sitemapnew[setting][casource]', $sourcearr, empty($sitemap['setting']['casource']) ? '0' : $sitemap['setting']['casource'], '1', 'sitemapnew[setting][caids][]', caidsarr($catalogs), empty($sitemap['setting']['caids']) ? array() : $sitemap['setting']['caids']); foreach ($cotypes as $k => $cotype) { sourcemodule("{$cotype['cname']}" . lang('limited'), "sitemapnew[setting][cosource{$k}]", $sourcearr, empty($sitemap['setting']['cosource' . $k]) ? '0' : $sitemap['setting']['cosource' . $k], '1', "sitemapnew[setting][ccids{$k}][]", ccidsarr($k), empty($sitemap['setting']['ccids' . $k]) ? array() : $sitemap['setting']['ccids' . $k]); } $chsourcearr = array('0' => lang('nolimitchannel'), '1' => lang('handpoint')); sourcemodule(lang('chid_attr'), 'sitemapnew[setting][chsource]', $chsourcearr, empty($sitemap['setting']['chsource']) ? '0' : $sitemap['setting']['chsource'], '1', 'sitemapnew[setting][chids][]', $chids, !empty($sitemap['setting']['chids']) ? $sitemap['setting']['chids'] : array()); tabfooter('bsitemapdetail', lang('modify')); a_guide('sitemapdetail'); } else { if (!empty($sitemapnew['setting']['casource']) && empty($sitemapnew['setting']['caids'])) { amessage('selectcatg', '?entry=sitemaps&action=sitemapdetail&ename=' . $ename); } if (!empty($sitemapnew['setting']['chsource']) && empty($sitemapnew['setting']['chids'])) { amessage('selectcha', '?entry=sitemaps&action=sitemapdetail&ename=' . $ename); } if (empty($sitemapnew['setting']['casource'])) { unset($sitemapnew['setting']['caids']); }
$submitstr .= makesubmitstr('fieldnew[ename]', 1, 'tagtype', 0, 30); } !in_array($fmode, array('cn')) && empty($field['issystem']) && trbasic(lang('field_pmid'), 'fieldnew[pmid]', makeoption(pmidsarr('field', lang('frommsg')), empty($field['pmid']) ? 0 : $field['pmid']), 'select'); $coidsarr = array('0' => lang('catalog')); foreach ($cotypes as $k => $v) { !$v['self_reg'] && ($coidsarr[$k] = $v['cname']); } trbasic(lang('sourcecotype'), '', @$coidsarr[$flength], ''); if ($fnew) { trhidden('fieldnew[length]', $flength); } $setting = empty($field['innertext']) ? array() : unserialize($field['innertext']); if ($flength) { $sourcearr = array('0' => lang('allcoclass')); $sourcearr['1'] = lang('handpoint'); sourcemodule(lang('cocllimi'), 'settingnew[source]', $sourcearr, empty($setting['source']) ? '0' : $setting['source'], '1', 'settingnew[ids]', ccidsarr($flength), empty($setting['ids']) ? array() : explode(',', $setting['ids'])); } else { load_cache('subsites,acatalogs'); $catalogs =& $acatalogs; $sourcearr = array('0' => lang('all_catalog'), '2' => lang('msite') . lang('all_catalog')); foreach ($subsites as $k => $v) { $sourcearr['-' . $k] = $v['sitename'] . lang('all_catalog'); } $sourcearr['1'] = lang('handpoint'); sourcemodule(lang('cataloglimi'), 'settingnew[source]', $sourcearr, empty($setting['source']) ? '0' : $setting['source'], '1', 'settingnew[ids]', caidsarr($catalogs), empty($setting['ids']) ? array() : explode(',', $setting['ids'])); } $relatearr = array(0 => lang('schoise'), 2 => lang('smax2'), 3 => lang('smax3'), 4 => lang('smax4'), 5 => lang('smax5')); if (!$fnew && in_array($fmode, array('a', 'm')) && $field['mcommon']) { trbasic(lang('frelatecaid'), '', $relatearr[empty($field['max']) ? 0 : $field['max']], ''); } else { trbasic(lang('frelatecaid'), '', makeradio('fieldnew[max]', $relatearr, empty($field['max']) ? 0 : $field['max']), '', lang('agrelatecaid'));
$db->query("UPDATE {$tblprefix}coclass SET level=level+" . $leveldiff . " WHERE ccid='{$sonid}'"); } } } } updatecache('coclasses', $coid); amessage('cocledifin', '?entry=coclass&action=coclassedit&coid=' . $coid); } } elseif ($action == 'coclassdetail' && $ccid) { $coclass = read_cache('coclass', $coid, $ccid); if (!submitcheck('bcoclassdetail')) { $ccidsarr = array('0' => lang('noset')); $submitstr = ''; tabheader(lang('coclass') . " [{$coclass['title']}] " . lang('base_setting'), 'coclassdetail', "?entry=coclass&action=coclassdetail&coid={$coid}&ccid={$ccid}", 2, 1, 1); trbasic(lang('coclass_ename'), 'coclassnew[dirname]', $coclass['dirname'], 'text', lang('agdirname')); trbasic(lang('parent_coclass'), 'coclassnew[pid]', makeoption(array('0' => lang('topiccoclass')) + ccidsarr($coid), $coclass['pid']), 'select'); trbasic(lang('isframe_coclass_i'), 'coclassnew[isframe]', $coclass['isframe'], 'radio'); if (empty($cotype['self_reg'])) { trbasic(lang('allow_channel_archive'), '', makecheckbox('coclassnew[chids][]', chidsarr(1), !empty($coclass['chids']) ? explode(',', $coclass['chids']) : array(), 5), ''); if ($cotype['permission']) { trbasic(lang('add_pmid'), 'coclassnew[apmid]', makeoption(pmidsarr('aadd'), $coclass['apmid']), 'select'); trbasic(lang('read_pmid'), 'coclassnew[rpmid]', makeoption(pmidsarr('aread'), $coclass['rpmid']), 'select'); trbasic(lang('cread_pmid'), 'coclassnew[crpmid]', makeoption(pmidsarr('cread'), $coclass['crpmid']), 'select'); trbasic(lang('down_pmid'), 'coclassnew[dpmid]', makeoption(pmidsarr('down'), $coclass['dpmid']), 'select'); } $cotype['awardcp'] && trbasic(lang('issue_arc_currency'), 'coclassnew[awardcp]', makeoption(array('' => lang('noaward')) + $vcps['award'], $coclass['awardcp']), 'select'); $cotype['taxcp'] && trbasic(lang('arc_deduct_currency'), 'coclassnew[taxcp]', makeoption(array('' => lang('freesale')) + $vcps['tax'], $coclass['taxcp']), 'select'); $cotype['ftaxcp'] && trbasic(lang('att_deduct_currency'), 'coclassnew[ftaxcp]', makeoption(array('' => lang('freesale')) + $vcps['ftax'], $coclass['ftaxcp']), 'select'); $cotype['sale'] && trbasic(lang('allow_sale_arc'), 'coclassnew[allowsale]', $coclass['allowsale'], 'radio'); $cotype['fsale'] && trbasic(lang('allow_sale_att'), 'coclassnew[allowfsale]', $coclass['allowfsale'], 'radio'); }
$n_operated = isset($stepeds['coclasses']); $do_enable = $n_operated || !isset($stepeds['cotypes']) ? false : true; //如果上一步没有完成,这一步不能开始 $undo_enable = !$n_operated || isset($stepeds['cnodes']) ? false : true; //如果下一步没有撤消,这一步不能撤消 if (!submitcheck('bdo') && !submitcheck('bundo')) { tabheader(lang('coclasstransto') . ' - ' . ($n_operated ? ' Y' : ' N'), 'coclasses', '?entry=subsetup&action=coclasses', '4'); trcategory(array(lang('sourcecotype'), lang('soucocid'), lang('soucoclcname'), lang('tranurrentsys'))); foreach ($ocotypes as $k => $v) { $ococlasses = oread_cache('coclasses', $k, '', 'cache'); foreach ($ococlasses as $k1 => $v1) { $space = ''; for ($i = 0; $i < $v1['level']; $i++) { $space .= " "; } echo "<tr class=\"txt\"><td class=\"txtC w80\">{$v['cname']}</td>\n" . "<td class=\"txtC w80\">{$k1}</td>\n" . "<td class=\"txtL\">{$space}{$v1['title']}</td>\n" . "<td class=\"txtL\"><select style=\"vertical-align: middle;\" name=\"transtonew[{$k1}]\">" . makeoption(array(0 => lang('add')) + ccidsarr($idsmap['coids'][$k]), empty($idsmap['ccids'][$k1]) ? 0 : $idsmap['ccids'][$k1]) . "</select></td></tr>\n"; } } tabfooter(); echo "<input class=\"button\" type=\"submit\" name=\"bdo\" value=\"" . lang('nextstep') . "\"" . ($do_enable ? '' : ' disabled') . "> "; echo "<input class=\"button\" type=\"submit\" name=\"bundo\" value=\"" . lang('undosetting') . "\"" . ($undo_enable ? '' : ' disabled') . "> "; echo "</form>\n"; } elseif (submitcheck('bdo')) { //将子站中的分类信息字段转入进来 $occfields = oread_cache('ccfields', '', '', 'cache'); $enamearr = $usednames['ccfields']; $fconfigarr = array('errorurl' => '', 'enamearr' => $enamearr, 'altertable' => $tblprefix . 'coclass', 'fieldtable' => $tblprefix . 'cnfields', 'sqlstr' => "iscc='1'"); foreach ($occfields as $k => $v) { if (!in_array($v['ename'], $enamearr)) { $fieldnew =& $v; $fieldnew = maddslashes($fieldnew);
<?php (!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission'); if (!submitcheck('bmtagadd') && !submitcheck('bmtagsdetail') && !submitcheck('bmtagcode')) { templatebox(lang('tagtemplate'), 'mtagnew[template]', empty($mtag['template']) ? '' : $mtag['template'], 10, 110); trbasic(lang('arr_pre'), 'mtagnew[setting][val]', empty($mtag['setting']['val']) ? 'v' : $mtag['setting']['val'], 'text', lang('agarr_pre')); $sourcearr = array('0' => lang('norelated'), 'active' => lang('activecatas')); $sourcearr = $sourcearr + caidsarr($catalogs); trbasic(lang('catalog') . " <input class=\"radio\" type=\"radio\" name=\"mtagnew[setting][listby]\" value=\"ca\"" . (!empty($mtag['setting']['listby']) && $mtag['setting']['listby'] == "ca" ? " checked" : "") . ">" . lang('list_item'), '', "<select onchange=\"setIdWithS(this)\" id=\"mselect_mtagnew[setting][casource]\" style=\"vertical-align: middle;\">" . makeoption($sourcearr, @$mtag['setting']['casource']) . "</select><input type=\"text\" value=\"" . @$mtag['setting']['casource'] . "\" onfocus=\"setIdWithI(this)\" name=\"mtagnew[setting][casource]\" id=\"mtagnew[setting][casource]\"/>", ''); foreach ($cotypes as $k => $cotype) { if ($cotype['sortable']) { $sourcearr = array('0' => lang('norelated'), 'active' => lang('activecatas')); $sourcearr = $sourcearr + ccidsarr($k); isset($mtag['setting']['cosource' . $k]) || ($mtag['setting']['cosource' . $k] = '0'); trbasic("{$cotype['cname']} <input class=\"radio\" type=\"radio\" name=\"mtagnew[setting][listby]\" value=\"co{$k}\"" . (!empty($mtag['setting']['listby']) && $mtag['setting']['listby'] == "co{$k}" ? " checked" : "") . ">" . lang('list_item'), '', "<select onchange=\"setIdWithS(this)\" id=\"mselect_mtagnew[setting][cosource{$k}]\" style=\"vertical-align: middle;\">" . makeoption($sourcearr, @$mtag['setting']['cosource' . $k]) . "</select><input type=\"text\" value=\"" . @$mtag['setting']['cosource' . $k] . "\" onfocus=\"setIdWithI(this)\" name=\"mtagnew[setting][cosource{$k}]\" id=\"mtagnew[setting][cosource{$k}]\"/>", ''); } } $nsidsarr = array('0' => lang('current_subsite'), '-1' => lang('msite')) + sidsarr(1); //为免与现有模板冲突,0为当前子站 trbasic(lang('subsite_attr'), 'mtagnew[setting][nsid]', makeoption($nsidsarr, empty($mtag['setting']['nsid']) ? 0 : $mtag['setting']['nsid']), 'select'); $urlmodearr = array('0' => lang('default'), 'caid' => lang('catalog')); foreach ($cotypes as $k => $cotype) { $cotype['sortable'] && ($urlmodearr['ccid' . $k] = $cotype['cname']); } trbasic(lang('urlmode'), 'mtagnew[setting][urlmode]', makeoption($urlmodearr, isset($mtag['setting']['urlmode']) ? $mtag['setting']['urlmode'] : '0'), 'select'); $levelarr = array('0' => lang('not_trace'), '1' => lang('topic'), '2' => lang('level1'), '3' => lang('level2')); trbasic(lang('list_upcata'), '', makeradio('mtagnew[setting][level]', $levelarr, isset($mtag['setting']['level']) ? $mtag['setting']['level'] : '0'), ''); tabfooter(); tabheader(lang('adv_options') . " <input class=\"checkbox\" type=\"checkbox\" name=\"viewdetail\" value=\"1\" onclick=\"alterview('advancedfilter')\">" . lang('view')); echo "<tbody id=\"advancedfilter\" style=\"display: none;\">"; trbasic(lang('tagjspick'), 'mtagnew[setting][js]', empty($mtag['setting']['js']) ? 0 : $mtag['setting']['js'], 'radio');
tabheader(lang('list_item_setting')); $nsidsarr = array('0' => lang('nolimitsubsite'), '-1' => lang('msite')) + sidsarr(1); //0为不限子站 trbasic(lang('subsite_attr'), 'mtagnew[setting][nsid]', makeoption($nsidsarr, empty($mtag['setting']['nsid']) ? 0 : $mtag['setting']['nsid']), 'select'); $caco_same_fix = 'caco_same_fix_'; $caco_diff_fix = 'caco_diff_fix_'; $cacoarr = array('ca' => lang('catalog')); foreach ($cotypes as $k => $cotype) { !$cotype['self_reg'] && ($cacoarr["co{$k}"] = $cotype['cname']); } trbasic(lang('list_item'), '', makeradio('mtagnew[setting][listby]', $cacoarr, $mtag['setting']['listby'], '', "single_list_set(this, '{$caco_same_fix}')"), ''); $sourcearr = array('0' => lang('all_topic_catas'), '4' => lang('all_1_catas'), '5' => lang('all_2_catas'), '1' => lang('handpoint'), '2' => lang('sonofactive'), '3' => lang('customsql')); sourcemodule(lang('catalog'), 'mtagnew[setting][casource]', $sourcearr, empty($mtag['setting']['casource']) ? '0' : $mtag['setting']['casource'], '1', 'mtagnew[setting][caids][]', caidsarr($catalogs), empty($mtag['setting']['caids']) ? array() : explode(',', $mtag['setting']['caids']), '25%', $mtag['setting']['listby'] == 'ca', $caco_same_fix . 'ca'); foreach ($cotypes as $k => $cotype) { if (!$cotype['self_reg']) { sourcemodule($cotype['cname'], "mtagnew[setting][cosource{$k}]", $sourcearr, empty($mtag['setting']['cosource' . $k]) ? '0' : $mtag['setting']['cosource' . $k], '1', "mtagnew[setting][ccids{$k}][]", ccidsarr($k), empty($mtag['setting']['ccids' . $k]) ? array() : explode(',', $mtag['setting']['ccids' . $k]), '25%', $mtag['setting']['listby'] == "co{$k}", $caco_same_fix . "co{$k}"); } } $createurl = " >><a href=\"?entry=liststr&tclass=catalogs\" target=\"_blank\">" . lang('create_str') . "</a>"; $isfuncstr = "<br><input class=\"checkbox\" type=\"checkbox\" id=\"mtagnew[setting][isfunc]\" name=\"mtagnew[setting][isfunc]\"" . (empty($mtag['setting']['isfunc']) ? '' : ' checked') . ">" . lang('fromfunc'); trbasic(lang('customsql') . $createurl . $isfuncstr, 'mtagnew[setting][wherestr]', empty($mtag['setting']['wherestr']) ? '' : stripslashes($mtag['setting']['wherestr']), 'textarea'); $createurl = " >><a href=\"?entry=liststr&tclass=catalogs\" target=\"_blank\">" . lang('create_str') . "</a>"; trbasic(lang('order_str') . $createurl, 'mtagnew[setting][orderstr]', empty($mtag['setting']['orderstr']) ? '' : stripslashes($mtag['setting']['orderstr']), 'textarea'); trbasic(lang('tagjspick'), 'mtagnew[setting][js]', empty($mtag['setting']['js']) ? 0 : $mtag['setting']['js'], 'radio'); tabfooter(); } else { //?????????????????????????过滤非listby的参数 if (empty($mtagnew['template'])) { amessage('tag_data_miss', M_REFERER); } if (empty($mtagnew['template'])) {
echo "<tr align=\"center\">\n"; foreach ($mchidsarr as $k => $v) { echo "<td class=\"item" . ($mchid == $k ? 1 : 2) . "\">" . ($mchid == $k ? "<b>{$v}</b>" : "<a href=\"?action=msearch&mchid={$k}\">{$v}</a>") . "</td>\n"; } echo "</tr>\n"; mtabfooter(); $caidsarr = array('0' => lang('allcatalog')) + caidsarr(); $orderbyarr = array('m.regdate' => lang('registertime'), 's.archives' => lang('archiveamount'), 's.comments' => lang('commentamount')); mtabheader(($mchid ? $mchannels[$mchid]['cname'] : lang('allmember')) . ' ' . lang('searchsetting'), 'search', "adminm.php?action=msearch&mchid={$mchid}"); mtrbasic(lang('membercname'), 'mname', $mname); mtrbasic(lang('belongcatalog'), 'caid', makeoption($caidsarr, $caid), 'select'); $omodestr = " <input class=\"checkbox\" type=\"checkbox\" name=\"ordermode\" value=\"1\"" . (empty($ordermode) ? '' : ' checked') . ">" . lang('asc'); mtrbasic(lang('ordertype') . $omodestr, 'orderby', makeoption($orderbyarr, $orderby), 'select'); foreach ($cotypes as $k => $v) { if (!$v['self_reg']) { $ccidsarr = array('0' => lang('nolimit')) + ccidsarr($k); mtrbasic("{$v['cname']}", "ccid{$k}", makeoption($ccidsarr, ${"ccid{$k}"}), 'select'); } } foreach ($grouptypes as $k => $v) { if (!$v['issystem']) { $ugidsarr = array('0' => lang('nolimit')) + ugidsarr($k, $mchid); mtrbasic("{$v['cname']}", "grouptype{$k}", makeoption($ugidsarr, ${"grouptype{$k}"}), 'select'); } } if ($mchid) { $a_field = new cls_field(); foreach ($fields as $k => $field) { $field = read_cache('mfield', $mchid, $k); if ($field['available'] && !$field['issystem'] && $field['issearch']) { $a_field->init(1);