java

java

<html>
<head>
<title>Attendance System </title>
<script language='JavaScript' type='text/JavaScript'>
<!--
function validate() {
if(document.form1.username.value=='')
{
alert('Please Enter the Username');
return false;
}
if(document.form1.password.value=='')
{
alert('Please Enter the Password');
return false;
}


else {
return true;
}
}
//-->

</script>
<script language=javascript>
<!--

-->
</script>

</head>

<body >
<center>
<img src="images/bg.jpg" width="750" height="300">

<h2> Welcome to the New Day...........</h2>

<h1>Login</h1>
<?php
echo "
<form name=\"form1\" action =\"check.php\" method=\"post\" onSubmit=\"return validate();\">

Username: <input type=\"text\" name=\"username\" value=\"\"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Password: <input type=\"password\" name=\"password\" value=\"\"/>&nbsp;&nbsp;&nbsp;&nbsp;
<input type=\"submit\" name=\"Login\" value=\"Login\" />
</form>";
?>
<form action="newuser.html" method="post">
<input type="submit" name="Login" value="Newuser" />
</form>
<br>

<br>

</body>
</html>

**************managing


<?
session_start();

?>

<html>
<head>
<script language='JavaScript' type='text/JavaScript'>
<!--
function validate2() {
if(document.foo.name.value=='')
{
alert('Please Enter the Developer name');
return false;
}
if(document.foo.detail.value=='')
{
alert('Please Enter the Details of Task');
return false;
}


else {
return true;
}
}
//-->

</script>
</head>
<body>
<center>
<img src="images/bg.jpg" width="750" height="300">
<h1>Welcome........ Manager</h1>

<form name='foo' action="manager.php" method="post" onSubmit='return validate2()';>
Date:

<input type="text" name="bar" value=''/><a href="#" onclick="return getCalendar(document.foo.bar);"><img src="calendar.png" border="0" /></a>
<script language="Javascript">


var calendarWindow = null;
var calendarColors = new Array();
calendarColors['bgColor'] = '#BDC5D0';
calendarColors['borderColor'] = '#333366';
calendarColors['headerBgColor'] = '#143464';
calendarColors['headerColor'] = '#FFFFFF';
calendarColors['dateBgColor'] = '#8493A8';
calendarColors['dateColor'] = '#004080';
calendarColors['dateHoverBgColor'] = '#FFFFFF';
calendarColors['dateHoverColor'] = '#8493A8';
var calendarMonths = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
var calendarWeekdays = new Array('S', 'M', 'T', 'W', 'T', 'F', 'S', 'S');
var calendarUseToday = true;
var calendarFormat = 'y/m/d';
var calendarStartMonday = true;
var calendarScreenX = 100; // either 'auto' or numeric
var calendarScreenY = 100; // either 'auto' or numeric

// }}}
// {{{ getCalendar()

function getCalendar(in_dateField)
{
if (calendarWindow && !calendarWindow.closed) {
alert('Calendar window already open. Attempting focus...');
try {
calendarWindow.focus();
}
catch(e) {}

return false;
}

var cal_width = 415;
var cal_height = 310;

// IE needs less space to make this thing
if ((document.all) && (navigator.userAgent.indexOf("Konqueror") == -1)) {
cal_width = 410;
}

calendarTarget = in_dateField;
calendarWindow = window.open('calendar.html', 'dateSelectorPopup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=0,dependent=no,width='+cal_width+',height='+cal_height + (calendarScreenX != 'auto' ? ',screenX=' + calendarScreenX : '') + (calendarScreenY != 'auto' ? ',screenY=' + calendarScreenY : ''));

return false;
}

// }}}
// {{{ killCalendar()

function killCalendar()
{
if (calendarWindow && !calendarWindow.closed) {
calendarWindow.close();
}
}


</script>
Manager Name:<?php

include "include.php";

$query2="SELECT m_name FROM manager WHERE m_name='$_POST[username]'";

$result2 = mysql_query ($query2);


if($nt2=mysql_fetch_array($result2)){
echo "<input type=text value=$nt2[m_name]>";
}


?>
Developer Name: <input type="text" name="name" value=''/>
Task: <select type="select" name="task" />
<option value="Front Page Design">Front Page Design</option>
<option value="2">Table Dsign</option>
<option value="3">Hosting</option>
<option value="3">Maintance</option>
<option value="3">S E O</option>
<option value="3">Documentation</option>
</select>
Task Details: <textArea name="detail" value=''></textarea>
<input type="submit" value="Assign"/>
</form>

</body>
</html>
*************************check


<html>
<head>

</head>
<body >
<?php include 'userin.php'; ?>

<?php

include "include.php";

if($rec=mysql_fetch_array(mysql_query("SELECT * FROM login WHERE username='$_POST[username]' AND password = '$_POST[password]' "))){


include "newsession.php";
}
else
{

echo '<script language="javascript">confirm("Such a user Doesnt Exist!")</script>';
echo '<script language="javascript">window.location = "index.php"</script>';

}
?>

</body>
</html>
**********newsessiom......

<?
session_start();
?>

<?php
include "include.php";


$result = mysql_query(" SELECT * FROM login WHERE username='$_POST[username]' AND password = '$_POST[password]'");

echo "<table border='1' align=center>
<tr>
<th>Usertype</th>

</tr>";

if($row = mysql_fetch_array($result))
{
echo "<tr>";

echo "<td>" . $row['usertype'] . "</td>";

echo "</tr>";


echo "</table>";
if($row['usertype']=='Manager')
{
header('Location: managing.php');
}
else
{
header('Location: userin.php');
}
}
mysql_close($con);
?>



**********include

<html>
<body>
<center>
<img src="images/bg.jpg" width="750" height="300">

<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("attendence", $con);
?>


</body>
</html>
View Answers









Related Tutorials/Questions & Answers:
java
java  diff bt core java and java
java
java  what is java
Advertisements
java
java   why iterator in java if we for loop
Java
Java   Whether Java is pure object oriented Language
JAVA
JAVA  how the name came for java language as "JAVA
java
java  explain technologies are used in java now days and structure java
java
java  different between java & core java
java
java  is java open source
java
java  what is java reflection
java
java   in java does not pointers concept but what is nullpointers in java?   nullpointer is a runtime Exception
java
what is the size of array in java ?  what is the size of array in java ? what is the mean of finalize in java
java
java  why to set classpath in java
java
java  RARP implementation using java socket
java
java  sample code for RARP using java
Java
Java  how to do java in command prompt
java
java  how use java method
java
java  is java purely object oriented language
java
java  why multiple inheritance is not possible in java
java
java  give a simple example for inheritance in java
java
java  give a simple example for inheritance in java
java
java  why to set classpath in java
java
java  why to set classpath in java
java
java  why to set classpath in java
java
java   What is ?static? keyword
java
java  Does java allows multiline comments
java
java  Write a java code to print "ABABBABCABABBA
java
java  write a program in java to acess the email
java
java  send me java interview questions
java
java  what are JAVA applications development tools
Java
Java   Whether Java is Programming Language or it is SOftware
java
java  explain object oriented concept in java
java
java   difference between class and interface
Java
Java  how to draw class diagrams in java
java
java  write a java program using filenotfoundexception
java
java  how to edit text document by using java then how to edit starting and ending of text document by using java
java
java  different between java & core java print("code sample
java
java  how can use sleep in java   which book learn of java language
java
java  hi im new to java plz suggest me how to master java[email protected]
java
java   How to set java Policy for applet using jdk 6
java
java pattern code for a given words  java pattern code for a given words pattern
java
java  dear, i want a field for date picker using java/java script
java
java  create java program for delete and update the details,without using database, just a normal java program
java
java  why methods in java raise exceptions   Have a look at the following link: Java Exceptions
java
java code to search the nodes  how to write the java code to search the nodes using routers
java
java online telephone directory  i need coding for online telephone directory..by using java....pls help me
java
java  different between java & core java print("code sample
java
java  how to invoke one chart java file from another java file
java
java  how to prepare the java   Hi Friend, If you want to learn how to install java, creating and running a java program then go through the following links: http://www.roseindia.net/java/beginners/index.shtml http
java
java  java swing   Swing is a principal GUI toolkit for the Java programming language. It is a part of the JFC (Java Foundation Classes), which is an API for providing a graphical user interface for Java programs
java
java  what is the need of java if java is not there what will happen... work unless you have Java installed, and more are created every day. Java... to scientific supercomputers, cell phones to the Internet, Java is everywhere! http

Ads