<?php
require( "../inc/conf.inc.php" );
require( "../inc/connect.php" );
echo "<title>Регистрация</title>";
echo "<style type=\"text/css\">";
echo "body { font-size: x-small; color: {$tcol}; background-color: {$bcol} }";
echo "a:link,a:visited { text-decoration: underline; color: {$lcol} }";
echo "div { text-align: center; background-color: {$rcol} }";
echo "</style>";
echo "</head>";
echo "<body>";


error_reporting(0);
session_name('sid');
session_start();

//-----------
$partner = intval($_GET['partner']); if ($partner == 0) $partner = 1;
//----------
$arr = mysql_query("SELECT COUNT(*) FROM `partner`;");
$part_users = mysql_result($arr, 0);
if($partner > $part_users) $partner = 1;
//----------
$partner_arr = @mysql_query("SELECT * FROM `partner` WHERE `partner` = ".$partner." LIMIT 1;");
$row = @mysql_fetch_array($partner_arr);
$partner_site = $row['site'];
$partner_name = $row['name'];
//----------
if ($autorize_partner) {
$_SESSION['log'] = $log;
$_SESSION['pass'] = $pass;
header('Location: menu.php?partner='.$partner.'&mod='.$mod.'&'.$srand.'='.$r_rand.'&'.session_name().'='.session_id());
}
else
{
session_destroy();
session_name('sid');
session_start();
header('Location: auth.php?error=1&partner='.$partner.'&mod='.$mod.'&'.$srand.'='.$r_rand.'&'.session_name().'='.session_id());
}

?>