21,887
社区成员
发帖
与我相关
我的任务
分享
<td style="text-align:center;font-size:14px;"><input type="radio" name="<?php echo $_values;?>" value="正常" style="zoom:150%;" />正常
<input type="radio" name="<?php echo $_values;?>" value="不正常" style="zoom:150%;" />不正常</td>
<form name="ksdj" method="post" action="cldj.php">
<table>
<tr><th colspan=7>开始点检</th></tr>
<tr><td colspan=3 style="font-weight:bold;text-align:center;">车辆选择:<select name="hao1"> <?php
while (!!$_rows = _fetch_array_list($_result)){ ?>
<option value="<?php echo $_rows['hao'];?>"> <?php echo $_rows['hao'];?></option> <?}?></select>
</td>
<td colspan=1 style="font-size:16px;font-weight:bold;text-align:center;">工号:<?php echo $_COOKIE["name"]; ?></td>
<td colspan=1 style="font-size:16px;font-weight:bold;text-align:center;">日期:<?php echo date('Y-m-d',time()); ?>
<input name="time" type="hidden" value="<?php echo date('Ymd',time());?>"/>
</td></tr>
<tr><td style="font-weight:bold;text-align:center;">编号</td>
<td style="font-weight:bold;text-align:center;">点检项目</td>
<td style="font-weight:bold;text-align:center;">点检方法</td>
<td style="font-weight:bold;text-align:center;">点检标准</td>
<td style="font-weight:bold;text-align:center;">状 态</td>
</tr>
<?php
while (!!$_rows = _fetch_array_list($_result2)){
?>
<tr><td style="width:6%;text-align:center;font-size:14px;"><?php echo $_rows['bh'];?>
<input name="bh[]" type="hidden" value="<?php echo $_rows['bh'];?>"/>
</td><?php $_values=$_rows['bh'];?>
<td style="width:20%;text-align:center;font-size:14px;"><?php echo $_rows['xm']?>
<input name="xm[]" type="hidden" value="<?php echo $_rows['xm'];?>"/>
</td>
<td style="width:12%;text-align:center;font-size:14px;"><?php echo $_rows['fangfa']?>
<input name="fangfa[]" type="hidden" value="<?php echo $_rows['fangfa'];?>"/>
</td>
<td style="width:44%;text-indent:10px;font-size:14px;"><?php echo $_rows['biaozhun']?>
<input name="biaozhun[]" type="hidden" value="<?php echo $_rows['biaozhun'];?>"/>
</td>
<td style="text-align:center;font-size:14px;"><input type="radio" name="<?php echo $_values;?>" value="正常" style="zoom:150%;" />正常
<input type="radio" name="<?php echo $_values;?>" value="不正常" style="zoom:150%;" />不正常</td>
</tr>
<?php
}?>
<tr><td colspan=6 style="text-align:center;">
<input type="submit" name="send" class="ksdj" value="提交" style=font-size:18px;/>
<input type="reset" class="reset" value="重置" /></td></tr>
</table>
</form>
<?php
header("Content-type: text/html; charset=utf-8");
require ('common.php');
$hh=$_POST['hao1'];
$aa=$_POST['bh'];
$bb=$_POST['xm'];
$cc=$_POST['fangfa'];
$dd=$_POST['biaozhun'];
$_gh=$_COOKIE["name"];
$_time=$_POST['time'];
$name=implode(_fetch_array_list(mysql_query("SELECT name FROM jsy WHERE gonghao = $_gh")));
if (is_array($aa)){
foreach ($aa as $i=>$v){
mysql_query("INSERT INTO djjl (hao,bh,xm,fangfa,biaozhun,gonghao,name,time,zt) VALUES (
'$hh',
'$v',
'{$bb[$i]}',
'{$cc[$i]}',
'{$dd[$i]}',
'$_gh',
'$name',
'$_time'
)" )or die('SQL执行失败!'.mysql_error());}}
mysql_close();
_alert_location('添加成功!','ksdj.php');
?>