PluginProbe
School Management System – WPSchoolPress / 2.0.10
School Management System – WPSchoolPress v2.0.10
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.10, at wpschoolpress.php

773 lines 8.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3
4
5 /*
6
7
8
9 Plugin Name: WPSchoolPress
10
11
12
13 Plugin URI: http://wpschoolpress.com
14
15
16
17 Description: WPSchoolpress is a school management system plugin that makes school activities transparent to parents. For more information please visit our website.
18
19
20
21 Version: 2.0.10
22
23
24
25 Author: WPSchoolPress Team
26
27
28
29 Author URI: wpschoolpress.com
30
31
32
33 Text Domain: WPSchoolPress
34
35
36
37 Domain Path: languages
38
39
40
41
42
43
44
45 @package WPSchoolPress
46
47
48
49 */
50
51
52
53
54
55
56
57 // Exit if accessed directly
58
59
60
61
62
63
64
65 if (!defined('ABSPATH')) exit;
66
67
68
69 /**
70
71
72
73 * Basic plugin definitions
74
75
76
77 *
78
79
80
81 * @package WPSchoolPress
82
83
84
85 * @since 2.0.10
86
87
88
89 */
90
91
92
93
94
95
96
97 if (!defined('WPSP_PLUGIN_URL'))
98
99
100
101 {
102
103
104
105 define('WPSP_PLUGIN_URL', plugin_dir_url(__FILE__));
106
107
108
109 }
110
111
112
113
114
115
116
117 if (!defined('WPSP_PLUGIN_PATH'))
118
119
120
121 {
122
123
124
125 define('WPSP_PLUGIN_PATH', plugin_dir_path(__FILE__));
126
127
128
129 }
130
131
132
133
134
135
136
137 if (!defined('WPSP_PLUGIN_VERSION'))
138
139
140
141 {
142
143
144
145 define('WPSP_PLUGIN_VERSION', '2.0.10'); //Plugin version number
146
147
148
149 }
150
151
152
153
154
155
156
157 define('WPSP_PERMISSION_MSG', 'You don\'t have enough permission to access this page');
158
159
160
161
162
163
164
165 // Call the required files when plugin activate
166
167
168
169
170
171
172
173 register_activation_hook(__FILE__, 'wpsp_activation');
174
175
176
177
178
179
180
181 function wpsp_activation()
182
183
184
185 {
186
187
188
189 include_once (WPSP_PLUGIN_PATH . 'lib/wpsp-activation.php');
190
191
192
193
194
195 }
196
197
198
199
200
201
202
203 register_deactivation_hook( __FILE__, 'wpsp_deactivation');
204
205
206
207
208
209
210
211 function wpsp_deactivation()
212
213
214
215 {
216
217
218
219 include_once (WPSP_PLUGIN_PATH . 'lib/wpsp-deactivation.php');
220
221
222
223 }
224
225
226
227
228
229
230
231 // add action to load plugin
232
233
234
235
236
237 add_action('plugins_loaded', 'wpsp_plugins_loaded');
238
239
240
241
242
243
244
245 function wpsp_plugins_loaded()
246
247
248
249 {
250
251
252
253
254
255
256
257 $wpsp_lang_dir = dirname(plugin_basename(__FILE__)) . '/languages/';
258
259
260
261 load_plugin_textdomain('WPSchoolPress', false, $wpsp_lang_dir);
262
263
264
265
266
267
268
269 // initialize settings of plugin Open required files for initialization
270
271
272
273
274
275
276
277 require_once (WPSP_PLUGIN_PATH . 'lib/wpsp-ajaxworks.php');
278
279
280
281 require_once (WPSP_PLUGIN_PATH . 'lib/wpsp-ajaxworks-student.php');
282
283
284
285 require_once (WPSP_PLUGIN_PATH . 'lib/wpsp-ajaxworks-teacher.php');
286
287
288
289 require_once (WPSP_PLUGIN_PATH . 'wpsp-layout.php');
290
291
292
293 require_once (WPSP_PLUGIN_PATH . 'includes/wpsp-misc.php');
294
295
296
297 wpsp_get_setting();
298
299
300
301
302
303
304
305 global $wpsp_settings_data;
306
307
308
309 global $wpsp_admin, $wpsp_public, $paytmClass, $paypalClass;
310
311
312
313
314
315
316
317 // admin class handles most of functionalities of plugin
318
319
320
321
322
323
324
325 include_once (WPSP_PLUGIN_PATH . 'wpsp-class-admin.php');
326
327
328
329 $wpsp_admin = new Wpsp_Admin();
330
331
332
333 $wpsp_admin->add_hooks();
334
335
336
337
338
339
340
341 // public class handles most of functionalities of plugin
342
343
344
345
346
347
348
349 include_once (WPSP_PLUGIN_PATH . 'wpsp-class-public.php');
350
351
352
353 $wpsp_public = new Wpsp_Public();
354
355
356
357 $wpsp_public->add_hooks();
358
359
360
361 }
362
363
364
365
366
367
368
369 add_action('admin_init', 'ajax_actions');
370
371
372
373 function ajax_actions()
374
375
376
377 {
378
379
380
381
382
383
384
385 add_action('wp_ajax_listdashboardschedule', 'wpsp_listdashboardschedule');
386
387
388
389 add_action('wp_ajax_StudentProfile', 'wpsp_StudentProfile');
390
391
392
393 add_action('wp_ajax_AddStudent', 'wpsp_AddStudent');
394
395
396
397 add_action('wp_ajax_UpdateStudent', 'wpsp_UpdateStudent');
398
399
400
401 add_action('wp_ajax_StudentPublicProfile', 'wpsp_StudentPublicProfile');
402
403
404
405 add_action('wp_ajax_ParentPublicProfile', 'wpsp_ParentPublicProfile');
406
407
408
409 add_action('wp_ajax_TeacherPublicProfile', 'wpsp_TeacherPublicProfile');
410
411
412
413 add_action('wp_ajax_bulkDelete', 'wpsp_BulkDelete');
414
415
416
417 add_action('wp_ajax_undoImport', 'wpsp_UndoImport');
418
419
420
421 add_action('wp_ajax_AddTeacher', 'wpsp_AddTeacher');
422
423
424
425 add_action('wp_ajax_AddParent', 'wpsp_AddParent');
426
427
428
429 add_action('wp_ajax_AddClass', 'wpsp_AddClass');
430
431
432
433 add_action('wp_ajax_UpdateClass', 'wpsp_UpdateClass');
434
435
436
437 add_action('wp_ajax_GetClass', 'wpsp_GetClass');
438
439
440
441 add_action('wp_ajax_DeleteClass', 'wpsp_DeleteClass');
442
443
444
445 add_action('wp_ajax_AddExam', 'wpsp_AddExam');
446
447
448
449 add_action('wp_ajax_UpdateExam', 'wpsp_UpdateExam');
450
451
452
453 add_action('wp_ajax_ExamInfo', 'wpsp_ExamInfo');
454
455
456
457 add_action('wp_ajax_DeleteExam', 'wpsp_DeleteExam');
458
459
460
461 add_action('wp_ajax_getStudentsList', 'wpsp_getStudentsList');
462
463
464
465 add_action('wp_ajax_AttendanceEntry', 'wpsp_AttendanceEntry');
466
467
468
469 add_action('wp_ajax_deleteAttendance', 'wpsp_DeleteAttendance');
470
471
472
473 add_action('wp_ajax_getStudentsAttendanceList', 'wpsp_getStudentsAttendanceList');
474
475
476
477 add_action('wp_ajax_getAbsentees', 'wpsp_GetAbsentees');
478
479
480
481 add_action('wp_ajax_getAbsentDates', 'wpsp_GetAbsentDates');
482
483
484
485 add_action('wp_ajax_getAttReport', 'wpsp_GetAttReport');
486
487
488
489 add_action('wp_ajax_AddSubject', 'wpsp_AddSubject');
490
491
492
493 add_action('wp_ajax_SubjectInfo', 'wpsp_SubjectInfo');
494
495
496
497 add_action('wp_ajax_UpdateSubject', 'wpsp_UpdateSubject');
498
499
500
501 add_action('wp_ajax_DeleteSubject', 'wpsp_DeleteSubject');
502
503
504
505 add_action('wp_ajax_subjectList', 'wpsp_SubjectList');
506
507
508
509 add_action('wp_ajax_save_timetable', 'wpsp_SaveTimetable');
510
511
512
513 add_action('wp_ajax_deletsloat', 'wpsp_DeleteTimetablesloat');
514
515
516
517 add_action('wp_ajax_deletTimetable', 'wpsp_DeleteTimetable');
518
519
520
521 add_action('wp_ajax_addMark', 'wpsp_AddMark');
522
523
524
525 add_action('wp_ajax_getMarksubject', 'wpsp_getMarksubject');
526
527
528
529 add_action('wp_ajax_GenSetting', 'wpsp_GenSetting');
530
531
532
533 add_action('wp_ajax_GenSettingsms', 'wpsp_GenSettingsms');
534
535
536
537 add_action('wp_ajax_GenSettingsocial', 'wpsp_GenSettingsocial');
538
539
540
541 add_action('wp_ajax_addSubField', 'wpsp_AddSubField');
542
543
544
545 add_action('wp_ajax_updateSubField', 'wpsp_UpdateSubField');
546
547
548
549 add_action('wp_ajax_deleteSubField', 'wpsp_DeleteSubField');
550
551
552
553 add_action('wp_ajax_manageGrade', 'wpsp_ManageGrade');
554
555
556
557 add_action('wp_ajax_addEvent', 'wpsp_AddEvent');
558
559
560
561 add_action('wp_ajax_updateEvent', 'wpsp_UpdateEvent');
562
563
564
565 add_action('wp_ajax_deleteEvent', 'wpsp_DeleteEvent');
566
567
568
569 add_action('wp_ajax_listEvent', 'wpsp_ListEvent');
570
571
572
573 add_action('wp_ajax_deleteAllLeaves', 'wpsp_DeleteLeave');
574
575
576
577 add_action('wp_ajax_addLeaveDay', 'wpsp_AddLeaveDay');
578
579
580
581 add_action('wp_ajax_getLeaveDays', 'wpsp_GetLeaveDays');
582
583
584
585 add_action('wp_ajax_getClassYear', 'wpsp_GetClassYear');
586
587
588
589 add_action('wp_ajax_addTransport', 'wpsp_AddTransport');
590
591
592
593 add_action('wp_ajax_updateTransport', 'wpsp_UpdateTransport');
594
595
596
597 add_action('wp_ajax_viewTransport', 'wpsp_ViewTransport');
598
599
600
601 add_action('wp_ajax_deleteTransport', 'wpsp_DeleteTransport');
602
603
604
605 add_action('wp_ajax_sendMessage', 'wpsp_SendMessage');
606
607
608
609 add_action('wp_ajax_viewMessage', 'wpsp_ViewMessage');
610
611
612
613 add_action('wp_ajax_deleteMessage', 'wpsp_DeleteMessage');
614
615
616
617 add_action('wp_ajax_photoUpload', 'wpsp_UploadPhoto');
618
619
620
621 add_action('wp_ajax_deletePhoto', 'wpsp_DeletePhoto');
622
623
624
625 add_action('wp_ajax_DeleteStudent', 'wpsp_DeleteStudent');
626
627
628
629 add_action('wp_ajax_DeleteTeacher', 'wpsp_DeleteTeacher');
630
631
632
633
634
635
636
637 // Teacher modules
638
639
640
641 add_action('wp_ajax_getTeachersList', 'wpsp_getTeachersList');
642
643
644
645 add_action('wp_ajax_TeacherAttendanceEntry', 'wpsp_TeacherAttendanceEntry');
646
647
648
649 add_action('wp_ajax_TeacherAttendanceDelete', 'wpsp_TeacherAttendanceDelete');
650
651
652
653 add_action('wp_ajax_TeacherAttendanceView', 'wpsp_TeacherAttendanceView');
654
655
656
657 add_action('wp_ajax_UpdateTeacher', 'wpsp_UpdateTeacher');
658
659
660
661
662
663
664
665 // Notification modules
666
667
668
669 add_action('wp_ajax_deleteNotify', 'wpsp_deleteNotify');
670
671
672
673 add_action('wp_ajax_getNotify', 'wpsp_getNotifyInfo');
674
675
676
677
678
679
680
681 // Change Password
682
683
684
685 add_action('wp_ajax_changepassword', 'wpsp_changepassword');
686
687
688
689
690
691
692
693 // Import Dummy data
694
695
696
697 add_action('wp_ajax_ImportContents', 'wpsp_Import_Dummy_contents');
698
699
700
701 }
702
703
704
705
706
707
708
709 // Get error content and update
710
711
712
713 function wpsp_save_error()
714
715
716
717 {
718
719
720
721 update_option('plugin_error', ob_get_contents());
722
723
724
725 }
726
727
728
729 add_action('activated_plugin', 'wpsp_save_error');
730
731
732
733
734
735
736
737 //Show Link Plugin Page
738
739
740
741 function wpsp_add_plugin_links($links)
742
743
744
745 {
746
747
748
749 $plugin_links = array(
750
751
752
753 '<a href="admin.php?page=WPSchoolPress"><strong style="color: #11967A; display: inline;">' . __('Settings', 'WPSchoolPress-123') . '</strong></a>'
754
755
756
757 );
758
759
760
761 return array_merge($plugin_links, $links);
762
763
764
765 }
766
767
768
769 add_filter('plugin_action_links_' . plugin_basename(__FILE__) , 'wpsp_add_plugin_links', 20);
770
771
772
773 ?>