Uploaded by divyap0335

Codes

advertisement
Side Basr
<html>
<head>
<title>Job Report</title>
<style type="text/css">
</style>
<LINK REL=StyleSheet HREF="timecardbasic.css" TYPE="text/css" MEDIA=screen>
</head>
<body>
<div id="leftcol"><div style="text-align: left;">
<big><big><span style="font-weight: bold; color: rgb(0, 0, 0);">
Employee <br>TimeCard System</span></big></big><br>
</div> <br>
<a href="index.php" >HOME</a><br>
<br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Getting Started</span><br>
<a href="TimeCardSystemSetup.pdf" >Setup guide</a><br>
<a href="TimeCardSystemReport.pdf" >Understaning TimeCard System</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Database Setup</span><br>Peform this only
one<br>time.<br>
<a href="SetupForm.php" >Click here</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Employee Signin<br>Module</span><br>
<a href="LoginForm.php" >Login</a><br />
<a href="logout.php" >Logout</a><br />
<a href="TimeCard.php" >Signin/Signout</a><br />
<a href="TSRpt.php" >Timesheet Report (All)</a><br />
<a href="IndividualTSRpt.php" >Personal Timesheet Report</a><br /><br />
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Employee Maintenance<br>Module<br><br></span>
<a href="EmployeeAddForm.php" >Employee Add Form</a><br>
<a href="employeeReport.php" >Employee Report</a><br>
<a href="SearchEmployeeForm.php" >Search Employee</a><br><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Department Maintenance<br>Module<br><br></span>
<a href="DepartmentForm.php" >Department Add Form</a><br>
<a href="departmentReport.php" >Department Report</a><br><br>
<span style="font-weight: bold;">Object-Oriented PHP Example<br>Module<br><br></span>
<a href="DepartmentFormOO.php" >Department Add Form (OO PHP)</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Job Maintenance<br>Module<br><br></span>
<a href="Job Add Form.php" >Add Job</a><br>
<a href="jobReport.php" >Job Report</a><br>
</span>
</div>
<div id="content">
<center>
<table border="1" width="80%">
<table border="1" width="50%">
<tr style="font-weight: bold; color: rgb(255, 255, 255); font-family: Verdana;" width="100%">
<td style="text-align: center; background-color: rgb(100, 149, 237); width:
100%;"colspan="2">
<center><big><big>Job List</big></big></center></td>
</tr>
<tr>
<td><b>Job #</b></td>
<td><b>Job Description</b></td>
</tr>
<tr><td>J01</td><td>IT Manager</td></tr><tr><td>J02</td><td>IT
Technician</td></tr><tr><td>J03</td><td>Network
Admin</td></tr><tr><td>J04</td><td>DB Admin</td></tr><tr><td>J05</td><td>Sales
Manager</td></tr><tr><td>J06</td><td>Accountant</td></tr><tr><td>J07</td><td>Salesper
son</td></tr><tr><td>J08</td><td>Security</td></tr><tr><td>J09</td><td>Inventory
Manager</td></tr><tr><td>J10</td><td>Cleaner</td></tr></table>
</center>
</div>
</body>
</html>
Login
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>Login Form</title>
<LINK REL=StyleSheet HREF="timecardbasic.css" TYPE="text/css" MEDIA=screen>
</head>
<body>
<div id="leftcol"><div style="text-align: left;">
<big><big><span style="font-weight: bold; color: rgb(0, 0, 0);">
Employee <br>TimeCard System</span></big></big><br>
</div> <br>
<a href="index.php" >HOME</a><br>
<br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Getting Started</span><br>
<a href="TimeCardSystemSetup.pdf" >Setup guide</a><br>
<a href="TimeCardSystemReport.pdf" >Understaning TimeCard System</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Database Setup</span><br>Peform this only
one<br>time.<br>
<a href="SetupForm.php" >Click here</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Employee Signin<br>Module</span><br>
<a href="LoginForm.php" >Login</a><br />
<a href="logout.php" >Logout</a><br />
<a href="TimeCard.php" >Signin/Signout</a><br />
<a href="TSRpt.php" >Timesheet Report (All)</a><br />
<a href="IndividualTSRpt.php" >Personal Timesheet Report</a><br /><br />
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Employee Maintenance<br>Module<br><br></span>
<a href="EmployeeAddForm.php" >Employee Add Form</a><br>
<a href="employeeReport.php" >Employee Report</a><br>
<a href="SearchEmployeeForm.php" >Search Employee</a><br><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Department Maintenance<br>Module<br><br></span>
<a href="DepartmentForm.php" >Department Add Form</a><br>
<a href="departmentReport.php" >Department Report</a><br><br>
<span style="font-weight: bold;">Object-Oriented PHP Example<br>Module<br><br></span>
<a href="DepartmentFormOO.php" >Department Add Form (OO PHP)</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Job Maintenance<br>Module<br><br></span>
<a href="Job Add Form.php" >Add Job</a><br>
<a href="jobReport.php" >Job Report</a><br>
</span>
</div>
<div id="content">
<div style="text-align: center;">
<form method="post" action="login.php" name="LoginForm">
<table style="background-color: rgb(245, 245, 245); width: 50%; text-align: left; margin-left:
auto; margin-right: auto;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr style="font-weight: bold; color: rgb(255, 255, 255); font-family: Verdana;" align="center">
<td style="width: 100%; background-color: rgb(100, 149, 237);" colspan="2"
rowspan="1"><big><big>Login Form</big></big></td>
</tr>
<tr>
<td style="font-family: Verdana; width: 30%;">Username:</td>
<td style="width: 569px; font-family: Verdana;"><input maxlength="30" size="30"
name="username"></td>
</tr>
<tr>
<td style="width: 140px; font-family: Verdana;">Password:</td>
<td style="width: 569px; font-family: Verdana;"><input maxlength="15" size="15"
name="password" type="password"></td>
</tr>
<tr align="center">
<td colspan="2" rowspan="1" style="font-family: Verdana; width: 100%;"> <input
name="OK" value="OK" type="submit"> <input name="Cancel" value="Cancel"
type="reset">
</td>
</tr>
</tbody>
</table>
<big style="font-family: Verdana;"><br>
<span style="font-weight: bold;">Login Details</span><br>
<u>Admin Login</u> <br />
Username: Allecia <br />
Password: Allecia <br /><br />
<u>Non-admin Login:</u> <br />
Username: John <br />
Password: John
<br><br></big>
<br>
</form>
</div>
</div>
</body>
</html>
Employee Add Form
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>Employee Add Form</title>
<script language="javascript">
function Validate() {
lastname = document.employeeadd.lastname.value
if (lastname == "")
{
Message = "Please enter the last name" + "\n"
alert(Message)
return false
}
else
{
Message = ""
document.employeeadd.submit()
return true
}
}
</script>
<LINK REL=StyleSheet HREF="timecardbasic.css" TYPE="text/css" MEDIA=screen>
</head>
<body>
<div id="leftcol"><div style="text-align: left;">
<big><big><span style="font-weight: bold; color: rgb(0, 0, 0);">
Employee <br>TimeCard System</span></big></big><br>
</div> <br>
<a href="index.php" >HOME</a><br>
<br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Getting Started</span><br>
<a href="TimeCardSystemSetup.pdf" >Setup guide</a><br>
<a href="TimeCardSystemReport.pdf" >Understaning TimeCard System</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Database Setup</span><br>Peform this only
one<br>time.<br>
<a href="SetupForm.php" >Click here</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Employee Signin<br>Module</span><br>
<a href="LoginForm.php" >Login</a><br />
<a href="logout.php" >Logout</a><br />
<a href="TimeCard.php" >Signin/Signout</a><br />
<a href="TSRpt.php" >Timesheet Report (All)</a><br />
<a href="IndividualTSRpt.php" >Personal Timesheet Report</a><br /><br />
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Employee Maintenance<br>Module<br><br></span>
<a href="EmployeeAddForm.php" >Employee Add Form</a><br>
<a href="employeeReport.php" >Employee Report</a><br>
<a href="SearchEmployeeForm.php" >Search Employee</a><br><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Department Maintenance<br>Module<br><br></span>
<a href="DepartmentForm.php" >Department Add Form</a><br>
<a href="departmentReport.php" >Department Report</a><br><br>
<span style="font-weight: bold;">Object-Oriented PHP Example<br>Module<br><br></span>
<a href="DepartmentFormOO.php" >Department Add Form (OO PHP)</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Job Maintenance<br>Module<br><br></span>
<a href="Job Add Form.php" >Add Job</a><br>
<a href="jobReport.php" >Job Report</a><br>
</span>
</div>
<div id="content">
<form name="employeeadd" action="employeeadd.php" method="post"> <big> </big><big>
</big>
<table style="background-color: rgb(245, 245, 245); width: 60%; height: 311px;
text-align: left; margin-left: auto; margin-right: auto;"
background-color="#DCDCDC" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr style="font-weight: bold; color: rgb(255, 255, 255); font-family: Verdana;" align="left">
<td style="text-align: center; background-color: rgb(100, 149, 237); width: 100%;"
colspan="2" rowspan="1">
<big><big>Employee Form</big></big></td>
</tr>
<tr>
<td style="text-align: left; font-family: Verdana; width: 35%;">
Employee Number:</td>
<td style="width: 460px;"><input readonly="readonly" maxlength="5" size="5"
name="empnum"
value='107'></td>
</tr>
<tr>
<td style="font-family: Verdana; width: 237px;">Last Name:</td>
<td style="width: 460px;"><input maxlength="30" size="30" name="lastname"></td>
</tr>
<tr>
<td style="font-family: Verdana; width: 237px;">First Name:</td>
<td style="width: 460px;"><input maxlength="30" size="30" name="firstname"></td>
</tr>
<tr>
<td style="font-family: Verdana; width: 237px;">Initial:</td>
<td style="width: 460px;"><input maxlength="1" size="1" name="initial"></td>
</tr>
<tr>
<td style="font-family: Verdana; width: 237px;">Department:</td>
<td style="width: 460px;">
<select size="1" name="department">
<option value='D01'>IT Department</option><option value='D02'>Accounts</option><option
value='D03'>Inventory</option><option value='D04'>Sales</option><option
value='D05'>Security</option> </select>
</td>
</tr>
<tr>
<td style="font-family: Verdana; width: 237px;">Job:</td>
<td style="width: 460px;">
<select size="1" name="job">
<option value='J01'>IT Manager</option><option value='J02'>IT Technician</option><option
value='J03'>Network Admin</option><option value='J04'>DB Admin</option><option
value='J05'>Sales Manager</option><option value='J06'>Accountant</option><option
value='J07'>Salesperson</option><option value='J08'>Security</option><option
value='J09'>Inventory Manager</option><option value='J10'>Cleaner</option> </select>
</td>
</tr>
<tr>
<td style="font-family: Verdana; width: 237px;">Username:</td>
<td style="width: 460px;"><input maxlength="30" size="30" name="username"></td>
</tr>
<tr>
<td style="font-family: Verdana; width: 237px;">Password:</td>
<td style="width: 460px;"><input maxlength="15" size="15" name="password"
type="password"></td>
</tr>
<tr style="font-family: Verdana;">
<td style="text-align: center; width: 460px;" colspan="2" rowspan="1">
<input value="Reset" name="Reset " type="reset">  
<input value="Save" name="Save" type="submit" onclick="Validate();return false;">
 
</td>
</tr>
</tbody>
</table>
</form>
</div>
</body>
</html>
Employee report form
<html>
<head>
<title>Employee Report</title>
<style type="text/css">
tr {font-family: Verdana; background-color: rgb(245, 245, 245)}
</style>
<LINK REL=StyleSheet HREF="timecardbasic.css" TYPE="text/css" MEDIA=screen>
</head>
<body>
<div id="leftcol"><div style="text-align: left;">
<big><big><span style="font-weight: bold; color: rgb(0, 0, 0);">
Employee <br>TimeCard System</span></big></big><br>
</div> <br>
<a href="index.php" >HOME</a><br>
<br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Getting Started</span><br>
<a href="TimeCardSystemSetup.pdf" >Setup guide</a><br>
<a href="TimeCardSystemReport.pdf" >Understaning TimeCard System</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Database Setup</span><br>Peform this only
one<br>time.<br>
<a href="SetupForm.php" >Click here</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Employee Signin<br>Module</span><br>
<a href="LoginForm.php" >Login</a><br />
<a href="logout.php" >Logout</a><br />
<a href="TimeCard.php" >Signin/Signout</a><br />
<a href="TSRpt.php" >Timesheet Report (All)</a><br />
<a href="IndividualTSRpt.php" >Personal Timesheet Report</a><br /><br />
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Employee Maintenance<br>Module<br><br></span>
<a href="EmployeeAddForm.php" >Employee Add Form</a><br>
<a href="employeeReport.php" >Employee Report</a><br>
<a href="SearchEmployeeForm.php" >Search Employee</a><br><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Department Maintenance<br>Module<br><br></span>
<a href="DepartmentForm.php" >Department Add Form</a><br>
<a href="departmentReport.php" >Department Report</a><br><br>
<span style="font-weight: bold;">Object-Oriented PHP Example<br>Module<br><br></span>
<a href="DepartmentFormOO.php" >Department Add Form (OO PHP)</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Job Maintenance<br>Module<br><br></span>
<a href="Job Add Form.php" >Add Job</a><br>
<a href="jobReport.php" >Job Report</a><br>
</span>
</div>
<div id="content">
<center>
<table border="1" width="50%">
<tr style="font-weight: bold; color: rgb(255, 255, 255); font-family: Verdana;"
width="100%">
<td style="text-align: center; background-color: rgb(100, 149, 237); width:
100%;"colspan="2"><center><big><big>Employee List</big></big></center></td>
</tr>
<tr>
<td><b>Employee #</b></td>
<td><b>Name</b></td>
</tr>
<tr><td><a href=EmployeeUpdateForm.php?empnum=101>101</a></td><td>John D.
Newson</td></tr> <tr><td><a
href=EmployeeUpdateForm.php?empnum=102>102</a></td><td>David . Schwann</td></tr>
<tr><td><a href=EmployeeUpdateForm.php?empnum=103>103</a></td><td>Anne R.
Ramoras</td></tr> <tr><td><a
href=EmployeeUpdateForm.php?empnum=104>104</a></td><td>June . Sattlemeir</td></tr>
<tr><td><a href=EmployeeUpdateForm.php?empnum=105>105</a></td><td>Mary D.
Chen</td></tr> <tr><td><a
href=EmployeeUpdateForm.php?empnum=106>106</a></td><td>Allecia .
Smith</td></tr></table>
</center>
</div>
</body>
</html>
Employee search
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>Employee Search Form</title>
<script language="javascript">
/**
*
* Javascript trim, ltrim, rtrim
* http://www.webtoolkit.info/
*
**/
function trim(str, chars) {
return ltrim(rtrim(str, chars), chars);
}
function ltrim(str, chars) {
chars = chars || "\\s";
return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
}
function rtrim(str, chars) {
chars = chars || "\\s";
return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
}
function Validate() {
keyword = trim(document.SearchForm.keyword.value)
if (keyword == document.SearchForm.keyword.defaultValue ||
keyword == "" || keyword == "%")
{
Message = "Please enter the search term." + "\n"
alert(Message)
return false
}
else
{
Message = ""
document.SearchForm.submit()
return true
}
}
function clearMe(formfield, defaulttext){
if (formfield.defaultValue==trim(formfield.value))
formfield.value = ""
else if(trim(formfield.value) == "")
formfield.value = defaulttext
}
</script>
<LINK REL=StyleSheet HREF="timecardbasic.css" TYPE="text/css" MEDIA=screen>
</head>
<script type="text/javascript">
</script>
<body>
<div id="leftcol"><div style="text-align: left;">
<big><big><span style="font-weight: bold; color: rgb(0, 0, 0);">
Employee <br>TimeCard System</span></big></big><br>
</div> <br>
<a href="index.php" >HOME</a><br>
<br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Getting Started</span><br>
<a href="TimeCardSystemSetup.pdf" >Setup guide</a><br>
<a href="TimeCardSystemReport.pdf" >Understaning TimeCard System</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Database Setup</span><br>Peform this only
one<br>time.<br>
<a href="SetupForm.php" >Click here</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Employee Signin<br>Module</span><br>
<a href="LoginForm.php" >Login</a><br />
<a href="logout.php" >Logout</a><br />
<a href="TimeCard.php" >Signin/Signout</a><br />
<a href="TSRpt.php" >Timesheet Report (All)</a><br />
<a href="IndividualTSRpt.php" >Personal Timesheet Report</a><br /><br />
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Employee Maintenance<br>Module<br><br></span>
<a href="EmployeeAddForm.php" >Employee Add Form</a><br>
<a href="employeeReport.php" >Employee Report</a><br>
<a href="SearchEmployeeForm.php" >Search Employee</a><br><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Department Maintenance<br>Module<br><br></span>
<a href="DepartmentForm.php" >Department Add Form</a><br>
<a href="departmentReport.php" >Department Report</a><br><br>
<span style="font-weight: bold;">Object-Oriented PHP Example<br>Module<br><br></span>
<a href="DepartmentFormOO.php" >Department Add Form (OO PHP)</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Job Maintenance<br>Module<br><br></span>
<a href="Job Add Form.php" >Add Job</a><br>
<a href="jobReport.php" >Job Report</a><br>
</span>
</div>
<div id="content">
<form method="post" action="employeeSearch.php" name="SearchForm">
<table style="background-color: rgb(245, 245, 245); width: 50%; text-align: left;
margin-left: auto; margin-right: auto;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr style="font-weight: bold; color: rgb(255, 255, 255); font-family: Verdana;" align="center">
<td style="width: 100%; background-color: rgb(100, 149, 237);" colspan="2" rowspan="1">
<big>Employee Search Form</big></td>
</tr>
<tr>
<td style="font-family: Verdana; width: 30%;">Keyword:</td>
<td style="width: 569px; font-family: Verdana;">
<input maxlength="30" size="30" name="keyword" value="enter keyword"
onfocus="clearMe(this, 'enter keyword')" onblur="clearMe(this, 'enter keyword')"/></td>
</tr>
<tr>
<td style="width: 140px; font-family: Verdana;">Search by:</td>
<td style="width: 569px; font-family: Verdana;">
<select size="1" name="searchfield">
<option value='firstname'>First Name</option>
<option value='lastname'>Last Name</option>
<option value='job'>Job Title</option>
</select>
</tr>
<tr align="center">
<td colspan="2" rowspan="1" style="font-family: Verdana; width: 100%;">
<input name="Search" value="Search" onclick="Validate();return false;" type="submit">
<input name="Clear" value="Clear" type="reset">
</td>
</tr>
</tbody>
</table><br>
</form>
</div>
</body>
</html>
Department add form
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>Department Form</title>
<script language="javascript">
function Validate() {
deptnum = document.DepartmentForm.deptnum.value
deptname = document.DepartmentForm.deptdesc.value
if (deptnum == "" || deptname == "")
{
Message = "Please enter all required information" + "\n"
alert(Message)
return false
}
else
{
Message = ""
document.DepartmentForm.submit()
return true
}
}
</script>
<LINK REL=StyleSheet HREF="timecardbasic.css" TYPE="text/css" MEDIA=screen>
</head>
<body>
<div id="leftcol"><div style="text-align: left;">
<big><big><span style="font-weight: bold; color: rgb(0, 0, 0);">
Employee <br>TimeCard System</span></big></big><br>
</div> <br>
<a href="index.php" >HOME</a><br>
<br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Getting Started</span><br>
<a href="TimeCardSystemSetup.pdf" >Setup guide</a><br>
<a href="TimeCardSystemReport.pdf" >Understaning TimeCard System</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Database Setup</span><br>Peform this only
one<br>time.<br>
<a href="SetupForm.php" >Click here</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Employee Signin<br>Module</span><br>
<a href="LoginForm.php" >Login</a><br />
<a href="logout.php" >Logout</a><br />
<a href="TimeCard.php" >Signin/Signout</a><br />
<a href="TSRpt.php" >Timesheet Report (All)</a><br />
<a href="IndividualTSRpt.php" >Personal Timesheet Report</a><br /><br />
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Employee Maintenance<br>Module<br><br></span>
<a href="EmployeeAddForm.php" >Employee Add Form</a><br>
<a href="employeeReport.php" >Employee Report</a><br>
<a href="SearchEmployeeForm.php" >Search Employee</a><br><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Department Maintenance<br>Module<br><br></span>
<a href="DepartmentForm.php" >Department Add Form</a><br>
<a href="departmentReport.php" >Department Report</a><br><br>
<span style="font-weight: bold;">Object-Oriented PHP Example<br>Module<br><br></span>
<a href="DepartmentFormOO.php" >Department Add Form (OO PHP)</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Job Maintenance<br>Module<br><br></span>
<a href="Job Add Form.php" >Add Job</a><br>
<a href="jobReport.php" >Job Report</a><br>
</span>
</div>
<div id="content">
<form method="post" action="departmentadd.php" name="DepartmentForm">
<table style="background-color: rgb(245, 245, 245); width: 75%; text-align: left;
margin-left: auto; margin-right: auto;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr style="font-weight: bold; color: rgb(255, 255, 255); font-family: Verdana;" align="center">
<td style="width: 100%; background-color: rgb(100, 149, 237);" colspan="2" rowspan="1">
<big><big>Department Add Form</big></big></td>
</tr>
<tr>
<td style="font-family: Verdana; width: 30%;">Department #:</td>
<td style="width: 569px; font-family: Verdana;">
<input maxlength="3" size="3" name="deptnum" readonly="readonly"
value='D06'/></td>
</tr>
<tr>
<td style="width: 140px; font-family: Verdana;">Name:</td>
<td style="width: 569px; font-family: Verdana;">
<input maxlength="30" size="30" name="deptdesc"></td>
</tr>
<tr align="center">
<td colspan="2" rowspan="1" style="font-family: Verdana; width: 100%;">
<input name="Save" value="Save" onclick="Validate();return false;" type="submit">
<input name="Clear" value="Clear" type="reset">
</td>
</tr>
</tbody>
</table><br>
</form>
</div>
</body>
</html>
Department report
<html>
<head>
<title>Department Report</title>
<style type="text/css">
tr {font-family: Verdana; background-color: rgb(245, 245, 245)}
</style>
<LINK REL=StyleSheet HREF="timecardbasic.css" TYPE="text/css" MEDIA=screen>
</head>
<body>
<div id="leftcol"><div style="text-align: left;">
<big><big><span style="font-weight: bold; color: rgb(0, 0, 0);">
Employee <br>TimeCard System</span></big></big><br>
</div> <br>
<a href="index.php" >HOME</a><br>
<br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Getting Started</span><br>
<a href="TimeCardSystemSetup.pdf" >Setup guide</a><br>
<a href="TimeCardSystemReport.pdf" >Understaning TimeCard System</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Database Setup</span><br>Peform this only
one<br>time.<br>
<a href="SetupForm.php" >Click here</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Employee Signin<br>Module</span><br>
<a href="LoginForm.php" >Login</a><br />
<a href="logout.php" >Logout</a><br />
<a href="TimeCard.php" >Signin/Signout</a><br />
<a href="TSRpt.php" >Timesheet Report (All)</a><br />
<a href="IndividualTSRpt.php" >Personal Timesheet Report</a><br /><br />
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Employee Maintenance<br>Module<br><br></span>
<a href="EmployeeAddForm.php" >Employee Add Form</a><br>
<a href="employeeReport.php" >Employee Report</a><br>
<a href="SearchEmployeeForm.php" >Search Employee</a><br><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Department Maintenance<br>Module<br><br></span>
<a href="DepartmentForm.php" >Department Add Form</a><br>
<a href="departmentReport.php" >Department Report</a><br><br>
<span style="font-weight: bold;">Object-Oriented PHP Example<br>Module<br><br></span>
<a href="DepartmentFormOO.php" >Department Add Form (OO PHP)</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Job Maintenance<br>Module<br><br></span>
<a href="Job Add Form.php" >Add Job</a><br>
<a href="jobReport.php" >Job Report</a><br>
</span>
</div>
<div id="content">
<center>
<table border="1" width="80%">
<tr style="font-weight: bold; color: rgb(255, 255, 255); font-family: Verdana;"
width="100%">
<td style="text-align: center; background-color: rgb(100, 149, 237); width:
100%;"colspan="2"><center><big><big>Department List</big></big></center></td>
</tr>
<tr>
<td><b>Department #</b></td>
<td><b>Name</b></td>
</tr>
<tr><td><a href=DepartmentUpdateForm.php?dept_num=D01>D01</a></td><td>IT
Department</td></tr><tr><td><a
href=DepartmentUpdateForm.php?dept_num=D02>D02</a></td><td>Accounts</td></tr><tr
><td><a
href=DepartmentUpdateForm.php?dept_num=D03>D03</a></td><td>Inventory</td></tr><tr
><td><a
href=DepartmentUpdateForm.php?dept_num=D04>D04</a></td><td>Sales</td></tr><tr><td
><a
href=DepartmentUpdateForm.php?dept_num=D05>D05</a></td><td>Security</td></tr></tab
le>
</center>
</div>
</body>
</html>
Object-Oriented PHP Example
Module
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>Department Form</title>
<script language="javascript">
function Validate() {
deptnum = document.DepartmentForm.deptnum.value
deptname = document.DepartmentForm.deptdesc.value
if (deptnum == "" || deptname == "")
{
Message = "Please enter all required information" + "\n"
alert(Message)
return false
}
else
{
Message = ""
document.DepartmentForm.submit()
return true
}
}
</script>
<LINK REL=StyleSheet HREF="timecardbasic.css" TYPE="text/css" MEDIA=screen>
</head>
<body>
<div id="leftcol"><div style="text-align: left;">
<big><big><span style="font-weight: bold; color: rgb(0, 0, 0);">
Employee <br>TimeCard System</span></big></big><br>
</div> <br>
<a href="index.php" >HOME</a><br>
<br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Getting Started</span><br>
<a href="TimeCardSystemSetup.pdf" >Setup guide</a><br>
<a href="TimeCardSystemReport.pdf" >Understaning TimeCard System</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Database Setup</span><br>Peform this only
one<br>time.<br>
<a href="SetupForm.php" >Click here</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Employee Signin<br>Module</span><br>
<a href="LoginForm.php" >Login</a><br />
<a href="logout.php" >Logout</a><br />
<a href="TimeCard.php" >Signin/Signout</a><br />
<a href="TSRpt.php" >Timesheet Report (All)</a><br />
<a href="IndividualTSRpt.php" >Personal Timesheet Report</a><br /><br />
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Employee Maintenance<br>Module<br><br></span>
<a href="EmployeeAddForm.php" >Employee Add Form</a><br>
<a href="employeeReport.php" >Employee Report</a><br>
<a href="SearchEmployeeForm.php" >Search Employee</a><br><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Department Maintenance<br>Module<br><br></span>
<a href="DepartmentForm.php" >Department Add Form</a><br>
<a href="departmentReport.php" >Department Report</a><br><br>
<span style="font-weight: bold;">Object-Oriented PHP Example<br>Module<br><br></span>
<a href="DepartmentFormOO.php" >Department Add Form (OO PHP)</a><br>
<hr style="width: 100%; height: 2px;">
<span style="font-weight: bold;">Job Maintenance<br>Module<br><br></span>
<a href="Job Add Form.php" >Add Job</a><br>
<a href="jobReport.php" >Job Report</a><br>
</span>
</div>
<div id="content">
<form method="post" action="departmentaddOO.php" name="DepartmentForm">
<table style="background-color: rgb(245, 245, 245); width: 75%; text-align: left;
margin-left: auto; margin-right: auto;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr style="font-weight: bold; color: rgb(255, 255, 255); font-family: Verdana;" align="center">
<td style="width: 100%; background-color: rgb(100, 149, 237);" colspan="2" rowspan="1">
<big><big>Department Add Form</big></big></td>
</tr>
<tr>
<td style="font-family: Verdana; width: 30%;">Department #:</td>
<td style="width: 569px; font-family: Verdana;">
<input maxlength="3" size="3" name="deptnum" readonly="readonly"
value='D06'/></td>
</tr>
<tr>
<td style="width: 140px; font-family: Verdana;">Name:</td>
<td style="width: 569px; font-family: Verdana;">
<input maxlength="30" size="30" name="deptdesc"></td>
</tr>
<tr align="center">
<td colspan="2" rowspan="1" style="font-family: Verdana; width: 100%;">
<input name="Save" value="Save" onclick="Validate();return false;" type="submit">
<input name="Clear" value="Clear" type="reset">
</td>
</tr>
</tbody>
</table><br>
</form>
</div>
</body>
</html>
Download