<?
error_reporting(0);
include('kcaptcha/kcaptcha.php');
session_start();
require(dirname(__FILE__).'/config.php');
require_once('kcaptcha/util/script.php');

if ($_POST['act']== "y")
{
    if(isset($_SESSION['captcha_keystring']) && $_SESSION['captcha_keystring'] ==  $_POST['keystring'])
    {
        
        if (isset($_POST['posName']) && $_POST['posName'] == "")
        {
         $statusError = "$errors_name";
        }
        elseif (isset($_POST['posEmail']) && $_POST['posEmail'] == "")
        {
         $statusError = "$errors_mailfrom";
        }
        elseif(isset($_POST['posEmail']) && !preg_match("/^([a-z,._,0-9])+@([a-z,._,0-9])+(.([a-z])+)+$/", $_POST['posEmail']))
        {
         $statusError = "$errors_incorrect";

         unset($_POST['posEmail']);
        }
        elseif (isset($_POST['posRegard']) && $_POST['posRegard'] == "")
        {
         $statusError = "$errors_subject";
        }
        elseif (isset($_POST['posText']) && $_POST['posText'] == "")
        {
         $statusError = "$errors_message";
        }

elseif (!empty($_POST))
{   
 $headers  = "MIME-Version: 1.0\r\n";
 $headers .= "Content-Type: $content  charset=$charset\r\n";
 $headers .= "Date: ".date("Y-m-d (H:i:s)",time())."\r\n";
 $headers .= "From: \"".$_POST['posName']."\" <".$_POST['posEmail'].">\r\n";
 $headers .= "X-Mailer: My Send E-mail\r\n";

 mail("$mailto","$subject","$message","$headers");

 unset($name, $posText, $mailto, $subject, $posRegard, $message);

 $statusSuccess = "$send";
}

       }else{
             $statusError = "$captcha_error";
             unset($_SESSION['captcha_keystring']);
        }
}
?>



<html>
 <head>
<title>Обратная связь с администрацией сайта</title>
<meta name="robots" content="all">
<meta charset="windows-1251">

<link rel="stylesheet" type="text/css" href="/css/main.css">
<style>
#j {border:1px solid #e1e1e1; background-color:#efefef; text-align:justify; align:center; padding:3px; width:420px;}
#q {border:1px solid #e1e1e1; background-color:#ffffff; text-align:justify; padding:3px;}
#recom {width:220px;padding:10px; position:absolute; text-align:justify}
fieldset {border:0;margin:0;padding:10;}fieldset b{font-size:90%}
label {display:block;}
input,textarea {align:center; width:400px;padding:3px;margin:1px 0;border:solid 1px #000}
h1 {font-size: 25px;}
</style>
</head>
 
<body>


<!-- лого-->
<div class="wrapper">

	<header>
		<a href="/" id="he-logo" title="bitmuz.com">Bitmuz.com</a>

		<ul id="he-menu">
			<li><a href="/">Главная</a></li>
			<li><a href="http://m.bitmuz.com/">Mobile</a></li>
			<li><a class="hash" href="javascript:winop();">Радио</a></li>
		</ul>
	
		
		</form>
	

		

	</header>
	







			
			<div id="xx1">
	<div id="xx2">		
		<div id="xbody">

			<div id="left_side">


			








<div class="player_block" style="width:908px;">
<div id="glav_poisk" >


<center><h1 style="font-size: 25px;">Обратная связь</h1>
<div >
<div id="j" >
<p id="emailSuccess" ><strong style="color:green;"><?php echo $statusSuccess.$r0; ?></strong></p>
<p id="emailError"><strong style="color:red;"><?php echo $statusError.$r1; ?></strong></p>
<div id="recom"></div>
<div id="q"><form action="form.php" method="post" id="cForm">
<input type="hidden" name="act" value="y" />
<fieldset>
<label for="posName"><b>Ваше имя:</b></label>
<input class="inputIE" type="text" size="47" name="posName" id="posName" />
<label for="posEmail"><b>Ваш E-mail адрес:</b></label>
<input class="inputIE" type="text" size="47" name="posEmail" id="posEmail" />
<label for="posRegard"><b>Тема сообщения:</b></label>
<input class="inputIE" type="text" size="47" name="posRegard" id="posRegard" />
<label for="posText"><b>Сообщение:</b></label>
<textarea class="inputIE" cols="47" rows="7" name="posText" id="posText"></textarea></div>
<div id="q"><label for="posCaptcha"><b>Цифры на изображении</b>:</label>
<img src="kcaptcha/index.php?<?php echo session_name()?>=<?php echo session_id()?>"><?php echo $r1; ?><br>
<input class="inputIE" type="text" size="47" name="keystring" id="keystring" /></div>
<div id="q"><label><input class="inputIE" type="submit" name="selfCC" value=" Отправить " /></label>
</fieldset>
</form></div></div>

<br>


</center>



		</div></div>
</div>
</div>

</div>






<footer>

		
		<ul id="foo-menu">
			<li><a href="/">Главная страница</a></li>
			<script type="text/javascript"><!--
function winop()
{
windop = window.open("/radio.html","mywin","height=470,width=591");
}
// --></script>
			 
<li><a class="hash" href="javascript:winop();">Радио on-line</a></li>
			
			<li><a href="/contakt.html">Обратная связь</a></li>
		</ul>
		
		<span id="logofoot" "><br><!--LiveInternet counter--><script type="text/javascript"><!--
document.write("<a href='http://www.liveinternet.ru/click' "+
"target=_blank><img src='//counter.yadro.ru/hit?t23.3;r"+
escape(document.referrer)+((typeof(screen)=="undefined")?"":
";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?
screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+
";"+Math.random()+
"' alt='' title='LiveInternet: показано число посетителей за"+
" сегодня' "+
"border='0' width='88' height='15'><\/a>")
//--></script><!--/LiveInternet--></span>
		
		
		<div id="foo-copyright">&copy; 2012 Bitmuz.com</div>
	</footer>
	</div>

</body>
</html>





