Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
class bbcode { public static function html ( $bbtext ) { //$bbtext= str_replace(..
Decoded Output download
<?
class bbcode
{
public static function html ( $bbtext )
{
//$bbtext= str_replace('http://','https://',$bbtext);
return $bbtext;
}
public static function forum ( $bbtext )
{
//$bbtext= str_replace('http://','https://',$bbtext);
$bbtags = array(
'[font=Arial]' => '<font face=\'Arial\'>', '[/font]' => '</font>',
'[font=Comic Sans MS]' => '<font face=\'Comic Sans MS\'>', '[/font]' => '</font>',
'[font=Courier New]' => '<font face=\'Courier New\'>', '[/font]' => '</font>',
'[font=Georgia]' => '<font face=\'Georgia\'>', '[/font]' => '</font>',
'[font=Lucida Sans Unicode]' => '<font face=\'Lucida Sans Unicode\'>', '[/font]' => '</font>',
'[font=Tahoma]' => '<font face=\'Tahoma\'>', '[/font]' => '</font>',
'[font=Times New Roman]' => '<font face=\'Times New Roman\'>', '[/font]' => '</font>',
'[font=Trebuchet MS]' => '<font face=\'Trebuchet MS\'>', '[/font]' => '</font>',
'[font=Verdana]' => '<font face=\'Verdana\'>', '[/font]' => '</font>',
'[size=50]' => '<font style=\'font-size:12px;\'>', '[/size]' => '</font>',
'[size=85]' => '<font style=\'font-size:14px;\'>', '[/size]' => '</font>',
'[size=100]' => '<font style=\'font-size:16px;\'>', '[/size]' => '</font>',
'[size=150]' => '<font style=\'font-size:18px;\'>', '[/size]' => '</font>',
'[size=200]' => '<font style=\'font-size:22px;\'>', '[/size]' => '</font>',
'[color=#334d69]' => '<font style=\'color:#334d69;\'>', '[/color]' => '</font>',
'[p]' => '<p>','[/p]' => '</p>',
'[left]' => '<p style=\'text-align:left;\'>','[/left]' => '</p>',
'[right]' => '<p style=\'text-align:right;\'>','[/right]' => '</p>',
'[center]' => '<p style=\'text-align:center;\'>','[/center]' => '</p>',
'[justify]' => '<p style=\'text-align:justify;\'>','[/justify]' => '</p>',
'[ul]' => '<ul>','[/ul]' => '</ul>',
'[ol]' => '<ol>','[/ol]' => '</ol>',
'[li]' => '<li>','[/li]' => '</li>',
'[*]' => '<li>','[/*]' => '</li>',
'[b]' => '<b>','[/b]' => '</b>',
'[u]' => '<u>','[/u]' => '</u>',
'[i]' => '<i>','[/i]' => '</i>',
'[s]' => '<strike>','[/s]' => '</strike>',
'[sub]' => '<sub>','[/sub]' => '</sub>',
'[sup]' => '<sup>','[/sup]' => '</sup>',
'[quote]' => '<blockquote>','[/quote]' => '</blockquote>',
'[code]' => '<code>','[/code]' => '</code>',
'[table]' => '<table class="table">','[/table]' => '</table>',
'[tr]' => '<tr>','[/tr]' => '</tr>',
'[td]' => '<td>','[/td]' => '</td>',
'[hr]' => '<hr>',
"
" => '<br/>'
);
$bbtext = str_ireplace(array_keys($bbtags), array_values($bbtags), $bbtext);
$bbextended = array(
"/\[list=1\](.*?)\[\/list\]/si" => "<ol>$1</ol>",
"/\[list\](.*?)\[\/list\]/si" => "<ul>$1</ul>",
"/\[url](.*?)\[\/url]/si" => "<a href=\"http://$1\" title=\"$1\" class=\"ticketLink\">$1</a>",
"/\[url=(.*?)\](.*?)\[\/url\]/si" => "<a href=\"$1\" title=\"$1\" class=\"ticketLink\">$2</a>",
"/\[img\]([^[]*)\[\/img\]/si" => "<img src=\"$1\" alt=\" \" style=\"max-width:560px;\" />",
"/\[video\]([^[]*)\[\/video\]/si" => "<iframe src=\"http://www.youtube.com/embed/$1\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen></iframe>",
);
foreach($bbextended as $match=>$replacement){
$bbtext = preg_replace($match, $replacement, $bbtext);
}
$bbtext = str_replace('
', '<br/>', $bbtext);
return $bbtext;
}
} ?>
Did this file decode correctly?
Original Code
class bbcode
{
public static function html ( $bbtext )
{
//$bbtext= str_replace('http://','https://',$bbtext);
return $bbtext;
}
public static function forum ( $bbtext )
{
//$bbtext= str_replace('http://','https://',$bbtext);
$bbtags = array(
'[font=Arial]' => '<font face=\'Arial\'>', '[/font]' => '</font>',
'[font=Comic Sans MS]' => '<font face=\'Comic Sans MS\'>', '[/font]' => '</font>',
'[font=Courier New]' => '<font face=\'Courier New\'>', '[/font]' => '</font>',
'[font=Georgia]' => '<font face=\'Georgia\'>', '[/font]' => '</font>',
'[font=Lucida Sans Unicode]' => '<font face=\'Lucida Sans Unicode\'>', '[/font]' => '</font>',
'[font=Tahoma]' => '<font face=\'Tahoma\'>', '[/font]' => '</font>',
'[font=Times New Roman]' => '<font face=\'Times New Roman\'>', '[/font]' => '</font>',
'[font=Trebuchet MS]' => '<font face=\'Trebuchet MS\'>', '[/font]' => '</font>',
'[font=Verdana]' => '<font face=\'Verdana\'>', '[/font]' => '</font>',
'[size=50]' => '<font style=\'font-size:12px;\'>', '[/size]' => '</font>',
'[size=85]' => '<font style=\'font-size:14px;\'>', '[/size]' => '</font>',
'[size=100]' => '<font style=\'font-size:16px;\'>', '[/size]' => '</font>',
'[size=150]' => '<font style=\'font-size:18px;\'>', '[/size]' => '</font>',
'[size=200]' => '<font style=\'font-size:22px;\'>', '[/size]' => '</font>',
'[color=#334d69]' => '<font style=\'color:#334d69;\'>', '[/color]' => '</font>',
'[p]' => '<p>','[/p]' => '</p>',
'[left]' => '<p style=\'text-align:left;\'>','[/left]' => '</p>',
'[right]' => '<p style=\'text-align:right;\'>','[/right]' => '</p>',
'[center]' => '<p style=\'text-align:center;\'>','[/center]' => '</p>',
'[justify]' => '<p style=\'text-align:justify;\'>','[/justify]' => '</p>',
'[ul]' => '<ul>','[/ul]' => '</ul>',
'[ol]' => '<ol>','[/ol]' => '</ol>',
'[li]' => '<li>','[/li]' => '</li>',
'[*]' => '<li>','[/*]' => '</li>',
'[b]' => '<b>','[/b]' => '</b>',
'[u]' => '<u>','[/u]' => '</u>',
'[i]' => '<i>','[/i]' => '</i>',
'[s]' => '<strike>','[/s]' => '</strike>',
'[sub]' => '<sub>','[/sub]' => '</sub>',
'[sup]' => '<sup>','[/sup]' => '</sup>',
'[quote]' => '<blockquote>','[/quote]' => '</blockquote>',
'[code]' => '<code>','[/code]' => '</code>',
'[table]' => '<table class="table">','[/table]' => '</table>',
'[tr]' => '<tr>','[/tr]' => '</tr>',
'[td]' => '<td>','[/td]' => '</td>',
'[hr]' => '<hr>',
"\n" => '<br/>'
);
$bbtext = str_ireplace(array_keys($bbtags), array_values($bbtags), $bbtext);
$bbextended = array(
"/\[list=1\](.*?)\[\/list\]/si" => "<ol>$1</ol>",
"/\[list\](.*?)\[\/list\]/si" => "<ul>$1</ul>",
"/\[url](.*?)\[\/url]/si" => "<a href=\"http://$1\" title=\"$1\" class=\"ticketLink\">$1</a>",
"/\[url=(.*?)\](.*?)\[\/url\]/si" => "<a href=\"$1\" title=\"$1\" class=\"ticketLink\">$2</a>",
"/\[img\]([^[]*)\[\/img\]/si" => "<img src=\"$1\" alt=\" \" style=\"max-width:560px;\" />",
"/\[video\]([^[]*)\[\/video\]/si" => "<iframe src=\"http://www.youtube.com/embed/$1\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen></iframe>",
);
foreach($bbextended as $match=>$replacement){
$bbtext = preg_replace($match, $replacement, $bbtext);
}
$bbtext = str_replace('\n', '<br/>', $bbtext);
return $bbtext;
}
}
Function Calls
None |
Stats
MD5 | 74beceb36e87de2a1fa7d6818bffb516 |
Eval Count | 0 |
Decode Time | 73 ms |