@@ -19,14 +19,14 @@ discard block |
||
19 | 19 | |
20 | 20 | $this_section = SECTION_TRACKING; |
21 | 21 | |
22 | -$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace')); |
|
22 | +$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace')); |
|
23 | 23 | |
24 | 24 | if (isset($_GET["user_id"]) && $_GET["user_id"] != "" && !isset($_GET["type"])) { |
25 | - $interbreadcrumb[] = array ("url" => "teachers.php", "name" => get_lang('Teachers')); |
|
25 | + $interbreadcrumb[] = array("url" => "teachers.php", "name" => get_lang('Teachers')); |
|
26 | 26 | } |
27 | 27 | |
28 | -if (isset($_GET["user_id"]) && $_GET["user_id"]!="" && isset($_GET["type"]) && $_GET["type"] == "coach") { |
|
29 | - $interbreadcrumb[] = array ("url" => "coaches.php", "name" => get_lang('Tutors')); |
|
28 | +if (isset($_GET["user_id"]) && $_GET["user_id"] != "" && isset($_GET["type"]) && $_GET["type"] == "coach") { |
|
29 | + $interbreadcrumb[] = array("url" => "coaches.php", "name" => get_lang('Tutors')); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | function get_count_users() |
@@ -121,8 +121,8 @@ discard block |
||
121 | 121 | $courseInfo = api_get_course_info($course_code); |
122 | 122 | $courseId = $courseInfo['real_id']; |
123 | 123 | if (CourseManager :: is_user_subscribed_in_course($student_id, $course_code, true)) { |
124 | - $avg_time_spent += Tracking :: get_time_spent_on_the_course($student_id, $courseId, $_GET['id_session']); |
|
125 | - $my_average = Tracking :: get_avg_student_score($student_id, $course_code); |
|
124 | + $avg_time_spent += Tracking :: get_time_spent_on_the_course($student_id, $courseId, $_GET['id_session']); |
|
125 | + $my_average = Tracking :: get_avg_student_score($student_id, $course_code); |
|
126 | 126 | if (is_numeric($my_average)) { |
127 | 127 | $avg_student_score += $my_average; |
128 | 128 | } |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | $detailsLink = '<a href="myStudents.php?student='.$student_id.'&id_coach='.$coach_id.'&id_session='.$_GET['id_session'].'"> |
162 | 162 | <img src="'.api_get_path(WEB_IMG_PATH).'icons/22/2rightarrow.png" border="0" /></a>'; |
163 | 163 | } else { |
164 | - $detailsLink = '<a href="myStudents.php?student='.$student_id.'"> |
|
164 | + $detailsLink = '<a href="myStudents.php?student='.$student_id.'"> |
|
165 | 165 | <img src="'.api_get_path(WEB_IMG_PATH).'icons/22/2rightarrow.png" border="0" /></a>'; |
166 | 166 | } |
167 | 167 | |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | |
191 | 191 | if (api_is_drh()) { |
192 | 192 | $menu_items = array( |
193 | - Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH)."auth/my_progress.php" ), |
|
193 | + Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH)."auth/my_progress.php"), |
|
194 | 194 | Display::url(Display::return_icon('user_na.png', get_lang('Students'), array(), ICON_SIZE_MEDIUM), '#'), |
195 | 195 | Display::url(Display::return_icon('teacher.png', get_lang('Trainers'), array(), ICON_SIZE_MEDIUM), 'teachers.php'), |
196 | 196 | Display::url(Display::return_icon('course.png', get_lang('Courses'), array(), ICON_SIZE_MEDIUM), 'course.php'), |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | ); |
219 | 219 | $actionsLeft .= Display::url( |
220 | 220 | Display::return_icon("statistics.png", get_lang("CompanyReport"), array(), ICON_SIZE_MEDIUM), |
221 | - api_get_path(WEB_CODE_PATH) . "mySpace/company_reports.php" |
|
221 | + api_get_path(WEB_CODE_PATH)."mySpace/company_reports.php" |
|
222 | 222 | ); |
223 | 223 | $actionsLeft .= Display::url( |
224 | 224 | Display::return_icon( |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | [], |
228 | 228 | ICON_SIZE_MEDIUM |
229 | 229 | ), |
230 | - api_get_path(WEB_CODE_PATH) . "gradebook/certificate_report.php" |
|
230 | + api_get_path(WEB_CODE_PATH)."gradebook/certificate_report.php" |
|
231 | 231 | ); |
232 | 232 | } |
233 | 233 | |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | ); |
243 | 243 | |
244 | 244 | |
245 | -$toolbar = Display::toolbarAction('toolbar-student', $content = array( 0 => $actionsLeft, 1 => $actionsRight )); |
|
245 | +$toolbar = Display::toolbarAction('toolbar-student', $content = array(0 => $actionsLeft, 1 => $actionsRight)); |
|
246 | 246 | |
247 | 247 | $table = new SortableTable( |
248 | 248 | 'tracking_student', |
@@ -35,13 +35,13 @@ discard block |
||
35 | 35 | } |
36 | 36 | $sql = "SELECT user.user_id,lastname,firstname,email |
37 | 37 | FROM $tbl_user as user, $tbl_admin as admin |
38 | - WHERE admin.user_id=user.user_id" . $order_clause; |
|
38 | + WHERE admin.user_id=user.user_id".$order_clause; |
|
39 | 39 | $result_admins = Database::query($sql); |
40 | 40 | |
41 | 41 | if (api_is_western_name_order()) { |
42 | - echo '<table class="data_table"><tr><th>' . get_lang('FirstName') . '</th><th>' . get_lang('LastName') . '</th><th>' . get_lang('Email') . '</th></tr>'; |
|
42 | + echo '<table class="data_table"><tr><th>'.get_lang('FirstName').'</th><th>'.get_lang('LastName').'</th><th>'.get_lang('Email').'</th></tr>'; |
|
43 | 43 | } else { |
44 | - echo '<table class="data_table"><tr><th>' . get_lang('LastName') . '</th><th>' . get_lang('FirstName') . '</th><th>' . get_lang('Email') . '</th></tr>'; |
|
44 | + echo '<table class="data_table"><tr><th>'.get_lang('LastName').'</th><th>'.get_lang('FirstName').'</th><th>'.get_lang('Email').'</th></tr>'; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | if (api_is_western_name_order(PERSON_NAME_DATA_EXPORT)) { |
@@ -65,9 +65,9 @@ discard block |
||
65 | 65 | $css_class = "row_odd"; |
66 | 66 | if ($i % 20 == 0 && $i != 0) { |
67 | 67 | if (api_is_western_name_order()) { |
68 | - echo '<tr><th>' . get_lang('FirstName') . '</th><th>' . get_lang('LastName') . '</th><th>' . get_lang('Email') . '</th></tr>'; |
|
68 | + echo '<tr><th>'.get_lang('FirstName').'</th><th>'.get_lang('LastName').'</th><th>'.get_lang('Email').'</th></tr>'; |
|
69 | 69 | } else { |
70 | - echo '<tr><th>' . get_lang('LastName') . '</th><th>' . get_lang('FirstName') . '</th><th>' . get_lang('Email') . '</th></tr>'; |
|
70 | + echo '<tr><th>'.get_lang('LastName').'</th><th>'.get_lang('FirstName').'</th><th>'.get_lang('Email').'</th></tr>'; |
|
71 | 71 | } |
72 | 72 | } |
73 | 73 | } else { |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | $i++; |
78 | 78 | |
79 | 79 | if (api_is_western_name_order()) { |
80 | - echo "<tr class=" . $css_class . "><td>$firstname</td><td>$lastname</td><td><a href='mailto:" . $email . "'>$email</a></td></tr>"; |
|
80 | + echo "<tr class=".$css_class."><td>$firstname</td><td>$lastname</td><td><a href='mailto:".$email."'>$email</a></td></tr>"; |
|
81 | 81 | } else { |
82 | - echo "<tr class=" . $css_class . "><td>$lastname</td><td>$firstname</td><td><a href='mailto:" . $email . "'>$email</a></td></tr>"; |
|
82 | + echo "<tr class=".$css_class."><td>$lastname</td><td>$firstname</td><td><a href='mailto:".$email."'>$email</a></td></tr>"; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | if (api_is_western_name_order(PERSON_NAME_DATA_EXPORT)) { |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | } |
94 | 94 | } else { |
95 | 95 | // No results |
96 | - echo '<tr><td colspan="3">' . get_lang('NoResults') . '</td></tr>'; |
|
96 | + echo '<tr><td colspan="3">'.get_lang('NoResults').'</td></tr>'; |
|
97 | 97 | } |
98 | 98 | echo '</table>'; |
99 | 99 | |
@@ -104,8 +104,8 @@ discard block |
||
104 | 104 | echo " |
105 | 105 | <br /><br /> |
106 | 106 | <form method='post' action='admin.php'> |
107 | - <button type='submit' class='save' name='export' value='" . get_lang('ExportExcel') . "'> |
|
108 | - " . get_lang('ExportExcel') . " |
|
107 | + <button type='submit' class='save' name='export' value='" . get_lang('ExportExcel')."'> |
|
108 | + " . get_lang('ExportExcel')." |
|
109 | 109 | </button> |
110 | 110 | <form> |
111 | 111 | "; |
@@ -20,14 +20,14 @@ discard block |
||
20 | 20 | |
21 | 21 | $this_section = SECTION_TRACKING; |
22 | 22 | |
23 | -$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace')); |
|
23 | +$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace')); |
|
24 | 24 | |
25 | 25 | if (isset($_GET["user_id"]) && $_GET["user_id"] != "" && !isset($_GET["type"])) { |
26 | - $interbreadcrumb[] = array ("url" => "teachers.php", "name" => get_lang('Teachers')); |
|
26 | + $interbreadcrumb[] = array("url" => "teachers.php", "name" => get_lang('Teachers')); |
|
27 | 27 | } |
28 | 28 | |
29 | -if (isset($_GET["user_id"]) && $_GET["user_id"]!="" && isset($_GET["type"]) && $_GET["type"] == "coach") { |
|
30 | - $interbreadcrumb[] = array ("url" => "coaches.php", "name" => get_lang('Tutors')); |
|
29 | +if (isset($_GET["user_id"]) && $_GET["user_id"] != "" && isset($_GET["type"]) && $_GET["type"] == "coach") { |
|
30 | + $interbreadcrumb[] = array("url" => "coaches.php", "name" => get_lang('Tutors')); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | function get_count_users() |
@@ -122,8 +122,8 @@ discard block |
||
122 | 122 | $courseInfo = api_get_course_info($course_code); |
123 | 123 | $courseId = $courseInfo['real_id']; |
124 | 124 | if (CourseManager :: is_user_subscribed_in_course($student_id, $course_code, true)) { |
125 | - $avg_time_spent += Tracking :: get_time_spent_on_the_course($student_id, $courseId, $_GET['id_session']); |
|
126 | - $my_average = Tracking :: get_avg_student_score($student_id, $course_code); |
|
125 | + $avg_time_spent += Tracking :: get_time_spent_on_the_course($student_id, $courseId, $_GET['id_session']); |
|
126 | + $my_average = Tracking :: get_avg_student_score($student_id, $course_code); |
|
127 | 127 | if (is_numeric($my_average)) { |
128 | 128 | $avg_student_score += $my_average; |
129 | 129 | } |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | $detailsLink = '<a href="myStudents.php?student='.$student_id.'&id_coach='.$coach_id.'&id_session='.$_GET['id_session'].'"> |
163 | 163 | '.Display::return_icon('2rightarrow.png', get_lang('Details')).'</a>'; |
164 | 164 | } else { |
165 | - $detailsLink = '<a href="myStudents.php?student='.$student_id.'"> |
|
165 | + $detailsLink = '<a href="myStudents.php?student='.$student_id.'"> |
|
166 | 166 | '.Display::return_icon('2rightarrow.png', get_lang('Details')).'</a>'; |
167 | 167 | } |
168 | 168 | $row[] = $detailsLink; |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | $actionsLeft = ''; |
182 | 182 | if (api_is_drh()) { |
183 | 183 | $menu_items = array( |
184 | - Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH)."auth/my_progress.php" ), |
|
184 | + Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH)."auth/my_progress.php"), |
|
185 | 185 | Display::url(Display::return_icon('user.png', get_lang('Students'), array(), ICON_SIZE_MEDIUM), 'student.php'), |
186 | 186 | Display::url(Display::return_icon('teacher_na.png', get_lang('Trainers'), array(), ICON_SIZE_MEDIUM), 'teachers.php'), |
187 | 187 | Display::url(Display::return_icon('course.png', get_lang('Courses'), array(), ICON_SIZE_MEDIUM), 'course.php'), |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | ); |
209 | 209 | |
210 | 210 | |
211 | -$toolbar = Display::toolbarAction('toolbar-teachers', $content = array( 0 => $actionsLeft, 1 => $actionsRight )); |
|
211 | +$toolbar = Display::toolbarAction('toolbar-teachers', $content = array(0 => $actionsLeft, 1 => $actionsRight)); |
|
212 | 212 | |
213 | 213 | $table = new SortableTable( |
214 | 214 | 'tracking_teachers', |
@@ -138,7 +138,7 @@ |
||
138 | 138 | </div><br /> |
139 | 139 | <div id="cev_cont_stats"> |
140 | 140 | <?php |
141 | - if ($result_to_print != "") { |
|
141 | + if ($result_to_print != "") { |
|
142 | 142 | $rst = get_stats($user_id, $courseId); |
143 | 143 | $foo_stats = '<strong>'.get_lang('Total').': </strong>'.$rst['total'].'<br />'; |
144 | 144 | $foo_stats .= '<strong>'.get_lang('Average').': </strong>'.$rst['avg'].'<br />'; |
@@ -137,19 +137,19 @@ discard block |
||
137 | 137 | switch ($type) { |
138 | 138 | case DIFF_EQUAL: |
139 | 139 | // return $line. ' : ' . ' = <span class="diffEqual" >' . $value . '</span><br />' . "\n" ; |
140 | - return '<span class="diffEqual" >' . $value . '</span><br />' . "\n"; //juan carlos muestra solo color |
|
140 | + return '<span class="diffEqual" >'.$value.'</span><br />'."\n"; //juan carlos muestra solo color |
|
141 | 141 | break; |
142 | 142 | case DIFF_MOVED: |
143 | 143 | //return $line. ' : ' . ' M <span class="diffMoved" >' . $value . '</span><br />' . "\n" ; //juan carlos ra�a la sustitye la inverior |
144 | - return '<span class="diffMoved" >' . $value . '</span><br />' . "\n"; //juan carlos muestra solo color |
|
144 | + return '<span class="diffMoved" >'.$value.'</span><br />'."\n"; //juan carlos muestra solo color |
|
145 | 145 | break; |
146 | 146 | case DIFF_ADDED: |
147 | 147 | //return $line . ' : ' . ' + <span class="diffAdded" >' . $value . '</span><br />' . "\n" ; |
148 | - return '<span class="diffAdded" >' . $value . '</span><br />' . "\n"; //juan carlos muestra solo color |
|
148 | + return '<span class="diffAdded" >'.$value.'</span><br />'."\n"; //juan carlos muestra solo color |
|
149 | 149 | break; |
150 | 150 | case DIFF_DELETED: |
151 | 151 | //return $line . ' : ' . ' - <span class="diffDeleted" >' . $value . '</span><br />' . "\n" ; //juan carlos ra�a la sustitye la inverior |
152 | - return '<span class="diffDeleted" >' . $value . '</span><br />' . "\n"; //juan carlos muestra solo color |
|
152 | + return '<span class="diffDeleted" >'.$value.'</span><br />'."\n"; //juan carlos muestra solo color |
|
153 | 153 | break; |
154 | 154 | } |
155 | 155 | } |
@@ -169,19 +169,19 @@ discard block |
||
169 | 169 | switch ($type) { |
170 | 170 | case DIFF_EQUAL: |
171 | 171 | //return '<tr><td>' . $line. ' : ' . ' =</td><td><span class="diffEqual" >' . $value . '</span></td></tr>' . "\n"; //juan carlos comentado |
172 | - return '<tr><td></td><td bgcolor="#FFFFFF">' . $value . '</td></tr>' . "\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente. |
|
172 | + return '<tr><td></td><td bgcolor="#FFFFFF">'.$value.'</td></tr>'."\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente. |
|
173 | 173 | break; |
174 | 174 | case DIFF_MOVED: |
175 | 175 | // return '<tr><td>' . $line. ' : ' . ' M</td><td><span class="diffMoved" >' . $value . '</span></td></tr>' . "\n" //juan carlos comenta |
176 | 176 | |
177 | - return '<tr><td></td><td bgcolor="#FFFFAA">' . $value . '</td></tr>' . "\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente. |
|
177 | + return '<tr><td></td><td bgcolor="#FFFFAA">'.$value.'</td></tr>'."\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente. |
|
178 | 178 | break; |
179 | 179 | case DIFF_ADDED: |
180 | 180 | // return '<tr><td>' . $line. ' : ' . ' +</td><td><span class="diffAdded" >' . $value . '</span></td></tr>' . "\n" ; //juan carlos comentado |
181 | - return '<tr><td></td><td bgcolor="#CCFFCC">' . $value . '</td></tr>' . "\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente. |
|
181 | + return '<tr><td></td><td bgcolor="#CCFFCC">'.$value.'</td></tr>'."\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente. |
|
182 | 182 | break; |
183 | 183 | case DIFF_DELETED: |
184 | 184 | // return '<tr><td>' . $line. ' : ' . ' -</td><td><span class="diffDeleted" >' . $value . '</span></td></tr>' . "\n" ; //juan carlos comentado |
185 | - return '<tr><td></td><td bgcolor="#FFAAAA">' . $value . '</td></tr>' . "\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente. |
|
185 | + return '<tr><td></td><td bgcolor="#FFAAAA">'.$value.'</td></tr>'."\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente. |
|
186 | 186 | } |
187 | 187 | } |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | // section (for the tabs) |
20 | 20 | $this_section = SECTION_COURSES; |
21 | -$current_course_tool = TOOL_WIKI; |
|
21 | +$current_course_tool = TOOL_WIKI; |
|
22 | 22 | |
23 | 23 | $course_id = api_get_course_int_id(); |
24 | 24 | $session_id = api_get_session_id(); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $groupId = api_get_group_id(); |
28 | 28 | |
29 | 29 | // additional style information |
30 | -$htmlHeadXtra[] ='<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_CODE_PATH).'wiki/css/default.css"/>'; |
|
30 | +$htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_CODE_PATH).'wiki/css/default.css"/>'; |
|
31 | 31 | |
32 | 32 | // javascript for advanced parameters menu |
33 | 33 | $htmlHeadXtra[] = '<script> |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | //ensure this tool in groups whe it's private or deactivated |
73 | 73 | if ($group_properties['wiki_state'] == 0) { |
74 | 74 | api_not_allowed(); |
75 | - } elseif ($group_properties['wiki_state']==2) { |
|
75 | + } elseif ($group_properties['wiki_state'] == 2) { |
|
76 | 76 | if (!api_is_allowed_to_edit(false, true) and |
77 | 77 | !GroupManager :: is_user_in_group(api_get_user_id(), api_get_group_id()) |
78 | 78 | ) { |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $is_allowed_to_edit = api_is_allowed_to_edit(false, true); |
85 | 85 | |
86 | 86 | // The page we are dealing with |
87 | -$page = isset($_GET['title']) ? $_GET['title']: 'index'; |
|
87 | +$page = isset($_GET['title']) ? $_GET['title'] : 'index'; |
|
88 | 88 | $action = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : 'showpage'; |
89 | 89 | $view = isset($_GET['view']) ? Security::remove_XSS($_GET['view']) : null; |
90 | 90 |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $doc_url = str_replace(' ', '+', $doc_url); |
32 | 32 | $doc_url = str_replace('/..', '', $doc_url); //echo $doc_url; |
33 | 33 | |
34 | -if (! isset($_course)) { |
|
34 | +if (!isset($_course)) { |
|
35 | 35 | api_not_allowed(true); |
36 | 36 | } |
37 | 37 | |
@@ -51,11 +51,11 @@ discard block |
||
51 | 51 | exit; |
52 | 52 | } |
53 | 53 | |
54 | -$tbl_forum_attachment = Database::get_course_table(TABLE_FORUM_ATTACHMENT); |
|
54 | +$tbl_forum_attachment = Database::get_course_table(TABLE_FORUM_ATTACHMENT); |
|
55 | 55 | $tbl_forum_post = Database::get_course_table(TABLE_FORUM_POST); |
56 | 56 | |
57 | 57 | $course_id = api_get_course_int_id(); |
58 | -$courseInfo = api_get_course_info_by_id($course_id); |
|
58 | +$courseInfo = api_get_course_info_by_id($course_id); |
|
59 | 59 | |
60 | 60 | // launch event |
61 | 61 | Event::event_download($doc_url); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | api_get_session_id() |
86 | 86 | ); |
87 | 87 | |
88 | -if ($forum_thread_visibility==1 && $forum_forum_visibility==1) { |
|
88 | +if ($forum_thread_visibility == 1 && $forum_forum_visibility == 1) { |
|
89 | 89 | if (Security::check_abs_path( |
90 | 90 | $full_file_name, |
91 | 91 | api_get_path(SYS_COURSE_PATH).$courseInfo['path'].'/upload/forum/') |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * @package chamilo.forum |
22 | 22 | */ |
23 | 23 | |
24 | -$forumUrl = api_get_path(WEB_CODE_PATH) . 'forum/'; |
|
24 | +$forumUrl = api_get_path(WEB_CODE_PATH).'forum/'; |
|
25 | 25 | $_user = api_get_user_info(); |
26 | 26 | $sortDirection = isset($_GET['posts_order']) && $_GET['posts_order'] === 'desc' ? 'DESC' : 'ASC'; |
27 | 27 | $rows = getPosts($_GET['thread'], $sortDirection, true); |
@@ -42,13 +42,13 @@ discard block |
||
42 | 42 | // Are we in a lp ? |
43 | 43 | $origin = ''; |
44 | 44 | if (isset($_GET['origin'])) { |
45 | - $origin = Security::remove_XSS($_GET['origin']); |
|
45 | + $origin = Security::remove_XSS($_GET['origin']); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | // Delete attachment file. |
49 | 49 | if ( |
50 | 50 | isset($_GET['action']) && |
51 | - $_GET['action']=='delete_attach' && |
|
51 | + $_GET['action'] == 'delete_attach' && |
|
52 | 52 | isset($_GET['id_attach']) |
53 | 53 | ) { |
54 | 54 | delete_attachment(0, $_GET['id_attach']); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | // Displaying the thread (structure) |
61 | 61 | |
62 | -$thread_structure = "<div class=\"structure\">" .get_lang('Structure')."</div>"; |
|
62 | +$thread_structure = "<div class=\"structure\">".get_lang('Structure')."</div>"; |
|
63 | 63 | $counter = 0; |
64 | 64 | $count = 0; |
65 | 65 | $prev_next_array = array(); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | foreach ($rows as $post) { |
72 | 72 | $counter++; |
73 | 73 | $indent = $post['indent_cnt'] * '20'; |
74 | - $thread_structure .= "<div style=\"margin-left: " . $indent . "px;\">"; |
|
74 | + $thread_structure .= "<div style=\"margin-left: ".$indent."px;\">"; |
|
75 | 75 | |
76 | 76 | if ( |
77 | 77 | !empty($whatsnew_post_info[$forumId][$post['thread_id']]) && |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $counter == 1 AND !isset($_GET['post']) |
90 | 90 | ) |
91 | 91 | ) { |
92 | - $thread_structure .= '<strong>' .prepare4display($post['post_title']) . '</strong></div>'; |
|
92 | + $thread_structure .= '<strong>'.prepare4display($post['post_title']).'</strong></div>'; |
|
93 | 93 | $prev_next_array[] = $post['post_id']; |
94 | 94 | } else { |
95 | 95 | if ($post['visible'] == '0') { |
@@ -98,10 +98,10 @@ discard block |
||
98 | 98 | $class = ''; |
99 | 99 | } |
100 | 100 | $count_loop = ($count == 0) ? '&id=1' : ''; |
101 | - $thread_structure .= "<a href=\"viewthread.php?" . api_get_cidreq() . |
|
102 | - "&forum=" . $forumId . "&thread=" . $threadId . |
|
103 | - "&post=" . $post['post_id'] . "&origin=$origin$count_loop\"" . |
|
104 | - "$class>" . prepare4display($post['post_title']) . "</a></div>"; |
|
101 | + $thread_structure .= "<a href=\"viewthread.php?".api_get_cidreq(). |
|
102 | + "&forum=".$forumId."&thread=".$threadId. |
|
103 | + "&post=".$post['post_id']."&origin=$origin$count_loop\"". |
|
104 | + "$class>".prepare4display($post['post_title'])."</a></div>"; |
|
105 | 105 | $prev_next_array[] = $post['post_id']; |
106 | 106 | } |
107 | 107 | $count++; |
@@ -148,43 +148,43 @@ discard block |
||
148 | 148 | $class_next = ''; |
149 | 149 | |
150 | 150 | // Links |
151 | -$first_href = $forumUrl . 'viewthread.php?' . api_get_cidreq() . |
|
152 | - '&forum=' . $forumId . '&thread=' . $threadId . |
|
153 | - '&gradebook=' . $gradebook . '&id=1&post=' . $prev_next_array[0]; |
|
154 | -$last_href = $forumUrl . 'viewthread.php?' . api_get_cidreq() . |
|
155 | - '&forum=' . $forumId . '&thread=' . $threadId . |
|
156 | - '&gradebook=' . $gradebook . '&post=' . $prev_next_array[$max-1]; |
|
157 | -$prev_href = $forumUrl . 'viewthread.php?' . api_get_cidreq() . |
|
158 | - '&forum=' . $forumId . '&thread=' . $threadId . |
|
159 | - '&gradebook=' . $gradebook . '&post=' . $prev_next_array[$prev_id]; |
|
160 | -$next_href = $forumUrl . 'viewthread.php?' . api_get_cidreq() . |
|
161 | - '&forum=' . $forumId . '&thread=' . $threadId . |
|
162 | - '&post=' . $prev_next_array[$next_id]; |
|
151 | +$first_href = $forumUrl.'viewthread.php?'.api_get_cidreq(). |
|
152 | + '&forum='.$forumId.'&thread='.$threadId. |
|
153 | + '&gradebook='.$gradebook.'&id=1&post='.$prev_next_array[0]; |
|
154 | +$last_href = $forumUrl.'viewthread.php?'.api_get_cidreq(). |
|
155 | + '&forum='.$forumId.'&thread='.$threadId. |
|
156 | + '&gradebook='.$gradebook.'&post='.$prev_next_array[$max - 1]; |
|
157 | +$prev_href = $forumUrl.'viewthread.php?'.api_get_cidreq(). |
|
158 | + '&forum='.$forumId.'&thread='.$threadId. |
|
159 | + '&gradebook='.$gradebook.'&post='.$prev_next_array[$prev_id]; |
|
160 | +$next_href = $forumUrl.'viewthread.php?'.api_get_cidreq(). |
|
161 | + '&forum='.$forumId.'&thread='.$threadId. |
|
162 | + '&post='.$prev_next_array[$next_id]; |
|
163 | 163 | |
164 | 164 | echo '<center style="margin-top: 10px; margin-bottom: 10px;">'; |
165 | 165 | // Go to: first and previous |
166 | 166 | if (((int) $current_id) > 0) { |
167 | - echo '<a href="' . $first_href . '" ' . $class . ' title=' . |
|
168 | - $first_message . '>' . $first_img . ' ' . $first_message .'</a>'; |
|
169 | - echo '<a href="' . $prev_href . '" ' . $class_prev . ' title=' . |
|
170 | - $prev_message . '>' . $prev_img . ' ' . $prev_message . '</a>'; |
|
167 | + echo '<a href="'.$first_href.'" '.$class.' title='. |
|
168 | + $first_message.'>'.$first_img.' '.$first_message.'</a>'; |
|
169 | + echo '<a href="'.$prev_href.'" '.$class_prev.' title='. |
|
170 | + $prev_message.'>'.$prev_img.' '.$prev_message.'</a>'; |
|
171 | 171 | } else { |
172 | - echo '<b><span class="invisible">' . |
|
173 | - $first_img . ' ' . $first_message . '</b></span>'; |
|
174 | - echo '<b><span class="invisible">' . |
|
175 | - $prev_img . ' ' . $prev_message . '</b></span>'; |
|
172 | + echo '<b><span class="invisible">'. |
|
173 | + $first_img.' '.$first_message.'</b></span>'; |
|
174 | + echo '<b><span class="invisible">'. |
|
175 | + $prev_img.' '.$prev_message.'</b></span>'; |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | // Current counter |
179 | -echo ' [ ' . ($current_id + 1) . ' / ' . $max . ' ] '; |
|
179 | +echo ' [ '.($current_id + 1).' / '.$max.' ] '; |
|
180 | 180 | |
181 | 181 | // Go to: next and last |
182 | 182 | if (($current_id + 1) < $max) { |
183 | - echo '<a href="' . $next_href . '" ' . $class_next . ' title=' . $next_message . '>' . $next_message . ' ' . $next_img . '</a>'; |
|
184 | - echo '<a href="' . $last_href . '" ' . $class . ' title=' . $last_message . '>' . $last_message . ' ' . $last_img . '</a>'; |
|
183 | + echo '<a href="'.$next_href.'" '.$class_next.' title='.$next_message.'>'.$next_message.' '.$next_img.'</a>'; |
|
184 | + echo '<a href="'.$last_href.'" '.$class.' title='.$last_message.'>'.$last_message.' '.$last_img.'</a>'; |
|
185 | 185 | } else { |
186 | - echo '<b><span class="invisible">' . $next_message . ' ' . $next_img . '</b></span>'; |
|
187 | - echo '<b><span class="invisible">' . $last_message . ' ' . $last_img . '</b></span>'; |
|
186 | + echo '<b><span class="invisible">'.$next_message.' '.$next_img.'</b></span>'; |
|
187 | + echo '<b><span class="invisible">'.$last_message.' '.$last_img.'</b></span>'; |
|
188 | 188 | } |
189 | 189 | echo '</center>'; |
190 | 190 | |
@@ -218,18 +218,18 @@ discard block |
||
218 | 218 | } |
219 | 219 | |
220 | 220 | if (api_get_course_setting('allow_user_image_forum')) { |
221 | - echo '<br />' . display_user_image($rows[$display_post_id]['user_id'], $name, $origin) . '<br />'; |
|
221 | + echo '<br />'.display_user_image($rows[$display_post_id]['user_id'], $name, $origin).'<br />'; |
|
222 | 222 | } |
223 | 223 | echo display_user_link( |
224 | 224 | $rows[$display_post_id]['user_id'], |
225 | 225 | $name, |
226 | 226 | $origin, |
227 | 227 | $username |
228 | -) . "<br />"; |
|
228 | +)."<br />"; |
|
229 | 229 | |
230 | 230 | echo api_convert_and_format_date( |
231 | 231 | $rows[$display_post_id]['post_date'] |
232 | -) . '<br /><br />'; |
|
232 | +).'<br /><br />'; |
|
233 | 233 | // Get attach id |
234 | 234 | $attachment_list = get_attachment($display_post_id); |
235 | 235 | $id_attach = !empty($attachment_list) ? $attachment_list['id'] : ''; |
@@ -248,16 +248,16 @@ discard block |
||
248 | 248 | ) |
249 | 249 | ) { |
250 | 250 | if ($locked == false) { |
251 | - echo "<a href=\"editpost.php?" . api_get_cidreq() . |
|
252 | - "&forum=" . $forumId . "&thread=" . $threadId . |
|
253 | - "&post=" . $rows[$display_post_id]['post_id'] . |
|
254 | - "&id_attach=" . $id_attach . "\">" . |
|
251 | + echo "<a href=\"editpost.php?".api_get_cidreq(). |
|
252 | + "&forum=".$forumId."&thread=".$threadId. |
|
253 | + "&post=".$rows[$display_post_id]['post_id']. |
|
254 | + "&id_attach=".$id_attach."\">". |
|
255 | 255 | Display::return_icon( |
256 | 256 | 'edit.png', |
257 | 257 | get_lang('Edit'), |
258 | 258 | array(), |
259 | 259 | ICON_SIZE_SMALL |
260 | - ) . '</a>'; |
|
260 | + ).'</a>'; |
|
261 | 261 | } |
262 | 262 | } |
263 | 263 | |
@@ -273,22 +273,22 @@ discard block |
||
273 | 273 | sort($id_posts, SORT_NUMERIC); |
274 | 274 | reset($id_posts); |
275 | 275 | // The post minor |
276 | - $post_minor = (int)$id_posts[0]; |
|
276 | + $post_minor = (int) $id_posts[0]; |
|
277 | 277 | } |
278 | 278 | |
279 | 279 | if ( |
280 | 280 | GroupManager::is_tutor_of_group(api_get_user_id(), $groupId) || |
281 | 281 | api_is_allowed_to_edit(false, true) && |
282 | - !(api_is_course_coach() &&$current_forum['session_id'] != $sessionId) |
|
282 | + !(api_is_course_coach() && $current_forum['session_id'] != $sessionId) |
|
283 | 283 | ) { |
284 | 284 | if ($locked == false) { |
285 | - echo "<a href=\"" . api_get_self() . "?" . api_get_cidreq() . |
|
286 | - "&forum=" . $forumId . "&thread=" . $threadId . |
|
287 | - "&action=delete&content=post&id=" . |
|
288 | - $rows[$display_post_id]['post_id'] . |
|
289 | - "\" onclick=\"javascript:if(!confirm('" . |
|
290 | - addslashes(api_htmlentities(get_lang('DeletePost'), ENT_QUOTES)) . |
|
291 | - "')) return false;\">" . Display::return_icon( |
|
285 | + echo "<a href=\"".api_get_self()."?".api_get_cidreq(). |
|
286 | + "&forum=".$forumId."&thread=".$threadId. |
|
287 | + "&action=delete&content=post&id=". |
|
288 | + $rows[$display_post_id]['post_id']. |
|
289 | + "\" onclick=\"javascript:if(!confirm('". |
|
290 | + addslashes(api_htmlentities(get_lang('DeletePost'), ENT_QUOTES)). |
|
291 | + "')) return false;\">".Display::return_icon( |
|
292 | 292 | 'delete.png', |
293 | 293 | get_lang('Delete'), |
294 | 294 | array(), |
@@ -308,16 +308,16 @@ discard block |
||
308 | 308 | ); |
309 | 309 | |
310 | 310 | if (!isset($_GET['id']) && $post_id > $post_minor) { |
311 | - echo "<a href=\"viewthread.php?" . api_get_cidreq() . |
|
312 | - "&forum=" . $forumId . "&thread=" . $threadId . |
|
313 | - "&origin=" . $origin . "&action=move&post=" . |
|
314 | - $rows[$display_post_id]['post_id'] . "\">" . |
|
311 | + echo "<a href=\"viewthread.php?".api_get_cidreq(). |
|
312 | + "&forum=".$forumId."&thread=".$threadId. |
|
313 | + "&origin=".$origin."&action=move&post=". |
|
314 | + $rows[$display_post_id]['post_id']."\">". |
|
315 | 315 | Display::return_icon( |
316 | 316 | 'move.png', |
317 | 317 | get_lang('MovePost'), |
318 | 318 | array(), |
319 | 319 | ICON_SIZE_SMALL |
320 | - ) . "</a>"; |
|
320 | + )."</a>"; |
|
321 | 321 | |
322 | 322 | } |
323 | 323 | } |
@@ -340,16 +340,16 @@ discard block |
||
340 | 340 | ); |
341 | 341 | |
342 | 342 | if ($locked == false) { |
343 | - echo "<a href=\"forumqualify.php?" . api_get_cidreq() . |
|
344 | - "&forum=" . $forumId . "&thread=" . $threadId . |
|
345 | - "&action=list&post=" . $rows[$display_post_id]['post_id'] . |
|
346 | - "&user=" . $rows[$display_post_id]['user_id'] . "&user_id=" . |
|
347 | - $rows[$display_post_id]['user_id'] . "&origin=" . $origin . |
|
348 | - "&idtextqualify=" . $current_qualify_thread . |
|
349 | - "\" >" . Display::return_icon( |
|
343 | + echo "<a href=\"forumqualify.php?".api_get_cidreq(). |
|
344 | + "&forum=".$forumId."&thread=".$threadId. |
|
345 | + "&action=list&post=".$rows[$display_post_id]['post_id']. |
|
346 | + "&user=".$rows[$display_post_id]['user_id']."&user_id=". |
|
347 | + $rows[$display_post_id]['user_id']."&origin=".$origin. |
|
348 | + "&idtextqualify=".$current_qualify_thread. |
|
349 | + "\" >".Display::return_icon( |
|
350 | 350 | 'quiz.gif', |
351 | 351 | get_lang('Qualify') |
352 | - ) . "</a>"; |
|
352 | + )."</a>"; |
|
353 | 353 | } |
354 | 354 | } |
355 | 355 | } |
@@ -361,33 +361,33 @@ discard block |
||
361 | 361 | ($current_forum['allow_anonymous'] == 1 && !$_user['user_id']) |
362 | 362 | ) { |
363 | 363 | if (!api_is_anonymous() && api_is_allowed_to_session_edit(false, true)) { |
364 | - echo '<a href="reply.php?' . api_get_cidreq() . |
|
365 | - '&forum=' . $forumId . '&thread=' . $threadId . |
|
366 | - '&post=' . $rows[$display_post_id]['post_id'] . |
|
367 | - '&action=replymessage&origin=' . $origin . '">' . |
|
364 | + echo '<a href="reply.php?'.api_get_cidreq(). |
|
365 | + '&forum='.$forumId.'&thread='.$threadId. |
|
366 | + '&post='.$rows[$display_post_id]['post_id']. |
|
367 | + '&action=replymessage&origin='.$origin.'">'. |
|
368 | 368 | Display::return_icon( |
369 | 369 | 'message_reply_forum.png', |
370 | 370 | get_lang('ReplyToMessage') |
371 | - ) . "</a>"; |
|
372 | - echo '<a href="reply.php?' . api_get_cidreq() . |
|
373 | - '&forum=' . $forumId . '&thread=' . $threadId . |
|
374 | - '&post=' . $rows[$display_post_id]['post_id'] . |
|
375 | - '&action=quote&origin=' . $origin . '">' . |
|
371 | + )."</a>"; |
|
372 | + echo '<a href="reply.php?'.api_get_cidreq(). |
|
373 | + '&forum='.$forumId.'&thread='.$threadId. |
|
374 | + '&post='.$rows[$display_post_id]['post_id']. |
|
375 | + '&action=quote&origin='.$origin.'">'. |
|
376 | 376 | Display::return_icon( |
377 | 377 | 'quote.gif', |
378 | 378 | get_lang('QuoteMessage') |
379 | - ) . "</a>"; |
|
379 | + )."</a>"; |
|
380 | 380 | } |
381 | 381 | } |
382 | 382 | } else { |
383 | 383 | if ($current_forum_category && $current_forum_category['locked'] == 1) { |
384 | - echo get_lang('ForumcategoryLocked') . '<br />'; |
|
384 | + echo get_lang('ForumcategoryLocked').'<br />'; |
|
385 | 385 | } |
386 | 386 | if ($current_forum['locked'] == 1) { |
387 | - echo get_lang('ForumLocked') . '<br />'; |
|
387 | + echo get_lang('ForumLocked').'<br />'; |
|
388 | 388 | } |
389 | 389 | if ($current_thread['locked'] == 1) { |
390 | - echo get_lang('ThreadLocked') . '<br />'; |
|
390 | + echo get_lang('ThreadLocked').'<br />'; |
|
391 | 391 | } |
392 | 392 | } |
393 | 393 | |
@@ -406,17 +406,17 @@ discard block |
||
406 | 406 | $rows[$display_post_id]['post_notification'] == '1' AND |
407 | 407 | $rows[$display_post_id]['poster_id'] == $_user['user_id'] |
408 | 408 | ) { |
409 | - $post_image .= Display::return_icon('forumnotification.gif',get_lang('YouWillBeNotified')); |
|
409 | + $post_image .= Display::return_icon('forumnotification.gif', get_lang('YouWillBeNotified')); |
|
410 | 410 | } |
411 | 411 | // The post title |
412 | -echo "<td class=\"$titleclass\">" . |
|
413 | - prepare4display($rows[$display_post_id]['post_title']) . "</td>"; |
|
412 | +echo "<td class=\"$titleclass\">". |
|
413 | + prepare4display($rows[$display_post_id]['post_title'])."</td>"; |
|
414 | 414 | echo "</tr>"; |
415 | 415 | |
416 | 416 | // The post message |
417 | 417 | echo "<tr>"; |
418 | -echo "<td class=\"$messageclass\">" . |
|
419 | - prepare4display($rows[$display_post_id]['post_text']) . "</td>"; |
|
418 | +echo "<td class=\"$messageclass\">". |
|
419 | + prepare4display($rows[$display_post_id]['post_text'])."</td>"; |
|
420 | 420 | echo "</tr>"; |
421 | 421 | |
422 | 422 | // The check if there is an attachment |
@@ -429,24 +429,24 @@ discard block |
||
429 | 429 | echo Display::return_icon('attachment.gif', get_lang('Attachment')); |
430 | 430 | echo '<a href="download.php?file='; |
431 | 431 | echo $realname; |
432 | - echo ' "> ' . $user_filename . ' </a>'; |
|
433 | - echo '<span class="forum_attach_comment">' . |
|
434 | - Security::remove_XSS($attachment['comment'], STUDENT) . '</span>'; |
|
432 | + echo ' "> '.$user_filename.' </a>'; |
|
433 | + echo '<span class="forum_attach_comment">'. |
|
434 | + Security::remove_XSS($attachment['comment'], STUDENT).'</span>'; |
|
435 | 435 | |
436 | 436 | if ( |
437 | - ($current_forum['allow_edit'] == 1 &&$rows[$display_post_id]['user_id'] == $_user['user_id']) || |
|
437 | + ($current_forum['allow_edit'] == 1 && $rows[$display_post_id]['user_id'] == $_user['user_id']) || |
|
438 | 438 | (api_is_allowed_to_edit(false, true) && !(api_is_course_coach() && $current_forum['session_id'] != $sessionId)) |
439 | 439 | ) { |
440 | - echo ' <a href="' . api_get_self() . '?' . |
|
441 | - api_get_cidreq() . '&origin=' . |
|
442 | - Security::remove_XSS($_GET['origin']) . |
|
443 | - '&action=delete_attach&id_attach=' . |
|
444 | - $attachment['id'] . '&forum=' . $forumId . |
|
445 | - '&thread=' . $threadId . |
|
446 | - '" onclick="javascript:if(!confirm(\'' . |
|
440 | + echo ' <a href="'.api_get_self().'?'. |
|
441 | + api_get_cidreq().'&origin='. |
|
442 | + Security::remove_XSS($_GET['origin']). |
|
443 | + '&action=delete_attach&id_attach='. |
|
444 | + $attachment['id'].'&forum='.$forumId. |
|
445 | + '&thread='.$threadId. |
|
446 | + '" onclick="javascript:if(!confirm(\''. |
|
447 | 447 | addslashes(api_htmlentities( |
448 | 448 | get_lang('ConfirmYourChoice'), ENT_QUOTES) |
449 | - ) . '\')) return false;">' . Display::return_icon( |
|
449 | + ).'\')) return false;">'.Display::return_icon( |
|
450 | 450 | 'delete.gif', |
451 | 451 | get_lang('Delete') |
452 | 452 | ).'</a><br />'; |
@@ -81,7 +81,7 @@ |
||
81 | 81 | echo "<tr>"; |
82 | 82 | echo "<td rowspan=\"2\" class=\"forum_message_left\">"; |
83 | 83 | $username = api_htmlentities(sprintf(get_lang('LoginX'), $row['username']), ENT_QUOTES); |
84 | - if ($row['user_id']=='0') { |
|
84 | + if ($row['user_id'] == '0') { |
|
85 | 85 | $name = $row['poster_name']; |
86 | 86 | } else { |
87 | 87 | $name = api_get_person_name($row['firstname'], $row['lastname']); |