2 PaleMan ща замутим чего-нить
Если бы я еще все понимал, можно было бы чего-нить покрасивее замутить
Code: Select all
<?
if (isset($_POST['sometext'])) {
$text = "";
while ($text != $_POST['sometext']) {
$text = $_POST['sometext'];
$_POST['sometext'] = preg_replace('/([[(\s])([2-9AKQJT][sdch])([\])\s,])/', '$1<img src="images/$2.gif" width=50 height=75 alt="$2">$3', $_POST['sometext']);
$_POST['sometext'] = preg_replace('/([[(\s>]|([sdch][2-9akqjt]))([sdch])([2-9akqjt])([\])\s,<]|([sdch][2-9akqjt]))/', '$1<img src="images/$4$3.gif" width=50 height=75 alt="$4$3">$5', $_POST['sometext']);
}
$text = preg_replace('/(\/|=")a([sdch])(.gif|">)/', '$1A$2$3', $text);
$text = preg_replace('/(\/|=")k([sdch])(.gif|">)/', '$1K$2$3', $text);
$text = preg_replace('/(\/|=")q([sdch])(.gif|">)/', '$1Q$2$3', $text);
$text = preg_replace('/(\/|=")j([sdch])(.gif|">)/', '$1J$2$3', $text);
$text = preg_replace('/(\/|=")t([sdch])(.gif|">)/', '$1T$2$3', $text);
$text = str_replace("\n", "
", $text);
$text = str_replace('\"', """, $text);
$text = str_replace("\'", "'", $text);
echo $text;
}
?>
Users browsing this forum: Bing [Bot] and 3 guests