PHP 8.2.29
Preview: tw-sack.js Size: 4.85 KB
/home/medyaist/inovabilgisayar.com/wp-includes/js/tw-sack.js
/* Simple AJAX Code-Kit (SACK) v1.6.1 */
/* ©2005 Gregory Wild-Smith */
/* www.twilightuniverse.com */
/* Software licenced under a modified X11 licence,
   see documentation or authors website for more details */

function sack(file) {
	this.xmlhttp = null;

	this.resetData = function() {
		this.method = "POST";
  		this.queryStringSeparator = "?";
		this.argumentSeparator = "&";
		this.URLString = "";
		this.encodeURIString = true;
  		this.execute = false;
  		this.element = null;
		this.elementObj = null;
		this.requestFile = file;
		this.vars = new Object();
		this.responseStatus = new Array(2);
  	};

	this.resetFunctions = function() {
  		this.onLoading = function() { };
  		this.onLoaded = function() { };
  		this.onInteractive = function() { };
  		this.onCompletion = function() { };
  		this.onError = function() { };
		this.onFail = function() { };
	};

	this.reset = function() {
		this.resetFunctions();
		this.resetData();
	};

	this.createAJAX = function() {
		try {
			this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e1) {
			try {
				this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e2) {
				this.xmlhttp = null;
			}
		}

		if (! this.xmlhttp) {
			if (typeof XMLHttpRequest != "undefined") {
				this.xmlhttp = new XMLHttpRequest();
			} else {
				this.failed = true;
			}
		}
	};

	this.setVar = function(name, value){
		this.vars[name] = Array(value, false);
	};

	this.encVar = function(name, value, returnvars) {
		if (true == returnvars) {
			return Array(encodeURIComponent(name), encodeURIComponent(value));
		} else {
			this.vars[encodeURIComponent(name)] = Array(encodeURIComponent(value), true);
		}
	}

	this.processURLString = function(string, encode) {
		encoded = encodeURIComponent(this.argumentSeparator);
		regexp = new RegExp(this.argumentSeparator + "|" + encoded);
		varArray = string.split(regexp);
		for (i = 0; i < varArray.length; i++){
			urlVars = varArray[i].split("=");
			if (true == encode){
				this.encVar(urlVars[0], urlVars[1]);
			} else {
				this.setVar(urlVars[0], urlVars[1]);
			}
		}
	}

	this.createURLString = function(urlstring) {
		if (this.encodeURIString && this.URLString.length) {
			this.processURLString(this.URLString, true);
		}

		if (urlstring) {
			if (this.URLString.length) {
				this.URLString += this.argumentSeparator + urlstring;
			} else {
				this.URLString = urlstring;
			}
		}

		// prevents caching of URLString
		this.setVar("rndval", new Date().getTime());

		urlstringtemp = new Array();
		for (key in this.vars) {
			if (false == this.vars[key][1] && true == this.encodeURIString) {
				encoded = this.encVar(key, this.vars[key][0], true);
				delete this.vars[key];
				this.vars[encoded[0]] = Array(encoded[1], true);
				key = encoded[0];
			}

			urlstringtemp[urlstringtemp.length] = key + "=" + this.vars[key][0];
		}
		if (urlstring){
			this.URLString += this.argumentSeparator + urlstringtemp.join(this.argumentSeparator);
		} else {
			this.URLString += urlstringtemp.join(this.argumentSeparator);
		}
	}

	this.runResponse = function() {
		eval(this.response);
	}

	this.runAJAX = function(urlstring) {
		if (this.failed) {
			this.onFail();
		} else {
			this.createURLString(urlstring);
			if (this.element) {
				this.elementObj = document.getElementById(this.element);
			}
			if (this.xmlhttp) {
				var self = this;
				if (this.method == "GET") {
					totalurlstring = this.requestFile + this.queryStringSeparator + this.URLString;
					this.xmlhttp.open(this.method, totalurlstring, true);
				} else {
					this.xmlhttp.open(this.method, this.requestFile, true);
					try {
						this.xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
					} catch (e) { }
				}

				this.xmlhttp.onreadystatechange = function() {
					switch (self.xmlhttp.readyState) {
						case 1:
							self.onLoading();
							break;
						case 2:
							self.onLoaded();
							break;
						case 3:
							self.onInteractive();
							break;
						case 4:
							self.response = self.xmlhttp.responseText;
							self.responseXML = self.xmlhttp.responseXML;
							self.responseStatus[0] = self.xmlhttp.status;
							self.responseStatus[1] = self.xmlhttp.statusText;

							if (self.execute) {
								self.runResponse();
							}

							if (self.elementObj) {
								elemNodeName = self.elementObj.nodeName;
								elemNodeName.toLowerCase();
								if (elemNodeName == "input"
								|| elemNodeName == "select"
								|| elemNodeName == "option"
								|| elemNodeName == "textarea") {
									self.elementObj.value = self.response;
								} else {
									self.elementObj.innerHTML = self.response;
								}
							}
							if (self.responseStatus[0] == "200") {
								self.onCompletion();
							} else {
								self.onError();
							}

							self.URLString = "";
							break;
					}
				};

				this.xmlhttp.send(this.URLString);
			}
		}
	};

	this.reset();
	this.createAJAX();
}

Directory Contents

Dirs: 11 × Files: 101
Name Size Perms Modified Actions
- drwxr-xr-x 2025-12-16 01:21:49
Edit Download
crop DIR
- drwxr-xr-x 2025-12-16 01:21:49
Edit Download
dist DIR
- drwxr-xr-x 2025-12-16 01:22:21
Edit Download
- drwxr-xr-x 2025-12-16 01:21:54
Edit Download
jcrop DIR
- drwxr-xr-x 2025-12-16 01:21:55
Edit Download
jquery DIR
- drwxr-xr-x 2025-12-16 01:22:12
Edit Download
- drwxr-xr-x 2025-12-16 01:22:15
Edit Download
plupload DIR
- drwxr-xr-x 2026-01-03 09:31:17
Edit Download
swfupload DIR
- drwxr-xr-x 2025-12-16 01:21:57
Edit Download
thickbox DIR
- drwxr-xr-x 2025-12-16 01:21:57
Edit Download
tinymce DIR
- drwxr-xr-x 2025-12-16 01:22:27
Edit Download
10.30 KB lrw-r--r-- 2026-01-14 21:33:31
Edit Download
3.41 KB lrw-r--r-- 2026-01-14 21:33:31
Edit Download
3.25 KB lrw-r--r-- 2026-01-14 21:33:31
Edit Download
1023 B lrw-r--r-- 2026-01-14 21:33:31
Edit Download
21.95 KB lrw-r--r-- 2026-01-14 21:33:31
Edit Download
5.67 KB lrw-r--r-- 2026-01-14 21:33:31
Edit Download
78.51 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
23.73 KB lrw-r--r-- 2026-01-14 21:33:31
Edit Download
26.18 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
8.80 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
28.40 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
16.11 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
12.22 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
2.96 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
25.22 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
7.67 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
7.72 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
3.47 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
6.66 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
3.59 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
14.67 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
4.92 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
22.71 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
7.64 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
27.93 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
10.75 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
32.55 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
10.44 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
5.10 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
2.51 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
23.49 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
5.81 KB lrw-r--r-- 2026-01-14 21:33:32
Edit Download
1.68 KB lrw-r--r-- 2026-01-14 21:33:33
Edit Download
7.06 KB lrw-r--r-- 2026-01-14 21:33:33
Edit Download
1.46 KB lrw-r--r-- 2026-01-14 21:33:33
Edit Download
5.39 KB lrw-r--r-- 2026-01-14 21:33:33
Edit Download
31 B lrw-r--r-- 2026-01-14 21:33:33
Edit Download
35 B lrw-r--r-- 2026-01-14 21:33:33
Edit Download
23.57 KB lrw-r--r-- 2026-01-14 21:33:33
Edit Download
25.24 KB lrw-r--r-- 2026-01-14 21:33:33
Edit Download
9.54 KB lrw-r--r-- 2026-01-14 21:33:33
Edit Download
24.24 KB lrw-r--r-- 2026-01-14 21:33:33
Edit Download
11.77 KB lrw-r--r-- 2026-01-14 21:33:33
Edit Download
28.44 KB lrw-r--r-- 2026-01-14 21:33:33
Edit Download
10.63 KB lrw-r--r-- 2026-01-14 21:33:33
Edit Download
26.15 KB lrw-r--r-- 2026-01-14 21:33:33
Edit Download
12.98 KB lrw-r--r-- 2026-01-14 21:33:33
Edit Download
42.58 KB lrw-r--r-- 2026-01-14 21:33:33
Edit Download
12.97 KB lrw-r--r-- 2026-01-14 21:33:33
Edit Download
266.99 KB lrw-r--r-- 2026-01-14 21:33:33
Edit Download
108.18 KB lrw-r--r-- 2026-01-14 21:33:33
Edit Download
22.07 KB lrw-r--r-- 2026-01-14 21:33:33
Edit Download
10.87 KB lrw-r--r-- 2026-01-14 21:33:33
Edit Download
10.51 KB lrw-r--r-- 2026-01-14 21:33:33
Edit Download
2.58 KB lrw-r--r-- 2026-01-14 21:33:33
Edit Download
0 B lrw-r--r-- 2026-01-14 21:33:33
Edit Download
35 B lrw-r--r-- 2026-01-14 21:33:34
Edit Download
4.85 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
3.21 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
36.32 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
19.39 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
67.12 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
18.46 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
4.56 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
1.82 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
3.81 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
2.51 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
45.88 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
14.34 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
4.11 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
1.62 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
14.88 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
2.97 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
10.22 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
4.34 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
6.62 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
3.10 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
3.14 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
1.22 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
12.89 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
2.82 KB lrw-r--r-- 2026-01-14 21:33:34
Edit Download
22.23 KB lrw-r--r-- 2026-01-14 21:33:35
Edit Download
8.59 KB lrw-r--r-- 2026-01-14 21:33:35
Edit Download
2.79 KB lrw-r--r-- 2026-01-14 21:33:35
Edit Download
970 B lrw-r--r-- 2026-01-14 21:33:35
Edit Download
597 B lrw-r--r-- 2026-01-14 21:33:35
Edit Download
24.72 KB lrw-r--r-- 2026-01-14 21:33:35
Edit Download
7.34 KB lrw-r--r-- 2026-01-14 21:33:35
Edit Download
9.99 KB lrw-r--r-- 2026-01-14 21:33:35
Edit Download
3.54 KB lrw-r--r-- 2026-01-14 21:33:35
Edit Download
1.30 KB lrw-r--r-- 2026-01-14 21:33:35
Edit Download
444 B lrw-r--r-- 2026-01-14 21:33:35
Edit Download
4.57 KB lrw-r--r-- 2026-01-14 21:33:35
Edit Download
1.39 KB lrw-r--r-- 2026-01-14 21:33:35
Edit Download
569 B lrw-r--r-- 2026-01-14 21:33:35
Edit Download
281 B lrw-r--r-- 2026-01-14 21:33:35
Edit Download
20.74 KB lrw-r--r-- 2026-01-14 21:33:35
Edit Download
11.05 KB lrw-r--r-- 2026-01-14 21:33:35
Edit Download
821 B lrw-r--r-- 2026-01-14 21:33:35
Edit Download
351 B lrw-r--r-- 2026-01-14 21:33:35
Edit Download
802.97 KB lrw-r--r-- 2026-01-14 21:33:35
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).