?? th_pub1.bas
字號:
Attribute VB_Name = "th_pub1"
Public xxzx As String '短信服務中心號碼
Public ucs2 As String '要發送的信息的ucs2編碼
Public len_ucs2 As String '要發送的信息的ucs2編碼的長度的十六進制表示
Public sjhma_ys As String '原始手機號碼
Public sjhma_bh As String '變換后的手機號碼
Public geshi1 As String '固定格式1
Public geshi2 As String '固定格式2
Public super_admin As Boolean
Public user_num As Long '用戶數
Public font_num As Integer '字庫漢字個數
Public fenlei As Integer '用戶分類 1-主要領導 2-中層 3-教職工 4-學生
Public num_ok As Long '發送成功總數
Public num_error As Integer '失敗總數
'---------------------------數據庫
Public sCon As String
Public adoCn As New ADODB.Connection
Public adoRs As New ADODB.Recordset
Public adocm As New ADODB.Command
Public sql As String
'========= 類型定義 ========================================
Type user
bh As Long
name As String
father_name As String
gsm_num As String
jb As String
num_all As Integer
num_error As Integer
End Type
Type ucs2_font
chinese As String
ucs2 As String
End Type
Public myuser(1 To 5000) As user ''全部用戶信息
Public today_user(1 To 2000) As user '當前要發布信息的用戶信息
Public myfont(1 To 7411) As ucs2_font ''字庫信息
Private Sub Main()
Dim adoDsn As String
If App.PrevInstance = True Then
End
End If
adoDsn = "data Source=" & App.Path & "\TeleSystem.mdb;"
''On Error GoTo cnError
Set adoCn = New ADODB.Connection
adoCn.Provider = "Microsoft.Jet.OLEDB.4.0"
'RecPath = App.Path & "\voice\"
adoCn.CursorLocation = adUseClient
adoCn.ConnectionTimeout = 30 '單位:秒
adoCn.Open adoDsn
Set adoRs = New ADODB.Recordset
adoRs.CacheSize = 900
adoRs.CursorLocation = adUseClient
sCon = "Provider=Microsoft.Jet.OLEDB.4.0;" & adoDsn & ";Persist Security Info=False"
form1.Show
'frmtele.Show
End Sub
Public Sub SystemClose()
'On Error Resume Next
'Call CloseTele
If Voice_tele = True Then EndCard
Unload frmtele
DoEvents
adoRs.Close
Set adoRs = Nothing
adoCn.Close
Set adoCn = Nothing
End
End Sub
Public Sub CloseSystem()
On Error Resume Next
DoEvents
adoRs.Close
Set adoRs = Nothing
adoCn.Close
Set adoCn = Nothing
End
End Sub
Public Sub init_user()
Dim i As Integer
sql = "select 編號學號,姓名,家長姓名,聯系手機號,級別,總次數,故障次數 from user_info order by 編號學號"
adoRs.Open sql, adoCn, adOpenForwardOnly, adLockReadOnly, adCmdText
user_num = adoRs.RecordCount
adoRs.MoveFirst
For i = 1 To user_num
myuser(i).bh = adoRs(0)
myuser(i).name = adoRs(1)
myuser(i).father_name = adoRs(2) & ""
myuser(i).gsm_num = adoRs(3)
myuser(i).jb = adoRs(4)
myuser(i).num_all = adoRs(5)
myuser(i).num_error = adoRs(6)
adoRs.MoveNext
Next i
adoRs.Close
End Sub
Public Sub init_font()
Dim i As Integer
sql = "select 編號,字庫,編碼 from 字庫 "
adoRs.Open sql, adoCn, adOpenForwardOnly, adLockReadOnly, adCmdText
i = 1
While Not adoRs.EOF
'Debug.Print adoRs(0)
myfont(i).chinese = adoRs(1)
myfont(i).ucs2 = adoRs(2)
adoRs.MoveNext
i = i + 1
Wend
font_num = i - 1
adoRs.Close
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -