Как може това да се преработи
че да стане за
10x предварително :?:
Код:
$post_no_html = $text;
$bbcode_regex = array(0 => '/\[b\](.+?)\[\/b\]/s',
1 => '/\[i\](.+?)\[\/i\]/s',
2 => '/\[u\](.+?)\[\/u\]/s',
3 => '/\[quote\](.+?)\[\/quote\]/s',
4 => '/\[quote\=(.+?)](.+?)\[\/quote\]/s',
5 => '/\[url\](.+?)\[\/url\]/s',
6 => '/\[url\=(.+?)\](.+?)\[\/url\]/s',
7 => '/\[img\](.+?)\[\/img\]/s',
8 => '/\[color\=(.+?)\](.+?)\[\/color\]/s',
9 => '/\[size\=(.+?)\](.+?)\[\/size\]/s',
10 => '/\[code\](.+?)\[\/code\]/s',
11 => '/\[font\=(.+?)\](.+?)\[\/font\]/s',
12 => '/\[center\](.+?)\[\/center\]/s',
13 => '/\[left\](.+?)\[\/left\]/s',
14 => '/\[right\](.+?)\[\/right\]/s');
$bbcode_replace = array( 0 => '<b>$1</b>',
1 => '<i>$1</i>',
2 => '<u>$1</u>',
3 => '<table class="quote" width="100%" border="0"><tr><td>Цитат:</td></tr><tr><td class="quote_box" width="100%" style="border:solid 1px black">$1</td></tr></table>',
4 => '<table class="quote" width="100%" border="0"><tr><td><font face="Tahoma" style="font-size: 8pt"><b>$1 каза:</b></font></td></tr><tr><td bgcolor="#BAC97F" width="100%" style="border:solid 1px black"><font face="Tahoma" style="font-size: 9pt">$2</font></td></tr></table>',
5 => '<a target="_blank" href="$1">$1</a>',
6 => '<a target="_blank" href="$1">$2</a>',
7 => '<img src="$1" alt="" title=""/>',
8 => '<span style="color:$1">$2</span>',
9 => '<span style="font-size:$1">$2</span>',
10 => '<table width="95%" border="0" align="center"><tr><td class="blue"><font size="2">Код:</font></td></tr><tr><td class="code" width="100%">$1</td></tr></table>',
11 => '<font face="$1">$2</font>',
12 => '<center>$1</center>',
13 => '<p align="left">$1</p>',
14 => '<p align="right">$1</p>');
ksort($bbcode_regex);
ksort($bbcode_replace);
//preg_replace to convert all remaining bbCode tags
$post_bbcode_treated = preg_replace($bbcode_regex, $bbcode_replace, $text1);
$text = nl2br($post_bbcode_treated);
че да стане за
Код:
<?
include "db.php";
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title></title>
<style type="text/css">
</style>
</head>
<body>
<div align="center">
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<?
for ($i=$broi; $i>0; $i--) {
if (is_file("posts/".$i.".php")) {
include "posts/".$i.".php";
echo "<div align='left'><a href='edit.php?file=".$i."' class='BlockTextSmall'>Добави отговор</a></div>";
echo "<div align='left'><a href='del.php?file=".$i."' class='BlockTextSmall'>Изтриване</a></div>";
echo "<hr>";
}
}
?>
<div align="center"></div>
<div align="center"></div></td>
</tr>
</table>
</body>
</html>
10x предварително :?: