<?php
error_reporting(0);
//----------
session_name('sid');
session_start();
//----------
include ('../inc/config.inc.php.php');
//----------
connect_to_db();
include ('inc_pt/autorize.php.php');
//-----------
$partner = intval($_GET['partner']); if ($partner == 0) $partner = 1;
//----------
$arr = mysql_query("SELECT COUNT(*) FROM `love_partner`;");
$part_users = mysql_result($arr, 0);
if($partner > $part_users) $partner = 1;
//----------
$partner_arr = @mysql_query("SELECT * FROM `love_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());
}

?>