dede/templets/diy_field_edit.htm

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
<title>更改字段</title>
<link href="css/base.css" rel="stylesheet" type="text/css" />
<script language="javascript">
function GetFields()
{
	var theform = document.form1;
	var itemname = theform.itemname.value;
	var fieldname = theform.fname.value;
	var dtype = theform.dtype.value;
	var isnull = theform.isnull.value;
	var vdefault = theform.vdefault.value;
	var maxlength = theform.maxlength.value;
	var vinnertext = theform.vinnertext.value;
	var spage = (theform.spage[0].checked ? theform.spage[0].value : theform.spage[1].value);
	var sisnull = (isnull==0 ? "false" : "true");
	
	if(itemname=="")
	{
		alert("表单提示名称不能为空!");
		theform.itemname.focus();
		return false;
	}
	
	if((dtype=="radio"||dtype=="select"||dtype=="checkbox") && vdefault=="")
	{
		alert("你选择的select或radio、checkbox类型,必须默认值设置选择的项目(用逗号[,]分开)!");
		return false;
	}
	
	if(spage=="no") spage = "";
	
	revalue =  "<field:"+fieldname+" itemname=\""+itemname+"\" autofield=\"1\" type=\""+dtype+"\"";
	revalue += " isnull=\""+sisnull+"\" default=\""+vdefault+"\" ";
	revalue += " maxlength=\""+maxlength+"\" page=\""+spage+"\">\r\n"+vinnertext+"</field:"+fieldname+">\r\n";
	document.form1.fieldstring.value = revalue;

  return true;
  
}
</script>
<style type="text/css">
<!--
td{ padding:2px; padding-left:6px; }
.STYLE1 {color: #FF3300}
.STYLE2 {color: #666666}
.nw { float:left; width:150px; }
.cls { clear:both; }
-->
</style>
</head>
<body topmargin=8 background='images/allbg.gif'>
<table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="	background:#CFCFCF;">
  <form name="form1" action="diy_field_edit.php" method="post" onSubmit="return GetFields();">
  	<input type='hidden' name='action' value='save'>
  	<input type='hidden' name='diyid' value='<?php echo $diyid?>'>
  	<input type='hidden' name='fname' value='<?php echo $fname?>'>
后面还有 114 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。