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
09-19-2012, 07:55 AM
Post: #2
RE: Need help fixing decoded error. Thanks for help!
Someone can help me? Smile
Find all posts by this user
Quote this message in a reply
09-21-2012, 05:56 AM
Post: #3
RE: Need help fixing decoded error. Thanks for help!
Someone cal help? Sad
Find all posts by this user
Quote this message in a reply
09-21-2012, 06:19 AM
Post: #4
RE: Need help fixing decoded error. Thanks for help!
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
Visit this user's website Find all posts by this user
Quote this message in a reply
09-21-2012, 07:47 AM (This post was last modified: 09-21-2012 11:20 AM by trytofly.)
Post: #5
RE: Need help fixing decoded error. Thanks for help!
There is settings.php and form.php


Attached File(s)
.zip  files.zip (Size: 6.41 KB / Downloads: 8)
Find all posts by this user
Quote this message in a reply
09-21-2012, 11:17 AM
Post: #6
RE: Need help fixing decoded error. Thanks for help!
other php files ???
Find all posts by this user
Quote this message in a reply
09-21-2012, 11:18 AM
Post: #7
RE: Need help fixing decoded error. Thanks for help!
what other files?
Find all posts by this user
Quote this message in a reply
09-23-2012, 05:31 PM
Post: #8
RE: Need help fixing decoded error. Thanks for help!
what other files?
Find all posts by this user
Quote this message in a reply
09-27-2012, 01:31 PM
Post: #9
RE: Need help fixing decoded error. Thanks for help!
Someone can help fix me decoding error? Smile
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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

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