kanri_reg.php 1.41 KB
<?php
header("Content-type: text/html; charset=EUC-JP");

//セッション開始
include("./include/session_start.inc");

//重複チェック
include("./include/dbcon_group.inc");
$strSQL = "select * from mst_group where db_name = '".$db_name."' or group_id = '".$group_id."' or folder_name = '".$folder_name."'";
$objRec = pg_exec($strSQL);
if(pg_numrows($objRec) > 0){
	echo "グループID、フォルダ名、DB名のどれかが既に使われています";
	exit;
}

//管理テーブル
include("./include/dbcon_group.inc");
//ひっす
$strSQL = "insert into mst_group ";
$strSQL .= "(group_id, group_pass, db_name, folder_name, group_name, mode_flg, mobile_flg) ";
$strSQL .= "values('".$group_id."', '".$group_pass."', '".$db_name."', '".$folder_name."', '".$group_name."', ".$mode_flg.", ".$mobile_flg.") ";
$objRec = pg_exec($strSQL);
//まっくす
$strSQL = "insert into maxuser_tbl ";
$strSQL .= "(group_id, max_count, max_size) ";
$strSQL .= "values('".$folder_name."', ".$max_count.", ".$max_size.") ";
$objRec = pg_exec($strSQL);

$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);

header("Location:main.php");

?>