TDL903.php
1.15 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
42
43
44
45
46
47
48
49
50
<?php
//*****************************************************************************
//*
//* プログラム名:ToDo
//* プログラムID:TDL903.php
//* 機能 :ToDo 完了・削除処理
//* 作成者 :
//*
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");
include("include/session_start.inc");
include("include/SessionChk.inc");
include('./include/smarty.conf');
$strDBinc="include/dbcon.inc";
include($strDBinc);
$strSQL="";
$objRec="null";
//削除
if($del_mode == 1){
$strwhere = substr($del_data, 0, (strlen(trim($del_data)) - 1));
$strWhere = str_replace("/", " or seq = ", $strwhere);
$strSQL = "delete from todo_tbl where seq = ".$strWhere;
$objRec = pg_exec($strSQL);
if($objRec == false){
echo("SQL実行に失敗しました(UPDATE)");
exit;
}
//完了
}else if($del_mode == 0){
$arrTEMP = split("/", trim($del_data));
for($i=0;$i<count($arrTEMP)-1;$i++){
$strSQL = "update todo_tbl set end_flg = 1, sinchoku = 100 where seq = ".$arrTEMP[$i];
$objRec = pg_exec($strSQL);
if($objRec == false){
echo("SQL実行に失敗しました(UPDATE)");
exit;
}
}
}
exit;
?>