| @@ 7039-7048 (lines=10) @@ | ||
| 7036 | ||
| 7037 | if ($id != 0 && is_array($extra_info)) { |
|
| 7038 | $item_title = stripslashes($extra_info['title']); |
|
| 7039 | } elseif (is_numeric($extra_info)) { |
|
| 7040 | $sql = "SELECT thread_title as title FROM $tbl_forum |
|
| 7041 | WHERE c_id = $course_id AND thread_id = " . $extra_info; |
|
| 7042 | ||
| 7043 | $result = Database::query($sql); |
|
| 7044 | $row = Database :: fetch_array($result); |
|
| 7045 | ||
| 7046 | $item_title = $row['title']; |
|
| 7047 | $item_description = ''; |
|
| 7048 | } else { |
|
| 7049 | $item_title = ''; |
|
| 7050 | $item_description = ''; |
|
| 7051 | } |
|
| @@ 5806-5818 (lines=13) @@ | ||
| 5803 | $sql = "SELECT thematic_id FROM $table_tool |
|
| 5804 | WHERE c_id = $course_id AND id = $ref"; |
|
| 5805 | $rs_thematic = Database::query($sql); |
|
| 5806 | if (Database::num_rows($rs_thematic)) { |
|
| 5807 | $row_thematic = Database::fetch_array($rs_thematic); |
|
| 5808 | $thematic_id = $row_thematic['thematic_id']; |
|
| 5809 | ||
| 5810 | $sql = "SELECT session.id, session.name, user.username |
|
| 5811 | FROM $tbl_thematic t, $table_session session, $table_user user |
|
| 5812 | WHERE |
|
| 5813 | t.c_id = $course_id AND |
|
| 5814 | t.session_id = session.id AND |
|
| 5815 | session.id_coach = user.user_id AND |
|
| 5816 | t.id = $thematic_id"; |
|
| 5817 | $recorset = Database::query($sql); |
|
| 5818 | } |
|
| 5819 | } else { |
|
| 5820 | $sql = "SELECT session.id, session.name, user.username |
|
| 5821 | FROM $table_tool tool, $table_session session, $table_user user |
|