WML032.php
1.77 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
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
//*****************************************************************************
//*
//* プログラム名:Webメール
//* プログラムID:WML032.php
//* 機能 :
//* 作成者 :
//*
//*****************************************************************************
header('Content-Type: text/html; charset=EUC-JP');
include("include/session_start.inc");
include("include/SessionChk.inc");
include("include/STRING.inc");
include('./include/smarty.conf');
//**** DB接続 ****//
$strDBinc="./include/dbcon.inc";
include($strDBinc);
$arry_del_seq=split("#",$strChkDat);
//削除
for ($intCnt=0; $intCnt < count($arry_del_seq)-1; $intCnt++){
$strSQLseq= "Select * from mail_send_tbl where syain_cd = '".$PHP_SYAIN_CD."' and send_date='".$arry_del_seq[$intCnt]."'";
$objRecseq = pg_exec($strSQLseq);
if($objRecseq==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
if (pg_numrows($objRecseq)>0){
$objmail = pg_fetch_object($objRecseq, 0);
$filename1=$objmail->filename1;
$filename2=$objmail->filename2;
$filename3=$objmail->filename3;
$strSQLseq= "delete from mail_send_tbl where syain_cd='".$PHP_SYAIN_CD."' and send_date='".$arry_del_seq[$intCnt]."'";
$objRecseq = pg_exec($strSQLseq);
if($objRecseq==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
$strTempPath="temp/".$PHP_FOLDER_NAME."/mail_send/";
if ($filename1!=""){
if(file_exists($strTempPath.$filename1)){
unlink($strTempPath.$filename1);
}
}
if ($filename2!=""){
if(file_exists($strTempPath.$filename2)){
unlink($strTempPath.$filename2);
}
}
if ($filename3!=""){
if(file_exists($strTempPath.$filename3)){
unlink($strTempPath.$filename3);
}
}
}
}
header("Location:WML030.php");
?>