<%@LANGUAGE="VBSCRIPT"%> 
<!--#include file="Connections/connfu.asp" -->
<%
set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_connfu_STRING
Recordset1.Source = "SELECT * FROM news"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open()
Recordset1_numRows = 0
%>
<!--#include file="fso/color.asp" -->
<!--#include file="fso/fso_set.asp" -->
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>										
function DoWhiteSpace(str)												
	DoWhiteSpace = Replace((Replace(str, vbCrlf, "<br>")), chr(32)&chr(32), "&nbsp;&nbsp;")			
End Function														
</SCRIPT>
<html>
<head>
<title>最新消息-<%=bbsName%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="fso/c.asp" type="text/css">
<script language="JavaScript">
<!--
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function YY_checkform() { //v4.02
  var args = YY_checkform.arguments; var myDot=true; var myV=''; var myErr='';var addErr=false;
  var myForm = MM_findObj(args[0]);
  for (var i=1; i<args.length;i=i+4){
    if (args[i+1].charAt(0)=='#'){var myReq=true; args[i+1]=args[i+1].substring(1);}else{myReq=false}
    var myObj = MM_findObj(args[i].replace(/\[\d+\]/ig,""));//eval(myForm+'.'+args[i]);
    myV=myObj.value;
    if (myObj.type=='text'||myObj.type=='password'){
      if (myReq&&myObj.value.length==0){addErr=true}
      if ((myV.length>0)&&(args[i+2]==1)){ //fromto
        if (isNaN(parseInt(myV))||myV<args[i+1].substring(0,args[i+1].indexOf('_'))/1||myV > args[i+1].substring(args[i+1].indexOf('_')+1)/1){addErr=true}
      }
      if ((myV.length>0)&&(args[i+2]==2)&&!myV.match("^[\\w\\.=-]+@[\\w\\.-]+\\.[a-z]{2,4}$")){addErr=true}// email
      if ((myV.length>0)&&(args[i+2]==3)){ // date
        var myD=''; myM=''; myY=''; myYY=0; myDot=true;
        for(var j=0;j<args[i+1].length;j++){
          var myAt = args[i+1].charAt(j);
          if(myAt=='D')myD=myD.concat(myObj.value.charAt(j));
          if(myAt=='M')myM=myM.concat(myObj.value.charAt(j));
          if(myAt=='Y'){myY=myY.concat(myObj.value.charAt(j)); myYY++}
          if(myAt=='-'&&myObj.value.charAt(j)!='-')myDot=false;
          if(myAt=='.'&&myObj.value.charAt(j)!='.')myDot=false;
          if(myAt=='/'&&myObj.value.charAt(j)!='/')myDot=false;
        }
        if(myD/1<1||myD/1>31||myM/1<1||myM/1>12||myY.length!=myYY)myDot=false;
        if(!myDot){addErr=true}
       }
      if ((myV.length>0)&&(args[i+2]==4)){ // time
        myDot=true;
        var myH = myObj.value.substr(0,myObj.value.indexOf(':'))/1;
        var myM = myObj.value.substr(myObj.value.indexOf(':')+1,2)/1;
                var myP = myObj.value.substr(myObj.value.indexOf(':')+3,2);
        if ((args[i+1])=="12:00pm"){if(myH<0||myH>12||myM<0||myM>59||(myP!="pm"&&myP!="am")||myObj.value.length>7)myDot=false;}
        if ((args[i+1])=="12:00"){if(myH<0||myH>12||myM<0||myM>59||myObj.value.length>5)myDot=false;}
        if ((args[i+1])=="24:00"){if(myH<0||myH>23||myM<0||myM>59||myObj.value.length>5)myDot=false;}
        if(!myDot){addErr=true}
      }
      if (myV.length>0&&args[i+2]==5){
            var myObj1 = MM_findObj(args[i+1].replace(/\[\d+\]/ig,""));
            if(!myObj1[args[i+1].replace(/(.*\[)|(\].*)/ig,"")].checked){addErr=true} // check this 2
          }
    }else
    if (!myObj.type&&myObj.length>0&&myObj[0].type=='radio'){
      if (args[i+2]==1&&myObj.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}
      if (args[i+2]==2){
        var myDot=false;
        for(var j=0;j<myObj.length;j++){myDot=myDot||myObj[j].checked}
        if(!myDot){myErr+='* ' +args[i+3]+'\n'}
      }
    }else
    if (myObj.type=='checkbox'){
      if(args[i+2]==1&&myObj.checked==false){addErr=true}
      if(args[i+2]==2&&myObj.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}
    }else
    if (myObj.type=='select-one'||myObj.type=='select-multiple'){
      if(args[i+2]==1&&myObj.selectedIndex/1==0){addErr=true}
    }else
    if (myObj.type=='textarea'){
      if(myV.length<args[i+1]){addErr=true}
    }
    if (addErr){myErr+='* '+args[i+3]+'\n'; addErr=false}
  }
  if (myErr!=''){alert('提交错误\t\t\t\t\t\n\n'+myErr)}
  document.MM_returnValue = (myErr=='');
}
//-->
</script>
</head>
<body bgcolor="<%=web_bg%>" text="#000000" background="<%=web_bgimg%>">
<table width="90%" cellspacing="<%=ta_bor%>" cellpadding="0" align="center" bgcolor="<%=td_bor%>" border="0">
  <tr> 
    <td bgcolor="<%=titlebg%>" background="<%=title_img%>"><font color="<%=title_td%>"> 
      &nbsp;主题：<%=(Recordset1.Fields.Item("title").Value)%></font></td>
  </tr>
  <tr> 
    <td valign="top" bgcolor="<%=bg_color%>" background="<%=t_bgimg%>"> 
      <table width="100%" border="0" cellspacing="3" cellpadding="3">
        <tr>
          <td><%= DoWhiteSpace(Recordset1.Fields.Item("message").Value)%> </td>
        </tr>
      </table>
      <p>&nbsp;</p>
    </td>
  </tr>
</table>
</body>
</html>
<%
Recordset1.Close()
%>
