#Region Loadcategory
Public Sub loadListCategory(Query As String)
Dim hc1 As HttpClient
hc1.Initialize("httpCategory")
Dim req2 As HttpRequest
req2.InitializePost2("http://www.xxx.com/xxx/cXVlcnlsaWJlcmE=.php?q=" & Query, "".GetBytes("UTF8"))
hc1.Execute(req2, 1)
End Sub
Sub httpCategory_ResponseError(Reason As String, StatusCode As Int, TaskId As Int)
End Sub
Sub httpCategory_ResponseSuccess(Response As HttpResponse, TaskId As Int)
Try
If Response <> Null Then
jsonParseCategory(Response.GetString("UTF8"))
Response.Release
ToastMessageShow("Updated category list", True)
bCategory = True
End If
Catch
End Try
End Sub
Private Sub jsonParseCategory(s As String)
Dim JSON As JSONParser
JSON.Initialize(s)
Module_setting.ListCategory = JSON.NextArray
End Sub
#End Region
#Region load post
Public Sub loadListPost(Query As String)
Dim hc2 As HttpClient
hc2.Initialize("httpPost")
Dim req3 As HttpRequest
req3.InitializePost2("http://www.xxx.com/xxx/cXVlcnlsaWJlcmE=.php?q=" & Query, "".GetBytes("UTF8"))
hc2.Execute(req3, 1)
End Sub
Sub httpPost_ResponseError(Reason As String, StatusCode As Int, TaskId As Int)
End Sub
Sub httpPost_ResponseSuccess(Response As HttpResponse, TaskId As Int)
Try
If Response <> Null Then
jsonParsePost(Response.GetString("UTF8"))
Response.Release
ToastMessageShow("Updated Post list", True)
bPost = True
End If
Catch
End Try
End Sub
Private Sub jsonParsePost(s As String)
Dim JSON As JSONParser
JSON.Initialize(s)
Module_setting.listPost = JSON.NextArray
End Sub
#End Region