首页 >社区问答列表 >需要大神帮个忙!

需要大神帮个忙!


<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<?php include("../Aconn.php");?>

<style type="text/css">

table{

border-spacing: 0;

border-collapse: collapse;

text-align:center;

}

#nr td,#nr2 td,#nr2 th{border:1px  #000000 solid;}

#nr3 td,#nr3 th{border:1px  #000000 solid;}

body{background-color:#FFFFFF;}

.mytable{color:#ffffff;}

select,input{font-size:16px;}

#nr,#nr2{font-size:25px;}

#nr3{font-size:20px;}

.kuan{width:150px;height:35px;background-color:#E3E3E3;}

.kuan2{width:230;height:35px ;background-color:#E3E3E3;}

.zjtd1{background-color:#E3E3E3; width:150px;height:35px ;}

.zjtd{background-color:; width:150px;height:35px ;}

.zjtd3{background-color:#E3E3E3;height:35px ;width:150px}

.beizhu{width:150px;height:35px;border:0px}

#nr2 td{width:230px;}

#nr3 td{width:200px;}

</style>

<center>

<?php

date_default_timezone_set('Asia/Shanghai');//Asia/Shanghai

$sj=date("Y-m-d");//取得当前日期

$gq=0;

$bb=0;

if(!empty($_POST['sj'])){

$sj=$_POST['sj'];

//$sj="$sj[6]"."$sj[7]"."$sj[8]"."$sj[9]"."-"."$sj[0]"."$sj[1]"."-"."$sj[3]"."$sj[4]";

}

if(!empty($_POST['gq'])){

$gq=$_POST['gq'];

}

if(!empty($_POST['bb'])){

$bb=$_POST['bb'];

}

//echo"<p>$sj,&nbsp;&nbsp;$gq,&nbsp;&nbsp;";

$sql=mysql_query("select * from $bb where gq='$gq' and sj like'$sj%' order by id desc ");

$info=mysql_fetch_array($sql);

if($info==false){

//echo"<p>$array</p>";

echo "<div align='center'>对不起,没有查询到当前日期的报表!</div>";

}

elseif($bb=='zj_fzb'){

$sqlfzb=mysql_query("select * from zj_fzb inner join zj_fzb_lif on(zj_fzb.sj=zj_fzb_lif.sj and zj_fzb.gq = zj_fzb_lif.gq) where zj_fzb.gq='$gq' and zj_fzb.sj like '$sj%' order by zj_fzb.id desc limit 1"); 

//echo $sqlfzb;

$info=mysql_fetch_array($sqlfzb);

?>

<table  width=920><tr>

<td style="text-align:left" width="230">查询时间:<?php echo $sj;?></td>

<td width="230">查询工区:<?php echo $gq;?></td>

<td width="230">查询报表:<?php echo "分子比";?></td>

<td style="text-align:right" width="230">填表时间:<?php echo $info[1];?></td>

</tr></table>

<table   id="nr" algin=center>

<tr>

<td class="kuan" colspan="1" rowspan="1" align="center">A系列工区</td>

<td class="kuan" colspan="7" rowspan="1" align="center">时间</td>

</tr>

<tr>

<td class="kuan" colspan="1" rowspan="1" align="center">槽号</td>


<td><input type="text" name="sj" class="laydate-icon"  id="demo" value="<?php echo date("Y-m-d")?>"  class="userData" onclick="laydate()" style="cursor: hand;" onpropertychange="document.getElementById('canshu').submit();"/>

<input type="submit" value="查询" />

<input type="reset" value="重置" /></td>

<td><input type="text" name="sj1" class="laydate-icon"  id="demo" value="<?php echo date("Y-m-d")?>"  class="userData" onclick="laydate()" style="cursor: hand;" onpropertychange="document.getElementById('canshu').submit();"/>

<input type="submit" value="查询" />

<input type="reset" value="重置" /></td>

<td><input type="text" name="sj2" class="laydate-icon"  id="demo" value="<?php echo date("Y-m-d")?>"  class="userData" onclick="laydate()" style="cursor: hand;" onpropertychange="document.getElementById('canshu').submit();"/>

<input type="submit" value="查询" />

<input type="reset" value="重置" /></td>

<td><input type="text" name="sj3" class="laydate-icon"  id="demo" value="<?php echo date("Y-m-d")?>"  class="userData" onclick="laydate()" style="cursor: hand;" onpropertychange="document.getElementById('canshu').submit();"/>

<input type="submit" value="查询" />

<input type="reset" value="重置" /></td>

<td><input type="text" name="sj4" class="laydate-icon"  id="demo" value="<?php echo date("Y-m-d")?>"  class="userData" onclick="laydate()" style="cursor: hand;" onpropertychange="document.getElementById('canshu').submit();"/>

<input type="submit" value="查询" />

<input type="reset" value="重置" /></td>

<td><input type="text" name="sj5" class="laydate-icon"  id="demo" value="<?php echo date("Y-m-d")?>"  class="userData" onclick="laydate()" style="cursor: hand;" onpropertychange="document.getElementById('canshu').submit();"/>

<input type="submit" value="查询" />

<input type="reset" value="重置" /></td>

<td><input type="text" name="sj6" class="laydate-icon"  id="demo" value="<?php echo date("Y-m-d")?>"  class="userData" onclick="laydate()" style="cursor: hand;" onpropertychange="document.getElementById('canshu').submit();"/>

<input type="submit" value="查询" />

<input type="reset" value="重置" /></td>

</tr>

<tr>

<td class="zjtd"><?php echo $info['fzb11'];?></td>

<td class="zjtd"><?php echo $info['fzb12'];?></td>

<td></td>

<td></td>

<td></td>

<td></td>

<td></td>

</tr>



<tr>

<td class="zjtd"><?php echo $info['fzb21'];?></td>

<td class="zjtd"><?php echo $info['fzb22'];?></td>

<td></td>

<td></td>

<td></td>

<td></td>

<td></td>

</tr>





</table>

</center>

<?php

}

输出来是这个表格,需要大神帮我编个码,需要点击时间查询就出对应槽号的数据,如果没有数据就空着。小弟多谢了!11111.bmp

 

  • YoOl风
  • YoOl风    2019-08-07 15:52:231楼

    时间代码也不知道哪里不对,没有日期选择呢!123.png,理想中应该都是这样的,但是放到里面就是不出选择日期这个框!大神求助啊!

    +0添加回复

  • 回复

    JS没有执行吗 浏览器控制台看JS错误

    秋香姐家的小书童 · 2019-08-07 17:29:09
    回复
第八期线上培训班