CON162_1.php 4.71 KB
<?php 
//*****************************************************************************
//* 
//* プログラム名:簡易在席名入力画面(新規・修正併用)
//* プログラムID:CON162_1
//* 機能        :簡易在席名を入力する
//* 作成者      :
//* 
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");

//*****************************************************************************
//* インクルードファイル
//*****************************************************************************
include("include/session_start.inc");							//セッション開始
include("include/SessionChk.inc");								//セッションチェック
include("inc/header.inc");												//DB接続

//*****************************************************************************
//* 画面制御
//*****************************************************************************
include("include/input_chk.inc");									//
include("inc/CON162_1.inc");											//
include("menu_opacity.php");											//メニュー

$strCHK = "";
$strSQL2 = "SELECT * FROM mst_common_word Where type = 2 order by seq";
$rsRecset2 = pg_exec($pg_con,$strSQL2);
if($rsRecset2==false){
	echo("SQL実行に失敗しました(SELECT)");
	exit;
}

$intRsCnt = pg_numrows($rsRecset2);

switch ($_POST["sinki_edit_flg"]) {
	case "sinki":
		$strzaiseki_type="";
		$strzaiseki_name="";
		break;
	case "edit":
		$strSql = "SELECT * FROM mst_common_word Where type = 1 And seq = ".$_POST["seq"];
		$rsRecset = pg_exec($pg_con, $strSql);
		$strzaiseki_type = pg_result($rsRecset, 0, "seq");
		$strzaiseki_name = htmlspecialchars(pg_result($rsRecset, 0, "memo1"));
		$strzaiseki_collar = htmlspecialchars(pg_result($rsRecset, 0, "memo2"));
		break;
}

?>

<form name="e_gru" method = "POST" onsubmit = "return false">
	<?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("CON160HLP.htm")'><img src="image/help.gif" border="0"></a> <a href='javascript:Disp_Help("CON160HLP.htm")'>ヘルプ</a></div></th>
						</tr>
					</table>
					<div align="right"></div>
				</td>
			</tr>
		</table>
		<br>
		<span class="Chufont"></span><span class="Normalfont">は入力必須項目です</span>
		<table width="402" border="0" cellspacing="1" cellpadding="1" class="mainColor">
			<tr>
				<td>
					<table cellspacing="1" cellpadding="1" width="400" border="0">
						<tr bgcolor="#ffffff">
							<td width="100" class="toneDown"><span class="Normalfont">簡易在席名</span><span class="Chufont"></span></td>
							<td><input type="text" maxLength="23" size="50" value="<?php echo htmlspecialchars($strzaiseki_name)?>" name="zaiseki_name"></td>
						</tr>
						<tr bgcolor="#ffffff">
							<td width="100" class="toneDown"><span class="Normalfont">文字色</span></td>
							<td>
								<?php
									for ($i = 0 ; $i < $intRsCnt ; $i++) {
										$moji_collar_no=pg_result($rsRecset2,$i,"seq");
										$moji_collar=pg_result($rsRecset2,$i,"memo1");
										$moji_collar_name=pg_result($rsRecset2,$i,"memo2");
										$strsentaku = "";
										if($moji_collar_no==$strzaiseki_collar){
											$strsentaku = " CHECKED ";
										}else{
											if($sinki_edit_flg=="sinki" && $i==0){
												$strsentaku = " CHECKED ";
											}
										}
										echo "<input type='radio'". $strsentaku ."value='".$moji_collar_no."' name='zaiseki_collar'><font color='".$moji_collar."'><span class='Normalfont'><b>".htmlspecialchars($moji_collar_name)."</b></span></font><br>";
									}
								?>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
		<table width="402" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td height="40" align="left">
					<input type = "button" onclick = "return chk();" value = " 設 定 " name = "btn1">
				</td>
				<td height="40" align="center">
					<input type = "reset" value = "ク リ ア">
				</td>
				<?php if($_POST["sinki_edit_flg"] == "edit") { ?>
					<td height="40" align="center">
						<input type = "button" onclick = "return dell_chk();" value = " 削 除 " name = "btn2">
					</td>
				<?php } ?>
				<td height="40" align="right">
					<input type = "button" onclick = "return back();" value = " 戻 る " name = "modoru">
				</td>
			</tr>
		</table>

		<input type="hidden" name="seq" value="<?php echo $strzaiseki_type?>">

	<?php }else{ ?>
		<a href="TOP000.php"><span class="Normalfont">マスタ変更権限がありません</span></a>
	<?php } ?>
</form>
<?php 
//コピーライト
include("include/copyright.inc");
?>