风讯标签编辑器、标签样式编辑器简化版

风讯标签编辑器、标签样式编辑器简化版,去除了原来的什么自动完成功能,现在看到的直接就是源代码,想怎么写就怎么写,增加了插入标签后自动选中刚插入的标签,方便查看。

label_creat.asp

<%   Option   Explicit   %>
<!-- #include file="../../FS_Inc/Const.asp"  -->
<!-- #include file="../../FS_Inc/Function.asp" -->
<!-- #include file="../../FS_Inc/md5.asp"  -->
<!-- #include file="../../FS_InterFace/MF_Function.asp"  -->
<!-- #include file="../../FS_InterFace/NS_Function.asp"  -->
<!-- #include file="../../FS_InterFace/HS_Function.asp"  -->
<!-- #include file="../../FS_InterFace/AP_Function.asp"  -->
<!-- #include file="../../FS_Inc/Cls_SysConfig.asp" -->
<%
    Response.Buffer 
=   True
    Response.Expires 
=   - 1
    Response.ExpiresAbsolute 
=   Now ()  -   1
    Response.Expires 
=   0
    Response.CacheControl 
=   " no-cache "
    
Dim  Conn,obj_Label_Rs,SQL,strShowErr,str_CurrPath,sRootDir
    MF_Default_Conn
    
' session判断
    MF_Session_TF 
    
if   not  MF_Check_Pop_TF( " MF025 " then  Err_Show
    
Dim  LableName,txt_Content,LableClassID,Labelclass_SQL,obj_Labelclass_rs,obj_Count_rs,isDel,tmps_LableName
    
if  G_VIRTUAL_ROOT_DIR <> ""   then  sRootDir = " / " + G_VIRTUAL_ROOT_DIR  else  sRootDir = ""
    
If  Session( " Admin_Is_Super " =   1   then
        str_CurrPath 
=  sRootDir  & " / " & G_UP_FILES_DIR
    
Else
        
If  Session( " Admin_FilesTF " =   0   Then
            str_CurrPath 
=   Replace (sRootDir  & " / " & G_UP_FILES_DIR & " /adminfiles/ " & UCase (md5(Session( " Admin_Name " ), 16 )), " // " , " / " )
        
Else
            str_CurrPath 
=  sRootDir  & " / " & G_UP_FILES_DIR
        
End   If     
    
End   if
    
Rem  2007-07-25
     Dim  Label_ConMaxNum,Sys_Obj
    
Set  Sys_Obj  =   New  Cls_SysConfig
    Sys_Obj.getSysParam()
    Label_ConMaxNum 
=  Sys_Obj.Label_MaxNum
    
If  Label_ConMaxNum  =   ""   Or   IsNull (Label_ConMaxNum)  Then  Label_ConMaxNum  =   0
    
Set  Sys_Obj  =   NOthing
    
Rem  End
    
    LableClassID 
=  NoSqlHack(Request.QueryString( " LableClassID " ))
    LableName 
=   Trim (Request.Form( " LableName " ))
    txt_Content 
=   Trim (Request.Form( " TxtFileds " ))
    isDel 
=   Trim (Request.Form( " isDel " ))
    
    
if  Request.Form( " Action " =   " add_save "   then
            
if  LableName  = ""   or  txt_Content  = ""    then
                strShowErr 
=   " <li>请填写完整</li> "
                Response.Redirect(
" ../Error.asp?ErrCodes= " & Server.URLEncode(strShowErr) & " &ErrorUrl= " )
                Response.end
            
end   if
            
If   Clng (Label_ConMaxNum)  >   0   Then
                
if   len (txt_Content)  >   Clng (Label_ConMaxNum)   then
                    strShowErr 
=   " <li>标签内容不允许大于 "   &   Clng (Label_ConMaxNum)  &   " 个字符</li> "
                    Response.Redirect(
" ../Error.asp?ErrCodes= " & Server.URLEncode(strShowErr) & " &ErrorUrl= " )
                    Response.end
                
end   if
            
End   If     
            Labelclass_SQL 
=   " Select LableName,LableContent,AddDate,LableClassID,isDel from FS_MF_Lable where LableName =' " &   " {FS400_ " & LableName & " } " & " ' "
            
Set  obj_Labelclass_rs  =  server.CreateObject(G_FS_RS)
            obj_Labelclass_rs.Open Labelclass_SQL,Conn,
1 , 3
            
if  obj_Labelclass_rs.eof  then
                obj_Labelclass_rs.addnew
                obj_Labelclass_rs(
" LableName " =   " {FS400_ " &  LableName  & " } "
                obj_Labelclass_rs(
" LableContent " =  txt_Content
                obj_Labelclass_rs(
" AddDate " = now
                
if  isDel <> ""   then
                    obj_Labelclass_rs(
" isDel " = 1
                
else
                    obj_Labelclass_rs(
" isDel " = 0
                
end   if
                obj_Labelclass_rs(
" LableClassID " = Request.Form( " LableClassID " )
                obj_Labelclass_rs.update
            
else
                strShowErr 
=   " <li>名称重复,请重新输入</li> "
                Response.Redirect(
" ../Error.asp?ErrCodes= " & Server.URLEncode(strShowErr) & " &ErrorUrl= " )
                Response.end
            
end   if
            obj_Labelclass_rs.close:
set  obj_Labelclass_rs  = nothing
            strShowErr 
=   " <li>添加成功</li><li><a href=Label/Label_Creat.asp>继续添加</a></li><li><a href=Label/All_Label_Stock.asp?classid= " & Request.Form( " LableClassID " ) & " >返回标签管理</a></li> "
            Response.Redirect(
" ../Success.asp?ErrCodes= " & Server.URLEncode(strShowErr) & " &ErrorUrl=Label/Label_Creat.asp " )
            Response.end
    
elseif  Request.Form( " Action " =   " edit_save "   then
            
dim  rstf
            tmps_LableName
= " {FS400_ " & LableName & " } "
            
Set  rstf  =  Conn.execute( " Select LableName,LableContent,AddDate,LableClassID,isDel from FS_MF_Lable where LableName =' " &  tmps_LableName  & " ' and id <> " &  NosqlHack(Request.Form( " ID " )))
            
if   not  rstf.eof  then
                strShowErr 
=   " <li>名称重复,请重新输入</li> "
                Response.Redirect(
" ../Error.asp?ErrCodes= " & Server.URLEncode(strShowErr) & " &ErrorUrl= " )
                Response.end
            
end   if
            
If   Clng (Label_ConMaxNum)  >   0   Then
                
if   len (txt_Content)  >   Clng (Label_ConMaxNum)   then
                    strShowErr 
=   " <li>标签内容不允许大于 "   &   Clng (Label_ConMaxNum)  &   " 个字符</li> "
                    Response.Redirect(
" ../Error.asp?ErrCodes= " & Server.URLEncode(strShowErr) & " &ErrorUrl= " )
                    Response.end
                
end   if
            
End   If     
            Labelclass_SQL 
=   " Select id,isDel,LableName,LableContent,AddDate,LableClassID from FS_MF_Lable where id = " &  NosqlHack(Request.Form( " ID " )) 
            
Set  obj_Labelclass_rs  =  server.CreateObject(G_FS_RS)
            obj_Labelclass_rs.Open Labelclass_SQL,Conn,
1 , 3
            
if   not  obj_Labelclass_rs.eof  then
                obj_Labelclass_rs(
" LableName " =   " {FS400_ " &  LableName  & " } "
                obj_Labelclass_rs(
" LableContent " =  txt_Content
                obj_Labelclass_rs(
" AddDate " = now
                
if  isDel <> ""   then
                    obj_Labelclass_rs(
" isDel " = 1
                
else
                    obj_Labelclass_rs(
" isDel " = 0
                
end   if
                obj_Labelclass_rs(
" LableClassID " = Request.Form( " LableClassID " )
                obj_Labelclass_rs.update
                obj_Labelclass_rs.close:
set  obj_Labelclass_rs  = nothing
            
else
                obj_Labelclass_rs.close:
set  obj_Labelclass_rs  = nothing
                strShowErr 
=   " <li>错误的参数</li> "
                Response.Redirect(
" ../Error.asp?ErrCodes= " & Server.URLEncode(strShowErr) & " &ErrorUrl= " )
                Response.end
            
end   if
            strShowErr 
=   " <li>修改成功</li> "
            Response.Redirect(
" ../Success.asp?ErrCodes= " & Server.URLEncode(strShowErr) & " &ErrorUrl=Label/all_Label_Stock.asp " )
            Response.end
    
end   if
    
if  Request.QueryString( " DelTF " ) = " 1 "   then
        Conn.execute(
" Delete From FS_MF_Labestyle where StyleType=' " &  Request.QueryString( " Label_Sub " ) & " ' and id= " & NoSqlHack(Request.QueryString( " id " )))
        strShowErr 
=   " <li>删除成功</li> "
        Response.Redirect(
" ../Success.asp?ErrCodes= " & Server.URLEncode(strShowErr) & " &ErrorUrl=Label/All_Label_style.asp?Label_Sub= " &  Request.Form( " Label_Sub " ) & "" )
        Response.end
    
end   if
    
dim  tmp_LableName,tmp_LableClassID,tmp_LableContent,tmp_isDel,tmp_id,tmp_action
    
if  Request.QueryString( " type " ) = " edit "   then
        
dim  rs
        
if   not   isnumeric (Request.QueryString( " id " ))  then
            strShowErr 
=   " <li>错误的参数</li> "
            Response.Redirect(
" ../error.asp?ErrCodes= " & Server.URLEncode(strShowErr) & " &ErrorUrl= " )
            Response.end
        
end   if
        
set  rs  =  Conn.execute( " select id,LableName,LableClassID,LableContent,isDel From FS_MF_Lable where id= " & Request.QueryString( " id " ))
        
if  rs.eof  then
            rs.close:
set  rs = nothing
            strShowErr 
=   " <li>错误的参数</li> "
            Response.Redirect(
" ../error.asp?ErrCodes= " & Server.URLEncode(strShowErr) & " &ErrorUrl= " )
            Response.end
        
else
            tmp_LableName
= Replace ( Replace (rs( " LableName " ), " {FS400_ " , "" ), " } " , "" )
            tmp_LableClassID
= rs( " LableClassID " )
            tmp_LableContent
= rs( " LableContent " )
            tmp_isDel
= rs( " isDel " )
            tmp_id 
=  rs( " id " )
            tmp_action 
=   " edit_save "
        
end   if
    
else
            tmp_action 
=   " add_save "
    
end   if
%>
< html >
< head >
< title > 标签管理 </ title >
< meta  http-equiv ="Content-Type"  content ="text/html; charset=gb2312" >
< link  href ="../images/skin/Css_<%=Session(" Admin_Style_Num")% > / <% = Session( " Admin_Style_Num " ) %> .css" rel="stylesheet" type="text/css">
</ head >
< script  language ="JavaScript"  type ="text/javascript"  src ="../../FS_Inc/Get_Domain.asp" ></ script >
< script  language ="JavaScript"  src ="../../FS_Inc/PublicJS.js"  type ="text/JavaScript" ></ script >
< script  language ="JavaScript"  src ="../../FS_Inc/CheckJs.js"  type ="text/JavaScript" ></ script >
< body >
< table  width ="98%"  height ="56"  border ="0"  align ="center"  cellpadding ="4"  cellspacing ="1"  class ="table" >
    
< tr  class ="hback"   >
        
< td  width ="100%"  height ="20"   align ="Left"  class ="xingmu" > 标签库 </ td >
    
</ tr >
    
< tr  class ="hback"   >
        
< td  height ="27"  align ="center"  class ="hback" >< div  align ="left" >< href ="All_Label_Stock.asp" > 所有标签 </ a > < href ="../FreeLabel/FreeLabelList.asp" >< font  color ="#FF0000" > 自由标签 </ font ></ a > < href ="All_Label_Stock.asp?isDel=1" > 备份库 </ a > < href ="label_creat.asp" > 创建标签 </ a > < href ="Label_Class.asp"  target ="_self" > 标签分类 </ a > &nbsp; < href ="All_label_style.asp" > 样式管理 </ a > &nbsp; < href ="../../help?Label=MF_Label_Stock"  target ="_blank"  style ="cursor:help;" >< img  src ="../Images/_help.gif"  width ="50"  height ="17"  border ="0" ></ a ></ div ></ td >
    
</ tr >
</ table >
< table  width ="98%"  border ="0"  align ="center"  cellpadding ="4"  cellspacing ="1"  class ="table" >
    
< tr  class ="xingmu" >
        
< td  colspan ="2"  class ="xingmu" > 创建标签 </ td >
    
</ tr >
    
< form  name ="NewsForm"  method ="post"  action =""  target ="_self"   >
        
< tr  class ="hback" >
            
< td  width ="8%" >
                
< div  align ="right" > 标签名称 </ div >
            
</ td >
            
< td  width ="92%" >< span  class ="tx" > {FS400_
                
< input  name ="LableName"  type ="text"  value ="<%=tmp_LableName%>"  id ="LableName"  size ="18"   style ="border-top-width: 0px;border-right-width: 0px;border-bottom-width: 0px;border-left-width:0px;border-bottom-color: #000000;"   onFocus ="Do.these('LableName',function(){return CheckContentLen('LableName','span_LableName','2-30')})"  onKeyUp ="Do.these('LableName',function(){return CheckContentLen('LableName','span_LableName','2-30')})" >
                }
</ span >< span  id ="span_LableName" ></ span >
                
< select  name ="LableClassID"  id ="LableClassID" >
                    
< option  value ="0" > 选择所属栏目 </ option >
                    
<%
                  
dim  class_rs_obj
                  
set  class_rs_obj = Conn.execute( " select id,ParentID,ClassName From FS_MF_LableClass where ParentID=0 order by id desc " )
                  
do   while   not  class_rs_obj.eof
                        
If   CStr (tmp_LableClassID) = CStr (class_rs_obj( " id " ))  Then  
                            response.Write 
" <option value="" " & class_rs_obj( " id " ) & " "" selected > " & class_rs_obj( " ClassName " ) & " </option> "
                        
Else
                            response.Write 
" <option value="" " & class_rs_obj( " id " ) & " ""> " & class_rs_obj( " ClassName " ) & " </option> "
                        
End   If  
                        response.Write get_childList(class_rs_obj(
" id " ), "" )
                    class_rs_obj.movenext
                    
                  
loop
                  class_rs_obj.close:
set  class_rs_obj = nothing
                  
%>
                
</ select >
                
< label >
                
< input  name ="isDel"  type ="checkbox"  id ="isDel"  value ="1"  <%if tmp_isDel =1  then response.Write"checked"% > >
                放入备份库
</ label >
            
</ td >
        
</ tr >
        
< tr  class ="hback"  <%if request.QueryString("Label_Sub")< > "DS" then response.Write("style=""display:'none';""") else response.Write("style=""display:'';"" ") end if%>>  </ tr >
        
< tr  class ="hback" >
            
< td > &nbsp; </ td >
            
< td >
                
< table  width ="100%"  border ="0"  cellspacing ="0"  cellpadding ="0" >
                    
< tr >
                        
< td  height ="16"  valign ="top" >
                            
<!-- <OBJECT ID="Lable"
            CLASSID="CLSID:389961B3-2025-4E6D-92E8-AE75352096E2"
            CODEBASE="Foosun.CAB#version=1,0,0,0">
            </OBJECT>
            
-->
                        
< td  height ="16"  valign ="top" >   < span  onClick ="Insertlabel_News('../<%=G_ADMIN_DIR%>/label/News_label.asp',500,450,'obj');"  style ="cursor:hand;" >   < href ="#"  title ="新闻列表类标签" > 新闻列表 </ a >  |  </ span >< span  onClick ="Insertlabel_News('../<%=G_ADMIN_DIR%>/label/News_C_label.asp',500,350,'obj');"  style ="cursor:hand;" >   < href ="#"  title ="新闻常规类标签" > 新闻常规 </ a >  |  </ span >< span  onClick ="Insertlabel_News('../<%=G_ADMIN_DIR%>/label/News_Un_label.asp',500,350,'obj');"  style ="cursor:hand;" >   < href ="#"  title ="新闻不规则新闻标签" > 不规则新闻 </ a >  |  </ span > <% if  Request.Cookies( " FoosunSUBCookie " )( " FoosunSUBMS " ) = 1   then %> < span  onClick ="Insertlabel_News('../<%=G_ADMIN_DIR%>/label/Mall_label.asp',500,450,'obj');"  style ="cursor:hand;" >   < href ="#"  title ="商城列表类标签" > 商城列表 </ a >  |  </ span >< span  onClick ="Insertlabel_News('../<%=G_ADMIN_DIR%>/label/Mall_C_label.asp',450,350,'obj');"  style ="cursor:hand;" >   < href ="#"  title ="商城常规类标签" > 商城常规 </ a >  |  </ span > <% end   if %> < span  onClick ="Insertlabel_News('../<%=G_ADMIN_DIR%>/label/down_label.asp',500,450,'TxtFileds2');"  style ="cursor:hand;" >< href ="#"  title ="下载列表类标签" > 下载列表 </ a >  |  </ span >< span  onClick ="Insertlabel_News('../<%=G_ADMIN_DIR%>/label/down_C_label.asp',400,320,'obj');"  style ="cursor:hand;" >< href ="#"  title ="下载常规类标签" > 下载常规 </ a >  |  </ span >< span  onClick ="Insertlabel_News('../<%=G_ADMIN_DIR%>/label/All_label.asp',500,400,'obj');"  style ="cursor:hand;display:;" >< href ="#"  title ="通用类标签-所有子系统都可使用" > 通用标签 </ a >  |  </ span >< href ="All_label_style.asp"  target ="_self"  title ="样式管理" >  样式管理 </ a >  |  < span   id =item$pval[CatID])  style ="CURSOR: hand"   onmouseup ="opencat(id_templet);"  onMouseOver ="this.className='bg'"  onMouseOut ="this.className='bg1'"  language =javascript >< href ="#"  title ="更多标签" > 更多标签 </ a ></ span ></ td >
                    
</ tr >
                
</ table >
                
< table  width ="100%"  border ="0"  cellspacing ="0"  cellpadding ="0"  id ="id_templet"  style ="display:none;" >
                    
< tr >
                        
< td  valign ="top" >   <% if  Request.Cookies( " FoosunSUBCookie " )( " FoosunSUBAP " ) = 1   then %> < span  onClick ="Insertlabel_News('../<%=G_ADMIN_DIR%>/label/job_label.asp',500,380,'obj');"  style ="cursor:hand;" >< href ="#"  title ="人才类标签" > 人才标签 </ a >  |  </ span >< span  onClick ="Insertlabel_News('../<%=G_ADMIN_DIR%>/label/job_Search_label.asp',500,260,'obj');"  style ="cursor:hand;" >< href ="#"  title ="人才类标签" > 人才搜索 </ a >  |  </ span ><
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值