Beispiel #1
0
    /*
     #
     # Call JS
     #
     */
    public static void RequestCallJS(string JS)
    {
        int UserId = checkUserExists();

        if ((Utils._POST("gid").Length == 32) && UserId > 0)
        {
            string OnlineUserKey = GetOnlineUserKey();
            ExpiringDictionary <string, object> _DictionaryTable = ((UserInformation)SessionObjects.wincache_ucache_get(FindUserDictionaryKey())).OnlineClients;

            if (SessionObjects.wincache_ucache_exists(_DictionaryTable, OnlineUserKey))
            {
                Dictionary <string, string> OnlineUserValue = (Dictionary <string, string>)SessionObjects.wincache_ucache_get(_DictionaryTable, OnlineUserKey);
                OnlineUserValue["CallBack"] = "req JS";
                SessionObjects.wincache_ucache_set(_DictionaryTable, OnlineUserKey, OnlineUserValue, Utils.C_TIMEOUT_ONLINEUSERS);

                structCALLJS _dat = new structCALLJS();
                _dat.jsdata = "document.title.toString";
                Responser("cmd", "js", _dat);
            }
            else
            {
                RequestVisit();
            }
        }
        else
        {
            RequestVisit();
        }
    }
Beispiel #2
0
    /*
     #
     # Call JS
     #
     */
    public static void RequestCallJS(string JS)
    {
        int UserId = checkUserExists();

        if ((Utils._POST("gid").Length == 32) && UserId > 0)
        {
            string OnlineUserKey = Utils.SERVER_NAME + Utils.ONLINE_USERS + Utils.md5(Utils._POST("sid") + Utils._SERVER("REMOTE_ADDR") + Utils._POST("gid"));
            if (SessionObjects.wincache_ucache_exists(OnlineUserKey))
            {
                Dictionary <string, string> OnlineUserValue = (Dictionary <string, string>)SessionObjects.wincache_ucache_get(OnlineUserKey);
                OnlineUserValue["CallBack"] = "req JS";
                SessionObjects.wincache_ucache_set(OnlineUserKey, OnlineUserValue, TimeToLive);

                structCALLJS _dat = new structCALLJS();
                _dat.jsdata = "navigator.appName.toString";
                Responser("cmd", "js", _dat);
            }
            else
            {
                RequestVisit();
            }
        }
        else
        {
            RequestVisit();
        }
    }