HomeCategory_New(); $cnt = $db2->num_rows(); $i = 0; while($db2->next_record()) { $arr_cat1_id[$i] = $db2->f('cat_id'); $arr_cat1_name[$i] = $db2->f('cat_name'); $member->GetSeller($db2->f('cat_id')); $member_count[$i] = $db1->num_rows(); $j=0; while($db1->next_record()) { $arr_seller[$i][$j]['description'] = $db1->f('seller_description'); $arr_seller[$i][$j]['login_id'] = $db1->f('user_login_id'); $arr_seller[$i][$j]['logo'] = $db1->f('seller_logo'); $arr_seller[$i][$j]['mother_lang'] = $db1->f('mother_lang'); $arr_seller[$i][$j]['lang_pairs'] = $db1->f('lang_pairs'); $arr_seller[$i][$j]['location_1'] = $db1->f('mem_state'); $arr_seller[$i][$j]['location'] = $db1->f('mem_city').",".$db1->f('mem_state').",".$db1->f('country_name'); if($db1->f('country_name') != '') { $arr_seller[$i][$j]['location_2'] = $db1->f('mem_city').",".$db1->f('country_name'); } if($db1->f('country_name') == '') { $arr_seller[$i][$j]['location_2'] = $db1->f('mem_city'); } $arr_seller[$i][$j]['reviews'] = $seller->Average_Seller_Rating_Count($db1->f('user_login_id')); $arr_seller[$i][$j]['rating'] = number_format($seller->Average_Seller_Rating($db1->f('user_login_id')),2); $arr_seller[$i][$j]['earning'] = Sellect_Earning_Wallet(md5($db1->f('user_login_id'))); $j++; } $i++; } // assing to template $tpl->assign(array( "Loop" => $cnt, "img_path" => $virtual_path['Seller_Logo'], "cat_id" => $arr_cat1_id, "cat_name" => $arr_cat1_name, "Loop1" => $cnt, "total_cat" => $cnt-1, "member_count" => $member_count, "arr_seller" => $arr_seller, "tab" => 2, )); /// used for pagination if($_SESSION['total_record'] > $_SESSION['user_page_size'] && $cnt > 0) { $tpl->assign(array('Page_Link' => $utility->showPaginationUser($_SESSION['total_record']) )); } ############################################################################################## ############################################################################################## ############################################################################################## /// assing templates and javascript with related varibles according to template ############################################################################################## $tpl->assign(array( "T_Body" => 'all_seller_profiles'. $config['tplEx'], "JavaScript" => array('home.js'), "lang" => $lang, "navigation" => '' )); ############################################################################################## $tpl->display('default_layout'. $config['tplEx']); // assign to layout template ?>