CON006_3.php 6.66 KB
<?php 
//*****************************************************************************
//* 
//* プログラム名:電子決裁設定
//* プログラムID:CON006_3
//* 機能        :
//* 作成者      :
//* 
//*****************************************************************************

header("Content-type: text/html; charset=EUC-JP");
include("include/session_start.inc");
include("include/SessionChk.inc");
include("include/dbcon.inc");
include("include/input_chk.inc");
include("inc/CON006_3.inc");
$sinsei_name = addslashes($sinsei_name);
	$strTypeArray=split("<///>",$sinsei_name);
	$strSinseiType=$strTypeArray[0];
	$strTypeName=$strTypeArray[1];

	//社員情報取得
	$strSQLSyain = "SELECT syain_cd,name_kj_sei,name_kj_mei FROM syain_tbl WHERE del_flg=true Order by disp_rank" ;
	$rsRecSyain = pg_exec($pg_con,$strSQLSyain);
	if($rsRecSyain==false){
		echo("SQL実行に失敗しました(SELECT)");
		exit;
	}

//メニュー
include("menu_opacity.php");

?>
<form name="e_gru">
<?php  if ($PHP_BIT[0]==1){ ?>
<table width="100%" border="0" cellspacing="0">
	<tr>
		<td class="midashi">
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<th width="50%" scope="col"><div align="left"><img src="image/t_kanri.gif" border="0"> 電子決裁設定</div></th>
					<th width="50%" scope="col"><div align="right"><a href='javascript:Disp_Help("CON006HLP.htm")'><img src="image/help.gif" border="0"></a> <a href='javascript:Disp_Help("CON006HLP.htm")'>ヘルプ</a></div></th>
				</tr>
			</table>
			<div align="right"></div>
		</td>
	</tr>
</table>
<br>
<span class="Normalfont"><?php  echo htmlspecialchars($strTypeName)."の決裁者設定" ?></span><br>
<table width="402" border="0" cellspacing="1" cellpadding="1" bgcolor="#9999ff">
	<tr><td>
	<table cellspacing="1" cellpadding="1" width="400" border="0">
		<TR bgcolor="#ffffff">
			<TD width="100" bgcolor="#ccccff"><span class="Normalfont">第一次決済者</span></TD>
			<TD>
			<SELECT name="syain_cd1">
			<OPTION value="">-----</OPTION>
<?php 
	for ($intCnt = 0; $intCnt < pg_numrows($rsRecSyain); $intCnt++) {
		//決裁者情報取得
		$strSQL = "SELECT kessaisya_cd1 FROM kessaisya_tbl WHERE sinsei_syubetu=".$strSinseiType." AND kessaisya_cd1='".pg_result($rsRecSyain,$intCnt,"syain_cd")."'";
		$rsRecKessai = pg_exec($pg_con,$strSQL);
		if($rsRecKessai==false){
			echo("SQL実行に失敗しました(SELECT)");
			exit;
		}
		if (pg_numrows($rsRecKessai)==1) {
			$strChk=" selected";
		}else{
			$strChk="";
		}
		echo "			<OPTION value=\"".pg_result($rsRecSyain,$intCnt,"syain_cd")."\"".$strChk.">". pg_result($rsRecSyain,$intCnt,"name_kj_sei").pg_result($rsRecSyain,$intCnt,"name_kj_mei")."</OPTION>\n";
	}
?>
			</SELECT>
			</TD>
		</TR>
		<TR bgcolor="#ffffff">
			<TD width="100" bgcolor="#ccccff"><span class="Normalfont">第二次決済者</span></TD>
			<TD>
			<SELECT name="syain_cd2">
			<OPTION value="">-----</OPTION>
<?php 
	for ($intCnt = 0; $intCnt < pg_numrows($rsRecSyain); $intCnt++) {
		//決裁者情報取得
		$strSQL = "SELECT kessaisya_cd2 FROM kessaisya_tbl WHERE sinsei_syubetu=".$strSinseiType." AND kessaisya_cd2='".pg_result($rsRecSyain,$intCnt,"syain_cd")."'";
		$rsRecKessai = pg_exec($pg_con,$strSQL);
		if($rsRecKessai==false){
			echo("SQL実行に失敗しました(SELECT)");
			exit;
		}
		if (pg_numrows($rsRecKessai)==1) {
			$strChk=" selected";
		}else{
			$strChk="";
		}
		echo "			<OPTION value=\"".pg_result($rsRecSyain,$intCnt,"syain_cd")."\"".$strChk.">". pg_result($rsRecSyain,$intCnt,"name_kj_sei").pg_result($rsRecSyain,$intCnt,"name_kj_mei")."</OPTION>\n";
	}
?>
			</SELECT>
			</TD>
		</TR>
		<TR bgcolor="#ffffff">
			<TD width="100" bgcolor="#ccccff"><span class="Normalfont">第三次決済者</span></TD>
			<TD>
			<SELECT name="syain_cd3">
			<OPTION value="">-----</OPTION>
<?php 
	for ($intCnt = 0; $intCnt < pg_numrows($rsRecSyain); $intCnt++) {
		//決裁者情報取得
		$strSQL = "SELECT kessaisya_cd3 FROM kessaisya_tbl WHERE sinsei_syubetu=".$strSinseiType." AND kessaisya_cd3='".pg_result($rsRecSyain,$intCnt,"syain_cd")."'";
		$rsRecKessai = pg_exec($pg_con,$strSQL);
		if($rsRecKessai==false){
			echo("SQL実行に失敗しました(SELECT)");
			exit;
		}
		if (pg_numrows($rsRecKessai)==1) {
			$strChk=" selected";
		}else{
			$strChk="";
		}
		echo "			<OPTION value=\"".pg_result($rsRecSyain,$intCnt,"syain_cd")."\"".$strChk.">". pg_result($rsRecSyain,$intCnt,"name_kj_sei").pg_result($rsRecSyain,$intCnt,"name_kj_mei")."</OPTION>\n";
	}
?>
			</SELECT>
			</TD>
		</TR>
		<TR bgcolor="#ffffff">
			<TD width="100" bgcolor="#ccccff"><span class="Normalfont">第四次決済者</span></TD>
			<TD>
			<SELECT name="syain_cd4">
			<OPTION value="">-----</OPTION>
<?php 
	for ($intCnt = 0; $intCnt < pg_numrows($rsRecSyain); $intCnt++) {
		//決裁者情報取得
		$strSQL = "SELECT kessaisya_cd4 FROM kessaisya_tbl WHERE sinsei_syubetu=".$strSinseiType." AND kessaisya_cd4='".pg_result($rsRecSyain,$intCnt,"syain_cd")."'";
		$rsRecKessai = pg_exec($pg_con,$strSQL);
		if($rsRecKessai==false){
			echo("SQL実行に失敗しました(SELECT)");
			exit;
		}
		if (pg_numrows($rsRecKessai)==1) {
			$strChk=" selected";
		}else{
			$strChk="";
		}
		echo "			<OPTION value=\"".pg_result($rsRecSyain,$intCnt,"syain_cd")."\"".$strChk.">". pg_result($rsRecSyain,$intCnt,"name_kj_sei").pg_result($rsRecSyain,$intCnt,"name_kj_mei")."</OPTION>\n";
	}
?>
			</SELECT>
			</TD>
		</TR>
		<TR bgcolor="#ffffff">
			<TD width="100" bgcolor="#ccccff"><span class="Normalfont">第五次決済者</span></TD>
			<TD>
			<SELECT name="syain_cd5">
			<OPTION value="">-----</OPTION>
<?php 
	for ($intCnt = 0; $intCnt < pg_numrows($rsRecSyain); $intCnt++) {
		//決裁者情報取得
		$strSQL = "SELECT kessaisya_cd5 FROM kessaisya_tbl WHERE sinsei_syubetu=".$strSinseiType." AND kessaisya_cd5='".pg_result($rsRecSyain,$intCnt,"syain_cd")."'";
		$rsRecKessai = pg_exec($pg_con,$strSQL);
		if($rsRecKessai==false){
			echo("SQL実行に失敗しました(SELECT)");
			exit;
		}
		if (pg_numrows($rsRecKessai)==1) {
			$strChk=" selected";
		}else{
			$strChk="";
		}
		echo "			<OPTION value=\"".pg_result($rsRecSyain,$intCnt,"syain_cd")."\"".$strChk.">". pg_result($rsRecSyain,$intCnt,"name_kj_sei").pg_result($rsRecSyain,$intCnt,"name_kj_mei")."</OPTION>\n";
	}
?>
			</SELECT>
			</TD>
		</TR>
	</table>
	</td></tr>
</table>
<table width="402" border="0" cellspacing="0" cellpadding="0">
	<TR>
	<TD height="40" width="402" align="center"><INPUT type="button"  onclick="return chk();" value=" 設 定 " name="set"> <INPUT type="button" onclick="return back();" value=" 戻 る " name="modoru"></TD>
	</TR>
</table>
<br>
<hr width="100%">
<input type="hidden" name="sinsei_type" value="<?php echo $strSinseiType?>">
<?php  }else{ ?>
  <a href="TOP000.php"><span class="Normalfont">マスタ変更権限がありません</span></a>
<?php  } ?>
</form>
<?php 
//コピーライト
include("include/copyright.inc");
?>