detail_reg.php 1.87 KB
<?php

header("Content-type: text/html; charset=EUC-JP");

	switch ($intSts) {
	case "1":

			include("./include/dbcon_group.inc");

			$strSQL  ="UPDATE ";
			$strSQL .=" mst_group ";
			$strSQL .="SET ";
			$strSQL .=" group_id      = '$group_id'                  ,";
			$strSQL .=" group_pass    = '$group_pass'                ,";
			$strSQL .=" db_name       = '$db_name'                   ,";
			$strSQL .=" folder_name   = '$folder_name'               ,";
			$strSQL .=" group_name    = '$group_name'                ,";
			$strSQL .=" mode_flg      = ".(int)$mode_flg."           ,";
			$strSQL .=" mobile_flg    = ".(int)$mobile_flg."         ,";
			$strSQL .=" stop_flg      =".(int)$_POST["stop_flg"]."   ,";
			$strSQL .=" cont_end_date = '".$_POST["cont_end_date"]."',";
			$strSQL .=" cont_memo     = '".$_POST["cont_memo"]."'     ";
			$strSQL .="WHERE ";
			$strSQL .=" group_id='$key_name'";
			echo $strSQL."<hr>";
			$objRec = pg_exec($strSQL);
			//exit;

			$strSQL="UPDATE maxuser_tbl SET ";
			$strSQL.="max_count   =".(int)$max_count.",";
			$strSQL.="max_size =".(int)$max_size." ";
			$strSQL.="WHERE group_id='$folder_name'";
			echo $strSQL."<hr>";
			$objRec = pg_exec($strSQL);

			//契約情報
			$strSQL = "DELETE FROM mst_keiyaku WHERE group_id='".$folder_name."'";
			$objRec = pg_exec($strSQL);
			if($objRec==false){
					echo("SQL実行に失敗しました(Delete)");
					exit;
			}
			$strSQLIns  = "Insert Into mst_keiyaku ";
			$strSQLIns .= "(group_id,keiyaku_date,keiyaku_plan,pay_plan,keizoku_nm,pay_date)";
			$strSQLIns .= " VALUES ";
			$strSQLIns .= "('".$folder_name."',";
			$strSQLIns .= "'".$keiyaku_date."',";
			$strSQLIns .= "'".$keiyaku_plan."',";
			$strSQLIns .= "'".$pay_plan."',";
			$strSQLIns .= "'".$keizoku_nm."',";
			$strSQLIns .= "'".$pay_date."')";
			$objRecIns = pg_exec($strSQLIns);

			break;

	case "2":

			break;
	}

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