aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/bin
diff options
context:
space:
mode:
authorMW2007-03-26 16:51:50 +0000
committerMW2007-03-26 16:51:50 +0000
commit42ba0712765b93f652a8671269e39ca647b8d05e (patch)
treed76c780eb4ec1aff0b5485e19f9b3e49bf6b938c /bin
parent* Added Prebuild exe (just delete the old one) (diff)
downloadopensim-SC_OLD-42ba0712765b93f652a8671269e39ca647b8d05e.zip
opensim-SC_OLD-42ba0712765b93f652a8671269e39ca647b8d05e.tar.gz
opensim-SC_OLD-42ba0712765b93f652a8671269e39ca647b8d05e.tar.bz2
opensim-SC_OLD-42ba0712765b93f652a8671269e39ca647b8d05e.tar.xz
Added a very very very basic Web front end for admin use - ready to be used in sandbox mode for adding new accounts.
Diffstat (limited to '')
-rw-r--r--bin/login.htm5
-rw-r--r--bin/newaccountform.htm9
-rw-r--r--bin/testadmin.htm124
3 files changed, 138 insertions, 0 deletions
diff --git a/bin/login.htm b/bin/login.htm
new file mode 100644
index 0000000..2becee9
--- /dev/null
+++ b/bin/login.htm
@@ -0,0 +1,5 @@
1<form action="javascript:setpass();" name="logon" id="logon">
2<p> Admin PassWord: <input type="password" id="Adminpss" size="17" maxlength="34"> </P>
3<input type="button" name="button" value="Login"
4 onclick="javascript:setpass(this.parentNode);">
5</form> \ No newline at end of file
diff --git a/bin/newaccountform.htm b/bin/newaccountform.htm
new file mode 100644
index 0000000..d21b983
--- /dev/null
+++ b/bin/newaccountform.htm
@@ -0,0 +1,9 @@
1<form action="javascript:get(document.getElementById('myform'));" name="myform" id="myform">
2<p> First Name: <input type="text" id="FirstName" size="17" maxlength="44"> </P>
3<p> Last Name:
4<input type="text" id="LastName" size="17" maxlength="44"> </p>
5<p> PassWord:
6<input type="password" id="PassWord" size="17" maxlength="44"> </p>
7<br>
8<input type="button" name="button" value="Create" onclick="javascript:get(this.parentNode);">
9</form> \ No newline at end of file
diff --git a/bin/testadmin.htm b/bin/testadmin.htm
new file mode 100644
index 0000000..4252ffd
--- /dev/null
+++ b/bin/testadmin.htm
@@ -0,0 +1,124 @@
1<html>
2<head>
3<script type="text/javascript">
4var http_request
5var adminpadd
6function loadXMLDoc(url)
7{
8http_request=null
9// code for Mozilla, etc.
10if (window.XMLHttpRequest)
11 {
12 http_request=new XMLHttpRequest()
13 }
14// code for IE
15else if (window.ActiveXObject)
16 {
17 http_request=new ActiveXObject("Microsoft.XMLHTTP")
18 }
19if (http_request!=null)
20 {
21 http_request.onreadystatechange=state_Change
22 http_request.open("GET",url,true)
23 http_request.send(null)
24 }
25else
26 {
27 alert("Your browser does not support XMLHTTP.")
28 }
29}
30
31function state_Change()
32{
33// if xmlhttp shows "loaded"
34if (http_request.readyState==4)
35 {
36 // if "OK"
37 if (http_request.status==200)
38 {
39 document.getElementById('T1').innerHTML=http_request.responseText
40 }
41 else
42 {
43 alert("Problem retrieving data:" + http_request.statusText)
44 }
45 }
46}
47
48
49 //var http_request = false;
50 function makePOSTRequest(url, parameters) {
51 http_request = false;
52 if (window.XMLHttpRequest) { // Mozilla, Safari,...
53 http_request = new XMLHttpRequest();
54 if (http_request.overrideMimeType) {
55 // set type accordingly to anticipated content type
56 //http_request.overrideMimeType('text/xml');
57 http_request.overrideMimeType('text/html');
58 }
59 } else if (window.ActiveXObject) { // IE
60 try {
61 http_request = new ActiveXObject("Msxml2.XMLHTTP");
62 } catch (e) {
63 try {
64 http_request = new ActiveXObject("Microsoft.XMLHTTP");
65 } catch (e) {}
66 }
67 }
68 if (!http_request) {
69 alert('Cannot create XMLHTTP instance');
70 return false;
71 }
72
73 http_request.onreadystatechange =state_Change
74 http_request.open('POST', url, true);
75 http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
76 http_request.setRequestHeader("Content-length", parameters.length);
77 http_request.setRequestHeader("Connection", "close");
78 http_request.send(parameters);
79 }
80
81 function alertContents() {
82 if (http_request.readyState == 4) {
83 if (http_request.status == 200) {
84 //alert(http_request.responseText);
85 result = http_request.responseText;
86 document.getElementById('T1').innerHTML = result;
87 } else {
88 alert('There was a problem with the request.');
89 }
90 }
91 }
92
93
94 function get(obj) {
95 var poststr = "FirstName=" + encodeURI( document.getElementById("FirstName").value ) +
96 "&LastName=" + encodeURI( document.getElementById("LastName").value )
97 + "&PassWord=" + encodeURI( document.getElementById("PassWord").value )
98 + "&AdminPass=" + adminpass;
99 makePOSTRequest('Admin/NewAccount', poststr);
100 }
101
102 function setpass(obj)
103 {
104 adminpass = encodeURI( document.getElementById("Adminpss").value );
105 makePOSTRequest('Admin/Login', adminpass);
106
107 }
108
109</script>
110</head>
111
112<body onload="loadXMLDoc('Admin/Welcome')">
113<div id="T1" style="border:1px solid black;height:500;width:600">
114<br>
115</div><br />
116<button onclick="loadXMLDoc('Admin/Clients')">Clients</button>
117<button onclick="loadXMLDoc('Admin/Accounts')">Accounts</button>
118
119</body>
120
121</html>
122
123
124