MDT093.php
1.03 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
<?php
//*****************************************************************************
//*
//* プログラム名:資料集
//* プログラムID:MDT093.php
//* 機能 :ファイル削除
//* 作成者 :
//*
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");
include("include/session_start.inc");
include("include/SessionChk.inc");
include("include/jcode.phps");
$strDBinc="include/dbcon.inc";
include($strDBinc);
$strTempPath="temp/".$PHP_FOLDER_NAME."/siryou/";
//削除
//ファイル名取得
$strSql="SELECT filename FROM mysiryo_tbl WHERE seq = $intSeq";
$objRecSet = pg_exec($strSql);
if($objRecSet==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
$intRsCnt = pg_numrows($objRecSet);
if ($intRsCnt!=0) {
$objRecData = pg_fetch_object($objRecSet, 0);
$Res = unlink($strTempPath.$objRecData->filename);
}
$strSql = "DELETE FROM mysiryo_tbl WHERE seq = $intSeq";
$rsRecset = pg_exec($strSql);
if($objRecSet==false){
echo("SQL実行に失敗しました(delete)");
exit;
}
?>