XY Megashoutbox

Dieses Thema im Forum "Webentwicklung" wurde erstellt von Targa, 27. September 2007 .

  1. 27. September 2007
    Täg,
    ich hab in nem WBB2.3.6 Forum die Shoutbox installed. Nur komm ich nicht dazu sie zu aktivieren denn ich komm net in den admin Teil der Shoutbox rein. Das Problem ist wenn ich auf "xy_megashoutbox_admin.php" zugreifen will kommt das die Session abgelaufen ist. Wenn ich mich dann aber anmelde im ACP und dann den Link im Browser wieder eingeb und enter drücke kommt das gleiche wieder!
    Hab Cache schon geleert und weiß grad nimmer weiter. Vllt. kann mir ja jemand helfen!

    MfG
    Targa
     
  2. 27. September 2007
    AW: XY Megashoutbox


    Poste mal bitte den Code der "xy_megashoutbox_admin.php".

    mFg Chrisomator
     
  3. 27. September 2007
    AW: XY Megashoutbox

    PHP:
    <?

    require(
    "./global.php" );
    require(
    "./lib/class_parse.php" );
    $lang -> load ( 'XY_ACP_MEGASHOUTBOX' );
    $megasboxversion  " 2.3_1.3" ;

    //* check permissions

    if(! checkAdminPermissions ( 'xy_can_shoutbox_admin' ) && ! checkAdminPermissions ( 'xy_can_ban_shoutuser' ) && ! checkAdminPermissions ( 'xy_can_shout_kill' ) && ! checkAdminPermissions ( 'xy_can_add_megaboxcommands' ) && ! checkAdminPermissions ( 'xy_can_magashoutbox_designpack_edit' ))  access_error ( 1 );

    $timestamp = time ();
    $date_show  date ( "l, M. dS, Y" );
    $date  date ( "d-m-Y" );
    $back  $HTTP_REFERER ;
    $action  $_REQUEST [ 'action' ];

    // ###################################################
    // #                     Einstellungen               #
    // ###################################################

    if( $action  ==  "params" ){
         if(!
    checkAdminPermissions ( 'xy_can_shoutbox_admin' ) && ! checkAdminPermissions ( 'xy_can_magashoutbox_designpack_edit' ))  access_error ( 1 );
              if(
    $_POST [ 'do' ] ==  "save" ){
            if(
    $_POST [ 'xy_daychr' ]<= "0" $xy_daychr = '0' ;
            else 
    $xy_daychr  intval ( $_POST [ 'xy_daychr' ]);
            if(
    $_POST [ 'xy_shoutsindb' ]<= 0 $xy_shoutsindb = '50' ;
            else 
    $xy_shoutsindb  intval ( $_POST [ 'xy_shoutsindb' ]);
            
    $xyconf = fopen ( "./lib/xy_megashoutbox.conf.php" , "w+b" );
            
    $content = "<?php \r\n//### configfile XundY Megashoutbox\r\n" ;
            
    $content .= "\$xy_megaboxon = '" . intval ( $_POST [ 'xy_boxon' ]). "';\r\n" ;
            
    $content .= "\$xy_numberofshouts = '" . intval ( $_POST [ xy_number ]). "';\r\n" ;
            
    $content .= "\$xy_shoutsindb = '" . intval ( $_POST [ xy_shoutsindb ]). "';\r\n" ;
            
    $content .= "\$xy_megaboxinputlength = '" . intval ( $_POST [ xy_inputlength ]). "';\r\n" ;
            
    $content .= "\$xy_megaboxreload = '" . intval ( $_POST [ xy_reload ]). "';\r\n" ;
            
    $content .= "\$xy_megaboxforguests = ' $_POST [ xy_guests ] ';\r\n" ;
            
    $content .= "\$xy_megaboxguests_canshout = ' $_POST [ xy_guests_canshout ] ';\r\n" ;
            
    $content .= "\$xy_shoutorder = ' $_POST [ xy_shoutorder ] ';\r\n" ;
            
    $content .= "\$xy_smiliepos = ' $_POST [ xy_smiliepos ] ';\r\n" ;
            
    $content .= "\$xy_megaboxdaychr = ' $xy_daychr ';\r\n" ;
            
    $content .= "\$xy_megabox_imagesize ='" . intval ( $_POST [ 'xy_imagesize' ]). "';\r\n" ;
            
    $content .= "\$xy_megaboxflood = '" . intval ( $_POST [ 'xy_flood' ]). "';\r\n" ;
            
    $content .= "\$xy_megaboxunbanable = '" . $_POST [ 'xy_unbanable' ]. "';\r\n" ;
            
    $content .= "?>" ;
            
    fwrite ( $xyconf , $content );
            
    fclose ( $xyconf );
      }

    if(
    $_POST [ 'do' ] ==  "save_css" ){
     
    $db -> query ( " update bb" . $n . "_designelements set value='" . addslashes ( $_POST [ value ]). "' Where designpackid= $_POST [ designpackid ]  AND elementid= $_POST [ elementid ] " );
        }
      
    $result  $db -> query ( "SELECT dp.*, de.* FROM bb" . $n . "_designpacks dp,
    bb"
    . $n . "_designelements de WHERE (de.element='cssmore') AND (de.designpackid=dp.designpackid) ORDER BY dp.designpackname ASC" );
      while(
    $css  $db -> fetch_array ( $result )){
      
    $css [ 'value' ]= htmlconverter ( $css [ 'value' ]);
      
    $css [ 'designpackid' ]= htmlconverter ( $css [ 'designpackid' ]);
      
    $designpackname = $css [ designpackname ];
      
    $value = $css [ value ];
      
    $designpackid = $css [ designpackid ];
      
    $elementid = $css [ elementid ];

      eval (
    "\$shoutbox_css .= \" " . $tpl -> get ( "xy_shoutbox_css" , 1 ). "\";" );
      }
      require(
    'lib/xy_megashoutbox.conf.php' );
      eval(
    "\$tpl->output(\"" . $tpl -> get ( "xy_shoutbox_params" , 1 ). "\",1);" );
    }

    // ###################################################
    // #                   bannen                        #
    // ###################################################

    if( $action  ==  "ban" ){
           if(!
    checkAdminPermissions ( 'xy_can_shoutbox_admin' ) && ! checkAdminPermissions ( 'xy_can_ban_shoutuser' ))  access_error ( 1 );
        if(
    $_POST [ 'do' ] ==  "unban" ){
          foreach(
    $_POST [ 'id_ban' ] AS  $unbanid ) {
            
    $result  $db -> query ( "DELETE FROM bb" . $n . "_xy_shoutbox_ban WHERE id = '" . intval ( $unbanid ). "'" );
            }
       }
       elseif(
    $_POST [ 'do' ] ==  "ban"  &&  trim ( $_POST [ 'user_ban' ])!= '' ){
            
    $banuser_exist = $db -> query ( "SELECT userid FROM bb" . $n . "_users WHERE `username` = '" . mysql_real_escape_string ( $_POST [ 'user_ban' ]). "'" );
            if(
    mysql_num_rows ( $banuser_exist )!= 0 ) {
             while(
    $ban  $db -> fetch_array ( $banuser_exist )){
              
    $user_ban = $ban [ 'userid' ];
                
    $why  addslashes ( $_POST [ why ]);
                
    $result  $db -> query ( "INSERT IGNORE INTO bb" . $n . "_xy_shoutbox_ban SET `userid`='" . intval ( $user_ban ). "',`why`='" . $why . "',`date`='" . $timestamp . "',`banned_by`='" . $wbbuserdata [ 'username' ]. "'" );
                if(
    $_POST [ 'del_posts' ]== "1" )     $result  $db -> query ( "DELETE FROM bb" . $n . "_xy_shoutbox WHERE name = '" . mysql_real_escape_string ( $_POST [ 'user_ban' ]). "'" );
              }
             }
        }


        
    $result  $db -> query ( "SELECT sb.*, u.username FROM bb" . $n . "_xy_shoutbox_ban sb LEFT JOIN bb" . $n . "_users u USING(userid) ORDER BY `date` DESC" );
        
    $num_result  mysql_num_rows ( $result );
        if(
    $num_result  ==  "0" ){
          eval (
    "\$shoutbox_acp_no_user .= \" " . $tpl -> get ( "xy_shoutbox_acp_no_user" , 1 ). "\";" );
          }
        else {
              while(
    $ipped  mysql_fetch_assoc ( $result )){
              
    $count_bg  +=  1 ;
              
    $bantime = date ( "d-m-Y / H:i" , $ipped [ 'date' ]);
              if(
    $count_bg % 2 ) $couleur_bg  "class='secondrow'" ;
              else 
    $couleur_bg  "class='secondrow'" ;
              eval (
    "\$shoutbox_acp_no_user .= \" " . $tpl -> get ( "xy_shoutbox_acp_user" , 1 ). "\";" );
              }
        }
           eval(
    "\$tpl->output(\"" . $tpl -> get ( "xy_shoutbox_acp_ban" , 1 ). "\",1);" );

    // ###################################################
    // #          Nachrichten löschen                    #
    // ###################################################

    }

    elseif(
    $action  ==  "prune" )   {
      if(!
    checkAdminPermissions ( 'xy_can_shoutbox_admin' ) && ! checkAdminPermissions ( 'xy_can_shout_kill' ))  access_error ( 1 );
        if(
    $_POST [ 'total' ]== "kill" ){
          
    $result  $db -> query ( "TRUNCATE TABLE bb" . $n . "_xy_shoutbox" );
          }
        if(
    $_POST [ 'do' ] ==  "del" ){
          foreach(
    $_POST [ 'id' ] AS  $delshoutid ){
          
    $result = $db -> unbuffered_query ( "DELETE FROM bb" . $n . "_xy_shoutbox WHERE id='" . intval ( $delshoutid ). "'" );
          }
        }

        
    $result  $db -> query ( "SELECT * FROM bb" . $n . "_xy_shoutbox ORDER BY id DESC" );
        
    $num_result  mysql_num_rows ( $result );

        if(
    $num_result  ==  "0" ){
                       eval (
    "\$shoutbox_acp_no_user .= \" " . $tpl -> get ( "xy_shoutbox_acp_no_user" , 1 ). "\";" );
        }
     else{
        while(
    $ipped  mysql_fetch_assoc ( $result )){
        
    $bantime = date ( "d-m-Y / H:i" , $ipped [ 'date' ]);
        eval (
    "\$shoutbox_acp_no_user .= \" " . $tpl -> get ( "xy_shoutbox_kill_shoutsbit" , 1 ). "\";" );
        }
      }

              eval(
    "\$tpl->output(\"" . $tpl -> get ( "xy_shoutbox_kill_shouts" , 1 ). "\",1);" );
    }


    // ###################################################
    // #                  Zensur                         #
    // ###################################################

    if( $action  ==  "swear" ){
    if(!
    checkAdminPermissions ( 'xy_can_shoutbox_admin' ))  access_error ( 1 );
        if(
    $_POST [ 'do' ] ==  "del"  && isset( $_POST [ 'id_ban' ])){
          foreach(
    $_POST [ 'id_ban' ] AS  $delid ){
            
    $result  $db -> query ( "DELETE FROM bb" . $n . "_xy_shoutbox_swears WHERE id='" . intval ( $delid ). "'" );
            }
        }
                         if(
    $_POST [ 'do' ] ==  "add"  &&  $_POST [ 'orig' ]!= "" ){
                                 
            
    $orig  addslashes ( $_POST [ orig ]);
            
    $rplace  addslashes ( $_POST [ rplace ]);
            
    $result  $db -> query ( "INSERT INTO `bb" . $n . "_xy_shoutbox_swears` (`id`, `orig`, `rplace`) VALUES ('', ' $orig ', ' $rplace ') " );
        }
        
    $result  $db -> query ( "SELECT * FROM bb" . $n . "_xy_shoutbox_swears ORDER BY orig" );
        
    $num_result  mysql_num_rows ( $result );
        if(
    $num_result  ==  "0" ){
          eval (
    "\$shoutbox_acp_no_user .= \" " . $tpl -> get ( "xy_shoutbox_acp_no_user" , 1 ). "\";" );
        }else{
            while(
    $ipped  mysql_fetch_assoc ( $result )){
                
    $count_bg  +=  1 ;
                if(
    $count_bg % 2 ) $couleur_bg  "class='secondrow'" ;
                else 
    $couleur_bg  "class='secondrow'" ;
              eval (
    "\$shoutbox_acp_no_user .= \" " . $tpl -> get ( "xy_shoutbox_acp_bad" , 1 ). "\";" );
            }
    // Delete all shouts and set autoincrement to 1
         
    if( $action  ==  "skill" ){
                 
    $result  $db -> query ( "TRUNCATE TABLE bb" . $n . "_xy_shoutbox`" );
                           }
        }
        eval(
    "\$tpl->output(\"" . $tpl -> get ( "xy_shoutbox_swears" , 1 ). "\",1);" );
    }



    //*  Shoutbox Commands  *//

    if( $action == "commands" ) {
    $commandcount = '0' ;
     if(!
    checkAdminPermissions ( 'xy_can_shoutbox_admin' ) && ! checkAdminPermissions ( 'xy_can_add_megaboxcommands' ))  access_error ( 1 );
      if(
    $_POST [ 'do' ]== $lang -> items [ 'LANG_ACP_GLOBAL_SUBMITFORM' ]) {
        if(
    $_POST [ 'delete' ]== "delete" ) {
        
    $db -> query ( "DELETE FROM bb" . $n . "_xy_shoutbox_commands WHERE `commandid`='" . $_POST [ 'commandid' ]. "'" );
        }
        else{
      
    $commandcount = strlen ( $_POST [ 'command' ]);
          
    $r_command = trim ( addslashes ( $_POST [ 'r_command' ]));
         
    $db -> query ( "UPDATE bb" . $n . "_xy_shoutbox_commands SET `command`='" . addslashes ( $_POST [ 'command' ]). "', `r_command`='" . addslashes ( $_POST [ 'r_command' ]). "', `commandcount`='" . $commandcount . "', `describ`='" . addslashes ( $_POST [ 'describ' ]). "', `use`='" . addslashes ( $_POST [ 'use' ]). "' WHERE `commandid`='" . $_POST [ 'commandid' ]. "'" );
      }
     }
      if(
    $_POST [ 'do' ]== "create" ) {
      if(
    $_POST [ 'command' ]!= '' ){
        
    $commandcount = trim ( strlen ( $_POST [ 'command' ]));
        
    $db -> query ( "INSERT INTO bb" . $n . "_xy_shoutbox_commands set `command`='" . addslashes ( $_POST [ 'command' ]). "', `r_command`='" . addslashes ( $_POST [ 'r_command' ]). "', `commandcount`='" . $commandcount . "', `describ`='" . addslashes ( $_POST [ 'describ' ]). "', `use`='" . addslashes ( $_POST [ 'use' ]). "'" );
       }
     }
    $result  $db -> unbuffered_query ( "SELECT * FROM bb" . $n . "_xy_shoutbox_commands ORDER BY `command` ASC" );
        while(
    $row  mysql_fetch_array ( $result )){
        if(
    $commandcount  % 2 $rowclass = "secondrow" ;
        else 
    $rowclass = "firstrow" ;
        
    $commandid = $row [ 'commandid' ];
        
    $command = stripslashes ( $row [ 'command' ]);
        
    $r_command = stripslashes ( $row [ 'r_command' ]);
        
    $describ = stripslashes ( $row [ 'describ' ]);
        
    $use = stripslashes ( $row [ 'use' ]);
       eval (
    "\$commands_bit .= \" " . $tpl -> get ( "xy_shoutbox_commands_bit" , 1 ). "\";" );
       
    $commandcount ++;
       }
    eval(
    "\$tpl->output(\"" . $tpl -> get ( "xy_shoutbox_commands" , 1 ). "\",1);" );
     }


    ?>

    Was soll das bringen?
     
  4. 27. September 2007
    AW: XY Megashoutbox

    Kann es sein, dass du:

    lib/class_parse.php oder die globale.php

    nicht bearbeitet hast?

    Wenn doch dann guck nochmal nach ob du wirklich alles bearbeitet hast!

    mFg Chrisomator
     
  5. 27. September 2007
    AW: XY Megashoutbox

    Ja das is mit Sicherheit sogar so, denn ich hab nur das gemacht was in der Instalationsanleitung drin stand!
    Was muss ich denn da ändern?
     
  6. Video Script

    Videos zum Themenbereich

    * gefundene Videos auf YouTube, anhand der Überschrift.