0) { EXTRACT($_POST); } // print "
POST:"; // print_r($_POST); $ct2 = count($de_f); for($i2 = 0;$i2 < $ct2;$i2++){ $sql_de = "UPDATE awara_ukeire.data SET del_flag = true WHERE no = " .$de_f[$i2]; $res_de = pg_query($conn,$sql_de); } } $sql_v = "SELECT * FROM awara_ukeire.data WHERE del_flag ='false' ORDER BY delivery_date DESC,delivery_time DESC;"; $res_v = pg_query($conn,$sql_v); $ct_v = pg_num_rows($res_v); //配合名の取得(配合一覧表) $sel_c = "SELECT * FROM awara.material ORDER BY material_id"; $res_c = pg_query($conn,$sel_c); $ct_c = pg_num_rows($res_c); //$combi_name_ = explode(" " ,$row_cm['combi_name']; //$combi_name = str_replace(' ', '
', $row_cm['combi_name']); */ EXTRACT($_GET); //■削除処理 if($del) { $DelSql = "UPDATE inspection_record SET "; $DelSql .= "del_flag = 'TRUE' "; $DelSql .= " WHERE id IN (" .$del .");"; if (!($resDelSql = pg_query($conn, $DelSql))) { print pg_last_error() ."
"; // throw new Exception("データ取得に失敗
". $DelArea. "
". pg_last_error(). "
"); } } //■確認処理 if($chk) { // print "chk==" .$chk; //現在の確認状況を取得 $sql_ch = "SELECT * FROM inspection_record WHERE id = " .$chk ." AND del_flag ='false' ;"; $res_ch = pg_query($conn,$sql_ch); $row_ch = pg_fetch_array($res_ch,0); //print $row_ch['chk_flag'] ."
"; $chk_flag = ($row_ch['chk_flag'] == 'f') ? "true" : "false"; $sql_chup = "UPDATE inspection_record SET "; $sql_chup .= "confirmer = '" .$conf ."', "; $sql_chup .= "implementation_date = '" .$imp ."',"; $sql_chup .= "memo = '" .$memo ."',"; $sql_chup .= "chk_flag = '" .$chk_flag ."' "; $sql_chup .= " WHERE id = " .$chk .";"; if (!($res_chup = pg_query($conn, $sql_chup ))) { // print pg_last_error() ."
"; // throw new Exception("データ取得に失敗
". $DelArea. "
". pg_last_error(). "
"); } } //print_r($_GET); //■ダウンロード処理 if($file_dl) { //データidの分割 $id_ = explode(",",$file_dl); $id_count_ = count($id_); //print $id_count_; for($k = 0;$k < $id_count_ ;$k++) { // print $id_[$k] ."
"; //zip用ファイルの初期化(削除) deleteData($zip_dir); //ZIP用のフォルダの作成 $zip_sub_dir = $zip_dir.$id_[$k]; mkdir($zip_sub_dir , 0777); $zip_sub_dir_rec = $zip_sub_dir ."/record/"; $zip_sub_dir_pict = $zip_sub_dir ."/pict/"; mkdir($zip_sub_dir_rec , 0777); mkdir($zip_sub_dir_pict , 0777); //対象ファイルをコピー $cmd_1 = "cp -a " .$record_dir .$id_[$k] ."_*" ." " .$zip_sub_dir_rec; $cmd_2 = "cp -a " .$pict_dir .$id_[$k] ."_*" ." " .$zip_sub_dir_pict; exec($cmd_1); exec($cmd_2); } //zipの作成 $file_name_date = date("YmdHis" ,time()); $zip_path = $zip_dir .$file_name_date .".zip"; //$zip_path = $id_[$k] .".zip"; //print $zip_path; $cmd_3 = "zip -r " .$zip_path ." /geye/*"; exec($cmd_3); print $cmd_3 ; $file_name = $file_name_date .".zip"; //exit; header('Location: http://penta-02.ptgw.net/geye/download.php?u=3&f=' .$file_name ); } $sql_v = "SELECT * FROM inspection_record WHERE del_flag ='false' ORDER BY id DESC;"; $res_v = pg_query($conn,$sql_v); $ct_v = pg_num_rows($res_v); //$row[chk] = "未確認"; //print_r($_POST); //print_r($_GET); print "
"; print ""; print "
"; print "チェック項目の "; print ""; //print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; //$test = date("Y/m/d H:i",time()); for($i = 0 ;$i < $ct_v;$i++) { print ""; $row = pg_fetch_array($res_v,$i); $no = $row[0]; $scheduled_date = date("Y-m-d" ,strtotime($row[1])) ."
" .date("H:i" ,strtotime($row[1])); $place = $row[2]; $construction = $row[3]; $inspection_name = $row[4]; $supervision_engineer = $row[5]; $confirmer = $row[6]; $implementation_date = ($row[7]) ? date("Y-m-d" ,strtotime($row[7])) : ""; $record = explode(",",$row[8]); $record_ct = count($record); $pict = explode(",",$row[9]); $pict_ct = count($pict); //print $pict[0] ."
"; $memo = $row[10]; $updatetime = $row[11]; $regdatetime = $row[12]; $chk_flag = ($row[13] === f) ? '--------':'確認済'; //確認者・実施日のテキストボックスの有効/無効切り替え $disabled = ($row[13] === f) ? "":"disabled='disabled'"; print ""; print ""; print ""; print ""; print ""; print ""; //確認者 実施日 print ""; print ""; print ""; print ""; print ""; //写真の表示 print ""; print ""; //print ""; print ""; } print "
CBNo確認希望日場所工種検査項目管理技術者確認者実施日調書写真記事
" .$no ."" .$scheduled_date ."" .$place ." " .$construction ." " .$inspection_name ." " .$supervision_engineer ." "; //調書 for($cp = 0 ;$cp < $record_ct;$cp++) { if($record[$cp]) { $record_name = $record[$cp]; $record_name_v = explode("_",$record[$cp]); if (file_exists($record_dir .$record_name)) { print "" .$record_name_v[2] ."" ."  "; print "
"; } } } print " 
"; for($cp = 0 ;$cp < $pict_ct;$cp++) { if($pict[$cp]) { if (file_exists($pict_dir .$pict[$cp])) { $thum_name = "inspection/pict_s/" .str_replace("." ,"_s." ,$pict[$cp]); //print $thum_name ."
"; $pict_name = $pict[$cp]; print "" .$pict_name .""; print "  "; } } } print " 
" .$memo ." 
"; ?>