150 likes | 361 Views
Student Advising System. Presented By: Kue Cha Raymond Tse. Purpose of Our Project. The existing problem with the current advising system. Paper Work Incomplete Paperwork Late Registration. Proposed Solution. Student Advising System for students Keep track of academic records
E N D
Student Advising System Presented By: Kue Cha Raymond Tse
Purpose of Our Project • The existing problem with the current advising system. • Paper Work • Incomplete Paperwork • Late Registration
Proposed Solution • Student Advising System for students • Keep track of academic records • Course plan • Set appointment to meet with advisor
General design • Three tier Architecture • HTML • PHP/JavaScript • MySQL Database
ER diagram • ER Diagram
Database Tables • Number of tables CREATE TABLE student_info ( student_id INT UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY (student_id), saclink VARCHAR(10) NOT NULL, last_name VARCHAR(20) NOT NULL, first_name VARCHAR(20) NOT NULL, middle VARCHAR(20) NULL, ssn INT(4) NOT NULL, phone VARCHAR(20) NOT NULL, email VARCHAR(100) NOT NULL UNIQUE, catalog_year VARCHAR(4) NOT NULL, graduation_date DATE NOT NULL );
Functions behind • Advisors/Administrator Side • View student records • Delete appointment of students • Change student status from pending/approved • Students Side • Add/Edit personal information • Add/Edit course information • Plan schedule • Make appointment
Function (Cont..) • Email notification • When user first register • Advisor Change status of students • Password recovery
Session • A session is a series of interactions between two communication end points that occurs during the span of a single connection. • The session is kept "alive" on the server as long as the user is logged on to the system. • The session is destroyed when the user logs-out from the system or after a predefined period of inactivity.
Session (cont) • session_start(); • It is required before any of your php/html code. • Session_destroy() • This will kill all the registered session variables. • It is used to create logout function. • Session_unset($_SESSION[‘user’]) • This will set created session variable into null. • It can also be used in logout function.
SessionExample: if ($_POST) { $tempName = $_POST ['username']; $tempPass = $_POST ['password']; $result = mysql_query ("SELECT * FROM members WHERE username = '$tempName' AND password = '$tempPass'") $found = mysql_num_rows ($result); if ($_POST) if ($found) { $_SESSION ['username'] = $tempName; $_SESSION ['password'] = $tempPass; $_SESSION ['logged'] = 'logged'; printf("<META http-equiv='REFRESH' content='0; url =index.php?action=%s'>", MEMBER); } else { #---------------- needs layout for invalid username and password -----------------# print("<BR/>Invalid username and password. Please try again.<BR/>"); printf("<BR/>Click <a href ='index.php?action=%s'>here</a> to try again.<BR/>", LOGIN_PG); } } else { die("<BR/>Please log in.<BR/>"); }
MD5 Encryption • Hashing algorithm • Generates 32 character ID • Harder to guess • Use it for Session ID or User’s password
MD5 Example: • Function getMD5() • { • //gives a new random password • $randomId = rand(); • $lengthOfString = 6; //how long you want the new password to be • $stringPosition = 12; //position to start getting characters, md5 hash will be 32 char string • $randomId = md5($randomId); //generate 32 char string • $temp = substr($randomId, $stringPosition , $lengthOfString);//change variables here because we want to send this plaintext back to the calling function (using a reference variable) so you will be able to read the password • $randomIdMD5 = md5($temp); //create our hash • return $randomIdMD5; • }//end getMD5
Demo • Demo • Any more questions