Dim fl As String = ProjectPath & "\Attachments\web\" & e.path
If filesys.FileExists(fl)
Dim idx As Integer = fl.LastIndexOf(".")
Dim ext As String = fl.SubString(idx)
Select Case ext
Case ".jpg",".gif",".png",".bmp",".wmf",".js",".css" ,".html",".htm"
e.WriteFile(fl)
End Select
End If
Try
If e.Path="wefox" Then
e.AsyncExecute = True
Functions.Execute("服务器验证和接收message",e)
'微信服务器验证
Else If e.Path="GetToken" Then
Functions.Execute("GetToken",e)
Else If e.Path="Datasj" Then
e.AsDataServer("jcx") '将一个本地数据源公开为Web数据源
Else If e.Path="xcdt.html" Then '巡查动态
Functions.Execute("巡查图网页",e)
Else
Functions.Execute("验证",e)
Select Case e.Path
Case "login.htm" '入口
Functions.Execute("login",e)
Case "main.htm" '主页面
Functions.Execute("Main",e)
Case "exit.htm" '退出生成
Functions.Execute("Exit",e)
Case "addnew.htm" '点位
Functions.Execute("addnew2",e)
Case "handle.htm" '点位
Functions.Execute("handle",e)
Case "getCounties.htm" '点位
Functions.Execute("getCounties",e)
Case "getplace.htm" '经纬度点位
Functions.Execute("getplace",e)
Case "ditu.htm" '经纬度点位
Functions.Execute("ditu",e)
Case "list.htm" '经纬度点位
Functions.Execute("list2",e)
Case "dtcx.htm" '经纬度点位
Functions.Execute("dtcx",e)
Case "dtlist.htm" '经纬度点位
Functions.Execute("dtlist",e)
Case "dtsj" '经纬度点位
Functions.Execute("dtsj",e)
Case "candan.htm"
Dim wb As New WeUI
With wb.AddButtonGroup("","btg",True)
.Add("btn1","单击显示上拉菜单").Attribute = """
End With
With wb.AddActionSheet("","s1")
.Add("menu1", "菜单项目1", "http://www.foxtable.com/")
.Add("menu2", "菜单项目2")
.Add("menu3", "菜单项目3").Attribute = ""
.Add("menu4","取消","",True)
End With
e.WriteString(wb.Build)
Case "table.htm"
Dim wb As New WeUI
With wb.AddTable("","Table1")
.head.AddRow("部门","姓名","年龄","电话","地址") '表头
.body.AddRow("技术部","张三","36","110","中国北京") '数据
.body.AddRow("技术部","李四","38","110","中国上海")
.body.AddRow("技术部","王五","39","110","中国深圳")
.body.AddRow("生产部","赵六","39","110","中国深圳")
.body.AddRow("生产部","刘七","39","110","中国深圳")
End With
e.WriteString(wb.Build)
Case "test.htm"
Dim wb As New weui
wb.AddForm("","form1","test.htm")
With wb.AddInputGroup("form1","ipg1","客户资料")
.AddInput("姓名","姓名","Text").value = "舒淇"
.AddInput("年龄","年龄","number").Value = "28"
.AddInput("日期","日期","date").value = #10/12/2012#
With .AddUploader("up1","照片",True)
.AllowDelete = True '允许用户删除图片
.AddImage("./images/shuqi1.jpg")
.AddImage("./images/shuqi2.jpg")
.AddImage("./images/shuqi3.jpg")
End With
End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btn1", "确定", "submit")
End With
e.WriteString(wb.Build) '生成网页
End Select
End If
'记录接收的消息,方便分析
'Dim str As new StringBuilder
'str.AppendLine("host=" & e.host)
'str.AppendLine("path=" & e.Path)
''str.AppendLine("HttpMethod=" & e.Request.HttpMethod)
''str.AppendLine("poststring=" & e.PlainText)
'str.AppendLine("ip=" & e.Request.RemoteEndPoint().Address.ToString())
'For Each key As String In e.Values.Keys
'str.AppendLine(key & "=" & e.Values(key))
'Next
'Functions.Execute("logText",str.ToString)
Catch ex As Exception
End Try