PageRenderTime 49ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/coachdetails.php

https://bitbucket.org/itoxable/chiron-gaming
PHP | 411 lines | 313 code | 74 blank | 24 comment | 63 complexity | 03649b94b2d7f0a33a7f231486374b63 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0
  1. <?php
  2. //session_start();
  3. include "general_include.php";
  4. /* Deatils of Coach */
  5. $page_name=basename($_SERVER['SCRIPT_FILENAME']);
  6. $IsPreserved = 'Y';
  7. $IsProcess = $_REQUEST['IsProcess'];
  8. $action = $_REQUEST['action'];
  9. $coach_id = $_REQUEST['coach_id'];
  10. //$game_id = $_REQUEST['game_id'];
  11. $logged_user=$_SESSION['user_id'];
  12. if(isset($_REQUEST['game_id'])){
  13. $_SESSION['game_id'] = $_REQUEST['game_id'];
  14. $game_id = $_SESSION['game_id'];
  15. }else{
  16. $game_id = $_SESSION['game_id'];
  17. }
  18. if($_REQUEST['action']=='sendreview'){
  19. $num_coach_rating_type=$_REQUEST['NumCoachRatingCat'];
  20. //$coach_id = $_POST['coach_id'];
  21. $user_type_id=$_POST['user_type_id'];
  22. $review_comment = $_POST['review_comment'];
  23. $reviewed_by=$_POST['reviewed_by'];
  24. $total_rating=0;
  25. for($i=0;$i<$num_coach_rating_type;$i++){
  26. $get_rating[$i]=$_REQUEST['Rating_'.$i.''];
  27. $get_comment[$i]=$_REQUEST['Comment_'.$i.''];
  28. $explode_str=explode(":",$get_rating[$i]);
  29. $rating[$i]=$explode_str[0];
  30. $rating_cat_id[$i]=$explode_str[1];
  31. $store_id[$i]=$_REQUEST['comment_rating_'.$i.''];
  32. }
  33. $overall_comment=$_REQUEST['Comment_overall'];
  34. $overall_rating=$_REQUEST['Rating_overall'];
  35. $CoachReviewSql="INSERT INTO ".TABLEPREFIX."_user_review (user_id,user_type_id,reviewed_by,review_comment,rating,is_active,date_added) VALUES ('".$coach_id."','".$user_type_id."','".$reviewed_by."','".$review_comment."','".$overall_rating."','Y','".date('Y-m-d')."')";
  36. $CoachReview=$UserManagerObjAjax->Execute($CoachReviewSql);
  37. $user_review_id=mysql_insert_id();
  38. if($num_coach_rating_type>0){
  39. for($i=0;$i<$num_coach_rating_type;$i++){
  40. $total_rating=$total_rating+$rating[$i];
  41. $CoachRatingSql="INSERT INTO ".TABLEPREFIX."_user_rating (user_review_id,rcat_id,rating) VALUES ('".$user_review_id."','".$rating_cat_id[$i]."','".$rating[$i]."')";
  42. $CoachRating=$UserManagerObjAjax->Execute($CoachRatingSql);
  43. }
  44. if($CoachRating){
  45. $totreview = "SELECT count(*),sum(rating) as totrate FROM ".TABLEPREFIX."_user_review WHERE user_id='".$coach_id."' AND is_active='Y'";
  46. $totArr = $UserManagerObjAjax->GetRecords("Row",$totreview);
  47. $tot_count = $totArr[0];
  48. $tot_rate = $totArr['totrate'];
  49. $avg = $tot_rate/$tot_count;
  50. $UpdateSql = "UPDATE ".TABLEPREFIX."_user_type_user_relation SET overall_rating='".$avg."' WHERE user_id='".$coach_id."' and user_type_id='".$user_type_id."'";
  51. $UserManagerObjAjax->Execute($UpdateSql);
  52. }
  53. }
  54. }
  55. if($IsProcess <> 'Y'){
  56. include "top.php";
  57. }
  58. $RatingCatSql="SELECT rating_category_tooltip,rating_category,rcat_id FROM ".TABLEPREFIX."_rating_category WHERE rating_type='C' ORDER BY rating_order";
  59. $RatingCatDetails=$UserManagerObjAjax->GetRecords("All",$RatingCatSql);
  60. $NumRatingCat=count($RatingCatDetails);
  61. for($i=0;$i<$NumRatingCat;$i++){
  62. $RatingCatArr[$i]['rcat_id']=$RatingCatDetails[$i]['rcat_id'];
  63. $RatingCatArr[$i]['rating_category']=$RatingCatDetails[$i]['rating_category'];
  64. $RatingCatArr[$i]['rating_category_tooltip']=$RatingCatDetails[$i]['rating_category_tooltip'];
  65. }
  66. $Sql_Individual="select avg(rat.rating) as tot,rat.rcat_id,cat.rating_category,cat.rating_category_tooltip from ".TABLEPREFIX."_user_rating as rat,".TABLEPREFIX."_user_review as rev,".TABLEPREFIX."_rating_category as cat where rat.rcat_id=cat.rcat_id and rat.user_review_id=rev.user_review_id and rev.user_id=".$coach_id." and rev.user_type_id=1 group by rat.rcat_id";
  67. $Individual=$UserManagerObjAjax->GetRecords("All",$Sql_Individual);
  68. for($j=0;$j<count($Individual);$j++){
  69. $CatIndividualRec[$j]['rating']=number_format($Individual[$j]['tot'], 1, '.', '');
  70. $CatIndividualRec[$j]['rcat_id']=$Individual[$j]['rcat_id'];
  71. $CatIndividualRec[$j]['rating_category']=$Individual[$j]['rating_category'];
  72. $CatIndividualRec[$j]['rating_category_tooltip']=html_entity_decode($Individual[$j]['rating_category_tooltip']);
  73. }
  74. /*echo '<pre>';
  75. print_r($CatIndividualRec);*/
  76. $item_per_page=$_SESSION['item_per_page'] = $_REQUEST['item_per_page'];
  77. if(empty($item_per_page) || !isset($item_per_page)){
  78. $item_per_page=10;
  79. }
  80. //Start fetching game criteria of a particular game ---------------------//
  81. $GameSql = "SELECT * FROM ".TABLEPREFIX."_game WHERE game_id='$game_id'";
  82. $gamerow = $UserManagerObjAjax->GetRecords("Row",$GameSql);
  83. $game_id = $gamerow['game_id'];
  84. $game_name = $gamerow['game_name'];
  85. $availability = explode(" , ",$_REQUEST['availabilitys']);
  86. $language_id = explode(" , ",$_REQUEST['languages']);
  87. $prop_ids = $_REQUEST['prop_ids'];
  88. $smarty->assign('prop_ids',$prop_ids);
  89. $prop_id = explode(",",$_REQUEST['prop_ids']);
  90. if($prop_id == '')
  91. $prop_id = array();
  92. $price = $_REQUEST['price'];
  93. if($availability == '')
  94. $availability = array();
  95. if($language_id == '')
  96. $language_id = array();
  97. if($price == '')
  98. $price = '0;100';
  99. // --------------------------------------------------------------------------//
  100. // Function for finding value
  101. function findvalue($table,$fld_name,$fld_value,$find_value){
  102. if($fld_value=='')
  103. return false;
  104. $SelectTypeSql = "SELECT ".$find_value." FROM ".$table." WHERE $fld_name=".$fld_value;
  105. $SelectType = mysql_fetch_array(mysql_query($SelectTypeSql));
  106. return trim($SelectType[0]);
  107. }
  108. $CoachSql="SELECT * FROM ".TABLEPREFIX."_user where user_id='$coach_id'";
  109. $CoachArr=$UserManagerObjAjax->GetRecords("Row",$CoachSql);
  110. $CoachArr['name']=show_to_control($CoachArr['name']);
  111. //$CoachArr['about']=stripslashes($CoachArr['user_about']);
  112. $CoachArr['desc']=stripslashes($CoachArr['description']);
  113. $Clanguage = explode(",",$CoachArr['language_ids']);
  114. $language='';
  115. for($l=0;$l<count($Clanguage);$l++)
  116. {
  117. if($Clanguage[$l]<>'')
  118. $language .=findvalue(TABLEPREFIX."_language","language_id",$Clanguage[$l],"language_name").' , ';
  119. }
  120. $CoachArr['language']=substr($language,0,-2);
  121. $avail_type = explode(",",$CoachArr['availability_type']);
  122. if($avail_type[1] == ''){
  123. if($avail_type[0]=='O')
  124. $CoachArr['availability_type'] = 'Online';
  125. if($avail_type[0]=='L'){
  126. $CoachArr['availability_type'] = 'Local meet-up';
  127. $CoachArr['avail_local'] = 'Y';
  128. }
  129. }
  130. else{
  131. $CoachArr['availability_type'] = 'Online , Local meet-up';
  132. $CoachArr['avail_local'] = 'Y';
  133. }
  134. $CoachArr['availability_country'] = findvalue(TABLEPREFIX."_country","country_id",$CoachArr['availability_country'],"country_name");
  135. $CoachArr['availability_city'] = findvalue(TABLEPREFIX."_cities","city_id",$CoachArr['availability_city'],"city_key");
  136. $CoachOverall="SELECT * FROM ".TABLEPREFIX."_user_type_user_relation WHERE user_id=".$coach_id." and user_type_id=1";
  137. $CoachOverallArr = $UserManagerObjAjax->GetRecords("Row",$CoachOverall);
  138. $CoachOverallArr['overall_rating']=number_format($CoachOverallArr['overall_rating'], 1, '.', '');
  139. $Sql_overall_tooptip="select rating_overall_tooltip from ".TABLEPREFIX."_default_comision";
  140. $overall_tooptip=$UserManagerObjAjax->GetRecords("Row",$Sql_overall_tooptip);
  141. $CoachOverallArr['rating_overall_tooltip']=html_entity_decode($overall_tooptip['rating_overall_tooltip']);
  142. $CoachgameSql = "SELECT * FROM ".TABLEPREFIX."_user_game where user_id='$coach_id' and user_type_id=1 and is_active='Y'";
  143. $CoachgameArr = $UserManagerObjAjax->GetRecords("All",$CoachgameSql);
  144. $Numcoachgame=count($CoachgameArr);
  145. for($g=0;$g<$Numcoachgame;$g++){
  146. $gameSql = "SELECT * FROM ".TABLEPREFIX."_game g, nk_game_categories gc WHERE g.game_id ='".$CoachgameArr[$g]['game_id']."' AND gc.game_id = g.game_id ";
  147. $gameDetailArr = $UserManagerObjAjax->GetRecords("All",$gameSql);
  148. $gameRow = $gameDetailArr[0];
  149. $numGameDetail=count($gameDetailArr);
  150. for($x=0; $x<$numGameDetail; $x++){
  151. $userCategoriesPropSql = "SELECT * FROM ".TABLEPREFIX."_user_game_property p, nk_game_categories_properties c WHERE p.user_id='".$coach_id."' AND p.user_type_id = '1'
  152. AND p.category_id = ".$gameDetailArr[$x]['category_id']." AND c.property_id = p.property_id";
  153. $userCategoriesPropArr = $UserManagerObjAjax->GetRecords("All",$userCategoriesPropSql);
  154. $NumuserCategoriesProp=count($userCategoriesPropArr);
  155. $prop ='';
  156. for($y=0; $y<$NumuserCategoriesProp; $y++){
  157. $prop .= (($y > 0)?', ':'').$userCategoriesPropArr[$y]['property_name'];
  158. }
  159. $gameDetailArr[$x]['properties'] = $prop;
  160. }
  161. $CoachgameArr[$g]['categoriesArr'] = $gameDetailArr;
  162. $CoachgameArr[$g]['game_name']= $gameRow['game_name'];
  163. }
  164. $CoachvideoSql = "SELECT * FROM ".TABLEPREFIX."_video WHERE user_id='$coach_id' ORDER BY date_added DESC";
  165. $CoachvideoArr = $UserManagerObjAjax->GetRecords("All",$CoachvideoSql);
  166. $Numvideo = count($CoachvideoArr);
  167. for($v=0;$v<$Numvideo;$v++){
  168. $DateArr = $UserManagerObjAjax->GetRecords("Row",$dateSql);
  169. $CoachvideoArr[$v]['video_date']=date("F j, Y",strtotime($CoachvideoArr[$v]['date_added'])).' at '.date("g:i a",strtotime($CoachvideoArr[$v]['date_added']));
  170. $LikeNumSql = "SELECT count(*) AS numlike FROM ".TABLEPREFIX."_user_like WHERE selected_for='L' AND video_id=".$CoachvideoArr[$v]['video_id'] ;
  171. $LikeArrNum = $UserManagerObjAjax->GetRecords('Row',$LikeNumSql);
  172. $CoachvideoArr[$v]['numlike']=$LikeArrNum['numlike'];
  173. $UnlikeNumSql = "SELECT count(*) AS numunlike FROM ".TABLEPREFIX."_user_like WHERE selected_for='D' AND video_id=".$CoachvideoArr[$v]['video_id'] ;
  174. $UnlikeArrNum = $UserManagerObjAjax->GetRecords('Row',$UnlikeNumSql);
  175. $CoachvideoArr[$v]['numunlike']=$UnlikeArrNum['numunlike'];
  176. $totstar='';
  177. for($x=1;$x<=$CoachvideoArr[$v]['overall_rating'];$x++)
  178. {
  179. $totstar.="<img src='images/starb.gif' alt='' border='0' />";
  180. }
  181. $istar=5 - $CoachvideoArr[$v]['overall_rating'];
  182. for($y=1;$y<=$istar;$y++)
  183. {
  184. $totstar.="<img src='images/starg.gif' alt='' border='0' />";
  185. }
  186. $CoachvideoArr[$v]['star']=$totstar;
  187. $viewCount = "SELECT count(*) FROM ".TABLEPREFIX."_video_view_count WHERE video_id =".$CoachvideoArr[$v]['video_id'];
  188. $viewArr = $UserManagerObjAjax->GetRecords("Row",$viewCount);
  189. $CoachvideoArr[$v]['view_count'] = $viewArr[0];
  190. }
  191. $Reviews = "SELECT * FROM ".TABLEPREFIX."_user_review WHERE user_id='$coach_id' and user_type_id=1 and is_active='Y' ORDER BY date_added DESC";
  192. $PaginationObjAjaxLatest=new PaginationClassAjax($item_per_page,"prev",'',"next","active",$adodbcon);
  193. $pagination_arr = $PaginationObjAjaxLatest->PaginationAjax($Reviews,$page_name."?coach_id=".$coach_id."&action=".$action."&item_per_page=".$item_per_page,"Managergeneral");
  194. $UserReview = $UserManagerObjAjax->GetRecords("All",$pagination_arr[0]);
  195. $NumReview = count($UserReview);
  196. for($r=0;$r<$NumReview;$r++)
  197. {
  198. $SelectTypeSql = "SELECT user_id, username FROM ".TABLEPREFIX."_user WHERE user_id=".$UserReview[$r]['reviewed_by'];
  199. $reviwer = mysql_fetch_array(mysql_query($SelectTypeSql));
  200. $UserReview[$r]['review_by'] = $reviwer['username'];
  201. $UserReview[$r]['reviewer_id'] = $reviwer['user_id'];
  202. $UserReview[$r]['r_date'] = date("F j, Y",strtotime($UserReview[$r]['date_added'])).' at '.date("g:i a",strtotime($UserReview[$r]['date_added']));
  203. $UserReview[$r]['overall_c'] = $UserReview[$r]['overall_comment'];
  204. $UserReview[$r]['overall_r'] = $UserReview[$r]['rating'];
  205. $Sql_overall_tooptip="select rating_overall_tooltip from ".TABLEPREFIX."_default_comision";
  206. $overall_tooptip=$UserManagerObjAjax->GetRecords("Row",$Sql_overall_tooptip);
  207. $UserReview[$r]['rating_overall_tooltip']=html_entity_decode($overall_tooptip['rating_overall_tooltip']);
  208. //echo $Sql_Individual_User="select rat.rating,cat.rating_category from gt_user_rating as rat,gt_user_review as rev,gt_rating_category as cat where rat.rcat_id=cat.rcat_id and rat.user_review_id=rev.user_review_id and rev.user_review_id=".$UserReview[$r]['user_review_id']." and rev.reviewed_by=".$UserReview[$r]['reviewed_by']." group by cat.rating_category";
  209. $Sql_Individual_User="SELECT rat.rating, cat.rating_category, cat.rating_category_tooltip FROM ".TABLEPREFIX."_user_rating AS rat, ".TABLEPREFIX."_user_review AS rev, ".TABLEPREFIX."_rating_category AS cat WHERE rat.rcat_id = cat.rcat_id AND rat.user_review_id = rev.user_review_id AND rat.user_review_id =".$UserReview[$r]['user_review_id']." GROUP BY cat.rcat_id";
  210. $Individual_User = $UserManagerObjAjax->GetRecords("All",$Sql_Individual_User);
  211. //$id=$UserReview[$r]['user_review_id'];
  212. for($k=0;$k<count($Individual_User);$k++){
  213. $UserReview_Individual[$k]['rating']=$Individual_User[$k]['rating'];
  214. $UserReview_Individual[$k]['rating_category']=$Individual_User[$k]['rating_category'];
  215. $UserReview_Individual[$k]['rating_category_tooltip']=html_entity_decode($Individual_User[$k]['rating_category_tooltip']);
  216. }
  217. $UserReview[$r]['individual'] = $UserReview_Individual;
  218. $userImg = "SELECT photo FROM ".TABLEPREFIX."_user WHERE user_id='".$UserReview[$r]['reviewed_by']."'";
  219. $ImgArr = $UserManagerObjAjax->GetRecords("Row",$userImg);
  220. $UserReview[$r]['photo'] = $ImgArr[0];
  221. $Usertype = "SELECT user_type_id FROM ".TABLEPREFIX."_user_type_user_relation WHERE user_id='".$UserReview[$r]['reviewed_by']."'";
  222. $typeArr = $UserManagerObjAjax->GetRecords("All",$Usertype);
  223. for($t=0;$t<count($typeArr);$t++)
  224. {
  225. if($typeArr[$t][0] == 1){
  226. $coach = 1;
  227. }if($typeArr[$t][0] == 3)
  228. $partner = 1;
  229. }
  230. if($coach == 1)
  231. {
  232. $UserReview[$r]['userlink'] = "coachdetails.php?coach_id=".$UserReview[$r]['reviewed_by'];
  233. if($UserReview[$r]['photo'] == '')
  234. $img = 'images/coach_thumb.jpg';
  235. else
  236. $img = 'uploaded/user_images/thumbs/mid_'.$UserReview[$r]['photo'];
  237. }
  238. else if($partner == 1)
  239. {
  240. $UserReview[$r]['userlink'] = "training_partner_details.php?training_partner_id=".$UserReview[$r]['reviewed_by'];
  241. if($UserReview[$r]['photo'] == '')
  242. $img = 'images/student_thumb.jpg';
  243. else
  244. $img = 'uploaded/user_images/thumbs/mid_'.$UserReview[$r]['photo'];
  245. }
  246. else
  247. {
  248. $UserReview[$r]['userlink'] = '#';
  249. if($UserReview[$r]['photo'] == '')
  250. $img = 'images/student_thumb.jpg';
  251. else
  252. $img = 'uploaded/user_images/thumbs/mid_'.$UserReview[$r]['photo'];
  253. }
  254. $UserReview[$r]['img'] = $img;
  255. }
  256. //echo '<pre>';print_r($UserReview_Individual);exit;
  257. // Selecting favourite coach
  258. //if($_SESSION['user_type'] == '2')
  259. //{
  260. // $q_fav = "SELECT * FROM ".TABLEPREFIX."_user_fav_coach WHERE user_id='".$_SESSION['user_id']."' AND coach_id='$coach_id'";
  261. // $FavArr = $UserManagerObjAjax->GetRecords("Row",$q_fav);
  262. // if($FavArr['fav_coach_id'] >0)
  263. // $is_fav = 1;
  264. // else
  265. // $is_fav=0;
  266. //}
  267. $city = findvalue(TABLEPREFIX."_cities","city_id",$availability_city,"city_key");
  268. $gameSql = "SELECT game_id,game_name FROM ".TABLEPREFIX."_game where status=1 ORDER BY game_name";
  269. $GameArr = $UserManagerObjAjax->HtmlOptionArrayCreate($gameSql);
  270. $friendsSql = "SELECT * FROM ".TABLEPREFIX."_user_friends_list WHERE friend_status = 2 AND ((nk_user_id_owner='".$_SESSION['user_id']."' or nk_user_id_friend='".$_SESSION['user_id']."') and (nk_user_id_owner='".$coach_id."' or nk_user_id_friend='".$coach_id."'))";
  271. $friendsArr = $UserManagerObjAjax->GetRecords("All",$friendsSql);
  272. $isfriend = "n";
  273. for($t=0;$t<count($friendsArr);$t++){
  274. if($friendsArr[$t]['nk_user_id_friend'] == $coach_id || $friendsArr[$t]['nk_user_id_owner'] == $coach_id){
  275. $isfriend = "y";
  276. break;
  277. }
  278. }
  279. $recentLessons = "SELECT * FROM ".TABLEPREFIX."_lesson l, ".TABLEPREFIX."_user u, ".TABLEPREFIX."_game g WHERE l.end < SYSDATE() AND l.coach_id = '".$coach_id."' AND u.user_id = l.student_id AND g.game_id = l.game_id ORDER BY lesson_id DESC LIMIT 0, 5";
  280. $recentLessonsArr = $UserManagerObjAjax->GetRecords("All",$recentLessons);
  281. $NumLessons = count($recentLessonsArr);
  282. for($i=0;$i<$NumLessons;$i++){
  283. $recentLessonsArr[$i]['status'] = getUserStatus($recentLessonsArr[$i]);
  284. for($t=0;$t<count($friendsArr);$t++){
  285. if($friendsArr[$t]['nk_user_id_friend'] == $coach_id || $friendsArr[$t]['nk_user_id_owner'] == $recentLessonsArr[$i]['user_id']){
  286. $recentLessonsArr[$i]['isfriend'] = "y";
  287. break;
  288. }
  289. }
  290. }
  291. $toreviewSql= "SELECT * FROM ".TABLEPREFIX."_lesson WHERE student_id = '".$logged_user."' AND coach_id = '".$coach_id."' AND reviewed = 0";
  292. $toreviewArr = $UserManagerObjAjax->GetRecords("All",$toreviewSql);
  293. $Numtoreview = count($toreviewArr);
  294. $online_status = getUserStatus($CoachArr);
  295. $smarty->assign('Numtoreview',$Numtoreview);
  296. $smarty->assign('toreviewArr',$toreviewArr);
  297. $smarty->assign('online_status',$online_status);
  298. $smarty->assign('isfriend',$isfriend);
  299. $smarty->assign('price',$price);
  300. $smarty->assign('prop_id',$prop_id);
  301. $smarty->assign('language_id',$language_id);
  302. $smarty->assign('availability',$availability);
  303. $smarty->assign('city',$city);
  304. $smarty->assign('cityid',$availability_city);
  305. $smarty->assign('availability_country',$availability_country);
  306. $smarty->assign('availability_city',$availability_city);
  307. $smarty->assign('game_id',$game_id);
  308. $smarty->assign("GameArr",$GameArr);
  309. $smarty->assign('RatingCatArr',$RatingCatArr);
  310. $smarty->assign('NumReview',$NumReview);
  311. $smarty->assign('NumLessons',$NumLessons);
  312. $smarty->assign('recentLessonsArr',$recentLessonsArr);
  313. $smarty->assign('UserReview',$UserReview);
  314. $smarty->assign('Numcoachgame',$Numcoachgame);
  315. $smarty->assign('Numvideo',$Numvideo);
  316. $smarty->assign('CoachvideoArr',$CoachvideoArr);
  317. $smarty->assign('CoachgameArr',$CoachgameArr);
  318. $smarty->assign('CoachArr',$CoachArr);
  319. $smarty->assign('coach_id',$coach_id);
  320. $smarty->assign('is_fav',$is_fav);
  321. //$smarty->assign('fav_id',$FavArr['fav_coach_id']);
  322. $smarty->assign('IsProcess',$IsProcess);
  323. $smarty->assign('pagination_arr',$pagination_arr);
  324. $smarty->assign('page_name',$page_name);
  325. $smarty->assign('NumRatingCat',$NumRatingCat);
  326. $smarty->assign('RatingCatArr',$RatingCatArr);
  327. $smarty->assign('logged_user',$logged_user);
  328. $smarty->assign('CatIndividualRec',$CatIndividualRec);
  329. $smarty->assign('UserReview_Individual',$UserReview_Individual);
  330. $smarty->assign('CoachOverallArr',$CoachOverallArr);
  331. $smarty->assign('ratingArr',$ratingArr);
  332. if($IsProcess <> 'Y')
  333. include "coach_leftpanel.php";
  334. $smarty->display('coachdetails.tpl');
  335. if($IsProcess <> 'Y')
  336. include "footer.php";
  337. ?>