一个政府网站维护内容的实例,添加信息 信息编辑页面 主题、顺序及栏目节点 table border=0 cellpadding=0 cellspacing=0 align=center width=96% tr height=30 td 主 题/td tdinput name=SUBJECT size=98/td /trchtmlesql module=base id=countSelect max(W
一个政府网站维护内容的实例,添加信息
信息编辑页面
主题、顺序及栏目节点
主 题 | |
顺 序 | |
|
<br><!-- 信息表单 -->
function doSubmit() { var saves = document.forms['save']; if(saves['SUBJECT'].value=="") {alert("主题不能空!");saves['SUBJECT'].focus();return;} saves['BODY'].value=GetHtml(); if(saves['BODY'].value=="") {alert("内容不能空!");GetCompFocus();return;} saves.submit(); }
信息保存的页面
判断编辑权限
<chtml><bag id="sys"><we name="NodeID">c0.4.0</we></bag></chtml><!-- 栏目节点 --> <chtml file="base/ac/checkAcl.htm"></chtml><!-- 引入权限检查文件 --> <chtml> <!-- 权限判断 --> <if x="@{sys:canDo}" else="1"> <we x="true"> ...... </we> <script>alert("您没有权限!");history.back();</script> </if> </chtml>
<esql module="base" id="count">select min(we_sort) as min1 from site_news where we_sort>=@{pPage:we_sort} and classify='@{pPage:only}'</esql> <if x="@{pPage:we_sort}"> <esql x="@{count:min1}" module="base" act="edit">update site_news set we_sort=we_sort+1 where we_sort>=@{pPage:we_sort} and classify='@{pPage:only}'</esql> </if>
<esql module="dc" act="edit"> Insert Into SITE_NEWS(SUBJECT,we_sort,CLASSIFY,AUTHOR,ONDATE,BODY ) Values( @{pPage:SUBJECT:string},'@{int:@{pPage:we_sort}+0}','@{pPage:only}','@{session:we_id}',@{sys:date:datetime},@{pPage:BODY:memo} ) </esql>
<script> location.href='@{sys:face}@{sys:curPath}list.html?n=@{pPage:n}'; </script>
c0.4.0 <script> location.href='@{sys:face}@{sys:curPath}list.html?n=@{pPage:n}'; </script> <esql module="base" id="count">select min(we_sort) as min1 from site_news where we_sort>=@{pPage:we_sort} and classify='@{pPage:only}'</esql> <if x="@{pPage:we_sort}"> <esql x="@{count:min1}" module="base" act="edit">update site_news set we_sort=we_sort+1 where we_sort>=@{pPage:we_sort} and classify='@{pPage:only}'</esql> </if> <esql module="dc" act="edit"> Insert Into SITE_NEWS(SUBJECT,we_sort,CLASSIFY,AUTHOR,ONDATE,BODY ) Values( @{pPage:SUBJECT:string},'@{int:@{pPage:we_sort}+0}','@{pPage:only}','@{session:we_id}',@{sys:date:datetime},@{pPage:BODY:memo} ) </esql> <script>alert("您没有权限!");history.back();</script>
轻开平台资源下载及说明
<p>平台免费下载:http://download.csdn.net/detail/tx18/8381859</p><p>最新开发手册下载:http://download.csdn.net/detail/tx18/8411089</p><p>开发实例:<strong>轻开B2C电子商务网站</strong>,免费下载:http://download.csdn.net/detail/tx18/8318585</p><p>轻开平台会不定期升级为大家提供更多强大而Easy的功能,请留意最新的<strong>开发手册</strong></p>