<%@ page language="C#" autoeventwireup="true" validaterequest="false" inherits="admin_class_contentitem, localhost_deploy" %>
<%@ Register Src='../../common/formitem.ascx' TagName='formitem' TagPrefix='uc1' %>
<!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 runat='server'>
<title>内容编辑页</title>
<link href='/admin/common/client.css' rel='stylesheet' type='text/css' />
<style type="text/css">
#itemtable  {width:800px;}
#itemtable b{display:none;}
#itemtable.showfield tr td b{display:inline-block;}

</style>
<script type="text/javascript">
var s_url="<%=uc.GetContentUrl()%>";
var s_cid="<%=Para("cid")%>";

</script>
</head>
<body onload="LoadBody()" >
<br />
<%
	Formitem.Table="User_Content";
	Formitem.Head="<a onclick='ShowFieldName()'>内容信息</a>";
	Formitem.Action="";
	
	Formitem.AddOther("@@Csharp.SetInputHidden('C_CID','"+Formitem.ChooseValue("@@Table[\"User_Content\"].C_CID@@",Para("cid"))+"')@@");
	Formitem.AddOther("@@Csharp.SetInputHidden('CUrl','##Table[\"User_Content\"].C_Url##')@@");//旧的地址
	Formitem.AddOther("@@Csharp.SetInputHidden('Repeat','0')@@");
	Formitem.AddOther("@@Csharp.SetInputHidden('CImage','##Table[\"User_Content\"].C_Image##')@@");
	
	
	Formitem.AddOther("@@Csharp.SetInputHidden('C_Repeat','##Table[\"User_Content\"].C_Repeat##')@@");
	
	if(Para("toclass")=="1")
	{
		Formitem.AddItem("<tr ><td class='tright'>目标栏目<b>(C_CID)</b>：</td><td class='tleft'><select id='CCID' ><option value='0'>根栏目</option>"+ShowClassList(0,"")+"</select> "+GetTip("4-55")+" </td></tr>");
	}	
	
	
	Formitem.AddItem("@@Csharp.SetInputSelect('页面模板<b>(C_Template)</b>','C_Template','0,通用模板|##Template.GetTemplate(\"1,11\")##','"+Formitem.ChooseValue("@@Table[\"User_Content\"].C_Template@@",Para("template"))+"','false','"+GetTip("4-17")+"')@@");
	Formitem.AddItem("@@Csharp.SetInputSelect('页面类型<b>(C_Type)</b>','C_Type','##Const.ContentType()##','"+Formitem.ChooseValue("@@Table[\"User_Content\"].C_Type@@",Para("type"))+"','false','"+GetTip("4-18")+"')@@");
	Formitem.AddItem("@@Csharp.SetInputText('标题<b>(C_Title)</b>','C_Title','##Table[\"User_Content\"].C_Title##','100','true','"+IsEnglish("<br /><input class=\"button\" type=\"button\" value=\"格式化\" onclick=\"FormatTitle()\" />","")+GetTip("4-19")+" ')@@");
	
	
	Formitem.AddItem("@@Csharp.SetInputText('对外标题<b>(C_OutTitle)</b>','C_OutTitle','##Table[\"User_Content\"].C_OutTitle##','100','false',' <input type=\"button\" class=\"button\" value=\"变形\" onclick=\"StartTransTitle(&#39;C_Title&#39;,&#39;C_OutTitle&#39;)\" /><br />默认和标题一样，但可以自定义。"+GetTip("4-20")+"')@@");
	
	Formitem.AddItem("@@Csharp.SetInputText('网页地址<b>(C_Url)</b>','C_Url','##Table[\"User_Content\"].C_Url##','100','true','<span "+IsEnglish("class=\"nodsp\"","")+"><br />网页地址默认格式为：<span id=\"spnurl\">"+uc.GetContentUrl()+"</span> <a href=\"javascript:CopyUrl()\">复制地址</a>。</span><span "+IsEnglish("","class=\"nodsp\"")+"><br /><input type=\"button\" class=\"button\" value=\"生成路径\" onclick=\"BuildTitleUrl()\" /></span>"+GetTip("4-21")+"')@@");
	
	Formitem.AddItem("@@Csharp.SetInputText('货号<b>(C_Number)</b>','C_Number','"+Formitem.ChooseValue("@@Table[\"User_Content\"].C_Number@@","CN-@c_id@")+"','50','false','<br />货号以 CN- 开头。"+GetTip("4-35")+"')@@"); 
	
	
	Formitem.AddItem("@@Csharp.SetTextArea('标签<b>(C_Tags)</b>','C_Tags','##Table[\"User_Class\"].C_Tags##','6','true','<br />对显示在页面上的分类介绍内容加权,每行一个。"+GetTip("4-22")+"')@@");
	
	
	Formitem.AddItem("@@Csharp.SetInputText('内链<b>(C_Link)</b>','C_Link','##Table[\"User_Content\"].C_Link##','25','false','<br /><input type=\"checkbox\" value=\"replace\" name=\"chklink\" id=\"chklink\" /><label for=\"chklink\" >强制替换</label>　 内链替换时的关键词，使用逗号分隔。"+GetTip("4-23")+"')@@");
	
	
	Formitem.AddItem("@@Csharp.SetTextArea('简介<b>(C_Summary)</b>','C_Summary','##Table[\"User_Content\"].C_Summary##','10','true','<br />内容限定120汉字。"+GetTip("4-24")+"')@@");
	Formitem.AddItem("@@Csharp.SetTextArea('备注<b>(C_Memo)</b>','C_Memo','##Table[\"User_Content\"].C_Memo##','10','false','"+GetTip("4-25")+"')@@");
	
	if(tableclass["C_Compare"]!="")
	{
		Formitem.AddItem("@@Csharp.SetTextArea('对比内容<b>(C_Compare)</b>','C_Compare','##Table[\"User_Content\"].C_Compare##','10','false','<br /><input value=\"生成对比\" type=\"button\" class=\"button\" onclick=\"OpenCompare("+Para("cid")+")\"  />"+GetTip("4-26")+"')@@");
	}	
	
	Formitem.AddItem("@@Csharp.SetInputText('缩略图<b>(C_Image)</b>','C_Image','##Table[\"User_Content\"].C_Image##','40','false',' <input class=\"button but24\" type=\"button\" value=\"上载...\" onclick=\"ShowFileUpload(&#39;C_Image&#39;,1,140)\" />"+GetTip("4-27")+"')@@"); 
	
	Formitem.AddItem("@@Csharp.SetInputText('后视图<b>(C_BackImage)</b>','C_BackImage','##Table[\"User_Content\"].C_BackImage##','40','false',' <input class=\"button but24\" type=\"button\" value=\"上载...\" onclick=\"ShowFileUpload(&#39;C_BackImage&#39;,1,140)\" />"+GetTip("4-28")+"')@@"); 
	
	Formitem.AddItem("@@Csharp.SetInputText('侧视图<b>(C_SideImage)</b>','C_SideImage','##Table[\"User_Content\"].C_SideImage##','40','false',' <input class=\"button but24\" type=\"button\" value=\"上载...\" onclick=\"ShowFileUpload(&#39;C_SideImage&#39;,1,140)\" />"+GetTip("4-29")+"')@@"); 
	
	
	Formitem.AddItem("@@Csharp.SetInputMultiSelect('相关产品<b>(C_Product)</b>','C_Product','"+uc.GetRelation(1)+"','8','##Table[\"User_Content\"].C_Product##','false','<br />##Const.Button(\"增加\",\"AddItem(1)\")## ##Const.Button(\"删除\",\"DelItem(1)\")## ##Const.Button(\"上移\",\"MoveItem(1,-1)\")## ##Const.Button(\"下移\",\"MoveItem(1,1)\")## "+GetTip("4-30")+"')@@"); 
	Formitem.AddItem("@@Csharp.SetInputMultiSelect('相关资讯<b>(C_Correlate)</b>','C_Correlate','"+uc.GetRelation(0)+"','8','##Table[\"User_Content\"].C_Correlate##','false','<br />##Const.Button(\"增加\",\"AddItem(0)\")## ##Const.Button(\"删除\",\"DelItem(0)\")## ##Const.Button(\"上移\",\"MoveItem(0,-1)\")## ##Const.Button(\"下移\",\"MoveItem(0,1)\")##"+GetTip("4-31")+"')@@");
	
	//其他页面引用该内容
	
	Formitem.AddItem("@@Csharp.SetInputMultiSelect('链接到此文档','CRelation','"+GetRelationContent(Formitem["C_ID"])+"','8','0','false','<br />##Const.Button(\"增加\",\"AddItemTo()\")## ##Const.Button(\"删除\",\"DelItem(2)\")##"+GetTip("4-32")+"')@@"); 
	
	Formitem.AddItem("@@Csharp.SetInputMultiSelect('新闻引用<b>(C_News)</b>','C_News','"+Formitem["C_News"].Replace(",","|")+"','8','"+Formitem["C_News"].Replace(",","|")+"','false','<br />##Const.Button(\"增加\",\"AddNews()\")## ##Const.Button(\"删除\",\"DelItem(3)\")## ##Const.Button(\"上移\",\"MoveItem(3,-1)\")## ##Const.Button(\"下移\",\"MoveItem(3,1)\")## "+GetTip("4-33")+"')@@"); 
	
	
	Formitem.AddItem("@@Csharp.SetInputText('价格<b>(C_Price)</b>','C_Price','##Table[\"User_Content\"].C_Price##','50','false','"+GetTip("4-34")+"')@@");
	
	
	Formitem.AddItem("@@Csharp.SetInputText('其它地址<b>(C_OtherUrl)</b>','C_OtherUrl','##Table[\"User_Content\"].C_OtherUrl##','50','false','<br />用于其他地址，例如支付宝地址。"+GetTip("4-36")+"')@@");
	
	Formitem.AddItem("@@Csharp.SetTextArea('备用字段1<b>(C_Para1)</b>','C_Para1','##Table[\"User_Content\"].C_Para1##','10','false','"+GetTip("4-25")+"')@@");
	Formitem.AddItem("@@Csharp.SetTextArea('备用字段2<b>(C_Para2)</b>','C_Para2','##Table[\"User_Content\"].C_Para2##','10','false','"+GetTip("4-25")+"')@@");
	Formitem.AddItem("@@Csharp.SetTextArea('备用字段3<b>(C_Para3)</b>','C_Para3','##Table[\"User_Content\"].C_Para3##','10','false','"+GetTip("4-25")+"')@@");
	
	
		
	Formitem.AddItem("@@Csharp.SetInputSelect('文件状态<b>(C_status)</b>','C_status','1,发布文章|0,草稿文章|2,推荐文章|3,锁定文章|4,其他文章','##Table[\"User_Content\"].C_status##','false','"+GetTip("4-37")+"')@@");
	
	Formitem.AddItem("@@Csharp.SetInputSelect('特殊属性<b>(C_Property)</b>','C_Property','##Const.Property()##','##Table[\"User_Content\"].C_Property##','false','"+GetTip("4-38")+"')@@");
	
	Formitem.AddItem("@@Csharp.SetInputSelect('推荐指数<b>(C_Commend)</b>','C_Commend','0|1|2|3|4|5','"+Formitem.ChooseValue("@@Table[\"User_Content\"].C_Commend@@","0")+"','false','"+GetTip("4-39")+"')@@");
	
	//Formitem.AddItem("@@Csharp.SetInputText('推荐指数<b>(C_Commend)</b>','C_Commend','"+Formitem.ChooseValue("@@Table[\"User_Content\"].C_Commend@@","0")+"','5','false','<br />分值越高，越靠前。"+GetTip("4-39")+"')@@");

	
	Formitem.AddItem("@@Csharp.SetInputText('更新时间<b>(C_Update)</b>','C_Update','"+Formitem.ChooseValue("@@Table[\"User_Content\"].C_Update@@",Now())+"','20','false','"+GetTip("4-40")+"')@@");

	Formitem.AddItem("@@Csharp.SetInputSelect('内容模板','Template','0,空模板|##Template.GetTemplate(\"2\")##','0','false','&nbsp;<input style=\"display:none;\" id=\"butinput\" class=\"button\" type=\"button\" onclick=\"OpenTemplate()\" value=\"模板编辑\" />"+GetTip("4-41")+"')@@");
	
	Formitem.AddItem("@@Csharp.SetInputCheckBox('重复','CRepeat','1','##Table[\"User_Content\"].C_Repeat##','"+GetTip("4-42")+"')@@");
    if (WebCode.function.GetNumber(Formitem["C_Sync"]) != 0)
	{
		Formitem.AddOther("@@Csharp.SetInputHidden('C_Sync','##Table[\"User_Content\"].C_Sync##')@@");
		Formitem.AddItem("<tr><td class='tright'>同步<b>(C_Sync)</b>：</td><td class='tleft'><input type='checkbox' checked='checked'  value='1' name='CSync' id='CSync'  />"+ds.GetDataString("select c_url,c_title from user_content where c_ID="+Formitem["C_Sync"],"<a href='@c_url@' target='_blank'>@c_title@</a>")+""+GetTip("4-43")+"</td></tr>"); 
	}
	
	Formitem.AddItem("<tr class='nodsp'><td class='tright'>输入XML：</td><td class='tleft'><textarea rows='10' name='C_Input' id='C_Input' class='inputbox'>"+Formitem["C_Input"]+"</textarea></td></tr>");
	
	
	
	Formitem.AddItem("<tr id=\"trcontent\"><td colspan='2' style='padding:10px;'><div style='padding:10px;background-color:#F9F9F9;' id='divtab'><span class='fright'><b>(C_Content)</b> &nbsp;分页使用：  #page#  &#9;<input type='checkbox' value='1' name='chkwater' id='chkwater'  /><label for='chkwater'>图片增加水印</label>"+GetTip("4-44")+"</span><a href='javascript:ShowMode(0)'  id='ahrmode0' class='selecttab'  onfocus='this.blur()' >普通编辑</a><a  id='ahrmode1'  href='javascript:ShowMode(1)'  onfocus='this.blur()' class='unselecttab'>高级编辑</a><div id='divinput'><textarea style='display:none;'  name='CContent' id='CContent'></textarea><textarea rows='25' style='width:757px;border:#B2B2A6 solid 1px;margin-left:1px;' class='inputbox' name='C_Content' id='C_Content'>@@Table[\"User_Content\"].C_Content@@</textarea><iframe style='position:absolute;z-index:50;top:-1000px;' name='MyEditor___Frame' id='MyEditor___Frame' src='/admin/fckeditor/editor/fckeditor.html?InstanceName=CContent&Toolbar=Default' width='757' height='400' frameborder='no' scrolling='no'></iframe></div></div></td></tr>");
	
	
%>	
<uc1:formitem ID='Formitem' runat='server' />
<br />
<iframe class="nodsp" name="frefile"></iframe>
<script type="text/javascript" src="/common/popwindow.js" charset="utf-8"></script>
<script type="text/javascript" src="contentitem.js" charset="utf-8"></script>
<script type="text/javascript" src="public.js" charset="utf-8"></script>
<script language="javascript">
function GetSelectIdList(selobj)
{
  var s_idlst="<%=Para("id")%>";
  if(s_idlst=="")
  	s_idlst="0";
  	
	for(i=selobj.options.length-1;i>=0;i--)
  {
  	s_idlst+=","+selobj.options[i].value;
  }
  
  return s_idlst;
}

// 默认放置的分类
SetCIDvalue();

$('C_Commend').onkeyup=CheckInt;

</script>
</body>
</html>   
