📄 editor_ad.asp
字号:
if ((el.className == "subFolder") || (el.className == "subItem")) outSubItem(el);
if (el.className == "scrollButton") outscrollButton(el);
}
function handleDown() {
el = getReal(window.event.srcElement, "tagName", "DIV");
if (el.className == "scrollButton") {
downscrollButton(el);
var mark = Math.max(el.id.indexOf("Up"), el.id.indexOf("Down"));
var type = el.id.substr(mark);
var menuID = el.id.substring(0,mark);
eval("scroll" + type + "(" + menuID + ")");
}
}
function handleUp() {
el = getReal(window.event.srcElement, "tagName", "DIV");
if (el.className == "scrollButton") {
upscrollButton(el);
window.clearTimeout(scrolltimer);
}
}
////////////////////// EVERYTHING IS HANDLED ////////////////////////////
function hide(elID) {
var el = eval(elID);
el.style.display = "none";
el.parentElement.openedSub = null;
}
function writeSubPadding(depth) {
var str, str2, val;
var str = "<style type='text/css'>\n";
for (var i=0; i < depth; i++) {
str2 = "";
val = 0;
for (var j=0; j < i; j++) {
str2 += ".sub "
val += 18; //子栏目左边距数值
}
str += str2 + ".subFolder {padding-left: " + val + "px;}\n";
str += str2 + ".subItem {padding-left: " + val + "px;}\n";
}
str += "</style>\n";
return str;
}
function overTopItem(el) {
with (el.style) {
background = "#f8f8f8";
paddingBottom = "0px";
}
}
function outTopItem(el) {
if ((el.sub != null) && (el.parentElement.openedSub == el.sub.id)) {
with(el.style) {
background = "#ffffff";
}
}
else {
with (el.style) {
background = "#ffffff";
padding = "0px";
}
}
}
function overSubItem(el) {
el.style.background = "#F6F6F6";
el.style.textDecoration = "underline";
}
function outSubItem(el) {
el.style.background = "#ffffff";
el.style.textDecoration = "none";
}
function highlightSubItem(el) {
el.style.background = "#ffffff";
el.style.color = "#ff0000";
selectedItem = el;
}
function restoreSubItem(el) {
el.style.background = "#ffffff";
el.style.color = "menutext";
selectedItem = null;
}
function overscrollButton(el) {
overTopItem(el);
el.style.padding = "0px";
}
function outscrollButton(el) {
outTopItem(el);
el.style.padding = "0px";
}
function downscrollButton(el) {
with (el.style) {
borderRight = "0px solid buttonhighlight";
borderLeft = "0px solid buttonshadow";
borderBottom = "0px solid buttonhighlight";
borderTop = "0px solid buttonshadow";
}
}
function upscrollButton(el) {
overTopItem(el);
el.style.padding = "0px";
}
function getReal(el, type, value) {
var temp = el;
while ((temp != null) && (temp.tagName != "BODY")) {
if (eval("temp." + type) == value) {
el = temp;
return el;
}
temp = temp.parentElement;
}
return el;
}
////////////////////////////////////////////////////////////////////////////////////////
// Fix the scrollbars
var globalScrollContainer;
var overflowTimeout = 1;
function fixScroll(el) {
globalScrollContainer = el;
window.setTimeout('changeOverflow(globalScrollContainer)', overflowTimeout);
}
function changeOverflow(el) {
if (el.offsetHeight > el.parentElement.clientHeight)
window.setTimeout('globalScrollContainer.parentElement.style.overflow = "auto";', overflowTimeout);
else
window.setTimeout('globalScrollContainer.parentElement.style.overflow = "hidden";', overflowTimeout);
}
function ChangeFolderImg(el,type) {
var FolderImg = eval(el.id + "Img");
if (type == 1) {
FolderImg.src = "images/foldericon1.gif"
}
else {
FolderImg.src = "images/foldericon2.gif"
}
}
function InsertAdjs(adjs){
window.returnValue ="<IMG alt='#[!"+"script language=\"javascript\" src=\""+adjs+"\"!][!/"+"script!]#' src=\"editor/images/jscript.gif\" border=0 $>"
window.close();
}
</SCRIPT>
<!-- 广告位标签开始 -->
<DIV class=topFolder id=AdJs><IMG id=AdJsImg class=icon src="images/foldericon1.gif">广告版位标签</DIV>
<DIV class=sub id=AdJsSub>
<%
Dim XmlDoc
Private Function XmlText(ByVal iBigNode, ByVal iSmallNode, ByVal DefChar)
Dim LangRoot, LangSub
If IsNull(iBigNode) Or IsNull(iSmallNode) Then
XmlText = DefChar
Else
Set LangRoot = XmlDoc.getElementsByTagName(iBigNode)
If LangRoot.Length = 0 Then
XmlText = DefChar
Else
Set LangSub = LangRoot(0).getElementsByTagName(iSmallNode)
If LangSub.Length = 0 Then
XmlText = DefChar
Else
XmlText = LangSub(0).Text
End If
End If
Set LangRoot = Nothing
End If
End Function
Private Function GetZoneJSName(iZoneID, UpdateTime)
Set XmlDoc = CreateObject("Microsoft.XMLDOM")
XmlDoc.async = False
XmlDoc.Load (Server.MapPath(strInstalldir & "Language/Gb2312.xml"))
GetZoneJSName = strInstalldir & PE_CStr(Conn.Execute("select ADDir from PE_Config")(0), "AD") & "/" & Year(UpdateTime) & Right("0" & Month(UpdateTime), 2) & "/" & iZoneID & ".js"
Set XmlDoc = Nothing
End Function
sql = "select ZoneID,ZoneName,UpdateTime from PE_AdZone"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open sql, conn, 1, 1
If rs.bof And rs.EOF Then
Response.write ("<li>您还没有定义广告版位 </li>")
Else
Do While Not rs.EOF
Response.write "<DIV class=subItem onclick=""InsertAdjs('" & GetZoneJSName(rs("ZoneID"), rs("UpdateTime")) & "')""><IMG class=icon src=""images/jscript.gif"">" & rs("ZoneName") & "</DIV>"
rs.movenext
Loop
End If
rs.Close
Set rs = Nothing
%>
</DIV>
<!-- 广告位标签结束 -->
<!-- 区域采集JS标签 -->
<DIV class=topFolder id=Field><IMG id=FieldImg class=icon src="images/foldericon1.gif">区域采集JS标签</DIV>
<DIV class=sub id=FieldSub>
<%
sql = "select AreaName,AreaFile from PE_AreaCollection where AreaPassed=" & PE_True & " Order by AreaID desc"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open sql, conn, 1, 1
If rs.bof And rs.EOF Then
Response.write ("<li>您还没有建立区域采集JS</li>")
Else
Do While Not rs.EOF
Response.write "<DIV class=subItem onclick=""InsertAdjs('/AreaCollection/" & rs("AreaFile") & "')""><IMG class=icon src=""images/jscript.gif"">" & rs("AreaName") & "</DIV>"
rs.movenext
Loop
End If
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
%>
</DIV>
</DIV>
</td>
</tr>
</td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -