View file ch/inputid.php

File size: 1.71Kb
<?php
require("inc.php");
$ref=rand(10000,1000000);

$link = @mysql_pconnect ($MySQL_Hostname, $MySQL_Username, $MySQL_Password);
mysql_select_db($MySQLDatabasename);

if (!isset($rm)) {header("Location: index.php?ref=$ref"); mysql_close ($link);exit;}

if (($ps==="")||($id==="")) {header("Location: enter.php?ps=$ps&id=$id&ref=$ref"); mysql_close ($link);exit;}

if(isset($id)){$result = @mysql_query ("Select pass,id from users where id='".$id."' LIMIT 1;");if((mysql_affected_rows() == 0)) {header('HTTP/1.1 301 Moved Permanently');header ("Location: enter.php?id=$id&ps=$ps&ref=$ref"); mysql_close ($link);exit;}}

$row = @mysql_fetch_array ($result);
$id=$row["id"];
$passw=$row["pass"];

if($ps===$passw)
{
if(($rm==="enter")||($rm=="")) {header('HTTP/1.1 301 Moved Permanently');header ("Location: enter.php?id=$id&ps=$ps&ref=$ref"); mysql_close ($link);exit;}
if($rm==="whoroom") {header('HTTP/1.1 301 Moved Permanently');header ("Location: who.php?id=$id&ps=$ps&ref=$ref"); 
mysql_close ($link);exit;}

if(($rm>=0)&&($rm<=8)) {header('HTTP/1.1 301 Moved Permanently');header ("Location: chat.php?id=$id&ps=$ps&rm=$rm&ref=$ref");mysql_close ($link);exit;}

if($rm==="10")     {header('HTTP/1.1 301 Moved Permanently');header ("Location: intim.php?id=$id&ps=$ps&rm=$rm&ref=$ref");} //Интим
if($rm==="21")     {header('HTTP/1.1 301 Moved Permanently');header ("Location: maf.php?id=$id&ps=$ps&rm=$rm&ref=$ref");} //Мафия
if($rm==="9")    {header('HTTP/1.1 301 Moved Permanently');header ("Location: anlim.php?id=$id&ps=$ps&rm=$rm&ref=$ref");} //Cортир
} 
else {header('HTTP/1.1 301 Moved Permanently');header("Location: enter.php?ps=$ps&id=$id&ref=$ref"); mysql_close ($link);exit;}

mysql_close ($link);

?>