سؤال

i need to replace the u=2 in

$banuserurl = $vbulletin->options['bburl'].'/misc.php?'.$vbulletin->session->vars['sessionurl'].'do=ccb_banuser&u=2';exec_header_redirect($banuserurl);

with u=$vbulletin->GPC['ccb_newmessage']

but doing it just like that doesnt work =/ what am i doing wrong =(

full code (not working):

$cybcb_checkban = strpos($vbulletin->GPC['ccb_newmessage'], '/ban');
                if($cybcb_checkban !== false AND $cybcb_candelall)
                {
                    $vbulletin->GPC['ccb_newmessage'] = str_replace('/ban ', ' ', $vbulletin->GPC['ccb_newmessage']);
                    $banuserurl = $vbulletin->options['bburl'].'/misc.php?'.$vbulletin->session->vars['sessionurl'].'do=ccb_banuser&u=$vbulletin->GPC['ccb_newmessage']';exec_header_redirect($banuserurl);
                }
هل كانت مفيدة؟

المحلول

You need to put the string into '' while inserting it into other string.

Replace

$banuserurl = $vbulletin->options['bburl'].'/misc.php?'.$vbulletin->session->vars['sessionurl'].'do=ccb_banuser&u=$vbulletin->GPC['ccb_newmessage']';exec_header_redirect($banuserurl);

With

$banuserurl = $vbulletin->options['bburl'].'/misc.php?'.$vbulletin->session->vars['sessionurl'].'do=ccb_banuser&u='.$vbulletin->GPC['ccb_newmessage'];exec_header_redirect($banuserurl);
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top