MET991.php 1.47 KB
<?php 

//*****************************************************************************

//* 

//* プログラム名:電子会議室

//* プログラムID:MET991.php

//* 機能        :電子会議室.会議削除

//* 作成者      :

//* 

//*****************************************************************************

include("include/session_start.inc");
include("include/SessionChk.inc");
$strTempPath="temp/".$PHP_FOLDER_NAME."/kaigi/";
$strDBinc="include/dbcon.inc";
include($strDBinc);

//資料パス
$strSQL = "select file_name from kaigi_info_tbl where meeting_no = ".$mtgNo;
$recData=pg_exec($strSQL);
if($recData==false){
	echo("SQL実行に失敗しました(SELECT)");
	exit;
}
$objFtc = pg_fetch_object($recData, 0);
if(trim($objFtc->file_name) != ""){
	$strArr=split("/",($objFtc->file_name));
	if(count($strArr) > 0){
		for($i=0;$i<=count($strArr)-1;$i++){
			if(file_exists($strTempPath.$strArr[$i])){
				unlink($strTempPath.$strArr[$i]);
			}
		}
	}
}


//kaigi_info_tbl
$strSQL = "delete from kaigi_info_tbl where meeting_no = ".$mtgNo;
$recData=pg_exec($strSQL);
if($recData==false){
	echo("SQL実行に失敗しました(DELETE)");
	exit;
}

//kaigi_tbl
$strSQL = "delete from kaigi_tbl where meeting_no = ".$mtgNo;
$recData=pg_exec($strSQL);
if($recData==false){
	echo("SQL実行に失敗しました(DELETE)");
	exit;
}

//pkaigi_tbl
$strSQL = "delete from pkaigi_tbl where meeting_no = ".$mtgNo;
$recData=pg_exec($strSQL);
if($recData==false){
	echo("SQL実行に失敗しました(DELETE)");
	exit;
}

header("Location:MET010.php");
?>