|
" If myStrLen(StrImg1)>15 Or myStrLen(StrImg1)=0 Then Msg=Msg&"請認真填寫您的姓名! " If myStrLen(strImgtitle3)>50 Then Msg=Msg&"請認真填寫您的畢業(yè)院校! " If myStrLen(strImgtitle1)>=50 Or myStrLen(strImgtitle1)=0 Then Msg=Msg&"請認真填寫您的聯(lián)系電話! " If myStrLen(strImgtitle2)>=50 Then Msg=Msg&"請認真填寫您的EMAIL! " If myStrLen(StrDetail1)>=5500 Or myStrLen(StrDetail1)<2 Then Msg=Msg&"請用不超過1000漢字介紹一下自己! " If Msg="" Then Set ObjRst=Server.CreateObject("ADODB.RecordSet") Set ObjCon=Server.CreateObject("ADODB.Connection") ObjCon.Open Database ObjRst.Open "Select Coalesce(max(id)+1,1) From CustomNews ",ObjCon LngId=ObjRst(0) ObjRst.Close LngPos=1 LngLen=1000 strTmp=Mid(StrDetailAll,LngPos,LngLen) StrSql="" StrSql="Insert Into CustomNews (id,dealerid,category,flg,color,ispublished,clicked,title,stitle,detail,pubdate,pubtime,pubdays," StrSql=StrSql&"img1,img2,img3,img4,img5,img6,imgtitle1,imgtitle2,imgtitle3,imgtitle4,imgtitle5,imgtitle6) values (" StrSql=StrSql&LngId&"," StrSql=StrSql&CorpNo&"," StrSql=StrSql&"'"&StrClass&"'," StrSql=StrSql&LngNew&"," StrSql=StrSql&LngRed&"," StrSql=StrSql&LngIspub&"," StrSql=StrSql&"0," StrSql=StrSql&"'"&Replace(StrTitle,"'","''")&"'," StrSql=StrSql&"'"&Replace(StrSTitle,"'","''")&"'," StrSql=StrSql&"'"&Replace(StrTmp,"'","''")&"'," StrSql=StrSql&"'"&StrDate&"'," StrSql=StrSql&"'"&time()&"'," StrSql=StrSql&"'"&dateadd("d",lngdays,strdate)&"'," StrSql=StrSql&"'"&Replace(StrImg1,"'","''")&"'," StrSql=StrSql&"'"&Replace(StrImg2,"'","''")&"'," StrSql=StrSql&"'"&Replace(StrImg3,"'","''")&"'," StrSql=StrSql&"'"&Replace(StrImg4,"'","''")&"'," StrSql=StrSql&"'"&Replace(StrImg5,"'","''")&"'," StrSql=StrSql&"'"&Replace(StrImg6,"'","''")&"'," StrSql=StrSql&"'"&Replace(StrImgTitle1,"'","''")&"'," StrSql=StrSql&"'"&Replace(StrImgTitle2,"'","''")&"'," StrSql=StrSql&"'"&Replace(StrImgTitle3,"'","''")&"'," StrSql=StrSql&"'"&Replace(StrImgTitle4,"'","''")&"'," StrSql=StrSql&"'"&Replace(StrImgTitle5,"'","''")&"'," StrSql=StrSql&"'"&Replace(StrImgTitle6,"'","''")&"')" 'Response.Write strsql 'Response.End ObjCon.Execute StrSql Do While Len(strTmp)=LngLen LngPos=LngPos+LngLen strTmp=Mid(StrDetailAll,LngPos,LngLen) strSql="Update CustomNews Set detail=detail Concat '"&strTmp&"'" strSql=strSql&" where ID="&lngid ObjCon.Execute (strSql) Loop If ObjRst.State=1 Then ObjRst.Close ObjCon.Close Set ObjRst=Nothing Set ObjCon=Nothing Response.Write "" Else Response.Write " 錯誤提示: |
|||||||||||||||||||||||
|
|