| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 
 |   protected void Page_Load(object sender, EventArgs e)
    {
        string usrid = Request.Params["usrid"];
        string cmd = Request.Params["cmd"];
        string teuid = Request.Params["teuid"];
      //  Response.Write("isbn:" + isbn + "  id:" + id);
        if (usrid != "")
        {
            ClientSocket.OnConnect += new ClientSocket.conncetDelegate(dataSocket_OnConnect);
            ClientSocket.OnDisconnect += new ClientSocket.disconncetDelegate(dataSocket_OnDisconnect);
            ClientSocket.OnReceive += new ClientSocket.receiveDelegeate(dataSocket_OnReceive);
 
            //if (Login(usr, pwd, id))
            if(teuid != "")
            {
                if (cmd == "4")
                {//¶¨خ»¼ن¸ôض¸ءî
                    string posTime = Request.Params["value"];
                    //sendPositionCmd(teuid);
                    InvertSend(teuid, posTime);
                }
                if (cmd == "0")
                {//³¬ثظض¸ءî
                    string posSpeed = Request.Params["time"];
                    //sendPositionCmd(teuid);
                    OverSpeedSend(teuid, posSpeed);
                }
                if (cmd == "1")
                {//¶¨خ»ض¸ءî
                    sendPositionCmd(teuid);
                }
                if (cmd == "56" ||
                    cmd == "2")
                {//¶دµçض¸ءî
                    CutOffSend(teuid, true);
                }
                if (cmd == "57" ||
                    cmd =="3")
                {//؟ھµçض¸ءî
                    CutOffSend(teuid, false);
                }
                if (cmd == "CM_ADD_CARAREA")
                {//usrid=sa&cmd=CM_ADD_CARAREA&teuid=100010||100013&nLonLT=109.9541473&nLatLT=25.3254078&nLonRB=110.6188202&nLatRB=25.1291226
                    //char[] separator = { "||" };
                    string[] arrStrID = teuid.Split(new[] { "||" }, StringSplitOptions.RemoveEmptyEntries);
                    string nlnglt, nlatlt, nlngrt, nlatrb;
                    nlnglt = (Request.Params["nLonLT"]);
                    nlatlt = (Request.Params["nLatLT"]);
                    nlngrt = (Request.Params["nLonRB"]);
                    nlatrb = (Request.Params["nLatRB"]);
                    for (int i = 0; i < arrStrID.Length; i++)
                        Geofence2Send(arrStrID[i], nlnglt, nlatlt, nlngrt, nlatrb);
 
                    Response.Write("<?xml version='1.0' encoding='UTF-8'?><ROOT><ACK><TYPE>CM_ADD_CARAREA</TYPE><RESULT>1</RESULT></ACK></ROOT>");
 
 
                }
 
            }
        } | 
Partager