📄 resource_mdy.asp
字号:
<%
Option Explicit
'----------------------------------------------------------------------------------
'本页:
' 资源编辑页面
'说明:
'
'----------------------------------------------------------------------------------
%>
<!--#include file="inc/Config.class.asp"-->
<!--#include file="inc/DBControl.class.asp"-->
<!--#include file="inc/FunctionLib.class.asp"-->
<!--#include file="inc/Manager.class.asp"-->
<%
Dim Cfg, Db, FLib, Admin
Set Cfg = New Config
Set Db = New DBControl
Set FLib = New FunctionLib
Set Admin = New Manager
If Not Admin.Logined Then
FLib.Alert "对不起,你已经超时或未登录","./",1
Response.End
End If
Dim Work
Work = Request("Work")
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="inc/style.css" type="text/css">
<script src="inc/FunctionLib.js"></script>
<!-- DTree 开始 -->
<link rel="StyleSheet" href="lib/dtree/dtree.css" type="text/css" />
<script type="text/javascript" src="lib/dtree/dtree.js"></script>
<!-- DTree 结束 -->
<!-- 编辑器开始 -->
<script language="Javascript1.2">
<!--
_editor_url = "lib/htmlarea/";
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
document.write(' language="Javascript1.2"></scr' + 'ipt>');
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
// -->
</script>
<!-- 编辑器结束 -->
<SCRIPT LANGUAGE="JavaScript">
<!--
function OptionFetchInto(obj, obj2)
{
obj2.value = obj.options[obj.selectedIndex].value;
}
function FormatTitle(obj, obj2, def_value)
{
var FormatFlag = obj.options[obj.selectedIndex].value;
var tmp_Title = FilterHtmlStr(obj2.value);
switch(FormatFlag)
{
case "1" :
obj2.value = "<b>" + tmp_Title + "</b>";
break;
case "2" :
obj2.value = tmp_Title + "[图]";
break;
case "3" :
obj2.value = "<font color=\"red\">" + tmp_Title + "</font>";
break;
case "4" :
obj2.value = "<font color=\"blue\">" + tmp_Title + "</font>";
break;
case "5" :
obj2.value = "<em>" + tmp_Title + "</em>";
break;
case "-1" :
if(confirm("确定要清除样式?"))
{
obj2.value = tmp_Title;
}
break;
case "-2" :
obj2.value = def_value;
break;
case "-3" :
PopTool_Hidden();
break;
}
obj.selectedIndex = 0;
}
function FilterHtmlStr(str)
{
str = str.replace(/<.*?>/ig, "");
return str;
}
function chkForm_AddReco(obj)
{
if(obj.class_id.value == "")
{
alert("请选择[频道]");
return false;
}
if(obj.title.value == "")
{
obj.title.focus();
alert("请输入[标题]");
return false;
}
if(obj.keyword.value == "")
{
obj.keyword.focus();
alert("请输入[关键字]");
return false;
}
var is_go_url = false;
if(obj.short_content.value != "")
{
is_go_url = true;
}
if(!is_go_url)
{
if(obj.content.value == "")
{
alert("请输入[详细内容]");
return false;
}
}
if(obj.total_hit.value == "")
{
obj.total_hit.focus();
alert("请输入[点击率]");
return false;
}
if(obj.pages_head.value == -1)
{
obj.pages_position.value = 1;
}
}
function switchResClassSpan(obj)
{
if(obj.style.display == "")
{
obj.style.display = "none";
}else{
obj.style.display = "";
}
}
function showEditor(flag)
{
var obj = document.all.tr_content;
switch(flag)
{
case 0 :
obj.style.height = 300;
break;
case 1 :
obj.style.display = (obj.style.display == "none")?"":"none";
break;
case 2 :
obj.style.height = 600;
break;
}
}
function my_SCSelector_Open()
{
var result = SCSelector_Open(2, document.all.special.value);
if(!result) return false;
var val = "";
for(var i=0; i<result.length; i++)
{
if(val == "")
{
val += result[i].id;
}else{
val += "," + result[i].id;
}
}
document.all.special.value = val;
}
function my_RCSelector_Open1()
{
var result = RCSelector_Open(2, document.all.shareidstr.value);
if(!result) return false;
var val = "";
for(var i=0; i<result.length; i++)
{
if(val == "")
{
val += result[i].id;
}else{
val += "," + result[i].id;
}
}
document.all.shareidstr.value = val;
}
function my_RCSelector_Open()
{
var result = RCSelector_Open(1, document.all.class_id.value, "请选择资源所属频道");
if(!result) return false;
document.all.class_title.innerHTML = result[0].title + " [id:" + result[0].id + "]";
document.all.class_id.value = result[0].id;
}
//-->
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<%
Select Case Work
Case "AddReco" :
AddReco()
Case "MdyReco" :
MdyReco()
End Select
Function AddReco()
Db.Open()
Dim ClassId, ClassTitle
ClassId = FLib.SafeSql(Request("ClassId"))
ClassTitle = Trim(Request("ClassTitle"))
If ClassId <> "" And ISNumeric(ClassId) Then
If Not FLib.chkPope_AboutTheClass(ClassId, "append") Then
FLib.Alert "你无法在此频道进行添加操作", "BACK", 0
Response.End
End If
End If
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabTitleBar">
<tr>
<td>增加资源</td>
</tr>
</table>
<form name="form1" method="post" action="Resource_Process.asp" onSubmit="return chkForm_AddReco(this)">
<table width="100%" border="0" cellpadding="2" cellspacing="0">
<tr>
<td width="11%" align="right" valign="top">频道:</td>
<td width="89%"><a id="class_title" href="javascript:my_RCSelector_Open();void(0);">
<%If ClassId <> "" And ISNumeric(ClassId) Then Response.Write ClassTitle & " [id:" & ClassId & "]" Else Response.Write "未选择频道" End If%>
</a> </td>
</tr>
<tr>
<td align="right">标 题:</td>
<td width="89%"><input name="title" type="text" class="input_text" tabindex="2" onFocus="PopTool_Show(this, document.all.title_tool)" size="60">
<span id="title_tool" style="position:absolute; visibility: hidden;">
<select name="select" onChange="FormatTitle(this, form1.title, '')" class="select_list">
<option selected>-- 修饰 --</option>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -