📄 labelmass_method4.cs
字号:
str_NorFilt += "Dim I" + newLine;
str_NorFilt += "I = 1" + newLine;
str_NorFilt += "Sub ChangeImg" + newLine;
str_NorFilt += "Do While FileListArr(I)=\"\"" + newLine;
str_NorFilt += "I = I + 1" + newLine;
str_NorFilt += "If I>UBound(FileListArr) Then I = 0" + newLine;
str_NorFilt += "Loop" + newLine;
str_NorFilt += "Dim J" + newLine;
str_NorFilt += "If I>UBound(FileListArr) Then I = 0" + newLine;
str_NorFilt += "Randomize" + newLine;
str_NorFilt += "J = Int(Rnd * (UBound(FilterArr)+1))" + newLine;
str_NorFilt += "Img.style.filter = FilterArr(J)" + newLine;
str_NorFilt += "Img.filters(0).Apply" + newLine;
str_NorFilt += "Img.Src = FileListArr(I)" + newLine;
str_NorFilt += "Img.filters(0).play" + newLine;
str_NorFilt += "Link.Href = LinkArr(I)" + newLine;
if (str_ShowTitle == "true")
{
str_NorFilt += "Txt.filters(0).Apply" + newLine;
str_NorFilt += "Txt.innerHTML = TxtListArr(I)" + newLine;
str_NorFilt += "Txt.filters(0).play" + newLine;
}
str_NorFilt += "I = I + 1" + newLine;
str_NorFilt += "If I>UBound(FileListArr) Then I = 0" + newLine;
str_NorFilt += "TempImg.Src = FileListArr(I)" + newLine;
str_NorFilt += "TempLink.Href = LinkArr(I)" + newLine;
str_NorFilt += "SetTimeout \"ChangeImg\", PlayImg_M,\"VBScript\"" + newLine;
str_NorFilt += "End Sub" + newLine;
str_NorFilt += "</SCRIPT>" + newLine;
str_NorFilt += "<TABLE WIDTH=\"100%\" height=\"100%\" BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">" + newLine;
str_NorFilt += "<TR ID=\"NoScript\">" + newLine;
str_NorFilt += "<TD Align=\"Center\" Style=\"Color:White\">对不起,图片浏览功能需脚本支持,但您的浏览器已经设置了禁止脚本运行。请您在浏览器设置中调整有关安全选项。</TD>" + newLine;
str_NorFilt += "</TR>" + newLine;
str_NorFilt += "<TR Style=\"Display:none\" ID=\"CanRunScript\"><TD HEIGHT=\"100%\" Align=\"Center\" vAlign=\"Center\"><a id=\"Link\" " + str_Target + "><Img ID=\"Img\" " + str_FlashWidth + " " + str_FlashHeight + " Border=\"0\" ></a>" + newLine;
str_NorFilt += "</TD></TR><TR Style=\"Display:none\"><TD><a id=TempLink ><Img ID=\"TempImg\" Border=\"0\"></a></TD></TR>" + newLine;
if (str_ShowTitle == "true")
{
str_NorFilt += "<TR><TD HEIGHT=\"100%\" Align=\"Center\" vAlign=\"Top\">" + newLine;
str_NorFilt += "<div ID=\"Txt\" style=\"PADDING-LEFT: 5px; Z-INDEX: 1; FILTER: progid:DXImageTransform.Microsoft.Fade(duration=1,overlap=0); POSITION:\">" + str_FirstTxt + "</div>" + newLine;
str_NorFilt += "</TD></TR>" + newLine;
}
str_NorFilt += "</TABLE>" + newLine;
str_NorFilt += "<Script Language=\"VBScript\">" + newLine;
str_NorFilt += "NoScript.Style.Display = \"none\"" + newLine;
str_NorFilt += "CanRunScript.Style.Display = \"\"" + newLine;
str_NorFilt += "Img.Src = FileListArr(0)" + newLine;
str_NorFilt += "Link.Href = LinkArr(0)" + newLine;
str_NorFilt += "SetTimeout \"ChangeImg\", PlayImg_M,\"VBScript\"" + newLine;
str_NorFilt += "</Script>" + newLine;
dt.Clear(); dt.Dispose();
}
else
{
str_NorFilt = "没有幻灯片";
}
return str_NorFilt;
}
/// <summary>
/// Flash幻灯片
/// </summary>
/// <returns></returns>
public string Analyse_FlashFilt()
{
string str_FlashFilt = "暂无幻灯新闻";
string str_FlashType = this.GetParamValue("NT:FlashType");
string str_ClassID = this.GetParamValue("NT:ClassID");
string str_Flashweight = this.GetParamValue("NT:Flashweight");
string str_Flashheight = this.GetParamValue("NT:Flashheight");
string str_FlashBG = this.GetParamValue("NT:FlashBG");
string str_ShowTitle = this.GetParamValue("NT:ShowTitle");
string str_isSub = this.GetParamValue("NT:isSub");
string str_TitleNum = this.GetParamValue("NT:TitleNum");
int TNumber = 30;
if (NetCMS.Common.Input.IsInteger(str_TitleNum))
{
TNumber = int.Parse(str_TitleNum);
}
if (str_Flashweight == null)
str_Flashweight = "200";
if (str_Flashheight == null)
str_Flashheight = "150";
if (str_FlashBG == null)
str_FlashBG = "FFF";
string SqlCondition = " Where [isRecyle]=0 And [isLock]=0 And [SiteID]='" + this.Param_SiteID + "' And [NewsType]=1 And SubString([NewsProperty],7,1)='1'";
string SqlOrderBy = " Order By [CreatTime] Desc";
#region 对栏目进行判断
DataTable dt = null;
string Sql = string.Empty;
if (str_ClassID != null)
{
switch (str_ClassID)
{
case "0":
if (str_isSub == "true")
{
SqlCondition += " And [ClassID] In (" + getChildClassID(this.Param_CurrentClassID) + ")";
}
Sql = "select top " + Param_Loop + " * from [" + DBConfig.TableNamePrefix + "News] " + SqlCondition + " And ClassID='" + this.Param_CurrentClassID + "' " + SqlOrderBy;
break;
case "-1":
Sql = "select top " + Param_Loop + " * from [" + DBConfig.TableNamePrefix + "News]" + SqlCondition + SqlOrderBy;
break;
default:
if (str_isSub == "true")
{
SqlCondition += " And [ClassID] In(" + getChildClassID(str_ClassID) + ")";
}
Sql = "select top " + Param_Loop + " * from [" + DBConfig.TableNamePrefix + "News]" + SqlCondition + SqlOrderBy;
break;
}
}
else
{
Sql = "select top " + Param_Loop + " * from [" + DBConfig.TableNamePrefix + "News]" + SqlCondition + SqlOrderBy;
}
dt = CommonData.DalPublish.ExecuteSql(Sql);
#endregion 对栏目进行判断
string Pics_Path = "";
string Link_Str = "";
string Title_Str = "";
if (dt != null)
{
if (dt.Rows.Count > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
PubClassInfo ci = CommonData.GetClassById(dt.Rows[i]["ClassID"].ToString());
Pics_Path += dt.Rows[i]["PicURL"].ToString() + "|";
Link_Str += getNewsURL(dt.Rows[i]["isDelPoint"].ToString(), dt.Rows[i]["newsID"].ToString(), dt.Rows[i]["SavePath"].ToString(), ci.SavePath + "/" + ci.SaveClassframe, dt.Rows[i]["FileName"].ToString(), dt.Rows[i]["FileEXName"].ToString()) + "|";
string TmpTitle = dt.Rows[i]["NewsTitle"].ToString();
Title_Str += NetCMS.Common.Input.GetSubString(TmpTitle, TNumber) + "|";
}
}
}
dt.Clear(); dt.Dispose();
Pics_Path = NetCMS.Common.Input.CutComma(Pics_Path, "|");
Pics_Path = RelpacePicPath(Pics_Path);
Link_Str = NetCMS.Common.Input.CutComma(Link_Str, "|");
Title_Str = NetCMS.Common.Input.CutComma(Title_Str, "|");
if (Pics_Path != string.Empty && Link_Str != string.Empty && Title_Str != string.Empty)
{
string[] P_Arr = Pics_Path.Split('|');
string[] L_Arr = Link_Str.Split('|');
string[] T_Arr = Title_Str.Split('|');
if (P_Arr.Length == L_Arr.Length && P_Arr.Length == T_Arr.Length)
{
if (P_Arr.Length < 2)
{
str_FlashFilt = "flash幻灯至少要两条以上才可以显示";
}
else
{
string SwfFilePath = CommonData.SiteDomain + "/Flash.swf";
str_FlashFilt = "<script language=\"javascript\" type=\"text/javascript\">" + newLine;
str_FlashFilt += "<!--" + newLine;
str_FlashFilt += "var Flash_Width = " + str_Flashweight + ";" + newLine;
str_FlashFilt += "var Flash_Height = " + str_Flashheight + ";" + newLine;
if (str_ShowTitle == "true")
str_FlashFilt += "var Txt_Height = 20;" + newLine;
else
str_FlashFilt += "var Txt_Height = 0;" + newLine;
str_FlashFilt += "var Swf_Height = parseInt(Flash_Height + Txt_Height);" + newLine;
str_FlashFilt += "var Pics_ = '" + Pics_Path + "';" + newLine;
str_FlashFilt += "var Links_ = '" + Link_Str + "';" + newLine;
str_FlashFilt += "var Texts_ = '" + Title_Str + "';" + newLine;
str_FlashFilt += "document.write('<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\"'+ Flash_Width +'\" height=\"'+ Swf_Height +'\">');" + newLine;
str_FlashFilt += "document.write('<param name=\"allowScriptAccess\" value=\"sameDomain\"><param name=\"movie\" value=\"" + SwfFilePath + "\"><param name=\"quality\" value=\"high\"><param name=\"bgcolor\" value=\"#" + str_FlashBG + "\">');" + newLine;
str_FlashFilt += "document.write('<param name=\"menu\" value=\"false\"><param name=\"wmode\" value=\"opaque\">');" + newLine;
str_FlashFilt += "document.write('<param name=\"FlashVars\" value=\"pics='+Pics_+'&links='+Links_+'&texts='+Texts_+'&borderwidth='+Flash_Width+'&borderheight='+Flash_Height+'&textheight='+Txt_Height+'\">');" + newLine;
str_FlashFilt += "document.write('<embed src=\"" + SwfFilePath + "\" wmode=\"opaque\" FlashVars=\"pics='+Pics_+'&links='+Links_+'&texts='+Texts_+'&borderwidth='+Flash_Width+'&borderheight='+Flash_Height+'&textheight='+Txt_Height+'\" menu=\"false\" bgcolor=\"#" + str_FlashBG + "\" quality=\"high\" width=\"'+ Flash_Width +'\" height=\"'+ Swf_Height +'\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />');" + newLine;
str_FlashFilt += "document.write('</object>');" + newLine;
str_FlashFilt += "//-->" + newLine;
str_FlashFilt += "</script>" + newLine;
}
}
}
return str_FlashFilt;
}
/// <summary>
/// 信息统计标签
/// </summary>
/// <returns></returns>
public string Analyse_Stat()
{
string Statstr = string.Empty;
return Statstr;
}
/// <summary>
/// 搜索
/// </summary>
/// <returns></returns>
public string Analyse_Search()
{
string str_Search = "";
string str_RnadNum = NetCMS.Common.Rand.Number(5);
string str_SearchType = this.GetParamValue("NT:SearchType");
string str_ShowDate = this.GetParamValue("NT:ShowDate");
string str_ShowClass = this.GetParamValue("NT:ShowClass");
string str_TextCss = this.GetParamValue("NT:TextCss");
string str_ButtonCss = this.GetParamValue("NT:ButtonCss");
string str_SelectCss = this.GetParamValue("NT:SelectCss");
string str_SearchWhere = this.GetParamValue("NT:SearchWhere");
string str_DateCss = this.GetParamValue("NT:DateCss");
string str_LMCss = this.GetParamValue("NT:LMCss");
string str_ShowStyle = this.GetParamValue("NT:ShowStyle");
string str_ImagePath = this.GetParamValue("NT:ImagePath");
bool b_ShowDate = false;
bool b_ShowClass = false;
str_Search += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">" + newLine;
str_Search += "<form id=\"Search_Form\" name=\"Search_Form\" method=\"get\" action=\"search.html\">" + newLine;
str_Search += "<tr>" + newLine;
str_Search += "<td>" + newLine;
//str_Search += "<input name=\"tags\" type=\"text\" size=\"10\" maxlength=\"20\" onkeydown=\"javascript:if(event.keyCode==13){SearchGo" + str_RnadNum + "(this.form);}\" />";
str_Search += "<input name=\"tags\" type=\"text\" class=\""+str_TextCss+"\" size=\"10\" maxlength=\"20\" onkeydown=\"javascript:if(event.keyCode==13){return false;}\" />";
if (str_SearchType == "true")
{
if (str_ShowDate == "true")
{
str_ShowDate = " <select name=\"Date\" class=\""+str_DateCss+"\">" + newLine;
str_ShowDate += "<option value=\"0\">不限制</otpion>" + newLine;
str_ShowDate += "<option value=\"1\">最近一天</otpion>" + newLine;
str_ShowDate += "<option value=\"3\">最近三天</otpion>" + newLine;
str_ShowDate += "<option value=\"7\">最近一周</otpion>" + newLine;
str_ShowDate += "<option value=\"30\">最近一月</otpion>" + newLine;
str_ShowDate += "<option value=\"180\">最近半年</otpion>" + newLine;
str_ShowDate += "</select>" + newLine;
b_ShowDate = true;
}
else
{
str_ShowDate = "";
}
if (str_ShowClass == "true")
{
IList<PubClassInfo> list = CommonData.NewsClass;
if (list != null)
{
str_ShowClass = " <select name=\"ClassID\" class=\"" + str_LMCss + "\"><option vlaue=\"\">请选择</option>" + newLine + ChildList(list, "0", "├") + "</select>";
b_ShowClass = true;
}
else
str_ShowClass = " <select name=\"ClassID\"><option vlaue=\"\">当前没有栏目</option></select>";
}
else
str_ShowClass = "";
str_Search += str_ShowDate + str_ShowClass;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -