<?php
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 5
|| #الصندوق الماسي الخامس
|| # جميع الحقوق محفوظة. ||
|| # لانسمح بالاقتباس او التعديل على الهاك كليا. # ||
|| # كلنا رجاء من جميع اخواننا بان لايتم التعديل على ملفات الماسي او الاقتباس منه # ||
|| # http://www.bdr130.net                    مدرسة المشاغبين # ||
|| #################################################################### ||
\*======================================================================*/
$MASY_EDITOR = 1;

function poemtext_get($message){
    $msg = '';

    $message = preg_split('/\r/',$message);

    foreach( $message as $line ){
        if(preg_match('/(.*)=(.*)/', $line)){
            $msg .= $line . "\n";
        }
    }
    return $msg;
}

function handle_poem(&$parser, $param, $option)
{
    $option_find = array('/([a-z]+:)/si', '/&(?![a-z0-9#]+;)/si', '/&[a-z]+;([a-z0-9#]+;)/si', '/`/si', '/\'/si');
    $option = preg_replace($option_find, '', $option);
    $option = str_replace('&quot;', '"', $option);
    $option = str_replace(array(";", "(", ")"), "", $option);
    $option = str_replace('"', '&quot;', $option);
    $msg = '';
    $param = preg_split('/\r/', $param);
    foreach( $param as $line )
    {
        if(preg_match('/(.*)=(.*)/', $line))
        {
            $msg .= $line . "\n";
        }
    }
    return '<div tag="' . $option .'">' . $msg . '</div><script type="text/javascript">doPoem(0)</script>';
}

//[poem]
$tag_list['option']['poem'] = array(
      'callback' => 'handle_external',
      'external_callback' => 'handle_poem',
      'disable_smilies' => true,
      'disable_wordwrap' => true,
      'strip_space_after' => 1,
      'strip_empty' => true
);

//[rams]
$tag_list['no_option']['rams'] = array(
     'html' => '<embed SRC="%1$s" type="audio/x-pn-realaudio-plugin" CONSOLE="%1$s" CONTROLS="ControlPanel,StatusBar" HEIGHT="50" WIDTH="300" AUTOSTART="false" AllowScriptAccess="never" nojava="true"></embed>',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

//[ramv]
$tag_list['no_option']['ramv'] = array(
     'html' => '<embed SRC="%1$s" type="audio/x-pn-realaudio-plugin" CONSOLE="Clip1" CONTROLS="ImageWindow,ControlPanel,StatusBar" HEIGHT="230" WIDTH="300" AUTOSTART="false" AllowScriptAccess="never" nojava="true"></embed>',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

//[media]
$tag_list['no_option']['media'] = array(
     'html' => '<embed src="%1$s" AUTOSTART="false" AllowScriptAccess="never" nojava="true"></embed>',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

//[flash1]
function handle_flash1(&$parser, $param, $option)
{
      $param = str_replace(array("'", ';', '(', ')', '.','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<iframe src="' . $option . '" ' . $param . ' quality="high" loop="false" menu="false" TYPE="application/x-shockwave-flash" wmode="transparent" AllowScriptAccess="never" nojava="true"></iframe>';
}

$tag_list['option']['flash1'] = array(
      'callback' => 'handle_external',
      'external_callback' => 'handle_flash1',
      'strip_empty' => true,
      'disable_smilies' => true,
      'disable_wordwrap' => true,
      'stop_parse' => true
);

//[flash]
function handle_flash(&$parser, $param, $option)
{
      $param = str_replace(array("'", ';', '(', ')', '.','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<iframe src="' . $option . '" ' . $param . ' quality="high" loop="false" menu="false" TYPE="application/x-shockwave-flash" AllowScriptAccess="never" nojava="true"></iframe>';
}

$tag_list['option']['flash'] = array(
      'callback' => 'handle_external',
      'external_callback' => 'handle_flash',
      'strip_empty' => true,
      'disable_smilies' => true,
      'disable_wordwrap' => true,
      'stop_parse' => true
);


//[bimg]
function handle_bimg(&$parser, $param)
{
      $param = str_replace(array("'", ';', '(', ')','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<a href="' . $param . '" target="_blank"><img src="' . $param . '" border="0" width="300" alt="تستطيع أن ترى الصورة بحجمها الطبيعي بعد الضغط عليها" /></a>';
}

$tag_list['no_option']['bimg'] = array(
     'callback' => 'handle_external',
     'external_callback' => 'handle_bimg',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);


//[blink]
$tag_list['no_option']['blink'] = array(
     'html' => '<span id="myblinktext">%1$s</span>',
     'strip_empty' => true
);

$tag_list['no_option']['caps'] = array(
     'html' => '<span style="text-transform: capitalize;">%1$s</span>',
     'strip_empty' => true
);

function handle_grade(&$parser, $param, $param1)
{
    $param1 = str_replace('\\"', '"', $param1);
    $param1 = str_replace('&quot;', '"', $param1);
    $param1_find = array('/([a-z]+:)/si', '/&(?![a-z0-9#]+;)/si', '/&[a-z]+;([a-z0-9#]+;)/si', '/`/si', '/\'/si');
    $param1_replace = array('', '', '', '', '');
    $param1 = preg_replace($param1_find, $param1_replace, $param1);
    $param1 = str_replace('"', '&quot;', $param1);
    $param1 = preg_replace('@<[\/\!]*?[^<>]*?>@si', '',$param1);
    $html = '<div id="mygradient" title="'.$param1.'" style="display:none">' . $param . '</div><script>drawGradient()</script>';
    return $html;
}

//[grade]
$tag_list['option']['grade'] = array(
    'callback' => 'handle_external',
    'external_callback' => 'handle_grade',
    'strip_empty' => true,
    'stop_parse' => true,
    'disable_smilies' => true,
    'disable_wordwrap' => true,
    'strip_space_after' => 1
);

function handle_marq(&$parser, $param, $param1)
{
    $param1 = str_replace('\\"', '"', $param1);
    $param1 = str_replace('&quot;', '"', $param1);
    $param1_find = array('/([a-z]+:)/si', '/&(?![a-z0-9#]+;)/si', '/&[a-z]+;([a-z0-9#]+;)/si', '/`/si', '/\'/si');
    $param1_replace = array('', '', '', '', '');
    $param1 = preg_replace($param1_find, $param1_replace, $param1);
    $param1 = str_replace('"', '&quot;', $param1);
    $param1 = preg_replace('@<[\/\!]*?[^<>]*?>@si', '',$param1);
    $params = explode(';',$param1);
    if($params[2]==1){
        $html = '<marquee direction="'.$params[1].'" onmouseover="this.stop()" onmouseout="this.start()" scrollAmount="'.$params[0].'" scrollDelay="3" behavior="'.$params[3].'">' . $param . '</marquee>';
    }elseif($params[2]==2){
        $html = '<marquee direction="'.$params[1].'" onmouseover="this.scrollAmount=2" onmouseout="this.scrollAmount='.$params[0].'" scrollAmount="'.$params[0].'" scrollDelay="3" behavior="'.$params[3].'">' . $param . '</marquee>';
    }else{
        $html = '<marquee direction="'.$params[1].'" scrollAmount="'.$params[0].'" scrollDelay="3" behavior="'.$params[3].'">' . $param . '</marquee>';
    }
    return $html;
}

//[marq]
$tag_list['option']['marq'] = array(
    'callback' => 'handle_external',
    'external_callback' => 'handle_marq',
    'strip_empty' => true,
    'stop_parse' => true,
    'disable_smilies' => true,
    'disable_wordwrap' => true,
    'strip_space_after' => 1
);

//[glint]
$tag_list['no_option']['glint'] = array(
    'html' => '<div tag="1" id="myglinttext" style="filter:alpha(opacity=0);width:100%%;padding:3;margin:-3">%1$s</div>',
    'strip_empty' => true
);

//[glow]
$tag_list['option']['glow'] = array(
    'html' => '<div style="filter:glow(Color=%2$s,Strength=5); width:100%%;padding:0;margin:-0">%1$s</div>',
    'option_regex' => '#^\#?\w+$#',
    'strip_empty' => true
);

//[glow1]
$tag_list['option']['glow1'] = array(
    'html' => '<div style="filter:glow(Color=%2$s,Strength=0); width:100%%;padding:0;margin:-0">%1$s</div>',
    'option_regex' => '#^\#?\w+$#',
    'strip_empty' => true
);

//[move]
$tag_list['option']['move'] = array(
    'html' => '<marquee dir="ltr" direction="%2$s" onmouseover=this.stop() onmouseout=this.start() scrollAmount="2" scrollDelay="0" style="text-align: center">%1$s</marquee>',
    'strip_empty' => true,
    'disable_smilies' => true,
    'disable_wordwrap' => true,
    'stop_parse' => true
);


function handle_frame(&$parser, $param, $option)
{
     $option1 = substr($option, 0, 2);;
     $option2 = strrchr($option, ' ');
     $option1 = intval($option1);
     $option2 = intval($option2);
     if($option1 > 15 || $option1 < 1)
     $option1 = 1;
     if($option2 > 100 OR $option2 <= 0)
     $option2 = 70;
     if($option2 == 10)
     $option2 = 100;
     $frame = '<table border="0" width="' . $option2 . '%%" cellpadding="0" cellspacing="0">
     <tr>
     <td width="1%"><img src="images/myframes/' . $option1 . '_cur.gif" alt=""  border="0" /></td>
     <td width="100%" style="background-image: url(images/myframes/' . $option1 . '_u.gif)"></td>
     <td width="1%"><img src="images/myframes/' . $option1 . '_cul.gif" alt=""  border="0" /></td>
     </tr>
     <tr>
     <td width="1%" style="background-image: url(images/myframes/' . $option1 . '_r.gif)"></td>
     <td align="center" width="100%" style="background-image: url(images/myframes/' . $option1 . '.gif)">' . $param . '</td>
     <td width="1%" style="background-image: url(images/myframes/' . $option1 . '_l.gif)"></td>
     </tr>
     <tr>
     <td width="1%"><img src="images/myframes/' . $option1 . '_cdr.gif" alt=""  border="0" /></td>
     <td width="100%" style="background-image: url(images/myframes/' . $option1 . '_d.gif)"></td>
     <td width="1%"><img src="images/myframes/' . $option1 . '_cdl.gif" alt=""  border="0" /></td>
     </tr>
     </table>';
      return $frame;
}




//[frame]
$tag_list['option']['frame'] = array(
    'callback' => 'handle_external',
    'external_callback' => 'handle_frame',
    'strip_empty' => true
);

//[mark]
$tag_list['option']['mark'] = array(
     'html' =>'<span style="background-color:%2$s">%1$s</span>',
     'option_regex' => '#^\#?\w+$#',
     'strip_empty' => true
);
/* table */
$tag_list['option']['table'] = array(
     'html' =>'<center><table width=%2$s cellpadding=2 cellspacing=0 border=1 class=tborder>%1$s</table></center>',
     'strip_empty' => true
);
$tag_list['no_option']['td'] = array(
     'html' =>'<td align=center><normalfont>%1$s</font></td>',
     'strip_empty' => true
);
$tag_list['option']['tr'] = array(
     'html' =>'<tr class=%2$s>%1$s</tr>',
     'strip_empty' => true
);
/* /table */
$tag_list['option']['tabletext'] = array(
     'html' =>'<table style="%2$s">%1$s</table>',
     'strip_empty' => true
);
$tag_list['option']['cell'] = array(
     'html' =>'<td style="%2$s">%1$s</td>',
     'strip_empty' => true
);
//[line]
$tag_list['no_option']['line'] = array(
    'html' =>'<hr>',
    'strip_empty' => false
);

//[youtube]
/*$tag_list['no_option']['youtube'] = array
(
    'html' =>'<object width="444" height="444"><param name="movie" value="massy/mediaplayer.swf?file=%1$s&logo=bdr130.png&bdr130=swf"></param><param name="wmode" value="transparent"></param><embed src="massy/mediaplayer.swf?file=%1$s&logo=bdr130.png&bdr130=swf" type="application/x-shockwave-flash" wmode="transparent" width="444" height="444"></embed></object>',
    'strip_empty' => false
);*/

//[overline]
$tag_list['no_option']['overline'] = array
(
    'html' =>'<span style="text-decoration: overline">%1$s</span>',
    'strip_empty' => false
);
$tag_list['no_option']['justify'] = array
(
    'html' =>'<div style="text-align: justify">%1$s</div>',
    'strip_empty' => false
);
$tag_list['no_option']['info'] = array
(
    'html' =>'<div class="saleh-info"><span>ملاحظة:</span><br />%1$s</div>',
    'strip_empty' => false
);
$tag_list['no_option']['caution'] = array
(
    'html' =>'<div class="saleh-caution"><span>تنبيه:</span><br />%1$s</div>',
    'strip_empty' => false
);
$tag_list['no_option']['warning'] = array
(
    'html' =>'<div class="saleh-warning"><span>تحذير:</span><br />%1$s</div>',
    'strip_empty' => false
);
//[s]
$tag_list['no_option']['s'] = array
(
    'html' =>'<strike>%1$s</strike>',
    'strip_empty' => false
);

//[shr72]
$tag_list['option']['shr72'] = array
(
    'html' =>'<a onmouseover="status=\'%2$s\'; return true;" onmouseout="status=\'\'">%1$s</a>',
    'strip_empty' => false
);

//[hide]
$tag_list['no_option']['hide'] = array
(
    'html' =>'[hide]%1$s[/hide]',
    'strip_empty' => false
);

//[click]
$tag_list['option']['click'] = array
(
    'html' =>'<a onclick="alert(\'%2$s\')">%1$s</a>',
    'strip_empty' => false
);


$tag_list['option']['bor'] = array
(
    'html' =>'<table border="1" cellspacing="0" style="border-collapse: collapse; border-style: dashed; border-width: 3px; padding: 0" width="70%%" bordercolor="%2$s"><tr><td>%1$s</td></tr></table>',
    'strip_empty' => true
);


$tag_list['option']['mouseover'] = array
(
    'html' =>'<a onmouseover="alert(\'%2$s\')">%1$s</a>',
    'strip_empty' => false
);

$tag_list['no_option']['mklb1'] = array
(
    'html' =>'<table style="filter:fliph">%1$s</table>',
    'strip_empty' => false
);

function handle_mshosh4(&$parser, $param)
{
      $param = str_replace(array("'", ';', '(', ')','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<img src="' . $param . '" alt="Bild" border="0" style="filter:Blur(direction=45, strength=40)">';
}



$tag_list['no_option']['mshosh4'] = array
(
     'callback' => 'handle_external',
     'external_callback' => 'handle_mshosh4',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

function handle_mshosh3(&$parser, $param)
{
      $param = str_replace(array("'", ';', '(', ')','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<img src="' . $param . '" style="filter:Blur(strength=50)">';
}

$tag_list['no_option']['mshosh3'] = array
(
     'callback' => 'handle_external',
     'external_callback' => 'handle_mshosh3',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

function handle_shfaf2(&$parser, $param)
{
      $param = str_replace(array("'", ';', '(', ')','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<img border="0" src="' . $param . '" style="filter: alpha(opacity=100, finishopacity=10, style=2, startx=0, starty=0, finishx=100, finishy=100); ">';
}

$tag_list['no_option']['shfaf2'] = array
(
     'callback' => 'handle_external',
     'external_callback' => 'handle_shfaf2',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

function handle_mshosh2(&$parser, $param)
{
      $param = str_replace(array("'", ';', '(', ')','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<IMG style="FILTER: progid:DXImageTransform.Microsoft.MotionBlur(Strength=5, Direction=225, Add=\'true\')" src="' . $param . '" border=1>';
}

$tag_list['no_option']['mshosh2'] = array
(
     'callback' => 'handle_external',
     'external_callback' => 'handle_mshosh2',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

function handle_mtmoeg(&$parser, $param)
{
      $param = str_replace(array("'", ';', '(', ')','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<IMG style="FILTER: progid:DXImageTransform.Microsoft.Wave(Add=\'false\', LightStrength=0, Phase=20, Strength=5,  Freq=1)" src="' . $param . '" border=1>';
}

$tag_list['no_option']['mtmoeg'] = array
(
     'callback' => 'handle_external',
     'external_callback' => 'handle_mtmoeg',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

function handle_mn7ot2(&$parser, $param)
{
      $param = str_replace(array("'", ';', '(', ')','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<IMG style="FILTER: progid:DXImageTransform.Microsoft.Engrave()" src="' . $param . '" border=1>';
}



$tag_list['no_option']['mn7ot2'] = array
(
     'callback' => 'handle_external',
     'external_callback' => 'handle_mn7ot2',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

function handle_mn7ot1(&$parser, $param)
{
      $param = str_replace(array("'", ';', '(', ')','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<IMG style="FILTER: progid:DXImageTransform.Microsoft.Emboss()" src="' . $param . '" border=1>';
}

$tag_list['no_option']['mn7ot1'] = array
(
     'callback' => 'handle_external',
     'external_callback' => 'handle_mn7ot1',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

function handle_mshosh1(&$parser, $param)
{
      $param = str_replace(array("'", ';', '(', ')','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<IMG style="FILTER: progid:DXImageTransform.Microsoft.Blur(PixelRadius=\'3\', MakeShadow=\'false\', ShadowOpacity=\'0.25\')" src="' . $param . '" border=1>';
}

$tag_list['no_option']['mshosh1'] = array
(
     'callback' => 'handle_external',
     'external_callback' => 'handle_mshosh1',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

function handle_aldl(&$parser, $param)
{
      $param = str_replace(array("'", ';', '(', ')','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<IMG style="FILTER: progid:DXImageTransform.Microsoft.dropshadow(OffX=5, OffY=5, Color=\'gray\', Positive=\'true\')" src="' . $param . '" border=1>';
}

$tag_list['no_option']['aldl'] = array
(
     'callback' => 'handle_external',
     'external_callback' => 'handle_aldl',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

function handle_m3kos(&$parser, $param)
{
      $param = str_replace(array("'", ';', '(', ')','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<img border="0" src="' . $param . '" style="FILTER: progid:DXImageTransform.Microsoft.BasicImage(grayscale=0, xray=0, mirror=0, invert=1, opacity=1, rotation=0)" src="%1$s" border=1';
}

$tag_list['no_option']['m3kos'] = array
(
     'callback' => 'handle_external',
     'external_callback' => 'handle_m3kos',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

function handle_rmade(&$parser, $param)
{
      $param = str_replace(array("'", ';', '(', ')','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<IMG style="FILTER: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1, xray=0, mirror=0, invert=0, opacity=1, rotation=0)" src="' . $param . '" border=1>';
}

$tag_list['no_option']['rmade'] = array
(
     'callback' => 'handle_external',
     'external_callback' => 'handle_rmade',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

function handle_ash3h(&$parser, $param)
{
      $param = str_replace(array("'", ';', '(', ')','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<IMG style="FILTER: progid:DXImageTransform.Microsoft.BasicImage(grayscale=0, xray=1, mirror=0, invert=0, opacity=1, rotation=0)" src="' . $param . '" border=1>';
}

$tag_list['no_option']['ash3h'] = array
(
     'callback' => 'handle_external',
     'external_callback' => 'handle_ash3h',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

function handle_shfaf(&$parser, $param)
{
      $param = str_replace(array("'", ';', '(', ')','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<IMG style="FILTER: progid:DXImageTransform.Microsoft.Alpha( Opacity=100, FinishOpacity=0, Style=1, StartX=0,  FinishX=100, StartY=0, FinishY=100)" src="' . $param . '" border=0>';
}

$tag_list['no_option']['shfaf'] = array
(
     'callback' => 'handle_external',
     'external_callback' => 'handle_shfaf',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

$tag_list['no_option']['mklb2'] = array
(
'html' =>'<style>
.myStyle { writing-mode: tb-rl;
filter: flipH() flipV();
}
</style>
<span class="myStyle">%1$s</span>',
'strip_empty' => false
);

$tag_list['no_option']['mklb'] = array
(
'html' =>'<table style="filter:flipv">%1$s</table>',
'strip_empty' => false
);

function handle_img2(&$parser, $param)
{
      $param = str_replace(array("'", ';', '(', ')','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<img border="0" src="' . $param . '" style="filter:alpha(opacity=10)" onmouseover="nereidFade(this,100,30,5)" onmouseout="nereidFade(this,10,50,5)">';
}

$tag_list['no_option']['img2'] = array
(
     'callback' => 'handle_external',
     'external_callback' => 'handle_img2',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

function handle_img3(&$parser, $param)
{
      $param = str_replace(array("'", ';', '(', ')','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<img border="0" src="' . $param . '" class="shakeimage" onMouseover="init(this);rattleimage()" onMouseout="stoprattle(this)">';
}

$tag_list['no_option']['img3'] = array
(
     'callback' => 'handle_external',
     'external_callback' => 'handle_img3',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

function handle_unload(&$parser, $param)
{
      $option = str_replace(array("'", ';', '(', ')', '.','on'), '', $param);
      $option = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<BODY onUnload="alert(\'' . $param . '\');">';
}

$tag_list['no_option']['unload'] = array
(
     'callback' => 'handle_external',
     'external_callback' => 'handle_unload',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

$tag_list['no_option']['gdwl'] = array
(
'html' =>'<table border="0" id="myexample" style="border:5px solid blue"><td>%1$s</td></table>',
'strip_empty' => false
);

$tag_list['no_option']['shfaf1'] = array
(
'html' =>'<img border="0" src="%1$s" style="filter: alpha(opacity=0, finishopacity=100, style=1, startx=0, starty=0, finishx=100, finishy=100); ">',
'strip_empty' => false
);

$tag_list['no_option']['motfrk'] = array
(
'html' =>'<span style="letter-spacing: 4pt">%1$s</span>',
'strip_empty' => false
);

function handle_msg(&$parser, $param1)
{
$param1_find = array('/javascript:/si', '/about:/si', '/vbscript:/si', '/&(?![a-z0-9#]+;)/si');
$param1_replace = array('javascript<b></b>:', 'about<b></b>:', 'vbscript<b></b>:', '&amp;');
$param1 = preg_replace($param1_find, $param1_replace, $param1);
$param1 = preg_replace('@<[\/\!]*?[^<>]*?>@si','',$param1);
$html = '<script LANGUAGE="JavaScript"> alert("'.$param1.'")</script>';
return $html;
}

$tag_list['no_option']['msg'] = array
(
'callback' => 'handle_external',
'external_callback' => 'handle_msg',
'strip_empty' => true,
'stop_parse' => true,
'disable_smilies' => true,
'disable_wordwrap' => true,
'strip_space_after' => 1
);

$tag_list['option']['moveo'] = array
(
'html' =>'<MARQUEE id=marq onmouseover=this.scrollAmount=1 onmouseout=this.scrollAmount=6 direction=%2$s style="text-align: center" speed="20">%1$s</MARQUEE>',
'strip_empty' => true,
'disable_smilies' => true,
'disable_wordwrap' => true,
'stop_parse' => true
);

$tag_list['option']['movet'] = array
(
'html' =>'<marquee direction="%2$s" scrollamount="22" scrolldelay="2000" style="text-align: center">%1$s</marquee>',
'strip_empty' => true,
'disable_smilies' => true,
'disable_wordwrap' => true,
'stop_parse' => true
);

$tag_list['option']['movek'] = array
(
'html' =>'<marquee onmouseover="this.stop()" onmouseout="this.start()" direction="%2$s" scrolldelay="9" scrollamount="2" style="text-align: center">%1$s</marquee>',
'strip_empty' => true,
'disable_smilies' => true,
'disable_wordwrap' => true,
'stop_parse' => true
);

$tag_list['option']['align'] = array
(
'html' =>'<div align="%2$s">%1$s</div>',
'strip_empty' => true,
);

$tag_list['option']['cc'] = array
(
'html' =>'<SCRIPT type=text/javascript>
function showSpoiler(block) {
block.nextSibling.nextSibling.style.display ="block";
block.parentNode.removeChild(block);
}
</SCRIPT>
<table border="0" id="table1" cellspacing="0" cellpadding="0">
<tr><td><INPUT class=button onclick=showSpoiler(this); type=button value="%2$s">
<SPAN class=content style="DISPLAY: none"></DIV>
%1$s</td>
</tr>
</table>',
'strip_empty' => true,
);

$tag_list['option']['a7la1'] = array
(
'html' =>'<table style="width:100%;">
<td style="filter:dropshadow(color=%2$s,offx=3,offy=3);">%1$s</td>
</table>',
'option_regex' => '#^\#?\w+$#',
'strip_empty' => true
);

/* lines */
$tag_list['no_option']['bdr'] = array
(
'html' =>'<hr style="COLOR:#FF0000" SIZE="1">',
'strip_empty' => false
);
$tag_list['no_option']['hr'] = array
(
'html' =>'<hr style="COLOR:%1$s" SIZE="1">',
'strip_empty' => false
);
$tag_list['no_option']['p5s'] = array
(
'html' =>'<hr style="COLOR:#0000ff" SIZE="1">',
'strip_empty' => false
);
/* lines */

function handle_button(&$parser, $param, $option)
{
      $param = str_replace(array("'", ';', '(', ')', '.','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      $option = str_replace(array("'", ';', '(', ')', '.','on'), '', $option);
      $option = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $option);
      return '<form><input type="button" value="' . $param . '" onClick="alert(\'' . $option . '\'); return true"></form>';
}

$tag_list['option']['button'] = array
(
      'callback' => 'handle_external',
      'external_callback' => 'handle_button',
      'strip_empty' => true,
      'disable_smilies' => true,
      'disable_wordwrap' => true,
      'stop_parse' => true
);

function handle_mtohg(&$parser, $param, $option)
{
      $param = str_replace(array("'", ';', '(', ')','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return'<IMG style="FILTER: progid:DXImageTransform.Microsoft.Glow(color=\'' . $option . '\', Strength=\'5\')" src="' . $param . '" border=1>';
}

$tag_list['option']['mtohg'] = array
(
      'callback' => 'handle_external',
      'external_callback' => 'handle_mtohg',
      'option_regex' => '#^\#?\w+$#',
      'strip_empty' => true,
      'disable_smilies' => true,
      'disable_wordwrap' => true,
      'stop_parse' => true
);

$tag_list['no_option']['blur'] = array
(
'html' =>'<table style="filter:blur(add=0,dirction=45,strength=3)">%1$s</table>',
'strip_empty' => false
);

$tag_list['no_option']['blur1'] = array
(
'html' =>'<table style="filter:blur(add=0,dirction=15,strength=7)">%1$s</table>',
'strip_empty' => false
);

function handle_3mr(&$parser, $param, $option)
{
      $param = str_replace(array("'", ';', '(', ')', '.','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<DIV STYLE="filter: alpha(style=0, opacity=70); width:100%%; height:100%%; background:url(' . $option . '); ">' . $param . '</DIV>';
}

$tag_list['option']['3mr'] = array
(
      'callback' => 'handle_external',
      'external_callback' => 'handle_3mr',
      'strip_empty' => true,
      'disable_smilies' => true,
      'disable_wordwrap' => true,
      'stop_parse' => true
);

$tag_list['no_option']['rrr'] = array
(
'html' =>'<span style="width: 150; height: 50; font-size: 20px; font-family: verdana; color: #0000FF; filter: blur(add = 1, direction = 220, strength = 10)">%1$s</span>',
'strip_empty' => true
);

$tag_list['no_option']['motr1'] = array
(
'html' =>'<marquee style="&lt;br; text-align:center" behavior="alternate" direction="up">%1$s</marquee>',
'strip_empty' => true
);

$tag_list['no_option']['motr'] = array
(
'html' =>'<marquee style="&lt;br; text-align:center" behavior="alternate" direction="center">%1$s</marquee>',
'strip_empty' => true
);

function handle_sor2(&$parser, $param)
{
      $param = str_replace(array("'", ';', '(', ')','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<img style="filter:fliph" border="0" src="' . $param . '" border="0" />';
}

$tag_list['no_option']['sor2'] = array
(
     'callback' => 'handle_external',
     'external_callback' => 'handle_sor2',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

function handle_sor1(&$parser, $param)
{
      $param = str_replace(array("'", ';', '(', ')','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<img style="filter:flipv" border="0" src="' . $param . '" border="0" />';
}

$tag_list['no_option']['sor1'] = array
(
     'callback' => 'handle_external',
     'external_callback' => 'handle_sor1',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

$tag_list['option']['shr7'] = array
(
'html' =>'<a title="%2$s">%1$s</a>',
'strip_empty' => true
);

function handle_shr71(&$parser, $param, $option)
{
      $param = str_replace(array("'", ';', '(', ')','on'), '', $param);
      $param = preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $param);
      return '<a title="' . $param . '"><img border="0" src="' . $option . '"></a>';
}

$tag_list['option']['sor1'] = array
(
     'callback' => 'handle_external',
     'external_callback' => 'handle_shr71',
     'strip_empty' => true,
     'disable_smilies' => true,
     'disable_wordwrap' => true,
     'stop_parse' => true
);

$tag_list['no_option']['Unload'] = array
(
    'html' =>'<BODY onUnload="alert(\'%1$s\');">',
    'strip_empty' => true
);

$tag_list['no_option']['foq'] = array
(
'html' =>'<DIV STYLE="width:550;height:70;filter:wave(strength=6, freq=5, lightstrength=40, add=0, phase=20)">
<marquee direction="up" height="241" scrollamount="2" style="text-align: center">%1$s</marquee>',
'strip_empty' => true
);

$tag_list['no_option']['foq1'] = array
(
'html' =>'<DIV STYLE="width:550;height:70;filter:wave(strength=6, freq=5, lightstrength=40, add=0, phase=20)">
<marquee direction="down" height="241" scrollamount="2" style="text-align: center">%1$s</marquee>',
'strip_empty' =>  true
);

$tag_list['option']['shr71'] = array
(
'html' =>'<a title="%1$s" ><img border="0" src="%2$s"></a>',
'strip_empty' => true
);

function handle_rainbow(&$parser, $param){
    return '<span class="rainbow">'.strip_tags($param).'</span>';
}
$tag_list['no_option']['fot1'] = array
(
//'html' =>'<span class="rainbow">%1$s</span>',
'callback' => 'handle_external',
'external_callback' => 'handle_rainbow',
'strip_empty' => true,
'disable_smilies' => true,
);


$tag_list['no_option']['m3ft1'] = array
(
'html' =>'<DIV STYLE="width:550;height:70;filter:wave(strength=7, freq=7, lightstrength=0, add=0, phase=7)">
<marquee height="241" scrollamount="2" style="text-align: center">%1$s</marquee>',
'strip_empty' => true
);

$tag_list['no_option']['m3ft2'] = array
(
'html' =>'<DIV STYLE="width:550;height:70;filter:wave(strength=7, freq=7, lightstrength=0, add=0, phase=7)">
<marquee height="241" scrollamount="2" style="text-align: center" direction="right">%1$s</marquee>',
'strip_empty' => true
);

$tag_list['option']['all1'] = array
(
'html' =>'<table>
<td style="filter: shadow(color=%2$s,direction=135);">%1$s</td>
</table>',
'option_regex' => '#^\#?\w+$#',
'strip_empty' => true
);
?>