DUT003.php 3.39 KB
<?php 

//*****************************************************************************

//* 

//* プログラム名:当番表

//* プログラムID:DUT003.php

//* 機能        :削除確認画面

//* 作成者      :

//* 

//*****************************************************************************



header("Content-type: text/html; charset=EUC-JP");

include("include/session_start.inc");

include("include/SessionChk.inc");

include('include/smarty.conf');



include("inc/header.inc");

//include("inc/input_chk.inc");

//include("inc/DUT003.inc");



//メニューセット

//include("menu_opacity.php");

$strDBinc="include/dbcon.inc";

include($strDBinc);



	//データ取得

	$strSQL="";

	$objRecSet="null";

	$Data="null";

	$strSQL="Select toban_no,syain_cd,touban_st_date,touban_ed_date,".

			"touban_st_time,touban_ed_time,touban_contents From touban_tbl WHERE seq=$intsts";

	$objRecSet = pg_exec($strSQL);

	if($objRecSet==false){

		echo("SQL実行に失敗しました(SELECT)");

		exit;

	}

	$Data = pg_fetch_object($objRecSet, 0);

	$intTouban=$Data->toban_no;

	$strJyoken=substr($Data->syain_cd,1);

	

	$strContents=$Data->touban_contents;

	//開始日

	list($touban_st_year,$touban_st_mon,$touban_st_day)=split("/",$Data->touban_st_date);

	$touban_date=$touban_st_year."年".$touban_st_mon."月".$touban_st_day."日";

	//終了日

	if ($Data->touban_st_date != $Data->touban_ed_date){

			list($touban_ed_year,$touban_ed_mon,$touban_ed_day)=split("/",$Data->touban_ed_date);

			$touban_date=$touban_date." 〜 ".$touban_ed_year."年".$touban_ed_mon."月".$touban_ed_day."日";

	}

	//開始時刻

	if ($Data->touban_st_time != ""){

			list($touban_st_hour,$touban_st_mini)=split(":", $Data->touban_st_time);

			$touban_time=$touban_st_hour."時".$touban_st_mini."分";

	}

	//終了時刻

	if ($Data->touban_ed_time != ""){

			list($touban_ed_hour,$touban_ed_mini)=split(":", $Data->touban_ed_time);

			$touban_time=$touban_time." 〜 ".$touban_ed_hour."時".$touban_ed_mini."分";

	}

	//当番名取得

	$strSQL="";

	$objRecSet="null";

	$Data="null";

	$strSQL="Select touban_name From mst_touban WHERE seq=$intTouban";

	$objRecSet = pg_exec($strSQL);

	if($objRecSet==false){

			echo("SQL実行に失敗しました(SELECT)");

			exit;

	}

	$Data = pg_fetch_object($objRecSet, 0);

	$strtoban=$Data->touban_name;



	//<!--入力フォーム-->

	$strJyoken=str_replace("/","' or syain_cd='",$strJyoken);

	$strSQLSyain="SELECT syain_cd,name_kj_sei,name_kj_mei FROM syain_tbl ".

						"Where syain_cd=" . "'" .$strJyoken ."'" .

						" Order by disp_rank";

	$objRecData = pg_exec($strSQLSyain);

	if($objRecData==false){

			echo("SQL実行に失敗しました(SELECT)");

			exit;

	}

	$tantousya="";

	for ($intlist = 0; $intlist < pg_numrows($objRecData); $intlist++) {

			$objlist = pg_fetch_object($objRecData, $intlist);

			$tantousya.= $objlist->name_kj_sei.$objlist->name_kj_mei."<BR>";

	}



	if ($touban_time != "" ){

			$touban_time= $touban_time;

	}else{

			$touban_time= "指定なし";

	}



$o_smarty->assign('tantoukoumoku',$strtoban);



$o_smarty->assign('tantousya',$strContents);

$o_smarty->assign('day',$touban_date);

$o_smarty->assign('time',$touban_time);

$o_smarty->assign('naiyou',$strContents);

$o_smarty->assign('tantousya',$tantousya);



$o_smarty->assign('intsts',$intsts);

$o_smarty->assign('strkijyundate',$strkijyundate);



$o_smarty->display('DUT003.tpl');











?>

<input type="hidden" name="strkijyundate" value=<?php  echo $strkijyundate; ?>>