e-commerce Web site with light opening Department (organization) management is a typical example of a tree menu application, and the effect
Below is a brief introduction to the implementation process
1, Storage Department information XML file ( Light Open e-commerce website Base directory of base/dept.xml file )
<?xml version= "1.0" encoding= "GBK"? ><d act= "base/xml/dshow.html" color= "Red" wename= "little Times" ><d act= " Base/xml/dshow.html "color=" Orange "wename=" customer base ></d><d color= "Purple" wename= "marketing Department" ></d><d Color= "Blue" wename= "service" ></d><d color= "green" wename= "Finance Section" ></d><d color= "Black" wename= " Project Engineering Department "></d><d color=" gray "wename=" development Department ></D></D>
2. Manage the main frames page (
e-commerce Web site with light openingthe base/index.html file in the base directory), 60 rows, the function is to navigate to the tree menu
<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><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 ';d ata.location.href= ' @{sys:face}base/ Xml/deptshow.html?file=base/dept.xml&htokid=d0 '; OpenMe (' Menu2 ') "id=menu2> Agency management </a></NOBR> </td
3. Tree Menu Page (
e-commerce Web site with light openingbase/xml/dept/tree.html files in the Base/xml directory)
4, Department Information Display page (e-commerce Web site with light openingbase/xml/dept/deptshow.html files in the Base/xml directory)
<!--user list--><table width= "99%" cellpadding= "0" cellspacing= "0" border= "1" bordercolor= "#b4b4b4" Align=center ><TR height=24><th> username </th><th> name </th><th> title </th><th> phone </ th></tr><chtml><!--The length of each page--><bag id=ppage><we name=length>20</we></bag ><!--Total, etc.--><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><!--number of total pages and last page--><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><!--Start Page--><if x= "@{ppage:start}" ><bag id=ppage><we name=start>@{int:@{count:all_id}[ email protected]{ppage:odd}}</we></bag></if><!--Remove the number of records that match the criteria but do not display--><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}[email protected]{ppage: Start}} ' and base_user.we_id>= ' @{count:min_id} ' and dept= ' @{ppage:htokid} ' and User_id=base_user. we_id</esql><!--If the last page is insufficient, take the actual number--><if x= "@{int:@{ppage:start}/@{ppage:length}+1}" ><bag id= PPage x= "@{ppage:pages}" ><we name=length>@{ppage:odd}</we></bag></if></chtml> <chtml><!--query data and display list--><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}[email protected]{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}[email protected]{ppage:length}[email protected]{count1: NUM}}) as t_id ORDER by temp_id desc limit @{ppage:length}) as T_wewhere temp_id=base_user.we_id</esql><!--length per page --><bag id=ppage><we name=length>20</we><we Name=show_url>@{sys:face}base/xml/[email protected]{ppage:htokid}&we_id=</we></bag><for objects=list start= "@{list:getLength}" end= "0" ><we>@{base/acl.xml:[email protected]{list:acl}}</we><tr height= "a" 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>
Let's open the experience first, go back and take time to introduce in depth, refueling
easy to download resources for Internet development PlatformPlatform and Latest development Manuals free Download: http://download.csdn.net/detail/tx18/8464425
Development example: Light Open e-commerce website , free download: http://download.csdn.net/detail/tx18/8318585
Light open platform will be upgraded to provide you with more powerful and easy features, please pay attention to Download the latest version
Xmltree Tag Tree Menu Application Example: Business-to-business website Department Management