PluginProbe
School Management System – WPSchoolPress / 2.0.9
School Management System – WPSchoolPress v2.0.9
2.2.48 2.2.47 2.2.46 2.2.45 2.2.44 2.2.43 2.2.42 2.2.41 2.2.40 2.2.39 2.2.38 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 2.0.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.13 All 103 releases
wpschoolpress / wpschoolpress.php

wpschoolpress.php in School Management System – WPSchoolPress 2.0.9, at wpschoolpress.php

387 lines 7.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*
4
5 Plugin Name: WPSchoolPress
6
7 Plugin URI: http://wpschoolpress.com
8
9 Description: WPSchoolpress is a school management system plugin that makes school activities transparent to parents. For more information please visit our website.
10
11 Version: 2.0.9
12
13 Author: WPSchoolPress Team
14
15 Author URI: wpschoolpress.com
16
17 Text Domain: WPSchoolPress
18
19 Domain Path: languages
20
21
22
23 @package WPSchoolPress
24
25 */
26
27
28
29 // Exit if accessed directly
30
31
32
33 if (!defined('ABSPATH')) exit;
34
35 /**
36
37 * Basic plugin definitions
38
39 *
40
41 * @package WPSchoolPress
42
43 * @since 2.0.9
44
45 */
46
47
48
49 if (!defined('WPSP_PLUGIN_URL'))
50
51 {
52
53 define('WPSP_PLUGIN_URL', plugin_dir_url(__FILE__));
54
55 }
56
57
58
59 if (!defined('WPSP_PLUGIN_PATH'))
60
61 {
62
63 define('WPSP_PLUGIN_PATH', plugin_dir_path(__FILE__));
64
65 }
66
67
68
69 if (!defined('WPSP_PLUGIN_VERSION'))
70
71 {
72
73 define('WPSP_PLUGIN_VERSION', '2.0.9'); //Plugin version number
74
75 }
76
77
78
79 define('WPSP_PERMISSION_MSG', 'You don\'t have enough permission to access this page');
80
81
82
83 // Call the required files when plugin activate
84
85
86
87 register_activation_hook(__FILE__, 'wpsp_activation');
88
89
90
91 function wpsp_activation()
92
93 {
94
95 include_once (WPSP_PLUGIN_PATH . 'lib/wpsp-activation.php');
96
97
98 }
99
100
101
102 register_deactivation_hook( __FILE__, 'wpsp_deactivation');
103
104
105
106 function wpsp_deactivation()
107
108 {
109
110 include_once (WPSP_PLUGIN_PATH . 'lib/wpsp-deactivation.php');
111
112 }
113
114
115
116 // add action to load plugin
117
118
119 add_action('plugins_loaded', 'wpsp_plugins_loaded');
120
121
122
123 function wpsp_plugins_loaded()
124
125 {
126
127
128
129 $wpsp_lang_dir = dirname(plugin_basename(__FILE__)) . '/languages/';
130
131 load_plugin_textdomain('WPSchoolPress', false, $wpsp_lang_dir);
132
133
134
135 // initialize settings of plugin Open required files for initialization
136
137
138
139 require_once (WPSP_PLUGIN_PATH . 'lib/wpsp-ajaxworks.php');
140
141 require_once (WPSP_PLUGIN_PATH . 'lib/wpsp-ajaxworks-student.php');
142
143 require_once (WPSP_PLUGIN_PATH . 'lib/wpsp-ajaxworks-teacher.php');
144
145 require_once (WPSP_PLUGIN_PATH . 'wpsp-layout.php');
146
147 require_once (WPSP_PLUGIN_PATH . 'includes/wpsp-misc.php');
148
149 wpsp_get_setting();
150
151
152
153 global $wpsp_settings_data;
154
155 global $wpsp_admin, $wpsp_public, $paytmClass, $paypalClass;
156
157
158
159 // admin class handles most of functionalities of plugin
160
161
162
163 include_once (WPSP_PLUGIN_PATH . 'wpsp-class-admin.php');
164
165 $wpsp_admin = new Wpsp_Admin();
166
167 $wpsp_admin->add_hooks();
168
169
170
171 // public class handles most of functionalities of plugin
172
173
174
175 include_once (WPSP_PLUGIN_PATH . 'wpsp-class-public.php');
176
177 $wpsp_public = new Wpsp_Public();
178
179 $wpsp_public->add_hooks();
180
181 }
182
183
184
185 add_action('admin_init', 'ajax_actions');
186
187 function ajax_actions()
188
189 {
190
191
192
193 add_action('wp_ajax_listdashboardschedule', 'wpsp_listdashboardschedule');
194
195 add_action('wp_ajax_StudentProfile', 'wpsp_StudentProfile');
196
197 add_action('wp_ajax_AddStudent', 'wpsp_AddStudent');
198
199 add_action('wp_ajax_UpdateStudent', 'wpsp_UpdateStudent');
200
201 add_action('wp_ajax_StudentPublicProfile', 'wpsp_StudentPublicProfile');
202
203 add_action('wp_ajax_ParentPublicProfile', 'wpsp_ParentPublicProfile');
204
205 add_action('wp_ajax_TeacherPublicProfile', 'wpsp_TeacherPublicProfile');
206
207 add_action('wp_ajax_bulkDelete', 'wpsp_BulkDelete');
208
209 add_action('wp_ajax_undoImport', 'wpsp_UndoImport');
210
211 add_action('wp_ajax_AddTeacher', 'wpsp_AddTeacher');
212
213 add_action('wp_ajax_AddParent', 'wpsp_AddParent');
214
215 add_action('wp_ajax_AddClass', 'wpsp_AddClass');
216
217 add_action('wp_ajax_UpdateClass', 'wpsp_UpdateClass');
218
219 add_action('wp_ajax_GetClass', 'wpsp_GetClass');
220
221 add_action('wp_ajax_DeleteClass', 'wpsp_DeleteClass');
222
223 add_action('wp_ajax_AddExam', 'wpsp_AddExam');
224
225 add_action('wp_ajax_UpdateExam', 'wpsp_UpdateExam');
226
227 add_action('wp_ajax_ExamInfo', 'wpsp_ExamInfo');
228
229 add_action('wp_ajax_DeleteExam', 'wpsp_DeleteExam');
230
231 add_action('wp_ajax_getStudentsList', 'wpsp_getStudentsList');
232
233 add_action('wp_ajax_AttendanceEntry', 'wpsp_AttendanceEntry');
234
235 add_action('wp_ajax_deleteAttendance', 'wpsp_DeleteAttendance');
236
237 add_action('wp_ajax_getStudentsAttendanceList', 'wpsp_getStudentsAttendanceList');
238
239 add_action('wp_ajax_getAbsentees', 'wpsp_GetAbsentees');
240
241 add_action('wp_ajax_getAbsentDates', 'wpsp_GetAbsentDates');
242
243 add_action('wp_ajax_getAttReport', 'wpsp_GetAttReport');
244
245 add_action('wp_ajax_AddSubject', 'wpsp_AddSubject');
246
247 add_action('wp_ajax_SubjectInfo', 'wpsp_SubjectInfo');
248
249 add_action('wp_ajax_UpdateSubject', 'wpsp_UpdateSubject');
250
251 add_action('wp_ajax_DeleteSubject', 'wpsp_DeleteSubject');
252
253 add_action('wp_ajax_subjectList', 'wpsp_SubjectList');
254
255 add_action('wp_ajax_save_timetable', 'wpsp_SaveTimetable');
256
257 add_action('wp_ajax_deletsloat', 'wpsp_DeleteTimetablesloat');
258
259 add_action('wp_ajax_deletTimetable', 'wpsp_DeleteTimetable');
260
261 add_action('wp_ajax_addMark', 'wpsp_AddMark');
262
263 add_action('wp_ajax_getMarksubject', 'wpsp_getMarksubject');
264
265 add_action('wp_ajax_GenSetting', 'wpsp_GenSetting');
266
267 add_action('wp_ajax_GenSettingsms', 'wpsp_GenSettingsms');
268
269 add_action('wp_ajax_GenSettingsocial', 'wpsp_GenSettingsocial');
270
271 add_action('wp_ajax_addSubField', 'wpsp_AddSubField');
272
273 add_action('wp_ajax_updateSubField', 'wpsp_UpdateSubField');
274
275 add_action('wp_ajax_deleteSubField', 'wpsp_DeleteSubField');
276
277 add_action('wp_ajax_manageGrade', 'wpsp_ManageGrade');
278
279 add_action('wp_ajax_addEvent', 'wpsp_AddEvent');
280
281 add_action('wp_ajax_updateEvent', 'wpsp_UpdateEvent');
282
283 add_action('wp_ajax_deleteEvent', 'wpsp_DeleteEvent');
284
285 add_action('wp_ajax_listEvent', 'wpsp_ListEvent');
286
287 add_action('wp_ajax_deleteAllLeaves', 'wpsp_DeleteLeave');
288
289 add_action('wp_ajax_addLeaveDay', 'wpsp_AddLeaveDay');
290
291 add_action('wp_ajax_getLeaveDays', 'wpsp_GetLeaveDays');
292
293 add_action('wp_ajax_getClassYear', 'wpsp_GetClassYear');
294
295 add_action('wp_ajax_addTransport', 'wpsp_AddTransport');
296
297 add_action('wp_ajax_updateTransport', 'wpsp_UpdateTransport');
298
299 add_action('wp_ajax_viewTransport', 'wpsp_ViewTransport');
300
301 add_action('wp_ajax_deleteTransport', 'wpsp_DeleteTransport');
302
303 add_action('wp_ajax_sendMessage', 'wpsp_SendMessage');
304
305 add_action('wp_ajax_viewMessage', 'wpsp_ViewMessage');
306
307 add_action('wp_ajax_deleteMessage', 'wpsp_DeleteMessage');
308
309 add_action('wp_ajax_photoUpload', 'wpsp_UploadPhoto');
310
311 add_action('wp_ajax_deletePhoto', 'wpsp_DeletePhoto');
312
313 add_action('wp_ajax_DeleteStudent', 'wpsp_DeleteStudent');
314
315 add_action('wp_ajax_DeleteTeacher', 'wpsp_DeleteTeacher');
316
317
318
319 // Teacher modules
320
321 add_action('wp_ajax_getTeachersList', 'wpsp_getTeachersList');
322
323 add_action('wp_ajax_TeacherAttendanceEntry', 'wpsp_TeacherAttendanceEntry');
324
325 add_action('wp_ajax_TeacherAttendanceDelete', 'wpsp_TeacherAttendanceDelete');
326
327 add_action('wp_ajax_TeacherAttendanceView', 'wpsp_TeacherAttendanceView');
328
329 add_action('wp_ajax_UpdateTeacher', 'wpsp_UpdateTeacher');
330
331
332
333 // Notification modules
334
335 add_action('wp_ajax_deleteNotify', 'wpsp_deleteNotify');
336
337 add_action('wp_ajax_getNotify', 'wpsp_getNotifyInfo');
338
339
340
341 // Change Password
342
343 add_action('wp_ajax_changepassword', 'wpsp_changepassword');
344
345
346
347 // Import Dummy data
348
349 add_action('wp_ajax_ImportContents', 'wpsp_Import_Dummy_contents');
350
351 }
352
353
354
355 // Get error content and update
356
357 function wpsp_save_error()
358
359 {
360
361 update_option('plugin_error', ob_get_contents());
362
363 }
364
365 add_action('activated_plugin', 'wpsp_save_error');
366
367
368
369 //Show Link Plugin Page
370
371 function wpsp_add_plugin_links($links)
372
373 {
374
375 $plugin_links = array(
376
377 '<a href="admin.php?page=WPSchoolPress"><strong style="color: #11967A; display: inline;">' . __('Settings', 'WPSchoolPress-123') . '</strong></a>'
378
379 );
380
381 return array_merge($plugin_links, $links);
382
383 }
384
385 add_filter('plugin_action_links_' . plugin_basename(__FILE__) , 'wpsp_add_plugin_links', 20);
386
387 ?>