TDL903.php 1.15 KB
<?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;
?>