Subversion Repositories svnkaklik

Rev

Go to most recent revision | Details | Last modification | View Log

Rev Author Line No. Line
6 kaklik 1
<html><head>
2
<style type="text/css">
3
td.header {background-color:#FFF; font-weight:700;text-align:center;}
4
td.cells {background-color:#FFF;width:50%;text-align:center}
5
img {border:0;}
6
a
7
{
8
    FONT-SIZE: 11px;
9
    COLOR: #003366;
10
    FONT-FAMILY: Arial;
11
    TEXT-DECORATION: none
12
}
13
a:hover
14
{
15
    FONT-SIZE: 11px;
16
    COLOR: black;
17
    FONT-FAMILY: Arial;
18
    TEXT-DECORATION: none
19
}
20
</style>
21
<script language="JavaScript" type="text/javascript">
22
<!--// Displays Deports a value... :-) //-->
23
function Deporter(value)
24
{
25
opener.document.shoutbox.Message.value += ' ' + value + ' ';
26
}
27
</script>
28
</head>
29
<body>
30
<table style="background-color:#CCC;width:100%" cellpadding="1">
31
<?php
32
include 'shoutoptions.php';
33
#includes the user options
34
 
35
if ($smilies==1)
36
#checks to see if smilies is turned on, if so it begins the if statement
37
{
38
 
39
?>
40
<tr>
41
<td colspan="2" class="header">Smilies</td>
42
</tr>
43
<?php
44
 
45
$file = file("smilies.txt");
46
#open the smilies file
47
 
48
foreach($file as $smile)
49
#When a file is opened in PHP, every line is turned into an array object
50
#for each loops through the array foreach($nameofarray as $whatthisrowwillbecalled)
51
#it goes through until the array is fully shown
52
	{
53
	echo '<tr><td class="cells">'; #some formatting...
54
 
55
	list($old,$new) = explode("\|/", $smile);
56
	#In this array object when it finds \|/ it seperates the left and right of it
57
	#it turns them each into a variable, very useful PHP function
58
 
59
	$old = trim($old);
60
	#trims off the spaces before and after	
61
 
62
	echo '<a href="javascript:Deporter(\''.$old.'\')">'.$old.'</a></td><td class="cells">';
63
	# displays our Deporter code deporting the old version of the smilie
64
	#it can be clicked.
65
 
66
	$new = trim($new);
67
	#trims off the spaces before and after	
68
 
69
	echo '<a href="javascript:Deporter(\''.$old.'\')"><img src="../'.$directory.'/'.$new.'" alt="" /></a></td></tr>';
70
	#does the same as the old version, but it shows a picture to click
71
	}
72
 
73
echo '<tr><td colspan="2" style="background-color:#FFF;">&nbsp;</td></tr>';
74
#the brace following this closes the if statement about the smilies
75
#the echo above will display an empty row for display purposes if the smilies ran
76
}
77
?>
78
 
79
<tr>
80
<td colspan="2" class="header">Shout-Code</td>
81
</tr>
82
<tr><td class="cells"><a href="javascript:Deporter('[b][/b]')">[b]Bold[/b]</a></td><td class="cells"><a href="javascript:Deporter('[b][/b]')"><b>Bold</b></a></td></tr>
83
<tr><td class="cells"><a href="javascript:Deporter('[u][/u]')">[u]Underline[/u]</a></td><td class="cells"><a href="javascript:Deporter('[u][/u]')"><u>Underline</u></a></td></tr>
84
<tr><td class="cells"><a href="javascript:Deporter('[i][/i]')">[i]Italics[/i]</a></td><td class="cells"><a href="javascript:Deporter('[i][/i]')"><i>Italics</i></a></td></tr>
85
 
86
<?php
87
#the above tds are BB code I did by hand, there aren't too many, so I figured I'd do it
88
 
89
if ($colors==1)
90
#similiar to the smilies only runs if colors is on
91
	{
92
	echo '<tr><td colspan="2" style="background-color:#FFF;">&nbsp;</td></tr>';
93
	#only adds this extra empty row if the colors are on
94
?>
95
<tr>
96
<td colspan="2" class="header">Colors</td>
97
</tr>
98
<?php
99
	$file = file("colors.txt");
100
	#opens the file
101
 
102
	foreach($file as $color)
103
	#like the smilie one, read there to understand
104
		{
105
		list($old,$new) = explode("|", $color);
106
		#similiar to the smilies one, but this one breaks apart at the | 
107
 
108
		$old = trim($old);
109
		#spaces are removed
110
 
111
		$new = trim($new);
112
		#spaces are removed
113
 
114
		echo '<tr><td class="cells"><a href="javascript:Deporter(\'[color='.$old.'][/color]\')">[color='.$old.']'.$old.'[/color]</a></td><td class="cells"><a href="javascript:Deporter(\'[color='.$old.'][/color]\')"><span style="color:'.$new.';">'.$old.'</span></a></tr>';
115
		#I did them both on the same line, but it's similar to the smilies one	
116
		}
117
 
118
	}
119
?>
120
 
121
</body>
122
</html>