Current File : /home/inlingua/www/noida/icentex/conveyance/more.php |
<?php
session_start();
error_reporting(0);
$id=$_REQUEST['CID']+1;
require('../dbHandler.class.php');
include("../dbConnection.php");
require('../commonFunc.php');
$dbObject = new dbHandler();
$dbObject->connect();
$dbObject->setDbField('start_center',"Home");
$dbObject->setDbField('center5',"Home");
$queryUser="select actual_exp from timesheet_user where recNo='".$_SESSION['id']."'";
$resultUser=mysqli_query($conn,$queryUser);
$numUser=mysqli_fetch_array($resultUser);
?>
<td valign="top"><input type='text' name='date_conveyance[]' id='date_conveyance<?php echo $id ?>' value="<?php echo $dbObject->getDbField('date_conveyance');?>" size='8' maxlength='15' readonly></td>
<td valign="top"><input type='text' name='start_center[]' id='start_center<?php echo $id ?>' value="<?php echo $dbObject->getDbField('start_center');?>" size='4' maxlength='10' readonly></td>
<td valign="top">
<?php
$queryloc="select * from timesheet_location order by location";
$resultloc=mysqli_query($conn,$queryloc) or die(mysqli_query($conn,));
?>
<select name='center1[]' id='center1<?php echo $id ?>' onchange='cor_other1(<?php echo $id ?>);calc("calculation.php",<?php echo $id ?>);other(document.getElementById("center1<?php echo $id ?>"),document.getElementById("other1<?php echo $id ?>"));' style="width:100px;">
<option value="">Select</option>
<?php
while($num=mysqli_fetch_array($resultloc))
{
if($num[location]=="S.Extn")
{
echo"<option value='".$num[recNo]."' ";
if($dbObject->getDbField('center1')==$num[recNo])
{
echo"selected";
}
echo">South Extension</option>";
}
else
{
echo"<option value='".$num[recNo]."' ";
if($dbObject->getDbField('center1')==$num[recNo])
{
echo"selected";
}
echo">".$num[location]."</option>";
}
}
?>
<option value="Training">Training</option>
<?php
if($numUser['actual_exp']=="Y")
{
?>
<option value="Actual Exp.">Actual Exp.</option>
<?php
}
?>
<option value="Other">Other</option>
</select>
<br>
<input type='text' name='other1[]' id='other1<?php echo $id ?>' value="<?php echo $dbObject->getDbField('other1');?>" style="display:none;" size='10' maxlength='10'>
</td>
<td valign="top">
<input type='text' name='km1[]' id='km1<?php echo $id ?>' onkeyup='calc("calculation.php",<?php echo $id ?>);' value="<?php echo $dbObject->getDbField('km1');?>" size='3' maxlength='10' readonly>
</td>
<td valign="top"><?php
$queryloc="select * from timesheet_location order by location";
$resultloc=mysqli_query($conn,$queryloc) or die(mysqli_query($conn,));
?>
<select name='center2[]' id='center2<?php echo $id ?>' onchange='cor_other2(<?php echo $id ?>);calc("calculation.php",<?php echo $id ?>);other(document.getElementById("center2<?php echo $id ?>"),document.getElementById("other2<?php echo $id ?>"));' style="width:100px;">
<option value="">Select</option>
<?php
while($num=mysqli_fetch_array($resultloc))
{
if($num[location]=="S.Extn")
{
echo"<option value='".$num[recNo]."' ";
if($dbObject->getDbField('center2')==$num[recNo])
{
echo"selected";
}
echo">South Extension</option>";
}
else
{
echo"<option value='".$num[recNo]."' ";
if($dbObject->getDbField('center2')==$num[recNo])
{
echo"selected";
}
echo">".$num[location]."</option>";
}
}
?>
<option value="Training">Training</option>
<?php
if($numUser['actual_exp']=="Y")
{
?>
<option value="Actual Exp.">Actual Exp.</option>
<?php
}
?>
<option value="Other">Other</option>
</select>
<br>
<input type='text' name='other2[]' id='other2<?php echo $id ?>' value="<?php echo $dbObject->getDbField('other2');?>" style="display:none;" size='10' maxlength='10'>
</td>
<td valign="top">
<input type='text' name='km2[]' id='km2<?php echo $id ?>' onkeyup='calc("calculation.php",<?php echo $id ?>);' value="<?php echo $dbObject->getDbField('km2');?>" size='3' maxlength='10' readonly>
</td>
<td valign="top"><?php
$queryloc="select * from timesheet_location order by location";
$resultloc=mysqli_query($conn,$queryloc) or die(mysqli_query($conn,));
?>
<select name='center3[]' id='center3<?php echo $id ?>' onchange='cor_other3(<?php echo $id ?>);calc("calculation.php",<?php echo $id ?>);other(document.getElementById("center3<?php echo $id ?>"),document.getElementById("other3<?php echo $id ?>"));' style="width:100px;">
<option value="">Select</option>
<?php
while($num=mysqli_fetch_array($resultloc))
{
if($num[location]=="S.Extn")
{
echo"<option value='".$num[recNo]."' ";
if($dbObject->getDbField('center3')==$num[recNo])
{
echo"selected";
}
echo">South Extension</option>";
}
else
{
echo"<option value='".$num[recNo]."' ";
if($dbObject->getDbField('center3')==$num[recNo])
{
echo"selected";
}
echo">".$num[location]."</option>";
}
}
?>
<option value="Training">Training</option>
<?php
if($numUser['actual_exp']=="Y")
{
?>
<option value="Actual Exp.">Actual Exp.</option>
<?php
}
?>
<option value="Other">Other</option>
</select>
<br>
<input type='text' name='other3[]' id='other3<?php echo $id ?>' value="<?php echo $dbObject->getDbField('other3');?>" style="display:none;" size='10' maxlength='10'>
</td>
<td valign="top">
<input type='text' name='km3[]' id='km3<?php echo $id ?>' onkeyup='calc("calculation.php",<?php echo $id ?>);' value="<?php echo $dbObject->getDbField('km3');?>" size='3' maxlength='10' readonly>
</td>
<td><?php
$queryloc="select * from timesheet_location order by location";
$resultloc=mysqli_query($conn,$queryloc) or die(mysqli_query($conn,));
?>
<select name='center4[]' id='center4<?php echo $id ?>' onchange='cor_other4(<?php echo $id ?>);calc("calculation.php",<?php echo $id ?>);other(document.getElementById("center4<?php echo $id ?>"),document.getElementById("other4<?php echo $id ?>"));' style="width:100px;">
<option value="">Select</option>
<?php
while($num=mysqli_fetch_array($resultloc))
{
if($num[location]=="S.Extn")
{
echo"<option value='".$num[recNo]."' ";
if($dbObject->getDbField('center4')==$num[recNo])
{
echo"selected";
}
echo">South Extension</option>";
}
else
{
echo"<option value='".$num[recNo]."' ";
if($dbObject->getDbField('center4')==$num[recNo])
{
echo"selected";
}
echo">".$num[location]."</option>";
}
}
?>
<option value="Training">Training</option>
<?php
if($numUser['actual_exp']=="Y")
{
?>
<option value="Actual Exp.">Actual Exp.</option>
<?php
}
?>
<option value="Other">Other</option>
</select>
<br>
<input type='text' name='other4[]' id='other4<?php echo $id ?>' value="<?php echo $dbObject->getDbField('other4');?>" style="display:none;" size='10' maxlength='15'>
</td>
<td valign="top">
<input type='text' name='km4[]' id='km4<?php echo $id ?>' onkeyup='calc("calculation.php",<?php echo $id ?>);' value="<?php echo $dbObject->getDbField('km4');?>" size='3' maxlength='10' readonly>
</td>
<td valign="top"><input type='text' name='center5[]' id='center5<?php echo $id ?>' value="<?php echo $dbObject->getDbField('center5');?>" size='4' maxlength='10' readonly> </td>
<td valign="top">
<input type='text' name='km5[]' id='km5<?php echo $id ?>' onkeyup='calc("calculation.php",<?php echo $id ?>);' value="<?php echo $dbObject->getDbField('km5');?>" size='3' maxlength='10' readonly>
</td>
<td valign="top"><input type='text' name='totalkms[]' id='totalkms<?php echo $id ?>' value="<?php echo $dbObject->getDbField('totalkms');?>" size='3' maxlength='11' readonly> </td>
<td valign="top"><input type='text' name='Band[]' id='Band<?php echo $id ?>' value="<?php echo $dbObject->getDbField('Band');?>" size='3' maxlength='100' readonly> </td>
<td valign="top"><input type='text' name='total[]' id='total<?php echo $id ?>' value="<?php echo $dbObject->getDbField('total');?>" size='3' maxlength='11' class="net_tot" onkeyup="gtotal();" readonly> </td>
<td valign="top"><input type='text' name='remarks[]' id='remarks<?php echo $id ?>' value="<?php echo $dbObject->getDbField('remarks');?>" size='10' maxlength='50' > </td>
<td valign="top">
<a href='javascript: if(confirm("Are You Sure?")) { removeElement("myDiv","my<?php echo $id; ?>myDiv"); }'><img src="images/delete.png" style="border:none;" alt="Delete this record" title="Delete this record"/></a>
</td>