forked from sstrigler/MUCkl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
193 lines (171 loc) · 5.7 KB
/
index.html
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Welcome to MUCkl</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script src="shared.js"></script>
<script src="config.js"></script>
<script>
<!--<![CDATA[
/*
* MUCkl, a simple groupchat application
* Copyright (C) 2004-2005 Stefan Strigler <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
var roomidx = -1;
function loginCheck(form) {
if (form.nick.value.match(/^\s*(\S+|\S+.*\S+)\s*$/)) {
form.nick.value = RegExp.$1;
} else {
alert("You need to supply a valid nickname");
return false;
}
var oSel = document.getElementById('room');
location.replace("muckl.html?nick="+escape(form.nick.value)+"&room="+roomidx);
return false;
}
function roomSelected(oSel) {
roomidx = oSel.selectedIndex;
document.getElementById('room_desc').innerHTML = ROOMS[roomidx].description;
}
var Debug;
function init() {
/* initialise debugger */
if (!Debug || typeof(Debug) == 'undefined') {
if (DEBUG)
Debug = new JSJaCConsoleLogger(DEBUG_LVL);
else {
Debug = new Object();
Debug.log = function() {};
Debug.start = function() {};
}
}
Debug.start();
var welcome = "Welcome to MUCkl v"+VERSION;
document.title = welcome;
document.getElementById("welcomeh1").innerHTML = welcome;
getArgs();
if (passedArgs['room']) {
if (isNaN(passedArgs['room'])) { // search if name matches
for (var i=0; i<ROOMS.length; i++)
if (ROOMS[i].name == passedArgs['room']) {
/* preselect room */
roomidx = i;
document.getElementById('roomchooser').style.display = 'none';
document.getElementById('roomchooser2').style.display = 'none';
break;
}
} else if (ROOMS[passedArgs['room']]){
/* preselect room */
roomidx = passedArgs['room'];
document.getElementById('roomchooser').style.display = 'none';
document.getElementById('roomchooser2').style.display = 'none';
}
}
if (roomidx < 0) {
/* create room selector */
var oSel = document.getElementById('room');
for (var i in ROOMS)
oSel.options.add(new Option(ROOMS[i]['name'],ROOMS[i]['name']+'@'+ROOMS[i]['server']));
roomSelected(oSel);
}
// check for nick
if (passedArgs['nick'])
document.forms['login'].nick.value = passedArgs['nick'];
}
onload = init;
//]]>-->
</script>
<style type="text/css">
/*<![CDATA[*/
body {
font-size: 1em;
font-family: Verdana, sans-serif;
color: #000033;
margin: 8px;
background-color: #eeeeee;
}
h1 {
font-size: 1.4em;
margin-top:0px;
margin-bottom: 0px;
}
input,select {
border: 1px solid black;
padding-left: 2px;
-moz-border-radius: 4px;
background-color: #eeeeee;
}
button {
border: 1px solid black;
background-color: #eeeeee;
-moz-border-radius: 4px;
margin-left: 8px;
}
input:hover, input:focus {
background-color: white;
}
button:hover {
background-color: white;
}
td {
font-size: 0.8em;
font-family: Verdana, sans-serif;
color: #000033;
}
#barbottom {
position: absolute;
bottom: 0px;
left: 0px;
background: url(images/redbar.jpg) no-repeat;
background-color: white;
font-size: 0.8em;
font-weight: bold;
width: 100%;
color: black;
}
/*]]>*/
</style>
</head>
<body>
<a href="http://www.jabber.org"><img src="images/jabber-powered.gif" border=0 alt="Jabber Powered" align=right></a>
<table width="100%" height="100%">
<tr>
<td align="center" valign="middle">
<div style="padding: 16px; background-color: white; border: 2px solid #babcb9; -moz-border-radius: 12px; width: 320px; text-align:left;">
<h1 id="welcomeh1"></h1>
<span style="font-size:0.8em;">An easy to use, web based groupchat application.</span>
<p style="padding-top:8px;">Enter your desired nickname below, choose a room and click on 'Login' to start the chat!</p>
<form name="login" onSubmit="return loginCheck(this);">
<table>
<tr>
<td><label for="nick" style="font-weight:bold;font-style:italic;color:black;">Nickname: </label></td><td><input type="text" name="nick" id="nick" tabindex=1><button type="submit" tabindex=3>Login</button></td>
</tr>
<tr id="roomchooser">
<td><label for="room" style="font-weight:bold;font-style:italic;color:black;">Room: </label></td><td><select id="room" name="room" tabindex=2 onchange="return roomSelected(this);"></select></td>
</tr>
<tr id="roomchooser2"><td> </td><td><small id='room_desc'></small></td></tr>
</table>
</form>
</div>
</td>
</tr>
</table>
<div id="barbottom"><span style="padding-left: 8px;">MUCkl v<script>document.write(VERSION);</script></span> <span style="position:absolute; right:0px;">© 2004-2005 by Stefan Strigler, Florian Jensen</span></div>
</body>
</html>