Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added pages, templates and basic routing

  • Loading branch information...
commit 0bea98ba8ee4904a2c2e09ef42307c9e9576bb72 1 parent f1465c7
@shimondoodkin authored
View
19 my_enginx_config/var/www/nginx-default/log.html
@@ -55,17 +55,24 @@
} catch (e) {acallback('xml http get file error '+e.message)}
}
+
+var address='/log.php'
+
+if(address.charAt(0)!='/') address='/'+address;
+
var hostname=location.href.substring(0,location.href.indexOf("/",location.href.indexOf("/")+2));
+var lastdata="";
function reload1()
{
- getfile(hostname+'/log.php',function (data)
+ getfile(hostname+address,function (data)
{
- document.getElementById('pagedata').innerHTML=data;
- document.getElementById('reldate').innerHTML= hostname+'/log.php @ '+(new Date).toLocaleString();
+ if(lastdata!=data)
+ document.getElementById('pagedata').innerHTML=data;
+ document.getElementById('reldate').value= hostname+address+' @ '+(new Date).toLocaleString();
+ lastdata=data;
}
);
-
//myframe.location.reload(false);
}
@@ -75,8 +82,8 @@
</script>
</head>
<body bgcolor="white" text="black">
-<div id="reldate"></div>
-<pre id="pagedata"></pre>
+<input type=text style="width:98%;border:0px transparent none;" id="reldate"/>
+<div id="pagedata"></div>
<!-- <iframe src="/" width="98%" height="98%" id="myframe" name="myframe" ></iframe> -->
</body>
</html>
View
10 my_enginx_config/var/www/nginx-default/reload.html
@@ -69,13 +69,15 @@
var hostname=location.href.substring(0,location.href.indexOf("/",location.href.indexOf("/")+2));
+var lastdata="";
function reload1()
{
-
getfile(hostname+address,function (data)
{
- document.getElementById('pagedata').innerHTML=data;
- document.getElementById('reldate').innerHTML= hostname+address+' @ '+(new Date).toLocaleString();
+ if(lastdata!=data)
+ document.getElementById('pagedata').innerHTML=data;
+ document.getElementById('reldate').value= hostname+address+' @ '+(new Date).toLocaleString();
+ lastdata=data;
}
);
//myframe.location.reload(false);
@@ -87,7 +89,7 @@
</script>
</head>
<body bgcolor="white" text="black">
-<div id="reldate"></div>
+<input type=text style="width:98%;border:0px transparent none;" id="reldate"/>
<div id="pagedata"></div>
<!-- <iframe src="/" width="98%" height="98%" id="myframe" name="myframe" ></iframe> -->
</body>
Please sign in to comment.
Something went wrong with that request. Please try again.