Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help fixing decoded error. Thanks for help!
09-18-2012, 08:48 AM (This post was last modified: 09-19-2012 07:56 AM by trytofly.)
Post: #1
Need help fixing decoded error. Thanks for help!
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 );
    }

}

?>
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Need help fixing decoded error. Thanks for help! - trytofly - 09-18-2012 08:48 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | Homepage | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication