I need a favor from God!
YoOl风
YoOl风 2019-08-07 15:50:13
0
2
1051

<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,  $gq,  ";

$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">Query time:<?php echo $sj;?></td>

<td width="230">Query work area:<?php echo $gq;?></td>

<td width="230"> ;Query report:<?php echo "numerator ratio";?></td>

<td style="text-align:right" width="230">Time to fill in the form :<?php echo $info[1];?></td>

</tr></table>

<table id="nr" algin=center>

<tr>

<td class="kuan" colspan="1" rowspan="1" align="center">A series Work area</td>

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

< ;/tr>

<tr>

<td class="kuan" colspan="1" rowspan="1" align="center">Slot number </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="Query" />

<input type="reset" value="Reset" / ></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="Query" />

<input type="reset" value="Reset" />< /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

}

The output is this form. I need a master to help me code it. I need to click on the time query to get the corresponding The data of the slot number will be empty if there is no data. Thank you very much, brother!

11111.bmp

YoOl风
YoOl风

reply all(1)
YoOl风

I don’t know what’s wrong with the time code, there is no date selection! 123.png, ideally it should be like this, but when I put it in, there is no box to select the date! God help me!

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!