@@ 7099-7108 (lines=10) @@ | ||
7096 | ||
7097 | if ($id != 0 && is_array($extra_info)) { |
|
7098 | $item_title = stripslashes($extra_info['title']); |
|
7099 | } elseif (is_numeric($extra_info)) { |
|
7100 | $sql = "SELECT thread_title as title FROM $tbl_forum |
|
7101 | WHERE c_id = $course_id AND thread_id = " . $extra_info; |
|
7102 | ||
7103 | $result = Database::query($sql); |
|
7104 | $row = Database :: fetch_array($result); |
|
7105 | ||
7106 | $item_title = $row['title']; |
|
7107 | $item_description = ''; |
|
7108 | } else { |
|
7109 | $item_title = ''; |
|
7110 | $item_description = ''; |
|
7111 | } |
@@ 5963-5975 (lines=13) @@ | ||
5960 | $sql = "SELECT thematic_id FROM $table_tool |
|
5961 | WHERE c_id = $course_id AND id = $ref"; |
|
5962 | $rs_thematic = Database::query($sql); |
|
5963 | if (Database::num_rows($rs_thematic)) { |
|
5964 | $row_thematic = Database::fetch_array($rs_thematic); |
|
5965 | $thematic_id = $row_thematic['thematic_id']; |
|
5966 | ||
5967 | $sql = "SELECT session.id, session.name, user.username |
|
5968 | FROM $tbl_thematic t, $table_session session, $table_user user |
|
5969 | WHERE |
|
5970 | t.c_id = $course_id AND |
|
5971 | t.session_id = session.id AND |
|
5972 | session.id_coach = user.user_id AND |
|
5973 | t.id = $thematic_id"; |
|
5974 | $recorset = Database::query($sql); |
|
5975 | } |
|
5976 | } else { |
|
5977 | $sql = "SELECT session.id, session.name, user.username |
|
5978 | FROM $table_tool tool, $table_session session, $table_user user |