Subversion Repositories svnkaklik

Rev

Details | Last modification | View Log

Rev Author Line No. Line
6 kaklik 1
<?
2
/*
3
 +-------------------------------------------------------------------+
4
 |                      S H O U T B O X   (v1.0)                     |
5
 |                          P a r t   I                              |
6
 |                                                                   |
7
 | Copyright Gerd Tentler               http://www.gerd-tentler.de   |
8
 | Created: Jun. 1, 2004                Last modified: Jul. 21, 2005 |
9
 +-------------------------------------------------------------------+
10
 | This program may be used and hosted free of charge by anyone for  |
11
 | personal purpose as long as this copyright notice remains intact. |
12
 |                                                                   |
13
 | Obtain permission before selling the code for this program or     |
14
 | hosting this software on a commercial website or redistributing   |
15
 | this software over the Internet or in any other medium. In all    |
16
 | cases copyright must remain intact.                               |
17
 +-------------------------------------------------------------------+
18
*/
19
  error_reporting(E_WARNING);
20
 
21
//========================================================================================================
22
// Includes
23
//========================================================================================================
24
 
25
  include('config.inc.php');
26
  if(!isset($language)) $language = 'en';
27
  include("lang_$language.inc");
28
  include('smilies.inc');
29
 
30
//========================================================================================================
31
// Main
32
//========================================================================================================
33
 
34
  $input_width = round($boxWidth / 10);
35
?>
36
<script language="JavaScript"> <!--
37
var shout_popup = 0;
38
 
39
function newWindow(url, w, h, x, y, scroll, menu, tool, resizable) {
40
  if(shout_popup && !shout_popup.closed) shout_popup.close();
41
  if(!x && !y) {
42
    x = Math.round((screen.width - w) / 2);
43
    y = Math.round((screen.height - h) / 2);
44
  }
45
  shout_popup = window.open(url, "shout_popup", "width=" + w + ",height=" + h +
46
                            ",left=" + x + ",top=" + y + ",scrollbars=" + scroll +
47
                            ",menubar=" + menu + ",toolbar=" + tool + ",resizable=" + resizable);
48
  shout_popup.focus();
49
}
50
 
51
function refreshBox() {
52
  document.fShout.Text.value = '';
53
  document.fShout.submit();
54
  setTimeout("document.fShout.Refresh.disabled=false", 1000);
55
}
56
 
57
function shoutIt() {
58
  document.fShout.submit();
59
  setTimeout("document.fShout.Text.value=''", 1000);
60
  setTimeout("document.fShout.Shout.disabled=false", 1000);
61
}
62
//--> </script>
63
<link rel="stylesheet" href="shoutbox.css" type="text/css">
64
<table border=0 cellspacing=0 cellpadding=0 align=center><tr>
65
<td colspan=2 align=center>
66
<iframe name="ShoutBox" src="shout.php" class="cssShoutBox" width=<? echo $boxWidth; ?> height=<? echo $boxHeight; ?> frameborder=0></iframe>
67
</td>
68
</tr>
69
<form name="fShout" action="shout.php" target="ShoutBox" method=post>
70
<tr>
71
<td class="cssShoutText"><? echo $msg['name']; ?>:</td>
72
<td align=right><input type=text name="Name" size=<? echo $input_width; ?> maxlength=20 class="cssShoutForm" value="<? echo $shouter; ?>"></td>
73
</tr><tr>
74
<td class="cssShoutText"><? echo $msg['eMail']; ?>:</td>
75
<td align=right><input type=text name="EMail" size=<? echo $input_width; ?> maxlength=75 class="cssShoutForm" value="<? echo $shouter_mail; ?>"></td>
76
</tr><tr>
77
<td colspan=2 align=center>
78
  <table border=0 cellspacing=0 cellpadding=0 width=100%><tr>
79
  <td class="cssShoutText"><? echo $msg['message']; ?>:</td>
80
  <td align=right><input type=button value="<? echo $msg['smilies']; ?>" class="cssShoutButton" onClick="newWindow('smilies.php', 130, 300, 0, 0, 1)"></td>
81
  </tr></table>
82
  <textarea name="Text" cols=22 rows=3 style="width:100%" wrap=virtual class="cssShoutForm"></textarea>
83
  <table border=0 cellspacing=0 cellpadding=0 width=100%><tr>
84
  <td><input type=button name="Refresh" value="<? echo $msg['refresh']; ?>" class="cssShoutButton" onClick="this.disabled=true; refreshBox()"></td>
85
  <td align=right><input type=button name="Shout" value="<? echo $msg['shout']; ?>" class="cssShoutButton" onClick="this.disabled=true; shoutIt()"></td>
86
  </tr></table>
87
</td>
88
</tr>
89
</form>
90
</table>