Welcome Guest, Not a member yet? Register   Sign In
too slow, ~12 sec for load
#11

[eluser]davidino86[/eluser]
second part


Code:
function bestAds()
    {
        $data['query'] = $this->annunci->get_random_ADV();
        $this->template->parse_view('content', 'panels/best_ads_view', $data);
    }

    function latestNews()
    {
        $data['query_news'] = $this->news_model->get_latest_news(5);

        $i = 0;
        foreach ($data['query_news'] as $row_news)
        {
            $data['image_news'][$i] = $this->image_model->getThumb(mssql_guid_string($row_news->news_id));
            ++$i;
        }

        $this->template->parse_view('content', 'panels/latest_news_view', $data);
    }

    function loginThick()
    {
        $data['fal'] = $this->fal_front->login();
        $this->load->view('panels/loginThick_view', data);
    }
    
    function login_small()
    {
        $data['fal'] = $this->fal_front->login();
        $this->template->parse_view('nav_right', 'inc/login_form', $data);
    }

    function all_products_by_category()
    {
        $result = $this->categories_model->getCategoriesCompanies();
        $data['query'] = $result->result();
        $this->template->parse_view('sidebar_left', 'inc/sidebar_prodotti', $data);

    }

    function vetrina(){

                $data['query_vetrina'] = $this->supplier_model->get_discouted_products();

                 if (!empty($data['query_vetrina'])){
                    $i=0;
                   foreach($data['query_vetrina'] as $value)
                    {
                       //echo mssql_guid_string($value->company_ID).'<br>';
                       $data['media'][$i] = $this->image_model->get_images_reference(mssql_guid_string($value->supplier_product_ID));
                       //var_dump ($result['$i']);
                        ++$i;
                    }
                 }

                $this->template->parse_view('sidebar_right', 'inc/vetrina_view', $data);
    }

    
    function all_shop_companies()
    {
        $welcome_shop = $this->db_session->userdata('welcome_shop');
        
        if(isset($welcome_shop) && $welcome_shop != ''){
        
        $company_data = $this->companies_model->get_company($welcome_shop);
    

        $data = array(
                    'company_id' => mssql_guid_string($company_data->company_ID),    
                    'nome' => $company_data->companyName,
                    'logo' => $this->image_model->getLogo( mssql_guid_string($company_data->company_ID))
                );


          
        }else{          
            $data['query'] = $this->companies_model->get_ecommerce_companies();
        }
        $this->template->parse_view('sidebar_left', 'inc/sidebar_prodotti_shop', $data);

    }

    function menu()
    {
        $data['companies'] = $this->companies_model->get_public_companies();
        $data['companies_ecommerce'] = $this->companies_model->get_ecommerce_companies();

        $i=0;
        foreach ($data['companies'] as $row)
        {

            $data['name_cat'][$i] = $this->categories_model->get_name_from_id(mssql_guid_string($row->category_ID));
            $i++;
        }

        $this->template->parse_view('menu', 'inc/menu_view', $data);
    }

    function random_products_header()
    {
        $data['text'] = $this->companies_model->random_company_products();
    

        $i=0;

      
        if (!empty($data['text']))
        {

            foreach($data['text'] as $value)
            {              
                $data['text_product'][$i] = $this->companies_model->get_product_by_company(mssql_guid_string($value->company_ID));
                $data['logo'][$i] = $this->image_model->getLogo(mssql_guid_string($value->company_ID));
              

/* print_r($data['text_product'][$i]);
              $j = 0;
                foreach ($data['text_product'][$i] as $row)
                {
                    $data['product_id'][$j] = mssql_guid_string($row->company_product_ID);

                    ++$j;
                }
                
                $data['media'][$i] = $this->image_model->get_images_reference(mssql_guid_string($data['product_id'][$i]));*/
                $j = 0;
                foreach ($data['text_product'][$i] as $value_image)
                    {
                        $data['media'][$i][$j] = $this->image_model->get_images_reference(mssql_guid_string($value_image->company_product_ID));

                       /* echo mssql_guid_string($value_image->company_product_ID).'<br /><br />';
                        print_r($data['media'][$j]);
                        echo '<br /><br />';
                        */
                        ++$j;
                    }
                
                ++$i;
            }



          
            
            

        }


        $this->template->parse_view('header', 'inc/random_products_header_view', $data);
        
        

    }

    function _sendEmail($email, $subject, $message)
    {

        $this->load->library('email');
        $this->email->clear();

        //Configuring SMTP Host
        $config['smtp_host'] = 'localhost';
        $config['mailtype'] = 'html';

        $this->email->initialize($config);

        $this->email->from($this->config->item('pbb_adminEmailAddress'));
        $this->email->to($email);
        $this->email->subject($subject);
        $this->email->message($message);
        $this->email->send();
    }


}

?&gt;


Messages In This Thread
too slow, ~12 sec for load - by El Forum - 07-27-2010, 02:50 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 03:03 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 03:26 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 03:41 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 04:52 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 04:55 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 04:56 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 05:12 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 05:17 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 06:51 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 06:52 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 06:58 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 07:05 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 07:18 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 07:24 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 07:29 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 07:46 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 07:49 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 09:18 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 09:33 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 09:41 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 09:47 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 10:06 AM
too slow, ~12 sec for load - by El Forum - 07-27-2010, 10:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB