From edc6dea077cf30f867d23449cee28e6798a1422f Mon Sep 17 00:00:00 2001 From: Jay Patel Date: Sun, 9 Aug 2020 12:56:04 +0530 Subject: [PATCH] UPDATED MVC --- login.php => Controller/login.php | 16 ++++---- .../process_faculty.php | 18 +++----- .../process_student.php | 19 +++------ .../process_user.php | 18 +++----- add.php => Model/add.php | 27 +++++------- faculty_model.php => Model/faculty_model.php | 2 +- student_model.php => Model/student_model.php | 2 +- user_model.php => Model/user_model.php | 2 +- .../Student_profile.php | 13 +++--- dashboard.php => View/dashboard.php | 5 ++- faculty.php => View/faculty.php | 27 +++++------- .../faculty_personal_profile.php | 12 +++--- .../faculty_profile.php | 15 ++++--- student.php => View/student.php | 25 ++++------- student_record.php => View/student_record.php | 33 ++++++--------- user.php => View/user.php | 18 ++++---- admin_header.php => common/admin_header.php | 41 ++++++++++++------- connect.php => common/connect.php | 0 eng.php => common/eng.php | 0 common/footer.php | 19 +++++++++ common/header.php | 22 ++++++++++ lang.php => common/lang.php | 0 logout.php => common/logout.php | 8 ++-- navbar.php => common/navbar.php | 16 ++++---- .../navbar_profile.php | 23 ++++------- rightmenu.php => common/rightmenu.php | 0 session.php => common/session.php | 0 sidemenu.php => common/sidemenu.php | 0 .../sidemenu_profile.php | 0 common/tableConst.php | 33 +++++++++++++++ index.php | 9 ++-- student.js | 18 ++++---- tableConst.php | 26 ------------ 33 files changed, 237 insertions(+), 230 deletions(-) rename login.php => Controller/login.php (67%) rename process_faculty.php => Controller/process_faculty.php (75%) rename process_student.php => Controller/process_student.php (74%) rename process_user.php => Controller/process_user.php (74%) rename add.php => Model/add.php (92%) rename faculty_model.php => Model/faculty_model.php (97%) rename student_model.php => Model/student_model.php (98%) rename user_model.php => Model/user_model.php (97%) rename Student_profile.php => View/Student_profile.php (86%) rename dashboard.php => View/dashboard.php (96%) rename faculty.php => View/faculty.php (96%) rename faculty_personal_profile.php => View/faculty_personal_profile.php (86%) rename faculty_profile.php => View/faculty_profile.php (85%) rename student.php => View/student.php (96%) rename student_record.php => View/student_record.php (87%) rename user.php => View/user.php (96%) rename admin_header.php => common/admin_header.php (71%) rename connect.php => common/connect.php (100%) rename eng.php => common/eng.php (100%) create mode 100644 common/footer.php create mode 100644 common/header.php rename lang.php => common/lang.php (100%) rename logout.php => common/logout.php (55%) rename navbar.php => common/navbar.php (66%) rename navbar_profile.php => common/navbar_profile.php (84%) rename rightmenu.php => common/rightmenu.php (100%) rename session.php => common/session.php (100%) rename sidemenu.php => common/sidemenu.php (100%) rename sidemenu_profile.php => common/sidemenu_profile.php (100%) create mode 100644 common/tableConst.php delete mode 100644 tableConst.php diff --git a/login.php b/Controller/login.php similarity index 67% rename from login.php rename to Controller/login.php index 5b32f0c..17a349d 100644 --- a/login.php +++ b/Controller/login.php @@ -1,5 +1,5 @@ query($sql); if($row['type']==2){ - header('Location: Student_profile.php'); + header('Location: ../View/Student_profile.php'); } else if($row['type']==3){ - header('Location: faculty_profile.php'); + header('Location: ../View/faculty_profile.php'); } else{ //update will not return count if($result){ - header('Location: dashboard.php'); + header('Location: '.DASH.''); } else { - header('Location: index.php?error=contact your administrator'); + header('Location: '.INDEX.'?error=contact your administrator'); } } } else { - header('Location: index.php?error=Invalid credentials'); + header('Location: '.INDEX.'?error=Invalid credentials'); } exit; } else { - header('Location: index.php?error=Invalid credentials'); + header('Location: '.INDEX.'.?error=Invalid credentials'); } } else { - header('Location: index.php?error=Invalid credentials'); + header('Location: '.INDEX.'.?error=Invalid credentials'); } ?> \ No newline at end of file diff --git a/process_faculty.php b/Controller/process_faculty.php similarity index 75% rename from process_faculty.php rename to Controller/process_faculty.php index 37a4581..f4ac225 100644 --- a/process_faculty.php +++ b/Controller/process_faculty.php @@ -1,17 +1,9 @@ + Dashboard - Add - + @@ -194,7 +187,7 @@ } else { - header('Location: index.php'); + header('Location: '.INDEX); } ?> diff --git a/faculty_model.php b/Model/faculty_model.php similarity index 97% rename from faculty_model.php rename to Model/faculty_model.php index fb43142..ca37abc 100644 --- a/faculty_model.php +++ b/Model/faculty_model.php @@ -1,5 +1,5 @@ + @@ -33,8 +36,8 @@ - - + +

Your Profile

@@ -44,7 +47,7 @@ $name = $_SESSION['username']; } echo '
- Avatar + Avatar

'.$name.'

Architect & Engineer

diff --git a/dashboard.php b/View/dashboard.php similarity index 96% rename from dashboard.php rename to View/dashboard.php index 36c9275..b860bf2 100644 --- a/dashboard.php +++ b/View/dashboard.php @@ -1,6 +1,7 @@ + @@ -43,7 +36,7 @@ Dashboard - Faculty Master - +