⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 searchfluctuation.js

📁 就业管理系统 源代码 可以运行 没有错误
💻 JS
📖 第 1 页 / 共 2 页
字号:
//Search For Kesion CMS
//Version 3.0
//Powered By Kesion.Com
var normal='slategray';   //color;
var zindex=10000;         //z-index;
var openTF=false;
var width=165,height=window.document.body.offsetHeight-5;
var left=0,top=0,title='搜索小助理';
var SearchBodyStr=''
                   +'<table width="100%" border="0" cellspacing="0" cellpadding="0">'
				   +'<form name="searchform" target="MainFrame" method="post">'
                   +'<tr> '
                   +'<td height="25"><strong>按下面任意或全部条件进行搜索</strong></td>'
                   +' </tr>'
                   +'<tr><td height="25">全部或部分关键字</td></tr>'
                   +'<tr><td height="25"><input style="width:95%" type="text" name="KeyWord"></td></tr>'
                   +'  <tr><td height="25">搜索范围</td></tr>'
                   +'  <tr><td height="25"> <select style="width:95%" name="SearchArea" onchange="SetSearchTypeOption(this.value)">'
                   +'     </select></td></tr>' 
				   +'<tr><td height="25">搜索类型</td></tr>'
                   +'<tr><td height="25"><select style="width:95%" name="SearchType">'
                   +'</select></td></tr>'
				   +'  <tr id="DateArea" onclick="setstatus(this)" style="cursor:hand"><td height="25"><strong>什么时候修改的?</strong></td></tr>'
				   +'  <tr style="display:none"><td height="25">开始日期<input type="text" readonly style="width:80%" name="StartDate" id="StartDate">'
                   +'  <span style="cursor:hand" onClick=OpenThenSetValue("Include/DateDialog.asp",160,170,window,document.all.StartDate);document.all.StartDate.focus();><img src="Images/date.gif" width="20" height="20" border="0" align="absmiddle" title="选择日期"></span></td></tr>'
				   +'  <tr style="display:none"><td height="25">结束日期<input type="text" readonly style="width:80%" name="EndDate" id="EndDate">'
                   +'  <span style="cursor:hand" onClick=OpenThenSetValue("Include/DateDialog.asp",160,170,window,document.all.EndDate);document.all.EndDate.focus();><img src="Images/date.gif" width="20" height="20" border="0" align="absmiddle" title="选择日期"></span></td></tr>'
                   +'  <tr><td height="40" align="center"><input type="submit" name="SearchButton" value="开始搜索" onclick="return(SearchFormSubmit())"></td></tr>'
				   +'</form>'
				   +'  <tr><td><strong>使用说明:</strong></td></tr>'
				   +'  <tr><td> ① 您可以利用本搜索助理来搜索文章、图片、下载Flash、专题、标签、JS等,但不能搜索(目录)诸如频道名称、栏目名称,标签目录等</td></tr>'
				   +'  <tr><td> ② 按 <font color=red>Ctrl+F</font> 可以快速进行打开或关闭搜索小助理</td></tr>'
                   +'</table>'
        var str=""
               +"<div id='SearchBox' "
               + "style='display:none;"
               + "z-index:" + zindex + ";"
               + "width:" + width + ";"
               + "height:" + height + ";"
               + "left:" + left + ";"
               + "top:" + top + ";"
               + "background-color:" + normal + ";"
               + "color:black;"
               + "font-size:12px;"
               + "font-family:Verdana, Arial, Helvetica, sans-serif;"
               + "position:absolute;"
               + "cursor:default;"
               + "border:3px solid " + normal + ";"
               + "'"
               + ">"
                       + "<div "
                       + "style='"
                       + "background-color:" + normal + ";"
                       + "width:" + (width) + ";"
                       + "height:23;"
                       + "color:white;"
                       + "' "
					   + ">"
                               + "<span style='width:" + (width-2*12-4) + ";padding-left:3px;'>" + title + "</span>"
                               + "<span id='Close' style='width:20;border-width:0px;color:white;font-family:webdings;' onclick='CloseSearchBox(this)'>r</span>"
                       + "</div>"
                               + "<div style='"
                               + "width:158;overflow:auto;"
                               + "height:" + (height-20-4) + ";"
                               + "background-color:white;"
                               + "line-height:14px;"
                               + "word-break:break-all;"
                               + "padding:3px;"
                               + "'>" + SearchBodyStr + "</div>"
               + "</div>"
               + "<div style='display:none;"
               + "width:" + width + ";"
               + "height:" + height + ";"
               + "top:" + top + ";"
               + "left:" + left + ";"
               + "z-index:" + (zindex-1) + ";"
               + "position:absolute;"
               + "background-color:black;"
               + "filter:alpha(opacity=40);"
               + "'></div>";
//关闭;
function CloseSearchBox(el)
{   if (el.id=='Close')
	  { var twin = el.parentNode.parentNode;
        var shad = twin.nextSibling;
	   	   	twin.style.display = "none";
            shad.style.display = "none";
			openTF=false;
			SearchBodyStr=null;
			str=null;
       }
}
function initial()
{
if (!openTF)
 {
 document.body.insertAdjacentHTML("beforeEnd",str);
 openTF=true;
 }
}
//初始化;
function initializeSearch(SearchArea)
{
 initial();
 initialSearchAreaOption(SearchArea);
if (document.all.SearchBox.style.display=='none')
 {
  document.all.SearchBox.style.display='';
  if (document.forms[0].disabled==false) document.forms[0].focus();
 }
 else
 document.all.SearchBox.style.display='none';
}
function initialSearchAreaOption(SearchArea)
{	 var EF=false;
     var TextArr=new Array('文章中心','图片中心','下载中心','动漫中心','商城中心','影视中心','供求信息','专题中心','友情链接站点','系统函数标签','自定义函数标签','自定义静态标签','系统 JS','自由 JS','管理员')
     var valueArr=new Array('Article','Picture','DownLoad','Flash','Shop','Movie','Supply','Special','Link','SysLabel','DIYFunctionLabel','FreeLabel','SysJS','FreeJS','Manager')
	  for(var i=0;i<valueArr.length;++i)
	   if (SearchArea==valueArr[i]) 
	    { 
		  EF=true;
		  break;
		 }
	  if (!EF) return false; 
	  document.all.KeyWord.value='';
	  document.all.SearchArea.length=0;
      for (var i=0;i<TextArr.length;++i)
    	{
		    document.all.SearchArea.options[document.all.SearchArea.length] = new Option(TextArr[i],valueArr[i]);
		    if (SearchArea==valueArr[i])
	        document.all.SearchArea.options(i).selected=true;
		} 
	//进行权限检查,对没有权限的搜索模块,进行屏蔽	
	 var n=0;
	for (var i=0;i<TextArr.length;++i)
	   {   var removeTF=false;
	       if (valueArr[i]!=SearchArea)
	   	  { if (valueArr[i]=='Article' && SearchArticlePower=='False')
			   removeTF=true;
			if (valueArr[i]=='Picture' && SearchPicturePower=='False')
			   removeTF=true;  
			if (valueArr[i]=='DownLoad' && SearchDownLoadPower=='False')
			   removeTF=true; 
			if (valueArr[i]=='Flash' && SearchFlashPower=='False')
			   removeTF=true; 
			if (valueArr[i]=='Shop' && SearchShopPower=='False')
			   removeTF=true; 
			if (valueArr[i]=='Movie' && SearchMoviePower=='False')
			   removeTF=true; 
			if (valueArr[i]=='Supply' && SearchSupplyPower=='False')
			   removeTF=true; 
	   	    if (valueArr[i]=='Special' && SearchSpecialPower=='False')  
			   removeTF=true;
	   	    if (valueArr[i]=='Link' && SearchLinkPower=='False')  
			   removeTF=true;
			if (valueArr[i]=='SysLabel' && SearchSysLabelPower=='False')
			   removeTF=true;
			if (valueArr[i]=='DIYFunctionLabel' && SearchDIYFunctionLabelPower=='False')
			   removeTF=true;
			if (valueArr[i]=='FreeLabel' && SearchFreeLabelPower=='False')
			   removeTF=true;
			if (valueArr[i]=='SysJS' && SearchSysJSPower=='False')
			   removeTF=true;
			if (valueArr[i]=='FreeJS' && SearchFreeJSPower=='False')
			   removeTF=true;
			if (valueArr[i]=='Manager' && SearchAdminPower=='False')
			   removeTF=true;
		   }
		  if (removeTF==true)  
		    {document.all.SearchArea.options.remove(i-n);
			 n++;
			}	
	   }
	SetSearchTypeOption(SearchArea); 
}
function SetSearchTypeOption(AreaType)
{	 //Remove all Option
    var TextArr=new Array();
    document.all.SearchType.options.length=0
  switch (AreaType)
  {
    case 'Article':
	     if (SearchArticlePower=='False')          //搜索文章权限检查
		 {
		  DisabledSearchFluctuation(true);
		  return;
		 }
		 else
		 {
		  DisabledSearchFluctuation(false);
	      document.all.DateArea.style.display="";
	      TextArr=new Array('文章(副)标题','文章内容','文章关键字','文章作者','文章录入')
	      }
		  break;
    case 'Special':
	     if (SearchSpecialPower=='False')        //搜索专题权限检查
		 {
		   DisabledSearchFluctuation(true);
		   return;
		 }
		 else
		 {
		  DisabledSearchFluctuation(false);
	      document.all.DateArea.style.display="";
	      TextArr=new Array('专题名称','简要说明')
	     }
		 break;
    case 'Picture':
	     if (SearchPicturePower=='False')          //搜索图片权限检查
		 {
		  DisabledSearchFluctuation(true);
		  return;
		 }
		 else
		 {
		  DisabledSearchFluctuation(false);
	      document.all.DateArea.style.display="";
	      TextArr=new Array('图片名称','图片简介','图片关键字','图片作者','图片录入')
	      }
		  break;
    case 'DownLoad':
	     if (SearchDownLoadPower=='False')          //搜索下载权限检查
		 {
		  DisabledSearchFluctuation(true);
		  return;
		 }
		 else
		 {
		  DisabledSearchFluctuation(false);
	      document.all.DateArea.style.display="";
	      TextArr=new Array('下载名称','下载简介','下载关键字','下载作者/开发商','下载录入')
	      }
		  break; 
	case 'Flash':
	     if (SearchFlashPower=='False')          //搜索Flash权限检查
		 {
		  DisabledSearchFluctuation(true);
		  return;
		 }
		 else
		 {
		  DisabledSearchFluctuation(false);
	      document.all.DateArea.style.display="";
	      TextArr=new Array('动漫名称','动漫简介','动漫关键字','动漫作者','动漫录入')
	      }
		  break; 
	case 'Shop':
	     if (SearchShopPower=='False')          //搜索商品权限检查
		 {
		  DisabledSearchFluctuation(true);
		  return;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -