GetCatNameByParent($_GET['cat_id']); $cnt = $db1->num_rows(); $i = 0; while($db1->next_record()) { $arr_cat[$i]['id'] = $db1->f('cat_id'); $arr_cat[$i]['name'] = $db1->f('cat_name'); $arr_cat[$i]['total_projects'] = $db1->f('total_projects'); $i++; } $Cate_Name = $category->getTitle($_GET['cat_id']); $navigationLink = getLinkPath1($_GET['cat_id']); $str = $_SERVER['HTTP_REFERER']; $str1 = substr(strrchr($str,'/'),1); if($str1 == 'category_list.php') { $navigation= ''.$lang['Category_List1'].''; $navigation1 = ''; } else { $navigation = $navigationLink; } $tpl->assign(array( "T_Body" => 'category'. $config['tplEx'], "Site_Title" => $Cate_Name." : Projects Related to ".$Cate_Name."." , "JavaScript" => array('deposit.js'), "lang" => $lang, "Loop" => $cnt, "arr_cat" => $arr_cat, "navigation" => $navigation, "navigation1" => $navigation1, "tab" => 4, )); $results = $proj->GetProjectByCategory($_GET['cat_id']); $rscntpro = $db->num_rows(); $i=0; while($db->next_record()) { $view_pro[$i]['id'] = $db->f('project_id'); $view_pro[$i]['clear_title'] = clean_url($db->f('project_title')); $view_pro[$i]['project_status'] = $db->f('project_status'); $view_pro[$i]['membership_id'] = $db->f('membership_id'); $view_pro[$i]['premium_project'] = $db->f('premium_project'); $view_pro[$i]['title'] = $db->f('project_title'); $view_pro[$i]['dec'] = $db->f('project_description'); $view_pro[$i]['project_posted_date'] = $db->f('project_posted_date'); $view_pro[$i]['urgent_project'] = $db->f('urgent_project'); list($view_pro[$i]['bid'],$view_pro[$i]['Ave_Bid'],$view_pro[$i]['Ave_Time']) = explode(",",Get_Bids_By_Id1($db->f('project_id'))); $view_pro[$i]['category'] = Get_Cat_Names_Project($db->f('project_category')); if($view_pro[$i]['bid'] != 0) { $view_pro[$i]['Ave_Bid1'] = number_format((($view_pro[$i]['Ave_Bid'])/($view_pro[$i]['bid'])),2); } $i++; } $tpl->assign(array( "view_project" => $view_pro, "rscntpro" => $rscntpro, )); $cats_details = $category->GetCategory($_GET['cat_id']); $total_projects = $cats_details->total_projects; $tpl->assign(array( "Dsce_Cats" => $cats_details->cat_desc, "TOP_TITLE" => strtoupper($Cate_Name)."(".$total_projects.")", "MAIN_CAT" => strtoupper($Cate_Name), )); if($_SESSION['total_record'] > $_SESSION['user_page_size']) { $tpl->assign(array('Page_Link' => $utility->showPaginationUser($_SESSION['total_record']) )); } $tpl->display('default_layout'. $config['tplEx']); ?>