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