以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  提示信息  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=117138)

--  作者:刘林
--  发布时间:2018/4/7 15:31:00
--  提示信息
Dim e As RequestEventArgs = args(0)
Dim ftp1 As New FtpClient
Dim wb As New weui
ftp1.Host=
ftp1.Account = 
ftp1.Password = 
Dim dr As DataRow = DataTables("中考表").sqlfind("sfzh = \'" & e.Cookies("username") & "\'")
Dim dr1 As DataRow = DataTables("生地报名库").SQLfind("身份证号= \'" & e.Cookies("username") & "\'","_identify desc")
Dim dr2 As DataRow = DataTables("学生信息").SQLfind("身份证件号= \'" & e.Cookies("username") & "\'","_identify desc")
Dim dr3 As DataRow = DataTables("用户").sqlfind("身份证号= \'" & e.Cookies("username") & "\'")
If dr Is Nothing
    dr=DataTables("中考表").addnew()
Else
    DataTables("中考表").loadfilter ="sfzh = \'" & e.Cookies("username") & "\'"
    DataTables("中考表").load
End If
dr("csny")= format(ReadBirthDay(e.Cookies("username")), "yyyyMMdd")
If ReadSex(e.cookies("username"))="男"
    dr("xb")=1
End If
If ReadSex(e.cookies("username"))="女"
    dr("xb")=2
End If
DR("sfzh")= e.Cookies("username")
dr("bswy")="1"
dr("kshlb")="1"
If dr3 IsNot Nothing
    dr("xxmc")= dr3("group")
End If
dr.save()
If e.PostValues.Count = 0 Then
    With wb.AddTabBar("", "tb1", 1)
        Dim a1= .AddPage("page1","中考报名","./images/21.png")
        .AddPage("page2","注意事项","./images/23.png")
        .AddPage("page3","有关通知","./images/24.png")
    End With
    wb.AddForm("page1","form1","zkbm.htm")
    With wb.AddInputGroup("form1","ipg1","用户:" & e.Cookies("username") & ",请仔细填写每项信息")
        If dr("xjh") >""
            Dim Inxjh = .AddInput("xjh","学籍号码:","text")
            Inxjh.value=dr("xjh")
            Inxjh.readonly = dr("手机锁定")
            Inxjh.Attribute="style = \'color:blue\'"
        Else
            If dr1("学籍号")>""
                Dim Inxjh= .AddInput("xjh","学籍号码:","text")
                Inxjh.value=dr1("学籍号")
                Inxjh.readonly = dr("手机锁定")
                Inxjh.Attribute="style = \'color:blue\'"
            Else
                Dim Inxjh=.AddInput("xjh","学籍号码:","text")
                Inxjh.value=dr2("学籍号")
                Inxjh.readonly = dr("手机锁定")
                Inxjh.Attribute="style = \'color:blue\'"
            End If
        End If
        If dr("xm") >""
            Dim Inxm =.AddInput("xm","姓        名:","text")
            Inxm.value=dr("xm")
            Inxm.readonly = dr("手机锁定")
            Inxm.Attribute="style = \'color:blue\'"
        Else
            If dr1("姓名")>""
                Dim Inxm =.AddInput("xm","姓        名:","text")
                Inxm.value=dr1("姓名")
                Inxm.readonly = dr("手机锁定")
                Inxm.Attribute="style = \'color:blue\'"
            Else
                Dim Inxm= .AddInput("xm","姓        名:","text").value=dr2("学生姓名")
                Inxm.readonly = dr("手机锁定")
                Inxm.Attribute="style = \'color:blue\'"
            End If
        End If
        
        
        wb.AppendHTML("<script type=\'text/javascript\' src=\'./lib/common.js\'></script>", True)
        wb.AppendHTML("<script type=\'text/javascript\' src=\'./lib/camera.js\'></script>")
        
        wb.InsertHTML("<img src=\'/xp/511011200201038010\' width=\'50\' height=\'50\'>")
        
        With .AddUploader("up128","上传照片:",False)
            .TextPosition = 0 \'标题靠左
            .AllowDelete = True \'允许删除
            .ScaleWidth = 400 \'自动压缩图片宽度为400个像素,高度等比例压缩
        End With
       。。。
        Dim str3 As String = " |非借考生|借考生"
        If dr.Isnull("是否借考")
            Dim Insfjk= .AddSelect("是否借考","是否借考:",str3)
            Insfjk.enabled= not dr("手机锁定")
            Insfjk.Attribute="style = \'color:red\'"
        Else
            Dim Insfjk= .AddSelect("是否借考","是否借考:",str3.replace(dr("是否借考"), "[" & dr("是否借考") & "]"))
            Insfjk.enabled= not dr("手机锁定")
            Insfjk.Attribute="style = \'color:red\'"
        End If
    End With
    With wb.AddButtonGroup("form1","btg1")
        .Add("btn1", "保存", "submit")
        .Add("btn2", "锁定", "button").Attribute = ""
        .Add("btn3", "退出", "button").Attribute = ""
    End With
    With wb.AddPanelGroup("page2","pg1","注意事项")
        \'待加...
    End With
    wb.AppendHTML("<script src=\'./lib/order.js\'></script>") \'引入
    e.WriteString(wb.Build) \'生成网

If e.GetValues.ContainsKey("lock") Then   \'如果地址中有page参数
    Dim zds() As String = {"xm","lxdh","txdz","sdbmh","政治面貌","民族","考生类别","户口性质","综合素质","是否借考","bxxjnx","bjdm","yzbm"} \'不能为空的列名数组
    For Each zd As String In zds
        If dr(zd)=""
            e.WriteString(wb.Build)
            Return ""
            e.WriteString(wb.Build)
        End If
    Next
    dr("手机锁定")= True
    dr.save()
With wb.AddMsgPage("form1","msgpage","锁定成功数据不能再修改不能再修改", "") \'生成成功提示页
        .AddButton("btn7","返回","zkbm.htm")
    End With
End If


Else
    Dim nms() As String = {"xm","lxdh","txdz","sdbmh","政治面貌","民族","考生类别","户口性质","综合素质","是否借考","bxxjnx","bjdm","yzbm"} \'不能为空的列名数组
    For Each nm As String In nms
        If e.PostValues(nm) = "" Then \'生成错误提示页
            With wb.AddMsgPage("","msgpage","增加失败", nm & "列不能为空!")
                .icon = "Warn" \'改变图标
                .AddButton("btn1","返回").Attribute = ""
            End With
            e.WriteString(wb.Build)
            Return "" \'必须返回
        End If
    Next
    nms = New String() {"xjh","xm","lxdh","txdz","sdbmh","政治面貌","民族","考生类别","户口性质","综合素质","是否借考","bxxjnx","bjdm","sfzh","yzbm"}  \'重新定义了nms数组,增加了两列.
    For Each nm As String In nms
        If e.PostValues.ContainsKey(nm) Then
            dr(nm) = e.PostValues(nm)
        End If
    Next
    If trim(e.postvalues("是否借考"))="借考生"
        dr("jks") = "1"
    Else
        dr("jks")= Nothing
    End If
    DataTables("中考表").DataCols("政治面貌").RaiseDataColChanged()
    dr.save()
    For Each key As String In e.Files.Keys
        For Each fln As String In e.Files(key)
            e.SaveFile(key,fln,"c:\\web\\uploadfiles\\" & fln)
            Dim ifo As new FileInfo("c:\\web\\uploadfiles\\" & fln)
            。。。
        Next
    Next
    With wb.AddMsgPage("","msgpage","保存成功,确定无误锁定,锁定后将不能再修改", "") \'生成成功提示页
        .AddButton("btn6","返回","zkbm.htm")
    End With
    wb.AppendHTML("<script src=\'./lib/order.js\'></script>") \'引入
    e.WriteString(wb.Build)
End If

老师,请问两段红色代码的问题:
1、我想这样如果有这个人的相片,在这个位置插入相片,这样写没显示出来,只在页面底部有个图框,该怎样改?
2、我为锁定键增加功能锁定,可以锁定,但想在锁定后给个提示没有出来,该怎样改?
[此贴子已经被作者于2018/4/7 15:33:28编辑过]

--  作者:有点蓝
--  发布时间:2018/4/7 15:50:00
--  
1,扩展名呢?,完整路径是这样吗:D:\\web\\xp\\511011200201038010.jpg

wb.InsertHTML("<img src=\'/xp/511011200201038010.jpg\' width=\'50\' height=\'50\'>")

2、
……
f ReadSex(e.cookies("username"))="女"
    dr("xb")=2
End If
DR("sfzh")= e.Cookies("username")
dr("bswy")="1"
dr("kshlb")="1"
If dr3 IsNot Nothing
    dr("xxmc")= dr3("group")
End If
dr.save()
If e.GetValues.ContainsKey("lock") Then   \'如果地址中有page参数
    Dim zds() As String = {"xm","lxdh","txdz","sdbmh","政治面貌","民族","考生类别","户口性质","综合素质","是否借考","bxxjnx","bjdm","yzbm"} \'不能为空的列名数组
    For Each zd As String In zds
        If dr(zd)=""
            e.WriteString(wb.Build)
            Return ""
            e.WriteString(wb.Build)
        End If
    Next
    dr("手机锁定")= True
    dr.save()
With wb.AddMsgPage("form1","msgpage","锁定成功数据不能再修改不能再修改", "") \'生成成功提示页
        .AddButton("btn7","返回","zkbm.htm")
    End With
e.WriteString(wb.Build)

else
If e.PostValues.Count = 0 Then
    With wb.AddTabBar("", "tb1", 1)
        Dim a1= .AddPage("page1","中考报名","./images/21.png")
        .AddPage("page2","注意事项","./images/23.png")
        .AddPage("page3","有关通知","./images/24.png")
    End With
    wb.AddForm("page1","form1","zkbm.htm")
    With wb.AddInputGroup("form1","ipg1","用户:" & e.Cookies("username") & ",请仔细填写每项信息")
        If dr("xjh") >""
            Dim Inxjh = .AddInput("xjh","学籍号码:","text")
            Inxjh.value=dr.....
……原来的其它代码
End If
[此贴子已经被作者于2018/4/7 15:50:44编辑过]

--  作者:刘林
--  发布时间:2018/4/7 16:12:00
--  
老师我改了还是不行,我把整个代码发给你帮看一下
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:11.txt


--  作者:有点蓝
--  发布时间:2018/4/7 16:37:00
--  
js的locked()函数写了什么代码?
--  作者:刘林
--  发布时间:2018/4/7 16:42:00
--  
function locked(){ location="zkbm.htm?&lock=ture";}

是能锁的,现在主要问题是提示信息没出来,

Dim a1= .AddPage("page1","中考报名","./images/21.png")
        .AddPage("page2","注意事项","./images/23.png")
        .AddPage("page3","有关通知","./images/24.png")

再补个问题:,中考报名显在图片下面,21.png显示很小,如何让图片显得大点字就显在图片的中间这样呢
[此贴子已经被作者于2018/4/7 16:46:39编辑过]

--  作者:有点蓝
--  发布时间:2018/4/7 17:05:00
--  
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:11.txt



--  作者:有点蓝
--  发布时间:2018/4/7 17:12:00
--  
图片是固定大小的,无法调整
--  作者:刘林
--  发布时间:2018/4/7 18:45:00
--  
还是不行,现在点锁定还成白民屏了,之前是能锁定但不出提示信息
--  作者:有点甜
--  发布时间:2018/4/8 9:53:00
--  
实例发上来测试。
--  作者:刘林
--  发布时间:2018/4/8 14:02:00
--  
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:12.txt




楼上问题解决了
一直还有这个问题没解决,今天想集中解决这个问题

1、上面代码我想用up2来显示ftp上的相片,这个写法显示不出来,远程上的图片,"\\xp\\" & e.cookies("username") & ".jpg" 这个文件是有的
2、压缩图片上传是可以实现了,但一直不是在手机网页下可调摄像头,但打成包就不得行,请老师救我一下,确定对我很难,但又急待解决谢谢