Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Option Compare Database
- Function sendSMS(aStudent As Student) As String
- Dim USERUNICODE As String
- Dim PASSUNICODE As String
- Dim MSGUNICODE As String
- Dim USER As String
- Dim PASS As String
- Dim MSG As String
- USER = "durazsch"
- USERUNICODE = UNICODEUTFTARIQ(USER)
- ' MsgBox USERUNICODE
- 'USER = "0064007500720061007a007300630068"
- PASS = "Mohd92"
- PASSUNICODE = UNICODEUTFTARIQ(PASS)
- ' MsgBox PASSUNICODE
- 'PASS = "006d006f0068006400390032"
- MSG = "áÞÏÊÃÎÑ" & _
- aStudent.StudentName & " ¡" & _
- Format(aStudent.ArriveTime, "hh:mm") & _
- "¡ááãÑÉ" & aStudent.num & "¡äÑÌæÍËå Úáì ÇáÊÈßíÑ"
- MSGUNICODE = UNICODEUTFTARIQ(MSG)
- ' MsgBox MSGUNICODE
- Dim strUrl As String
- strUrl = "http://www.o2sms.net/RemoteAPI/SendSMS.aspx?" & _
- "username=" & USERUNICODE & _
- "&password=" & PASSUNICODE & _
- "&messagedata=" & MSGUNICODE & _
- "&receiver=973" & aStudent.tel
- Dim hReq As Object
- 'create our URL string and pass the user entered information to it
- ' MsgBox strUrl
- Set hReq = CreateObject("MSXML2.XMLHTTP")
- With hReq
- .Open "GET", strUrl, False
- .send
- End With
- sendSMS = hReq.ResponseText
- 'wrap the response in a JSON root tag "data" to count returned objects
- Dim response As String
- response = "{""data"":" & hReq.ResponseText & "}"
- Set hReq = Nothing
- 'sssssssssssssssssssssssssssssss
- End Function
- Function UNICODEUTFTARIQ(strOriginalString2 As String) As String
- On Error GoTo UNICODEUTFTARIQ_Err
- Dim intLoop2 As Integer
- Dim strChar2 As String
- For intLoop2 = 1 To Len(strOriginalString2)
- strChar2 = Mid$(strOriginalString2, intLoop2, 1)
- Select Case (Asc(strChar2))
- Case 10
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "000a"
- Case 13
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "000d"
- Case 32
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0020"
- Case 33
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0021"
- Case 34
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0022"
- Case 35
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0023"
- Case 36
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0024"
- Case 37
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0025"
- Case 38
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0026"
- Case 39
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0027"
- Case 40
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0028"
- Case 41
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0029"
- Case 42
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "002a"
- Case 43
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "002b"
- Case 44
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "002c"
- Case 45
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "002d"
- Case 46
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "002e"
- Case 47
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "002f"
- Case 48
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0030"
- Case 49
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0031"
- Case 50
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0032"
- Case 51
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0033"
- Case 52
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0034"
- Case 53
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0035"
- Case 54
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0036"
- Case 55
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0037"
- Case 56
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0038"
- Case 57
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0039"
- Case 58
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "003a"
- Case 59
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "003b"
- Case 60
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "003c"
- Case 61
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "003d"
- Case 62
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "003e"
- Case 63
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "003f"
- Case 64
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0040"
- Case 65
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0041"
- Case 66
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0042"
- Case 67
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0043"
- Case 68
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0044"
- Case 69
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0045"
- Case 70
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0046"
- Case 71
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0047"
- Case 72
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0048"
- Case 73
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0049"
- Case 74
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "004a"
- Case 75
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "004b"
- Case 76
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "004c"
- Case 77
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "004d"
- Case 78
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "004e"
- Case 79
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "004f"
- Case 80
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0050"
- Case 81
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0051"
- Case 82
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0052"
- Case 83
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0053"
- Case 84
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0054"
- Case 85
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0055"
- Case 86
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0056"
- Case 87
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0057"
- Case 88
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0058"
- Case 89
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0059"
- Case 90
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "005a"
- Case 91
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "005b"
- Case 92
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "005c"
- Case 93
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "005d"
- Case 94
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "005e"
- Case 95
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "005f"
- Case 96
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0060"
- Case 97
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0061"
- Case 98
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0062"
- Case 99
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0063"
- Case 100
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0064"
- Case 101
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0065"
- Case 102
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0066"
- Case 103
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0067"
- Case 104
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0068"
- Case 105
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0069"
- Case 106
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "006a"
- Case 107
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "006b"
- Case 108
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "006c"
- Case 109
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "006d"
- Case 110
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "006e"
- Case 111
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "006f"
- Case 112
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0070"
- Case 113
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0071"
- Case 114
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0072"
- Case 115
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0073"
- Case 116
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0074"
- Case 117
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0075"
- Case 118
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0076"
- Case 119
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0077"
- Case 120
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0078"
- Case 121
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0079"
- Case 122
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "007a"
- Case 123
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "007b"
- Case 124
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "007c"
- Case 125
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "007d"
- Case 126
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "007e"
- ''' ' '''''''''''''''''''''''''''''''''''''''''''''''''
- Case 145
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "2018"
- Case 146
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "2019"
- Case 161
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "060c"
- Case 167
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "00a7"
- Case 169
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "00a9"
- Case 174
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "00ae"
- Case 186
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "061b"
- Case 191
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "061f"
- Case 193
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0621"
- Case 194
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0622"
- Case 195
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0623"
- Case 196
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0624"
- Case 197
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0625"
- Case 198
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0626"
- Case 199
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0627"
- Case 200
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0628"
- Case 201
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0629"
- Case 202
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "062a"
- Case 203
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "062b"
- Case 204
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "062c"
- Case 205
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "062d"
- Case 206
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "062e"
- Case 207
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "062f"
- Case 208
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0630"
- Case 209
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0631"
- Case 210
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0632"
- Case 211
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0633"
- Case 212
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0634"
- Case 213
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0635"
- Case 214
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0636"
- Case 215
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "00d7"
- Case 216
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0637"
- Case 217
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0638"
- Case 218
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0639"
- Case 219
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "063a"
- Case 220
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0640"
- Case 221
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0641"
- Case 222
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0642"
- Case 223
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0643"
- Case 225
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0644"
- Case 227
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0645"
- Case 228
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0646"
- Case 229
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0647"
- Case 230
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0648"
- Case 236
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0649"
- Case 237
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "064a"
- Case 240
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "064b"
- Case 241
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "064c"
- Case 242
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "064d"
- Case 243
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "064e"
- Case 245
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "064f"
- Case 246
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0650"
- Case 247
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "00f7"
- Case 248
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0651"
- Case 250
- UNICODEUTFTARIQ = UNICODEUTFTARIQ & "0652"
- Case Else
- MsgBox "íæÌÏ ÍÑÝ Ýí ÇáäÕ Çæ ßËÑ áã íÊÚÑÝ Úáíå ÇáßæÏ ... åÐÇ ÇáßæÏ ãÎÕÕ ááÛÉ ÇáÚÑÈíÉ æÇáÇäÌáíÒíÉ ÝÞØ ÓíÊã ÇáÛÇÁ ÇáÇÌÑÇÁ ... æÔßÑÇ " & vbCrLf & " íãßäß ÇáÇÑÓÇá ãä ÇáãæÞÚ ãÈÇÔÑÉ ÇáÍÑÝ ÇáÛíÑ ãÞÈæá åæ " & vbCrLf & Chr(Asc(strChar2)), vbExclamation, "ÎÇÑÌ ÇáäØÇÞ"
- UNICODEUTFTARIQ = ""
- UNICODEUTFTARIQ = Trim(UNICODEUTFTARIQ)
- Exit Function
- End Select
- Next intLoop2
- UNICODEUTFTARIQ_Exit:
- Exit Function
- UNICODEUTFTARIQ_Err:
- MsgBox Error$
- Resume UNICODEUTFTARIQ_Exit
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement