Documente Academic
Documente Profesional
Documente Cultură
By Keo Lakhena, Graduate Student Advisor: Oum Saokosal Sikkim Manipal University, Build Bright University
I. INTRODUCTION
Founded in 2005 by the support of 27 million US Dollars from Republic of Korea, NPIC, under the ministry of Labour and Vocational Training of Cambodia, is the chosen one to be center for vocational training and higher education. NPIC was opened officially on May 16, 2005 by the Prime Minister Hun Sen. Standing on a land as big as 10 Hectares, NPIC is the biggest University in size in Cambodia. NPIC is big enough to hold more than 20,000 people. Students come from diverse backgrounds from the city and provinces. They share a culture that respects openness, inclusiveness, collegiality and diversity. I am proud of our talented, motivated and energetic staff - many of whom are foreigners and knowledgeable Cambodians. We provide a real focus on the student experience. Students will learn skills with longtime experienced Khmer lecturers and improve high skills with Korean lecturers within 6 hours a day and 5 days a week. After they graduated, they would have opportunities to study higher grade and to work in Korea. Yet NPIC does not have Alumni System; as for this reason, Online Alumni Management System is being developed to facilitate the management and controlling the information of Alumni. This system is web-based and developed using open source language (PHP) and database (MySQL) running on open source web server (Apache) at the server side. On the client side, JavaScript and JQuery (extension of JavaScript) combined with HTML and CSS to dynamically produce standardized web content. The Alumni System is available and accessible on any modern browsers including smart phone built-in browsers.
II. OBJECTIVES
2.1. Objectives of the Project
The objectives of the project are to create a user-friendly and easy-to-use software application which can tackle the problems of the old system. The project would provide the following advantages: 1. Providing user authentication: A user can access to the system if and only if he/she has a valid paired user name and password. 2. Managing the students and their jobs information Student can view their own profile Student can view/search for their friends profile Student can receive the NPICs latest news and events Student can receive job announcement Student can view their thesis project and their advisers
3. Reporting query Report of the alumni list Report of jobs, news and events Report of batch and department
Manage User Authentication: manage users that use the system. Reporting Query: for monthly, quarterly, etc.
Software Specifications
This project is built towards making use of Open Source Software both the language, database and web server. The following is the list of software tools use in this project: Programming Languages HTML CSS Javascript (jquery-1.7.1.min.js) PHP Database: Mysql database Web Server Wamp Server Browser Moliza FireFox(Recommand) Internet Explorer Safari Google Chrome Opera Opera mobile UC browser Version 3 or later. Version 7 or later. Version 5 or later. Version 10 or later. Version 11.1 or later. Version 7 or later. Version 7.6 or later. Version 2.0 or later Version 5.5.14 Version 4.0 Version CSS 1 Version 1.7.1 Version 5
Hardware Specifications
This project use technology client server so many clients can connect to one server. For best performance, the following are the recommended requirement:
Clients side: Operating System: Hard Disk Ram VGA Server side: Operating System: Hard Disk Ram VGA Microsoft window server 2000, 2003,2008 Linux Microsoft window XP, Window 7 and Vista Minimum free space 5GB Minimum 512 MB Minimum 64 MB
Could not find Alumni information on internet. Difficult to contact them by phone or email. Could not know about their current information and their jobs. Could not provide accurate info of alumni to Min of lab
Student :his/her jobs are such as: Comment using Facebook plugin View their own profile View information of their friends alumni
Administrator: is a user who can manage users that use the system such as: Create Users Assign Object to users Add/Remove Object from users Reset Password for user Create, update, delete students information and profile Create, update, delete news and event Post job announcement List of students thesis and advisor.
* Student info :
10
11
4.3.1.2.Update Anomalies
Relations that have redundant data may have problems called update anomalies, which are classified as ,
12
4.3.1.4.2.Inference Rules
13
A set of all functional dependencies that are implied by a given set of functional dependencies X is called closure of X, written X+. A set of inference rule is needed to compute X+ from X. Armstrongs axioms 1. Reflexivity: 2. Augmentation: 3. Transitivity: If B is a subset of A, then A B If A B, then A, C B If A B and B C, then A C
4. Self-determination: A A 5. Decomposition: 6. Union: 7. Composition: If A B,C then A B and A C If A B and A C, then A B,C If A B and C B, then A,C B
14
For the relational data model, it is important to recognize that it is only first normal form (1NF) that is critical in creating relations. All the subsequent normal forms are optional.
15
function dependent attributes from the relation by placing them in a new relation along with a copy of their determinant.
16
A relation that is in Boyce-Codd normal form and contains no nontrivial multi-valued dependencies.
17
18
19
4 5
Email Role
varchar varchar
50 20
yes yes
2. tbl_student No 1 2 3 4 5 6 7 8 9 10 Fieldname Stu_id Stu_name sex Birth_date email phone address Batch_id Dept_id Project_id Type int varchar varchar datetime varchar number varchar int int int Size 10 20 10 8 20 10 50 10 10 10 yes yes yes Primary Key yes Foreign key Not Null yes yes yes yes yes yes yes yes yes yes
3. tbl_profile No 1 2 3 Fieldname Stu_id current photo Type int varchar photo Size 10 20 Primary Key yes Foreign key Not Null yes yes yes
4. tbl_thesis No 1 2 3 4 5 Fieldname Project_id Project_name Year description Advisor_id Type int varchar number longtext int 10 yes Size 10 20 9 Primary Key yes Foreign key Not Null yes yes yes yes yes
20
5. tbl_advisor No 1 2 3 4 Fieldname Advisor_id Advisor_name position Project_id Type int varchar varchar int Size 10 20 50 10 yes Primary Key yes Foreign key Not Null yes yes yes yes
6. tbl_dept No 1 2 3 Fieldname Dept_id Dept_name Stu_id Type int varchar int Size 10 20 10 yes Primary Key yes Foreign key Not Null yes yes yes
7. tbl_batch No 1 2 3 4 Fieldname Batch_id Batch_name year Stu_id Type int varchar number int Size 10 20 10 10 yes Primary Key yes Foreign key Not Null yes yes yes yes
8. tbl_job No 1 2 3 4 5 6 7 Fieldname Job_id Job_name Job_detail Company Start_date End_date Stu_id Type int varchar Longtext varchar Datetime datetime int 10 yes 20 Size 10 20 Primary Key yes Foreign key Not Null yes yes yes yes yes yes
21
9. tbl_gallary No 1 2 3 4 5 6 7 Fieldname gal_id gal_name gal_url gal_filename gal_cat gal_show gal_date Type int varchar varchar varchar varchar varchar datetime Size 10 20 50 50 20 50 Primary Key yes Foreign key Not Null yes yes yes yes yes yes yes
10. tbl_event No 1 2 3 4 5 Fieldname E_ID E_title E_content E_new E_date Type int varchar longtext varchar datetime 20 Size 10 20 Primary Key yes Foreign key Not Null yes yes yes yes yes
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Architecture
VI. CODING
Login Page:
<?PHP include_once("../insert_general_pages.php"); if(isset($_SESSION['logged']) && $_SESSION['logged'] == "accessible_admin"){ header("Location: index.php"); // career the last string exit; } mysql_close($server_connection); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head profile="http://www.w3.org/2005/10/profile"> <link rel="icon" type="image/png" href="<?PHP echo $row_web['web_url']; ?>/favicon.png">
40
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title><?PHP echo $row['page_title'];?> - <?PHP echo $row_web['web_title']; ?></title> <meta name="description" content="<?PHP echo $row_web['web_description']; ?>" /> <meta name="keywords" content="<?PHP echo $row_web['web_keywords']; ?>" /> <link rel="stylesheet" type="text/css" media="screen,projection" href="<?PHP echo $row_web['web_url']; ?>/css/style_screen.css" /> <link rel="stylesheet" type="text/css" media="print" href="<?PHP echo $row_web['web_url']; ?>/css/style_print.css" /> </head> <body id="body_admin"> <div class="page-container-2"> <!-- HEADER --> <!-- Navigation Level 1 --> <div class="nav1-container"> <div class="nav1"> <ul> <li><a href="<?PHP echo $row_web['web_url']; ?>">Home</a></li> <li><a href="<?PHP echo $row_web['web_url']; ?>/page/?p=89">sitemap</a></li> <li><a href="<?PHP echo $row_web['web_url']; ?>/page/?p=85">Contact us</a></li> <?PHP if ($admin_zone == "yes"){ ?> <li id="nav_logout"><a href="<?PHP echo $row_web['web_url']; ?>/truly-admin/">admin zone</a></li> <li id="nav_logout"><a href="<?PHP echo $row_web['web_url']; ?>/trulyadmin/logout.php">logout</a></li> <?PHP } ?> </ul> </div></div> <div class="buffer1"> </div> <!-- NAVIGATION --> <!-- Navigation Level 3 --> <!-- CONTENT --> <div class="content1"> <table border="0" height="530" width="100%"><tr><td> <!-- Text container --> <center> <table width="43%" background="../img/log.png" cellspacing="25" cellpadding="0"> <tr><th> <h1>Administrator Security Login</h1> </th></tr>
41
<tr><td> <form name="frm_login" action="logged.php" method="post"> <table width="80%" border="0" cellspacing="5" cellpadding="0"> <tr> <td width="40%" height="30" align="right">Username</td> <td width="10" height="30"> </td> <td height="30"><label> <input name="ad_username" type="text" class="text" id="username" /> </label></td> </tr> <tr> <td width="40%" height="30" align="right">Password</td> <td width="10" height="30"> </td> <td height="30"><label> <input name="ad_password" type="password" class="text" id="password" /> </label></td> </tr> <tr> <td width="40%" height="30" align="right"> </td> <td width="10" height="30"> </td> <td height="30"><label> <input name="login" type="submit" class="text" id="login" value="Login" /> </label></td> </tr> </table> </form> </td></tr> <tr><td height="45"> </td></tr></table></center> </td></tr></table> </div> </div> <!--Page title --> </body> </html>
-------------------------------------------------------Logout Code :
<?PHP session_start(); // logout session_destroy(); header("Location: ../"); exit; ?>
-------------------------------------------------------Admin Page:
<?PHP error_reporting(E_ERROR);
42
//session_start(); include_once("insert_check_logged_admin.php"); include_once("../insert_general_pages.php"); $query = "SELECT * FROM tbl_job ORDER BY job_id DESC LIMIT 0, 1000"; $result = mysql_query($query) or die('Error in query: $query' . mysql_error()); include_once("../get_list_index.php"); // **** display data ******************************************** $min_record = (($which_page - 1) * $record_in_page) + 1; $max_record = $which_page * $record_in_page; $current_record = 1; $result_display = ""; if (mysql_num_rows($result) > 0){ while ($row = mysql_fetch_assoc($result)){ //retrieve data from recordset by item name if ($current_record >= $min_record && $current_record <= $max_record){ $result_display .= height=20>"; "<tr
$result_display .= "<td align='left' valign='middle' width=150 >" . $row['company'] . "</td>";//data $result_display .= "<td align='left' valign='middle' width=200><a href='job/read.php?s=" . $row['job_id'] . "'>" . $row['job_name'] . "</a></td>"; $result_display .= "<td align='left' valign='middle' width=100>" . $row['job_detail'] . "</td>"; $result_display .= "<td align='left' valign='middle' width=100>" . $row['start_date'] . "</td>"; $result_display .= "<tr>"; } $current_record++; } } mysql_close($server_connection); /****End of Database Stuff *****/ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="keywords" content="" /> <meta name="description" content="" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Admin Zone</title> <link href="../css/style.css" rel="stylesheet" type="text/css" media="screen" /> <script type="text/javascript" src="lib/jquery1.7.1.min.js"></script>
43
<script type="text/javascript" src="lib/jquery.slidertron1.0.js"></script> </head> <body> <div id="wrapper"> <div id="logo"> </div> <div id="header"> <div id="menu"> <ul> <li><a href="/alumni/">Home</a></li> <li><a href="../student/">Alumni List</a></li> <li><a href="../notice/">Events</a></li> <li><a href="../gal/">Gallary</a></li> <li><a href="../job/">Career</a></li> <li><a href="#">Contact</a></li> <li><?php include_once("../top.php"); ?></li> </ul> </div> <!-- end #menu --> </div> <div id="page"> <div id="page-bgtop"> <div id="content"> <div class="post"> <h2 class="title">Job Announcement</h2> <div class="entry"> <p> <?PHP if(isset($_SESSION['logged']) && $_SESSION['logged'] == "accessible_admin"){ ?> <table width="100%"> <tr> <td></td> <td align="left" ></td> </tr> <tr height="25"> <th><p class="meta">Copany Name</p></th> <th><p class="meta">Job Title</p></th> <th><p class="meta">Job Attachment</p></th> <th><p class="meta">Post Date</p></th> </tr> <?php echo $result_display; ?> <tr> <td colspan="4" height="10px" style="bordertop:1px #CCC solid; border-bottom:0px #CCC solid"><div id="list_index"><?PHP echo $list_index;?> </div></td> </tr> </table> <?PHP } ?> </p> </div> </div>
44
</div> <div id="sidebar"> <br/><br/> <h2>Administrator</h2> <ul> <li> <ul> <?PHP if(isset($_SESSION['logged']) && $_SESSION['logged'] == "accessible_admin"){ ?> <li id="nav_qa"><a href="job">Job Announcement</a></li> <li id="nav_faq"><a href="student">Manage Student</a></li> <li id="nav_notice"><a href="notice">Manage News&Events</a></li> <li id="nav_pic"><a href="gallery">Manage Gallary</a></li> <li id="nav_setting"><a href="setting">User Setting</a></li> <?PHP } else if(isset($_SESSION['logged']) && $_SESSION['logged'] == "accessible_user"){ ?> <li id="nav_notice"><a href="notice">News & Events</a></li> <?PHP } ?> </ul> </li> </ul> </div> </div> </div> <div id="footer"> <p>Copyright 2011-2012. National Polytechnic Institute of Cambodia <a href="http://npic.edu.kh/">NPIC</a>. All right reserved.</p> </div> <!-- end #footer --> </body> </html>
45
if($_SESSION['logged'] != "accessible_admin"){ //This is redirect to a page header("Location: ../login.php"); // career the last string exit; } else if($_SESSION['logged'] == "accessible_admin"){ $admin_zone = "yes"; } //end of check user //Initialize record in a page. Must put it here because it's related to show "all album" where it show only 10. $record_in_page = 50; ////////////////////// /****Database Stuff *****/ include_once("../../mydbcnt.php"); //connectio basis
//$query = "SELECT * FROM tbl_songs ORDER BY song_rating DESC, song_title LIMIT 0, 1000"; $query = "SELECT * FROM tbl_student ORDER BY stu_id DESC LIMIT 0, 1000"; $result = mysql_query($query) or die('Error in query: $query' . mysql_error()); // get page index '''''''''''''''''''''''''''''''''''''''''''''''''''''' //***** Display Ago time ********* function agotime($date) { if(empty($date)) { return "No date provided"; } $periods = array("second", "minute", "hour", "day", "week", "month", "year", "decade"); $lengths = array("60","60","24","7","4.35","12","10"); $now $unix_date = time(); = strtotime($date);
// check validity of date if(empty($unix_date)) { return "Bad date"; } // is it future date or past date if($now > $unix_date) { $difference = $now - $unix_date; $tense = "ago"; } else {
46
$difference $tense
for($j = 0; $difference >= $lengths[$j] && $j < count($lengths)-1; $j++) { $difference /= $lengths[$j]; } $difference = round($difference); if($difference != 1) { $periods[$j].= "s"; } return "$difference $periods[$j] {$tense}"; } //***** End of Ago time *********
//return the current url function curPageURL() { $pageURL = 'http'; if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER[" REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } return $pageURL; } //end of current url $which_page = $_REQUEST["page"]; if ($which_page == ""){ $which_page = 1; } $rs_length = mysql_num_rows($result); // max of recordset //Response.Write(rs_length) function numPages($length, $recordinpage){ $numpage = 0; $numpage = ceil($length / $recordinpage); return $numpage; } $num_page = numPages($rs_length, $record_in_page); //'''''''''''''''''''''''''''''''''''''''''''''''''''''' //'''''''' display page |1|2|... menu '''''''''''''''' if ($which_page - 1 > 0){ $list_index .="<a href='" . "?page=" . ($which_page - 1) . "'<span class='page'>Previous</span></a> "; }
47
for ($i= 1; $i<=$num_page; $i++){ if ($which_page == $i){ $list_index .= "<span class='current_page'>" . $i . "</span>"; } else{ if(strpos(curPageURL(),"page") === false){ //if there is no "page" in the URL, add "&page=" $rep_page_num = curPageURL() . "?page=" . $i; } else { // if there is "page" in the URL $rep_page_num = str_replace($which_page, $i, curPageURL()); // replace current page number with $i } $list_index .= " <a href='" . $rep_page_num . "'><span class='page'>" . $i . "</span></a> "; } } //next button if ($which_page + 1 <= $num_page){ $list_index .=" <a href='" . "?page=" . ($which_page + 1) . "'<span class='page'>Next</span></a>"; } // end of page index ''''''''''''''''''''''''''''''''''''''''''''''''''''' // **** display data ******************************************** //echo "which page: $which_page"; $min_record = (($which_page - 1) * $record_in_page) + 1; $max_record = $which_page * $record_in_page; $current_record = 1; $result_display; if (mysql_num_rows($result) > 0){ while ($row = mysql_fetch_assoc($result)){ //retrieve data from recordset by item name if ($current_record >= $min_record && $current_record <= $max_record){ if($row['stu_photo'] =='Readed'){ $result_display .= height=20> <td align='left' valign=top align=center style='padding:0 0 10px 0'> <a href='edit.php?q=" . $row['stu_id'] . "'>" . $row['stu_name'] . "</a></td> <td align='center' valign=top align=center>" . $row['gender'] . "</td> <td align='left' valign=top align=center>" . $row['stu_mobile'] . "</td> "<tr
48
<td align='left' valign=top align=center>" . $row['dept'] . " </td> <td align='left' valign=top align=center>" . $row['thesis_name'] . " </td> <td align='left' valign=top align=center>" . $row['job_name'] . " </td> </tr>"; } else{ height=20> $result_display .= "<tr
<td align='left' valign=top align=center style='padding:0 0 10px 0'> <strong><a href='edit.php?q=" . $row['stu_id'] . "'>" . $row['stu_name'] . "</a></strong></td> <td align='left' valign=top align=center>" . $row['gender'] . "</td> <td align='left' valign=top align=center>" . $row['stu_mobile'] . "</td> <td align='left' valign=top align=center>" . $row['dept'] . " </td> <td align='left' valign=top align=center>" . $row['thesis_name'] . " </td> <td align='left' valign=top align=center>" . $row['job_name'] . " </td> </tr>"; } $current_record++; } } //****** end of diplay data ******* mysql_close($server_connection); /****End of Database Stuff *****/ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="keywords" content="" /> <meta name="description" content="" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Admin Zone</title> <link href="../../css/style.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body> }
49
<div id="wrapper"> <div id="logo"> </div> <div id="header"> <div id="menu"> <ul> <li><a href="/alumni/">Home</a></li> <li><a href="../student/">Alumni List</a></li> <li><a href="../notice/">Events</a></li> <li><a href="../gal/">Gallary</a></li> <li><a href="../job/">Career</a></li> <li><a href="#">Contact</a></li> <?PHP if ($admin_zone == "yes"){ ?> <li><a href="../../admin/">admin zone</a></li> <li><a href="../../admin/logout.php">logout</a></li> <?PHP } ?> </ul> </div> <!-- end #menu --> </div> <div id="page"> <div id="page-bgtop"> <div id="content"> <div class="post"> <h2 class="title">Admin Zone</h2> <div class="entry"> <p> <?PHP if(isset($_SESSION['logged']) && $_SESSION['logged'] == "accessible_admin"){ ?> <table width="100%" border="0"> <tr height="40"><th><p class="meta">Student Name</th> <th align="center"><p class="meta">gender</p></th> <th align="left"><p class="meta">phone</p></th> <th align="left"><p class="meta">department</p></th> <th align="left"><p class="meta">Project</p></th> <th align="left"><p class="meta">job</p></th> </tr> <?PHP echo $result_display; ?> <tr> <td colspan="6" height="20px" style="border-top:1px #CCC solid; border-bottom:0px #CCC solid"> <div id="list_index"><?PHP echo $list_index;?> </div> </td> </tr> </table> <?PHP
50
} </p> </div> </div> </div> <div id="sidebar"> <br/><br/> <h2>Manage Student</h2> <ul> <li> <ul> <?PHP if(isset($_SESSION['logged']) && $_SESSION['logged'] == "accessible_admin"){ ?> <li id="nav_viewquestions"><a href="../student">View student list</a></li> <li id="nav_postaquestion"><a href="../student/add.php">Register student </a></li> <li id="nav_viewquestions"><a href="../student/edit.php">student profile</a></li> <li id="nav_viewquestions"><a href="../student/dept_list.php">View Dept list</a></li> <li id="nav_viewquestions"><a href="../student/batch_list.php">View Dept list</a></li> <?PHP } else if(isset($_SESSION['logged']) && $_SESSION['logged'] == "accessible_user"){ ?> <?PHP } ?> </ul> </li> </ul> </ul> </div> </div> </div> <div id="footer"> <p>Copyright</p> </div> <!-- end #footer --> </body> </html> ?>
--------------------------------------------------------
51
52
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="keywords" content="" /> <meta name="description" content="" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Admin Zone</title> <link href="../../css/style.css" rel="stylesheet" type="text/css" media="screen" /> <script src="../../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script> <script src="../../SpryAssets/SpryValidationTextarea.js" type="text/javascript"></script> <link href="../../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" /> <link href="../../SpryAssets/SpryValidationTextarea.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="wrapper"> <div id="logo"> <h1><a href="#">NPIC's ALUMNI </a></h1> <p><a href="http://www.freecsstemplates.org/">Alumni Picture</a></p> </div> <div id="header"> <div id="menu"> <ul> <li class="current_page_item"><a href="/alumni/">Home</a></li> <li><a href="/alumni/">Alumni List</a></li> <li><a href="../notice/">Events</a></li> <li><a href="#">Gallary</a></li> <li><a href="#">Career</a></li> <?PHP if ($admin_zone == "yes"){ ?> <li><a href="../../admin/">admin zone</a></li> <li><a href="../../admin/logout.php">logout</a></li> <?PHP } ?> </ul> </div> <!-- end #menu --> </div> <div id="page"> <div id="page-bgtop"> <div id="content"> <div class="post"> <h2 class="title">Manage Students</h2> <p class="meta">Register Student</p> <div class="entry"> <p> <?PHP if(isset($_SESSION['logged']) && $_SESSION['logged'] == "accessible_admin"){ ?>
53
<form name="frm_question" action="../student/added.php" method="post"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="20%" height="30" align="right">student name</td> <td width="10"> </td> <td width="79%"><span id="sprytextfield1"> <label> <input name="stu_name" type="text" class="text" id="name" size="25" maxlength="25" /> </label> <span class="textfieldRequiredMsg"></span><span class="textfieldMinCharsMsg"></span><span class="textfieldMaxCharsMsg"></span></span>*</td> </tr> <tr> <td width="20%" height="30" align="right">gender</td> <td width="10"> </td> <td width="79%"><label> <select name="gender" id="gender"> <?PHP if ($row['gender'] == "M") {?> <option value="M" selected="selected">M</option> <option value="F">F</option> <?PHP } else { ?> <option value="M">M</option> <option value="F" selected="selected">F</option> <?PHP }?> </select> </label></td> </tr> <tr> <td width="20%" height="30" align="right">date of birth</td> <td width="10"> </td> <td width="79%"><span id="sprytextfield2"> <input name="birth_date" type="text" class="text" id="birth_date" size="20" maxlength="10"/> <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span> </tr> <tr> <td width="20%" height="30" align="right">mobile</td> <td width="10"> </td> <td width="79%"><span id="sprytextfield12"> <label> <input name="stu_mobile" type="text" class="text" id="stu_mobile" size="25" maxlength="25"/> </label> <span class="textfieldRequiredMsg"></span></span> *</td> </tr> <tr> <td width="20%" height="30" align="right">Address</td> <td width="10"> </td> <td width="79%"><span id="sprytextfield4">
54
<input name="stu_add" type="text" class="text" id="stu_add" size="50" maxlength="50"/> <span class="textfieldRequiredMsg"></span><span class="textfieldMinCharsMsg"></span><span class="textfieldMaxCharsMsg"></span></span>*</td> </tr> <tr> <td width="20%" height="30" align="right">E-mail</td> <td width="10"> </td> <td width="79%"><span id="sprytextfield8"> <input name="stu_email" type="text" class="text" id="stu_email" size="50" maxlength="50"/> <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg">E-mail Not Correct.</span><span class="textfieldMinCharsMsg"></span><span class="textfieldMaxCharsMsg"></span></span>*</td> </tr> <tr> <td width="20%" height="30" align="right">self introduction</td> <td width="10"> </td> <td width="79%"><span id="sprytextarea1"> <label> <textarea name="stu_self_intro" cols="50" rows="5" class="text" id="stu_self_intro"></textarea> *<br /><span id="countsprytextarea1"> </span></label> <span class="textareaRequiredMsg"></span><span class="textareaMinCharsMsg"></span><span class="textareaMaxCharsMsg"></span></span></td> </tr> <tr> <td width="20%" height="30" align="right">batch</td> <td width="10"> </td> <td width="79%"><span id="sprytextfield3"> <label> <select name="batch" id="depatment"> <?PHP print $batchset; ?> </select> </label> <span class="textfieldRequiredMsg"></span><span class="textfieldMinCharsMsg"></span><span class="textfieldMaxCharsMsg"></span></span>*</td> </tr> <tr> <td width="20%" height="30" align="right">Dept</td> <td width="10"> </td> <td width="79%"><span id="sprytextfield3"> <label> <select name="dept" id="depatment"> <?PHP print $deptset; ?> </select> </label> <span class="textfieldRequiredMsg"></span><span class="textfieldMinCharsMsg"></span><span class="textfieldMaxCharsMsg"></span></span>*</td> </tr> <tr> <td width="20%" height="30" align="right">Project Name</td>
55
<td width="10"> </td> <td width="79%"><span id="sprytextfield8"> <input name="thesis_name" type="text" class="text" id="thesis_name" size="50" maxlength="50"/> <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg">E-mail Not Correct.</span><span class="textfieldMinCharsMsg"></span><span class="textfieldMaxCharsMsg"></span></span>*</td> </tr> <tr> <td width="20%" height="30" align="right">Advicer name 1</td> <td width="10"> </td> <td width="79%"><span id="sprytextfield8"> <input name="advicer1" type="text" class="text" id="advicer1" size="50" maxlength="50"/> <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg">E-mail Not Correct.</span><span class="textfieldMinCharsMsg"></span><span class="textfieldMaxCharsMsg"></span></span>*</td> </tr> <tr> <td width="20%" height="30" align="right">Advicer name 2</td> <td width="10"> </td> <td width="79%"><span id="sprytextfield8"> <input name="advicer2" type="text" class="text" id="advicer2" size="50" maxlength="50"/> <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg">E-mail Not Correct.</span><span class="textfieldMinCharsMsg"></span><span class="textfieldMaxCharsMsg"></span></span>*</td> </tr> <tr> <td width="20%" height="30" align="right">Degree</td> <td width="10"> </td> <td width="79%"><span id="sprytextfield3"> <input name="degree" type="text" class="text" id="degree" size="20" maxlength="50"/> <span class="textfieldRequiredMsg"></span><span class="textfieldMinCharsMsg"></span><span class="textfieldMaxCharsMsg"></span></span>*</td> </tr> <tr> <td width="20%" height="30" align="right">Job Name</td> <td width="10"> </td> <td width="79%"><span id="sprytextfield3"> <input name="job_name" type="text" class="text" id="job_name" size="50" maxlength="50"/> <span class="textfieldRequiredMsg"></span><span class="textfieldMinCharsMsg"></span><span class="textfieldMaxCharsMsg"></span></span>*</td> </tr> <tr> <td width="20%" height="30" align="right">company</td> <td width="10"> </td> <td width="79%"><span id="sprytextfield3"> <input name="company" type="text" class="text" id="major" size="50" maxlength="50"/>
56
<span class="textfieldRequiredMsg"></span><span class="textfieldMinCharsMsg"></span><span class="textfieldMaxCharsMsg"></span></span>*</td> </tr> <tr> <td width="20%" height="30" align="right">Start date</td> <td width="10"> </td> <td width="79%"><span id="sprytextfield3"> <input name="start" type="text" class="text" id="start" size="50" maxlength="50"/> <span class="textfieldRequiredMsg"></span><span class="textfieldMinCharsMsg"></span><span class="textfieldMaxCharsMsg"></span></span>*</td> </tr> <tr> <td width="20%" height="30" align="right">End date</td> <td width="10"> </td> <td width="79%"><span id="sprytextfield3"> <input name="end" type="text" class="text" id="end" size="50" maxlength="50"/> <span class="textfieldRequiredMsg"></span><span class="textfieldMinCharsMsg"></span><span class="textfieldMaxCharsMsg"></span></span>*</td> </tr> <tr> <td width="20%" height="30" align="right"> </td> <td width="10"> </td> <td width="79%"><input name="submit" type="submit" class="text" id="submit" value="Submit" /></td> </tr> <tr> <td width="20%" height="30" align="right"> </td> <td width="10"> </td> <td width="79%">* : Required</td> </tr> </table> </form> <?PHP } ?> </p> </div> </div> </div> <div id="sidebar"> <br/><br/> <h2>Manage Student</h2> <ul> <li> <ul> <?PHP if(isset($_SESSION['logged']) && $_SESSION['logged'] == "accessible_admin"){ ?> <li id="nav_viewquestions"><a href="../student">View student list</a></li>
57
<li id="nav_postaquestion"><a href="../student/add.php">Register student </a></li> <li id="nav_viewquestions"><a href="../student/edit.php">student profile</a></li> <?PHP } else if(isset($_SESSION['logged']) && $_SESSION['logged'] == "accessible_user"){ ?> <?PHP } ?> </ul> </li> </ul> <h2>Manage Dept</h2> <ul> <li> <ul> <li id="nav_viewquestions"><a href="../student/dept_list.php">View Dept list</a></li> <li id="nav_postaquestion"><a href="../student/dept_add.php">Add Dept </a></li> </ul> </li> </ul> <h2>Manage Batch</h2> <ul> <li> <ul> <li id="nav_viewquestions"><a href="../student/batch_list.php">View Dept list</a></li> <li id="nav_postaquestion"><a href="../student/batch_add.php">Add Dept </a></li> </ul> </li> </ul> </div> </div> </div> <div id="footer"> <p>Copyright</p> </div> <!-- end #footer --> <script type="text/javascript"> <!-var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {minChars:1, maxChars:25, validateOn:["blur"]}); var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "integer", {validateOn:["blur"]}); var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "integer", {validateOn:["blur"]}); var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "none", {validateOn:["blur"], minChars:1, maxChars:50});
58
var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5", "none", {validateOn:["blur"], isRequired:false}); var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6", "none", {validateOn:["blur"], minChars:1, maxChars:25}); var sprytextfield7 = new Spry.Widget.ValidationTextField("sprytextfield7", "none", {validateOn:["blur"], minChars:1, maxChars:50}); var sprytextfield8 = new Spry.Widget.ValidationTextField("sprytextfield8", "email", {validateOn:["blur"], minChars:1, maxChars:50}); var sprytextfield9 = new Spry.Widget.ValidationTextField("sprytextfield9", "none", {validateOn:["blur"], minChars:1, maxChars:25}); var sprytextfield10 = new Spry.Widget.ValidationTextField("sprytextfield10", "none", {validateOn:["blur"], minChars:1, maxChars:25}); var sprytextarea1 = new Spry.Widget.ValidationTextarea("sprytextarea1", {counterId:"countsprytextarea1", counterType:"chars_remaining", validateOn:["blur"], minChars:1, maxChars:500}); var sprytextfield11 = new Spry.Widget.ValidationTextField("sprytextfield11"); var sprytextfield12 = new Spry.Widget.ValidationTextField("sprytextfield12", "none", {validateOn:["blur"]}); //--> </script> </body> </html>
59
while ($row = mysql_fetch_assoc($result)){ //retrieve data from recordset by item name if ($current_record >= $min_record && $current_record <= $max_record){ if($row['job_new'] == "yes"){ $result_display .= "<tr height=20><td valign=top>" . $current_record . ". </td> align='left' valign=top width=100% > <td <a href='edit.php?q=" . $row['job_id'] . "'>" . $row['job_name'] . " <img src='../../images/icon_new.gif' width='19' height='10' alt='new' border=0 /> </a></td></tr>"; } else{ <td align='left' valign=top width=100% > <a href='edit.php?q=" . $row['job_id'] . "'>" . $row['job_name'] . "</a></td></tr>"; } } $current_record++; } } //****** end of diplay data ************************************ mysql_close($server_connection); /****End of Database Stuff *****/
?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="keywords" content="" /> <meta name="description" content="" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>New & Events</title> <link href="../../css/style.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body> <div id="wrapper"> <div id="logo"> </div> <div id="header"> <div id="menu"> <ul> <li class="current_page_item"><a href="/alumni/">Home</a></li>
60
<li><a href="/alumni/">Alumni List</a></li> <li><a href="../notice/">Events</a></li> <li><a href="#">Gallary</a></li> <li><a href="#">Career</a></li> <?PHP if ($admin_zone == "yes"){ ?> <li><a href="../../admin/">admin zone</a></li> <li><a href="../../admin/logout.php">logout</a></li> <?PHP } ?> </ul> </div> <!-- end #menu --> </div> <div id="page"> <div id="page-bgtop"> <div id="content"> <div class="post"> <h2 class="title">Admin Zone</h2> <p class="meta">Job Announcement</p> <div class="entry"> <p> <?PHP if(isset($_SESSION['logged']) && $_SESSION['logged'] == "accessible_admin"){ ?> <table width="100%"> <tr> <td></td> <td align="left" ></td> </tr> <tr height="25"> </tr> <?PHP //display searching result echo $result_display; ?> <tr> <td colspan="4" height="20px" style="bordertop:1px #CCC solid; border-bottom:0px #CCC solid"> <div id="list_index"><?PHP echo $list_index;?> </div> </td> </tr> </table> <?PHP } ?> </p> </div> </div> </div> <div id="sidebar"> <br/><br/> <h2>Manage Jobs</h2> <ul> <li> <ul> <?PHP
61
if(isset($_SESSION['logged']) && $_SESSION['logged'] == "accessible_admin"){ ?> <li><a href="../job">Jobs List</a></li> <li><a href="../job/add.php">Add New Job</a></li> <?PHP } else if(isset($_SESSION['logged']) && $_SESSION['logged'] == "accessible_user"){ ?> <li id="nav_notice"><a href="../index.php">Jobs List</a></li> <?PHP } ?> </ul> </li> </ul> </div> </div> </div> <div id="footer"> <p>Copyright</p> </div> <!-- end #footer --> </body> </html>
62
if ($current_record >= $min_record && $current_record <= $max_record){ if($row['not_new'] == "yes"){ $result_display .= "<tr height=20><td valign=top>" . $current_record . ". </td> align='left' valign=top width=100% >
<td
<a href='edit.php?q=" . $row['not_id'] . "'>" . $row['not_title'] . " <img src='../../images/icon_new.gif' width='19' height='10' alt='new' border=0 /> </a></td></tr>"; $result_display .= "<tr height=20><td valign=top>" . $current_record . ". </td> align='left' valign=top width=100% > <td <a href='edit.php?q=" . $row['not_id'] . "'>" . $row['not_title'] . "</a></td></tr>"; } } $current_record++; } else{
} } //****** end of diplay data ************************************ mysql_close($server_connection); /****End of Database Stuff *****/ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="keywords" content="" /> <meta name="description" content="" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>New & Events</title> <link href="../../css/style.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body> <div id="wrapper"> <div id="logo"> <h1><a href="#">NPIC's ALUMNI </a></h1> <p><a href="http://www.freecsstemplates.org/">Alumni Picture</a></p> </div> <div id="header"> <div id="menu"> <ul>
63
List</a></li>
<li><a href="../../notice/">Events</a></li> <li><a href="../../gal/">Gallary</a></li> <li><a href="../../job/">Career</a></li> <li><a href="#">Contact</a></li> <?PHP if ($admin_zone == "yes"){ ?> <li><a href="../../admin/">admin zone</a></li> <li><a href="../../admin/logout.php">logout</a></li> <?PHP } ?> </ul> </div> <!-- end #menu --> </div> <div id="page"> <div id="page-bgtop"> <div id="content"> <div class="post"> <h2 class="title">Manage News & Events</h2> <p class="meta"> </p> <div class="entry"> <p> <?PHP if(isset($_SESSION['logged']) && $_SESSION['logged'] == "accessible_admin"){ ?> <table width="100%"> <tr> <td></td> <td align="left" ></td> </tr> <tr height="25"> </tr> <?PHP echo $result_display; ?> <tr> <td colspan="4" height="20px" style="bordertop:1px #CCC solid; border-bottom:0px #CCC solid"> <div id="list_index"><?PHP echo $list_index;?> </div> </td> </tr> </table> <?PHP } ?> </p> </div> </div> </div> <div id="sidebar"> <br/><br/>
64
<h2>news & event</h2> <ul> <li> <ul> <?PHP if(isset($_SESSION['logged']) && $_SESSION['logged'] == "accessible_admin"){ ?> <li><a href="../notice"> </a></li> <li><a href="../notice/add.php"></a></li> <?PHP } else if(isset($_SESSION['logged']) && $_SESSION['logged'] == "accessible_user"){ ?> <li id="nav_notice"><a href="notice">News & Events</a></li> <?PHP } ?> </ul> </li> </ul> </div> </div> </div> <div id="footer"> <p>Copyright</p> </div> <!--end #footer --> </body> </html>
65
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="keywords" content="" /> <meta name="description" content="" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>New & Events</title> <link href="../../css/style.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body> <div id="wrapper"> <div id="logo"> </div> <div id="header"> <div id="menu"> <ul> <li><a href="/alumni/">Home</a></li> <li><a href="../student/">Alumni List</a></li> <li><a href="../notice/">Events</a></li> <li><a href="../gal/">Gallary</a></li> <li><a href="../job/">Career</a></li> <li><a href="#">Contact</a></li> <?PHP if ($admin_zone == "yes"){ ?> <li><a href="../../admin/">admin zone</a></li> <li><a href="../../admin/logout.php">logout</a></li> <?PHP } ?> </ul> </div> <!-- end #menu --> </div> <div id="page"> <div id="page-bgtop"> <div id="content"> <div class="post"> <h2 class="title">Admin Zone</h2> <p class="meta"> </p> <div class="entry"> <p> <form name="frm_password" action="edited.php" method="post"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="40" colspan="3" align="left" valign="middle"><h4><strong> </strong></h4></td> </tr> <tr> <td width="25%" height="40" align="right"><strong> </strong></td> <td width="10"> </td> <td width="70%" align="left">
66
<strong><em><?PHP echo $row['ad_username'];?></em></strong> </td> </tr> <tr> <td width="25%" height="40" align="right" valign="middle"><strong> </strong></td> <td> </td> <td align="left"><span id="sCurrent"> <label> <input name="current_password" type="password" class="text" id="current_password4" size="20" maxlength="20" /> </label> <span class="textfieldRequiredMsg"></span></span></td> </tr> <tr> <td width="25%" height="40" align="right" valign="bottom"><strong> </strong></td> <td> </td> <td align="left" valign="bottom"><span id="sNewPwd"> <input name="new_password" type="password" class="text" id="new_password" size="20" maxlength="20" /> <span class="passwordRequiredMsg"></span><span class="passwordMinCharsMsg"> </span><span class="passwordMaxCharsMsg"> </span><span class="passwordInvalidStrengthMsg"> -</span></span></td> </tr> <tr> <td width="25%" height="40" align="right"><strong> </strong></td> <td> </td> <td align="left"><span id="sConfirm"> <input name="confirm_password" type="password" class="text" id="confirm_password" size="20" maxlength="20" /> <span class="confirmRequiredMsg"></span><span class="confirmInvalidMsg"> </span></span></td> </tr> <tr> <td width="25%" height="40"> </td> <td width="10"> </td> <td width="70%" align="left"><label> <input name="submit" type="submit" class="text" id="submit" value=" Update " /> </label></td> </tr> <tr> <td width="25%" height="40"> </td> <td width="10"> </td>
67
<td width="82%" align="left"> </td> </tr> </table> </form> </p> </div> </div> </div> <div id="sidebar"> <br/><br/> <h2>admin setting</h2> <ul> <li> <ul> <li><a href="../setting"> </ul> </li> </ul> </div> </div> </div> <div id="footer"> <p>Copyright</p> <script type="text/javascript"> <!-//var sprytextfield2 = new Spry.Widget.ValidationTextField("sName", "none", {validateOn:["blur"], maxChars:150}); var sprypassword1 = new Spry.Widget.ValidationPassword("sNewPwd", {minChars:6, maxChars:20, minAlphaChars:1, minNumbers:1, minUpperAlphaChars:1, validateOn:["blur"]}); var spryconfirm1 = new Spry.Widget.ValidationConfirm("sConfirm", "new_password", {validateOn:["blur"]}); var sprytextfield1 = new Spry.Widget.ValidationTextField("sCurrent", "none", {validateOn:["blur"]}); //--> </script> </div> <!-- end #footer --> </body> </html>
</a></li>
--------------------------------------------------------
68
Update existing records for each process. Modify with valid data Modify with invalid data Valid data: Successful updated. Invalid data: Error message is displayed. Both valid and invalid data are tested.
Delete records for each process Successful Deleted. Delete data is OK.
69
Case-4 Data
Filter for required data Provide valid data for filtering. Provide invalid data for filtering. Valid data: required data is shown. Invalid data: no data is shown. Both valid and invalid data are tested. Input valid data. Input invalid data. Valid data: return true. Invalid data: return false. Both valid and invalid data are tested. Input valid data. Input invalid data. Valid data: Expected flow of data is produced. Invalid data: Unexpected result is produced. Both valid and invalid data are tested. Input valid data. Input invalid data. Valid data: work well together. Invalid data: Error message is displayed. Both valid and invalid data are tested. Input valid data. Input invalid data. Valid data: Performance is well done. Invalid data: Could not performance. Both valid and invalid data are tested.
Check performance
Result Conclusion
70
X. CONCLUSION
NPIC Online Alumni Management System is therefore beneficial for both NPICs management and students. Through this system, student who graduated even for a long time still be hooked up to NPIC and NPIC will always be as home for them to be remembered. Plus the system creates a place that can be useful for job hunters and job finders.
XI. BIBLIOGRAPHY(REFFERNCE)
PHP AND MYSQL 24-HOUR TRAINER, Published by John Wiley and Sons, Inc. PHP and MySQL Web Development, Sams Publishing, 800 East 96th Street, Indianapolis, Indiana 46240 jQuery: Novice to Ninja, by Earle Castledine and Craig Sharkie Copyright 2010 SitePoint Pty. Ltd. http://jquery.com http://www.php.net http:// dev.mysql.com
71