Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Anoop K S
java
0 Answer(s)      4 years and 8 months ago
Posted in : Java Beginners


<?
session_start();

?>

<html>
<head>


<script type="text/javascript">
function showUser(str)
{
if (str=="")
{
document.getElementById("txtHint").innerHTML="";
return;
}
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","login.php?q="+str,true);
xmlhttp.send();
}
</script>


<script type="text/javascript">
function show_alert() {
var msg = "Values Entered";
alert(msg);
}
</script>


<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;
}



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


</script>

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


<script language="javascript" type="text/javascript">

<!-- Begin
var timerID = null;
var timerRunning = false;
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function showtime () {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds()
var timeValue = "" + ((hours >12) ? hours -12 :hours)
if (timeValue == "0") timeValue = 12;
timeValue += ((minutes < 10) ? ":0" : "") + minutes
timeValue += ((seconds < 10) ? ":0" : "") + seconds

document.foo.face.value = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
function startclock() {
stopclock();
showtime();
}
window.onload=startclock;
// End -->
</SCRIPT>



<script language="javascript" type="text/javascript">

var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()+1
if (month<10)
month="0"+month
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
document.write("<br>")
document.write("<br>")
document.write("<small><font color='000000' face='Arial'><b>&nbsp;&nbsp;&nbsp;Todays Date is <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;================================================================================"+year+"/"+month+"/"+daym+"===============================================================================================</b></font></small>")
//document.clock.date.value = year;

</script>

<center>

<form action="developer.php" method="post" name="foo">

<table>
<tr>
<th>Date</th>
<td>





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

</td>
<th>logintime</th>
<td>
<input type=text name="face" >
</td>
<?php

include "include.php";
$today = date("Y-m-d");
$MySQLRecordSet = mysql_query("SELECT task,taskdetails FROM manager WHERE date='$today'");

if ($MyRow = mysql_fetch_array($MySQLRecordSet, MYSQL_ASSOC)) {

echo "<th>Task Assigned is ::::</th>";
echo "<td>" . $MyRow['task'] ."</td>";
echo"<th>&nbsp;&nbsp;&nbsp;Task Details are ::::</th>";
echo "<td>" . $MyRow['taskdetails'] . "</td>";
echo "</tr>";

}
mysql_close($con);
?>

</tr>
</table>
<br>
<input type="submit" name="Login" value="Enter" OnClick="show_alert()"/>
</form>

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

mysql_select_db("attendence", $con);
?>
<h2>You can also check the jobs assign to the differnt dates</h2>


<TR>
<TD align="right" valign="top" style="width:75px">
Select Date:
</TD>
<TD valign="top" colspan="5" style="width:350px">




<form>
<select name="users" onchange="showUser(this.value)">
<option value="">Select a Date</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option><option value="10">10</option><option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option><option value="14">14</option>
</select>

<br />
<i id="txtHint"></div>
<?php
//$query2="SELECT date FROM manager";

// $result2 = mysql_query ($query2);

// echo "<select id='date' style='background:#999999; width:340px' name='date' value='' onchange='showUser(this.value)'>Title</option>";

// while($nt2=mysql_fetch_array($result2)){
// echo "<option value="1" value=$nt2[date]>$nt2[date]</option>";
// }
// echo "</select>";
?>
</TD>

</TR>
<TR>

<TD valign="top" colspan="5" style="width:350px">
</form>
<?php
$q=$_GET["q"];


$sql="SELECT * FROM manager WHERE taskid='".$q."'";

$result = mysql_query($sql);

echo "<table border='1'>
<tr>
<th>TaskAssigned on this Date</th>

</tr>";

while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['task'] . "</td>";

echo "</tr>";
}
echo "</table>";

login

mysql_close($con);
?>
</TD>
</TR>

</body>
</html>

Advertisement
View Answers

Related Tutorials/Questions & Answers:
java
java  diff bt core java and java
java
java  what is java
Advertisements
Java
Java   Whether Java is pure object oriented Language
java
java  different between java & core java
java
java  explain technologies are used in java now days and structure java
java
java   why iterator in java if we for loop
JAVA
JAVA  how the name came for java language as "JAVA
java
java  what is java reflection
java
java  is java open source
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   in java does not pointers concept but what is nullpointers in java?   nullpointer is a runtime Exception
java
java  write a java program using filenotfoundexception
java
java   difference between class and interface
java
java  why multiple inheritance is not possible in java
java
java  is java purely object oriented language
java
java  how use java method
java
java  send me java interview questions
java
java  write a program in java to acess the email
java
java  Write a java code to print "ABABBABCABABBA
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  give a simple example for inheritance in java
Java
Java  how to do java in command prompt
java
java  sample code for RARP using java
java
java  RARP implementation using java socket
Java
Java  how to draw class diagrams in java
java
java  explain object oriented concept in java
Java
Java   Whether Java is Programming Language or it is SOftware
java
java  what are JAVA applications development tools
java
java  why to set classpath in java
 

 

 

DMCA.com