Preview: company_message.php
Size: 19.42 KB
/home/jambtst2015/public_html/giraffeng.com/admin/company_message.php
<?php include("includes/head.php"); ?>
<?php include("includes/header.php"); ?>
<?php
function get_company_message($staff_type){
$sql_company_message = mysql_fetch_array(mysql_query("SELECT * FROM company_message_master WHERE staff_type = '".$staff_type."'"));
return $sql_company_message['company_message'];
}
///////////////Add Events///////////////////////////////////////////////
if($_REQUEST['update']=="UPDATE")
{
$sql_staff_W2S = mysql_query("UPDATE company_message_master SET company_message = '".htmlspecialchars($_REQUEST['company_message_w2S'], ENT_QUOTES)."' , post_date = NOW() WHERE staff_type = 'W2S'");
$sql_staff_W2H = mysql_query("UPDATE company_message_master SET company_message = '".htmlspecialchars($_REQUEST['company_message_w2H'], ENT_QUOTES)."' , post_date = NOW() WHERE staff_type = 'W2H'");
$sql_staff_1099 = mysql_query("UPDATE company_message_master SET company_message = '".htmlspecialchars($_REQUEST['company_message_1099'], ENT_QUOTES)."' , post_date = NOW() WHERE staff_type = '1099'");
$sql_staff_C2C = mysql_query("UPDATE company_message_master SET company_message = '".htmlspecialchars($_REQUEST['company_message_C2C'], ENT_QUOTES)."' , post_date = NOW() WHERE staff_type = 'C2C'");
$sql_staff_Future_H1B = mysql_query("UPDATE company_message_master SET company_message = '".htmlspecialchars($_REQUEST['company_message_Future_H1B'], ENT_QUOTES)."' , post_date = NOW() WHERE staff_type = 'Future H1B'");
$sql_staff_Prospect = mysql_query("UPDATE company_message_master SET company_message = '".htmlspecialchars($_REQUEST['company_message_Prospect'], ENT_QUOTES)."' , post_date = NOW() WHERE staff_type = 'Prospect'");
$sql_staff_EX = mysql_query("UPDATE company_message_master SET company_message = '".htmlspecialchars($_REQUEST['company_message_EX'], ENT_QUOTES)."' , post_date = NOW() WHERE staff_type = 'EX'");
header("location:company_message.php?msg=1");
}
/////////////End Add//////////////////////////////////////////////
if(!$_REQUEST['page'])
{
$_SESSION['srchstr']="";
$_SESSION['srchkey']="";
}
?>
<script type="text/javascript" language="javascript">
$(document).ready(function(){
setTimeout(function(){
$(".mydiv").fadeOut("slow", function () {
$(".mydiv").remove("slow");
});
}, 4000);
});
</script>
<!--Editor script-->
<script type="text/javascript" src="js/tinymce/tinymce.min.js"></script>
<script type="text/javascript">
tinymce.init({
selector: "#bodyar11",
height : 610,
width : 750,
plugins: [
"advlist autolink autosave link image lists charmap print preview hr anchor pagebreak spellchecker",
"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
"table contextmenu directionality emoticons template textcolor paste fullpage textcolor"
],
toolbar1: "newdocument fullpage | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | styleselect formatselect fontselect fontsizeselect",
toolbar2: "cut copy paste | searchreplace | bullist numlist | outdent indent blockquote | undo redo | link unlink anchor image media code | inserttime preview | forecolor backcolor",
toolbar3: "table | hr removeformat | subscript superscript | charmap emoticons | print fullscreen | ltr rtl | spellchecker | visualchars visualblocks nonbreaking template pagebreak restoredraft",
menubar: false,
toolbar_items_size: 'small',
//relative_urls: false,
relative_urls : false,
remove_script_host : false,
convert_urls : true,
//document_base_url: 'http://www.insurancemall2.com/india/',
style_formats: [
{title: 'Bold text', inline: 'b'},
{title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
{title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
{title: 'Example 1', inline: 'span', classes: 'example1'},
{title: 'Example 2', inline: 'span', classes: 'example2'},
{title: 'Table styles'},
{title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
],
templates: [
{title: 'Test template 1', content: 'Test 1'},
{title: 'Test template 2', content: 'Test 2'}
]
});
</script>
<script type="text/javascript">
tinymce.init({
selector: "#bodytime",
height : 610,
width : 750,
plugins: [
"advlist autolink autosave link image lists charmap print preview hr anchor pagebreak spellchecker",
"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
"table contextmenu directionality emoticons template textcolor paste fullpage textcolor"
],
toolbar1: "newdocument fullpage | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | styleselect formatselect fontselect fontsizeselect",
toolbar2: "cut copy paste | searchreplace | bullist numlist | outdent indent blockquote | undo redo | link unlink anchor image media code | inserttime preview | forecolor backcolor",
toolbar3: "table | hr removeformat | subscript superscript | charmap emoticons | print fullscreen | ltr rtl | spellchecker | visualchars visualblocks nonbreaking template pagebreak restoredraft",
menubar: false,
toolbar_items_size: 'small',
//relative_urls: false,
relative_urls : false,
remove_script_host : false,
convert_urls : true,
//document_base_url: 'http://www.insurancemall2.com/india/',
style_formats: [
{title: 'Bold text', inline: 'b'},
{title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
{title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
{title: 'Example 1', inline: 'span', classes: 'example1'},
{title: 'Example 2', inline: 'span', classes: 'example2'},
{title: 'Table styles'},
{title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
],
templates: [
{title: 'Test template 1', content: 'Test 1'},
{title: 'Test template 2', content: 'Test 2'}
]
});
tinymce.init({
selector: "#body_project_ending",
height : 610,
width : 750,
plugins: [
"advlist autolink autosave link image lists charmap print preview hr anchor pagebreak spellchecker",
"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
"table contextmenu directionality emoticons template textcolor paste fullpage textcolor"
],
toolbar1: "newdocument fullpage | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | styleselect formatselect fontselect fontsizeselect",
toolbar2: "cut copy paste | searchreplace | bullist numlist | outdent indent blockquote | undo redo | link unlink anchor image media code | inserttime preview | forecolor backcolor",
toolbar3: "table | hr removeformat | subscript superscript | charmap emoticons | print fullscreen | ltr rtl | spellchecker | visualchars visualblocks nonbreaking template pagebreak restoredraft",
menubar: false,
toolbar_items_size: 'small',
//relative_urls: false,
relative_urls : false,
remove_script_host : false,
convert_urls : true,
//document_base_url: 'http://www.insurancemall2.com/india/',
style_formats: [
{title: 'Bold text', inline: 'b'},
{title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
{title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
{title: 'Example 1', inline: 'span', classes: 'example1'},
{title: 'Example 2', inline: 'span', classes: 'example2'},
{title: 'Table styles'},
{title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
],
templates: [
{title: 'Test template 1', content: 'Test 1'},
{title: 'Test template 2', content: 'Test 2'}
]
});
tinymce.init({
selector: "#body_payroll",
height : 610,
width : 750,
plugins: [
"advlist autolink autosave link image lists charmap print preview hr anchor pagebreak spellchecker",
"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
"table contextmenu directionality emoticons template textcolor paste fullpage textcolor"
],
toolbar1: "newdocument fullpage | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | styleselect formatselect fontselect fontsizeselect",
toolbar2: "cut copy paste | searchreplace | bullist numlist | outdent indent blockquote | undo redo | link unlink anchor image media code | inserttime preview | forecolor backcolor",
toolbar3: "table | hr removeformat | subscript superscript | charmap emoticons | print fullscreen | ltr rtl | spellchecker | visualchars visualblocks nonbreaking template pagebreak restoredraft",
menubar: false,
toolbar_items_size: 'small',
//relative_urls: false,
relative_urls : false,
remove_script_host : false,
convert_urls : true,
//document_base_url: 'http://www.insurancemall2.com/india/',
style_formats: [
{title: 'Bold text', inline: 'b'},
{title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
{title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
{title: 'Example 1', inline: 'span', classes: 'example1'},
{title: 'Example 2', inline: 'span', classes: 'example2'},
{title: 'Table styles'},
{title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
],
templates: [
{title: 'Test template 1', content: 'Test 1'},
{title: 'Test template 2', content: 'Test 2'}
]
});
tinymce.init({
selector: "#body_supplemental_timesheet",
height : 610,
width : 750,
plugins: [
"advlist autolink autosave link image lists charmap print preview hr anchor pagebreak spellchecker",
"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
"table contextmenu directionality emoticons template textcolor paste fullpage textcolor"
],
toolbar1: "newdocument fullpage | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | styleselect formatselect fontselect fontsizeselect",
toolbar2: "cut copy paste | searchreplace | bullist numlist | outdent indent blockquote | undo redo | link unlink anchor image media code | inserttime preview | forecolor backcolor",
toolbar3: "table | hr removeformat | subscript superscript | charmap emoticons | print fullscreen | ltr rtl | spellchecker | visualchars visualblocks nonbreaking template pagebreak restoredraft",
menubar: false,
toolbar_items_size: 'small',
//relative_urls: false,
relative_urls : false,
remove_script_host : false,
convert_urls : true,
//document_base_url: 'http://www.insurancemall2.com/india/',
style_formats: [
{title: 'Bold text', inline: 'b'},
{title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
{title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
{title: 'Example 1', inline: 'span', classes: 'example1'},
{title: 'Example 2', inline: 'span', classes: 'example2'},
{title: 'Table styles'},
{title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
],
templates: [
{title: 'Test template 1', content: 'Test 1'},
{title: 'Test template 2', content: 'Test 2'}
]
});
</script>
<!--Editor script-->
<font color="#009933"></font>
<?php
$msg=$_REQUEST['msg'];
if($msg == 1){
$msg = '<font color="#009933">Company Message 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="100%" align="center">
<div id="company_message" class="big-text">
<table width="70%" 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-cog"></i> Manage Company Message </p>
</td>
</tr>
<tr class="smalltext">
<td height="28" colspan="5" align="left" valign="middle" class="enquiery">
<table width="98%" border="0" cellspacing="0" cellpadding="0" class="comnt-tbl">
<tr class="smalltext">
<td width="131" height="22" align="center" valign="top" class="head_text2">Staff Type W2S </td>
<!-- <td width="12" align="left" valign="top" class="enquiery"> </td>-->
<td align="left" valign="top">
<div class="comment-sec">
<i class="fa fa-caret-left"></i>
<textarea name="company_message_w2S" id="company_message_w2S" class="validate[required]" cols="50"><?php echo htmlspecialchars_decode(stripslashes(get_company_message('W2S'))); ?></textarea>
</div>
</td>
</tr>
<tr class="smalltext">
<td width="131" height="22" align="center" valign="top" class="head_text2">Staff Type W2H </td>
<!--<td width="12" align="left" valign="top" class="enquiery">:</td>-->
<td>
<div class="comment-sec">
<i class="fa fa-caret-left"></i>
<textarea name="company_message_w2H" id="company_message_w2H" class="validate[required]" cols="50"><?php echo htmlspecialchars_decode(stripslashes(get_company_message('W2H'))); ?></textarea>
</div>
</td>
</tr>
<tr class="smalltext">
<td width="131" height="22" align="center" valign="top" class="head_text2">Staff Type 1099 </td>
<!--<td width="12" align="left" valign="top" class="enquiery">:</td>-->
<td>
<div class="comment-sec">
<i class="fa fa-caret-left"></i>
<textarea name="company_message_1099" id="company_message_1099" class="validate[required]" cols="50"><?php echo htmlspecialchars_decode(stripslashes(get_company_message('1099'))); ?></textarea>
</div>
</td>
</tr>
<tr class="smalltext">
<td width="131" height="22" align="center" valign="top" class="head_text2">Staff Type C2C </td>
<!--<td width="12" align="left" valign="top" class="enquiery">:</td>-->
<td>
<div class="comment-sec">
<i class="fa fa-caret-left"></i>
<textarea name="company_message_C2C" id="company_message_C2C" class="validate[required]" cols="50"><?php echo htmlspecialchars_decode(stripslashes(get_company_message('C2C'))); ?></textarea>
</div>
</td>
</tr>
<tr class="smalltext">
<td width="131" height="22" align="center" valign="top" class="head_text2">Staff Type Future H1B </td>
<td>
<div class="comment-sec">
<i class="fa fa-caret-left"></i>
<textarea name="company_message_Future_H1B" id="company_message_Future_H1B" class="validate[required]" cols="50"><?php echo htmlspecialchars_decode(stripslashes(get_company_message('Future H1B'))); ?></textarea>
</div>
</td>
</tr>
<tr class="smalltext">
<td width="131" height="22" align="center" valign="top" class="head_text2">Staff Type Prospect </td>
<td>
<div class="comment-sec">
<i class="fa fa-caret-left"></i>
<textarea name="company_message_Prospect" id="company_message_Prospect" class="validate[required]" cols="50"><?php echo htmlspecialchars_decode(stripslashes(get_company_message('Prospect'))); ?></textarea>
</div>
</td>
</tr>
<tr class="smalltext">
<td width="131" height="22" align="center" valign="top" class="head_text2">Staff Type EX </td>
<td>
<div class="comment-sec">
<i class="fa fa-caret-left"></i>
<textarea name="company_message_EX" id="company_message_EX" class="validate[required]" cols="50"><?php echo htmlspecialchars_decode(stripslashes(get_company_message('EX'))); ?></textarea>
</div>
</td>
</tr>
<tr>
<td height="30" align="left" valign="top" class="enquiery"> </td>
<td valign="top" aign="left">
<input type="submit" border="0" style="margin:0px;" value="UPDATE" class="require upload-btn" name="update" id="update">
</td>
</tr>
<tr class="smalltext">
<td height="9" colspan="3" align="left" valign="middle" class="enquiery"></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