AntiWPA Forum

Full Version: Need help fixing decoded error. Thanks for help!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Please help fix decoded file error:

Warning: Invalid argument supplied for foreach() in /home/kris/public_html/classes/settings.php on line 21

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/kris/public_html/classes/settings.php:21) in /home/kris/public_html/include/form.php on line 19

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/kris/public_html/classes/settings.php:21) in /home/kris/public_html/include/form.php on line 19


21 line is:
foreach ( $array as $key => $value )



PHP Code:
<?php

class settings
{

    public function 
getsettings( )
    {
        global 
$db;
        global 
$crt_lang;

        
$array $db->fetchAssoc"select * from ".TABLE_SETTINGS.", ".TABLE_SETTINGS."_lang where `lang_id`='{$crt_lang}'" );
        foreach ( 
$array as $key => $value )
        {
            
$array[$key] = clean$value );
        }
        
$array['array_location_fields'] = explode","$array['location_fields'] );
        return 
$array;
    }

    public function 
getadssettings( )
    {
        global 
$db;
        
$array $db->fetchAssoc"select * from ".TABLE_ADS_SETTINGS );
        
$array['array_allowed_html'] = explode","$array['allowed_html'] );
        
$array['array_search_in_fields'] = explode","$array['search_in_fields'] );
        
$array['array_location_fields'] = explode","$array['location_fields'] );
        
$array['array_search_location_fields'] = explode","$array['search_location_fields'] );
        
$array['featured_price_formatted'] = format_price$array['featured_price'] );
        
$array['highlited_price_formatted'] = format_price$array['highlited_price'] );
        
$array['video_price_formatted'] = format_price$array['video_price'] );
        
$array['store_price_formatted'] = format_price$array['store_price'] );
        return 
$array;
    }

    public function 
getappearance( )
    {
        global 
$db;
        global 
$crt_lang;
        
$array $db->fetchAssoc"select * from ".TABLE_APPEARANCE.", ".TABLE_APPEARANCE."_lang where `lang_id`='{$crt_lang}'" );
        
$header_pic $array['header_pic'];
        
$footer_pic $array['footer_pic'];
        
$array['header_is_flash'] = 0;
        
$array['footer_is_flash'] = 0;
        global 
$config_abs_path;
        if ( 
getextension$header_pic ) == "swf" )
        {
            
$array['header_is_flash'] = 1;
            
$size = @getimagesize$config_abs_path."/images/".$array['header_pic'] );
            
$array['header_pic_width'] = $size[0];
            
$array['header_pic_height'] = $size[1];
        }
        if ( 
getextension$footer_pic ) == "swf" )
        {
            
$array['footer_is_flash'] = 1;
            
$size = @getimagesize$config_abs_path."/images/".$array['footer_pic'] );
            
$array['footer_pic_width'] = $size[0];
            
$array['footer_pic_height'] = $size[1];
        }
        foreach ( 
$array as $key => $value )
        {
            if ( 
$key != "lang_id" )
            {
                
$array["{$key}"] = clean$value );
            }
        }
        return 
$array;
    }

    public function 
getmailsettings( )
    {
        global 
$db;
        
$array $db->fetchAssoc"select * from ".TABLE_MAIL_SETTINGS );
        return 
$array;
    }

    public function 
getseosettings( )
    {
        global 
$db;
        global 
$crt_lang;
        
$array $db->fetchAssoc"select * from ".TABLE_SEO_SETTINGS.", ".TABLE_SEO_SETTINGS."_lang  where `lang_id`='{$crt_lang}'" );
        foreach ( 
$array as $key => $value )
        {
            if ( 
$key != "lang_id" )
            {
                
$array["{$key}"] = clean$value );
            }
        }
        return 
$array;
    }

    public function 
getval$val )
    {
        return 
$array[$val];
    }

    public function 
getall( )
    {
        return 
$array;
    }

    public function 
encode$str )
    {
        return 
md5$str );
    }

}

?>
Someone can help me? Smile
Someone cal help? Sad
If u dont give us the files we cant help u as u see there are 3 errors. and 2 php files like settings and form.php
There is settings.php and form.php
other php files ???
what other files?
what other files?
Someone can help fix me decoding error? Smile
Reference URL's