<?php

// Load up all dem variable... eh... let's do that...

$bgColor = $_POST['bgColor'];
$bgTexture = $_POST['bgTexture'];
$bgNav = $_POST['bgNav'];
$navTexture = $_POST['navTexture'];

$nav1_name = $_POST['nav1_name'];
$nav2_name = $_POST['nav2_name'];
$nav3_name = $_POST['nav3_name'];
$nav4_name = $_POST['nav4_name'];

$nav1_link = $_POST['nav1_link'];
$nav2_link = $_POST['nav2_link'];
$nav3_link = $_POST['nav3_link'];
$nav4_link = $_POST['nav4_link'];

$nav1_out = $_POST['nav1_out'];
$nav2_out = $_POST['nav2_out'];
$nav3_out = $_POST['nav3_out'];
$nav4_out = $_POST['nav4_out'];

$fbId = $_POST['fbId'];
$fbSecret = $_POST['fbSecret'];


// SETTING VARIANT CONTENT

$v1_contentTXT = "../design/bg.txt";
$v1_contentHandle = fopen($v1_contentTXT, 'w') or die("can't open file");
$sd7 = "$bgColor";
fwrite($v1_contentHandle, $sd7);
fclose($v1_contentHandle);

$v1_contentTXT2 = "../design/bgtexture.txt";
$v1_contentHandle2 = fopen($v1_contentTXT2, 'w') or die("can't open file");
$sd2 = "$bgTexture";
fwrite($v1_contentHandle2, $sd2);
fclose($v1_contentHandle2);

$v1_contentTXT3 = "../design/nav.txt";
$v1_contentHandle3 = fopen($v1_contentTXT3, 'w') or die("can't open file");
$sd3 = "$bgNav";
fwrite($v1_contentHandle3, $sd3);
fclose($v1_contentHandle3);

$v1_contentTXT4 = "../design/navtexture.txt";
$v1_contentHandle4 = fopen($v1_contentTXT4, 'w') or die("can't open file");
$sd4 = "$navTexture";
fwrite($v1_contentHandle4, $sd4);
fclose($v1_contentHandle4);

$v1_contentTXT5 = "../nav/nav1.txt";
$v1_contentHandle5 = fopen($v1_contentTXT5, 'w') or die("can't open file");
$sd5 = "$nav1_name";
fwrite($v1_contentHandle5, $sd5);
fclose($v1_contentHandle5);

$v1_contentTXT6 = "../nav/nav1_link.txt";
$v1_contentHandle6 = fopen($v1_contentTXT6, 'w') or die("can't open file");
$sd6 = "$nav1_link";
fwrite($v1_contentHandle6, $sd6);
fclose($v1_contentHandle6);

$v1_contentTXT7 = "../nav/nav2.txt";
$v1_contentHandle7 = fopen($v1_contentTXT7, 'w') or die("can't open file");
$sd7 = "$nav2_name";
fwrite($v1_contentHandle7, $sd7);
fclose($v1_contentHandle7);

$v1_contentTXT8 = "../nav/nav2_link.txt";
$v1_contentHandle8 = fopen($v1_contentTXT8, 'w') or die("can't open file");
$sd8 = "$nav2_link";
fwrite($v1_contentHandle8, $sd8);
fclose($v1_contentHandle8);

$v1_contentTXT9 = "../nav/nav3.txt";
$v1_contentHandle9 = fopen($v1_contentTXT9, 'w') or die("can't open file");
$sd9 = "$nav3_name";
fwrite($v1_contentHandle9, $sd9);
fclose($v1_contentHandle9);

$v1_contentTXT91 = "../nav/nav4.txt";
$v1_contentHandle91 = fopen($v1_contentTXT91, 'w') or die("can't open file");
$sd91 = "$nav4_name";
fwrite($v1_contentHandle91, $sd91);
fclose($v1_contentHandle91);

$v1_contentTXT81 = "../nav/nav3_link.txt";
$v1_contentHandle81 = fopen($v1_contentTXT81, 'w') or die("can't open file");
$sd81 = "$nav3_link";
fwrite($v1_contentHandle81, $sd81);
fclose($v1_contentHandle81);

$v1_contentTXT812 = "../nav/nav4_link.txt";
$v1_contentHandle812 = fopen($v1_contentTXT812, 'w') or die("can't open file");
$sd812 = "$nav4_link";
fwrite($v1_contentHandle812, $sd812);
fclose($v1_contentHandle812);

$v1_contentTXT001 = "../nav/nav1_out.txt";
$v1_contentHandle001 = fopen($v1_contentTXT001, 'w') or die("can't open file");
$sd001 = "$nav1_out";
fwrite($v1_contentHandle001, $sd001);
fclose($v1_contentHandle001);

$v1_contentTXT002 = "../nav/nav2_out.txt";
$v1_contentHandle002 = fopen($v1_contentTXT002, 'w') or die("can't open file");
$sd002 = "$nav2_out";
fwrite($v1_contentHandle002, $sd002);
fclose($v1_contentHandle002);

$v1_contentTXT003 = "../nav/nav3_out.txt";
$v1_contentHandle003 = fopen($v1_contentTXT003, 'w') or die("can't open file");
$sd003 = "$nav3_out";
fwrite($v1_contentHandle003, $sd003);
fclose($v1_contentHandle003);

$v1_contentTXT004 = "../nav/nav4_out.txt";
$v1_contentHandle004 = fopen($v1_contentTXT004, 'w') or die("can't open file");
$sd004 = "$nav4_out";
fwrite($v1_contentHandle004, $sd004);
fclose($v1_contentHandle004);

$v1_contentTXT005 = "../fb/id.txt";
$v1_contentHandle005 = fopen($v1_contentTXT005, 'w') or die("can't open file");
$sd005 = "$fbId";
fwrite($v1_contentHandle005, $sd005);
fclose($v1_contentHandle005);

$v1_contentTXT006 = "../fb/secret.txt";
$v1_contentHandle006 = fopen($v1_contentTXT006, 'w') or die("can't open file");
$sd006 = "$fbSecret";
fwrite($v1_contentHandle006, $sd006);
fclose($v1_contentHandle006);



header('Location: ../settings.php');
?>