Preview: new_LCA_bk.php
Size: 17.58 KB
/home/jambtst2015/public_html/giraffeng.com/admin/new_LCA_bk.php
<?php include("includes/head.php"); ?>
<?php include("includes/header.php"); ?>
<?php
/*---For Add---*/
if($_SERVER["REQUEST_METHOD"]=="POST"){
//echo "sdss";
//exit;
//if(isset($_POST)){
//insert//
$time = date("Y-m-d");
$insSql = "INSERT INTO `lca_details` set ";
$insSql .= "candidate_name='".$_REQUEST['employee_id']."', ";
$insSql .= "lca_count='".mysql_real_escape_string(trim($_POST['lca_count']))."', ";
$insSql .= "lca_number='".mysql_real_escape_string(trim($_POST['lca_number']))."', ";
$insSql .= "work_location1='".mysql_real_escape_string(trim($_POST['work_location1']))."', ";
$insSql .= "prevl_wages1='".mysql_real_escape_string(trim($_POST['prevl_wages1']))."', ";
$insSql .= "work_location2='".mysql_real_escape_string(trim($_POST['work_location2']))."', ";
$insSql .= "prevl_wages2='".mysql_real_escape_string(trim($_POST['prevl_wages2']))."', ";
$insSql .= "wage_rate='".mysql_real_escape_string(trim($_POST['wage_rate']))."', ";
$insSql .= "lca_position_rate='".mysql_real_escape_string(trim($_POST['lca_position_rate']))."', ";
$insSql .= "start_date='".change_dateformat(trim($_POST['start_date']))."', ";
$insSql .= "end_date='".change_dateformat(trim($_POST['end_date']))."', ";
$insSql .= "lca_activity_status='".mysql_real_escape_string(trim($_POST['lca_activity_status']))."', ";
$insSql .= "exmpt='".mysql_real_escape_string(trim($_POST['exmpt']))."', ";
$insSql .= "lca_staus='".mysql_real_escape_string(trim($_POST['lca_staus']))."', ";
$insSql .= "associates_qualification='".$_POST['associates_qualification']."', ";
$insSql .= "graduation_year='".change_dateformat(trim($_POST['graduation_year']))."', ";
$insSql .= "experience_years='".mysql_real_escape_string(trim($_POST['experience_years']))."', ";
$insSql .= "current_salary='".trim($_POST['current_salary'])."', ";
$insSql .= "lca_level='".mysql_real_escape_string(trim($_POST['lca_level']))."', ";
$insSql .= "lca_given_rcpt='".mysql_real_escape_string(trim($_POST['lca_given_rcpt']))."', ";
$insSql .= "10days_posting_notice='".mysql_real_escape_string(trim($_POST['10days_posting_notice']))."', ";
$insSql .= "current_employment_status='".mysql_real_escape_string(trim($_POST['current_employment_status']))."', ";
$insSql .= "public_inspection_file='".mysql_real_escape_string(trim($_POST['public_inspection_file']))."', ";
$insSql .= "notes='".mysql_real_escape_string(trim($_POST['notes']))."', ";
$insSql .= "filed_by='".mysql_real_escape_string(trim($_POST['filed_by']))."', ";
$insSql .= "created_by='".$_SESSION['sat_login_id']."', ";
$insSql .= "created_date='".$time."', ";
$insSql .= "last_update_by='".$_SESSION['sat_login_id']."', ";
$insSql .= "last_update_date='".$time."'";
//$insSql ;
mysql_query($insSql);
header("location:view_LCA.php?userid=$_REQUEST[employee_id]&success=1");
}
else{
$_POST['name']='';
$_POST['street']='';
$_POST['city']='';
$_POST['state']='';
$_POST['zip']='';
$_POST['industry']='';
$_POST['phone']='';
$_POST['contact_name']='';
$_POST['contact_phone']='';
$_POST['client_type']='';
$_POST['add_date']='';
$_POST['email']='';
$_POST['web_address']='';
$_POST['ac_mgr']='';
$_POST['open_reqs']='';
$_POST['close_reqs']='';
$_POST['send_emails']='';
$_POST['added_user']='';
$_POST['notes']='';
$_POST['change_authority']='';
$_POST['blacklisted']='';
$_POST['record_status']='';
}
/*---End Add---*/
?>
<script>
function formSub(){
//alert(111111111);
//document.myfrm.submit();
document.getElementById("formID").submit();
return true;
}
jQuery.noConflict();
(function($) {jQuery(document).ready(function(){
// binds form submission and fields to the validation engine
jQuery("#formID").validationEngine('attach', {
onValidationComplete: function(form, status){
//alert("The form status is: " +status+", it will never submit");
if(status == true){
var id = $("#h_id").val();
var status = $("#lca_staus").val();
$.ajax({
url : 'same_lca.php',
type : 'POST',
data : 'id='+id+'&status='+status,
//dataType : 'json',
beforeSend : function(jqXHR, settings ){
//alert(1);
},
success : function( data, textStatus, jqXHR){
//alert(data);
if(data==0){
//$('input[type="submit"]').attr('disabled','disabled');
return formSub();
}else{
$("#errorMsg").show("slow");
//$('input[type="submit"]').attr('disabled','disabled');
//return false;
}
//window.open('same_candidate.php?name='+name,'news view','height=600, width=1000, resizable=yes, scrollbars=yes');
},
error : function( jqXHR, textStatus, errorThrown){
}
});
}
}
});
});})(jQuery);
function addSkills(catid)
{
window.open('addSkill.php?catid='+catid,'Add Skill','height=250, width=600, resizable=yes, scrollbars=yes');
}
function addSkillsse(catid)
{
window.open('addSkillsecond.php?catid='+catid,'Add Skill','height=250, width=600, resizable=yes, scrollbars=yes');
}
function addVendors()
{
window.open('addVendor.php','Add Skill','height=250, width=600, resizable=yes, scrollbars=yes');
}
</script>
<script type="text/javascript">
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;
}
function open_notes()
{
if(document.getElementById('notes').checked==true)
{
document.getElementById('notes_div').style.display='block';
}
if(document.getElementById('notes1').checked==true)
{
document.getElementById('notes_desc').value='';
document.getElementById('notes_div').style.display='none';
}
}
function open_blacklisted()
{
if(document.getElementById('blacklisted1').checked==true)
{
document.getElementById('blacklisted_div').style.display='block';
}
if(document.getElementById('blacklisted2').checked==true)
{
document.getElementById('blacklisted_desc').value='';
document.getElementById('blacklisted_div').style.display='none';
}
}
function candidatetypeother(val){
if(val == 'other'){
document.getElementById('candidatetype_other').style.display='block';
}
else{
document.getElementById('candidate_type_other').value='';
document.getElementById('candidatetype_other').style.display='none';
}
}
</script>
<script language="javascript">
function ChangeFocuszip(cur,nex)
{
var value=document.getElementById(cur).value;
if(value.length==5)
{
document.getElementById(nex).focus();
}
}
function ChangeFocus1(cur,nex)
{
var value=document.getElementById(cur).value;
if(value.length==3)
{
document.getElementById(nex).focus();
}
}
function ChangeFocus(cur,nex)
{
var value=document.getElementById(cur).value;
if(value.length==3)
{
document.getElementById(nex).focus();
}
}
function ChangeFocus1(cur,nex)
{
var value=document.getElementById(cur).value;
if(value.length==2)
{
document.getElementById(nex).focus();
}
}
</script>
<div class="container_bottom_section tbl_cls_new">
<form name="myfrm" action="" method="post" id="formID" enctype="multipart/form-data" <?php /*?>onsubmit="return validecan();"<?php */?>>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<?php if(empty($error)){$error='';}
if($error!=''){
?>
<tr>
<td colspan="7">
<div class="error"><?php echo $error; ?></div>
</td>
</tr>
<?php } ?>
<tr>
<td width="30%" valign="top" align="center">
<table width="300" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="56%"> </td>
<td width="44%"> </td>
</tr>
<script>
$(document).ready(function(){
$("#name").change(function(){
if( $(this).val() == ''){
//alert(000);
}else{
//window.open('view_candidate.php?userid='+userid,'news view','height=600, width=1000, resizable=yes, scrollbars=yes');
var name = $(this).val();
$.ajax({
url : 'same_candidate.php',
type : 'POST',
data : 'name=' + name,
//dataType : 'json',
beforeSend : function(jqXHR, settings ){
//alert(1);
},
success : function( data, textStatus, jqXHR){
//alert(data);
window.open('same_candidate.php?name='+name,'news view','height=600, width=1000, resizable=yes, scrollbars=yes');
},
error : function( jqXHR, textStatus, errorThrown){
}
});
}
});
});
</script>
<tr>
<td align="right" valign="top">LCA Count</td>
<input type="hidden" value="<?php echo $_REQUEST['employee_id']; ?>" name="h_id" id="h_id" />
<td><input name="lca_count" type="text" class="validate[custom[integer],minSize[2],maxSize[2]] textfield require_field" value="<?php echo $_POST['lca_count']; ?>" maxlength="2"/></td>
</tr>
<tr>
<td align="right" id="gc_id" valign="top"></td>
</tr>
<tr>
<td align="right" valign="top">LCA Number</td>
<td><input name="lca_number" type="text" class="textfield require_field" value="<?php echo $_POST['lca_number']; ?>" /></td>
</tr>
<tr>
<td align="right" valign="top">Work Location1 </td>
<td><input name="work_location1" type="text" class="textfield require_field" value="<?php echo $_POST['work_location1']; ?>" /></td>
</tr>
<tr>
<td align="right" valign="top">Prevl Wages1 </td>
<td><input name="prevl_wages1" type="text" class="textfield require_field" value="<?php echo $_POST['prevl_wages1']; ?>" onKeyPress="return restrictChars(event, this)" /></td>
</tr>
<tr>
<td align="right" valign="top">Work Location2 </td>
<td><input name="work_location2" type="text" class="textfield require_field" value="<?php echo $_POST['work_location2']; ?>" /></td>
</tr>
<tr>
<td align="right" valign="top">Prevl Wages2 </td>
<td><input name="prevl_wages2" id="prevl_wages2" type="text" class="textfield require_field" value="<?php echo $_POST['prevl_wages2']?>" onKeyPress="return restrictChars(event, this)"/></td>
</tr>
<tr>
<td align="right" valign="top">Wage Rate </td>
<td width="100%">
<input name="wage_rate" id="wage_rate" type="text" class="textfield require_field" value="<?php echo $_POST['wage_rate']?>" onKeyPress="return restrictChars(event, this)"/>
</td>
</tr>
<tr>
<td align="right" valign="top">LCA Position Title </td>
<td> <input name="lca_position_rate" id="lca_position_rate" type="text" class="textfield require_field" value="<?php echo $_POST['lca_position_rate']?>" /></td>
</tr>
<tr>
<script>
$(function()
//{
// $( "#start_date" ).datepicker({
// dateFormat:"mm/dd/yy"
// });
{
$('#start_date').datepicker({
// minDate: 0,
onSelect: function(dateStr) {
dateFormat:"mm/dd/yy"
var date = $(this).datepicker('getDate');
if (date) {
date.setDate(date.getDate());
}
$('#end_date').datepicker('option', 'minDate', date);
}
});
$('#end_date').datepicker({
// minDate: 0,
onSelect: function (selectedDate) {
var date = $(this).datepicker('getDate');
if (date) {
date.setDate(date.getDate());
}
$('#start_date').datepicker('option', 'maxDate', date || 0);
}
});
});
</script>
<td align="right" valign="top">Start Date </td>
<td><input name="start_date" id="start_date" type="text" class="textfield require_field" value="<?php echo $_POST['start_date']?>" /></td>
</tr>
<tr>
<td align="right" valign="top">End Date </td>
<td><input name="end_date" id="end_date" type="text" class="textfield require_field" value="<?php echo $_POST['end_date']; ?>" />
</td>
</tr>
<tr>
<td align="right" valign="top">LCA Activity Status </td>
<td id="main_skills">
<input name="lca_activity_status" id="lca_activity_status" type="text" class="textfield require_field" value="<?php echo $_POST['lca_activity_status']; ?>" />
</td>
</tr>
</table>
</td>
<td width="26%" valign="top">
<table width="300" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="59%"> </td>
<td width="41%"> </td>
</tr>
<tr>
<script>
$(function() {
$( "#labor_approval_date" ).datepicker({
dateFormat:"<?php echo $dateFormat; ?>"
});
//$( "#post_date" ).datepicker( "dd-mm-yy", "dateFormat" );
});
</script>
<td align="right" valign="top">Exmpt </td>
<td><input name="exmpt" id="exmpt" type="text" class="textfield exmpt" value="<?php echo $_POST['exmpt']; ?>" />
</td>
</tr>
<tr>
<td align="right" valign="top">LCA Status </td>
<td>
<select id="lca_staus" class="textfield require_field"style="width:184px;" name="lca_staus">
<option value="Active" selected="selected">Active</option>
<option value="Inactive">Inactive</option>
<option value="Expired">Expired</option>
<option value="Future">Future</option>
</select>
<span id="errorMsg" style="display:none; color:#F00;">Another LCA is already Active; please Inactive that first</span>
</td>
</tr>
<tr>
<td align="right">Associate's Qualification </td>
<td><input name="associates_qualification" id="associates_qualification" type="text" class="textfield require_field" value="<?php echo $_POST['associates_qualification']; ?>" /></td>
</tr>
<tr>
<script>
$(function() {
$( "#graduation_year" ).datepicker({
dateFormat:"<?php echo $dateFormat; ?>"
});
//$( "#post_date" ).datepicker( "dd-mm-yy", "dateFormat" );
});
</script>
<td align="right">Graduation Year </td>
<td><input name="graduation_year" id="graduation_year" type="text" class="textfield require_field" value="<?php echo $_POST['graduation_year']; ?>" /></td>
</tr>
<tr>
<td align="right">Experience Years </td>
<td><input name="experience_years" id="experience_years" type="text" class="textfield require_field" value="<?php echo $_POST['experience_years']; ?>" /></td>
</tr>
<tr>
<td align="right">Current Salary </td>
<td><input name="current_salary" id="current_salary" type="text" class="textfield require_field" value="<?php echo $_POST['current_salary']; ?>" onKeyPress="return restrictChars(event, this)" /></td>
</tr>
<tr>
<td align="right">LCA Level </td>
<td><input name="lca_level" id="lca_level" type="text" class="validate[custom[integer],minSize[2],maxSize[2]] textfield require_field" value="<?php echo $_POST['lca_level']; ?>" maxlength="2"/></td>
</tr>
<tr>
<td align="right">LCA Given Rcpt </td>
<td><input name="lca_given_rcpt" id="lca_given_rcpt" type="text" class="textfield require_field" value="<?php echo $_POST['lca_given_rcpt']; ?>" /></td>
</tr>
<tr>
<td align="right">10 Days Posting Notice </td>
<td><input name="10days_posting_notice" id="10days_posting_notice" type="text" class="textfield require_field" value="<?php echo $_POST['10days_posting_notice']; ?>" /></td>
</tr>
<tr>
<td align="right">Current Employment Status </td>
<td><input name="current_employment_status" id="current_employment_status" type="text" class="textfield require_field" value="<?php echo $_POST['current_employment_status']; ?>" /></td>
</tr>
<tr>
<td align="right">Public Inspection File </td>
<td><input name="public_inspection_file" id="public_inspection_file" type="text" class="textfield require_field" value="<?php echo $_POST['public_inspection_file']; ?>" /></td>
</tr>
<tr>
<td align="right">Notes </td>
<td><textarea name="notes" id="notes" type="text" class="textfield require_field"><?php echo $_POST['notes']; ?></textarea></td>
</tr>
<tr>
<td align="right">Filed By </td>
<td>
<select id="filed_by" class="textfield require_field" style="width:184px;;" name="filed_by">
<option value="">Select</option>
<option value="John">JOHN</option>
<option value="Slowik">SLOWIK</option>
<option value="Boudia">BOUDIA</option>
<option value="Georges">GEORGE</option>
<option value="James">JAMES</option>
<option value="Leblang">LEBLANG</option>
<option value="Andrew">ANDREW</option>
<option value="Absi">ABSI</option>
<option value="Murthy">MURTHY</option>
<option value="N/A">N/A</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="7" align="center"><input name="update" type="submit" value="Save" class="submit" style="margin-bottom:10px;" />
<a href="view_LCA.php?userid=<?php echo $_REQUEST['employee_id'];?>">
<input name="cancel" type="button" value="Cancel" class="submit" style=" margin-bottom:10px;" /></a>
</td>
</tr>
</table>
<div class="clear"></div>
</form>
</div>
<?php include("includes/footer.php"); ?>
Directory Contents
Dirs: 17 × Files: 180