<?php
!function_exists('html') && exit('ERR');
if($action=='mod'){

	if(ereg("\\\$AD_label",$code)){
		showmsg("這里不能放廣告代碼,要放廣告代碼,只能手工修改模板放進去!");
	}
	//$code=preg_replace("/http:\/\/([\d\w\/_\.]*)\/ie_edit\//is","",$code);
	//對地址做處理
	$code=En_TruePath($code);

	$div_db[html_edit]=$html_edit;
	$div_db[div_w]=$div_w;
	$div_db[div_h]=$div_h;
	$div_db[div_bgcolor]=$div_bgcolor;
	$div=addslashes(serialize($div_db));
	$typesystem=0;

	

	//插入或更新標簽庫
	do_post();


}

$rsdb=get_label();
$rsdb[hide]?$hide_1='checked':$hide_0='checked';
if($rsdb[js_time]){
	$js_time='checked';
}

@extract(unserialize($rsdb[divcode]));
$div_width && $div_w=$div_width;
$div_height && $div_h=$div_height;

//if($html_edit==1||$htmledit=='yes'){
$rsdb[code] = str_replace("'","&#39;",$rsdb[code]);
$rsdb[code] = str_replace("<","&lt;",$rsdb[code]);
$rsdb[code] = str_replace(">","&gt;",$rsdb[code]);
//}

//強制更換$html_edit
//if($htmledit=="no"){
//	$html_edit=0;
//}elseif($htmledit=="yes"){
//	$html_edit=1;
//}


//真實地址還原
$rsdb[code]=En_TruePath($rsdb[code],0);

require("head.php");
require("template/label/code.htm");
require("foot.php");
?>