📄 attribute.asp
字号:
{
if (strMonth.match(/\D/)!=null){alert("月份输入参数不是数字!");return;}
var m = (strMonth) ? strMonth : new Date().getMonth() + 1;
var s = "<select Author=meizz name=tmpSelectMonth style='font-size: 12px' "
s += "onblur='document.all.tmpSelectMonthLayer.style.display=\"none\"' "
s += "onchange='document.all.tmpSelectMonthLayer.style.display=\"none\";"
s += "meizzTheMonth = this.value; meizzSetDay(meizzTheYear,meizzTheMonth)'>\r\n";
var selectInnerHTML = s;
for (var i = 1; i < 13; i++)
{
if (i == m)
{selectInnerHTML += "<option value='"+i+"' selected>"+i+"月"+"</option>\r\n";}
else {selectInnerHTML += "<option value='"+i+"'>"+i+"月"+"</option>\r\n";}
}
selectInnerHTML += "</select>";
document.all.tmpSelectMonthLayer.style.display="";
document.all.tmpSelectMonthLayer.innerHTML = selectInnerHTML;
document.all.tmpSelectMonth.focus();
}
function closeLayer() //这个层的关闭
{
document.all.meizzDateLayer.style.display="none";
}
function document.onkeydown()
{
if (window.event.keyCode==27)document.all.meizzDateLayer.style.display="none";
}
function IsPinYear(year) //判断是否闰平年
{
if (0==year%4&&((year%100!=0)||(year%400==0))) return true;else return false;
}
function GetMonthCount(year,month) //闰年二月为29天
{
var c=MonHead[month-1];if((month==2)&&IsPinYear(year)) c++;return c;
}
function GetDOW(day,month,year) //求某天的星期几
{
var dt=new Date(year,month-1,day).getDay()/7; return dt;
}
function meizzPrevY() //往前翻 Year
{
if(meizzTheYear > 999 && meizzTheYear <10000){meizzTheYear--;}
else{alert("年份超出范围(1000-9999)!");}
meizzSetDay(meizzTheYear,meizzTheMonth);
}
function meizzNextY() //往后翻 Year
{
if(meizzTheYear > 999 && meizzTheYear <10000){meizzTheYear++;}
else{alert("年份超出范围(1000-9999)!");}
meizzSetDay(meizzTheYear,meizzTheMonth);
}
function meizzToday() //Today Button
{
meizzTheYear = new Date().getFullYear();
meizzTheMonth = new Date().getMonth()+1;
meizzSetDay(meizzTheYear,meizzTheMonth);
}
function meizzPrevM() //往前翻月份
{
if(meizzTheMonth>1){meizzTheMonth--}else{meizzTheYear--;meizzTheMonth=12;}
meizzSetDay(meizzTheYear,meizzTheMonth);
}
function meizzNextM() //往后翻月份
{
if(meizzTheMonth==12){meizzTheYear++;meizzTheMonth=1}else{meizzTheMonth++}
meizzSetDay(meizzTheYear,meizzTheMonth);
}
function meizzSetDay(yy,mm) //主要的写程序**********
{
meizzWriteHead(yy,mm);
for (var i = 0; i < 37; i++){meizzWDay[i]=""}; //将显示框的内容全部清空
var day1 = 1,firstday = new Date(yy,mm-1,1).getDay(); //某月第一天的星期几
for (var i = firstday; day1 < GetMonthCount(yy,mm)+1; i++){meizzWDay[i]=day1;day1++;}
for (var i = 0; i < 37; i++)
{ var da = eval("document.all.meizzDay"+i) //书写新的一个月的日期星期排列
if (meizzWDay[i]!="")
{ da.innerHTML = "<b>" + meizzWDay[i] + "</b>";
da.style.backgroundColor = (yy == new Date().getFullYear() &&
mm == new Date().getMonth()+1 && meizzWDay[i] == new Date().getDate()) ? "#FFD700" : "#ADD8E6";
da.style.cursor="hand"
}
else{da.innerHTML="";da.style.backgroundColor="";da.style.cursor="default"}
}
}
function meizzDayClick(n) //点击显示框选取日期,主输入函数*************
{
var yy = meizzTheYear;
var mm = meizzTheMonth;
if (mm < 10){mm = "0" + mm;}
if (outObject)
{
if (!n) {outObject.value=""; return;}
if ( n < 10){n = "0" + n;}
outObject.value= yy + "-" + mm + "-" + n ; //注:在这里你可以输出改成你想要的格式
closeLayer();
}
else {closeLayer(); alert("您所要输出的控件对象并不存在!");}
}
meizzSetDay(meizzTheYear,meizzTheMonth);
// -->
</script>
<Form language=javascript name="Gbsz" method="POST" action="Attribute.asp?id=<%=id%>&up=add" onsubmit="return Gbsz_onsubmit()">
<table width="400" border="0" align="center" cellpadding="3" cellspacing="1" class="tableBorder">
<tr>
<th height="20" colspan="3" class="tableHeaderText" align="center">
<strong>
<font color="#FFffff">设置商贸通会员属性</font></strong></td>
</th>
<tr>
<td width="390" align="right" class=forumRow>服务状态选项:</td>
<td width="161" align="left" class=forumRow><input name="flag" type="radio" value="1">
已付费</td>
<td width="394" align="left" class=forumRow><input name="flag" type="radio" value="0">
未付费</td>
</tr>
<tr>
<td rowspan="2" align="right" class=forumRow>服务起始时间:<br>
</td>
<td colspan="2" align="left" class=forumRow>起:
<input name="begindate" type="text" id="begindate" onfocus="setday(this)" value="<%=date()%>" ></td>
</tr>
<tr>
<td colspan="2" align="left" class=forumRow>始:
<input name="enddate" type="text" value="<%=date()+365%>" onfocus="setday(this)" ></td>
</tr>
<tr align="center">
<td height="30" colspan="3" class=forumRowHighlight> <input type="submit" name="Submit" value="确 定 设 置">
</td>
</tr>
</table>
</Form>
<%
if request("up")="add" then
flag=Replace_Text(request("flag"))
begindate=Replace_Text(request("begindate"))
enddate=Replace_Text(request("enddate"))
set rs=server.createobject("adodb.recordset")
sql="select * from corporation where id="&id&""
rs.open sql,conn,1,3
if flag=1 then
rs("flag")=1
rs("begindate")=begindate
rs("enddate")=enddate
rs("url")="company/pretermission/?memberID="&rs("user")&""
rs("trust_score")=10
end if
if flag=0 then
rs("flag")=0
rs("begindate")=""
rs("enddate")=""
rs("url")=""
rs("trust_score")=""
end if
rs.update
response.write"<SCRIPT language=JavaScript>alert('设置商贸通会员属性成功!');"
response.write"javascript:window.close();</script>"
response.end
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
%>
<script>
function window.onbeforeunload(){
window.opener.location.reload()
}
</script>
<!--#include file="../copy.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -