diff options
-rw-r--r-- | ajax.js | 47 | ||||
-rw-r--r-- | inc/html.inc.php | 1 |
2 files changed, 0 insertions, 48 deletions
diff --git a/ajax.js b/ajax.js deleted file mode 100644 index 7b7bec3..0000000 --- a/ajax.js +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | function getP(host, plugin) { | ||
2 | getData(host, plugin, 'load'); | ||
3 | } | ||
4 | |||
5 | function rmP(host, plugin) { | ||
6 | getData(host, plugin, 'del'); | ||
7 | } | ||
8 | |||
9 | var xmlHttp | ||
10 | |||
11 | function getData(obj, id, action) { | ||
12 | xmlHttp=GetXmlHttpObject(); | ||
13 | if (xmlHttp==null) { | ||
14 | alert ("Your browser does not support AJAX!"); | ||
15 | return; | ||
16 | } | ||
17 | |||
18 | var url="plugin.php"; | ||
19 | url=url+"?h="+obj+"&p="+id+"&a="+action; | ||
20 | xmlHttp.onreadystatechange=function(){setData(id)} | ||
21 | xmlHttp.open("GET",url,true); | ||
22 | xmlHttp.send(null); | ||
23 | } | ||
24 | |||
25 | function setData(obj) { | ||
26 | if (xmlHttp.readyState==4) { | ||
27 | div = document.getElementById(obj); | ||
28 | |||
29 | div.innerHTML=xmlHttp.responseText; | ||
30 | } | ||
31 | } | ||
32 | |||
33 | function GetXmlHttpObject() { | ||
34 | var xmlHttp=null; | ||
35 | try { | ||
36 | // Firefox, Opera 8.0+, Safari | ||
37 | xmlHttp=new XMLHttpRequest(); | ||
38 | } catch (e) { | ||
39 | // Internet Explorer | ||
40 | try { | ||
41 | xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); | ||
42 | } catch (e) { | ||
43 | xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); | ||
44 | } | ||
45 | } | ||
46 | return xmlHttp; | ||
47 | } | ||
diff --git a/inc/html.inc.php b/inc/html.inc.php index ac37ca2..20a10ed 100644 --- a/inc/html.inc.php +++ b/inc/html.inc.php | |||
@@ -19,7 +19,6 @@ function html_start() { | |||
19 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | 19 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
20 | <title>CGP{$path}</title> | 20 | <title>CGP{$path}</title> |
21 | <link rel="stylesheet" href="{$CONFIG['weburl']}layout/style.css" type="text/css"> | 21 | <link rel="stylesheet" href="{$CONFIG['weburl']}layout/style.css" type="text/css"> |
22 | <script type="text/javascript" src="{$CONFIG['weburl']}ajax.js"></script> | ||
23 | </head> | 22 | </head> |
24 | <body> | 23 | <body> |
25 | 24 | ||