如何給SW中的評論加驗證碼?

來源:互聯網
上載者:User

如何給SW中的評論加驗證碼?

在SiteWeaver版中,如何給評論加驗證碼呢?

解決方案:

一、修改模板。

1、在<head>中加入
<script language=javascript>
function refreshimg(){
document.all.checkcode.src='../Inc/CheckCode.asp?' Math.random();
}
2、在評論內容框下加入
<tr>
<td align=right>驗證碼:</td>
<td colSpan=3><input name='CheckCode' size='6' maxlength='6' style='width:50px; BORDER-RIGHT: #F7F7F7 0px solid; BORDER-TOP: #F7F7F7 0px solid; FONT-SIZE: 9pt; BORDER-LEFT: #F7F7F7 0px solid; BORDER-BOTTOM: #c0c0c0 1px solid; HEIGHT: 16px; BACKGROUND-COLOR: #F7F7F7; ime-mode:disabled;' onmouseover=''this.style.background='#ffffff';'' onmouseout=''this.style.background='#F7F7F7''' onFocus='this.select();'>
&nbsp;<a href='javascript:refreshimg()' title='看不清楚,換個圖片'><img id='checkcode' src='../Inc/CheckCode.asp' style='border: 1px solid #ffffff' /></a></td>
</tr>

二、修改Include目錄下PowerEasy.Comment.asp檔案,在Sub SaveComment()中加入
Dim CheckCode
CheckCode = LCase(Trim(Request("CheckCode")))
If Trim(Session("CheckCode")) = "" Then
FoundErr = True
ErrMsg = ErrMsg & "<br><li>你在管理登入停留的時間過長,導致驗證碼失效。請重新返回登入頁面進行登入。<br> 請返回上一頁手動點擊驗證碼重新整理。</li>"
End If
If CheckCode <> Session("CheckCode") Then
FoundErr = True
ErrMsg = ErrMsg & "<br><li>您輸入的驗證碼和系統產生的不一致,請重新輸入。請返回上一頁手動點擊驗證碼重新整理。</li>"
End If
If FoundErr = True Then
Call WriteErrMsg(ErrMsg,"ol")
response.end
End If

 

說明:
1、如給多個頻道加評論,需修改多個模板。
2、本修改只對SW6有效

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.