aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--ajax.js47
-rw-r--r--inc/html.inc.php1
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 @@
1function getP(host, plugin) {
2 getData(host, plugin, 'load');
3}
4
5function rmP(host, plugin) {
6 getData(host, plugin, 'del');
7}
8
9var xmlHttp
10
11function 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
25function setData(obj) {
26 if (xmlHttp.readyState==4) {
27 div = document.getElementById(obj);
28
29 div.innerHTML=xmlHttp.responseText;
30 }
31}
32
33function 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