public void GuestLoginProcess()
    {
        LoadingScript.ShowLoading();
        WWWForm form = new WWWForm();

        form.AddField("type", "userRegisterGuest");
        form.AddField("imei", UserCommonData.imei);
        GuestLoginAPI.wwwCallAPI(form);
    }
 public void FacebookLoginProcess()
 {
             #if UNITY_WINRT
     UnityPluginForWindowsPhone.BridgeWP.loginFacebook();
             #else
     Debug.Log("FacebookLoginProcess");
     FacebookLogin.pGlobal.Login(PostLogin);
             #endif
     LoadingScript.ShowLoading();
 }
    public void UserLoginProcess()
    {
        LoadingScript.ShowLoading();
        WWWForm form = new WWWForm();

        form.AddField("type", "userLoginOryor");
        form.AddField("username", username.text);
        form.AddField("password", password.text);
        form.AddField("imei", UserCommonData.imei);
        NormalLoginAPI.wwwCallAPI(form);
    }
    public void Register()
    {
        //goto update after register
        LoadingScript.ShowLoading();
        WWWForm form = new WWWForm();

        form.AddField("type", "userRegisterOryor");
        form.AddField("username", RegisterData.username);
        form.AddField("password", RegisterData.password);
        form.AddField("name", RegisterData.name);
        form.AddField("surname", RegisterData.surname);
        form.AddField("tel", RegisterData.tel);
        form.AddField("address", RegisterData.address);
        form.AddField("imei", UserCommonData.imei);
        NormalRegisAPI.wwwCallAPI(form);
    }
    public void UpdateProcess()
    {
        LoadingScript.ShowLoading();
        WWWForm form = new WWWForm();

        //		password", "imei", "name", "surname" , "tel", "address
        form.AddField("type", "userUpdate");
        form.AddField("user_id", UserCommonData.pGlobal.user.user_id);
        form.AddField("username", UpdateData.username);
        form.AddField("password", UpdateData.password);
        form.AddField("name", UpdateData.name);
        form.AddField("surname", UpdateData.surname);
        form.AddField("tel", UpdateData.tel);
        form.AddField("address", UpdateData.address);
        form.AddField("imei", UserCommonData.imei);
        UpdateAPI.wwwCallAPI(form);
    }
Example #6
0
    IEnumerator SendData()
    {
        LoadingScript.ShowLoading();
        WWWForm form    = new WWWForm();
        string  wwwText = UserCommonData.GetURL();

        //http://www.oryor.com/oryor_smart_app_year2/ws_client_year2v1.php?task=inform&
        //email=xxx&number=xxx&name=xxx&tel=xxx&detail=xxx&lat=xxx&lon=xxx&file1=&file2=&file3=
        form.AddField("task", "inform");
        form.AddField("user_id", UserCommonData.pGlobal.user.user_id);
        form.AddField("type", type.currentIdx);
        form.AddField("name", name.text);
        form.AddField("email", email.text);
        form.AddField("tel", Tel.text);
        form.AddField("detail", Detail.text);
        if (flagGPS == 1)
        {
            form.AddField("lat", lat);
            form.AddField("lon", lon);
        }
        else
        {
            form.AddField("lat", "");
            form.AddField("lon", "");
        }
        if (flagPhone == 1)
        {
            form.AddField("phone", phonenumber);
        }
        else
        {
            form.AddField("phone", "");
        }

        int i = 1;

        foreach (ReportPicSrc src in ReportCamera.PictureList)
        {
            string attr = "file" + i;
            Debug.Log(attr);
            Debug.Log(src.rawData);
            form.AddBinaryData(attr, src.rawData, attr + ".jpeg", "image/jpeg");
            i++;
        }

        WWW upload = new WWW(wwwText, form);

        yield return(upload);

        LoadingScript.HideLoading();
        if (!string.IsNullOrEmpty(upload.error))
        {
            PopupObject.ShowAlertPopup("พบปัญหาในการเชื่อมต่อ",
                                       "ไม่สามารถส่งข้อมูลของท่านไปยังเจ้าหน้าที่ได้ กรุณาตรวจสอบอินเทอร์เน็ตของท่าน และลองใหม่อีกครั้ง",
                                       "ตกลง", null);
            Debug.LogWarning("LOCAL FILE ERROR: " + upload.error);
        }
        else
        {
            Debug.Log(upload.text);
            Debug.Log("Uploaded Finish");
            PopupObject.ShowAlertPopup("ระบบได้รับเรื่องร้องเรียนของท่านเรียบร้อยแล้ว", "ขอขอบคุณสำหรับข้อมูลที่มีประโยชน์ของท่าน ทางสำนักงานคณะกรรมการอาหารและยา จะดำเนินการตรวจสอบและแก้ไขโดยเร็วที่สุด", "ตกลง");
        }
    }
Example #7
0
 public void LoadGift()
 {
     gLoader.LoadGift();
     LoadingScript.ShowLoading();
 }
Example #8
0
 void PressAccept()
 {
     LoadingScript.ShowLoading();
     StartCoroutine("AcceptGift");
 }
Example #9
0
 public void LoadAward()
 {
     LoadingScript.ShowLoading();
     StartCoroutine("Loading");
 }
Example #10
0
 public void LoadRank()
 {
     LoadingScript.ShowLoading();
     //get friend list then load rank from server
     GetFriendList();
 }