

<?php

header('Content-Type: text/html; charset=UTF-8');

$fo=1;
$html=$_POST["html"];
$css=$_POST["css"];
$date=$_POST["date"];
$width_all=$_POST['yoko_size_all'];
$width_zentai=$width_all.'px';
$height_all=$_POST['tate_size_all'];
/*form file*/
$html_form=$_POST["html"].'_form';
$css_form=$_POST["css"].'_form';

/* form file end*/

$fp_html=@fopen('./'."$html","a+");
$fp_css_pc=@fopen('./css/'."$css","a+");
$fp_css_tablet_land=@fopen('./css/tablet_land'.$date.'.css',"a+");
$fp_css_tablet_port=@fopen('./css/tablet_port'.$date.'.css',"a+");
$fp_css_sumaho_land=@fopen('./css/sumaho_land'.$date.'.css',"a+");
$fp_css_sumaho_port=@fopen('./css/sumaho_port'.$date.'.css',"a+");
$str_submit='';
$bunsyous="";
$bunsyour="";
$form_on_off='';
$formt='';
	$rows=4;
	$cols=10;

//fclose($fp_form_html);
fputs($fp_html,'<!doctype html>'."\n");
	
fputs($fp_html,'<html>'."\n");
	
fputs($fp_html,'<head>'."\n");
	
fputs($fp_html,'<meta charset="UTF-8">');
fputs($fp_html,'<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0">'."\n");
fputs($fp_html,'<link href="./css/ress.css"'.' rel="stylesheet" type="text/css">'."\n");
fputs($fp_html,'<link href="./css/'.$css.'"'.' rel="stylesheet" type="text/css" media="screen and (min-width:1025px)">'."\n");
fputs($fp_html,'<link href="./css/'.'tablet_land'.$date.'.css'.'"'.' rel="stylesheet" type="text/css" media="screen and (min-width:768px) and (max-width:1024px) and (orientation:landscape)">'."\n");
fputs($fp_html,'<link href="./css/'.'tablet_port'.$date.'.css'.'"'.' rel="stylesheet" type="text/css" media="screen and (min-width:768px) and (max-width:1024px) and (orientation:portrait)">'."\n");
fputs($fp_html,'<link rel="stylesheet" href="./css/sumaho_land'.$date.'.css" media="screen and (max-width:767px) and (orientation:landscape)">'."\n");
fputs($fp_html,'<link rel="stylesheet" href="./css/sumaho_port'.$date.'.css" media="screen and (max-width:767px) and (orientation:portrait)">'."\n");
fputs($fp_html,'<title>'.$html.'</title>'."\n");
	
fputs($fp_html,'</head>'."\n");
	
fputs($fp_html,'<body>');

/*form html close*/
$color="black";
$b_color="black";
$count=$_POST["youso_kosuu"];


for($fo=1;$fo<=$count;$fo++){
	$form_on_off=$_POST["form$fo"];
	if($form_on_off ==''){$form_on_off = 'off';}else{$form_on_off='on';}
}

for($fo=1;$fo<=$count;$fo++){
	
	//form
	$form=$_POST["form$fo"];
	if (isset($_POST["form.$fo"])) {
	
    $form=$form;

}
	
	$font=$_POST["font$fo"];
	$font_size=$_POST["font_size$fo"];
	$font_tablet_land=($font_size / $width_zentai) * 80 .'vw';
	$font_tablet_port=($font_size / $width_zentai) * 100 .'vw';
	$font_sumaho=((($font_size * 100) / $width_zentai)-1);
	$font_sumaho=$font_sumaho.'vw';
	
	$font_sumaho_land=($font_size / $width_zentai) * 100 .'vw';
	$font_sumaho_port=($font_size / $width_zentai) * 100 .'vw';
	$font_sumaho=((($font_size * 100) / $width_zentai)-1);
	
	$font_size=$font_size.'px';
	//width pc tablet sumaho
$width_pc=$_POST["yokohaba$fo"];
	$width_tablet_land=((($width_pc  * 100) /  $width_zentai) ) .'vw';
	$width_tablet_port=((($width_pc  * 100) /  $width_zentai) ) .'vw';
	$width_sumaho=($width_pc * 100) / $width_zentai;
	$width_sumaho_land=$width_sumaho.'vw';
	$width_sumaho_port=$width_sumaho.'vw';
	$width_pc=($width_pc).'px';
	//height pc tablet sumaho
$height_pc=$_POST["tatehaba$fo"];	
	if($form_on_off !=='off'){
		
$height_tablet_land=((($height_pc * 300)/ $height_all) + 0.5).'vh';
$height_tablet_port=((($height_pc * 200)/ $height_all) + 0.5 ).'vh';
$height_sumaho=((($height_pc * 30)/ $height_all - 0.2));
$height_sumaho_land=((($height_pc * 100)/ $height_all) -0.5).'vh';
$height_sumaho_port=((($height_pc * 100)/ $height_all) ).'vh';
$height_pc=$height_pc - 5;
if($height_pc<0){$height_pc=-($height_pc).'px';}
else{$height_pc=$height_pc.'px';}
	}
	else{
		$height_tablet_border=((($height_pc * 300)/ $height_all) -3).'px';
		$height_tablet_land=((($height_pc * 400)/ $height_all) -3).'px';
$height_tablet_port=((($height_pc * 300)/ $height_all) -3).'px';
//$height_sumaho=((($height_pc * 30)/ $height_all)) ;
//$height_sumaho_land=((($height_pc * 100)/ $height_all) -0.5) .'px';
		 
		
		 //$height_tablet_land=$height_pc.'px';
//$height_tablet_port=$height_pc.'px';
		 $height_sumaho_land=((($height_pc * 300)/ $height_all) -5 ).'px';
$height_sumaho_port=((($height_pc * 200)/ $height_all) -2).'px';
$height_pc=$height_pc - 5;
if($height_pc<0){$height_pc=-($height_pc).'px';}
else{$height_pc=$height_pc.'px';}}
	
	
	
	$top_pc=$_POST["iti_ue$fo"];
	if($form_on_off !=='off'){
	$top_tablet_land=((($top_pc * 100)/ $height_all) ).'vh';
	
$top_tablet_port=((($top_pc * 50)/ $height_all)).'vh'; 

	$top_sumaho=((($top_pc * 30)/ $height_all)) ;
	
	
	$top_sumaho_land=$top_sumaho.'vh';
	$top_sumaho_port=$top_sumaho.'vh';
	$top_pc=$top_pc.'px';
	}
	else{$top_tablet_land=((($top_pc * 400)/ $height_all)  ).'px';
	
$top_tablet_port=((($top_pc * 300)/ $height_all)   ).'px'; 
		 
$top_sumaho_land=((($top_pc * 280)/ $height_all) ).'px';
	
$top_sumaho_port=((($top_pc * 200)/ $height_all) ).'px'; 
		 /*
	$top_sumaho=((($top_pc * 80)/ $height_all)) ;
	
	$top_sumaho_land=((($top_pc * 280)/ $height_all) ).'px';
	
$top_sumaho_port=((($top_pc * 300)/ $height_all) - 3 ).'px'; 
*/
	$top_pc=$top_pc.'px';}
	//left pc tablet sumaho
$left_pc=$_POST["iti_left$fo"] ;
	//$left_tablet_land2=((($left_pc * 100)/ $width_zentai) -3) .'vw';
	$left_tablet_land=((($left_pc * 100)/ $width_all) ) .'vw';
	$left_tablet_port=((($left_pc * 100)/ $width_all) ) .'vw';
	$left_sumaho=(($left_pc * 100)/ $width_all) ;
	$left_sumaho=($left_sumaho ).'vw';
	//$left_sumaho_land2=((($left_pc * 100)/ $width_all) +2) .'vw';
	$left_sumaho_land=((($left_pc * 100)/ $width_all) ) .'vw';
	$left_sumaho_port=((($left_pc * 100)/ $width_all) ) .'vw';
	$left_pc=($left_pc).'px';
	
	
	//color
$color=$_POST["color$fo"];
	$youso_haikei_gazou=$_POST["haikei_gazou_text$fo"];
	$link=$_POST["link$fo"];
	$id=$_POST["id$fo"];
	$class=$_POST["class$fo"];
	$name=$_POST["name$fo"];
	
//border
	$border_syurui=$_POST["border_syurui$fo"];
	$border_futosa=$_POST["border_futosa$fo"].'px';
	$border_color=$_POST["border_color$fo"];
	$border_color= str_replace('.',',',$border_color);
	
$back_color=$_POST["back_color$fo"];
	$back_color= str_replace('.',',',$back_color);
$link=$_POST["link$fo"];
	
if (isset($_POST["color$fo"])) {
	
    $color=$_POST["color$fo"];

}	
	
if (isset($_POST["bunsyou.$fo"])) {
    $bunsyou.$fo=$_POST["bunsyou.$fo"];
	$bunsyou.$fo=mb_convert_encoding($bunsyou.$fo,'UTF-8','auto');
	$bunsyous=$bunsyou;
$bunsyour=$bunsyou;
}

if (isset($_POST["font$fo"])) {
	
    $font=$_POST["font$fo"];

}
	
	
if (isset($_POST["font_size$fo"])) {
	
    $font_size=$_POST["font_size$fo"];

}
	
	
	
if (isset($_POST["color"])) {
    $font_color=$_POST["color"];

}


if (isset($_POST["haikei_gazou_text$fo"])) {
	
    $youso_haikei_gazou=$_POST["haikei_gazou_text$fo"];

}

	
	
	
//横幅

if (isset($_POST["yokohaba.$fo"])) {
	
    $suuti_yoko=$_POST["yokohaba"].$_POST["yokohaba_tani.$fo"];

}

	

	
//縦幅
	if (isset($_POST["tatehaba.$fo"])) {
	
    $suuti_tate=$_POST["tatehaba.$fo"].$_POST["tatehaba_tani"];

}
	
	
	//ＴＯＰ
	if (isset($_POST["iti_ue.$fo"])) {
	
    $suuti_top=$_POST["iti_ue"].$_POST["top_tani.$fo"];

}
	

	//ＬＥＦＴ
	if (isset($_POST["iti_left.$fo"])) {
	
    $suuti_left=$_POST["iti_left"].$_POST["left_tani.$fo"];

}
	
	
//$img_res="img{width:100%;height:auto;top:$top_tablet;left:$left_tablet}";

	
	$body_css2="body{

    width: 94vw;
    margin-left: auto;
    margin-right: auto;
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    max-width: 100vw;
    overflow-x: hidden;
z-index:1000;
}
input{font-size:16px!important;}
input:hover{border:solid 3px red;}
input, textarea{font-size:5vw!important;
}

";
	
	
	
	
//$bunsyou='単位px,em.rem,vw,vh,gd,gh,%などをくっつけて記入してください。';
	if (empty($_POST["bunsyou$fo"])) {
    $bunsyou=$_POST["bunsyou$fo"];
	$bunsyou=mb_convert_encoding($bunsyou,'UTF-8','auto');
}else{
		$bunsyou=$_POST["bunsyou$fo"];
	$bunsyou=mb_convert_encoding($bunsyou,'UTF-8','auto');
	}

	
	if (empty($link)) {
	
    
	
$str='<pre id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'"'.'>'."$bunsyou".'</pre>'."\n";
		
	$str_submit='<input type="'.'submit"'.' id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'"'.' value="'.$bunsyou.'"'.'>'."\n";
		
}elseif (!(empty($link)) and !(empty($bunsyou))){
		//$str='<a href="'.$link.'">'.'<div id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'"'.'>'."$bunsyou".'</div></a>';
//$str='<a href="'.$link.' id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'">'.'<pre id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'">'.'</pre>'.'</a>';
		
$str='<a href="'.$link.'">'.'<pre id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'">'.$bunsyou.'</pre>'.'</a>'."\n";
		
	 }
	
	//if($_POST["haikei_gazou_text$fo"]){

 
	//	$youso_haikei_gazou=$_POST["haikei_gazou_text$fo"];
		elseif (!(empty($link)) and (!(empty($youso_haikei_gazou)))){
			
			//$str='<a href="'.$link.'">'.'<div id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'"'.'>'."$bunsyou".'</div></a>';
$str='<a href="'.$link.'"'.'>'.'<pre id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'">'.'</pre>'.'</a>'."\n";
			
		}elseif(!(empty($bunsyou))){
		
			$str='<pre id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'">'."$bunsyou".'</pre>'."\n";
			
	$str_submit='<input type="'.'submit"'.' id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'"'.' value="'.$bunsyou.'"'.'>'."\n";
		
		
		
}
	//elseif(!(empty($youso_haikei_gazou))){
	//$str='<a href="'.$link.'"'.'>'.'<pre id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'">'."$bunsyou".'</pre>'.'</a>';
	
//	$youso_haikei_gazou=$_POST["haikei_gazou_text$fo"];
	//}
	
	
	
	//form
	/*
	 $frends = "Tom,Mike,Wendy,Jane";
  $frend = explode(",",$frends);
  echo '<p>',$frend[0],'</p>';
  echo '<p>',$frend[1],'</p>';
  echo '<p>',$frend[2],'</p>';
  echo '<p>',$frend[3],'</p>';
*/
	
	
	if($form == 'start'){
	
	$str='<form action="'.$link.'"'.' method="post"'.' enctype="multipart/form-data">'."\n";
	}
	elseif($form == 'tel'){
	
		$str='<input type="'.'tel"'.' id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'"'.' required>'."\n";
	}
	elseif($form == 'number'){
	
		$str='<input type="'.'number"'.' id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'"'.' required>'."\n";
	}
	elseif($form == 'url'){
	
		$str='<input type="'.'url"'.' id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'"'.' required>'."\n";
	}
	elseif($form == 'text'){
	
		$str='<input type="'.'text"'.' id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'"'.' required>'."\n";
	}
	elseif(stristr($form,'area')){
	
	$form_rows_cols = explode("#",$form);
	$formt=$form_rows_cols[0];
	
	$rows=$form_rows_cols[1];
	$cols=$form_rows_cols[2];
		$bunsyou=$bunsyou;
$str='<textarea'.' id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'"'.' rows="'.$rows.'"'.' cols="'.$cols.'">'.'</textarea>'."\n";
	}
	elseif($form == 'file'){
	$str='<input type="'.'file"'.' id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'"'.' required>'."\n";
		//$str='<input type="'.'file"'.' id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'"'.'>';
	}
	elseif($form == 'email'){
	
		$str='<input type="'.'email"'.' id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'"'.' required>'."\n";
	}
	elseif($form == 'submit'){
	
		$str='<input type="'.'submit"'.' id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'"'.'>'."\n";
		
		$str_submit='<input type="'.'submit"'.' id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'"'.' value="'.$bunsyous.'"'.'>'."\n";
	}
	elseif($form == 'reset'){
	
	$str='<input type="'.'reset"'.' id="'.$id.'"'.' class="'.$class.'"'.' name="'.$name.'"'.' value="'.$bunsyour.'"'.$bunsyour.'>'."\n";
	}
	elseif($form == 'end'){
	$str='</form>'."\n";
	}
	
	
	fputs($fp_css_pc,"#$id{"."\n");
	
fputs($fp_css_pc,"z-index:200;"."\n");
	fputs($fp_css_pc,"line-height:1;"."\n");
	if(empty($youso_haikei_gazou)){
	
	}elseif(!(empty($link))){fputs($fp_css_pc,"background-image: url(../img/$youso_haikei_gazou);"."\n");
	fputs($fp_css_pc,"background-size: contain;"."\n");
		  fputs($fp_css_pc,"z-index:300;"."\n");
		
	}else{fputs($fp_css_pc,"background-image: url(../img/$youso_haikei_gazou);"."\n");
	fputs($fp_css_pc,"background-size: contain;"."\n");
		  fputs($fp_css_pc,"z-index:-300;"."\n");
		
	}
	
	
if(!(empty($link)) and !(empty($bunsyou)) and (empty($youso_haikei_gazou))){
	fputs($fp_css_pc,"text-decoration: underline;"."\n");
}
	
	fputs($fp_css_pc,"font-size:".$font_size."px;"."\n");
	fputs($fp_css_pc,"font-family:$font;"."\n");
	fputs($fp_css_pc,"background-repeat: no-repeat;"."\n");
	
	
	fputs($fp_css_pc,"width:$width_pc;"."\n");
	fputs($fp_css_pc,"height:$height_pc;"."\n");
	fputs($fp_css_pc,"position :absolute;"."\n");
	fputs($fp_css_pc,"top:$top_pc;"."\n");
	fputs($fp_css_pc,"left:$left_pc;"."\n");
	
	fputs($fp_css_pc,"margin:0 auto;"."\n");
	fputs($fp_css_pc,"color:$color;"."\n");
	
	/*****form end************/
	if(empty($border_syurui) or empty($border_futosa) or empty($border_color)){
	
	}else{fputs($fp_css_pc,"border:$border_syurui $border_futosa $border_color;"."\n");
		 /***form***/
		  
		   fputs($fp_css_pc,"z-index:-300;"."\n");
		  
		 }
	
	if(empty($back_color)){}else{
	fputs($fp_css_pc,"background-color:$back_color;"."\n");
		
		fputs($fp_css_pc,"z-index:-200!important;"."\n");
	}
	fputs($fp_css_pc,"}"."\n");
	
	//tablet land start
	fputs($fp_css_tablet_land,"#$id{"."\n");
	fputs($fp_css_tablet_land,"line-height:1.2;"."\n");
fputs($fp_css_tablet_land,"z-index: 200;"."\n");
	fputs($fp_css_tablet_land,"white-space: nowrap;"."\n");
	/*form*/
	fputs($fp_css_tablet_land,"left:$left_tablet_land;"."\n");
	fputs($fp_css_tablet_land,"width:$width_tablet_land;"."\n");
	if(empty($youso_haikei_gazou)){
	
	}else{fputs($fp_css_tablet_land,"background-image: url(../img/$youso_haikei_gazou);"."\n");
	fputs($fp_css_tablet_land,"background-size: $width_tablet_land $height_tablet_land;"."\n");
	fputs($fp_css_tablet_land,"width:$width_tablet_land;"."\n");
		fputs($fp_css_tablet_land,"left:$left_tablet_land;"."\n");
	
	}
	fputs($fp_css_tablet_land,"background-repeat: no-repeat;"."\n");
	fputs($fp_css_tablet_land,"font-size:$font_tablet_land;"."\n");
	fputs($fp_css_tablet_land,"font-family:$font;"."\n");
	
	fputs($fp_css_tablet_land,"height:$height_tablet_land;"."\n");
	fputs($fp_css_tablet_land,"position :absolute;"."\n");
	fputs($fp_css_tablet_land,"top:$top_tablet_land;"."\n");
	
	
	
	fputs($fp_css_tablet_land,"margin:0 auto;"."\n");
	fputs($fp_css_tablet_land,"color:$color;"."\n");
	fputs($fp_css_tablet_land,"white-space:nowrap;"."\n");
	
	/***form**/
	
	if(empty($border_syurui) or empty($border_futosa) or empty($border_color)){
	
	}else{fputs($fp_css_tablet_land,"border:$border_syurui $border_futosa $border_color;"."\n");
		  
fputs($fp_css_tablet_land,"z-index: -100;"."\n");
			  
		  
//fputs($fp_css_tablet_land,"height: $height_tablet_border;");
		 
		 }
	
	if(empty($back_color)){}else{
	fputs($fp_css_tablet_land,"background-color:$back_color;"."\n");
		
fputs($fp_css_tablet_land,"z-index: -100;"."\n");
		
//fputs($fp_css_tablet_land,"left:$left_tablet_land2;");
	}
	fputs($fp_css_tablet_land,"}"."\n");
	
	//tablet land end
	
	//tablet port start
	fputs($fp_css_tablet_port,"#$id{"."\n");
	fputs($fp_css_tablet_port,"line-height:1;"."\n");
	fputs($fp_css_tablet_port,"z-index: 200;"."\n");
	fputs($fp_css_tablet_port,"width:$width_tablet_port;"."\n");
	fputs($fp_css_tablet_port,"left:$left_tablet_port;"."\n");
	if(empty($youso_haikei_gazou)){
	
	}else{fputs($fp_css_tablet_port,"background-image: url(../img/$youso_haikei_gazou);"."\n");
	fputs($fp_css_tablet_port,"background-size: $width_tablet_port $height_tablet_port;"."\n");
				
		  fputs($fp_css_tablet_port,"left:$left_tablet_port;"."\n");
		  fputs($fp_css_tablet_port,"width:$width_tablet_port;"."\n");
		  /**form**/
		  
	}
	fputs($fp_css_tablet_port,"background-repeat: no-repeat;"."\n");
	fputs($fp_css_tablet_port,"font-size:$font_tablet_port;"."\n");
	fputs($fp_css_tablet_port,"font-family:$font;"."\n");
	
	fputs($fp_css_tablet_port,"height:$height_tablet_port;"."\n");
	fputs($fp_css_tablet_port,"position :absolute;"."\n");
	fputs($fp_css_tablet_port,"top:$top_tablet_port;"."\n");
	
	fputs($fp_css_tablet_port,"white-space:nowrap;"."\n");
	
	
	fputs($fp_css_tablet_port,"margin:0 auto;"."\n");
	fputs($fp_css_tablet_port,"color:$color;"."\n");
	
	
	/***form***/
	
	
	if(empty($border_syurui) or empty($border_futosa) or empty($border_color)){
	
	}else{fputs($fp_css_tablet_port,"border:$border_syurui $border_futosa $border_color;"."\n");
		  
		  
fputs($fp_css_tablet_port,"z-index: -100;"."\n");
		
//fputs($fp_css_tablet_port,"height: $height_tablet_border;");
		 }
	
	if(empty($back_color)){}else{
	fputs($fp_css_tablet_port,"background-color:$back_color;"."\n");
		
fputs($fp_css_tablet_port,"z-index: -100;"."\n");
		
	}
	fputs($fp_css_tablet_port,"}"."\n");
	/*
	fputs($fp_css_tablet_port_form,"}");
	*/
	//tablet port end
	//sumaho
	
	fputs($fp_css_sumaho_land,"#$id{"."\n");
	fputs($fp_css_sumaho_land,"line-height:1;"."\n");
fputs($fp_css_sumaho_land,"z-index: 200;"."\n");
	fputs($fp_css_sumaho_land,"white-space: nowrap;"."\n");
	/*form*/
	
	if(empty($youso_haikei_gazou)){
	
	}else{fputs($fp_css_sumaho_land,"background-image: url(../img/$youso_haikei_gazou);"."\n");
	fputs($fp_css_sumaho_land,"background-size: contain;"."\n");
	
	}
	fputs($fp_css_sumaho_land,"background-repeat: no-repeat;"."\n");
	fputs($fp_css_sumaho_land,"font-size:$font_sumaho_land;"."\n");
	fputs($fp_css_sumaho_land,"font-family:$font;"."\n");
	fputs($fp_css_sumaho_land,"width:$width_sumaho_land;"."\n");
	fputs($fp_css_sumaho_land,"height:$height_sumaho_land;"."\n");
	fputs($fp_css_sumaho_land,"position :absolute;"."\n");
	fputs($fp_css_sumaho_land,"top:$top_sumaho_land;"."\n");
	fputs($fp_css_sumaho_land,"left:$left_sumaho_land;"."\n");
	
	
	
	fputs($fp_css_sumaho_land,"margin:0 auto;"."\n");
	fputs($fp_css_sumaho_land,"color:$color;"."\n");
	fputs($fp_css_sumaho_land,"white-space:nowrap;"."\n");
	
	/***form**/
	
	if(empty($border_syurui) or empty($border_futosa) or empty($border_color)){
	
	}else{fputs($fp_css_sumaho_land,"border:$border_syurui $border_futosa $border_color;"."\n");
		  
fputs($fp_css_sumaho_land,"z-index: -100;"."\n");
		 /***form**/
		 
		 }
	
	if(empty($back_color)){}else{
	fputs($fp_css_sumaho_land,"background-color:$back_color;"."\n");
		
fputs($fp_css_sumaho_land,"z-index: -100;"."\n");
		
	}
	fputs($fp_css_sumaho_land,"}"."\n");
	
	//sumaho land end
	
	//sumaho port start
	fputs($fp_css_sumaho_port,"#$id{"."\n");
	fputs($fp_css_sumaho_port,"line-height:1.2;"."\n");
	fputs($fp_css_sumaho_port,"z-index: 200;"."\n");
	
	if(empty($youso_haikei_gazou)){
	
	}else{fputs($fp_css_sumaho_port,"background-image: url(../img/$youso_haikei_gazou);"."\n");
	fputs($fp_css_sumaho_port,"background-size: contain;"."\n");
				
		  /**form**/
		  
	}
	fputs($fp_css_sumaho_port,"background-repeat: no-repeat;"."\n");
	fputs($fp_css_sumaho_port,"font-size:$font_sumaho_port;"."\n");
	fputs($fp_css_sumaho_port,"font-family:$font;"."\n");
	fputs($fp_css_sumaho_port,"width:$width_sumaho_port;"."\n");
	fputs($fp_css_sumaho_port,"height:$height_sumaho_port;"."\n");
	fputs($fp_css_sumaho_port,"position :absolute;"."\n");
	fputs($fp_css_sumaho_port,"top:$top_sumaho_port;"."\n");
	fputs($fp_css_sumaho_port,"left:$left_sumaho_port;"."\n");
	fputs($fp_css_sumaho_port,"white-space:nowrap;"."\n");
	
	
	fputs($fp_css_sumaho_port,"margin:0 auto;"."\n");
	fputs($fp_css_sumaho_port,"color:$color;"."\n");
	
	
	/***form***/
	
	
	if(empty($border_syurui) or empty($border_futosa) or empty($border_color)){
	
	}else{fputs($fp_css_sumaho_port,"border:$border_syurui $border_futosa $border_color;"."\n");
		  
fputs($fp_css_sumaho_port,"z-index: -100;"."\n");
		
		 }
	
	if(empty($back_color)){}else{
	fputs($fp_css_sumaho_port,"background-color:$back_color;"."\n");
		
fputs($fp_css_sumaho_port,"z-index: -100;"."\n");
		
	}
	fputs($fp_css_sumaho_port,"}"."\n");
	
	
	/***********sumaho_port**********************/
	
	/************form***************/
	
	
	
//色はいってたら
if ($color<>0) {
    $str_css_haikei_pc="#bunsyou$fo{font-color:$color}"."\n";
}	
	
	
	

	
	
	if($form =='submit'){
	fputs($fp_html,$str_submit);
	}else{fputs($fp_html,$str);
		 fputs($fp_html,'');}
	
}
	

	
	
	
if (isset($_POST["youso_haikei_gazou"])) {
	fputs($fp_css_pc,$str_css_gazou_pc);
	fputs($fp_css_pc_form,$str_css_gazou_pc);
}

	


$body_css="body{width:100vw;margin-left:auto;margin-right:auto;z-index:1000;
box-sizing: border-box;
}
img{width:auto; max-width:100%;}
a{white-space:nowrap;}

input:hover{border:solid 3px red;}
input, textarea{z-index:3000!important;}

"."\n";

fputs($fp_css_pc,$body_css);
fputs($fp_html,'</body>'."\n");

fputs($fp_html,'</html>'."\n");
	fputs($fp_css_pc,$body_css2);
fputs($fp_css_tablet_land,$body_css2);
fputs($fp_css_tablet_port,$body_css2);
fputs($fp_css_sumaho_land,$body_css2);
fputs($fp_css_sumaho_port,$body_css2);
//fputs($fp_css_tablet,$img_res);
//fputs($fp_css_sumaho,$img_res);
fclose($fp_html);
fclose($fp_css_tablet_land);
fclose($fp_css_tablet_port);
fclose($fp_css_sumaho_land);
fclose($fp_css_sumaho_port);


/*********form*************/

echo 'コーディング　生成しました！！';
echo '</br>';
echo '<a href="'.$html.'">'.$html.'</a>';

echo '<br>';
echo '<a href="'.'auto_coda3.html'.'">'.'やりなおし'.'</a>';
echo '<br>';
echo '<br>';
echo '<a href="'.'http://s-creations.net/'.'">'.'制作：s-creations'.'</a>';
echo '<br>';
$fo="0";

	?>