adsdirection.asp

来自「网店批发系统,很好很强大,很好很强大很好很强大」· ASP 代码 · 共 182 行

ASP
182
字号
<!--#include file="conn.asp"-->
<!--#include file="checkAdmin.asp"-->
<!--#include file="../inc/check_inc.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="css/css.css" rel="stylesheet" type="text/css" />
<title>广告位设置</title>
</head>

<body>
<!--#include file="inc/AdsDirection_inc.asp"-->

<table width="97%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FAFAFA" style="border:1px solid #DDDDDD;margin-top:50px;" id="insert">
  <tr>
    <td>
<!--******************-->
<SCRIPT language=JavaScript>
<!-- Begin

var http = getHTTPObject(); // We create the HTTP Object

function getHTTPObject()
{
	var http=null;
	if(window.ActiveXObject)
	{
		http=new ActiveXObject("Msxml2.XMLHTTP");
		if(!http)
		{
			http=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	else if(window.XMLHttpRequest)
	{
		http=new XMLHttpRequest();
	}
	return http
}

function updateCityState(ZIP) {

  var zipValue = ZIP;

  http.open("GET", url + escape(zipValue), true);

  http.send(null);

 }

function add(fbox,tbox) {
	var j=0 ;
	for(var i=0; i<fbox.options.length; i++) {
		if(fbox.options[i].selected && fbox.options[i].value != "") {
			var no = new Option();
			no.value = fbox.options[i].value;
			no.text = fbox.options[i].text;
			no.pic = fbox.options[i].pic;

			for(var x=0; x<tbox.options.length; x++){
				if(tbox.options[x].value == no.value){
					j = 1 ;
					break ;
   				}  
			}
			if(j == 0){			
				tbox.options[tbox.options.length] = no;
				updateCityState(fbox.options[i].value);
			}
		}
	}
}

function del(fbox,tbox) {
	for(var i=0; i<fbox.options.length; i++) {
		if(fbox.options[i].selected && fbox.options[i].value != "") {
			updateCityState('-'+fbox.options[i].value);
			fbox.options[i].value = "";
			fbox.options[i].text = "";
		}
	}
	BumpUp(fbox);
}

function BumpUp(box)  {
	for(var i=0; i<box.options.length; i++) {
		if(box.options[i].value == "")  {
			for(var j=i; j<box.options.length-1; j++)  {
				box.options[j].value = box.options[j+1].value;
				box.options[j].text = box.options[j+1].text;
			}
			var ln = i;
			break;
		}
	}
	if(ln < box.options.length)  {
	box.options.length -= 1;
	BumpUp(box);
	}
}
// End -->
</SCRIPT>
<FORM name=form1>
  <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
    <TR>
      <TD align=center></TD>
      <TD>&nbsp;</TD>
      <TD align=center>&nbsp;</TD>
      <TD align="center">&nbsp;</TD>
      <TD align="center">&nbsp;</TD>
    </TR>
    <TR>
      <TD align=center></TD>
      <TD colspan="4" style="font-size:14px;"><b><%=Title%>广告添加</b> <span style="color:#FF3300">请选择您想加广告的位置点击,选择您在广告库中添加的图片即可,</span></TD>
      </TR>
    <TR>
      <TD align=center></TD>
      <TD align=center>&nbsp;</TD>
      <TD align=center>&nbsp;</TD>
      <TD align="center">&nbsp;</TD>
      <TD align="center">&nbsp;</TD>
    </TR>
    <TR>
      <TD width="30" align=center></TD>
      <TD width="180" align=center><FIELDSET>
        <LEGEND align="center" style="padding:10px;">可选广告(点击可查看图片)</LEGEND>
        <select name="list1" size="16" 
                              multiple="multiple" class="editbox" style="WIDTH:150px" onchange="document.getElementById('tupian').innerHTML = '&lt;img src='+this.options[this.selectedIndex].pic+' width = 150&gt;'">
          <%
	for j = 0 to AdsNum
%>
          <option value="<%=Ads(0,j)%>" pic="../<%=Ads(1,j)%>"><%=Ads(0,j)%>号广告</option>
          <%
	next
%>
        </select>
      </FIELDSET></TD>
      <TD width="120" align=center><INPUT name=B1 type=button class="Button" onclick=add(this.form.list1,this.form.list2) value=" 添加 >> "><br /><br /><INPUT name=B2 type=button class="Button" onclick=del(this.form.list2,this.form.list1) value=" << 删除 "></TD>
      <TD width="180" align="center"><FIELDSET>
        <LEGEND align="center" style="padding:10px;">已选广告(点击可查看图片)</LEGEND>
        <select name="list2" size="16" 
                              multiple="multiple" class="editbox" style="WIDTH: 150px" onchange="document.getElementById('tupian').innerHTML = '&lt;img src='+this.options[this.selectedIndex].pic+' width = 150&gt;'">
          <%
	for j = 0 to AdsNum
		if instr(Ads(5,j),AdsDirection) then
%>
          <option value="<%=Ads(0,j)%>" pic="../<%=Ads(1,j)%>"><%=Ads(0,j)%>号广告</option>
          <%
		end if
	next
%>
        </select>
      </FIELDSET></TD>
      <TD align="center"><b><%=Title%>图片预览</b><br />
        <br />
        <div id="tupian"></div> </TD>
    </TR>
	<tr>
	  <Td align="left">&nbsp;</Td>
	  <Td colspan="4" align="left">&nbsp;</Td>
	  </tr>
	<tr><Td height="40" align="left">&nbsp;</Td>
	  <Td height="40" colspan="4" align="left">
	    <input name="addadv" type="button" class="Button" onclick="window.location.href='#'" value="继续添加其他广告位" /> 
	    (加入已选广告的图片自动保存,无须另外保存) </Td>
	  </tr>
  <tr><td colspan="2"></TBODY>
</TABLE>
</FORM>

<!--******************-->	</td>
  </tr>
</table>
<p>&nbsp;</p><br />

  <!--#include file="inc/closeconn_inc.asp"-->
  
</body>
</html>

⌨️ 快捷键说明

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