LIST1721.php 3.13 KB
<?PHP 
//*****************************************************************************
//* 
//* プログラム名:め〜るNiポン!V2
//* プログラムID:LIST1721.php
//* 機能        :自動配信の更新
//* 
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");
//***************************
//* インクルードファイル
//***************************
include("./include/session_start.inc");
include("./include/SessionChk.inc");
include("./include/dbcon.inc");

//***************************
//* 初期処理
//***************************
$objConn			= null;	//接続オブジェクト
$objRecSet			= null;	//レコードセットオブジェクト
$objInsRet			= null;	//レコードセットオブジェクト

$strSQL				= "";	//SQL文

$strMail_id         = ""; //メールID
$strAlarm_Date		= ""; //日付
$strKenmei		    = ""; //件名
$strAlarm_Text		= ""; //本文

//***************************
//* メイン処理
//***************************

//メールID
$strMail_id =  $mail_id ;

//日付
$strResend_Date = $Resend_Year . $Resend_Month . $Resend_Date;
if (is_numeric($strResend_Date)==false) {
	$strResend_Date = "";
}else{
	$strResend_Date = "'" . $strResend_Date . "'";
}

//時間
if (strlen($Resend_Hour) < 2) {
	$Resend_Hour = "0" . $Resend_Hour;
}else{
	$Resend_Hour = $Resend_Hour;
}
if (strlen($Resend_Minute) < 2) {
	$Resend_Minute = "0" . $Resend_Minute;
}else{
	$Resend_Minute = $Resend_Minute;
}
$strResend_Time = $Resend_Hour . $Resend_Minute;
if (is_numeric($strResend_Time)==false) {
	$strResend_Time = "";
}else{
	$strResend_Time = "'" . $strResend_Time . "'";
}

//既読・未読自動配信情報削除
$strSQL = "DELETE FROM kidok_data WHERE kidok_data.mail_id = '" . $strMail_id . "'"; 
$objRecSet = pg_exec($strSQL);
if($objRecSet==false){
	echo("SQL実行に失敗しました(DELETE)");
	exit;
}
	
if($kidok=="on"){
	$strSQL = "INSERT INTO kidok_data (" .
						"mail_id, " .
						"check_id, " .
						"message_date, " .
						"message_time, " .
						"send_date, " .
						"send_flg) " .
						"VALUES ('" .
						$strMail_id . "', " .
						99 . ", " .
						$strResend_Date . ", " .
						$strResend_Time . ", " .
						"Null" . ", " .
						0 . ") ";
}else{
 	$strSQL = "INSERT INTO kidok_data (" .
						"mail_id, " .
						"check_id, " .
						"message_date, " .
						"message_time, " .
						"send_date, " .
						"send_flg) " .
						"VALUES ('" .
						$strMail_id . "', " .
						0 . ", " .
						$strResend_Date . ", " .
						$strResend_Time . ", " .
						"Null" . ", " .
						0 . ") ";
}

$objRecSet = pg_exec($strSQL);
if($objRecSet==false){
		echo("SQL実行に失敗しました(INSERT)");
		exit;
}
?>

<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=EUC-JP">
<META http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" type="text/css" href="basefont.css">
<TITLE>め〜るNiポン!</TITLE>
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
function load_screen(){
		document.frm.action = "LIST1000.php";
		document.frm.method="POST";
		document.frm.submit();
}
-->
</SCRIPT>
</HEAD>
<BODY onLoad="return load_screen();">
<form name="frm">
<INPUT type="hidden" name="mail_id" value="<?PHP  echo $_POST["mail_id"]; ?>">
</form>
</BODY>
</HTML>