Check_User_ID($_GET['user']); // to check profile exist or not $result1 = $buyer->GetUserDetails($_GET['user']); // to get data of profile $db->next_record(); $str = $_SERVER['HTTP_REFERER']; $str1 = substr(strrchr($str,'/'),1); if($str1 == 'post_project.php') { $navigation = ''.$lang['Buyer'].''; $navigation1 = ''; } else { $navigation = ''.$lang['Buyer'].''; $navigation1 = ''; } if($db->f('mem_state') == '') { $location1 = $db->f('mem_city').",".$db->f('country_name'); } else { $location1 = $db->f('mem_city').",".$db->f('mem_state').",".$db->f('country_name'); } ############################################################################################## /// assing templates and javascript with related varibles according to template ############################################################################################## if($db->f('buyers_slogan') == '') { $slogan = $_GET['user'].$lang['Buyer_Profile']; } else { $slogan = stripslashes($db->f('buyers_slogan')); } $tpl->assign(array( "T_Body" => 'viewbuyerprofile'. $config['tplEx'], "Location1" => $location1, "Slogan" => stripslashes($slogan), "Desc" => $db->f('buyers_description'), "emply" => $db->f('mem_employes'), "city" => $db->f('mem_city'), "organization" => $db->f('mem_organization'), "website" => $db->f('mem_website'), "user" => $_GET['user'], "user_name" => $user_name, "navigation" => $navigation, "navigation1" => $navigation1, "navigation2" => $navigation2, )); ############################################################################################## $buyer->ViewAll_Buyer_Rating1($_GET['user']); $rscnt = $db1->num_rows(); $i=0; while($db1->next_record()) { $arr_rating[$i]['project_title'] = $db1->f('project_title'); $arr_rating[$i]['dec'] = wordwrap( $db1->f('description'), 15, "\n", 1); $arr_rating[$i]['project_id'] = $db1->f('project_id'); $arr_rating[$i]['date_time'] = $db1->f('date_time'); $arr_rating[$i]['rating_by_user'] = $db1->f('rating_by_user'); $arr_rating[$i]['rating'] = $db1->f('rating'); $arr_rating[$i]['count'] = $seller->Average_Seller_Rating_Count($db1->f('rating_by_user')); $i++; } $tpl->assign(array( "arating" => $arr_rating, "Loop" => $rscnt, "lang" => $lang, )); /* $ave_rating = number_format($seller->Average_Seller_Rating($_GET['user']),2); $tpl->assign(array( "rating" => $ave_rating, )); $ave_count = $seller->Average_Seller_Rating_Count($_GET['user']); $tpl->assign(array( "ave_count" => $ave_count, )); */ $tpl->display('default_layout'. $config['tplEx']); // assign to layout template ?>