File size: 4.82Kb
<?
include "ini.php";
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/functions.php";
require_once"../template/antidos.php";
require_once"../template/cookies.php";
require_once"../template/gzip.php";
require_once"../template/header.php";
require_once"../template/referer.php";
include_once"../themes/$config_themes/index.php";
include_once"../template/isset.php";
$text = file("../local/profil/$log.prof");
if ($text!=""){
$udata = explode(":||:",$text[0]);
$provlog=trim($udata[0]);
$provpar=trim($udata[1]);
$privat=trim($udata[10]);}
//////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////
echo '<div class="tp"><img src="lovers.png" alt="" /> Знакомства</div>';
if (isset($_GET['err_gorod'])){echo "<font color=\"#FF0000\"><b>Необходимо ввести город</b></font><br />\r\n";}
if (isset($_GET['err_name'])){echo "<font color=\"#FF0000\"><b>Необходимо ввести свое имя</b></font><br />\r\n";}
if (isset($_GET['err_rost'])){echo "<font color=\"#FF0000\"><b>Необходимо ввести свой рост</b></font><br />\r\n";}
if (isset($_GET['err_ves'])){echo "<font color=\"#FF0000\"><b>Необходимо ввести свой вес</b></font><br />\r\n";}
if (isset($_GET['err_ja'])){echo "<font color=\"#FF0000\"><b>Необходимо ввести краткую информацию о себе</b></font><br />\r\n";}
if (isset($_GET['err_ty'])){echo "<font color=\"#FF0000\"><b>Необходимо ввести краткую информацию о партнере</b></font><br />\r\n";}
if (!$log=="" && !md5($par)=="" && md5($par)==$provpar && $log==$provlog)
{
if (file_exists("../local/datalove/prof/$log.prof"))
{header("Location: index.php?".SID."");exit;}
if (isset($_GET['act']) && $_GET['act']=='anketa')
{
if ($_POST['gorod']==''){header("Location: reg.php?err_gorod&".SID."");exit;}
if ($_POST['name']==''){header("Location: reg.php?err_name&".SID."");exit;}
if ($_POST['rost']==''){header("Location: reg.php?err_rost&".SID."");exit;}
if ($_POST['ves']==''){header("Location: reg.php?err_ves&".SID."");exit;}
if ($_POST['ja']==''){header("Location: reg.php?err_ja&".SID."");exit;}
if ($_POST['ty']==''){header("Location: reg.php?err_ty&".SID."");exit;}
$datalove[0]=stripslashes(htmlspecialchars($_POST['gorod']));
$datalove[0]=str_replace(":||:","",$datalove[0]);
$datalove[1]=stripslashes(htmlspecialchars($_POST['name']));
$datalove[1]=str_replace(":||:","",$datalove[1]);
$datalove[2]=stripslashes(htmlspecialchars($_POST['day']));
$datalove[3]=stripslashes(htmlspecialchars($_POST['mes']));
$datalove[4]=stripslashes(htmlspecialchars($_POST['god']));
$datalove[5]=stripslashes(htmlspecialchars($_POST['pol']));
$datalove[6]=stripslashes(htmlspecialchars($_POST['orient']));
$datalove[7]=stripslashes(htmlspecialchars($_POST['rost']));
$datalove[7]=str_replace(":||:","",$datalove[7]);
$datalove[8]=stripslashes(htmlspecialchars($_POST['ves']));
$datalove[8]=str_replace(":||:","",$datalove[8]);
$datalove[9]=stripslashes(htmlspecialchars($_POST['ja']));
$datalove[9]=str_replace(":||:","",$datalove[9]);
$datalove[9]=str_replace("\r\n","<br />",$datalove[9]);
$datalove[9]=str_replace("\r","<br />",$datalove[9]);
$datalove[9]=str_replace("\n","<br />",$datalove[9]);
$datalove[10]=stripslashes(htmlspecialchars($_POST['ty']));
$datalove[10]=str_replace(":||:","",$datalove[10]);
$datalove[10]=str_replace("\r\n","<br />",$datalove[10]);
$datalove[10]=str_replace("\r","<br />",$datalove[10]);
$datalove[10]=str_replace("\n","<br />",$datalove[10]);
$datalove[11]=7;
$datalove_k=count($datalove);
$datalove[$datalove_k]='';
$datalove_k=count($datalove);
for ($i=0;$i<$datalove_k-1 ;$i++ ){
$ldata.="$datalove[$i]:||:";}
$fp=fopen("../local/datalove/prof/$log.prof","w");
flock($fp,LOCK_EX);
fputs($fp,"$ldata");
fflush($fp);
flock($fp,LOCK_UN);
fclose($fp);
chmod ("../local/datalove/prof/$log.prof", 0666);
header("Location: index.php?reg_ok&".SID."");
exit;
}
echo "<div class='tpanel'>Для начала необходимо заполнить анкету</div>\r\n";
echo "<div class='body'>\r\n";
include "reg_form.php";
echo "<div class=</div>\r\n";
}
else
{
echo "Для начала Вам необходимо <a href=\"../vhod.php?".SID."\">авторизоваться</a> или <a href=\"../registration.php?\">зарегестрироваться</a><br />\r\n";
echo "<div class=</div>\r\n";
}
echo '<div class="btm"><a href="../index.php?'.SID.'">На главную</a></div>';
include_once"../themes/$config_themes/foot.php";
?>