Jump to content

Amazon

New Members
  • Posts

    1
  • Joined

  • Last visited

Amazon's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. <td style="font-size:16px;"><b>No of Leaves Available: </b></td> <td colspan="3"> <?php $st1 = "<?php echo htmlentities($result->LeaveType);?>"; $st2 = "Half Day"; $st3 = "Full Day"; if($st1 == $st2 or $st3){ $stats=$result->Status; if($stats==1 && $update==1){$ld=($result->Remleaves)-($result->Applydays);} else{$ld=$result->Remleaves;} if($ld<=0){ $ld=0; //$war="(Available Leaves got exhausted)"; } echo htmlentities($ld); ?> <span style="color:red"><?php echo htmlentities($war);?></span><?php $eid=$result->id; $sql='update tblemployees set Remleaves=:ld where id=:eid'; $query = $dbh->prepare($sql); $query->bindParam(':ld',$ld,PDO::PARAM_STR); $query->bindParam(':eid',$eid,PDO::PARAM_INT); $query->execute(); $lastInsertId = $dbh->lastInsertId(); } else{ $st1 = "<?php echo htmlentities($result->LeaveType);?>"; $st2 = "Sick Leave"; $st3 = "Casual Leave"; if($st1 == $st2 or $st3){ $stats=$result->Status; if($stats==1 && $update==1){$ld=($result->Scremleaves)-($result->Applydays);} else{$ld=$result->Scremleaves;} if($ld<=0){ $ld=0; //$war="(Available Leaves got exhausted)"; } echo htmlentities($ld); ?> <span style="color:red"><?php echo htmlentities($war);?></span><?php $eid=$result->id; $sql='update tblemployees set Scremleaves=:ld where id=:eid'; $query = $dbh->prepare($sql); $query->bindParam(':ld',$ld,PDO::PARAM_STR); $query->bindParam(':eid',$eid,PDO::PARAM_INT); $query->execute(); $lastInsertId = $dbh->lastInsertId(); } }?></td>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.