www.gusucode.com > 08CMS空白站群系统 3.3 繁体 UTF-8 > upload/include/mtags/utag/image.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('usource'),'mtagnew[setting][tname]',isset($mtag['setting']['tname']) ? $mtag['setting']['tname'] : '');
	trbasic(lang('image width limited'),'mtagnew[setting][maxwidth]',isset($mtag['setting']['maxwidth']) ? $mtag['setting']['maxwidth'] : '');
	trbasic(lang('image height limited'),'mtagnew[setting][maxheight]',isset($mtag['setting']['maxheight']) ? $mtag['setting']['maxheight'] : '');
	trbasic(lang('imageexpand'),'mtagnew[setting][expand]',isset($mtag['setting']['expand']) ? $mtag['setting']['expand'] : 0,'radio');
	trspecial(lang('emptyurl1'),'emptyurl',isset($mtag['setting']['emptyurl']) ? $mtag['setting']['emptyurl'] : '','image');
	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']['tname'] = trim($mtagnew['setting']['tname']);
	if(empty($mtagnew['setting']['tname']) || preg_match("/[^a-z_A-Z0-9]+/",$mtagnew['setting']['tname'])){
		if(!submitcheck('bmtagcode')){
			amessage(lang('usource illegal'),M_REFERER); 
		}else $errormsg = lang('usource illegal');//生成代码出错的提示信息
	}
	$mtagnew['setting']['maxwidth'] = max(0,intval($mtagnew['setting']['maxwidth']));
	$mtagnew['setting']['maxheight'] = max(0,intval($mtagnew['setting']['maxheight']));
	$c_upload = new cls_upload;	
	$imageurl = explode('#',upload_s('emptyurl',isset($mtag['setting']['emptyurl']) ? $mtag['setting']['emptyurl'] : '','image'));
	$mtagnew['setting']['emptyurl'] = $imageurl[0];
	$c_upload->saveuptotal(1);
	unset($c_upload);
}
?>