換首頁輪播的主題圖片(3、儲存添加)---輕開電子商務系統(企業入門級B2C網站),電子商務系統b2c

來源:互聯網
上載者:User

換首頁輪播的主題圖片(3、儲存添加)---輕開電子商務系統(企業入門級B2C網站),電子商務系統b2c

接上一博

檔案:site/links/img0_add.html中的表單(第4行)

<form id=save action="@{sys:face}site/links/img0_add_up1.chtml" onsubmit="return false;" target=_self method=post enctype="multipart/form-data"><input type=hidden name=reUrl value="site/links/img0.html"><tr><td width=88><font class=actTitle>名    稱</font></td><td width=700><INPUT size=36 name=NAME></td></tr><tr><td><font class=actTitle>連結地址</font></td><td><INPUT size=40 name=LINK></td></tr><tr><td><font class=actTitle>圖    片</font></td><td><INPUT name=IMAGE size=32 type=file>(730x486)</td></tr></form>
提交到檔案:site/links/img0_add_up1.chtml(在輕開電子商務系統(企業入門級B2C網站)的site/links/目錄下)
整理完整的檔案名稱

<Bag id=pPage><we name=IMG_URL>site/links/upimgs/@{sys:only}@{pPage:IMAGE_extname}</we></Bag>
把名稱、連結地址、檔案URI插入資料庫

<ESql module=base act=edit>Insert Into images_base(NAME,LINK,IMG_URL)Values(@{pPage:NAME:string},@{pPage:LINK:string},@{pPage:IMG_URL:string})</ESql>
儲存檔案
<file value="@{pPage:IMAGE}" islast>@{pPage:IMG_URL}</file>
如果操作者沒有許可權,則提示並返回
<script>alert("您沒有許可權!");location.href='@{sys:face}@{pPage:reUrl}'</script>
添加成功後返回
<script>alert("添加成功!");location.href='@{sys:face}@{pPage:reUrl}';</script>
全部代碼
<html><!-- 欄目節點 --><chtml><Bag id=sys><we name=NodeID>a0.0</we></Bag></chtml><chtml file="base/ac/checkAcl.htm"/><!-- 引入許可權檢查檔案 --><chtml><if x="@{sys:canDo}" else=1><we x=true><Bag id=pPage><we name=IMG_URL>site/links/upimgs/@{sys:only}@{pPage:IMAGE_extname}</we></Bag><ESql module=base act=edit>Insert Into images_base(NAME,LINK,IMG_URL)Values(@{pPage:NAME:string},@{pPage:LINK:string},@{pPage:IMG_URL:string})</ESql><file value="@{pPage:IMAGE}" islast>@{pPage:IMG_URL}</file></we><script>alert("您沒有許可權!");location.href='@{sys:face}@{pPage:reUrl}'</script></if></chtml><script>alert("添加成功!");location.href='@{sys:face}@{pPage:reUrl}';</script></html>

(檔案:site/links/img0_add_up1.chtml)在輕開電子商務系統(企業入門級B2C網站)的site/links/目錄下

輕鬆互連網開發平台(Easy Do IT)資源下載

開發執行個體:輕開企業入門級B2C電子商務網站,免費下載:http://download.csdn.net/detail/tx18/8818883

輕開平台會不定期升級為大家提供更多強大而Easy的功能,請留意下載最新的版本


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.