| Current Path : /var/www/html/mmishra/indem/lms/ |
| Current File : /var/www/html/mmishra/indem/lms/recommendation.php |
<?php
include "header.inc";
include "inc/functions.inc";
dbConnect();
$tbl = "leaveRegister";
$appid = $_REQUEST["appid"];
$empid = $_REQUEST["empid"];
$recomname = $_REQUEST["recomname"];
$rs1 = mysql_query("select * from employeeMaster where empid='$empid'");
while ($o = mysql_fetch_object($rs1)){
$empname = $o->empname;
$designation = $o->designation;
$division = $o->division;
$department = $o->department;
$emptype = $o->emptype;
}
$rs2 = mysql_query("select * from leaveRegister where empid='$empid' and appid='$appid'");
while ($p = mysql_fetch_object($rs2)){
$leavetype = $p->leavetype;
$leavefrom = $p->leavefrom;
$leaveto = $p->leaveto;
$leavedays = $p->leavedays;
$stationleave = $p->stationleave;
$addressduringleave = $p->addressduringleave;
$contactduringleave = $p->contactduringleave;
$emailduringleave = $p->emailduringleave;
$purposeofleave = $p->purposeofleave;
$respname = $p->respname;
$respdesignation = $p->respdesignation;
}
if ($_POST["submit"] == "SAVE") {
$msg = "";
$recommendation = $_POST["recommendation"];
$recomremark = $_POST["recomremark"];
mysql_query("update $tbl set leavestatus='Approved', recommendedby='$recomname', recommendation='$recommendation', recomremark='$recomremark' where appid='$appid'");
}
//--------------------------------------------------------------------------------------------------------------------------------------------------------
echo "<b>Part A</b><br>";
echo "<center>
<table>
<tr><td>Employee ID :</td>
<td><input type='text' name='empid' size='10' maxlength='10' value='$empid' readonly/></td>
</tr>
<tr><td>Employee Type :</td>
<td><input type='text' onkeypress='return isCharacterKey(event)' name='emptype' size='50' maxlength='50' value='$emptype' readonly /></td>
</tr>
<tr><td>Name of the Applicant :</td>
<td><input type='text' onkeypress='return isCharacterKey(event)' name='empname' size='50' maxlength='50' value='$empname' readonly /></td>
</tr>
<tr><td>Designation :</td>
<td><input type='text' onkeypress='return isCharacterKey(event)' name='designation' size='50' maxlength='50' value='$designation' readonly /></td>
</tr>
<tr><td>Division :</td>
<td><table>
<tr>";
if ($division == 'Academic'){
echo "<td><input type='radio' name='division' value='Academic' checked /> Academic</td>
<td><input type='radio' name='division' value='Administration' /> Administration</td>";
}
if ($division == 'Administration'){
echo "<td><input type='radio' name='division' value='Academic' /> Academic</td>
<td><input type='radio' name='division' value='Administration' checked /> Administration</td>";
}
if (!$division){
echo "<td><input type='radio' name='division' value='Academic' checked /> Academic</td>
<td><input type='radio' name='division' value='Administration' /> Administration</td>";
}
echo "<td> <input type='text' onkeypress='return isCharacterKey(event)' name='department' size='50' maxlength='50' value='$department' readonly /></td></tr>
</table></td>
</tr>
<tr><td>Period of Leave : </td><td><table>
<tr><td>From </td><td>
<select name='leavefromdd'>";
foreach ($dates as $dt) {
echo "<option value='$dt'";
if ($dt == $leavefromdd) echo " selected";
echo ">$dt</option>";
}
echo "</select>
<select name='leavefrommm'>";
foreach ($dmonths as $mt) {
echo "<option value='$mt'";
if ($mt == $leavefrommm) echo " selected";
echo ">$mt</option>";
}
echo "</select>
<select name='leavefromyy'>";
foreach ($dyears as $yr) {
echo "<option value='$yr'";
if ($yr == $leavefromyy) echo " selected";
echo ">$yr</option>";
}
echo "</select>
</td><td>To </td><td>
<select name='leavetodd'>";
foreach ($dates as $dt) {
echo "<option value='$dt'";
if ($dt == $leavetodd) echo " selected";
echo ">$dt</option>";
}
echo "</select>
<select name='leavetomm'>";
foreach ($dmonths as $mt) {
echo "<option value='$mt'";
if ($mt == $leavetomm) echo " selected";
echo ">$mt</option>";
}
echo "</select>
<select name='leavetoyy'>";
foreach ($dyears as $yr) {
echo "<option value='$yr'";
if ($yr == $leavetoyy) echo " selected";
echo ">$yr</option>";
}
echo "</select>
</td><td>
<input type='text' name='leavedays' size='3' maxlength='3' value='$leavedays' /> Days
</td></tr></table>
</td></tr>
<tr><td>Nature of Leave :</td>
<td><select name='leavetype'>";
foreach ($leavetypes as $lt) {
echo "<option value='$lt'";
if ($lt == $leavetype) echo " selected";
echo ">$lt</option>";
}
echo "</select>
<input type='checkbox' name='stationleave' value='YES' /> With request for station leave if leaving H.Q.</td>
</tr>
<tr><td>Purpose of Leave :</td>
<td><textarea name='purposeofleave' rows='3' cols='37' maxlength='150' value='$purposeofleave' readonly >$purposeofleave </textarea></td>
</tr>
<tr><td>Address during period of Leave :</td>
<td><textarea name='addressduringleave' rows='3' cols='37' maxlength='150' value='$addressduringleave' readonly>$addressduringleave </textarea></td>
</tr>
<tr><td>Contact Information :</td>
<td><input type='text' name='contactduringleave' size='50' value='$contactduringleave' readonly /></td>
</tr>
<tr><td>Email :</td>
<td><input type='text' name='emailduringleave' size='50' value='$emailduringleave' readonly /></td>
</tr>
</tr>
</table>
</center>";
echo "<hr>
<b>Part B</b><br>
<b>* Person taking charge of responsibility if required :</b><br><br>
<center>
<table>
<tr><td>Name :</td><td><input type='text' name='respname' size='50' value='$respname' readonly /></td></tr>
<tr><td>Designation :
</td>
<td><input type='text' name='respdesignation' size='50' value='$respdesignation' readonly />
</td></tr>
</table>
</center>
<hr>
<b>Part C</b><br>
<font color='red'>
<b>** Recommended By Divisional Head / Incharge :</b> $recomname<br><br>";
echo "<center>
<table>
<tr><td>Recommendation :</td><td><input type='radio' name='recommendation' value='Yes' /> Yes
<input type='radio' name='recommendation' value='No' /> No</td></tr>
<tr><td>Remark :</td><td><textarea row='3' col='37' maxlength='150' name='recomremark'>$recomremark</textarea></td></tr>
<tr><td colspan='2' align='center'><input type='submit' name='submit' value='SAVE' /></td></tr>
</table>
</center></font>";
//include "footer.inc";
?>