| @@ 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 | } |
|
| @@ 5933-5945 (lines=13) @@ | ||
| 5930 | $sql = "SELECT thematic_id FROM $table_tool |
|
| 5931 | WHERE c_id = $course_id AND id = $ref"; |
|
| 5932 | $rs_thematic = Database::query($sql); |
|
| 5933 | if (Database::num_rows($rs_thematic)) { |
|
| 5934 | $row_thematic = Database::fetch_array($rs_thematic); |
|
| 5935 | $thematic_id = $row_thematic['thematic_id']; |
|
| 5936 | ||
| 5937 | $sql = "SELECT session.id, session.name, user.username |
|
| 5938 | FROM $tbl_thematic t, $table_session session, $table_user user |
|
| 5939 | WHERE |
|
| 5940 | t.c_id = $course_id AND |
|
| 5941 | t.session_id = session.id AND |
|
| 5942 | session.id_coach = user.user_id AND |
|
| 5943 | t.id = $thematic_id"; |
|
| 5944 | $recorset = Database::query($sql); |
|
| 5945 | } |
|
| 5946 | } else { |
|
| 5947 | $sql = "SELECT session.id, session.name, user.username |
|
| 5948 | FROM $table_tool tool, $table_session session, $table_user user |
|