Functions.Execute("登陆验证",e)
Dim wb As New weui
If e.Path = "inlet.htm" '验证用户名和密码
If e.PostValues("项目名称") > "" Then
Dim xmmc1 As String = e.PostValues("项目名称")
xmmc1 = EncryptText(xmmc1,"123","789") '将用项目名称加密.
wb.AppendCookie("xmmc",xmmc1)
wb.InsertHTML("<meta http-equiv='Refresh' c>") '那么直接跳转到登录页面
e.WriteString(wb.Build) '生成网页
Return '必须的
End If
End If
'开始生成网页
Select Case e.path
Case "logon.htm","" '登录页面
Functions.Execute("登陆页面",e)
Case "inlet.htm" '项目入口登录
Functions.Execute("项目入口",e)
Case "exit.htm" '退出登录
Functions.Execute("退出页面",e)
Case "register.htm" '细分表单登记菜单
wb.AddPageTitle("","pageheader","选择表单")
With wb.AddGrid("","g5")
Dim un As String = DecryptText(e.Cookies("username"),"123","789")
Dim xmmc As String = DecryptText(e.Cookies("xmmc"),"123","789")
Dim s1 As String
If e.GetValues.ContainsKey("D") Then '如果地址中有page参数
s1 = e.GetValues("D") '提取page参数
Dim s As String = DataTables("导航菜单配置").SQLGetComboListString("四级导航","',' + 用户 + ',' like '%," & un & ",%' and 代码 = 'sij' and 项目 = '" & xmmc & "' and 三级导航 = '" & s1 & "' and 级别 = '项目'","四级导航排序")
For Each y As String In s.split("|")
Dim dr As DataRow = DataTables("导航菜单配置").sqlfind("四级导航 = '" & y & "' And 代码 = 'sij' and 级别 = '系统'")
.Add(y,y, "./images/" & dr("手机图标") & "","List.htm?D2=" & y & "") '.Attribute = ""
Next
End If
End With
With wb.AddButtonGroup("","btg1", False) '水平排列
.Add("btn1", "返回","","default.htm")
.Add("btn2", "退出","","exit.htm").Kind = 2
End With
Case "default.htm"
Dim txt As String = "由各种物质组成的巨型球状天体,叫做星球.星球有一定的形状,有自己的运行轨道."
'增加三个页面,
With wb.AddTabBar("", "tb1", 1)
.AddPage("page1","登记","./images/登记.png")
.AddPage("page2","流程","./images/流程.png")
.AddPage("page3","查询","./images/查询.png")
.AddPage("page4","我","./images/我.png")
End With
'为第一个页面增加内容
wb.AddPageTitle("page1","pageheader","登记入口")
With wb.AddGrid("page1","g1")
Dim un As String = DecryptText(e.Cookies("username"),"123","789")
Dim xmmc As String = DecryptText(e.Cookies("xmmc"),"123","789")
Dim s As String = DataTables("导航菜单配置").SQLGetComboListString("三级导航","',' + 用户 + ',' like '%," & un & ",%' and 代码 = 'sij' and 项目 = '" & xmmc & "' and 一级导航 = '登记' And 级别 = '项目'")
Dim z,x As String
For Each y As String In s.split("|")
z = z & "," & "'" & y & "'"
Next
z = z.trim(",")
Dim drz As List(of DataRow) = DataTables("导航菜单配置").sqlselect("三级导航 in (" & z & ") And 级别 = '系统' and 代码 = 'sanj'","","三级导航排序")
For Each dr As DataRow In drz
.Add(dr("三级导航"),dr("三级导航"), "./images/" & dr("手机图标") & "","register.htm?D=" & dr("三级导航") & "") '.Attribute = "
Next
'.Add("c12","返回", "./images/返回.png", "inlet.htm") '退出登录
'.Add("c12","退出", "./images/退出2.png", "exit.htm") '退出登录
End With
With wb.AddButtonGroup("page1","btg2", False) '水平排列
.Add("btn6", "返回","","inlet.htm")
.Add("btn7", "退出","","exit.htm").Kind = 2
End With
'wb.AddForm("page1","form1","test.htm")
'With wb.AddInputGroup("form1","ipg1")
'.AddInput("xm","户名","text")
'.AddInput("mm","密码","password")
'End With
'With wb.AddButtonGroup("form1","btg1",True)
'.Add("btn1", "确定", "submit")
'End With
'为第二个页面增加内容
With wb.AddListGroup("page2", "lsg1","简单列表")
.Add("ls1", "新浪主页").Badge = "8"
.Add("ls2", "网易主页").Badge= " "
End With
With wb.AddListGroup("page2", "lsg2", "增加说明的列表")
.Add("ls3","新浪主页", "sina.com").Badge = "New"
.Add("ls4","网易主页", "163.com")
End With
With wb.AddListGroup("page2", "lsg3", "增加跳转的列表")
.Add("ls5","新浪主页", "sina.com", "http://www.sina.com.cn").Badge = " "
.Add("ls6","网易主页", "163.com", "http://www.163.com")
End With
With wb.AddListGroup("page2", "lsg4","增加图标的列表")
.Add("ls7","新浪主页", "sina.com", "http://www.sina.com.cn", "./images/sina.png")
.Add("ls8","网易主页", "163.com", "http://www.163.com", "./images/163.png").Badge="新"
End With
With wb.AddPanelGroup("page2","pg1","图文组合列表")
.Add("pn1","标题一",txt,"./images/button.png","http://www.foxtable.com")
With .Add("pn2","标题二",txt,"./images/search.png")
.AddFoot("文字来源")
.AddFoot("时间")
.AddFoot("|其他信息","http://www.foxtable.com")
End With
.GroupFoot = "查看更多"
.GroupHref = "http://www.foxtable.com/"
End With
'为第三个页面增加内容
With wb.AddArticle("page3","ar1")
.AddTitle("h1","发现")
.AddTitle("h2","章标题")
.AddTitle("h3","1.1节标题")
.AddContent(txt)
.AddImage("./images/001.jpg")
.AddTitle("h3","1.2节标题")
.AddContent(txt)
.AddImage("./images/002.jpg")
End With
With wb.AddArticle("page4","x1")
With wb.AddPreview("page4","pv1","付款金额","¥2400")
.AddItem("项目1","内容1")
.AddItem("项目2","内容2")
.AddItem("项目3", "电动打蛋机")
.Addbutton("操作", "", 1, "")
End With
wb.AppendHTML("<br/>")
With wb.AddPreview("page4","pv2","付款金额","¥3400")
.AddItem("项目1","内容1")
.AddItem("项目2","内容2")
.AddItem("项目3", "电动打蛋机")
.Addbutton("辅助操作", "http://www.foxtable.com", 0)
.Addbutton("操作", "", 1, "")
End With
End With
'
Case "List.htm"
Functions.Execute("List",e) '分页显示
Case "edit.htm"
If e.PostValues.Count > 0 Then
Functions.Execute("Save",e) '保存表单数据
End If
Functions.Execute("Edit",e) '生成订单编辑页面
End Select
e.WriteString(wb.Build) '生成网页