強制PHP

来源:互联网 发布:中国地图编辑软件 编辑:程序博客网 时间:2024/06/15 19:21


<!--/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */-->
<html>
    <head>
        <title>強制返却処理</title>
    </head>
    <body>
<?php
//データベースのインスタンス名を指定
$serverName = "192.168.10.31";
//接続情報を指定
$connectionInfo = array("UID"=>"nbs",
                "PWD"=>"basicnew",
                "Database"=>"crownjewel_dev",
                "CharacterSet"=>"UTF-8");
//コネクションを確立
$conn = sqlsrv_connect($serverName, $connectionInfo);
//クエリー文を指定
$tsql = "select T_draft1.mannum,T_draft1.customer_name,syupin_irai2.kaitori_no
from [dbo].[T_draft1] T_draft1,[dbo].[syupin_irai2] syupin_irai2
where T_draft1.touroku_date <=dateadd(day,-19,getdate())
and status_cd = 1
and syupin_irai2.kaitori_no = T_draft1.kaitori_no
and syupin_irai2.location_no = ''
and not (T_draft1.kaitori_no='')
and T_draft1.kaitori_no is not null
group by T_draft1.customer_name,T_draft1.mannum,syupin_irai2.kaitori_no,T_draft1.touroku_date
order by T_draft1.touroku_date asc";
//クエリーを実行
$result = sqlsrv_query($conn, $tsql);
?>
  <table>
<caption>強制返却候補</caption>
<?php
    //実行結果を描画
    while($row = sqlsrv_fetch_array($result)) {
         printf("<tr><td class='hdr'>".$row['mannum']."</td>");
         printf("<td>".$row['customer_name']."</td>");
         printf("<td>".$row['kaitori_no']."</td></tr>");
    }
?>
</table>
<?php
//クエリー結果の開放
sqlsrv_free_stmt($result);
//コネクションのクローズ
sqlsrv_close($conn);
?>


<?php
//値の受信
if(isset($_GET['checked1'])){
 $checked1 = 1; 
 echo 'test1';
}else{
 $checked1 = 0;
 echo '空'; 
}
?>
        


        <form method="get" action="forcedReturn.php">
<?php if($checked1 == "1"){ ?>
 <label><input name="checked1" type="checkbox" checked="checked" value="1" >AAA</label>
<?php }else{ ?>
 <label><input name="checked1" type="checkbox" value="1" >AAA</label>
<?php } ?>


 
<button type="submit">Submit</button>
 
</form>
    </body>
</html>

原创粉丝点击