File: body.html.inc

package info (click to toggle)
achims-guestbook 2.52-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 956 kB
  • ctags: 714
  • sloc: php: 4,821; sh: 56; makefile: 38
file content (118 lines) | stat: -rw-r--r-- 7,017 bytes parent folder | download | duplicates (2)
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
<TR CLASS="<?php
	global $phrase;
	
	$entrypos = explode(":", $this->entrypos);
	if (in_array($entrynum, $entrypos)) {
		echo "searchresult\">";
		
		$words = explode(" " , trim(strtolower($phrase)));
		$dummy[0] = $date[$i];
		$dummy[1] = $name[$i];
		$dummy[2] = $text[$i];
		foreach ($words as $word) {
			for ($n = 0; $n < 3; $n++) {
				$lastposition = 0;
				
				while (is_integer($position = strpos(strtolower($dummy[$n]), $word, $lastposition)) && $position >= 0) {
					$firstpart = substr($dummy[$n], 0, $position);
					$secondpart = substr($dummy[$n], $position + 1);
					if (!(substr_count($firstpart, "<") > substr_count($firstpart, ">") && substr_count($secondpart, ">") > substr_count($secondpartpart, "<"))) {
						if (!(((strrpos($firstpart, "&") === false) ? 0 : strrpos($firstpart, "&")) > ((strrpos($firstpart, ";") === false) ? 0 : strrpos($firstpart, ";")) &&
								((stristr($secondpart, "&") === false) ? 0 : stristr($secondpart, "&")) < ((stristr($secondpart, ";") === false) ? 0 : stristr($secondpart, ";")))) {
							$dummy[$n] = substr_replace($dummy[$n], "<FONT CLASS=\"attention\"><B>", $position, 0);
							$dummy[$n] = substr_replace($dummy[$n], "</B></FONT>", $position + strlen($word) + 27, 0);
							$lastposition = $position + strlen($word) + 30;
						} else {
							$lastposition = $position + strlen($word);
						}	
					} else {
						$lastposition = $position + strlen($word);
					}						
				}
			}
		}
		$date[$i] = $dummy[0];
		$name[$i] = $dummy[1];
		$text[$i] = $dummy[2];
	} else {
		echo $fligflag."\">";
	}
?>
	<TD CLASS="normalcol" VALIGN="top" WIDTH="30%" NOWRAP="nowrap">
	<?php
		if ($entrypos[0] == $entrynum)
			echo "<A NAME=\"searchresult\">";
	?>
	<FONT SIZE="1" CLASS="number"><?php echo $entrynum; ?></FONT><BR>
	<FONT CLASS="normalcol" SIZE="2"><?php echo $date[$i]; ?><BR>
	<DIV CLASS="fat"><?php echo $name[$i]; ?></DIV></FONT>
	<FONT CLASS="normalcol" style="font-size: 8pt;">
	<?php
		switch ($this->language) {
			case "ger": 
					if (!file_exists("location_ger.php")) die ("Can't open location_ger.php!");
					include("location_ger.php");
					break;
			default: 
					if (!file_exists("location_eng.php")) die ("Can't open location_eng.php!");
					include("location_eng.php");
		}

		if ($loc[$i] != 0) echo $location[$loc[$i]];		
	?>
	</FONT><FONT SIZE="1px"><DIV><BR></DIV></FONT>
	<?php
		if ($mail[$i] != "")
			echo "<FONT SIZE=\"1\" CLASS=\"normalcol\"><A CLASS=\"tablelink\" STYLE=\"text-decoration: none\" HREF=\"mailto:$mail[$i]\" ONFOCUS=\"filter:blur()\"><IMG BORDER=\"0\" SRC=\"gif/email.gif\" HEIGHT=\"16\" WIDTH=\"33\" ALT=\"E-Mail\"></IMG>&nbsp;</A></FONT>";
		if ($url[$i] != "")
			echo "<FONT SIZE=\"1\" CLASS=\"normalcol\"><A CLASS=\"tablelink\" STYLE=\"text-decoration: none\" HREF=\"$url[$i]\" TARGET=\"_blank\" ONFOCUS=\"filter:blur()\"><IMG BORDER=\"0\" SRC=\"gif/home.gif\" HEIGHT=\"16\" WIDTH=\"32\" ALT=\"Homepage\"></IMG></A></FONT>";
		if ($this->messengers != 0) {
			if (($icq[$i] != "" || $aim[$i] != "" || $yim[$i] != "" || $msn[$i] != "") && ($mail[$i] != "" || $url[$i] != ""))
				echo "<BR>";
			if ($this->shortmessengerformat == 1) {
				if ($icq[$i] != "")
					echo "<A CLASS=\"tablelink\" STYLE=\"text-decoration: none\" HREF=\"http://wwp.icq.com/scripts/contact.dll?msgto=$icq[$i]\" TARGET=\"_blank\" ONFOCUS=\"filter:blur()\"><IMG BORDER=\"0\" SRC=\"gif/icq.gif\" ALIGN=\"bottom\" HEIGHT=\"16\" WIDTH=\"16\" ALT=\"$icq[$i]\"></IMG></A>&nbsp;";	
				if ($aim[$i] != "")
					echo "<A CLASS=\"tablelink\" STYLE=\"text-decoration: none\" HREF=\"aim:goim?screenname=$aim[$i]\" TARGET=\"_blank\" ONFOCUS=\"filter:blur()\"><IMG BORDER=\"0\" SRC=\"gif/aim.gif\" ALIGN=\"bottom\" HEIGHT=\"16\" WIDTH=\"16\" ALT=\"$aim[$i]\"></IMG></A>&nbsp;";
				if ($yim[$i] != "")
					echo "<A CLASS=\"tablelink\" STYLE=\"text-decoration: none\" HREF=\"http://edit.yahoo.com/config/send_webmesg?.target=$yim[$i]&.src=pg\" TARGET=\"_blank\" ONFOCUS=\"filter:blur()\"><IMG BORDER=\"0\" SRC=\"gif/yim.gif\" ALIGN=\"bottom\" HEIGHT=\"16\" WIDTH=\"16\" ALT=\"$yim[$i]\"></IMG></A>&nbsp;";	
				if ($msn[$i] != "")
					echo "<A CLASS=\"tablelink\" STYLE=\"text-decoration: none\" HREF=\"mailto=$msn[$i]\" TARGET=\"_blank\" ONFOCUS=\"filter:blur()\"><IMG BORDER=\"0\" SRC=\"gif/msn.gif\" ALIGN=\"bottom\" HEIGHT=\"16\" WIDTH=\"16\" ALT=\"$msn[$i]\"></IMG></A><BR>";
			} else {
				if ($icq[$i] != "")
					echo "<FONT SIZE=\"1\" CLASS=\"normalcol\"><A CLASS=\"tablelink\" STYLE=\"text-decoration: none\" HREF=\"http://wwp.icq.com/scripts/contact.dll?msgto=$icq[$i]\" TARGET=\"_blank\" ONFOCUS=\"filter:blur()\"><IMG BORDER=\"0\" SRC=\"gif/icq.gif\" ALIGN=\"bottom\" HEIGHT=\"16\" WIDTH=\"16\" ALT=\"ICQ\">&nbsp;$icq[$i]</IMG></A></FONT><BR>";	
				if ($aim[$i] != "")
					echo "<FONT SIZE=\"1\" CLASS=\"normalcol\"><A CLASS=\"tablelink\" STYLE=\"text-decoration: none\" HREF=\"aim:goim?screenname=$aim[$i]\" TARGET=\"_blank\" ONFOCUS=\"filter:blur()\"><IMG BORDER=\"0\" SRC=\"gif/aim.gif\" ALIGN=\"bottom\" HEIGHT=\"16\" WIDTH=\"16\" ALT=\"AIM\">&nbsp;$aim[$i]</IMG></A></FONT><BR>";
				if ($yim[$i] != "")
					echo "<FONT SIZE=\"1\" CLASS=\"normalcol\"><A CLASS=\"tablelink\" STYLE=\"text-decoration: none\" HREF=\"http://edit.yahoo.com/config/send_webmesg?.target=$yim[$i]&.src=pg\" TARGET=\"_blank\" ONFOCUS=\"filter:blur()\"><IMG BORDER=\"0\" SRC=\"gif/yim.gif\" ALIGN=\"bottom\" HEIGHT=\"16\" WIDTH=\"16\" ALT=\"YIM\">&nbsp;$yim[$i]</IMG></A></FONT><BR>";	
				if ($msn[$i] != "")
					echo "<FONT SIZE=\"1\" CLASS=\"normalcol\"><A CLASS=\"tablelink\" STYLE=\"text-decoration: none\" HREF=\"mailto=$msn[$i]\" TARGET=\"_blank\" ONFOCUS=\"filter:blur()\"><IMG BORDER=\"0\" SRC=\"gif/msn.gif\" ALIGN=\"bottom\" HEIGHT=\"16\" WIDTH=\"16\" ALT=\"MSN\">&nbsp;$msn[$i]</IMG></A></FONT><BR>";
			}
		}
	?>
	</TD>
	<TD CLASS="normalcol" VALIGN="top" WIDTH="70%">
	<FONT CLASS="normalcol" SIZE="2"><?php echo $text[$i]; ?><BR></FONT>
	</TD>
</TR>
<?php
	global $GuestbookAdmin, $GuestbookModerator, $lang;
	
	if (md5($GuestbookAdmin) == $this->adminpass || md5($GuestbookModerator) == $this->moderatorpass) {
		echo "<TR CLASS=\"$fligflag\">\n";
		echo "\t<TD CLASS=\"normalcol\" ALIGN=\"right\" COLSPAN=\"2\" HEIGHT=\"8\">\n";
		echo "\t<FONT SIZE=\"1\" CLASS=\"header\">\n";
		if ($this->logip != 0) {
			if ($ip[$i] == "") $ip[$i] = "not logged";
			echo "\tip: $ip[$i]&nbsp;&nbsp;&nbsp;&nbsp;\n";
		}
		echo "\t[ <A CLASS=\"tablelink\" HREF=\"admin/admin.php?act=changeentry&amp;entry=$entrynum&amp;page=$this->page";
		if (isset($lang)) echo "&lang=".$lang;
		echo "\" ONFOCUS=\"filter:blur()\">Edit</A> ]&nbsp;&nbsp;&nbsp;&nbsp;\n";
		echo "\t[ <A CLASS=\"tablelink\" HREF=\"admin/admin.php?act=deleteentry&amp;entry=$entrynum&amp;page=$this->page";
		if (isset($lang)) echo "&lang=".$lang;
		echo "\" ONFOCUS=\"filter:blur()\">Delete</A> ]</FONT>\n";
		echo "\t</TD>\n";
		echo "</TR>\n";
	}
?>