@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | $plugin = SepePlugin::create(); |
13 | 13 | $_cid = 0; |
14 | 14 | |
15 | -if ( !empty($_POST)) { |
|
15 | +if (!empty($_POST)) { |
|
16 | 16 | $check = Security::check_token('post'); |
17 | 17 | if ($check) { |
18 | 18 | $newSpecialty = intval($_POST['new_specialty']); |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | } |
216 | 216 | if ($info['end_date'] != '0000-00-00' && $info['end_date'] != NULL) { |
217 | 217 | $tpl->assign('day_end', date("j", strtotime($info['end_date']))); |
218 | - $tpl->assign('month_end', date("n",strtotime($info['end_date']))); |
|
218 | + $tpl->assign('month_end', date("n", strtotime($info['end_date']))); |
|
219 | 219 | $tpl->assign('year_end', date("Y", strtotime($info['end_date']))); |
220 | 220 | $endYear = date("Y", strtotime($info['end_date'])); |
221 | 221 | } elseif (strpos($info['end_date'], '0000') === false) { |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | } |
237 | 237 | $registrationYear -= 5; |
238 | 238 | $leaveYear += 5; |
239 | - $endRangeYear = (($registrationYear + 15) < $leaveYear) ? ($leaveYear+1):($registrationYear + 15); |
|
239 | + $endRangeYear = (($registrationYear + 15) < $leaveYear) ? ($leaveYear + 1) : ($registrationYear + 15); |
|
240 | 240 | while ($registrationYear <= $endRangeYear) { |
241 | 241 | $listYear[] = $registrationYear; |
242 | 242 | $registrationYear++; |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | } |
252 | 252 | $startYear -= 5; |
253 | 253 | $endYear += 5; |
254 | - $endRangeYear = (($startYear + 15) < $endYear) ? ($endYear+1):($startYear +15); |
|
254 | + $endRangeYear = (($startYear + 15) < $endYear) ? ($endYear + 1) : ($startYear + 15); |
|
255 | 255 | while ($startYear <= $endRangeYear) { |
256 | 256 | $listYear[] = $startYear; |
257 | 257 | $startYear++; |
@@ -272,5 +272,5 @@ discard block |
||
272 | 272 | $tpl->assign('content', $content); |
273 | 273 | $tpl->display_one_col_template(); |
274 | 274 | } else { |
275 | - header('Location:' . api_get_path(WEB_PATH)); |
|
275 | + header('Location:'.api_get_path(WEB_PATH)); |
|
276 | 276 | } |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | $plugin = SepePlugin::create(); |
13 | 13 | $_cid = 0; |
14 | 14 | |
15 | -if ( !empty($_POST)) { |
|
15 | +if (!empty($_POST)) { |
|
16 | 16 | $check = Security::check_token('post'); |
17 | 17 | if ($check) { |
18 | 18 | $companyTutorId = (!empty($_POST['company_tutor_id']) ? intval($_POST['company_tutor_id']) : NULL); |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | } |
135 | 135 | Database::query($sql); |
136 | 136 | |
137 | - $insertLog = checkInsertNewLog($platformUserId,$actionId); |
|
137 | + $insertLog = checkInsertNewLog($platformUserId, $actionId); |
|
138 | 138 | if ($insertLog) { |
139 | 139 | $sql = "INSERT INTO $tableSepeLogParticipant ( |
140 | 140 | platform_user_id, |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | $listTutorCompany = listTutorType("company = '1'"); |
221 | 221 | $tpl->assign('list_tutor_company', $listTutorCompany); |
222 | 222 | $listTutorTraining = array(); |
223 | - $listTutorTraining= listTutorType("training = '1'"); |
|
223 | + $listTutorTraining = listTutorType("training = '1'"); |
|
224 | 224 | $tpl->assign('list_tutor_training', $listTutorTraining); |
225 | 225 | if (isset($_SESSION['sepe_message_info'])) { |
226 | 226 | $tpl->assign('message_info', $_SESSION['sepe_message_info']); |
@@ -236,5 +236,5 @@ discard block |
||
236 | 236 | $tpl->assign('content', $content); |
237 | 237 | $tpl->display_one_col_template(); |
238 | 238 | } else { |
239 | - header('Location:' . api_get_path(WEB_PATH)); |
|
239 | + header('Location:'.api_get_path(WEB_PATH)); |
|
240 | 240 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | return false; |
81 | 81 | } |
82 | 82 | |
83 | - require_once api_get_path(SYS_PLUGIN_PATH) . 'sepe/database.php'; |
|
83 | + require_once api_get_path(SYS_PLUGIN_PATH).'sepe/database.php'; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | /** |
@@ -121,9 +121,9 @@ discard block |
||
121 | 121 | $oldTableTutorsCompany = 'plugin_sepe_tutors_empresa'; |
122 | 122 | $oldTableCompetence = 'plugin_sepe_competencia_docente'; |
123 | 123 | $sql = "RENAME TABLE " |
124 | - . $oldTableCenters ." TO ". self::TABLE_SEPE_CENTERS .", " |
|
125 | - . $oldTableTutorsCompany ." TO ". self::TABLE_SEPE_TUTORS_COMPANY .", " |
|
126 | - . $oldTableCompetence ." TO ". self::TABLE_SEPE_TEACHING_COMPETENCE .";"; |
|
124 | + . $oldTableCenters." TO ".self::TABLE_SEPE_CENTERS.", " |
|
125 | + . $oldTableTutorsCompany." TO ".self::TABLE_SEPE_TUTORS_COMPANY.", " |
|
126 | + . $oldTableCompetence." TO ".self::TABLE_SEPE_TEACHING_COMPETENCE.";"; |
|
127 | 127 | Database::query($sql); |
128 | 128 | |
129 | 129 | $sepeCourseActionsTable = self::TABLE_SEPE_COURSE_ACTIONS; |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | if (!$res) { |
16 | 16 | $sql = "DELETE FROM $tableSepeActions;"; |
17 | 17 | $res = Database::query($sql); |
18 | - $content = $plugin->get_lang('ProblemToDeleteInfoCenter') . Database::error(); |
|
18 | + $content = $plugin->get_lang('ProblemToDeleteInfoCenter').Database::error(); |
|
19 | 19 | echo json_encode(array("status" => "false", "content" => $content)); |
20 | 20 | } else { |
21 | 21 | $content = $plugin->get_lang('DeleteOk'); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $sql = "DELETE FROM $tableSepeActions WHERE id = $id;"; |
29 | 29 | $res = Database::query($sql); |
30 | 30 | if (!$res) { |
31 | - $content = $plugin->get_lang('ProblemToDeleteInfoAction') . Database::error(); |
|
31 | + $content = $plugin->get_lang('ProblemToDeleteInfoAction').Database::error(); |
|
32 | 32 | echo json_encode(array("status" => "false", "content" => $content)); |
33 | 33 | } else { |
34 | 34 | $content = $plugin->get_lang('DeleteOk'); |
@@ -38,11 +38,11 @@ discard block |
||
38 | 38 | } |
39 | 39 | |
40 | 40 | if ($_REQUEST['tab'] == 'delete_specialty') { |
41 | - $id = intval(substr($_REQUEST['id'],9)); |
|
41 | + $id = intval(substr($_REQUEST['id'], 9)); |
|
42 | 42 | $sql = "DELETE FROM $tableSepeSpecialty WHERE id = $id;"; |
43 | 43 | $res = Database::query($sql); |
44 | 44 | if (!$res) { |
45 | - $content = $plugin->get_lang('ProblemToDeleteInfoSpecialty') . Database::error(); |
|
45 | + $content = $plugin->get_lang('ProblemToDeleteInfoSpecialty').Database::error(); |
|
46 | 46 | echo json_encode(array("status" => "false", "content" => $content)); |
47 | 47 | } else { |
48 | 48 | $content = $plugin->get_lang('DeleteOk'); |
@@ -51,11 +51,11 @@ discard block |
||
51 | 51 | } |
52 | 52 | |
53 | 53 | if ($_REQUEST['tab'] == 'delete_specialty_participant') { |
54 | - $id = intval(substr($_REQUEST['id'],9)); |
|
54 | + $id = intval(substr($_REQUEST['id'], 9)); |
|
55 | 55 | $sql = "DELETE FROM $tableSepeParticipantsSpecialty WHERE id = $id;"; |
56 | 56 | $res = Database::query($sql); |
57 | 57 | if (!$res) { |
58 | - $content = $plugin->get_lang('ProblemToDeleteInfoSpecialty') . Database::error(); |
|
58 | + $content = $plugin->get_lang('ProblemToDeleteInfoSpecialty').Database::error(); |
|
59 | 59 | echo json_encode(array("status" => "false", "content" => $content)); |
60 | 60 | } else { |
61 | 61 | $content = $plugin->get_lang('DeleteOk'); |
@@ -64,11 +64,11 @@ discard block |
||
64 | 64 | } |
65 | 65 | |
66 | 66 | if ($_REQUEST['tab'] == 'delete_classroom') { |
67 | - $id = intval(substr($_REQUEST['id'],9)); |
|
67 | + $id = intval(substr($_REQUEST['id'], 9)); |
|
68 | 68 | $sql = "DELETE FROM $tableSepeSpecialtyClassroom WHERE id = $id;"; |
69 | 69 | $res = Database::query($sql); |
70 | 70 | if (!$res) { |
71 | - $content = $plugin->get_lang('ProblemToDeleteInfoSpecialtyClassroom') . Database::error(); |
|
71 | + $content = $plugin->get_lang('ProblemToDeleteInfoSpecialtyClassroom').Database::error(); |
|
72 | 72 | echo json_encode(array("status" => "false", "content" => $content)); |
73 | 73 | } else { |
74 | 74 | $content = $plugin->get_lang('DeleteOk'); |
@@ -87,8 +87,8 @@ discard block |
||
87 | 87 | WHERE document_type='".$type."' AND document_number='".$number."' AND document_letter='".$letter."';"; |
88 | 88 | $res = Database::query($sql); |
89 | 89 | if (!$res) { |
90 | - $content = $plugin->get_lang('ProblemDataBase') . Database::error(); |
|
91 | - error_log(print_r($content,1)); |
|
90 | + $content = $plugin->get_lang('ProblemDataBase').Database::error(); |
|
91 | + error_log(print_r($content, 1)); |
|
92 | 92 | exit; |
93 | 93 | } else { |
94 | 94 | $aux = Database::fetch_assoc($res); |
@@ -102,11 +102,11 @@ discard block |
||
102 | 102 | } |
103 | 103 | |
104 | 104 | if ($_REQUEST['tab'] == 'delete_tutor') { |
105 | - $id = intval(substr($_REQUEST['id'],5)); |
|
105 | + $id = intval(substr($_REQUEST['id'], 5)); |
|
106 | 106 | $sql = "DELETE FROM $tableSepeSpecialtyTutors WHERE id = $id;"; |
107 | 107 | $res = Database::query($sql); |
108 | 108 | if (!$res) { |
109 | - $content = $plugin->get_lang('ProblemToDeleteInfoSpecialtyTutor') . Database::error(); |
|
109 | + $content = $plugin->get_lang('ProblemToDeleteInfoSpecialtyTutor').Database::error(); |
|
110 | 110 | echo json_encode(array("status" => "false", "content" => $content)); |
111 | 111 | } else { |
112 | 112 | $content = $plugin->get_lang('DeleteOk'); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | } |
116 | 116 | |
117 | 117 | if ($_REQUEST['tab'] == 'delete_participant') { |
118 | - $id = intval(substr($_REQUEST['id'],11)); |
|
118 | + $id = intval(substr($_REQUEST['id'], 11)); |
|
119 | 119 | $sql = "SELECT platform_user_id, action_id FROM $tableSepeParticipants WHERE id = $id;"; |
120 | 120 | $res = Database::query($sql); |
121 | 121 | $row = Database::fetch_assoc($res); |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $sql = "DELETE FROM $tableSepeParticipants WHERE id = $id;"; |
127 | 127 | $res = Database::query($sql); |
128 | 128 | if (!$res) { |
129 | - $content = $plugin->get_lang('ProblemToDeleteInfoParticipant') . Database::error(); |
|
129 | + $content = $plugin->get_lang('ProblemToDeleteInfoParticipant').Database::error(); |
|
130 | 130 | echo json_encode(array("status" => "false", "content" => $content)); |
131 | 131 | } else { |
132 | 132 | $content = $plugin->get_lang('DeleteOk'); |
@@ -135,11 +135,11 @@ discard block |
||
135 | 135 | } |
136 | 136 | |
137 | 137 | if ($_REQUEST['tab'] == 'unlink_action') { |
138 | - $id = intval(substr($_REQUEST['id'],16)); |
|
138 | + $id = intval(substr($_REQUEST['id'], 16)); |
|
139 | 139 | $sql = "DELETE FROM $tableSepeCourseActions WHERE id = $id;"; |
140 | 140 | $res = Database::query($sql); |
141 | 141 | if (!$res) { |
142 | - $content = $plugin->get_lang('ProblemToDesvincularInfoAction') . Database::error(); |
|
142 | + $content = $plugin->get_lang('ProblemToDesvincularInfoAction').Database::error(); |
|
143 | 143 | echo json_encode(array("status" => "false", "content" => $content)); |
144 | 144 | } else { |
145 | 145 | $content = $plugin->get_lang('DeleteOk'); |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | } |
149 | 149 | |
150 | 150 | if ($_REQUEST['tab'] == 'assign_action') { |
151 | - $course_id = intval(substr($_REQUEST['course_id'],9)); |
|
151 | + $course_id = intval(substr($_REQUEST['course_id'], 9)); |
|
152 | 152 | $action_id = intval($_REQUEST['action_id']); |
153 | 153 | |
154 | 154 | if ($action_id != 0 && $course_id != 0) { |
@@ -36,5 +36,5 @@ |
||
36 | 36 | $tpl->assign('content', $content); |
37 | 37 | $tpl->display_one_col_template(); |
38 | 38 | } else { |
39 | - header('Location:' . api_get_path(WEB_PATH)); |
|
39 | + header('Location:'.api_get_path(WEB_PATH)); |
|
40 | 40 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $htmlText .= '<li>'; |
40 | 40 | $htmlText .= '<a href="'.$pluginPath.'configuration.php">'; |
41 | 41 | $htmlText .= '<img src="'.api_get_path(WEB_PLUGIN_PATH).'sepe/resources/settings.png">'; |
42 | - $htmlText .=$plugin->get_lang('Setting'); |
|
42 | + $htmlText .= $plugin->get_lang('Setting'); |
|
43 | 43 | $htmlText .= '</a>'; |
44 | 44 | $htmlText .= '</li>'; |
45 | 45 | $htmlText .= '</ul>'; |
@@ -57,5 +57,5 @@ discard block |
||
57 | 57 | $tpl->assign('content', $content); |
58 | 58 | $tpl->display_one_col_template(); |
59 | 59 | } else { |
60 | - header('Location:' . api_get_path(WEB_PATH)); |
|
60 | + header('Location:'.api_get_path(WEB_PATH)); |
|
61 | 61 | } |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | } |
35 | 35 | |
36 | 36 | $tpl->assign('info', $info); |
37 | - $tpl->assign('start_date', date("d/m/Y",strtotime($info['start_date']))); |
|
38 | - $tpl->assign('end_date', date("d/m/Y",strtotime($info['end_date']))); |
|
37 | + $tpl->assign('start_date', date("d/m/Y", strtotime($info['start_date']))); |
|
38 | + $tpl->assign('end_date', date("d/m/Y", strtotime($info['end_date']))); |
|
39 | 39 | $tpl->assign('action_id', $actionId); |
40 | 40 | $listSpecialty = specialtyList($actionId); |
41 | 41 | $tpl->assign('listSpecialty', $listSpecialty); |
@@ -46,5 +46,5 @@ discard block |
||
46 | 46 | $tpl->assign('content', $content); |
47 | 47 | $tpl->display_one_col_template(); |
48 | 48 | } else { |
49 | - header('Location:' . api_get_path(WEB_PATH)); |
|
49 | + header('Location:'.api_get_path(WEB_PATH)); |
|
50 | 50 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $result = Database::query($sql); |
53 | 53 | if (Database::affected_rows($result) > 0) { |
54 | 54 | return true; |
55 | - }else{ |
|
55 | + } else { |
|
56 | 56 | return false; |
57 | 57 | } |
58 | 58 | } |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | $res = Database::query($sql); |
225 | 225 | $aux = array(); |
226 | 226 | while ($row = Database::fetch_assoc($res)) { |
227 | - if (!in_array($row['id'],$tutorsList)) { |
|
227 | + if (!in_array($row['id'], $tutorsList)) { |
|
228 | 228 | $tutor = array(); |
229 | 229 | $tutor['id'] = $row['id']; |
230 | 230 | if (trim($row['firstname']) != '' || trim($row['lastname']) != '') { |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | return $row; |
260 | 260 | } |
261 | 261 | |
262 | -function freeTeacherList($teacherList,$specialtyId,$platform_user_id) |
|
262 | +function freeTeacherList($teacherList, $specialtyId, $platform_user_id) |
|
263 | 263 | { |
264 | 264 | global $tableSepeSpecialtyTutors; |
265 | 265 | global $tableSepeTutors; |
@@ -498,7 +498,7 @@ discard block |
||
498 | 498 | return $row['id']; |
499 | 499 | } |
500 | 500 | |
501 | -function checkInsertNewLog($platformUserId,$actionId) |
|
501 | +function checkInsertNewLog($platformUserId, $actionId) |
|
502 | 502 | { |
503 | 503 | global $tableSepeLogParticipant; |
504 | 504 | $sql = "SELECT * FROM $tableSepeLogParticipant WHERE platform_user_id = $platformUserId AND action_id = $actionId"; |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | } elseif (strpos($info['start_date'], '0000') === false) { |
182 | 182 | $yearStart = date("Y", strtotime($info['start_date'])); |
183 | 183 | } else { |
184 | - $yearStart = date("Y"); |
|
184 | + $yearStart = date("Y"); |
|
185 | 185 | } |
186 | 186 | if ($info['end_date'] != '0000-00-00' && $info['end_date'] != NULL) { |
187 | 187 | $tpl->assign('day_end', date("j", strtotime($info['end_date']))); |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | } elseif (strpos($info['end_date'], '0000') === false) { |
192 | 192 | $yearEnd = date("Y", strtotime($info['end_date'])); |
193 | 193 | } else { |
194 | - $yearEnd = date("Y"); |
|
194 | + $yearEnd = date("Y"); |
|
195 | 195 | } |
196 | 196 | $tpl->assign('new_action', '0'); |
197 | 197 | $tpl->assign('specialty_id', intval($_GET['specialty_id'])); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | } |
211 | 211 | $yearStart -= 5; |
212 | 212 | $yearEnd += 5; |
213 | - $fin_rango_anio = (($yearStart + 15) < $yearEnd) ? ($yearEnd+1):($yearStart +15); |
|
213 | + $fin_rango_anio = (($yearStart + 15) < $yearEnd) ? ($yearEnd + 1) : ($yearStart + 15); |
|
214 | 214 | while ($yearStart <= $fin_rango_anio) { |
215 | 215 | $yearList[] = $yearStart; |
216 | 216 | $yearStart++; |
@@ -231,5 +231,5 @@ discard block |
||
231 | 231 | $tpl->display_one_col_template(); |
232 | 232 | |
233 | 233 | } else { |
234 | - header('Location:' . api_get_path(WEB_PATH)); |
|
234 | + header('Location:'.api_get_path(WEB_PATH)); |
|
235 | 235 | } |