CON122.php
1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
//*****************************************************************************
//*
//* プログラム名:メニュー名称変更
//* プログラムID:CON121.php
//* 機能 :メニュー名称変更更新
//* 作成者 :
//*
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");
include("include/session_start.inc");
include("include/SessionChk.inc");
$strDBinc="include/dbcon.inc";
include($strDBinc);
//メインメニュー更新
for($i=0;$i<count($txtMain);$i++){
$strSQL = "update main_menu_tbl set name = '".addslashes($txtMain[$i])."' where index_no = ".($i+1);
$objRec = pg_exec($strSQL);
if($objRec == false){
echo("SQL実行に失敗しました(UPDATE)");
exit;
}
}
//サブメニュー更新
for($i=0;$i<count($txtSub);$i++){
$strKey = split("/", $keySub[$i]);
$strSQL = "update sub_menu_tbl set name = '".addslashes($txtSub[$i])."' where main_index = ".$strKey[0]." and index_no = ".$strKey[1];
$objRec = pg_exec($strSQL);
if($objRec == false){
echo("SQL実行に失敗しました(UPDATE)");
exit;
}
}
header("Location: CON120.php");
?>