<link rel="stylesheet" href="css/new_mxerp.css">
<div class="body_contain">
<div class="tab_div">
<h1><strong>Training / Induction Master</strong></h1>
<?php
$modid=isset($_REQUEST['modid'])?$_REQUEST['modid']:'';
$frmid=isset($_REQUEST['frmid'])?$_REQUEST['frmid']:'';
$rurl="index.php?route=HRModule/training_induction_master_index&modid=".$modid."&frmid=".$frmid;
$furl="index.php?route=HRModule/training_induction_master&modid=".$modid."&frmid=".$frmid;
if(isset($_REQUEST['action']) && $_REQUEST['action']=='Del' && isset($_REQUEST['ID']) && $_SESSION['frmDelete']=='1') {
	DB_query("delete from hr_training_induction_master where id='".(int)$_REQUEST['ID']."' and companyid='".$_SESSION['ACGCompanyId']."'",$db);
	$s->pageLocation($rurl."&daction=Deleted");
}
?>
<?php if(isset($_REQUEST['daction'])){ ?><div class="success" style="text-align:center;">Record <?php echo $_REQUEST['daction']; ?> Successfully</div><?php } ?>
<p align="left"><?php if($_SESSION['frmcreate']=='1'){ ?><a href="<?php echo $furl; ?>"><input type="button" value="Add New" class="search"></a><?php } ?></p>
<table width="100%" cellpadding="3" cellspacing="0" border="1" style="border:#808080 1px solid; border-collapse:collapse;">
<tr>
	<th width="5%">S. No.</th>
	<th width="12%">Code</th>
	<th>Program Name</th>
	<th width="12%">Type</th>
	<th width="12%">Category</th>
	<th width="12%">Mode</th>
	<th width="12%">Trainer</th>
	<th width="8%">Status</th>
	<th width="5%">Edit</th>
	<th width="5%">Delete</th>
</tr>
<?php
$i=1;
$SQL=DB_query("select * from hr_training_induction_master where companyid='".$_SESSION['ACGCompanyId']."' order by id desc",$db);
if(DB_num_rows($SQL)>0){
	while($row=DB_fetch_array($SQL)){
?>
<tr bgcolor="#fff">
	<td><?php echo $i++; ?></td>
	<td><?php echo htmlspecialchars($row['program_code'],ENT_QUOTES); ?></td>
	<td><?php echo htmlspecialchars($row['program_name'],ENT_QUOTES); ?></td>
	<td><?php echo htmlspecialchars($row['training_type'],ENT_QUOTES); ?></td>
	<td><?php echo htmlspecialchars($row['training_category'],ENT_QUOTES); ?></td>
	<td><?php echo htmlspecialchars($row['training_mode'],ENT_QUOTES); ?></td>
	<td><?php echo htmlspecialchars($row['lead_trainer'],ENT_QUOTES); ?></td>
	<td><?php echo htmlspecialchars($row['status'],ENT_QUOTES); ?></td>
	<td align="center"><?php if($_SESSION['frmEdit']=='1'){ ?><a href="<?php echo $furl; ?>&action=Edit&ID=<?php echo $row['id']; ?>">Edit</a><?php } ?></td>
	<td align="center"><?php if($_SESSION['frmDelete']=='1'){ ?><a href="<?php echo $rurl; ?>&action=Del&ID=<?php echo $row['id']; ?>" onclick="return confirm('Delete this record?')">Delete</a><?php } ?></td>
</tr>
<?php }} else { ?>
<tr bgcolor="#fff"><td colspan="10" style="text-align:center;">No Result Found.</td></tr>
<?php } ?>
</table>
</div>
</div>
