nor mal ne frage neben bei wo muss ich das jetzt einfügen

Code:
<?
// Autor: profitgeier
// Diese Datei enthält geschützten Quellcode von Designerscripte.net

$_GET['ref'] = (int)$_GET['ref'];

if ($pageconfig['reload_betteln'] != 0){

    // prüfe ob Bettelseite noch im Reload
    $reloadcheck = db_query("SELECT bis FROM ".$db_prefix."_reloads WHERE ip = '".$ip."' and tan = 'bettelaufruf' and bis >= ".time()." LIMIT 1");

    if (!mysql_num_rows($reloadcheck)) {
    
        // prüfe ob Zeit vergangen sind
        if (isset($_SESSION['betteldelay'])) $delaycheck = ( $_SESSION['betteldelay'] < time() );
        else $delaycheck = false;

        if ($delaycheck) {
            
            $minimum        = $pageconfig['min_betteln'];
            $maximum        = $pageconfig['max_betteln'];
            srand((double)microtime()*1000000);
            $bettelsumme    = rand($minimum*100,$maximum*100)/100;
            
            $new_reload = time()+$pageconfig['reload_betteln'];
            db_query("INSERT INTO ".$db_prefix."_reloads (ip,uid,tan,bis) VALUES ('".$ip."','".$_GET['ref']."','bettelaufruf','".$new_reload."')");
            
            db_query("UPDATE ".$db_prefix."_kontodaten  SET angebettelt =angebettelt + 1, bv = bv + ".$bettelsumme.", kontostand = kontostand + '".$bettelsumme."' WHERE uid = '".$_GET['ref']."'");
            
            refumsatz ($bettelsumme,$_GET['ref']);
                        stg_bilanz (0,$bettelsumme,'Intern','Bettellink');
            aktivralley ($bettelsumme,$_GET['ref']);
            bilanz(0,$bettelsumme);
                        tagbettelralley (1,$_GET['ref']);
                        bettelralley ($_GET['ref']);
                        // Small Bettel jp anfang
$blob = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_banner_jackpot_ein "));
$b_steig                         = $blob['steig'];
$bjackmin                        = $blob['min'];
$bjackmax                        = $blob['max'];
$b_jackpotcode                   = $blob['fall'];
$b_jackpot_startwert             = $blob['start'];

$banner_daten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_banner_jackpot WHERE beendet = 0"));
        $b_jackpot = round(($banner_daten['jackpot']),2);
        // Zufallsjackpot errechnen
        mt_srand((double)microtime()*1000000);
        $b_jackpotzahl = mt_rand($bjackmin,$bjackmax);
        $b_jackpotzahl = round(($b_jackpotzahl),2);
        if ( $b_jackpotcode == $b_jackpotzahl ){
          kontobuchung ('+',$b_jackpot,$_SESSION['uid']);
          $buchungs_id=create_code(14);
          buchungsliste ($buchungs_id,'+'.$b_jackpot,'Banner Jackpot',$_SESSION['uid']);
          db_query("UPDATE ".$db_prefix."_banner_jackpot SET beendet = 1, uid = ".$_SESSION['uid'].", zeit = ".time()." WHERE beendet = 0");
          db_query("INSERT INTO ".$db_prefix."_banner_jackpot SET jackpot = '".$b_jackpot_startwert."', beendet = 0, uid = '0', zeit = '0'");
          bilanz(0 , $b_jackpot);
         }else{
         db_query("UPDATE ".$db_prefix."_banner_jackpot SET jackpot = jackpot + '".$b_steig."' WHERE beendet = 0;");
         };
// Small jp ende

                         // big jp anfang
$mlob = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_mail_jackpot_ein "));
$m_steig                         = $mlob['steig'];
$mjackmin                        = $mlob['min'];
$mjackmax                        = $mlob['max'];
$m_jackpotcode                   = $mlob['fall'];
$m_jackpot_startwert             = $mlob['start'];

$mail_daten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_mail_jackpot WHERE beendet = 0"));
        $m_jackpot = round(($mail_daten['jackpot']),2);
        // Zufallsjackpot errechnen
        mt_srand((double)microtime()*1000000);
        $m_jackpotzahl = mt_rand($mjackmin,$mjackmax);
        $m_jackpotzahl = round(($m_jackpotzahl),2);
        if ( $m_jackpotcode == $m_jackpotzahl ){
          kontobuchung ('+',$m_jackpot,$_SESSION['uid']);
          $buchungs_id=create_code(14);
          buchungsliste ($buchungs_id,'+'.$m_jackpot,'Mail Jackpot',$_SESSION['uid']);
          db_query("UPDATE ".$db_prefix."_mail_jackpot SET beendet = 1, uid = ".$_SESSION['uid'].", zeit = ".time()." WHERE beendet = 0");
          db_query("INSERT INTO ".$db_prefix."_mail_jackpot SET jackpot = '".$m_jackpot_startwert."', beendet = 0, uid = '0', zeit = '0'");
          bilanz(0 , $m_jackpot);
         }else{
         db_query("UPDATE ".$db_prefix."_mail_jackpot SET jackpot = jackpot + '".$m_steig."' WHERE beendet = 0;");
         };
// Big jp ende

                   // Global jp anfang
$glob = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_global_jackpot_ein "));
$g_steig                         = $glob['steig'];
$gjackmin                        = $glob['min'];
$gjackmax                        = $glob['max'];
$g_jackpotcode                   = $glob['fall'];
$g_jackpot_startwert             = $glob['start'];

$daten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_global_jackpot WHERE beendet = 0"));
        $mg_jackpot = round(($daten['jackpot']),2);
        // Zufallsjackpot errechnen
        mt_srand((double)microtime()*1000000);
        $g_jackpotzahl = mt_rand($gjackmin,$gjackmax);
        $g_jackpotzahl = round(($g_jackpotzahl),2);
        if ( $g_jackpotcode == $g_jackpotzahl ){
          kontobuchung ('+',$mg_jackpot,$_SESSION['uid']);
          $buchungs_id=create_code(14);
          buchungsliste ($buchungs_id,'+'.$mg_jackpot,'Global Jackpot',$_SESSION['uid']);
          db_query("UPDATE ".$db_prefix."_global_jackpot SET beendet = 1, uid = ".$_SESSION['uid'].", zeit = ".time()." WHERE beendet = 0");
          db_query("INSERT INTO ".$db_prefix."_global_jackpot SET jackpot = '".$g_jackpot_startwert."', beendet = 0, uid = '0', zeit = '0'");
          bilanz(0 , $mg_jackpot);
         }else{
         db_query("UPDATE ".$db_prefix."_global_jackpot SET jackpot = jackpot + '".$g_steig."' WHERE beendet = 0;");
         };
// Global jp ende     

                        
            $betteltext = '<b>Du hast f&uuml;r den User '.$_GET['ref'].' gerade '.$bettelsumme.' '.$waehrung.' erbettelt!</b>';
            
            unset($_SESSION['betteldelay']);
        } else {
            // Bettelvergütung zu schnell angefordert 
            $betteltext = '<b><font color="#FF0000">Fehler bei Bettel-Verg&uuml;tung! Vergütung ist nicht erfolgt.</font></b>';
        }
    } else {
        // Bettelseite noch im Reload
        $reloadcheck = mysql_fetch_array($reloadcheck);
        $betteltext = '<b><font color="#FF0000">Du bist noch f&uuml;r '. round((($reloadcheck['bis'] - time())),0) .' Sekunden f&uuml;rs Betteln gesperrt</font></b>';
    }
}

?>
<script type="text/javascript">
    parent.document.getElementById('betteltext').innerHTML = '<?=$betteltext;?>';
</script>
?

Ich danke euch!