xmlTree標籤樹形菜單應用執行個體:B2C網站部門管理,xmltreeb2c

來源:互聯網
上載者:User

xmlTree標籤樹形菜單應用執行個體:B2C網站部門管理,xmltreeb2c

輕開B2C電子商務網站的部門(組織機構)管理是一個典型的樹形菜單應用執行個體,效果


下邊介紹一下簡單的實現流程

1、儲存部門資訊的xml檔案(輕開B2C電子商務網站base目錄下的base/dept.xml檔案)

<?xml version="1.0" encoding="GBK"?><D act="base/xml/DShow.html" color="red" weName="小時代"><D act="base/xml/DShow.html" color="orange" weName="客戶群"></D><D color="purple" weName="市場部"></D><D color="blue" weName="服務部"></D><D color="green" weName="財務科"></D><D color="black" weName="項目工程部"></D><D color="gray" weName="開發部"></D></D>
2、管理的主框架頁( 輕開B2C電子商務網站base目錄下的base/index.html檔案),60行,作用是導航到樹形菜單
<TD class="m_out" onmouseup='this.className="m_over"' onmousedown='this.className="m_down"' onmouseover='this.className="m_over"' onmouseout='this.className="m_out"' noWrap><NOBR><IMG src="@{sys:path}images/LiuCheng.gif" border=0 align=absMiddle style="MARGIN-LEFT:3px; MARGIN-RIGHT:5px"><a class=M_Menu href="javascript:void(0)" onClick="lframe.location.href='@{sys:face}base/xml/tree.html?file=base/dept.xml&id=d&url=base/xml/deptShow.html';data.location.href='@{sys:face}base/xml/deptShow.html?file=base/dept.xml&HtokID=d0';openMe('Menu2')" id=Menu2>機構管理</a></NOBR></TD
3、樹形菜單頁( 輕開B2C電子商務網站base/xml目錄下的base/xml/dept/tree.html檔案)
<html><head><title>XML樹</title><chtml file="base/tree/act.htm"/><!-- 引入樹操作檔案 --><style>div{padding-left:0px;padding-top:0px;cursor:normal;font-size:12px}</style><LINK href="@{sys:path}base/css/main.css" type="TEXT/CSS" rel="STYLESHEET"></head><body onload="onStart();"><table border=0 style="overflow:scroll" cellspacing=0 cellpadding=0><tr><td height=8></td></tr><tr><td><chtml><if x="@{pPage:file}" else=1><xmlTree>resAdmin.xml</xmlTree><xmlTree id="@{pPage:id}" act="@{pPage:act}" url="@{pPage:url}" imgPath="base/tree">@{pPage:file}</xmlTree></if></chtml></td></tr></table></body></html>
4、部門資訊展示頁( 輕開B2C電子商務網站base/xml目錄下的base/xml/dept/deptShow.html檔案)
<!--使用者列表--><table width="99%" cellpadding="0" cellspacing="0" border="1" bordercolor="#b4b4b4" align=center><tr height=24><th>使用者名稱</th><th>姓名</th><th>職務</th><th>手機</th></tr><chtml><!-- 每頁的長度 --><Bag id=pPage><we name=length>20</we></Bag><!-- 取總數等 --><esql module=base id=count>Select count(base_user.WE_ID) as all_ID,max(base_user.WE_ID) as max_id,min(base_user.WE_ID) as min_id from base_user,user_dept Where DEPT='@{pPage:HtokID}' and user_id=base_user.WE_ID</esql><!-- 總頁數和最後一頁的條數 --><bag id=pPage><we name=pages>@{int:@{count:all_id}/@{pPage:length}}</we><we name=odd>@{int:@{count:all_id}%@{pPage:length}}</we></bag><if x="@{pPage:odd}" else=1><bag id=pPage x=0><we name=odd>@{pPage:length}</we></bag><bag id=pPage><we name=pages>@{int:@{pPage:pages}+1}</we></bag></if><!-- 開始頁 --><if x="@{pPage:start}"><Bag id=pPage><we name=start>@{int:@{count:all_ID}-@{pPage:odd}}</we></Bag></if><!-- 去掉符合條件,但不用顯示的記錄數 --><esql module=base id=count1>Select count(base_user.WE_ID) as num from base_user,user_dept where base_user.we_id<'@{int:@{count:min_id}+@{pPage:start}}' and base_user.we_id>='@{count:min_id}' and DEPT='@{pPage:HtokID}' and user_id=base_user.WE_ID</esql><!-- 如果最後一頁不足,就取實際條數 --><if x="@{int:@{pPage:start}/@{pPage:length}+1}"><bag id=pPage x="@{pPage:pages}"><we name=length>@{pPage:odd}</we></bag></if></chtml><chtml><!-- 查詢資料和顯示列表 --><esql module=base id=list>select base_user.we_id,USERNAME,mobile,acl,cnname from base_user,(select temp_id,acl from (select base_user.we_id as temp_id,acl from base_user,user_dept where base_user.we_id>='@{int:@{count:min_id}+@{pPage:start}}' and base_user.we_id<='@{count:max_id}' and DEPT='@{pPage:HtokID}' and user_id=base_user.WE_ID order by temp_id limit @{int:@{pPage:start}+@{pPage:length}-@{count1:num}}) as t_id order by temp_id desc limit @{pPage:length}) as t_wewhere temp_id=base_user.we_id</esql><!-- 每頁的長度 --><Bag id=pPage><we name=length>20</we><we name=show_url>@{sys:face}base/xml/userShow.html?HtokID=@{pPage:HtokID}&WE_ID=</we></Bag><for objects=list start="@{list:getLength}" end="0"><we>@{base/acl.xml:htokid=@{list:ACL}}</we><tr height="22" class=bg0><td><a href="@{pPage:show_url}@{list:WE_ID}">@{list:USERNAME}</a></td><td><a href="@{pPage:show_url}@{list:WE_ID}">@{list:CNNAME}</a></td><td><a href="@{pPage:show_url}@{list:WE_ID}">@{base/acl.xml:weName}</a></td><td><a href="@{pPage:show_url}@{list:WE_ID}">@{list:MOBILE}</a></td></tr></for></chtml></table>
大家先開啟體驗一下,回頭抽空進行深入介紹,加油
輕鬆互連網開發平台(Easy Do IT)資源下載

平台及最新開發手冊免費下載:http://download.csdn.net/detail/tx18/8464425

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

輕開平台會不定期升級為大家提供更多強大而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.