Preview: hours.php
Size: 5.80 KB
/home/jambtst2015/public_html/giraffeng.com/admin/hours.php
<?php include("includes/head.php"); ?>
<?php include("includes/header.php"); ?>
<?php
$sql_hours = mysql_fetch_array(mysql_query("SELECT * FROM hour_master WHERE id = 1"));
///////////////Add Events///////////////////////////////////////////////
if($_REQUEST['update']=="UPDATE")
{
$sql_update_hours = mysql_query("UPDATE hour_master SET personal = '".$_REQUEST['personal']."' ,sick = '".$_REQUEST['sick']."' ,holiday = '".$_REQUEST['holiday']."' , post_date = NOW() WHERE id = 1");
header("location:hours.php?msg=1");
}
/////////////End Add//////////////////////////////////////////////
if(!$_REQUEST['page'])
{
$_SESSION['srchstr']="";
$_SESSION['srchkey']="";
}
?>
<script>
jQuery(document).ready(function(){
jQuery("#formID").validationEngine();
});
</script>
<script type="text/javascript" language="javascript">
$(document).ready(function(){
setTimeout(function(){
$(".mydiv").fadeOut("slow", function () {
$(".mydiv").remove("slow");
});
}, 4000);
});
</script>
<script>
function getkey(e)
{
if (window.event)
return window.event.keyCode;
else if (e)
return e.which;
else
return null;
}
function goodchars(e, goods)
{
var key, keychar;
key = getkey(e);
if (key == null) return true;
keychar = String.fromCharCode(key);
keychar = keychar.toLowerCase();
goods = goods.toLowerCase();
if (goods.indexOf(keychar) != -1)
return true;
if ( key==null || key==0 || key==8 || key==9 || key==13 || key==27 )
return true;
return false;
}
</script>
<font color="#009933"></font>
<?php
$msg=$_REQUEST['msg'];
if($msg == 1){
$msg = '<font color="#009933">Hours Updated Successfully.</font>';
}
?>
<div class="mydiv" style="padding:18px;">
<?php if($_REQUEST['msg']=='1'){ ?>
<p class="mydiv" style="color:#090; float:left; font-family:Verdana, Geneva, sans-serif; font-size:13px; text-align:left;"><?php echo $msg; ?></p>
<?php } ?>
<div style="clear:both;"></div>
</div>
<div style="clear:both;"></div>
<div class="container_bottom_section">
<div class="clear"></div>
<form name="frmproduct" id="formID" action="" method="post" >
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="86%" align="center">
<div id="company_message" class="big-text">
<table width="950" height="161" border="0" cellpadding="0" cellspacing="0" align="center" style="border:1px solid #CCCCCC;">
<tr>
<td align="center" valign="middle" colspan="5" height="10">
<p class="client_table">
<i class="fa fa-clock-o"></i> Manage Hours
</p>
</td>
</tr>
<tr class="smalltext">
<td height="28" colspan="5" align="left" valign="middle" class="enquiery">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="center-tbl new-tbl" >
<tr class="smalltext">
<td width="131" height="22" align="center" valign="top" class="head_text2"><font color="#FF0000">*</font>Personal </td>
<td width="12" align="left" valign="top" class="enquiery">:</td>
<td align="left" valign="top"><input type="text" value="<?php echo $sql_hours['personal']; ?>" class="validate[required] textfield require_field" name="personal" id="personal" onkeypress="return goodchars(event,'1234567890');"></td>
</tr>
<tr class="smalltext">
<td width="131" height="22" align="center" valign="top" class="head_text2"><font color="#FF0000">*</font>Sick </td>
<td width="12" align="left" valign="top" class="enquiery">:</td>
<td align="left" valign="top"><input type="text" value="<?php echo $sql_hours['sick']; ?>" class="validate[required] textfield require_field" name="sick" id="sick" onkeypress="return goodchars(event,'1234567890');"></td>
</tr>
<tr class="smalltext">
<td width="131" height="22" align="center" valign="top" class="head_text2"><font color="#FF0000">*</font>Holiday </td>
<td width="12" align="left" valign="top" class="enquiery">:</td>
<td align="left" valign="top"><input type="text" value="<?php echo $sql_hours['holiday']; ?>" class="validate[required] textfield require_field" name="holiday" id="holiday" onkeypress="return goodchars(event,'1234567890');"></td>
</tr>
<tr>
<td height="30" align="left" valign="top" class="enquiery"> </td>
<td align="left" valign="top" class="enquiery"></td>
<td valign="top" class="button" aign="left">
<input type="submit" border="0" style="margin:0px;" value="UPDATE" class="require upload-btn" name="update" id="update">
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</form>
</div>
<?php include("includes/footer.php"); ?>
Directory Contents
Dirs: 17 × Files: 180