www.gusucode.com > 08CMS空白站群系统 3.3 繁体 UTF-8 > upload/include/mtags/ptag/commus.php

    <?php
(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
if(!submitcheck('bmtagadd') && !submitcheck('bmtagsdetail') && !submitcheck('bmtagcode')){
	templatebox(lang('tag template'),'mtagnew[template]',empty($mtag['template']) ? '' : $mtag['template'],10,110);
	trbasic(lang('plimits'),'mtagnew[setting][limits]',empty($mtag['setting']['limits']) ? 10 : $mtag['setting']['limits']);
	trbasic(lang('palimits'),'mtagnew[setting][alimits]',isset($mtag['setting']['alimits']) ? $mtag['setting']['alimits'] : '');
	trbasic(lang('cols'),'mtagnew[setting][cols]',empty($mtag['setting']['cols']) ? '1' : $mtag['setting']['cols']);
	trbasic(lang('add time asc order'),'mtagnew[setting][orderby]',isset($mtag['setting']['orderby']) ? $mtag['setting']['orderby'] : 0,'radio');
	$cuidsarr = array();
	foreach($commus as $cuid => $commu){
		($commu['available'] && $commu['sortable']) && $cuidsarr[$cuid] = $commu['cname'];
	}
	$idsarr = array('aid' => lang('archive'));
	$checkedarr = array('-1' => lang('nolimit'),'1' => lang('checked'),'0' => lang('nocheck'));
	trbasic(lang('point commu item'),'mtagnew[setting][cuid]',makeoption($cuidsarr,empty($mtag['setting']['cuid']) ? '0' : $mtag['setting']['cuid']),'select');
	trbasic(lang('relate id source'),'mtagnew[setting][idsource]',makeoption($idsarr,empty($mtag['setting']['idsource']) ? 'aid' : $mtag['setting']['idsource']),'select');
	trbasic(lang('check state'),'mtagnew[setting][checked]',makeoption($checkedarr,!isset($mtag['setting']['checked']) ? '-1' : $mtag['setting']['checked']),'select');
	tabfooter();
	tabheader(lang('pt navi setting'));
	trbasic(lang('weather simple mode'),'mtagnew[setting][simple]',empty($mtag['setting']['simple']) ? '0' : $mtag['setting']['simple'],'radio');
	trbasic(lang('navi pagecode length'),'mtagnew[setting][length]',isset($mtag['setting']['length']) ? $mtag['setting']['length'] : '');
	tabfooter();
}else{
	if(empty($mtagnew['template'])){
		if(!submitcheck('bmtagcode')){
			amessage(lang('please input tag template'),M_REFERER); 
		}else $errormsg = lang('please input tag template');//生成代码出错的提示信息
	}
	$mtagnew['setting']['length'] = $mtagnew['setting']['length'] ? $mtagnew['setting']['length'] : '10';
	if(empty($mtagnew['setting']['cuid'])){
		if(!submitcheck('bmtagcode')){
			amessage(lang('confirmchoose commu item'),M_REFERER); 
		}else $errormsg = lang('confirmchoose commu item');//生成代码出错的提示信息
	}
	$mtagnew['setting']['limits'] = max(0,intval($mtagnew['setting']['limits']));
	$mtagnew['setting']['limits'] = empty($mtagnew['setting']['limits']) ? '10' : $mtagnew['setting']['limits'];
	$mtagnew['setting']['alimits'] = max(0,intval($mtagnew['setting']['alimits']));
	$mtagnew['setting']['cols'] = max(1,intval($mtagnew['setting']['cols']));
}
?>