@@ 7101-7110 (lines=10) @@ | ||
7098 | ||
7099 | if ($id != 0 && is_array($extra_info)) { |
|
7100 | $item_title = stripslashes($extra_info['title']); |
|
7101 | } elseif (is_numeric($extra_info)) { |
|
7102 | $sql = "SELECT thread_title as title FROM $tbl_forum |
|
7103 | WHERE c_id = $course_id AND thread_id = " . $extra_info; |
|
7104 | ||
7105 | $result = Database::query($sql); |
|
7106 | $row = Database :: fetch_array($result); |
|
7107 | ||
7108 | $item_title = $row['title']; |
|
7109 | $item_description = ''; |
|
7110 | } else { |
|
7111 | $item_title = ''; |
|
7112 | $item_description = ''; |
|
7113 | } |
@@ 5973-5985 (lines=13) @@ | ||
5970 | $sql = "SELECT thematic_id FROM $table_tool |
|
5971 | WHERE c_id = $course_id AND id = $ref"; |
|
5972 | $rs_thematic = Database::query($sql); |
|
5973 | if (Database::num_rows($rs_thematic)) { |
|
5974 | $row_thematic = Database::fetch_array($rs_thematic); |
|
5975 | $thematic_id = $row_thematic['thematic_id']; |
|
5976 | ||
5977 | $sql = "SELECT session.id, session.name, user.username |
|
5978 | FROM $tbl_thematic t, $table_session session, $table_user user |
|
5979 | WHERE |
|
5980 | t.c_id = $course_id AND |
|
5981 | t.session_id = session.id AND |
|
5982 | session.id_coach = user.user_id AND |
|
5983 | t.id = $thematic_id"; |
|
5984 | $recorset = Database::query($sql); |
|
5985 | } |
|
5986 | } else { |
|
5987 | $sql = "SELECT session.id, session.name, user.username |
|
5988 | FROM $table_tool tool, $table_session session, $table_user user |