-
Notifications
You must be signed in to change notification settings - Fork 0
/
oldindex.php
137 lines (112 loc) · 3.58 KB
/
oldindex.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<!DOCTYPE html>
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=iso 8859-1">
<TITLE>server webcam</TITLE>
<STYLE type="text/css">
BODY {
FONT-SIZE: small; COLOR: #000000; FONT-FAMILY: "trebuchet ms", Verdana, Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #FFFFFF
}
H1 {
FONT-SIZE: large;
}
A:hover {
COLOR: #ff9900; TEXT-DECORATION: underline;
}
.footer {
TEXT-ALIGN: center; FONT-SIZE: smaller;
}
.footer IMG {
BORDER: 1px solid #888;
}
-->
</STYLE>
</HEAD>
<BODY bgColor="#ffffff" text="#000000">
<H1 align="center"> HELLO WORLD </H1>
<P>
<B>UGLYDUCK Web Server is functioning </B> </P>
<P>
Please include in your web pages (at least the first) the <b><i>'Powered by giggles'</i></b> banner to promote the use of the software.
</P>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script>
$(function() {
$.get('read.txt', function(data) {
$('#text-file-container').html(data);
});
});
</script>
</head>
<div id="text-file-container"></div>
<?php
$myfile = fopen("read.txt", "r") or die("Unable to open file!");
$test = fread($myfile,filesize("read.txt"));
fclose($myfile);
?>
<table frame="box">
<tr>
<th>Messege Board</th>
</tr>
<tr>
<td><?php echo "$test";?></td>
</tr>
</table>
<br><br>
<button type="button"
onclick="document.getElementById('demo').innerHTML = Date()">
Click me to display Date and Time.</button>
<p id="demo"></p>
<script>
function readfile(f) {
var reader = new FileReader(); // Create a FileReader object
reader.readAsText(f); // Read the file
reader.onload = function() { // Define an event handler
var text = reader.result; // This is the file contents
var out = document.getElementById("output"); // Find output element
out.innerHTML = ""; // Clear it
out.appendChild(document.createTextNode(text)); // Display file contents
}
reader.onerror = function(e) { // If anything goes wrong
console.log("Error", e); // Just log it
};
}
</script>
Select the file to display:
<input type="file" onchange="readfile(this.files[0])"></input>
<pre id="output"></pre>
<script type="text/javascript">
function LoadFile() {
var oFrame = document.getElementById("frmFile");
var strRawContents = oFrame.contentWindow.document.body.childNodes[0].innerHTML;
while (strRawContents.indexOf("\r") >= 0)
strRawContents = strRawContents.replace("\r", "");
var arrLines = strRawContents.split("\n");
alert("File " + oFrame.src + " has " + arrLines.length + " lines");
for (var i = 0; i < arrLines.length; i++) {
var curLine = arrLines[i];
alert("Line #" + (i + 1) + " is: '" + curLine + "'");
}
}
</script>
<iframe src="read.txt" width="500" height="25"></iframe>
<P>Links to stuff:</p>
<li><a href="http://ccowmu.org/~alex/door.php">Doorbot</a></li>
<li><a href="http://t4ls.duckdns.org:8080/">To Do List</a></li>
<li><a href="https://yakko.cs.wmich.edu/~gigglesbw4/stuff">Stuff</a></li>
<br><br><br>
<img src="http://t4ls.duckdns.org:8090/cam_1.cgi" onError="this.onerror=null;this.src='image.png';" />
<img src="webcam.jpg">
<hr>
</P>
<hr>
<CENTER>
<img src="giggles.jpg">
</P>
<P CLASS="footer">
<P CLASS="footer">
<A HREF="http://www.aprelium.com" ><ALT="Powered by Abyss Web Server" TITLE="Powered by Abyss Web Server" BORDER="0" WIDTH="88" HEIGHT="31"></A>
</P>
</CENTER>
</BODY></HTML>