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
|
# infoboxes!!!!!!!!!!!!
our $BPOD_COLOR_UI_GRADIENT_1 = "0xF8F8D7";
our $BPOD_COLOR_UI_GRADIENT_2 = "0xF0F0E6";
our $BPOD_COLOR_UI_STROKE = "0x000000";
my $DEBUG_FORM_STRING = $DEBUG ? qq(<input type="hidden" name="debug" value="1">) : '';
use RGB;
sub alerts
{
my $newmsg = count_new_messages($USER->{username});
if ($newmsg > 0)
{
my $s = courtesy_s($newmsg);
alert_box("$BUCKY/inbox", "You have $newmsg new message$s!");
}
}
sub alert_box
{
my ($url, $msg) = @_;
print qq(<div class="message" style="background-color: #ff6666; font-family: georgia, garamond, serif;">\n);
print qq(<br><a href="$url" style="font-family: georgia, garamond, serif; color: #000;"><b><u>);
print $msg;
print qq(</b></u></a><br><br>);
print qq(</div>\n);
}
sub welcome_box
{
my ($files, $size) = count_user_files($USER->{username});
print qq(<div class="message">\n);
print qq(<b><big>$BUCKY_LOGIN_WELCOME</big></b><br>\n);
print qq(<small>you are using ),hushsize($size,2),qq( in $files files</small>);
print qq(</div>\n);
}
sub search_box
{
print <<__SEARCH__;
<div class="message">
<table width=100% border=0 cellpadding=0 cellspacing=0 style="margin: 0px;">
<script type="text/javascript">window.onload = function(){ document.getElementById("q").focus() }</script>
<form action="$BUCKY/2/search" method="get" enctype="multipart/form-data">
$DEBUG_FORM_STRING
<tr><td height=$AVATAR_MED_WIDTH>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr><td style="text-align: center; vertical-align: middle;">
<input id="q" name="q" value="" maxlength=1024 style="font-size: 10px; font-family: Trebuchet MS, Helvetica, Arial, sans-serif;
color: #140A0A; border: 1px #140A0A solid; padding: 1px; margin: 0px 0px 0px 0px; width: 100%;">
</td>
<td style="text-align: center; vertical-align: middle;">
<input type="submit" value="SEARCH" class="clicky" style="margin: 0px 0px 0px 0px;">
</td></tr></table>
</td></tr></table>
</div>
</form>
__SEARCH__
}
sub bPod_box
{
my ($color) = @_;
$color = get_color_from_time() || "plain";
$color = $COLORS{$color} if exists $COLORS{$color};
my $rgb = RGB->new($color);
$rgb->perturb([4,4,8]);
my $gradient1 = $rgb->hex();
$rgb->add(nighttime_quotient());
my $background = $rgb->hex();
$gradient1 =~ s/^\#/0x/;
$BPOD_COLOR_UI_GRADIENT_1 = $gradient1; # "0xF8F8D7";
print <<bPod;
<!-- bPod -->
<div style="padding-left: 1px;" id = "bPod"></div><center>
<script type="text/javascript" src="/js/swfobject.js"></script>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject ("/bPod.swf", "bPod", 215, 210, 8, "$background" );
so.addParam ("scale", "noscale");
bPod
print qq! so.addVariable("activeUser", "$USER->{username}" );\n! if ($USER != -1);
print qq! so.addVariable("uiGradient1", "$BPOD_COLOR_UI_GRADIENT_1" );\n!;
print qq! so.addVariable("uiGradient2", "$BPOD_COLOR_UI_GRADIENT_2" );\n!;
print qq! so.addVariable("uiStroke", "$BPOD_COLOR_UI_STROKE" );\n!;
print qq! so.addVariable("keywords", "$BPOD_URL_SERVICES_KEYWORDS" );\n!;
print qq! so.addVariable("files", "$BPOD_URL_SERVICES_FILES" );\n!;
print qq! so.addVariable("threads", "$BPOD_URL_SERVICES_THREADS" );\n!;
print qq! so.addVariable("singleFilePath", "$BPOD_URL_PREAMBLE_FILES" );\n!;
print qq! so.addVariable("singleThreadPath", "$BPOD_URL_DETAILS" );\n!;
print <<bPod;
so.write("bPod");
// ]]>
</script>
<!-- end bPod -->
bPod
}
sub radio_box
{
my $radio = get_radio_info();
if ($radio == -1)
{
#return;
print qq!<div class="message">\n!;
print qq[<small><b>RADIO: GOING DARK</b><br>\n];
print qq!<a href="http://radiofreehanoi.com/HOWTO">click here for broadcast instructions</a>\n</small>!;
print qq!</div>\n!;
}
else
{
print qq!<div class="message">\n!;
print qq!<b>$radio->{station}</b><br>\n!;
print qq!<small>$radio->{nowplaying}</small><br>\n!;
print qq!<a href="$radio->{tunein}"><small>$radio->{tunein}</small></a>\n!;
print qq!</div>\n!;
}
}
sub hoot_box
{
my $hoot = uc( get_random_line("hoots") );
print qq(<div align="left");
print qq(<div class="message2">\n);
print qq(<form action="$BUCKY/comment" method="post" enctype="multipart/form-data">);
print qq(<input type=hidden name="debug" value=1">\n) if ($DEBUG);
print qq(<table width=100% border=0 cellpadding=3 cellspacing=0 style="margin: 0px;">);
print <<END;
<tr><td colspan=2 height=$AVATAR_MED_WIDTH>
<input type="hidden" name="id" value="1">
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td style="text-align: center; vertical-align: middle;">
<input name="comment" value="" maxlength=1024 style="font-size: 10px; font-family: Trebuchet MS, Helvetica, Arial, sans-serif;
color: #140A0A; border: 1px #140A0A solid; padding: 1px; margin: 0px 0px 0px 0px; width: 100%;">
</td>
<td style="text-align: center; vertical-align: middle;">
<input type="submit" value="$hoot" class="clicky" style="margin: 0px 5px 0px 5px;">
</td></tr></table>
</form>
</td></tr>
<!-- PRINTING COMMENTS -->
END
# <hr color="$BUCKY_COLOR_HR">
my $comments = get_comments(1, 15);
sideshow_comments({ comments => $comments, thread => -1, keyword => -1, noreply => 1, hootbox => 1, order => "asc", shorturl => 1 });
print "</table>";
print <<__DUH__;
<br><big>~>{ <a href="$BUCKY/details/1">GLIMPSE THE PAST</a> }<~</big>
__DUH__
print qq!</div>!;
}
sub svn_box
{
use lib "../../bucky2/lib";
use Bucky::SVN;
my $svn = new Bucky::SVN;
print $svn->query_list;
}
1;
|